ixheaacd_huff_code_reorder.c:ixheaac_extu:
   54|   758k|static PLATFORM_INLINE UWORD32 ixheaac_extu(UWORD32 a, WORD32 shift_left, WORD32 shift_right) {
   55|   758k|  UWORD32 x;
   56|   758k|  x = (UWORD32)a << shift_left;
   57|   758k|  x = (UWORD32)x >> shift_right;
   58|       |
   59|   758k|  return x;
   60|   758k|}
ixheaacd_mps_res_tns.c:ixheaac_deposit16h_in32:
   40|  27.1k|static PLATFORM_INLINE WORD32 ixheaac_deposit16h_in32(WORD16 var) {
   41|  27.1k|  WORD32 var_out;
   42|       |
   43|  27.1k|  var_out = (WORD32)var << 16;
   44|  27.1k|  return (var_out);
   45|  27.1k|}
ixheaacd_mps_res_tns.c:ixheaac_shl32_dir_sat_limit:
  114|  22.8k|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
  115|  22.8k|  WORD32 out_val;
  116|       |
  117|  22.8k|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 0, False: 22.8k]
  ------------------
  118|      0|    b = -b;
  119|      0|    b = ixheaac_min32(b, 31);
  120|      0|    out_val = ixheaac_shr32(a, b);
  121|  22.8k|  } else {
  122|  22.8k|    out_val = ixheaac_shl32_sat(a, b);
  123|  22.8k|  }
  124|       |
  125|  22.8k|  return out_val;
  126|  22.8k|}
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.55M]
  ------------------
   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.22M|static PLATFORM_INLINE WORD32 ixheaac_shr32_dir_sat_limit(WORD32 a, WORD b) {
  102|  6.22M|  WORD32 out_val;
  103|       |
  104|  6.22M|  if (b < 0) {
  ------------------
  |  Branch (104:7): [True: 1.23M, False: 4.99M]
  ------------------
  105|  1.23M|    out_val = ixheaac_shl32_sat(a, -b);
  106|  4.99M|  } else {
  107|  4.99M|    b = ixheaac_min32(b, 31);
  108|  4.99M|    out_val = ixheaac_shr32(a, b);
  109|  4.99M|  }
  110|       |
  111|  6.22M|  return out_val;
  112|  6.22M|}
ixheaacd_sbrdec_initfuncs.c:ixheaac_extract16l:
   33|  19.4k|static PLATFORM_INLINE WORD16 ixheaac_extract16l(WORD32 var) {
   34|  19.4k|  WORD16 var_out;
   35|       |
   36|  19.4k|  var_out = (WORD16)var;
   37|  19.4k|  return (var_out);
   38|  19.4k|}
ixheaacd_aac_tns.c:ixheaac_deposit16h_in32:
   40|  2.72M|static PLATFORM_INLINE WORD32 ixheaac_deposit16h_in32(WORD16 var) {
   41|  2.72M|  WORD32 var_out;
   42|       |
   43|  2.72M|  var_out = (WORD32)var << 16;
   44|  2.72M|  return (var_out);
   45|  2.72M|}
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|   350k|static PLATFORM_INLINE UWORD32 ixheaac_extu(UWORD32 a, WORD32 shift_left, WORD32 shift_right) {
   55|   350k|  UWORD32 x;
   56|   350k|  x = (UWORD32)a << shift_left;
   57|   350k|  x = (UWORD32)x >> shift_right;
   58|       |
   59|   350k|  return x;
   60|   350k|}
ixheaacd_block.c:ixheaac_shl32_dir_sat_limit:
  114|  59.6M|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
  115|  59.6M|  WORD32 out_val;
  116|       |
  117|  59.6M|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 48.0M, False: 11.6M]
  ------------------
  118|  48.0M|    b = -b;
  119|  48.0M|    b = ixheaac_min32(b, 31);
  120|  48.0M|    out_val = ixheaac_shr32(a, b);
  121|  48.0M|  } else {
  122|  11.6M|    out_val = ixheaac_shl32_sat(a, b);
  123|  11.6M|  }
  124|       |
  125|  59.6M|  return out_val;
  126|  59.6M|}
ixheaacd_env_calc.c:ixheaac_extract16h:
   26|  14.5M|static PLATFORM_INLINE WORD16 ixheaac_extract16h(WORD32 var) {
   27|  14.5M|  WORD16 var_out;
   28|       |
   29|  14.5M|  var_out = (WORD16)(var >> 16);
   30|  14.5M|  return (var_out);
   31|  14.5M|}
ixheaacd_env_calc.c:ixheaac_shl32_dir_sat_limit:
  114|   215k|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
  115|   215k|  WORD32 out_val;
  116|       |
  117|   215k|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 129k, False: 85.5k]
  ------------------
  118|   129k|    b = -b;
  119|   129k|    b = ixheaac_min32(b, 31);
  120|   129k|    out_val = ixheaac_shr32(a, b);
  121|   129k|  } else {
  122|  85.5k|    out_val = ixheaac_shl32_sat(a, b);
  123|  85.5k|  }
  124|       |
  125|   215k|  return out_val;
  126|   215k|}
ixheaacd_env_calc.c:ixheaac_shr32_dir_sat_limit:
  101|   822k|static PLATFORM_INLINE WORD32 ixheaac_shr32_dir_sat_limit(WORD32 a, WORD b) {
  102|   822k|  WORD32 out_val;
  103|       |
  104|   822k|  if (b < 0) {
  ------------------
  |  Branch (104:7): [True: 248k, False: 573k]
  ------------------
  105|   248k|    out_val = ixheaac_shl32_sat(a, -b);
  106|   573k|  } else {
  107|   573k|    b = ixheaac_min32(b, 31);
  108|   573k|    out_val = ixheaac_shr32(a, b);
  109|   573k|  }
  110|       |
  111|   822k|  return out_val;
  112|   822k|}
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|   222k|static PLATFORM_INLINE WORD32 ixheaac_deposit16l_in32(WORD16 var) {
   48|   222k|  WORD32 var_out;
   49|       |
   50|   222k|  var_out = (WORD32)var;
   51|   222k|  return (var_out);
   52|   222k|}
ixheaacd_freq_sca.c:ixheaac_extract16h:
   26|  53.5M|static PLATFORM_INLINE WORD16 ixheaac_extract16h(WORD32 var) {
   27|  53.5M|  WORD16 var_out;
   28|       |
   29|  53.5M|  var_out = (WORD16)(var >> 16);
   30|  53.5M|  return (var_out);
   31|  53.5M|}
ixheaacd_freq_sca.c:ixheaac_extract16l:
   33|   577k|static PLATFORM_INLINE WORD16 ixheaac_extract16l(WORD32 var) {
   34|   577k|  WORD16 var_out;
   35|       |
   36|   577k|  var_out = (WORD16)var;
   37|   577k|  return (var_out);
   38|   577k|}
ixheaacd_lpfuncs.c:ixheaac_shl32_dir_sat_limit:
  114|  36.2M|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
  115|  36.2M|  WORD32 out_val;
  116|       |
  117|  36.2M|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 19.4M, False: 16.8M]
  ------------------
  118|  19.4M|    b = -b;
  119|  19.4M|    b = ixheaac_min32(b, 31);
  120|  19.4M|    out_val = ixheaac_shr32(a, b);
  121|  19.4M|  } else {
  122|  16.8M|    out_val = ixheaac_shl32_sat(a, b);
  123|  16.8M|  }
  124|       |
  125|  36.2M|  return out_val;
  126|  36.2M|}
ixheaacd_lpp_tran.c:ixheaac_extract16h:
   26|   903k|static PLATFORM_INLINE WORD16 ixheaac_extract16h(WORD32 var) {
   27|   903k|  WORD16 var_out;
   28|       |
   29|   903k|  var_out = (WORD16)(var >> 16);
   30|   903k|  return (var_out);
   31|   903k|}
ixheaacd_mps_res_block.c:ixheaac_extu:
   54|   104k|static PLATFORM_INLINE UWORD32 ixheaac_extu(UWORD32 a, WORD32 shift_left, WORD32 shift_right) {
   55|   104k|  UWORD32 x;
   56|   104k|  x = (UWORD32)a << shift_left;
   57|   104k|  x = (UWORD32)x >> shift_right;
   58|       |
   59|   104k|  return x;
   60|   104k|}

ixheaacd_api.c:ixheaac_round16:
  231|   250M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|   250M|  WORD16 var_out;
  233|       |
  234|   250M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|   250M|  return (var_out);
  236|   250M|}
ixheaacd_longblock.c:ixheaac_add16_sat:
   43|  90.4k|static PLATFORM_INLINE WORD16 ixheaac_add16_sat(WORD16 op1, WORD16 op2) {
   44|  90.4k|  WORD16 var_out;
   45|  90.4k|  WORD32 sum;
   46|       |
   47|  90.4k|  sum = (WORD32)op1 + (WORD32)op2;
   48|  90.4k|  var_out = ixheaac_sat16(sum);
   49|  90.4k|  return (var_out);
   50|  90.4k|}
ixheaacd_longblock.c:ixheaac_sat16:
   23|  90.4k|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  90.4k|  WORD16 var_out;
   25|       |
   26|  90.4k|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 90.4k]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  90.4k|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 90.4k]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|  90.4k|  } else {
   31|  90.4k|    var_out = (WORD16)(op1);
   32|  90.4k|  }
   33|  90.4k|  return (var_out);
   34|  90.4k|}
ixheaacd_lt_predict.c:ixheaac_round16:
  231|  84.6M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|  84.6M|  WORD16 var_out;
  233|       |
  234|  84.6M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|  84.6M|  return (var_out);
  236|  84.6M|}
ixheaacd_lt_predict.c:ixheaac_shl16:
   91|  39.0M|static PLATFORM_INLINE WORD16 ixheaac_shl16(WORD16 op1, WORD16 shift) {
   92|  39.0M|  WORD16 var_out;
   93|       |
   94|  39.0M|  var_out = (WORD16)(op1 << shift);
   95|  39.0M|  return (var_out);
   96|  39.0M|}
ixheaacd_lt_predict.c:ixheaac_sat16:
   23|  68.5M|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  68.5M|  WORD16 var_out;
   25|       |
   26|  68.5M|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 4.48M, False: 64.0M]
  ------------------
   27|  4.48M|    var_out = MAX_16;
  ------------------
  |  |   63|  4.48M|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  64.0M|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 4.59M, False: 59.4M]
  ------------------
   29|  4.59M|    var_out = (WORD16)(-32768);
   30|  59.4M|  } else {
   31|  59.4M|    var_out = (WORD16)(op1);
   32|  59.4M|  }
   33|  68.5M|  return (var_out);
   34|  68.5M|}
ixheaacd_mps_res_channel.c:ixheaac_shr16_dir_sat:
  148|  1.02k|static PLATFORM_INLINE WORD16 ixheaac_shr16_dir_sat(WORD16 op1, WORD16 shift) {
  149|  1.02k|  WORD16 var_out;
  150|       |
  151|  1.02k|  if (shift < 0) {
  ------------------
  |  Branch (151:7): [True: 0, False: 1.02k]
  ------------------
  152|      0|    var_out = ixheaac_shl16_sat(op1, (WORD16)(-shift));
  153|  1.02k|  } else {
  154|  1.02k|    var_out = ixheaac_shr16(op1, shift);
  155|  1.02k|  }
  156|  1.02k|  return (var_out);
  157|  1.02k|}
ixheaacd_mps_res_channel.c:ixheaac_shr16:
  110|  1.02k|static PLATFORM_INLINE WORD16 ixheaac_shr16(WORD16 op1, WORD16 shift) {
  111|  1.02k|  WORD16 var_out;
  112|       |
  113|  1.02k|  var_out = ((WORD16)(op1 >> shift));
  114|  1.02k|  return (var_out);
  115|  1.02k|}
ixheaacd_mps_res_longblock.c:ixheaac_add16_sat:
   43|    147|static PLATFORM_INLINE WORD16 ixheaac_add16_sat(WORD16 op1, WORD16 op2) {
   44|    147|  WORD16 var_out;
   45|    147|  WORD32 sum;
   46|       |
   47|    147|  sum = (WORD32)op1 + (WORD32)op2;
   48|    147|  var_out = ixheaac_sat16(sum);
   49|    147|  return (var_out);
   50|    147|}
ixheaacd_mps_res_longblock.c:ixheaac_sat16:
   23|    147|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|    147|  WORD16 var_out;
   25|       |
   26|    147|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 147]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|    147|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 147]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|    147|  } else {
   31|    147|    var_out = (WORD16)(op1);
   32|    147|  }
   33|    147|  return (var_out);
   34|    147|}
ixheaacd_mps_res_pns_js_thumb.c:ixheaac_shr16_dir_sat:
  148|    201|static PLATFORM_INLINE WORD16 ixheaac_shr16_dir_sat(WORD16 op1, WORD16 shift) {
  149|    201|  WORD16 var_out;
  150|       |
  151|    201|  if (shift < 0) {
  ------------------
  |  Branch (151:7): [True: 0, False: 201]
  ------------------
  152|      0|    var_out = ixheaac_shl16_sat(op1, (WORD16)(-shift));
  153|    201|  } else {
  154|    201|    var_out = ixheaac_shr16(op1, shift);
  155|    201|  }
  156|    201|  return (var_out);
  157|    201|}
ixheaacd_mps_res_pns_js_thumb.c:ixheaac_shr16:
  110|    201|static PLATFORM_INLINE WORD16 ixheaac_shr16(WORD16 op1, WORD16 shift) {
  111|    201|  WORD16 var_out;
  112|       |
  113|    201|  var_out = ((WORD16)(op1 >> shift));
  114|    201|  return (var_out);
  115|    201|}
ixheaacd_mps_res_tns.c:ixheaac_round16:
  231|  62.5k|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|  62.5k|  WORD16 var_out;
  233|       |
  234|  62.5k|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|  62.5k|  return (var_out);
  236|  62.5k|}
ixheaacd_multichannel.c:ixheaac_round16:
  231|    272|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|    272|  WORD16 var_out;
  233|       |
  234|    272|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|    272|  return (var_out);
  236|    272|}
ixheaacd_sbrdec_lpfuncs.c:ixheaac_abs16_sat:
  191|  46.8k|static PLATFORM_INLINE WORD16 ixheaac_abs16_sat(WORD16 op1) {
  192|  46.8k|  WORD16 var_out;
  193|       |
  194|  46.8k|  if (-32768 == op1) {
  ------------------
  |  Branch (194:7): [True: 0, False: 46.8k]
  ------------------
  195|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
  196|  46.8k|  } else {
  197|  46.8k|    if (op1 < 0) {
  ------------------
  |  Branch (197:9): [True: 30.2k, False: 16.5k]
  ------------------
  198|  30.2k|      var_out = (WORD16)(-op1);
  199|  30.2k|    } else {
  200|  16.5k|      var_out = op1;
  201|  16.5k|    }
  202|  46.8k|  }
  203|  46.8k|  return (var_out);
  204|  46.8k|}
ixheaacd_sbr_dec.c:ixheaac_sub16_sat:
   59|  45.5k|static PLATFORM_INLINE WORD16 ixheaac_sub16_sat(WORD16 op1, WORD16 op2) {
   60|  45.5k|  WORD16 var_out;
   61|  45.5k|  WORD32 diff;
   62|       |
   63|  45.5k|  diff = (WORD32)op1 - op2;
   64|  45.5k|  var_out = ixheaac_sat16(diff);
   65|  45.5k|  return (var_out);
   66|  45.5k|}
ixheaacd_sbr_dec.c:ixheaac_sat16:
   23|  45.5k|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  45.5k|  WORD16 var_out;
   25|       |
   26|  45.5k|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 45.5k]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  45.5k|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 45.5k]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|  45.5k|  } else {
   31|  45.5k|    var_out = (WORD16)(op1);
   32|  45.5k|  }
   33|  45.5k|  return (var_out);
   34|  45.5k|}
ixheaacd_qmf_dec_generic.c:ixheaac_round16:
  231|  67.9M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|  67.9M|  WORD16 var_out;
  233|       |
  234|  67.9M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|  67.9M|  return (var_out);
  236|  67.9M|}
ixheaacd_aac_tns.c:ixheaac_round16:
  231|  6.23M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|  6.23M|  WORD16 var_out;
  233|       |
  234|  6.23M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|  6.23M|  return (var_out);
  236|  6.23M|}
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.09M|static PLATFORM_INLINE WORD16 ixheaac_shl16_sat(WORD16 op1, WORD16 shift) {
   99|  1.09M|  WORD16 var_out;
  100|  1.09M|  WORD32 temp;
  101|       |
  102|  1.09M|  if (shift > 15) {
  ------------------
  |  Branch (102:7): [True: 0, False: 1.09M]
  ------------------
  103|      0|    shift = 15;
  104|      0|  }
  105|  1.09M|  temp = (WORD32)(op1 << shift);
  106|  1.09M|  var_out = ixheaac_sat16(temp);
  107|  1.09M|  return (var_out);
  108|  1.09M|}
ixheaacd_block.c:ixheaac_sat16:
   23|  1.09M|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  1.09M|  WORD16 var_out;
   25|       |
   26|  1.09M|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 26.1k, False: 1.06M]
  ------------------
   27|  26.1k|    var_out = MAX_16;
  ------------------
  |  |   63|  26.1k|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  1.06M|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 28.8k, False: 1.03M]
  ------------------
   29|  28.8k|    var_out = (WORD16)(-32768);
   30|  1.03M|  } else {
   31|  1.03M|    var_out = (WORD16)(op1);
   32|  1.03M|  }
   33|  1.09M|  return (var_out);
   34|  1.09M|}
ixheaacd_env_calc.c:ixheaac_mult16_shl:
   75|  4.00M|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl(WORD16 op1, WORD16 op2) {
   76|  4.00M|  WORD16 var_out;
   77|       |
   78|  4.00M|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 15));
   79|  4.00M|  return (var_out);
   80|  4.00M|}
ixheaacd_env_calc.c:ixheaac_sat16:
   23|  3.45M|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  3.45M|  WORD16 var_out;
   25|       |
   26|  3.45M|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 3.45M]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  3.45M|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 3.45M]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|  3.45M|  } else {
   31|  3.45M|    var_out = (WORD16)(op1);
   32|  3.45M|  }
   33|  3.45M|  return (var_out);
   34|  3.45M|}
ixheaacd_env_calc.c:ixheaac_sub16:
   52|  15.3M|static PLATFORM_INLINE WORD16 ixheaac_sub16(WORD16 op1, WORD16 op2) {
   53|  15.3M|  WORD16 var_out;
   54|       |
   55|  15.3M|  var_out = ((WORD16)(op1 - op2));
   56|  15.3M|  return (var_out);
   57|  15.3M|}
ixheaacd_env_calc.c:ixheaac_mult16_shl_sat:
   82|  3.45M|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl_sat(WORD16 op1, WORD16 op2) {
   83|  3.45M|  WORD16 var_out;
   84|  3.45M|  WORD32 temp;
   85|       |
   86|  3.45M|  temp = ((WORD32)(((WORD32)op1 * (WORD32)op2) >> 15));
   87|  3.45M|  var_out = ixheaac_sat16(temp);
   88|  3.45M|  return (var_out);
   89|  3.45M|}
ixheaacd_env_dec.c:ixheaac_mult16_shl:
   75|   599k|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl(WORD16 op1, WORD16 op2) {
   76|   599k|  WORD16 var_out;
   77|       |
   78|   599k|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 15));
   79|   599k|  return (var_out);
   80|   599k|}
ixheaacd_env_dec.c:ixheaac_add16:
   36|  86.7k|static PLATFORM_INLINE WORD16 ixheaac_add16(WORD16 op1, WORD16 op2) {
   37|  86.7k|  WORD16 var_out;
   38|       |
   39|  86.7k|  var_out = ((WORD16)(op1 + op2));
   40|  86.7k|  return (var_out);
   41|  86.7k|}
ixheaacd_env_dec.c:ixheaac_shr16:
  110|  8.80k|static PLATFORM_INLINE WORD16 ixheaac_shr16(WORD16 op1, WORD16 shift) {
  111|  8.80k|  WORD16 var_out;
  112|       |
  113|  8.80k|  var_out = ((WORD16)(op1 >> shift));
  114|  8.80k|  return (var_out);
  115|  8.80k|}
ixheaacd_env_dec.c:ixheaac_sub16_sat:
   59|   712k|static PLATFORM_INLINE WORD16 ixheaac_sub16_sat(WORD16 op1, WORD16 op2) {
   60|   712k|  WORD16 var_out;
   61|   712k|  WORD32 diff;
   62|       |
   63|   712k|  diff = (WORD32)op1 - op2;
   64|   712k|  var_out = ixheaac_sat16(diff);
   65|   712k|  return (var_out);
   66|   712k|}
ixheaacd_env_dec.c:ixheaac_sat16:
   23|   712k|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|   712k|  WORD16 var_out;
   25|       |
   26|   712k|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 712k]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|   712k|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 712k]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|   712k|  } else {
   31|   712k|    var_out = (WORD16)(op1);
   32|   712k|  }
   33|   712k|  return (var_out);
   34|   712k|}
ixheaacd_env_dec.c:ixheaac_mult16:
   68|  7.59M|static PLATFORM_INLINE WORD16 ixheaac_mult16(WORD16 op1, WORD16 op2) {
   69|  7.59M|  WORD16 var_out;
   70|       |
   71|  7.59M|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 16));
   72|  7.59M|  return (var_out);
   73|  7.59M|}
ixheaacd_env_extr.c:ixheaac_add16:
   36|   427k|static PLATFORM_INLINE WORD16 ixheaac_add16(WORD16 op1, WORD16 op2) {
   37|   427k|  WORD16 var_out;
   38|       |
   39|   427k|  var_out = ((WORD16)(op1 + op2));
   40|   427k|  return (var_out);
   41|   427k|}
ixheaacd_freq_sca.c:ixheaac_shr16:
  110|  46.7k|static PLATFORM_INLINE WORD16 ixheaac_shr16(WORD16 op1, WORD16 shift) {
  111|  46.7k|  WORD16 var_out;
  112|       |
  113|  46.7k|  var_out = ((WORD16)(op1 >> shift));
  114|  46.7k|  return (var_out);
  115|  46.7k|}
ixheaacd_lpfuncs.c:ixheaac_negate16:
  206|  11.8M|static PLATFORM_INLINE WORD16 ixheaac_negate16(WORD16 op1) {
  207|  11.8M|  WORD16 var_out;
  208|       |
  209|  11.8M|  if (-32768 == op1) {
  ------------------
  |  Branch (209:7): [True: 0, False: 11.8M]
  ------------------
  210|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
  211|  11.8M|  } else {
  212|  11.8M|    var_out = (WORD16)(-op1);
  213|  11.8M|  }
  214|  11.8M|  return (var_out);
  215|  11.8M|}
ixheaacd_lpfuncs.c:ixheaac_round16:
  231|  15.9M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|  15.9M|  WORD16 var_out;
  233|       |
  234|  15.9M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|  15.9M|  return (var_out);
  236|  15.9M|}
ixheaacd_lpp_tran.c:ixheaac_shl16:
   91|   448k|static PLATFORM_INLINE WORD16 ixheaac_shl16(WORD16 op1, WORD16 shift) {
   92|   448k|  WORD16 var_out;
   93|       |
   94|   448k|  var_out = (WORD16)(op1 << shift);
   95|   448k|  return (var_out);
   96|   448k|}
ixheaacd_lpp_tran.c:ixheaac_sat16:
   23|  4.51M|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  4.51M|  WORD16 var_out;
   25|       |
   26|  4.51M|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 4.51M]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  4.51M|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 4.51M]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|  4.51M|  } else {
   31|  4.51M|    var_out = (WORD16)(op1);
   32|  4.51M|  }
   33|  4.51M|  return (var_out);
   34|  4.51M|}
ixheaacd_lpp_tran.c:ixheaac_mult16_shl_sat:
   82|  4.51M|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl_sat(WORD16 op1, WORD16 op2) {
   83|  4.51M|  WORD16 var_out;
   84|  4.51M|  WORD32 temp;
   85|       |
   86|  4.51M|  temp = ((WORD32)(((WORD32)op1 * (WORD32)op2) >> 15));
   87|  4.51M|  var_out = ixheaac_sat16(temp);
   88|  4.51M|  return (var_out);
   89|  4.51M|}
ixheaacd_lpp_tran.c:ixheaac_add16:
   36|  45.5k|static PLATFORM_INLINE WORD16 ixheaac_add16(WORD16 op1, WORD16 op2) {
   37|  45.5k|  WORD16 var_out;
   38|       |
   39|  45.5k|  var_out = ((WORD16)(op1 + op2));
   40|  45.5k|  return (var_out);
   41|  45.5k|}
ixheaacd_mps_calc_m1m2_tree_515x.c:ixheaac_mult16_shl:
   75|  41.4k|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl(WORD16 op1, WORD16 op2) {
   76|  41.4k|  WORD16 var_out;
   77|       |
   78|  41.4k|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 15));
   79|  41.4k|  return (var_out);
   80|  41.4k|}
ixheaacd_ps_bitdec.c:ixheaac_mult16_shl:
   75|  6.77k|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl(WORD16 op1, WORD16 op2) {
   76|  6.77k|  WORD16 var_out;
   77|       |
   78|  6.77k|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 15));
   79|  6.77k|  return (var_out);
   80|  6.77k|}
ixheaacd_ps_bitdec.c:ixheaac_add16:
   36|  4.44k|static PLATFORM_INLINE WORD16 ixheaac_add16(WORD16 op1, WORD16 op2) {
   37|  4.44k|  WORD16 var_out;
   38|       |
   39|  4.44k|  var_out = ((WORD16)(op1 + op2));
   40|  4.44k|  return (var_out);
   41|  4.44k|}
ixheaacd_ps_bitdec.c:ixheaac_negate16:
  206|  3.04k|static PLATFORM_INLINE WORD16 ixheaac_negate16(WORD16 op1) {
  207|  3.04k|  WORD16 var_out;
  208|       |
  209|  3.04k|  if (-32768 == op1) {
  ------------------
  |  Branch (209:7): [True: 0, False: 3.04k]
  ------------------
  210|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
  211|  3.04k|  } else {
  212|  3.04k|    var_out = (WORD16)(-op1);
  213|  3.04k|  }
  214|  3.04k|  return (var_out);
  215|  3.04k|}

ixheaacd_api.c:ixheaac_add32_sat:
  197|   250M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   250M|  WORD64 sum;
  199|       |
  200|   250M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   250M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   250M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  8.66M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 8.66M, False: 241M]
  ------------------
  203|   241M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   241M|#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: 241M]
  ------------------
  204|       |
  205|   241M|  return (WORD32)sum;
  206|   241M|}
ixheaacd_api.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: 167k, False: 54.1M]
  ------------------
   70|   167k|    out_val = MAX_32;
  ------------------
  |  |   60|   167k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  54.1M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  54.1M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 216k, False: 53.9M]
  ------------------
   72|   216k|    out_val = MIN_32;
  ------------------
  |  |   61|   216k|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  53.9M|  else
   74|  53.9M|    out_val = a << b;
   75|  54.3M|  return (out_val);
   76|  54.3M|}
ixheaacd_huff_code_reorder.c:ixheaac_norm32:
  236|   379k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   379k|  WORD norm_val;
  238|       |
  239|   379k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 379k]
  ------------------
  240|      0|    norm_val = 31;
  241|   379k|  } else {
  242|   379k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 20.9k, False: 358k]
  ------------------
  243|  20.9k|      norm_val = 31;
  244|   358k|    } else {
  245|   358k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 358k, False: 0]
  ------------------
  246|   358k|        a = ~a;
  247|   358k|      }
  248|  8.50M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 8.14M, False: 358k]
  ------------------
  249|  8.14M|        a <<= 1;
  250|  8.14M|      }
  251|   358k|    }
  252|   379k|  }
  253|       |
  254|   379k|  return norm_val;
  255|   379k|}
ixheaacd_huff_code_reorder.c:ixheaac_abs32:
  271|  16.3M|static PLATFORM_INLINE WORD32 ixheaac_abs32(WORD32 a) {
  272|  16.3M|  WORD32 abs_val;
  273|       |
  274|  16.3M|  abs_val = a;
  275|       |
  276|  16.3M|  if (a < 0) {
  ------------------
  |  Branch (276:7): [True: 6.01M, False: 10.3M]
  ------------------
  277|  6.01M|    abs_val = -a;
  278|  6.01M|  }
  279|       |
  280|  16.3M|  return abs_val;
  281|  16.3M|}
ixheaacd_latmdemux.c:ixheaac_add32_sat:
  197|     36|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|     36|  WORD64 sum;
  199|       |
  200|     36|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|     36|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|     36|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|     23|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 23, False: 13]
  ------------------
  203|     13|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|     13|#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: 13]
  ------------------
  204|       |
  205|     13|  return (WORD32)sum;
  206|     13|}
ixheaacd_latmdemux.c:ixheaac_shl32_sat:
   67|     36|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|     36|  WORD32 out_val;
   69|     36|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|     36|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 23, False: 13]
  ------------------
   70|     23|    out_val = MAX_32;
  ------------------
  |  |   60|     23|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|     13|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|     13|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 0, False: 13]
  ------------------
   72|      0|    out_val = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|     13|  else
   74|     13|    out_val = a << b;
   75|     36|  return (out_val);
   76|     36|}
ixheaacd_lt_predict.c:ixheaac_shr32:
   51|  89.7M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  89.7M|  WORD32 out_val;
   53|       |
   54|  89.7M|  b = ((UWORD32)(b << 24) >> 24);
   55|  89.7M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 89.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|  89.7M|  } else {
   61|  89.7M|    out_val = (WORD32)a >> b;
   62|  89.7M|  }
   63|       |
   64|  89.7M|  return out_val;
   65|  89.7M|}
ixheaacd_lt_predict.c:ixheaac_add32_sat:
  197|  87.8M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  87.8M|  WORD64 sum;
  199|       |
  200|  87.8M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  87.8M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  87.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   657k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 657k, False: 87.2M]
  ------------------
  203|  87.2M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  87.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  4.63k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 4.63k, False: 87.2M]
  ------------------
  204|       |
  205|  87.2M|  return (WORD32)sum;
  206|  87.2M|}
ixheaacd_lt_predict.c:ixheaac_sub32:
  189|  13.9M|static PLATFORM_INLINE WORD32 ixheaac_sub32(WORD32 a, WORD32 b) {
  190|  13.9M|  WORD32 diff;
  191|       |
  192|  13.9M|  diff = (WORD32)a - (WORD32)b;
  193|       |
  194|  13.9M|  return diff;
  195|  13.9M|}
ixheaacd_lt_predict.c:ixheaac_add32:
  181|  13.9M|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|  13.9M|  WORD32 sum;
  183|       |
  184|  13.9M|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|  13.9M|  return sum;
  187|  13.9M|}
ixheaacd_lt_predict.c:ixheaac_shl32:
   39|  68.0M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  68.0M|  WORD32 out_val;
   41|       |
   42|  68.0M|  b = ((UWORD32)(b << 24) >> 24);
   43|  68.0M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 68.0M]
  ------------------
   44|      0|    out_val = 0;
   45|  68.0M|  else
   46|  68.0M|    out_val = (WORD32)a << b;
   47|       |
   48|  68.0M|  return out_val;
   49|  68.0M|}
ixheaacd_lt_predict.c:ixheaac_shl32_dir:
   78|  12.9M|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir(WORD32 a, WORD b) {
   79|  12.9M|  WORD32 out_val;
   80|       |
   81|  12.9M|  if (b < 0) {
  ------------------
  |  Branch (81:7): [True: 3.48M, False: 9.46M]
  ------------------
   82|  3.48M|    out_val = ixheaac_shr32(a, -b);
   83|  9.46M|  } else {
   84|  9.46M|    out_val = ixheaac_shl32(a, b);
   85|  9.46M|  }
   86|       |
   87|  12.9M|  return out_val;
   88|  12.9M|}
ixheaacd_lt_predict.c:ixheaac_shl32_sat:
   67|  60.4M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  60.4M|  WORD32 out_val;
   69|  60.4M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  60.4M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 653k, False: 59.8M]
  ------------------
   70|   653k|    out_val = MAX_32;
  ------------------
  |  |   60|   653k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  59.8M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  59.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 1.05M, False: 58.7M]
  ------------------
   72|  1.05M|    out_val = MIN_32;
  ------------------
  |  |   61|  1.05M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  58.7M|  else
   74|  58.7M|    out_val = a << b;
   75|  60.4M|  return (out_val);
   76|  60.4M|}
ixheaacd_lt_predict.c:ixheaac_mult16x16in32_shl:
  162|  53.6M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl(WORD16 a, WORD16 b) {
  163|  53.6M|  WORD32 product;
  164|       |
  165|  53.6M|  product = ixheaac_shl32(ixheaac_mult16x16in32(a, b), 1);
  166|       |
  167|  53.6M|  return product;
  168|  53.6M|}
ixheaacd_lt_predict.c:ixheaac_mult16x16in32:
  126|  53.6M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|  53.6M|  WORD32 product;
  128|       |
  129|  53.6M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|  53.6M|  return product;
  132|  53.6M|}
ixheaacd_mps_bitdec.c:ixheaac_negate32_sat:
  317|  68.0k|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|  68.0k|  WORD32 neg_val;
  319|       |
  320|  68.0k|  if (a == MIN_32) {
  ------------------
  |  |   61|  68.0k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 62, False: 68.0k]
  ------------------
  321|     62|    neg_val = MAX_32;
  ------------------
  |  |   60|     62|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|  68.0k|  } else {
  323|  68.0k|    neg_val = -a;
  324|  68.0k|  }
  325|  68.0k|  return neg_val;
  326|  68.0k|}
ixheaacd_mps_bitdec.c:ixheaac_sub32_sat:
  225|  12.3k|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  12.3k|  WORD64 diff;
  227|       |
  228|  12.3k|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  12.3k|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  12.3k|#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.3k]
  ------------------
  231|  12.3k|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  12.3k|#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.3k]
  ------------------
  232|       |
  233|  12.3k|  return (WORD32)diff;
  234|  12.3k|}
ixheaacd_mps_bitdec.c:ixheaac_shr32:
   51|  68.3k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  68.3k|  WORD32 out_val;
   53|       |
   54|  68.3k|  b = ((UWORD32)(b << 24) >> 24);
   55|  68.3k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 68.3k]
  ------------------
   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|  68.3k|  } else {
   61|  68.3k|    out_val = (WORD32)a >> b;
   62|  68.3k|  }
   63|       |
   64|  68.3k|  return out_val;
   65|  68.3k|}
ixheaacd_mps_bitdec.c:ixheaac_add32:
  181|  68.3k|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|  68.3k|  WORD32 sum;
  183|       |
  184|  68.3k|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|  68.3k|  return sum;
  187|  68.3k|}
ixheaacd_mps_bitdec.c:ixheaac_add32_sat:
  197|   149k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   149k|  WORD64 sum;
  199|       |
  200|   149k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   149k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   149k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|     90|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 90, False: 149k]
  ------------------
  203|   149k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   149k|#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: 148k]
  ------------------
  204|       |
  205|   148k|  return (WORD32)sum;
  206|   149k|}
ixheaacd_mps_decorr.c:ixheaac_norm32:
  236|  80.4M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  80.4M|  WORD norm_val;
  238|       |
  239|  80.4M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 11.6M, False: 68.7M]
  ------------------
  240|  11.6M|    norm_val = 31;
  241|  68.7M|  } else {
  242|  68.7M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 68.7M]
  ------------------
  243|      0|      norm_val = 31;
  244|  68.7M|    } else {
  245|  68.7M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 68.7M]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|   369M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 300M, False: 68.7M]
  ------------------
  249|   300M|        a <<= 1;
  250|   300M|      }
  251|  68.7M|    }
  252|  68.7M|  }
  253|       |
  254|  80.4M|  return norm_val;
  255|  80.4M|}
ixheaacd_mps_decorr.c:ixheaac_shr32:
   51|  10.0M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  10.0M|  WORD32 out_val;
   53|       |
   54|  10.0M|  b = ((UWORD32)(b << 24) >> 24);
   55|  10.0M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 10.0M]
  ------------------
   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|  10.0M|  } else {
   61|  10.0M|    out_val = (WORD32)a >> b;
   62|  10.0M|  }
   63|       |
   64|  10.0M|  return out_val;
   65|  10.0M|}
ixheaacd_mps_decorr.c:ixheaac_shl32:
   39|  10.0M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  10.0M|  WORD32 out_val;
   41|       |
   42|  10.0M|  b = ((UWORD32)(b << 24) >> 24);
   43|  10.0M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 10.0M]
  ------------------
   44|      0|    out_val = 0;
   45|  10.0M|  else
   46|  10.0M|    out_val = (WORD32)a << b;
   47|       |
   48|  10.0M|  return out_val;
   49|  10.0M|}
ixheaacd_mps_decorr.c:ixheaac_add32_sat:
  197|  1.04G|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  1.04G|  WORD64 sum;
  199|       |
  200|  1.04G|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  1.04G|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.04G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  27.6M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 27.6M, False: 1.01G]
  ------------------
  203|  1.01G|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.01G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  27.5M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 27.5M, False: 988M]
  ------------------
  204|       |
  205|   988M|  return (WORD32)sum;
  206|  1.01G|}
ixheaacd_mps_hybrid_filt.c:ixheaac_shl32:
   39|  51.6M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  51.6M|  WORD32 out_val;
   41|       |
   42|  51.6M|  b = ((UWORD32)(b << 24) >> 24);
   43|  51.6M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 51.6M]
  ------------------
   44|      0|    out_val = 0;
   45|  51.6M|  else
   46|  51.6M|    out_val = (WORD32)a << b;
   47|       |
   48|  51.6M|  return out_val;
   49|  51.6M|}
ixheaacd_mps_hybrid_filt.c:ixheaac_sub32_sat:
  225|  47.6M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  47.6M|  WORD64 diff;
  227|       |
  228|  47.6M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  47.6M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  47.6M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.87k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 1.87k, False: 47.6M]
  ------------------
  231|  47.6M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  47.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.08k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 2.08k, False: 47.6M]
  ------------------
  232|       |
  233|  47.6M|  return (WORD32)diff;
  234|  47.6M|}
ixheaacd_mps_hybrid_filt.c:ixheaac_add32_sat:
  197|  55.5M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  55.5M|  WORD64 sum;
  199|       |
  200|  55.5M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  55.5M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  55.5M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.50k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 2.50k, False: 55.5M]
  ------------------
  203|  55.5M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  55.5M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.20k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 2.20k, False: 55.5M]
  ------------------
  204|       |
  205|  55.5M|  return (WORD32)sum;
  206|  55.5M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaac_add32_sat:
  197|  85.4M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  85.4M|  WORD64 sum;
  199|       |
  200|  85.4M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  85.4M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  85.4M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  96.8k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 96.8k, False: 85.3M]
  ------------------
  203|  85.3M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  85.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   103k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 103k, False: 85.2M]
  ------------------
  204|       |
  205|  85.2M|  return (WORD32)sum;
  206|  85.3M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaac_sub32_sat:
  225|  1.14M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  1.14M|  WORD64 diff;
  227|       |
  228|  1.14M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  1.14M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.14M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    739|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 739, False: 1.14M]
  ------------------
  231|  1.14M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.14M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    925|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 925, False: 1.14M]
  ------------------
  232|       |
  233|  1.14M|  return (WORD32)diff;
  234|  1.14M|}
ixheaacd_mps_polyphase.c:ixheaac_sub32_sat:
  225|  2.91G|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  2.91G|  WORD64 diff;
  227|       |
  228|  2.91G|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  2.91G|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.91G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   142M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 142M, False: 2.77G]
  ------------------
  231|  2.77G|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.77G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   137M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 137M, False: 2.63G]
  ------------------
  232|       |
  233|  2.63G|  return (WORD32)diff;
  234|  2.77G|}
ixheaacd_mps_polyphase.c:ixheaac_negate32_sat:
  317|   165M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   165M|  WORD32 neg_val;
  319|       |
  320|   165M|  if (a == MIN_32) {
  ------------------
  |  |   61|   165M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 1.43M, False: 163M]
  ------------------
  321|  1.43M|    neg_val = MAX_32;
  ------------------
  |  |   60|  1.43M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   163M|  } else {
  323|   163M|    neg_val = -a;
  324|   163M|  }
  325|   165M|  return neg_val;
  326|   165M|}
ixheaacd_mps_polyphase.c:ixheaac_shl32:
   39|  78.2M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  78.2M|  WORD32 out_val;
   41|       |
   42|  78.2M|  b = ((UWORD32)(b << 24) >> 24);
   43|  78.2M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 78.2M]
  ------------------
   44|      0|    out_val = 0;
   45|  78.2M|  else
   46|  78.2M|    out_val = (WORD32)a << b;
   47|       |
   48|  78.2M|  return out_val;
   49|  78.2M|}
ixheaacd_mps_polyphase.c:ixheaac_add32_sat:
  197|  4.17G|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  4.17G|  WORD64 sum;
  199|       |
  200|  4.17G|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  4.17G|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  4.17G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   163M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 163M, False: 4.01G]
  ------------------
  203|  4.01G|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  4.01G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   166M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 166M, False: 3.84G]
  ------------------
  204|       |
  205|  3.84G|  return (WORD32)sum;
  206|  4.01G|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_add32_sat:
  197|  48.4M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  48.4M|  WORD64 sum;
  199|       |
  200|  48.4M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  48.4M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  48.4M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  7.54k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 7.54k, False: 48.4M]
  ------------------
  203|  48.4M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  48.4M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  5.45k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 5.45k, False: 48.4M]
  ------------------
  204|       |
  205|  48.4M|  return (WORD32)sum;
  206|  48.4M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_norm32:
  236|  29.0M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  29.0M|  WORD norm_val;
  238|       |
  239|  29.0M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 3.57M, False: 25.4M]
  ------------------
  240|  3.57M|    norm_val = 31;
  241|  25.4M|  } else {
  242|  25.4M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 6, False: 25.4M]
  ------------------
  243|      6|      norm_val = 31;
  244|  25.4M|    } else {
  245|  25.4M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 315k, False: 25.1M]
  ------------------
  246|   315k|        a = ~a;
  247|   315k|      }
  248|   103M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 77.7M, False: 25.4M]
  ------------------
  249|  77.7M|        a <<= 1;
  250|  77.7M|      }
  251|  25.4M|    }
  252|  25.4M|  }
  253|       |
  254|  29.0M|  return norm_val;
  255|  29.0M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_shr32:
   51|   379k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   379k|  WORD32 out_val;
   53|       |
   54|   379k|  b = ((UWORD32)(b << 24) >> 24);
   55|   379k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 379k]
  ------------------
   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|   379k|  } else {
   61|   379k|    out_val = (WORD32)a >> b;
   62|   379k|  }
   63|       |
   64|   379k|  return out_val;
   65|   379k|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_shl32:
   39|   379k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   379k|  WORD32 out_val;
   41|       |
   42|   379k|  b = ((UWORD32)(b << 24) >> 24);
   43|   379k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 379k]
  ------------------
   44|      0|    out_val = 0;
   45|   379k|  else
   46|   379k|    out_val = (WORD32)a << b;
   47|       |
   48|   379k|  return out_val;
   49|   379k|}
ixheaacd_mps_res_pns_js_thumb.c:ixheaac_min32:
   23|  1.77k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  1.77k|  WORD32 min_val;
   25|       |
   26|  1.77k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 1.02k, False: 758]
  ------------------
   27|       |
   28|  1.77k|  return min_val;
   29|  1.77k|}
ixheaacd_mps_res_tns.c:ixheaac_add32_sat:
  197|   116k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   116k|  WORD64 sum;
  199|       |
  200|   116k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   116k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   116k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  8.08k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 8.08k, False: 108k]
  ------------------
  203|   108k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   108k|#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: 107k]
  ------------------
  204|       |
  205|   107k|  return (WORD32)sum;
  206|   108k|}
ixheaacd_mps_res_tns.c:ixheaac_mac16x16in32_shl_sat:
  416|  54.3k|static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_shl_sat(WORD32 a, WORD16 b, WORD16 c) {
  417|  54.3k|  WORD32 acc;
  418|       |
  419|  54.3k|  acc = ixheaac_mult16x16in32_shl_sat(b, c);
  420|       |
  421|  54.3k|  acc = ixheaac_add32_sat(a, acc);
  422|       |
  423|  54.3k|  return acc;
  424|  54.3k|}
ixheaacd_mps_res_tns.c:ixheaac_mult16x16in32_shl_sat:
  170|  54.3k|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl_sat(WORD16 a, WORD16 b) {
  171|  54.3k|  WORD32 product;
  172|  54.3k|  product = (WORD32)a * (WORD32)b;
  173|  54.3k|  if (product != (WORD32)0x40000000L) {
  ------------------
  |  Branch (173:7): [True: 54.3k, False: 0]
  ------------------
  174|  54.3k|    product = ixheaac_shl32(product, 1);
  175|  54.3k|  } else {
  176|      0|    product = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  177|      0|  }
  178|  54.3k|  return product;
  179|  54.3k|}
ixheaacd_mps_res_tns.c:ixheaac_shl32:
   39|  54.3k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  54.3k|  WORD32 out_val;
   41|       |
   42|  54.3k|  b = ((UWORD32)(b << 24) >> 24);
   43|  54.3k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 54.3k]
  ------------------
   44|      0|    out_val = 0;
   45|  54.3k|  else
   46|  54.3k|    out_val = (WORD32)a << b;
   47|       |
   48|  54.3k|  return out_val;
   49|  54.3k|}
ixheaacd_mps_res_tns.c:ixheaac_abs32_sat:
  295|  54.3k|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|  54.3k|  WORD32 abs_val;
  297|       |
  298|  54.3k|  abs_val = a;
  299|       |
  300|  54.3k|  if (a == MIN_32) {
  ------------------
  |  |   61|  54.3k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 1.03k, False: 53.3k]
  ------------------
  301|  1.03k|    abs_val = MAX_32;
  ------------------
  |  |   60|  1.03k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|  53.3k|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 10.2k, False: 43.0k]
  ------------------
  303|  10.2k|    abs_val = -a;
  304|  10.2k|  }
  305|       |
  306|  54.3k|  return abs_val;
  307|  54.3k|}
ixheaacd_mps_res_tns.c:ixheaac_sub32_sat:
  225|   152k|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   152k|  WORD64 diff;
  227|       |
  228|   152k|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   152k|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   152k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  6.13k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 6.13k, False: 146k]
  ------------------
  231|   146k|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   146k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  5.84k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 5.84k, False: 140k]
  ------------------
  232|       |
  233|   140k|  return (WORD32)diff;
  234|   146k|}
ixheaacd_mps_res_tns.c:ixheaac_shl32_sat:
   67|  22.8k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  22.8k|  WORD32 out_val;
   69|  22.8k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  22.8k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 2.05k, False: 20.8k]
  ------------------
   70|  2.05k|    out_val = MAX_32;
  ------------------
  |  |   60|  2.05k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  20.8k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  20.8k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 2.27k, False: 18.5k]
  ------------------
   72|  2.27k|    out_val = MIN_32;
  ------------------
  |  |   61|  2.27k|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  18.5k|  else
   74|  18.5k|    out_val = a << b;
   75|  22.8k|  return (out_val);
   76|  22.8k|}
ixheaacd_mps_res_tns.c:ixheaac_abs32_nrm:
  283|  22.8k|static PLATFORM_INLINE WORD32 ixheaac_abs32_nrm(WORD32 a) {
  284|  22.8k|  WORD32 abs_val;
  285|       |
  286|  22.8k|  abs_val = a;
  287|       |
  288|  22.8k|  if (a < 0) {
  ------------------
  |  Branch (288:7): [True: 4.40k, False: 18.4k]
  ------------------
  289|  4.40k|    abs_val = ~a;
  290|  4.40k|  }
  291|       |
  292|  22.8k|  return abs_val;
  293|  22.8k|}
ixheaacd_mps_res_tns.c:ixheaac_norm32:
  236|    286|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|    286|  WORD norm_val;
  238|       |
  239|    286|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 64, False: 222]
  ------------------
  240|     64|    norm_val = 31;
  241|    222|  } else {
  242|    222|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 222]
  ------------------
  243|      0|      norm_val = 31;
  244|    222|    } else {
  245|    222|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 222]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|    987|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 765, False: 222]
  ------------------
  249|    765|        a <<= 1;
  250|    765|      }
  251|    222|    }
  252|    222|  }
  253|       |
  254|    286|  return norm_val;
  255|    286|}
ixheaacd_mps_smoothing.c:ixheaac_abs32:
  271|  76.9k|static PLATFORM_INLINE WORD32 ixheaac_abs32(WORD32 a) {
  272|  76.9k|  WORD32 abs_val;
  273|       |
  274|  76.9k|  abs_val = a;
  275|       |
  276|  76.9k|  if (a < 0) {
  ------------------
  |  Branch (276:7): [True: 6.13k, False: 70.7k]
  ------------------
  277|  6.13k|    abs_val = -a;
  278|  6.13k|  }
  279|       |
  280|  76.9k|  return abs_val;
  281|  76.9k|}
ixheaacd_mps_temp_process.c:ixheaac_add32_sat:
  197|   402M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   402M|  WORD64 sum;
  199|       |
  200|   402M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   402M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   402M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  17.9M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 17.9M, False: 384M]
  ------------------
  203|   384M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   384M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  18.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 18.3M, False: 365M]
  ------------------
  204|       |
  205|   365M|  return (WORD32)sum;
  206|   384M|}
ixheaacd_mps_temp_process.c:ixheaac_norm32:
  236|  14.8M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  14.8M|  WORD norm_val;
  238|       |
  239|  14.8M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 9.57M, False: 5.31M]
  ------------------
  240|  9.57M|    norm_val = 31;
  241|  9.57M|  } else {
  242|  5.31M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 5.31M]
  ------------------
  243|      0|      norm_val = 31;
  244|  5.31M|    } else {
  245|  5.31M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 5.31M]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  71.6M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 66.3M, False: 5.31M]
  ------------------
  249|  66.3M|        a <<= 1;
  250|  66.3M|      }
  251|  5.31M|    }
  252|  5.31M|  }
  253|       |
  254|  14.8M|  return norm_val;
  255|  14.8M|}
ixheaacd_mps_temp_process.c:ixheaac_shr32:
   51|   581k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   581k|  WORD32 out_val;
   53|       |
   54|   581k|  b = ((UWORD32)(b << 24) >> 24);
   55|   581k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 581k]
  ------------------
   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|   581k|  } else {
   61|   581k|    out_val = (WORD32)a >> b;
   62|   581k|  }
   63|       |
   64|   581k|  return out_val;
   65|   581k|}
ixheaacd_mps_temp_process.c:ixheaac_shl32:
   39|   581k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   581k|  WORD32 out_val;
   41|       |
   42|   581k|  b = ((UWORD32)(b << 24) >> 24);
   43|   581k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 581k]
  ------------------
   44|      0|    out_val = 0;
   45|   581k|  else
   46|   581k|    out_val = (WORD32)a << b;
   47|       |
   48|   581k|  return out_val;
   49|   581k|}
ixheaacd_multichannel.c:ixheaac_shl32_sat:
   67|   244k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|   244k|  WORD32 out_val;
   69|   244k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|   244k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 18.4k, False: 226k]
  ------------------
   70|  18.4k|    out_val = MAX_32;
  ------------------
  |  |   60|  18.4k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|   226k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|   226k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 18.5k, False: 207k]
  ------------------
   72|  18.5k|    out_val = MIN_32;
  ------------------
  |  |   61|  18.5k|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   207k|  else
   74|   207k|    out_val = a << b;
   75|   244k|  return (out_val);
   76|   244k|}
ixheaacd_multichannel.c:ixheaac_add32_sat:
  197|   244k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   244k|  WORD64 sum;
  199|       |
  200|   244k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   244k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   244k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  19.8k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 19.8k, False: 225k]
  ------------------
  203|   225k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   225k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  26.1k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 26.1k, False: 198k]
  ------------------
  204|       |
  205|   198k|  return (WORD32)sum;
  206|   225k|}
ixheaacd_pns_js_thumb.c:ixheaac_add32_sat:
  197|  6.22M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  6.22M|  WORD64 sum;
  199|       |
  200|  6.22M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  6.22M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  6.22M|#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.22M]
  ------------------
  203|  6.22M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  6.22M|#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.22M]
  ------------------
  204|       |
  205|  6.22M|  return (WORD32)sum;
  206|  6.22M|}
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.69M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 2.14M, False: 544k]
  ------------------
  249|  2.14M|        a <<= 1;
  250|  2.14M|      }
  251|   544k|    }
  252|   544k|  }
  253|       |
  254|   544k|  return norm_val;
  255|   544k|}
ixheaacd_pns_js_thumb.c:ixheaac_shl32_sat:
   67|  1.78M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  1.78M|  WORD32 out_val;
   69|  1.78M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  1.78M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 600k, False: 1.18M]
  ------------------
   70|   600k|    out_val = MAX_32;
  ------------------
  |  |   60|   600k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  1.18M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  1.18M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 604k, False: 576k]
  ------------------
   72|   604k|    out_val = MIN_32;
  ------------------
  |  |   61|   604k|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   576k|  else
   74|   576k|    out_val = a << b;
   75|  1.78M|  return (out_val);
   76|  1.78M|}
ixheaacd_pns_js_thumb.c:ixheaac_shr32:
   51|  4.99M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  4.99M|  WORD32 out_val;
   53|       |
   54|  4.99M|  b = ((UWORD32)(b << 24) >> 24);
   55|  4.99M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 2.49M, False: 2.49M]
  ------------------
   56|  2.49M|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 1.25M, False: 1.23M]
  ------------------
   57|  1.25M|      out_val = -1;
   58|  1.23M|    else
   59|  1.23M|      out_val = 0;
   60|  2.49M|  } else {
   61|  2.49M|    out_val = (WORD32)a >> b;
   62|  2.49M|  }
   63|       |
   64|  4.99M|  return out_val;
   65|  4.99M|}
ixheaacd_pns_js_thumb.c:ixheaac_min32:
   23|  5.26M|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  5.26M|  WORD32 min_val;
   25|       |
   26|  5.26M|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 2.67M, False: 2.59M]
  ------------------
   27|       |
   28|  5.26M|  return min_val;
   29|  5.26M|}
ixheaacd_rev_vlc.c:ixheaac_min32:
   23|  1.07k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  1.07k|  WORD32 min_val;
   25|       |
   26|  1.07k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 1.07k, False: 0]
  ------------------
   27|       |
   28|  1.07k|  return min_val;
   29|  1.07k|}
ixheaacd_rev_vlc.c:ixheaac_max32:
   31|  23.5k|static PLATFORM_INLINE WORD32 ixheaac_max32(WORD32 a, WORD32 b) {
   32|  23.5k|  WORD32 max_val;
   33|       |
   34|  23.5k|  max_val = (a > b) ? a : b;
  ------------------
  |  Branch (34:13): [True: 3.44k, False: 20.1k]
  ------------------
   35|       |
   36|  23.5k|  return max_val;
   37|  23.5k|}
ixheaacd_sbrdec_lpfuncs.c:ixheaac_min32:
   23|  94.2k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  94.2k|  WORD32 min_val;
   25|       |
   26|  94.2k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 21.1k, False: 73.1k]
  ------------------
   27|       |
   28|  94.2k|  return min_val;
   29|  94.2k|}
ixheaacd_sbrdec_lpfuncs.c:ixheaac_max32:
   31|  94.2k|static PLATFORM_INLINE WORD32 ixheaac_max32(WORD32 a, WORD32 b) {
   32|  94.2k|  WORD32 max_val;
   33|       |
   34|  94.2k|  max_val = (a > b) ? a : b;
  ------------------
  |  Branch (34:13): [True: 12.0k, False: 82.1k]
  ------------------
   35|       |
   36|  94.2k|  return max_val;
   37|  94.2k|}
ixheaacd_sbrdec_lpfuncs.c:ixheaac_add32:
  181|  99.7k|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|  99.7k|  WORD32 sum;
  183|       |
  184|  99.7k|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|  99.7k|  return sum;
  187|  99.7k|}
ixheaacd_sbr_dec.c:ixheaac_min32:
   23|   149k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|   149k|  WORD32 min_val;
   25|       |
   26|   149k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 62.2k, False: 87.1k]
  ------------------
   27|       |
   28|   149k|  return min_val;
   29|   149k|}
ixheaacd_stereo.c:ixheaac_add32_sat:
  197|   351k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   351k|  WORD64 sum;
  199|       |
  200|   351k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   351k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   351k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    184|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 184, False: 351k]
  ------------------
  203|   351k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   351k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    553|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 553, False: 350k]
  ------------------
  204|       |
  205|   350k|  return (WORD32)sum;
  206|   351k|}
ixheaacd_stereo.c:ixheaac_sub32_sat:
  225|   351k|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   351k|  WORD64 diff;
  227|       |
  228|   351k|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   351k|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   351k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    179|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 179, False: 351k]
  ------------------
  231|   351k|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   351k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    578|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 578, False: 350k]
  ------------------
  232|       |
  233|   350k|  return (WORD32)diff;
  234|   351k|}
ixheaacd_stereo.c:ixheaac_negate32:
  309|  1.24k|static PLATFORM_INLINE WORD32 ixheaac_negate32(WORD32 a) {
  310|  1.24k|  WORD32 neg_val;
  311|       |
  312|  1.24k|  neg_val = -a;
  313|       |
  314|  1.24k|  return neg_val;
  315|  1.24k|}
ixheaacd_stereo.c:ixheaac_norm32:
  236|   164k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   164k|  WORD norm_val;
  238|       |
  239|   164k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 162k, False: 1.67k]
  ------------------
  240|   162k|    norm_val = 31;
  241|   162k|  } else {
  242|  1.67k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 205, False: 1.46k]
  ------------------
  243|    205|      norm_val = 31;
  244|  1.46k|    } else {
  245|  1.46k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 545, False: 922]
  ------------------
  246|    545|        a = ~a;
  247|    545|      }
  248|  21.3k|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 19.8k, False: 1.46k]
  ------------------
  249|  19.8k|        a <<= 1;
  250|  19.8k|      }
  251|  1.46k|    }
  252|  1.67k|  }
  253|       |
  254|   164k|  return norm_val;
  255|   164k|}
ixheaacd_stereo.c:ixheaac_shl32:
   39|   164k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   164k|  WORD32 out_val;
   41|       |
   42|   164k|  b = ((UWORD32)(b << 24) >> 24);
   43|   164k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 164k]
  ------------------
   44|      0|    out_val = 0;
   45|   164k|  else
   46|   164k|    out_val = (WORD32)a << b;
   47|       |
   48|   164k|  return out_val;
   49|   164k|}
ixheaacd_stereo.c:ixheaac_shl32_sat:
   67|  2.27k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  2.27k|  WORD32 out_val;
   69|  2.27k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  2.27k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 136, False: 2.13k]
  ------------------
   70|    136|    out_val = MAX_32;
  ------------------
  |  |   60|    136|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  2.13k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  2.13k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 197, False: 1.94k]
  ------------------
   72|    197|    out_val = MIN_32;
  ------------------
  |  |   61|    197|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  1.94k|  else
   74|  1.94k|    out_val = a << b;
   75|  2.27k|  return (out_val);
   76|  2.27k|}
ixheaacd_stereo.c:ixheaac_shr32:
   51|   162k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   162k|  WORD32 out_val;
   53|       |
   54|   162k|  b = ((UWORD32)(b << 24) >> 24);
   55|   162k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 14.1k, False: 148k]
  ------------------
   56|  14.1k|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 55, False: 14.1k]
  ------------------
   57|     55|      out_val = -1;
   58|  14.1k|    else
   59|  14.1k|      out_val = 0;
   60|   148k|  } else {
   61|   148k|    out_val = (WORD32)a >> b;
   62|   148k|  }
   63|       |
   64|   162k|  return out_val;
   65|   162k|}
ixheaacd_qmf_dec_generic.c:ixheaac_add32_sat:
  197|  3.41G|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  3.41G|  WORD64 sum;
  199|       |
  200|  3.41G|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  3.41G|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.41G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  12.7M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 12.7M, False: 3.40G]
  ------------------
  203|  3.40G|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.40G|#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: 3.38G]
  ------------------
  204|       |
  205|  3.38G|  return (WORD32)sum;
  206|  3.40G|}
ixheaacd_qmf_dec_generic.c:ixheaac_shr32:
   51|   608M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   608M|  WORD32 out_val;
   53|       |
   54|   608M|  b = ((UWORD32)(b << 24) >> 24);
   55|   608M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 608M]
  ------------------
   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|   608M|  } else {
   61|   608M|    out_val = (WORD32)a >> b;
   62|   608M|  }
   63|       |
   64|   608M|  return out_val;
   65|   608M|}
ixheaacd_qmf_dec_generic.c:ixheaac_sub32_sat:
  225|  3.17G|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  3.17G|  WORD64 diff;
  227|       |
  228|  3.17G|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  3.17G|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.17G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  7.23M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 7.23M, False: 3.16G]
  ------------------
  231|  3.16G|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.16G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  6.90M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 6.90M, False: 3.15G]
  ------------------
  232|       |
  233|  3.15G|  return (WORD32)diff;
  234|  3.16G|}
ixheaacd_qmf_dec_generic.c:ixheaac_negate32_sat:
  317|   341M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   341M|  WORD32 neg_val;
  319|       |
  320|   341M|  if (a == MIN_32) {
  ------------------
  |  |   61|   341M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 2.04k, False: 341M]
  ------------------
  321|  2.04k|    neg_val = MAX_32;
  ------------------
  |  |   60|  2.04k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   341M|  } else {
  323|   341M|    neg_val = -a;
  324|   341M|  }
  325|   341M|  return neg_val;
  326|   341M|}
ixheaacd_qmf_dec_generic.c:ixheaac_mult16x16in32:
  126|   181M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|   181M|  WORD32 product;
  128|       |
  129|   181M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|   181M|  return product;
  132|   181M|}
ixheaacd_qmf_dec_generic.c:ixheaac_shl32_sat:
   67|   609M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|   609M|  WORD32 out_val;
   69|   609M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|   609M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 66.1M, False: 543M]
  ------------------
   70|  66.1M|    out_val = MAX_32;
  ------------------
  |  |   60|  66.1M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|   543M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|   543M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 80.2M, False: 463M]
  ------------------
   72|  80.2M|    out_val = MIN_32;
  ------------------
  |  |   61|  80.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   463M|  else
   74|   463M|    out_val = a << b;
   75|   609M|  return (out_val);
   76|   609M|}
ixheaacd_aacdecoder.c:ixheaac_add32:
  181|   206k|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|   206k|  WORD32 sum;
  183|       |
  184|   206k|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|   206k|  return sum;
  187|   206k|}
ixheaacd_aac_imdct.c:ixheaac_shl32:
   39|  76.3M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  76.3M|  WORD32 out_val;
   41|       |
   42|  76.3M|  b = ((UWORD32)(b << 24) >> 24);
   43|  76.3M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 76.3M]
  ------------------
   44|      0|    out_val = 0;
   45|  76.3M|  else
   46|  76.3M|    out_val = (WORD32)a << b;
   47|       |
   48|  76.3M|  return out_val;
   49|  76.3M|}
ixheaacd_aac_imdct.c:ixheaac_sub32:
  189|   176M|static PLATFORM_INLINE WORD32 ixheaac_sub32(WORD32 a, WORD32 b) {
  190|   176M|  WORD32 diff;
  191|       |
  192|   176M|  diff = (WORD32)a - (WORD32)b;
  193|       |
  194|   176M|  return diff;
  195|   176M|}
ixheaacd_aac_imdct.c:ixheaac_shr32:
   51|  98.8M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  98.8M|  WORD32 out_val;
   53|       |
   54|  98.8M|  b = ((UWORD32)(b << 24) >> 24);
   55|  98.8M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 98.8M]
  ------------------
   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|  98.8M|  } else {
   61|  98.8M|    out_val = (WORD32)a >> b;
   62|  98.8M|  }
   63|       |
   64|  98.8M|  return out_val;
   65|  98.8M|}
ixheaacd_aac_imdct.c:ixheaac_add32:
  181|   111M|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|   111M|  WORD32 sum;
  183|       |
  184|   111M|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|   111M|  return sum;
  187|   111M|}
ixheaacd_aac_imdct.c:ixheaac_shr32_sat:
  377|  22.4M|static PLATFORM_INLINE WORD32 ixheaac_shr32_sat(WORD32 a, WORD32 b) {
  378|  22.4M|  WORD32 out_val;
  379|       |
  380|  22.4M|  b = ((UWORD32)(b << 24) >> 24);
  381|  22.4M|  if (b >= 31) {
  ------------------
  |  Branch (381:7): [True: 10.6M, False: 11.8M]
  ------------------
  382|  10.6M|    if (a < 0)
  ------------------
  |  Branch (382:9): [True: 0, False: 10.6M]
  ------------------
  383|      0|      out_val = -1;
  384|  10.6M|    else
  385|  10.6M|      out_val = 0;
  386|  11.8M|  } else if (b <= 0) {
  ------------------
  |  Branch (386:14): [True: 9.81M, False: 2.02M]
  ------------------
  387|  9.81M|    return a;
  388|  9.81M|  } else {
  389|  2.02M|    a = ixheaac_add32_sat(a, (1 << (b - 1)));
  390|  2.02M|    out_val = (WORD32)a >> b;
  391|  2.02M|  }
  392|       |
  393|  12.6M|  return out_val;
  394|  22.4M|}
ixheaacd_aac_imdct.c:ixheaac_sub32_sat:
  225|   628M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   628M|  WORD64 diff;
  227|       |
  228|   628M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   628M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   628M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  6.25M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 6.25M, False: 621M]
  ------------------
  231|   621M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   621M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  6.68M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 6.68M, False: 615M]
  ------------------
  232|       |
  233|   615M|  return (WORD32)diff;
  234|   621M|}
ixheaacd_aac_imdct.c:ixheaac_shl32_sat:
   67|  98.1M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  98.1M|  WORD32 out_val;
   69|  98.1M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  98.1M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 8.90M, False: 89.2M]
  ------------------
   70|  8.90M|    out_val = MAX_32;
  ------------------
  |  |   60|  8.90M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  89.2M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  89.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 8.99M, False: 80.2M]
  ------------------
   72|  8.99M|    out_val = MIN_32;
  ------------------
  |  |   61|  8.99M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  80.2M|  else
   74|  80.2M|    out_val = a << b;
   75|  98.1M|  return (out_val);
   76|  98.1M|}
ixheaacd_aac_imdct.c:ixheaac_mult32x16hin32:
  134|   159M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16hin32(WORD32 a, WORD32 b) {
  135|   159M|  WORD32 result;
  136|   159M|  WORD64 temp_result;
  137|       |
  138|   159M|  temp_result = (WORD64)(a) * (WORD64)(b >> 16);
  139|   159M|  result = (WORD32)(temp_result >> 16);
  140|       |
  141|   159M|  return (result);
  142|   159M|}
ixheaacd_aac_imdct.c:ixheaac_negate32_sat:
  317|  22.4M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|  22.4M|  WORD32 neg_val;
  319|       |
  320|  22.4M|  if (a == MIN_32) {
  ------------------
  |  |   61|  22.4M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 0, False: 22.4M]
  ------------------
  321|      0|    neg_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|  22.4M|  } else {
  323|  22.4M|    neg_val = -a;
  324|  22.4M|  }
  325|  22.4M|  return neg_val;
  326|  22.4M|}
ixheaacd_aac_imdct.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: 0, False: 159k]
  ------------------
  240|      0|    norm_val = 31;
  241|   159k|  } else {
  242|   159k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 159k]
  ------------------
  243|      0|      norm_val = 31;
  244|   159k|    } else {
  245|   159k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 159k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  3.76M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 3.60M, False: 159k]
  ------------------
  249|  3.60M|        a <<= 1;
  250|  3.60M|      }
  251|   159k|    }
  252|   159k|  }
  253|       |
  254|   159k|  return norm_val;
  255|   159k|}
ixheaacd_aac_imdct.c:ixheaac_add32_sat:
  197|   685M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   685M|  WORD64 sum;
  199|       |
  200|   685M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   685M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   685M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   721k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 721k, False: 684M]
  ------------------
  203|   684M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   684M|#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: 684M]
  ------------------
  204|       |
  205|   684M|  return (WORD32)sum;
  206|   684M|}
ixheaacd_aac_imdct.c:ixheaac_shr32_dir_sat:
  114|  68.2M|static PLATFORM_INLINE WORD32 ixheaac_shr32_dir_sat(WORD32 a, WORD b) {
  115|  68.2M|  WORD32 out_val;
  116|       |
  117|  68.2M|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 59.3M, False: 8.87M]
  ------------------
  118|  59.3M|    out_val = ixheaac_shl32_sat(a, -b);
  119|  59.3M|  } else {
  120|  8.87M|    out_val = ixheaac_shr32(a, b);
  121|  8.87M|  }
  122|       |
  123|  68.2M|  return out_val;
  124|  68.2M|}
ixheaacd_aac_tns.c:ixheaac_add32_sat:
  197|  51.1M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  51.1M|  WORD64 sum;
  199|       |
  200|  51.1M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  51.1M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  51.1M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   726k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 726k, False: 50.4M]
  ------------------
  203|  50.4M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  50.4M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   298k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 298k, False: 50.1M]
  ------------------
  204|       |
  205|  50.1M|  return (WORD32)sum;
  206|  50.4M|}
ixheaacd_aac_tns.c:ixheaac_abs32_sat:
  295|  14.8M|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|  14.8M|  WORD32 abs_val;
  297|       |
  298|  14.8M|  abs_val = a;
  299|       |
  300|  14.8M|  if (a == MIN_32) {
  ------------------
  |  |   61|  14.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 239k, False: 14.5M]
  ------------------
  301|   239k|    abs_val = MAX_32;
  ------------------
  |  |   60|   239k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|  14.5M|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 3.82M, False: 10.7M]
  ------------------
  303|  3.82M|    abs_val = -a;
  304|  3.82M|  }
  305|       |
  306|  14.8M|  return abs_val;
  307|  14.8M|}
ixheaacd_aac_tns.c:ixheaac_mac16x16in32_shl_sat:
  416|  5.44M|static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_shl_sat(WORD32 a, WORD16 b, WORD16 c) {
  417|  5.44M|  WORD32 acc;
  418|       |
  419|  5.44M|  acc = ixheaac_mult16x16in32_shl_sat(b, c);
  420|       |
  421|  5.44M|  acc = ixheaac_add32_sat(a, acc);
  422|       |
  423|  5.44M|  return acc;
  424|  5.44M|}
ixheaacd_aac_tns.c:ixheaac_mult16x16in32_shl_sat:
  170|  5.44M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl_sat(WORD16 a, WORD16 b) {
  171|  5.44M|  WORD32 product;
  172|  5.44M|  product = (WORD32)a * (WORD32)b;
  173|  5.44M|  if (product != (WORD32)0x40000000L) {
  ------------------
  |  Branch (173:7): [True: 5.44M, False: 0]
  ------------------
  174|  5.44M|    product = ixheaac_shl32(product, 1);
  175|  5.44M|  } else {
  176|      0|    product = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  177|      0|  }
  178|  5.44M|  return product;
  179|  5.44M|}
ixheaacd_aac_tns.c:ixheaac_shl32:
   39|  5.44M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  5.44M|  WORD32 out_val;
   41|       |
   42|  5.44M|  b = ((UWORD32)(b << 24) >> 24);
   43|  5.44M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 5.44M]
  ------------------
   44|      0|    out_val = 0;
   45|  5.44M|  else
   46|  5.44M|    out_val = (WORD32)a << b;
   47|       |
   48|  5.44M|  return out_val;
   49|  5.44M|}
ixheaacd_aac_tns.c:ixheaac_shl32_sat:
   67|  12.5M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  12.5M|  WORD32 out_val;
   69|  12.5M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  12.5M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 774k, False: 11.7M]
  ------------------
   70|   774k|    out_val = MAX_32;
  ------------------
  |  |   60|   774k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  11.7M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  11.7M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 768k, False: 10.9M]
  ------------------
   72|   768k|    out_val = MIN_32;
  ------------------
  |  |   61|   768k|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  10.9M|  else
   74|  10.9M|    out_val = a << b;
   75|  12.5M|  return (out_val);
   76|  12.5M|}
ixheaacd_aac_tns.c:ixheaac_sub32_sat:
  225|  3.51M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  3.51M|  WORD64 diff;
  227|       |
  228|  3.51M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  3.51M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.51M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   166k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 166k, False: 3.34M]
  ------------------
  231|  3.34M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.34M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   117k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 117k, False: 3.23M]
  ------------------
  232|       |
  233|  3.23M|  return (WORD32)diff;
  234|  3.34M|}
ixheaacd_aac_tns.c:ixheaac_shl32_dir_sat:
   90|  1.98M|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat(WORD32 a, WORD b) {
   91|  1.98M|  WORD32 out_val;
   92|       |
   93|  1.98M|  if (b < 0) {
  ------------------
  |  Branch (93:7): [True: 0, False: 1.98M]
  ------------------
   94|      0|    out_val = ixheaac_shr32(a, -b);
   95|  1.98M|  } else {
   96|  1.98M|    out_val = ixheaac_shl32_sat(a, b);
   97|  1.98M|  }
   98|       |
   99|  1.98M|  return out_val;
  100|  1.98M|}
ixheaacd_aac_tns.c:ixheaac_abs32_nrm:
  283|   220M|static PLATFORM_INLINE WORD32 ixheaac_abs32_nrm(WORD32 a) {
  284|   220M|  WORD32 abs_val;
  285|       |
  286|   220M|  abs_val = a;
  287|       |
  288|   220M|  if (a < 0) {
  ------------------
  |  Branch (288:7): [True: 23.6M, False: 196M]
  ------------------
  289|  23.6M|    abs_val = ~a;
  290|  23.6M|  }
  291|       |
  292|   220M|  return abs_val;
  293|   220M|}
ixheaacd_aac_tns.c:ixheaac_norm32:
  236|   357k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   357k|  WORD norm_val;
  238|       |
  239|   357k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 168k, False: 188k]
  ------------------
  240|   168k|    norm_val = 31;
  241|   188k|  } else {
  242|   188k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 188k]
  ------------------
  243|      0|      norm_val = 31;
  244|   188k|    } else {
  245|   188k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 188k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  1.21M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 1.02M, False: 188k]
  ------------------
  249|  1.02M|        a <<= 1;
  250|  1.02M|      }
  251|   188k|    }
  252|   188k|  }
  253|       |
  254|   357k|  return norm_val;
  255|   357k|}
ixheaacd_basic_funcs.c:ixheaac_abs32:
  271|  2.10M|static PLATFORM_INLINE WORD32 ixheaac_abs32(WORD32 a) {
  272|  2.10M|  WORD32 abs_val;
  273|       |
  274|  2.10M|  abs_val = a;
  275|       |
  276|  2.10M|  if (a < 0) {
  ------------------
  |  Branch (276:7): [True: 9.48k, False: 2.09M]
  ------------------
  277|  9.48k|    abs_val = -a;
  278|  9.48k|  }
  279|       |
  280|  2.10M|  return abs_val;
  281|  2.10M|}
ixheaacd_basic_funcs.c:ixheaac_norm32:
  236|  11.3M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  11.3M|  WORD norm_val;
  238|       |
  239|  11.3M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 510k, False: 10.8M]
  ------------------
  240|   510k|    norm_val = 31;
  241|  10.8M|  } else {
  242|  10.8M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 10.8M]
  ------------------
  243|      0|      norm_val = 31;
  244|  10.8M|    } else {
  245|  10.8M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 64.1k, False: 10.8M]
  ------------------
  246|  64.1k|        a = ~a;
  247|  64.1k|      }
  248|   148M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 137M, False: 10.8M]
  ------------------
  249|   137M|        a <<= 1;
  250|   137M|      }
  251|  10.8M|    }
  252|  10.8M|  }
  253|       |
  254|  11.3M|  return norm_val;
  255|  11.3M|}
ixheaacd_basic_funcs.c:ixheaac_mult16x16in32:
  126|  2.72M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|  2.72M|  WORD32 product;
  128|       |
  129|  2.72M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|  2.72M|  return product;
  132|  2.72M|}
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|   175k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   175k|  WORD norm_val;
  238|       |
  239|   175k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 175k]
  ------------------
  240|      0|    norm_val = 31;
  241|   175k|  } else {
  242|   175k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 727, False: 174k]
  ------------------
  243|    727|      norm_val = 31;
  244|   174k|    } else {
  245|   174k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 174k, False: 0]
  ------------------
  246|   174k|        a = ~a;
  247|   174k|      }
  248|  4.14M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 3.97M, False: 174k]
  ------------------
  249|  3.97M|        a <<= 1;
  250|  3.97M|      }
  251|   174k|    }
  252|   175k|  }
  253|       |
  254|   175k|  return norm_val;
  255|   175k|}
ixheaacd_block.c:ixheaac_sub32_sat:
  225|  76.5M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  76.5M|  WORD64 diff;
  227|       |
  228|  76.5M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  76.5M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  76.5M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.26M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 2.26M, False: 74.3M]
  ------------------
  231|  74.3M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  74.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.68M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 1.68M, False: 72.6M]
  ------------------
  232|       |
  233|  72.6M|  return (WORD32)diff;
  234|  74.3M|}
ixheaacd_block.c:ixheaac_min32:
   23|  48.0M|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  48.0M|  WORD32 min_val;
   25|       |
   26|  48.0M|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 48.0M, False: 0]
  ------------------
   27|       |
   28|  48.0M|  return min_val;
   29|  48.0M|}
ixheaacd_block.c:ixheaac_shl32_sat:
   67|  11.6M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  11.6M|  WORD32 out_val;
   69|  11.6M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  11.6M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 2.22M, False: 9.40M]
  ------------------
   70|  2.22M|    out_val = MAX_32;
  ------------------
  |  |   60|  2.22M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  9.40M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  9.40M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 2.24M, False: 7.15M]
  ------------------
   72|  2.24M|    out_val = MIN_32;
  ------------------
  |  |   61|  2.24M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  7.15M|  else
   74|  7.15M|    out_val = a << b;
   75|  11.6M|  return (out_val);
   76|  11.6M|}
ixheaacd_block.c:ixheaac_add32_sat:
  197|  85.3M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  85.3M|  WORD64 sum;
  199|       |
  200|  85.3M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  85.3M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  85.3M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.70M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 3.70M, False: 81.6M]
  ------------------
  203|  81.6M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  81.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.77M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 3.77M, False: 77.8M]
  ------------------
  204|       |
  205|  77.8M|  return (WORD32)sum;
  206|  81.6M|}
ixheaacd_block.c:ixheaac_shr32:
   51|  73.1M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  73.1M|  WORD32 out_val;
   53|       |
   54|  73.1M|  b = ((UWORD32)(b << 24) >> 24);
   55|  73.1M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 324k, False: 72.8M]
  ------------------
   56|   324k|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 178k, False: 145k]
  ------------------
   57|   178k|      out_val = -1;
   58|   145k|    else
   59|   145k|      out_val = 0;
   60|  72.8M|  } else {
   61|  72.8M|    out_val = (WORD32)a >> b;
   62|  72.8M|  }
   63|       |
   64|  73.1M|  return out_val;
   65|  73.1M|}
ixheaacd_block.c:ixheaac_negate32_sat:
  317|  38.2M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|  38.2M|  WORD32 neg_val;
  319|       |
  320|  38.2M|  if (a == MIN_32) {
  ------------------
  |  |   61|  38.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 6.16k, False: 38.2M]
  ------------------
  321|  6.16k|    neg_val = MAX_32;
  ------------------
  |  |   60|  6.16k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|  38.2M|  } else {
  323|  38.2M|    neg_val = -a;
  324|  38.2M|  }
  325|  38.2M|  return neg_val;
  326|  38.2M|}
ixheaacd_block.c:ixheaac_mult32x16in32_sat:
  144|  46.5M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_sat(WORD32 a, WORD16 b) {
  145|  46.5M|  WORD32 result;
  146|  46.5M|  WORD64 temp_result;
  147|       |
  148|  46.5M|  temp_result = (WORD64)a * (WORD64)b;
  149|       |
  150|  46.5M|  if (temp_result < (WORD64)MIN_32)
  ------------------
  |  |   61|  46.5M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (150:7): [True: 2.36M, False: 44.1M]
  ------------------
  151|  2.36M|    result = MIN_32;
  ------------------
  |  |   61|  2.36M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  152|       |
  153|  44.1M|  else if (temp_result > (WORD64)MAX_32)
  ------------------
  |  |   60|  44.1M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (153:12): [True: 2.27M, False: 41.8M]
  ------------------
  154|  2.27M|    result = MAX_32;
  ------------------
  |  |   60|  2.27M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  155|       |
  156|  41.8M|  else
  157|  41.8M|    result = (WORD32)(temp_result);
  158|       |
  159|  46.5M|  return (result);
  160|  46.5M|}
ixheaacd_block.c:ixheaac_shr32_sat:
  377|  16.9M|static PLATFORM_INLINE WORD32 ixheaac_shr32_sat(WORD32 a, WORD32 b) {
  378|  16.9M|  WORD32 out_val;
  379|       |
  380|  16.9M|  b = ((UWORD32)(b << 24) >> 24);
  381|  16.9M|  if (b >= 31) {
  ------------------
  |  Branch (381:7): [True: 3.76M, False: 13.1M]
  ------------------
  382|  3.76M|    if (a < 0)
  ------------------
  |  Branch (382:9): [True: 1.69M, False: 2.07M]
  ------------------
  383|  1.69M|      out_val = -1;
  384|  2.07M|    else
  385|  2.07M|      out_val = 0;
  386|  13.1M|  } else if (b <= 0) {
  ------------------
  |  Branch (386:14): [True: 628k, False: 12.5M]
  ------------------
  387|   628k|    return a;
  388|  12.5M|  } else {
  389|  12.5M|    a = ixheaac_add32_sat(a, (1 << (b - 1)));
  390|  12.5M|    out_val = (WORD32)a >> b;
  391|  12.5M|  }
  392|       |
  393|  16.3M|  return out_val;
  394|  16.9M|}
ixheaacd_block.c:ixheaac_shl32:
   39|  24.0M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  24.0M|  WORD32 out_val;
   41|       |
   42|  24.0M|  b = ((UWORD32)(b << 24) >> 24);
   43|  24.0M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 968k, False: 23.0M]
  ------------------
   44|   968k|    out_val = 0;
   45|  23.0M|  else
   46|  23.0M|    out_val = (WORD32)a << b;
   47|       |
   48|  24.0M|  return out_val;
   49|  24.0M|}
ixheaacd_env_calc.c:ixheaac_mult16x16in32_shl:
  162|   425k|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl(WORD16 a, WORD16 b) {
  163|   425k|  WORD32 product;
  164|       |
  165|   425k|  product = ixheaac_shl32(ixheaac_mult16x16in32(a, b), 1);
  166|       |
  167|   425k|  return product;
  168|   425k|}
ixheaacd_env_calc.c:ixheaac_mult16x16in32:
  126|  10.4M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|  10.4M|  WORD32 product;
  128|       |
  129|  10.4M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|  10.4M|  return product;
  132|  10.4M|}
ixheaacd_env_calc.c:ixheaac_norm32:
  236|   981k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   981k|  WORD norm_val;
  238|       |
  239|   981k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 59.9k, False: 921k]
  ------------------
  240|  59.9k|    norm_val = 31;
  241|   921k|  } else {
  242|   921k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 921k]
  ------------------
  243|      0|      norm_val = 31;
  244|   921k|    } else {
  245|   921k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 921k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  13.8M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 12.9M, False: 921k]
  ------------------
  249|  12.9M|        a <<= 1;
  250|  12.9M|      }
  251|   921k|    }
  252|   921k|  }
  253|       |
  254|   981k|  return norm_val;
  255|   981k|}
ixheaacd_env_calc.c:ixheaac_shl32_sat:
   67|   334k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|   334k|  WORD32 out_val;
   69|   334k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|   334k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 0, False: 334k]
  ------------------
   70|      0|    out_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|   334k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|   334k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 0, False: 334k]
  ------------------
   72|      0|    out_val = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   334k|  else
   74|   334k|    out_val = a << b;
   75|   334k|  return (out_val);
   76|   334k|}
ixheaacd_env_calc.c:ixheaac_shr32:
   51|  37.7M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  37.7M|  WORD32 out_val;
   53|       |
   54|  37.7M|  b = ((UWORD32)(b << 24) >> 24);
   55|  37.7M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 355k, False: 37.4M]
  ------------------
   56|   355k|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 5.51k, False: 349k]
  ------------------
   57|  5.51k|      out_val = -1;
   58|   349k|    else
   59|   349k|      out_val = 0;
   60|  37.4M|  } else {
   61|  37.4M|    out_val = (WORD32)a >> b;
   62|  37.4M|  }
   63|       |
   64|  37.7M|  return out_val;
   65|  37.7M|}
ixheaacd_env_calc.c:ixheaac_min32:
   23|   966k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|   966k|  WORD32 min_val;
   25|       |
   26|   966k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 965k, False: 938]
  ------------------
   27|       |
   28|   966k|  return min_val;
   29|   966k|}
ixheaacd_env_calc.c:ixheaac_max32:
   31|  20.2M|static PLATFORM_INLINE WORD32 ixheaac_max32(WORD32 a, WORD32 b) {
   32|  20.2M|  WORD32 max_val;
   33|       |
   34|  20.2M|  max_val = (a > b) ? a : b;
  ------------------
  |  Branch (34:13): [True: 2.19M, False: 18.0M]
  ------------------
   35|       |
   36|  20.2M|  return max_val;
   37|  20.2M|}
ixheaacd_env_calc.c:ixheaac_abs32_nrm:
  283|  60.3M|static PLATFORM_INLINE WORD32 ixheaac_abs32_nrm(WORD32 a) {
  284|  60.3M|  WORD32 abs_val;
  285|       |
  286|  60.3M|  abs_val = a;
  287|       |
  288|  60.3M|  if (a < 0) {
  ------------------
  |  Branch (288:7): [True: 19.4M, False: 40.9M]
  ------------------
  289|  19.4M|    abs_val = ~a;
  290|  19.4M|  }
  291|       |
  292|  60.3M|  return abs_val;
  293|  60.3M|}
ixheaacd_env_calc.c:ixheaac_pnorm32:
  257|  2.46M|static PLATFORM_INLINE WORD ixheaac_pnorm32(WORD32 a) {
  258|  2.46M|  WORD norm_val;
  259|       |
  260|  2.46M|  if (a == 0) {
  ------------------
  |  Branch (260:7): [True: 214k, False: 2.25M]
  ------------------
  261|   214k|    norm_val = 31;
  262|  2.25M|  } else {
  263|  33.0M|    for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (263:24): [True: 30.7M, False: 2.25M]
  ------------------
  264|  30.7M|      a <<= 1;
  265|  30.7M|    }
  266|  2.25M|  }
  267|       |
  268|  2.46M|  return norm_val;
  269|  2.46M|}
ixheaacd_env_calc.c:ixheaac_shr32_dir:
  102|  9.98M|static PLATFORM_INLINE WORD32 ixheaac_shr32_dir(WORD32 a, WORD b) {
  103|  9.98M|  WORD32 out_val;
  104|       |
  105|  9.98M|  if (b < 0) {
  ------------------
  |  Branch (105:7): [True: 2.50M, False: 7.48M]
  ------------------
  106|  2.50M|    out_val = ixheaac_shl32(a, -b);
  107|  7.48M|  } else {
  108|  7.48M|    out_val = ixheaac_shr32(a, b);
  109|  7.48M|  }
  110|       |
  111|  9.98M|  return out_val;
  112|  9.98M|}
ixheaacd_env_calc.c:ixheaac_mac16x16in32_sat:
  396|  9.98M|static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_sat(WORD32 a, WORD16 b, WORD16 c) {
  397|  9.98M|  WORD32 acc;
  398|       |
  399|  9.98M|  acc = ixheaac_mult16x16in32(b, c);
  400|       |
  401|  9.98M|  acc = ixheaac_add32_sat(a, acc);
  402|       |
  403|  9.98M|  return acc;
  404|  9.98M|}
ixheaacd_env_calc.c:ixheaac_add32_sat:
  197|  39.2M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  39.2M|  WORD64 sum;
  199|       |
  200|  39.2M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  39.2M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  39.2M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    173|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 173, False: 39.2M]
  ------------------
  203|  39.2M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  39.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.77k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 2.77k, False: 39.2M]
  ------------------
  204|       |
  205|  39.2M|  return (WORD32)sum;
  206|  39.2M|}
ixheaacd_env_calc.c:ixheaac_abs32:
  271|  1.34M|static PLATFORM_INLINE WORD32 ixheaac_abs32(WORD32 a) {
  272|  1.34M|  WORD32 abs_val;
  273|       |
  274|  1.34M|  abs_val = a;
  275|       |
  276|  1.34M|  if (a < 0) {
  ------------------
  |  Branch (276:7): [True: 0, False: 1.34M]
  ------------------
  277|      0|    abs_val = -a;
  278|      0|  }
  279|       |
  280|  1.34M|  return abs_val;
  281|  1.34M|}
ixheaacd_env_calc.c:ixheaac_mac16x16in32_shl_sat:
  416|  28.5M|static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_shl_sat(WORD32 a, WORD16 b, WORD16 c) {
  417|  28.5M|  WORD32 acc;
  418|       |
  419|  28.5M|  acc = ixheaac_mult16x16in32_shl_sat(b, c);
  420|       |
  421|  28.5M|  acc = ixheaac_add32_sat(a, acc);
  422|       |
  423|  28.5M|  return acc;
  424|  28.5M|}
ixheaacd_env_calc.c:ixheaac_mult16x16in32_shl_sat:
  170|  28.5M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl_sat(WORD16 a, WORD16 b) {
  171|  28.5M|  WORD32 product;
  172|  28.5M|  product = (WORD32)a * (WORD32)b;
  173|  28.5M|  if (product != (WORD32)0x40000000L) {
  ------------------
  |  Branch (173:7): [True: 28.5M, False: 0]
  ------------------
  174|  28.5M|    product = ixheaac_shl32(product, 1);
  175|  28.5M|  } else {
  176|      0|    product = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  177|      0|  }
  178|  28.5M|  return product;
  179|  28.5M|}
ixheaacd_env_calc.c:ixheaac_sub32_sat:
  225|   143k|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   143k|  WORD64 diff;
  227|       |
  228|   143k|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   143k|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   143k|#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: 143k]
  ------------------
  231|   143k|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   143k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    145|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 145, False: 143k]
  ------------------
  232|       |
  233|   143k|  return (WORD32)diff;
  234|   143k|}
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: 10.5k, False: 39.2M]
  ------------------
   44|  10.5k|    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|  51.6k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  51.6k|  WORD32 min_val;
   25|       |
   26|  51.6k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 50.7k, False: 905]
  ------------------
   27|       |
   28|  51.6k|  return min_val;
   29|  51.6k|}
ixheaacd_ext_ch_ele.c:ixheaac_add32_sat:
  197|  19.0M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  19.0M|  WORD64 sum;
  199|       |
  200|  19.0M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  19.0M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  19.0M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   360k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 360k, False: 18.6M]
  ------------------
  203|  18.6M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  18.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   379k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 379k, False: 18.2M]
  ------------------
  204|       |
  205|  18.2M|  return (WORD32)sum;
  206|  18.6M|}
ixheaacd_ext_ch_ele.c:ixheaac_sub32_sat:
  225|  14.8M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  14.8M|  WORD64 diff;
  227|       |
  228|  14.8M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  14.8M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  14.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   694k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 694k, False: 14.2M]
  ------------------
  231|  14.2M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  14.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   679k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 679k, False: 13.5M]
  ------------------
  232|       |
  233|  13.5M|  return (WORD32)diff;
  234|  14.2M|}
ixheaacd_fft.c:ixheaac_norm32:
  236|  18.8M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  18.8M|  WORD norm_val;
  238|       |
  239|  18.8M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 18.8M]
  ------------------
  240|      0|    norm_val = 31;
  241|  18.8M|  } else {
  242|  18.8M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 18.8M]
  ------------------
  243|      0|      norm_val = 31;
  244|  18.8M|    } else {
  245|  18.8M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 18.8M]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|   523M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 504M, False: 18.8M]
  ------------------
  249|   504M|        a <<= 1;
  250|   504M|      }
  251|  18.8M|    }
  252|  18.8M|  }
  253|       |
  254|  18.8M|  return norm_val;
  255|  18.8M|}
ixheaacd_fft.c:ixheaac_add32_sat:
  197|  2.01G|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  2.01G|  WORD64 sum;
  199|       |
  200|  2.01G|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  2.01G|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.01G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    527|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 527, False: 2.01G]
  ------------------
  203|  2.01G|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.01G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    455|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 455, False: 2.01G]
  ------------------
  204|       |
  205|  2.01G|  return (WORD32)sum;
  206|  2.01G|}
ixheaacd_fft.c:ixheaac_sub32_sat:
  225|  1.61G|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  1.61G|  WORD64 diff;
  227|       |
  228|  1.61G|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  1.61G|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.61G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    155|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 155, False: 1.61G]
  ------------------
  231|  1.61G|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.61G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    173|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 173, False: 1.61G]
  ------------------
  232|       |
  233|  1.61G|  return (WORD32)diff;
  234|  1.61G|}
ixheaacd_fft.c:ixheaac_shl32_sat:
   67|  1.34G|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  1.34G|  WORD32 out_val;
   69|  1.34G|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  1.34G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 693, False: 1.34G]
  ------------------
   70|    693|    out_val = MAX_32;
  ------------------
  |  |   60|    693|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  1.34G|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  1.34G|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 570, False: 1.34G]
  ------------------
   72|    570|    out_val = MIN_32;
  ------------------
  |  |   61|    570|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  1.34G|  else
   74|  1.34G|    out_val = a << b;
   75|  1.34G|  return (out_val);
   76|  1.34G|}
ixheaacd_fft.c:ixheaac_sub32:
  189|  12.1M|static PLATFORM_INLINE WORD32 ixheaac_sub32(WORD32 a, WORD32 b) {
  190|  12.1M|  WORD32 diff;
  191|       |
  192|  12.1M|  diff = (WORD32)a - (WORD32)b;
  193|       |
  194|  12.1M|  return diff;
  195|  12.1M|}
ixheaacd_freq_sca.c:ixheaac_add32_sat:
  197|  2.75M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  2.75M|  WORD64 sum;
  199|       |
  200|  2.75M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  2.75M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.75M|#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.75M]
  ------------------
  203|  2.75M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.75M|#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.75M]
  ------------------
  204|       |
  205|  2.75M|  return (WORD32)sum;
  206|  2.75M|}
ixheaacd_freq_sca.c:ixheaac_shl32:
   39|  26.5M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  26.5M|  WORD32 out_val;
   41|       |
   42|  26.5M|  b = ((UWORD32)(b << 24) >> 24);
   43|  26.5M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 26.5M]
  ------------------
   44|      0|    out_val = 0;
   45|  26.5M|  else
   46|  26.5M|    out_val = (WORD32)a << b;
   47|       |
   48|  26.5M|  return out_val;
   49|  26.5M|}
ixheaacd_freq_sca.c:ixheaac_mult16x16in32_shl:
  162|  26.4M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl(WORD16 a, WORD16 b) {
  163|  26.4M|  WORD32 product;
  164|       |
  165|  26.4M|  product = ixheaac_shl32(ixheaac_mult16x16in32(a, b), 1);
  166|       |
  167|  26.4M|  return product;
  168|  26.4M|}
ixheaacd_freq_sca.c:ixheaac_sub32_sat:
  225|  1.35M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  1.35M|  WORD64 diff;
  227|       |
  228|  1.35M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  1.35M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.35M|#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.35M]
  ------------------
  231|  1.35M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.35M|#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.35M]
  ------------------
  232|       |
  233|  1.35M|  return (WORD32)diff;
  234|  1.35M|}
ixheaacd_freq_sca.c:ixheaac_shl32_sat:
   67|  74.1k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  74.1k|  WORD32 out_val;
   69|  74.1k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  74.1k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 0, False: 74.1k]
  ------------------
   70|      0|    out_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  74.1k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  74.1k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 0, False: 74.1k]
  ------------------
   72|      0|    out_val = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  74.1k|  else
   74|  74.1k|    out_val = a << b;
   75|  74.1k|  return (out_val);
   76|  74.1k|}
ixheaacd_freq_sca.c:ixheaac_mult16x16in32:
  126|  27.0M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|  27.0M|  WORD32 product;
  128|       |
  129|  27.0M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|  27.0M|  return product;
  132|  27.0M|}
ixheaacd_freq_sca.c:ixheaac_shr32:
   51|  2.80M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  2.80M|  WORD32 out_val;
   53|       |
   54|  2.80M|  b = ((UWORD32)(b << 24) >> 24);
   55|  2.80M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 2.80M]
  ------------------
   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.80M|  } else {
   61|  2.80M|    out_val = (WORD32)a >> b;
   62|  2.80M|  }
   63|       |
   64|  2.80M|  return out_val;
   65|  2.80M|}
ixheaacd_imdct.c:ixheaac_negate32_sat:
  317|   298M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   298M|  WORD32 neg_val;
  319|       |
  320|   298M|  if (a == MIN_32) {
  ------------------
  |  |   61|   298M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 468k, False: 297M]
  ------------------
  321|   468k|    neg_val = MAX_32;
  ------------------
  |  |   60|   468k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   297M|  } else {
  323|   297M|    neg_val = -a;
  324|   297M|  }
  325|   298M|  return neg_val;
  326|   298M|}
ixheaacd_imdct.c:ixheaac_norm32:
  236|   856k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   856k|  WORD norm_val;
  238|       |
  239|   856k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 408k, False: 447k]
  ------------------
  240|   408k|    norm_val = 31;
  241|   447k|  } else {
  242|   447k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 447k]
  ------------------
  243|      0|      norm_val = 31;
  244|   447k|    } else {
  245|   447k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 2.69k, False: 445k]
  ------------------
  246|  2.69k|        a = ~a;
  247|  2.69k|      }
  248|  7.60M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 7.15M, False: 447k]
  ------------------
  249|  7.15M|        a <<= 1;
  250|  7.15M|      }
  251|   447k|    }
  252|   447k|  }
  253|       |
  254|   856k|  return norm_val;
  255|   856k|}
ixheaacd_imdct.c:ixheaac_abs32_sat:
  295|   535M|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|   535M|  WORD32 abs_val;
  297|       |
  298|   535M|  abs_val = a;
  299|       |
  300|   535M|  if (a == MIN_32) {
  ------------------
  |  |   61|   535M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 692k, False: 534M]
  ------------------
  301|   692k|    abs_val = MAX_32;
  ------------------
  |  |   60|   692k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|   534M|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 62.4M, False: 472M]
  ------------------
  303|  62.4M|    abs_val = -a;
  304|  62.4M|  }
  305|       |
  306|   535M|  return abs_val;
  307|   535M|}
ixheaacd_lpfuncs.c:ixheaac_min32:
   23|  19.4M|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  19.4M|  WORD32 min_val;
   25|       |
   26|  19.4M|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 19.4M, False: 0]
  ------------------
   27|       |
   28|  19.4M|  return min_val;
   29|  19.4M|}
ixheaacd_lpfuncs.c:ixheaac_add32_sat:
  197|  99.0M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  99.0M|  WORD64 sum;
  199|       |
  200|  99.0M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  99.0M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  99.0M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.82M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 1.82M, False: 97.1M]
  ------------------
  203|  97.1M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  97.1M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   910k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 910k, False: 96.2M]
  ------------------
  204|       |
  205|  96.2M|  return (WORD32)sum;
  206|  97.1M|}
ixheaacd_lpfuncs.c:ixheaac_mult32x16in32_sat:
  144|  29.1M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_sat(WORD32 a, WORD16 b) {
  145|  29.1M|  WORD32 result;
  146|  29.1M|  WORD64 temp_result;
  147|       |
  148|  29.1M|  temp_result = (WORD64)a * (WORD64)b;
  149|       |
  150|  29.1M|  if (temp_result < (WORD64)MIN_32)
  ------------------
  |  |   61|  29.1M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (150:7): [True: 2.20M, False: 26.9M]
  ------------------
  151|  2.20M|    result = MIN_32;
  ------------------
  |  |   61|  2.20M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  152|       |
  153|  26.9M|  else if (temp_result > (WORD64)MAX_32)
  ------------------
  |  |   60|  26.9M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (153:12): [True: 2.17M, False: 24.7M]
  ------------------
  154|  2.17M|    result = MAX_32;
  ------------------
  |  |   60|  2.17M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  155|       |
  156|  24.7M|  else
  157|  24.7M|    result = (WORD32)(temp_result);
  158|       |
  159|  29.1M|  return (result);
  160|  29.1M|}
ixheaacd_lpfuncs.c:ixheaac_sub32_sat:
  225|  17.3M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  17.3M|  WORD64 diff;
  227|       |
  228|  17.3M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  17.3M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  17.3M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.07M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 2.07M, False: 15.2M]
  ------------------
  231|  15.2M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  15.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.19M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 1.19M, False: 14.0M]
  ------------------
  232|       |
  233|  14.0M|  return (WORD32)diff;
  234|  15.2M|}
ixheaacd_lpfuncs.c:ixheaac_negate32_sat:
  317|  16.8M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|  16.8M|  WORD32 neg_val;
  319|       |
  320|  16.8M|  if (a == MIN_32) {
  ------------------
  |  |   61|  16.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 7.68k, False: 16.8M]
  ------------------
  321|  7.68k|    neg_val = MAX_32;
  ------------------
  |  |   60|  7.68k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|  16.8M|  } else {
  323|  16.8M|    neg_val = -a;
  324|  16.8M|  }
  325|  16.8M|  return neg_val;
  326|  16.8M|}
ixheaacd_lpfuncs.c:ixheaac_shr32_sat:
  377|  49.5M|static PLATFORM_INLINE WORD32 ixheaac_shr32_sat(WORD32 a, WORD32 b) {
  378|  49.5M|  WORD32 out_val;
  379|       |
  380|  49.5M|  b = ((UWORD32)(b << 24) >> 24);
  381|  49.5M|  if (b >= 31) {
  ------------------
  |  Branch (381:7): [True: 30.8M, False: 18.6M]
  ------------------
  382|  30.8M|    if (a < 0)
  ------------------
  |  Branch (382:9): [True: 5.43M, False: 25.4M]
  ------------------
  383|  5.43M|      out_val = -1;
  384|  25.4M|    else
  385|  25.4M|      out_val = 0;
  386|  30.8M|  } else if (b <= 0) {
  ------------------
  |  Branch (386:14): [True: 6.67M, False: 12.0M]
  ------------------
  387|  6.67M|    return a;
  388|  12.0M|  } else {
  389|  12.0M|    a = ixheaac_add32_sat(a, (1 << (b - 1)));
  390|  12.0M|    out_val = (WORD32)a >> b;
  391|  12.0M|  }
  392|       |
  393|  42.9M|  return out_val;
  394|  49.5M|}
ixheaacd_lpfuncs.c:ixheaac_shl32_sat:
   67|  33.9M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  33.9M|  WORD32 out_val;
   69|  33.9M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  33.9M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 3.20M, False: 30.7M]
  ------------------
   70|  3.20M|    out_val = MAX_32;
  ------------------
  |  |   60|  3.20M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  30.7M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  30.7M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 3.26M, False: 27.4M]
  ------------------
   72|  3.26M|    out_val = MIN_32;
  ------------------
  |  |   61|  3.26M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  27.4M|  else
   74|  27.4M|    out_val = a << b;
   75|  33.9M|  return (out_val);
   76|  33.9M|}
ixheaacd_lpfuncs.c:ixheaac_shl32:
   39|  32.6M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  32.6M|  WORD32 out_val;
   41|       |
   42|  32.6M|  b = ((UWORD32)(b << 24) >> 24);
   43|  32.6M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 32.6M]
  ------------------
   44|      0|    out_val = 0;
   45|  32.6M|  else
   46|  32.6M|    out_val = (WORD32)a << b;
   47|       |
   48|  32.6M|  return out_val;
   49|  32.6M|}
ixheaacd_lpfuncs.c:ixheaac_shr32:
   51|  78.0M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  78.0M|  WORD32 out_val;
   53|       |
   54|  78.0M|  b = ((UWORD32)(b << 24) >> 24);
   55|  78.0M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 78.0M]
  ------------------
   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|  78.0M|  } else {
   61|  78.0M|    out_val = (WORD32)a >> b;
   62|  78.0M|  }
   63|       |
   64|  78.0M|  return out_val;
   65|  78.0M|}
ixheaacd_lpp_tran.c:ixheaac_sub32:
  189|  9.58M|static PLATFORM_INLINE WORD32 ixheaac_sub32(WORD32 a, WORD32 b) {
  190|  9.58M|  WORD32 diff;
  191|       |
  192|  9.58M|  diff = (WORD32)a - (WORD32)b;
  193|       |
  194|  9.58M|  return diff;
  195|  9.58M|}
ixheaacd_lpp_tran.c:ixheaac_add32:
  181|  19.8M|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|  19.8M|  WORD32 sum;
  183|       |
  184|  19.8M|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|  19.8M|  return sum;
  187|  19.8M|}
ixheaacd_lpp_tran.c:ixheaac_add32_sat:
  197|  11.6M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  11.6M|  WORD64 sum;
  199|       |
  200|  11.6M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  11.6M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  11.6M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    198|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 198, False: 11.6M]
  ------------------
  203|  11.6M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  11.6M|#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.6M]
  ------------------
  204|       |
  205|  11.6M|  return (WORD32)sum;
  206|  11.6M|}
ixheaacd_lpp_tran.c:ixheaac_mult32x16hin32:
  134|  72.5M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16hin32(WORD32 a, WORD32 b) {
  135|  72.5M|  WORD32 result;
  136|  72.5M|  WORD64 temp_result;
  137|       |
  138|  72.5M|  temp_result = (WORD64)(a) * (WORD64)(b >> 16);
  139|  72.5M|  result = (WORD32)(temp_result >> 16);
  140|       |
  141|  72.5M|  return (result);
  142|  72.5M|}
ixheaacd_lpp_tran.c:ixheaac_abs32_nrm:
  283|  2.68M|static PLATFORM_INLINE WORD32 ixheaac_abs32_nrm(WORD32 a) {
  284|  2.68M|  WORD32 abs_val;
  285|       |
  286|  2.68M|  abs_val = a;
  287|       |
  288|  2.68M|  if (a < 0) {
  ------------------
  |  Branch (288:7): [True: 988k, False: 1.70M]
  ------------------
  289|   988k|    abs_val = ~a;
  290|   988k|  }
  291|       |
  292|  2.68M|  return abs_val;
  293|  2.68M|}
ixheaacd_lpp_tran.c:ixheaac_pnorm32:
  257|   448k|static PLATFORM_INLINE WORD ixheaac_pnorm32(WORD32 a) {
  258|   448k|  WORD norm_val;
  259|       |
  260|   448k|  if (a == 0) {
  ------------------
  |  Branch (260:7): [True: 89.4k, False: 358k]
  ------------------
  261|  89.4k|    norm_val = 31;
  262|   358k|  } else {
  263|  3.70M|    for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (263:24): [True: 3.35M, False: 358k]
  ------------------
  264|  3.35M|      a <<= 1;
  265|  3.35M|    }
  266|   358k|  }
  267|       |
  268|   448k|  return norm_val;
  269|   448k|}
ixheaacd_lpp_tran.c:ixheaac_sub32_sat:
  225|  2.57M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  2.57M|  WORD64 diff;
  227|       |
  228|  2.57M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  2.57M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.57M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    102|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 102, False: 2.57M]
  ------------------
  231|  2.57M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.57M|#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.57M]
  ------------------
  232|       |
  233|  2.57M|  return (WORD32)diff;
  234|  2.57M|}
ixheaacd_lpp_tran.c:ixheaac_shr32:
   51|  43.6M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  43.6M|  WORD32 out_val;
   53|       |
   54|  43.6M|  b = ((UWORD32)(b << 24) >> 24);
   55|  43.6M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 43.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|  43.6M|  } else {
   61|  43.6M|    out_val = (WORD32)a >> b;
   62|  43.6M|  }
   63|       |
   64|  43.6M|  return out_val;
   65|  43.6M|}
ixheaacd_lpp_tran.c:ixheaac_norm32:
  236|   710k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   710k|  WORD norm_val;
  238|       |
  239|   710k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 710k]
  ------------------
  240|      0|    norm_val = 31;
  241|   710k|  } else {
  242|   710k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 710k]
  ------------------
  243|      0|      norm_val = 31;
  244|   710k|    } else {
  245|   710k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 7.56k, False: 702k]
  ------------------
  246|  7.56k|        a = ~a;
  247|  7.56k|      }
  248|  1.13M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 428k, False: 710k]
  ------------------
  249|   428k|        a <<= 1;
  250|   428k|      }
  251|   710k|    }
  252|   710k|  }
  253|       |
  254|   710k|  return norm_val;
  255|   710k|}
ixheaacd_lpp_tran.c:ixheaac_abs32_sat:
  295|  1.77M|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|  1.77M|  WORD32 abs_val;
  297|       |
  298|  1.77M|  abs_val = a;
  299|       |
  300|  1.77M|  if (a == MIN_32) {
  ------------------
  |  |   61|  1.77M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 442, False: 1.77M]
  ------------------
  301|    442|    abs_val = MAX_32;
  ------------------
  |  |   60|    442|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|  1.77M|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 795k, False: 980k]
  ------------------
  303|   795k|    abs_val = -a;
  304|   795k|  }
  305|       |
  306|  1.77M|  return abs_val;
  307|  1.77M|}
ixheaacd_lpp_tran.c:ixheaac_min32:
   23|  45.5k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  45.5k|  WORD32 min_val;
   25|       |
   26|  45.5k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 0, False: 45.5k]
  ------------------
   27|       |
   28|  45.5k|  return min_val;
   29|  45.5k|}
ixheaacd_mps_apply_m1.c:ixheaac_add32_sat:
  197|   504M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   504M|  WORD64 sum;
  199|       |
  200|   504M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   504M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   504M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  37.5M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 37.5M, False: 467M]
  ------------------
  203|   467M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   467M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  37.7M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 37.7M, False: 429M]
  ------------------
  204|       |
  205|   429M|  return (WORD32)sum;
  206|   467M|}
ixheaacd_mps_apply_m1.c:ixheaac_sub32_sat:
  225|   143M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   143M|  WORD64 diff;
  227|       |
  228|   143M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   143M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   143M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  12.4M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 12.4M, False: 131M]
  ------------------
  231|   131M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   131M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  12.4M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 12.4M, False: 118M]
  ------------------
  232|       |
  233|   118M|  return (WORD32)diff;
  234|   131M|}
ixheaacd_mps_apply_m2.c:ixheaac_add32_sat:
  197|   548M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   548M|  WORD64 sum;
  199|       |
  200|   548M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   548M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   548M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  14.7M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 14.7M, False: 533M]
  ------------------
  203|   533M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   533M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  14.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 14.8M, False: 518M]
  ------------------
  204|       |
  205|   518M|  return (WORD32)sum;
  206|   533M|}
ixheaacd_mps_res_block.c:ixheaac_norm32:
  236|  1.14k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  1.14k|  WORD norm_val;
  238|       |
  239|  1.14k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 1.14k]
  ------------------
  240|      0|    norm_val = 31;
  241|  1.14k|  } else {
  242|  1.14k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 97, False: 1.04k]
  ------------------
  243|     97|      norm_val = 31;
  244|  1.04k|    } else {
  245|  1.04k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 1.04k, False: 0]
  ------------------
  246|  1.04k|        a = ~a;
  247|  1.04k|      }
  248|  25.1k|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 24.1k, False: 1.04k]
  ------------------
  249|  24.1k|        a <<= 1;
  250|  24.1k|      }
  251|  1.04k|    }
  252|  1.14k|  }
  253|       |
  254|  1.14k|  return norm_val;
  255|  1.14k|}
ixheaacd_mps_res_block.c:ixheaac_shr32:
   51|  26.3k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  26.3k|  WORD32 out_val;
   53|       |
   54|  26.3k|  b = ((UWORD32)(b << 24) >> 24);
   55|  26.3k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 2.16k, False: 24.2k]
  ------------------
   56|  2.16k|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 600, False: 1.56k]
  ------------------
   57|    600|      out_val = -1;
   58|  1.56k|    else
   59|  1.56k|      out_val = 0;
   60|  24.2k|  } else {
   61|  24.2k|    out_val = (WORD32)a >> b;
   62|  24.2k|  }
   63|       |
   64|  26.3k|  return out_val;
   65|  26.3k|}
ixheaacd_mps_res_block.c:ixheaac_shl32:
   39|   294k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   294k|  WORD32 out_val;
   41|       |
   42|   294k|  b = ((UWORD32)(b << 24) >> 24);
   43|   294k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 928, False: 293k]
  ------------------
   44|    928|    out_val = 0;
   45|   293k|  else
   46|   293k|    out_val = (WORD32)a << b;
   47|       |
   48|   294k|  return out_val;
   49|   294k|}
ixheaacd_ps_bitdec.c:ixheaac_shr32:
   51|  63.4k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  63.4k|  WORD32 out_val;
   53|       |
   54|  63.4k|  b = ((UWORD32)(b << 24) >> 24);
   55|  63.4k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 63.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|  63.4k|  } else {
   61|  63.4k|    out_val = (WORD32)a >> b;
   62|  63.4k|  }
   63|       |
   64|  63.4k|  return out_val;
   65|  63.4k|}
ixheaacd_qmf_dec.c:ixheaac_sub32_sat:
  225|  49.0M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  49.0M|  WORD64 diff;
  227|       |
  228|  49.0M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  49.0M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  49.0M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.37k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 3.37k, False: 49.0M]
  ------------------
  231|  49.0M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  49.0M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.39k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 3.39k, False: 49.0M]
  ------------------
  232|       |
  233|  49.0M|  return (WORD32)diff;
  234|  49.0M|}
ixheaacd_qmf_dec.c:ixheaac_add32_sat:
  197|   281M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   281M|  WORD64 sum;
  199|       |
  200|   281M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   281M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   281M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   126k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 126k, False: 281M]
  ------------------
  203|   281M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   281M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   126k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 126k, False: 281M]
  ------------------
  204|       |
  205|   281M|  return (WORD32)sum;
  206|   281M|}
ixheaacd_qmf_dec.c:ixheaac_mult16x16in32:
  126|   386M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|   386M|  WORD32 product;
  128|       |
  129|   386M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|   386M|  return product;
  132|   386M|}
ixheaacd_qmf_dec.c:ixheaac_add32:
  181|   158M|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|   158M|  WORD32 sum;
  183|       |
  184|   158M|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|   158M|  return sum;
  187|   158M|}
ixheaacd_qmf_dec.c:ixheaac_min32:
   23|  49.7k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  49.7k|  WORD32 min_val;
   25|       |
   26|  49.7k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 0, False: 49.7k]
  ------------------
   27|       |
   28|  49.7k|  return min_val;
   29|  49.7k|}
ixheaacd_tcx_fwd_alcnx.c:ixheaac_norm32:
  236|   230k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   230k|  WORD norm_val;
  238|       |
  239|   230k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 38.0k, False: 192k]
  ------------------
  240|  38.0k|    norm_val = 31;
  241|   192k|  } else {
  242|   192k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 192k]
  ------------------
  243|      0|      norm_val = 31;
  244|   192k|    } else {
  245|   192k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 127, False: 192k]
  ------------------
  246|    127|        a = ~a;
  247|    127|      }
  248|  4.84M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 4.64M, False: 192k]
  ------------------
  249|  4.64M|        a <<= 1;
  250|  4.64M|      }
  251|   192k|    }
  252|   192k|  }
  253|       |
  254|   230k|  return norm_val;
  255|   230k|}
ixheaacd_tcx_fwd_mdct.c:ixheaac_norm32:
  236|   219k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   219k|  WORD norm_val;
  238|       |
  239|   219k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 219k]
  ------------------
  240|      0|    norm_val = 31;
  241|   219k|  } else {
  242|   219k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 219k]
  ------------------
  243|      0|      norm_val = 31;
  244|   219k|    } else {
  245|   219k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 219k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  6.73M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 6.51M, False: 219k]
  ------------------
  249|  6.51M|        a <<= 1;
  250|  6.51M|      }
  251|   219k|    }
  252|   219k|  }
  253|       |
  254|   219k|  return norm_val;
  255|   219k|}
ixheaacd_tns.c:ixheaac_add32_sat:
  197|  11.9M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  11.9M|  WORD64 sum;
  199|       |
  200|  11.9M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  11.9M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  11.9M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   632k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 632k, False: 11.2M]
  ------------------
  203|  11.2M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  11.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   152k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 152k, False: 11.1M]
  ------------------
  204|       |
  205|  11.1M|  return (WORD32)sum;
  206|  11.2M|}
ixheaacd_tns.c:ixheaac_abs32_sat:
  295|  11.9M|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|  11.9M|  WORD32 abs_val;
  297|       |
  298|  11.9M|  abs_val = a;
  299|       |
  300|  11.9M|  if (a == MIN_32) {
  ------------------
  |  |   61|  11.9M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 152k, False: 11.7M]
  ------------------
  301|   152k|    abs_val = MAX_32;
  ------------------
  |  |   60|   152k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|  11.7M|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 2.06M, False: 9.69M]
  ------------------
  303|  2.06M|    abs_val = -a;
  304|  2.06M|  }
  305|       |
  306|  11.9M|  return abs_val;
  307|  11.9M|}
ixheaacd_tns.c:ixheaac_min32:
   23|   484k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|   484k|  WORD32 min_val;
   25|       |
   26|   484k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 199k, False: 284k]
  ------------------
   27|       |
   28|   484k|  return min_val;
   29|   484k|}
ixheaacd_tns.c:ixheaac_norm32:
  236|   116k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   116k|  WORD norm_val;
  238|       |
  239|   116k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 116k]
  ------------------
  240|      0|    norm_val = 31;
  241|   116k|  } else {
  242|   116k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 116k]
  ------------------
  243|      0|      norm_val = 31;
  244|   116k|    } else {
  245|   116k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 116k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  3.45M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 3.34M, False: 116k]
  ------------------
  249|  3.34M|        a <<= 1;
  250|  3.34M|      }
  251|   116k|    }
  252|   116k|  }
  253|       |
  254|   116k|  return norm_val;
  255|   116k|}
ixheaacd_tns.c:ixheaac_sub32_sat:
  225|  3.92M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  3.92M|  WORD64 diff;
  227|       |
  228|  3.92M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  3.92M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.92M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    200|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 200, False: 3.92M]
  ------------------
  231|  3.92M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.92M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    455|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 455, False: 3.92M]
  ------------------
  232|       |
  233|  3.92M|  return (WORD32)diff;
  234|  3.92M|}
ixheaacd_tns.c:ixheaac_shl32:
   39|  3.92M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  3.92M|  WORD32 out_val;
   41|       |
   42|  3.92M|  b = ((UWORD32)(b << 24) >> 24);
   43|  3.92M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 3.92M]
  ------------------
   44|      0|    out_val = 0;
   45|  3.92M|  else
   46|  3.92M|    out_val = (WORD32)a << b;
   47|       |
   48|  3.92M|  return out_val;
   49|  3.92M|}
ixheaac_esbr_fft.c:ixheaac_norm32:
  236|  43.4M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  43.4M|  WORD norm_val;
  238|       |
  239|  43.4M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 43.4M]
  ------------------
  240|      0|    norm_val = 31;
  241|  43.4M|  } else {
  242|  43.4M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 43.4M]
  ------------------
  243|      0|      norm_val = 31;
  244|  43.4M|    } else {
  245|  43.4M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 43.4M]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  1.18G|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 1.13G, False: 43.4M]
  ------------------
  249|  1.13G|        a <<= 1;
  250|  1.13G|      }
  251|  43.4M|    }
  252|  43.4M|  }
  253|       |
  254|  43.4M|  return norm_val;
  255|  43.4M|}
ixheaacd_acelp_bitparse.c:ixheaac_add32_sat:
  197|  71.0M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  71.0M|  WORD64 sum;
  199|       |
  200|  71.0M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  71.0M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  71.0M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  28.5k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 28.5k, False: 71.0M]
  ------------------
  203|  71.0M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  71.0M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.04M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 2.04M, False: 69.0M]
  ------------------
  204|       |
  205|  69.0M|  return (WORD32)sum;
  206|  71.0M|}
ixheaacd_avq_dec.c:ixheaac_negate32_sat:
  317|   362k|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   362k|  WORD32 neg_val;
  319|       |
  320|   362k|  if (a == MIN_32) {
  ------------------
  |  |   61|   362k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 0, False: 362k]
  ------------------
  321|      0|    neg_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   362k|  } else {
  323|   362k|    neg_val = -a;
  324|   362k|  }
  325|   362k|  return neg_val;
  326|   362k|}
ixheaacd_avq_dec.c:ixheaac_sub32_sat:
  225|  2.54M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  2.54M|  WORD64 diff;
  227|       |
  228|  2.54M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  2.54M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.54M|#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.54M]
  ------------------
  231|  2.54M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.54M|#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.54M]
  ------------------
  232|       |
  233|  2.54M|  return (WORD32)diff;
  234|  2.54M|}
ixheaacd_avq_dec.c:ixheaac_add32_sat:
  197|  8.20M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  8.20M|  WORD64 sum;
  199|       |
  200|  8.20M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  8.20M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  8.20M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  11.4k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 11.4k, False: 8.19M]
  ------------------
  203|  8.19M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  8.19M|#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.19M]
  ------------------
  204|       |
  205|  8.19M|  return (WORD32)sum;
  206|  8.19M|}
ixheaacd_avq_dec.c:ixheaac_shl32_sat:
   67|  2.33M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  2.33M|  WORD32 out_val;
   69|  2.33M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  2.33M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 0, False: 2.33M]
  ------------------
   70|      0|    out_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  2.33M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  2.33M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 0, False: 2.33M]
  ------------------
   72|      0|    out_val = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  2.33M|  else
   74|  2.33M|    out_val = a << b;
   75|  2.33M|  return (out_val);
   76|  2.33M|}
ixheaacd_basic_ops.c:ixheaac_add32_sat:
  197|   479M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   479M|  WORD64 sum;
  199|       |
  200|   479M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   479M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   479M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  4.33M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 4.33M, False: 475M]
  ------------------
  203|   475M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   475M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.03M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 1.03M, False: 474M]
  ------------------
  204|       |
  205|   474M|  return (WORD32)sum;
  206|   475M|}
ixheaacd_basic_ops.c:ixheaac_shl32_sat:
   67|   386M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|   386M|  WORD32 out_val;
   69|   386M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|   386M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 20.8M, False: 365M]
  ------------------
   70|  20.8M|    out_val = MAX_32;
  ------------------
  |  |   60|  20.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|   365M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|   365M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 20.5M, False: 345M]
  ------------------
   72|  20.5M|    out_val = MIN_32;
  ------------------
  |  |   61|  20.5M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   345M|  else
   74|   345M|    out_val = a << b;
   75|   386M|  return (out_val);
   76|   386M|}
ixheaacd_basic_ops.c:ixheaac_negate32_sat:
  317|   220M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   220M|  WORD32 neg_val;
  319|       |
  320|   220M|  if (a == MIN_32) {
  ------------------
  |  |   61|   220M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 79.1k, False: 220M]
  ------------------
  321|  79.1k|    neg_val = MAX_32;
  ------------------
  |  |   60|  79.1k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   220M|  } else {
  323|   220M|    neg_val = -a;
  324|   220M|  }
  325|   220M|  return neg_val;
  326|   220M|}
ixheaacd_fwd_alias_cnx.c:ixheaac_add32_sat:
  197|  1.73M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  1.73M|  WORD64 sum;
  199|       |
  200|  1.73M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  1.73M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.73M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.24k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 1.24k, False: 1.73M]
  ------------------
  203|  1.73M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.73M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.17k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 1.17k, False: 1.73M]
  ------------------
  204|       |
  205|  1.73M|  return (WORD32)sum;
  206|  1.73M|}
ixheaacd_fwd_alias_cnx.c:ixheaac_sub32_sat:
  225|   334M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   334M|  WORD64 diff;
  227|       |
  228|   334M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   334M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   334M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  4.78M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 4.78M, False: 329M]
  ------------------
  231|   329M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   329M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  4.97M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 4.97M, False: 324M]
  ------------------
  232|       |
  233|   324M|  return (WORD32)diff;
  234|   329M|}
ixheaacd_fwd_alias_cnx.c:ixheaac_add32_sat3:
  208|  10.4M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat3(WORD32 a, WORD32 b, WORD32 c) {
  209|  10.4M|  WORD64 sum;
  210|       |
  211|  10.4M|  sum = (WORD64)a + (WORD64)b;
  212|       |
  213|  10.4M|  sum = (WORD64)sum + (WORD64)c;
  214|       |
  215|  10.4M|  if (sum > MAX_32) {
  ------------------
  |  |   60|  10.4M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (215:7): [True: 187k, False: 10.2M]
  ------------------
  216|   187k|    sum = MAX_32;
  ------------------
  |  |   60|   187k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  217|   187k|  }
  218|  10.4M|  if (sum < MIN_32) {
  ------------------
  |  |   61|  10.4M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (218:7): [True: 208k, False: 10.2M]
  ------------------
  219|   208k|    sum = MIN_32;
  ------------------
  |  |   61|   208k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  220|   208k|  }
  221|       |
  222|  10.4M|  return (WORD32)sum;
  223|  10.4M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_shr32:
   51|   439k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   439k|  WORD32 out_val;
   53|       |
   54|   439k|  b = ((UWORD32)(b << 24) >> 24);
   55|   439k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 439k]
  ------------------
   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|   439k|  } else {
   61|   439k|    out_val = (WORD32)a >> b;
   62|   439k|  }
   63|       |
   64|   439k|  return out_val;
   65|   439k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_shl32:
   39|   439k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   439k|  WORD32 out_val;
   41|       |
   42|   439k|  b = ((UWORD32)(b << 24) >> 24);
   43|   439k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 439k]
  ------------------
   44|      0|    out_val = 0;
   45|   439k|  else
   46|   439k|    out_val = (WORD32)a << b;
   47|       |
   48|   439k|  return out_val;
   49|   439k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_add32_sat:
  197|   521k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   521k|  WORD64 sum;
  199|       |
  200|   521k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   521k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   521k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  25.5k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 25.5k, False: 495k]
  ------------------
  203|   495k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   495k|#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: 495k]
  ------------------
  204|       |
  205|   495k|  return (WORD32)sum;
  206|   495k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_norm32:
  236|  1.97M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  1.97M|  WORD norm_val;
  238|       |
  239|  1.97M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 96.9k, False: 1.87M]
  ------------------
  240|  96.9k|    norm_val = 31;
  241|  1.87M|  } else {
  242|  1.87M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 1.87M]
  ------------------
  243|      0|      norm_val = 31;
  244|  1.87M|    } else {
  245|  1.87M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 4.43k, False: 1.87M]
  ------------------
  246|  4.43k|        a = ~a;
  247|  4.43k|      }
  248|  15.5M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 13.6M, False: 1.87M]
  ------------------
  249|  13.6M|        a <<= 1;
  250|  13.6M|      }
  251|  1.87M|    }
  252|  1.87M|  }
  253|       |
  254|  1.97M|  return norm_val;
  255|  1.97M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_negate32_sat:
  317|  92.4k|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|  92.4k|  WORD32 neg_val;
  319|       |
  320|  92.4k|  if (a == MIN_32) {
  ------------------
  |  |   61|  92.4k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 0, False: 92.4k]
  ------------------
  321|      0|    neg_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|  92.4k|  } else {
  323|  92.4k|    neg_val = -a;
  324|  92.4k|  }
  325|  92.4k|  return neg_val;
  326|  92.4k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_add32_sat3:
  208|   235k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat3(WORD32 a, WORD32 b, WORD32 c) {
  209|   235k|  WORD64 sum;
  210|       |
  211|   235k|  sum = (WORD64)a + (WORD64)b;
  212|       |
  213|   235k|  sum = (WORD64)sum + (WORD64)c;
  214|       |
  215|   235k|  if (sum > MAX_32) {
  ------------------
  |  |   60|   235k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (215:7): [True: 107k, False: 127k]
  ------------------
  216|   107k|    sum = MAX_32;
  ------------------
  |  |   60|   107k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  217|   107k|  }
  218|   235k|  if (sum < MIN_32) {
  ------------------
  |  |   61|   235k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (218:7): [True: 0, False: 235k]
  ------------------
  219|      0|    sum = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  220|      0|  }
  221|       |
  222|   235k|  return (WORD32)sum;
  223|   235k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_div32:
  328|   131k|static PLATFORM_INLINE WORD32 ixheaac_div32(WORD32 a, WORD32 b, WORD *q_format) {
  329|   131k|  WORD32 quotient;
  330|   131k|  UWORD32 mantissa_nr, mantissa_dr;
  331|   131k|  WORD16 sign = 0;
  332|       |
  333|   131k|  LOOPINDEX i;
  334|   131k|  WORD q_nr, q_dr;
  335|       |
  336|   131k|  if ((a < 0) && (0 != b)) {
  ------------------
  |  Branch (336:7): [True: 0, False: 131k]
  |  Branch (336:18): [True: 0, False: 0]
  ------------------
  337|      0|    a = -a;
  338|      0|    sign = (WORD16)(sign ^ -1);
  339|      0|  }
  340|       |
  341|   131k|  if (b < 0) {
  ------------------
  |  Branch (341:7): [True: 3.63k, False: 127k]
  ------------------
  342|  3.63k|    b = -b;
  343|  3.63k|    sign = (WORD16)(sign ^ -1);
  344|  3.63k|  }
  345|       |
  346|   131k|  if (0 == b) {
  ------------------
  |  Branch (346:7): [True: 16.8k, False: 114k]
  ------------------
  347|  16.8k|    *q_format = 0;
  348|  16.8k|    return (a);
  349|  16.8k|  }
  350|       |
  351|   114k|  quotient = 0;
  352|       |
  353|   114k|  q_nr = ixheaac_norm32(a);
  354|   114k|  mantissa_nr = (UWORD32)a << (q_nr);
  355|   114k|  q_dr = ixheaac_norm32(b);
  356|   114k|  mantissa_dr = (UWORD32)b << (q_dr);
  357|   114k|  *q_format = (WORD)(30 + q_nr - q_dr);
  358|       |
  359|  3.65M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (359:15): [True: 3.54M, False: 114k]
  ------------------
  360|  3.54M|    quotient = quotient << 1;
  361|       |
  362|  3.54M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (362:9): [True: 1.36M, False: 2.17M]
  ------------------
  363|  1.36M|      mantissa_nr = mantissa_nr - mantissa_dr;
  364|  1.36M|      quotient += 1;
  365|  1.36M|    }
  366|       |
  367|  3.54M|    mantissa_nr = (UWORD32)mantissa_nr << 1;
  368|  3.54M|  }
  369|       |
  370|   114k|  if (sign < 0) {
  ------------------
  |  Branch (370:7): [True: 3.63k, False: 110k]
  ------------------
  371|  3.63k|    quotient = -quotient;
  372|  3.63k|  }
  373|       |
  374|   114k|  return quotient;
  375|   131k|}

ixheaacd_headerdecode.c:ixheaac_mult32:
   78|   185k|static PLATFORM_INLINE WORD32 ixheaac_mult32(WORD32 a, WORD32 b) {
   79|   185k|  WORD32 result;
   80|   185k|  WORD64 temp_result;
   81|       |
   82|   185k|  temp_result = (WORD64)a * (WORD64)b;
   83|   185k|  result = (WORD32)(temp_result >> 32);
   84|       |
   85|   185k|  return (result);
   86|   185k|}
ixheaacd_lt_predict.c:ixheaac_mult32x16in32_shl_sat:
   56|  55.7M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl_sat(WORD32 a, WORD16 b) {
   57|  55.7M|  WORD32 result;
   58|       |
   59|  55.7M|  if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
  ------------------
  |  Branch (59:7): [True: 0, False: 55.7M]
  |  Branch (59:34): [True: 0, False: 0]
  ------------------
   60|      0|    result = (WORD32)0x7fffffff;
   61|  55.7M|  } else {
   62|  55.7M|    result = ixheaac_mult32x16in32_shl(a, b);
   63|  55.7M|  }
   64|       |
   65|  55.7M|  return (result);
   66|  55.7M|}
ixheaacd_lt_predict.c:ixheaac_mult32x16in32_shl:
   23|  83.6M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  83.6M|  WORD32 result;
   25|  83.6M|  WORD64 temp_result;
   26|       |
   27|  83.6M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  83.6M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  83.6M|  return (result << 1);
   32|  83.6M|}
ixheaacd_lt_predict.c:ixheaac_mult32_shl:
   68|  16.1M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  16.1M|  WORD32 result;
   70|  16.1M|  WORD64 temp_result;
   71|       |
   72|  16.1M|  temp_result = (WORD64)a * (WORD64)b;
   73|  16.1M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  16.1M|  return (result << 1);
   76|  16.1M|}
ixheaacd_mps_bitdec.c:ixheaac_sat64_32:
  195|  12.3k|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  12.3k|  WORD32 result;
  197|  12.3k|  if (a >= MAX_32) {
  ------------------
  |  |   60|  12.3k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 90, False: 12.3k]
  ------------------
  198|     90|    result = MAX_32;
  ------------------
  |  |   60|     90|#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.3k|  return (result);
  205|  12.3k|}
ixheaacd_mps_bitdec.c:ixheaac_mult64:
  168|  12.3k|static PLATFORM_INLINE WORD64 ixheaac_mult64(WORD32 a, WORD32 b) {
  169|  12.3k|  WORD64 result;
  170|  12.3k|  result = (WORD64)a * (WORD64)b;
  171|  12.3k|  return (result);
  172|  12.3k|}
ixheaacd_mps_bitdec.c:ixheaac_mul32_sh:
  235|  68.3k|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|  68.3k|  WORD32 result;
  237|  68.3k|  WORD64 temp_result;
  238|       |
  239|  68.3k|  temp_result = (WORD64)a * (WORD64)b;
  240|  68.3k|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|  68.3k|  return (result);
  243|  68.3k|}
ixheaacd_mps_dec.c:ixheaac_sat64_32:
  195|  94.4M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  94.4M|  WORD32 result;
  197|  94.4M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  94.4M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 13.0M, False: 81.3M]
  ------------------
  198|  13.0M|    result = MAX_32;
  ------------------
  |  |   60|  13.0M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  81.3M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  81.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 13.3M, False: 68.0M]
  ------------------
  200|  13.3M|    result = MIN_32;
  ------------------
  |  |   61|  13.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  68.0M|  } else {
  202|  68.0M|    result = (WORD32)a;
  203|  68.0M|  }
  204|  94.4M|  return (result);
  205|  94.4M|}
ixheaacd_mps_decorr.c:ixheaac_add64_sat:
  186|   190M|static PLATFORM_INLINE WORD64 ixheaac_add64_sat(WORD64 a, WORD64 b) {
  187|   190M|  WORD64 result, comp;
  188|   190M|  result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   58|      0|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
                result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   57|   381M|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
  |  Branch (188:12): [True: 0, False: 190M]
  ------------------
  189|   190M|  comp = result - a;
  190|   190M|  if ((a < 0) == (b > comp)) result = a + b;
  ------------------
  |  Branch (190:7): [True: 167M, False: 22.7M]
  ------------------
  191|       |
  192|   190M|  return (result);
  193|   190M|}
ixheaacd_mps_decorr.c:ixheaac_mult32x32in64:
  132|   190M|static PLATFORM_INLINE WORD64 ixheaac_mult32x32in64(WORD32 a, WORD32 b) {
  133|   190M|  WORD64 result;
  134|       |
  135|   190M|  result = (WORD64)a * (WORD64)b;
  136|       |
  137|   190M|  return (result);
  138|   190M|}
ixheaacd_mps_decorr.c:ixheaac_mult32_shl:
   68|  4.07M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  4.07M|  WORD32 result;
   70|  4.07M|  WORD64 temp_result;
   71|       |
   72|  4.07M|  temp_result = (WORD64)a * (WORD64)b;
   73|  4.07M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  4.07M|  return (result << 1);
   76|  4.07M|}
ixheaacd_mps_hybrid_filt.c:ixheaac_mult32x16in32:
   34|  75.4M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  75.4M|  WORD32 result;
   36|  75.4M|  WORD64 temp_result;
   37|       |
   38|  75.4M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  75.4M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  75.4M|  return (result);
   43|  75.4M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaac_mac32x32in64:
  140|  9.15M|static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64(WORD64 sum, WORD32 a, WORD32 b) {
  141|  9.15M|  sum += (WORD64)a * (WORD64)b;
  142|       |
  143|  9.15M|  return (sum);
  144|  9.15M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaac_sat64_32:
  195|  98.0M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  98.0M|  WORD32 result;
  197|  98.0M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  98.0M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 160k, False: 97.8M]
  ------------------
  198|   160k|    result = MAX_32;
  ------------------
  |  |   60|   160k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  97.8M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  97.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 163k, False: 97.7M]
  ------------------
  200|   163k|    result = MIN_32;
  ------------------
  |  |   61|   163k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  97.7M|  } else {
  202|  97.7M|    result = (WORD32)a;
  203|  97.7M|  }
  204|  98.0M|  return (result);
  205|  98.0M|}
ixheaacd_mps_polyphase.c:ixheaac_mult32x16in32_shl:
   23|  3.48G|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  3.48G|  WORD32 result;
   25|  3.48G|  WORD64 temp_result;
   26|       |
   27|  3.48G|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  3.48G|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  3.48G|  return (result << 1);
   32|  3.48G|}
ixheaacd_mps_polyphase.c:ixheaac_sat64_32:
  195|   106M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   106M|  WORD32 result;
  197|   106M|  if (a >= MAX_32) {
  ------------------
  |  |   60|   106M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 0, False: 106M]
  ------------------
  198|      0|    result = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   106M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   106M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 106M]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   106M|  } else {
  202|   106M|    result = (WORD32)a;
  203|   106M|  }
  204|   106M|  return (result);
  205|   106M|}
ixheaacd_mps_polyphase.c:ixheaac_mult32x16in32:
   34|   506M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   506M|  WORD32 result;
   36|   506M|  WORD64 temp_result;
   37|       |
   38|   506M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   506M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   506M|  return (result);
   43|   506M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_mult32x16in32:
   34|  27.7M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  27.7M|  WORD32 result;
   36|  27.7M|  WORD64 temp_result;
   37|       |
   38|  27.7M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  27.7M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  27.7M|  return (result);
   43|  27.7M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_add64_sat:
  186|  72.5M|static PLATFORM_INLINE WORD64 ixheaac_add64_sat(WORD64 a, WORD64 b) {
  187|  72.5M|  WORD64 result, comp;
  188|  72.5M|  result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   58|      0|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
                result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   57|   145M|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
  |  Branch (188:12): [True: 0, False: 72.5M]
  ------------------
  189|  72.5M|  comp = result - a;
  190|  72.5M|  if ((a < 0) == (b > comp)) result = a + b;
  ------------------
  |  Branch (190:7): [True: 67.0M, False: 5.49M]
  ------------------
  191|       |
  192|  72.5M|  return (result);
  193|  72.5M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_mult32x32in64:
  132|  77.4M|static PLATFORM_INLINE WORD64 ixheaac_mult32x32in64(WORD32 a, WORD32 b) {
  133|  77.4M|  WORD64 result;
  134|       |
  135|  77.4M|  result = (WORD64)a * (WORD64)b;
  136|       |
  137|  77.4M|  return (result);
  138|  77.4M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_mult32_shl:
   68|   197k|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   197k|  WORD32 result;
   70|   197k|  WORD64 temp_result;
   71|       |
   72|   197k|  temp_result = (WORD64)a * (WORD64)b;
   73|   197k|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   197k|  return (result << 1);
   76|   197k|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_sat64_32:
  195|  2.72M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  2.72M|  WORD32 result;
  197|  2.72M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  2.72M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 83.3k, False: 2.63M]
  ------------------
  198|  83.3k|    result = MAX_32;
  ------------------
  |  |   60|  83.3k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  2.63M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  2.63M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 83.6k, False: 2.55M]
  ------------------
  200|  83.6k|    result = MIN_32;
  ------------------
  |  |   61|  83.6k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  2.55M|  } else {
  202|  2.55M|    result = (WORD32)a;
  203|  2.55M|  }
  204|  2.72M|  return (result);
  205|  2.72M|}
ixheaacd_mps_res_tns.c:ixheaac_mult32x16in32_shl_sat:
   56|   152k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl_sat(WORD32 a, WORD16 b) {
   57|   152k|  WORD32 result;
   58|       |
   59|   152k|  if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
  ------------------
  |  Branch (59:7): [True: 24.5k, False: 128k]
  |  Branch (59:34): [True: 0, False: 24.5k]
  ------------------
   60|      0|    result = (WORD32)0x7fffffff;
   61|   152k|  } else {
   62|   152k|    result = ixheaac_mult32x16in32_shl(a, b);
   63|   152k|  }
   64|       |
   65|   152k|  return (result);
   66|   152k|}
ixheaacd_mps_res_tns.c:ixheaac_mult32x16in32_shl:
   23|   152k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|   152k|  WORD32 result;
   25|   152k|  WORD64 temp_result;
   26|       |
   27|   152k|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|   152k|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|   152k|  return (result << 1);
   32|   152k|}
ixheaacd_mps_smoothing.c:ixheaac_mult32_shl:
   68|   307k|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   307k|  WORD32 result;
   70|   307k|  WORD64 temp_result;
   71|       |
   72|   307k|  temp_result = (WORD64)a * (WORD64)b;
   73|   307k|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   307k|  return (result << 1);
   76|   307k|}
ixheaacd_mps_temp_process.c:ixheaac_mult32x32in64:
  132|  15.3M|static PLATFORM_INLINE WORD64 ixheaac_mult32x32in64(WORD32 a, WORD32 b) {
  133|  15.3M|  WORD64 result;
  134|       |
  135|  15.3M|  result = (WORD64)a * (WORD64)b;
  136|       |
  137|  15.3M|  return (result);
  138|  15.3M|}
ixheaacd_mps_temp_process.c:ixheaac_mac32x32in64:
  140|  19.4M|static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64(WORD64 sum, WORD32 a, WORD32 b) {
  141|  19.4M|  sum += (WORD64)a * (WORD64)b;
  142|       |
  143|  19.4M|  return (sum);
  144|  19.4M|}
ixheaacd_mps_temp_process.c:ixheaac_sat64_32:
  195|  8.10M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  8.10M|  WORD32 result;
  197|  8.10M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  8.10M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 14.7k, False: 8.09M]
  ------------------
  198|  14.7k|    result = MAX_32;
  ------------------
  |  |   60|  14.7k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  8.09M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  8.09M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 14.6k, False: 8.07M]
  ------------------
  200|  14.6k|    result = MIN_32;
  ------------------
  |  |   61|  14.6k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  8.07M|  } else {
  202|  8.07M|    result = (WORD32)a;
  203|  8.07M|  }
  204|  8.10M|  return (result);
  205|  8.10M|}
ixheaacd_mps_temp_process.c:ixheaac_mult32_shl:
   68|   286k|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   286k|  WORD32 result;
   70|   286k|  WORD64 temp_result;
   71|       |
   72|   286k|  temp_result = (WORD64)a * (WORD64)b;
   73|   286k|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   286k|  return (result << 1);
   76|   286k|}
ixheaacd_multichannel.c:ixheaac_mul32_sh:
  235|  5.08k|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|  5.08k|  WORD32 result;
  237|  5.08k|  WORD64 temp_result;
  238|       |
  239|  5.08k|  temp_result = (WORD64)a * (WORD64)b;
  240|  5.08k|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|  5.08k|  return (result);
  243|  5.08k|}
ixheaacd_multichannel.c:ixheaac_mult32x16in32:
   34|   244k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   244k|  WORD32 result;
   36|   244k|  WORD64 temp_result;
   37|       |
   38|   244k|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   244k|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   244k|  return (result);
   43|   244k|}
ixheaacd_pns_js_thumb.c:ixheaac_mult32_shl_sat:
   88|  12.4M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl_sat(WORD32 a, WORD32 b) {
   89|  12.4M|  WORD32 result;
   90|       |
   91|  12.4M|  if (a == (WORD32)0x80000000 && b == (WORD32)0x80000000) {
  ------------------
  |  Branch (91:7): [True: 0, False: 12.4M]
  |  Branch (91:34): [True: 0, False: 0]
  ------------------
   92|      0|    result = 0x7fffffff;
   93|  12.4M|  } else {
   94|  12.4M|    result = ixheaac_mult32_shl(a, b);
   95|  12.4M|  }
   96|       |
   97|  12.4M|  return (result);
   98|  12.4M|}
ixheaacd_pns_js_thumb.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_sbrdec_lpfuncs.c:ixheaac_mult32x16in32_shl:
   23|   199k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|   199k|  WORD32 result;
   25|   199k|  WORD64 temp_result;
   26|       |
   27|   199k|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|   199k|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|   199k|  return (result << 1);
   32|   199k|}
ixheaacd_qmf_dec_generic.c:ixheaac_mult32x16in32:
   34|   768M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   768M|  WORD32 result;
   36|   768M|  WORD64 temp_result;
   37|       |
   38|   768M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   768M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   768M|  return (result);
   43|   768M|}
ixheaacd_qmf_dec_generic.c:ixheaac_mult32x16in32_shl:
   23|  47.3M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  47.3M|  WORD32 result;
   25|  47.3M|  WORD64 temp_result;
   26|       |
   27|  47.3M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  47.3M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  47.3M|  return (result << 1);
   32|  47.3M|}
ixheaacd_qmf_dec_generic.c:ixheaac_mult64:
  168|  9.93G|static PLATFORM_INLINE WORD64 ixheaac_mult64(WORD32 a, WORD32 b) {
  169|  9.93G|  WORD64 result;
  170|  9.93G|  result = (WORD64)a * (WORD64)b;
  171|  9.93G|  return (result);
  172|  9.93G|}
ixheaacd_qmf_dec_generic.c:ixheaac_add64:
  207|  3.89G|static PLATFORM_INLINE WORD64 ixheaac_add64(WORD64 a, WORD64 b) {
  208|  3.89G|  WORD64 result;
  209|  3.89G|  result = a + b;
  210|  3.89G|  return (result);
  211|  3.89G|}
ixheaacd_qmf_dec_generic.c:ixheaac_sub64_sat:
  221|  1.27G|static PLATFORM_INLINE WORD64 ixheaac_sub64_sat(WORD64 a, WORD64 b) {
  222|  1.27G|  WORD64 diff;
  223|       |
  224|  1.27G|  diff = ixheaac_sub64(a, b);
  225|       |
  226|  1.27G|  if ((((WORD64)a ^ (WORD64)b) & (WORD64)MIN_64) != 0) {
  ------------------
  |  |   58|  1.27G|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
  |  Branch (226:7): [True: 385M, False: 890M]
  ------------------
  227|   385M|    if (((WORD64)diff ^ (WORD64)a) & (WORD64)MIN_64) {
  ------------------
  |  |   58|   385M|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
  |  Branch (227:9): [True: 0, False: 385M]
  ------------------
  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|   385M|  }
  231|       |
  232|  1.27G|  return (diff);
  233|  1.27G|}
ixheaacd_qmf_dec_generic.c:ixheaac_sub64:
  213|  1.27G|static PLATFORM_INLINE WORD64 ixheaac_sub64(WORD64 a, WORD64 b) {
  214|  1.27G|  WORD64 diff;
  215|       |
  216|  1.27G|  diff = (WORD64)a - (WORD64)b;
  217|       |
  218|  1.27G|  return diff;
  219|  1.27G|}
ixheaacd_aac_imdct.c:ixheaac_mac32x16in32:
  100|  65.8M|static PLATFORM_INLINE WORD32 ixheaac_mac32x16in32(WORD32 a, WORD32 b, WORD16 c) {
  101|  65.8M|  WORD32 result;
  102|       |
  103|  65.8M|  result = a + ixheaac_mult32x16in32(b, c);
  104|       |
  105|  65.8M|  return (result);
  106|  65.8M|}
ixheaacd_aac_imdct.c:ixheaac_mult32x16in32:
   34|   545M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   545M|  WORD32 result;
   36|   545M|  WORD64 temp_result;
   37|       |
   38|   545M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   545M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   545M|  return (result);
   43|   545M|}
ixheaacd_aac_imdct.c:ixheaac_mult32x16in32_shl:
   23|  68.2M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  68.2M|  WORD32 result;
   25|  68.2M|  WORD64 temp_result;
   26|       |
   27|  68.2M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  68.2M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  68.2M|  return (result << 1);
   32|  68.2M|}
ixheaacd_aac_imdct.c:ixheaac_mult32_shl:
   68|   141M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   141M|  WORD32 result;
   70|   141M|  WORD64 temp_result;
   71|       |
   72|   141M|  temp_result = (WORD64)a * (WORD64)b;
   73|   141M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   141M|  return (result << 1);
   76|   141M|}
ixheaacd_aac_imdct.c:ixheaac_mult32x32in32:
   45|   169M|static PLATFORM_INLINE WORD32 ixheaac_mult32x32in32(WORD32 a, WORD32 b) {
   46|   169M|  WORD32 result;
   47|   169M|  WORD64 temp_result;
   48|       |
   49|   169M|  temp_result = (WORD64)a * (WORD64)b;
   50|       |
   51|   169M|  result = (WORD32)(temp_result >> 16);
   52|       |
   53|   169M|  return (result);
   54|   169M|}
ixheaacd_aac_imdct.c:ixheaac_mult32:
   78|   217M|static PLATFORM_INLINE WORD32 ixheaac_mult32(WORD32 a, WORD32 b) {
   79|   217M|  WORD32 result;
   80|   217M|  WORD64 temp_result;
   81|       |
   82|   217M|  temp_result = (WORD64)a * (WORD64)b;
   83|   217M|  result = (WORD32)(temp_result >> 32);
   84|       |
   85|   217M|  return (result);
   86|   217M|}
ixheaacd_aac_tns.c:ixheaac_mult32_shl_sat:
   88|  9.39M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl_sat(WORD32 a, WORD32 b) {
   89|  9.39M|  WORD32 result;
   90|       |
   91|  9.39M|  if (a == (WORD32)0x80000000 && b == (WORD32)0x80000000) {
  ------------------
  |  Branch (91:7): [True: 0, False: 9.39M]
  |  Branch (91:34): [True: 0, False: 0]
  ------------------
   92|      0|    result = 0x7fffffff;
   93|  9.39M|  } else {
   94|  9.39M|    result = ixheaac_mult32_shl(a, b);
   95|  9.39M|  }
   96|       |
   97|  9.39M|  return (result);
   98|  9.39M|}
ixheaacd_aac_tns.c:ixheaac_mult32_shl:
   68|  29.7M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  29.7M|  WORD32 result;
   70|  29.7M|  WORD64 temp_result;
   71|       |
   72|  29.7M|  temp_result = (WORD64)a * (WORD64)b;
   73|  29.7M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  29.7M|  return (result << 1);
   76|  29.7M|}
ixheaacd_aac_tns.c:ixheaac_mult32x16in32:
   34|  8.82M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  8.82M|  WORD32 result;
   36|  8.82M|  WORD64 temp_result;
   37|       |
   38|  8.82M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  8.82M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  8.82M|  return (result);
   43|  8.82M|}
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|  13.1M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  13.1M|  WORD32 result;
   70|  13.1M|  WORD64 temp_result;
   71|       |
   72|  13.1M|  temp_result = (WORD64)a * (WORD64)b;
   73|  13.1M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  13.1M|  return (result << 1);
   76|  13.1M|}
ixheaacd_block.c:ixheaac_mac32x16in32_shl:
  108|  13.1M|static PLATFORM_INLINE WORD32 ixheaac_mac32x16in32_shl(WORD32 a, WORD32 b, WORD16 c) {
  109|  13.1M|  WORD32 result;
  110|       |
  111|  13.1M|  result = a + ixheaac_mult32x16in32_shl(b, c);
  112|       |
  113|  13.1M|  return (result);
  114|  13.1M|}
ixheaacd_block.c:ixheaac_mult32x16in32:
   34|  80.3M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  80.3M|  WORD32 result;
   36|  80.3M|  WORD64 temp_result;
   37|       |
   38|  80.3M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  80.3M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  80.3M|  return (result);
   43|  80.3M|}
ixheaacd_block.c:ixheaac_mult32x16in32_shl:
   23|  37.1M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  37.1M|  WORD32 result;
   25|  37.1M|  WORD64 temp_result;
   26|       |
   27|  37.1M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  37.1M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  37.1M|  return (result << 1);
   32|  37.1M|}
ixheaacd_env_calc.c:ixheaac_mult32x16in32:
   34|  29.9M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  29.9M|  WORD32 result;
   36|  29.9M|  WORD64 temp_result;
   37|       |
   38|  29.9M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  29.9M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  29.9M|  return (result);
   43|  29.9M|}
ixheaacd_ext_ch_ele.c:ixheaac_mac32x32in64:
  140|   937k|static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64(WORD64 sum, WORD32 a, WORD32 b) {
  141|   937k|  sum += (WORD64)a * (WORD64)b;
  142|       |
  143|   937k|  return (sum);
  144|   937k|}
ixheaacd_ext_ch_ele.c:ixheaac_mac32x32in64_n:
  160|   624k|                                                     WORD32 n) {
  161|   624k|  WORD32 k;
  162|       |
  163|   624k|  sum += (WORD64)a[0] * (WORD64)b[0];
  164|  3.12M|  for (k = 1; k < n; k++) sum += (WORD64)a[k] * (WORD64)b[k];
  ------------------
  |  Branch (164:15): [True: 2.49M, False: 624k]
  ------------------
  165|   624k|  return (sum);
  166|   624k|}
ixheaacd_ext_ch_ele.c:ixheaac_mac32x32in64_7:
  146|  12.8M|static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64_7(const WORD32 *a, const WORD16 *b) {
  147|  12.8M|  WORD64 sum;
  148|  12.8M|  sum = (WORD64)a[0] * (WORD64)b[0];
  149|  12.8M|  sum += (WORD64)a[1] * (WORD64)b[1];
  150|  12.8M|  sum += (WORD64)a[2] * (WORD64)b[2];
  151|  12.8M|  sum += (WORD64)a[3] * (WORD64)b[3];
  152|  12.8M|  sum += (WORD64)a[4] * (WORD64)b[4];
  153|  12.8M|  sum += (WORD64)a[5] * (WORD64)b[5];
  154|  12.8M|  sum += (WORD64)a[6] * (WORD64)b[6];
  155|       |
  156|  12.8M|  return (sum);
  157|  12.8M|}
ixheaacd_ext_ch_ele.c:ixheaac_sat64_32:
  195|  21.0M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  21.0M|  WORD32 result;
  197|  21.0M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  21.0M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 117k, False: 20.8M]
  ------------------
  198|   117k|    result = MAX_32;
  ------------------
  |  |   60|   117k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  20.8M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  20.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 117k, False: 20.7M]
  ------------------
  200|   117k|    result = MIN_32;
  ------------------
  |  |   61|   117k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  20.7M|  } else {
  202|  20.7M|    result = (WORD32)a;
  203|  20.7M|  }
  204|  21.0M|  return (result);
  205|  21.0M|}
ixheaacd_ext_ch_ele.c:ixheaac_mult32x32in64:
  132|  12.3M|static PLATFORM_INLINE WORD64 ixheaac_mult32x32in64(WORD32 a, WORD32 b) {
  133|  12.3M|  WORD64 result;
  134|       |
  135|  12.3M|  result = (WORD64)a * (WORD64)b;
  136|       |
  137|  12.3M|  return (result);
  138|  12.3M|}
ixheaacd_fft.c:ixheaac_sat64_32:
  195|  1.54G|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  1.54G|  WORD32 result;
  197|  1.54G|  if (a >= MAX_32) {
  ------------------
  |  |   60|  1.54G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 0, False: 1.54G]
  ------------------
  198|      0|    result = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  1.54G|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  1.54G|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 1.54G]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  1.54G|  } else {
  202|  1.54G|    result = (WORD32)a;
  203|  1.54G|  }
  204|  1.54G|  return (result);
  205|  1.54G|}
ixheaacd_fft.c:ixheaac_mult32_shl:
   68|  24.2M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  24.2M|  WORD32 result;
   70|  24.2M|  WORD64 temp_result;
   71|       |
   72|  24.2M|  temp_result = (WORD64)a * (WORD64)b;
   73|  24.2M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  24.2M|  return (result << 1);
   76|  24.2M|}
ixheaacd_imdct.c:ixheaac_mult32:
   78|  1.04G|static PLATFORM_INLINE WORD32 ixheaac_mult32(WORD32 a, WORD32 b) {
   79|  1.04G|  WORD32 result;
   80|  1.04G|  WORD64 temp_result;
   81|       |
   82|  1.04G|  temp_result = (WORD64)a * (WORD64)b;
   83|  1.04G|  result = (WORD32)(temp_result >> 32);
   84|       |
   85|  1.04G|  return (result);
   86|  1.04G|}
ixheaacd_imdct.c:ixheaac_mul32_sh:
  235|  20.9M|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|  20.9M|  WORD32 result;
  237|  20.9M|  WORD64 temp_result;
  238|       |
  239|  20.9M|  temp_result = (WORD64)a * (WORD64)b;
  240|  20.9M|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|  20.9M|  return (result);
  243|  20.9M|}
ixheaacd_lpfuncs.c:ixheaac_mult32x16in32:
   34|   114M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   114M|  WORD32 result;
   36|   114M|  WORD64 temp_result;
   37|       |
   38|   114M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   114M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   114M|  return (result);
   43|   114M|}
ixheaacd_lpp_tran.c:ixheaac_mult32x16in32:
   34|  41.1M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  41.1M|  WORD32 result;
   36|  41.1M|  WORD64 temp_result;
   37|       |
   38|  41.1M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  41.1M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  41.1M|  return (result);
   43|  41.1M|}
ixheaacd_lpp_tran.c:ixheaac_mult32:
   78|  3.48M|static PLATFORM_INLINE WORD32 ixheaac_mult32(WORD32 a, WORD32 b) {
   79|  3.48M|  WORD32 result;
   80|  3.48M|  WORD64 temp_result;
   81|       |
   82|  3.48M|  temp_result = (WORD64)a * (WORD64)b;
   83|  3.48M|  result = (WORD32)(temp_result >> 32);
   84|       |
   85|  3.48M|  return (result);
   86|  3.48M|}
ixheaacd_mps_apply_m1.c:ixheaac_sat64_32:
  195|   648M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   648M|  WORD32 result;
  197|   648M|  if (a >= MAX_32) {
  ------------------
  |  |   60|   648M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 49.7M, False: 598M]
  ------------------
  198|  49.7M|    result = MAX_32;
  ------------------
  |  |   60|  49.7M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   598M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   598M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 49.6M, False: 548M]
  ------------------
  200|  49.6M|    result = MIN_32;
  ------------------
  |  |   61|  49.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   548M|  } else {
  202|   548M|    result = (WORD32)a;
  203|   548M|  }
  204|   648M|  return (result);
  205|   648M|}
ixheaacd_mps_apply_m2.c:ixheaac_sat64_32:
  195|   548M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   548M|  WORD32 result;
  197|   548M|  if (a >= MAX_32) {
  ------------------
  |  |   60|   548M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 14.7M, False: 533M]
  ------------------
  198|  14.7M|    result = MAX_32;
  ------------------
  |  |   60|  14.7M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   533M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   533M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 14.8M, False: 518M]
  ------------------
  200|  14.8M|    result = MIN_32;
  ------------------
  |  |   61|  14.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   518M|  } else {
  202|   518M|    result = (WORD32)a;
  203|   518M|  }
  204|   548M|  return (result);
  205|   548M|}
ixheaacd_mps_calc_m1m2_tree_515x.c:ixheaac_sat64_32:
  195|   687k|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   687k|  WORD32 result;
  197|   687k|  if (a >= MAX_32) {
  ------------------
  |  |   60|   687k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 4.12k, False: 683k]
  ------------------
  198|  4.12k|    result = MAX_32;
  ------------------
  |  |   60|  4.12k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   683k|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   683k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 683k]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   683k|  } else {
  202|   683k|    result = (WORD32)a;
  203|   683k|  }
  204|   687k|  return (result);
  205|   687k|}
ixheaacd_mps_calc_m1m2_tree_52xx.c:ixheaac_sat64_32:
  195|   127k|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   127k|  WORD32 result;
  197|   127k|  if (a >= MAX_32) {
  ------------------
  |  |   60|   127k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 1.93k, False: 125k]
  ------------------
  198|  1.93k|    result = MAX_32;
  ------------------
  |  |   60|  1.93k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   125k|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   125k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 1.34k, False: 124k]
  ------------------
  200|  1.34k|    result = MIN_32;
  ------------------
  |  |   61|  1.34k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   124k|  } else {
  202|   124k|    result = (WORD32)a;
  203|   124k|  }
  204|   127k|  return (result);
  205|   127k|}
ixheaacd_mps_calc_m1m2_tree_727x.c:ixheaac_sat64_32:
  195|   842k|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   842k|  WORD32 result;
  197|   842k|  if (a >= MAX_32) {
  ------------------
  |  |   60|   842k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 813, False: 841k]
  ------------------
  198|    813|    result = MAX_32;
  ------------------
  |  |   60|    813|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   841k|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   841k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 1.84k, False: 839k]
  ------------------
  200|  1.84k|    result = MIN_32;
  ------------------
  |  |   61|  1.84k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   839k|  } else {
  202|   839k|    result = (WORD32)a;
  203|   839k|  }
  204|   842k|  return (result);
  205|   842k|}
ixheaacd_mps_res_block.c:ixheaac_mult32x16in32_shl:
   23|   174k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|   174k|  WORD32 result;
   25|   174k|  WORD64 temp_result;
   26|       |
   27|   174k|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|   174k|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|   174k|  return (result << 1);
   32|   174k|}
ixheaacd_qmf_dec.c:ixheaac_add64:
  207|  2.07G|static PLATFORM_INLINE WORD64 ixheaac_add64(WORD64 a, WORD64 b) {
  208|  2.07G|  WORD64 result;
  209|  2.07G|  result = a + b;
  210|  2.07G|  return (result);
  211|  2.07G|}
ixheaacd_qmf_dec.c:ixheaac_mul32_sh:
  235|  22.5M|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|  22.5M|  WORD32 result;
  237|  22.5M|  WORD64 temp_result;
  238|       |
  239|  22.5M|  temp_result = (WORD64)a * (WORD64)b;
  240|  22.5M|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|  22.5M|  return (result);
  243|  22.5M|}
ixheaacd_qmf_dec.c:ixheaac_mult64:
  168|  2.59G|static PLATFORM_INLINE WORD64 ixheaac_mult64(WORD32 a, WORD32 b) {
  169|  2.59G|  WORD64 result;
  170|  2.59G|  result = (WORD64)a * (WORD64)b;
  171|  2.59G|  return (result);
  172|  2.59G|}
ixheaacd_qmf_dec.c:ixheaac_mac32x16in32_shl_sat:
  116|  49.0M|static PLATFORM_INLINE WORD32 ixheaac_mac32x16in32_shl_sat(WORD32 a, WORD32 b, WORD16 c) {
  117|  49.0M|  WORD32 result;
  118|       |
  119|  49.0M|  result = ixheaac_add32_sat(a, ixheaac_mult32x16in32_shl_sat(b, c));
  120|       |
  121|  49.0M|  return (result);
  122|  49.0M|}
ixheaacd_qmf_dec.c:ixheaac_mult32x16in32_shl_sat:
   56|  49.0M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl_sat(WORD32 a, WORD16 b) {
   57|  49.0M|  WORD32 result;
   58|       |
   59|  49.0M|  if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
  ------------------
  |  Branch (59:7): [True: 22, False: 49.0M]
  |  Branch (59:34): [True: 0, False: 22]
  ------------------
   60|      0|    result = (WORD32)0x7fffffff;
   61|  49.0M|  } else {
   62|  49.0M|    result = ixheaac_mult32x16in32_shl(a, b);
   63|  49.0M|  }
   64|       |
   65|  49.0M|  return (result);
   66|  49.0M|}
ixheaacd_qmf_dec.c:ixheaac_mult32x16in32_shl:
   23|   196M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|   196M|  WORD32 result;
   25|   196M|  WORD64 temp_result;
   26|       |
   27|   196M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|   196M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|   196M|  return (result << 1);
   32|   196M|}
ixheaacd_tns.c:ixheaac_mult32_shl_sat:
   88|  11.9M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl_sat(WORD32 a, WORD32 b) {
   89|  11.9M|  WORD32 result;
   90|       |
   91|  11.9M|  if (a == (WORD32)0x80000000 && b == (WORD32)0x80000000) {
  ------------------
  |  Branch (91:7): [True: 0, False: 11.9M]
  |  Branch (91:34): [True: 0, False: 0]
  ------------------
   92|      0|    result = 0x7fffffff;
   93|  11.9M|  } else {
   94|  11.9M|    result = ixheaac_mult32_shl(a, b);
   95|  11.9M|  }
   96|       |
   97|  11.9M|  return (result);
   98|  11.9M|}
ixheaacd_tns.c:ixheaac_mult32_shl:
   68|  11.9M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  11.9M|  WORD32 result;
   70|  11.9M|  WORD64 temp_result;
   71|       |
   72|  11.9M|  temp_result = (WORD64)a * (WORD64)b;
   73|  11.9M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  11.9M|  return (result << 1);
   76|  11.9M|}
ixheaacd_tns.c:ixheaac_add64_sat:
  186|  26.4M|static PLATFORM_INLINE WORD64 ixheaac_add64_sat(WORD64 a, WORD64 b) {
  187|  26.4M|  WORD64 result, comp;
  188|  26.4M|  result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   58|  4.28M|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
                result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   57|  48.5M|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
  |  Branch (188:12): [True: 4.28M, False: 22.1M]
  ------------------
  189|  26.4M|  comp = result - a;
  190|  26.4M|  if ((a < 0) == (b > comp)) result = a + b;
  ------------------
  |  Branch (190:7): [True: 26.4M, False: 2.44k]
  ------------------
  191|       |
  192|  26.4M|  return (result);
  193|  26.4M|}
ixheaacd_tns.c:ixheaac_mult64:
  168|  26.4M|static PLATFORM_INLINE WORD64 ixheaac_mult64(WORD32 a, WORD32 b) {
  169|  26.4M|  WORD64 result;
  170|  26.4M|  result = (WORD64)a * (WORD64)b;
  171|  26.4M|  return (result);
  172|  26.4M|}
ixheaacd_arith_dec.c:ixheaac_mult64_sat:
  174|  24.3M|static PLATFORM_INLINE WORD64 ixheaac_mult64_sat(WORD64 a, WORD64 b) {
  175|  24.3M|  WORD64 result;
  176|       |
  177|  24.3M|  if (a > 0 && b > 0 && a > MAX_64 / b) return MAX_64;
  ------------------
  |  |   57|  3.09M|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
                if (a > 0 && b > 0 && a > MAX_64 / b) return MAX_64;
  ------------------
  |  |   57|  44.3k|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
  |  Branch (177:7): [True: 14.4M, False: 9.87M]
  |  Branch (177:16): [True: 3.09M, False: 11.3M]
  |  Branch (177:25): [True: 44.3k, False: 3.05M]
  ------------------
  178|  24.3M|  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: 24.3M]
  |  Branch (178:16): [True: 0, False: 0]
  |  Branch (178:25): [True: 0, False: 0]
  ------------------
  179|  24.3M|  if (a > 0 && b < 0 && b < MIN_64 / a) return MIN_64;
  ------------------
  |  |   58|  4.65M|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
                if (a > 0 && b < 0 && b < MIN_64 / a) return MIN_64;
  ------------------
  |  |   58|  25.0k|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
  |  Branch (179:7): [True: 14.4M, False: 9.87M]
  |  Branch (179:16): [True: 4.65M, False: 9.77M]
  |  Branch (179:25): [True: 25.0k, False: 4.62M]
  ------------------
  180|  24.2M|  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: 24.2M]
  |  Branch (180:16): [True: 0, False: 0]
  |  Branch (180:25): [True: 0, False: 0]
  ------------------
  181|       |
  182|  24.2M|  result = a * b;
  183|  24.2M|  return (result);
  184|  24.2M|}
ixheaacd_avq_dec.c:ixheaac_sat64_32:
  195|  3.50M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  3.50M|  WORD32 result;
  197|  3.50M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  3.50M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 6.70k, False: 3.49M]
  ------------------
  198|  6.70k|    result = MAX_32;
  ------------------
  |  |   60|  6.70k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  3.49M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  3.49M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 3.49M]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  3.49M|  } else {
  202|  3.49M|    result = (WORD32)a;
  203|  3.49M|  }
  204|  3.50M|  return (result);
  205|  3.50M|}
ixheaacd_fwd_alias_cnx.c:ixheaac_mul32_sh:
  235|   357M|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|   357M|  WORD32 result;
  237|   357M|  WORD64 temp_result;
  238|       |
  239|   357M|  temp_result = (WORD64)a * (WORD64)b;
  240|   357M|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|   357M|  return (result);
  243|   357M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_mult32_shl:
   68|   173k|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   173k|  WORD32 result;
   70|   173k|  WORD64 temp_result;
   71|       |
   72|   173k|  temp_result = (WORD64)a * (WORD64)b;
   73|   173k|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   173k|  return (result << 1);
   76|   173k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_sat64_32:
  195|  4.73M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  4.73M|  WORD32 result;
  197|  4.73M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  4.73M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 2.25k, False: 4.73M]
  ------------------
  198|  2.25k|    result = MAX_32;
  ------------------
  |  |   60|  2.25k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  4.73M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  4.73M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 4.73M]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  4.73M|  } else {
  202|  4.73M|    result = (WORD32)a;
  203|  4.73M|  }
  204|  4.73M|  return (result);
  205|  4.73M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_mult32x16in32:
   34|   183k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   183k|  WORD32 result;
   36|   183k|  WORD64 temp_result;
   37|       |
   38|   183k|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   183k|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   183k|  return (result);
   43|   183k|}

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

ia_drc_dec_api:
   68|   368k|                            pVOID pv_value) {
   69|   368k|  ia_drc_api_struct *p_obj_drc = p_ia_drc_dec_obj;
   70|   368k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   25|   368k|#define IA_NO_ERROR 0x00000000
  ------------------
   71|   368k|  LOOPIDX i;
   72|       |
   73|   368k|  pUWORD32 pui_value = pv_value;
   74|   368k|  pUWORD32 pus_value = pv_value;
   75|   368k|  pWORD8 pb_value = pv_value;
   76|   368k|  SIZE_T *ps_value = pv_value;
  ------------------
  |  |  108|   368k|#define SIZE_T size_t
  ------------------
   77|   368k|  pWORD32 pi_value = pv_value;
   78|   368k|  FLOAT32 *pf_value = pv_value;
   79|       |
   80|   368k|  switch (i_cmd) {
  ------------------
  |  Branch (80:11): [True: 127k, False: 241k]
  ------------------
   81|  25.4k|    case IA_API_CMD_GET_MEM_INFO_SIZE:
  ------------------
  |  |   49|  25.4k|#define IA_API_CMD_GET_MEM_INFO_SIZE 0x0011
  ------------------
  |  Branch (81:5): [True: 25.4k, False: 343k]
  ------------------
   82|  50.9k|    case IA_API_CMD_GET_MEM_INFO_ALIGNMENT:
  ------------------
  |  |   50|  50.9k|#define IA_API_CMD_GET_MEM_INFO_ALIGNMENT 0x0012
  ------------------
  |  Branch (82:5): [True: 25.4k, False: 343k]
  ------------------
   83|  76.4k|    case IA_API_CMD_GET_MEM_INFO_TYPE:
  ------------------
  |  |   51|  76.4k|#define IA_API_CMD_GET_MEM_INFO_TYPE 0x0013
  ------------------
  |  Branch (83:5): [True: 25.4k, False: 343k]
  ------------------
   84|  76.4k|    case IA_API_CMD_GET_MEM_INFO_PLACEMENT:
  ------------------
  |  |   52|  76.4k|#define IA_API_CMD_GET_MEM_INFO_PLACEMENT 0x0014
  ------------------
  |  Branch (84:5): [True: 0, False: 368k]
  ------------------
   85|  76.4k|    case IA_API_CMD_GET_MEM_INFO_PRIORITY:
  ------------------
  |  |   53|  76.4k|#define IA_API_CMD_GET_MEM_INFO_PRIORITY 0x0015
  ------------------
  |  Branch (85:5): [True: 0, False: 368k]
  ------------------
   86|   127k|    case IA_API_CMD_SET_MEM_PTR:
  ------------------
  |  |   54|   127k|#define IA_API_CMD_SET_MEM_PTR 0x0016
  ------------------
  |  Branch (86:5): [True: 50.9k, False: 317k]
  ------------------
   87|   127k|    case IA_API_CMD_SET_MEM_PLACEMENT: {
  ------------------
  |  |   56|   127k|#define IA_API_CMD_SET_MEM_PLACEMENT 0x0018
  ------------------
  |  Branch (87:5): [True: 0, False: 368k]
  ------------------
   88|   127k|      return impd_drc_mem_api(p_ia_drc_dec_obj, i_cmd, i_idx, pv_value);
   89|   127k|    }
   90|   368k|  };
   91|       |
   92|   241k|  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: 241k]
  ------------------
   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.7k|    case IA_API_CMD_GET_API_SIZE: {
  ------------------
  |  |   29|  14.7k|#define IA_API_CMD_GET_API_SIZE 0x0002
  ------------------
  |  Branch (112:5): [True: 14.7k, False: 226k]
  ------------------
  113|  14.7k|      *pui_value = sizeof(ia_drc_api_struct);
  114|       |
  115|  14.7k|      break;
  116|      0|    }
  117|  46.9k|    case IA_API_CMD_INIT: {
  ------------------
  |  |   30|  46.9k|#define IA_API_CMD_INIT 0x0003
  ------------------
  |  Branch (117:5): [True: 46.9k, False: 194k]
  ------------------
  118|  46.9k|      switch (i_idx) {
  119|  12.7k|        case IA_CMD_TYPE_INIT_SET_BUFF_PTR: {
  ------------------
  |  |  101|  12.7k|#define IA_CMD_TYPE_INIT_SET_BUFF_PTR 0x020B
  ------------------
  |  Branch (119:9): [True: 12.7k, False: 34.1k]
  ------------------
  120|  12.7k|          p_obj_drc->p_state->persistent_ptr =
  121|  12.7k|              (UWORD8 *)p_obj_drc->pp_mem[IA_DRC_PERSIST_IDX] +
  ------------------
  |  |   27|  12.7k|#define IA_DRC_PERSIST_IDX (0)
  ------------------
  122|  12.7k|              IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_state_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  123|  12.7k|          error_code = impd_drc_set_struct_pointer(p_obj_drc);
  124|  12.7k|          if (error_code) return error_code;
  ------------------
  |  Branch (124:15): [True: 0, False: 12.7k]
  ------------------
  125|       |
  126|  12.7k|          break;
  127|  12.7k|        }
  128|  14.7k|        case IA_CMD_TYPE_INIT_API_PRE_CONFIG_PARAMS: {
  ------------------
  |  |   85|  14.7k|#define IA_CMD_TYPE_INIT_API_PRE_CONFIG_PARAMS 0x0100
  ------------------
  |  Branch (128:9): [True: 14.7k, False: 32.1k]
  ------------------
  129|  14.7k|          error_code = impd_drc_set_default_config(p_obj_drc);
  130|  14.7k|          if (error_code) return error_code;
  ------------------
  |  Branch (130:15): [True: 0, False: 14.7k]
  ------------------
  131|  14.7k|          break;
  132|  14.7k|        }
  133|  14.7k|        case IA_CMD_TYPE_INIT_API_POST_CONFIG_PARAMS: {
  ------------------
  |  |   86|  12.7k|#define IA_CMD_TYPE_INIT_API_POST_CONFIG_PARAMS 0x0200
  ------------------
  |  Branch (133:9): [True: 12.7k, False: 34.1k]
  ------------------
  134|  12.7k|          error_code = impd_drc_fill_mem_tables(p_obj_drc);
  135|  12.7k|          if (error_code) return error_code;
  ------------------
  |  Branch (135:15): [True: 0, False: 12.7k]
  ------------------
  136|  12.7k|          break;
  137|  12.7k|        }
  138|  12.7k|        case IA_CMD_TYPE_INIT_PROCESS: {
  ------------------
  |  |   87|  1.56k|#define IA_CMD_TYPE_INIT_PROCESS 0x0300
  ------------------
  |  Branch (138:9): [True: 1.56k, False: 45.3k]
  ------------------
  139|  1.56k|          IA_ERRORCODE Error = 0;
  140|       |
  141|  1.56k|          if (p_obj_drc->pp_mem[IA_DRC_PERSIST_IDX] == 0) {
  ------------------
  |  |   27|  1.56k|#define IA_DRC_PERSIST_IDX (0)
  ------------------
  |  Branch (141:15): [True: 0, False: 1.56k]
  ------------------
  142|      0|            return (-1);
  143|      0|          }
  144|       |
  145|  1.56k|          Error = impd_drc_init(p_obj_drc);
  146|  1.56k|          if (Error) return Error;
  ------------------
  |  Branch (146:15): [True: 978, False: 585]
  ------------------
  147|    585|          p_obj_drc->p_state->ui_init_done = 1;
  148|    585|          return Error;
  149|      0|          break;
  150|  1.56k|        }
  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: 46.9k]
  ------------------
  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.56k|        }
  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: 46.9k]
  ------------------
  161|      0|          *pui_value = p_obj_drc->str_bit_handler.cpy_over;
  162|      0|          break;
  163|  1.56k|        }
  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: 46.9k]
  ------------------
  165|      0|          *pui_value = p_obj_drc->str_bit_handler.cpy_over_ic;
  166|      0|          break;
  167|  1.56k|        }
  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: 46.9k]
  ------------------
  170|      0|          *pui_value = p_obj_drc->str_bit_handler.cpy_over_il;
  171|      0|          break;
  172|  1.56k|        }
  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: 46.9k]
  ------------------
  174|      0|          *pui_value = p_obj_drc->str_bit_handler.cpy_over_in;
  175|      0|          break;
  176|  1.56k|        }
  177|  1.50k|        case IA_CMD_TYPE_INIT_CPY_BSF_BUFF: {
  ------------------
  |  |   90|  1.50k|#define IA_CMD_TYPE_INIT_CPY_BSF_BUFF 0x0201
  ------------------
  |  Branch (177:9): [True: 1.50k, False: 45.4k]
  ------------------
  178|  1.50k|          memcpy(p_obj_drc->str_bit_handler.it_bit_buf +
  179|  1.50k|                     p_obj_drc->str_bit_handler.num_bytes_offset_bs,
  180|  1.50k|                 p_obj_drc->pp_mem[2], p_obj_drc->str_bit_handler.num_byts_cur);
  181|  1.50k|          p_obj_drc->str_bit_handler.num_bytes_bs =
  182|  1.50k|              p_obj_drc->str_bit_handler.num_bytes_bs +
  183|  1.50k|              p_obj_drc->str_bit_handler.num_byts_cur;
  184|  1.50k|          p_obj_drc->str_bit_handler.num_bytes_offset_bs =
  185|  1.50k|              p_obj_drc->str_bit_handler.num_bytes_bs;
  186|  1.50k|          p_obj_drc->str_bit_handler.num_total_bytes =
  187|  1.50k|              p_obj_drc->str_bit_handler.num_bytes_bs;
  188|       |
  189|  1.50k|          break;
  190|  1.56k|        }
  191|  1.26k|        case IA_CMD_TYPE_INIT_CPY_IC_BSF_BUFF: {
  ------------------
  |  |   91|  1.26k|#define IA_CMD_TYPE_INIT_CPY_IC_BSF_BUFF 0x0202
  ------------------
  |  Branch (191:9): [True: 1.26k, False: 45.6k]
  ------------------
  192|  1.26k|          memcpy(p_obj_drc->str_bit_handler.bitstream_drc_config,
  193|  1.26k|                 p_obj_drc->pp_mem[2],
  194|  1.26k|                 p_obj_drc->str_bit_handler.num_byts_cur_ic);
  195|  1.26k|          p_obj_drc->str_bit_handler.num_bytes_bs_drc_config =
  196|  1.26k|              p_obj_drc->str_bit_handler.num_byts_cur_ic;
  197|  1.26k|          break;
  198|  1.56k|        }
  199|    816|        case IA_CMD_TYPE_INIT_CPY_IL_BSF_BUFF: {
  ------------------
  |  |   92|    816|#define IA_CMD_TYPE_INIT_CPY_IL_BSF_BUFF 0x0203
  ------------------
  |  Branch (199:9): [True: 816, False: 46.1k]
  ------------------
  200|    816|          memcpy(p_obj_drc->str_bit_handler.bitstream_loudness_info,
  201|    816|                 p_obj_drc->pp_mem[2],
  202|    816|                 p_obj_drc->str_bit_handler.num_byts_cur_il);
  203|    816|          p_obj_drc->str_bit_handler.num_bytes_bs_loudness_info =
  204|    816|              p_obj_drc->str_bit_handler.num_byts_cur_il;
  205|    816|          break;
  206|  1.56k|        }
  207|  1.56k|        case IA_CMD_TYPE_INIT_CPY_IN_BSF_BUFF: {
  ------------------
  |  |   94|  1.56k|#define IA_CMD_TYPE_INIT_CPY_IN_BSF_BUFF 0x0205
  ------------------
  |  Branch (207:9): [True: 1.56k, False: 45.3k]
  ------------------
  208|  1.56k|          memcpy(p_obj_drc->str_bit_handler.bitstream_unidrc_interface,
  209|  1.56k|                 p_obj_drc->pp_mem[2],
  210|  1.56k|                 p_obj_drc->str_bit_handler.num_byts_cur_in);
  211|  1.56k|          p_obj_drc->str_bit_handler.num_bytes_bs_unidrc_interface =
  212|  1.56k|              p_obj_drc->str_bit_handler.num_byts_cur_in;
  213|  1.56k|          break;
  214|  1.56k|        }
  215|      0|        default: { return -1; }
  ------------------
  |  Branch (215:9): [True: 0, False: 46.9k]
  ------------------
  216|  46.9k|      };
  217|  45.3k|      break;
  218|  46.9k|    }
  219|  1.56k|    case IA_API_CMD_GET_CONFIG_PARAM: {
  ------------------
  |  |   33|  1.56k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  |  Branch (219:5): [True: 1.56k, False: 239k]
  ------------------
  220|  1.56k|      switch (i_idx) {
  ------------------
  |  Branch (220:15): [True: 1.56k, 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.56k]
  ------------------
  222|      0|          *pus_value = p_obj_drc->str_config.sampling_rate;
  223|      0|          break;
  224|      0|        }
  225|       |
  226|  1.56k|        case IA_DRC_DEC_CONFIG_PARAM_NUM_CHANNELS: {
  ------------------
  |  |   26|  1.56k|#define IA_DRC_DEC_CONFIG_PARAM_NUM_CHANNELS 0x0002
  ------------------
  |  Branch (226:9): [True: 1.56k, False: 0]
  ------------------
  227|  1.56k|          *pus_value = p_obj_drc->str_config.num_ch_out;
  228|  1.56k|          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.56k]
  ------------------
  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.56k]
  ------------------
  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.56k|      }
  244|  1.56k|      break;
  245|  1.56k|    }
  246|  84.6k|    case IA_API_CMD_SET_CONFIG_PARAM: {
  ------------------
  |  |   32|  84.6k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  |  Branch (246:5): [True: 84.6k, False: 156k]
  ------------------
  247|  84.6k|      switch (i_idx) {
  248|  12.7k|        case IA_DRC_DEC_CONFIG_PARAM_SAMP_FREQ: {
  ------------------
  |  |   25|  12.7k|#define IA_DRC_DEC_CONFIG_PARAM_SAMP_FREQ 0x0001
  ------------------
  |  Branch (248:9): [True: 12.7k, False: 71.9k]
  ------------------
  249|  12.7k|          if (*pus_value == 0 || *pus_value > 96000) {
  ------------------
  |  Branch (249:15): [True: 0, False: 12.7k]
  |  Branch (249:34): [True: 3, False: 12.7k]
  ------------------
  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.7k|          p_obj_drc->str_config.sampling_rate = *pus_value;
  253|  12.7k|          break;
  254|  12.7k|        }
  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: 84.6k]
  ------------------
  256|      0|          p_obj_drc->str_config.apply_crossfade = *pus_value;
  257|      0|          break;
  258|  12.7k|        }
  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: 84.6k]
  ------------------
  260|      0|          p_obj_drc->str_config.is_config_changed = *pus_value;
  261|      0|          break;
  262|  12.7k|        }
  263|  12.7k|        case IA_DRC_DEC_CONFIG_PARAM_NUM_CHANNELS: {
  ------------------
  |  |   26|  12.7k|#define IA_DRC_DEC_CONFIG_PARAM_NUM_CHANNELS 0x0002
  ------------------
  |  Branch (263:9): [True: 12.7k, False: 71.9k]
  ------------------
  264|  12.7k|          p_obj_drc->str_config.num_ch_in = *pus_value;
  265|  12.7k|          if (*pus_value < 1 || *pus_value > MAX_CHANNEL_COUNT) {
  ------------------
  |  |   35|  12.7k|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  |  Branch (265:15): [True: 17, False: 12.7k]
  |  Branch (265:33): [True: 0, False: 12.7k]
  ------------------
  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.7k|          break;
  269|  12.7k|        }
  270|       |
  271|  12.7k|        case IA_DRC_DEC_CONFIG_PARAM_PCM_WDSZ: {
  ------------------
  |  |   24|  12.7k|#define IA_DRC_DEC_CONFIG_PARAM_PCM_WDSZ 0x0000
  ------------------
  |  Branch (271:9): [True: 12.7k, False: 71.9k]
  ------------------
  272|  12.7k|          switch (*pus_value) {
  273|  12.7k|            case 16:
  ------------------
  |  Branch (273:13): [True: 12.7k, False: 0]
  ------------------
  274|  12.7k|            case 24:
  ------------------
  |  Branch (274:13): [True: 0, False: 12.7k]
  ------------------
  275|  12.7k|            case 32:
  ------------------
  |  Branch (275:13): [True: 0, False: 12.7k]
  ------------------
  276|  12.7k|              break;
  277|      0|            default:
  ------------------
  |  Branch (277:13): [True: 0, False: 12.7k]
  ------------------
  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.7k|          }
  280|       |
  281|  12.7k|          p_obj_drc->str_config.pcm_size = *pus_value;
  282|       |
  283|  12.7k|          break;
  284|  12.7k|        }
  285|       |
  286|  3.58k|        case IA_DRC_DEC_CONFIG_PARAM_BITS_FORMAT: {
  ------------------
  |  |   31|  3.58k|#define IA_DRC_DEC_CONFIG_PARAM_BITS_FORMAT 0x0007
  ------------------
  |  Branch (286:9): [True: 3.58k, False: 81.0k]
  ------------------
  287|  3.58k|          break;
  288|  12.7k|        }
  289|  1.56k|        case IA_DRC_DEC_CONFIG_PARAM_INT_PRESENT: {
  ------------------
  |  |   32|  1.56k|#define IA_DRC_DEC_CONFIG_PARAM_INT_PRESENT 0x0008
  ------------------
  |  Branch (289:9): [True: 1.56k, False: 83.0k]
  ------------------
  290|  1.56k|          break;
  291|  12.7k|        }
  292|  1.56k|        case IA_DRC_DEC_CONFIG_PARAM_FRAME_SIZE: {
  ------------------
  |  |   38|  1.56k|#define IA_DRC_DEC_CONFIG_PARAM_FRAME_SIZE 0x000E
  ------------------
  |  Branch (292:9): [True: 1.56k, False: 83.0k]
  ------------------
  293|  1.56k|          if (*pus_value < 1 || *pus_value > 4096) {
  ------------------
  |  Branch (293:15): [True: 0, False: 1.56k]
  |  Branch (293:33): [True: 0, False: 1.56k]
  ------------------
  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.56k|          p_obj_drc->str_config.frame_size = *pus_value;
  298|       |
  299|  1.56k|          break;
  300|  1.56k|        }
  301|  1.50k|        case IA_DRC_DEC_CONFIG_GAIN_STREAM_FLAG: {
  ------------------
  |  |   40|  1.50k|#define IA_DRC_DEC_CONFIG_GAIN_STREAM_FLAG 0x0010
  ------------------
  |  Branch (301:9): [True: 1.50k, False: 83.1k]
  ------------------
  302|  1.50k|          break;
  303|  1.56k|        }
  304|       |
  305|  12.7k|        case IA_DRC_DEC_CONFIG_DRC_EFFECT_TYPE: {
  ------------------
  |  |   41|  12.7k|#define IA_DRC_DEC_CONFIG_DRC_EFFECT_TYPE 0x0011
  ------------------
  |  Branch (305:9): [True: 12.7k, False: 71.9k]
  ------------------
  306|  12.7k|          p_obj_drc->str_config.effect_type = *pus_value;
  307|  12.7k|          break;
  308|  1.56k|        }
  309|  12.7k|        case IA_DRC_DEC_CONFIG_DRC_TARGET_LOUDNESS: {
  ------------------
  |  |   42|  12.7k|#define IA_DRC_DEC_CONFIG_DRC_TARGET_LOUDNESS 0x0012
  ------------------
  |  Branch (309:9): [True: 12.7k, False: 71.9k]
  ------------------
  310|  12.7k|          p_obj_drc->str_config.target_loudness = *pus_value;
  311|  12.7k|          break;
  312|  1.56k|        }
  313|  12.7k|        case IA_DRC_DEC_CONFIG_DRC_LOUD_NORM: {
  ------------------
  |  |   43|  12.7k|#define IA_DRC_DEC_CONFIG_DRC_LOUD_NORM 0x0013
  ------------------
  |  Branch (313:9): [True: 12.7k, False: 71.9k]
  ------------------
  314|  12.7k|          p_obj_drc->str_config.loud_norm_flag = *pus_value;
  315|  12.7k|          break;
  316|  1.56k|        }
  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: 84.6k]
  ------------------
  318|      0|          p_obj_drc->str_config.album_mode = *pus_value;
  319|      0|          break;
  320|  1.56k|        }
  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: 84.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.56k|        }
  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: 84.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.56k|        }
  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: 84.6k]
  ------------------
  333|      0|          p_obj_drc->str_config.loudness_leveling_flag = *pus_value;
  334|      0|          break;
  335|  1.56k|        }
  336|      0|#endif
  337|      0|        default: { return -1; }
  ------------------
  |  Branch (337:9): [True: 0, False: 84.6k]
  ------------------
  338|  84.6k|      }
  339|  84.6k|      break;
  340|  84.6k|    }
  341|  84.6k|    case IA_API_CMD_GET_MEMTABS_SIZE: {
  ------------------
  |  |   35|  12.7k|#define IA_API_CMD_GET_MEMTABS_SIZE 0x0006
  ------------------
  |  Branch (341:5): [True: 12.7k, False: 228k]
  ------------------
  342|  12.7k|      *pui_value =
  343|  12.7k|          (sizeof(ia_mem_info_struct) + sizeof(pVOID *)) * (NUM_DRC_TABLES);
  ------------------
  |  |   65|  12.7k|#define NUM_DRC_TABLES 4
  ------------------
  344|  12.7k|      break;
  345|  84.6k|    }
  346|  12.7k|    case IA_API_CMD_SET_MEMTABS_PTR: {
  ------------------
  |  |   36|  12.7k|#define IA_API_CMD_SET_MEMTABS_PTR 0x0007
  ------------------
  |  Branch (346:5): [True: 12.7k, False: 228k]
  ------------------
  347|  12.7k|      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.7k]
  ------------------
  348|  12.7k|      memset(ps_value, 0,
  349|  12.7k|             (sizeof(ia_mem_info_struct) + sizeof(pVOID *)) * (NUM_DRC_TABLES));
  ------------------
  |  |   65|  12.7k|#define NUM_DRC_TABLES 4
  ------------------
  350|  12.7k|      p_obj_drc->p_mem_info = (ia_mem_info_struct *)(ps_value);
  351|  12.7k|      p_obj_drc->pp_mem =
  352|  12.7k|          (pVOID)((SIZE_T)p_obj_drc->p_mem_info +
  353|  12.7k|                  (NUM_DRC_TABLES * sizeof(*(p_obj_drc->p_mem_info))));
  ------------------
  |  |   65|  12.7k|#define NUM_DRC_TABLES 4
  ------------------
  354|  12.7k|      break;
  355|  12.7k|    }
  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: 241k]
  ------------------
  357|      0|      *pui_value = NUM_DRC_TABLES;
  ------------------
  |  |   65|      0|#define NUM_DRC_TABLES 4
  ------------------
  358|      0|      break;
  359|  12.7k|    }
  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: 241k]
  ------------------
  361|      0|      break;
  362|  12.7k|    }
  363|       |
  364|  32.1k|    case IA_API_CMD_EXECUTE: {
  ------------------
  |  |   39|  32.1k|#define IA_API_CMD_EXECUTE 0x0009
  ------------------
  |  Branch (364:5): [True: 32.1k, False: 209k]
  ------------------
  365|  32.1k|      switch (i_idx) {
  366|  32.1k|        case IA_CMD_TYPE_DO_EXECUTE: {
  ------------------
  |  |  104|  32.1k|#define IA_CMD_TYPE_DO_EXECUTE 0x0100
  ------------------
  |  Branch (366:9): [True: 32.1k, False: 0]
  ------------------
  367|  32.1k|          if (!p_obj_drc->p_state->ui_init_done) {
  ------------------
  |  Branch (367:15): [True: 11.0k, False: 21.1k]
  ------------------
  368|  11.0k|            error_code = IA_FATAL_ERROR;
  ------------------
  |  |   38|  11.0k|#define IA_FATAL_ERROR 0x80000000
  ------------------
  369|  21.1k|          } else if (p_obj_drc->str_config.dec_type == DEC_TYPE_TD) {
  ------------------
  |  |   23|  21.1k|#define DEC_TYPE_TD 0
  ------------------
  |  Branch (369:22): [True: 21.1k, False: 0]
  ------------------
  370|  21.1k|            error_code = impd_process_time_domain(p_obj_drc);
  371|  21.1k|          } 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|  32.1k|          p_obj_drc->str_bit_handler.byte_index_bs =
  379|  32.1k|              p_obj_drc->str_bit_handler.num_total_bytes -
  380|  32.1k|              p_obj_drc->str_bit_handler.num_bytes_bs;
  381|  32.1k|          p_obj_drc->str_bit_handler.num_bytes_offset_bs = 0;
  382|       |
  383|  32.1k|          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: 32.1k]
  ------------------
  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: 32.1k]
  ------------------
  390|  32.1k|      };
  391|  32.1k|      break;
  392|  32.1k|    }
  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: 241k]
  ------------------
  394|      0|      *pui_value = 1;
  395|      0|      break;
  396|  32.1k|    }
  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: 241k]
  ------------------
  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|  32.1k|    }
  403|  32.1k|    case IA_API_CMD_SET_INPUT_BYTES: {
  ------------------
  |  |   43|  32.1k|#define IA_API_CMD_SET_INPUT_BYTES 0x000C
  ------------------
  |  Branch (403:5): [True: 32.1k, False: 209k]
  ------------------
  404|  32.1k|      p_obj_drc->p_state->ui_in_bytes = *pui_value;
  405|  32.1k|      break;
  406|  32.1k|    }
  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: 241k]
  ------------------
  409|      0|      *pui_value = p_obj_drc->p_state->ui_out_bytes;
  410|      0|      break;
  411|  32.1k|    }
  412|      0|    case IA_API_CMD_INPUT_OVER: {
  ------------------
  |  |   45|      0|#define IA_API_CMD_INPUT_OVER 0x000E
  ------------------
  |  Branch (412:5): [True: 0, False: 241k]
  ------------------
  413|      0|      p_obj_drc->p_state->ui_exe_done = 1;
  414|      0|      break;
  415|  32.1k|    }
  416|  1.50k|    case IA_API_CMD_SET_INPUT_BYTES_BS: {
  ------------------
  |  |   71|  1.50k|#define IA_API_CMD_SET_INPUT_BYTES_BS 0x0026
  ------------------
  |  Branch (416:5): [True: 1.50k, False: 239k]
  ------------------
  417|  1.50k|      p_obj_drc->str_bit_handler.num_byts_cur = *pus_value;
  418|  1.50k|      break;
  419|  32.1k|    }
  420|  1.26k|    case IA_API_CMD_SET_INPUT_BYTES_IC_BS: {
  ------------------
  |  |   72|  1.26k|#define IA_API_CMD_SET_INPUT_BYTES_IC_BS 0x0027
  ------------------
  |  Branch (420:5): [True: 1.26k, False: 240k]
  ------------------
  421|  1.26k|      p_obj_drc->str_bit_handler.num_byts_cur_ic = *pus_value;
  422|  1.26k|      break;
  423|  32.1k|    }
  424|    816|    case IA_API_CMD_SET_INPUT_BYTES_IL_BS: {
  ------------------
  |  |   74|    816|#define IA_API_CMD_SET_INPUT_BYTES_IL_BS 0x0029
  ------------------
  |  Branch (424:5): [True: 816, False: 240k]
  ------------------
  425|    816|      p_obj_drc->str_bit_handler.num_byts_cur_il = *pus_value;
  426|    816|      break;
  427|  32.1k|    }
  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: 241k]
  ------------------
  429|      0|      p_obj_drc->str_bit_handler.num_byts_cur_in = *pus_value;
  430|      0|      break;
  431|  32.1k|    }
  432|      0|    default: { return -1; }
  ------------------
  |  Branch (432:5): [True: 0, False: 241k]
  ------------------
  433|   241k|  };
  434|   239k|  return error_code;
  435|   241k|}
impd_drc_mem_api:
  438|   127k|                              WORD32 i_idx, pVOID pv_value) {
  439|   127k|  pUWORD32 pui_value = pv_value;
  440|       |
  441|   127k|  switch (i_cmd) {
  ------------------
  |  Branch (441:11): [True: 127k, False: 0]
  ------------------
  442|  25.4k|    case IA_API_CMD_GET_MEM_INFO_SIZE: {
  ------------------
  |  |   49|  25.4k|#define IA_API_CMD_GET_MEM_INFO_SIZE 0x0011
  ------------------
  |  Branch (442:5): [True: 25.4k, False: 101k]
  ------------------
  443|  25.4k|      *pui_value = p_obj_drc->p_mem_info[i_idx].ui_size;
  444|  25.4k|      break;
  445|      0|    }
  446|  25.4k|    case IA_API_CMD_GET_MEM_INFO_ALIGNMENT: {
  ------------------
  |  |   50|  25.4k|#define IA_API_CMD_GET_MEM_INFO_ALIGNMENT 0x0012
  ------------------
  |  Branch (446:5): [True: 25.4k, False: 101k]
  ------------------
  447|  25.4k|      *pui_value = p_obj_drc->p_mem_info[i_idx].ui_alignment;
  448|  25.4k|      break;
  449|      0|    }
  450|  25.4k|    case IA_API_CMD_GET_MEM_INFO_TYPE: {
  ------------------
  |  |   51|  25.4k|#define IA_API_CMD_GET_MEM_INFO_TYPE 0x0013
  ------------------
  |  Branch (450:5): [True: 25.4k, False: 101k]
  ------------------
  451|  25.4k|      *pui_value = p_obj_drc->p_mem_info[i_idx].ui_type;
  452|  25.4k|      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: 127k]
  ------------------
  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: 127k]
  ------------------
  460|      0|      *pui_value = p_obj_drc->p_mem_info[i_idx].ui_priority;
  461|      0|      break;
  462|      0|    }
  463|  50.9k|    case IA_API_CMD_SET_MEM_PTR: {
  ------------------
  |  |   54|  50.9k|#define IA_API_CMD_SET_MEM_PTR 0x0016
  ------------------
  |  Branch (463:5): [True: 50.9k, False: 76.4k]
  ------------------
  464|  50.9k|      if (pv_value == 0) {
  ------------------
  |  Branch (464:11): [True: 0, False: 50.9k]
  ------------------
  465|      0|        return (-1);
  466|      0|      }
  467|  50.9k|      if (((SIZE_T)pv_value % p_obj_drc->p_mem_info[i_idx].ui_alignment) != 0) {
  ------------------
  |  Branch (467:11): [True: 0, False: 50.9k]
  ------------------
  468|      0|        return (-1);
  469|      0|      }
  470|  50.9k|      p_obj_drc->pp_mem[i_idx] = pv_value;
  471|  50.9k|      memset(p_obj_drc->pp_mem[i_idx], 0, p_obj_drc->p_mem_info[i_idx].ui_size);
  472|  50.9k|      if (IA_MEMTYPE_PERSIST == i_idx) {
  ------------------
  |  |   45|  50.9k|#define IA_MEMTYPE_PERSIST 0x00
  ------------------
  |  Branch (472:11): [True: 12.7k, False: 38.2k]
  ------------------
  473|  12.7k|        p_obj_drc->p_state = pv_value;
  474|  12.7k|      }
  475|  50.9k|      break;
  476|  50.9k|    }
  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: 127k]
  ------------------
  478|      0|    }
  479|   127k|  };
  480|   127k|  return IA_NO_ERROR;
  ------------------
  |  |   25|   127k|#define IA_NO_ERROR 0x00000000
  ------------------
  481|   127k|}
impd_drc_fill_mem_tables:
  563|  12.7k|IA_ERRORCODE impd_drc_fill_mem_tables(ia_drc_api_struct *p_obj_drc) {
  564|  12.7k|  ia_mem_info_struct *p_mem_info;
  565|  12.7k|  {
  566|  12.7k|    p_mem_info = &p_obj_drc->p_mem_info[IA_DRC_PERSIST_IDX];
  ------------------
  |  |   27|  12.7k|#define IA_DRC_PERSIST_IDX (0)
  ------------------
  567|  12.7k|    memset(p_mem_info, 0, sizeof(*p_mem_info));
  568|  12.7k|    p_mem_info->ui_size = impd_calc_pers_size();
  569|  12.7k|    p_mem_info->ui_alignment = 8;
  570|  12.7k|    p_mem_info->ui_type = IA_MEMTYPE_PERSIST;
  ------------------
  |  |   45|  12.7k|#define IA_MEMTYPE_PERSIST 0x00
  ------------------
  571|  12.7k|    p_mem_info->ui_placement[0] = 0;
  572|  12.7k|    p_mem_info->ui_placement[1] = 0;
  573|  12.7k|    p_mem_info->ui_priority = IA_MEMPRIORITY_ANYWHERE;
  ------------------
  |  |   62|  12.7k|#define IA_MEMPRIORITY_ANYWHERE 0x00
  ------------------
  574|  12.7k|    p_mem_info->ui_placed[0] = 0;
  575|  12.7k|    p_mem_info->ui_placed[1] = 0;
  576|  12.7k|  }
  577|  12.7k|  {
  578|  12.7k|    p_mem_info = &p_obj_drc->p_mem_info[IA_DRC_INPUT_IDX];
  ------------------
  |  |   29|  12.7k|#define IA_DRC_INPUT_IDX (2)
  ------------------
  579|  12.7k|    memset(p_mem_info, 0, sizeof(*p_mem_info));
  580|  12.7k|    p_mem_info->ui_size = p_obj_drc->str_config.frame_size *
  581|  12.7k|                          (p_obj_drc->str_config.pcm_size >> 3) *
  582|  12.7k|                          p_obj_drc->str_config.num_ch_in;
  583|  12.7k|    p_mem_info->ui_alignment = 4;
  584|  12.7k|    p_mem_info->ui_type = IA_MEMTYPE_INPUT;
  ------------------
  |  |   49|  12.7k|#define IA_MEMTYPE_INPUT 0x02
  ------------------
  585|  12.7k|    p_mem_info->ui_placement[0] = 0;
  586|  12.7k|    p_mem_info->ui_placement[1] = 0;
  587|  12.7k|    p_mem_info->ui_priority = IA_MEMPRIORITY_ANYWHERE;
  ------------------
  |  |   62|  12.7k|#define IA_MEMPRIORITY_ANYWHERE 0x00
  ------------------
  588|  12.7k|    p_mem_info->ui_placed[0] = 0;
  589|  12.7k|    p_mem_info->ui_placed[1] = 0;
  590|  12.7k|  }
  591|  12.7k|  {
  592|  12.7k|    p_mem_info = &p_obj_drc->p_mem_info[IA_DRC_OUTPUT_IDX];
  ------------------
  |  |   30|  12.7k|#define IA_DRC_OUTPUT_IDX (3)
  ------------------
  593|  12.7k|    memset(p_mem_info, 0, sizeof(*p_mem_info));
  594|  12.7k|    p_mem_info->ui_size = p_obj_drc->str_config.frame_size *
  595|  12.7k|                          (p_obj_drc->str_config.pcm_size >> 3) *
  596|  12.7k|                          p_obj_drc->str_config.num_ch_in;
  597|  12.7k|    p_mem_info->ui_alignment = 4;
  598|  12.7k|    p_mem_info->ui_type = IA_MEMTYPE_OUTPUT;
  ------------------
  |  |   51|  12.7k|#define IA_MEMTYPE_OUTPUT 0x03
  ------------------
  599|  12.7k|    p_mem_info->ui_placement[0] = 0;
  600|  12.7k|    p_mem_info->ui_placement[1] = 0;
  601|  12.7k|    p_mem_info->ui_priority = IA_MEMPRIORITY_ANYWHERE;
  ------------------
  |  |   62|  12.7k|#define IA_MEMPRIORITY_ANYWHERE 0x00
  ------------------
  602|  12.7k|    p_mem_info->ui_placed[0] = 0;
  603|  12.7k|    p_mem_info->ui_placed[1] = 0;
  604|  12.7k|  }
  605|  12.7k|  {
  606|  12.7k|    p_mem_info = &p_obj_drc->p_mem_info[IA_DRC_SCRATCH_IDX];
  ------------------
  |  |   28|  12.7k|#define IA_DRC_SCRATCH_IDX (1)
  ------------------
  607|  12.7k|    memset(p_mem_info, 0, sizeof(*p_mem_info));
  608|  12.7k|    p_mem_info->ui_size = impd_calc_scratch_size();
  609|  12.7k|    p_mem_info->ui_alignment = 8;
  610|  12.7k|    p_mem_info->ui_type = IA_MEMTYPE_SCRATCH;
  ------------------
  |  |   47|  12.7k|#define IA_MEMTYPE_SCRATCH 0x01
  ------------------
  611|  12.7k|    p_mem_info->ui_placement[0] = 0;
  612|  12.7k|    p_mem_info->ui_placement[1] = 0;
  613|  12.7k|    p_mem_info->ui_priority = IA_MEMPRIORITY_ANYWHERE;
  ------------------
  |  |   62|  12.7k|#define IA_MEMPRIORITY_ANYWHERE 0x00
  ------------------
  614|  12.7k|    p_mem_info->ui_placed[0] = 0;
  615|  12.7k|    p_mem_info->ui_placed[1] = 0;
  616|  12.7k|  }
  617|  12.7k|  return IA_NO_ERROR;
  ------------------
  |  |   25|  12.7k|#define IA_NO_ERROR 0x00000000
  ------------------
  618|  12.7k|}
impd_drc_api.c:impd_calc_pers_size:
  489|  12.7k|static WORD32 impd_calc_pers_size() {
  490|  12.7k|  WORD32 size = 0;
  491|       |
  492|  12.7k|  WORD32 analysis_buf_size = IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  493|  12.7k|      AUDIO_CODEC_FRAME_SIZE_MAX * MAX_CHANNEL_COUNT * sizeof(FLOAT32) * NUM_ELE_IN_CPLX_NUM,
  494|  12.7k|      BYTE_ALIGN_8);
  495|  12.7k|  WORD32 synth_buf_size = IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  496|  12.7k|      AUDIO_CODEC_FRAME_SIZE_MAX * MAX_CHANNEL_COUNT * sizeof(FLOAT32) * NUM_ELE_IN_CPLX_NUM,
  497|  12.7k|      BYTE_ALIGN_8);
  498|  12.7k|  WORD32 peak_lim_buf_size = IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  499|  12.7k|      AUDIO_CODEC_FRAME_SIZE_MAX * MAX_CHANNEL_COUNT * sizeof(FLOAT32) * NUM_ELE_IN_CPLX_NUM,
  500|  12.7k|      BYTE_ALIGN_8);
  501|  12.7k|  WORD32 subband_buf_size =
  502|  12.7k|      NUM_ELE_IN_CPLX_NUM *
  ------------------
  |  |   54|  12.7k|#define NUM_ELE_IN_CPLX_NUM 2
  ------------------
  503|  12.7k|          IXHEAAC_GET_SIZE_ALIGNED(MAX_CHANNEL_COUNT * sizeof(FLOAT32 *), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  504|  12.7k|      NUM_ELE_IN_CPLX_NUM * MAX_CHANNEL_COUNT *
  ------------------
  |  |   54|  12.7k|#define NUM_ELE_IN_CPLX_NUM 2
  ------------------
                    NUM_ELE_IN_CPLX_NUM * MAX_CHANNEL_COUNT *
  ------------------
  |  |   35|  12.7k|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  505|  12.7k|          IXHEAAC_GET_SIZE_ALIGNED((MAX_SUBBAND_DELAY + MAX_DRC_FRAME_SIZE) * sizeof(FLOAT32),
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  506|  12.7k|                                   BYTE_ALIGN_8);
  507|       |
  508|  12.7k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_state_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  509|  12.7k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_bits_dec_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  510|  12.7k|  size += 2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_gain_dec_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  511|  12.7k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_loudness_info_set_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  512|  12.7k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_gain_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  513|  12.7k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_interface_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  514|  12.7k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_config), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  515|  12.7k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_sel_pro_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  516|  12.7k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_sel_proc_params_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  517|  12.7k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_sel_proc_output_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  518|  12.7k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_peak_limiter_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  519|  12.7k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_qmf_filt_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  520|  12.7k|  size += analysis_buf_size;
  521|  12.7k|  size += synth_buf_size;
  522|  12.7k|  size += peak_lim_buf_size;
  523|       |
  524|  12.7k|  size += IXHEAAC_GET_SIZE_ALIGNED(MAX_DRC_BS_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  525|  12.7k|  size += IXHEAAC_GET_SIZE_ALIGNED(MAX_DRC_CONFG_BUF_SIZE, BYTE_ALIGN_8); /*DRC Config Bitstream*/
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  526|  12.7k|  size += IXHEAAC_GET_SIZE_ALIGNED(MAX_LOUD_INFO_BUF_SIZE,
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  527|  12.7k|                                   BYTE_ALIGN_8); /*DRC loudness info Bitstream*/
  528|  12.7k|  size +=
  529|  12.7k|      IXHEAAC_GET_SIZE_ALIGNED(MAX_INTERFACE_BUF_SIZE, BYTE_ALIGN_8); /*DRC interface Bitstream*/
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  530|       |
  531|  12.7k|  size += NUM_GAIN_DEC_INSTANCES * SEL_DRC_COUNT *
  ------------------
  |  |   63|  12.7k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
                size += NUM_GAIN_DEC_INSTANCES * SEL_DRC_COUNT *
  ------------------
  |  |   50|  12.7k|#define SEL_DRC_COUNT 3
  ------------------
  532|  12.7k|          IXHEAAC_GET_SIZE_ALIGNED((sizeof(ia_interp_buf_struct) * MAX_GAIN_ELE_COUNT),
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  533|  12.7k|                                   BYTE_ALIGN_8); /*ia_interp_buf_struct*/
  534|  12.7k|  size += NUM_GAIN_DEC_INSTANCES *
  ------------------
  |  |   63|  12.7k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
  535|  12.7k|          IXHEAAC_GET_SIZE_ALIGNED((sizeof(ia_eq_set_struct)), BYTE_ALIGN_8); /*ia_eq_set_struct*/
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  536|       |
  537|       |  /*non_interleaved_audio*/
  538|  12.7k|  size += NUM_GAIN_DEC_INSTANCES *
  ------------------
  |  |   63|  12.7k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
  539|  12.7k|          IXHEAAC_GET_SIZE_ALIGNED((MAX_CHANNEL_COUNT * sizeof(FLOAT32 *)), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  540|  12.7k|  size += NUM_GAIN_DEC_INSTANCES * MAX_CHANNEL_COUNT *
  ------------------
  |  |   63|  12.7k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
                size += NUM_GAIN_DEC_INSTANCES * MAX_CHANNEL_COUNT *
  ------------------
  |  |   35|  12.7k|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  541|  12.7k|          IXHEAAC_GET_SIZE_ALIGNED((MAX_DRC_FRAME_SIZE * sizeof(FLOAT32)), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  542|       |
  543|       |  /*audio_in_out_buf ptr*/
  544|  12.7k|  size += NUM_GAIN_DEC_INSTANCES *
  ------------------
  |  |   63|  12.7k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
  545|  12.7k|          IXHEAAC_GET_SIZE_ALIGNED((MAX_CHANNEL_COUNT * sizeof(FLOAT32 *)), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  546|       |  /*audio_io_buffer_delayed*/
  547|  12.7k|  size += NUM_GAIN_DEC_INSTANCES *
  ------------------
  |  |   63|  12.7k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
  548|  12.7k|          IXHEAAC_GET_SIZE_ALIGNED((MAX_CHANNEL_COUNT * sizeof(FLOAT32 *)), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  549|  12.7k|  size += NUM_GAIN_DEC_INSTANCES * MAX_CHANNEL_COUNT *
  ------------------
  |  |   63|  12.7k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
                size += NUM_GAIN_DEC_INSTANCES * MAX_CHANNEL_COUNT *
  ------------------
  |  |   35|  12.7k|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  550|  12.7k|          IXHEAAC_GET_SIZE_ALIGNED((MAX_DRC_FRAME_SIZE * sizeof(FLOAT32)), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  551|       |
  552|       |  /*subband band buffer ptr*/
  553|  12.7k|  size += NUM_GAIN_DEC_INSTANCES * NUM_ELE_IN_CPLX_NUM *
  ------------------
  |  |   63|  12.7k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
                size += NUM_GAIN_DEC_INSTANCES * NUM_ELE_IN_CPLX_NUM *
  ------------------
  |  |   54|  12.7k|#define NUM_ELE_IN_CPLX_NUM 2
  ------------------
  554|  12.7k|          IXHEAAC_GET_SIZE_ALIGNED(MAX_CHANNEL_COUNT * sizeof(FLOAT32 *), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  555|  12.7k|  size += NUM_GAIN_DEC_INSTANCES * subband_buf_size;
  ------------------
  |  |   63|  12.7k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
  556|       |
  557|  12.7k|  size += NUM_GAIN_DEC_INSTANCES * MAX_CHANNEL_COUNT *
  ------------------
  |  |   63|  12.7k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
                size += NUM_GAIN_DEC_INSTANCES * MAX_CHANNEL_COUNT *
  ------------------
  |  |   35|  12.7k|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  558|  12.7k|          IXHEAAC_GET_SIZE_ALIGNED((PARAM_DRC_MAX_BUF_SZ * sizeof(FLOAT32)), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  559|       |
  560|  12.7k|  return size;
  561|  12.7k|}
impd_drc_api.c:impd_calc_scratch_size:
  483|  12.7k|static WORD32 impd_calc_scratch_size() {
  484|  12.7k|  return IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  12.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  485|  12.7k|      AUDIO_CODEC_FRAME_SIZE_MAX * MAX_CHANNEL_COUNT * NUM_ELE_IN_CPLX_NUM * sizeof(FLOAT32),
  486|  12.7k|      BYTE_ALIGN_8);
  487|  12.7k|}

impd_read_bits_buf:
   33|   867k|WORD32 impd_read_bits_buf(ia_bit_buf_struct* it_bit_buff, WORD no_of_bits) {
   34|   867k|  UWORD32 ret_val;
   35|   867k|  UWORD8* ptr_read_next = it_bit_buff->ptr_read_next;
   36|   867k|  WORD bit_pos = it_bit_buff->bit_pos;
   37|       |
   38|   867k|  if (it_bit_buff->cnt_bits <= 0) {
  ------------------
  |  Branch (38:7): [True: 11.3k, False: 855k]
  ------------------
   39|  11.3k|    it_bit_buff->error = 1;
   40|  11.3k|    return -1;
   41|  11.3k|  }
   42|       |
   43|   855k|  if (no_of_bits == 0) {
  ------------------
  |  Branch (43:7): [True: 20.0k, False: 835k]
  ------------------
   44|  20.0k|    return 0;
   45|  20.0k|  }
   46|       |
   47|   835k|  it_bit_buff->cnt_bits -= no_of_bits;
   48|   835k|  ret_val = (UWORD32)*ptr_read_next;
   49|       |
   50|   835k|  bit_pos -= no_of_bits;
   51|  1.06M|  while (bit_pos < 0) {
  ------------------
  |  Branch (51:10): [True: 231k, False: 835k]
  ------------------
   52|   231k|    bit_pos += 8;
   53|   231k|    ptr_read_next++;
   54|       |
   55|   231k|    if (ptr_read_next > it_bit_buff->ptr_bit_buf_end) {
  ------------------
  |  Branch (55:9): [True: 7.95k, False: 223k]
  ------------------
   56|  7.95k|      ptr_read_next = it_bit_buff->ptr_bit_buf_base;
   57|  7.95k|    }
   58|       |
   59|   231k|    ret_val <<= 8;
   60|       |
   61|   231k|    ret_val |= (UWORD32)*ptr_read_next;
   62|   231k|  }
   63|       |
   64|   835k|  ret_val = ret_val << ((31 - no_of_bits) - bit_pos) >> (32 - no_of_bits);
   65|   835k|  it_bit_buff->ptr_read_next = ptr_read_next;
   66|   835k|  it_bit_buff->bit_pos = (WORD16)bit_pos;
   67|   835k|  return ret_val;
   68|   855k|}
impd_skip_bits_buf:
   70|  20.5k|WORD32 impd_skip_bits_buf(ia_bit_buf_struct* it_bit_buff, WORD no_of_bits) {
   71|  20.5k|  UWORD8* ptr_read_next = it_bit_buff->ptr_read_next;
   72|  20.5k|  WORD bit_pos = it_bit_buff->bit_pos;
   73|       |
   74|  20.5k|  if (it_bit_buff->cnt_bits < no_of_bits) {
  ------------------
  |  Branch (74:7): [True: 1.43k, False: 19.1k]
  ------------------
   75|  1.43k|    it_bit_buff->error = 1;
   76|  1.43k|    return -1;
   77|  1.43k|  }
   78|       |
   79|  19.1k|  it_bit_buff->cnt_bits -= no_of_bits;
   80|       |
   81|  19.1k|  bit_pos -= no_of_bits;
   82|   127k|  while (bit_pos < 0) {
  ------------------
  |  Branch (82:10): [True: 108k, False: 19.1k]
  ------------------
   83|   108k|    bit_pos += 8;
   84|   108k|    ptr_read_next++;
   85|   108k|  }
   86|  19.1k|  it_bit_buff->ptr_read_next = ptr_read_next;
   87|  19.1k|  it_bit_buff->bit_pos = (WORD16)bit_pos;
   88|  19.1k|  return no_of_bits;
   89|  20.5k|}
impd_create_bit_buf:
   91|  25.2k|                         UWORD8* ptr_bit_buf_base, WORD32 bit_buf_size) {
   92|  25.2k|  it_bit_buff->ptr_bit_buf_base = ptr_bit_buf_base;
   93|  25.2k|  it_bit_buff->ptr_bit_buf_end = ptr_bit_buf_base + bit_buf_size - 1;
   94|       |
   95|  25.2k|  it_bit_buff->ptr_read_next = ptr_bit_buf_base;
   96|  25.2k|  it_bit_buff->bit_pos = 7;
   97|       |
   98|  25.2k|  it_bit_buff->cnt_bits = 0;
   99|  25.2k|  it_bit_buff->size = bit_buf_size << 3;
  100|  25.2k|  it_bit_buff->error = 0;
  101|       |
  102|  25.2k|  return;
  103|  25.2k|}
impd_create_init_bit_buf:
  106|  25.2k|                              UWORD8* ptr_bit_buf_base, WORD32 bit_buf_size) {
  107|  25.2k|  impd_create_bit_buf(it_bit_buff, ptr_bit_buf_base, bit_buf_size);
  108|  25.2k|  it_bit_buff->cnt_bits = (bit_buf_size << 3);
  109|  25.2k|  return;
  110|  25.2k|}
impd_init_drc_bitstream_dec:
  116|  1.56k|                                   WORD32* lfe_channel_map) {
  117|  1.56k|  WORD32 i, err_code = 0;
  118|       |
  119|  1.56k|  ia_drc_params_bs_dec_struct* ia_drc_params_struct =
  120|  1.56k|      &p_drc_bs_dec_struct->ia_drc_params_struct;
  121|  1.56k|  ia_drc_params_struct->drc_frame_size = frame_size;
  122|  1.56k|  if (sample_rate < MIN_DRC_SAMP_FREQ) {
  ------------------
  |  |  218|  1.56k|#define MIN_DRC_SAMP_FREQ 1000
  ------------------
  |  Branch (122:7): [True: 1, False: 1.56k]
  ------------------
  123|      1|    return -1;
  124|      1|  }
  125|  1.56k|  ia_drc_params_struct->delta_tmin_default = impd_get_delta_tmin(sample_rate);
  126|  1.56k|  ia_drc_params_struct->num_gain_values_max_default =
  127|  1.56k|      ia_drc_params_struct->drc_frame_size /
  128|  1.56k|      ia_drc_params_struct->delta_tmin_default;
  129|  1.56k|  ia_drc_params_struct->delay_mode = delay_mode;
  130|       |
  131|  1.56k|  if ((frame_size < 1) || (frame_size > AUDIO_CODEC_FRAME_SIZE_MAX) ||
  ------------------
  |  |   45|  1.56k|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  ------------------
  |  Branch (131:7): [True: 0, False: 1.56k]
  |  Branch (131:27): [True: 0, False: 1.56k]
  ------------------
  132|  1.56k|      (ia_drc_params_struct->drc_frame_size < 0.001f * sample_rate)) {
  ------------------
  |  Branch (132:7): [True: 0, False: 1.56k]
  ------------------
  133|      0|    return -1;
  134|      0|  }
  135|       |
  136|  1.56k|  if (ia_drc_params_struct->delta_tmin_default >
  ------------------
  |  Branch (136:7): [True: 0, False: 1.56k]
  ------------------
  137|  1.56k|      ia_drc_params_struct->drc_frame_size) {
  138|      0|    return -1;
  139|      0|  }
  140|       |
  141|  1.56k|  if (lfe_channel_map_count >= 0) {
  ------------------
  |  Branch (141:7): [True: 0, False: 1.56k]
  ------------------
  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.56k|  } else {
  153|  1.56k|    ia_drc_params_struct->lfe_channel_map_count = -1;
  154|       |
  155|  14.0k|    for (i = 0; i < MAX_CHANNEL_COUNT; i++) {
  ------------------
  |  |   35|  14.0k|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  |  Branch (155:17): [True: 12.4k, False: 1.56k]
  ------------------
  156|  12.4k|      ia_drc_params_struct->lfe_channel_map[i] = 0;
  157|  12.4k|    }
  158|  1.56k|  }
  159|       |
  160|  1.56k|  impd_init_tbls(ia_drc_params_struct->num_gain_values_max_default,
  161|  1.56k|                 &p_drc_bs_dec_struct->tables_default);
  162|       |
  163|  1.56k|  return err_code;
  164|  1.56k|}
impd_process_drc_bitstream_dec_config:
  169|  1.56k|    WORD32 num_bytes) {
  170|  1.56k|  WORD32 err_code = 0;
  171|       |
  172|  1.56k|  impd_create_init_bit_buf(it_bit_buff, bitstream_config, num_bytes);
  173|       |
  174|  1.56k|  err_code = impd_parse_drc_config(
  175|  1.56k|      it_bit_buff, &p_drc_bs_dec_struct->ia_drc_params_struct, pstr_drc_config);
  176|  1.56k|  if (err_code) return (err_code);
  ------------------
  |  Branch (176:7): [True: 1.49k, False: 65]
  ------------------
  177|       |
  178|     65|  return err_code;
  179|  1.56k|}
impd_process_drc_bitstream_dec_gain:
  185|  20.8k|    WORD32* num_bits_read) {
  186|  20.8k|  WORD32 err_code = 0;
  187|       |
  188|  20.8k|  impd_create_init_bit_buf(it_bit_buff, bitstream_gain, num_bytes);
  189|       |
  190|  20.8k|  impd_read_bits_buf(it_bit_buff, num_bits_offset);
  191|  20.8k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (191:7): [True: 961, False: 19.8k]
  ------------------
  192|       |
  193|  19.8k|  err_code = impd_drc_uni_gain_read(it_bit_buff, p_drc_bs_dec_struct,
  194|  19.8k|                                    pstr_drc_config, pstr_drc_gain);
  195|       |
  196|  19.8k|  if (err_code > PROC_COMPLETE) return (err_code);
  ------------------
  |  |  127|  19.8k|#define PROC_COMPLETE 1
  ------------------
  |  Branch (196:7): [True: 2.31k, False: 17.5k]
  ------------------
  197|       |
  198|  17.5k|  *num_bits_read = (it_bit_buff->size) - it_bit_buff->cnt_bits;
  199|       |
  200|  17.5k|  if (err_code == PROC_COMPLETE) {
  ------------------
  |  |  127|  17.5k|#define PROC_COMPLETE 1
  ------------------
  |  Branch (200:7): [True: 9.08k, False: 8.48k]
  ------------------
  201|  9.08k|    return err_code;
  202|  9.08k|  }
  203|       |
  204|  8.48k|  return 0;
  205|  17.5k|}
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.12k|                            ia_drc_params_struct* ia_drc_params_struct) {
   34|  3.12k|  WORD32 k;
   35|  3.12k|  if (frame_size < 1 || frame_size > AUDIO_CODEC_FRAME_SIZE_MAX) {
  ------------------
  |  |   45|  3.12k|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  ------------------
  |  Branch (35:7): [True: 0, False: 3.12k]
  |  Branch (35:25): [True: 0, False: 3.12k]
  ------------------
   36|      0|    return -1;
   37|      0|  }
   38|       |
   39|  3.12k|  if (sample_rate < 1000) {
  ------------------
  |  Branch (39:7): [True: 0, False: 3.12k]
  ------------------
   40|      0|    return -1;
   41|      0|  }
   42|       |
   43|  3.12k|  ia_drc_params_struct->drc_frame_size = frame_size;
   44|       |
   45|  3.12k|  if (ia_drc_params_struct->drc_frame_size < 0.001f * sample_rate) {
  ------------------
  |  Branch (45:7): [True: 0, False: 3.12k]
  ------------------
   46|      0|    return -1;
   47|      0|  }
   48|       |
   49|  3.12k|  ia_drc_params_struct->sample_rate = sample_rate;
   50|       |
   51|  3.12k|  ia_drc_params_struct->delta_tmin_default = impd_get_delta_tmin(sample_rate);
   52|       |
   53|  3.12k|  if (ia_drc_params_struct->delta_tmin_default >
  ------------------
  |  Branch (53:7): [True: 0, False: 3.12k]
  ------------------
   54|  3.12k|      ia_drc_params_struct->drc_frame_size) {
   55|      0|    return -1;
   56|      0|  }
   57|       |
   58|  3.12k|  if ((delay_mode != DELAY_MODE_REGULAR_DELAY) &&
  ------------------
  |  |  116|  3.12k|#define DELAY_MODE_REGULAR_DELAY 0
  ------------------
  |  Branch (58:7): [True: 0, False: 3.12k]
  ------------------
   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.12k|  ia_drc_params_struct->delay_mode = delay_mode;
   64|       |
   65|  3.12k|  ia_drc_params_struct->drc_set_counter = 0;
   66|  3.12k|  ia_drc_params_struct->multiband_sel_drc_idx = -1;
   67|       |
   68|  12.4k|  for (k = 0; k < SEL_DRC_COUNT; k++) {
  ------------------
  |  |   50|  12.4k|#define SEL_DRC_COUNT 3
  ------------------
  |  Branch (68:15): [True: 9.37k, False: 3.12k]
  ------------------
   69|  9.37k|    ia_drc_params_struct->sel_drc_array[k].drc_instructions_index = -1;
   70|  9.37k|    ia_drc_params_struct->sel_drc_array[k].dwnmix_instructions_index = -1;
   71|  9.37k|    ia_drc_params_struct->sel_drc_array[k].drc_coeff_idx = -1;
   72|  9.37k|  }
   73|       |
   74|  3.12k|  if ((gain_delay_samples > MAX_SIGNAL_DELAY) || (gain_delay_samples < 0)) {
  ------------------
  |  |   52|  3.12k|#define MAX_SIGNAL_DELAY 4500
  ------------------
  |  Branch (74:7): [True: 0, False: 3.12k]
  |  Branch (74:50): [True: 0, False: 3.12k]
  ------------------
   75|      0|    return -1;
   76|  3.12k|  } else {
   77|  3.12k|    ia_drc_params_struct->gain_delay_samples = gain_delay_samples;
   78|  3.12k|  }
   79|       |
   80|  3.12k|  switch (sub_band_domain_mode) {
   81|  3.12k|    case SUBBAND_DOMAIN_MODE_OFF:
  ------------------
  |  |  148|  3.12k|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (81:5): [True: 3.12k, False: 0]
  ------------------
   82|  3.12k|    case SUBBAND_DOMAIN_MODE_QMF64:
  ------------------
  |  |  149|  3.12k|#define SUBBAND_DOMAIN_MODE_QMF64 1
  ------------------
  |  Branch (82:5): [True: 0, False: 3.12k]
  ------------------
   83|  3.12k|    case SUBBAND_DOMAIN_MODE_QMF71:
  ------------------
  |  |  150|  3.12k|#define SUBBAND_DOMAIN_MODE_QMF71 2
  ------------------
  |  Branch (83:5): [True: 0, False: 3.12k]
  ------------------
   84|  3.12k|    case SUBBAND_DOMAIN_MODE_STFT256:
  ------------------
  |  |  151|  3.12k|#define SUBBAND_DOMAIN_MODE_STFT256 3
  ------------------
  |  Branch (84:5): [True: 0, False: 3.12k]
  ------------------
   85|  3.12k|      ia_drc_params_struct->sub_band_domain_mode = sub_band_domain_mode;
   86|  3.12k|      break;
   87|      0|    default:
  ------------------
  |  Branch (87:5): [True: 0, False: 3.12k]
  ------------------
   88|      0|      return -1;
   89|      0|      break;
   90|  3.12k|  }
   91|       |
   92|  3.12k|  ia_drc_params_struct->parametric_drc_delay = 0;
   93|  3.12k|  ia_drc_params_struct->eq_delay = 0;
   94|       |
   95|  3.12k|  return 0;
   96|  3.12k|}
impd_select_drc_coefficients:
  100|    210|    WORD32* drc_coefficients_selected) {
  101|    210|  WORD32 i;
  102|    210|  WORD32 cof1 = -1;
  103|    210|  WORD32 cof0 = -1;
  104|    420|  for (i = 0; i < drc_config->drc_coefficients_drc_count; i++) {
  ------------------
  |  Branch (104:15): [True: 210, False: 210]
  ------------------
  105|    210|    if (drc_config->str_p_loc_drc_coefficients_uni_drc[i].drc_location == 1) {
  ------------------
  |  Branch (105:9): [True: 210, False: 0]
  ------------------
  106|    210|      if (drc_config->str_p_loc_drc_coefficients_uni_drc[i].version == 0) {
  ------------------
  |  Branch (106:11): [True: 0, False: 210]
  ------------------
  107|      0|        cof0 = i;
  108|      0|        *drc_coefficients_selected = cof0;
  109|    210|      } else {
  110|    210|        cof1 = i;
  111|    210|        *drc_coefficients_selected = cof1;
  112|    210|      }
  113|    210|    }
  114|    210|  }
  115|       |
  116|    210|  if (cof1 >= 0) {
  ------------------
  |  Branch (116:7): [True: 210, False: 0]
  ------------------
  117|    210|    *drc_coefficients_drc =
  118|    210|        &(drc_config->str_p_loc_drc_coefficients_uni_drc[cof1]);
  119|    210|  } 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|    210|  return 0;
  127|    210|}
impd_init_selected_drc_set:
  137|    210|    shape_filter_block* shape_filter_block) {
  138|    210|  WORD32 g, n, c, err = 0;
  139|    210|  WORD32 channel_count = 0;
  140|    210|  WORD32 i;
  141|       |
  142|    210|  ia_drc_instructions_struct* drc_instructions_uni_drc = NULL;
  143|    210|  ia_uni_drc_coeffs_struct* drc_coefficients_uni_drc = NULL;
  144|    210|  WORD32 selected_drc_is_multiband = 0;
  145|    210|  WORD32 drc_instructions_selected = -1;
  146|    210|  WORD32 downmix_instructions_selected = -1;
  147|    210|  WORD32 drc_coefficients_selected = -1;
  148|    210|  p_parametric_drc_params->parametric_drc_instance_count = 0;
  149|       |
  150|    210|  if (drc_config->drc_coefficients_drc_count &&
  ------------------
  |  Branch (150:7): [True: 210, False: 0]
  ------------------
  151|    210|      drc_config->str_p_loc_drc_coefficients_uni_drc->drc_frame_size_present) {
  ------------------
  |  Branch (151:7): [True: 0, False: 210]
  ------------------
  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|    475|  for (n = 0; n < drc_config->drc_instructions_count_plus; n++) {
  ------------------
  |  Branch (158:15): [True: 475, False: 0]
  ------------------
  159|    475|    if (drc_config->str_drc_instruction_str[n].drc_set_id ==
  ------------------
  |  Branch (159:9): [True: 210, False: 265]
  ------------------
  160|    475|        drc_set_id_selected)
  161|    210|      break;
  162|    475|  }
  163|    210|  if (n == drc_config->drc_instructions_count_plus) {
  ------------------
  |  Branch (163:7): [True: 0, False: 210]
  ------------------
  164|      0|    return -1;
  165|      0|  }
  166|    210|  drc_instructions_selected = n;
  167|    210|  drc_instructions_uni_drc =
  168|    210|      &(drc_config->str_drc_instruction_str[drc_instructions_selected]);
  169|       |
  170|    210|  if (downmix_id_selected == ID_FOR_BASE_LAYOUT) {
  ------------------
  |  |  135|    210|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  |  Branch (170:7): [True: 210, False: 0]
  ------------------
  171|    210|    channel_count = drc_config->channel_layout.base_channel_count;
  172|    210|  } 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|    210|  drc_instructions_uni_drc->audio_num_chan = channel_count;
  187|       |
  188|    210|  if (drc_instructions_uni_drc->drc_set_id <= 0) {
  ------------------
  |  Branch (188:7): [True: 0, False: 210]
  ------------------
  189|      0|    drc_coefficients_selected = 0;
  190|    210|  } else {
  191|    210|    err = impd_select_drc_coefficients(drc_config, &drc_coefficients_uni_drc,
  192|    210|                                       &drc_coefficients_selected);
  193|    210|    if (err) return err;
  ------------------
  |  Branch (193:9): [True: 0, False: 210]
  ------------------
  194|    210|  }
  195|       |
  196|    210|  ia_drc_params_struct->sel_drc_array[ia_drc_params_struct->drc_set_counter]
  197|    210|      .drc_instructions_index = drc_instructions_selected;
  198|    210|  ia_drc_params_struct->sel_drc_array[ia_drc_params_struct->drc_set_counter]
  199|    210|      .dwnmix_instructions_index = downmix_instructions_selected;
  200|    210|  ia_drc_params_struct->sel_drc_array[ia_drc_params_struct->drc_set_counter]
  201|    210|      .drc_coeff_idx = drc_coefficients_selected;
  202|       |
  203|    210|  if ((drc_instructions_uni_drc->downmix_id[0] == ID_FOR_ANY_DOWNMIX) ||
  ------------------
  |  |  136|    210|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (203:7): [True: 0, False: 210]
  ------------------
  204|    210|      (drc_instructions_uni_drc->dwnmix_id_count > 1)) {
  ------------------
  |  Branch (204:7): [True: 0, False: 210]
  ------------------
  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|    630|  for (g = 0; g < drc_instructions_uni_drc->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (211:15): [True: 420, False: 210]
  ------------------
  212|    420|    drc_instructions_uni_drc->num_chan_per_ch_group[g] = 0;
  213|  1.04k|    for (c = 0; c < drc_instructions_uni_drc->audio_num_chan; c++) {
  ------------------
  |  Branch (213:17): [True: 620, False: 420]
  ------------------
  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|    420|  }
  219|       |
  220|    210|  if (drc_instructions_uni_drc->drc_set_effect &
  ------------------
  |  Branch (220:7): [True: 0, False: 210]
  ------------------
  221|    210|      (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   72|    210|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                    (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   73|    210|#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|    210|  } else {
  225|    210|    drc_instructions_uni_drc->multiband_audio_sig_count = 0;
  226|    520|    for (c = 0; c < drc_instructions_uni_drc->audio_num_chan; c++) {
  ------------------
  |  Branch (226:17): [True: 310, False: 210]
  ------------------
  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|    210|  }
  236|       |
  237|    630|  for (g = 0; g < drc_instructions_uni_drc->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (237:15): [True: 420, False: 210]
  ------------------
  238|    420|    if (g == 0) {
  ------------------
  |  Branch (238:9): [True: 210, False: 210]
  ------------------
  239|    210|      drc_instructions_uni_drc->parametric_drc_look_ahead_samples_max = 0;
  240|    210|    }
  241|    420|    if (drc_instructions_uni_drc->ch_group_parametric_drc_flag[g] == 0) {
  ------------------
  |  Branch (241:9): [True: 420, False: 0]
  ------------------
  242|    420|      if (drc_instructions_uni_drc->band_count_of_ch_group[g] > 1) {
  ------------------
  |  Branch (242:11): [True: 0, False: 420]
  ------------------
  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|    420|    } 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|    420|  }
  333|    210|  ia_drc_params_struct->parametric_drc_delay +=
  334|    210|      drc_instructions_uni_drc->parametric_drc_look_ahead_samples_max;
  335|       |
  336|    210|  if (selected_drc_is_multiband == 1) {
  ------------------
  |  Branch (336:7): [True: 0, False: 210]
  ------------------
  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|    210|  } else {
  351|    210|    ia_gain_modifiers_struct* gain_modifiers =
  352|    210|        drc_config->str_drc_instruction_str->str_gain_modifiers_of_ch_group;
  353|    630|    for (g = 0; g < drc_instructions_uni_drc->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (353:17): [True: 420, False: 210]
  ------------------
  354|    420|      if (gain_modifiers[g].shape_filter_flag == 1) {
  ------------------
  |  Branch (354:11): [True: 0, False: 420]
  ------------------
  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|    420|      } else {
  360|    420|        shape_filter_block[g].shape_flter_block_flag = 0;
  361|    420|      }
  362|    420|    }
  363|    210|  }
  364|       |
  365|    210|  ia_drc_params_struct->drc_set_counter++;
  366|       |
  367|    210|  return (0);
  368|    210|}

impd_dec_initial_gain:
   47|  66.6k|                             FLOAT32* initial_gain) {
   48|  66.6k|  WORD32 sign, magn, bit_2_extract;
   49|  66.6k|  switch (gain_coding_profile) {
   50|  66.6k|    case GAIN_CODING_PROFILE_REGULAR:
  ------------------
  |  |   75|  66.6k|#define GAIN_CODING_PROFILE_REGULAR 0
  ------------------
  |  Branch (50:5): [True: 66.6k, False: 0]
  ------------------
   51|  66.6k|      sign = impd_read_bits_buf(it_bit_buff, 1);
   52|  66.6k|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (52:11): [True: 504, False: 66.1k]
  ------------------
   53|  66.1k|      magn = impd_read_bits_buf(it_bit_buff, 8);
   54|  66.1k|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (54:11): [True: 1.55k, False: 64.5k]
  ------------------
   55|  64.5k|      *initial_gain = magn * 0.125f;
   56|  64.5k|      if (sign) *initial_gain = -*initial_gain;
  ------------------
  |  Branch (56:11): [True: 20.7k, False: 43.8k]
  ------------------
   57|  64.5k|      break;
   58|      0|    case GAIN_CODING_PROFILE_FADING:
  ------------------
  |  |   76|      0|#define GAIN_CODING_PROFILE_FADING 1
  ------------------
  |  Branch (58:5): [True: 0, False: 66.6k]
  ------------------
   59|      0|    case GAIN_CODING_PROFILE_CLIPPING:
  ------------------
  |  |   77|      0|#define GAIN_CODING_PROFILE_CLIPPING 2
  ------------------
  |  Branch (59:5): [True: 0, False: 66.6k]
  ------------------
   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: 66.6k]
  ------------------
   74|      0|      break;
   75|      0|    default:
  ------------------
  |  Branch (75:5): [True: 0, False: 66.6k]
  ------------------
   76|      0|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
   77|  66.6k|  }
   78|  64.5k|  return (0);
   79|  66.6k|}
impd_dec_gains:
   82|  22.1k|                      WORD32 gain_coding_profile, ia_node_struct* str_node) {
   83|  22.1k|  WORD32 err = 0, k, e, m;
   84|  22.1k|  WORD32 bit;
   85|  22.1k|  WORD32 num_bits_read;
   86|  22.1k|  WORD32 code;
   87|  22.1k|  WORD32 code_found;
   88|  22.1k|  FLOAT32 drc_gain_delta = 0;
   89|  22.1k|  const ia_delta_gain_code_table_struct* ptr_delta_gain_code_table;
   90|  22.1k|  WORD32 no_delta_gain_entries;
   91|       |
   92|  22.1k|  err = impd_dec_initial_gain(it_bit_buff, gain_coding_profile,
   93|  22.1k|                              &(str_node[0].loc_db_gain));
   94|  22.1k|  if (err) return (err);
  ------------------
  |  Branch (94:7): [True: 294, False: 21.9k]
  ------------------
   95|       |
   96|  21.9k|  impd_get_delta_gain_code_tbl(gain_coding_profile, &ptr_delta_gain_code_table,
   97|  21.9k|                               &no_delta_gain_entries);
   98|  41.9k|  for (k = 1; k < no_nodes; k++) {
  ------------------
  |  Branch (98:15): [True: 20.2k, False: 21.6k]
  ------------------
   99|  20.2k|    num_bits_read = 0;
  100|  20.2k|    code = 0;
  101|  20.2k|    code_found = 0;
  102|  20.2k|    e = 0;
  103|  88.3k|    while ((e < no_delta_gain_entries) && (!code_found)) {
  ------------------
  |  Branch (103:12): [True: 88.3k, False: 0]
  |  Branch (103:43): [True: 68.2k, False: 20.0k]
  ------------------
  104|   136k|      for (m = 0; m < ptr_delta_gain_code_table[e].size - num_bits_read; m++) {
  ------------------
  |  Branch (104:19): [True: 68.2k, False: 68.0k]
  ------------------
  105|  68.2k|        bit = impd_read_bits_buf(it_bit_buff, 1);
  106|  68.2k|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (106:13): [True: 256, False: 68.0k]
  ------------------
  107|  68.0k|        code = (code << 1) + bit;
  108|  68.0k|        num_bits_read++;
  109|  68.0k|      }
  110|   134k|      while (num_bits_read == ptr_delta_gain_code_table[e].size) {
  ------------------
  |  Branch (110:14): [True: 86.1k, False: 48.0k]
  ------------------
  111|  86.1k|        if (code == ptr_delta_gain_code_table[e].code) {
  ------------------
  |  Branch (111:13): [True: 20.0k, False: 66.1k]
  ------------------
  112|  20.0k|          drc_gain_delta = ptr_delta_gain_code_table[e].value;
  113|  20.0k|          code_found = 1;
  114|  20.0k|          break;
  115|  20.0k|        }
  116|  66.1k|        e++;
  117|  66.1k|      }
  118|  68.0k|    }
  119|  20.0k|    if (code_found == 0) {
  ------------------
  |  Branch (119:9): [True: 0, False: 20.0k]
  ------------------
  120|      0|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  121|      0|    }
  122|  20.0k|    str_node[k].loc_db_gain = str_node[k - 1].loc_db_gain + drc_gain_delta;
  123|  20.0k|  }
  124|  21.6k|  return (0);
  125|  21.9k|}
impd_dec_slopes:
  129|  25.9k|                       ia_node_struct* str_node) {
  130|  25.9k|  WORD32 k, e, bit;
  131|  25.9k|  WORD32 code;
  132|  25.9k|  WORD32 code_found;
  133|  25.9k|  FLOAT32 slope_value = 0;
  134|  25.9k|  bool end_marker = 0;
  ------------------
  |  |  228|  25.9k|#define bool WORD32
  ------------------
  135|  25.9k|  WORD32 num_bits_read;
  136|  25.9k|  const ia_slope_code_table_struct* ptr_slope_code_table;
  137|  25.9k|  WORD32 no_slope_code_entries;
  138|       |
  139|  25.9k|  ptr_slope_code_table = &(slope_code_tbl_entries_by_size[0]);
  140|  25.9k|  no_slope_code_entries = NUM_SLOPE_TBL_ENTRIES;
  ------------------
  |  |   26|  25.9k|#define NUM_SLOPE_TBL_ENTRIES 15
  ------------------
  141|       |
  142|  25.9k|  k = 0;
  143|   199k|  while (end_marker != 1) {
  ------------------
  |  Branch (143:10): [True: 174k, False: 25.6k]
  ------------------
  144|   174k|    k++;
  145|   174k|    end_marker = impd_read_bits_buf(it_bit_buff, 1);
  146|   174k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (146:9): [True: 327, False: 173k]
  ------------------
  147|   174k|  }
  148|  25.6k|  if (k > NODE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |   47|  25.6k|#define NODE_COUNT_MAX DRC_CODEC_FRAME_SIZE_MAX
  |  |  ------------------
  |  |  |  |   46|  25.6k|#define DRC_CODEC_FRAME_SIZE_MAX (AUDIO_CODEC_FRAME_SIZE_MAX / 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  25.6k|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                if (k > NODE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|     77|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (148:7): [True: 77, False: 25.5k]
  ------------------
  149|  25.5k|  *no_nodes = k;
  150|       |
  151|  25.5k|  if (gain_interpolation_type == GAIN_INTERPOLATION_TYPE_SPLINE) {
  ------------------
  |  |   81|  25.5k|#define GAIN_INTERPOLATION_TYPE_SPLINE 0
  ------------------
  |  Branch (151:7): [True: 0, False: 25.5k]
  ------------------
  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|  25.5k|  } else {
  177|   122k|    for (k = 0; k < *no_nodes; k++) {
  ------------------
  |  Branch (177:17): [True: 97.2k, False: 25.5k]
  ------------------
  178|  97.2k|      str_node[k].slope = 0.0f;
  179|  97.2k|    }
  180|  25.5k|  }
  181|  25.5k|  return (0);
  182|  25.5k|}
impd_dec_times:
  188|  25.5k|                      ia_node_struct* str_node) {
  189|  25.5k|  WORD32 k, e, m;
  190|  25.5k|  WORD32 bit;
  191|  25.5k|  WORD32 num_bits_read;
  192|  25.5k|  WORD32 code;
  193|  25.5k|  WORD32 code_found = 0;
  194|  25.5k|  WORD32 time_delta = 0;
  195|  25.5k|  WORD32 time_offs = time_offset;
  196|  25.5k|  ia_delta_time_code_table_entry_struct* delta_time_code_table =
  197|  25.5k|      str_tables->delta_time_code_table;
  198|  25.5k|  bool frame_end_flag;
  ------------------
  |  |  228|  25.5k|#define bool WORD32
  ------------------
  199|  25.5k|  WORD32 node_time_tmp;
  200|  25.5k|  bool node_res_flag;
  ------------------
  |  |  228|  25.5k|#define bool WORD32
  ------------------
  201|  25.5k|  WORD32 exit_cnt;
  202|  25.5k|  if (full_frame == 0) {
  ------------------
  |  Branch (202:7): [True: 25.5k, False: 0]
  ------------------
  203|  25.5k|    frame_end_flag = impd_read_bits_buf(it_bit_buff, 1);
  204|  25.5k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (204:9): [True: 474, False: 25.1k]
  ------------------
  205|  25.5k|  } else {
  206|      0|    frame_end_flag = 1;
  207|      0|  }
  208|       |
  209|  25.1k|  if (frame_end_flag == 1) {
  ------------------
  |  Branch (209:7): [True: 15.2k, False: 9.88k]
  ------------------
  210|  15.2k|    node_res_flag = 0;
  211|  31.4k|    for (k = 0; k < num_nodes - 1; k++) {
  ------------------
  |  Branch (211:17): [True: 17.8k, False: 13.5k]
  ------------------
  212|  17.8k|      num_bits_read = 0;
  213|  17.8k|      code = 0;
  214|  17.8k|      code_found = 0;
  215|  17.8k|      exit_cnt = 0;
  216|  17.8k|      e = 1;
  217|   111M|      while ((e < N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX) && (!code_found)) {
  ------------------
  |  |   27|   111M|#define N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX (512 + 14)
  ------------------
  |  Branch (217:14): [True: 111M, False: 0]
  |  Branch (217:59): [True: 111M, False: 16.5k]
  ------------------
  218|   111M|        exit_cnt++;
  219|   111M|        if (exit_cnt > 100000) {
  ------------------
  |  Branch (219:13): [True: 1.11k, False: 111M]
  ------------------
  220|  1.11k|          return -1;
  221|  1.11k|        }
  222|   111M|        for (m = 0; m < delta_time_code_table[e].size - num_bits_read; m++) {
  ------------------
  |  Branch (222:21): [True: 88.3k, False: 111M]
  ------------------
  223|  88.3k|          bit = impd_read_bits_buf(it_bit_buff, 1);
  224|  88.3k|          if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (224:15): [True: 227, False: 88.1k]
  ------------------
  225|  88.1k|          code = (code << 1) + bit;
  226|  88.1k|          num_bits_read++;
  227|  88.1k|        }
  228|   111M|        while (num_bits_read == delta_time_code_table[e].size) {
  ------------------
  |  Branch (228:16): [True: 277k, False: 111M]
  ------------------
  229|   277k|          if (code == delta_time_code_table[e].code) {
  ------------------
  |  Branch (229:15): [True: 16.5k, False: 261k]
  ------------------
  230|  16.5k|            time_delta = delta_time_code_table[e].value;
  231|  16.5k|            code_found = 1;
  232|  16.5k|            break;
  233|  16.5k|          }
  234|   261k|          e++;
  235|   261k|        }
  236|   111M|      }
  237|  16.5k|      node_time_tmp = time_offs + time_delta * delta_tmin;
  238|  16.5k|      if (node_time_tmp >= (2 * AUDIO_CODEC_FRAME_SIZE_MAX - drc_frame_size))
  ------------------
  |  |   45|  16.5k|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  ------------------
  |  Branch (238:11): [True: 319, False: 16.1k]
  ------------------
  239|    319|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|    319|#define UNEXPECTED_ERROR 2
  ------------------
  240|  16.1k|      if (node_time_tmp > drc_frame_size + time_offset) {
  ------------------
  |  Branch (240:11): [True: 6.33k, False: 9.84k]
  ------------------
  241|  6.33k|        if (node_res_flag == 0) {
  ------------------
  |  Branch (241:13): [True: 2.65k, False: 3.68k]
  ------------------
  242|  2.65k|          str_node[k].time = drc_frame_size + time_offset;
  243|  2.65k|          node_res_flag = 1;
  244|  2.65k|        }
  245|  6.33k|        str_node[k + 1].time = node_time_tmp;
  246|  9.84k|      } else {
  247|  9.84k|        str_node[k].time = node_time_tmp;
  248|  9.84k|      }
  249|  16.1k|      time_offs = node_time_tmp;
  250|  16.1k|    }
  251|  13.5k|    if (node_res_flag == 0) {
  ------------------
  |  Branch (251:9): [True: 11.4k, False: 2.16k]
  ------------------
  252|  11.4k|      str_node[k].time = drc_frame_size + time_offset;
  253|  11.4k|    }
  254|  13.5k|  } else {
  255|  33.2k|    for (k = 0; k < num_nodes; k++) {
  ------------------
  |  Branch (255:17): [True: 24.5k, False: 8.62k]
  ------------------
  256|  24.5k|      num_bits_read = 0;
  257|  24.5k|      code = 0;
  258|  24.5k|      code_found = 0;
  259|  24.5k|      e = 1;
  260|  24.5k|      exit_cnt = 0;
  261|  46.0M|      while ((e < N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX) && (!code_found)) {
  ------------------
  |  |   27|  46.0M|#define N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX (512 + 14)
  ------------------
  |  Branch (261:14): [True: 46.0M, False: 0]
  |  Branch (261:59): [True: 45.9M, False: 23.7k]
  ------------------
  262|  45.9M|        exit_cnt++;
  263|  45.9M|        if (exit_cnt > 100000) {
  ------------------
  |  Branch (263:13): [True: 459, False: 45.9M]
  ------------------
  264|    459|          return (BITSTREAM_ERROR);
  ------------------
  |  |  132|    459|#define BITSTREAM_ERROR 6
  ------------------
  265|    459|        }
  266|  46.0M|        for (m = 0; m < delta_time_code_table[e].size - num_bits_read; m++) {
  ------------------
  |  Branch (266:21): [True: 97.4k, False: 45.9M]
  ------------------
  267|  97.4k|          bit = impd_read_bits_buf(it_bit_buff, 1);
  268|  97.4k|          if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (268:15): [True: 359, False: 97.0k]
  ------------------
  269|  97.0k|          code = (code << 1) + bit;
  270|  97.0k|          num_bits_read++;
  271|  97.0k|        }
  272|  46.1M|        while (num_bits_read == delta_time_code_table[e].size) {
  ------------------
  |  Branch (272:16): [True: 210k, False: 45.9M]
  ------------------
  273|   210k|          if (code == delta_time_code_table[e].code) {
  ------------------
  |  Branch (273:15): [True: 23.7k, False: 186k]
  ------------------
  274|  23.7k|            time_delta = delta_time_code_table[e].value;
  275|  23.7k|            code_found = 1;
  276|  23.7k|            break;
  277|  23.7k|          }
  278|   186k|          e++;
  279|   186k|        }
  280|  45.9M|      }
  281|  23.7k|      time_offs += time_delta * delta_tmin;
  282|  23.7k|      if (time_offs >= (2 * AUDIO_CODEC_FRAME_SIZE_MAX - drc_frame_size))
  ------------------
  |  |   45|  23.7k|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  ------------------
  |  Branch (282:11): [True: 438, False: 23.3k]
  ------------------
  283|    438|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|    438|#define UNEXPECTED_ERROR 2
  ------------------
  284|  23.3k|      str_node[k].time = time_offs;
  285|  23.3k|    }
  286|  9.88k|  }
  287|  22.1k|  return (0);
  288|  25.1k|}
impd_drc_uni_gain_read:
  293|  19.8k|                              ia_drc_gain_struct* pstr_uni_drc_gain) {
  294|  19.8k|  WORD32 err = 0;
  295|  19.8k|  WORD32 seq;
  296|  19.8k|  static WORD32 pkt_loss_frame_cnt = 0;
  297|  19.8k|  ia_spline_nodes_struct* str_spline_nodes = {0};
  298|       |
  299|  19.8k|  {
  300|  19.8k|    WORD32 gain_sequence_count =
  301|  19.8k|        drc_config->str_p_loc_drc_coefficients_uni_drc[0].gain_sequence_count;
  302|       |
  303|  84.2k|    for (seq = 0; seq < gain_sequence_count; seq++) {
  ------------------
  |  Branch (303:19): [True: 71.1k, False: 13.0k]
  ------------------
  304|  71.1k|      WORD32 index = drc_config->str_p_loc_drc_coefficients_uni_drc[0]
  305|  71.1k|                         .gain_set_params_index_for_gain_sequence[seq];
  306|  71.1k|      ia_gain_set_params_struct str_gain_set_params = {0};
  307|  71.1k|      ia_gain_set_params_struct* gain_set_params = &str_gain_set_params;
  308|       |
  309|  71.1k|      if (index != -1) {
  ------------------
  |  Branch (309:11): [True: 71.1k, False: 0]
  ------------------
  310|  71.1k|        gain_set_params = &(drc_config->str_p_loc_drc_coefficients_uni_drc
  311|  71.1k|                                ->gain_set_params[index]);
  312|  71.1k|      }
  313|  71.1k|      if (gain_set_params->gain_coding_profile ==
  ------------------
  |  Branch (313:11): [True: 0, False: 71.1k]
  ------------------
  314|  71.1k|          GAIN_CODING_PROFILE_CONSTANT) {
  ------------------
  |  |   78|  71.1k|#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|  71.1k|      } else {
  323|  71.1k|        err = impd_parse_drc_gain_sequence(
  324|  71.1k|            it_bit_buff, pstr_drc_uni_bs_dec, gain_set_params,
  325|  71.1k|            &(pstr_uni_drc_gain->drc_gain_sequence[seq]));
  326|  71.1k|        if (err) return (err);
  ------------------
  |  Branch (326:13): [True: 6.85k, False: 64.3k]
  ------------------
  327|  71.1k|      }
  328|  71.1k|    }
  329|  19.8k|  }
  330|       |
  331|  13.0k|  if (it_bit_buff->ptr_bit_buf_base == NULL) {
  ------------------
  |  Branch (331:7): [True: 0, False: 13.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|  13.0k|  } else {
  341|  13.0k|    pstr_uni_drc_gain->uni_drc_gain_ext_flag =
  342|  13.0k|        impd_read_bits_buf(it_bit_buff, 1);
  343|  13.0k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (343:9): [True: 256, False: 12.7k]
  ------------------
  344|  12.7k|    if (pstr_uni_drc_gain->uni_drc_gain_ext_flag == 1) {
  ------------------
  |  Branch (344:9): [True: 7.48k, False: 5.28k]
  ------------------
  345|  7.48k|      err = impd_parse_uni_drc_gain_ext(it_bit_buff,
  346|  7.48k|                                        &(pstr_uni_drc_gain->uni_drc_gain_ext));
  347|  7.48k|      if (err) return (err);
  ------------------
  |  Branch (347:11): [True: 5.39k, False: 2.08k]
  ------------------
  348|  7.48k|    }
  349|  7.37k|    pkt_loss_frame_cnt = 0;
  350|  7.37k|    drc_config->apply_drc = 1;
  351|  7.37k|  }
  352|       |
  353|  7.37k|  return (0);
  354|  13.0k|}
impd_parse_uni_drc_gain_ext:
  358|  7.48k|    ia_uni_drc_gain_ext_struct* uni_drc_gain_ext) {
  359|  7.48k|  WORD32 k;
  360|  7.48k|  WORD32 bit_size_len, ext_size_bits, bit_size;
  361|       |
  362|  7.48k|  k = 0;
  363|  7.48k|  uni_drc_gain_ext->uni_drc_gain_ext_type[k] =
  364|  7.48k|      impd_read_bits_buf(it_bit_buff, 4);
  365|  7.48k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (365:7): [True: 72, False: 7.41k]
  ------------------
  366|  24.6k|  while (uni_drc_gain_ext->uni_drc_gain_ext_type[k] != UNIDRCGAINEXT_TERM) {
  ------------------
  |  |  171|  24.6k|#define UNIDRCGAINEXT_TERM 0x0
  ------------------
  |  Branch (366:10): [True: 22.5k, False: 2.08k]
  ------------------
  367|  22.5k|    if (k >= (EXT_COUNT_MAX - 1)) return UNEXPECTED_ERROR;
  ------------------
  |  |  170|  22.5k|#define EXT_COUNT_MAX 8
  ------------------
                  if (k >= (EXT_COUNT_MAX - 1)) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|    274|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (367:9): [True: 274, False: 22.2k]
  ------------------
  368|  22.2k|    bit_size_len = impd_read_bits_buf(it_bit_buff, 3);
  369|  22.2k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (369:9): [True: 902, False: 21.3k]
  ------------------
  370|  21.3k|    ext_size_bits = bit_size_len + 4;
  371|       |
  372|  21.3k|    bit_size = impd_read_bits_buf(it_bit_buff, ext_size_bits);
  373|  21.3k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (373:9): [True: 771, False: 20.5k]
  ------------------
  374|  20.5k|    uni_drc_gain_ext->ext_bit_size[k] = bit_size + 1;
  375|       |
  376|  20.5k|        impd_skip_bits_buf(it_bit_buff, uni_drc_gain_ext->ext_bit_size[k]);
  377|  20.5k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (377:9): [True: 1.43k, False: 19.1k]
  ------------------
  378|  19.1k|    k++;
  379|  19.1k|    uni_drc_gain_ext->uni_drc_gain_ext_type[k] =
  380|  19.1k|        impd_read_bits_buf(it_bit_buff, 4);
  381|  19.1k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (381:9): [True: 1.93k, False: 17.2k]
  ------------------
  382|  19.1k|  }
  383|       |
  384|  2.08k|  return (0);
  385|  7.41k|}
impd_parse_spline_nodes:
  390|  71.1k|                               ia_spline_nodes_struct* str_spline_nodes) {
  391|  71.1k|  WORD32 err = 0;
  392|  71.1k|  WORD32 time_offset;
  393|  71.1k|  if (gain_set_params->time_alignment == 0) {
  ------------------
  |  Branch (393:7): [True: 71.1k, False: 0]
  ------------------
  394|  71.1k|    time_offset = -1;
  395|  71.1k|  } 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|  71.1k|  if (it_bit_buff->ptr_bit_buf_base == NULL) {
  ------------------
  |  Branch (407:7): [True: 0, False: 71.1k]
  ------------------
  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|  71.1k|  } else {
  428|  71.1k|    str_spline_nodes->drc_gain_coding_mode = impd_read_bits_buf(it_bit_buff, 1);
  429|  71.1k|    if (it_bit_buff->error == PROC_COMPLETE) {
  ------------------
  |  |  127|  71.1k|#define PROC_COMPLETE 1
  ------------------
  |  Branch (429:9): [True: 976, False: 70.2k]
  ------------------
  430|    976|      if ((str_spline_nodes->num_nodes < 1) ||
  ------------------
  |  Branch (430:11): [True: 749, False: 227]
  ------------------
  431|    227|          (str_spline_nodes->num_nodes > NODE_COUNT_MAX))
  ------------------
  |  |   47|    227|#define NODE_COUNT_MAX DRC_CODEC_FRAME_SIZE_MAX
  |  |  ------------------
  |  |  |  |   46|    227|#define DRC_CODEC_FRAME_SIZE_MAX (AUDIO_CODEC_FRAME_SIZE_MAX / 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|    227|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (431:11): [True: 0, False: 227]
  ------------------
  432|    749|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|    749|#define UNEXPECTED_ERROR 2
  ------------------
  433|    227|      str_spline_nodes->drc_gain_coding_mode = 0;
  434|    227|      str_spline_nodes->str_node[0].slope = 0.0;
  435|    227|      str_spline_nodes->str_node[0].time =
  436|    227|          (pstr_drc_uni_bs_dec->ia_drc_params_struct).drc_frame_size +
  437|    227|          time_offset;
  438|    227|      str_spline_nodes->str_node[0].loc_db_gain =
  439|    227|          str_spline_nodes->str_node[str_spline_nodes->num_nodes - 1]
  440|    227|              .loc_db_gain;
  441|    227|      str_spline_nodes->num_nodes = 1;
  442|  70.2k|    } else {
  443|  70.2k|      if (it_bit_buff->error) return (it_bit_buff->error);
  ------------------
  |  Branch (443:11): [True: 0, False: 70.2k]
  ------------------
  444|  70.2k|    }
  445|  70.4k|    if (str_spline_nodes->drc_gain_coding_mode == 0) {
  ------------------
  |  Branch (445:9): [True: 44.4k, False: 25.9k]
  ------------------
  446|  44.4k|      str_spline_nodes->num_nodes = 1;
  447|       |
  448|  44.4k|      err = impd_dec_initial_gain(it_bit_buff,
  449|  44.4k|                                  gain_set_params->gain_coding_profile,
  450|  44.4k|                                  &(str_spline_nodes->str_node[0].loc_db_gain));
  451|  44.4k|      if (err) return (err);
  ------------------
  |  Branch (451:11): [True: 1.76k, False: 42.6k]
  ------------------
  452|       |
  453|  42.6k|      str_spline_nodes->str_node[0].slope = 0.0;
  454|  42.6k|      str_spline_nodes->str_node[0].time =
  455|  42.6k|          (pstr_drc_uni_bs_dec->ia_drc_params_struct).drc_frame_size +
  456|  42.6k|          time_offset;
  457|  42.6k|    } else {
  458|  25.9k|      err = impd_dec_slopes(it_bit_buff, &str_spline_nodes->num_nodes,
  459|  25.9k|                            gain_set_params->gain_interpolation_type,
  460|  25.9k|                            str_spline_nodes->str_node);
  461|  25.9k|      if (err) return (err);
  ------------------
  |  Branch (461:11): [True: 404, False: 25.5k]
  ------------------
  462|  25.5k|      if (gain_set_params->time_delt_min_flag) {
  ------------------
  |  Branch (462:11): [True: 0, False: 25.5k]
  ------------------
  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|  25.5k|      } else {
  475|  25.5k|        err = impd_dec_times(
  476|  25.5k|            it_bit_buff, &pstr_drc_uni_bs_dec->tables_default,
  477|  25.5k|            str_spline_nodes->num_nodes,
  478|  25.5k|            (pstr_drc_uni_bs_dec->ia_drc_params_struct).delta_tmin_default,
  479|  25.5k|            (pstr_drc_uni_bs_dec->ia_drc_params_struct).drc_frame_size,
  480|  25.5k|            gain_set_params->full_frame, time_offset,
  481|  25.5k|            str_spline_nodes->str_node);
  482|  25.5k|        if (err) return (err);
  ------------------
  |  Branch (482:13): [True: 3.38k, False: 22.1k]
  ------------------
  483|  22.1k|        err = impd_dec_gains(it_bit_buff, str_spline_nodes->num_nodes,
  484|  22.1k|                             gain_set_params->gain_coding_profile,
  485|  22.1k|                             str_spline_nodes->str_node);
  486|  22.1k|        if (err) return (err);
  ------------------
  |  Branch (486:13): [True: 550, False: 21.6k]
  ------------------
  487|  22.1k|      }
  488|  25.5k|    }
  489|  70.4k|  }
  490|  64.3k|  return (0);
  491|  71.1k|}
impd_parse_drc_gain_sequence:
  496|  71.1k|    ia_drc_gain_sequence_struct* drc_gain_sequence) {
  497|  71.1k|  WORD32 err = 0, i;
  498|  71.1k|  WORD32 prev_frame_time_buf[NODE_COUNT_MAX],
  499|  71.1k|      cur_frame_time_buf[NODE_COUNT_MAX];
  500|  71.1k|  WORD32 num_nodes_node_reservoir, num_nodes_cur, k, m;
  501|       |
  502|  71.1k|  if (((pstr_drc_uni_bs_dec->ia_drc_params_struct).delay_mode ==
  ------------------
  |  Branch (502:7): [True: 0, False: 71.1k]
  ------------------
  503|  71.1k|       DELAY_MODE_LOW_DELAY) &&
  ------------------
  |  |  117|  71.1k|#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|  71.1k|  i = 0;
  508|  71.1k|  {
  509|  71.1k|    err = impd_parse_spline_nodes(it_bit_buff, pstr_drc_uni_bs_dec,
  510|  71.1k|                                  gain_set_params,
  511|  71.1k|                                  &(drc_gain_sequence->str_spline_nodes[i]));
  512|  71.1k|    if (err) return (err);
  ------------------
  |  Branch (512:9): [True: 6.85k, False: 64.3k]
  ------------------
  513|       |
  514|  64.3k|    num_nodes_node_reservoir = 0;
  515|  64.3k|    num_nodes_cur = 0;
  516|   148k|    for (k = 0; k < drc_gain_sequence->str_spline_nodes[i].num_nodes; k++) {
  ------------------
  |  Branch (516:17): [True: 84.3k, False: 64.3k]
  ------------------
  517|  84.3k|      if (drc_gain_sequence->str_spline_nodes[i].str_node[k].time >=
  ------------------
  |  Branch (517:11): [True: 7.87k, False: 76.4k]
  ------------------
  518|  84.3k|          pstr_drc_uni_bs_dec->ia_drc_params_struct.drc_frame_size) {
  519|  7.87k|        prev_frame_time_buf[num_nodes_node_reservoir] =
  520|  7.87k|            drc_gain_sequence->str_spline_nodes[i].str_node[k].time;
  521|  7.87k|        num_nodes_node_reservoir++;
  522|  76.4k|      } else {
  523|  76.4k|        cur_frame_time_buf[num_nodes_cur] =
  524|  76.4k|            drc_gain_sequence->str_spline_nodes[i].str_node[k].time;
  525|  76.4k|        num_nodes_cur++;
  526|  76.4k|      }
  527|  84.3k|    }
  528|  72.2k|    for (k = 0; k < num_nodes_node_reservoir; k++) {
  ------------------
  |  Branch (528:17): [True: 7.87k, False: 64.3k]
  ------------------
  529|  7.87k|      WORD32 tmp = prev_frame_time_buf[k] -
  530|  7.87k|                   2 * pstr_drc_uni_bs_dec->ia_drc_params_struct.drc_frame_size;
  531|  7.87k|      if (tmp >= (2 * AUDIO_CODEC_FRAME_SIZE_MAX -
  ------------------
  |  |   45|  7.87k|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  ------------------
  |  Branch (531:11): [True: 0, False: 7.87k]
  ------------------
  532|  7.87k|                  pstr_drc_uni_bs_dec->ia_drc_params_struct.drc_frame_size))
  533|      0|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  534|  7.87k|      drc_gain_sequence->str_spline_nodes[i].str_node[k].time = tmp;
  535|  7.87k|    }
  536|   140k|    for (m = 0; m < num_nodes_cur; m++, k++) {
  ------------------
  |  Branch (536:17): [True: 76.4k, False: 64.3k]
  ------------------
  537|  76.4k|      drc_gain_sequence->str_spline_nodes[i].str_node[k].time =
  538|  76.4k|          cur_frame_time_buf[m];
  539|  76.4k|    }
  540|  64.3k|  }
  541|      0|  return (0);
  542|  64.3k|}
impd_parse_drc_ext_v1:
  546|    482|                             ia_drc_config_ext* str_drc_config_ext) {
  547|    482|  WORD32 dwnmix_instructions_v1_flag;
  548|    482|  WORD32 dwnmix_instructions_v1_count;
  549|    482|  WORD32 drc_coeffs_and_instructions_uni_drc_v1_flag;
  550|    482|  WORD32 drc_coefficients_uni_drc_v1_count;
  551|    482|  WORD32 drc_instructions_uni_drc_v1_count;
  552|       |
  553|    482|  WORD32 i = 0, err = 0;
  554|    482|  const WORD32 version = 1;
  555|       |
  556|    482|  dwnmix_instructions_v1_flag = impd_read_bits_buf(it_bit_buff, 1);
  557|    482|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (557:7): [True: 2, False: 480]
  ------------------
  558|    480|  if (dwnmix_instructions_v1_flag == 1) {
  ------------------
  |  Branch (558:7): [True: 75, False: 405]
  ------------------
  559|     75|    dwnmix_instructions_v1_count = impd_read_bits_buf(it_bit_buff, 7);
  560|     75|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (560:9): [True: 1, False: 74]
  ------------------
  561|     74|    if ((dwnmix_instructions_v1_count + drc_config->dwnmix_instructions_count) >
  ------------------
  |  Branch (561:9): [True: 1, False: 73]
  ------------------
  562|     74|        DOWNMIX_INSTRUCTION_COUNT_MAX)
  ------------------
  |  |   41|     74|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  ------------------
  563|      1|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
  564|    173|    for (i = 0; i < dwnmix_instructions_v1_count; i++) {
  ------------------
  |  Branch (564:17): [True: 111, False: 62]
  ------------------
  565|    111|      err = impd_parse_dwnmix_instructions(
  566|    111|          it_bit_buff, version, ia_drc_params_struct,
  567|    111|          &drc_config->channel_layout,
  568|    111|          &drc_config
  569|    111|               ->dwnmix_instructions[i +
  570|    111|                                     drc_config->dwnmix_instructions_count]);
  571|    111|      if (err) return (err);
  ------------------
  |  Branch (571:11): [True: 11, False: 100]
  ------------------
  572|    111|    }
  573|     62|    drc_config->dwnmix_instructions_count += dwnmix_instructions_v1_count;
  574|     62|  }
  575|       |
  576|    467|  drc_coeffs_and_instructions_uni_drc_v1_flag =
  577|    467|      impd_read_bits_buf(it_bit_buff, 1);
  578|    467|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (578:7): [True: 3, False: 464]
  ------------------
  579|    464|  if (drc_coeffs_and_instructions_uni_drc_v1_flag == 1) {
  ------------------
  |  Branch (579:7): [True: 207, False: 257]
  ------------------
  580|    207|    drc_coefficients_uni_drc_v1_count = impd_read_bits_buf(it_bit_buff, 3);
  581|    207|    if ((drc_coefficients_uni_drc_v1_count +
  ------------------
  |  Branch (581:9): [True: 1, False: 206]
  ------------------
  582|    207|         drc_config->drc_coefficients_drc_count) > DRC_COEFF_COUNT_MAX) {
  ------------------
  |  |   42|    207|#define DRC_COEFF_COUNT_MAX 8
  ------------------
  583|      1|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
  584|      1|    }
  585|    206|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (585:9): [True: 1, False: 205]
  ------------------
  586|    573|    for (i = 0; i < drc_coefficients_uni_drc_v1_count; i++) {
  ------------------
  |  Branch (586:17): [True: 460, False: 113]
  ------------------
  587|    460|      err = impd_drc_parse_coeff(
  588|    460|          it_bit_buff, version, ia_drc_params_struct,
  589|    460|          &drc_config->str_p_loc_drc_coefficients_uni_drc
  590|    460|               [i + drc_config->drc_coefficients_drc_count]);
  591|    460|      if (err) return (err);
  ------------------
  |  Branch (591:11): [True: 92, False: 368]
  ------------------
  592|    460|    }
  593|    113|    drc_config->drc_coefficients_drc_count += drc_coefficients_uni_drc_v1_count;
  594|       |
  595|    113|    drc_instructions_uni_drc_v1_count = impd_read_bits_buf(it_bit_buff, 6);
  596|    113|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (596:9): [True: 1, False: 112]
  ------------------
  597|    112|    if (drc_config->drc_instructions_uni_drc_count +
  ------------------
  |  Branch (597:9): [True: 1, False: 111]
  ------------------
  598|    112|            drc_instructions_uni_drc_v1_count >
  599|    112|        DRC_INSTRUCTIONS_COUNT_MAX)
  ------------------
  |  |   43|    112|#define DRC_INSTRUCTIONS_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|    112|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
  600|      1|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
  601|       |
  602|    307|    for (i = 0; i < drc_instructions_uni_drc_v1_count; i++) {
  ------------------
  |  Branch (602:17): [True: 249, False: 58]
  ------------------
  603|    249|      err = impd_parse_drc_instructions_uni_drc(
  604|    249|          it_bit_buff, version, drc_config,
  605|    249|          &drc_config->str_drc_instruction_str
  606|    249|               [i + drc_config->drc_instructions_uni_drc_count]);
  607|    249|      if (err) return (err);
  ------------------
  |  Branch (607:11): [True: 53, False: 196]
  ------------------
  608|    249|    }
  609|     58|    drc_config->drc_instructions_uni_drc_count +=
  610|     58|        drc_instructions_uni_drc_v1_count;
  611|     58|  }
  612|       |
  613|    315|  str_drc_config_ext->loud_eq_instructions_flag =
  614|    315|      impd_read_bits_buf(it_bit_buff, 1);
  615|    315|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (615:7): [True: 1, False: 314]
  ------------------
  616|    314|  if (str_drc_config_ext->loud_eq_instructions_flag == 1) {
  ------------------
  |  Branch (616:7): [True: 67, False: 247]
  ------------------
  617|     67|    str_drc_config_ext->loud_eq_instructions_count =
  618|     67|        impd_read_bits_buf(it_bit_buff, 4);
  619|       |
  620|     67|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (620:9): [True: 1, False: 66]
  ------------------
  621|     66|    if (str_drc_config_ext->loud_eq_instructions_count >
  ------------------
  |  Branch (621:9): [True: 1, False: 65]
  ------------------
  622|     66|        LOUD_EQ_INSTRUCTIONS_COUNT_MAX)
  ------------------
  |  |  111|     66|#define LOUD_EQ_INSTRUCTIONS_COUNT_MAX 8
  ------------------
  623|      1|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
  624|    205|    for (i = 0; i < str_drc_config_ext->loud_eq_instructions_count; i++) {
  ------------------
  |  Branch (624:17): [True: 179, False: 26]
  ------------------
  625|    179|      err = impd_parse_loud_eq_instructions(
  626|    179|          it_bit_buff, &str_drc_config_ext->loud_eq_instructions[i]);
  627|    179|      if (err) return (err);
  ------------------
  |  Branch (627:11): [True: 39, False: 140]
  ------------------
  628|    179|    }
  629|    247|  } else {
  630|    247|    str_drc_config_ext->loud_eq_instructions_count = 0;
  631|    247|  }
  632|       |
  633|    273|  str_drc_config_ext->eq_flag = impd_read_bits_buf(it_bit_buff, 1);
  634|    273|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (634:7): [True: 2, False: 271]
  ------------------
  635|    271|  if (str_drc_config_ext->eq_flag == 1) {
  ------------------
  |  Branch (635:7): [True: 164, False: 107]
  ------------------
  636|    164|    err = impd_parse_eq_coefficients(it_bit_buff,
  637|    164|                                     &str_drc_config_ext->str_eq_coeff);
  638|    164|    if (err) return (err);
  ------------------
  |  Branch (638:9): [True: 91, 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|    107|    for (i = 0; i < str_drc_config_ext->eq_instructions_count; i++) {
  ------------------
  |  Branch (644:17): [True: 91, False: 16]
  ------------------
  645|     91|      err = impd_parse_eq_instructions(
  646|     91|          it_bit_buff, drc_config, &str_drc_config_ext->str_eq_instructions[i]);
  647|     91|      if (err) return (err);
  ------------------
  |  Branch (647:11): [True: 54, False: 37]
  ------------------
  648|     91|    }
  649|     70|  }
  650|    123|  return 0;
  651|    271|}
impd_leveling_instructions:
  655|     60|                                         ia_drc_config* pstr_drc_config) {
  656|     60|  WORD32 i;
  657|     60|  IA_ERROR_CODE err = IA_NO_ERROR;
  ------------------
  |  |   24|     60|#define IA_ERROR_CODE WORD32
  ------------------
                IA_ERROR_CODE err = IA_NO_ERROR;
  ------------------
  |  |   25|     60|#define IA_NO_ERROR 0x00000000
  ------------------
  658|     60|  WORD32 drc_instruction_uni_drc_count = pstr_drc_config->drc_instructions_uni_drc_count;
  659|       |
  660|    298|  for (i = 0; i < drc_instruction_uni_drc_count; ++i) {
  ------------------
  |  Branch (660:15): [True: 239, False: 59]
  ------------------
  661|    239|    if ((pstr_drc_config->str_drc_instruction_str[i].drc_set_effect & (1 << 11)) != 0) {
  ------------------
  |  Branch (661:9): [True: 14, False: 225]
  ------------------
  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|    239|  }
  685|     59|  return err;
  686|     60|}
impd_parse_filt_block:
  691|    158|                             WORD32 block_count) {
  692|       |  //    WORD32 err = 0;
  693|    158|  WORD32 k, j, temp;
  694|    158|  ia_filt_ele_struct* str_filter_element;
  695|       |
  696|    305|  for (j = 0; j < block_count; j++) {
  ------------------
  |  Branch (696:15): [True: 160, False: 145]
  ------------------
  697|    160|    str_filter_block->filter_element_count = impd_read_bits_buf(it_bit_buff, 6);
  698|    160|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (698:9): [True: 2, False: 158]
  ------------------
  699|    158|    if (str_filter_block->filter_element_count > FILTER_ELEMENT_COUNT_MAX)
  ------------------
  |  |  107|    158|#define FILTER_ELEMENT_COUNT_MAX 16
  ------------------
  |  Branch (699:9): [True: 2, False: 156]
  ------------------
  700|      2|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      2|#define UNEXPECTED_ERROR 2
  ------------------
  701|    156|    str_filter_element = &str_filter_block->str_filter_element[0];
  702|    271|    for (k = 0; k < str_filter_block->filter_element_count; k++) {
  ------------------
  |  Branch (702:17): [True: 124, False: 147]
  ------------------
  703|    124|      temp = impd_read_bits_buf(it_bit_buff, 7);
  704|    124|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (704:11): [True: 3, False: 121]
  ------------------
  705|       |
  706|    121|      str_filter_element->filt_ele_idx = (temp & 0x7E) >> 1;
  707|    121|      if (str_filter_element->filt_ele_idx >= FILTER_ELEMENT_COUNT_MAX)
  ------------------
  |  |  107|    121|#define FILTER_ELEMENT_COUNT_MAX 16
  ------------------
  |  Branch (707:11): [True: 5, False: 116]
  ------------------
  708|      5|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      5|#define UNEXPECTED_ERROR 2
  ------------------
  709|    116|      str_filter_element->filt_ele_gain_flag = temp & 1;
  710|    116|      ;
  711|       |
  712|    116|      if (str_filter_element->filt_ele_gain_flag) {
  ------------------
  |  Branch (712:11): [True: 22, False: 94]
  ------------------
  713|     22|        WORD32 bs_filter_element_gain;
  714|     22|        bs_filter_element_gain = impd_read_bits_buf(it_bit_buff, 10);
  715|     22|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (715:13): [True: 1, False: 21]
  ------------------
  716|     21|        str_filter_element->filt_ele_gain =
  717|     21|            bs_filter_element_gain * 0.125f - 96.0f;
  718|     21|      }
  719|       |
  720|    115|      str_filter_element++;
  721|    115|    }
  722|    147|    str_filter_block++;
  723|    147|  }
  724|    145|  return (0);
  725|    158|}
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|    314|  for (j = 0; j < td_filter_element_count; j++) {
  ------------------
  |  Branch (734:15): [True: 203, False: 111]
  ------------------
  735|    203|    unique_td_filt_ele->eq_filter_format = impd_read_bits_buf(it_bit_buff, 1);
  736|    203|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (736:9): [True: 1, False: 202]
  ------------------
  737|       |
  738|    202|    if (unique_td_filt_ele->eq_filter_format == 0) {
  ------------------
  |  Branch (738:9): [True: 169, False: 33]
  ------------------
  739|    169|      WORD32 bs_real_zero_radius, bs_generic_zero_radius, bs_generic_zero_angle;
  740|    169|      WORD32 bs_real_pole_radius, bs_cmplx_pole_radius, bs_cmplx_pole_angle;
  741|    169|      WORD32 bs_real_zero_radius_one_count;
  742|       |
  743|    169|      temp = impd_read_bits_buf(it_bit_buff, 23);
  744|    169|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (744:11): [True: 2, False: 167]
  ------------------
  745|       |
  746|    167|      bs_real_zero_radius_one_count = (temp >> 20) & 7;
  747|       |
  748|    167|      unique_td_filt_ele->bs_real_zero_radius_one_count =
  749|    167|          2 * bs_real_zero_radius_one_count;
  750|    167|      unique_td_filt_ele->real_zero_count = (temp & 0xFC000) >> 14;
  751|       |
  752|    167|      unique_td_filt_ele->generic_zero_count = (temp & 0x3F00) >> 8;
  753|       |
  754|    167|      unique_td_filt_ele->real_pole_count = (temp & 0xF0) >> 4;
  755|       |
  756|    167|      unique_td_filt_ele->cmplx_pole_count = temp & 0xF;
  757|       |
  758|    167|      temp = impd_read_bits_buf(
  759|    167|          it_bit_buff, unique_td_filt_ele->bs_real_zero_radius_one_count);
  760|    167|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (760:11): [True: 4, False: 163]
  ------------------
  761|       |
  762|    379|      for (m = unique_td_filt_ele->bs_real_zero_radius_one_count - 1; m >= 0;
  ------------------
  |  Branch (762:71): [True: 216, False: 163]
  ------------------
  763|    216|           m--) {
  764|    216|        unique_td_filt_ele->zero_sign[m] = (temp & 1);
  765|    216|        temp = temp >> 1;
  766|    216|      }
  767|       |
  768|    525|      for (m = 0; m < unique_td_filt_ele->real_zero_count; m++) {
  ------------------
  |  Branch (768:19): [True: 366, False: 159]
  ------------------
  769|    366|        temp = impd_read_bits_buf(it_bit_buff, 8);
  770|    366|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (770:13): [True: 4, False: 362]
  ------------------
  771|       |
  772|    362|        bs_real_zero_radius = (temp & 0xFE) >> 1;
  773|       |
  774|    362|        sign = temp & 0x01;
  775|       |
  776|    362|        tmp = 1.0f - zero_pole_radius_tbl[bs_real_zero_radius];
  777|       |
  778|    362|        sign = sign << 1;
  779|       |
  780|    362|        unique_td_filt_ele->real_zero_radius[m] = (1 - sign) * tmp;
  781|    362|      }
  782|    394|      for (m = 0; m < unique_td_filt_ele->generic_zero_count; m++) {
  ------------------
  |  Branch (782:19): [True: 242, False: 152]
  ------------------
  783|    242|        temp = impd_read_bits_buf(it_bit_buff, 14);
  784|    242|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (784:13): [True: 7, False: 235]
  ------------------
  785|       |
  786|    235|        bs_generic_zero_radius = (temp & 0x3F80) >> 7;
  787|       |
  788|    235|        unique_td_filt_ele->generic_zero_radius[m] =
  789|    235|            1.0f - zero_pole_radius_tbl[bs_generic_zero_radius];
  790|       |
  791|    235|        bs_generic_zero_angle = (temp & 0x7F);
  792|       |
  793|    235|        unique_td_filt_ele->generic_zero_angle[m] =
  794|    235|            zero_pole_angle_tbl[bs_generic_zero_angle];
  795|    235|      }
  796|    482|      for (m = 0; m < unique_td_filt_ele->real_pole_count; m++) {
  ------------------
  |  Branch (796:19): [True: 333, False: 149]
  ------------------
  797|    333|        temp = impd_read_bits_buf(it_bit_buff, 8);
  798|    333|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (798:13): [True: 3, False: 330]
  ------------------
  799|       |
  800|    330|        bs_real_pole_radius = (temp & 0xFE) >> 1;
  801|       |
  802|    330|        sign = temp & 0x01;
  803|       |
  804|    330|        tmp = 1.0f - zero_pole_radius_tbl[bs_real_pole_radius];
  805|       |
  806|    330|        sign = sign << 1;
  807|       |
  808|    330|        unique_td_filt_ele->real_pole_radius[m] = (1 - sign) * tmp;
  809|    330|      }
  810|    339|      for (m = 0; m < unique_td_filt_ele->cmplx_pole_count; m++) {
  ------------------
  |  Branch (810:19): [True: 195, False: 144]
  ------------------
  811|    195|        temp = impd_read_bits_buf(it_bit_buff, 14);
  812|       |
  813|    195|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (813:13): [True: 5, False: 190]
  ------------------
  814|       |
  815|    190|        bs_cmplx_pole_radius = (temp & 0x3F80) >> 7;
  816|       |
  817|    190|        unique_td_filt_ele->complex_pole_radius[m] =
  818|    190|            1.0f - zero_pole_radius_tbl[bs_cmplx_pole_radius];
  819|       |
  820|    190|        bs_cmplx_pole_angle = (temp & 0x7F);
  821|       |
  822|    190|        unique_td_filt_ele->complex_pole_angle[m] =
  823|    190|            zero_pole_angle_tbl[bs_cmplx_pole_angle];
  824|    190|      }
  825|    149|    } 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|    192|      for (m = 0; m < unique_td_filt_ele->fir_filt_order / 2 + 1; m++) {
  ------------------
  |  Branch (833:19): [True: 164, False: 28]
  ------------------
  834|    164|        WORD32 sign, bs_fir_coeff;
  835|    164|        FLOAT32 tmp;
  836|       |
  837|    164|        temp = impd_read_bits_buf(it_bit_buff, 11);
  838|    164|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (838:13): [True: 4, False: 160]
  ------------------
  839|    160|        sign = (temp >> 10) & 0x01;
  840|       |
  841|    160|        bs_fir_coeff = temp & 0x03FF;
  842|       |
  843|    160|        tmp = (FLOAT32)pow(10.0f, -0.05f * bs_fir_coeff * 0.0625f);
  844|       |
  845|    160|        sign = sign << 1;
  846|       |
  847|    160|        unique_td_filt_ele->fir_coeff[m] = (1 - sign) * tmp;
  848|    160|      }
  849|     32|    }
  850|    172|    unique_td_filt_ele++;
  851|    172|  }
  852|    111|  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|     66|  for (k = 0; k < eq_subband_gains_count; k++) {
  ------------------
  |  Branch (962:15): [True: 59, False: 7]
  ------------------
  963|    183|    for (m = 0; m < eq_subband_gain_count; m++) {
  ------------------
  |  Branch (963:17): [True: 132, False: 51]
  ------------------
  964|    132|      WORD32 sign, bs_eq_subband_gain;
  965|    132|      temp = impd_read_bits_buf(it_bit_buff, 9);
  966|    132|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (966:11): [True: 8, False: 124]
  ------------------
  967|       |
  968|    124|      sign = (temp >> 8) & 1;
  969|    124|      bs_eq_subband_gain = temp & 0x7F;
  970|       |
  971|    124|      sign = sign << 1;
  972|    124|      str_eq_subband_gain_vector->eq_subband_gain[m] =
  973|    124|          ((1 - sign) * bs_eq_subband_gain) * 0.125f;
  974|    124|    }
  975|     51|    str_eq_subband_gain_vector++;
  976|     51|  }
  977|      7|  return (0);
  978|     15|}
impd_parse_eq_coefficients:
  981|    164|                                  ia_eq_coeff_struct* str_eq_coeff) {
  982|    164|  WORD32 err = 0;
  983|    164|  WORD32 eq_gain_cnt, mu, nu, temp;
  984|    164|  static const WORD32 subband_gain_len_tbl[7] = {0, 32, 39, 64, 71, 128, 135};
  985|       |
  986|    164|  str_eq_coeff->eq_delay_max_present = impd_read_bits_buf(it_bit_buff, 1);
  987|    164|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (987:7): [True: 2, False: 162]
  ------------------
  988|       |
  989|    162|  if (str_eq_coeff->eq_delay_max_present) {
  ------------------
  |  Branch (989:7): [True: 141, False: 21]
  ------------------
  990|    141|    mu = impd_read_bits_buf(it_bit_buff, 5);
  991|    141|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (991:9): [True: 1, False: 140]
  ------------------
  992|    140|    nu = impd_read_bits_buf(it_bit_buff, 3);
  993|    140|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (993:9): [True: 1, False: 139]
  ------------------
  994|    139|    str_eq_coeff->eq_delay_max = 16 * mu * (1 << nu);
  995|    139|  }
  996|       |
  997|    160|  str_eq_coeff->unique_filter_block_count = impd_read_bits_buf(it_bit_buff, 6);
  998|    160|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (998:7): [True: 1, False: 159]
  ------------------
  999|       |
 1000|    159|  if (str_eq_coeff->unique_filter_block_count > FILTER_BLOCK_COUNT_MAX) {
  ------------------
  |  |  106|    159|#define FILTER_BLOCK_COUNT_MAX 16
  ------------------
  |  Branch (1000:7): [True: 1, False: 158]
  ------------------
 1001|      1|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1002|      1|  }
 1003|       |
 1004|    158|  err = impd_parse_filt_block(it_bit_buff, &(str_eq_coeff->str_filter_block[0]),
 1005|    158|                              str_eq_coeff->unique_filter_block_count);
 1006|    158|  if (err) return (err);
  ------------------
  |  Branch (1006:7): [True: 13, 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: 31, False: 111]
  ------------------
 1018|       |
 1019|    111|  str_eq_coeff->unique_eq_subband_gains_count =
 1020|    111|      impd_read_bits_buf(it_bit_buff, 6);
 1021|    111|  if (str_eq_coeff->unique_eq_subband_gains_count >
  ------------------
  |  Branch (1021:7): [True: 2, False: 109]
  ------------------
 1022|    111|      UNIQUE_SUBBAND_GAIN_COUNT_MAX)
  ------------------
  |  |  105|    111|#define UNIQUE_SUBBAND_GAIN_COUNT_MAX 16
  ------------------
 1023|      2|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      2|#define UNEXPECTED_ERROR 2
  ------------------
 1024|    109|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1024:7): [True: 1, False: 108]
  ------------------
 1025|       |
 1026|    108|  if (str_eq_coeff->unique_eq_subband_gains_count > 0) {
  ------------------
  |  Branch (1026:7): [True: 44, False: 64]
  ------------------
 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: 36, False: 7]
  ------------------
 1033|     36|        (str_eq_coeff->eq_subband_gain_format < GAINFORMAT_UNIFORM)) {
  ------------------
  |  |  141|     36|#define GAINFORMAT_UNIFORM 0x7
  ------------------
  |  Branch (1033:9): [True: 19, False: 17]
  ------------------
 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: 8, False: 7]
  ------------------
 1060|     15|    }
 1061|     41|  }
 1062|       |
 1063|     73|  return (0);
 1064|    108|}
impd_parser_td_filter_cascade:
 1069|     26|    ia_td_filter_cascade_struct* str_td_filter_cascade) {
 1070|       |  // WORD32 err=0,
 1071|     26|  WORD32 i, ii, k;
 1072|     26|  WORD32 eq_cascade_gain;
 1073|     26|  ia_filter_block_refs_struct* str_filter_block_refs =
 1074|     26|      &(str_td_filter_cascade->str_filter_block_refs[0]);
 1075|       |
 1076|     80|  for (i = 0; i < str_eq_instructions->eq_ch_group_count; i++) {
  ------------------
  |  Branch (1076:15): [True: 59, False: 21]
  ------------------
 1077|     59|    str_td_filter_cascade->eq_cascade_gain_present[i] =
 1078|     59|        impd_read_bits_buf(it_bit_buff, 1);
 1079|     59|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1079:9): [True: 1, False: 58]
  ------------------
 1080|     58|    if (str_td_filter_cascade->eq_cascade_gain_present[i]) {
  ------------------
  |  Branch (1080:9): [True: 37, False: 21]
  ------------------
 1081|     37|      eq_cascade_gain = impd_read_bits_buf(it_bit_buff, 10);
 1082|     37|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1082:11): [True: 1, False: 36]
  ------------------
 1083|     36|      str_td_filter_cascade->eq_cascade_gain[i] =
 1084|     36|          0.125f * eq_cascade_gain - 96.0f;
 1085|     36|    } else {
 1086|     21|      str_td_filter_cascade->eq_cascade_gain[i] = 0.0f;
 1087|     21|    }
 1088|       |
 1089|     57|    str_filter_block_refs->filter_block_count =
 1090|     57|        impd_read_bits_buf(it_bit_buff, 4);
 1091|     57|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1091:9): [True: 0, False: 57]
  ------------------
 1092|     57|    if (str_filter_block_refs->filter_block_count > EQ_FILTER_BLOCK_COUNT_MAX) {
  ------------------
  |  |  110|     57|#define EQ_FILTER_BLOCK_COUNT_MAX 4
  ------------------
  |  Branch (1092:9): [True: 1, False: 56]
  ------------------
 1093|      1|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1094|      1|    }
 1095|       |
 1096|    124|    for (ii = 0; ii < str_filter_block_refs->filter_block_count; ii++) {
  ------------------
  |  Branch (1096:18): [True: 70, False: 54]
  ------------------
 1097|     70|      str_filter_block_refs->filter_block_index[ii] =
 1098|     70|          impd_read_bits_buf(it_bit_buff, 7);
 1099|     70|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1099:11): [True: 1, False: 69]
  ------------------
 1100|     69|      if (str_filter_block_refs->filter_block_index[ii] >=
  ------------------
  |  Branch (1100:11): [True: 1, False: 68]
  ------------------
 1101|     69|          FILTER_BLOCK_COUNT_MAX)
  ------------------
  |  |  106|     69|#define FILTER_BLOCK_COUNT_MAX 16
  ------------------
 1102|      1|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1103|     69|    }
 1104|     54|    str_filter_block_refs++;
 1105|     54|  }
 1106|       |
 1107|     21|  str_td_filter_cascade->eq_phase_alignment_present =
 1108|     21|      impd_read_bits_buf(it_bit_buff, 1);
 1109|     21|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1109:7): [True: 2, False: 19]
  ------------------
 1110|       |
 1111|     19|  if (str_td_filter_cascade->eq_phase_alignment_present) {
  ------------------
  |  Branch (1111:7): [True: 4, False: 15]
  ------------------
 1112|     13|    for (i = 0; i < str_eq_instructions->eq_ch_group_count; i++) {
  ------------------
  |  Branch (1112:17): [True: 10, False: 3]
  ------------------
 1113|     21|      for (k = i + 1; k < str_eq_instructions->eq_ch_group_count; k++) {
  ------------------
  |  Branch (1113:23): [True: 12, False: 9]
  ------------------
 1114|     12|        str_td_filter_cascade->eq_phase_alignment[i][k] =
 1115|     12|            impd_read_bits_buf(it_bit_buff, 1);
 1116|     12|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1116:13): [True: 1, False: 11]
  ------------------
 1117|     12|      }
 1118|     10|    }
 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|     18|  return (0);
 1128|     19|}
impd_parse_eq_instructions:
 1132|     91|    ia_eq_instructions_struct* str_eq_instructions) {
 1133|     91|  WORD32 i, channel_count, temp;
 1134|     91|  WORD32 dmix_id_present, additional_dmix_id_present,
 1135|     91|      additional_dmix_id_cnt = 0;
 1136|     91|  WORD32 additional_drc_set_id_present, additional_drc_set_id_cnt;
 1137|       |
 1138|     91|  temp = impd_read_bits_buf(it_bit_buff, 11);
 1139|     91|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1139:7): [True: 1, False: 90]
  ------------------
 1140|       |
 1141|     90|  str_eq_instructions->eq_set_id = (temp >> 5) & 0x3F;
 1142|       |
 1143|     90|  if (str_eq_instructions->eq_set_id >= EQ_INSTRUCTIONS_COUNT_MAX)
  ------------------
  |  |  112|     90|#define EQ_INSTRUCTIONS_COUNT_MAX 8
  ------------------
  |  Branch (1143:7): [True: 3, False: 87]
  ------------------
 1144|      3|    return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      3|#define UNEXPECTED_ERROR 2
  ------------------
 1145|       |
 1146|     87|  str_eq_instructions->eq_set_complexity_level = (temp >> 1) & 0x0F;
 1147|       |
 1148|     87|  dmix_id_present = temp & 0x01;
 1149|       |
 1150|     87|  if (dmix_id_present) {
  ------------------
  |  Branch (1150:7): [True: 28, False: 59]
  ------------------
 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|     36|      for (i = 1; i < additional_dmix_id_cnt + 1; i++) {
  ------------------
  |  Branch (1167:19): [True: 29, False: 7]
  ------------------
 1168|     29|        str_eq_instructions->downmix_id[i] = impd_read_bits_buf(it_bit_buff, 7);
 1169|     29|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1169:13): [True: 2, False: 27]
  ------------------
 1170|     29|      }
 1171|      9|    }
 1172|     59|  } else {
 1173|     59|    str_eq_instructions->downmix_id[0] = 0;
 1174|     59|  }
 1175|       |
 1176|     83|  str_eq_instructions->dwnmix_id_count = 1 + additional_dmix_id_cnt;
 1177|       |
 1178|     83|  temp = impd_read_bits_buf(it_bit_buff, 7);
 1179|     83|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1179:7): [True: 3, False: 80]
  ------------------
 1180|       |
 1181|     80|  str_eq_instructions->drc_set_id[0] = (temp >> 1) & 0x3F;
 1182|       |
 1183|     80|  additional_drc_set_id_present = temp & 0x01;
 1184|       |
 1185|     80|  if (additional_drc_set_id_present) {
  ------------------
  |  Branch (1185:7): [True: 18, False: 62]
  ------------------
 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|     62|  } else {
 1196|     62|    additional_drc_set_id_cnt = 0;
 1197|     62|  }
 1198|     76|  str_eq_instructions->drc_set_id_count = 1 + additional_drc_set_id_cnt;
 1199|       |
 1200|     76|  temp = impd_read_bits_buf(it_bit_buff, 17);
 1201|     76|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1201:7): [True: 2, False: 74]
  ------------------
 1202|       |
 1203|     74|  str_eq_instructions->eq_set_purpose = (temp >> 1) & 0xFFFF;
 1204|       |
 1205|     74|  str_eq_instructions->depends_on_eq_set_present = temp & 0x01;
 1206|       |
 1207|     74|  if (str_eq_instructions->depends_on_eq_set_present) {
  ------------------
  |  Branch (1207:7): [True: 28, False: 46]
  ------------------
 1208|     28|    str_eq_instructions->depends_on_eq_set = impd_read_bits_buf(it_bit_buff, 6);
 1209|     28|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1209:9): [True: 1, False: 27]
  ------------------
 1210|     46|  } else {
 1211|     46|    str_eq_instructions->no_independent_eq_use =
 1212|     46|        impd_read_bits_buf(it_bit_buff, 1);
 1213|     46|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1213:9): [True: 6, False: 40]
  ------------------
 1214|     46|  }
 1215|       |
 1216|     67|  str_eq_instructions->eq_channel_count = channel_count =
 1217|     67|      drc_config->channel_layout.base_channel_count;
 1218|       |
 1219|     67|  if ((dmix_id_present == 1) &&
  ------------------
  |  Branch (1219:7): [True: 17, False: 50]
  ------------------
 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: 3, False: 1]
  ------------------
 1223|      3|      (str_eq_instructions->dwnmix_id_count == 1)) {
  ------------------
  |  Branch (1223:7): [True: 1, False: 2]
  ------------------
 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|     66|  } else if ((str_eq_instructions->downmix_id[0] == ID_FOR_ANY_DOWNMIX) ||
  ------------------
  |  |  136|     66|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1235:14): [True: 3, False: 63]
  ------------------
 1236|     63|             (str_eq_instructions->dwnmix_id_count > 1)) {
  ------------------
  |  Branch (1236:14): [True: 2, False: 61]
  ------------------
 1237|      5|    channel_count = 1;
 1238|      5|  }
 1239|       |
 1240|     66|  str_eq_instructions->eq_ch_group_count = 0;
 1241|       |
 1242|    320|  for (i = 0; i < channel_count; i++) {
  ------------------
  |  Branch (1242:15): [True: 265, False: 55]
  ------------------
 1243|    265|    WORD32 tmp = impd_read_bits_buf(it_bit_buff, 7);
 1244|    265|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1244:9): [True: 4, False: 261]
  ------------------
 1245|    261|    if (tmp >= EQ_CHANNEL_GROUP_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  109|    261|#define EQ_CHANNEL_GROUP_COUNT_MAX 4
  ------------------
                  if (tmp >= EQ_CHANNEL_GROUP_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      7|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (1245:9): [True: 7, False: 254]
  ------------------
 1246|    254|    str_eq_instructions->eq_ch_group_of_channel[i] = tmp;
 1247|    254|  }
 1248|     55|  {
 1249|     55|    WORD32 total;
 1250|     55|    WORD32 groups_used[EQ_CHANNEL_GROUP_COUNT_MAX] = {0};
 1251|    289|    for (i = 0; i < channel_count; i++)
  ------------------
  |  Branch (1251:17): [True: 234, False: 55]
  ------------------
 1252|    234|      groups_used[str_eq_instructions->eq_ch_group_of_channel[i]] = 1;
 1253|     55|    total = 0;
 1254|    275|    for (i = 0; i < EQ_CHANNEL_GROUP_COUNT_MAX; i++)
  ------------------
  |  |  109|    275|#define EQ_CHANNEL_GROUP_COUNT_MAX 4
  ------------------
  |  Branch (1254:17): [True: 220, False: 55]
  ------------------
 1255|    220|      if (groups_used[i]) total++;
  ------------------
  |  Branch (1255:11): [True: 102, False: 118]
  ------------------
 1256|     55|    str_eq_instructions->eq_ch_group_count = total;
 1257|     55|  }
 1258|       |
 1259|     55|  if (str_eq_instructions->eq_ch_group_count > EQ_CHANNEL_GROUP_COUNT_MAX)
  ------------------
  |  |  109|     55|#define EQ_CHANNEL_GROUP_COUNT_MAX 4
  ------------------
  |  Branch (1259:7): [True: 0, False: 55]
  ------------------
 1260|      0|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1261|       |
 1262|     55|  str_eq_instructions->td_filter_cascade_present =
 1263|     55|      impd_read_bits_buf(it_bit_buff, 1);
 1264|     55|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1264:7): [True: 3, False: 52]
  ------------------
 1265|       |
 1266|     52|  if (str_eq_instructions->td_filter_cascade_present) {
  ------------------
  |  Branch (1266:7): [True: 26, False: 26]
  ------------------
 1267|     26|    WORD32 err = impd_parser_td_filter_cascade(
 1268|     26|        it_bit_buff, str_eq_instructions,
 1269|     26|        &(str_eq_instructions->str_td_filter_cascade));
 1270|     26|    if (err) return err;
  ------------------
  |  Branch (1270:9): [True: 8, False: 18]
  ------------------
 1271|     26|  }
 1272|       |
 1273|     44|  str_eq_instructions->subband_gains_present =
 1274|     44|      impd_read_bits_buf(it_bit_buff, 1);
 1275|     44|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1275:7): [True: 1, False: 43]
  ------------------
 1276|       |
 1277|     43|  if (str_eq_instructions->subband_gains_present) {
  ------------------
  |  Branch (1277:7): [True: 6, False: 37]
  ------------------
 1278|     13|    for (i = 0; i < str_eq_instructions->eq_ch_group_count; i++) {
  ------------------
  |  Branch (1278:17): [True: 11, False: 2]
  ------------------
 1279|     11|      WORD32 tmp = impd_read_bits_buf(it_bit_buff, 6);
 1280|     11|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1280:11): [True: 1, False: 10]
  ------------------
 1281|     10|      if (tmp >= UNIQUE_SUBBAND_GAIN_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  105|     10|#define UNIQUE_SUBBAND_GAIN_COUNT_MAX 16
  ------------------
                    if (tmp >= UNIQUE_SUBBAND_GAIN_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      3|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (1281:11): [True: 3, False: 7]
  ------------------
 1282|      7|      str_eq_instructions->subband_gains_index[i] = tmp;
 1283|      7|    }
 1284|      6|  }
 1285|       |
 1286|     39|  str_eq_instructions->eq_transition_duration_present =
 1287|     39|      impd_read_bits_buf(it_bit_buff, 1);
 1288|     39|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1288:7): [True: 1, False: 38]
  ------------------
 1289|       |
 1290|     38|  if (str_eq_instructions->eq_transition_duration_present) {
  ------------------
  |  Branch (1290:7): [True: 5, False: 33]
  ------------------
 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|     37|  return (0);
 1300|     38|}
impd_parse_loud_eq_instructions:
 1304|    179|    ia_loud_eq_instructions_struct* loud_eq_instructions) {
 1305|    179|  WORD32 i, bs_loud_eq_scaling, bs_loud_eq_offset, temp;
 1306|    179|  WORD32 dmix_id_present, additional_dmix_id_present,
 1307|    179|      additional_dmix_id_cnt = 0;
 1308|    179|  WORD32 drc_set_id_present, additional_drc_set_id_present,
 1309|    179|      additional_drc_set_id_cnt = 0;
 1310|    179|  WORD32 eq_set_id_present, additional_eq_set_id_present,
 1311|    179|      additional_eq_set_id_cnt = 0;
 1312|       |
 1313|    179|  temp = impd_read_bits_buf(it_bit_buff, 9);
 1314|    179|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1314:7): [True: 3, False: 176]
  ------------------
 1315|    176|  loud_eq_instructions->loud_eq_set_id = (temp >> 5) & 0x0F;
 1316|       |
 1317|    176|  loud_eq_instructions->drc_location = (temp >> 1) & 0x0F;
 1318|       |
 1319|    176|  dmix_id_present = temp & 0x01;
 1320|       |
 1321|    176|  if (dmix_id_present) {
  ------------------
  |  Branch (1321:7): [True: 81, False: 95]
  ------------------
 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: 35, False: 45]
  ------------------
 1330|     35|      additional_dmix_id_cnt = impd_read_bits_buf(it_bit_buff, 7);
 1331|     35|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1331:11): [True: 1, False: 34]
  ------------------
 1332|     34|      if (additional_dmix_id_cnt >= DOWNMIX_ID_COUNT_MAX)
  ------------------
  |  |   51|     34|#define DOWNMIX_ID_COUNT_MAX 8
  ------------------
  |  Branch (1332:11): [True: 0, False: 34]
  ------------------
 1333|      0|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1334|     57|      for (i = 1; i < additional_dmix_id_cnt + 1; i++) {
  ------------------
  |  Branch (1334:19): [True: 25, False: 32]
  ------------------
 1335|     25|        loud_eq_instructions->downmix_id[i] =
 1336|     25|            impd_read_bits_buf(it_bit_buff, 7);
 1337|     25|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1337:13): [True: 2, False: 23]
  ------------------
 1338|     25|      }
 1339|     34|    }
 1340|     95|  } else {
 1341|     95|    loud_eq_instructions->downmix_id[0] = 0;
 1342|     95|  }
 1343|       |
 1344|    172|  loud_eq_instructions->dwnmix_id_count = 1 + additional_dmix_id_cnt;
 1345|       |
 1346|    172|  drc_set_id_present = impd_read_bits_buf(it_bit_buff, 1);
 1347|    172|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1347:7): [True: 1, False: 171]
  ------------------
 1348|       |
 1349|    171|  if (drc_set_id_present) {
  ------------------
  |  Branch (1349:7): [True: 78, False: 93]
  ------------------
 1350|     78|    temp = impd_read_bits_buf(it_bit_buff, 7);
 1351|     78|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1351:9): [True: 1, False: 77]
  ------------------
 1352|       |
 1353|     77|    loud_eq_instructions->drc_set_id[0] = (temp >> 1) & 0x3F;
 1354|       |
 1355|     77|    additional_drc_set_id_present = temp & 0x01;
 1356|       |
 1357|     77|    if (additional_drc_set_id_present) {
  ------------------
  |  Branch (1357:9): [True: 30, False: 47]
  ------------------
 1358|     30|      additional_drc_set_id_cnt = impd_read_bits_buf(it_bit_buff, 6);
 1359|     30|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1359:11): [True: 1, False: 29]
  ------------------
 1360|     29|      if ((additional_drc_set_id_cnt >= DRC_SET_ID_COUNT_MAX))
  ------------------
  |  |   93|     29|#define DRC_SET_ID_COUNT_MAX 16
  ------------------
  |  Branch (1360:11): [True: 1, False: 28]
  ------------------
 1361|      1|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1362|       |
 1363|     82|      for (i = 1; i < additional_drc_set_id_cnt + 1; i++) {
  ------------------
  |  Branch (1363:19): [True: 56, False: 26]
  ------------------
 1364|     56|        loud_eq_instructions->drc_set_id[i] =
 1365|     56|            impd_read_bits_buf(it_bit_buff, 6);
 1366|     56|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1366:13): [True: 2, False: 54]
  ------------------
 1367|     56|      }
 1368|     28|    }
 1369|     93|  } else {
 1370|     93|    loud_eq_instructions->drc_set_id[0] = 0;
 1371|     93|  }
 1372|       |
 1373|    166|  loud_eq_instructions->drc_set_id_count = 1 + additional_drc_set_id_cnt;
 1374|       |
 1375|    166|  eq_set_id_present = impd_read_bits_buf(it_bit_buff, 1);
 1376|       |
 1377|    166|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1377:7): [True: 2, False: 164]
  ------------------
 1378|       |
 1379|    164|  if (eq_set_id_present) {
  ------------------
  |  Branch (1379:7): [True: 61, False: 103]
  ------------------
 1380|     61|    temp = impd_read_bits_buf(it_bit_buff, 7);
 1381|     61|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1381:9): [True: 1, False: 60]
  ------------------
 1382|       |
 1383|     60|    loud_eq_instructions->eq_set_id[0] = (temp >> 1) & 0x3F;
 1384|       |
 1385|     60|    additional_eq_set_id_present = temp & 0x01;
 1386|       |
 1387|     60|    if (additional_eq_set_id_present) {
  ------------------
  |  Branch (1387:9): [True: 13, False: 47]
  ------------------
 1388|     13|      additional_eq_set_id_cnt = impd_read_bits_buf(it_bit_buff, 6);
 1389|     13|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1389:11): [True: 1, False: 12]
  ------------------
 1390|     12|      if (additional_eq_set_id_cnt >= EQ_SET_ID_COUNT_MAX)
  ------------------
  |  |   94|     12|#define EQ_SET_ID_COUNT_MAX 8
  ------------------
  |  Branch (1390:11): [True: 1, False: 11]
  ------------------
 1391|      1|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1392|     28|      for (i = 0; i < additional_eq_set_id_cnt; i++) {
  ------------------
  |  Branch (1392:19): [True: 19, False: 9]
  ------------------
 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|     11|    }
 1398|    103|  } else {
 1399|    103|    loud_eq_instructions->eq_set_id[0] = 0;
 1400|    103|  }
 1401|    159|  loud_eq_instructions->eq_set_id_count = 1 + additional_eq_set_id_cnt;
 1402|       |
 1403|    159|  temp = impd_read_bits_buf(it_bit_buff, 8);
 1404|    159|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1404:7): [True: 2, False: 157]
  ------------------
 1405|       |
 1406|       |  /* Parsed but unused */
 1407|    157|  loud_eq_instructions->loudness_after_drc = (temp >> 7) & 0x01;
 1408|       |
 1409|       |  /* Parsed but unused */
 1410|    157|  loud_eq_instructions->loudness_after_eq = (temp >> 6) & 0x01;
 1411|       |
 1412|       |  /* Parsed but unused */
 1413|    157|  loud_eq_instructions->loud_eq_gain_sequence_count = temp & 0x3F;
 1414|       |
 1415|    157|  if (loud_eq_instructions->loud_eq_gain_sequence_count >
  ------------------
  |  Branch (1415:7): [True: 11, False: 146]
  ------------------
 1416|    157|      LOUD_EQ_GAIN_SEQUENCE_COUNT_MAX)
  ------------------
  |  |   95|    157|#define LOUD_EQ_GAIN_SEQUENCE_COUNT_MAX 4
  ------------------
 1417|     11|    return UNEXPECTED_ERROR;
  ------------------
  |  |  128|     11|#define UNEXPECTED_ERROR 2
  ------------------
 1418|       |
 1419|       |  /* Section under for loop, Parsed but unused */
 1420|    212|  for (i = 0; i < loud_eq_instructions->loud_eq_gain_sequence_count; i++) {
  ------------------
  |  Branch (1420:15): [True: 72, False: 140]
  ------------------
 1421|     72|    temp = impd_read_bits_buf(it_bit_buff, 7);
 1422|     72|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1422:9): [True: 1, False: 71]
  ------------------
 1423|       |
 1424|     71|    loud_eq_instructions->gain_seq_idx[i] = (temp >> 1) & 0x3F;
 1425|       |
 1426|     71|    loud_eq_instructions->drc_characteristic_format_is_cicp[i] = temp & 0x01;
 1427|       |
 1428|     71|    if (loud_eq_instructions->drc_characteristic_format_is_cicp[i]) {
  ------------------
  |  Branch (1428:9): [True: 25, False: 46]
  ------------------
 1429|     25|      loud_eq_instructions->drc_characteristic[i] =
 1430|     25|          impd_read_bits_buf(it_bit_buff, 7);
 1431|     25|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1431:11): [True: 1, False: 24]
  ------------------
 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|     69|    temp = impd_read_bits_buf(it_bit_buff, 9);
 1443|     69|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1443:9): [True: 2, False: 67]
  ------------------
 1444|       |
 1445|     67|    loud_eq_instructions->frequency_range_index[i] = (temp >> 3) & 0x3F;
 1446|       |
 1447|     67|    bs_loud_eq_scaling = temp & 0x07;
 1448|       |
 1449|     67|    loud_eq_instructions->loud_eq_scaling[i] =
 1450|     67|        (FLOAT32)pow(2.0f, -0.5f * bs_loud_eq_scaling);
 1451|       |
 1452|     67|    bs_loud_eq_offset = impd_read_bits_buf(it_bit_buff, 5);
 1453|     67|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1453:9): [True: 1, False: 66]
  ------------------
 1454|       |
 1455|     66|    loud_eq_instructions->loud_eq_offset[i] = 1.5f * bs_loud_eq_offset - 16.0f;
 1456|     66|  }
 1457|    140|  return (0);
 1458|    146|}

impd_init_tbls:
   31|  1.89k|                    ia_tables_struct* str_tables) {
   32|  1.89k|  impd_gen_delta_time_code_tbl(num_gain_max_values,
   33|  1.89k|                               str_tables->delta_time_code_table);
   34|  1.89k|  return;
   35|  1.89k|}
impd_get_delta_gain_code_tbl:
   40|  21.9k|    WORD32* num_entries) {
   41|  21.9k|  if (gain_coding_profile == GAIN_CODING_PROFILE_CLIPPING) {
  ------------------
  |  |   77|  21.9k|#define GAIN_CODING_PROFILE_CLIPPING 2
  ------------------
  |  Branch (41:7): [True: 0, False: 21.9k]
  ------------------
   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|  21.9k|  } else {
   45|  21.9k|    *delta_time_code_tbl = ia_drc_gain_tbls_prof_0_1;
   46|  21.9k|    *num_entries = NUM_GAIN_TBL_PROF_0_1_ENTRIES;
  ------------------
  |  |   24|  21.9k|#define NUM_GAIN_TBL_PROF_0_1_ENTRIES 25
  ------------------
   47|  21.9k|  }
   48|  21.9k|}
impd_gen_delta_time_code_tbl:
   52|  1.89k|    ia_delta_time_code_table_entry_struct* delta_time_code_tbl_item) {
   53|  1.89k|  WORD32 n, k;
   54|       |
   55|  1.89k|  WORD32 Z = 1;
   56|  12.7k|  while ((1 << Z) < 2 * num_gain_max_values) {
  ------------------
  |  Branch (56:10): [True: 10.8k, False: 1.89k]
  ------------------
   57|  10.8k|    Z++;
   58|  10.8k|  }
   59|       |
   60|  1.89k|  delta_time_code_tbl_item[0].size = -1;
   61|  1.89k|  delta_time_code_tbl_item[0].code = -1;
   62|  1.89k|  delta_time_code_tbl_item[0].value = -1;
   63|       |
   64|  1.89k|  delta_time_code_tbl_item[1].size = 2;
   65|  1.89k|  delta_time_code_tbl_item[1].code = 0x0;
   66|  1.89k|  delta_time_code_tbl_item[1].value = 1;
   67|  9.47k|  for (n = 0; n < 4; n++) {
  ------------------
  |  Branch (67:15): [True: 7.58k, False: 1.89k]
  ------------------
   68|  7.58k|    delta_time_code_tbl_item[n + 2].size = 4;
   69|  7.58k|    delta_time_code_tbl_item[n + 2].code = 0x4 + n;
   70|  7.58k|    delta_time_code_tbl_item[n + 2].value = n + 2;
   71|  7.58k|  }
   72|  17.0k|  for (n = 0; n < 8; n++) {
  ------------------
  |  Branch (72:15): [True: 15.1k, False: 1.89k]
  ------------------
   73|  15.1k|    delta_time_code_tbl_item[n + 6].size = 5;
   74|  15.1k|    delta_time_code_tbl_item[n + 6].code = 0x10 + n;
   75|  15.1k|    delta_time_code_tbl_item[n + 6].value = n + 6;
   76|  15.1k|  }
   77|       |
   78|  1.89k|  k = 2 * num_gain_max_values - 14 + 1;
   79|   319k|  for (n = 0; n < k; n++) {
  ------------------
  |  Branch (79:15): [True: 317k, False: 1.89k]
  ------------------
   80|   317k|    delta_time_code_tbl_item[n + 14].size = 2 + Z;
   81|   317k|    delta_time_code_tbl_item[n + 14].code = (0x3 << Z) + n;
   82|   317k|    delta_time_code_tbl_item[n + 14].value = n + 14;
   83|   317k|  }
   84|  1.89k|}
impd_get_delta_tmin:
   87|  4.68k|impd_get_delta_tmin(const WORD32 sampling_rate) {
   88|  4.68k|  WORD32 lowerBound = (WORD32)(0.5f + 0.0005f * sampling_rate);
   89|  4.68k|  WORD32 result = 1;
   90|  29.2k|  while (result <= lowerBound) result = result << 1;
  ------------------
  |  Branch (90:10): [True: 24.5k, False: 4.68k]
  ------------------
   91|  4.68k|  return result;
   92|  4.68k|}

impd_conv_to_linear_domain:
  299|  28.9k|                           FLOAT32* out_param_lin_slope) {
  300|  28.9k|  WORD32 err = 0;
  301|  28.9k|  FLOAT32 loc_db_gain = in_param_db_gain;
  302|  28.9k|  FLOAT32 gain_ratio = 1.0;
  303|  28.9k|  FLOAT32 mapped_db_gain;
  304|  28.9k|  ia_gain_modifiers_struct* pstr_gain_modifiers =
  305|  28.9k|      interp_params_str->pstr_gain_modifiers;
  306|  28.9k|  if (interp_params_str->gain_modification_flag) {
  ------------------
  |  Branch (306:7): [True: 28.9k, False: 0]
  ------------------
  307|  28.9k|    ia_split_drc_characteristic_struct* split_drc_characteristic_source;
  308|       |
  309|  28.9k|    WORD32 slopeIsNegative;
  310|       |
  311|  28.9k|    if (interp_params_str->drc_characteristic_present) {
  ------------------
  |  Branch (311:9): [True: 0, False: 28.9k]
  ------------------
  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|  28.9k|    if (loc_db_gain < 0.0f) {
  ------------------
  |  Branch (367:9): [True: 5.84k, False: 23.1k]
  ------------------
  368|  5.84k|      gain_ratio *= interp_params_str->compress;
  369|  23.1k|    } else {
  370|  23.1k|      gain_ratio *= interp_params_str->boost;
  371|  23.1k|    }
  372|  28.9k|  }
  373|  28.9k|  if (pstr_gain_modifiers->gain_scaling_flag[drc_band] == 1) {
  ------------------
  |  Branch (373:7): [True: 0, False: 28.9k]
  ------------------
  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|  28.9k|  if ((interp_params_str->pstr_ducking_modifiers->ducking_scaling_flag == 1) &&
  ------------------
  |  Branch (380:7): [True: 0, False: 28.9k]
  ------------------
  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|  28.9k|  if (interp_params_str->interpolation_loud_eq == 1) {
  ------------------
  |  Branch (385:7): [True: 0, False: 28.9k]
  ------------------
  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|  28.9k|  } else {
  390|  28.9k|    *out_param_lin_gain =
  391|  28.9k|        (FLOAT32)pow(2.0, (FLOAT64)(gain_ratio * loc_db_gain / 6.0f));
  392|  28.9k|    *out_param_lin_slope = SLOPE_FACTOR_DB_TO_LINEAR * gain_ratio *
  ------------------
  |  |  216|  28.9k|#define SLOPE_FACTOR_DB_TO_LINEAR 0.1151f
  ------------------
  393|  28.9k|                           *out_param_lin_gain * in_param_db_slope;
  394|       |
  395|  28.9k|    if (pstr_gain_modifiers->gain_offset_flag[drc_band] == 1) {
  ------------------
  |  Branch (395:9): [True: 0, False: 28.9k]
  ------------------
  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|  28.9k|    if ((interp_params_str->limiter_peak_target_present == 1) &&
  ------------------
  |  Branch (399:9): [True: 0, False: 28.9k]
  ------------------
  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|  28.9k|  }
  411|  28.9k|  return (0);
  412|  28.9k|}
impd_interpolate_drc_gain:
  417|  15.2k|                                 FLOAT32 slope1, FLOAT32* result) {
  418|  15.2k|  WORD32 err = 0;
  419|  15.2k|  WORD32 n;
  420|  15.2k|  FLOAT32 k1, k2, a, b, c, d;
  421|  15.2k|  FLOAT32 slope_t1;
  422|  15.2k|  FLOAT32 slope_t2;
  423|  15.2k|  FLOAT32 gain_t1;
  424|  15.2k|  FLOAT32 gain_t2;
  425|       |
  426|  15.2k|  WORD32 cubic_interpolation = 1;
  427|  15.2k|  WORD32 node_inser;
  428|  15.2k|  FLOAT32 node_inser_float;
  429|       |
  430|  15.2k|  if (gain_step_tdomain <= 0) {
  ------------------
  |  Branch (430:7): [True: 703, False: 14.4k]
  ------------------
  431|    703|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|    703|#define UNEXPECTED_ERROR 2
  ------------------
  432|    703|  }
  433|       |
  434|  14.4k|  err = impd_conv_to_linear_domain(interp_params_str, drc_band, gain0, slope0,
  435|  14.4k|                                   &gain_t1, &slope_t1);
  436|  14.4k|  if (err) return (err);
  ------------------
  |  Branch (436:7): [True: 0, False: 14.4k]
  ------------------
  437|  14.4k|  err = impd_conv_to_linear_domain(interp_params_str, drc_band, gain1, slope1,
  438|  14.4k|                                   &gain_t2, &slope_t2);
  439|  14.4k|  if (err) return (err);
  ------------------
  |  Branch (439:7): [True: 0, False: 14.4k]
  ------------------
  440|       |
  441|  14.4k|  if (interp_params_str->gain_interpolation_type ==
  ------------------
  |  Branch (441:7): [True: 0, False: 14.4k]
  ------------------
  442|  14.4k|      GAIN_INTERPOLATION_TYPE_SPLINE) {
  ------------------
  |  |   81|  14.4k|#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|  14.4k|  } else {
  523|  14.4k|    a = (gain_t2 - gain_t1) / (FLOAT32)gain_step_tdomain;
  524|  14.4k|    b = gain_t1;
  525|  14.4k|    result[0] = gain_t1;
  526|  14.4k|    result[gain_step_tdomain] = gain_t2;
  527|  25.2M|    for (n = 1; n < gain_step_tdomain; n++) {
  ------------------
  |  Branch (527:17): [True: 25.2M, False: 14.4k]
  ------------------
  528|  25.2M|      FLOAT32 t = (FLOAT32)n;
  529|  25.2M|      result[n] = a * t + b;
  530|  25.2M|    }
  531|  14.4k|  }
  532|  14.4k|  return 0;
  533|  14.4k|}
impd_advance_buf:
  536|  6.07k|                      ia_gain_buffer_struct* pstr_gain_buf) {
  537|  6.07k|  WORD32 n;
  538|  6.07k|  ia_interp_buf_struct* buf_interpolation;
  539|       |
  540|  18.2k|  for (n = 0; n < pstr_gain_buf->buf_interpolation_count; n++) {
  ------------------
  |  Branch (540:15): [True: 12.1k, False: 6.07k]
  ------------------
  541|  12.1k|    buf_interpolation = &(pstr_gain_buf->buf_interpolation[n]);
  542|  12.1k|    buf_interpolation->prev_node = buf_interpolation->str_node;
  543|  12.1k|    buf_interpolation->prev_node.time -= drc_frame_size;
  544|  12.1k|    memmove(buf_interpolation->lpcm_gains,
  545|  12.1k|            buf_interpolation->lpcm_gains + drc_frame_size,
  546|  12.1k|            sizeof(FLOAT32) * (drc_frame_size + MAX_SIGNAL_DELAY));
  ------------------
  |  |   52|  12.1k|#define MAX_SIGNAL_DELAY 4500
  ------------------
  547|  12.1k|  }
  548|  6.07k|  return;
  549|  6.07k|}
impd_concatenate_segments:
  556|  11.4k|                          WORD32 loudness_changed) {
  557|  11.4k|  WORD32 time_prev, duration, n, err = 0;
  558|  11.4k|  FLOAT32 loc_db_gain = 0.0f, prev_db_gain, slope = 0.0f, slope_prev;
  559|       |
  560|  11.4k|  time_prev = buf_interpolation->prev_node.time;
  561|  11.4k|  prev_db_gain = buf_interpolation->prev_node.loc_db_gain;
  562|  11.4k|  slope_prev = buf_interpolation->prev_node.slope;
  563|  25.9k|  for (n = 0; n < str_spline_nodes->num_nodes; n++) {
  ------------------
  |  Branch (563:15): [True: 15.2k, False: 10.7k]
  ------------------
  564|  15.2k|    duration = str_spline_nodes->str_node[n].time - time_prev;
  565|  15.2k|    loc_db_gain = str_spline_nodes->str_node[n].loc_db_gain;
  566|  15.2k|    if (loudness_changed) {
  ------------------
  |  Branch (566:9): [True: 2.11k, False: 13.0k]
  ------------------
  567|  2.11k|      if (sel_drc_index == 0 && is_config_changed == 1) {
  ------------------
  |  Branch (567:11): [True: 2.11k, False: 0]
  |  Branch (567:33): [True: 0, False: 2.11k]
  ------------------
  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|  2.11k|    }
  576|  15.2k|    slope = str_spline_nodes->str_node[n].slope;
  577|       |
  578|  15.2k|    err = impd_interpolate_drc_gain(
  579|  15.2k|        interp_params_str, drc_band, duration, prev_db_gain, loc_db_gain,
  580|  15.2k|        slope_prev, slope, buf_interpolation->lpcm_gains + MAX_SIGNAL_DELAY +
  ------------------
  |  |   52|  15.2k|#define MAX_SIGNAL_DELAY 4500
  ------------------
  581|  15.2k|                              drc_frame_size + time_prev);
  582|  15.2k|    if (err) return (err);
  ------------------
  |  Branch (582:9): [True: 703, False: 14.4k]
  ------------------
  583|       |
  584|  14.4k|    time_prev = str_spline_nodes->str_node[n].time;
  585|  14.4k|    prev_db_gain = loc_db_gain;
  586|  14.4k|    slope_prev = slope;
  587|  14.4k|  }
  588|       |
  589|  10.7k|  buf_interpolation->str_node.loc_db_gain = loc_db_gain;
  590|  10.7k|  buf_interpolation->str_node.slope = slope;
  591|  10.7k|  buf_interpolation->str_node.time = time_prev;
  592|       |
  593|  10.7k|  return (0);
  594|  11.4k|}
impd_get_drc_gain:
  602|  6.07k|                  ia_drc_gain_buffers_struct* drc_gain_buffers) {
  603|  6.07k|  ia_drc_params_struct* ia_drc_params_struct =
  604|  6.07k|      &(p_drc_gain_dec_structs->ia_drc_params_struct);
  605|  6.07k|  WORD32 drc_instructions_index =
  606|  6.07k|      ia_drc_params_struct->sel_drc_array[sel_drc_index].drc_instructions_index;
  607|  6.07k|  if (drc_instructions_index >= 0) {
  ------------------
  |  Branch (607:7): [True: 6.07k, False: 0]
  ------------------
  608|  6.07k|    WORD32 b, g, gain_element_index, err = 0;
  609|  6.07k|    WORD32 parametric_drc_instance_index = 0;
  610|  6.07k|    ia_interp_params_struct interp_params_str = {0};
  611|       |
  612|  6.07k|    ia_drc_instructions_struct* str_drc_instruction_str =
  613|  6.07k|        &(pstr_drc_config->str_drc_instruction_str[drc_instructions_index]);
  614|  6.07k|    WORD32 drc_set_effect = str_drc_instruction_str->drc_set_effect;
  615|  6.07k|    WORD32 num_drc_ch_groups = str_drc_instruction_str->num_drc_ch_groups;
  616|  6.07k|    ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc = NULL;
  617|  6.07k|    WORD32 drc_coeff_idx =
  618|  6.07k|        ia_drc_params_struct->sel_drc_array[sel_drc_index].drc_coeff_idx;
  619|  6.07k|    if (drc_coeff_idx >= 0) {
  ------------------
  |  Branch (619:9): [True: 6.07k, False: 0]
  ------------------
  620|  6.07k|      str_p_loc_drc_coefficients_uni_drc =
  621|  6.07k|          &(pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[drc_coeff_idx]);
  622|  6.07k|      interp_params_str.interpolation_loud_eq = 0;
  623|  6.07k|    } else {
  624|      0|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  625|      0|    }
  626|       |
  627|  6.07k|    interp_params_str.loudness_normalization_gain_db =
  628|  6.07k|        loudness_normalization_gain_db;
  629|  6.07k|    interp_params_str.characteristic_index = characteristic_index;
  630|  6.07k|    interp_params_str.compress = compress;
  631|  6.07k|    interp_params_str.boost = boost;
  632|  6.07k|    interp_params_str.limiter_peak_target_present =
  633|  6.07k|        str_drc_instruction_str->limiter_peak_target_present;
  634|  6.07k|    interp_params_str.limiter_peak_target =
  635|  6.07k|        str_drc_instruction_str->limiter_peak_target;
  636|       |
  637|  6.07k|    if (((drc_set_effect & (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) ==
  ------------------
  |  |   72|  6.07k|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                  if (((drc_set_effect & (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) ==
  ------------------
  |  |   73|  6.07k|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
  |  Branch (637:9): [True: 6.07k, False: 0]
  ------------------
  638|  6.07k|         0) &&
  639|  6.07k|        (drc_set_effect != EFFECT_BIT_FADE) &&
  ------------------
  |  |   71|  6.07k|#define EFFECT_BIT_FADE 0x0200
  ------------------
  |  Branch (639:9): [True: 6.07k, False: 0]
  ------------------
  640|  6.07k|        (drc_set_effect != EFFECT_BIT_CLIPPING)) {
  ------------------
  |  |   70|  6.07k|#define EFFECT_BIT_CLIPPING 0x0100
  ------------------
  |  Branch (640:9): [True: 6.07k, False: 0]
  ------------------
  641|  6.07k|      interp_params_str.gain_modification_flag = 1;
  642|  6.07k|    } else {
  643|      0|      interp_params_str.gain_modification_flag = 0;
  644|      0|    }
  645|  6.07k|    if (drc_set_effect & (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   72|  6.07k|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                  if (drc_set_effect & (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   73|  6.07k|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
  |  Branch (645:9): [True: 0, False: 6.07k]
  ------------------
  646|      0|      interp_params_str.ducking_flag = 1;
  647|  6.07k|    } else {
  648|  6.07k|      interp_params_str.ducking_flag = 0;
  649|  6.07k|    }
  650|  6.07k|    if (drc_set_effect == EFFECT_BIT_CLIPPING) {
  ------------------
  |  |   70|  6.07k|#define EFFECT_BIT_CLIPPING 0x0100
  ------------------
  |  Branch (650:9): [True: 0, False: 6.07k]
  ------------------
  651|      0|      interp_params_str.clipping_flag = 1;
  652|  6.07k|    } else {
  653|  6.07k|      interp_params_str.clipping_flag = 0;
  654|  6.07k|    }
  655|       |
  656|  6.07k|    impd_advance_buf(ia_drc_params_struct->drc_frame_size,
  657|  6.07k|                     &(drc_gain_buffers->pstr_gain_buf[sel_drc_index]));
  658|       |
  659|  6.07k|    gain_element_index = 0;
  660|  16.8k|    for (g = 0; g < num_drc_ch_groups; g++) {
  ------------------
  |  Branch (660:17): [True: 11.4k, False: 5.37k]
  ------------------
  661|  11.4k|      WORD32 gainSet = 0;
  662|  11.4k|      WORD32 num_drc_bands = 0;
  663|  11.4k|      interp_params_str.gain_interpolation_type =
  664|  11.4k|          str_drc_instruction_str->gain_interpolation_type_for_channel_group[g];
  665|  11.4k|      interp_params_str.delta_tmin =
  666|  11.4k|          str_drc_instruction_str->time_delta_min_for_channel_group[g];
  667|  11.4k|      interp_params_str.pstr_ducking_modifiers = &(
  668|  11.4k|          str_drc_instruction_str->str_ducking_modifiers_for_channel_group[g]);
  669|  11.4k|      interp_params_str.pstr_gain_modifiers =
  670|  11.4k|          &(str_drc_instruction_str->str_gain_modifiers_of_ch_group[g]);
  671|  11.4k|      if (str_drc_instruction_str->ch_group_parametric_drc_flag[g] == 0) {
  ------------------
  |  Branch (671:11): [True: 11.4k, False: 0]
  ------------------
  672|  11.4k|        gainSet = str_drc_instruction_str->gain_set_index_for_channel_group[g];
  673|  11.4k|        num_drc_bands = str_drc_instruction_str->band_count_of_ch_group[g];
  674|  22.1k|        for (b = 0; b < num_drc_bands; b++) {
  ------------------
  |  Branch (674:21): [True: 11.4k, False: 10.7k]
  ------------------
  675|  11.4k|          ia_gain_params_struct* gain_params =
  676|  11.4k|              &(str_p_loc_drc_coefficients_uni_drc->gain_set_params[gainSet]
  677|  11.4k|                    .gain_params[b]);
  678|  11.4k|          WORD32 seq = gain_params->gain_seq_idx;
  679|  11.4k|          interp_params_str.drc_characteristic_present =
  680|  11.4k|              gain_params->drc_characteristic_present;
  681|  11.4k|          interp_params_str.drc_source_characteristic_cicp_format =
  682|  11.4k|              gain_params->drc_characteristic_format_is_cicp;
  683|  11.4k|          interp_params_str.source_drc_characteristic =
  684|  11.4k|              gain_params->drc_characteristic;
  685|  11.4k|          interp_params_str.split_source_characteristic_left = &(
  686|  11.4k|              str_p_loc_drc_coefficients_uni_drc->str_split_characteristic_left
  687|  11.4k|                  [gain_params->drc_characteristic_left_index]);
  688|  11.4k|          interp_params_str.split_source_characteristic_right = &(
  689|  11.4k|              str_p_loc_drc_coefficients_uni_drc->str_split_characteristic_right
  690|  11.4k|                  [gain_params->drc_characteristic_right_index]);
  691|  11.4k|          interp_params_str.split_target_characteristic_left = &(
  692|  11.4k|              str_p_loc_drc_coefficients_uni_drc->str_split_characteristic_left
  693|  11.4k|                  [interp_params_str.pstr_gain_modifiers
  694|  11.4k|                       ->target_characteristic_left_index[b]]);
  695|  11.4k|          interp_params_str.split_target_characteristic_right = &(
  696|  11.4k|              str_p_loc_drc_coefficients_uni_drc->str_split_characteristic_right
  697|  11.4k|                  [interp_params_str.pstr_gain_modifiers
  698|  11.4k|                       ->target_characteristic_right_index[b]]);
  699|  11.4k|          err = impd_concatenate_segments(
  700|  11.4k|              ia_drc_params_struct->drc_frame_size, b, &interp_params_str,
  701|  11.4k|              &(pstr_drc_gain->drc_gain_sequence[seq].str_spline_nodes[0]),
  702|  11.4k|              &(drc_gain_buffers->pstr_gain_buf[sel_drc_index]
  703|  11.4k|                    .buf_interpolation[gain_element_index]),
  704|  11.4k|              sel_drc_index, pstr_drc_config->is_config_changed,
  705|  11.4k|              pstr_drc_config->ln_gain_changed);
  706|  11.4k|          if (err) return (err);
  ------------------
  |  Branch (706:15): [True: 703, False: 10.7k]
  ------------------
  707|  10.7k|          gain_element_index++;
  708|  10.7k|        }
  709|  11.4k|      } 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|  11.4k|    }
  788|  6.07k|  }
  789|  5.37k|  return (0);
  790|  6.07k|}

impd_init_drc_decode:
   45|  3.12k|    ia_drc_gain_dec_struct* p_drc_gain_dec_structs) {
   46|  3.12k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   36|  3.12k|#define IA_NO_ERROR 0x00000000
  ------------------
   47|       |
   48|  3.12k|  err_code = impd_init_drc_params(
   49|  3.12k|      frame_size, sample_rate, gain_delay_samples, delay_mode,
   50|  3.12k|      sub_band_domain_mode, &p_drc_gain_dec_structs->ia_drc_params_struct);
   51|       |
   52|  3.12k|  if (err_code != IA_NO_ERROR) return (err_code);
  ------------------
  |  |   36|  3.12k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (52:7): [True: 0, False: 3.12k]
  ------------------
   53|       |
   54|  3.12k|  err_code = impd_init_parametric_drc(
   55|  3.12k|      p_drc_gain_dec_structs->ia_drc_params_struct.drc_frame_size, sample_rate,
   56|  3.12k|      sub_band_domain_mode, &p_drc_gain_dec_structs->parametricdrc_params);
   57|       |
   58|  3.12k|  if (err_code != IA_NO_ERROR) return (err_code);
  ------------------
  |  |   36|  3.12k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (58:7): [True: 0, False: 3.12k]
  ------------------
   59|       |
   60|  3.12k|  return err_code;
   61|  3.12k|}
impd_init_drc_decode_post_config:
   70|  1.17k|    ia_drc_loudness_info_set_struct* pstr_loudness_info, pVOID* mem_ptr) {
   71|  1.17k|  IA_ERRORCODE err_code = 0;
   72|  1.17k|  WORD32 i, j, k, maxMultibandAudioSignalCount = 0;
   73|  1.17k|  ia_drc_params_struct* p_drc_params_struct =
   74|  1.17k|      &p_drc_gain_dec_structs->ia_drc_params_struct;
   75|  1.17k|  ia_audio_in_out_buf* p_audio_in_out_buf =
   76|  1.17k|      &p_drc_gain_dec_structs->audio_in_out_buf;
   77|       |
   78|  1.38k|  for (i = 0; i < num_sets_processed; i++) {
  ------------------
  |  Branch (78:15): [True: 210, False: 1.17k]
  ------------------
   79|    210|    err_code = impd_init_selected_drc_set(
   80|    210|        pstr_drc_config, p_drc_params_struct,
   81|    210|        &p_drc_gain_dec_structs->parametricdrc_params, audio_num_chan,
   82|    210|        drc_set_id_processed[i], downmix_id_processed[i],
   83|    210|        &p_drc_gain_dec_structs->ia_filter_banks_struct,
   84|    210|        &p_drc_gain_dec_structs->str_overlap_params,
   85|    210|        p_drc_gain_dec_structs->shape_filter_block);
   86|    210|    if (err_code) return (err_code);
  ------------------
  |  Branch (86:9): [True: 0, False: 210]
  ------------------
   87|    210|  }
   88|       |
   89|  1.17k|  p_drc_gain_dec_structs->audio_num_chan = audio_num_chan;
   90|  1.17k|  p_drc_gain_dec_structs->ia_drc_params_struct.audio_delay_samples =
   91|  1.17k|      p_drc_gain_dec_structs->ia_drc_params_struct.parametric_drc_delay;
   92|  1.17k|  if (pstr_drc_config->str_drc_config_ext.parametric_drc_present) {
  ------------------
  |  Branch (92:7): [True: 0, False: 1.17k]
  ------------------
   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.17k|  p_audio_in_out_buf->audio_num_chan = audio_num_chan;
  100|  1.17k|  p_audio_in_out_buf->audio_delay_samples =
  101|  1.17k|      p_drc_params_struct->audio_delay_samples;
  102|  1.17k|  p_audio_in_out_buf->frame_size = p_drc_params_struct->drc_frame_size;
  103|       |
  104|  1.17k|  if (p_drc_params_struct->sub_band_domain_mode == SUBBAND_DOMAIN_MODE_QMF64) {
  ------------------
  |  |  149|  1.17k|#define SUBBAND_DOMAIN_MODE_QMF64 1
  ------------------
  |  Branch (104:7): [True: 0, False: 1.17k]
  ------------------
  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.17k|  } else if (p_drc_params_struct->sub_band_domain_mode ==
  ------------------
  |  Branch (112:14): [True: 0, False: 1.17k]
  ------------------
  113|  1.17k|             SUBBAND_DOMAIN_MODE_QMF71) {
  ------------------
  |  |  150|  1.17k|#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.17k|  } else if (p_drc_params_struct->sub_band_domain_mode ==
  ------------------
  |  Branch (121:14): [True: 0, False: 1.17k]
  ------------------
  122|  1.17k|             SUBBAND_DOMAIN_MODE_STFT256) {
  ------------------
  |  |  151|  1.17k|#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.17k|  } else {
  132|  1.17k|    p_audio_in_out_buf->audio_delay_sub_band_samples = 0;
  133|  1.17k|    p_audio_in_out_buf->audio_sub_band_frame_size = 0;
  134|  1.17k|    p_audio_in_out_buf->audio_sub_band_count = 0;
  135|  1.17k|  }
  136|       |
  137|  4.68k|  for (k = 0; k < SEL_DRC_COUNT; k++) {
  ------------------
  |  |   50|  4.68k|#define SEL_DRC_COUNT 3
  ------------------
  |  Branch (137:15): [True: 3.51k, False: 1.17k]
  ------------------
  138|  3.51k|    if (p_drc_params_struct->sel_drc_array[k].drc_instructions_index >= 0) {
  ------------------
  |  Branch (138:9): [True: 210, False: 3.30k]
  ------------------
  139|    210|      ia_drc_instructions_struct* drc_instruction_str =
  140|    210|          &(pstr_drc_config->str_drc_instruction_str
  141|    210|                [p_drc_params_struct->sel_drc_array[k].drc_instructions_index]);
  142|    210|      if (drc_instruction_str->gain_element_count > 0) {
  ------------------
  |  Branch (142:11): [True: 210, False: 0]
  ------------------
  143|    210|        p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  144|    210|            .buf_interpolation = (ia_interp_buf_struct*)*mem_ptr;
  145|    210|        *mem_ptr = (pVOID)((SIZE_T)*mem_ptr +
  146|    210|                           IXHEAAC_GET_SIZE_ALIGNED(drc_instruction_str->gain_element_count *
  ------------------
  |  |   87|    210|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  147|    210|                                                        sizeof(ia_interp_buf_struct),
  148|    210|                                                    BYTE_ALIGN_8));
  149|    210|        p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  150|    210|            .buf_interpolation_count = drc_instruction_str->gain_element_count;
  151|    210|        for (i = 0;
  152|    630|             i < p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  ------------------
  |  Branch (152:14): [True: 420, False: 210]
  ------------------
  153|    630|                     .buf_interpolation_count;
  154|    420|             i++) {
  155|    420|          p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  156|    420|              .buf_interpolation[i]
  157|    420|              .str_node.time = 0;
  158|    420|          p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  159|    420|              .buf_interpolation[i]
  160|    420|              .prev_node.time = -1;
  161|    420|          p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  162|    420|              .buf_interpolation[i]
  163|    420|              .str_node.loc_db_gain = 0.0f;
  164|    420|          p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  165|    420|              .buf_interpolation[i]
  166|    420|              .str_node.slope = 0.0f;
  167|       |
  168|  5.33M|          for (j = 0; j < 2 * AUDIO_CODEC_FRAME_SIZE_MAX + MAX_SIGNAL_DELAY;
  ------------------
  |  |   45|  5.33M|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  ------------------
                        for (j = 0; j < 2 * AUDIO_CODEC_FRAME_SIZE_MAX + MAX_SIGNAL_DELAY;
  ------------------
  |  |   52|  5.33M|#define MAX_SIGNAL_DELAY 4500
  ------------------
  |  Branch (168:23): [True: 5.33M, False: 420]
  ------------------
  169|  5.33M|               j++) {
  170|  5.33M|            p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  171|  5.33M|                .buf_interpolation[i]
  172|  5.33M|                .lpcm_gains[j] = 1.f;
  173|  5.33M|          }
  174|    420|        }
  175|    210|      }
  176|    210|    }
  177|  3.51k|  }
  178|       |
  179|  1.17k|  if (eq_set_id_processed > 0) {
  ------------------
  |  Branch (179:7): [True: 0, False: 1.17k]
  ------------------
  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.38k|  for (i = 0; i < p_drc_params_struct->drc_set_counter; i++) {
  ------------------
  |  Branch (210:15): [True: 210, False: 1.17k]
  ------------------
  211|    210|    ia_drc_instructions_struct* drc_instruction_str;
  212|    210|    drc_instruction_str =
  213|    210|        &(pstr_drc_config->str_drc_instruction_str
  214|    210|              [p_drc_params_struct->sel_drc_array[i].drc_instructions_index]);
  215|    210|    maxMultibandAudioSignalCount =
  216|    210|        max(maxMultibandAudioSignalCount,
  ------------------
  |  |   74|    210|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 0, False: 210]
  |  |  ------------------
  ------------------
  217|    210|            drc_instruction_str->multiband_audio_sig_count);
  218|    210|  }
  219|       |
  220|  1.17k|  p_drc_gain_dec_structs->audio_band_buffer.non_interleaved_audio = *mem_ptr;
  221|  1.17k|  *mem_ptr =
  222|  1.17k|      (pVOID)((SIZE_T)*mem_ptr +
  223|  1.17k|              IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  1.17k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  224|  1.17k|                  (maxMultibandAudioSignalCount *
  225|  1.17k|                   sizeof(p_drc_gain_dec_structs->audio_band_buffer.non_interleaved_audio[0])),
  226|  1.17k|                  BYTE_ALIGN_8));
  227|       |
  228|  1.48k|  for (i = 0; i < maxMultibandAudioSignalCount; i++) {
  ------------------
  |  Branch (228:15): [True: 310, False: 1.17k]
  ------------------
  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.17k|  p_drc_gain_dec_structs->audio_band_buffer.multiband_audio_sig_count =
  240|  1.17k|      maxMultibandAudioSignalCount;
  241|  1.17k|  p_drc_gain_dec_structs->audio_band_buffer.frame_size =
  242|  1.17k|      p_drc_params_struct->drc_frame_size;
  243|  1.17k|  ;
  244|       |
  245|  1.17k|  if (p_drc_params_struct->sub_band_domain_mode == SUBBAND_DOMAIN_MODE_OFF &&
  ------------------
  |  |  148|  2.34k|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (245:7): [True: 1.17k, False: 0]
  ------------------
  246|  1.17k|      p_audio_in_out_buf->audio_delay_samples) {
  ------------------
  |  Branch (246:7): [True: 0, False: 1.17k]
  ------------------
  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.17k|  if (p_drc_params_struct->sub_band_domain_mode != SUBBAND_DOMAIN_MODE_OFF &&
  ------------------
  |  |  148|  2.34k|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (272:7): [True: 0, False: 1.17k]
  ------------------
  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.17k|  return err_code;
  325|  1.17k|}
impd_drc_process_time_domain:
  331|  36.3k|    FLOAT32 boost, FLOAT32 compress, WORD32 drc_characteristic_target) {
  332|  36.3k|  WORD32 sel_drc_index;
  333|  36.3k|  IA_ERRORCODE err_code = 0;
  334|  36.3k|  WORD32 passThru;
  335|  36.3k|  ia_drc_instructions_struct* str_drc_instruction_str =
  336|  36.3k|      pstr_drc_config->str_drc_instruction_str;
  337|       |
  338|  36.3k|  if (p_drc_gain_dec_structs->eq_set) {
  ------------------
  |  Branch (338:7): [True: 0, False: 36.3k]
  ------------------
  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|  36.3k|  impd_store_audio_io_buffer_time(audio_in_out_buf,
  352|  36.3k|                                  &p_drc_gain_dec_structs->audio_in_out_buf);
  353|       |
  354|  36.3k|  if (pstr_drc_config->apply_drc) {
  ------------------
  |  Branch (354:7): [True: 17.5k, False: 18.8k]
  ------------------
  355|  17.5k|    for (sel_drc_index = 0;
  356|  22.9k|         sel_drc_index <
  ------------------
  |  Branch (356:10): [True: 6.07k, False: 16.8k]
  ------------------
  357|  22.9k|         p_drc_gain_dec_structs->ia_drc_params_struct.drc_set_counter;
  358|  17.5k|         sel_drc_index++) {
  359|  6.07k|      err_code = impd_get_drc_gain(
  360|  6.07k|          p_drc_gain_dec_structs, pstr_drc_config, pstr_drc_gain, compress,
  361|  6.07k|          boost, drc_characteristic_target, loudness_normalization_gain_db,
  362|  6.07k|          sel_drc_index, &p_drc_gain_dec_structs->drc_gain_buffers);
  363|  6.07k|      if (err_code != IA_NO_ERROR) return (err_code);
  ------------------
  |  |   36|  6.07k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (363:11): [True: 703, False: 5.37k]
  ------------------
  364|  6.07k|    }
  365|       |
  366|  16.8k|    if (p_drc_gain_dec_structs->ia_drc_params_struct.drc_set_counter == 0) {
  ------------------
  |  Branch (366:9): [True: 11.4k, False: 5.37k]
  ------------------
  367|  11.4k|      impd_retrieve_audio_io_buffer_time(
  368|  11.4k|          audio_in_out_buf, &p_drc_gain_dec_structs->audio_in_out_buf);
  369|       |
  370|  11.4k|    } else {
  371|  5.37k|      for (sel_drc_index = 0;
  372|  10.7k|           sel_drc_index <
  ------------------
  |  Branch (372:12): [True: 5.37k, False: 5.37k]
  ------------------
  373|  10.7k|           p_drc_gain_dec_structs->ia_drc_params_struct.drc_set_counter;
  374|  5.37k|           sel_drc_index++) {
  375|  5.37k|        if (p_drc_gain_dec_structs->ia_drc_params_struct
  ------------------
  |  Branch (375:13): [True: 0, False: 5.37k]
  ------------------
  376|  5.37k|                .multiband_sel_drc_idx == sel_drc_index) {
  377|      0|          passThru = 0;
  378|  5.37k|        } else {
  379|  5.37k|          passThru = 1;
  380|  5.37k|        }
  381|  5.37k|        err_code = impd_filter_banks_process(
  382|  5.37k|            str_drc_instruction_str,
  383|  5.37k|            p_drc_gain_dec_structs->ia_drc_params_struct
  384|  5.37k|                .sel_drc_array[sel_drc_index]
  385|  5.37k|                .drc_instructions_index,
  386|  5.37k|            &p_drc_gain_dec_structs->ia_drc_params_struct,
  387|  5.37k|            p_drc_gain_dec_structs->audio_in_out_buf.audio_io_buffer_delayed,
  388|  5.37k|            &p_drc_gain_dec_structs->audio_band_buffer,
  389|  5.37k|            &p_drc_gain_dec_structs->ia_filter_banks_struct, passThru);
  390|  5.37k|        if (err_code != IA_NO_ERROR) return (err_code);
  ------------------
  |  |   36|  5.37k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (390:13): [True: 0, False: 5.37k]
  ------------------
  391|       |
  392|  5.37k|        impd_apply_gains_and_add(
  393|  5.37k|            str_drc_instruction_str,
  394|  5.37k|            p_drc_gain_dec_structs->ia_drc_params_struct
  395|  5.37k|                .sel_drc_array[sel_drc_index]
  396|  5.37k|                .drc_instructions_index,
  397|  5.37k|            &p_drc_gain_dec_structs->ia_drc_params_struct,
  398|  5.37k|            &(p_drc_gain_dec_structs->drc_gain_buffers
  399|  5.37k|                  .pstr_gain_buf[sel_drc_index]),
  400|  5.37k|            p_drc_gain_dec_structs->shape_filter_block,
  401|  5.37k|            p_drc_gain_dec_structs->audio_band_buffer.non_interleaved_audio,
  402|  5.37k|            audio_in_out_buf, 1);
  403|  5.37k|      }
  404|  5.37k|    }
  405|  16.8k|  }
  406|       |
  407|  35.6k|  impd_advance_audio_io_buffer_time(&p_drc_gain_dec_structs->audio_in_out_buf);
  408|       |
  409|  35.6k|  return err_code;
  410|  36.3k|}
impd_get_parametric_drc_delay:
  415|  1.17k|    WORD32* parametric_drc_delay_max) {
  416|  1.17k|  *parametric_drc_delay =
  417|  1.17k|      p_drc_gain_dec_structs->ia_drc_params_struct.parametric_drc_delay;
  418|       |
  419|  1.17k|  if (pstr_drc_config->str_drc_config_ext.parametric_drc_present &&
  ------------------
  |  Branch (419:7): [True: 0, False: 1.17k]
  ------------------
  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.17k|  } else if (pstr_drc_config->str_drc_config_ext.parametric_drc_present == 0) {
  ------------------
  |  Branch (425:14): [True: 1.17k, False: 0]
  ------------------
  426|  1.17k|    *parametric_drc_delay_max = 0;
  427|  1.17k|  } else {
  428|      0|    *parametric_drc_delay_max = -1;
  429|      0|  }
  430|       |
  431|  1.17k|  return;
  432|  1.17k|}
impd_get_eq_delay:
  436|  1.17k|                       WORD32* eq_delay_max) {
  437|  1.17k|  *eq_delay = p_drc_gain_dec_structs->ia_drc_params_struct.eq_delay;
  438|       |
  439|  1.17k|  if (pstr_drc_config->str_drc_config_ext.eq_flag &&
  ------------------
  |  Branch (439:7): [True: 0, False: 1.17k]
  ------------------
  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.17k|  } else if (pstr_drc_config->str_drc_config_ext.eq_flag == 0) {
  ------------------
  |  Branch (443:14): [True: 1.17k, False: 0]
  ------------------
  444|  1.17k|    *eq_delay_max = 0;
  445|  1.17k|  } else {
  446|      0|    *eq_delay_max = -1;
  447|      0|  }
  448|       |
  449|  1.17k|  return;
  450|  1.17k|}

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

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

impd_signal_peak_level_info:
   38|  1.82k|    WORD32 explicit_peak_information_present[]) {
   39|  1.82k|  WORD32 c, d, i, k, n, base_channel_count, mode;
   40|  1.82k|  WORD32 pre_lim_count;
   41|  1.82k|  WORD32 peak_count = 0;
   42|  1.82k|  WORD32 loudness_info_count = 0;
   43|  1.82k|  ia_loudness_info_struct* loudness_info;
   44|  1.82k|  FLOAT32 sum, max_sum;
   45|  1.82k|  WORD32 drc_set_id_requested = str_drc_instruction_str->drc_set_id;
   46|  1.82k|  WORD32 loudness_drc_set_id_requested;
   47|  1.82k|  WORD32 match_found_flag = 0;
   48|       |
   49|  1.82k|  FLOAT32 signal_peak_level_tmp;
   50|  1.82k|  eq_set_id[0] = 0;
   51|  1.82k|  signal_peak_level[0] = 0.0f;
   52|  1.82k|  explicit_peak_information_present[0] = 0;
   53|       |
   54|  1.82k|  k = 0;
   55|  1.82k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (55:7): [True: 595, False: 1.22k]
  ------------------
   56|    595|    for (k = 0; k < num_compression_eq_count; k++) {
  ------------------
  |  Branch (56:17): [True: 0, False: 595]
  ------------------
   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|    595|  }
   62|  1.82k|  eq_set_id[k] = 0;
   63|  1.82k|  signal_peak_level[k] = 0.0f;
   64|  1.82k|  explicit_peak_information_present[k] = 0;
   65|  1.82k|  k++;
   66|       |
   67|  1.82k|  pre_lim_count = k;
   68|       |
   69|  1.82k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (69:7): [True: 595, False: 1.22k]
  ------------------
   70|    595|    loudness_drc_set_id_requested = 0;
   71|  1.22k|  } else {
   72|  1.22k|    loudness_drc_set_id_requested = drc_set_id_requested;
   73|  1.22k|  }
   74|       |
   75|  1.82k|  if (album_mode == 1) {
  ------------------
  |  Branch (75:7): [True: 0, False: 1.82k]
  ------------------
   76|      0|    mode = 1;
   77|      0|    loudness_info_count = pstr_loudness_info->loudness_info_album_count;
   78|  1.82k|  } else {
   79|  1.82k|    mode = 0;
   80|  1.82k|    loudness_info_count = pstr_loudness_info->loudness_info_count;
   81|  1.82k|  }
   82|       |
   83|  19.5k|  for (n = 0; n < loudness_info_count; n++) {
  ------------------
  |  Branch (83:15): [True: 17.7k, False: 1.82k]
  ------------------
   84|  17.7k|    if (mode == 1) {
  ------------------
  |  Branch (84:9): [True: 0, False: 17.7k]
  ------------------
   85|      0|      loudness_info = &(pstr_loudness_info->str_loudness_info_album[n]);
   86|  17.7k|    } else {
   87|  17.7k|      loudness_info = &(pstr_loudness_info->loudness_info[n]);
   88|  17.7k|    }
   89|  17.7k|    if (loudness_drc_set_id_requested == loudness_info->drc_set_id &&
  ------------------
  |  Branch (89:9): [True: 3.05k, False: 14.7k]
  ------------------
   90|  3.05k|        requested_dwnmix_id == loudness_info->downmix_id) {
  ------------------
  |  Branch (90:9): [True: 2.38k, False: 666]
  ------------------
   91|  2.38k|      if (loudness_info->true_peak_level_present) {
  ------------------
  |  Branch (91:11): [True: 96, False: 2.28k]
  ------------------
   92|     96|        eq_set_id[peak_count] = loudness_info->eq_set_id;
   93|       |
   94|     96|        signal_peak_level[peak_count] = loudness_info->true_peak_level;
   95|     96|        explicit_peak_information_present[peak_count] = 1;
   96|       |
   97|     96|        match_found_flag = 1;
   98|     96|        peak_count++;
   99|     96|      }
  100|  2.38k|      if (match_found_flag == 0) {
  ------------------
  |  Branch (100:11): [True: 1.57k, False: 811]
  ------------------
  101|  1.57k|        if (loudness_info->sample_peak_level_present) {
  ------------------
  |  Branch (101:13): [True: 110, False: 1.46k]
  ------------------
  102|    110|          eq_set_id[peak_count] = loudness_info->eq_set_id;
  103|       |
  104|    110|          signal_peak_level[peak_count] = loudness_info->sample_peak_level;
  105|    110|          explicit_peak_information_present[peak_count] = 1;
  106|       |
  107|    110|          match_found_flag = 1;
  108|    110|          peak_count++;
  109|    110|        }
  110|  1.57k|      }
  111|  2.38k|    }
  112|  17.7k|  }
  113|  1.82k|  if (match_found_flag == 0) {
  ------------------
  |  Branch (113:7): [True: 1.66k, False: 163]
  ------------------
  114|  14.6k|    for (n = 0; n < loudness_info_count; n++) {
  ------------------
  |  Branch (114:17): [True: 12.9k, False: 1.66k]
  ------------------
  115|  12.9k|      if (mode == 1) {
  ------------------
  |  Branch (115:11): [True: 0, False: 12.9k]
  ------------------
  116|      0|        loudness_info = &(pstr_loudness_info->str_loudness_info_album[n]);
  117|  12.9k|      } else {
  118|  12.9k|        loudness_info = &(pstr_loudness_info->loudness_info[n]);
  119|  12.9k|      }
  120|  12.9k|      if (ID_FOR_ANY_DRC == loudness_info->drc_set_id &&
  ------------------
  |  |  138|  12.9k|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  |  Branch (120:11): [True: 460, False: 12.4k]
  ------------------
  121|    460|          requested_dwnmix_id == loudness_info->downmix_id) {
  ------------------
  |  Branch (121:11): [True: 357, False: 103]
  ------------------
  122|    357|        if (loudness_info->true_peak_level_present) {
  ------------------
  |  Branch (122:13): [True: 108, False: 249]
  ------------------
  123|    108|          eq_set_id[peak_count] = loudness_info->eq_set_id;
  124|       |
  125|    108|          signal_peak_level[peak_count] = loudness_info->true_peak_level;
  126|    108|          explicit_peak_information_present[peak_count] = 1;
  127|       |
  128|    108|          match_found_flag = 1;
  129|    108|          peak_count++;
  130|    108|        }
  131|    357|        if (match_found_flag == 0) {
  ------------------
  |  Branch (131:13): [True: 226, False: 131]
  ------------------
  132|    226|          if (loudness_info->sample_peak_level_present) {
  ------------------
  |  Branch (132:15): [True: 40, False: 186]
  ------------------
  133|     40|            eq_set_id[peak_count] = loudness_info->eq_set_id;
  134|       |
  135|     40|            signal_peak_level[peak_count] = loudness_info->sample_peak_level;
  136|     40|            explicit_peak_information_present[peak_count] = 1;
  137|       |
  138|     40|            match_found_flag = 1;
  139|     40|            peak_count++;
  140|     40|          }
  141|    226|        }
  142|    357|      }
  143|  12.9k|    }
  144|  1.66k|  }
  145|  1.82k|  if (match_found_flag == 0) {
  ------------------
  |  Branch (145:7): [True: 1.56k, False: 263]
  ------------------
  146|  3.12k|    for (i = 0; i < str_drc_instruction_str->dwnmix_id_count; i++) {
  ------------------
  |  Branch (146:17): [True: 1.56k, False: 1.56k]
  ------------------
  147|  1.56k|      if (requested_dwnmix_id == str_drc_instruction_str->downmix_id[0] ||
  ------------------
  |  Branch (147:11): [True: 1.56k, False: 0]
  ------------------
  148|  1.56k|          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.56k|        if (str_drc_instruction_str->limiter_peak_target_present) {
  ------------------
  |  Branch (149:13): [True: 0, False: 1.56k]
  ------------------
  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.56k|      }
  188|  1.56k|    }
  189|  1.56k|  }
  190|  1.82k|  if (match_found_flag == 0) {
  ------------------
  |  Branch (190:7): [True: 1.56k, False: 263]
  ------------------
  191|  1.56k|    for (i = 1; i < str_drc_instruction_str->dwnmix_id_count; i++) {
  ------------------
  |  Branch (191:17): [True: 0, False: 1.56k]
  ------------------
  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.56k|  }
  206|  1.82k|  if (match_found_flag == 0) {
  ------------------
  |  Branch (206:7): [True: 1.56k, False: 263]
  ------------------
  207|  1.56k|    if (requested_dwnmix_id != ID_FOR_BASE_LAYOUT) {
  ------------------
  |  |  135|  1.56k|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  |  Branch (207:9): [True: 0, False: 1.56k]
  ------------------
  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.56k|  }
  323|  1.82k|  if (peak_count > 0) {
  ------------------
  |  Branch (323:7): [True: 263, False: 1.56k]
  ------------------
  324|    263|    *peak_info_count = peak_count;
  325|  1.56k|  } else {
  326|  1.56k|    *peak_info_count = pre_lim_count;
  327|  1.56k|  }
  328|  1.82k|  return;
  329|  1.82k|}
impd_extract_loudness_peak_to_average_info:
  335|  2.72k|    FLOAT32* loudness_peak_2_avg_value) {
  336|  2.72k|  WORD32 k;
  337|  2.72k|  WORD32 program_loudness_present = 0;
  338|  2.72k|  WORD32 peak_loudness_present = 0;
  339|  2.72k|  WORD32 match_measure_program_loudness = 0;
  340|  2.72k|  WORD32 match_measure_peak_loudness = 0;
  341|  2.72k|  FLOAT32 program_loudness = 0.0f;
  342|  2.72k|  FLOAT32 peak_loudness = 0.0f;
  343|  2.72k|  ia_loudness_measure_struct* loudness_measure = NULL;
  344|       |
  345|  6.08k|  for (k = 0; k < loudness_info->measurement_count; k++) {
  ------------------
  |  Branch (345:15): [True: 3.35k, False: 2.72k]
  ------------------
  346|  3.35k|    loudness_measure = &(loudness_info->loudness_measure[k]);
  347|  3.35k|    if (loudness_measure->method_def == METHOD_DEFINITION_PROGRAM_LOUDNESS) {
  ------------------
  |  |   28|  3.35k|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  |  Branch (347:9): [True: 926, False: 2.43k]
  ------------------
  348|    926|      if (match_measure_program_loudness <
  ------------------
  |  Branch (348:11): [True: 118, False: 808]
  ------------------
  349|    926|          measurement_method_prog_loudness_tbl[loudness_measure
  350|    926|                                                   ->measurement_system]) {
  351|    118|        program_loudness = loudness_measure->method_val;
  352|    118|        program_loudness_present = 1;
  353|    118|        match_measure_program_loudness =
  354|    118|            measurement_method_prog_loudness_tbl[loudness_measure
  355|    118|                                                     ->measurement_system];
  356|    118|      }
  357|    926|    }
  358|  3.35k|    switch (dyn_range_measurement_type) {
  359|  3.35k|      case SHORT_TERM_LOUDNESS_TO_AVG:
  ------------------
  |  |  106|  3.35k|#define SHORT_TERM_LOUDNESS_TO_AVG 0
  ------------------
  |  Branch (359:7): [True: 3.35k, False: 0]
  ------------------
  360|  3.35k|        if (loudness_measure->method_def ==
  ------------------
  |  Branch (360:13): [True: 180, False: 3.17k]
  ------------------
  361|  3.35k|            METHOD_DEFINITION_SHORT_TERM_LOUDNESS_MAX) {
  ------------------
  |  |   32|  3.35k|#define METHOD_DEFINITION_SHORT_TERM_LOUDNESS_MAX 5
  ------------------
  362|    180|          if (match_measure_peak_loudness <
  ------------------
  |  Branch (362:15): [True: 90, False: 90]
  ------------------
  363|    180|              measurement_method_peak_loudness_tbl[loudness_measure
  364|    180|                                                       ->measurement_system]) {
  365|     90|            peak_loudness = loudness_measure->method_val;
  366|     90|            peak_loudness_present = 1;
  367|     90|            match_measure_peak_loudness =
  368|     90|                measurement_method_peak_loudness_tbl[loudness_measure
  369|     90|                                                         ->measurement_system];
  370|     90|          }
  371|    180|        }
  372|  3.35k|        break;
  373|       |
  374|      0|      case MOMENTARY_LOUDNESS_TO_AVG:
  ------------------
  |  |  107|      0|#define MOMENTARY_LOUDNESS_TO_AVG 1
  ------------------
  |  Branch (374:7): [True: 0, False: 3.35k]
  ------------------
  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.35k]
  ------------------
  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.35k]
  ------------------
  405|      0|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  406|       |
  407|      0|        break;
  408|  3.35k|    }
  409|  3.35k|  }
  410|  2.72k|  if ((program_loudness_present == 1) && (peak_loudness_present == 1)) {
  ------------------
  |  Branch (410:7): [True: 118, False: 2.61k]
  |  Branch (410:42): [True: 69, False: 49]
  ------------------
  411|     69|    *loudness_peak_2_avg_value = peak_loudness - program_loudness;
  412|     69|    *loudness_peak_2_avg_value_present = 1;
  413|     69|  }
  414|  2.72k|  return (0);
  415|  2.72k|}
impd_loudness_peak_to_average_info:
  422|    928|    FLOAT32* loudness_peak_2_avg_value) {
  423|    928|  WORD32 n, err;
  424|    928|  WORD32 drc_set_id = max(0, str_drc_instruction_str->drc_set_id);
  ------------------
  |  |  224|    928|#define max(a, b) ((a) > (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (224:20): [True: 148, False: 780]
  |  |  ------------------
  ------------------
  425|       |
  426|    928|  *loudness_peak_2_avg_value_present = 0;
  427|       |
  428|    928|  if (album_mode == 1) {
  ------------------
  |  Branch (428:7): [True: 0, False: 928]
  ------------------
  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|    928|  if (*loudness_peak_2_avg_value_present == 0) {
  ------------------
  |  Branch (442:7): [True: 928, False: 0]
  ------------------
  443|  22.5k|    for (n = 0; n < pstr_loudness_info->loudness_info_count; n++) {
  ------------------
  |  Branch (443:17): [True: 21.6k, False: 928]
  ------------------
  444|  21.6k|      ia_loudness_info_struct* loudness_info =
  445|  21.6k|          &(pstr_loudness_info->loudness_info[n]);
  446|  21.6k|      if (drc_set_id == loudness_info->drc_set_id) {
  ------------------
  |  Branch (446:11): [True: 3.24k, False: 18.4k]
  ------------------
  447|  3.24k|        if (requested_dwnmix_id == loudness_info->downmix_id) {
  ------------------
  |  Branch (447:13): [True: 2.72k, False: 516]
  ------------------
  448|  2.72k|          err = impd_extract_loudness_peak_to_average_info(
  449|  2.72k|              loudness_info, dyn_range_measurement_type,
  450|  2.72k|              loudness_peak_2_avg_value_present, loudness_peak_2_avg_value);
  451|  2.72k|          if (err) return (err);
  ------------------
  |  Branch (451:15): [True: 0, False: 2.72k]
  ------------------
  452|  2.72k|        }
  453|  3.24k|      }
  454|  21.6k|    }
  455|    928|  }
  456|    928|  return (0);
  457|    928|}
impd_overall_loudness_present:
  460|  10.3k|                                   WORD32* loudness_info_present) {
  461|  10.3k|  WORD32 m;
  462|       |
  463|  10.3k|  *loudness_info_present = 0;
  464|  18.8k|  for (m = 0; m < loudness_info->measurement_count; m++) {
  ------------------
  |  Branch (464:15): [True: 8.52k, False: 10.3k]
  ------------------
  465|  8.52k|    if ((loudness_info->loudness_measure[m].method_def ==
  ------------------
  |  Branch (465:9): [True: 1.69k, False: 6.83k]
  ------------------
  466|  8.52k|         METHOD_DEFINITION_PROGRAM_LOUDNESS) ||
  ------------------
  |  |   28|  8.52k|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  467|  6.83k|        (loudness_info->loudness_measure[m].method_def ==
  ------------------
  |  Branch (467:9): [True: 726, False: 6.10k]
  ------------------
  468|  6.83k|         METHOD_DEFINITION_ANCHOR_LOUDNESS)) {
  ------------------
  |  |   29|  6.83k|#define METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
  469|  2.42k|      *loudness_info_present = 1;
  470|  2.42k|    }
  471|  8.52k|  }
  472|  10.3k|  return;
  473|  10.3k|}
impd_check_loud_info:
  479|  13.3k|                            ia_loudness_info_struct* loudness_info_matching[]) {
  480|  13.3k|  WORD32 n;
  481|  13.3k|  WORD32 loudness_info_present;
  482|  88.9k|  for (n = 0; n < loudness_info_count; n++) {
  ------------------
  |  Branch (482:15): [True: 75.5k, False: 13.3k]
  ------------------
  483|  75.5k|    if (requested_dwnmix_id == loudness_info[n].downmix_id) {
  ------------------
  |  Branch (483:9): [True: 34.6k, False: 40.8k]
  ------------------
  484|  34.6k|      if (drc_set_id_requested == loudness_info[n].drc_set_id) {
  ------------------
  |  Branch (484:11): [True: 10.3k, False: 24.3k]
  ------------------
  485|  10.3k|        impd_overall_loudness_present(&(loudness_info[n]),
  486|  10.3k|                                      &loudness_info_present);
  487|       |
  488|  10.3k|        if (loudness_info_present) {
  ------------------
  |  Branch (488:13): [True: 1.35k, False: 9.00k]
  ------------------
  489|  1.35k|          loudness_info_matching[*info_count] = &(loudness_info[n]);
  490|  1.35k|          (*info_count)++;
  491|  1.35k|        }
  492|  10.3k|      }
  493|  34.6k|    }
  494|  75.5k|  }
  495|       |
  496|  13.3k|  return (0);
  497|  13.3k|}
impd_check_loud_payload:
  502|  1.82k|    ia_loudness_info_struct* loudness_info_matching[]) {
  503|  1.82k|  WORD32 err = 0;
  504|       |
  505|  1.82k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  506|  1.82k|                             requested_dwnmix_id, drc_set_id_requested,
  507|  1.82k|                             info_count, loudness_info_matching);
  508|  1.82k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (508:7): [True: 0, False: 1.82k]
  |  Branch (508:14): [True: 169, False: 1.65k]
  ------------------
  509|  1.65k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  510|  1.65k|                             ID_FOR_ANY_DOWNMIX, drc_set_id_requested,
  ------------------
  |  |  136|  1.65k|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  511|  1.65k|                             info_count, loudness_info_matching);
  512|  1.65k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (512:7): [True: 0, False: 1.65k]
  |  Branch (512:14): [True: 16, False: 1.63k]
  ------------------
  513|  1.63k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  514|  1.63k|                             requested_dwnmix_id, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  138|  1.63k|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  515|  1.63k|                             loudness_info_matching);
  516|  1.63k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (516:7): [True: 0, False: 1.63k]
  |  Branch (516:14): [True: 79, False: 1.55k]
  ------------------
  517|  1.55k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  518|  1.55k|                             requested_dwnmix_id, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  137|  1.55k|#define ID_FOR_NO_DRC 0x0
  ------------------
  519|  1.55k|                             loudness_info_matching);
  520|  1.55k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (520:7): [True: 0, False: 1.55k]
  |  Branch (520:14): [True: 217, False: 1.34k]
  ------------------
  521|  1.34k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  522|  1.34k|                             ID_FOR_ANY_DOWNMIX, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  136|  1.34k|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
                                           ID_FOR_ANY_DOWNMIX, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  138|  1.34k|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  523|  1.34k|                             loudness_info_matching);
  524|  1.34k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (524:7): [True: 0, False: 1.34k]
  |  Branch (524:14): [True: 5, False: 1.33k]
  ------------------
  525|  1.33k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  526|  1.33k|                             ID_FOR_ANY_DOWNMIX, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  136|  1.33k|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
                                           ID_FOR_ANY_DOWNMIX, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  137|  1.33k|#define ID_FOR_NO_DRC 0x0
  ------------------
  527|  1.33k|                             loudness_info_matching);
  528|  1.33k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (528:7): [True: 0, False: 1.33k]
  |  Branch (528:14): [True: 7, False: 1.33k]
  ------------------
  529|  1.33k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  530|  1.33k|                             ID_FOR_BASE_LAYOUT, drc_set_id_requested,
  ------------------
  |  |  135|  1.33k|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  531|  1.33k|                             info_count, loudness_info_matching);
  532|  1.33k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (532:7): [True: 0, False: 1.33k]
  |  Branch (532:14): [True: 0, False: 1.33k]
  ------------------
  533|  1.33k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  534|  1.33k|                             ID_FOR_BASE_LAYOUT, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  135|  1.33k|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
                                           ID_FOR_BASE_LAYOUT, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  138|  1.33k|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  535|  1.33k|                             loudness_info_matching);
  536|  1.33k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (536:7): [True: 0, False: 1.33k]
  |  Branch (536:14): [True: 0, False: 1.33k]
  ------------------
  537|  1.33k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  538|  1.33k|                             ID_FOR_BASE_LAYOUT, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  135|  1.33k|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
                                           ID_FOR_BASE_LAYOUT, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  137|  1.33k|#define ID_FOR_NO_DRC 0x0
  ------------------
  539|  1.33k|                             loudness_info_matching);
  540|  1.33k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (540:7): [True: 0, False: 1.33k]
  |  Branch (540:14): [True: 0, False: 1.33k]
  ------------------
  541|  1.82k|matchEnd:
  542|  1.82k|  return (err);
  543|  1.33k|}
impd_find_overall_loudness_info:
  550|  1.82k|    ia_loudness_info_struct* loudness_info_matching[]) {
  551|  1.82k|  WORD32 err;
  552|  1.82k|  WORD32 loudness_drc_set_id_requested;
  553|       |
  554|  1.82k|  *info_count = 0;
  555|  1.82k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (555:7): [True: 595, False: 1.22k]
  ------------------
  556|    595|    loudness_drc_set_id_requested = ID_FOR_NO_DRC;
  ------------------
  |  |  137|    595|#define ID_FOR_NO_DRC 0x0
  ------------------
  557|  1.22k|  } else {
  558|  1.22k|    loudness_drc_set_id_requested = drc_set_id_requested;
  559|  1.22k|  }
  560|  1.82k|  if (pstr_drc_sel_proc_params_struct->album_mode == 1) {
  ------------------
  |  Branch (560:7): [True: 0, False: 1.82k]
  ------------------
  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.82k|  if (*info_count == 0) {
  ------------------
  |  Branch (567:7): [True: 1.82k, False: 0]
  ------------------
  568|  1.82k|    err = impd_check_loud_payload(pstr_loudness_info->loudness_info_count,
  569|  1.82k|                                  pstr_loudness_info->loudness_info,
  570|  1.82k|                                  requested_dwnmix_id,
  571|  1.82k|                                  loudness_drc_set_id_requested,
  572|       |
  573|  1.82k|                                  info_count, loudness_info_matching);
  574|  1.82k|    if (err) return (err);
  ------------------
  |  Branch (574:9): [True: 0, False: 1.82k]
  ------------------
  575|  1.82k|  }
  576|  1.82k|  *overall_loudness_info_present = (*info_count > 0);
  577|  1.82k|  return (0);
  578|  1.82k|}
impd_init_loudness_control:
  701|  1.82k|    FLOAT32 loudness_normalization_gain_db[], FLOAT32 loudness[]) {
  702|  1.82k|  WORD32 err, k, info_count = 0, pre_lim_count;
  703|  1.82k|  WORD32 loudness_hp_adjust_present;
  704|  1.82k|  WORD32 overall_loudness_info_present;
  705|  1.82k|  FLOAT32 pre_proc_adjust;
  706|       |
  707|  1.82k|  k = 0;
  708|  1.82k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (708:7): [True: 595, False: 1.22k]
  ------------------
  709|    595|    for (k = 0; k < num_compression_eq_count; k++) {
  ------------------
  |  Branch (709:17): [True: 0, False: 595]
  ------------------
  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|    595|  }
  715|  1.82k|  if (k >= MAX_NUM_COMPRESSION_EQ) return UNEXPECTED_ERROR;
  ------------------
  |  |  125|  1.82k|#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.82k]
  ------------------
  716|  1.82k|  eq_set_id[k] = 0;
  717|       |
  718|  1.82k|  loudness[k] = UNDEFINED_LOUDNESS_VALUE;
  ------------------
  |  |  134|  1.82k|#define UNDEFINED_LOUDNESS_VALUE 1000.0f
  ------------------
  719|       |
  720|  1.82k|  loudness_normalization_gain_db[k] = 0.0f;
  721|  1.82k|  k++;
  722|       |
  723|  1.82k|  pre_lim_count = k;
  724|       |
  725|  1.82k|  if (pstr_drc_sel_proc_params_struct->loudness_normalization_on == 1) {
  ------------------
  |  Branch (725:7): [True: 1.82k, False: 0]
  ------------------
  726|  1.82k|    WORD32 n;
  727|  1.82k|    ia_loudness_info_struct* loudness_info[16];
  728|  1.82k|    err = impd_find_overall_loudness_info(
  729|  1.82k|        pstr_drc_sel_proc_params_struct, pstr_loudness_info,
  730|  1.82k|        requested_dwnmix_id, drc_set_id_requested,
  731|  1.82k|        &overall_loudness_info_present, &info_count, loudness_info);
  732|  1.82k|    if (err) return (err);
  ------------------
  |  Branch (732:9): [True: 0, False: 1.82k]
  ------------------
  733|       |
  734|  1.82k|    if (overall_loudness_info_present == 1) {
  ------------------
  |  Branch (734:9): [True: 493, False: 1.33k]
  ------------------
  735|    493|      WORD32 requested_method_definition = METHOD_DEFINITION_PROGRAM_LOUDNESS;
  ------------------
  |  |   28|    493|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  736|    493|      WORD32 other_method_definition = METHOD_DEFINITION_PROGRAM_LOUDNESS;
  ------------------
  |  |   28|    493|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  737|    493|      WORD32 requested_preprocessing = 0;
  738|       |
  739|    493|      const WORD32* system_bonus = measurement_system_default_tbl;
  740|       |
  741|    493|      WORD32 match_measure;
  742|    493|      FLOAT32 method_val = 0;
  743|       |
  744|    493|      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: 493]
  ------------------
  746|    368|        case USER_METHOD_DEFINITION_PROGRAM_LOUDNESS:
  ------------------
  |  |   85|    368|#define USER_METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  |  Branch (746:9): [True: 368, False: 125]
  ------------------
  747|    368|          requested_method_definition = METHOD_DEFINITION_PROGRAM_LOUDNESS;
  ------------------
  |  |   28|    368|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  748|    368|          other_method_definition = METHOD_DEFINITION_ANCHOR_LOUDNESS;
  ------------------
  |  |   29|    368|#define METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
  749|    368|          break;
  750|    125|        case USER_METHOD_DEFINITION_ANCHOR_LOUDNESS:
  ------------------
  |  |   86|    125|#define USER_METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
  |  Branch (750:9): [True: 125, False: 368]
  ------------------
  751|    125|          requested_method_definition = METHOD_DEFINITION_ANCHOR_LOUDNESS;
  ------------------
  |  |   29|    125|#define METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
  752|    125|          other_method_definition = METHOD_DEFINITION_PROGRAM_LOUDNESS;
  ------------------
  |  |   28|    125|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  753|    125|          break;
  754|       |
  755|      0|        default:
  ------------------
  |  Branch (755:9): [True: 0, False: 493]
  ------------------
  756|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  757|      0|          break;
  758|    493|      }
  759|       |
  760|    493|      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: 493]
  ------------------
  762|    488|        case USER_MEASUREMENT_SYSTEM_BS_1770_4:
  ------------------
  |  |   89|    488|#define USER_MEASUREMENT_SYSTEM_BS_1770_4 1
  ------------------
  |  Branch (762:9): [True: 488, False: 5]
  ------------------
  763|    488|          system_bonus = measurement_system_bs1770_3_tbl;
  764|    488|          break;
  765|      0|        case USER_MEASUREMENT_SYSTEM_USER:
  ------------------
  |  |   91|      0|#define USER_MEASUREMENT_SYSTEM_USER 2
  ------------------
  |  Branch (765:9): [True: 0, False: 493]
  ------------------
  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: 488]
  ------------------
  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: 493]
  ------------------
  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: 493]
  ------------------
  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: 493]
  ------------------
  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: 493]
  ------------------
  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: 493]
  ------------------
  784|      0|          system_bonus = measurement_system_rms_e_tbl;
  785|      0|          break;
  786|       |
  787|      0|        default:
  ------------------
  |  Branch (787:9): [True: 0, False: 493]
  ------------------
  788|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  789|      0|          break;
  790|    493|      }
  791|       |
  792|    493|      switch (pstr_drc_sel_proc_params_struct->loudness_measurement_pre_proc) {
  793|    493|        case USER_LOUDNESS_PREPROCESSING_DEFAULT:
  ------------------
  |  |   99|    493|#define USER_LOUDNESS_PREPROCESSING_DEFAULT 0
  ------------------
  |  Branch (793:9): [True: 493, False: 0]
  ------------------
  794|    493|        case USER_LOUDNESS_PREPROCESSING_OFF:
  ------------------
  |  |  100|    493|#define USER_LOUDNESS_PREPROCESSING_OFF 1
  ------------------
  |  Branch (794:9): [True: 0, False: 493]
  ------------------
  795|    493|          requested_preprocessing = 0;
  796|    493|          break;
  797|      0|        case USER_LOUDNESS_PREPROCESSING_HIGHPASS:
  ------------------
  |  |  101|      0|#define USER_LOUDNESS_PREPROCESSING_HIGHPASS 2
  ------------------
  |  Branch (797:9): [True: 0, False: 493]
  ------------------
  798|      0|          requested_preprocessing = 1;
  799|      0|          break;
  800|       |
  801|      0|        default:
  ------------------
  |  Branch (801:9): [True: 0, False: 493]
  ------------------
  802|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  803|      0|          break;
  804|    493|      }
  805|       |
  806|  1.85k|      for (k = 0; k < info_count; k++) {
  ------------------
  |  Branch (806:19): [True: 1.35k, False: 493]
  ------------------
  807|  1.35k|        match_measure = -1;
  808|  8.06k|        for (n = 0; n < loudness_info[k]->measurement_count; n++) {
  ------------------
  |  Branch (808:21): [True: 6.70k, False: 1.35k]
  ------------------
  809|  6.70k|          ia_loudness_measure_struct* loudness_measure =
  810|  6.70k|              &(loudness_info[k]->loudness_measure[n]);
  811|  6.70k|          if (match_measure <
  ------------------
  |  Branch (811:15): [True: 4.39k, False: 2.31k]
  ------------------
  812|  6.70k|                  system_bonus[loudness_measure->measurement_system] &&
  813|  4.39k|              requested_method_definition == loudness_measure->method_def) {
  ------------------
  |  Branch (813:15): [True: 1.04k, False: 3.35k]
  ------------------
  814|  1.04k|            method_val = loudness_measure->method_val;
  815|  1.04k|            match_measure = system_bonus[loudness_measure->measurement_system];
  816|  1.04k|          }
  817|  6.70k|        }
  818|  1.35k|        if (match_measure == -1) {
  ------------------
  |  Branch (818:13): [True: 513, False: 846]
  ------------------
  819|  2.78k|          for (n = 0; n < loudness_info[k]->measurement_count; n++) {
  ------------------
  |  Branch (819:23): [True: 2.27k, False: 513]
  ------------------
  820|  2.27k|            ia_loudness_measure_struct* loudness_measure =
  821|  2.27k|                &(loudness_info[k]->loudness_measure[n]);
  822|  2.27k|            if (match_measure <
  ------------------
  |  Branch (822:17): [True: 1.33k, False: 931]
  ------------------
  823|  2.27k|                    system_bonus[loudness_measure->measurement_system] &&
  824|  1.33k|                other_method_definition == loudness_measure->method_def) {
  ------------------
  |  Branch (824:17): [True: 578, False: 761]
  ------------------
  825|    578|              method_val = loudness_measure->method_val;
  826|    578|              match_measure =
  827|    578|                  system_bonus[loudness_measure->measurement_system];
  828|    578|            }
  829|  2.27k|          }
  830|    513|        }
  831|       |
  832|  1.35k|        if (requested_preprocessing == 1) {
  ------------------
  |  Branch (832:13): [True: 0, False: 1.35k]
  ------------------
  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.35k|        eq_set_id[k] = 0;
  848|       |
  849|  1.35k|        loudness_normalization_gain_db[k] =
  850|  1.35k|            pstr_drc_sel_proc_params_struct->target_loudness - method_val;
  851|  1.35k|        loudness[k] = method_val;
  852|  1.35k|      }
  853|    493|    }
  854|  1.82k|  }
  855|  1.82k|  if (info_count > 0) {
  ------------------
  |  Branch (855:7): [True: 493, False: 1.33k]
  ------------------
  856|    493|    *loudness_info_count = info_count;
  857|  1.33k|  } else {
  858|  1.33k|    *loudness_info_count = pre_lim_count;
  859|  1.33k|  }
  860|       |
  861|  1.82k|  return (0);
  862|  1.82k|}
impd_mixing_level_info:
  870|  2.66k|    WORD32 eq_set_id_requested, FLOAT32* mixing_level) {
  871|  2.66k|  WORD32 n, k, info_count;
  872|  2.66k|  WORD32 album_mode = pstr_drc_sel_proc_params_struct->album_mode;
  873|  2.66k|  WORD32 loudness_drc_set_id_requested;
  874|  2.66k|  ia_loudness_info_struct* loudness_info;
  875|       |
  876|  2.66k|  *mixing_level = MIXING_LEVEL_DEFAULT;
  ------------------
  |  |  864|  2.66k|#define MIXING_LEVEL_DEFAULT 85.0f
  ------------------
  877|  2.66k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (877:7): [True: 765, False: 1.89k]
  ------------------
  878|    765|    loudness_drc_set_id_requested = 0;
  879|  1.89k|  } else {
  880|  1.89k|    loudness_drc_set_id_requested = drc_set_id_requested;
  881|  1.89k|  }
  882|  2.66k|  if (album_mode == 1) {
  ------------------
  |  Branch (882:7): [True: 0, False: 2.66k]
  ------------------
  883|      0|    info_count = pstr_loudness_info->loudness_info_album_count;
  884|      0|    loudness_info = pstr_loudness_info->str_loudness_info_album;
  885|  2.66k|  } else {
  886|  2.66k|    info_count = pstr_loudness_info->loudness_info_count;
  887|  2.66k|    loudness_info = pstr_loudness_info->loudness_info;
  888|  2.66k|  }
  889|  46.8k|  for (n = 0; n < info_count; n++) {
  ------------------
  |  Branch (889:15): [True: 44.1k, False: 2.66k]
  ------------------
  890|  44.1k|    if ((requested_dwnmix_id == loudness_info[n].downmix_id) ||
  ------------------
  |  Branch (890:9): [True: 30.5k, False: 13.6k]
  ------------------
  891|  31.0k|        (ID_FOR_ANY_DOWNMIX == loudness_info[n].downmix_id)) {
  ------------------
  |  |  136|  13.6k|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (891:9): [True: 555, False: 13.1k]
  ------------------
  892|  31.0k|      if (loudness_drc_set_id_requested == loudness_info[n].drc_set_id) {
  ------------------
  |  Branch (892:11): [True: 6.23k, False: 24.8k]
  ------------------
  893|  6.23k|        if (eq_set_id_requested == loudness_info[n].eq_set_id) {
  ------------------
  |  Branch (893:13): [True: 6.20k, False: 27]
  ------------------
  894|  13.2k|          for (k = 0; k < loudness_info[n].measurement_count; k++) {
  ------------------
  |  Branch (894:23): [True: 7.06k, False: 6.16k]
  ------------------
  895|  7.06k|            if (loudness_info[n].loudness_measure[k].method_def ==
  ------------------
  |  Branch (895:17): [True: 44, False: 7.01k]
  ------------------
  896|  7.06k|                METHOD_DEFINITION_MIXING_LEVEL) {
  ------------------
  |  |   34|  7.06k|#define METHOD_DEFINITION_MIXING_LEVEL 7
  ------------------
  897|     44|              *mixing_level = loudness_info[n].loudness_measure[k].method_val;
  898|     44|              break;
  899|     44|            }
  900|  7.06k|          }
  901|  6.20k|        }
  902|  6.23k|      }
  903|  31.0k|    }
  904|  44.1k|  }
  905|  2.66k|  return (0);
  906|  2.66k|}

impd_process_time_domain:
   77|  21.1k|IA_ERRORCODE impd_process_time_domain(ia_drc_api_struct *p_obj_drc) {
   78|  21.1k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   36|  21.1k|#define IA_NO_ERROR 0x00000000
  ------------------
   79|  21.1k|  WORD32 i, j;
   80|  21.1k|  FLOAT32 *audio_buff[10];
   81|  21.1k|  WORD32 last_frame = 0;
   82|  21.1k|  WORD32 num_sample_to_process;
   83|       |
   84|  21.1k|  if (p_obj_drc->p_state->ui_in_bytes <= 0) {
  ------------------
  |  Branch (84:7): [True: 308, False: 20.8k]
  ------------------
   85|    308|    p_obj_drc->p_state->ui_out_bytes = 0;
   86|    308|    return IA_NO_ERROR;
  ------------------
  |  |   36|    308|#define IA_NO_ERROR 0x00000000
  ------------------
   87|    308|  }
   88|       |
   89|  20.8k|  p_obj_drc->str_payload.pstr_loudness_info->loudness_info_album_count = 0;
   90|  20.8k|  p_obj_drc->str_payload.pstr_loudness_info->loudness_info_count = 0;
   91|  20.8k|  p_obj_drc->str_payload.pstr_loudness_info->loudness_info_set_ext_present = 0;
   92|  20.8k|  p_obj_drc->str_payload.pstr_drc_config->is_config_changed =
   93|  20.8k|      p_obj_drc->str_config.is_config_changed;
   94|       |
   95|  20.8k|  if (p_obj_drc->str_config.is_config_changed == 1) {
  ------------------
  |  Branch (95:7): [True: 0, False: 20.8k]
  ------------------
   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|  20.8k|  if (p_obj_drc->frame_count == 0) {
  ------------------
  |  Branch (125:7): [True: 1.31k, False: 19.5k]
  ------------------
  126|  1.31k|    p_obj_drc->str_config.ln_dbgain_prev =
  127|  1.31k|        (WORD32)p_obj_drc->str_payload.pstr_drc_sel_proc_output
  128|  1.31k|            ->loudness_normalization_gain_db;
  129|  1.31k|  }
  130|       |
  131|  20.8k|  if (!p_obj_drc->str_payload.pstr_drc_config->ln_gain_changed) {
  ------------------
  |  Branch (131:7): [True: 20.1k, False: 732]
  ------------------
  132|  20.1k|    if (p_obj_drc->str_payload.pstr_drc_sel_proc_output
  ------------------
  |  Branch (132:9): [True: 29, False: 20.0k]
  ------------------
  133|  20.1k|            ->loudness_normalization_gain_db !=
  134|  20.1k|        p_obj_drc->str_config.ln_dbgain_prev) {
  135|     29|      p_obj_drc->str_payload.pstr_drc_config->ln_gain_changed = 1;
  136|     29|    }
  137|  20.1k|  }
  138|       |
  139|  20.8k|  err_code = impd_process_drc_bitstream_dec_gain(
  140|  20.8k|      p_obj_drc->str_payload.pstr_bitstream_dec, p_obj_drc->pstr_bit_buf,
  141|  20.8k|      p_obj_drc->str_payload.pstr_drc_config,
  142|  20.8k|      p_obj_drc->str_payload.pstr_drc_gain,
  143|  20.8k|      p_obj_drc->str_bit_handler.it_bit_buf,
  144|  20.8k|      p_obj_drc->str_bit_handler.num_bytes_bs,
  145|  20.8k|      p_obj_drc->str_bit_handler.num_bits_offset_bs,
  146|  20.8k|      &p_obj_drc->str_bit_handler.num_bits_read_bs);
  147|       |
  148|  20.8k|  if (err_code > PROC_COMPLETE) return -1;
  ------------------
  |  |  127|  20.8k|#define PROC_COMPLETE 1
  ------------------
  |  Branch (148:7): [True: 2.31k, False: 18.5k]
  ------------------
  149|       |
  150|  18.5k|  p_obj_drc->str_bit_handler.num_bytes_read_bs =
  151|  18.5k|      (p_obj_drc->str_bit_handler.num_bits_read_bs >> 3);
  152|  18.5k|  p_obj_drc->str_bit_handler.num_bits_offset_bs =
  153|  18.5k|      (p_obj_drc->str_bit_handler.num_bits_read_bs & 7);
  154|  18.5k|  p_obj_drc->str_bit_handler.byte_index_bs +=
  155|  18.5k|      p_obj_drc->str_bit_handler.num_bytes_read_bs;
  156|       |
  157|  18.5k|  if (p_obj_drc->str_bit_handler.num_bits_offset_bs != 0) {
  ------------------
  |  Branch (157:7): [True: 10.7k, False: 7.74k]
  ------------------
  158|  10.7k|    p_obj_drc->str_bit_handler.num_bits_read_bs =
  159|  10.7k|        p_obj_drc->str_bit_handler.num_bits_read_bs + 8 -
  160|  10.7k|        p_obj_drc->str_bit_handler.num_bits_offset_bs;
  161|  10.7k|    p_obj_drc->str_bit_handler.num_bytes_read_bs =
  162|  10.7k|        p_obj_drc->str_bit_handler.num_bytes_read_bs + 1;
  163|  10.7k|    p_obj_drc->str_bit_handler.num_bits_offset_bs = 0;
  164|  10.7k|    p_obj_drc->str_bit_handler.byte_index_bs =
  165|  10.7k|        p_obj_drc->str_bit_handler.byte_index_bs + 1;
  166|  10.7k|  }
  167|       |
  168|  18.5k|  num_sample_to_process =
  169|  18.5k|      (p_obj_drc->p_state->ui_in_bytes / p_obj_drc->str_config.num_ch_in /
  170|  18.5k|       (p_obj_drc->str_config.pcm_size >> 3));
  171|       |
  172|  18.5k|  p_obj_drc->str_config.frame_size = num_sample_to_process;
  173|       |
  174|  18.5k|  if (num_sample_to_process < p_obj_drc->str_config.frame_size) last_frame = 1;
  ------------------
  |  Branch (174:7): [True: 0, False: 18.5k]
  ------------------
  175|       |
  176|  18.5k|  if (p_obj_drc->str_config.pcm_size == 16) {
  ------------------
  |  Branch (176:7): [True: 18.5k, False: 0]
  ------------------
  177|  18.5k|    FLOAT32 *scratch_buffer = (FLOAT32 *)p_obj_drc->pp_mem[1];
  178|  18.5k|    WORD16 *input_buffer16 = (WORD16 *)p_obj_drc->pp_mem[2];
  179|  48.5k|    for (i = 0; i < p_obj_drc->str_config.num_ch_in; i++) {
  ------------------
  |  Branch (179:17): [True: 30.0k, False: 18.5k]
  ------------------
  180|  30.0k|      audio_buff[i] =
  181|  30.0k|          scratch_buffer + i * (p_obj_drc->str_config.frame_size + 32);
  182|       |
  183|  59.3M|      for (j = 0; j < num_sample_to_process; j++) {
  ------------------
  |  Branch (183:19): [True: 59.3M, False: 30.0k]
  ------------------
  184|  59.3M|        audio_buff[i][j] =
  185|  59.3M|            ((FLOAT32)input_buffer16[j * p_obj_drc->str_config.num_ch_in + i]) /
  186|  59.3M|            32767.0f;
  187|  59.3M|      }
  188|  30.0k|    }
  189|  18.5k|  } 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|  18.5k|  err_code = impd_drc_process_time_domain(
  224|  18.5k|      p_obj_drc->str_payload.pstr_gain_dec[0],
  225|  18.5k|      p_obj_drc->str_payload.pstr_drc_config,
  226|  18.5k|      p_obj_drc->str_payload.pstr_drc_gain, audio_buff,
  227|  18.5k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output
  228|  18.5k|          ->loudness_normalization_gain_db,
  229|  18.5k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output->boost,
  230|  18.5k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output->compress,
  231|  18.5k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output
  232|  18.5k|          ->drc_characteristic_target);
  233|       |
  234|  18.5k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  18.5k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (234:7): [True: 703, False: 17.8k]
  ------------------
  235|       |
  236|  17.8k|  if (p_obj_drc->str_payload.pstr_drc_sel_proc_output->downmix_matrix_present !=
  ------------------
  |  Branch (236:7): [True: 0, False: 17.8k]
  ------------------
  237|  17.8k|      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|  17.8k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  17.8k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (241:7): [True: 0, False: 17.8k]
  ------------------
  242|       |
  243|  17.8k|  err_code = impd_drc_process_time_domain(
  244|  17.8k|      p_obj_drc->str_payload.pstr_gain_dec[1],
  245|  17.8k|      p_obj_drc->str_payload.pstr_drc_config,
  246|  17.8k|      p_obj_drc->str_payload.pstr_drc_gain, audio_buff,
  247|  17.8k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output
  248|  17.8k|          ->loudness_normalization_gain_db,
  249|  17.8k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output->boost,
  250|  17.8k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output->compress,
  251|  17.8k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output
  252|  17.8k|          ->drc_characteristic_target);
  253|       |
  254|  17.8k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  17.8k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (254:7): [True: 0, False: 17.8k]
  ------------------
  255|       |
  256|  17.8k|  if (p_obj_drc->str_payload.pstr_drc_config->apply_drc == 0 ||
  ------------------
  |  Branch (256:7): [True: 9.40k, False: 8.41k]
  ------------------
  257|  8.41k|      p_obj_drc->str_payload.pstr_drc_config->is_config_changed == 0 ||
  ------------------
  |  Branch (257:7): [True: 8.41k, False: 0]
  ------------------
  258|  17.8k|      p_obj_drc->str_payload.pstr_drc_config->ln_gain_changed == 0) {
  ------------------
  |  Branch (258:7): [True: 0, False: 0]
  ------------------
  259|  17.8k|    if (p_obj_drc->str_payload.pstr_drc_sel_proc_output
  ------------------
  |  Branch (259:9): [True: 596, False: 17.2k]
  ------------------
  260|  17.8k|          ->loudness_normalization_gain_db != 0.0f) {
  261|    596|      FLOAT32 gain_value =
  262|    596|          (FLOAT32)pow(10.0, p_obj_drc->str_payload.pstr_drc_sel_proc_output
  263|    596|                                   ->loudness_normalization_gain_db /
  264|    596|                               20.0);
  265|  1.71k|      for (i = 0; i < p_obj_drc->str_config.num_ch_out; i++) {
  ------------------
  |  Branch (265:19): [True: 1.11k, False: 596]
  ------------------
  266|  1.13M|        for (j = 0; j < p_obj_drc->str_config.frame_size; j++) {
  ------------------
  |  Branch (266:21): [True: 1.13M, False: 1.11k]
  ------------------
  267|  1.13M|          audio_buff[i][j] *= gain_value;
  268|  1.13M|        }
  269|  1.11k|      }
  270|    596|    }
  271|  17.8k|  }
  272|       |
  273|  17.8k|  if (p_obj_drc->str_config.peak_limiter) {
  ------------------
  |  Branch (273:7): [True: 0, False: 17.8k]
  ------------------
  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|  17.8k|  if (p_obj_drc->str_config.pcm_size == 16) {
  ------------------
  |  Branch (293:7): [True: 17.8k, False: 0]
  ------------------
  294|  17.8k|    WORD16 *output_buffer16 = (WORD16 *)p_obj_drc->pp_mem[3];
  295|  46.9k|    for (i = 0; i < p_obj_drc->str_config.num_ch_out; i++) {
  ------------------
  |  Branch (295:17): [True: 29.1k, False: 17.8k]
  ------------------
  296|  57.7M|      for (j = 0; j < p_obj_drc->str_config.frame_size; j++) {
  ------------------
  |  Branch (296:19): [True: 57.7M, False: 29.1k]
  ------------------
  297|  57.7M|        if (audio_buff[i][j] < -1.0f)
  ------------------
  |  Branch (297:13): [True: 63.3k, False: 57.7M]
  ------------------
  298|  63.3k|          output_buffer16[j * p_obj_drc->str_config.num_ch_out + i] = -32767;
  299|       |
  300|  57.7M|        else if (audio_buff[i][j] > 1.0f)
  ------------------
  |  Branch (300:18): [True: 63.3k, False: 57.6M]
  ------------------
  301|  63.3k|          output_buffer16[j * p_obj_drc->str_config.num_ch_out + i] = 32767;
  302|       |
  303|  57.6M|        else
  304|  57.6M|          output_buffer16[j * p_obj_drc->str_config.num_ch_out + i] =
  305|  57.6M|              (WORD16)(audio_buff[i][j] * 32767.0f);
  306|  57.7M|      }
  307|  29.1k|    }
  308|  17.8k|  } 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|  17.8k|  p_obj_drc->p_state->ui_out_bytes =
  341|  17.8k|      p_obj_drc->str_config.num_ch_out *
  342|  17.8k|      (p_obj_drc->p_state->ui_in_bytes / p_obj_drc->str_config.num_ch_in);
  343|       |
  344|  17.8k|  if (p_obj_drc->p_state->delay_in_output != 0) {
  ------------------
  |  Branch (344:7): [True: 0, False: 17.8k]
  ------------------
  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|  17.8k|  if (last_frame == 1) {
  ------------------
  |  Branch (366:7): [True: 0, False: 17.8k]
  ------------------
  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|  17.8k|  p_obj_drc->frame_count++;
  379|  17.8k|  return err_code;
  380|  17.8k|}

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

impd_apply_gains_and_add:
   41|  5.37k|    FLOAT32* channel_audio[], WORD32 impd_apply_gains) {
   42|  5.37k|  WORD32 c, b, g, i;
   43|  5.37k|  WORD32 offset = 0, signal_index = 0;
   44|  5.37k|  WORD32 gain_index_for_group[CHANNEL_GROUP_COUNT_MAX];
   45|  5.37k|  WORD32 signal_index_for_channel[MAX_CHANNEL_COUNT];
   46|  5.37k|  FLOAT32* lpcm_gains;
   47|  5.37k|  FLOAT32 sum;
   48|  5.37k|  FLOAT32 drc_gain_last = 0, gain_thr;
   49|  5.37k|  WORD32 i_end, i_start;
   50|  5.37k|  ia_drc_instructions_struct* str_drc_instruction_str =
   51|  5.37k|      &(pstr_drc_instruction_arr[drc_instructions_index]);
   52|       |
   53|  5.37k|  if (drc_instructions_index >= 0) {
  ------------------
  |  Branch (53:7): [True: 5.37k, False: 0]
  ------------------
   54|  5.37k|    str_drc_instruction_str =
   55|  5.37k|        &(pstr_drc_instruction_arr[drc_instructions_index]);
   56|  5.37k|    {
   57|  5.37k|      if (str_drc_instruction_str->drc_set_id > 0) {
  ------------------
  |  Branch (57:11): [True: 5.37k, False: 0]
  ------------------
   58|  5.37k|        if (ia_drc_params_struct->delay_mode == DELAY_MODE_LOW_DELAY) {
  ------------------
  |  |  117|  5.37k|#define DELAY_MODE_LOW_DELAY 1
  ------------------
  |  Branch (58:13): [True: 0, False: 5.37k]
  ------------------
   59|      0|          offset = ia_drc_params_struct->drc_frame_size;
   60|      0|        }
   61|  5.37k|        gain_index_for_group[0] = 0;
   62|  10.7k|        for (g = 0; g < str_drc_instruction_str->num_drc_ch_groups - 1; g++) {
  ------------------
  |  Branch (62:21): [True: 5.37k, False: 5.37k]
  ------------------
   63|  5.37k|          gain_index_for_group[g + 1] =
   64|  5.37k|              gain_index_for_group[g] +
   65|  5.37k|              str_drc_instruction_str->band_count_of_ch_group[g];
   66|  5.37k|        }
   67|  5.37k|        signal_index_for_channel[0] = 0;
   68|  7.01k|        for (c = 0; c < str_drc_instruction_str->audio_num_chan - 1; c++) {
  ------------------
  |  Branch (68:21): [True: 1.64k, False: 5.37k]
  ------------------
   69|  1.64k|          if (str_drc_instruction_str->channel_group_of_ch[c] >= 0) {
  ------------------
  |  Branch (69:15): [True: 1.64k, False: 0]
  ------------------
   70|  1.64k|            signal_index_for_channel[c + 1] =
   71|  1.64k|                signal_index_for_channel[c] +
   72|  1.64k|                str_drc_instruction_str->band_count_of_ch_group
   73|  1.64k|                    [str_drc_instruction_str->channel_group_of_ch[c]];
   74|  1.64k|          } else {
   75|      0|            signal_index_for_channel[c + 1] = signal_index_for_channel[c] + 1;
   76|      0|          }
   77|  1.64k|        }
   78|       |
   79|  16.1k|        for (g = 0; g < str_drc_instruction_str->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (79:21): [True: 10.7k, False: 5.37k]
  ------------------
   80|  21.4k|          for (b = 0; b < str_drc_instruction_str->band_count_of_ch_group[g];
  ------------------
  |  Branch (80:23): [True: 10.7k, False: 10.7k]
  ------------------
   81|  10.7k|               b++) {
   82|  10.7k|            if (str_drc_instruction_str->ch_group_parametric_drc_flag[g] == 0) {
  ------------------
  |  Branch (82:17): [True: 10.7k, False: 0]
  ------------------
   83|  10.7k|              lpcm_gains =
   84|  10.7k|                  pstr_gain_buf->buf_interpolation[gain_index_for_group[g] + b]
   85|  10.7k|                      .lpcm_gains +
   86|  10.7k|                  MAX_SIGNAL_DELAY - ia_drc_params_struct->gain_delay_samples -
  ------------------
  |  |   52|  10.7k|#define MAX_SIGNAL_DELAY 4500
  ------------------
   87|  10.7k|                  ia_drc_params_struct->audio_delay_samples + offset;
   88|  10.7k|            } 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|  10.7k|            i_end = 0;
   98|  10.7k|            i_start = 0;
   99|  21.4k|            while (i_end < ia_drc_params_struct->drc_frame_size) {
  ------------------
  |  Branch (99:20): [True: 10.7k, False: 10.7k]
  ------------------
  100|  10.7k|              if (shape_filter_block[g].shape_flter_block_flag) {
  ------------------
  |  Branch (100:19): [True: 0, False: 10.7k]
  ------------------
  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|  10.7k|              } else {
  107|  10.7k|                i_end = ia_drc_params_struct->drc_frame_size;
  108|  10.7k|              }
  109|       |
  110|  24.7k|              for (c = 0; c < str_drc_instruction_str->audio_num_chan; c++)
  ------------------
  |  Branch (110:27): [True: 14.0k, False: 10.7k]
  ------------------
  111|       |
  112|  14.0k|              {
  113|  14.0k|                if (g == str_drc_instruction_str->channel_group_of_ch[c]) {
  ------------------
  |  Branch (113:21): [True: 7.01k, False: 7.01k]
  ------------------
  114|  7.01k|                  signal_index = signal_index_for_channel[c] + b;
  115|       |
  116|  7.01k|                  if (impd_apply_gains == 1) {
  ------------------
  |  Branch (116:23): [True: 7.01k, False: 0]
  ------------------
  117|  7.01k|                    impd_shape_filt_block_time_process(
  118|  7.01k|                        &shape_filter_block[g], &lpcm_gains[0], signal_index,
  119|  7.01k|                        &deinterleaved_audio[signal_index][0], i_start, i_end);
  120|       |
  121|  7.01k|                  } 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|  7.01k|                }
  127|  14.0k|              }
  128|  10.7k|              if ((i_end < ia_drc_params_struct->drc_frame_size) &&
  ------------------
  |  Branch (128:19): [True: 0, False: 10.7k]
  ------------------
  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|  10.7k|              if ((i_end == i_start) &&
  ------------------
  |  Branch (133:19): [True: 0, False: 10.7k]
  ------------------
  134|      0|                  (drc_gain_last == shape_filter_block[g].drc_gain_last))
  ------------------
  |  Branch (134:19): [True: 0, False: 0]
  ------------------
  135|      0|                break;
  136|  10.7k|              i_start = i_end;
  137|  10.7k|            }
  138|  10.7k|          }
  139|  10.7k|        }
  140|  5.37k|      }
  141|  5.37k|    }
  142|  5.37k|  }
  143|       |
  144|  5.37k|  signal_index = 0;
  145|       |
  146|  5.37k|  if (str_drc_instruction_str->drc_set_id > 0) {
  ------------------
  |  Branch (146:7): [True: 5.37k, False: 0]
  ------------------
  147|  12.3k|    for (c = 0; c < str_drc_instruction_str->audio_num_chan; c++)
  ------------------
  |  Branch (147:17): [True: 7.01k, False: 5.37k]
  ------------------
  148|       |
  149|  7.01k|    {
  150|  7.01k|      g = str_drc_instruction_str->channel_group_of_ch[c];
  151|  7.01k|      if (g >= 0) {
  ------------------
  |  Branch (151:11): [True: 7.01k, False: 0]
  ------------------
  152|  16.2M|        for (i = 0; i < ia_drc_params_struct->drc_frame_size; i++) {
  ------------------
  |  Branch (152:21): [True: 16.2M, False: 7.01k]
  ------------------
  153|  16.2M|          sum = 0.0f;
  154|  32.5M|          for (b = 0; b < str_drc_instruction_str->band_count_of_ch_group[g];
  ------------------
  |  Branch (154:23): [True: 16.2M, False: 16.2M]
  ------------------
  155|  16.2M|               b++) {
  156|  16.2M|            sum += deinterleaved_audio[signal_index + b][i];
  157|  16.2M|          }
  158|       |
  159|  16.2M|          channel_audio[c][i] = sum;
  160|  16.2M|        }
  161|  7.01k|        signal_index += str_drc_instruction_str->band_count_of_ch_group[g];
  162|  7.01k|      } 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|  7.01k|    }
  169|  5.37k|  } 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|  5.37k|  return;
  180|  5.37k|}
impd_filter_banks_process:
  189|  5.37k|                          const WORD32 passThru) {
  190|  5.37k|  WORD32 c, g, e, i, num_bands;
  191|       |  // WORD32 err = 0;
  192|  5.37k|  FLOAT32* audio_in;
  193|  5.37k|  FLOAT32** audio_out;
  194|  5.37k|  ia_drc_filter_bank_struct* str_drc_filter_bank;
  195|  5.37k|  ia_drc_instructions_struct* str_drc_instruction_str;
  196|  5.37k|  WORD32 drc_frame_size = ia_drc_params_struct->drc_frame_size;
  197|       |
  198|  5.37k|  if (drc_instructions_index >= 0) {
  ------------------
  |  Branch (198:7): [True: 5.37k, False: 0]
  ------------------
  199|  5.37k|    str_drc_instruction_str =
  200|  5.37k|        &(pstr_drc_instruction_arr[drc_instructions_index]);
  201|  5.37k|  } else {
  202|      0|    return -1;
  203|      0|  }
  204|       |
  205|  5.37k|  e = 0;
  206|       |
  207|  12.3k|  for (c = 0; c < str_drc_instruction_str->audio_num_chan; c++)
  ------------------
  |  Branch (207:15): [True: 7.01k, False: 5.37k]
  ------------------
  208|       |
  209|  7.01k|  {
  210|  7.01k|    str_drc_filter_bank = NULL;
  211|       |
  212|  7.01k|    audio_in = audio_io_buf[c];
  213|       |
  214|  7.01k|    audio_out = &(audio_band_buffer->non_interleaved_audio[e]);
  215|  7.01k|    if ((passThru == 0) && (drc_instructions_index >= 0)) {
  ------------------
  |  Branch (215:9): [True: 0, False: 7.01k]
  |  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|  7.01k|    } else {
  247|  7.01k|      num_bands = 1;
  248|  7.01k|    }
  249|  7.01k|    switch (num_bands) {
  250|  7.01k|      case 1:
  ------------------
  |  Branch (250:7): [True: 7.01k, False: 0]
  ------------------
  251|  16.2M|        for (i = 0; i < drc_frame_size; i++) {
  ------------------
  |  Branch (251:21): [True: 16.2M, False: 7.01k]
  ------------------
  252|  16.2M|          audio_out[0][i] = audio_in[i];
  253|  16.2M|        }
  254|  7.01k|        e++;
  255|  7.01k|        break;
  256|      0|      case 2:
  ------------------
  |  Branch (256:7): [True: 0, False: 7.01k]
  ------------------
  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: 7.01k]
  ------------------
  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: 7.01k]
  ------------------
  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: 7.01k]
  ------------------
  273|      0|        return (PARAM_ERROR);
  ------------------
  |  |  129|      0|#define PARAM_ERROR 3
  ------------------
  274|      0|        break;
  275|  7.01k|    }
  276|  7.01k|  }
  277|       |
  278|  5.37k|  return (0);
  279|  5.37k|}
impd_store_audio_io_buffer_time:
  282|  36.3k|    FLOAT32* audio_in_out_buf[], ia_audio_in_out_buf* audio_io_buf_internal) {
  283|  36.3k|  WORD32 i, j;
  284|       |
  285|  36.3k|  if (audio_io_buf_internal->audio_delay_samples) {
  ------------------
  |  Branch (285:7): [True: 0, False: 36.3k]
  ------------------
  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|  36.3k|  } else {
  294|  36.3k|    audio_io_buf_internal->audio_io_buffer_delayed = audio_in_out_buf;
  295|  36.3k|    audio_io_buf_internal->audio_in_out_buf = audio_in_out_buf;
  296|  36.3k|  }
  297|       |
  298|  36.3k|  return;
  299|  36.3k|}
impd_retrieve_audio_io_buffer_time:
  302|  11.4k|    FLOAT32* audio_in_out_buf[], ia_audio_in_out_buf* audio_io_buf_internal) {
  303|  11.4k|  WORD32 i, j;
  304|       |
  305|  11.4k|  if (audio_io_buf_internal->audio_delay_samples) {
  ------------------
  |  Branch (305:7): [True: 0, False: 11.4k]
  ------------------
  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.4k|  return;
  315|  11.4k|}
impd_advance_audio_io_buffer_time:
  318|  35.6k|    ia_audio_in_out_buf* audio_io_buf_internal) {
  319|  35.6k|  WORD32 i;
  320|  35.6k|  if (audio_io_buf_internal->audio_delay_samples) {
  ------------------
  |  Branch (320:7): [True: 0, False: 35.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|  35.6k|  return;
  331|  35.6k|}

impd_drc_uni_selction_proc_init:
   35|  1.56k|    ia_drc_interface_struct* pstr_drc_interface, WORD32 subband_domain_mode) {
   36|  1.56k|  WORD32 err = 0;
   37|       |
   38|  1.56k|  if (pstr_drc_uni_sel_proc == NULL) {
  ------------------
  |  Branch (38:7): [True: 0, False: 1.56k]
  ------------------
   39|      0|    return 1;
   40|      0|  }
   41|       |
   42|  1.56k|  if (pstr_drc_uni_sel_proc->first_frame == 1) {
  ------------------
  |  Branch (42:7): [True: 1.56k, False: 0]
  ------------------
   43|  1.56k|    err = impd_drc_sel_proc_init_dflt(pstr_drc_uni_sel_proc);
   44|  1.56k|    if (err) return (err);
  ------------------
  |  Branch (44:9): [True: 0, False: 1.56k]
  ------------------
   45|  1.56k|  }
   46|       |
   47|  1.56k|  err = impd_drc_sel_proc_init_sel_proc_params(pstr_drc_uni_sel_proc,
   48|  1.56k|                                               pstr_drc_sel_proc_params_struct);
   49|  1.56k|  if (err) return (err);
  ------------------
  |  Branch (49:7): [True: 0, False: 1.56k]
  ------------------
   50|  1.56k|  {
   51|  1.56k|    WORD32 i;
   52|  1.56k|    pstr_drc_uni_sel_proc->drc_set_id_valid_flag[0] = 1;
   53|  56.2k|    for (i = 1; i < DRC_INSTRUCTIONS_COUNT_MAX; i++) {
  ------------------
  |  |   43|  56.2k|#define DRC_INSTRUCTIONS_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|  56.2k|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
  |  Branch (53:17): [True: 54.6k, False: 1.56k]
  ------------------
   54|  54.6k|      pstr_drc_uni_sel_proc->drc_set_id_valid_flag[i] = 0;
   55|  54.6k|    }
   56|       |
   57|  1.56k|    pstr_drc_uni_sel_proc->eq_set_id_valid_flag[0] = 1;
   58|  12.4k|    for (i = 1; i < EQ_INSTRUCTIONS_COUNT_MAX; i++) {
  ------------------
  |  |  112|  12.4k|#define EQ_INSTRUCTIONS_COUNT_MAX 8
  ------------------
  |  Branch (58:17): [True: 10.9k, False: 1.56k]
  ------------------
   59|  10.9k|      pstr_drc_uni_sel_proc->eq_set_id_valid_flag[i] = 0;
   60|  10.9k|    }
   61|  1.56k|  }
   62|  1.56k|  impd_drc_sel_proc_init_interface_params(pstr_drc_uni_sel_proc,
   63|  1.56k|                                          pstr_drc_interface);
   64|       |
   65|  1.56k|  pstr_drc_uni_sel_proc->subband_domain_mode = subband_domain_mode;
   66|       |
   67|  1.56k|  return 0;
   68|  1.56k|}
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: 239, False: 362]
  ------------------
  104|    601|               sizeof(ia_drc_loudness_info_set_struct))) {
  105|    239|      pstr_drc_uni_sel_proc->loudness_info_set = *pstr_loudness_info;
  106|    239|      pstr_drc_uni_sel_proc->loudness_info_set_flag = 1;
  107|    362|    } else {
  108|    362|      pstr_drc_uni_sel_proc->loudness_info_set_flag = 0;
  109|    362|    }
  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: 5, False: 596]
  ------------------
  134|    596|    err = impd_manage_eq_complexity(pstr_drc_uni_sel_proc, pstr_drc_config);
  135|    596|    if (err) return (err);
  ------------------
  |  Branch (135:9): [True: 0, False: 596]
  ------------------
  136|  1.18k|    while (repeat_selection == 1) {
  ------------------
  |  Branch (136:12): [True: 596, False: 588]
  ------------------
  137|    596|      err = impd_select_drc_set(pstr_drc_uni_sel_proc, &drc_set_id_selected,
  138|    596|                                &eq_set_id_selected, &loudEqSetIdSelected);
  139|    596|      if (err) return (err);
  ------------------
  |  Branch (139:11): [True: 8, False: 588]
  ------------------
  140|       |
  141|    588|      err =
  142|    588|          impd_get_selected_drc_set(pstr_drc_uni_sel_proc, drc_set_id_selected);
  143|    588|      if (err) return (err);
  ------------------
  |  Branch (143:11): [True: 0, False: 588]
  ------------------
  144|       |
  145|    588|      err = impd_get_dependent_drc_set(pstr_drc_uni_sel_proc);
  146|    588|      if (err) return (err);
  ------------------
  |  Branch (146:11): [True: 0, False: 588]
  ------------------
  147|       |
  148|    588|      err = impd_get_fading_drc_set(pstr_drc_uni_sel_proc);
  149|    588|      if (err) return (err);
  ------------------
  |  Branch (149:11): [True: 0, False: 588]
  ------------------
  150|       |
  151|    588|      err = impd_get_ducking_drc_set(pstr_drc_uni_sel_proc);
  152|    588|      if (err) return (err);
  ------------------
  |  Branch (152:11): [True: 0, False: 588]
  ------------------
  153|       |
  154|    588|      pstr_drc_uni_sel_proc->eq_inst_index[0] = -1;
  155|    588|      pstr_drc_uni_sel_proc->eq_inst_index[1] = -1;
  156|       |
  157|    588|      err = impd_get_selected_eq_set(pstr_drc_uni_sel_proc, eq_set_id_selected);
  158|    588|      if (err) return (err);
  ------------------
  |  Branch (158:11): [True: 0, False: 588]
  ------------------
  159|       |
  160|    588|      err = impd_get_dependent_eq_set(pstr_drc_uni_sel_proc);
  161|    588|      if (err) return (err);
  ------------------
  |  Branch (161:11): [True: 0, False: 588]
  ------------------
  162|       |
  163|    588|      err = impd_get_selected_loud_eq_set(pstr_drc_uni_sel_proc,
  164|    588|                                          loudEqSetIdSelected);
  165|    588|      if (err) return (err);
  ------------------
  |  Branch (165:11): [True: 0, False: 588]
  ------------------
  166|       |
  167|    588|      activeDrcSetIndex = 0;
  168|  2.94k|      for (i = SUB_DRC_COUNT - 1; i >= 0; i--) {
  ------------------
  |  |   49|    588|#define SUB_DRC_COUNT 4
  ------------------
  |  Branch (168:35): [True: 2.35k, False: 588]
  ------------------
  169|  2.35k|        WORD32 drc_instructions_index =
  170|  2.35k|            pstr_drc_uni_sel_proc->drc_instructions_index[i];
  171|  2.35k|        ia_drc_instructions_struct* str_drc_instruction_str;
  172|  2.35k|        if (drc_instructions_index < 0) continue;
  ------------------
  |  Branch (172:13): [True: 1.76k, False: 588]
  ------------------
  173|       |
  174|    588|        str_drc_instruction_str =
  175|    588|            &(pstr_drc_uni_sel_proc->drc_config
  176|    588|                  .str_drc_instruction_str[drc_instructions_index]);
  177|       |
  178|    588|        if (str_drc_instruction_str->drc_set_id > 0) {
  ------------------
  |  Branch (178:13): [True: 210, False: 378]
  ------------------
  179|    210|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  180|    210|              .sel_drc_set_ids[activeDrcSetIndex] =
  181|    210|              str_drc_instruction_str->drc_set_id;
  182|       |
  183|    210|          if ((i == 3) && (str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (183:15): [True: 0, False: 210]
  |  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|    210|          } else {
  188|    210|            if (str_drc_instruction_str->drc_apply_to_dwnmix == 1) {
  ------------------
  |  Branch (188:17): [True: 0, False: 210]
  ------------------
  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|    210|            } else {
  193|    210|              pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  194|    210|                  .sel_downmix_ids[activeDrcSetIndex] = 0;
  195|    210|            }
  196|    210|          }
  197|       |
  198|    210|          activeDrcSetIndex++;
  199|    210|        }
  200|    588|      }
  201|    588|      if (activeDrcSetIndex <= 3) {
  ------------------
  |  Branch (201:11): [True: 588, False: 0]
  ------------------
  202|    588|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.num_sel_drc_sets =
  203|    588|            activeDrcSetIndex;
  204|    588|      } 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|    588|      impd_sel_downmix_matrix(pstr_drc_uni_sel_proc,
  210|    588|                              &pstr_drc_uni_sel_proc->drc_config);
  211|       |
  212|    588|      err = impd_manage_complexity(pstr_drc_uni_sel_proc, pstr_drc_config,
  213|    588|                                   &repeat_selection);
  214|    588|      if (err) return (err);
  ------------------
  |  Branch (214:11): [True: 0, False: 588]
  ------------------
  215|    588|    }
  216|       |
  217|    588|    pstr_drc_uni_sel_proc->sel_proc_request_flag = 0;
  218|    588|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.boost =
  219|    588|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.boost;
  220|    588|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.compress =
  221|    588|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.compress;
  222|    588|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.drc_characteristic_target =
  223|    588|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  224|    588|            .drc_characteristic_target;
  225|    588|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  226|    588|        .loudness_normalization_gain_db +=
  227|    588|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  228|    588|            .loudness_norm_gain_modification_db;
  229|    588|  }
  230|  1.76k|  for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (230:15): [True: 1.17k, False: 588]
  ------------------
  231|  1.17k|    if (pstr_drc_uni_sel_proc->eq_inst_index[i] >= 0) {
  ------------------
  |  Branch (231:9): [True: 0, False: 1.17k]
  ------------------
  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.17k|  }
  238|    588|  if (pstr_drc_uni_sel_proc->loud_eq_inst_index_sel >= 0) {
  ------------------
  |  Branch (238:7): [True: 0, False: 588]
  ------------------
  239|      0|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_loud_eq_id =
  240|      0|        pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  241|      0|            .loud_eq_instructions[pstr_drc_uni_sel_proc->loud_eq_inst_index_sel]
  242|      0|            .loud_eq_set_id;
  243|    588|  } else {
  244|    588|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_loud_eq_id = 0;
  245|    588|  }
  246|    588|  *hia_drc_sel_proc_output_struct =
  247|    588|      pstr_drc_uni_sel_proc->uni_drc_sel_proc_output;
  248|       |
  249|    588|  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|    588|                             ia_drc_config* pstr_drc_config) {
  359|    588|  WORD32 i, j, n;
  360|       |
  361|    588|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.base_channel_count =
  362|    588|      pstr_drc_config->channel_layout.base_channel_count;
  363|    588|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.target_channel_count =
  364|    588|      pstr_drc_config->channel_layout.base_channel_count;
  365|    588|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.target_layout = -1;
  366|    588|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.downmix_matrix_present = 0;
  367|    588|  pstr_drc_uni_sel_proc->downmix_inst_index_sel = -1;
  368|       |
  369|    588|  if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.active_downmix_id != 0) {
  ------------------
  |  Branch (369:7): [True: 0, False: 588]
  ------------------
  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|    588|  return;
  405|    588|}
impd_get_selected_eq_set:
  408|    588|                                WORD32 eq_set_id_selected) {
  409|    588|  WORD32 n;
  410|       |
  411|    588|  pstr_drc_uni_sel_proc->eq_inst_index_sel = -1;
  412|       |
  413|    588|  if (eq_set_id_selected > 0) {
  ------------------
  |  Branch (413:7): [True: 0, False: 588]
  ------------------
  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|    588|  return (0);
  439|    588|}
impd_get_dependent_eq_set:
  441|    588|WORD32 impd_get_dependent_eq_set(ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc) {
  442|    588|  ia_eq_instructions_struct* str_eq_instructions = NULL;
  443|       |
  444|    588|  if (pstr_drc_uni_sel_proc->eq_inst_index_sel >= 0) {
  ------------------
  |  Branch (444:7): [True: 0, False: 588]
  ------------------
  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|    588|  return (0);
  476|    588|}
impd_get_selected_loud_eq_set:
  479|    588|    ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc, WORD32 loudEqSetIdSelected) {
  480|    588|  WORD32 n;
  481|       |
  482|    588|  pstr_drc_uni_sel_proc->loud_eq_inst_index_sel = -1;
  483|       |
  484|    588|  if (loudEqSetIdSelected > 0) {
  ------------------
  |  Branch (484:7): [True: 0, False: 588]
  ------------------
  485|      0|    for (n = 0; n < pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  ------------------
  |  Branch (485:17): [True: 0, False: 0]
  ------------------
  486|      0|                        .loud_eq_instructions_count;
  487|      0|         n++) {
  488|      0|      if (pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  ------------------
  |  Branch (488:11): [True: 0, False: 0]
  ------------------
  489|      0|              .loud_eq_instructions[n]
  490|      0|              .loud_eq_set_id == loudEqSetIdSelected)
  491|      0|        break;
  492|      0|    }
  493|      0|    if (n ==
  ------------------
  |  Branch (493:9): [True: 0, False: 0]
  ------------------
  494|      0|        pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  495|      0|            .loud_eq_instructions_count) {
  496|      0|      return (EXTERNAL_ERROR);
  ------------------
  |  |  130|      0|#define EXTERNAL_ERROR 4
  ------------------
  497|      0|    }
  498|      0|    pstr_drc_uni_sel_proc->loud_eq_inst_index_sel = n;
  499|      0|  }
  500|    588|  return (0);
  501|    588|}
impd_select_loud_eq:
  506|    588|                           WORD32 eq_set_id_requested, WORD32* loud_eq_id_sel) {
  507|    588|  WORD32 i, c, d, e;
  508|       |
  509|    588|  *loud_eq_id_sel = 0;
  510|    588|  for (i = 0;
  511|    594|       i < pstr_drc_config->str_drc_config_ext.loud_eq_instructions_count;
  ------------------
  |  Branch (511:8): [True: 6, False: 588]
  ------------------
  512|    588|       i++) {
  513|      6|    ia_loud_eq_instructions_struct* loud_eq_instructions =
  514|      6|        &pstr_drc_config->str_drc_config_ext.loud_eq_instructions[i];
  515|      6|    if (loud_eq_instructions->drc_location == LOCATION_SELECTED) {
  ------------------
  |  |  144|      6|#define LOCATION_SELECTED LOCATION_MP4_INSTREAM_UNIDRC
  |  |  ------------------
  |  |  |  |  141|      6|#define LOCATION_MP4_INSTREAM_UNIDRC 0x1
  |  |  ------------------
  ------------------
  |  Branch (515:9): [True: 2, False: 4]
  ------------------
  516|      4|      for (d = 0; d < loud_eq_instructions->dwnmix_id_count; d++) {
  ------------------
  |  Branch (516:19): [True: 2, False: 2]
  ------------------
  517|      2|        if ((loud_eq_instructions->downmix_id[d] == requested_dwnmix_id) ||
  ------------------
  |  Branch (517:13): [True: 2, False: 0]
  ------------------
  518|      2|            (loud_eq_instructions->downmix_id[d] == ID_FOR_ANY_DOWNMIX)) {
  ------------------
  |  |  136|      0|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (518:13): [True: 0, False: 0]
  ------------------
  519|      4|          for (c = 0; c < loud_eq_instructions->drc_set_id_count; c++) {
  ------------------
  |  Branch (519:23): [True: 2, False: 2]
  ------------------
  520|      2|            if ((loud_eq_instructions->drc_set_id[c] == drc_set_id_requested) ||
  ------------------
  |  Branch (520:17): [True: 0, False: 2]
  ------------------
  521|      2|                (loud_eq_instructions->drc_set_id[c] == ID_FOR_ANY_DRC)) {
  ------------------
  |  |  138|      2|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  |  Branch (521:17): [True: 1, False: 1]
  ------------------
  522|      2|              for (e = 0; e < loud_eq_instructions->eq_set_id_count; e++) {
  ------------------
  |  Branch (522:27): [True: 1, False: 1]
  ------------------
  523|      1|                if ((loud_eq_instructions->eq_set_id[e] ==
  ------------------
  |  Branch (523:21): [True: 1, False: 0]
  ------------------
  524|      1|                     eq_set_id_requested) ||
  525|      1|                    (loud_eq_instructions->eq_set_id[e] == ID_FOR_ANY_EQ)) {
  ------------------
  |  |  139|      0|#define ID_FOR_ANY_EQ 0x3F
  ------------------
  |  Branch (525:21): [True: 0, False: 0]
  ------------------
  526|      1|                  *loud_eq_id_sel = loud_eq_instructions->loud_eq_set_id;
  527|      1|                }
  528|      1|              }
  529|      1|            }
  530|      2|          }
  531|      2|        }
  532|      2|      }
  533|      2|    }
  534|      6|  }
  535|    588|  return (0);
  536|    588|}
impd_find_eq_set_no_compression:
  624|    596|                                       WORD32* num_compression_eq_id) {
  625|    596|  WORD32 i, d, k, c;
  626|    596|  k = 0;
  627|    596|  for (i = 0; i < pstr_drc_config->str_drc_config_ext.eq_instructions_count;
  ------------------
  |  Branch (627:15): [True: 0, False: 596]
  ------------------
  628|    596|       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|    596|  *num_compression_eq_count = k;
  645|    596|  return (0);
  646|    596|}
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.62k|  for (n = 0; n < drc_config->drc_coefficients_drc_count; n++) {
  ------------------
  |  Branch (654:15): [True: 1.83k, False: 1.78k]
  ------------------
  655|  1.83k|    if (drc_config->str_p_loc_drc_coefficients_uni_drc[n].drc_location == 1) {
  ------------------
  |  Branch (655:9): [True: 1.78k, False: 52]
  ------------------
  656|  1.78k|      if (drc_config->str_p_loc_drc_coefficients_uni_drc[n].version == 0) {
  ------------------
  |  Branch (656:11): [True: 0, False: 1.78k]
  ------------------
  657|      0|        cV0 = n;
  658|  1.78k|      } else {
  659|  1.78k|        cV1 = n;
  660|  1.78k|      }
  661|  1.78k|    }
  662|  1.83k|  }
  663|  1.78k|  if (cV1 >= 0) {
  ------------------
  |  Branch (663:7): [True: 1.78k, False: 5]
  ------------------
  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: 5]
  ------------------
  667|      0|    *str_p_loc_drc_coefficients_uni_drc =
  668|      0|        &(drc_config->str_p_loc_drc_coefficients_uni_drc[cV0]);
  669|      5|  } else {
  670|       |    *str_p_loc_drc_coefficients_uni_drc = NULL;
  671|      5|  }
  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|      5|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (691:7): [True: 5, False: 596]
  ------------------
  692|  2.96k|  for (i = 0; i < pstr_drc_config->drc_instructions_uni_drc_count; i++) {
  ------------------
  |  Branch (692:15): [True: 2.37k, False: 596]
  ------------------
  693|  2.37k|    str_drc_instruction_str = &pstr_drc_config->str_drc_instruction_str[i];
  694|  2.37k|    if (str_drc_instruction_str->no_independent_use) continue;
  ------------------
  |  Branch (694:9): [True: 0, False: 2.37k]
  ------------------
  695|       |
  696|  2.37k|    numBandsTooLarge = 0;
  697|  2.37k|    if (str_drc_instruction_str->drc_apply_to_dwnmix == 1) {
  ------------------
  |  Branch (697:9): [True: 0, False: 2.37k]
  ------------------
  698|      0|      channel_count = uni_drc_sel_proc_output->target_channel_count;
  699|  2.37k|    } else {
  700|  2.37k|      channel_count = uni_drc_sel_proc_output->base_channel_count;
  701|  2.37k|    }
  702|  2.37k|    if (pstr_drc_uni_sel_proc->subband_domain_mode == SUBBAND_DOMAIN_MODE_OFF) {
  ------------------
  |  |  148|  2.37k|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (702:9): [True: 2.37k, False: 0]
  ------------------
  703|  7.11k|      for (j = 0; j < str_drc_instruction_str->num_drc_ch_groups; j++) {
  ------------------
  |  Branch (703:19): [True: 4.74k, False: 2.37k]
  ------------------
  704|  4.74k|        ia_gain_set_params_struct* gain_set_params = &(
  705|  4.74k|            str_p_loc_drc_coefficients_uni_drc->gain_set_params
  706|  4.74k|                [str_drc_instruction_str->gain_set_index_for_channel_group[j]]);
  707|  4.74k|        if (gain_set_params->band_count >
  ------------------
  |  Branch (707:13): [True: 0, False: 4.74k]
  ------------------
  708|  4.74k|            pstr_drc_sel_proc_params_struct->num_bands_supported) {
  709|      0|          numBandsTooLarge = 1;
  710|  4.74k|        } else {
  711|  4.74k|          if (gain_set_params->band_count > 4) {
  ------------------
  |  Branch (711:15): [True: 0, False: 4.74k]
  ------------------
  712|       |            /* Add complexity for analysis and synthesis QMF bank here, if
  713|       |             * supported */
  714|      0|          }
  715|  4.74k|        }
  716|  4.74k|      }
  717|  2.37k|    }
  718|  2.37k|    complexityDrcPrelim =
  719|  2.37k|        (FLOAT32)(channel_count *
  720|  2.37k|                  (1 << str_drc_instruction_str->drc_set_complexity_level));
  721|       |
  722|  2.37k|    if (str_drc_instruction_str->depends_on_drc_set > 0) {
  ------------------
  |  Branch (722:9): [True: 0, False: 2.37k]
  ------------------
  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.37k|    complexityDrcPrelim *= pstr_drc_config->sampling_rate / 48000.0f;
  756|       |
  757|  2.37k|    if ((complexityDrcPrelim <= complexitySupportedTotal) &&
  ------------------
  |  Branch (757:9): [True: 2.37k, False: 0]
  ------------------
  758|  2.37k|        (numBandsTooLarge == 0)) {
  ------------------
  |  Branch (758:9): [True: 2.37k, False: 0]
  ------------------
  759|  2.37k|      pstr_drc_uni_sel_proc
  760|  2.37k|          ->drc_set_id_valid_flag[str_drc_instruction_str->drc_set_id] = 1;
  761|  2.37k|    }
  762|  2.37k|  }
  763|    596|  return (0);
  764|    596|}
impd_manage_eq_complexity:
  767|    596|                                 ia_drc_config* pstr_drc_config) {
  768|    596|  WORD32 k, n, m, err;
  769|    596|  WORD32 eqComplexityPrimary = 0;
  770|    596|  WORD32 eqComplexityDependent = 0;
  771|    596|  WORD32 eqChannelCountPrimary = 0, eqChannelCountDependent = 0;
  772|    596|  FLOAT32 complexityTotalEq;
  773|    596|  ia_drc_config* drc_config = &pstr_drc_uni_sel_proc->drc_config;
  774|    596|  ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct =
  775|    596|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_params;
  776|    596|  FLOAT32 complexitySupportedTotal =
  777|    596|      (FLOAT32)(pow(2.0f, pstr_drc_uni_sel_proc->compl_level_supported_total));
  778|       |
  779|    596|  for (n = 0; n < drc_config->str_drc_config_ext.eq_instructions_count; n++) {
  ------------------
  |  Branch (779:15): [True: 0, False: 596]
  ------------------
  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|    596|  return 0;
  871|    596|}
impd_manage_complexity:
  875|    588|                              WORD32* repeat_selection) {
  876|    588|  WORD32 i, j, p, err;
  877|    588|  WORD32 channel_count;
  878|    588|  WORD32 numBandsTooLarge = 0;
  879|    588|  WORD32 drcRequiresEq;
  880|    588|  FLOAT32 complexityEq;
  881|    588|  FLOAT32 complexityDrcTotal = 0.0f;
  882|    588|  FLOAT32 complexityEqTotal = 0.0f;
  883|    588|  FLOAT32 freqNorm = pstr_drc_config->sampling_rate / 48000.0f;
  884|    588|  ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc;
  885|    588|  ia_drc_instructions_struct* str_drc_instruction_str =
  886|    588|      &pstr_drc_config->str_drc_instruction_str[0];
  887|    588|  ia_drc_sel_proc_output_struct* uni_drc_sel_proc_output =
  888|    588|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_output;
  889|    588|  ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct =
  890|    588|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_params;
  891|    588|  FLOAT32 complexitySupportedTotal =
  892|    588|      (FLOAT32)(pow(2.0f, pstr_drc_uni_sel_proc->compl_level_supported_total));
  893|       |
  894|    588|  impd_select_drc_coeff3(pstr_drc_config, &str_p_loc_drc_coefficients_uni_drc);
  895|       |
  896|    588|  if (str_p_loc_drc_coefficients_uni_drc == NULL) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (896:7): [True: 0, False: 588]
  ------------------
  897|       |
  898|  2.94k|  for (p = 0; p < 4; p++) {
  ------------------
  |  Branch (898:15): [True: 2.35k, False: 588]
  ------------------
  899|  2.35k|    if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[p] <= 0)
  ------------------
  |  Branch (899:9): [True: 2.14k, False: 210]
  ------------------
  900|  2.14k|      continue;
  901|    210|    err = impd_find_drc_instructions_uni_drc(
  902|    210|        pstr_drc_config,
  903|    210|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[p],
  904|    210|        &str_drc_instruction_str);
  905|    210|    if (err) return (err);
  ------------------
  |  Branch (905:9): [True: 0, False: 210]
  ------------------
  906|       |
  907|    210|    if (str_drc_instruction_str->drc_apply_to_dwnmix == 1) {
  ------------------
  |  Branch (907:9): [True: 0, False: 210]
  ------------------
  908|      0|      channel_count = uni_drc_sel_proc_output->target_channel_count;
  909|    210|    } else {
  910|    210|      channel_count = uni_drc_sel_proc_output->base_channel_count;
  911|    210|    }
  912|    210|    if (pstr_drc_uni_sel_proc->subband_domain_mode == SUBBAND_DOMAIN_MODE_OFF) {
  ------------------
  |  |  148|    210|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (912:9): [True: 210, False: 0]
  ------------------
  913|    630|      for (j = 0; j < str_drc_instruction_str->num_drc_ch_groups; j++) {
  ------------------
  |  Branch (913:19): [True: 420, False: 210]
  ------------------
  914|    420|        ia_gain_set_params_struct* gain_set_params = &(
  915|    420|            str_p_loc_drc_coefficients_uni_drc->gain_set_params
  916|    420|                [str_drc_instruction_str->gain_set_index_for_channel_group[j]]);
  917|    420|        if (gain_set_params->band_count >
  ------------------
  |  Branch (917:13): [True: 0, False: 420]
  ------------------
  918|    420|            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|    420|        } else {
  929|    420|          if (gain_set_params->band_count > 4) {
  ------------------
  |  Branch (929:15): [True: 0, False: 420]
  ------------------
  930|       |            /* Add complexity for analysis and synthesis QMF bank here, if
  931|       |             * supported */
  932|      0|          }
  933|    420|        }
  934|    420|      }
  935|    210|    }
  936|    210|    complexityDrcTotal +=
  937|    210|        channel_count *
  938|    210|        (1 << str_drc_instruction_str->drc_set_complexity_level);
  939|    210|  }
  940|       |
  941|    588|  if (uni_drc_sel_proc_output->active_downmix_id > 0) {
  ------------------
  |  Branch (941:7): [True: 0, False: 588]
  ------------------
  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.76k|  for (p = 0; p < 2; p++) {
  ------------------
  |  Branch (967:15): [True: 1.17k, False: 588]
  ------------------
  968|  1.17k|    if (pstr_drc_uni_sel_proc->eq_inst_index[p] >= 0) {
  ------------------
  |  Branch (968:9): [True: 0, False: 1.17k]
  ------------------
  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.17k|  }
  994|       |
  995|    588|  complexityDrcTotal *= freqNorm;
  996|    588|  complexityEqTotal *= freqNorm;
  997|       |
  998|    588|  if ((complexityDrcTotal > complexitySupportedTotal) ||
  ------------------
  |  Branch (998:7): [True: 0, False: 588]
  ------------------
  999|    588|      (complexityEqTotal > complexitySupportedTotal))
  ------------------
  |  Branch (999:7): [True: 0, False: 588]
  ------------------
 1000|      0|    return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1001|       |
 1002|    588|  if (numBandsTooLarge == 1) {
  ------------------
  |  Branch (1002:7): [True: 0, False: 588]
  ------------------
 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|    588|  } else {
 1015|    588|    if (complexityDrcTotal + complexityEqTotal <= complexitySupportedTotal) {
  ------------------
  |  Branch (1015:9): [True: 588, False: 0]
  ------------------
 1016|    588|      *repeat_selection = 0;
 1017|    588|    } 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|    588|  }
 1062|       |
 1063|    588|  if (*repeat_selection == 1) {
  ------------------
  |  Branch (1063:7): [True: 0, False: 588]
  ------------------
 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|    588|  return (0);
 1068|    588|}

impd_validate_requested_drc_feature:
   43|    588|    ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct) {
   44|    588|  WORD32 i, j;
   45|       |
   46|  1.23k|  for (i = 0; i < pstr_drc_sel_proc_params_struct->num_drc_feature_requests;
  ------------------
  |  Branch (46:15): [True: 648, False: 588]
  ------------------
   47|    648|       i++) {
   48|    648|    switch (pstr_drc_sel_proc_params_struct->drc_feature_req_type[i]) {
   49|    216|      case MATCH_EFFECT_TYPE:
  ------------------
  |  |   38|    216|#define MATCH_EFFECT_TYPE 0
  ------------------
  |  Branch (49:7): [True: 216, False: 432]
  ------------------
   50|    432|        for (j = 0; j < pstr_drc_sel_proc_params_struct
  ------------------
  |  Branch (50:21): [True: 216, False: 216]
  ------------------
   51|    432|                            ->desired_num_drc_effects_of_requested[i];
   52|    216|             j++) {
   53|    216|          if (pstr_drc_sel_proc_params_struct
  ------------------
  |  Branch (53:15): [True: 0, False: 216]
  ------------------
   54|    216|                  ->requested_drc_effect_type[i][j] ==
   55|    216|              EFFECT_TYPE_REQUESTED_NONE) {
  ------------------
  |  |   27|    216|#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|    216|        }
   62|    216|        break;
   63|    216|      case MATCH_DYNAMIC_RANGE:
  ------------------
  |  |   39|    216|#define MATCH_DYNAMIC_RANGE 1
  ------------------
  |  Branch (63:7): [True: 216, False: 432]
  ------------------
   64|    216|        break;
   65|    216|      case MATCH_DRC_CHARACTERISTIC:
  ------------------
  |  |   40|    216|#define MATCH_DRC_CHARACTERISTIC 2
  ------------------
  |  Branch (65:7): [True: 216, False: 432]
  ------------------
   66|    216|        break;
   67|      0|      default:
  ------------------
  |  Branch (67:7): [True: 0, False: 648]
  ------------------
   68|      0|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
   69|      0|        break;
   70|    648|    }
   71|    648|  }
   72|    588|  return (0);
   73|    588|}
impd_find_drc_instructions_uni_drc:
   77|    210|    ia_drc_instructions_struct** str_drc_instruction_str) {
   78|    210|  WORD32 i;
   79|    475|  for (i = 0; i < drc_config->drc_instructions_uni_drc_count; i++) {
  ------------------
  |  Branch (79:15): [True: 475, False: 0]
  ------------------
   80|    475|    if (drc_set_id_requested ==
  ------------------
  |  Branch (80:9): [True: 210, False: 265]
  ------------------
   81|    475|        drc_config->str_drc_instruction_str[i].drc_set_id)
   82|    210|      break;
   83|    475|  }
   84|    210|  if (i == drc_config->drc_instructions_uni_drc_count) {
  ------------------
  |  Branch (84:7): [True: 0, False: 210]
  ------------------
   85|      0|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
   86|      0|  }
   87|    210|  *str_drc_instruction_str = &drc_config->str_drc_instruction_str[i];
   88|    210|  return (0);
   89|    210|}
impd_map_requested_effect_bit_idx:
   92|    247|                                         WORD32* effect_bit_idx) {
   93|    247|  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: 247]
  ------------------
   95|      0|      *effect_bit_idx = EFFECT_BIT_NONE;
  ------------------
  |  |   61|      0|#define EFFECT_BIT_NONE (-1)
  ------------------
   96|      0|      break;
   97|     83|    case EFFECT_TYPE_REQUESTED_NIGHT:
  ------------------
  |  |   28|     83|#define EFFECT_TYPE_REQUESTED_NIGHT 1
  ------------------
  |  Branch (97:5): [True: 83, False: 164]
  ------------------
   98|     83|      *effect_bit_idx = EFFECT_BIT_NIGHT;
  ------------------
  |  |   62|     83|#define EFFECT_BIT_NIGHT 0x0001
  ------------------
   99|     83|      break;
  100|     67|    case EFFECT_TYPE_REQUESTED_NOISY:
  ------------------
  |  |   29|     67|#define EFFECT_TYPE_REQUESTED_NOISY 2
  ------------------
  |  Branch (100:5): [True: 67, False: 180]
  ------------------
  101|     67|      *effect_bit_idx = EFFECT_BIT_NOISY;
  ------------------
  |  |   63|     67|#define EFFECT_BIT_NOISY 0x0002
  ------------------
  102|     67|      break;
  103|      6|    case EFFECT_TYPE_REQUESTED_LIMITED:
  ------------------
  |  |   30|      6|#define EFFECT_TYPE_REQUESTED_LIMITED 3
  ------------------
  |  Branch (103:5): [True: 6, False: 241]
  ------------------
  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: 246]
  ------------------
  107|      1|      *effect_bit_idx = EFFECT_BIT_LOWLEVEL;
  ------------------
  |  |   65|      1|#define EFFECT_BIT_LOWLEVEL 0x0008
  ------------------
  108|      1|      break;
  109|      5|    case EFFECT_TYPE_REQUESTED_DIALOG:
  ------------------
  |  |   32|      5|#define EFFECT_TYPE_REQUESTED_DIALOG 5
  ------------------
  |  Branch (109:5): [True: 5, False: 242]
  ------------------
  110|      5|      *effect_bit_idx = EFFECT_BIT_DIALOG;
  ------------------
  |  |   66|      5|#define EFFECT_BIT_DIALOG 0x0010
  ------------------
  111|      5|      break;
  112|     24|    case EFFECT_TYPE_REQUESTED_GENERAL_COMPR:
  ------------------
  |  |   33|     24|#define EFFECT_TYPE_REQUESTED_GENERAL_COMPR 6
  ------------------
  |  Branch (112:5): [True: 24, False: 223]
  ------------------
  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: 189]
  ------------------
  116|     58|      *effect_bit_idx = EFFECT_BIT_EXPAND;
  ------------------
  |  |   68|     58|#define EFFECT_BIT_EXPAND 0x0040
  ------------------
  117|     58|      break;
  118|      3|    case EFFECT_TYPE_REQUESTED_ARTISTIC:
  ------------------
  |  |   35|      3|#define EFFECT_TYPE_REQUESTED_ARTISTIC 8
  ------------------
  |  Branch (118:5): [True: 3, False: 244]
  ------------------
  119|      3|      *effect_bit_idx = EFFECT_BIT_ARTISTIC;
  ------------------
  |  |   69|      3|#define EFFECT_BIT_ARTISTIC 0x0080
  ------------------
  120|      3|      break;
  121|       |
  122|      0|    default:
  ------------------
  |  Branch (122:5): [True: 0, False: 247]
  ------------------
  123|      0|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  124|       |
  125|      0|      break;
  126|    247|  }
  127|    247|  return (0);
  128|    247|}
impd_get_fading_drc_set:
  130|    588|WORD32 impd_get_fading_drc_set(ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc) {
  131|    588|  pstr_drc_uni_sel_proc->drc_instructions_index[2] = -1;
  132|    588|  if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.album_mode == 0) {
  ------------------
  |  Branch (132:7): [True: 588, False: 0]
  ------------------
  133|    588|    WORD32 n;
  134|    588|    ia_drc_instructions_struct* str_drc_instruction_str = NULL;
  135|    588|    for (n = 0;
  136|  2.92k|         n < pstr_drc_uni_sel_proc->drc_config.drc_instructions_uni_drc_count;
  ------------------
  |  Branch (136:10): [True: 2.34k, False: 588]
  ------------------
  137|  2.34k|         n++) {
  138|  2.34k|      str_drc_instruction_str =
  139|  2.34k|          &(pstr_drc_uni_sel_proc->drc_config.str_drc_instruction_str[n]);
  140|       |
  141|  2.34k|      if (str_drc_instruction_str->drc_set_effect & EFFECT_BIT_FADE) {
  ------------------
  |  |   71|  2.34k|#define EFFECT_BIT_FADE 0x0200
  ------------------
  |  Branch (141:11): [True: 0, False: 2.34k]
  ------------------
  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.34k|    }
  150|    588|  }
  151|    588|  return (0);
  152|    588|}
impd_get_ducking_drc_set:
  154|    588|WORD32 impd_get_ducking_drc_set(ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc) {
  155|    588|  WORD32 drc_instructions_index;
  156|    588|  WORD32 n, k;
  157|    588|  ia_drc_instructions_struct* str_drc_instruction_str;
  158|       |
  159|    588|  WORD32 requested_dwnmix_id =
  160|    588|      pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.active_downmix_id;
  161|       |
  162|    588|  pstr_drc_uni_sel_proc->drc_instructions_index[3] = -1;
  163|    588|  drc_instructions_index = -1;
  164|    588|  str_drc_instruction_str = NULL;
  165|       |
  166|    588|  for (n = 0;
  167|  2.92k|       n < pstr_drc_uni_sel_proc->drc_config.drc_instructions_uni_drc_count;
  ------------------
  |  Branch (167:8): [True: 2.34k, False: 588]
  ------------------
  168|  2.34k|       n++) {
  169|  2.34k|    str_drc_instruction_str =
  170|  2.34k|        &(pstr_drc_uni_sel_proc->drc_config.str_drc_instruction_str[n]);
  171|       |
  172|  2.34k|    if (str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (172:9): [True: 0, False: 2.34k]
  ------------------
  173|  2.34k|        (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   72|  2.34k|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                      (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   73|  2.34k|#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.34k|  }
  187|    588|  if (drc_instructions_index == -1) {
  ------------------
  |  Branch (187:7): [True: 588, False: 0]
  ------------------
  188|    588|    for (n = 0;
  189|  2.92k|         n < pstr_drc_uni_sel_proc->drc_config.drc_instructions_uni_drc_count;
  ------------------
  |  Branch (189:10): [True: 2.34k, False: 588]
  ------------------
  190|  2.34k|         n++) {
  191|  2.34k|      str_drc_instruction_str =
  192|  2.34k|          &(pstr_drc_uni_sel_proc->drc_config.str_drc_instruction_str[n]);
  193|       |
  194|  2.34k|      if (str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (194:11): [True: 0, False: 2.34k]
  ------------------
  195|  2.34k|          (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   72|  2.34k|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                        (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   73|  2.34k|#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.34k|    }
  209|    588|  }
  210|    588|  if (drc_instructions_index > -1) {
  ------------------
  |  Branch (210:7): [True: 0, False: 588]
  ------------------
  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|    588|  return (0);
  215|    588|}
impd_get_selected_drc_set:
  218|    588|                                 WORD32 drc_set_id_selected) {
  219|    588|  WORD32 n;
  220|       |
  221|  2.35k|  for (n = 0; n < pstr_drc_uni_sel_proc->drc_config.drc_instructions_count_plus;
  ------------------
  |  Branch (221:15): [True: 2.35k, False: 0]
  ------------------
  222|  2.35k|       n++) {
  223|  2.35k|    if (pstr_drc_uni_sel_proc->drc_config.str_drc_instruction_str[n]
  ------------------
  |  Branch (223:9): [True: 588, False: 1.76k]
  ------------------
  224|  2.35k|            .drc_set_id == drc_set_id_selected)
  225|    588|      break;
  226|  2.35k|  }
  227|    588|  if (n == pstr_drc_uni_sel_proc->drc_config.drc_instructions_count_plus) {
  ------------------
  |  Branch (227:7): [True: 0, False: 588]
  ------------------
  228|      0|    return (EXTERNAL_ERROR);
  ------------------
  |  |  130|      0|#define EXTERNAL_ERROR 4
  ------------------
  229|      0|  }
  230|    588|  pstr_drc_uni_sel_proc->drc_inst_index_sel = n;
  231|       |
  232|    588|  pstr_drc_uni_sel_proc->drc_instructions_index[0] =
  233|    588|      pstr_drc_uni_sel_proc->drc_inst_index_sel;
  234|    588|  return (0);
  235|    588|}
impd_get_dependent_drc_set:
  238|    588|    ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc) {
  239|    588|  ia_drc_instructions_struct* str_drc_instruction_str = NULL;
  240|    588|  str_drc_instruction_str = &(
  241|    588|      pstr_drc_uni_sel_proc->drc_config
  242|    588|          .str_drc_instruction_str[pstr_drc_uni_sel_proc->drc_inst_index_sel]);
  243|       |
  244|    588|  if (str_drc_instruction_str->depends_on_drc_set_present == 1) {
  ------------------
  |  Branch (244:7): [True: 0, False: 588]
  ------------------
  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|    588|  } else {
  260|    588|    pstr_drc_uni_sel_proc->drc_instructions_index[1] = -1;
  261|    588|  }
  262|    588|  return (0);
  263|    588|}
impd_select_drcs_without_compr_effects:
  292|     91|    ia_selection_candidate_info_struct* selection_candidate_info) {
  293|     91|  WORD32 i, k, n;
  294|     91|  WORD32 selection_candidate_step_2_count = 0;
  295|     91|  ia_selection_candidate_info_struct
  296|     91|      selection_candidate_info_step_2[SELECTION_CANDIDATE_COUNT_MAX];
  297|     91|  WORD32 effect_types_request_table_size;
  298|     91|  WORD32 match;
  299|     91|  ia_drc_instructions_struct* str_drc_instruction_str;
  300|       |
  301|     91|  effect_types_request_table_size =
  302|     91|      sizeof(effect_types_request_table) / sizeof(WORD32);
  303|       |
  304|     91|  k = 0;
  305|    572|  for (i = 0; i < *selection_candidate_count; i++) {
  ------------------
  |  Branch (305:15): [True: 481, False: 91]
  ------------------
  306|    481|    str_drc_instruction_str = &(
  307|    481|        pstr_drc_config->str_drc_instruction_str[selection_candidate_info[i]
  308|    481|                                                     .drc_instructions_index]);
  309|       |
  310|    481|    match = 1;
  311|  4.32k|    for (n = 0; n < effect_types_request_table_size; n++) {
  ------------------
  |  Branch (311:17): [True: 3.84k, False: 481]
  ------------------
  312|  3.84k|      if ((str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (312:11): [True: 395, False: 3.45k]
  ------------------
  313|  3.84k|           effect_types_request_table[n]) != 0x0) {
  314|    395|        match = 0;
  315|    395|      }
  316|  3.84k|    }
  317|    481|    if (match == 1) {
  ------------------
  |  Branch (317:9): [True: 86, False: 395]
  ------------------
  318|     86|      if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|     86|#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: 86]
  ------------------
  319|     86|      memcpy(&selection_candidate_info_step_2[k], &selection_candidate_info[i],
  320|     86|             sizeof(ia_selection_candidate_info_struct));
  321|     86|      k++;
  322|     86|    }
  323|    481|  }
  324|     91|  selection_candidate_step_2_count = k;
  325|       |
  326|     91|  if (selection_candidate_step_2_count > 0) {
  ------------------
  |  Branch (326:7): [True: 73, False: 18]
  ------------------
  327|     73|    *match_found_flag = 1;
  328|    159|    for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (328:17): [True: 86, False: 73]
  ------------------
  329|     86|      memcpy(&selection_candidate_info[i], &selection_candidate_info_step_2[i],
  330|     86|             sizeof(ia_selection_candidate_info_struct));
  331|     86|      *selection_candidate_count = selection_candidate_step_2_count;
  332|     86|    }
  333|     73|  } else {
  334|     18|    *match_found_flag = 0;
  335|     18|  }
  336|       |
  337|     91|  return (0);
  338|     91|}
impd_match_effect_type_attempt:
  344|    247|    ia_selection_candidate_info_struct* selection_candidate_info) {
  345|    247|  WORD32 i, k, err;
  346|    247|  WORD32 selection_candidate_step_2_count = 0;
  347|    247|  ia_selection_candidate_info_struct
  348|    247|      selection_candidate_info_step_2[SELECTION_CANDIDATE_COUNT_MAX];
  349|    247|  ia_drc_instructions_struct* str_drc_instruction_str;
  350|    247|  ia_drc_instructions_struct* drc_instructions_dependent;
  351|    247|  WORD32 effect_bit_idx;
  352|       |
  353|    247|  err =
  354|    247|      impd_map_requested_effect_bit_idx(requested_effect_type, &effect_bit_idx);
  355|    247|  if (err) return (err);
  ------------------
  |  Branch (355:7): [True: 0, False: 247]
  ------------------
  356|       |
  357|    247|  if (effect_bit_idx == EFFECT_BIT_NONE) {
  ------------------
  |  |   61|    247|#define EFFECT_BIT_NONE (-1)
  ------------------
  |  Branch (357:7): [True: 0, False: 247]
  ------------------
  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|    247|  } else {
  363|    247|    k = 0;
  364|  1.87k|    for (i = 0; i < *selection_candidate_count; i++) {
  ------------------
  |  Branch (364:17): [True: 1.62k, False: 247]
  ------------------
  365|  1.62k|      str_drc_instruction_str =
  366|  1.62k|          &(pstr_drc_config->str_drc_instruction_str
  367|  1.62k|                [selection_candidate_info[i].drc_instructions_index]);
  368|  1.62k|      if (str_drc_instruction_str->depends_on_drc_set_present == 1) {
  ------------------
  |  Branch (368:11): [True: 0, False: 1.62k]
  ------------------
  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.62k|      } else {
  398|  1.62k|        if (state_requested == 1) {
  ------------------
  |  Branch (398:13): [True: 1.62k, False: 0]
  ------------------
  399|  1.62k|          if ((str_drc_instruction_str->drc_set_effect & effect_bit_idx) !=
  ------------------
  |  Branch (399:15): [True: 210, False: 1.41k]
  ------------------
  400|  1.62k|              0x0) {
  401|    210|            if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|    210|#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: 210]
  ------------------
  402|    210|            memcpy(&selection_candidate_info_step_2[k],
  403|    210|                   &selection_candidate_info[i],
  404|    210|                   sizeof(ia_selection_candidate_info_struct));
  405|    210|            k++;
  406|    210|          }
  407|  1.62k|        } 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.62k|      }
  418|  1.62k|    }
  419|    247|    selection_candidate_step_2_count = k;
  420|       |
  421|    247|    if (selection_candidate_step_2_count > 0) {
  ------------------
  |  Branch (421:9): [True: 162, False: 85]
  ------------------
  422|    162|      *match_found_flag = 1;
  423|    372|      for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (423:19): [True: 210, False: 162]
  ------------------
  424|    210|        *selection_candidate_count = selection_candidate_step_2_count;
  425|    210|        memcpy(&selection_candidate_info[i],
  426|    210|               &selection_candidate_info_step_2[i],
  427|    210|               sizeof(ia_selection_candidate_info_struct));
  428|    210|      }
  429|    162|    } else {
  430|     85|      *match_found_flag = 0;
  431|     85|    }
  432|    247|  }
  433|    247|  return (0);
  434|    247|}
impd_match_effect_types:
  440|    234|    ia_selection_candidate_info_struct* selection_candidate_info) {
  441|    234|  WORD32 k, err;
  442|    234|  WORD32 match_found_flag = 0;
  443|    234|  WORD32 state_requested;
  444|    234|  WORD32 desired_effect_type_found;
  445|       |
  446|    234|  desired_effect_type_found = 0;
  447|    234|  k = 0;
  448|    468|  while (k < effect_type_requested_desired_count) {
  ------------------
  |  Branch (448:10): [True: 234, False: 234]
  ------------------
  449|    234|    state_requested = 1;
  450|    234|    err = impd_match_effect_type_attempt(
  451|    234|        pstr_drc_config, requested_effect_type[k], state_requested,
  452|    234|        &match_found_flag, selection_candidate_count, selection_candidate_info);
  453|    234|    if (err) return (err);
  ------------------
  |  Branch (453:9): [True: 0, False: 234]
  ------------------
  454|    234|    if (match_found_flag) desired_effect_type_found = 1;
  ------------------
  |  Branch (454:9): [True: 155, False: 79]
  ------------------
  455|    234|    k++;
  456|    234|  }
  457|    234|  if (desired_effect_type_found == 0) {
  ------------------
  |  Branch (457:7): [True: 79, False: 155]
  ------------------
  458|     92|    while ((k < effect_type_requested_total_count) && (match_found_flag == 0)) {
  ------------------
  |  Branch (458:12): [True: 20, False: 72]
  |  Branch (458:55): [True: 13, False: 7]
  ------------------
  459|     13|      state_requested = 1;
  460|     13|      err = impd_match_effect_type_attempt(
  461|     13|          pstr_drc_config, requested_effect_type[k], state_requested,
  462|     13|          &match_found_flag, selection_candidate_count,
  463|     13|          selection_candidate_info);
  464|     13|      if (err) return (err);
  ------------------
  |  Branch (464:11): [True: 0, False: 13]
  ------------------
  465|     13|      k++;
  466|     13|    }
  467|     79|  }
  468|       |
  469|    234|  return (0);
  470|    234|}
impd_match_dynamic_range:
  477|    216|    ia_selection_candidate_info_struct* selection_candidate_info) {
  478|    216|  ia_drc_instructions_struct* str_drc_instruction_str;
  479|    216|  WORD32 err, i, k;
  480|    216|  WORD32 lp_avg_present_val;
  481|    216|  FLOAT32 lp_avg_val;
  482|    216|  FLOAT32 deviation_min = 1000.0f;
  483|    216|  WORD32 selected[DRC_INSTRUCTIONS_COUNT_MAX];
  484|    216|  WORD32 dynamic_range_measurement_type =
  485|    216|      pstr_drc_sel_proc_params_struct
  486|    216|          ->requested_dyn_range_measur_type[num_drc_requests];
  487|       |
  488|    216|  WORD32 requested_dyn_range_range_flag =
  489|    216|      pstr_drc_sel_proc_params_struct
  490|    216|          ->requested_dyn_range_range_flag[num_drc_requests];
  491|       |
  492|    216|  FLOAT32 dynamic_range_requested =
  493|    216|      pstr_drc_sel_proc_params_struct
  494|    216|          ->requested_dyn_range_value[num_drc_requests];
  495|       |
  496|    216|  FLOAT32 dynamic_range_min_requested =
  497|    216|      pstr_drc_sel_proc_params_struct
  498|    216|          ->requested_dyn_range_min_val[num_drc_requests];
  499|       |
  500|    216|  FLOAT32 dynamic_range_max_requested =
  501|    216|      pstr_drc_sel_proc_params_struct
  502|    216|          ->requested_dyn_range_max_val[num_drc_requests];
  503|       |
  504|    216|  WORD32* requested_dwnmix_id =
  505|    216|      pstr_drc_sel_proc_params_struct->requested_dwnmix_id;
  506|       |
  507|    216|  WORD32 album_mode = pstr_drc_sel_proc_params_struct->album_mode;
  508|       |
  509|    216|  k = 0;
  510|  1.14k|  for (i = 0; i < *selection_candidate_count; i++) {
  ------------------
  |  Branch (510:15): [True: 928, False: 216]
  ------------------
  511|    928|    str_drc_instruction_str = &(
  512|    928|        pstr_drc_config->str_drc_instruction_str[selection_candidate_info[i]
  513|    928|                                                     .drc_instructions_index]);
  514|       |
  515|    928|    err = impd_loudness_peak_to_average_info(
  516|    928|        pstr_loudness_info, str_drc_instruction_str,
  517|    928|        requested_dwnmix_id[selection_candidate_info[i]
  518|    928|                                .downmix_id_request_index],
  519|    928|        dynamic_range_measurement_type, album_mode, &lp_avg_present_val,
  520|    928|        &lp_avg_val);
  521|    928|    if (err) return (err);
  ------------------
  |  Branch (521:9): [True: 0, False: 928]
  ------------------
  522|       |
  523|    928|    if (lp_avg_present_val == 1) {
  ------------------
  |  Branch (523:9): [True: 59, False: 869]
  ------------------
  524|     59|      if (requested_dyn_range_range_flag == 1) {
  ------------------
  |  Branch (524:11): [True: 0, False: 59]
  ------------------
  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|     59|      } else {
  532|     59|        FLOAT32 deviation =
  533|     59|            (FLOAT32)fabs((FLOAT64)(dynamic_range_requested - lp_avg_val));
  534|     59|        if (deviation_min >= deviation) {
  ------------------
  |  Branch (534:13): [True: 51, False: 8]
  ------------------
  535|     51|          if (deviation_min > deviation) {
  ------------------
  |  Branch (535:15): [True: 15, False: 36]
  ------------------
  536|     15|            deviation_min = deviation;
  537|     15|            k = 0;
  538|     15|          }
  539|     51|          if (k >= DRC_INSTRUCTIONS_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |   43|     51|#define DRC_INSTRUCTIONS_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|     51|#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: 51]
  ------------------
  540|     51|          selected[k] = i;
  541|     51|          k++;
  542|     51|        }
  543|     59|      }
  544|     59|    }
  545|    928|  }
  546|    216|  if (k > 0) {
  ------------------
  |  Branch (546:7): [True: 14, False: 202]
  ------------------
  547|     64|    for (i = 0; i < k; i++) {
  ------------------
  |  Branch (547:17): [True: 50, False: 14]
  ------------------
  548|     50|      memcpy(&selection_candidate_info[i],
  549|     50|             &selection_candidate_info[selected[i]],
  550|     50|             sizeof(ia_selection_candidate_info_struct));
  551|     50|    }
  552|     14|    *selection_candidate_count = k;
  553|     14|  }
  554|       |
  555|    216|  return (0);
  556|    216|}
impd_match_drc_characteristic_attempt:
  561|    648|    ia_selection_candidate_info_struct* selection_candidate_info) {
  562|    648|  WORD32 i, k, n, b, m;
  563|    648|  WORD32 ref_count;
  564|    648|  WORD32 drc_characteristic;
  565|    648|  FLOAT32 match_count;
  566|    648|  WORD32 drc_characteristic_request_1;
  567|    648|  WORD32 drc_characteristic_request_2;
  568|    648|  WORD32 drc_characteristic_request_3;
  569|       |
  570|    648|  ia_drc_instructions_struct* str_drc_instruction_str = NULL;
  571|    648|  ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc = NULL;
  572|    648|  ia_gain_set_params_struct* gain_set_params = NULL;
  573|    648|  *match_found_flag = 0;
  574|       |
  575|    648|  if (requested_drc_characteristic < 1) {
  ------------------
  |  Branch (575:7): [True: 0, False: 648]
  ------------------
  576|      0|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  577|      0|  }
  578|    648|  if (requested_drc_characteristic < 12) {
  ------------------
  |  Branch (578:7): [True: 648, False: 0]
  ------------------
  579|    648|    drc_characteristic_request_1 =
  580|    648|        drc_characteristic_order_default[requested_drc_characteristic - 1][0];
  581|    648|    drc_characteristic_request_2 =
  582|    648|        drc_characteristic_order_default[requested_drc_characteristic - 1][1];
  583|    648|    drc_characteristic_request_3 =
  584|    648|        drc_characteristic_order_default[requested_drc_characteristic - 1][2];
  585|    648|  } 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|    648|  if (pstr_drc_config->drc_coefficients_drc_count) {
  ------------------
  |  Branch (591:7): [True: 648, False: 0]
  ------------------
  592|    675|    for (i = 0; i < pstr_drc_config->drc_coefficients_drc_count; i++) {
  ------------------
  |  Branch (592:17): [True: 675, False: 0]
  ------------------
  593|    675|      str_p_loc_drc_coefficients_uni_drc =
  594|    675|          &(pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[i]);
  595|    675|      if (str_p_loc_drc_coefficients_uni_drc->drc_location == LOCATION_SELECTED)
  ------------------
  |  |  144|    675|#define LOCATION_SELECTED LOCATION_MP4_INSTREAM_UNIDRC
  |  |  ------------------
  |  |  |  |  141|    675|#define LOCATION_MP4_INSTREAM_UNIDRC 0x1
  |  |  ------------------
  ------------------
  |  Branch (595:11): [True: 648, False: 27]
  ------------------
  596|    648|        break;
  597|    675|    }
  598|       |
  599|    648|    if (i == pstr_drc_config->drc_coefficients_drc_count) {
  ------------------
  |  Branch (599:9): [True: 0, False: 648]
  ------------------
  600|      0|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  601|      0|    }
  602|    648|  }
  603|       |
  604|    648|  n = 0;
  605|  2.65k|  for (i = 0; i < *selection_candidate_count; i++) {
  ------------------
  |  Branch (605:15): [True: 2.01k, False: 648]
  ------------------
  606|  2.01k|    ref_count = 0;
  607|  2.01k|    match_count = 0;
  608|       |
  609|  2.01k|    str_drc_instruction_str = &(
  610|  2.01k|        pstr_drc_config->str_drc_instruction_str[selection_candidate_info[i]
  611|  2.01k|                                                     .drc_instructions_index]);
  612|  5.19k|    for (k = 0; k < str_drc_instruction_str->num_drc_ch_groups; k++) {
  ------------------
  |  Branch (612:17): [True: 3.18k, False: 2.01k]
  ------------------
  613|  3.18k|      gain_set_params =
  614|  3.18k|          &(str_p_loc_drc_coefficients_uni_drc->gain_set_params
  615|  3.18k|                [str_drc_instruction_str->gain_set_index_for_channel_group[k]]);
  616|  6.37k|      for (b = 0; b < gain_set_params->band_count; b++) {
  ------------------
  |  Branch (616:19): [True: 3.18k, False: 3.18k]
  ------------------
  617|  3.18k|        ref_count++;
  618|  3.18k|        drc_characteristic = gain_set_params->gain_params[b].drc_characteristic;
  619|  3.18k|        if (drc_characteristic == drc_characteristic_request_1)
  ------------------
  |  Branch (619:13): [True: 0, False: 3.18k]
  ------------------
  620|      0|          match_count += 1.0f;
  621|  3.18k|        else if (drc_characteristic == drc_characteristic_request_2)
  ------------------
  |  Branch (621:18): [True: 0, False: 3.18k]
  ------------------
  622|      0|          match_count += 0.75f;
  623|  3.18k|        else if (drc_characteristic == drc_characteristic_request_3)
  ------------------
  |  Branch (623:18): [True: 0, False: 3.18k]
  ------------------
  624|      0|          match_count += 0.5f;
  625|  3.18k|      }
  626|  3.18k|    }
  627|  2.01k|    if (str_drc_instruction_str->depends_on_drc_set_present == 1) {
  ------------------
  |  Branch (627:9): [True: 0, False: 2.01k]
  ------------------
  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.01k|    if ((ref_count > 0) && (((FLOAT32)match_count) > 0.5f * ref_count)) {
  ------------------
  |  Branch (662:9): [True: 1.59k, False: 417]
  |  Branch (662:28): [True: 0, False: 1.59k]
  ------------------
  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.01k|  }
  669|    648|  if (n > 0) {
  ------------------
  |  Branch (669:7): [True: 0, False: 648]
  ------------------
  670|      0|    *selection_candidate_count = n;
  671|      0|    *match_found_flag = 1;
  672|      0|  }
  673|       |
  674|    648|  return (0);
  675|    648|}
impd_match_drc_characteristic:
  680|    216|    ia_selection_candidate_info_struct* selection_candidate_info) {
  681|    216|  WORD32 k, err;
  682|    216|  WORD32 match_found_flag = 0;
  683|       |
  684|    216|  const WORD32* drc_characteristic_order =
  685|    216|      drc_characteristic_order_default[requested_drc_characteristic - 1];
  686|    216|  const WORD32 drc_characteristic_order_count =
  687|    216|      sizeof(drc_characteristic_order_default[requested_drc_characteristic]) /
  688|    216|      sizeof(WORD32);
  689|    216|  k = 0;
  690|    864|  while ((k < drc_characteristic_order_count) && (match_found_flag == 0) &&
  ------------------
  |  Branch (690:10): [True: 648, False: 216]
  |  Branch (690:50): [True: 648, False: 0]
  ------------------
  691|    648|         (drc_characteristic_order[k] > 0)) {
  ------------------
  |  Branch (691:10): [True: 648, False: 0]
  ------------------
  692|    648|    err = impd_match_drc_characteristic_attempt(
  693|    648|        pstr_drc_config, drc_characteristic_order[k], &match_found_flag,
  694|    648|        selection_candidate_count, selection_candidate_info);
  695|    648|    if (err) return (err);
  ------------------
  |  Branch (695:9): [True: 0, False: 648]
  ------------------
  696|    648|    k++;
  697|    648|  }
  698|    216|  return (0);
  699|    216|}
impd_drc_set_preselection:
  708|    596|    ia_selection_candidate_info_struct* selection_candidate_info) {
  709|    596|  WORD32 i, j, k, l, d, n, err;
  710|    596|  WORD32 downmix_id_match = 0;
  711|       |
  712|    596|  WORD32 selection_candidate_step_2_count;
  713|    596|  ia_selection_candidate_info_struct
  714|    596|      selection_candidate_info_step_2[SELECTION_CANDIDATE_COUNT_MAX];
  715|       |
  716|    596|  WORD32 num_downmix_id_requests =
  717|    596|      pstr_drc_sel_proc_params_struct->num_downmix_id_requests;
  718|    596|  WORD32* requested_dwnmix_id =
  719|    596|      pstr_drc_sel_proc_params_struct->requested_dwnmix_id;
  720|    596|  FLOAT32 output_peak_level_max =
  721|    596|      pstr_drc_sel_proc_params_struct->output_peak_level_max;
  722|    596|  WORD32 loudness_deviation_max =
  723|    596|      pstr_drc_sel_proc_params_struct->loudness_deviation_max;
  724|    596|  WORD32* drc_set_id_valid_flag = pstr_drc_uni_sel_proc->drc_set_id_valid_flag;
  725|    596|  WORD32* eq_set_id_valid_flag = pstr_drc_uni_sel_proc->eq_set_id_valid_flag;
  726|       |
  727|    596|  FLOAT32 output_peak_level_min = 1000.0f;
  728|    596|  FLOAT32 adjustment;
  729|    596|  WORD32 loudness_drc_set_id_requested;
  730|       |
  731|    596|  WORD32 num_compression_eq_count = 0;
  732|    596|  WORD32 num_compression_eq_id[16];
  733|       |
  734|    596|  WORD32 loudness_info_count = 0;
  735|    596|  WORD32 eq_set_id_loudness[16];
  736|    596|  FLOAT32 loudness_normalization_gain_db[16];
  737|    596|  FLOAT32 loudness[16];
  738|    596|  WORD32 peak_info_count;
  739|    596|  WORD32 eq_set_id_Peak[16];
  740|    596|  FLOAT32 signal_peak_level[16];
  741|    596|  WORD32 explicit_peak_information_present[16] = { 0 };
  742|       |
  743|    596|  ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc = NULL;
  744|    596|  ia_drc_instructions_struct* str_drc_instruction_str = NULL;
  745|       |
  746|    596|  impd_select_drc_coeff3(pstr_drc_config, &str_p_loc_drc_coefficients_uni_drc);
  747|    596|  if (str_p_loc_drc_coefficients_uni_drc == NULL) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (747:7): [True: 0, False: 596]
  ------------------
  748|    596|  k = 0;
  749|  1.18k|  for (d = 0; d < num_downmix_id_requests; d++) {
  ------------------
  |  Branch (749:15): [True: 596, False: 593]
  ------------------
  750|    596|    err = impd_find_eq_set_no_compression(
  751|    596|        pstr_drc_config, requested_dwnmix_id[d], &num_compression_eq_count,
  752|    596|        num_compression_eq_id);
  753|    596|    if (err) return (err);
  ------------------
  |  Branch (753:9): [True: 0, False: 596]
  ------------------
  754|  3.56k|    for (i = 0; i < pstr_drc_config->drc_instructions_count_plus; i++) {
  ------------------
  |  Branch (754:17): [True: 2.96k, False: 593]
  ------------------
  755|  2.96k|      downmix_id_match = 0;
  756|  2.96k|      str_drc_instruction_str = &(pstr_drc_config->str_drc_instruction_str[i]);
  757|       |
  758|  5.93k|      for (j = 0; j < str_drc_instruction_str->dwnmix_id_count; j++) {
  ------------------
  |  Branch (758:19): [True: 2.96k, False: 2.96k]
  ------------------
  759|  2.96k|        if ((str_drc_instruction_str->downmix_id[j] ==
  ------------------
  |  Branch (759:13): [True: 2.96k, False: 0]
  ------------------
  760|  2.96k|             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.96k|            (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.96k|          downmix_id_match = 1;
  765|  2.96k|        }
  766|  2.96k|      }
  767|  2.96k|      if (downmix_id_match == 1) {
  ------------------
  |  Branch (767:11): [True: 2.96k, False: 0]
  ------------------
  768|  2.96k|        if (pstr_drc_sel_proc_params_struct->dynamic_range_control_on == 1) {
  ------------------
  |  Branch (768:13): [True: 1.53k, False: 1.43k]
  ------------------
  769|  1.53k|          if ((str_drc_instruction_str->drc_set_effect != EFFECT_BIT_FADE) &&
  ------------------
  |  |   71|  1.53k|#define EFFECT_BIT_FADE 0x0200
  ------------------
  |  Branch (769:15): [True: 1.53k, False: 0]
  ------------------
  770|  1.53k|              (str_drc_instruction_str->drc_set_effect !=
  ------------------
  |  Branch (770:15): [True: 1.53k, False: 0]
  ------------------
  771|  1.53k|               EFFECT_BIT_DUCK_OTHER) &&
  ------------------
  |  |   72|  1.53k|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
  772|  1.53k|              (str_drc_instruction_str->drc_set_effect !=
  ------------------
  |  Branch (772:15): [True: 1.53k, False: 0]
  ------------------
  773|  1.53k|               EFFECT_BIT_DUCK_SELF) &&
  ------------------
  |  |   73|  1.53k|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
  774|  1.53k|              (str_drc_instruction_str->drc_set_effect != 0 ||
  ------------------
  |  Branch (774:16): [True: 1.22k, False: 309]
  ------------------
  775|    309|               str_drc_instruction_str->drc_set_id < 0) &&
  ------------------
  |  Branch (775:16): [True: 309, False: 0]
  ------------------
  776|  1.53k|              (((str_drc_instruction_str->depends_on_drc_set_present == 0) &&
  ------------------
  |  Branch (776:17): [True: 1.53k, False: 0]
  ------------------
  777|  1.53k|                (str_drc_instruction_str->no_independent_use == 0)) ||
  ------------------
  |  Branch (777:17): [True: 1.53k, False: 0]
  ------------------
  778|  1.53k|               (str_drc_instruction_str->depends_on_drc_set_present == 1))) {
  ------------------
  |  Branch (778:16): [True: 0, False: 0]
  ------------------
  779|  1.53k|            WORD32 drc_is_permitted = 1;
  780|  1.53k|            if (str_drc_instruction_str->drc_set_id > 0) {
  ------------------
  |  Branch (780:17): [True: 1.22k, False: 309]
  ------------------
  781|  1.22k|              drc_is_permitted =
  782|  1.22k|                  drc_set_id_valid_flag[str_drc_instruction_str->drc_set_id];
  783|  1.22k|            }
  784|  1.53k|            if (drc_is_permitted == 1) {
  ------------------
  |  Branch (784:17): [True: 1.53k, False: 0]
  ------------------
  785|  1.53k|              err = impd_init_loudness_control(
  786|  1.53k|                  pstr_drc_sel_proc_params_struct, pstr_loudness_info,
  787|  1.53k|                  requested_dwnmix_id[d], str_drc_instruction_str->drc_set_id,
  788|       |
  789|  1.53k|                  num_compression_eq_count, num_compression_eq_id,
  790|  1.53k|                  &loudness_info_count, eq_set_id_loudness,
  791|  1.53k|                  loudness_normalization_gain_db, loudness);
  792|  1.53k|              if (err) return (err);
  ------------------
  |  Branch (792:19): [True: 0, False: 1.53k]
  ------------------
  793|       |
  794|  1.53k|              if (loudness_info_count > MAX_LOUDNESS_INFO_COUNT)
  ------------------
  |  |  191|  1.53k|#define MAX_LOUDNESS_INFO_COUNT (16)
  ------------------
  |  Branch (794:19): [True: 0, False: 1.53k]
  ------------------
  795|      0|                return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  796|       |
  797|  1.53k|              impd_signal_peak_level_info(
  798|  1.53k|                  pstr_drc_config, pstr_loudness_info, str_drc_instruction_str,
  799|  1.53k|                  requested_dwnmix_id[d],
  800|  1.53k|                  pstr_drc_sel_proc_params_struct->album_mode,
  801|  1.53k|                  num_compression_eq_count, num_compression_eq_id,
  802|  1.53k|                  &peak_info_count, eq_set_id_Peak, signal_peak_level,
  803|  1.53k|                  explicit_peak_information_present);
  804|       |
  805|  3.88k|              for (l = 0; l < loudness_info_count; l++) {
  ------------------
  |  Branch (805:27): [True: 2.34k, False: 1.53k]
  ------------------
  806|  2.34k|                WORD32 match_found_flag = 0;
  807|  2.34k|                WORD32 p;
  808|  2.34k|                if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|  2.34k|#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.34k]
  ------------------
  809|  2.34k|                selection_candidate_info[k].loudness_norm_db_gain_adjusted =
  810|  2.34k|                    loudness_normalization_gain_db[l];
  811|       |
  812|  2.34k|                selection_candidate_info[k]
  813|  2.34k|                    .loudness_norm_db_gain_adjusted = min(
  ------------------
  |  |  221|  2.34k|#define min(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (221:20): [True: 2.34k, False: 0]
  |  |  ------------------
  ------------------
  814|  2.34k|                    selection_candidate_info[k].loudness_norm_db_gain_adjusted,
  815|  2.34k|                    pstr_drc_sel_proc_params_struct->loudness_norm_gain_db_max);
  816|       |
  817|  2.34k|                if (loudness[l] != UNDEFINED_LOUDNESS_VALUE) {
  ------------------
  |  |  134|  2.34k|#define UNDEFINED_LOUDNESS_VALUE 1000.0f
  ------------------
  |  Branch (817:21): [True: 1.27k, False: 1.06k]
  ------------------
  818|  1.27k|                  selection_candidate_info[k].output_loudness =
  819|  1.27k|                      loudness[l] +
  820|  1.27k|                      selection_candidate_info[k]
  821|  1.27k|                          .loudness_norm_db_gain_adjusted;
  822|  1.27k|                } else {
  823|  1.06k|                  selection_candidate_info[k].output_loudness =
  824|  1.06k|                      UNDEFINED_LOUDNESS_VALUE;
  ------------------
  |  |  134|  1.06k|#define UNDEFINED_LOUDNESS_VALUE 1000.0f
  ------------------
  825|  1.06k|                }
  826|       |
  827|  2.41k|                for (p = 0; p < peak_info_count; p++) {
  ------------------
  |  Branch (827:29): [True: 2.37k, False: 41]
  ------------------
  828|  2.37k|                  if (eq_set_id_Peak[p] == eq_set_id_loudness[l]) {
  ------------------
  |  Branch (828:23): [True: 2.30k, False: 73]
  ------------------
  829|  2.30k|                    if (eq_set_id_valid_flag[eq_set_id_Peak[p]] == 1)
  ------------------
  |  Branch (829:25): [True: 2.30k, False: 0]
  ------------------
  830|       |
  831|  2.30k|                    {
  832|  2.30k|                      match_found_flag = 1;
  833|  2.30k|                      break;
  834|  2.30k|                    }
  835|  2.30k|                  }
  836|  2.37k|                }
  837|  2.34k|                if (match_found_flag == 1) {
  ------------------
  |  Branch (837:21): [True: 2.30k, False: 41]
  ------------------
  838|  2.30k|                  selection_candidate_info[k].output_peak_level =
  839|  2.30k|                      signal_peak_level[p] +
  840|  2.30k|                      selection_candidate_info[k]
  841|  2.30k|                          .loudness_norm_db_gain_adjusted;
  842|  2.30k|                } else {
  843|     41|                  selection_candidate_info[k].output_peak_level =
  844|     41|                      selection_candidate_info[k]
  845|     41|                          .loudness_norm_db_gain_adjusted;
  846|     41|                }
  847|  2.34k|                if ((str_drc_instruction_str->requires_eq == 1) &&
  ------------------
  |  Branch (847:21): [True: 0, False: 2.34k]
  ------------------
  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.34k|                selection_candidate_info[k].drc_instructions_index = i;
  851|  2.34k|                selection_candidate_info[k].downmix_id_request_index = d;
  852|  2.34k|                selection_candidate_info[k].eq_set_id = eq_set_id_loudness[l];
  853|  2.34k|                if (explicit_peak_information_present[p] == 1) {
  ------------------
  |  Branch (853:21): [True: 505, False: 1.84k]
  ------------------
  854|    505|                  selection_candidate_info[k].selection_flags =
  855|    505|                      SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT;
  ------------------
  |  |   28|    505|#define SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT (1 << 1)
  ------------------
  856|  1.84k|                } else {
  857|  1.84k|                  selection_candidate_info[k].selection_flags = 0;
  858|  1.84k|                }
  859|  2.34k|                impd_mixing_level_info(
  860|  2.34k|                    pstr_drc_sel_proc_params_struct, pstr_loudness_info,
  861|  2.34k|                    requested_dwnmix_id[d], str_drc_instruction_str->drc_set_id,
  862|  2.34k|                    eq_set_id_loudness[l],
  863|  2.34k|                    &selection_candidate_info[k].mixing_level);
  864|  2.34k|                if (str_drc_instruction_str->drc_set_target_loudness_present &&
  ------------------
  |  Branch (864:21): [True: 0, False: 2.34k]
  ------------------
  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.34k|                if ((selection_candidate_info[k].selection_flags &
  ------------------
  |  Branch (889:22): [True: 505, False: 1.84k]
  ------------------
  890|  2.34k|                         (SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH |
  ------------------
  |  |   27|  2.34k|#define SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH (1 << 0)
  ------------------
  891|  2.34k|                          SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT) ||
  ------------------
  |  |   28|  2.34k|#define SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT (1 << 1)
  ------------------
  892|  1.84k|                     !str_drc_instruction_str
  ------------------
  |  Branch (892:22): [True: 1.84k, False: 0]
  ------------------
  893|  2.34k|                          ->drc_set_target_loudness_present)) {
  894|  2.34k|                  k++;
  895|  2.34k|                }
  896|  2.34k|              }
  897|  1.53k|            }
  898|  1.53k|          }
  899|  1.53k|        } else {
  900|  1.43k|          if (str_drc_instruction_str->drc_set_id < 0) {
  ------------------
  |  Branch (900:15): [True: 286, False: 1.14k]
  ------------------
  901|    286|            err = impd_init_loudness_control(
  902|    286|                pstr_drc_sel_proc_params_struct, pstr_loudness_info,
  903|    286|                requested_dwnmix_id[d], str_drc_instruction_str->drc_set_id,
  904|    286|                num_compression_eq_count, num_compression_eq_id,
  905|    286|                &loudness_info_count, eq_set_id_loudness,
  906|    286|                loudness_normalization_gain_db, loudness);
  907|    286|            if (err) return (err);
  ------------------
  |  Branch (907:17): [True: 0, False: 286]
  ------------------
  908|       |
  909|    286|            impd_signal_peak_level_info(
  910|    286|                pstr_drc_config, pstr_loudness_info, str_drc_instruction_str,
  911|    286|                requested_dwnmix_id[d],
  912|    286|                pstr_drc_sel_proc_params_struct->album_mode,
  913|    286|                num_compression_eq_count, num_compression_eq_id,
  914|    286|                &peak_info_count, eq_set_id_Peak, signal_peak_level,
  915|    286|                explicit_peak_information_present);
  916|    610|            for (l = 0; l < loudness_info_count; l++) {
  ------------------
  |  Branch (916:25): [True: 324, False: 286]
  ------------------
  917|    324|              WORD32 match_found_flag = 0;
  918|    324|              WORD32 p;
  919|    324|              if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|    324|#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: 324]
  ------------------
  920|    336|              for (p = 0; p < peak_info_count; p++) {
  ------------------
  |  Branch (920:27): [True: 330, False: 6]
  ------------------
  921|    330|                if (eq_set_id_Peak[p] == eq_set_id_loudness[l]) {
  ------------------
  |  Branch (921:21): [True: 318, False: 12]
  ------------------
  922|    318|                  if (eq_set_id_valid_flag[eq_set_id_Peak[p]] == 1) {
  ------------------
  |  Branch (922:23): [True: 318, False: 0]
  ------------------
  923|    318|                    match_found_flag = 1;
  924|    318|                    break;
  925|    318|                  }
  926|    318|                }
  927|    330|              }
  928|    324|              if (match_found_flag == 1) {
  ------------------
  |  Branch (928:19): [True: 318, False: 6]
  ------------------
  929|    318|                adjustment = max(
  ------------------
  |  |  224|    318|#define max(a, b) ((a) > (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (224:20): [True: 27, False: 291]
  |  |  ------------------
  ------------------
  930|    318|                    0.0f,
  931|    318|                    signal_peak_level[p] + loudness_normalization_gain_db[l] -
  932|    318|                        pstr_drc_sel_proc_params_struct->output_peak_level_max);
  933|    318|                adjustment = min(adjustment, max(0.0f, loudness_deviation_max));
  ------------------
  |  |  221|    636|#define min(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (221:20): [True: 306, False: 12]
  |  |  |  Branch (221:27): [True: 0, False: 318]
  |  |  |  Branch (221:39): [True: 0, False: 12]
  |  |  ------------------
  ------------------
  934|    318|                selection_candidate_info[k].loudness_norm_db_gain_adjusted =
  935|    318|                    loudness_normalization_gain_db[l] - adjustment;
  936|       |
  937|    318|                selection_candidate_info[k]
  938|    318|                    .loudness_norm_db_gain_adjusted = min(
  ------------------
  |  |  221|    318|#define min(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (221:20): [True: 318, False: 0]
  |  |  ------------------
  ------------------
  939|    318|                    selection_candidate_info[k].loudness_norm_db_gain_adjusted,
  940|    318|                    pstr_drc_sel_proc_params_struct->loudness_norm_gain_db_max);
  941|       |
  942|    318|                selection_candidate_info[k].output_peak_level =
  943|    318|                    signal_peak_level[p] +
  944|    318|                    selection_candidate_info[k].loudness_norm_db_gain_adjusted;
  945|    318|                if (loudness[l] != UNDEFINED_LOUDNESS_VALUE) {
  ------------------
  |  |  134|    318|#define UNDEFINED_LOUDNESS_VALUE 1000.0f
  ------------------
  |  Branch (945:21): [True: 57, False: 261]
  ------------------
  946|     57|                  selection_candidate_info[k].output_loudness =
  947|     57|                      loudness[l] +
  948|     57|                      selection_candidate_info[k]
  949|     57|                          .loudness_norm_db_gain_adjusted;
  950|    261|                } else {
  951|    261|                  selection_candidate_info[k].output_loudness =
  952|    261|                      UNDEFINED_LOUDNESS_VALUE;
  ------------------
  |  |  134|    261|#define UNDEFINED_LOUDNESS_VALUE 1000.0f
  ------------------
  953|    261|                }
  954|    318|                selection_candidate_info[k].drc_instructions_index = i;
  955|    318|                selection_candidate_info[k].downmix_id_request_index = d;
  956|    318|                selection_candidate_info[k].eq_set_id = eq_set_id_loudness[l];
  957|    318|                if (explicit_peak_information_present[p] == 1) {
  ------------------
  |  Branch (957:21): [True: 46, False: 272]
  ------------------
  958|     46|                  selection_candidate_info[k].selection_flags =
  959|     46|                      SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT;
  ------------------
  |  |   28|     46|#define SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT (1 << 1)
  ------------------
  960|    272|                } else {
  961|    272|                  selection_candidate_info[k].selection_flags = 0;
  962|    272|                }
  963|    318|                impd_mixing_level_info(
  964|    318|                    pstr_drc_sel_proc_params_struct, pstr_loudness_info,
  965|    318|                    requested_dwnmix_id[d], str_drc_instruction_str->drc_set_id,
  966|    318|                    eq_set_id_loudness[l],
  967|    318|                    &selection_candidate_info[k].mixing_level);
  968|    318|                k++;
  969|    318|              }
  970|    324|            }
  971|    286|          }
  972|  1.43k|        }
  973|  2.96k|      }
  974|  2.96k|    }
  975|    596|  }
  976|    593|  if (k > SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|    593|#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: 593]
  ------------------
  977|    593|  *selection_candidate_count = k;
  978|    593|  if (pstr_drc_sel_proc_params_struct->dynamic_range_control_on == 1) {
  ------------------
  |  Branch (978:7): [True: 307, False: 286]
  ------------------
  979|    307|    n = 0;
  980|  2.55k|    for (k = 0; k < *selection_candidate_count; k++) {
  ------------------
  |  Branch (980:17): [True: 2.24k, False: 307]
  ------------------
  981|  2.24k|      str_drc_instruction_str =
  982|  2.24k|          &(pstr_drc_config->str_drc_instruction_str
  983|  2.24k|                [selection_candidate_info[k].drc_instructions_index]);
  984|       |
  985|  2.24k|      if (pstr_drc_sel_proc_params_struct->eq_set_purpose_request !=
  ------------------
  |  Branch (985:11): [True: 0, False: 2.24k]
  ------------------
  986|  2.24k|          EQ_PURPOSE_EQ_OFF) {
  ------------------
  |  |  205|  2.24k|#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.24k|      if (str_drc_instruction_str->requires_eq == 0) {
  ------------------
  |  Branch (1007:11): [True: 2.24k, False: 0]
  ------------------
 1008|  2.24k|        if (n >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|  2.24k|#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.24k]
  ------------------
 1009|  2.24k|        memcpy(&selection_candidate_info_step_2[n],
 1010|  2.24k|               &selection_candidate_info[k],
 1011|  2.24k|               sizeof(ia_selection_candidate_info_struct));
 1012|  2.24k|        selection_candidate_info_step_2[n].eq_set_id = 0;
 1013|  2.24k|        n++;
 1014|  2.24k|      }
 1015|  2.24k|    }
 1016|    307|    if (n > SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|    307|#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: 307]
  ------------------
 1017|    307|    memcpy(selection_candidate_info, selection_candidate_info_step_2,
 1018|    307|           n * sizeof(ia_selection_candidate_info_struct));
 1019|    307|    *selection_candidate_count = n;
 1020|    307|    n = 0;
 1021|  2.55k|    for (k = 0; k < *selection_candidate_count; k++) {
  ------------------
  |  Branch (1021:17): [True: 2.24k, False: 307]
  ------------------
 1022|  2.24k|      if ((selection_candidate_info[k].selection_flags &
  ------------------
  |  Branch (1022:11): [True: 0, False: 2.24k]
  ------------------
 1023|  2.24k|           SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH) &&
  ------------------
  |  |   27|  2.24k|#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.24k|      } else {
 1031|  2.24k|        if (selection_candidate_info[k].output_peak_level <=
  ------------------
  |  Branch (1031:13): [True: 1.85k, False: 396]
  ------------------
 1032|  2.24k|            output_peak_level_max) {
 1033|  1.85k|          memcpy(&selection_candidate_info_step_2[n],
 1034|  1.85k|                 &selection_candidate_info[k],
 1035|  1.85k|                 sizeof(ia_selection_candidate_info_struct));
 1036|  1.85k|          n++;
 1037|  1.85k|        }
 1038|  2.24k|        if (selection_candidate_info[k].output_peak_level <
  ------------------
  |  Branch (1038:13): [True: 454, False: 1.79k]
  ------------------
 1039|  2.24k|            output_peak_level_min) {
 1040|    454|          output_peak_level_min = selection_candidate_info[k].output_peak_level;
 1041|    454|        }
 1042|  2.24k|      }
 1043|  2.24k|    }
 1044|    307|    selection_candidate_step_2_count = n;
 1045|    307|    if (selection_candidate_step_2_count == 0) {
  ------------------
  |  Branch (1045:9): [True: 25, False: 282]
  ------------------
 1046|     25|      n = 0;
 1047|    266|      for (k = 0; k < *selection_candidate_count; k++) {
  ------------------
  |  Branch (1047:19): [True: 241, False: 25]
  ------------------
 1048|    241|        if ((selection_candidate_info[k].selection_flags &
  ------------------
  |  Branch (1048:13): [True: 0, False: 241]
  ------------------
 1049|    241|             SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH) &&
  ------------------
  |  |   27|    241|#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|    241|      }
 1058|     25|      selection_candidate_step_2_count = n;
 1059|     25|    }
 1060|    307|    if (selection_candidate_step_2_count == 0) {
  ------------------
  |  Branch (1060:9): [True: 25, False: 282]
  ------------------
 1061|     25|      n = 0;
 1062|    266|      for (k = 0; k < *selection_candidate_count; k++) {
  ------------------
  |  Branch (1062:19): [True: 241, False: 25]
  ------------------
 1063|    241|        if (selection_candidate_info_step_2[k].output_peak_level <
  ------------------
  |  Branch (1063:13): [True: 145, False: 96]
  ------------------
 1064|    241|            output_peak_level_min + 1.0f) {
 1065|    145|          memcpy(&selection_candidate_info_step_2[n],
 1066|    145|                 &selection_candidate_info[k],
 1067|    145|                 sizeof(ia_selection_candidate_info_struct));
 1068|    145|          adjustment =
 1069|    145|              max(0.0f, selection_candidate_info_step_2[n].output_peak_level -
  ------------------
  |  |  224|    145|#define max(a, b) ((a) > (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (224:20): [True: 0, False: 145]
  |  |  ------------------
  ------------------
 1070|    145|                            output_peak_level_max);
 1071|    145|          adjustment = min(adjustment, max(0.0f, loudness_deviation_max));
  ------------------
  |  |  221|    290|#define min(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (221:20): [True: 91, False: 54]
  |  |  |  Branch (221:27): [True: 0, False: 145]
  |  |  |  Branch (221:39): [True: 0, False: 54]
  |  |  ------------------
  ------------------
 1072|    145|          selection_candidate_info_step_2[n].loudness_norm_db_gain_adjusted -=
 1073|    145|              adjustment;
 1074|    145|          selection_candidate_info_step_2[n].output_peak_level -= adjustment;
 1075|    145|          selection_candidate_info_step_2[n].output_loudness -= adjustment;
 1076|    145|          n++;
 1077|    145|        }
 1078|    241|      }
 1079|     25|      selection_candidate_step_2_count = n;
 1080|     25|    }
 1081|       |
 1082|  2.30k|    for (n = 0; n < selection_candidate_step_2_count; n++) {
  ------------------
  |  Branch (1082:17): [True: 1.99k, False: 307]
  ------------------
 1083|  1.99k|      memcpy(&selection_candidate_info[n], &selection_candidate_info_step_2[n],
 1084|  1.99k|             sizeof(ia_selection_candidate_info_struct));
 1085|  1.99k|    }
 1086|    307|    *selection_candidate_count = selection_candidate_step_2_count;
 1087|    307|  }
 1088|       |
 1089|    593|  if (restrict_to_drc_with_album_loudness == 1) {
  ------------------
  |  Branch (1089:7): [True: 0, False: 593]
  ------------------
 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|    593|  return (0);
 1111|    593|}
impd_drc_set_final_selection:
 1118|    307|    WORD32* eq_set_id_valid_flag) {
 1119|    307|  WORD32 k, i, n, err;
 1120|    307|  WORD32 selection_candidate_step_2_count;
 1121|    307|  ia_selection_candidate_info_struct
 1122|    307|      selection_candidate_info_step_2[SELECTION_CANDIDATE_COUNT_MAX];
 1123|    307|  WORD32 drc_set_id_max;
 1124|    307|  FLOAT32 output_level_max;
 1125|    307|  FLOAT32 output_level_min;
 1126|    307|  WORD32 effect_count, effect_count_min;
 1127|    307|  WORD32 effect_types_request_table_size;
 1128|    307|  WORD32 drc_set_target_loudness_val_upper_min;
 1129|    307|  ia_drc_instructions_struct* str_drc_instruction_str;
 1130|    307|  ia_drc_instructions_struct* drc_instructions_dependent;
 1131|       |
 1132|    307|  if (pstr_drc_sel_proc_params_struct->eq_set_purpose_request > 0) {
  ------------------
  |  Branch (1132:7): [True: 0, False: 307]
  ------------------
 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|    307|  output_level_min = 10000.0f;
 1144|    307|  k = 0;
 1145|  1.09k|  for (i = 0; i < *selection_candidate_count; i++) {
  ------------------
  |  Branch (1145:15): [True: 788, False: 307]
  ------------------
 1146|    788|    if (output_level_min >= selection_candidate_info[i].output_peak_level) {
  ------------------
  |  Branch (1146:9): [True: 570, False: 218]
  ------------------
 1147|    570|      if (output_level_min > selection_candidate_info[i].output_peak_level) {
  ------------------
  |  Branch (1147:11): [True: 373, False: 197]
  ------------------
 1148|    373|        output_level_min = selection_candidate_info[i].output_peak_level;
 1149|    373|        k = 0;
 1150|    373|      }
 1151|    570|      memcpy(&selection_candidate_info_step_2[k], &selection_candidate_info[i],
 1152|    570|             sizeof(ia_selection_candidate_info_struct));
 1153|    570|      k++;
 1154|    570|    }
 1155|    788|  }
 1156|    307|  selection_candidate_step_2_count = k;
 1157|       |
 1158|    307|  if (output_level_min <= 0.0f) {
  ------------------
  |  Branch (1158:7): [True: 300, False: 7]
  ------------------
 1159|    300|    selection_candidate_step_2_count = *selection_candidate_count;
 1160|    300|    k = 0;
 1161|  1.07k|    for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1161:17): [True: 770, False: 300]
  ------------------
 1162|    770|      if (selection_candidate_info[i].output_peak_level <= 0.0f) {
  ------------------
  |  Branch (1162:11): [True: 770, False: 0]
  ------------------
 1163|    770|        memcpy(&selection_candidate_info_step_2[k],
 1164|    770|               &selection_candidate_info[i],
 1165|    770|               sizeof(ia_selection_candidate_info_struct));
 1166|    770|        k++;
 1167|    770|      }
 1168|    770|    }
 1169|    300|    selection_candidate_step_2_count = k;
 1170|       |
 1171|    300|    k = 0;
 1172|  1.07k|    for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1172:17): [True: 770, False: 300]
  ------------------
 1173|    770|      str_drc_instruction_str =
 1174|    770|          &(pstr_drc_config->str_drc_instruction_str
 1175|    770|                [selection_candidate_info_step_2[i].drc_instructions_index]);
 1176|  1.54k|      for (n = 0; n < str_drc_instruction_str->dwnmix_id_count; n++) {
  ------------------
  |  Branch (1176:19): [True: 770, False: 770]
  ------------------
 1177|    770|        if (pstr_drc_sel_proc_params_struct->requested_dwnmix_id
  ------------------
  |  Branch (1177:13): [True: 770, False: 0]
  ------------------
 1178|    770|                [selection_candidate_info_step_2[i].downmix_id_request_index] ==
 1179|    770|            str_drc_instruction_str->downmix_id[n]) {
 1180|    770|          if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|    770|#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: 770]
  ------------------
 1181|    770|          memcpy(&selection_candidate_info_step_2[k],
 1182|    770|                 &selection_candidate_info_step_2[i],
 1183|    770|                 sizeof(ia_selection_candidate_info_struct));
 1184|    770|          k++;
 1185|    770|        }
 1186|    770|      }
 1187|    770|    }
 1188|    300|    if (k > 0) {
  ------------------
  |  Branch (1188:9): [True: 300, False: 0]
  ------------------
 1189|    300|      selection_candidate_step_2_count = k;
 1190|    300|    }
 1191|       |
 1192|    300|    effect_types_request_table_size =
 1193|    300|        sizeof(effect_types_request_table) / sizeof(WORD32);
 1194|    300|    effect_count_min = 100;
 1195|    300|    k = 0;
 1196|  1.07k|    for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1196:17): [True: 770, False: 300]
  ------------------
 1197|    770|      str_drc_instruction_str =
 1198|    770|          &(pstr_drc_config->str_drc_instruction_str
 1199|    770|                [selection_candidate_info_step_2[i].drc_instructions_index]);
 1200|    770|      effect_count = 0;
 1201|    770|      if (str_drc_instruction_str->depends_on_drc_set_present == 1) {
  ------------------
  |  Branch (1201:11): [True: 0, False: 770]
  ------------------
 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|    770|      } else {
 1218|  6.93k|        for (n = 0; n < effect_types_request_table_size; n++) {
  ------------------
  |  Branch (1218:21): [True: 6.16k, False: 770]
  ------------------
 1219|  6.16k|          if (effect_types_request_table[n] != EFFECT_BIT_GENERAL_COMPR) {
  ------------------
  |  |   67|  6.16k|#define EFFECT_BIT_GENERAL_COMPR 0x0020
  ------------------
  |  Branch (1219:15): [True: 5.39k, False: 770]
  ------------------
 1220|  5.39k|            if ((str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (1220:17): [True: 433, False: 4.95k]
  ------------------
 1221|  5.39k|                 effect_types_request_table[n]) != 0x0) {
 1222|    433|              effect_count++;
 1223|    433|            }
 1224|  5.39k|          }
 1225|  6.16k|        }
 1226|    770|      }
 1227|    770|      if (effect_count_min >= effect_count) {
  ------------------
  |  Branch (1227:11): [True: 770, False: 0]
  ------------------
 1228|    770|        if (effect_count_min > effect_count) {
  ------------------
  |  Branch (1228:13): [True: 349, False: 421]
  ------------------
 1229|    349|          effect_count_min = effect_count;
 1230|    349|          k = 0;
 1231|    349|        }
 1232|    770|        memcpy(&selection_candidate_info_step_2[k],
 1233|    770|               &selection_candidate_info_step_2[i],
 1234|    770|               sizeof(ia_selection_candidate_info_struct));
 1235|    770|        k++;
 1236|    770|      }
 1237|    770|    }
 1238|    300|    selection_candidate_step_2_count = k;
 1239|       |
 1240|    300|    drc_set_target_loudness_val_upper_min = 100;
 1241|    300|    k = 0;
 1242|    818|    for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1242:17): [True: 518, False: 300]
  ------------------
 1243|    518|      if (selection_candidate_info_step_2[i].selection_flags &
  ------------------
  |  Branch (1243:11): [True: 0, False: 518]
  ------------------
 1244|    518|          SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH) {
  ------------------
  |  |   27|    518|#define SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH (1 << 0)
  ------------------
 1245|      0|        k++;
 1246|      0|      }
 1247|    518|    }
 1248|    300|    if (k != 0 && k != selection_candidate_step_2_count) {
  ------------------
  |  Branch (1248:9): [True: 0, False: 300]
  |  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|    300|    } else if (k == selection_candidate_step_2_count) {
  ------------------
  |  Branch (1260:16): [True: 0, False: 300]
  ------------------
 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|    300|    k = 0;
 1287|    818|    for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1287:17): [True: 518, False: 300]
  ------------------
 1288|    518|      str_drc_instruction_str =
 1289|    518|          &(pstr_drc_config->str_drc_instruction_str
 1290|    518|                [selection_candidate_info_step_2[i].drc_instructions_index]);
 1291|    518|      if (str_drc_instruction_str->drc_set_target_loudness_present &&
  ------------------
  |  Branch (1291:11): [True: 0, False: 518]
  ------------------
 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|    518|    }
 1300|    300|    if (k != 0 && k != selection_candidate_step_2_count) {
  ------------------
  |  Branch (1300:9): [True: 0, False: 300]
  |  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|    300|    } else if (k == selection_candidate_step_2_count) {
  ------------------
  |  Branch (1343:16): [True: 0, False: 300]
  ------------------
 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|    300|    k = 0;
 1370|    300|    output_level_max = -1000.0f;
 1371|    818|    for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1371:17): [True: 518, False: 300]
  ------------------
 1372|    518|      if ((selection_candidate_info_step_2[i].output_peak_level <= 0.0f) &&
  ------------------
  |  Branch (1372:11): [True: 518, False: 0]
  ------------------
 1373|    518|          (output_level_max <=
  ------------------
  |  Branch (1373:11): [True: 399, False: 119]
  ------------------
 1374|    518|           selection_candidate_info_step_2[i].output_peak_level)) {
 1375|    399|        if (output_level_max <
  ------------------
  |  Branch (1375:13): [True: 324, False: 75]
  ------------------
 1376|    399|            selection_candidate_info_step_2[i].output_peak_level) {
 1377|    324|          output_level_max =
 1378|    324|              selection_candidate_info_step_2[i].output_peak_level;
 1379|    324|          k = 0;
 1380|    324|        }
 1381|    399|        memcpy(&selection_candidate_info_step_2[k],
 1382|    399|               &selection_candidate_info_step_2[i],
 1383|    399|               sizeof(ia_selection_candidate_info_struct));
 1384|    399|        k++;
 1385|    399|        output_level_max = selection_candidate_info_step_2[i].output_peak_level;
 1386|    399|      }
 1387|    518|    }
 1388|    300|    selection_candidate_step_2_count = k;
 1389|    300|  }
 1390|       |
 1391|    307|  drc_set_id_max = -1000;
 1392|    698|  for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1392:15): [True: 391, False: 307]
  ------------------
 1393|    391|    str_drc_instruction_str =
 1394|    391|        &(pstr_drc_config->str_drc_instruction_str
 1395|    391|              [selection_candidate_info_step_2[i].drc_instructions_index]);
 1396|    391|    if (drc_set_id_max < str_drc_instruction_str->drc_set_id) {
  ------------------
  |  Branch (1396:9): [True: 310, False: 81]
  ------------------
 1397|    310|      drc_set_id_max = str_drc_instruction_str->drc_set_id;
 1398|    310|      memcpy(&selection_candidate_info_step_2[0],
 1399|    310|             &selection_candidate_info_step_2[i],
 1400|    310|             sizeof(ia_selection_candidate_info_struct));
 1401|    310|    }
 1402|    391|  }
 1403|    307|  memcpy(&selection_candidate_info[0], &selection_candidate_info_step_2[0],
 1404|    307|         sizeof(ia_selection_candidate_info_struct));
 1405|    307|  *selection_candidate_count = 1;
 1406|       |
 1407|    307|  return 0;
 1408|    307|}
impd_select_drc_set:
 1412|    596|                           WORD32* eq_set_id_selected, WORD32* loud_eq_id_sel) {
 1413|    596|  WORD32 i, err;
 1414|       |
 1415|    596|  ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct =
 1416|    596|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_params;
 1417|    596|  ia_drc_config* pstr_drc_config = &pstr_drc_uni_sel_proc->drc_config;
 1418|    596|  ia_drc_loudness_info_set_struct* pstr_loudness_info =
 1419|    596|      &pstr_drc_uni_sel_proc->loudness_info_set;
 1420|       |
 1421|    596|  WORD32 selection_candidate_count = 0;
 1422|    596|  WORD32 restrict_to_drc_with_album_loudness = 0;
 1423|    596|  ia_selection_candidate_info_struct
 1424|    596|      selection_candidate_info[SELECTION_CANDIDATE_COUNT_MAX];
 1425|       |
 1426|       |  //    WORD32 selected_eq_set_count = 0;
 1427|       |
 1428|    596|  if (pstr_drc_sel_proc_params_struct->album_mode == 1) {
  ------------------
  |  Branch (1428:7): [True: 0, False: 596]
  ------------------
 1429|      0|    restrict_to_drc_with_album_loudness = 1;
 1430|      0|  }
 1431|       |
 1432|  1.18k|  while (!selection_candidate_count) {
  ------------------
  |  Branch (1432:10): [True: 596, False: 588]
  ------------------
 1433|    596|    err = impd_drc_set_preselection(
 1434|    596|        pstr_drc_sel_proc_params_struct, pstr_drc_config, pstr_loudness_info,
 1435|    596|        restrict_to_drc_with_album_loudness, pstr_drc_uni_sel_proc,
 1436|    596|        &selection_candidate_count, selection_candidate_info);
 1437|    596|    if (err) return err;
  ------------------
  |  Branch (1437:9): [True: 3, False: 593]
  ------------------
 1438|       |
 1439|    593|    if (selection_candidate_count == 0) {
  ------------------
  |  Branch (1439:9): [True: 5, False: 588]
  ------------------
 1440|      5|      if (restrict_to_drc_with_album_loudness == 1) {
  ------------------
  |  Branch (1440:11): [True: 0, False: 5]
  ------------------
 1441|      0|        restrict_to_drc_with_album_loudness = 0;
 1442|      0|        continue;
 1443|      5|      } else {
 1444|      5|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      5|#define UNEXPECTED_ERROR 2
  ------------------
 1445|      5|      }
 1446|      5|    }
 1447|       |
 1448|    588|    err = impd_validate_requested_drc_feature(pstr_drc_sel_proc_params_struct);
 1449|    588|    if (err) return (err);
  ------------------
  |  Branch (1449:9): [True: 0, False: 588]
  ------------------
 1450|       |
 1451|    588|    if (pstr_drc_sel_proc_params_struct->dynamic_range_control_on == 1) {
  ------------------
  |  Branch (1451:9): [True: 307, False: 281]
  ------------------
 1452|    307|      if (pstr_drc_sel_proc_params_struct->num_drc_feature_requests > 0) {
  ------------------
  |  Branch (1452:11): [True: 216, False: 91]
  ------------------
 1453|    216|        for (i = 0;
 1454|    864|             i < pstr_drc_sel_proc_params_struct->num_drc_feature_requests;
  ------------------
  |  Branch (1454:14): [True: 648, False: 216]
  ------------------
 1455|    648|             i++) {
 1456|    648|          switch (pstr_drc_sel_proc_params_struct->drc_feature_req_type[i]) {
 1457|    216|            case MATCH_EFFECT_TYPE:
  ------------------
  |  |   38|    216|#define MATCH_EFFECT_TYPE 0
  ------------------
  |  Branch (1457:13): [True: 216, False: 432]
  ------------------
 1458|    216|              err = impd_match_effect_types(
 1459|    216|                  pstr_drc_config,
 1460|    216|                  pstr_drc_sel_proc_params_struct->requested_num_drc_effects[i],
 1461|    216|                  pstr_drc_sel_proc_params_struct
 1462|    216|                      ->desired_num_drc_effects_of_requested[i],
 1463|    216|                  pstr_drc_sel_proc_params_struct->requested_drc_effect_type[i],
 1464|    216|                  &selection_candidate_count, selection_candidate_info);
 1465|    216|              if (err) return (err);
  ------------------
  |  Branch (1465:19): [True: 0, False: 216]
  ------------------
 1466|    216|              break;
 1467|    216|            case MATCH_DYNAMIC_RANGE:
  ------------------
  |  |   39|    216|#define MATCH_DYNAMIC_RANGE 1
  ------------------
  |  Branch (1467:13): [True: 216, False: 432]
  ------------------
 1468|    216|              err = impd_match_dynamic_range(
 1469|    216|                  pstr_drc_config, pstr_loudness_info,
 1470|    216|                  pstr_drc_sel_proc_params_struct, i,
 1471|    216|                  &selection_candidate_count, selection_candidate_info);
 1472|    216|              if (err) return (err);
  ------------------
  |  Branch (1472:19): [True: 0, False: 216]
  ------------------
 1473|    216|              break;
 1474|    216|            case MATCH_DRC_CHARACTERISTIC:
  ------------------
  |  |   40|    216|#define MATCH_DRC_CHARACTERISTIC 2
  ------------------
  |  Branch (1474:13): [True: 216, False: 432]
  ------------------
 1475|    216|              err = impd_match_drc_characteristic(
 1476|    216|                  pstr_drc_config, pstr_drc_sel_proc_params_struct
 1477|    216|                                       ->requested_drc_characteristic[i],
 1478|    216|                  &selection_candidate_count, selection_candidate_info);
 1479|    216|              if (err) return (err);
  ------------------
  |  Branch (1479:19): [True: 0, False: 216]
  ------------------
 1480|    216|              break;
 1481|       |
 1482|    216|            default:
  ------------------
  |  Branch (1482:13): [True: 0, False: 648]
  ------------------
 1483|      0|              return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1484|      0|              break;
 1485|    648|          }
 1486|    648|        }
 1487|    216|      } else {
 1488|     91|        WORD32 match_found_flag = 0;
 1489|       |
 1490|     91|        err = impd_select_drcs_without_compr_effects(
 1491|     91|            pstr_drc_config, &match_found_flag, &selection_candidate_count,
 1492|     91|            selection_candidate_info);
 1493|     91|        if (err) return (err);
  ------------------
  |  Branch (1493:13): [True: 0, False: 91]
  ------------------
 1494|       |
 1495|     91|        if (match_found_flag == 0) {
  ------------------
  |  Branch (1495:13): [True: 18, False: 73]
  ------------------
 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|     91|      }
 1510|       |
 1511|    307|      if (selection_candidate_count > 0) {
  ------------------
  |  Branch (1511:11): [True: 307, False: 0]
  ------------------
 1512|    307|        err = impd_drc_set_final_selection(
 1513|    307|            pstr_drc_config, pstr_drc_sel_proc_params_struct,
 1514|    307|            &selection_candidate_count, selection_candidate_info,
 1515|    307|            pstr_drc_uni_sel_proc->eq_set_id_valid_flag);
 1516|    307|        if (err) return (err);
  ------------------
  |  Branch (1516:13): [True: 0, False: 307]
  ------------------
 1517|    307|      } else {
 1518|      0|        selection_candidate_count = 0;
 1519|      0|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1520|      0|      }
 1521|    307|    }
 1522|       |
 1523|    588|    if (selection_candidate_count == 0) {
  ------------------
  |  Branch (1523:9): [True: 0, False: 588]
  ------------------
 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|    588|  }
 1531|    588|  *drc_set_id_selected =
 1532|    588|      pstr_drc_config
 1533|    588|          ->str_drc_instruction_str[selection_candidate_info[0]
 1534|    588|                                        .drc_instructions_index]
 1535|    588|          .drc_set_id;
 1536|    588|  *eq_set_id_selected = selection_candidate_info[0].eq_set_id;
 1537|       |
 1538|    588|  err = impd_select_loud_eq(
 1539|    588|      pstr_drc_config,
 1540|    588|      pstr_drc_sel_proc_params_struct->requested_dwnmix_id
 1541|    588|          [selection_candidate_info[0].downmix_id_request_index],
 1542|    588|      *drc_set_id_selected, *eq_set_id_selected, loud_eq_id_sel);
 1543|    588|  if (err) return (err);
  ------------------
  |  Branch (1543:7): [True: 0, False: 588]
  ------------------
 1544|    588|  if (selection_candidate_count > 0) {
  ------------------
  |  Branch (1544:7): [True: 588, False: 0]
  ------------------
 1545|    588|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
 1546|    588|        .loudness_normalization_gain_db =
 1547|    588|        selection_candidate_info[0].loudness_norm_db_gain_adjusted;
 1548|    588|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.output_peak_level_db =
 1549|    588|        selection_candidate_info[0].output_peak_level;
 1550|    588|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.output_loudness =
 1551|    588|        selection_candidate_info[0].output_loudness;
 1552|    588|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.active_downmix_id =
 1553|    588|        pstr_drc_sel_proc_params_struct->requested_dwnmix_id
 1554|    588|            [selection_candidate_info[0].downmix_id_request_index];
 1555|    588|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.mixing_level =
 1556|    588|        selection_candidate_info[0].mixing_level;
 1557|    588|  }
 1558|    588|  return (0);
 1559|    588|}

impd_drc_sel_proc_init_dflt:
   31|  1.56k|    ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc) {
   32|  1.56k|  if (pstr_drc_uni_sel_proc != NULL) {
  ------------------
  |  Branch (32:7): [True: 1.56k, False: 0]
  ------------------
   33|  1.56k|    pstr_drc_uni_sel_proc->first_frame = 0;
   34|       |
   35|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_channel_count = -1;
   36|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_layout = -1;
   37|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.target_config_request_type =
   38|  1.56k|        0;
   39|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_downmix_id_requests = 0;
   40|       |
   41|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.album_mode = 0;
   42|       |
   43|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.peak_limiter = 0;
   44|       |
   45|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_normalization_on =
   46|  1.56k|        0;
   47|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.target_loudness = -24.0f;
   48|       |
   49|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_deviation_max =
   50|  1.56k|        LOUDNESS_DEVIATION_MAX_DEFAULT;
  ------------------
  |  |  103|  1.56k|#define LOUDNESS_DEVIATION_MAX_DEFAULT 63
  ------------------
   51|       |
   52|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_measurement_method =
   53|  1.56k|        USER_METHOD_DEFINITION_DEFAULT;
  ------------------
  |  |   84|  1.56k|#define USER_METHOD_DEFINITION_DEFAULT 0
  ------------------
   54|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_measurement_system =
   55|  1.56k|        USER_MEASUREMENT_SYSTEM_DEFAULT;
  ------------------
  |  |   88|  1.56k|#define USER_MEASUREMENT_SYSTEM_DEFAULT 0
  ------------------
   56|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
   57|  1.56k|        .loudness_measurement_pre_proc = USER_LOUDNESS_PREPROCESSING_DEFAULT;
  ------------------
  |  |   99|  1.56k|#define USER_LOUDNESS_PREPROCESSING_DEFAULT 0
  ------------------
   58|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.device_cut_off_frequency =
   59|  1.56k|        500;
   60|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_norm_gain_db_max =
   61|  1.56k|        LOUDNESS_NORMALIZATION_GAIN_MAX_DEFAULT;
  ------------------
  |  |  104|  1.56k|#define LOUDNESS_NORMALIZATION_GAIN_MAX_DEFAULT 1000
  ------------------
   62|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
   63|  1.56k|        .loudness_norm_gain_modification_db = 0.0f;
   64|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.output_peak_level_max = 0.0f;
   65|  1.56k|    if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.peak_limiter == 1) {
  ------------------
  |  Branch (65:9): [True: 0, False: 1.56k]
  ------------------
   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.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.dynamic_range_control_on = 1;
   71|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_bands_supported = 4;
   72|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_drc_feature_requests = 0;
   73|       |
   74|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.boost = 1.f;
   75|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.compress = 1.f;
   76|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.drc_characteristic_target =
   77|  1.56k|        0;
   78|       |
   79|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_eq_request =
   80|  1.56k|        LOUD_EQ_REQUEST_OFF;
  ------------------
  |  |  200|  1.56k|#define LOUD_EQ_REQUEST_OFF 0x0
  ------------------
   81|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.eq_set_purpose_request =
   82|  1.56k|        EQ_PURPOSE_EQ_OFF;
  ------------------
  |  |  205|  1.56k|#define EQ_PURPOSE_EQ_OFF 0
  ------------------
   83|  1.56k|    pstr_drc_uni_sel_proc->compl_level_supported_total =
   84|  1.56k|        COMPLEXITY_LEVEL_SUPPORTED_TOTAL;
  ------------------
  |  |  112|  1.56k|#define COMPLEXITY_LEVEL_SUPPORTED_TOTAL 20.0f
  ------------------
   85|       |
   86|  1.56k|    pstr_drc_uni_sel_proc->drc_inst_index_sel = -1;
   87|  1.56k|    pstr_drc_uni_sel_proc->drc_coef_index_sel = -1;
   88|  1.56k|    pstr_drc_uni_sel_proc->downmix_inst_index_sel = -1;
   89|  1.56k|    pstr_drc_uni_sel_proc->drc_instructions_index[0] = -1;
   90|  1.56k|    pstr_drc_uni_sel_proc->drc_instructions_index[1] = -1;
   91|  1.56k|    pstr_drc_uni_sel_proc->drc_instructions_index[2] = -1;
   92|  1.56k|    pstr_drc_uni_sel_proc->drc_instructions_index[3] = -1;
   93|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.output_peak_level_db = 0;
   94|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
   95|  1.56k|        .loudness_normalization_gain_db = 0;
   96|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.output_loudness =
   97|  1.56k|        UNDEFINED_LOUDNESS_VALUE;
  ------------------
  |  |  134|  1.56k|#define UNDEFINED_LOUDNESS_VALUE 1000.0f
  ------------------
   98|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.num_sel_drc_sets = 0;
   99|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.active_downmix_id = 0;
  100|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.base_channel_count = 0;
  101|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.target_channel_count = 0;
  102|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.downmix_matrix_present = 0;
  103|       |
  104|  1.56k|    pstr_drc_uni_sel_proc->eq_inst_index[0] = -1;
  105|  1.56k|    pstr_drc_uni_sel_proc->eq_inst_index[1] = -1;
  106|  1.56k|    pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  107|       |
  108|  1.56k|#ifdef LOUDNESS_LEVELING_SUPPORT
  109|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_leveling_on = 1;
  110|  1.56k|#endif
  111|  1.56k|  } else {
  112|      0|    return 1;
  113|      0|  }
  114|       |
  115|  1.56k|  return 0;
  116|  1.56k|}
impd_drc_sel_proc_init_sel_proc_params:
  120|  1.56k|    ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct) {
  121|  1.56k|  if (pstr_drc_uni_sel_proc != NULL &&
  ------------------
  |  Branch (121:7): [True: 1.56k, False: 0]
  ------------------
  122|  1.56k|      pstr_drc_sel_proc_params_struct != NULL) {
  ------------------
  |  Branch (122:7): [True: 0, False: 1.56k]
  ------------------
  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.56k|  return 0;
  133|  1.56k|}
impd_drc_sel_proc_init_interface_params:
  136|  1.56k|    ia_drc_interface_struct* pstr_drc_interface) {
  137|  1.56k|  WORD32 i, j;
  138|       |
  139|  1.56k|  if (pstr_drc_uni_sel_proc != NULL && pstr_drc_interface != NULL) {
  ------------------
  |  Branch (139:7): [True: 1.56k, False: 0]
  |  Branch (139:40): [True: 1.56k, False: 0]
  ------------------
  140|  1.56k|#ifdef LOUDNESS_LEVELING_SUPPORT
  141|  1.56k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_leveling_on =
  142|  1.56k|        pstr_drc_interface->drc_uni_interface_ext.loudness_leveling_on;
  143|  1.56k|#endif
  144|  1.56k|    if (pstr_drc_interface->system_interface_flag) {
  ------------------
  |  Branch (144:9): [True: 1.56k, False: 0]
  ------------------
  145|  1.56k|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (145:11): [True: 0, False: 1.56k]
  ------------------
  146|  1.56k|              .target_config_request_type !=
  147|  1.56k|          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.56k|      switch (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (153:15): [True: 1.56k, False: 0]
  ------------------
  154|  1.56k|                  .target_config_request_type) {
  155|  1.56k|        case 0:
  ------------------
  |  Branch (155:9): [True: 1.56k, False: 0]
  ------------------
  156|  1.56k|          if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (156:15): [True: 0, False: 1.56k]
  ------------------
  157|  1.56k|                  .num_downmix_id_requests !=
  158|  1.56k|              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.56k|          for (i = 0; i < pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (164:23): [True: 0, False: 1.56k]
  ------------------
  165|  1.56k|                              .num_downmix_id_requests;
  166|  1.56k|               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.56k|          break;
  177|      0|        case 1:
  ------------------
  |  Branch (177:9): [True: 0, False: 1.56k]
  ------------------
  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.56k]
  ------------------
  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.56k|      }
  198|  1.56k|    }
  199|  1.56k|    if (pstr_drc_interface->loudness_norm_ctrl_interface_flag) {
  ------------------
  |  Branch (199:9): [True: 1.56k, False: 0]
  ------------------
  200|  1.56k|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (200:11): [True: 1.56k, False: 0]
  ------------------
  201|  1.56k|              .loudness_normalization_on !=
  202|  1.56k|          pstr_drc_interface->loudness_norm_ctrl_interface
  203|  1.56k|              .loudness_normalization_on) {
  204|  1.56k|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  205|  1.56k|            .loudness_normalization_on =
  206|  1.56k|            pstr_drc_interface->loudness_norm_ctrl_interface
  207|  1.56k|                .loudness_normalization_on;
  208|  1.56k|        pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  209|  1.56k|      }
  210|  1.56k|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (210:11): [True: 1.56k, False: 0]
  ------------------
  211|  1.56k|              .loudness_normalization_on) {
  212|  1.56k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.target_loudness !=
  ------------------
  |  Branch (212:13): [True: 1.55k, False: 11]
  ------------------
  213|  1.56k|            pstr_drc_interface->loudness_norm_ctrl_interface.target_loudness) {
  214|  1.55k|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.target_loudness =
  215|  1.55k|              pstr_drc_interface->loudness_norm_ctrl_interface.target_loudness;
  216|  1.55k|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  217|  1.55k|        }
  218|  1.56k|      }
  219|  1.56k|    }
  220|  1.56k|    if (pstr_drc_interface->loudness_norm_parameter_interface_flag) {
  ------------------
  |  Branch (220:9): [True: 1.56k, False: 0]
  ------------------
  221|  1.56k|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.album_mode !=
  ------------------
  |  Branch (221:11): [True: 0, False: 1.56k]
  ------------------
  222|  1.56k|          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.56k|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.peak_limiter !=
  ------------------
  |  Branch (227:11): [True: 0, False: 1.56k]
  ------------------
  228|  1.56k|          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.56k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (233:11): [True: 1.56k, False: 0]
  ------------------
  234|  1.56k|              .change_loudness_deviation_max) {
  235|  1.56k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (235:13): [True: 0, False: 1.56k]
  ------------------
  236|  1.56k|                .loudness_deviation_max !=
  237|  1.56k|            pstr_drc_interface->loudness_norm_param_interface
  238|  1.56k|                .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.56k|      }
  246|  1.56k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (246:11): [True: 1.56k, False: 0]
  ------------------
  247|  1.56k|              .change_loudness_measur_method) {
  248|  1.56k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (248:13): [True: 1.56k, False: 0]
  ------------------
  249|  1.56k|                .loudness_measurement_method !=
  250|  1.56k|            pstr_drc_interface->loudness_norm_param_interface
  251|  1.56k|                .loudness_measurement_method) {
  252|  1.56k|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  253|  1.56k|              .loudness_measurement_method =
  254|  1.56k|              pstr_drc_interface->loudness_norm_param_interface
  255|  1.56k|                  .loudness_measurement_method;
  256|  1.56k|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  257|  1.56k|        }
  258|  1.56k|      }
  259|  1.56k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (259:11): [True: 0, False: 1.56k]
  ------------------
  260|  1.56k|              .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.56k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (272:11): [True: 1.56k, False: 0]
  ------------------
  273|  1.56k|              .change_loudness_measur_system) {
  274|  1.56k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (274:13): [True: 1.56k, False: 0]
  ------------------
  275|  1.56k|                .loudness_measurement_system !=
  276|  1.56k|            pstr_drc_interface->loudness_norm_param_interface
  277|  1.56k|                .loudness_measurement_system) {
  278|  1.56k|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  279|  1.56k|              .loudness_measurement_system =
  280|  1.56k|              pstr_drc_interface->loudness_norm_param_interface
  281|  1.56k|                  .loudness_measurement_system;
  282|  1.56k|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  283|  1.56k|        }
  284|  1.56k|      }
  285|  1.56k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (285:11): [True: 1.56k, False: 0]
  ------------------
  286|  1.56k|              .change_device_cut_off_freq) {
  287|  1.56k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (287:13): [True: 1.56k, False: 0]
  ------------------
  288|  1.56k|                .device_cut_off_frequency !=
  289|  1.56k|            pstr_drc_interface->loudness_norm_param_interface
  290|  1.56k|                .device_cut_off_frequency) {
  291|  1.56k|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  292|  1.56k|              .device_cut_off_frequency =
  293|  1.56k|              pstr_drc_interface->loudness_norm_param_interface
  294|  1.56k|                  .device_cut_off_frequency;
  295|  1.56k|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  296|  1.56k|        }
  297|  1.56k|      }
  298|  1.56k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (298:11): [True: 1.56k, False: 0]
  ------------------
  299|  1.56k|              .change_loudness_norm_gain_db_max) {
  300|  1.56k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (300:13): [True: 0, False: 1.56k]
  ------------------
  301|  1.56k|                .loudness_norm_gain_db_max !=
  302|  1.56k|            pstr_drc_interface->loudness_norm_param_interface
  303|  1.56k|                .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.56k|      }
  311|  1.56k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (311:11): [True: 1.56k, False: 0]
  ------------------
  312|  1.56k|              .change_loudness_norm_gain_modification_db) {
  313|  1.56k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (313:13): [True: 0, False: 1.56k]
  ------------------
  314|  1.56k|                .loudness_norm_gain_modification_db !=
  315|  1.56k|            pstr_drc_interface->loudness_norm_param_interface
  316|  1.56k|                .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.56k|      }
  324|  1.56k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (324:11): [True: 1.56k, False: 0]
  ------------------
  325|  1.56k|              .change_output_peak_level_max) {
  326|  1.56k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (326:13): [True: 0, False: 1.56k]
  ------------------
  327|  1.56k|                .output_peak_level_max !=
  328|  1.56k|            pstr_drc_interface->loudness_norm_param_interface
  329|  1.56k|                .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.56k|      }
  336|  1.56k|    }
  337|  1.56k|    if (pstr_drc_interface->drc_interface_flag) {
  ------------------
  |  Branch (337:9): [True: 1.56k, False: 0]
  ------------------
  338|  1.56k|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (338:11): [True: 1.08k, False: 479]
  ------------------
  339|  1.56k|              .dynamic_range_control_on !=
  340|  1.56k|          pstr_drc_interface->drc_ctrl_interface.dynamic_range_control_on) {
  341|  1.08k|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  342|  1.08k|            .dynamic_range_control_on =
  343|  1.08k|            pstr_drc_interface->drc_ctrl_interface.dynamic_range_control_on;
  344|  1.08k|        pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  345|  1.08k|        if (!pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (345:13): [True: 1.08k, False: 0]
  ------------------
  346|  1.08k|                 .dynamic_range_control_on) {
  347|  1.08k|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  348|  1.08k|              .num_drc_feature_requests = 0;
  349|  1.08k|        }
  350|  1.08k|      }
  351|  1.56k|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (351:11): [True: 479, False: 1.08k]
  ------------------
  352|  1.56k|              .dynamic_range_control_on) {
  353|    479|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (353:13): [True: 302, False: 177]
  ------------------
  354|    479|                .num_drc_feature_requests !=
  355|    479|            pstr_drc_interface->drc_ctrl_interface.num_drc_feature_requests) {
  356|    302|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  357|    302|              .num_drc_feature_requests =
  358|    302|              pstr_drc_interface->drc_ctrl_interface.num_drc_feature_requests;
  359|    302|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  360|    302|        }
  361|  1.38k|        for (i = 0; i < pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (361:21): [True: 906, False: 479]
  ------------------
  362|  1.38k|                            .num_drc_feature_requests;
  363|    906|             i++) {
  364|    906|          if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (364:15): [True: 604, False: 302]
  ------------------
  365|    906|                  .drc_feature_req_type[i] !=
  366|    906|              pstr_drc_interface->drc_ctrl_interface.drc_feature_req_type[i]) {
  367|    604|            pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  368|    604|                .drc_feature_req_type[i] =
  369|    604|                pstr_drc_interface->drc_ctrl_interface.drc_feature_req_type[i];
  370|    604|            pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  371|    604|          }
  372|    906|          switch (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (372:19): [True: 906, False: 0]
  ------------------
  373|    906|                      .drc_feature_req_type[i]) {
  374|    302|            case 0:
  ------------------
  |  Branch (374:13): [True: 302, False: 604]
  ------------------
  375|    302|              if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (375:19): [True: 302, False: 0]
  ------------------
  376|    302|                      .requested_num_drc_effects[i] !=
  377|    302|                  pstr_drc_interface->drc_ctrl_interface
  378|    302|                      .requested_num_drc_effects[i]) {
  379|    302|                pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  380|    302|                    .requested_num_drc_effects[i] =
  381|    302|                    pstr_drc_interface->drc_ctrl_interface
  382|    302|                        .requested_num_drc_effects[i];
  383|    302|                pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  384|    302|              }
  385|    302|              if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (385:19): [True: 302, False: 0]
  ------------------
  386|    302|                      .desired_num_drc_effects_of_requested[i] !=
  387|    302|                  pstr_drc_interface->drc_ctrl_interface
  388|    302|                      .desired_num_drc_effects_of_requested[i]) {
  389|    302|                pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  390|    302|                    .desired_num_drc_effects_of_requested[i] =
  391|    302|                    pstr_drc_interface->drc_ctrl_interface
  392|    302|                        .desired_num_drc_effects_of_requested[i];
  393|    302|                pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  394|    302|              }
  395|    604|              for (j = 0; j < pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (395:27): [True: 302, False: 302]
  ------------------
  396|    604|                                  .requested_num_drc_effects[i];
  397|    302|                   j++) {
  398|    302|                if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (398:21): [True: 302, False: 0]
  ------------------
  399|    302|                        .requested_drc_effect_type[i][j] !=
  400|    302|                    pstr_drc_interface->drc_ctrl_interface
  401|    302|                        .requested_drc_effect_type[i][j]) {
  402|    302|                  pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  403|    302|                      .requested_drc_effect_type[i][j] =
  404|    302|                      pstr_drc_interface->drc_ctrl_interface
  405|    302|                          .requested_drc_effect_type[i][j];
  406|    302|                  pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  407|    302|                }
  408|    302|              }
  409|    302|              break;
  410|    302|            case 1:
  ------------------
  |  Branch (410:13): [True: 302, False: 604]
  ------------------
  411|    302|              if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (411:19): [True: 0, False: 302]
  ------------------
  412|    302|                      .requested_dyn_range_measur_type[i] !=
  413|    302|                  pstr_drc_interface->drc_ctrl_interface
  414|    302|                      .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|    302|              if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (421:19): [True: 0, False: 302]
  ------------------
  422|    302|                      .requested_dyn_range_range_flag[i] !=
  423|    302|                  pstr_drc_interface->drc_ctrl_interface
  424|    302|                      .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|    302|              if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (431:19): [True: 302, False: 0]
  ------------------
  432|    302|                      .requested_dyn_range_range_flag[i] == 0) {
  433|    302|                if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (433:21): [True: 0, False: 302]
  ------------------
  434|    302|                        .requested_dyn_range_value[i] !=
  435|    302|                    pstr_drc_interface->drc_ctrl_interface
  436|    302|                        .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|    302|              } 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|    302|              break;
  466|    302|            case 2:
  ------------------
  |  Branch (466:13): [True: 302, False: 604]
  ------------------
  467|    302|              if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (467:19): [True: 302, False: 0]
  ------------------
  468|    302|                      .requested_drc_characteristic[i] !=
  469|    302|                  pstr_drc_interface->drc_ctrl_interface
  470|    302|                      .requested_drc_characteristic[i]) {
  471|    302|                pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  472|    302|                    .requested_drc_characteristic[i] =
  473|    302|                    pstr_drc_interface->drc_ctrl_interface
  474|    302|                        .requested_drc_characteristic[i];
  475|    302|                pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  476|    302|              }
  477|    302|              break;
  478|    906|          }
  479|    906|        }
  480|    479|      }
  481|  1.56k|    }
  482|  1.56k|    if (pstr_drc_interface->drc_parameter_interface_flag) {
  ------------------
  |  Branch (482:9): [True: 1.56k, False: 0]
  ------------------
  483|  1.56k|      if (pstr_drc_interface->drc_parameter_interface.change_compress) {
  ------------------
  |  Branch (483:11): [True: 1.56k, False: 0]
  ------------------
  484|  1.56k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.compress !=
  ------------------
  |  Branch (484:13): [True: 0, False: 1.56k]
  ------------------
  485|  1.56k|            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.56k|      }
  491|  1.56k|      if (pstr_drc_interface->drc_parameter_interface.change_boost) {
  ------------------
  |  Branch (491:11): [True: 1.56k, False: 0]
  ------------------
  492|  1.56k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.boost !=
  ------------------
  |  Branch (492:13): [True: 0, False: 1.56k]
  ------------------
  493|  1.56k|            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.56k|      }
  499|  1.56k|      if (pstr_drc_interface->drc_parameter_interface
  ------------------
  |  Branch (499:11): [True: 1.56k, False: 0]
  ------------------
  500|  1.56k|              .change_drc_characteristic_target) {
  501|  1.56k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (501:13): [True: 0, False: 1.56k]
  ------------------
  502|  1.56k|                .drc_characteristic_target !=
  503|  1.56k|            pstr_drc_interface->drc_parameter_interface
  504|  1.56k|                .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.56k|      }
  512|  1.56k|    }
  513|  1.56k|    if (pstr_drc_interface->drc_uni_interface_ext_flag) {
  ------------------
  |  Branch (513:9): [True: 0, False: 1.56k]
  ------------------
  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.56k|  }
  535|       |
  536|  1.56k|  return;
  537|  1.56k|}

impd_shape_filt_block_time_process:
  244|  7.01k|                                        WORD32 end) {
  245|  7.01k|  WORD32 i, j;
  246|  7.01k|  FLOAT32 audio_out;
  247|       |
  248|  7.01k|  if (shape_filter_block->shape_flter_block_flag) {
  ------------------
  |  Branch (248:7): [True: 0, False: 7.01k]
  ------------------
  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|  7.01k|  } else {
  302|  16.2M|    for (i = start; i < end; i++) {
  ------------------
  |  Branch (302:21): [True: 16.2M, False: 7.01k]
  ------------------
  303|  16.2M|      audio_in[i] = audio_in[i] * drc_gain[i];
  304|  16.2M|    }
  305|  7.01k|  }
  306|       |
  307|  7.01k|  return;
  308|  7.01k|}

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

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

ixheaacd_calc_window:
   29|   351k|WORD32 ixheaacd_calc_window(WORD32 **win, WORD32 win_sz, WORD32 win_sel, WORD32 ec_flag) {
   30|   351k|  switch (win_sel) {
   31|   251k|    case WIN_SEL_0:
  ------------------
  |  |   91|   251k|#define WIN_SEL_0 0
  ------------------
  |  Branch (31:5): [True: 251k, False: 99.3k]
  ------------------
   32|   251k|      switch (win_sz) {
   33|   145k|        case WIN_LEN_128:
  ------------------
  |  |   77|   145k|#define WIN_LEN_128 128
  ------------------
  |  Branch (33:9): [True: 145k, False: 106k]
  ------------------
   34|   145k|          *win = (WORD32 *)ixheaacd_sine_win_128;
   35|   145k|          break;
   36|  78.7k|        case WIN_LEN_1024:
  ------------------
  |  |   73|  78.7k|#define WIN_LEN_1024 1024
  ------------------
  |  Branch (36:9): [True: 78.7k, False: 173k]
  ------------------
   37|  78.7k|          *win = (WORD32 *)ixheaacd_sine_win_1024;
   38|  78.7k|          break;
   39|      0|        case WIN_LEN_64:
  ------------------
  |  |   83|      0|#define WIN_LEN_64 64
  ------------------
  |  Branch (39:9): [True: 0, False: 251k]
  ------------------
   40|      0|          *win = (WORD32 *)ixheaacd_sine_win_64;
   41|      0|          break;
   42|  12.1k|        case WIN_LEN_768:
  ------------------
  |  |   74|  12.1k|#define WIN_LEN_768 768
  ------------------
  |  Branch (42:9): [True: 12.1k, False: 239k]
  ------------------
   43|  12.1k|          *win = (WORD32 *)ixheaacd_sine_win_768;
   44|  12.1k|          break;
   45|  1.44k|        case WIN_LEN_192:
  ------------------
  |  |   76|  1.44k|#define WIN_LEN_192 192
  ------------------
  |  Branch (45:9): [True: 1.44k, False: 250k]
  ------------------
   46|  1.44k|          *win = (WORD32 *)ixheaacd_sine_win_192;
   47|  1.44k|          break;
   48|  7.11k|        case WIN_LEN_96:
  ------------------
  |  |   82|  7.11k|#define WIN_LEN_96 96
  ------------------
  |  Branch (48:9): [True: 7.11k, False: 244k]
  ------------------
   49|  7.11k|          *win = (WORD32 *)ixheaacd_sine_win_96;
   50|  7.11k|          break;
   51|  7.29k|        case WIN_LEN_256:
  ------------------
  |  |   80|  7.29k|#define WIN_LEN_256 256
  ------------------
  |  Branch (51:9): [True: 7.29k, False: 244k]
  ------------------
   52|  7.29k|          *win = (WORD32 *)ixheaacd_sine_win_256;
   53|  7.29k|          break;
   54|      0|        default:
  ------------------
  |  Branch (54:9): [True: 0, False: 251k]
  ------------------
   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|   251k|      }
   61|   251k|      break;
   62|       |
   63|   251k|    case WIN_SEL_1:
  ------------------
  |  |   92|  99.3k|#define WIN_SEL_1 1
  ------------------
  |  Branch (63:5): [True: 99.3k, False: 251k]
  ------------------
   64|  99.3k|      switch (win_sz) {
   65|      0|        case WIN_LEN_120:
  ------------------
  |  |   81|      0|#define WIN_LEN_120 120
  ------------------
  |  Branch (65:9): [True: 0, False: 99.3k]
  ------------------
   66|      0|          *win = (WORD32 *)ixheaacd_kbd_win120;
   67|      0|          break;
   68|  77.0k|        case WIN_LEN_128:
  ------------------
  |  |   77|  77.0k|#define WIN_LEN_128 128
  ------------------
  |  Branch (68:9): [True: 77.0k, False: 22.3k]
  ------------------
   69|  77.0k|          *win = (WORD32 *)ixheaacd_kbd_win128;
   70|  77.0k|          break;
   71|      0|        case WIN_LEN_960:
  ------------------
  |  |   78|      0|#define WIN_LEN_960 960
  ------------------
  |  Branch (71:9): [True: 0, False: 99.3k]
  ------------------
   72|      0|          *win = (WORD32 *)ixheaacd_kbd_win960;
   73|      0|          break;
   74|  20.9k|        case WIN_LEN_1024:
  ------------------
  |  |   73|  20.9k|#define WIN_LEN_1024 1024
  ------------------
  |  Branch (74:9): [True: 20.9k, False: 78.4k]
  ------------------
   75|  20.9k|          *win = (WORD32 *)ixheaacd_kbd_win1024;
   76|  20.9k|          break;
   77|      0|        case WIN_LEN_4:
  ------------------
  |  |   86|      0|#define WIN_LEN_4 4
  ------------------
  |  Branch (77:9): [True: 0, False: 99.3k]
  ------------------
   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: 99.3k]
  ------------------
   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: 99.3k]
  ------------------
   84|      0|          *win = (WORD32 *)ixheaacd_kbd_win_64;
   85|      0|          break;
   86|    278|        case WIN_LEN_768:
  ------------------
  |  |   74|    278|#define WIN_LEN_768 768
  ------------------
  |  Branch (86:9): [True: 278, False: 99.0k]
  ------------------
   87|    278|          *win = (WORD32 *)ixheaacd_kbd_win768;
   88|    278|          break;
   89|      0|        case WIN_LEN_192:
  ------------------
  |  |   76|      0|#define WIN_LEN_192 192
  ------------------
  |  Branch (89:9): [True: 0, False: 99.3k]
  ------------------
   90|      0|          *win = (WORD32 *)ixheaacd_kbd_win192;
   91|      0|          break;
   92|  1.08k|        case WIN_LEN_96:
  ------------------
  |  |   82|  1.08k|#define WIN_LEN_96 96
  ------------------
  |  Branch (92:9): [True: 1.08k, False: 98.2k]
  ------------------
   93|  1.08k|          *win = (WORD32 *)ixheaacd_kbd_win96;
   94|  1.08k|          break;
   95|      0|        case WIN_LEN_48:
  ------------------
  |  |   84|      0|#define WIN_LEN_48 48
  ------------------
  |  Branch (95:9): [True: 0, False: 99.3k]
  ------------------
   96|      0|          *win = (WORD32 *)ixheaacd_kbd_win48;
   97|      0|          break;
   98|      0|        default:
  ------------------
  |  Branch (98:9): [True: 0, False: 99.3k]
  ------------------
   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|  99.3k|      }
  105|  99.3k|      break;
  106|       |
  107|  99.3k|    default:
  ------------------
  |  Branch (107:5): [True: 0, False: 351k]
  ------------------
  108|      0|      return -1;
  109|      0|      break;
  110|   351k|  }
  111|   351k|  return 0;
  112|   351k|}

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

ixheaacd_tns_decode_coefficients:
   71|  24.7k|    ia_aac_dec_tables_struct *ptr_aac_tables) {
   72|  24.7k|  WORD32 i;
   73|  24.7k|  WORD32 tmp;
   74|  24.7k|  WORD32 *aptr = a;
   75|  24.7k|  WORD32 *tns_coeff_ptr;
   76|  24.7k|  WORD8 ixheaacd_drc_offset;
   77|       |
   78|  24.7k|  tmp = filter->resolution;
   79|  24.7k|  if (tmp == 0) {
  ------------------
  |  Branch (79:7): [True: 22.5k, False: 2.23k]
  ------------------
   80|  22.5k|    tns_coeff_ptr = ptr_aac_tables->pstr_block_tables->tns_coeff3;
   81|  22.5k|    ixheaacd_drc_offset = 4;
   82|       |
   83|  22.5k|  } else {
   84|  2.23k|    tns_coeff_ptr = ptr_aac_tables->pstr_block_tables->tns_coeff4;
   85|  2.23k|    ixheaacd_drc_offset = 8;
   86|  2.23k|  }
   87|       |
   88|   237k|  for (i = 0; i < filter->order; i++) {
  ------------------
  |  Branch (88:15): [True: 212k, False: 24.7k]
  ------------------
   89|   212k|    *aptr++ = tns_coeff_ptr[filter->coef[i] + ixheaacd_drc_offset];
   90|   212k|  }
   91|  24.7k|}
ixheaacd_tns_parcor_to_lpc:
   96|  19.5k|{
   97|  19.5k|  WORD i, j, status;
   98|  19.5k|  WORD32 z1;
   99|  19.5k|  WORD32 z[MAX_ORDER + 1];
  100|  19.5k|  WORD32 w[MAX_ORDER + 1];
  101|  19.5k|  WORD32 accu1, accu2;
  102|       |
  103|  19.5k|  status = 1;
  104|  19.5k|  *scale = 1;
  105|       |
  106|  56.7k|  while (status) {
  ------------------
  |  Branch (106:10): [True: 37.2k, False: 19.5k]
  ------------------
  107|  37.2k|    status = 0;
  108|       |
  109|  1.22M|    for (i = MAX_ORDER; i >= 0; i--) {
  ------------------
  |  |   24|  37.2k|#define MAX_ORDER 31
  ------------------
  |  Branch (109:25): [True: 1.19M, False: 37.2k]
  ------------------
  110|  1.19M|      z[i] = 0;
  111|  1.19M|      w[i] = 0;
  112|  1.19M|    }
  113|       |
  114|  37.2k|    accu1 = (0x40000000 >> (*scale - 1));
  115|       |
  116|   462k|    for (i = 0; i <= order; i++) {
  ------------------
  |  Branch (116:17): [True: 425k, False: 37.2k]
  ------------------
  117|   425k|      z1 = accu1;
  118|       |
  119|  5.12M|      for (j = 0; j < order; j++) {
  ------------------
  |  Branch (119:19): [True: 4.69M, False: 425k]
  ------------------
  120|  4.69M|        w[j] = (accu1);
  121|       |
  122|  4.69M|        accu1 = ixheaac_add32_sat(accu1,
  123|  4.69M|                                   ixheaac_mult32_shl_sat(parcor[j], (z[j])));
  124|  4.69M|        if (ixheaac_abs32_sat(accu1) == 0x7fffffff) status = 1;
  ------------------
  |  Branch (124:13): [True: 216k, False: 4.48M]
  ------------------
  125|  4.69M|      }
  126|  5.12M|      for (j = (order - 1); j >= 0; j--) {
  ------------------
  |  Branch (126:29): [True: 4.69M, False: 425k]
  ------------------
  127|  4.69M|        accu2 = (z[j]);
  128|  4.69M|        accu2 = ixheaac_add32_sat(accu2,
  129|  4.69M|                                   ixheaac_mult32_shl_sat(parcor[j], (w[j])));
  130|  4.69M|        z[j + 1] = (accu2);
  131|  4.69M|        if (ixheaac_abs32_sat(accu2) == 0x7fffffff) status = 1;
  ------------------
  |  Branch (131:13): [True: 216k, False: 4.48M]
  ------------------
  132|  4.69M|      }
  133|       |
  134|   425k|      z[0] = (z1);
  135|   425k|      lpc[i] = (accu1);
  136|   425k|      accu1 = 0;
  137|   425k|    }
  138|       |
  139|  37.2k|    accu1 = (status - 1);
  140|       |
  141|  37.2k|    if (accu1 == 0) {
  ------------------
  |  Branch (141:9): [True: 17.7k, False: 19.5k]
  ------------------
  142|  17.7k|      *scale = *scale + 1;
  143|  17.7k|    }
  144|  37.2k|  }
  145|  19.5k|}
ixheaacd_tns_parcor_lpc_convert_dec:
  150|  26.5k|{
  151|  26.5k|  WORD i, j, status;
  152|  26.5k|  WORD32 accu;
  153|  26.5k|  WORD16 temp_buf1[MAX_ORDER + 1];
  154|  26.5k|  WORD16 temp_buf2[MAX_ORDER + 1];
  155|  26.5k|  WORD32 accu1, accu2;
  156|       |
  157|  26.5k|  status = 1;
  158|  26.5k|  *scale = 0;
  159|       |
  160|  80.8k|  while (status) {
  ------------------
  |  Branch (160:10): [True: 54.3k, False: 26.5k]
  ------------------
  161|  54.3k|    status = 0;
  162|       |
  163|  1.79M|    for (i = MAX_ORDER; i >= 0; i--) {
  ------------------
  |  |   24|  54.3k|#define MAX_ORDER 31
  ------------------
  |  Branch (163:25): [True: 1.73M, False: 54.3k]
  ------------------
  164|  1.73M|      temp_buf1[i] = 0;
  165|  1.73M|      temp_buf2[i] = 0;
  166|  1.73M|    }
  167|       |
  168|  54.3k|    accu1 = (0x7fffffff >> *scale);
  169|       |
  170|   452k|    for (i = 0; i <= order; i++) {
  ------------------
  |  Branch (170:17): [True: 398k, False: 54.3k]
  ------------------
  171|   398k|      accu = accu1;
  172|       |
  173|  3.11M|      for (j = 0; j < order; j++) {
  ------------------
  |  Branch (173:19): [True: 2.72M, False: 398k]
  ------------------
  174|  2.72M|        temp_buf2[j] = ixheaac_round16(accu1);
  175|  2.72M|        accu1 = ixheaac_mac16x16in32_shl_sat(accu1, parcor[j], temp_buf1[j]);
  176|       |
  177|  2.72M|        if (ixheaac_abs32_sat(accu1) == 0x7fffffff) {
  ------------------
  |  Branch (177:13): [True: 198k, False: 2.52M]
  ------------------
  178|   198k|          status = 1;
  179|   198k|        }
  180|  2.72M|      }
  181|       |
  182|  3.11M|      for (j = (order - 1); j >= 0; j--) {
  ------------------
  |  Branch (182:29): [True: 2.72M, False: 398k]
  ------------------
  183|  2.72M|        accu2 = ixheaac_deposit16h_in32(temp_buf1[j]);
  184|  2.72M|        accu2 = ixheaac_mac16x16in32_shl_sat(accu2, parcor[j], temp_buf2[j]);
  185|  2.72M|        temp_buf1[j + 1] = ixheaac_round16(accu2);
  186|  2.72M|        if (ixheaac_abs32_sat(accu2) == 0x7fffffff) {
  ------------------
  |  Branch (186:13): [True: 29.7k, False: 2.69M]
  ------------------
  187|  29.7k|          status = 1;
  188|  29.7k|        }
  189|  2.72M|      }
  190|       |
  191|   398k|      temp_buf1[0] = ixheaac_round16(accu);
  192|   398k|      lpc[i] = ixheaac_round16(accu1);
  193|   398k|      accu1 = 0;
  194|   398k|    }
  195|       |
  196|  54.3k|    accu1 = (status - 1);
  197|       |
  198|  54.3k|    if (accu1 == 0) {
  ------------------
  |  Branch (198:9): [True: 27.7k, False: 26.5k]
  ------------------
  199|  27.7k|      *scale = *scale + 1;
  200|  27.7k|    }
  201|  54.3k|  }
  202|  26.5k|}
ixheaacd_tns_ar_filter_fixed_dec:
  208|  9.91k|{
  209|  9.91k|  WORD32 i, j;
  210|  9.91k|  WORD32 y, state[MAX_ORDER + 1];
  211|  9.91k|  WORD32 acc;
  212|       |
  213|  9.91k|  if ((order & 3) != 0) {
  ------------------
  |  Branch (213:7): [True: 4.26k, False: 5.64k]
  ------------------
  214|  8.85k|    for (i = order + 1; i < ((WORD32)(order & 0xfffffffc) + 4); i++) {
  ------------------
  |  Branch (214:25): [True: 4.59k, False: 4.26k]
  ------------------
  215|  4.59k|      lpc[i] = 0;
  216|  4.59k|    }
  217|  4.26k|    lpc[i] = 0;
  218|  4.26k|    order = ((order & 0xfffffffc) + 4);
  219|  4.26k|    order = order & 31;
  220|  4.26k|  }
  221|  9.91k|  {
  222|   111k|    for (i = 0; i < order; i++) {
  ------------------
  |  Branch (222:17): [True: 101k, False: 9.91k]
  ------------------
  223|   101k|      y = ixheaac_shl32_sat((*spectrum), scale_spec);
  224|   101k|      acc = 0;
  225|       |
  226|   610k|      for (j = i; j > 0; j--) {
  ------------------
  |  Branch (226:19): [True: 508k, False: 101k]
  ------------------
  227|   508k|        acc = ixheaacd_mac32_tns_sat(state[j - 1], lpc[j], acc);
  228|   508k|        state[j] = state[j - 1];
  229|   508k|      }
  230|   101k|      y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
  231|   101k|      state[0] = ixheaac_shl32_sat(y, shift_value);
  232|       |
  233|   101k|      *spectrum = y >> scale_spec;
  234|   101k|      spectrum += inc;
  235|   101k|    }
  236|  1.93M|    for (i = order; i < size; i++) {
  ------------------
  |  Branch (236:21): [True: 1.92M, False: 9.91k]
  ------------------
  237|  1.92M|      y = ixheaac_shl32_sat((*spectrum), scale_spec);
  238|  1.92M|      acc = 0;
  239|  22.6M|      for (j = order; j > 0; j--) {
  ------------------
  |  Branch (239:23): [True: 20.7M, False: 1.92M]
  ------------------
  240|  20.7M|        acc = ixheaacd_mac32_tns_sat(state[j - 1], lpc[j], acc);
  241|  20.7M|        state[j] = state[j - 1];
  242|  20.7M|      }
  243|  1.92M|      y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
  244|  1.92M|      state[0] = ixheaac_shl32_sat(y, shift_value);
  245|       |
  246|  1.92M|      *spectrum = y >> scale_spec;
  247|  1.92M|      spectrum += inc;
  248|  1.92M|    }
  249|  9.91k|  }
  250|  9.91k|}
ixheaacd_tns_ma_filter_fixed_ld:
  352|  9.60k|                                     WORD16 shift_value) {
  353|  9.60k|  WORD32 i, j;
  354|  9.60k|  WORD32 y, state[MAX_ORDER];
  355|       |
  356|   100k|  for (i = 0; i < order; i++) state[i] = 0;
  ------------------
  |  Branch (356:15): [True: 90.8k, False: 9.60k]
  ------------------
  357|       |
  358|  1.99M|  for (i = 0; i < size; i++) {
  ------------------
  |  Branch (358:15): [True: 1.98M, False: 9.60k]
  ------------------
  359|  1.98M|    y = *spectrum;
  360|       |
  361|  22.3M|    for (j = 0; j < order; j++) y += ixheaac_mult32_shl(state[j], lpc[j + 1]);
  ------------------
  |  Branch (361:17): [True: 20.3M, False: 1.98M]
  ------------------
  362|       |
  363|  20.3M|    for (j = order - 1; j > 0; j--) state[j] = state[j - 1];
  ------------------
  |  Branch (363:25): [True: 18.4M, False: 1.98M]
  ------------------
  364|       |
  365|  1.98M|    state[0] = ixheaac_shl32_dir_sat(*spectrum, shift_value);
  366|  1.98M|    *spectrum = y;
  367|  1.98M|    spectrum += inc;
  368|  1.98M|  }
  369|  9.60k|}
ixheaacd_tns_ar_filter_dec:
  373|  24.3k|                                WORD scale_spec, WORD32 *ptr_filter_state) {
  374|  24.3k|  WORD32 i, j;
  375|  24.3k|  WORD32 y;
  376|  24.3k|  WORD32 acc;
  377|       |
  378|  24.3k|  if ((order & 3) != 0) {
  ------------------
  |  Branch (378:7): [True: 20.6k, False: 3.68k]
  ------------------
  379|  24.8k|    for (i = order + 1; i < ((WORD32)(order & (~3)) + 4); i++) {
  ------------------
  |  Branch (379:25): [True: 4.16k, False: 20.6k]
  ------------------
  380|  4.16k|      lpc[i] = 0;
  381|  4.16k|    }
  382|  20.6k|    if (i < (MAX_ORDER + 1)) {
  ------------------
  |  |   24|  20.6k|#define MAX_ORDER 31
  ------------------
  |  Branch (382:9): [True: 20.6k, False: 0]
  ------------------
  383|  20.6k|      lpc[i] = 0;
  384|  20.6k|      order = ((order & (~3)) + 4);
  385|  20.6k|    } else {
  386|      0|      order = MAX_ORDER;
  ------------------
  |  |   24|      0|#define MAX_ORDER 31
  ------------------
  387|      0|    }
  388|  20.6k|  }
  389|       |
  390|   200k|  for (i = 0; i < order; i++) {
  ------------------
  |  Branch (390:15): [True: 176k, False: 24.3k]
  ------------------
  391|   176k|    y = ixheaac_shl32_sat((*spectrum), scale_spec);
  392|   176k|    acc = 0;
  393|       |
  394|   763k|    for (j = i; j > 0; j--) {
  ------------------
  |  Branch (394:17): [True: 587k, False: 176k]
  ------------------
  395|   587k|      acc = ixheaac_add32_sat(
  396|   587k|          acc, ixheaac_mult32x16in32(ptr_filter_state[j - 1], lpc[j]));
  397|   587k|      ptr_filter_state[j] = ptr_filter_state[j - 1];
  398|   587k|    }
  399|       |
  400|   176k|    y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
  401|   176k|    ptr_filter_state[0] = ixheaac_shl32_sat(y, shift_value);
  402|   176k|    *spectrum = y >> scale_spec;
  403|   176k|    spectrum += inc;
  404|   176k|  }
  405|       |
  406|  1.33M|  for (i = order; i < size; i++) {
  ------------------
  |  Branch (406:19): [True: 1.31M, False: 24.3k]
  ------------------
  407|  1.31M|    y = ixheaac_shl32_sat((*spectrum), scale_spec);
  408|  1.31M|    acc = 0;
  409|  9.54M|    for (j = order; j > 0; j--) {
  ------------------
  |  Branch (409:21): [True: 8.23M, False: 1.31M]
  ------------------
  410|  8.23M|      acc = ixheaac_add32_sat(
  411|  8.23M|          acc, ixheaac_mult32x16in32(ptr_filter_state[j - 1], lpc[j]));
  412|  8.23M|      ptr_filter_state[j] = ptr_filter_state[j - 1];
  413|  8.23M|    }
  414|       |
  415|  1.31M|    y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
  416|  1.31M|    ptr_filter_state[0] = ixheaac_shl32_sat(y, shift_value);
  417|  1.31M|    *spectrum = y >> scale_spec;
  418|  1.31M|    spectrum += inc;
  419|  1.31M|  }
  420|  24.3k|}
ixheaacd_calc_max_spectral_line_dec:
  422|   357k|WORD32 ixheaacd_calc_max_spectral_line_dec(WORD32 *ptr_tmp, WORD32 size) {
  423|   357k|  WORD32 max_spec_line = 0, i;
  424|   357k|  WORD unroll_cnt, rem;
  425|       |
  426|   357k|  unroll_cnt = size >> 3;
  427|  27.8M|  for (i = unroll_cnt; i--;) {
  ------------------
  |  Branch (427:24): [True: 27.5M, False: 357k]
  ------------------
  428|  27.5M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  429|  27.5M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  430|  27.5M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  431|  27.5M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  432|       |
  433|  27.5M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  434|  27.5M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  435|  27.5M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  436|  27.5M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  437|  27.5M|  }
  438|       |
  439|   357k|  rem = size - (unroll_cnt << 3);
  440|       |
  441|   357k|  if (rem) {
  ------------------
  |  Branch (441:7): [True: 50.2k, False: 307k]
  ------------------
  442|   251k|    for (i = rem; i--;) {
  ------------------
  |  Branch (442:19): [True: 200k, False: 50.2k]
  ------------------
  443|   200k|      max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  444|   200k|    }
  445|  50.2k|  }
  446|       |
  447|   357k|  return ixheaac_norm32(max_spec_line);
  448|   357k|}
ixheaacd_aac_tns.c:ixheaacd_mac32_tns_sat:
   59|  21.2M|                                                     WORD32 c) {
   60|  21.2M|  WORD32 result;
   61|  21.2M|  WORD64 temp_result;
   62|       |
   63|  21.2M|  temp_result = (WORD64)a * (WORD64)b;
   64|  21.2M|  result = (WORD32)(temp_result >> 32);
   65|  21.2M|  result = ixheaac_add32_sat(c, result);
   66|  21.2M|  return (result);
   67|  21.2M|}

ixheaacd_aacdec_decodeframe:
  110|   235k|    WORD32 *mps_header, WORD32 *mps_bytes, WORD32 is_init, WORD32 first_frame) {
  111|   235k|  WORD ch, ele_type;
  112|   235k|  ia_aac_dec_state_struct *p_state_enhaacplus_dec;
  113|   235k|  ia_aac_decoder_struct *aac_dec_handle;
  114|   235k|  ia_bit_buf_struct *it_bit_buff;
  115|   235k|  ixheaacd_latm_struct *latm_element;
  116|       |
  117|   235k|  WORD error_code = (WORD)frame_status;
  118|   235k|  WORD previous_element;
  119|   235k|  WORD prev_data_ele_present = 0;
  120|   235k|  WORD new_element;
  121|   235k|  WORD32 num_ch = 0;
  122|       |
  123|   235k|  WORD32 crc_reg = 0;
  124|   235k|  ia_adts_crc_info_struct *ptr_adts_crc_info;
  125|       |
  126|   235k|  WORD32 cnt_bits = 0;
  127|       |
  128|   235k|  WORD32 eld_sbr_flag = eld_specific_config.ld_sbr_flag_present;
  129|   235k|  WORD32 ld_sbr_crc_flag = eld_specific_config.ld_sbr_crc_flag;
  130|   235k|  WORD32 aac_spect_data_resil_flag =
  131|   235k|      eld_specific_config.aac_spect_data_resil_flag;
  132|       |
  133|   235k|  WORD32 ele_ch = 0;
  134|       |
  135|   235k|  ia_aac_sfb_code_book_struct *ptr_aac_sfb_code_book_data[CHANNELS];
  136|   235k|  ia_pns_stereo_data_struct *ptr_pns_stereo_data;
  137|       |
  138|   235k|  WORD32 *work_buffer_core = aac_scratch_ptrs->base_scr_8k;
  139|   235k|  WORD32 *work_buffer_1 = aac_scratch_ptrs->extra_scr_4k[0];
  140|   235k|  WORD32 *work_buffer_2 = aac_scratch_ptrs->extra_scr_4k[2];
  141|   235k|  p_state_enhaacplus_dec = p_obj_exhaacplus_dec->p_state_aac;
  142|       |
  143|   235k|  WORD32 *time_data = (WORD32 *)time_data_tmp;
  144|       |
  145|   235k|  aac_dec_handle = p_state_enhaacplus_dec->pstr_aac_dec_info[*ch_idx];
  146|   235k|  it_bit_buff = p_state_enhaacplus_dec->ptr_bit_stream;
  147|   235k|  p_obj_exhaacplus_dec->aac_config.str_prog_config.alignment_bits = it_bit_buff->bit_pos;
  148|       |
  149|   235k|  ptr_adts_crc_info = it_bit_buff->pstr_adts_crc_info;
  150|       |
  151|   235k|  latm_element = &p_state_enhaacplus_dec->latm_struct_element;
  152|       |
  153|   235k|  ptr_pns_stereo_data =
  154|   235k|      (ia_pns_stereo_data_struct
  155|   235k|           *)&work_buffer_1[2 * SIZEOF_INT(ia_aac_dec_channel_info_struct) +
  ------------------
  |  |   91|   235k|#define SIZEOF_INT(x) ((sizeof(x) + sizeof(WORD32) - 1) / sizeof(WORD32))
  ------------------
  156|   235k|                            2 * SIZEOF_INT(ia_aac_sfb_code_book_struct)];
  ------------------
  |  |   91|   235k|#define SIZEOF_INT(x) ((sizeof(x) + sizeof(WORD32) - 1) / sizeof(WORD32))
  ------------------
  157|       |
  158|   235k|  aac_dec_handle->frame_status = 1;
  159|       |
  160|   526k|  for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (160:16): [True: 290k, False: 235k]
  ------------------
  161|   290k|    const ia_aac_dec_imdct_tables_struct *pstr_imdct_tables;
  162|   290k|    aac_dec_handle->pstr_aac_dec_ch_info[ch] =
  163|   290k|        (ia_aac_dec_channel_info_struct
  164|   290k|             *)&work_buffer_1[ch * SIZEOF_INT(ia_aac_dec_channel_info_struct)];
  ------------------
  |  |   91|   290k|#define SIZEOF_INT(x) ((sizeof(x) + sizeof(WORD32) - 1) / sizeof(WORD32))
  ------------------
  165|   290k|    ptr_aac_sfb_code_book_data[ch] =
  166|   290k|        (ia_aac_sfb_code_book_struct
  167|   290k|             *)&work_buffer_1[2 * SIZEOF_INT(ia_aac_dec_channel_info_struct) +
  ------------------
  |  |   91|   290k|#define SIZEOF_INT(x) ((sizeof(x) + sizeof(WORD32) - 1) / sizeof(WORD32))
  ------------------
  168|   290k|                              (ch * SIZEOF_INT(ia_aac_sfb_code_book_struct))];
  ------------------
  |  |   91|   290k|#define SIZEOF_INT(x) ((sizeof(x) + sizeof(WORD32) - 1) / sizeof(WORD32))
  ------------------
  169|       |
  170|   290k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->ptr_scale_factor =
  171|   290k|        ptr_aac_sfb_code_book_data[ch]->scale_factor;
  172|   290k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->ptr_code_book =
  173|   290k|        ptr_aac_sfb_code_book_data[ch]->code_book;
  174|       |
  175|   290k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->ptr_spec_coeff =
  176|   290k|        &work_buffer_core[ch * MAX_BINS_LONG];
  ------------------
  |  |   28|   290k|#define MAX_BINS_LONG 1024
  ------------------
  177|       |
  178|   290k|    if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (178:9): [True: 92.8k, False: 197k]
  ------------------
  179|  92.8k|      aac_dec_handle->pstr_aac_dec_ch_info[ch]->ptr_spec_coeff =
  180|  92.8k|          &work_buffer_core[2 * ch * MAX_BINS_LONG];
  ------------------
  |  |   28|  92.8k|#define MAX_BINS_LONG 1024
  ------------------
  181|  92.8k|    }
  182|       |
  183|   290k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->pstr_stereo_info =
  184|   290k|        &ptr_pns_stereo_data->str_stereo_info;
  185|   290k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->pstr_pns_corr_info =
  186|   290k|        &ptr_pns_stereo_data->str_pns_corr_info;
  187|   290k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->pstr_pns_rand_vec_data =
  188|   290k|        aac_dec_handle->pstr_pns_rand_vec_data;
  189|       |
  190|   290k|    pstr_imdct_tables = aac_dec_handle->pstr_aac_tables->pstr_imdct_tables;
  191|       |
  192|   290k|    if (960 != frame_length) {
  ------------------
  |  Branch (192:9): [True: 227k, False: 63.4k]
  ------------------
  193|   227k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[0] =
  194|   227k|          pstr_imdct_tables->only_long_window_sine;
  195|   227k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_short_window[0] =
  196|   227k|          pstr_imdct_tables->only_short_window_sine;
  197|   227k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[1] =
  198|   227k|          pstr_imdct_tables->only_long_window_kbd;
  199|   227k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_short_window[1] =
  200|   227k|          pstr_imdct_tables->only_short_window_kbd;
  201|       |
  202|   227k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_long_window[0] =
  203|   227k|          pstr_imdct_tables->only_long_window_sine;
  204|   227k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_short_window[0] =
  205|   227k|          pstr_imdct_tables->only_short_window_sine;
  206|   227k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_long_window[1] =
  207|   227k|          pstr_imdct_tables->only_long_window_kbd;
  208|   227k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_short_window[1] =
  209|   227k|          pstr_imdct_tables->only_short_window_kbd;
  210|   227k|    } else {
  211|  63.4k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[0] =
  212|  63.4k|          pstr_imdct_tables->only_long_window_sine_960;
  213|  63.4k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_short_window[0] =
  214|  63.4k|          pstr_imdct_tables->only_short_window_sine_120;
  215|  63.4k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[1] =
  216|  63.4k|          pstr_imdct_tables->only_long_window_kbd_960;
  217|  63.4k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_short_window[1] =
  218|  63.4k|          pstr_imdct_tables->only_short_window_kbd_120;
  219|       |
  220|  63.4k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_long_window[0] =
  221|  63.4k|          pstr_imdct_tables->only_long_window_sine_960;
  222|  63.4k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_short_window[0] =
  223|  63.4k|          pstr_imdct_tables->only_short_window_sine_120;
  224|  63.4k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_long_window[1] =
  225|  63.4k|          pstr_imdct_tables->only_long_window_kbd_960;
  226|  63.4k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_short_window[1] =
  227|  63.4k|          pstr_imdct_tables->only_short_window_kbd_120;
  228|  63.4k|    }
  229|       |
  230|   290k|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && frame_status == 0)
  ------------------
  |  Branch (230:9): [True: 0, False: 290k]
  |  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|   290k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.frame_length = frame_length;
  236|   290k|    if (object_type == AOT_ER_AAC_ELD || object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (236:9): [True: 92.8k, False: 197k]
  |  Branch (236:42): [True: 76.7k, False: 121k]
  ------------------
  237|   203k|        object_type == AOT_AAC_LTP) {
  ------------------
  |  Branch (237:9): [True: 33.8k, False: 87.3k]
  ------------------
  238|   203k|      if (512 == aac_dec_handle->samples_per_frame) {
  ------------------
  |  Branch (238:11): [True: 123k, False: 80.4k]
  ------------------
  239|   123k|        if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (239:13): [True: 59.7k, False: 63.3k]
  ------------------
  240|  59.7k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[1] =
  241|  59.7k|              (WORD16 *)pstr_imdct_tables->low_overlap_win;
  242|  59.7k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[0] =
  243|  59.7k|              (WORD16 *)pstr_imdct_tables->window_sine_512;
  244|       |
  245|  59.7k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
  246|  59.7k|              ->ptr_long_window[1] =
  247|  59.7k|              (WORD16 *)pstr_imdct_tables->low_overlap_win;
  248|  59.7k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
  249|  59.7k|              ->ptr_long_window[0] =
  250|  59.7k|              (WORD16 *)pstr_imdct_tables->window_sine_512;
  251|  63.3k|        } else {
  252|  63.3k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[1] =
  253|  63.3k|              (WORD16 *)pstr_imdct_tables->window_sine_512_eld;
  254|  63.3k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[0] =
  255|  63.3k|              (WORD16 *)pstr_imdct_tables->window_sine_512_eld;
  256|  63.3k|        }
  257|   123k|      } else if (480 == aac_dec_handle->samples_per_frame) {
  ------------------
  |  Branch (257:18): [True: 46.5k, False: 33.8k]
  ------------------
  258|  46.5k|        if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (258:13): [True: 17.0k, False: 29.5k]
  ------------------
  259|  17.0k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[1] =
  260|  17.0k|              (WORD16 *)pstr_imdct_tables->low_overlap_win_480;
  261|  17.0k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[0] =
  262|  17.0k|              (WORD16 *)pstr_imdct_tables->window_sine_480;
  263|       |
  264|  17.0k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
  265|  17.0k|              ->ptr_long_window[1] =
  266|  17.0k|              (WORD16 *)pstr_imdct_tables->low_overlap_win_480;
  267|  17.0k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
  268|  17.0k|              ->ptr_long_window[0] =
  269|  17.0k|              (WORD16 *)pstr_imdct_tables->window_sine_480;
  270|       |
  271|  29.5k|        } else {
  272|  29.5k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[1] =
  273|  29.5k|              (WORD16 *)pstr_imdct_tables->window_sine_480_eld;
  274|  29.5k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[0] =
  275|  29.5k|              (WORD16 *)pstr_imdct_tables->window_sine_480_eld;
  276|  29.5k|        }
  277|  46.5k|      }
  278|   203k|    }
  279|   290k|    if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP)) {
  ------------------
  |  Branch (279:9): [True: 76.7k, False: 214k]
  |  Branch (279:43): [True: 33.8k, False: 180k]
  ------------------
  280|   110k|      if (aac_dec_handle->samples_per_frame <= 512) {
  ------------------
  |  Branch (280:11): [True: 76.7k, False: 33.8k]
  ------------------
  281|  76.7k|        aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.ltp2.lag =
  282|  76.7k|            aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ltp_lag_1;
  283|  76.7k|        aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.ltp.lag =
  284|  76.7k|            aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ltp_lag_2;
  285|  76.7k|      }
  286|   110k|      aac_dec_handle->pstr_aac_dec_ch_info[ch]->ltp_buf =
  287|   110k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ltp_buf;
  288|   110k|      aac_dec_handle->pstr_aac_dec_ch_info[ch]->ltp_lag =
  289|   110k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ltp_lag_1;
  290|   110k|    }
  291|       |
  292|   290k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->scratch_buf_ptr = work_buffer_2;
  293|   290k|    if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (293:9): [True: 92.8k, False: 197k]
  ------------------
  294|  92.8k|      aac_dec_handle->pstr_aac_dec_ch_info[ch]->pulse_scratch =
  295|  92.8k|          aac_scratch_ptrs->extra_scr_4k[3];
  296|  92.8k|    }
  297|   290k|  }
  298|       |
  299|   235k|  if (channel == 2) {
  ------------------
  |  Branch (299:7): [True: 55.1k, False: 180k]
  ------------------
  300|  55.1k|    if (aac_dec_handle->pstr_aac_dec_ch_info[1]->ptr_spec_coeff ==
  ------------------
  |  Branch (300:9): [True: 0, False: 55.1k]
  ------------------
  301|  55.1k|        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|  55.1k|  }
  306|       |
  307|   526k|  for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (307:16): [True: 290k, False: 235k]
  ------------------
  308|   290k|    ia_pns_info_struct *ptr_pns_info =
  309|   290k|        &aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_pns_info;
  310|   290k|    memset(ptr_pns_info, 0, sizeof(ia_pns_info_struct));
  311|   290k|  }
  312|       |
  313|   235k|  if (channel > 0) {
  ------------------
  |  Branch (313:7): [True: 235k, False: 0]
  ------------------
  314|   235k|    ia_pns_correlation_info_struct *ptr_corr_info =
  315|   235k|        aac_dec_handle->pstr_aac_dec_ch_info[0]->pstr_pns_corr_info;
  316|   235k|    memset(ptr_corr_info->correlated, 0, sizeof(UWORD8) * PNS_BAND_FLAGS_SIZE);
  ------------------
  |  |   25|   235k|#define PNS_BAND_FLAGS_SIZE 16
  ------------------
  317|   235k|  }
  318|       |
  319|   526k|  for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (319:16): [True: 290k, False: 235k]
  ------------------
  320|   290k|    memset(&aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_hcr_info, 0,
  321|   290k|           sizeof(ia_hcr_info_struct));
  322|   290k|    ixheaacd_huff_code_reorder_tbl_init(
  323|   290k|        &aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_hcr_info);
  324|   290k|  }
  325|       |
  326|   526k|  for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (326:16): [True: 290k, False: 235k]
  ------------------
  327|   290k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.ltp.data_present = 0;
  328|   290k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.ltp2.data_present =
  329|   290k|        0;
  330|   290k|  }
  331|       |
  332|   526k|  for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (332:16): [True: 290k, False: 235k]
  ------------------
  333|   290k|    if (object_type == AOT_ER_AAC_ELD || object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (333:9): [True: 92.8k, False: 197k]
  |  Branch (333:42): [True: 76.7k, False: 121k]
  ------------------
  334|   169k|      aac_dec_handle->pstr_aac_dec_ch_info[ch]->granule_len =
  335|   169k|          aac_dec_handle->samples_per_frame;
  336|   290k|    if (object_type == AOT_ER_AAC_LC)
  ------------------
  |  Branch (336:9): [True: 42.9k, False: 247k]
  ------------------
  337|  42.9k|      aac_dec_handle->pstr_aac_dec_ch_info[ch]->granule_len =
  338|  42.9k|          aac_dec_handle->samples_per_frame / 8;
  339|   290k|  }
  340|   235k|  previous_element = ID_END;
  341|       |
  342|   235k|  aac_dec_handle->pstr_sbr_bitstream->no_elements = 0;
  343|   235k|  new_element = 0;
  344|   235k|  ele_type = *type;
  345|       |
  346|   235k|  cnt_bits = it_bit_buff->cnt_bits;
  347|       |
  348|   235k|  WORD32 err = 0;
  349|   235k|  jmp_buf local;
  350|       |
  351|   235k|  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (351:7): [True: 0, False: 235k]
  ------------------
  352|      0|    err = setjmp(local);
  353|      0|  }
  354|       |
  355|   235k|  if (!err && frame_status) {
  ------------------
  |  Branch (355:7): [True: 235k, False: 0]
  |  Branch (355:15): [True: 235k, False: 0]
  ------------------
  356|   235k|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (356:9): [True: 0, False: 235k]
  ------------------
  357|      0|      it_bit_buff->xaac_jmp_buf = &local;
  358|      0|    }
  359|       |
  360|   235k|    if (((object_type != AOT_ER_AAC_ELD) && (object_type != AOT_ER_AAC_LD) &&
  ------------------
  |  Branch (360:10): [True: 176k, False: 59.0k]
  |  Branch (360:45): [True: 108k, False: 68.5k]
  ------------------
  361|   108k|         (object_type != AOT_ER_AAC_LC)) ||
  ------------------
  |  Branch (361:10): [True: 69.3k, False: 38.7k]
  ------------------
  362|   166k|        (object_type < ER_OBJECT_START)) {
  ------------------
  |  |   64|   166k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (362:9): [True: 0, False: 166k]
  ------------------
  363|   226k|      while (ele_type != ID_END && aac_dec_handle->frame_status) {
  ------------------
  |  Branch (363:14): [True: 180k, False: 45.9k]
  |  Branch (363:36): [True: 180k, False: 34]
  ------------------
  364|   180k|        ele_type = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 3);
  365|   180k|        ixheaacd_read_bidirection(it_bit_buff, -3);
  366|       |
  367|   180k|        if (it_bit_buff->cnt_bits < 3) {
  ------------------
  |  Branch (367:13): [True: 0, False: 180k]
  ------------------
  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|   180k|        if ((ele_type == ID_FIL) || (ele_type == ID_DSE) || (new_element == 0)) {
  ------------------
  |  Branch (373:13): [True: 36.1k, False: 144k]
  |  Branch (373:37): [True: 7.70k, False: 136k]
  |  Branch (373:61): [True: 69.3k, False: 67.4k]
  ------------------
  374|   113k|          ele_type = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 3);
  375|   113k|          new_element = 1;
  376|   113k|        } else if ((ele_type != ID_END)) {
  ------------------
  |  Branch (376:20): [True: 21.5k, False: 46.0k]
  ------------------
  377|  21.5k|          ele_type = -1;
  378|  21.5k|          break;
  379|  46.0k|        } else {
  380|  46.0k|          ele_type = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 3);
  381|  46.0k|        }
  382|       |
  383|   159k|        if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (383:13): [True: 0, False: 159k]
  ------------------
  384|      0|          aac_dec_handle->frame_status = 0;
  385|      0|        }
  386|       |
  387|   159k|        switch (ele_type) {
  ------------------
  |  Branch (387:17): [True: 158k, False: 178]
  ------------------
  388|  53.6k|          case ID_SCE:
  ------------------
  |  Branch (388:11): [True: 53.6k, False: 105k]
  ------------------
  389|  55.7k|          case ID_CPE:
  ------------------
  |  Branch (389:11): [True: 2.08k, False: 157k]
  ------------------
  390|  68.2k|          case ID_LFE:
  ------------------
  |  Branch (390:11): [True: 12.5k, False: 146k]
  ------------------
  391|       |
  392|  68.2k|            if (aac_dec_handle->frame_status) {
  ------------------
  |  Branch (392:17): [True: 68.2k, False: 0]
  ------------------
  393|  68.2k|              ia_aac_dec_channel_info_struct *pstr_aac_dec_ch_info =
  394|  68.2k|                  aac_dec_handle->pstr_aac_dec_ch_info[LEFT];
  ------------------
  |  |   40|  68.2k|#define LEFT 0
  ------------------
  395|  68.2k|              ia_ics_info_struct *ptr_ics_info = &pstr_aac_dec_ch_info->str_ics_info;
  396|  68.2k|              ele_ch = 1;
  397|  68.2k|              if (ele_type == ID_CPE) {
  ------------------
  |  Branch (397:19): [True: 2.08k, False: 66.2k]
  ------------------
  398|  2.08k|                ele_ch = 2;
  399|  66.2k|              } else {
  400|  66.2k|                ele_ch = 1;
  401|  66.2k|              }
  402|       |
  403|  68.2k|              prev_data_ele_present = 1;
  404|       |
  405|  68.2k|              if (ptr_adts_crc_info->crc_active == 1 && ptr_adts_crc_info->no_reg < 7) {
  ------------------
  |  Branch (405:19): [True: 200, False: 68.0k]
  |  Branch (405:57): [True: 163, False: 37]
  ------------------
  406|    163|                crc_reg = ixheaacd_adts_crc_start_reg(ptr_adts_crc_info, it_bit_buff,
  407|    163|                                                      CRC_ADTS_RAW_DATA_BLK_LEN);
  ------------------
  |  |   26|    163|#define CRC_ADTS_RAW_DATA_BLK_LEN 192
  ------------------
  408|    163|              }
  409|       |
  410|  68.2k|              pstr_aac_dec_ch_info->element_instance_tag =
  411|  68.2k|                  (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 4);
  412|       |
  413|  68.2k|              element_index_order[*ch_idx] = pstr_aac_dec_ch_info->element_instance_tag;
  414|  68.2k|              pstr_aac_dec_ch_info->common_window = 0;
  415|       |
  416|  68.2k|              ptr_ics_info->num_swb_window = 0;
  417|  68.2k|              ptr_ics_info->sampling_rate_index = aac_dec_handle->sampling_rate_index;
  418|  68.2k|              if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP)) {
  ------------------
  |  Branch (418:19): [True: 34, False: 68.2k]
  |  Branch (418:53): [True: 31.2k, False: 36.9k]
  ------------------
  419|  31.2k|                ptr_ics_info->ltp.data_present = 0;
  420|  31.2k|                ptr_ics_info->ltp2.data_present = 0;
  421|  31.2k|                ptr_ics_info->predictor_data_present = 0;
  422|  31.2k|              }
  423|       |
  424|  68.2k|              if (ele_ch > 1) {
  ------------------
  |  Branch (424:19): [True: 2.07k, False: 66.2k]
  ------------------
  425|  2.07k|                aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info.num_swb_window = 0;
  ------------------
  |  |   41|  2.07k|#define RIGHT 1
  ------------------
  426|  2.07k|                aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info.sampling_rate_index =
  ------------------
  |  |   41|  2.07k|#define RIGHT 1
  ------------------
  427|  2.07k|                    aac_dec_handle->sampling_rate_index;
  428|       |
  429|  2.07k|                pstr_aac_dec_ch_info->common_window =
  430|  2.07k|                    (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 1);
  431|       |
  432|  2.07k|                if (pstr_aac_dec_ch_info->common_window) {
  ------------------
  |  Branch (432:21): [True: 792, False: 1.28k]
  ------------------
  433|    792|                  error_code = ixheaacd_ics_read(
  434|    792|                      it_bit_buff, ptr_ics_info, aac_dec_handle->num_swb_window, object_type,
  435|    792|                      pstr_aac_dec_ch_info->common_window, aac_dec_handle->samples_per_frame);
  436|    792|                  if (error_code) {
  ------------------
  |  Branch (436:23): [True: 17, False: 775]
  ------------------
  437|     17|                    aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info =
  ------------------
  |  |   41|     17|#define RIGHT 1
  ------------------
  438|     17|                        aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->str_ics_info;
  ------------------
  |  |   40|     17|#define LEFT 0
  ------------------
  439|     17|                    if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (439:25): [True: 0, False: 17]
  ------------------
  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|     17|                    goto _ia_handle_error;
  445|     17|                  }
  446|       |
  447|    775|                  aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info =
  ------------------
  |  |   41|    775|#define RIGHT 1
  ------------------
  448|    775|                      pstr_aac_dec_ch_info->str_ics_info;
  449|       |
  450|    775|                  ixheaacd_read_ms_data(it_bit_buff, pstr_aac_dec_ch_info);
  451|    775|                }
  452|  2.07k|              }
  453|       |
  454|  68.2k|              error_code = ixheaacd_individual_ch_stream(
  455|  68.2k|                  it_bit_buff, aac_dec_handle, ele_ch, frame_length, total_channels, object_type,
  456|  68.2k|                  eld_specific_config, ele_type);
  457|       |
  458|  68.2k|              if (error_code) {
  ------------------
  |  Branch (458:19): [True: 974, False: 67.2k]
  ------------------
  459|    974|                if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (459:21): [True: 0, False: 974]
  |  Branch (459:72): [True: 0, False: 0]
  ------------------
  460|      0|                  aac_dec_handle->frame_status = 0;
  461|    974|                } else {
  462|    974|                  return error_code;
  463|    974|                }
  464|    974|              }
  465|       |
  466|  67.2k|              if (ptr_adts_crc_info->crc_active == 1) {
  ------------------
  |  Branch (466:19): [True: 167, False: 67.1k]
  ------------------
  467|    167|                ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff, crc_reg);
  468|    167|              }
  469|       |
  470|  67.2k|              if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (470:19): [True: 17, False: 67.2k]
  ------------------
  471|     17|                error_code =
  472|     17|                    (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     17|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  473|     17|              }
  474|       |
  475|  67.2k|              if (error_code) {
  ------------------
  |  Branch (475:19): [True: 17, False: 67.2k]
  ------------------
  476|     17|                goto _ia_handle_error;
  477|     17|              }
  478|       |
  479|  67.2k|            _ia_handle_error:
  480|  66.9k|              if (error_code) {
  ------------------
  |  Branch (480:19): [True: 34, False: 66.8k]
  ------------------
  481|     34|                aac_dec_handle->frame_status = 0;
  482|     34|                if ((ele_type >= ID_SCE) && (ele_type <= ID_LFE)) num_ch = num_ch + ele_ch;
  ------------------
  |  Branch (482:21): [True: 34, False: 0]
  |  Branch (482:45): [True: 34, False: 0]
  ------------------
  483|     34|                break;
  484|  66.8k|              } else {
  485|  66.8k|                error_code = ixheaacd_channel_pair_process(
  486|  66.8k|                    aac_dec_handle->pstr_aac_dec_ch_info, ele_ch, aac_dec_handle->pstr_aac_tables,
  487|  66.8k|                    total_channels, object_type, aac_spect_data_resil_flag,
  488|  66.8k|                    eld_specific_config.aac_sf_data_resil_flag, aac_scratch_ptrs->in_data,
  489|  66.8k|                    aac_scratch_ptrs->out_data, (VOID *)aac_dec_handle);
  490|  66.8k|                if (error_code) {
  ------------------
  |  Branch (490:21): [True: 0, False: 66.8k]
  ------------------
  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|  66.8k|                num_ch = num_ch + ele_ch;
  498|  66.8k|              }
  499|  66.9k|            }
  500|       |
  501|  66.8k|            break;
  502|  66.8k|          case ID_CCE:
  ------------------
  |  Branch (502:11): [True: 922, False: 158k]
  ------------------
  503|    922|            if (max_channels > 2) {
  ------------------
  |  Branch (503:17): [True: 922, False: 0]
  ------------------
  504|    922|              prev_data_ele_present = 1;
  505|    922|              error_code = ixheaacd_dec_coupling_channel_element(
  506|    922|                  it_bit_buff, aac_dec_handle, aac_dec_handle->sampling_rate_index,
  507|    922|                  aac_dec_handle->pstr_aac_tables, aac_dec_handle->pstr_common_tables,
  508|    922|                  &element_index_order[*ch_idx],
  509|    922|                  (ia_enhaacplus_dec_ind_cc *)aac_dec_handle->p_ind_channel_info, total_channels,
  510|    922|                  frame_length, object_type, eld_specific_config, ele_type);
  511|       |
  512|    922|              num_ch = num_ch + 1;
  513|       |
  514|    922|              if (error_code) {
  ------------------
  |  Branch (514:19): [True: 48, False: 874]
  ------------------
  515|     48|                aac_dec_handle->frame_status = 0;
  516|     48|                if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (516:21): [True: 0, False: 48]
  |  Branch (516:72): [True: 0, False: 0]
  ------------------
  517|      0|                  aac_dec_handle->frame_status = 0;
  518|     48|                } else {
  519|     48|                  return error_code;
  520|     48|                }
  521|    874|              } else {
  522|    874|                error_code = ixheaacd_channel_pair_process(
  523|    874|                    aac_dec_handle->pstr_aac_dec_ch_info, 1, aac_dec_handle->pstr_aac_tables,
  524|    874|                    total_channels, object_type, aac_spect_data_resil_flag,
  525|    874|                    eld_specific_config.aac_sf_data_resil_flag, aac_scratch_ptrs->in_data,
  526|    874|                    aac_scratch_ptrs->out_data, (VOID *)aac_dec_handle);
  527|    874|                if (error_code) {
  ------------------
  |  Branch (527:21): [True: 0, False: 874]
  ------------------
  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|    874|              }
  535|    922|            } 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|    874|            if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (538:17): [True: 0, False: 874]
  ------------------
  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|    874|            break;
  543|       |
  544|  7.70k|          case ID_DSE:
  ------------------
  |  Branch (544:11): [True: 7.70k, False: 151k]
  ------------------
  545|  7.82k|          case ID_PCE:
  ------------------
  |  Branch (545:11): [True: 114, False: 159k]
  ------------------
  546|  43.8k|          case ID_FIL:
  ------------------
  |  Branch (546:11): [True: 36.0k, False: 123k]
  ------------------
  547|       |
  548|  43.8k|          {
  549|  43.8k|            WORD32 flag = 1;
  550|       |
  551|  43.8k|            if ((ele_type != ID_FIL) && (ptr_adts_crc_info->crc_active == 1) &&
  ------------------
  |  Branch (551:17): [True: 7.82k, False: 36.0k]
  |  Branch (551:41): [True: 116, False: 7.70k]
  ------------------
  552|    116|                (ptr_adts_crc_info->no_reg < 7)) {
  ------------------
  |  Branch (552:17): [True: 47, False: 69]
  ------------------
  553|     47|              crc_reg = ixheaacd_adts_crc_start_reg(ptr_adts_crc_info, it_bit_buff, 0);
  554|     47|            }
  555|  43.8k|            if (ele_type == ID_DSE) {
  ------------------
  |  Branch (555:17): [True: 7.70k, False: 36.1k]
  ------------------
  556|  7.70k|              ixheaacd_read_data_stream_element(it_bit_buff, &aac_dec_handle->byte_align_bits,
  557|  7.70k|                                                p_obj_exhaacplus_dec->p_state_aac->pstr_drc_dec);
  558|  7.70k|            }
  559|       |
  560|  36.1k|            else if (ele_type == ID_PCE) {
  ------------------
  |  Branch (560:22): [True: 114, False: 36.0k]
  ------------------
  561|    114|              error_code = ixheaacd_decode_pce(
  562|    114|                  it_bit_buff, &p_obj_exhaacplus_dec->aac_config.ui_pce_found_in_hdr,
  563|    114|                  &p_obj_exhaacplus_dec->aac_config.str_prog_config);
  564|    114|              if (error_code != 0) {
  ------------------
  |  Branch (564:19): [True: 30, False: 84]
  ------------------
  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: 10, False: 20]
  ------------------
  572|     10|                  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (572:23): [True: 0, False: 10]
  |  Branch (572:74): [True: 0, False: 0]
  ------------------
  573|      0|                    aac_dec_handle->frame_status = 0;
  574|     10|                  } else {
  575|     10|                    return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |  102|     10|#define IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
  ------------------
  576|     10|                  }
  577|     20|                } else {
  578|     20|                  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (578:23): [True: 0, False: 20]
  |  Branch (578:74): [True: 0, False: 0]
  ------------------
  579|      0|                    aac_dec_handle->frame_status = 0;
  580|     20|                  } else {
  581|     20|                    return error_code;
  582|     20|                  }
  583|     20|                }
  584|     30|              }
  585|    114|            }
  586|       |
  587|  36.0k|            else if (ele_type == ID_FIL) {
  ------------------
  |  Branch (587:22): [True: 36.0k, False: 0]
  ------------------
  588|  36.0k|              WORD32 bits_decoded = 0;
  589|  36.0k|              if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (589:19): [True: 0, False: 36.0k]
  ------------------
  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|  36.0k|              if (ixheaacd_check_for_sbr_payload(
  ------------------
  |  Branch (603:19): [True: 16.3k, False: 19.6k]
  ------------------
  604|  36.0k|                      it_bit_buff, aac_dec_handle->pstr_sbr_bitstream, (WORD16)previous_element,
  605|  36.0k|                      pstr_drc_dec, object_type, adtsheader, cnt_bits, ld_sbr_crc_flag, drc_dummy,
  606|  36.0k|                      mps_buffer, mps_header, mps_bytes, is_init, &aac_dec_handle->is_first,
  607|  36.0k|                      p_obj_exhaacplus_dec->aac_config.ui_err_conceal)) {
  608|  16.3k|                flag = 0;
  609|  16.3k|              }
  610|  36.0k|            }
  611|       |
  612|  43.8k|            if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (612:17): [True: 0, False: 43.8k]
  ------------------
  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|  43.8k|            if (flag) {
  ------------------
  |  Branch (617:17): [True: 27.3k, False: 16.4k]
  ------------------
  618|  27.3k|              if (prev_data_ele_present == 0) {
  ------------------
  |  Branch (618:19): [True: 1.70k, False: 25.6k]
  ------------------
  619|  1.70k|                new_element = 0;
  620|  1.70k|              }
  621|  27.3k|            }
  622|  43.8k|            if ((ele_type != ID_FIL) && (ptr_adts_crc_info->crc_active == 1)) {
  ------------------
  |  Branch (622:17): [True: 7.74k, False: 36.0k]
  |  Branch (622:41): [True: 111, False: 7.62k]
  ------------------
  623|    111|              ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff, crc_reg);
  624|    111|            }
  625|       |
  626|  43.8k|            if (ele_type == ID_PCE) {
  ------------------
  |  Branch (626:17): [True: 70, False: 43.7k]
  ------------------
  627|     70|              if (ptr_adts_crc_info->str_crc_reg_data[crc_reg].bit_buf_cnt) {
  ------------------
  |  Branch (627:19): [True: 33, False: 37]
  ------------------
  628|     33|                ptr_adts_crc_info->str_crc_reg_data[crc_reg].max_bits =
  629|     33|                    ptr_adts_crc_info->str_crc_reg_data[crc_reg].bit_buf_cnt;
  630|     33|              }
  631|     70|            }
  632|  43.8k|          }
  633|       |
  634|      0|          break;
  635|       |
  636|  45.9k|          case ID_END:
  ------------------
  |  Branch (636:11): [True: 45.9k, False: 113k]
  ------------------
  637|  45.9k|            error_code = 0;
  638|  45.9k|            break;
  639|   159k|        }
  640|       |
  641|   157k|        previous_element = ele_type;
  642|       |
  643|   157k|        if (init_flag) {
  ------------------
  |  Branch (643:13): [True: 17.9k, False: 139k]
  ------------------
  644|  17.9k|          if ((ele_type >= ID_SCE) && (ele_type <= ID_LFE)) {
  ------------------
  |  Branch (644:15): [True: 17.9k, False: 0]
  |  Branch (644:39): [True: 6.76k, False: 11.2k]
  ------------------
  645|  6.76k|            p_obj_exhaacplus_dec->aac_config.element_type[*ch_idx] = ele_type;
  646|  6.76k|          }
  647|  17.9k|        }
  648|   157k|      }
  649|   166k|    } else {
  650|   166k|      {
  651|   166k|        switch (ch_config) {
  652|   166k|          default:
  ------------------
  |  Branch (652:11): [True: 166k, False: 0]
  ------------------
  653|   166k|            if (aac_dec_handle->frame_status) {
  ------------------
  |  Branch (653:17): [True: 166k, False: 0]
  ------------------
  654|   166k|              ia_aac_dec_channel_info_struct *pstr_aac_dec_ch_info =
  655|   166k|                  aac_dec_handle->pstr_aac_dec_ch_info[LEFT];
  ------------------
  |  |   40|   166k|#define LEFT 0
  ------------------
  656|   166k|              ia_ics_info_struct *ptr_ics_info = &pstr_aac_dec_ch_info->str_ics_info;
  657|       |
  658|   166k|              if (ch_config == 2)
  ------------------
  |  Branch (658:19): [True: 43.8k, False: 122k]
  ------------------
  659|  43.8k|                ele_ch = 2, ele_type = 1;
  660|   122k|              else
  661|   122k|                ele_ch = 1, ele_type = 0;
  662|       |
  663|   166k|              prev_data_ele_present = 1;
  664|       |
  665|   166k|              if ((ptr_adts_crc_info->crc_active == 1) && (ptr_adts_crc_info->no_reg < 7)) {
  ------------------
  |  Branch (665:19): [True: 0, False: 166k]
  |  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|   166k|              if (object_type != AOT_ER_AAC_ELD)
  ------------------
  |  Branch (670:19): [True: 107k, False: 59.0k]
  ------------------
  671|   107k|                pstr_aac_dec_ch_info->element_instance_tag =
  672|   107k|                    (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 4);
  673|       |
  674|   166k|              element_index_order[*ch_idx] = pstr_aac_dec_ch_info->element_instance_tag;
  675|   166k|              pstr_aac_dec_ch_info->common_window = 0;
  676|       |
  677|   166k|              ptr_ics_info->num_swb_window = 0;
  678|   166k|              ptr_ics_info->sampling_rate_index = aac_dec_handle->sampling_rate_index;
  679|       |
  680|   166k|              if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (680:19): [True: 68.5k, False: 97.8k]
  ------------------
  681|  68.5k|                ptr_ics_info->ltp.data_present = 0;
  682|  68.5k|                ptr_ics_info->ltp2.data_present = 0;
  683|  68.5k|                ptr_ics_info->predictor_data_present = 0;
  684|  68.5k|              }
  685|   166k|              if (ele_ch > 1) {
  ------------------
  |  Branch (685:19): [True: 43.8k, False: 122k]
  ------------------
  686|  43.8k|                aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info.num_swb_window = 0;
  ------------------
  |  |   41|  43.8k|#define RIGHT 1
  ------------------
  687|  43.8k|                aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info.sampling_rate_index =
  ------------------
  |  |   41|  43.8k|#define RIGHT 1
  ------------------
  688|  43.8k|                    aac_dec_handle->sampling_rate_index;
  689|       |
  690|  43.8k|                if (object_type != 39)
  ------------------
  |  Branch (690:21): [True: 10.7k, False: 33.0k]
  ------------------
  691|  10.7k|                  pstr_aac_dec_ch_info->common_window =
  692|  10.7k|                      (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 1);
  693|  33.0k|                else
  694|  33.0k|                  pstr_aac_dec_ch_info->common_window = 1;
  695|       |
  696|  43.8k|                if (pstr_aac_dec_ch_info->common_window) {
  ------------------
  |  Branch (696:21): [True: 41.4k, False: 2.33k]
  ------------------
  697|  41.4k|                  error_code = ixheaacd_ics_read(
  698|  41.4k|                      it_bit_buff, ptr_ics_info, aac_dec_handle->num_swb_window, object_type,
  699|  41.4k|                      pstr_aac_dec_ch_info->common_window, aac_dec_handle->samples_per_frame);
  700|  41.4k|                  if (error_code) {
  ------------------
  |  Branch (700:23): [True: 24.4k, False: 17.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|  17.0k|                  aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info =
  ------------------
  |  |   41|  17.0k|#define RIGHT 1
  ------------------
  712|  17.0k|                      pstr_aac_dec_ch_info->str_ics_info;
  713|       |
  714|  17.0k|                  ixheaacd_read_ms_data(it_bit_buff, pstr_aac_dec_ch_info);
  715|       |
  716|  17.0k|                  {
  717|  17.0k|                    if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (717:25): [True: 5.37k, False: 11.6k]
  ------------------
  718|  5.37k|                      IA_ERRORCODE temp =
  719|  5.37k|                          ixheaacd_ltp_decode(it_bit_buff, ptr_ics_info, object_type,
  720|  5.37k|                                              aac_dec_handle->samples_per_frame, LEFT);
  ------------------
  |  |   40|  5.37k|#define LEFT 0
  ------------------
  721|       |
  722|  5.37k|                      if (temp != 0) {
  ------------------
  |  Branch (722:27): [True: 2, False: 5.37k]
  ------------------
  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|  5.37k|                    }
  730|  17.0k|                  }
  731|  17.0k|                }
  732|  43.8k|              }
  733|       |
  734|   141k|              error_code = ixheaacd_individual_ch_stream(
  735|   141k|                  it_bit_buff, aac_dec_handle, ele_ch, frame_length, total_channels, object_type,
  736|   141k|                  eld_specific_config, ele_type);
  737|   141k|              if (error_code) {
  ------------------
  |  Branch (737:19): [True: 2.46k, False: 139k]
  ------------------
  738|  2.46k|                if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (738:21): [True: 0, False: 2.46k]
  |  Branch (738:72): [True: 0, False: 0]
  ------------------
  739|      0|                  aac_dec_handle->frame_status = 0;
  740|  2.46k|                } else {
  741|  2.46k|                  return error_code;
  742|  2.46k|                }
  743|  2.46k|              }
  744|       |
  745|   139k|              if (ptr_adts_crc_info->crc_active == 1) {
  ------------------
  |  Branch (745:19): [True: 0, False: 139k]
  ------------------
  746|      0|                ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff, crc_reg);
  747|      0|              }
  748|       |
  749|   139k|              if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (749:19): [True: 26, False: 139k]
  ------------------
  750|     26|                error_code =
  751|     26|                    (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     26|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  752|     26|              }
  753|       |
  754|   139k|              if (error_code) {
  ------------------
  |  Branch (754:19): [True: 26, False: 139k]
  ------------------
  755|     26|                goto _ia_handle_error1;
  756|     26|              }
  757|       |
  758|   163k|            _ia_handle_error1:
  759|   163k|              if (error_code) {
  ------------------
  |  Branch (759:19): [True: 24.5k, False: 138k]
  ------------------
  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|   138k|              } else {
  764|   138k|                error_code = ixheaacd_channel_pair_process(
  765|   138k|                    aac_dec_handle->pstr_aac_dec_ch_info, ele_ch, aac_dec_handle->pstr_aac_tables,
  766|   138k|                    total_channels, object_type, aac_spect_data_resil_flag,
  767|   138k|                    eld_specific_config.aac_sf_data_resil_flag, aac_scratch_ptrs->in_data,
  768|   138k|                    aac_scratch_ptrs->out_data, (VOID *)aac_dec_handle);
  769|   138k|                if (error_code) {
  ------------------
  |  Branch (769:21): [True: 0, False: 138k]
  ------------------
  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|   138k|                num_ch = num_ch + ele_ch;
  777|   138k|              }
  778|   163k|            }
  779|       |
  780|   138k|            p_obj_exhaacplus_dec->aac_config.element_type[*ch_idx] = ele_ch - 1;
  781|   138k|            break;
  782|   166k|        }
  783|       |
  784|   163k|        if ((object_type == AOT_ER_AAC_LC) || (!eld_sbr_flag)) {
  ------------------
  |  Branch (784:13): [True: 37.5k, False: 125k]
  |  Branch (784:47): [True: 70.1k, False: 55.6k]
  ------------------
  785|   107k|          WORD32 cnt_bits;
  786|   107k|          cnt_bits = it_bit_buff->cnt_bits;
  787|   107k|          p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.ldmps_config.no_ldsbr_present = 1;
  788|       |
  789|   107k|          if (cnt_bits >= 8) {
  ------------------
  |  Branch (789:15): [True: 107k, False: 403]
  ------------------
  790|   107k|            error_code = ixheaacd_extension_payload(
  791|   107k|                it_bit_buff, &cnt_bits, &p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle);
  792|   107k|            if (error_code) {
  ------------------
  |  Branch (792:17): [True: 41, False: 107k]
  ------------------
  793|     41|              if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (793:19): [True: 0, False: 41]
  |  Branch (793:70): [True: 0, False: 0]
  ------------------
  794|      0|                aac_dec_handle->frame_status = 0;
  795|     41|              } else {
  796|     41|                return error_code;
  797|     41|              }
  798|     41|            }
  799|   107k|          }
  800|       |
  801|   107k|          if (it_bit_buff->cnt_bits) {
  ------------------
  |  Branch (801:15): [True: 7.95k, False: 99.7k]
  ------------------
  802|  7.95k|            WORD32 alignment = it_bit_buff->bit_pos & 0x07;
  803|  7.95k|            it_bit_buff->cnt_bits = (it_bit_buff->cnt_bits + alignment) & 7;
  804|  7.95k|            it_bit_buff->bit_pos = 7;
  805|  7.95k|            it_bit_buff->ptr_read_next++;
  806|  7.95k|          }
  807|   107k|        }
  808|       |
  809|  55.6k|        else if ((object_type != AOT_ER_AAC_ELD) || (!eld_sbr_flag)) {
  ------------------
  |  Branch (809:18): [True: 0, False: 55.6k]
  |  Branch (809:53): [True: 0, False: 55.6k]
  ------------------
  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|  55.6k|        } else {
  848|  55.6k|          WORD32 bits_decoded, cnt_bits;
  849|  55.6k|          bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
  850|  55.6k|          cnt_bits = (frame_size * 8 - bits_decoded);
  851|  55.6k|          if (adtsheader == 1) {
  ------------------
  |  Branch (851:15): [True: 0, False: 55.6k]
  ------------------
  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|  55.6k|          ixheaacd_check_for_sbr_payload(
  861|  55.6k|              it_bit_buff, aac_dec_handle->pstr_sbr_bitstream, (WORD16)(ch_config - 1),
  862|  55.6k|              pstr_drc_dec, object_type, adtsheader, cnt_bits, ld_sbr_crc_flag, drc_dummy,
  863|  55.6k|              mps_buffer, mps_header, mps_bytes, is_init, &aac_dec_handle->is_first,
  864|  55.6k|              p_obj_exhaacplus_dec->aac_config.ui_err_conceal);
  865|  55.6k|        }
  866|   163k|      }
  867|   163k|    }
  868|   235k|  }
  869|   230k|  if ((err || (aac_dec_handle->frame_status == 0) || (frame_status == 0)) && (!is_init)) {
  ------------------
  |  Branch (869:8): [True: 132, False: 230k]
  |  Branch (869:15): [True: 24.5k, False: 206k]
  |  Branch (869:54): [True: 0, False: 206k]
  |  Branch (869:78): [True: 24.5k, False: 34]
  ------------------
  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|   206k|  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && aac_dec_handle->conceal_count == 0) {
  ------------------
  |  Branch (882:7): [True: 0, False: 206k]
  |  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|   206k|  if (ele_type == ID_END && p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT) {
  ------------------
  |  |   29|  45.9k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (888:7): [True: 45.9k, False: 160k]
  |  Branch (888:29): [True: 11.6k, False: 34.2k]
  ------------------
  889|  11.6k|    WORD32 tmp;
  890|  11.6k|    tmp = ((WORD32)latm_element->layer_info[0][0].frame_len_bits) -
  891|  11.6k|          (it_bit_buff->initial_cnt_bits - it_bit_buff->cnt_bits);
  892|       |
  893|  11.6k|    if (tmp > 0) ixheaacd_read_bidirection(it_bit_buff, tmp);
  ------------------
  |  Branch (893:9): [True: 7.56k, False: 4.05k]
  ------------------
  894|       |
  895|  11.6k|    if (latm_element->other_data_present) {
  ------------------
  |  Branch (895:9): [True: 2.90k, False: 8.71k]
  ------------------
  896|  2.90k|      WORD32 count_bits = (WORD32)latm_element->other_data_length;
  897|  2.90k|      ixheaacd_read_bidirection(it_bit_buff, count_bits);
  898|  2.90k|    }
  899|  11.6k|  }
  900|       |
  901|   206k|  if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (901:7): [True: 67.0k, False: 139k]
  ------------------
  902|   141k|    for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (902:18): [True: 74.9k, False: 67.0k]
  ------------------
  903|  74.9k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ltp_lag_1 =
  904|  74.9k|          aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.ltp2.lag;
  905|  74.9k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ltp_lag_2 =
  906|  74.9k|          aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.ltp.lag;
  907|  74.9k|    }
  908|  67.0k|  }
  909|   206k|  aac_dec_handle->frame_status = aac_dec_handle->frame_status && frame_status;
  ------------------
  |  Branch (909:34): [True: 206k, False: 175]
  |  Branch (909:66): [True: 206k, False: 0]
  ------------------
  910|       |
  911|   206k|  aac_dec_handle->channels = num_ch;
  912|       |
  913|   206k|  if (error_code == 0)
  ------------------
  |  Branch (913:7): [True: 206k, False: 174]
  ------------------
  914|   206k|    if ((skip_full_decode == 0) || ((skip_full_decode == 1) && error_code)) {
  ------------------
  |  Branch (914:9): [True: 206k, False: 163]
  |  Branch (914:37): [True: 163, False: 0]
  |  Branch (914:64): [True: 0, False: 163]
  ------------------
  915|   206k|      ia_ics_info_struct str_ics_info[2];
  916|   206k|      WORD32 *spec_coef[2];
  917|   206k|      WORD32 *scratch[2];
  918|       |
  919|   440k|      for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (919:20): [True: 234k, False: 206k]
  ------------------
  920|   234k|        str_ics_info[ch] = aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info;
  921|   234k|        spec_coef[ch] = aac_dec_handle->pstr_aac_dec_ch_info[ch]->ptr_spec_coeff;
  922|   234k|      }
  923|       |
  924|   206k|      scratch[0] = (WORD32 *)aac_scratch_ptrs->extra_scr_4k[2];
  925|   206k|      scratch[1] = (WORD32 *)aac_scratch_ptrs->extra_scr_4k[1];
  926|       |
  927|   206k|      error_code = ixheaacd_drc_map_channels(
  928|   206k|          pstr_drc_dec, aac_dec_handle->channels,
  929|   206k|          aac_dec_handle->pstr_aac_dec_ch_info[0]->str_ics_info.frame_length);
  930|   206k|      if (error_code) {
  ------------------
  |  Branch (930:11): [True: 2, False: 206k]
  ------------------
  931|      2|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (931:13): [True: 0, False: 2]
  |  Branch (931:64): [True: 0, False: 0]
  ------------------
  932|      0|          error_code = 0;
  933|      0|          aac_dec_handle->frame_status = 0;
  934|      2|        } else {
  935|      2|          return error_code;
  936|      2|        }
  937|      2|      }
  938|       |
  939|   432k|      for (ch = 0; ch < aac_dec_handle->channels; ch++) {
  ------------------
  |  Branch (939:20): [True: 226k, False: 206k]
  ------------------
  940|   226k|        WORD32 *overlap1 =
  941|   226k|            aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->overlap_add_data.ptr_overlap_buf;
  942|   226k|        const WORD16 *ptr_long_window_next =
  943|   226k|            aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
  944|   226k|                ->ptr_long_window[(int)str_ics_info[ch].window_shape];
  945|   226k|        const WORD16 *ptr_short_window_next =
  946|   226k|            aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
  947|   226k|                ->ptr_short_window[(int)str_ics_info[ch].window_shape];
  948|   226k|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (948:13): [True: 0, False: 226k]
  ------------------
  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|   226k|        if (pstr_drc_dec->drc_on) {
  ------------------
  |  Branch (981:13): [True: 226k, False: 0]
  ------------------
  982|   226k|          ixheaacd_drc_apply(pstr_drc_dec, spec_coef[ch],
  983|   226k|                             str_ics_info[ch].window_sequence, ch,
  984|   226k|                             str_ics_info[ch].frame_length,
  985|   226k|                             p_obj_exhaacplus_dec->aac_config.ui_enh_sbr, object_type);
  986|   226k|        }
  987|   226k|        if (skip_full_decode == 0) {
  ------------------
  |  Branch (987:13): [True: 226k, False: 0]
  ------------------
  988|   226k|          ixheaacd_imdct_process(aac_dec_handle->pstr_aac_dec_overlap_info[ch],
  989|   226k|                                 spec_coef[ch], &str_ics_info[ch],
  990|   226k|                                 time_data + slot_element, ch_fac, scratch[ch],
  991|   226k|                                 aac_dec_handle->pstr_aac_tables, object_type,
  992|   226k|                                 ldmps_present, slot_element);
  993|       |
  994|   226k|          if (slot_pos != NULL) *slot_pos = slot_element;
  ------------------
  |  Branch (994:15): [True: 226k, False: 0]
  ------------------
  995|   226k|          if (p_obj_exhaacplus_dec->p_state_aac->qshift_cnt > 15) {
  ------------------
  |  Branch (995:15): [True: 2, False: 226k]
  ------------------
  996|      2|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
  997|      2|          }
  998|       |
  999|   226k|          p_obj_exhaacplus_dec->p_state_aac
 1000|   226k|              ->qshift_adj[p_obj_exhaacplus_dec->p_state_aac->qshift_cnt++] =
 1001|   226k|              str_ics_info[ch].qshift_adj;
 1002|       |
 1003|   226k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
 1004|   226k|              ->overlap_add_data.win_shape = str_ics_info[ch].window_shape;
 1005|   226k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
 1006|   226k|              ->overlap_add_data.win_seq = str_ics_info[ch].window_sequence;
 1007|   226k|          if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP)) {
  ------------------
  |  Branch (1007:15): [True: 74.0k, False: 152k]
  |  Branch (1007:49): [True: 31.8k, False: 120k]
  ------------------
 1008|   105k|            {
 1009|   105k|              if ((str_ics_info[ch].window_sequence == ONLY_LONG_SEQUENCE) ||
  ------------------
  |  |  100|   105k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (1009:19): [True: 59.8k, False: 46.0k]
  ------------------
 1010|  72.5k|                  (str_ics_info[ch].window_sequence == LONG_STOP_SEQUENCE)) {
  ------------------
  |  |  103|  46.0k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (1010:19): [True: 12.7k, False: 33.3k]
  ------------------
 1011|  72.5k|                ixheaacd_lt_update_state(
 1012|  72.5k|                    aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
 1013|  72.5k|                        ->ltp_buf,
 1014|  72.5k|                    time_data + slot_element, overlap1,
 1015|  72.5k|                    aac_dec_handle->samples_per_frame, object_type,
 1016|  72.5k|                    (WORD16)ch_fac, str_ics_info[ch].window_sequence,
 1017|  72.5k|                    (WORD16 *)ptr_long_window_next, slot_element);
 1018|  72.5k|              } else {
 1019|  33.3k|                ixheaacd_lt_update_state(
 1020|  33.3k|                    aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
 1021|  33.3k|                        ->ltp_buf,
 1022|  33.3k|                    time_data + slot_element, overlap1,
 1023|  33.3k|                    aac_dec_handle->samples_per_frame, object_type,
 1024|  33.3k|                    (WORD16)ch_fac, str_ics_info[ch].window_sequence,
 1025|  33.3k|                    (WORD16 *)ptr_short_window_next, slot_element);
 1026|  33.3k|              }
 1027|   105k|            }
 1028|   105k|          }
 1029|   226k|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (1029:15): [True: 0, False: 226k]
  ------------------
 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|   226k|          slot_element++;
 1045|   226k|        }
 1046|   226k|      }
 1047|   206k|    }
 1048|       |
 1049|   206k|  if (ele_type == ID_END) {
  ------------------
  |  Branch (1049:7): [True: 45.8k, False: 160k]
  ------------------
 1050|  45.8k|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (1050:9): [True: 0, False: 45.8k]
  ------------------
 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|  45.8k|    } else {
 1060|  45.8k|      ixheaacd_byte_align(it_bit_buff, &aac_dec_handle->byte_align_bits);
 1061|  45.8k|      if (p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT) {
  ------------------
  |  |   29|  45.8k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (1061:11): [True: 11.6k, False: 34.2k]
  ------------------
 1062|  11.6k|        ixheaacd_byte_align(it_bit_buff, &it_bit_buff->audio_mux_align);
 1063|  11.6k|      }
 1064|  45.8k|    }
 1065|  45.8k|  }
 1066|   206k|  *type = ele_type;
 1067|       |
 1068|   206k|  aac_dec_handle->block_number =
 1069|   206k|      ixheaac_add32(aac_dec_handle->block_number, 1);
 1070|   206k|  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (1070:7): [True: 0, False: 206k]
  |  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|   206k|  } else {
 1074|   206k|    return error_code;
 1075|   206k|  }
 1076|   206k|}
ixheaacd_extension_payload:
 1079|   122k|                                  ia_mps_dec_state_struct *self) {
 1080|   122k|  WORD16 extension_type;
 1081|   122k|  WORD32 len, add_len;
 1082|   122k|  WORD32 i;
 1083|   122k|  WORD32 fill_nibble;
 1084|       |
 1085|   122k|  WORD32 err = 0;
 1086|   122k|  extension_type = (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 4);
 1087|   122k|  switch (extension_type) {
 1088|  6.71k|    case EXT_FILL_DATA:
  ------------------
  |  |   93|  6.71k|#define EXT_FILL_DATA 1
  ------------------
  |  Branch (1088:5): [True: 6.71k, False: 115k]
  ------------------
 1089|       |
 1090|  6.71k|      fill_nibble = ixheaacd_read_bits_buf(it_bit_buff, 4);
 1091|       |
 1092|  6.71k|      if (fill_nibble == 0) {
  ------------------
  |  Branch (1092:11): [True: 3.84k, False: 2.87k]
  ------------------
 1093|  24.6M|        for (i = 0; i < (*cnt >> 3) - 1; i++) {
  ------------------
  |  Branch (1093:21): [True: 24.6M, False: 3.84k]
  ------------------
 1094|  24.6M|          if (it_bit_buff->cnt_bits >= 8)
  ------------------
  |  Branch (1094:15): [True: 24.6M, False: 90]
  ------------------
 1095|  24.6M|            ixheaacd_read_bits_buf(it_bit_buff, 8);
 1096|     90|          else
 1097|     90|            ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
 1098|  24.6M|        }
 1099|       |
 1100|  3.84k|      } else
 1101|  2.87k|          err = -1;
 1102|  6.71k|      *cnt = it_bit_buff->cnt_bits;
 1103|  6.71k|      break;
 1104|       |
 1105|  9.89k|    case EXT_DATA_LENGTH:
  ------------------
  |  |   95|  9.89k|#define EXT_DATA_LENGTH 3
  ------------------
  |  Branch (1105:5): [True: 9.89k, False: 112k]
  ------------------
 1106|       |
 1107|  9.89k|      len = ixheaacd_read_bits_buf(it_bit_buff, 4);
 1108|       |
 1109|  9.89k|      if (len == 15) {
  ------------------
  |  Branch (1109:11): [True: 632, False: 9.26k]
  ------------------
 1110|    632|        add_len = ixheaacd_read_bits_buf(it_bit_buff, 8);
 1111|    632|        len += add_len;
 1112|       |
 1113|    632|        if (add_len == 255) {
  ------------------
  |  Branch (1113:13): [True: 400, False: 232]
  ------------------
 1114|    400|          len += ixheaacd_read_bits_buf(it_bit_buff, 16);
 1115|    400|        }
 1116|    632|      }
 1117|  9.89k|      len <<= 3;
 1118|       |
 1119|  9.89k|      ixheaacd_extension_payload(it_bit_buff, cnt, self);
 1120|  9.89k|      break;
 1121|       |
 1122|  6.15k|    case EXT_LDSAC_DATA:
  ------------------
  |  |   96|  6.15k|#define EXT_LDSAC_DATA 9
  ------------------
  |  Branch (1122:5): [True: 6.15k, False: 115k]
  ------------------
 1123|       |
 1124|  6.15k|      self->parse_nxt_frame = 1;
 1125|  6.15k|      ixheaacd_read_bits_buf(it_bit_buff, 2);/*anc_type*/
 1126|  6.15k|      ixheaacd_read_bits_buf(it_bit_buff, 2);/*anc_start_stop*/
 1127|       |
 1128|  6.15k|      if (self->ldmps_config.ldmps_present_flag == 1) {
  ------------------
  |  Branch (1128:11): [True: 2.13k, False: 4.01k]
  ------------------
 1129|  2.13k|        err = ixheaacd_ld_mps_frame_parsing(self, it_bit_buff);
 1130|  2.13k|        if (err) return err;
  ------------------
  |  Branch (1130:13): [True: 54, False: 2.08k]
  ------------------
 1131|  2.13k|      }
 1132|       |
 1133|  6.10k|      *cnt = it_bit_buff->cnt_bits;
 1134|  6.10k|      break;
 1135|  43.5k|    case EXT_FIL:
  ------------------
  |  |   94|  43.5k|#define EXT_FIL 0
  ------------------
  |  Branch (1135:5): [True: 43.5k, False: 78.4k]
  ------------------
 1136|  99.2k|    default:
  ------------------
  |  Branch (1136:5): [True: 55.6k, False: 66.3k]
  ------------------
 1137|       |
 1138|  4.63G|      for (i = 0; i < (*cnt) - 4; i++) {
  ------------------
  |  Branch (1138:19): [True: 4.63G, False: 99.2k]
  ------------------
 1139|  4.63G|         ixheaacd_skip_bits_buf(it_bit_buff, 1);/*discard*/
 1140|  4.63G|      }
 1141|       |
 1142|  99.2k|      *cnt = it_bit_buff->cnt_bits;
 1143|  99.2k|      break;
 1144|   122k|  }
 1145|       |
 1146|   112k|  return err;
 1147|   122k|}

ixheaacd_check_for_sbr_payload:
   65|  91.6k|                                    WORD32 is_init, WORD32 *is_first, WORD32 ec_flag) {
   66|  91.6k|  FLAG ret = 0;
   67|  91.6k|  WORD32 count;
   68|       |
   69|  91.6k|  if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (69:7): [True: 55.6k, False: 36.0k]
  ------------------
   70|  55.6k|    count = it_bit_buff->cnt_bits >> 3;
   71|  55.6k|    if (adtsheader == 1) count = cnt_bits >> 3;
  ------------------
  |  Branch (71:9): [True: 0, False: 55.6k]
  ------------------
   72|  55.6k|  } else {
   73|  36.0k|    count = ixheaacd_read_bits_buf(it_bit_buff, 4);
   74|       |
   75|  36.0k|    if ((count - 15) == 0) {
  ------------------
  |  Branch (75:9): [True: 5.84k, False: 30.1k]
  ------------------
   76|  5.84k|      WORD32 esc_count;
   77|  5.84k|      esc_count = ixheaacd_read_bits_buf(it_bit_buff, 8);
   78|  5.84k|      count = (esc_count + 14);
   79|  5.84k|    }
   80|  36.0k|  }
   81|       |
   82|  91.6k|  if (count > 0) {
  ------------------
  |  Branch (82:7): [True: 84.5k, False: 7.11k]
  ------------------
   83|  84.5k|    WORD32 extension_type;
   84|       |
   85|  84.5k|    if (object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (85:9): [True: 55.5k, False: 29.0k]
  ------------------
   86|  55.5k|      extension_type = ld_sbr_crc_flag ? SBR_EXTENSION_CRC : SBR_EXTENSION;
  ------------------
  |  |   27|  10.9k|#define SBR_EXTENSION_CRC 14
  ------------------
                    extension_type = ld_sbr_crc_flag ? SBR_EXTENSION_CRC : SBR_EXTENSION;
  ------------------
  |  |   26|  44.5k|#define SBR_EXTENSION 13
  ------------------
  |  Branch (86:24): [True: 10.9k, False: 44.5k]
  ------------------
   87|  29.0k|    else
   88|  29.0k|      extension_type = ixheaacd_read_bits_buf(it_bit_buff, 4);
   89|       |
   90|  84.5k|    if (((count < MAXSBRBYTES)) &&
  ------------------
  |  |   31|  84.5k|#define MAXSBRBYTES 1024
  ------------------
  |  Branch (90:9): [True: 57.7k, False: 26.7k]
  ------------------
   91|  57.7k|        (((extension_type == SBR_EXTENSION)) || ((extension_type == SBR_EXTENSION_CRC))) &&
  ------------------
  |  |   26|  57.7k|#define SBR_EXTENSION 13
  ------------------
                      (((extension_type == SBR_EXTENSION)) || ((extension_type == SBR_EXTENSION_CRC))) &&
  ------------------
  |  |   27|  23.3k|#define SBR_EXTENSION_CRC 14
  ------------------
  |  Branch (91:10): [True: 34.3k, False: 23.3k]
  |  Branch (91:49): [True: 10.9k, False: 12.4k]
  ------------------
   92|  45.3k|        ((prev_element == SBR_ID_SCE) || (prev_element == SBR_ID_CPE) ||
  ------------------
  |  Branch (92:10): [True: 16.2k, False: 29.0k]
  |  Branch (92:42): [True: 22.4k, False: 6.63k]
  ------------------
   93|  6.63k|         sub_d(prev_element, SBR_ID_CCE) == 0)
  ------------------
  |  |   24|  6.63k|#define sub_d(a, b) ((a) - (b))
  ------------------
  |  Branch (93:10): [True: 5.99k, False: 634]
  ------------------
   94|       |
   95|  84.5k|            ) {
   96|  44.6k|      WORD32 no_elements = pstr_stream_sbr->no_elements;
   97|  44.6k|      WORD32 byte_count;
   98|  44.6k|      ia_sbr_element_stream_struct *ptr_stream_sbr;
   99|       |
  100|  44.6k|      ret = 1;
  101|       |
  102|  44.6k|      ptr_stream_sbr = &pstr_stream_sbr->str_sbr_ele[no_elements];
  103|       |
  104|  44.6k|      if (ec_flag) {
  ------------------
  |  Branch (104:11): [True: 0, False: 44.6k]
  ------------------
  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|  44.6k|      if (ec_flag) {
  ------------------
  |  Branch (111:11): [True: 0, False: 44.6k]
  ------------------
  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|  44.6k|      } else {
  117|  44.6k|        ptr_stream_sbr->size_payload = count;
  118|  44.6k|        byte_count = ptr_stream_sbr->size_payload;
  119|  44.6k|        ptr_stream_sbr->extension_type = extension_type;
  120|  44.6k|        ptr_stream_sbr->sbr_ele_id = prev_element;
  121|  44.6k|      }
  122|  44.6k|      pstr_stream_sbr->no_elements = no_elements + 1;
  123|       |
  124|  44.6k|      if (pstr_drc_dec) pstr_drc_dec->sbr_found = 1;
  ------------------
  |  Branch (124:11): [True: 44.6k, False: 0]
  ------------------
  125|       |
  126|  44.6k|      if (ec_flag) {
  ------------------
  |  Branch (126:11): [True: 0, False: 44.6k]
  ------------------
  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|  44.6k|      if (byte_count > 0 && sub_d(byte_count, MAXSBRBYTES) <= 0) {
  ------------------
  |  |   24|  44.6k|#define sub_d(a, b) ((a) - (b))
  ------------------
  |  Branch (131:11): [True: 44.6k, False: 0]
  |  Branch (131:29): [True: 44.6k, False: 0]
  ------------------
  132|  44.6k|        WORD32 i;
  133|  44.6k|        WORD8 *ptr_sbr_data;
  134|  44.6k|        if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (134:13): [True: 16.3k, False: 28.3k]
  ------------------
  135|  16.3k|          if (ec_flag) {
  ------------------
  |  Branch (135:15): [True: 0, False: 16.3k]
  ------------------
  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|  16.3k|          } else {
  139|  16.3k|            ptr_sbr_data = &ptr_stream_sbr->ptr_sbr_data[1];
  140|  16.3k|            ptr_stream_sbr->ptr_sbr_data[0] = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, 4);
  141|  16.3k|          }
  142|  28.3k|        } else {
  143|  28.3k|          if (ec_flag) {
  ------------------
  |  Branch (143:15): [True: 0, False: 28.3k]
  ------------------
  144|      0|            ptr_sbr_data = ptr_stream_sbr->sbr_prev_data;
  145|  28.3k|          } else {
  146|  28.3k|            ptr_sbr_data = ptr_stream_sbr->ptr_sbr_data;
  147|  28.3k|          }
  148|  28.3k|        }
  149|  10.6M|        for (i = byte_count - 2; i >= 0; i--) {
  ------------------
  |  Branch (149:34): [True: 10.6M, False: 44.6k]
  ------------------
  150|  10.6M|          *ptr_sbr_data++ = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, 8);
  151|  10.6M|          if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (151:15): [True: 10.5M, False: 138k]
  ------------------
  152|  10.5M|            if (adtsheader == 1) {
  ------------------
  |  Branch (152:17): [True: 0, False: 10.5M]
  ------------------
  153|      0|              cnt_bits = cnt_bits - 8;
  154|      0|            }
  155|  10.5M|          }
  156|  10.6M|        }
  157|       |
  158|  44.6k|        if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (158:13): [True: 28.3k, False: 16.3k]
  ------------------
  159|  28.3k|          *ptr_sbr_data++ = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, 8);
  160|  28.3k|          if (adtsheader == 1) {
  ------------------
  |  Branch (160:15): [True: 0, False: 28.3k]
  ------------------
  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.3k|          } else {
  172|  28.3k|            if (it_bit_buff->cnt_bits > 0) {
  ------------------
  |  Branch (172:17): [True: 24.6k, False: 3.71k]
  ------------------
  173|  24.6k|              WORD32 unaligned_bits = (8 - it_bit_buff->cnt_bits);
  174|  24.6k|              *ptr_sbr_data = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
  175|  24.6k|              *ptr_sbr_data = *ptr_sbr_data << unaligned_bits;
  176|  24.6k|              if (!ec_flag)
  ------------------
  |  Branch (176:19): [True: 24.6k, False: 0]
  ------------------
  177|  24.6k|                ptr_stream_sbr->size_payload++;
  178|      0|              else
  179|      0|                ptr_stream_sbr->size_payload_old++;
  180|  24.6k|            }
  181|  28.3k|          }
  182|  28.3k|        }
  183|  44.6k|      }
  184|       |
  185|  44.6k|    } else if (extension_type == EXT_DYNAMIC_RANGE) {
  ------------------
  |  |   23|  39.8k|#define EXT_DYNAMIC_RANGE 11
  ------------------
  |  Branch (185:16): [True: 417, False: 39.4k]
  ------------------
  186|    417|      pstr_drc_dec->drc_element_found = 1;
  187|    417|      count -= ixheaacd_dec_drc_read_element(pstr_drc_dec, drc_dummy, it_bit_buff);
  188|  39.4k|    } else if (extension_type == EXT_SAC_DATA) {
  ------------------
  |  |   25|  39.4k|#define EXT_SAC_DATA 12
  ------------------
  |  Branch (188:16): [True: 10.0k, False: 29.3k]
  ------------------
  189|  10.0k|      WORD32 anc_type, anc_start, i, len = 0;
  190|  10.0k|      anc_type = ixheaacd_read_bits_buf(it_bit_buff, 2);
  191|  10.0k|      *mps_header = anc_type;
  192|       |
  193|  10.0k|      anc_start = ixheaacd_read_bits_buf(it_bit_buff, 1);
  194|  10.0k|      if (anc_start == 1) {
  ------------------
  |  Branch (194:11): [True: 8.08k, False: 1.98k]
  ------------------
  195|  8.08k|        *mps_bytes = 0;
  196|  8.08k|      }
  197|  10.0k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  198|       |
  199|  10.0k|      if (anc_type == 1 && is_init == 0 && *is_first == 1) {
  ------------------
  |  Branch (199:11): [True: 1.82k, False: 8.24k]
  |  Branch (199:28): [True: 699, False: 1.12k]
  |  Branch (199:44): [True: 441, False: 258]
  ------------------
  200|    441|        len = ixheaacd_read_bits_buf(it_bit_buff, 1);
  201|    441|        len = ixheaacd_read_bits_buf(it_bit_buff, 7) + 1;
  202|    441|        ixheaacd_read_bidirection(it_bit_buff, -8);
  203|    441|      }
  204|       |
  205|   372k|      for (i = 0; i < count - 1; i++) {
  ------------------
  |  Branch (205:19): [True: 362k, False: 10.0k]
  ------------------
  206|   362k|        mps_buffer[i + *mps_bytes] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  207|   362k|      }
  208|       |
  209|  10.0k|      *mps_bytes += (count - 1);
  210|  10.0k|      if (anc_type == 1 && is_init == 0 && *is_first == 1) {
  ------------------
  |  Branch (210:11): [True: 1.82k, False: 8.24k]
  |  Branch (210:28): [True: 699, False: 1.12k]
  |  Branch (210:44): [True: 441, False: 258]
  ------------------
  211|    441|        if (*mps_bytes < len) {
  ------------------
  |  Branch (211:13): [True: 1, False: 440]
  ------------------
  212|      1|          if (ec_flag) {
  ------------------
  |  Branch (212:15): [True: 0, False: 1]
  ------------------
  213|      0|            *mps_bytes = 0;
  214|      0|          }
  215|      1|          longjmp(*(it_bit_buff->xaac_jmp_buf),
  216|      1|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      1|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  217|      1|        }
  218|  11.9k|        for (i = 0; i < count - 1; i++) {
  ------------------
  |  Branch (218:21): [True: 11.5k, False: 440]
  ------------------
  219|  11.5k|          mps_buffer[i] = mps_buffer[i + len];
  220|  11.5k|        }
  221|    440|        *mps_bytes = *mps_bytes - len;
  222|    440|      }
  223|  10.0k|      *is_first = 1;
  224|  29.3k|    } else {
  225|  29.3k|      ixheaacd_read_bits_buf(it_bit_buff, 4);
  226|       |
  227|  29.3k|      if (it_bit_buff->cnt_bits < ((count - 1) << 3)) {
  ------------------
  |  Branch (227:11): [True: 8, False: 29.3k]
  ------------------
  228|      8|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  229|      8|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      8|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  230|      8|      }
  231|  29.3k|      it_bit_buff->ptr_read_next += count - 1;
  232|  29.3k|      it_bit_buff->cnt_bits -= ((count - 1) << 3);
  233|  29.3k|    }
  234|  84.5k|  }
  235|  91.6k|  return (ret);
  236|  91.6k|}

ixheaacd_get_mode_lpc:
   53|   293k|WORD32 ixheaacd_get_mode_lpc(WORD32 lpc_set, ia_bit_buf_struct *it_bit_buff, WORD32 *nk_mode) {
   54|   293k|  WORD32 mode_lpc = 0;
   55|   293k|  switch (lpc_set) {
  ------------------
  |  Branch (55:11): [True: 293k, False: 0]
  ------------------
   56|  70.6k|    case 4:
  ------------------
  |  Branch (56:5): [True: 70.6k, False: 223k]
  ------------------
   57|  70.6k|      mode_lpc = 0;
   58|  70.6k|      break;
   59|  42.6k|    case 0:
  ------------------
  |  Branch (59:5): [True: 42.6k, False: 251k]
  ------------------
   60|   112k|    case 2:
  ------------------
  |  Branch (60:5): [True: 70.2k, False: 223k]
  ------------------
   61|   112k|      mode_lpc = ixheaacd_read_bits_buf(it_bit_buff, 1);
   62|   112k|      if (mode_lpc == 1) *nk_mode = 3;
  ------------------
  |  Branch (62:11): [True: 37.9k, False: 74.9k]
  ------------------
   63|   112k|      break;
   64|  47.1k|    case 1:
  ------------------
  |  Branch (64:5): [True: 47.1k, False: 246k]
  ------------------
   65|  47.1k|      if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (65:11): [True: 31.7k, False: 15.3k]
  ------------------
   66|  31.7k|        mode_lpc = *nk_mode = 2;
   67|  15.3k|      else {
   68|  15.3k|        if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (68:13): [True: 11.6k, False: 3.69k]
  ------------------
   69|  11.6k|          mode_lpc = *nk_mode = 0;
   70|  3.69k|        else
   71|  3.69k|          mode_lpc = *nk_mode = 1;
   72|  15.3k|      }
   73|  47.1k|      break;
   74|  63.1k|    case 3:
  ------------------
  |  Branch (74:5): [True: 63.1k, False: 230k]
  ------------------
   75|  63.1k|      if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (75:11): [True: 38.1k, False: 24.9k]
  ------------------
   76|  38.1k|        mode_lpc = *nk_mode = 1;
   77|  24.9k|      else {
   78|  24.9k|        if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (78:13): [True: 18.2k, False: 6.74k]
  ------------------
   79|  18.2k|          mode_lpc = *nk_mode = 0;
   80|  6.74k|        else {
   81|  6.74k|          if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (81:15): [True: 2.12k, False: 4.62k]
  ------------------
   82|  2.12k|            mode_lpc = 2;
   83|  4.62k|          else
   84|  4.62k|            mode_lpc = 3;
   85|  6.74k|          *nk_mode = 2;
   86|  6.74k|        }
   87|  24.9k|      }
   88|  63.1k|      break;
   89|   293k|  }
   90|   293k|  return mode_lpc;
   91|   293k|}
ixheaacd_qn_data:
   93|   290k|VOID ixheaacd_qn_data(WORD32 nk_mode, WORD32 *qn, ia_bit_buf_struct *it_bit_buff) {
   94|   290k|  WORD32 k;
   95|   290k|  switch (nk_mode) {
  ------------------
  |  Branch (95:11): [True: 290k, False: 0]
  ------------------
   96|  38.1k|    case 1:
  ------------------
  |  Branch (96:5): [True: 38.1k, False: 251k]
  ------------------
   97|   114k|      for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (97:19): [True: 76.3k, False: 38.1k]
  ------------------
   98|   109k|        while (ixheaacd_read_bits_buf(it_bit_buff, 1) == 1) {
  ------------------
  |  Branch (98:16): [True: 32.6k, False: 76.3k]
  ------------------
   99|  32.6k|          qn[k] += 1;
  100|  32.6k|        }
  101|  76.3k|        if (qn[k] > 0) qn[k] += 1;
  ------------------
  |  Branch (101:13): [True: 22.4k, False: 53.8k]
  ------------------
  102|  76.3k|      }
  103|  38.1k|      break;
  104|   164k|    case 0:
  ------------------
  |  Branch (104:5): [True: 164k, False: 125k]
  ------------------
  105|   203k|    case 2:
  ------------------
  |  Branch (105:5): [True: 38.5k, False: 251k]
  ------------------
  106|   251k|    case 3:
  ------------------
  |  Branch (106:5): [True: 48.7k, False: 241k]
  ------------------
  107|   755k|      for (k = 0; k < 2; k++) qn[k] = 2 + ixheaacd_read_bits_buf(it_bit_buff, 2);
  ------------------
  |  Branch (107:19): [True: 503k, False: 251k]
  ------------------
  108|       |
  109|   251k|      if (nk_mode == 2) {
  ------------------
  |  Branch (109:11): [True: 38.5k, False: 213k]
  ------------------
  110|   115k|        for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (110:21): [True: 77.0k, False: 38.5k]
  ------------------
  111|  77.0k|          if (qn[k] > 4) {
  ------------------
  |  Branch (111:15): [True: 14.6k, False: 62.4k]
  ------------------
  112|  14.6k|            qn[k] = 0;
  113|       |
  114|  34.6k|            while (ixheaacd_read_bits_buf(it_bit_buff, 1) == 1) qn[k] += 1;
  ------------------
  |  Branch (114:20): [True: 20.0k, False: 14.6k]
  ------------------
  115|       |
  116|  14.6k|            if (qn[k] > 0) qn[k] += 4;
  ------------------
  |  Branch (116:17): [True: 4.22k, False: 10.3k]
  ------------------
  117|  14.6k|          }
  118|  77.0k|        }
  119|   213k|      } else {
  120|   640k|        for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (120:21): [True: 426k, False: 213k]
  ------------------
  121|   426k|          if (qn[k] > 4) {
  ------------------
  |  Branch (121:15): [True: 67.2k, False: 359k]
  ------------------
  122|  67.2k|            WORD32 qn_ext = 0;
  123|   185k|            while (ixheaacd_read_bits_buf(it_bit_buff, 1) == 1) qn_ext += 1;
  ------------------
  |  Branch (123:20): [True: 117k, False: 67.2k]
  ------------------
  124|       |
  125|  67.2k|            switch (qn_ext) {
  126|  40.1k|              case 0:
  ------------------
  |  Branch (126:15): [True: 40.1k, False: 27.1k]
  ------------------
  127|  40.1k|                qn[k] = 5;
  128|  40.1k|                break;
  129|  12.6k|              case 1:
  ------------------
  |  Branch (129:15): [True: 12.6k, False: 54.6k]
  ------------------
  130|  12.6k|                qn[k] = 6;
  131|  12.6k|                break;
  132|  4.31k|              case 2:
  ------------------
  |  Branch (132:15): [True: 4.31k, False: 62.9k]
  ------------------
  133|  4.31k|                qn[k] = 0;
  134|  4.31k|                break;
  135|  10.1k|              default:
  ------------------
  |  Branch (135:15): [True: 10.1k, False: 57.1k]
  ------------------
  136|  10.1k|                qn[k] = qn_ext + 4;
  137|  10.1k|                break;
  138|  67.2k|            }
  139|  67.2k|          }
  140|   426k|        }
  141|   213k|      }
  142|   251k|      break;
  143|   290k|  }
  144|   290k|  return;
  145|   290k|}
ixheaacd_code_book_indices:
  148|   290k|                                WORD32 *pos, ia_bit_buf_struct *it_bit_buff) {
  149|   290k|  WORD32 k, qn[2] = {0, 0}, nk, n, i;
  150|       |
  151|   290k|  ixheaacd_qn_data(nk_mode, &qn[0], it_bit_buff);
  152|       |
  153|   290k|  pstr_td_frame_data->lpc_first_approx_idx[(*pos)++] = qn[0];
  154|   290k|  pstr_td_frame_data->lpc_first_approx_idx[(*pos)++] = qn[1];
  155|       |
  156|   870k|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (156:15): [True: 580k, False: 290k]
  ------------------
  157|   580k|    if (qn[k] > 0) {
  ------------------
  |  Branch (157:9): [True: 511k, False: 68.5k]
  ------------------
  158|   511k|      if (qn[k] > 4) {
  ------------------
  |  Branch (158:11): [True: 68.1k, False: 443k]
  ------------------
  159|  68.1k|        nk = (qn[k] - 3) / 2;
  160|  68.1k|        n = qn[k] - nk * 2;
  161|   443k|      } else {
  162|   443k|        nk = 0;
  163|   443k|        n = qn[k];
  164|   443k|      }
  165|   511k|      pstr_td_frame_data->lpc_first_approx_idx[(*pos)++] =
  166|   511k|          ixheaacd_read_bits_buf(it_bit_buff, 4 * n);
  167|       |
  168|  4.60M|      for (i = 0; i < 8; i++)
  ------------------
  |  Branch (168:19): [True: 4.09M, False: 511k]
  ------------------
  169|  4.09M|        pstr_td_frame_data->lpc_first_approx_idx[(*pos)++] =
  170|  4.09M|            ixheaacd_read_bits_buf(it_bit_buff, nk);
  171|   511k|    }
  172|   580k|  }
  173|   290k|  return;
  174|   290k|}
ixheaacd_lpc_data:
  178|  70.6k|                       ia_bit_buf_struct *it_bit_buff) {
  179|  70.6k|  WORD32 mode_lpc, nk_mode = 0, j = 0;
  180|       |
  181|  70.6k|  mode_lpc = ixheaacd_get_mode_lpc(4, it_bit_buff, &nk_mode);
  182|       |
  183|  70.6k|  pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  184|       |
  185|  70.6k|  ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  186|  70.6k|  if (first_lpd_flag) {
  ------------------
  |  Branch (186:7): [True: 42.6k, False: 28.0k]
  ------------------
  187|  42.6k|    mode_lpc = ixheaacd_get_mode_lpc(0, it_bit_buff, &nk_mode);
  188|  42.6k|    pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
  189|       |
  190|  42.6k|    if (mode_lpc == 0)
  ------------------
  |  Branch (190:9): [True: 27.9k, False: 14.7k]
  ------------------
  191|  27.9k|      pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  192|       |
  193|  42.6k|    ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  194|  42.6k|  }
  195|  70.6k|  if (mod[0] < 3) {
  ------------------
  |  Branch (195:7): [True: 70.2k, False: 361]
  ------------------
  196|  70.2k|    mode_lpc = ixheaacd_get_mode_lpc(2, it_bit_buff, &nk_mode);
  197|  70.2k|    pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
  198|       |
  199|  70.2k|    if (mode_lpc == 0)
  ------------------
  |  Branch (199:9): [True: 47.0k, False: 23.2k]
  ------------------
  200|  47.0k|      pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  201|       |
  202|  70.2k|    ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  203|  70.2k|  }
  204|  70.6k|  if (mod[0] < 2) {
  ------------------
  |  Branch (204:7): [True: 47.1k, False: 23.5k]
  ------------------
  205|  47.1k|    mode_lpc = ixheaacd_get_mode_lpc(1, it_bit_buff, &nk_mode);
  206|  47.1k|    pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
  207|       |
  208|  47.1k|    if (mode_lpc == 0)
  ------------------
  |  Branch (208:9): [True: 11.6k, False: 35.4k]
  ------------------
  209|  11.6k|      pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  210|       |
  211|  47.1k|    if (mode_lpc != 1) ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  ------------------
  |  Branch (211:9): [True: 43.4k, False: 3.69k]
  ------------------
  212|  47.1k|  }
  213|  70.6k|  if (mod[2] < 2) {
  ------------------
  |  Branch (213:7): [True: 63.1k, False: 7.45k]
  ------------------
  214|  63.1k|    mode_lpc = ixheaacd_get_mode_lpc(3, it_bit_buff, &nk_mode);
  215|  63.1k|    pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
  216|       |
  217|  63.1k|    if (mode_lpc == 0)
  ------------------
  |  Branch (217:9): [True: 18.2k, False: 44.9k]
  ------------------
  218|  18.2k|      pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  219|       |
  220|  63.1k|    ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  221|  63.1k|  }
  222|  70.6k|  return;
  223|  70.6k|}
ixheaacd_fac_decoding:
  226|   186k|                           ia_bit_buf_struct *it_bit_buff) {
  227|   186k|  WORD32 i, j, n, qn, nk, kv[8];
  228|   186k|  long code_book_index;
  229|       |
  230|  2.79M|  for (i = 0; i < fac_length; i += 8) {
  ------------------
  |  Branch (230:15): [True: 2.60M, False: 186k]
  ------------------
  231|  2.60M|    qn = 0;
  232|  4.56M|    while (ixheaacd_read_bits_buf(it_bit_buff, 1) == 1) {
  ------------------
  |  Branch (232:12): [True: 1.96M, False: 2.60M]
  ------------------
  233|  1.96M|      qn += 1;
  234|  1.96M|    }
  235|  2.60M|    if (qn != 0) qn += 1;
  ------------------
  |  Branch (235:9): [True: 1.03M, False: 1.57M]
  ------------------
  236|       |
  237|  2.60M|    nk = 0;
  238|  2.60M|    n = qn;
  239|  2.60M|    if (qn > 4) {
  ------------------
  |  Branch (239:9): [True: 38.3k, False: 2.56M]
  ------------------
  240|  38.3k|      nk = (qn - 3) >> 1;
  241|  38.3k|      n = qn - nk * 2;
  242|  38.3k|    }
  243|       |
  244|  2.60M|    code_book_index = ixheaacd_read_bits_buf(it_bit_buff, 4 * n);
  245|       |
  246|  23.4M|    for (j = 0; j < 8; j++) {
  ------------------
  |  Branch (246:17): [True: 20.8M, False: 2.60M]
  ------------------
  247|  20.8M|      kv[j] = ixheaacd_read_bits_buf(it_bit_buff, nk);
  248|  20.8M|    }
  249|       |
  250|  2.60M|    ixheaacd_rotated_gosset_mtx_dec(qn, code_book_index, kv, &fac_prm[k * FAC_LENGTH + i]);
  ------------------
  |  |   33|  2.60M|#define FAC_LENGTH 128
  ------------------
  251|  2.60M|  }
  252|   186k|}
ixheaacd_acelp_decoding:
  260|   142k|                             ia_bit_buf_struct *it_bit_buff, WORD32 chan) {
  261|   142k|  WORD32 sfr, kk;
  262|   142k|  WORD32 nb_subfr = usac_data->num_subfrm;
  263|   142k|  const UWORD8 *ptr_num_bits =
  264|   142k|      &ixheaacd_num_bites_celp_coding[pstr_td_frame_data->acelp_core_mode][0];
  265|       |
  266|   142k|  chan = 0;
  267|   142k|  pstr_td_frame_data->mean_energy[k] = ixheaacd_read_bits_buf(it_bit_buff, 2);
  268|       |
  269|   657k|  for (sfr = 0; sfr < nb_subfr; sfr++) {
  ------------------
  |  Branch (269:17): [True: 515k, False: 142k]
  ------------------
  270|   515k|    kk = k * 4 + sfr;
  271|       |
  272|   515k|    if ((sfr == 0) || ((nb_subfr == 4) && (sfr == 2)))
  ------------------
  |  Branch (272:9): [True: 142k, False: 373k]
  |  Branch (272:24): [True: 267k, False: 105k]
  |  Branch (272:43): [True: 89.2k, False: 178k]
  ------------------
  273|   231k|      pstr_td_frame_data->acb_index[kk] = ixheaacd_read_bits_buf(it_bit_buff, 9);
  274|       |
  275|   283k|    else
  276|   283k|      pstr_td_frame_data->acb_index[kk] = ixheaacd_read_bits_buf(it_bit_buff, 6);
  277|       |
  278|   515k|    pstr_td_frame_data->ltp_filtering_flag[kk] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  279|       |
  280|   515k|    if (pstr_td_frame_data->acelp_core_mode == 5) {
  ------------------
  |  Branch (280:9): [True: 63.8k, False: 451k]
  ------------------
  281|  63.8k|      pstr_td_frame_data->icb_index[kk][0] =
  282|  63.8k|          ixheaacd_read_bits_buf(it_bit_buff, 2);
  283|  63.8k|      pstr_td_frame_data->icb_index[kk][1] =
  284|  63.8k|          ixheaacd_read_bits_buf(it_bit_buff, 2);
  285|  63.8k|      pstr_td_frame_data->icb_index[kk][2] =
  286|  63.8k|          ixheaacd_read_bits_buf(it_bit_buff, 2);
  287|  63.8k|      pstr_td_frame_data->icb_index[kk][3] =
  288|  63.8k|          ixheaacd_read_bits_buf(it_bit_buff, 2);
  289|  63.8k|      pstr_td_frame_data->icb_index[kk][4] =
  290|  63.8k|          ixheaacd_read_bits_buf(it_bit_buff, 14);
  291|  63.8k|      pstr_td_frame_data->icb_index[kk][5] =
  292|  63.8k|          ixheaacd_read_bits_buf(it_bit_buff, 14);
  293|  63.8k|      pstr_td_frame_data->icb_index[kk][6] =
  294|  63.8k|          ixheaacd_read_bits_buf(it_bit_buff, 14);
  295|  63.8k|      pstr_td_frame_data->icb_index[kk][7] =
  296|  63.8k|          ixheaacd_read_bits_buf(it_bit_buff, 14);
  297|   451k|    } else {
  298|   451k|      pstr_td_frame_data->icb_index[kk][0] =
  299|   451k|          ixheaacd_read_bits_buf(it_bit_buff, ptr_num_bits[0]);
  300|   451k|      pstr_td_frame_data->icb_index[kk][1] =
  301|   451k|          ixheaacd_read_bits_buf(it_bit_buff, ptr_num_bits[1]);
  302|   451k|      pstr_td_frame_data->icb_index[kk][2] =
  303|   451k|          ixheaacd_read_bits_buf(it_bit_buff, ptr_num_bits[2]);
  304|   451k|      pstr_td_frame_data->icb_index[kk][3] =
  305|   451k|          ixheaacd_read_bits_buf(it_bit_buff, ptr_num_bits[3]);
  306|   451k|    }
  307|       |
  308|   515k|    pstr_td_frame_data->gains[kk] = ixheaacd_read_bits_buf(it_bit_buff, 7);
  309|   515k|  }
  310|   142k|}
ixheaacd_tcx_coding:
  314|   110k|                         ia_bit_buf_struct *it_bit_buff) {
  315|   110k|  pstr_td_frame_data->noise_factor[k] = ixheaacd_read_bits_buf(it_bit_buff, 3);
  316|       |
  317|   110k|  pstr_td_frame_data->global_gain[k] = ixheaacd_read_bits_buf(it_bit_buff, 7);
  318|       |
  319|   110k|  switch (pstr_td_frame_data->mod[k]) {
  ------------------
  |  Branch (319:11): [True: 110k, False: 5]
  ------------------
  320|  79.7k|    case 1:
  ------------------
  |  Branch (320:5): [True: 79.7k, False: 30.6k]
  ------------------
  321|  79.7k|      pstr_td_frame_data->tcx_lg[k] = usac_data->len_subfrm;
  322|  79.7k|      break;
  323|  30.3k|    case 2:
  ------------------
  |  Branch (323:5): [True: 30.3k, False: 80.0k]
  ------------------
  324|  30.3k|      pstr_td_frame_data->tcx_lg[k] = 2 * (usac_data->len_subfrm);
  325|  30.3k|      break;
  326|    314|    case 3:
  ------------------
  |  Branch (326:5): [True: 314, False: 110k]
  ------------------
  327|    314|      pstr_td_frame_data->tcx_lg[k] = 4 * (usac_data->len_subfrm);
  328|    314|      break;
  329|   110k|  }
  330|       |
  331|   110k|  if (first_tcx_flag) {
  ------------------
  |  Branch (331:7): [True: 64.6k, False: 45.6k]
  ------------------
  332|  64.6k|    if (usac_data->usac_independency_flg) {
  ------------------
  |  Branch (332:9): [True: 22.7k, False: 41.9k]
  ------------------
  333|  22.7k|      pstr_td_frame_data->arith_reset_flag = 1;
  334|  41.9k|    } else {
  335|  41.9k|      pstr_td_frame_data->arith_reset_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  336|  41.9k|    }
  337|  64.6k|  }
  338|       |
  339|   110k|  ixheaacd_arith_data(pstr_td_frame_data, quant, usac_data, it_bit_buff, (first_tcx_flag), k);
  340|       |
  341|   110k|  return;
  342|   110k|}
ixheaacd_lpd_channel_stream:
  346|  77.0k|                                   ia_bit_buf_struct *it_bit_buff, FLOAT32 *synth) {
  347|  77.0k|  WORD32 lpd_mode, k, cnt, ii;
  348|  77.0k|  WORD32 first_tcx_flag;
  349|  77.0k|  WORD32 *quant;
  350|  77.0k|  WORD32 core_mode_last = 0, fac_data_present;
  351|  77.0k|  WORD32 *fac_data;
  352|  77.0k|  WORD32 first_lpd_flag = 0;
  353|  77.0k|  WORD32 short_fac_flag;
  354|  77.0k|  WORD32 bpf_control_info = 0;
  355|  77.0k|  WORD32 chan = usac_data->present_chan;
  356|  77.0k|  WORD32 last_lpd_mode = usac_data->str_tddec[chan]->mode_prev;
  357|  77.0k|  WORD32 err = 0;
  358|  77.0k|  short_fac_flag = 0;
  359|       |
  360|  77.0k|  jmp_buf local;
  361|       |
  362|  77.0k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (362:7): [True: 0, False: 77.0k]
  ------------------
  363|      0|    err = setjmp(local);
  364|      0|  }
  365|       |
  366|  77.0k|  if (usac_data->sampling_rate_idx <= 5 && usac_data->ec_flag) {
  ------------------
  |  Branch (366:7): [True: 9.25k, False: 67.7k]
  |  Branch (366:44): [True: 0, False: 9.25k]
  ------------------
  367|      0|    usac_data->frame_ok = 0;
  368|      0|  }
  369|       |
  370|  77.0k|  if (err == 0 && usac_data->frame_ok == 1) {
  ------------------
  |  Branch (370:7): [True: 77.0k, False: 0]
  |  Branch (370:19): [True: 77.0k, False: 0]
  ------------------
  371|  77.0k|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (371:9): [True: 0, False: 77.0k]
  ------------------
  372|      0|      it_bit_buff->xaac_jmp_buf = &local;
  373|      0|    }
  374|  77.0k|    pstr_td_frame_data->acelp_core_mode = ixheaacd_read_bits_buf(it_bit_buff, 3);
  375|       |
  376|  77.0k|    lpd_mode = ixheaacd_read_bits_buf(it_bit_buff, 5);
  377|       |
  378|  77.0k|    if ((lpd_mode > 25 || lpd_mode < 0)) {
  ------------------
  |  Branch (378:10): [True: 5.98k, False: 71.0k]
  |  Branch (378:27): [True: 0, False: 71.0k]
  ------------------
  379|  5.97k|      if (usac_data->ec_flag) {
  ------------------
  |  Branch (379:11): [True: 0, False: 5.97k]
  ------------------
  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.97k|      } else {
  383|  5.97k|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|  5.97k|#define IA_FATAL_ERROR 0x80000000
  ------------------
  384|  5.97k|      }
  385|  5.97k|    }
  386|       |
  387|  71.0k|    if (lpd_mode == 25) {
  ------------------
  |  Branch (387:9): [True: 314, False: 70.7k]
  ------------------
  388|    314|      pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] = pstr_td_frame_data->mod[2] =
  389|    314|          pstr_td_frame_data->mod[3] = 3;
  390|  70.7k|    } else if (lpd_mode == 24) {
  ------------------
  |  Branch (390:16): [True: 527, False: 70.2k]
  ------------------
  391|    527|      pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] = pstr_td_frame_data->mod[2] =
  392|    527|          pstr_td_frame_data->mod[3] = 2;
  393|  70.2k|    } else {
  394|  70.2k|      if (lpd_mode >= 20) {
  ------------------
  |  Branch (394:11): [True: 6.62k, False: 63.5k]
  ------------------
  395|  6.62k|        pstr_td_frame_data->mod[0] = lpd_mode & 1;
  396|  6.62k|        pstr_td_frame_data->mod[1] = (lpd_mode >> 1) & 1;
  397|  6.62k|        pstr_td_frame_data->mod[2] = pstr_td_frame_data->mod[3] = 2;
  398|  63.5k|      } else if (lpd_mode >= 16) {
  ------------------
  |  Branch (398:18): [True: 22.6k, False: 40.9k]
  ------------------
  399|  22.6k|        pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] = 2;
  400|  22.6k|        pstr_td_frame_data->mod[2] = lpd_mode & 1;
  401|  22.6k|        pstr_td_frame_data->mod[3] = (lpd_mode >> 1) & 1;
  402|  40.9k|      } else {
  403|  40.9k|        pstr_td_frame_data->mod[0] = lpd_mode & 1;
  404|  40.9k|        pstr_td_frame_data->mod[1] = (lpd_mode >> 1) & 1;
  405|  40.9k|        pstr_td_frame_data->mod[2] = (lpd_mode >> 2) & 1;
  406|  40.9k|        pstr_td_frame_data->mod[3] = (lpd_mode >> 3) & 1;
  407|  40.9k|      }
  408|  70.2k|    }
  409|       |
  410|  71.0k|    bpf_control_info = ixheaacd_read_bits_buf(it_bit_buff, 1);
  411|       |
  412|  71.0k|    core_mode_last = ixheaacd_read_bits_buf(it_bit_buff, 1);
  413|       |
  414|  71.0k|    fac_data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  415|       |
  416|  71.0k|    first_lpd_flag = (core_mode_last == 0) ? 1 : 0;
  ------------------
  |  Branch (416:22): [True: 42.8k, False: 28.1k]
  ------------------
  417|       |
  418|  71.0k|    quant = pstr_td_frame_data->x_tcx_invquant;
  419|  71.0k|    first_tcx_flag = 1;
  420|  71.0k|    k = 0;
  421|   323k|    while (k < 4) {
  ------------------
  |  Branch (421:12): [True: 252k, False: 71.0k]
  ------------------
  422|   252k|      if (k == 0) {
  ------------------
  |  Branch (422:11): [True: 71.0k, False: 181k]
  ------------------
  423|  71.0k|        if ((core_mode_last == 1) && (fac_data_present == 1))
  ------------------
  |  Branch (423:13): [True: 28.1k, False: 42.8k]
  |  Branch (423:38): [True: 12.0k, False: 16.1k]
  ------------------
  424|  12.0k|          ixheaacd_fac_decoding((usac_data->len_subfrm) / 2, k, pstr_td_frame_data->fac,
  425|  12.0k|                                it_bit_buff);
  426|   181k|      } else {
  427|   181k|        if (((last_lpd_mode == 0) && (pstr_td_frame_data->mod[k] > 0)) ||
  ------------------
  |  Branch (427:14): [True: 96.7k, False: 84.6k]
  |  Branch (427:38): [True: 30.8k, False: 65.8k]
  ------------------
  428|   150k|            ((last_lpd_mode > 0) && (pstr_td_frame_data->mod[k] == 0)))
  ------------------
  |  Branch (428:14): [True: 84.6k, False: 65.8k]
  |  Branch (428:37): [True: 55.4k, False: 29.1k]
  ------------------
  429|  86.3k|          ixheaacd_fac_decoding((usac_data->len_subfrm) / 2, k, pstr_td_frame_data->fac,
  430|  86.3k|                                it_bit_buff);
  431|   181k|      }
  432|       |
  433|   252k|      if (pstr_td_frame_data->mod[k] == 0) {
  ------------------
  |  Branch (433:11): [True: 142k, False: 110k]
  ------------------
  434|   142k|        ixheaacd_acelp_decoding(k, usac_data, pstr_td_frame_data, it_bit_buff, chan);
  435|   142k|        last_lpd_mode = 0;
  436|   142k|        pstr_td_frame_data->tcx_lg[k] = 0;
  437|   142k|        k += 1;
  438|   142k|      } else {
  439|   110k|        ixheaacd_tcx_coding(usac_data, quant, k, first_tcx_flag, pstr_td_frame_data, it_bit_buff);
  440|   110k|        last_lpd_mode = pstr_td_frame_data->mod[k];
  441|   110k|        quant += pstr_td_frame_data->tcx_lg[k];
  442|       |
  443|   110k|        cnt = 1 << (pstr_td_frame_data->mod[k] - 1);
  444|       |
  445|   141k|        for (ii = 0; ii < cnt - 1; ii++) pstr_td_frame_data->tcx_lg[k + 1 + ii] = 0;
  ------------------
  |  Branch (445:22): [True: 31.1k, False: 110k]
  ------------------
  446|       |
  447|   110k|        k += cnt;
  448|   110k|        first_tcx_flag = 0;
  449|   110k|      }
  450|   252k|    }
  451|       |
  452|  71.0k|    ixheaacd_lpc_data(first_lpd_flag, pstr_td_frame_data->mod, pstr_td_frame_data, it_bit_buff);
  453|       |
  454|  71.0k|    if ((core_mode_last == 0) && (fac_data_present == 1)) {
  ------------------
  |  Branch (454:9): [True: 42.5k, False: 28.4k]
  |  Branch (454:34): [True: 10.6k, False: 31.9k]
  ------------------
  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.78k, False: 4.83k]
  ------------------
  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|  71.0k|    if (fac_data_present == 0) {
  ------------------
  |  Branch (472:9): [True: 47.9k, False: 23.0k]
  ------------------
  473|  47.9k|      memset(&pstr_td_frame_data->fac_data[0], 0, sizeof(pstr_td_frame_data->fac_data));
  474|  47.9k|    }
  475|  71.0k|    if (usac_data->ec_flag && usac_data->frame_ok) {
  ------------------
  |  Branch (475:9): [True: 0, False: 71.0k]
  |  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|  71.0k|  } else {
  481|      0|    usac_data->frame_ok = 0;
  482|      0|  }
  483|       |
  484|  71.0k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (484:7): [True: 0, False: 71.0k]
  ------------------
  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|  71.0k|  if (usac_data->frame_ok) {
  ------------------
  |  Branch (496:7): [True: 70.5k, False: 547]
  ------------------
  497|  70.5k|    err = ixheaacd_lpd_dec(usac_data, usac_data->str_tddec[chan], pstr_td_frame_data, synth,
  498|  70.5k|                           first_lpd_flag, short_fac_flag, bpf_control_info);
  499|  70.5k|  } else {
  500|    547|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (500:9): [True: 0, False: 547]
  ------------------
  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|    547|  }
  507|       |
  508|  71.0k|  return (err);
  509|  77.0k|}
ixheaacd_tw_buff_update:
  512|  77.0k|                               ia_usac_lpd_decoder_handle st) {
  513|  77.0k|  WORD32 *p_ioverlap = usac_data->overlap_data_ptr[i];
  514|  77.0k|  WORD32 td_frame_prev = usac_data->td_frame_prev[i];
  515|  77.0k|  WORD32 window_sequence_last = usac_data->window_sequence_last[i];
  516|  77.0k|  WORD32 tw_mdct = usac_data->tw_mdct[0];
  517|       |
  518|  77.0k|  if (!td_frame_prev) {
  ------------------
  |  Branch (518:7): [True: 16.2k, False: 60.8k]
  ------------------
  519|  16.2k|    if (tw_mdct) {
  ------------------
  |  Branch (519:9): [True: 0, False: 16.2k]
  ------------------
  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|  16.2k|    } else {
  526|  16.2k|      ixheaacd_reset_acelp_data_fix(usac_data, st, p_ioverlap,
  527|  16.2k|                                    (window_sequence_last == EIGHT_SHORT_SEQUENCE), 0);
  ------------------
  |  |  102|  16.2k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  528|  16.2k|    }
  529|  16.2k|  }
  530|  77.0k|  return 0;
  531|  77.0k|}
ixheaacd_td_frm_dec:
  533|  76.4k|VOID ixheaacd_td_frm_dec(ia_usac_data_struct *usac_data, WORD32 k, WORD32 mod0) {
  534|  76.4k|  WORD32 i;
  535|  76.4k|  WORD32 lfac = 0;
  536|       |
  537|  76.4k|  WORD32 *p_out_idata = usac_data->output_data_ptr[k];
  538|  76.4k|  WORD32 *p_ioverlap = usac_data->overlap_data_ptr[k];
  539|  76.4k|  WORD32 nlong = usac_data->ccfl;
  540|  76.4k|  WORD32 window_sequence_last = usac_data->window_sequence_last[k];
  541|  76.4k|  WORD32 td_frame_prev = usac_data->td_frame_prev[k];
  542|  76.4k|  WORD32 tw_mdct = usac_data->tw_mdct[0];
  543|  76.4k|  WORD32 nshort = nlong / 8;
  544|  76.4k|  WORD32 *p_in_idata = p_out_idata;
  545|       |
  546|  76.4k|  if (!td_frame_prev) {
  ------------------
  |  Branch (546:7): [True: 15.9k, False: 60.5k]
  ------------------
  547|  15.9k|    if (window_sequence_last == EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  15.9k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (547:9): [True: 6.53k, False: 9.39k]
  ------------------
  548|  6.53k|      lfac = nshort / 2;
  549|  9.39k|    } else {
  550|  9.39k|      lfac = nshort;
  551|  9.39k|    }
  552|  15.9k|  }
  553|       |
  554|  76.4k|  if (!td_frame_prev && (mod0 == 0)) {
  ------------------
  |  Branch (554:7): [True: 15.9k, False: 60.5k]
  |  Branch (554:25): [True: 6.42k, False: 9.51k]
  ------------------
  555|  2.09M|    for (i = 0; i < (nlong / 2) - lfac - (LEN_SUBFR); i++) {
  ------------------
  |  |  118|  2.09M|#define LEN_SUBFR 64
  ------------------
  |  Branch (555:17): [True: 2.09M, False: 6.42k]
  ------------------
  556|  2.09M|      p_in_idata[i] = 0;
  557|  2.09M|    }
  558|  70.0k|  } else if (!td_frame_prev && (mod0 > 0)) {
  ------------------
  |  Branch (558:14): [True: 9.51k, False: 60.5k]
  |  Branch (558:32): [True: 9.51k, False: 0]
  ------------------
  559|  3.76M|    for (i = 0; i < (nlong / 2) - lfac; i++) {
  ------------------
  |  Branch (559:17): [True: 3.76M, False: 9.51k]
  ------------------
  560|  3.76M|      p_in_idata[i] = 0;
  561|  3.76M|    }
  562|  9.51k|  }
  563|       |
  564|  76.4k|  if (tw_mdct) {
  ------------------
  |  Branch (564:7): [True: 0, False: 76.4k]
  ------------------
  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|  76.4k|  } else {
  580|  76.4k|    if (!td_frame_prev && (mod0 == 0)) {
  ------------------
  |  Branch (580:9): [True: 15.9k, False: 60.5k]
  |  Branch (580:27): [True: 6.42k, False: 9.51k]
  ------------------
  581|  1.05M|      for (i = (nlong / 2) - lfac - (LEN_SUBFR); i < nlong / 2; i++) {
  ------------------
  |  |  118|  6.42k|#define LEN_SUBFR 64
  ------------------
  |  Branch (581:50): [True: 1.04M, False: 6.42k]
  ------------------
  582|  1.04M|        p_ioverlap[i] = 0;
  583|  1.04M|      }
  584|  70.0k|    } else if (!td_frame_prev) {
  ------------------
  |  Branch (584:16): [True: 9.51k, False: 60.5k]
  ------------------
  585|  5.60M|      for (i = (nlong / 2) - lfac; i < nlong; i++) {
  ------------------
  |  Branch (585:36): [True: 5.59M, False: 9.51k]
  ------------------
  586|  5.59M|        p_ioverlap[i] = 0;
  587|  5.59M|      }
  588|  9.51k|    }
  589|  71.1M|    for (i = 0; i < nlong; i++) {
  ------------------
  |  Branch (589:17): [True: 71.0M, False: 76.4k]
  ------------------
  590|  71.0M|      p_out_idata[i] = ixheaac_add32_sat(p_ioverlap[i] << 1, p_in_idata[i]);
  591|  71.0M|      p_ioverlap[i] = 0;
  592|  71.0M|    }
  593|  76.4k|  }
  594|  76.4k|}

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

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

ixheaacd_preemphsis_tool_float:
   50|   714k|                                    FLOAT32 mem) {
   51|   714k|  WORD32 i;
   52|  95.5M|  for (i = len - 1; i > 0; i--) {
  ------------------
  |  Branch (52:21): [True: 94.8M, False: 714k]
  ------------------
   53|  94.8M|    signal[i] = signal[i] - mu * signal[i - 1];
   54|  94.8M|  }
   55|   714k|  signal[0] -= mu * mem;
   56|   714k|  return;
   57|   714k|}
ixheaacd_deemphsis_tool:
   59|   282k|VOID ixheaacd_deemphsis_tool(FLOAT32 *signal, WORD32 len, FLOAT32 mem) {
   60|   282k|  WORD32 i;
   61|   282k|  signal[0] = signal[0] + PREEMPH_FILT_FAC * mem;
  ------------------
  |  |   61|   282k|#define PREEMPH_FILT_FAC 0.68f
  ------------------
   62|  49.2M|  for (i = 1; i < len; i++) {
  ------------------
  |  Branch (62:15): [True: 48.9M, False: 282k]
  ------------------
   63|  48.9M|    signal[i] = signal[i] + PREEMPH_FILT_FAC * signal[i - 1];
  ------------------
  |  |   61|  48.9M|#define PREEMPH_FILT_FAC 0.68f
  ------------------
   64|  48.9M|  }
   65|   282k|  return;
   66|   282k|}
ixheaacd_lpc_wt_synthesis_tool:
   68|  63.1k|VOID ixheaacd_lpc_wt_synthesis_tool(FLOAT32 a[], FLOAT32 x[], WORD32 l) {
   69|  63.1k|  FLOAT32 s;
   70|  63.1k|  WORD32 i, j;
   71|       |
   72|  7.44M|  for (i = 0; i < l; i++) {
  ------------------
  |  Branch (72:15): [True: 7.38M, False: 63.1k]
  ------------------
   73|  7.38M|    s = x[i];
   74|  36.9M|    for (j = 1; j <= ORDER; j += 4) {
  ------------------
  |  |   30|  36.9M|#define ORDER 16
  ------------------
  |  Branch (74:17): [True: 29.5M, False: 7.38M]
  ------------------
   75|  29.5M|      s -= (a[j] * ixheaacd_gamma_table[j]) * x[i - j];
   76|  29.5M|      s -= (a[j + 1] * ixheaacd_gamma_table[j + 1]) * x[i - (j + 1)];
   77|  29.5M|      s -= (a[j + 2] * ixheaacd_gamma_table[j + 2]) * x[i - (j + 2)];
   78|  29.5M|      s -= (a[j + 3] * ixheaacd_gamma_table[j + 3]) * x[i - (j + 3)];
   79|  29.5M|    }
   80|  7.38M|    x[i] = s;
   81|  7.38M|  }
   82|       |
   83|  63.1k|  return;
   84|  63.1k|}
ixheaacd_synthesis_tool_float:
   87|   570k|                                   WORD32 l, FLOAT32 mem[]) {
   88|   570k|  FLOAT32 buf[LEN_FRAME * 2];
   89|   570k|  FLOAT32 s;
   90|   570k|  FLOAT32 *yy;
   91|   570k|  WORD32 i, j;
   92|   570k|  memcpy(buf, mem, ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|   570k|#define ORDER 16
  ------------------
   93|   570k|  yy = &buf[ORDER];
  ------------------
  |  |   30|   570k|#define ORDER 16
  ------------------
   94|  46.8M|  for (i = 0; i < l; i++) {
  ------------------
  |  Branch (94:15): [True: 46.2M, False: 570k]
  ------------------
   95|  46.2M|    s = x[i];
   96|   231M|    for (j = 1; j <= ORDER; j += 4) {
  ------------------
  |  |   30|   231M|#define ORDER 16
  ------------------
  |  Branch (96:17): [True: 185M, False: 46.2M]
  ------------------
   97|   185M|      s -= a[j] * yy[i - j];
   98|   185M|      s -= a[j + 1] * yy[i - (j + 1)];
   99|   185M|      s -= a[j + 2] * yy[i - (j + 2)];
  100|   185M|      s -= a[j + 3] * yy[i - (j + 3)];
  101|   185M|    }
  102|  46.2M|    yy[i] = s;
  103|  46.2M|    y[i] = s;
  104|  46.2M|  }
  105|       |
  106|   570k|  return;
  107|   570k|}
ixheaacd_synthesis_tool_float1:
  109|   157k|VOID ixheaacd_synthesis_tool_float1(FLOAT32 a[], FLOAT32 x[], WORD32 l) {
  110|   157k|  FLOAT32 s;
  111|   157k|  WORD32 i, j;
  112|  19.9M|  for (i = 0; i < l; i++) {
  ------------------
  |  Branch (112:15): [True: 19.8M, False: 157k]
  ------------------
  113|  19.8M|    s = x[i];
  114|  99.0M|    for (j = 1; j <= ORDER; j += 4) {
  ------------------
  |  |   30|  99.0M|#define ORDER 16
  ------------------
  |  Branch (114:17): [True: 79.2M, False: 19.8M]
  ------------------
  115|  79.2M|      s -= a[j] * x[i - j];
  116|  79.2M|      s -= a[j + 1] * x[i - (j + 1)];
  117|  79.2M|      s -= a[j + 2] * x[i - (j + 2)];
  118|  79.2M|      s -= a[j + 3] * x[i - (j + 3)];
  119|  79.2M|    }
  120|  19.8M|    x[i] = s;
  121|  19.8M|  }
  122|       |
  123|   157k|  return;
  124|   157k|}
ixheaacd_residual_tool_float:
  143|   262k|                                  WORD32 loop_count) {
  144|   262k|  FLOAT32 s;
  145|   262k|  WORD32 i, j;
  146|   624k|  for (j = 0; j < loop_count; j++) {
  ------------------
  |  Branch (146:15): [True: 361k, False: 262k]
  ------------------
  147|  48.1M|    for (i = 0; i < l; i++) {
  ------------------
  |  Branch (147:17): [True: 47.7M, False: 361k]
  ------------------
  148|  47.7M|      s = x[i];
  149|  47.7M|      s += a[1] * x[i - 1];
  150|  47.7M|      s += a[2] * x[i - 2];
  151|  47.7M|      s += a[3] * x[i - 3];
  152|  47.7M|      s += a[4] * x[i - 4];
  153|  47.7M|      s += a[5] * x[i - 5];
  154|  47.7M|      s += a[6] * x[i - 6];
  155|  47.7M|      s += a[7] * x[i - 7];
  156|  47.7M|      s += a[8] * x[i - 8];
  157|  47.7M|      s += a[9] * x[i - 9];
  158|  47.7M|      s += a[10] * x[i - 10];
  159|  47.7M|      s += a[11] * x[i - 11];
  160|  47.7M|      s += a[12] * x[i - 12];
  161|  47.7M|      s += a[13] * x[i - 13];
  162|  47.7M|      s += a[14] * x[i - 14];
  163|  47.7M|      s += a[15] * x[i - 15];
  164|  47.7M|      s += a[16] * x[i - 16];
  165|  47.7M|      y[i] = s;
  166|  47.7M|    }
  167|   361k|    a += 17;
  168|   361k|    x += l;
  169|   361k|    y += l;
  170|   361k|  }
  171|   262k|  return;
  172|   262k|}
ixheaacd_residual_tool_float1:
  175|  28.7k|                                   WORD32 loop_count) {
  176|  28.7k|  FLOAT32 s;
  177|  28.7k|  WORD32 i, j;
  178|   236k|  for (j = 0; j < loop_count; j++) {
  ------------------
  |  Branch (178:15): [True: 208k, False: 28.7k]
  ------------------
  179|  13.5M|    for (i = 0; i < l; i++) {
  ------------------
  |  Branch (179:17): [True: 13.3M, False: 208k]
  ------------------
  180|  13.3M|      s = x[i];
  181|  13.3M|      s += a[1] * x[i - 1];
  182|  13.3M|      s += a[2] * x[i - 2];
  183|  13.3M|      s += a[3] * x[i - 3];
  184|  13.3M|      s += a[4] * x[i - 4];
  185|  13.3M|      s += a[5] * x[i - 5];
  186|  13.3M|      s += a[6] * x[i - 6];
  187|  13.3M|      s += a[7] * x[i - 7];
  188|  13.3M|      s += a[8] * x[i - 8];
  189|  13.3M|      s += a[9] * x[i - 9];
  190|  13.3M|      s += a[10] * x[i - 10];
  191|  13.3M|      s += a[11] * x[i - 11];
  192|  13.3M|      s += a[12] * x[i - 12];
  193|  13.3M|      s += a[13] * x[i - 13];
  194|  13.3M|      s += a[14] * x[i - 14];
  195|  13.3M|      s += a[15] * x[i - 15];
  196|  13.3M|      s += a[16] * x[i - 16];
  197|  13.3M|      y[i] = s;
  198|  13.3M|    }
  199|   208k|    x += l;
  200|   208k|    y += l;
  201|   208k|  }
  202|  28.7k|  return;
  203|  28.7k|}

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

ixheaacd_dec_mem_api:
  170|   235k|                                  WORD32 i_cmd, WORD32 i_idx, VOID *pv_value) {
  171|   235k|  pUWORD32 pui_value = pv_value;
  172|       |
  173|   235k|  if (i_idx < 0 || i_idx >= IA_ENHAACPDEC_NUM_MEMTABS) {
  ------------------
  |  |  121|   235k|#define IA_ENHAACPDEC_NUM_MEMTABS (4)
  ------------------
  |  Branch (173:7): [True: 0, False: 235k]
  |  Branch (173:20): [True: 0, False: 235k]
  ------------------
  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|   235k|  if (i_cmd == IA_API_CMD_SET_MEM_PTR) {
  ------------------
  |  |   53|   235k|#define IA_API_CMD_SET_MEM_PTR 0x0016
  ------------------
  |  Branch (177:7): [True: 58.9k, False: 176k]
  ------------------
  178|  58.9k|    if (pv_value == 0) {
  ------------------
  |  Branch (178:9): [True: 0, False: 58.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|  58.9k|    if (((SIZE_T)pv_value %
  ------------------
  |  Branch (181:9): [True: 0, False: 58.9k]
  ------------------
  182|  58.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|  58.9k|    p_obj_exhaacplus_dec->pp_mem_aac[i_idx] = pv_value;
  186|  58.9k|    memset(p_obj_exhaacplus_dec->pp_mem_aac[i_idx], 0,
  187|  58.9k|           p_obj_exhaacplus_dec->p_mem_info_aac[i_idx].ui_size);
  188|       |
  189|  58.9k|    if (i_idx == IA_ENHAACPLUS_DEC_PERSIST_IDX) {
  ------------------
  |  |   32|  58.9k|#define IA_ENHAACPLUS_DEC_PERSIST_IDX (0)
  ------------------
  |  Branch (189:9): [True: 14.7k, False: 44.2k]
  ------------------
  190|  14.7k|      pUWORD8 p_temp = pv_value;
  191|  14.7k|      UWORD32 *meminfo =
  192|  14.7k|          (UWORD32 *)p_obj_exhaacplus_dec->p_mem_info_aac + i_idx;
  193|  14.7k|      UWORD32 pers_size = meminfo[0];
  194|  14.7k|      p_temp = p_temp + pers_size -
  195|  14.7k|               (IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_dec_data_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  196|  14.7k|                IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_audio_specific_config_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  197|  14.7k|                IXHEAAC_GET_SIZE_ALIGNED(MAX_HEADER_BUF_SIZE, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  198|  14.7k|      p_obj_exhaacplus_dec->p_state_aac = pv_value;
  199|  14.7k|      memset(p_obj_exhaacplus_dec->p_state_aac, 0,
  200|  14.7k|             IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_state_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  201|  14.7k|      p_obj_exhaacplus_dec->p_state_aac->pstr_dec_data = p_temp;
  202|  14.7k|      p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config =
  203|  14.7k|          p_temp + IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_dec_data_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  204|  14.7k|      p_obj_exhaacplus_dec->p_state_aac->header_ptr =
  205|  14.7k|          p_temp + IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_dec_data_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  206|  14.7k|          IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_audio_specific_config_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  207|  14.7k|    }
  208|       |
  209|   176k|  } else {
  210|   176k|    UWORD32 *meminfo =
  211|   176k|        (UWORD32 *)(p_obj_exhaacplus_dec->p_mem_info_aac + i_idx);
  212|   176k|    *pui_value = *(meminfo + (i_cmd - IA_API_CMD_GET_MEM_INFO_SIZE));
  ------------------
  |  |   48|   176k|#define IA_API_CMD_GET_MEM_INFO_SIZE 0x0011
  ------------------
  213|   176k|  }
  214|       |
  215|   235k|  return IA_NO_ERROR;
  ------------------
  |  |   23|   235k|#define IA_NO_ERROR 0x00000000
  ------------------
  216|   235k|}
ixheaacd_updatebytesconsumed:
  232|   206k|    struct ia_bit_buf_struct *it_bit_buff) {
  233|   206k|  p_state_enhaacplus_dec->i_bytes_consumed =
  234|   206k|      (WORD32)(it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base);
  235|   206k|  if ((p_state_enhaacplus_dec->i_bytes_consumed == 0) &&
  ------------------
  |  Branch (235:7): [True: 2.32k, False: 204k]
  ------------------
  236|  2.32k|      (it_bit_buff->cnt_bits == 0)) {
  ------------------
  |  Branch (236:7): [True: 0, False: 2.32k]
  ------------------
  237|      0|    p_state_enhaacplus_dec->i_bytes_consumed =
  238|      0|        p_state_enhaacplus_dec->ui_in_bytes;
  239|      0|  }
  240|   206k|  if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (240:7): [True: 145, False: 206k]
  ------------------
  241|    145|    p_state_enhaacplus_dec->i_bytes_consumed = 0;
  242|    145|    p_state_enhaacplus_dec->ui_out_bytes = 0;
  243|    145|    p_state_enhaacplus_dec->ui_mps_out_bytes = 0;
  244|    145|    p_state_enhaacplus_dec->b_n_raw_data_blk = 0;
  245|    145|  }
  246|   206k|}
ixheaacd_readifadts:
  268|  35.6k|                           ia_adts_header_struct *adts) {
  269|  35.6k|  WORD error;
  270|       |
  271|  35.6k|  if ((error = ixheaacd_find_syncword(adts, it_bit_buff)) != 0) {
  ------------------
  |  Branch (271:7): [True: 710, False: 34.9k]
  ------------------
  272|    710|    ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
  273|    710|    return IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_SYNC_LOST;
  ------------------
  |  |   94|    710|#define IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_SYNC_LOST 0x00001800
  ------------------
  274|    710|  }
  275|  34.9k|  if ((error = ixheaacd_check_if_adts(
  ------------------
  |  Branch (275:7): [True: 109, False: 34.8k]
  ------------------
  276|  34.9k|           adts, it_bit_buff,
  277|  34.9k|           p_state_enhaacplus_dec->p_config->ui_max_channels)) != 0) {
  278|    109|    p_state_enhaacplus_dec->i_bytes_consumed = 1;
  279|       |
  280|    109|    if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (280:9): [True: 0, False: 109]
  ------------------
  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|    109|    return IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_SYNC_LOST;
  ------------------
  |  |   94|    109|#define IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_SYNC_LOST 0x00001800
  ------------------
  288|    109|  }
  289|  34.8k|  p_state_enhaacplus_dec->b_n_raw_data_blk =
  290|  34.8k|      (WORD8)(adts->no_raw_data_blocks + 1);
  291|  34.8k|  return 0;
  292|  34.9k|}
ixheaacd_allocate_sbr_scr:
  339|   215k|                               UWORD8 slot_pos, UWORD8 num_ch) {
  340|   215k|  WORD32 j, i;
  341|   215k|  sbr_scratch_struct->ptr_work_buf_core = base_scratch_ptr;
  342|       |
  343|   215k|  if (p_qshift_arr != NULL && *p_qshift_arr != LD_OBJ) {
  ------------------
  |  |  125|  42.5k|#define LD_OBJ -2
  ------------------
  |  Branch (343:7): [True: 42.5k, False: 173k]
  |  Branch (343:31): [True: 34.2k, False: 8.27k]
  ------------------
  344|  34.2k|    WORD32 *tmp_buf = (WORD32 *)output_ptr;
  345|       |
  346|  53.0k|    for (j = 1; j < num_ch; j++) {
  ------------------
  |  Branch (346:17): [True: 18.7k, False: 34.2k]
  ------------------
  347|  18.7k|      if ((*p_qshift_arr + j) == 0)
  ------------------
  |  Branch (347:11): [True: 0, False: 18.7k]
  ------------------
  348|      0|        *(p_qshift_arr + j) = *(p_qshift_arr + j - 1);
  349|  18.7k|    }
  350|       |
  351|  34.2k|    if (total_channels > 2) {
  ------------------
  |  Branch (351:9): [True: 122, False: 34.1k]
  ------------------
  352|    282|      for (j = 0; j < num_ch; j++) {
  ------------------
  |  Branch (352:19): [True: 160, False: 122]
  ------------------
  353|   164k|        for (i = 0; i < 1024; i++) {
  ------------------
  |  Branch (353:21): [True: 163k, False: 160]
  ------------------
  354|   163k|          *((WORD16 *)tmp_buf + slot_pos + total_channels * i + j) =
  355|   163k|              ixheaac_round16(ixheaac_shl32_sat(
  356|   163k|                  *(tmp_buf + slot_pos + total_channels * i + j),
  357|   163k|                  *(p_qshift_arr + j)));
  358|   163k|        }
  359|    160|      }
  360|  34.1k|    } else {
  361|  86.9k|      for (j = 0; j < num_ch; j++) {
  ------------------
  |  Branch (361:19): [True: 52.8k, False: 34.1k]
  ------------------
  362|  54.1M|        for (i = 0; i < 1024; i++) {
  ------------------
  |  Branch (362:21): [True: 54.1M, False: 52.8k]
  ------------------
  363|  54.1M|          *((WORD16 *)tmp_buf + total_channels * i + j) =
  364|  54.1M|              ixheaac_round16(ixheaac_shl32_sat(
  365|  54.1M|                  *(tmp_buf + total_channels * i + j), *(p_qshift_arr + j)));
  366|  54.1M|        }
  367|  52.8k|      }
  368|  34.1k|    }
  369|  34.2k|  }
  370|   215k|}
ixheaacd_dec_api:
  382|  3.57M|                              WORD32 i_idx, pVOID pv_value) {
  383|  3.57M|  ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec = p_ia_xheaac_dec_obj;
  384|  3.57M|  pUWORD32 pui_value = pv_value;
  385|  3.57M|  pWORD32 pui_value_signed = pv_value;
  386|  3.57M|  pWORD8 pb_value = pv_value;
  387|  3.57M|  pVOID *pp_value = (pVOID *)pv_value;
  388|  3.57M|  float *pf_value = pv_value;
  389|       |
  390|  3.57M|  if ((i_cmd != IA_API_CMD_GET_API_SIZE) &&
  ------------------
  |  |   28|  3.57M|#define IA_API_CMD_GET_API_SIZE 0x0002
  ------------------
  |  Branch (390:7): [True: 3.55M, False: 14.7k]
  ------------------
  391|  3.55M|      (i_cmd != IA_API_CMD_GET_LIB_ID_STRINGS)) {
  ------------------
  |  |   26|  3.55M|#define IA_API_CMD_GET_LIB_ID_STRINGS 0x0001
  ------------------
  |  Branch (391:7): [True: 3.55M, False: 0]
  ------------------
  392|  3.55M|    if (p_ia_xheaac_dec_obj == 0) {
  ------------------
  |  Branch (392:9): [True: 0, False: 3.55M]
  ------------------
  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.55M|    if (((SIZE_T)p_ia_xheaac_dec_obj & 3) != 0) {
  ------------------
  |  Branch (395:9): [True: 0, False: 3.55M]
  ------------------
  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.55M|  }
  399|       |
  400|  3.57M|  switch (i_cmd) {
  ------------------
  |  Branch (400:11): [True: 235k, False: 3.33M]
  ------------------
  401|  58.9k|    case IA_API_CMD_GET_MEM_INFO_SIZE:
  ------------------
  |  |   48|  58.9k|#define IA_API_CMD_GET_MEM_INFO_SIZE 0x0011
  ------------------
  |  Branch (401:5): [True: 58.9k, False: 3.51M]
  ------------------
  402|   117k|    case IA_API_CMD_GET_MEM_INFO_ALIGNMENT:
  ------------------
  |  |   49|   117k|#define IA_API_CMD_GET_MEM_INFO_ALIGNMENT 0x0012
  ------------------
  |  Branch (402:5): [True: 58.9k, False: 3.51M]
  ------------------
  403|   176k|    case IA_API_CMD_GET_MEM_INFO_TYPE:
  ------------------
  |  |   50|   176k|#define IA_API_CMD_GET_MEM_INFO_TYPE 0x0013
  ------------------
  |  Branch (403:5): [True: 58.9k, False: 3.51M]
  ------------------
  404|   235k|    case IA_API_CMD_SET_MEM_PTR: {
  ------------------
  |  |   53|   235k|#define IA_API_CMD_SET_MEM_PTR 0x0016
  ------------------
  |  Branch (404:5): [True: 58.9k, False: 3.51M]
  ------------------
  405|   235k|      return ixheaacd_dec_mem_api(p_ia_xheaac_dec_obj, i_cmd, i_idx,
  406|   235k|                                  pv_value);
  407|   176k|    }
  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.57M]
  ------------------
  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.57M]
  ------------------
  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.57M]
  ------------------
  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.57M]
  ------------------
  413|      0|      return ixheaacd_dec_table_api(p_ia_xheaac_dec_obj, i_cmd, i_idx,
  414|      0|                                    pv_value);
  415|      0|    }
  416|  3.57M|  };
  417|       |
  418|  3.33M|  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.33M]
  ------------------
  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.7k|    case IA_API_CMD_GET_API_SIZE: {
  ------------------
  |  |   28|  14.7k|#define IA_API_CMD_GET_API_SIZE 0x0002
  ------------------
  |  Branch (442:5): [True: 14.7k, False: 3.32M]
  ------------------
  443|  14.7k|      *pui_value = sizeof(ia_exhaacplus_dec_api_struct);
  444|  14.7k|      break;
  445|      0|    }
  446|  77.4k|    case IA_API_CMD_INIT: {
  ------------------
  |  |   29|  77.4k|#define IA_API_CMD_INIT 0x0003
  ------------------
  |  Branch (446:5): [True: 77.4k, False: 3.26M]
  ------------------
  447|  77.4k|      switch (i_idx) {
  448|  14.7k|        case IA_CMD_TYPE_INIT_API_PRE_CONFIG_PARAMS: {
  ------------------
  |  |   74|  14.7k|#define IA_CMD_TYPE_INIT_API_PRE_CONFIG_PARAMS 0x0100
  ------------------
  |  Branch (448:9): [True: 14.7k, False: 62.6k]
  ------------------
  449|  14.7k|          memset(p_obj_exhaacplus_dec, 0, sizeof(*p_obj_exhaacplus_dec));
  450|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz = 16;
  451|  14.7k|          p_obj_exhaacplus_dec->aac_config.flag_downmix = 0;
  452|  14.7k|          p_obj_exhaacplus_dec->aac_config.flag_08khz_out = 0;
  453|  14.7k|          p_obj_exhaacplus_dec->aac_config.flag_16khz_out = 0;
  454|  14.7k|          p_obj_exhaacplus_dec->aac_config.flag_to_stereo = 0;
  455|  14.7k|          p_obj_exhaacplus_dec->aac_config.down_sample_flag = 0;
  456|  14.7k|          p_obj_exhaacplus_dec->aac_config.header_dec_done = 0;
  457|  14.7k|          p_obj_exhaacplus_dec->aac_config.frame_status = 1;
  458|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_mp4_flag = 0;
  459|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_disable_sync = 0;
  460|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_auto_sbr_upsample = 1;
  461|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_samp_freq = 0;
  462|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_frame_size = 0;
  463|       |
  464|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_n_channels = 2;
  465|  14.7k|          p_obj_exhaacplus_dec->aac_config.i_channel_mask = 3;
  466|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_channel_mode = 3;
  467|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 0;
  468|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_effect_type = 0;
  469|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_target_loudness = -24;
  470|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_loud_norm_flag = 0;
  471|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_hq_esbr = 0;
  472|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_enh_sbr = 1;
  473|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_enh_sbr_ps = 0;
  474|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_pce_found_in_hdr = 0;
  475|  14.7k|          p_obj_exhaacplus_dec->aac_config.loas_present = 0;
  476|  14.7k|          p_obj_exhaacplus_dec->aac_config.ld_decoder = 0;
  477|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_drc_boost = 100;
  478|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_drc_cut = 100;
  479|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_drc_mode_cut = 0;
  480|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_drc_mode_boost = 0;
  481|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_drc_target_level = 108;
  482|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_drc_set = 0;
  483|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_flush_cmd = 0;
  484|  14.7k|          p_obj_exhaacplus_dec->aac_config.output_level = -1;
  485|  14.7k|#ifdef LOUDNESS_LEVELING_SUPPORT
  486|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_loudness_leveling_flag = 1;
  487|  14.7k|#endif
  488|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_max_channels = 6;
  489|       |
  490|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_coupling_channel = 0;
  491|  14.7k|          p_obj_exhaacplus_dec->aac_config.downmix = 0;
  492|       |
  493|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_err_conceal = 0;
  494|       |
  495|  14.7k|          {
  496|  14.7k|            ia_aac_dec_tables_struct *pstr_aac_tables =
  497|  14.7k|                &p_obj_exhaacplus_dec->aac_tables;
  498|  14.7k|            pstr_aac_tables->pstr_huffmann_tables =
  499|  14.7k|                (ia_aac_dec_huffman_tables_struct
  500|  14.7k|                     *)&ixheaacd_aac_huffmann_tables;
  501|  14.7k|            pstr_aac_tables->pstr_block_tables =
  502|  14.7k|                (ia_aac_dec_block_tables_struct *)&ixheaacd_aac_block_tables;
  503|  14.7k|            pstr_aac_tables->pstr_imdct_tables =
  504|  14.7k|                (ia_aac_dec_imdct_tables_struct *)&ixheaacd_imdct_tables;
  505|       |
  506|  14.7k|            ixheaacd_huff_tables_create(pstr_aac_tables);
  507|  14.7k|          }
  508|  14.7k|          ixheaacd_init_sbr_tables(&p_obj_exhaacplus_dec->str_sbr_tables);
  509|  14.7k|          p_obj_exhaacplus_dec->common_tables =
  510|  14.7k|              (ixheaacd_misc_tables *)&ixheaacd_str_fft_n_transcendent_tables;
  511|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_qmf_bands = 64;
  512|       |
  513|  14.7k|          break;
  514|      0|        }
  515|  14.7k|        case IA_CMD_TYPE_INIT_API_POST_CONFIG_PARAMS: {
  ------------------
  |  |   75|  14.7k|#define IA_CMD_TYPE_INIT_API_POST_CONFIG_PARAMS 0x0200
  ------------------
  |  Branch (515:9): [True: 14.7k, False: 62.6k]
  ------------------
  516|  14.7k|          ixheaacd_fill_aac_mem_tables(p_obj_exhaacplus_dec);
  517|  14.7k|          break;
  518|      0|        }
  519|  23.9k|        case IA_CMD_TYPE_INIT_PROCESS: {
  ------------------
  |  |   76|  23.9k|#define IA_CMD_TYPE_INIT_PROCESS 0x0300
  ------------------
  |  Branch (519:9): [True: 23.9k, False: 53.4k]
  ------------------
  520|  23.9k|          WORD32 err_code = 0;
  521|  23.9k|          if (p_obj_exhaacplus_dec->p_state_aac->fatal_err_present) {
  ------------------
  |  Branch (521:15): [True: 423, False: 23.5k]
  ------------------
  522|    423|            err_code = IA_FATAL_ERROR;
  ------------------
  |  |   25|    423|#define IA_FATAL_ERROR 0x80000000
  ------------------
  523|  23.5k|          } else {
  524|  23.5k|            err_code = ixheaacd_dec_init(p_obj_exhaacplus_dec);
  525|  23.5k|            if (err_code && p_obj_exhaacplus_dec->p_state_aac->s_adts_hdr_present) {
  ------------------
  |  Branch (525:17): [True: 894, False: 22.6k]
  |  Branch (525:29): [True: 327, False: 567]
  ------------------
  526|    327|              p_obj_exhaacplus_dec->p_state_aac->header_dec_done = 0;
  527|    327|            }
  528|  23.5k|            if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && err_code) {
  ------------------
  |  Branch (528:17): [True: 0, False: 23.5k]
  |  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|  23.5k|          }
  536|  23.9k|          if (err_code != 0) {
  ------------------
  |  Branch (536:15): [True: 1.31k, False: 22.6k]
  ------------------
  537|  1.31k|            if (err_code < 0)
  ------------------
  |  Branch (537:17): [True: 935, False: 382]
  ------------------
  538|    935|              p_obj_exhaacplus_dec->p_state_aac->fatal_err_present = 1;
  539|  1.31k|            p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
  540|  1.31k|                p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
  541|  1.31k|          }
  542|  23.9k|          return err_code;
  543|      0|          break;
  544|      0|        }
  545|  23.9k|        case IA_CMD_TYPE_INIT_DONE_QUERY: {
  ------------------
  |  |   77|  23.9k|#define IA_CMD_TYPE_INIT_DONE_QUERY 0x0400
  ------------------
  |  Branch (545:9): [True: 23.9k, False: 53.4k]
  ------------------
  546|  23.9k|          if (p_obj_exhaacplus_dec->p_state_aac->ui_init_done == 1) {
  ------------------
  |  Branch (546:15): [True: 12.7k, False: 11.2k]
  ------------------
  547|  12.7k|            *pui_value = 1;
  548|  12.7k|          } else {
  549|  11.2k|            *pui_value = 0;
  550|  11.2k|          }
  551|  23.9k|          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: 77.4k]
  ------------------
  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: 77.4k]
  ------------------
  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: 77.4k]
  ------------------
  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|  77.4k|      };
  568|  53.4k|      break;
  569|  77.4k|    }
  570|   117k|    case IA_API_CMD_SET_CONFIG_PARAM: {
  ------------------
  |  |   31|   117k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  |  Branch (570:5): [True: 117k, False: 3.22M]
  ------------------
  571|   117k|      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: 117k]
  ------------------
  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: 117k]
  ------------------
  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: 117k]
  ------------------
  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: 117k]
  ------------------
  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: 117k]
  ------------------
  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: 117k]
  ------------------
  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.7k|        case IA_XHEAAC_DEC_CONFIG_PARAM_MP4FLAG: {
  ------------------
  |  |   36|  14.7k|#define IA_XHEAAC_DEC_CONFIG_PARAM_MP4FLAG 0x000C
  ------------------
  |  Branch (621:9): [True: 14.7k, False: 103k]
  ------------------
  622|  14.7k|          if ((*pui_value != 1) && (*pui_value != 0)) {
  ------------------
  |  Branch (622:15): [True: 12.9k, False: 1.78k]
  |  Branch (622:36): [True: 0, False: 12.9k]
  ------------------
  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.7k|          p_obj_exhaacplus_dec->aac_config.ui_mp4_flag = *pui_value;
  627|  14.7k|          break;
  628|  14.7k|        }
  629|  14.7k|        case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT: {
  ------------------
  |  |   42|  14.7k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT 0x0012
  ------------------
  |  Branch (629:9): [True: 14.7k, False: 103k]
  ------------------
  630|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_drc_set = 1;
  631|  14.7k|          if (*pf_value > 1 || *pf_value < 0) {
  ------------------
  |  Branch (631:15): [True: 0, False: 14.7k]
  |  Branch (631:32): [True: 0, False: 14.7k]
  ------------------
  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.7k|          p_obj_exhaacplus_dec->aac_config.ui_drc_mode_cut = 1;
  637|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_drc_cut =
  638|  14.7k|              (WORD32)((*pf_value) * 100);
  639|  14.7k|          break;
  640|  14.7k|        }
  641|       |
  642|  14.7k|        case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST: {
  ------------------
  |  |   43|  14.7k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST 0x0013
  ------------------
  |  Branch (642:9): [True: 14.7k, False: 103k]
  ------------------
  643|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_drc_set = 1;
  644|  14.7k|          if (*pf_value > 1 || *pf_value < 0) {
  ------------------
  |  Branch (644:15): [True: 0, False: 14.7k]
  |  Branch (644:32): [True: 0, False: 14.7k]
  ------------------
  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.7k|          p_obj_exhaacplus_dec->aac_config.ui_drc_mode_boost = 1;
  650|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_drc_boost =
  651|  14.7k|              (WORD32)((*pf_value) * 100);
  652|  14.7k|          break;
  653|  14.7k|        }
  654|       |
  655|  14.7k|        case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL: {
  ------------------
  |  |   44|  14.7k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL 0x0014
  ------------------
  |  Branch (655:9): [True: 14.7k, False: 103k]
  ------------------
  656|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_drc_set = 1;
  657|  14.7k|          p_obj_exhaacplus_dec->aac_config.i_loud_ref_level = *pui_value_signed;
  658|  14.7k|          if (*pui_value > 127) {
  ------------------
  |  Branch (658:15): [True: 6.05k, False: 8.68k]
  ------------------
  659|  6.05k|            p_obj_exhaacplus_dec->aac_config.ui_drc_target_level = 108;
  660|  6.05k|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRC_TARGET);
  ------------------
  |  |   58|  6.05k|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRC_TARGET 0x00000810
  ------------------
  661|  6.05k|          }
  662|  8.68k|          p_obj_exhaacplus_dec->aac_config.ui_drc_target_level = *pui_value;
  663|  8.68k|          break;
  664|  14.7k|        }
  665|  14.7k|        case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_HEAVY_COMP: {
  ------------------
  |  |   45|  14.7k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_HEAVY_COMP 0x0015
  ------------------
  |  Branch (665:9): [True: 14.7k, False: 103k]
  ------------------
  666|  14.7k|          p_obj_exhaacplus_dec->aac_config.ui_drc_set = 1;
  667|  14.7k|          if ((*pui_value != 1) && (*pui_value != 0)) {
  ------------------
  |  Branch (667:15): [True: 14.4k, False: 281]
  |  Branch (667:36): [True: 11.0k, False: 3.39k]
  ------------------
  668|  11.0k|            p_obj_exhaacplus_dec->aac_config.ui_drc_heavy_comp = 0;
  669|  11.0k|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRCFLAG);
  ------------------
  |  |   55|  11.0k|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRCFLAG 0x0000080D
  ------------------
  670|  11.0k|          }
  671|  3.67k|          p_obj_exhaacplus_dec->aac_config.ui_drc_heavy_comp = *pui_value;
  672|  3.67k|          break;
  673|  14.7k|        }
  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: 117k]
  ------------------
  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: 117k]
  ------------------
  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: 117k]
  ------------------
  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: 117k]
  ------------------
  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: 117k]
  ------------------
  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: 117k]
  ------------------
  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: 117k]
  ------------------
  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.7k|        case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE: {
  ------------------
  |  |   29|  14.7k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE 0x0006
  ------------------
  |  Branch (742:9): [True: 14.7k, False: 103k]
  ------------------
  743|  14.7k|          if (((*pui_value_signed) > 8) || ((*pui_value_signed) < -1)) {
  ------------------
  |  Branch (743:15): [True: 11.9k, False: 2.79k]
  |  Branch (743:44): [True: 0, False: 2.79k]
  ------------------
  744|  11.9k|            p_obj_exhaacplus_dec->aac_config.ui_effect_type = -1;
  745|  11.9k|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_EFFECT_TYPE);
  ------------------
  |  |   61|  11.9k|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_EFFECT_TYPE 0x00000813
  ------------------
  746|  11.9k|          }
  747|  2.79k|          p_obj_exhaacplus_dec->aac_config.ui_effect_type = *pui_value_signed;
  748|  2.79k|          break;
  749|  14.7k|        }
  750|  14.7k|        case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS: {
  ------------------
  |  |   30|  14.7k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS 0x0007
  ------------------
  |  Branch (750:9): [True: 14.7k, False: 103k]
  ------------------
  751|  14.7k|          if (*pui_value_signed >= 0) {
  ------------------
  |  Branch (751:15): [True: 14.7k, False: 0]
  ------------------
  752|  14.7k|            p_obj_exhaacplus_dec->aac_config.ui_loud_norm_flag = 1;
  753|  14.7k|          }
  754|  14.7k|          *pui_value_signed = -(*pui_value_signed >> 2);
  755|  14.7k|          if (((*pui_value_signed) > 0) || ((*pui_value_signed) < -63)) {
  ------------------
  |  Branch (755:15): [True: 0, False: 14.7k]
  |  Branch (755:44): [True: 0, False: 14.7k]
  ------------------
  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.7k|          p_obj_exhaacplus_dec->aac_config.ui_target_loudness =
  760|  14.7k|              *pui_value_signed;
  761|  14.7k|          break;
  762|  14.7k|        }
  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: 117k]
  ------------------
  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: 117k]
  ------------------
  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: 117k]
  ------------------
  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: 117k]
  ------------------
  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: 117k]
  ------------------
  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.7k|        case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_LOUDNESS_LEVELING: {
  ------------------
  |  |   69|  14.7k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_LOUDNESS_LEVELING 0x0029
  ------------------
  |  Branch (804:9): [True: 14.7k, False: 103k]
  ------------------
  805|  14.7k|          if (((*pui_value_signed) != 0) && ((*pui_value_signed) != 1)) {
  ------------------
  |  Branch (805:15): [True: 12.4k, False: 2.27k]
  |  Branch (805:45): [True: 12.2k, False: 218]
  ------------------
  806|  12.2k|            p_obj_exhaacplus_dec->aac_config.ui_loudness_leveling_flag = 1;
  807|  12.2k|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_LOUDNESS_LEVELING_FLAG);
  ------------------
  |  |   67|  12.2k|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_LOUDNESS_LEVELING_FLAG 0x00000818
  ------------------
  808|  12.2k|          }
  809|  2.49k|          p_obj_exhaacplus_dec->aac_config.ui_loudness_leveling_flag = *pui_value_signed;
  810|  2.49k|          break;
  811|  14.7k|        }
  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: 117k]
  ------------------
  814|   117k|      }
  815|  76.5k|      break;
  816|   117k|    }
  817|       |
  818|   994k|    case IA_API_CMD_GET_CONFIG_PARAM: {
  ------------------
  |  |   32|   994k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  |  Branch (818:5): [True: 994k, False: 2.34M]
  ------------------
  819|   994k|      UWORD32 i;
  820|   994k|      WORD32 *pvalue =
  821|   994k|          (WORD32 *)(&p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz);
  822|   994k|      if (IA_XHEAAC_DEC_CONFIG_PARAM_NUM_CHANNELS == i_idx) {
  ------------------
  |  |   25|   994k|#define IA_XHEAAC_DEC_CONFIG_PARAM_NUM_CHANNELS 0x0002
  ------------------
  |  Branch (822:11): [True: 12.7k, False: 982k]
  ------------------
  823|  12.7k|        if (p_obj_exhaacplus_dec->p_state_aac != NULL &&
  ------------------
  |  Branch (823:13): [True: 12.7k, False: 0]
  ------------------
  824|  12.7k|            p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle
  ------------------
  |  Branch (824:13): [True: 3.28k, False: 9.45k]
  ------------------
  825|  12.7k|                    .heaac_mps_present == 1) {
  826|  3.28k|          *pui_value = p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle
  827|  3.28k|                           .num_output_channels_at;
  828|  9.45k|        } else {
  829|  9.45k|          *pui_value = pvalue[i_idx];
  830|  9.45k|        }
  831|   982k|      } else if (IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MASK == i_idx) {
  ------------------
  |  |   26|   982k|#define IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MASK 0x0003
  ------------------
  |  Branch (831:18): [True: 12.7k, False: 969k]
  ------------------
  832|  12.7k|        if (p_obj_exhaacplus_dec->p_state_aac != NULL &&
  ------------------
  |  Branch (832:13): [True: 12.7k, False: 0]
  ------------------
  833|  12.7k|            p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle
  ------------------
  |  Branch (833:13): [True: 3.28k, False: 9.45k]
  ------------------
  834|  12.7k|                    .heaac_mps_present == 1) {
  835|  3.28k|          *pui_value = p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle
  836|  3.28k|                           .bs_config.ui_channel_mask;
  837|  9.45k|        } else {
  838|  9.45k|          *pui_value = pvalue[i_idx];
  839|  9.45k|        }
  840|  12.7k|      } else
  841|   969k|      if (i_idx >= 0 && i_idx <= 8) {
  ------------------
  |  Branch (841:11): [True: 969k, False: 0]
  |  Branch (841:25): [True: 101k, False: 867k]
  ------------------
  842|   101k|        *pui_value = pvalue[i_idx];
  843|   867k|      } else if (IA_ENHAACPLUS_DEC_CONFIG_GET_NUM_PRE_ROLL_FRAMES == i_idx) {
  ------------------
  |  |   61|   867k|#define IA_ENHAACPLUS_DEC_CONFIG_GET_NUM_PRE_ROLL_FRAMES 0x0024
  ------------------
  |  Branch (843:18): [True: 0, False: 867k]
  ------------------
  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|   867k|      } else if (IA_ENHAACPLUS_DEC_CONFIG_EXT_ELE_PTR == i_idx) {
  ------------------
  |  |   55|   867k|#define IA_ENHAACPLUS_DEC_CONFIG_EXT_ELE_PTR 0x001E
  ------------------
  |  Branch (857:18): [True: 12.7k, False: 854k]
  ------------------
  858|  12.7k|        ia_audio_specific_config_struct *ptr_audio_specific_config =
  859|  12.7k|            ((ia_audio_specific_config_struct *)
  860|  12.7k|                p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
  861|       |
  862|  19.2k|        for (i = 0; i < ptr_audio_specific_config->str_usac_config
  ------------------
  |  Branch (862:21): [True: 6.46k, False: 12.7k]
  ------------------
  863|  19.2k|                            .str_usac_dec_config.num_config_extensions;
  864|  12.7k|             i++) {
  865|  6.46k|          pp_value[i] = ptr_audio_specific_config->str_usac_config
  866|  6.46k|                            .str_usac_dec_config.usac_cfg_ext_info_buf[i];
  867|  6.46k|        }
  868|       |
  869|  24.7k|        for (i = 0; i < ptr_audio_specific_config->str_usac_config
  ------------------
  |  Branch (869:21): [True: 12.0k, False: 12.7k]
  ------------------
  870|  24.7k|                            .str_usac_dec_config.num_elements;
  871|  12.7k|             i++) {
  872|  12.0k|          if (ptr_audio_specific_config->str_usac_config.str_usac_dec_config
  ------------------
  |  Branch (872:15): [True: 1.26k, False: 10.7k]
  ------------------
  873|  12.0k|                  .usac_ext_ele_payload_present[i]) {
  874|  1.26k|            pp_value[i + 16] =
  875|  1.26k|                ptr_audio_specific_config->str_usac_config.str_usac_dec_config
  876|  1.26k|                    .usac_ext_ele_payload_buf[i];
  877|  1.26k|          }
  878|  12.0k|        }
  879|   854k|      } else if (IA_ENHAACPLUS_DEC_CONFIG_EXT_ELE_BUF_SIZES == i_idx) {
  ------------------
  |  |   56|   854k|#define IA_ENHAACPLUS_DEC_CONFIG_EXT_ELE_BUF_SIZES 0x001F
  ------------------
  |  Branch (879:18): [True: 12.7k, False: 842k]
  ------------------
  880|  12.7k|        WORD32 *ptri_value = (WORD32 *)pv_value;
  881|  12.7k|        ia_audio_specific_config_struct *ptr_audio_specific_config =
  882|  12.7k|            ((ia_audio_specific_config_struct *)
  883|  12.7k|                 p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
  884|  19.2k|        for (i = 0; i < ptr_audio_specific_config->str_usac_config
  ------------------
  |  Branch (884:21): [True: 6.46k, False: 12.7k]
  ------------------
  885|  19.2k|                            .str_usac_dec_config.num_config_extensions;
  886|  12.7k|             i++) {
  887|  6.46k|          ptri_value[i] = ptr_audio_specific_config->str_usac_config
  888|  6.46k|                              .str_usac_dec_config.usac_cfg_ext_info_len[i];
  889|  6.46k|        }
  890|  24.7k|        for (i = 0; i < ptr_audio_specific_config->str_usac_config
  ------------------
  |  Branch (890:21): [True: 12.0k, False: 12.7k]
  ------------------
  891|  24.7k|                            .str_usac_dec_config.num_elements;
  892|  12.7k|             i++) {
  893|  12.0k|          ptri_value[i + 16] =
  894|  12.0k|              ptr_audio_specific_config->str_usac_config.str_usac_dec_config
  895|  12.0k|                  .usac_ext_ele_payload_len[i];
  896|  12.0k|        }
  897|       |
  898|   842k|      } else if (IA_ENHAACPLUS_DEC_DRC_IS_CONFIG_CHANGED == i_idx) {
  ------------------
  |  |   62|   842k|#define IA_ENHAACPLUS_DEC_DRC_IS_CONFIG_CHANGED 0x0025
  ------------------
  |  Branch (898:18): [True: 0, False: 842k]
  ------------------
  899|      0|        *pui_value = p_obj_exhaacplus_dec->p_state_aac->drc_config_changed;
  900|   842k|      } else if (IA_ENHAACPLUS_DEC_DRC_APPLY_CROSSFADE == i_idx) {
  ------------------
  |  |   63|   842k|#define IA_ENHAACPLUS_DEC_DRC_APPLY_CROSSFADE 0x0026
  ------------------
  |  Branch (900:18): [True: 0, False: 842k]
  ------------------
  901|      0|        *pui_value = p_obj_exhaacplus_dec->p_state_aac->apply_crossfade;
  902|   842k|      } else if (IA_ENHAACPLUS_DEC_CONFIG_NUM_ELE == i_idx) {
  ------------------
  |  |   57|   842k|#define IA_ENHAACPLUS_DEC_CONFIG_NUM_ELE 0x0020
  ------------------
  |  Branch (902:18): [True: 12.7k, False: 829k]
  ------------------
  903|  12.7k|        UWORD32 *ptri_value = (UWORD32 *)pv_value;
  904|  12.7k|        ia_audio_specific_config_struct *ptr_audio_specific_config =
  905|  12.7k|            ((ia_audio_specific_config_struct *)
  906|  12.7k|                 p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
  907|  12.7k|        *ptri_value = ptr_audio_specific_config->str_usac_config
  908|  12.7k|                          .str_usac_dec_config.num_elements;
  909|       |
  910|   829k|      } else if (IA_ENHAACPLUS_DEC_CONFIG_NUM_CONFIG_EXT == i_idx) {
  ------------------
  |  |   58|   829k|#define IA_ENHAACPLUS_DEC_CONFIG_NUM_CONFIG_EXT 0x0021
  ------------------
  |  Branch (910:18): [True: 12.7k, False: 816k]
  ------------------
  911|  12.7k|        UWORD32 *ptri_value = (UWORD32 *)pv_value;
  912|  12.7k|        ia_audio_specific_config_struct *ptr_audio_specific_config =
  913|  12.7k|            ((ia_audio_specific_config_struct *)
  914|  12.7k|                 p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
  915|  12.7k|        *ptri_value = ptr_audio_specific_config->str_usac_config
  916|  12.7k|                          .str_usac_dec_config.num_config_extensions;
  917|   816k|      } else if (IA_ENHAACPLUS_DEC_CONFIG_GAIN_PAYLOAD_LEN == i_idx) {
  ------------------
  |  |   59|   816k|#define IA_ENHAACPLUS_DEC_CONFIG_GAIN_PAYLOAD_LEN 0x0022
  ------------------
  |  Branch (917:18): [True: 408k, False: 408k]
  ------------------
  918|   408k|        UWORD32 *ptri_value = (UWORD32 *)pv_value;
  919|   408k|        ia_audio_specific_config_struct *ptr_audio_specific_config =
  920|   408k|            ((ia_audio_specific_config_struct *)
  921|   408k|                 p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
  922|   408k|        WORD32 preroll_counter = ptr_audio_specific_config->str_usac_config
  923|   408k|                                     .str_usac_dec_config.preroll_counter;
  924|   408k|        *ptri_value =
  925|   408k|            ptr_audio_specific_config->str_usac_config.str_usac_dec_config
  926|   408k|                .usac_ext_gain_payload_len[preroll_counter];
  927|   408k|      } else if (IA_ENHAACPLUS_DEC_CONFIG_GAIN_PAYLOAD_BUF == i_idx) {
  ------------------
  |  |   60|   408k|#define IA_ENHAACPLUS_DEC_CONFIG_GAIN_PAYLOAD_BUF 0x0023
  ------------------
  |  Branch (927:18): [True: 408k, False: 0]
  ------------------
  928|   408k|        WORD32 payload_buffer_offeset = 0;
  929|   408k|        ia_audio_specific_config_struct *ptr_audio_specific_config =
  930|   408k|            ((ia_audio_specific_config_struct *)
  931|   408k|                 p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
  932|   408k|        WORD32 preroll_counter = ptr_audio_specific_config->str_usac_config
  933|   408k|                                     .str_usac_dec_config.preroll_counter;
  934|   411k|        for (i = 0; i < (UWORD32)preroll_counter; i++)
  ------------------
  |  Branch (934:21): [True: 2.76k, False: 408k]
  ------------------
  935|  2.76k|          payload_buffer_offeset +=
  936|  2.76k|              ptr_audio_specific_config->str_usac_config.str_usac_dec_config
  937|  2.76k|                  .usac_ext_gain_payload_len[i] *
  938|  2.76k|              sizeof(WORD8);
  939|   408k|        *pp_value = ptr_audio_specific_config->str_usac_config
  940|   408k|                        .str_usac_dec_config.usac_ext_gain_payload_buf +
  941|   408k|                    payload_buffer_offeset;
  942|   408k|      } 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|   994k|      break;
  980|   994k|    }
  981|       |
  982|   994k|    case IA_API_CMD_GET_MEMTABS_SIZE: {
  ------------------
  |  |   34|  14.7k|#define IA_API_CMD_GET_MEMTABS_SIZE 0x0006
  ------------------
  |  Branch (982:5): [True: 14.7k, False: 3.32M]
  ------------------
  983|  14.7k|      *pui_value = (sizeof(ia_mem_info_struct) + sizeof(pVOID *)) *
  984|  14.7k|                   (IA_ENHAACPDEC_NUM_MEMTABS);
  ------------------
  |  |  121|  14.7k|#define IA_ENHAACPDEC_NUM_MEMTABS (4)
  ------------------
  985|  14.7k|      break;
  986|   994k|    }
  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.33M]
  ------------------
  988|      0|      *pui_value = p_obj_exhaacplus_dec->aac_config.output_level;
  989|      0|      break;
  990|   994k|    }
  991|  14.7k|    case IA_API_CMD_SET_MEMTABS_PTR: {
  ------------------
  |  |   35|  14.7k|#define IA_API_CMD_SET_MEMTABS_PTR 0x0007
  ------------------
  |  Branch (991:5): [True: 14.7k, False: 3.32M]
  ------------------
  992|  14.7k|      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.7k]
  ------------------
  993|  14.7k|      memset(pv_value, 0, (sizeof(ia_mem_info_struct) + sizeof(pVOID *)) *
  994|  14.7k|                              (IA_ENHAACPDEC_NUM_MEMTABS));
  ------------------
  |  |  121|  14.7k|#define IA_ENHAACPDEC_NUM_MEMTABS (4)
  ------------------
  995|       |
  996|  14.7k|      p_obj_exhaacplus_dec->p_mem_info_aac = pv_value;
  997|  14.7k|      p_obj_exhaacplus_dec->pp_mem_aac =
  998|  14.7k|          (pVOID *)((WORD8 *)pv_value +
  999|  14.7k|                    sizeof(ia_mem_info_struct) * IA_ENHAACPDEC_NUM_MEMTABS);
  ------------------
  |  |  121|  14.7k|#define IA_ENHAACPDEC_NUM_MEMTABS (4)
  ------------------
 1000|       |
 1001|  14.7k|      break;
 1002|  14.7k|    }
 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.33M]
  ------------------
 1004|      0|      *pui_value = IA_ENHAACPDEC_NUM_MEMTABS;
  ------------------
  |  |  121|      0|#define IA_ENHAACPDEC_NUM_MEMTABS (4)
  ------------------
 1005|      0|      break;
 1006|  14.7k|    }
 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.33M]
  ------------------
 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.7k|    }
 1012|   816k|    case IA_API_CMD_EXECUTE: {
  ------------------
  |  |   38|   816k|#define IA_API_CMD_EXECUTE 0x0009
  ------------------
  |  Branch (1012:5): [True: 816k, False: 2.52M]
  ------------------
 1013|   816k|      switch (i_idx) {
 1014|   408k|        case IA_CMD_TYPE_DO_EXECUTE: {
  ------------------
  |  |   82|   408k|#define IA_CMD_TYPE_DO_EXECUTE 0x0100
  ------------------
  |  Branch (1014:9): [True: 408k, False: 408k]
  ------------------
 1015|   408k|          WORD32 err_code = 0;
 1016|   408k|          if (!p_obj_exhaacplus_dec->p_state_aac->ui_init_done ||
  ------------------
  |  Branch (1016:15): [True: 1.64k, False: 406k]
  ------------------
 1017|   406k|              p_obj_exhaacplus_dec->p_state_aac->fatal_err_present) {
  ------------------
  |  Branch (1017:15): [True: 919, False: 405k]
  ------------------
 1018|  2.55k|            err_code = IA_FATAL_ERROR;
  ------------------
  |  |   25|  2.55k|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1019|   405k|          } else {
 1020|   405k|            memset(p_obj_exhaacplus_dec->p_state_aac->qshift_adj, 0,
 1021|   405k|                   sizeof(p_obj_exhaacplus_dec->p_state_aac->qshift_adj));
 1022|   405k|            p_obj_exhaacplus_dec->p_state_aac->qshift_cnt = 0;
 1023|   405k|            err_code = ixheaacd_dec_execute(p_obj_exhaacplus_dec);
 1024|   405k|          }
 1025|   408k|          if (err_code != IA_NO_ERROR) {
  ------------------
  |  |   23|   408k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1025:15): [True: 14.6k, False: 393k]
  ------------------
 1026|  14.6k|            if (err_code < 0) {
  ------------------
  |  Branch (1026:17): [True: 4.84k, False: 9.79k]
  ------------------
 1027|  4.84k|              p_obj_exhaacplus_dec->p_state_aac->fatal_err_present = 1;
 1028|  4.84k|            }
 1029|  14.6k|            p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
 1030|  14.6k|                p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
 1031|  14.6k|          }
 1032|   408k|          return err_code;
 1033|      0|          break;
 1034|      0|        }
 1035|   408k|        case IA_CMD_TYPE_DONE_QUERY: {
  ------------------
  |  |   83|   408k|#define IA_CMD_TYPE_DONE_QUERY 0x0200
  ------------------
  |  Branch (1035:9): [True: 408k, False: 408k]
  ------------------
 1036|   408k|          if (p_obj_exhaacplus_dec->p_state_aac->ui_input_over == 1) {
  ------------------
  |  Branch (1036:15): [True: 0, False: 408k]
  ------------------
 1037|      0|            *pui_value = 1;
 1038|   408k|          } else {
 1039|   408k|            *pui_value = 0;
 1040|   408k|          }
 1041|       |
 1042|   408k|          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: 816k]
  ------------------
 1045|   816k|      };
 1046|   408k|      break;
 1047|   816k|    }
 1048|   432k|    case IA_API_CMD_GET_CURIDX_INPUT_BUF: {
  ------------------
  |  |   41|   432k|#define IA_API_CMD_GET_CURIDX_INPUT_BUF 0x000B
  ------------------
  |  Branch (1048:5): [True: 432k, False: 2.90M]
  ------------------
 1049|   432k|      *pui_value = p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed;
 1050|   432k|      break;
 1051|   816k|    }
 1052|   432k|    case IA_API_CMD_SET_INPUT_BYTES: {
  ------------------
  |  |   42|   432k|#define IA_API_CMD_SET_INPUT_BYTES 0x000C
  ------------------
  |  Branch (1052:5): [True: 432k, False: 2.90M]
  ------------------
 1053|   432k|      p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes = *pui_value;
 1054|   432k|      break;
 1055|   816k|    }
 1056|   408k|    case IA_API_CMD_GET_OUTPUT_BYTES: {
  ------------------
  |  |   43|   408k|#define IA_API_CMD_GET_OUTPUT_BYTES 0x000D
  ------------------
  |  Branch (1056:5): [True: 408k, False: 2.93M]
  ------------------
 1057|   408k|      if (1 == i_idx) {
  ------------------
  |  Branch (1057:11): [True: 0, False: 408k]
  ------------------
 1058|      0|        *pui_value = p_obj_exhaacplus_dec->p_state_aac->ui_mps_out_bytes;
 1059|   408k|      } else {
 1060|   408k|        *pui_value = p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes;
 1061|   408k|      }
 1062|   408k|      if (p_obj_exhaacplus_dec->p_state_aac->audio_object_type == AOT_USAC) {
  ------------------
  |  Branch (1062:11): [True: 194k, False: 214k]
  ------------------
 1063|   194k|        ia_audio_specific_config_struct *ptr_audio_specific_config =
 1064|   194k|            ((ia_audio_specific_config_struct *)
 1065|   194k|                 p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
 1066|       |
 1067|   194k|        WORD32 preroll_counter = ptr_audio_specific_config->str_usac_config
 1068|   194k|                                     .str_usac_dec_config.preroll_counter;
 1069|       |
 1070|   194k|        *pui_value = ptr_audio_specific_config->str_usac_config
 1071|   194k|                         .str_usac_dec_config.preroll_bytes[preroll_counter];
 1072|       |
 1073|   194k|        preroll_counter++;
 1074|   194k|        if (preroll_counter > (MAX_AUDIO_PREROLLS + 1)) return IA_FATAL_ERROR;
  ------------------
  |  |  249|   194k|#define MAX_AUDIO_PREROLLS 3
  ------------------
                      if (preroll_counter > (MAX_AUDIO_PREROLLS + 1)) return IA_FATAL_ERROR;
  ------------------
  |  |   25|    592|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1074:13): [True: 592, False: 193k]
  ------------------
 1075|   193k|        ptr_audio_specific_config->str_usac_config.str_usac_dec_config
 1076|   193k|            .preroll_counter = preroll_counter;
 1077|   193k|      }
 1078|   407k|      break;
 1079|   408k|    }
 1080|   407k|    case IA_API_CMD_INPUT_OVER: {
  ------------------
  |  |   44|  14.7k|#define IA_API_CMD_INPUT_OVER 0x000E
  ------------------
  |  Branch (1080:5): [True: 14.7k, False: 3.32M]
  ------------------
 1081|  14.7k|      p_obj_exhaacplus_dec->p_state_aac->ui_input_over = 1;
 1082|  14.7k|      break;
 1083|   408k|    }
 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.33M]
  ------------------
 1085|  3.33M|  };
 1086|  2.86M|  return IA_NO_ERROR;
  ------------------
  |  |   23|  2.86M|#define IA_NO_ERROR 0x00000000
  ------------------
 1087|  3.33M|}
ixheaacd_fill_aac_mem_tables:
 1352|  14.7k|    ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec) {
 1353|  14.7k|  ia_mem_info_struct *p_mem_info_aac;
 1354|       |
 1355|  14.7k|  WORD32 num_channels;
 1356|  14.7k|  WORD32 channels;
 1357|  14.7k|  WORD32 buffer_size;
 1358|       |
 1359|  14.7k|  if (p_obj_exhaacplus_dec->aac_config.ui_max_channels > 2) {
  ------------------
  |  Branch (1359:7): [True: 14.7k, False: 0]
  ------------------
 1360|  14.7k|    num_channels = (p_obj_exhaacplus_dec->aac_config.ui_max_channels + 1);
 1361|  14.7k|  } else
 1362|       |
 1363|      0|  {
 1364|      0|    num_channels = p_obj_exhaacplus_dec->aac_config.ui_max_channels;
 1365|      0|  }
 1366|       |
 1367|  14.7k|  channels = num_channels;
 1368|  14.7k|  buffer_size = ixheaacd_persistent_buffer_sizes(num_channels);
 1369|       |
 1370|  14.7k|  {
 1371|  14.7k|    p_mem_info_aac =
 1372|  14.7k|        &p_obj_exhaacplus_dec->p_mem_info_aac[IA_ENHAACPLUS_DEC_PERSIST_IDX];
  ------------------
  |  |   32|  14.7k|#define IA_ENHAACPLUS_DEC_PERSIST_IDX (0)
  ------------------
 1373|  14.7k|    p_mem_info_aac->ui_size =
 1374|  14.7k|        IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_state_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1375|  14.7k|        channels *
 1376|  14.7k|            IXHEAAC_GET_SIZE_ALIGNED(sizeof(struct ia_aac_persistent_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1377|  14.7k|        buffer_size + channels * ixheaacd_getsize_sbr_persistent() + channels * 16 +
 1378|  14.7k|        ixheaacd_mps_persistent_buffer_sizes();
 1379|  14.7k|    p_mem_info_aac->ui_size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_dec_data_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1380|  14.7k|    p_mem_info_aac->ui_size +=
 1381|  14.7k|        IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_audio_specific_config_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1382|  14.7k|    p_mem_info_aac->ui_size += IXHEAAC_GET_SIZE_ALIGNED(MAX_HEADER_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1383|  14.7k|    p_mem_info_aac->ui_alignment = 16;
 1384|  14.7k|    p_mem_info_aac->ui_type = IA_MEMTYPE_PERSIST;
  ------------------
  |  |   51|  14.7k|#define IA_MEMTYPE_PERSIST 0x00
  ------------------
 1385|  14.7k|  }
 1386|       |
 1387|  14.7k|  {
 1388|  14.7k|    p_mem_info_aac =
 1389|  14.7k|        &p_obj_exhaacplus_dec->p_mem_info_aac[IA_ENHAACPLUS_DEC_SCRATCH_IDX];
  ------------------
  |  |   33|  14.7k|#define IA_ENHAACPLUS_DEC_SCRATCH_IDX (1)
  ------------------
 1390|       |
 1391|  14.7k|    p_mem_info_aac->ui_size = MAX_SCR_SIZE;
  ------------------
  |  |  167|  14.7k|#define MAX_SCR_SIZE (max(max(HEAACV2_MAX_SIZE, ELDV2_MAX_SIZE), LD_MAX_SIZE))
  |  |  ------------------
  |  |  |  |   74|   117k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:20): [Folded, False: 14.7k]
  |  |  |  |  |  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.7k]
  |  |  |  |  |  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.7k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1392|       |
 1393|  14.7k|    p_mem_info_aac->ui_alignment = 8;
 1394|  14.7k|    p_mem_info_aac->ui_type = IA_MEMTYPE_SCRATCH;
  ------------------
  |  |   53|  14.7k|#define IA_MEMTYPE_SCRATCH 0x01
  ------------------
 1395|  14.7k|  }
 1396|  14.7k|  {
 1397|  14.7k|    p_mem_info_aac =
 1398|  14.7k|        &p_obj_exhaacplus_dec->p_mem_info_aac[IA_ENHAACPLUS_DEC_INPUT_IDX];
  ------------------
  |  |   34|  14.7k|#define IA_ENHAACPLUS_DEC_INPUT_IDX (2)
  ------------------
 1399|       |
 1400|  14.7k|    p_mem_info_aac->ui_size = IA_MAX_INP_BUFFER_SIZE;
  ------------------
  |  |   44|  14.7k|#define IA_MAX_INP_BUFFER_SIZE (8 * 1024 + 11)
  ------------------
 1401|       |
 1402|  14.7k|    p_mem_info_aac->ui_alignment = 8;
 1403|  14.7k|    p_mem_info_aac->ui_type = IA_MEMTYPE_INPUT;
  ------------------
  |  |   55|  14.7k|#define IA_MEMTYPE_INPUT 0x02
  ------------------
 1404|  14.7k|  }
 1405|  14.7k|  {
 1406|  14.7k|    p_mem_info_aac =
 1407|  14.7k|        &p_obj_exhaacplus_dec->p_mem_info_aac[IA_ENHAACPLUS_DEC_OUTPUT_IDX];
  ------------------
  |  |   35|  14.7k|#define IA_ENHAACPLUS_DEC_OUTPUT_IDX (3)
  ------------------
 1408|  14.7k|    p_mem_info_aac->ui_size = IA_ENHAACPLUS_DEC_OUT_BUF_SIZE;
  ------------------
  |  |   47|  14.7k|  (IA_MAX_USAC_CH * IA_MAX_PREROLL_FRAMES * IA_MAX_OUT_SAMPLES_PER_FRAME * \
  |  |  ------------------
  |  |  |  |   39|  14.7k|#define IA_MAX_USAC_CH (2)
  |  |  ------------------
  |  |                 (IA_MAX_USAC_CH * IA_MAX_PREROLL_FRAMES * IA_MAX_OUT_SAMPLES_PER_FRAME * \
  |  |  ------------------
  |  |  |  |   37|  14.7k|#define IA_MAX_PREROLL_FRAMES (4)
  |  |  ------------------
  |  |                 (IA_MAX_USAC_CH * IA_MAX_PREROLL_FRAMES * IA_MAX_OUT_SAMPLES_PER_FRAME * \
  |  |  ------------------
  |  |  |  |   40|  14.7k|#define IA_MAX_OUT_SAMPLES_PER_FRAME (4096)
  |  |  ------------------
  |  |   48|  14.7k|   IA_MAX_OUTPUT_PCM_SIZE)
  |  |  ------------------
  |  |  |  |   38|  14.7k|#define IA_MAX_OUTPUT_PCM_SIZE (3)
  |  |  ------------------
  ------------------
 1409|  14.7k|    p_mem_info_aac->ui_alignment = 8;
 1410|  14.7k|    p_mem_info_aac->ui_type = IA_MEMTYPE_OUTPUT;
  ------------------
  |  |   57|  14.7k|#define IA_MEMTYPE_OUTPUT 0x03
  ------------------
 1411|  14.7k|  }
 1412|  14.7k|  return;
 1413|  14.7k|}
ixheaacd_mps_payload:
 1510|  3.43k|                          ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec) {
 1511|  3.43k|  struct ia_bit_buf_struct local_bit_buff;
 1512|  3.43k|  struct ia_bit_buf_struct *it_bit_buff;
 1513|  3.43k|  if (self->ptr_mps_data != NULL) {
  ------------------
  |  Branch (1513:7): [True: 2.40k, False: 1.02k]
  ------------------
 1514|  2.40k|    ixheaacd_create_init_bit_buf(&local_bit_buff, (UWORD8 *)self->ptr_mps_data,
 1515|  2.40k|                                 (self->left_mps_bits >> 3) + 1);
 1516|  2.40k|  }
 1517|       |
 1518|  3.43k|  local_bit_buff.xaac_jmp_buf =
 1519|  3.43k|      &p_obj_exhaacplus_dec->p_state_aac->xaac_jmp_buf;
 1520|       |
 1521|  3.43k|  it_bit_buff = &local_bit_buff;
 1522|       |
 1523|  3.43k|  it_bit_buff->bit_pos = self->mps_bits_pos;
 1524|  3.43k|  it_bit_buff->cnt_bits = self->left_mps_bits;
 1525|       |
 1526|  8.20k|  while (self->left_mps_bits >= 8) {
  ------------------
  |  Branch (1526:10): [True: 4.77k, False: 3.43k]
  ------------------
 1527|  4.77k|    ixheaacd_extension_payload(
 1528|  4.77k|        it_bit_buff, &self->left_mps_bits,
 1529|  4.77k|        &p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle);
 1530|  4.77k|  }
 1531|  3.43k|}
ixheaacd_dec_init:
 1534|  23.5k|    ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec) {
 1535|  23.5k|  FLAG frame_status = 1;
 1536|  23.5k|  WORD32 frame_size_1;
 1537|  23.5k|  WORD32 sample_rate_1;
 1538|  23.5k|  WORD16 num_channels_1;
 1539|  23.5k|  WORD32 ps_detected = 0;
 1540|  23.5k|  UWORD8 *in_buffer;
 1541|  23.5k|  WORD16 *time_data;
 1542|  23.5k|  WORD ch_idx;
 1543|  23.5k|  WORD sbr_present_flag = 0;
 1544|  23.5k|  UWORD8 *mps_buffer;
 1545|  23.5k|  ia_aac_dec_state_struct *p_state_enhaacplus_dec;
 1546|       |
 1547|  23.5k|  WORD32 error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  23.5k|#define IA_NO_ERROR 0x00000000
  ------------------
 1548|  23.5k|  WORD32 persistent_used = 0;
 1549|  23.5k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  23.5k|#define IA_NO_ERROR 0x00000000
  ------------------
 1550|  23.5k|  struct ia_aac_persistent_struct *aac_persistent_mem;
 1551|  23.5k|  struct ia_sbr_pers_struct *sbr_persistent_mem;
 1552|  23.5k|  WORD32 ret_val;
 1553|       |
 1554|  23.5k|  p_obj_exhaacplus_dec->p_state_aac =
 1555|  23.5k|      p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_PERSIST_IDX];
  ------------------
  |  |   32|  23.5k|#define IA_ENHAACPLUS_DEC_PERSIST_IDX (0)
  ------------------
 1556|       |
 1557|  23.5k|  if (p_obj_exhaacplus_dec->p_state_aac->ui_init_done)
  ------------------
  |  Branch (1557:7): [True: 0, False: 23.5k]
  ------------------
 1558|      0|  {
 1559|      0|    return IA_NO_ERROR;
  ------------------
  |  |   23|      0|#define IA_NO_ERROR 0x00000000
  ------------------
 1560|      0|  }
 1561|       |
 1562|  23.5k|  p_obj_exhaacplus_dec->p_state_aac->preroll_config_present = 0;
 1563|       |
 1564|  23.5k|  if (p_obj_exhaacplus_dec->p_state_aac != NULL) {
  ------------------
  |  Branch (1564:7): [True: 23.5k, False: 0]
  ------------------
 1565|  23.5k|    ret_val = setjmp(p_obj_exhaacplus_dec->p_state_aac->xaac_jmp_buf);
 1566|  23.5k|    if (ret_val != 0) {
  ------------------
  |  Branch (1566:9): [True: 1.04k, False: 22.5k]
  ------------------
 1567|  1.04k|      p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
 1568|  1.04k|          p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
 1569|  1.04k|      p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = 0;
 1570|  1.04k|      return IA_NO_ERROR;
  ------------------
  |  |   23|  1.04k|#define IA_NO_ERROR 0x00000000
  ------------------
 1571|  1.04k|    }
 1572|  23.5k|  }
 1573|       |
 1574|  22.5k|  time_data = (WORD16 *)(p_obj_exhaacplus_dec
 1575|  22.5k|                             ->pp_mem_aac[IA_ENHAACPLUS_DEC_OUTPUT_IDX]);
  ------------------
  |  |   35|  22.5k|#define IA_ENHAACPLUS_DEC_OUTPUT_IDX (3)
  ------------------
 1576|       |
 1577|  23.5k|  if (p_obj_exhaacplus_dec->aac_config.ui_flush_cmd == 0) {
  ------------------
  |  Branch (1577:7): [True: 23.5k, False: 18.4E]
  ------------------
 1578|  23.5k|    in_buffer = p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_INPUT_IDX];
  ------------------
  |  |   34|  23.5k|#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|  22.5k|  p_state_enhaacplus_dec = p_obj_exhaacplus_dec->p_state_aac;
 1584|       |
 1585|  22.5k|  p_state_enhaacplus_dec->aac_scratch_mem_v =
 1586|  22.5k|      p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_SCRATCH_IDX];
  ------------------
  |  |   33|  22.5k|#define IA_ENHAACPLUS_DEC_SCRATCH_IDX (1)
  ------------------
 1587|  22.5k|  p_obj_exhaacplus_dec->p_state_aac->huffman_code_book_scl =
 1588|  22.5k|      p_obj_exhaacplus_dec->aac_tables.pstr_huffmann_tables
 1589|  22.5k|          ->huffman_code_book_scl;
 1590|  22.5k|  mps_buffer = p_obj_exhaacplus_dec->p_state_aac->mps_buffer;
 1591|  22.5k|  p_state_enhaacplus_dec->mps_header = -1;
 1592|  22.5k|  p_obj_exhaacplus_dec->p_state_aac->huffman_code_book_scl_index =
 1593|  22.5k|      p_obj_exhaacplus_dec->aac_tables.pstr_huffmann_tables
 1594|  22.5k|          ->huffman_code_book_scl_index;
 1595|       |
 1596|  22.5k|  p_state_enhaacplus_dec->pstr_aac_tables = &p_obj_exhaacplus_dec->aac_tables;
 1597|  22.5k|  if (p_obj_exhaacplus_dec->p_state_aac->header_dec_done == 0)
  ------------------
  |  Branch (1597:7): [True: 14.7k, False: 7.76k]
  ------------------
 1598|  14.7k|  {
 1599|  14.7k|    p_obj_exhaacplus_dec->aac_config.header_dec_done = 0;
 1600|  14.7k|    p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.ldmps_present_flag = 0;
 1601|  14.7k|  }
 1602|  22.5k|  if (p_obj_exhaacplus_dec->aac_config.header_dec_done == 0) {
  ------------------
  |  Branch (1602:7): [True: 14.7k, False: 7.76k]
  ------------------
 1603|  14.7k|    WORD32 channels;
 1604|  14.7k|    UWORD32 total_persistent_used = 0;
 1605|       |
 1606|  14.7k|    p_obj_exhaacplus_dec->p_state_aac->p_config =
 1607|  14.7k|        &p_obj_exhaacplus_dec->aac_config;
 1608|       |
 1609|  14.7k|    p_obj_exhaacplus_dec->p_state_aac->pstr_stream_sbr =
 1610|  14.7k|        (pVOID)((pWORD8)p_obj_exhaacplus_dec->p_state_aac +
 1611|  14.7k|                IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_state_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1612|  14.7k|    if (p_obj_exhaacplus_dec->aac_config.ui_max_channels > 2) {
  ------------------
  |  Branch (1612:9): [True: 14.7k, False: 0]
  ------------------
 1613|  14.7k|      p_state_enhaacplus_dec->aac_persistent_mem_v =
 1614|  14.7k|          (pVOID)((pWORD8)p_obj_exhaacplus_dec->p_state_aac->pstr_stream_sbr +
 1615|  14.7k|                  (MAX_BS_ELEMENT)*2 *
  ------------------
  |  |   24|  14.7k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  14.7k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 1616|  14.7k|                      IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_sbr_bitstream_struct),
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1617|  14.7k|                                               BYTE_ALIGN_8));
 1618|       |
 1619|  14.7k|      memset(p_obj_exhaacplus_dec->p_state_aac->pstr_stream_sbr, 0,
 1620|  14.7k|             (MAX_BS_ELEMENT)*2 *
  ------------------
  |  |   24|  14.7k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  14.7k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 1621|  14.7k|                 IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_sbr_bitstream_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1622|  14.7k|    } 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.7k|    if (1 == p_obj_exhaacplus_dec->aac_config.ui_max_channels)
  ------------------
  |  Branch (1633:9): [True: 0, False: 14.7k]
  ------------------
 1634|      0|      channels = 1;
 1635|  14.7k|    else
 1636|  14.7k|      channels = 2;
 1637|       |
 1638|  14.7k|    persistent_used = ixheaacd_set_aac_persistent_buffers(
 1639|  14.7k|        p_state_enhaacplus_dec->aac_persistent_mem_v, channels);
 1640|       |
 1641|  14.7k|    p_state_enhaacplus_dec->sbr_persistent_mem_v =
 1642|  14.7k|        (pVOID)((pWORD8)p_state_enhaacplus_dec->aac_persistent_mem_v +
 1643|  14.7k|                IXHEAAC_GET_SIZE_ALIGNED(persistent_used, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1644|  14.7k|    total_persistent_used += IXHEAAC_GET_SIZE_ALIGNED(persistent_used, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1645|       |
 1646|  14.7k|    persistent_used = ixheaacd_getsize_sbr_persistent();
 1647|  14.7k|    ixheaacd_set_sbr_persistent_buffers(
 1648|  14.7k|        p_state_enhaacplus_dec->sbr_persistent_mem_v, &persistent_used,
 1649|  14.7k|        channels, 1);
 1650|       |
 1651|  14.7k|    p_state_enhaacplus_dec->heaac_mps_handle.mps_persistent_mem_v =
 1652|  14.7k|        (pVOID)((pWORD8)p_state_enhaacplus_dec->sbr_persistent_mem_v +
 1653|  14.7k|                IXHEAAC_GET_SIZE_ALIGNED(persistent_used, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1654|  14.7k|    total_persistent_used += IXHEAAC_GET_SIZE_ALIGNED(persistent_used, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1655|       |
 1656|  14.7k|    persistent_used = ixheaacd_getsize_mps_persistent();
 1657|       |
 1658|  14.7k|    ixheaacd_set_mps_persistent_buffers(
 1659|  14.7k|        &p_state_enhaacplus_dec->heaac_mps_handle, &persistent_used, channels,
 1660|  14.7k|        p_state_enhaacplus_dec->heaac_mps_handle.mps_persistent_mem_v);
 1661|  14.7k|    total_persistent_used += IXHEAAC_GET_SIZE_ALIGNED(persistent_used, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1662|       |
 1663|  14.7k|    if (total_persistent_used >
  ------------------
  |  Branch (1663:9): [True: 0, False: 14.7k]
  ------------------
 1664|  14.7k|        p_obj_exhaacplus_dec->p_mem_info_aac[IA_ENHAACPLUS_DEC_PERSIST_IDX].ui_size) {
  ------------------
  |  |   32|  14.7k|#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.7k|    aac_persistent_mem = (struct ia_aac_persistent_struct *)
 1669|  14.7k|                             p_state_enhaacplus_dec->aac_persistent_mem_v;
 1670|  14.7k|    if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (1670:9): [True: 0, False: 14.7k]
  ------------------
 1671|  14.7k|        p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (1671:9): [True: 1, False: 14.7k]
  ------------------
 1672|      1|      p_state_enhaacplus_dec->frame_len_flag =
 1673|      1|          p_obj_exhaacplus_dec->aac_config.framesize_480;
 1674|       |
 1675|  14.7k|    p_state_enhaacplus_dec->ptr_overlap_buf =
 1676|  14.7k|        aac_persistent_mem->overlap_buffer;
 1677|       |
 1678|  14.7k|    p_state_enhaacplus_dec->bit_count = 0;
 1679|  14.7k|    p_state_enhaacplus_dec->ec_enable = p_obj_exhaacplus_dec->aac_config.ui_err_conceal;
 1680|  14.7k|    p_state_enhaacplus_dec->sync_status = 0;
 1681|  14.7k|    p_state_enhaacplus_dec->bs_format = ADTS_BSFORMAT;
  ------------------
  |  |   28|  14.7k|#define ADTS_BSFORMAT 2
  ------------------
 1682|  14.7k|    p_state_enhaacplus_dec->latm_initialized = 0;
 1683|  14.7k|    p_state_enhaacplus_dec->frame_size = 0;
 1684|  14.7k|    memset(&p_state_enhaacplus_dec->latm_struct_element, 0,
 1685|  14.7k|           sizeof(ixheaacd_latm_struct));
 1686|  14.7k|    memset(&p_state_enhaacplus_dec->b_n_raw_data_blk, 0,
 1687|  14.7k|           sizeof(WORD32) * (9 + MAX_BS_ELEMENT));
  ------------------
  |  |   24|  14.7k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  14.7k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 1688|       |
 1689|  14.7k|    p_state_enhaacplus_dec->sbr_present_flag = 0;
 1690|       |
 1691|   162k|    for (ch_idx = 0; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|   162k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|   162k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (1691:22): [True: 147k, False: 14.7k]
  ------------------
 1692|   147k|      p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = 0;
 1693|   147k|    }
 1694|       |
 1695|  14.7k|    memset(&p_state_enhaacplus_dec->ind_cc_info, 0,
 1696|  14.7k|           sizeof(ia_enhaacplus_dec_ind_cc));
 1697|       |
 1698|  14.7k|    p_state_enhaacplus_dec->last_frame_ok = 1;
 1699|  14.7k|    p_obj_exhaacplus_dec->aac_config.header_dec_done = 1;
 1700|       |
 1701|  14.7k|    aac_persistent_mem->str_aac_decoder.pstr_aac_tables =
 1702|  14.7k|        &p_obj_exhaacplus_dec->aac_tables;
 1703|  14.7k|    aac_persistent_mem->str_aac_decoder.pstr_common_tables =
 1704|  14.7k|        p_obj_exhaacplus_dec->common_tables;
 1705|       |
 1706|  14.7k|    p_obj_exhaacplus_dec->p_state_aac->sbr_persistent_mem_u =
 1707|  14.7k|        p_obj_exhaacplus_dec->p_state_aac->sbr_persistent_mem_v;
 1708|       |
 1709|  14.7k|    p_obj_exhaacplus_dec->p_state_aac->sbr_scratch_mem_u =
 1710|  14.7k|        p_obj_exhaacplus_dec->p_state_aac->aac_scratch_mem_v;
 1711|       |
 1712|  14.7k|    ixheaacd_set_sbr_persistent_table_pointer(
 1713|  14.7k|        p_obj_exhaacplus_dec->p_state_aac->sbr_persistent_mem_v,
 1714|  14.7k|        &p_obj_exhaacplus_dec->str_sbr_tables,
 1715|  14.7k|        p_obj_exhaacplus_dec->common_tables);
 1716|  14.7k|    ixheaacd_set_scratch_buffers(
 1717|  14.7k|        &p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle,
 1718|  14.7k|        p_state_enhaacplus_dec->aac_scratch_mem_v);
 1719|  14.7k|  }
 1720|       |
 1721|  22.5k|  if (p_obj_exhaacplus_dec->p_state_aac->ui_input_over == 1) {
  ------------------
  |  Branch (1721:7): [True: 0, False: 22.5k]
  ------------------
 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|  22.5k|  if (p_obj_exhaacplus_dec->p_state_aac->header_dec_done == 0) {
  ------------------
  |  Branch (1725:7): [True: 14.7k, False: 7.76k]
  ------------------
 1726|  14.7k|    if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (1726:9): [True: 0, False: 14.7k]
  ------------------
 1727|  14.7k|        p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (1727:9): [True: 1, False: 14.7k]
  ------------------
 1728|      1|      p_state_enhaacplus_dec->frame_len_flag =
 1729|      1|          p_obj_exhaacplus_dec->aac_config.framesize_480;
 1730|       |
 1731|  14.7k|    aac_persistent_mem = (struct ia_aac_persistent_struct *)
 1732|  14.7k|                             p_state_enhaacplus_dec->aac_persistent_mem_v;
 1733|  14.7k|    sbr_persistent_mem = (struct ia_sbr_pers_struct *)
 1734|  14.7k|                             p_state_enhaacplus_dec->sbr_persistent_mem_v;
 1735|  14.7k|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (1735:9): [True: 0, False: 14.7k]
  ------------------
 1736|      0|      p_obj_exhaacplus_dec->p_state_aac->first_frame = 1;
 1737|      0|    }
 1738|       |
 1739|  14.7k|    if (p_obj_exhaacplus_dec->aac_config.ui_samp_freq == 0) {
  ------------------
  |  Branch (1739:9): [True: 14.7k, False: 1]
  ------------------
 1740|  14.7k|      WORD32 header_bytes_consumed, return_val;
 1741|       |
 1742|  14.7k|      if (p_state_enhaacplus_dec->ui_in_bytes == 0) {
  ------------------
  |  Branch (1742:11): [True: 0, False: 14.7k]
  ------------------
 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.7k|      if (1 == p_obj_exhaacplus_dec->aac_config.ui_frame_size) {
  ------------------
  |  Branch (1747:11): [True: 0, False: 14.7k]
  ------------------
 1748|      0|        p_state_enhaacplus_dec->frame_len_flag = 1;
 1749|      0|        p_state_enhaacplus_dec->frame_length = 960;
 1750|  14.7k|      } else {
 1751|  14.7k|        p_state_enhaacplus_dec->frame_len_flag = 0;
 1752|  14.7k|        p_state_enhaacplus_dec->frame_length = 1024;
 1753|  14.7k|      }
 1754|       |
 1755|  14.7k|      p_state_enhaacplus_dec->ui_init_done = 0;
 1756|  14.7k|      memset(&(p_state_enhaacplus_dec->eld_specific_config), 0,
 1757|  14.7k|             sizeof(ia_eld_specific_config_struct));
 1758|  14.7k|      return_val = ixheaacd_aac_headerdecode(
 1759|  14.7k|          p_obj_exhaacplus_dec, (UWORD8 *)in_buffer, &header_bytes_consumed,
 1760|  14.7k|          aac_persistent_mem->str_aac_decoder.pstr_aac_tables
 1761|  14.7k|              ->pstr_huffmann_tables);
 1762|  14.7k|      if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (1762:11): [True: 1.28k, False: 13.4k]
  ------------------
 1763|  13.4k|          p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (1763:11): [True: 1.88k, False: 11.5k]
  ------------------
 1764|  11.5k|          p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LC) {
  ------------------
  |  Branch (1764:11): [True: 749, False: 10.8k]
  ------------------
 1765|  3.60k|        *sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_header[0] =
 1766|  3.60k|            p_obj_exhaacplus_dec->p_state_aac->str_sbr_config;
 1767|  3.60k|        *sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_header[1] =
 1768|  3.60k|            p_obj_exhaacplus_dec->p_state_aac->str_sbr_config;
 1769|  11.1k|      } else {
 1770|  11.1k|        memset(&(p_state_enhaacplus_dec->eld_specific_config), 0,
 1771|  11.1k|               sizeof(ia_eld_specific_config_struct));
 1772|  11.1k|      }
 1773|       |
 1774|  14.7k|      if (return_val < 0) {
  ------------------
  |  Branch (1774:11): [True: 369, False: 14.3k]
  ------------------
 1775|    369|        if (return_val ==
  ------------------
  |  Branch (1775:13): [True: 7, False: 362]
  ------------------
 1776|    369|            (WORD32)IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX) {
  ------------------
  |  |   85|    369|#define IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX 0xFFFF9002
  ------------------
 1777|      7|          p_state_enhaacplus_dec->i_bytes_consumed = header_bytes_consumed;
 1778|      7|          return return_val;
 1779|      7|        }
 1780|    362|        p_state_enhaacplus_dec->i_bytes_consumed = 1;
 1781|       |
 1782|    362|        return return_val;
 1783|    369|      }
 1784|       |
 1785|  14.3k|      if (return_val ==
  ------------------
  |  Branch (1785:11): [True: 20, False: 14.3k]
  ------------------
 1786|  14.3k|          IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES) {
  ------------------
  |  |   98|  14.3k|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1787|     20|        p_state_enhaacplus_dec->i_bytes_consumed = header_bytes_consumed;
 1788|     20|        return return_val;
 1789|     20|      }
 1790|       |
 1791|  14.3k|      p_state_enhaacplus_dec->i_bytes_consumed = header_bytes_consumed;
 1792|       |
 1793|  14.3k|      if ((return_val == 0) &&
  ------------------
  |  Branch (1793:11): [True: 14.0k, False: 328]
  ------------------
 1794|  14.0k|          (p_obj_exhaacplus_dec->p_state_aac->audio_object_type == AOT_USAC)) {
  ------------------
  |  Branch (1794:11): [True: 5.14k, False: 8.87k]
  ------------------
 1795|  5.14k|        {
 1796|  5.14k|          WORD32 pcm_size = p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz;
 1797|  5.14k|          WORD8 *inbuffer =
 1798|  5.14k|              p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_INPUT_IDX];
  ------------------
  |  |   34|  5.14k|#define IA_ENHAACPLUS_DEC_INPUT_IDX (2)
  ------------------
 1799|  5.14k|          WORD8 *outbuffer =
 1800|  5.14k|              p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_OUTPUT_IDX];
  ------------------
  |  |   35|  5.14k|#define IA_ENHAACPLUS_DEC_OUTPUT_IDX (3)
  ------------------
 1801|  5.14k|          WORD32 out_bytes = 0;
 1802|  5.14k|          WORD32 frames_done = p_obj_exhaacplus_dec->p_state_aac->frame_counter;
 1803|  5.14k|          p_obj_exhaacplus_dec->p_state_aac->decode_create_done = 0;
 1804|       |
 1805|  5.14k|          if (p_obj_exhaacplus_dec->p_state_aac->ui_input_over == 0) {
  ------------------
  |  Branch (1805:15): [True: 5.14k, False: 0]
  ------------------
 1806|  5.14k|            error_code = ixheaacd_dec_main(
 1807|  5.14k|                p_obj_exhaacplus_dec, inbuffer, outbuffer, &out_bytes,
 1808|  5.14k|                frames_done, pcm_size,
 1809|  5.14k|                &p_obj_exhaacplus_dec->p_state_aac->num_of_output_ch);
 1810|  5.14k|            if (error_code) return error_code;
  ------------------
  |  Branch (1810:17): [True: 14, False: 5.13k]
  ------------------
 1811|  5.13k|            p_obj_exhaacplus_dec->p_state_aac->frame_counter++;
 1812|  5.13k|          } else {
 1813|      0|            out_bytes = 0;
 1814|      0|          }
 1815|       |
 1816|  5.13k|          p_obj_exhaacplus_dec->aac_config.ui_n_channels =
 1817|  5.13k|              p_obj_exhaacplus_dec->p_state_aac->num_of_output_ch;
 1818|  5.13k|        }
 1819|  5.13k|        if (return_val == 0)
  ------------------
  |  Branch (1819:13): [True: 5.13k, False: 0]
  ------------------
 1820|  5.13k|          p_obj_exhaacplus_dec->p_state_aac->ui_init_done = 1;
 1821|  5.13k|        return return_val;
 1822|  5.14k|      }
 1823|       |
 1824|  9.20k|      if (return_val == 0) {
  ------------------
  |  Branch (1824:11): [True: 8.87k, False: 328]
  ------------------
 1825|  8.87k|        p_obj_exhaacplus_dec->p_state_aac->header_dec_done = 1;
 1826|  8.87k|        if (p_obj_exhaacplus_dec->aac_config.ui_flush_cmd == 0) {
  ------------------
  |  Branch (1826:13): [True: 8.87k, False: 0]
  ------------------
 1827|  8.87k|          memcpy(p_state_enhaacplus_dec->header_ptr, in_buffer,
 1828|  8.87k|                 header_bytes_consumed * sizeof(UWORD8));
 1829|  8.87k|          p_state_enhaacplus_dec->header_length = header_bytes_consumed;
 1830|  8.87k|        }
 1831|  8.87k|      }
 1832|       |
 1833|  9.20k|      if (p_obj_exhaacplus_dec->p_state_aac->header_dec_done != 1)
  ------------------
  |  Branch (1833:11): [True: 13, False: 9.19k]
  ------------------
 1834|     13|        return IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START;
  ------------------
  |  |   76|     13|#define IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START 0x00001000
  ------------------
 1835|       |
 1836|  9.19k|      if (p_state_enhaacplus_dec->dwnsmp_signal == 1 &&
  ------------------
  |  Branch (1836:11): [True: 1.00k, False: 8.19k]
  ------------------
 1837|  1.00k|          p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (1837:11): [True: 1.00k, False: 0]
  ------------------
 1838|  1.00k|        p_obj_exhaacplus_dec->aac_config.down_sample_flag = 1;
 1839|       |
 1840|  9.19k|      if (p_state_enhaacplus_dec->sampling_rate ==
  ------------------
  |  Branch (1840:11): [True: 3, False: 9.19k]
  ------------------
 1841|  9.19k|          p_state_enhaacplus_dec->extension_samp_rate) {
 1842|      3|        p_obj_exhaacplus_dec->aac_config.down_sample_flag = 1;
 1843|      3|      }
 1844|       |
 1845|  9.19k|    } 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|  9.19k|    p_state_enhaacplus_dec->pstr_bit_buf = ixheaacd_create_bit_buf(
 1862|  9.19k|        &p_state_enhaacplus_dec->str_bit_buf, (UWORD8 *)in_buffer,
 1863|  9.19k|        p_obj_exhaacplus_dec->p_mem_info_aac[IA_ENHAACPLUS_DEC_INPUT_IDX]
  ------------------
  |  |   34|  9.19k|#define IA_ENHAACPLUS_DEC_INPUT_IDX (2)
  ------------------
 1864|  9.19k|            .ui_size);
 1865|  9.19k|    p_state_enhaacplus_dec->pstr_bit_buf->xaac_jmp_buf =
 1866|  9.19k|        &(p_state_enhaacplus_dec->xaac_jmp_buf);
 1867|       |
 1868|  9.19k|    p_state_enhaacplus_dec->ptr_bit_stream =
 1869|  9.19k|        p_state_enhaacplus_dec->pstr_bit_buf;
 1870|       |
 1871|  9.19k|    if (p_state_enhaacplus_dec->s_adts_hdr_present) {
  ------------------
  |  Branch (1871:9): [True: 4.93k, False: 4.26k]
  ------------------
 1872|  4.93k|      if (p_obj_exhaacplus_dec->aac_config.ld_decoder == 1)
  ------------------
  |  Branch (1872:11): [True: 0, False: 4.93k]
  ------------------
 1873|      0|        p_state_enhaacplus_dec->audio_object_type = 23;
 1874|  4.93k|    }
 1875|       |
 1876|  9.19k|    if ((p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD) ||
  ------------------
  |  Branch (1876:9): [True: 2.15k, False: 7.03k]
  ------------------
 1877|  7.03k|        (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD))
  ------------------
  |  Branch (1877:9): [True: 968, False: 6.06k]
  ------------------
 1878|  2.81k|      if (p_state_enhaacplus_dec->s_adts_hdr_present) {
  ------------------
  |  Branch (1878:11): [True: 0, False: 2.81k]
  ------------------
 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|  9.19k|    {
 1895|  97.9k|      for (ch_idx = 0; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  97.9k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  97.9k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (1895:24): [True: 88.7k, False: 9.19k]
  ------------------
 1896|  88.7k|        WORD32 channels;
 1897|  88.7k|        channels = 2;
 1898|       |
 1899|  88.7k|        p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx] =
 1900|  88.7k|            ixheaacd_aac_decoder_init(
 1901|  88.7k|                p_state_enhaacplus_dec,
 1902|       |
 1903|  88.7k|                p_state_enhaacplus_dec->pstr_stream_sbr[0], channels,
 1904|  88.7k|                p_state_enhaacplus_dec->aac_persistent_mem_v,
 1905|  88.7k|                p_state_enhaacplus_dec->frame_length);
 1906|       |
 1907|  88.7k|        if (!p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]) {
  ------------------
  |  Branch (1907:13): [True: 0, False: 88.7k]
  ------------------
 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|  88.7k|      }
 1912|       |
 1913|  9.19k|      {
 1914|  9.19k|        p_state_enhaacplus_dec->pstr_drc_dec =
 1915|  9.19k|            &p_state_enhaacplus_dec->str_drc_dec_info;
 1916|  9.19k|        ixheaacd_drc_dec_create(p_state_enhaacplus_dec->pstr_drc_dec, 127, 127);
 1917|  9.19k|      }
 1918|  9.19k|      p_state_enhaacplus_dec->pstr_drc_dec->cut_factor =
 1919|  9.19k|          p_obj_exhaacplus_dec->aac_config.ui_drc_cut;
 1920|  9.19k|      p_state_enhaacplus_dec->pstr_drc_dec->boost_factor =
 1921|  9.19k|          p_obj_exhaacplus_dec->aac_config.ui_drc_boost;
 1922|  9.19k|      p_state_enhaacplus_dec->pstr_drc_dec->target_ref_level =
 1923|  9.19k|          p_obj_exhaacplus_dec->aac_config.ui_drc_target_level;
 1924|  9.19k|      p_state_enhaacplus_dec->pstr_drc_dec->prog_ref_level =
 1925|  9.19k|          p_obj_exhaacplus_dec->aac_config.ui_drc_target_level;
 1926|       |
 1927|  9.19k|      if (1 == p_obj_exhaacplus_dec->aac_config.ui_drc_set) {
  ------------------
  |  Branch (1927:11): [True: 8.87k, False: 315]
  ------------------
 1928|  8.87k|        if (p_obj_exhaacplus_dec->aac_config.ui_drc_heavy_comp == 1) {
  ------------------
  |  Branch (1928:13): [True: 229, False: 8.65k]
  ------------------
 1929|    229|          p_state_enhaacplus_dec->pstr_drc_dec->drc_on = 1;
 1930|    229|          p_state_enhaacplus_dec->pstr_drc_dec->heavy_mode = 1;
 1931|  8.65k|        } else {
 1932|  8.65k|          p_state_enhaacplus_dec->pstr_drc_dec->heavy_mode = 0;
 1933|  8.65k|          if (p_state_enhaacplus_dec->pstr_drc_dec->target_ref_level > 127)
  ------------------
  |  Branch (1933:15): [True: 0, False: 8.65k]
  ------------------
 1934|      0|            p_state_enhaacplus_dec->pstr_drc_dec->target_ref_level = 127;
 1935|  8.65k|          if (p_state_enhaacplus_dec->pstr_drc_dec->target_ref_level < 0) {
  ------------------
  |  Branch (1935:15): [True: 0, False: 8.65k]
  ------------------
 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.65k|          } else {
 1944|  8.65k|            p_state_enhaacplus_dec->pstr_drc_dec->drc_on = 1;
 1945|  8.65k|            p_state_enhaacplus_dec->pstr_drc_dec->drc_dig_norm = 1;
 1946|  8.65k|          }
 1947|  8.65k|        }
 1948|  8.87k|      }
 1949|  9.19k|    }
 1950|  9.19k|  } else {
 1951|  7.76k|    struct ia_bit_buf_struct temp_bit_buff = {0};
 1952|  7.76k|    ia_adts_header_struct adts;
 1953|  7.76k|    struct ia_bit_buf_struct *it_bit_buff;
 1954|       |
 1955|  7.76k|    WORD16 frame_size_2 = 0;
 1956|  7.76k|    WORD32 sample_rate_2 = 0;
 1957|  7.76k|    WORD32 sample_rate = 0;
 1958|  7.76k|    WORD type, i;
 1959|  7.76k|    WORD elements_number;
 1960|       |
 1961|  7.76k|    if (p_state_enhaacplus_dec->audio_object_type == AOT_USAC)
  ------------------
  |  Branch (1961:9): [True: 0, False: 7.76k]
  ------------------
 1962|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1963|       |
 1964|  7.76k|    memset(&adts, 0, sizeof(ia_adts_header_struct));
 1965|       |
 1966|   104k|    for (i = 0; i < MAX_BS_ELEMENT + 1; i++) {
  ------------------
  |  |   24|   104k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|   104k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (1966:17): [True: 96.9k, False: 7.76k]
  ------------------
 1967|  96.9k|      p_obj_exhaacplus_dec->aac_config.element_type[i] = -1;
 1968|  96.9k|    }
 1969|       |
 1970|  7.76k|    it_bit_buff = p_state_enhaacplus_dec->pstr_bit_buf;
 1971|       |
 1972|  7.76k|    p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 0;
 1973|  7.76k|    p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = 0;
 1974|  7.76k|    p_state_enhaacplus_dec->ui_mps_out_bytes = 0;
 1975|  7.76k|    if (p_state_enhaacplus_dec->ui_in_bytes == 0) {
  ------------------
  |  Branch (1975:9): [True: 0, False: 7.76k]
  ------------------
 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.76k|    if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (1980:9): [True: 18.4E, False: 7.85k]
  ------------------
 1981|  7.85k|        p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1981:9): [True: 1.82k, False: 6.02k]
  ------------------
 1982|  2.78k|      if (p_obj_exhaacplus_dec->aac_config.ui_mp4_flag)
  ------------------
  |  Branch (1982:11): [True: 19, False: 2.76k]
  ------------------
 1983|     19|        p_state_enhaacplus_dec->frame_size =
 1984|     19|            p_state_enhaacplus_dec->ui_in_bytes;
 1985|  2.78k|    }
 1986|       |
 1987|  7.76k|    ixheaacd_create_init_bit_buf(it_bit_buff, in_buffer,
 1988|  7.76k|                                 p_state_enhaacplus_dec->ui_in_bytes);
 1989|  7.76k|    p_state_enhaacplus_dec->pstr_bit_buf->xaac_jmp_buf =
 1990|  7.76k|        &(p_state_enhaacplus_dec->xaac_jmp_buf);
 1991|       |
 1992|  7.76k|    it_bit_buff->adts_header_present =
 1993|  7.76k|        p_state_enhaacplus_dec->s_adts_hdr_present;
 1994|  7.76k|    it_bit_buff->no_raw_data_blocks =
 1995|  7.76k|        (WORD8)p_state_enhaacplus_dec->b_n_raw_data_blk;
 1996|  7.76k|    it_bit_buff->protection_absent = p_state_enhaacplus_dec->protection_absent;
 1997|       |
 1998|  7.76k|    memcpy(&temp_bit_buff, it_bit_buff, sizeof(struct ia_bit_buf_struct));
 1999|       |
 2000|  7.76k|    if (p_obj_exhaacplus_dec->aac_config.ui_max_channels > 2)
  ------------------
  |  Branch (2000:9): [True: 8.81k, False: 18.4E]
  ------------------
 2001|  8.81k|      elements_number = MAX_BS_ELEMENT;
  ------------------
  |  |   24|  8.81k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  8.81k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 2002|  18.4E|    else
 2003|  18.4E|      elements_number = 2;
 2004|       |
 2005|  95.9k|    for (i = 0; i < elements_number; i++)
  ------------------
  |  Branch (2005:17): [True: 88.1k, False: 7.76k]
  ------------------
 2006|  88.1k|      p_state_enhaacplus_dec->pstr_stream_sbr[i][0].no_elements = 0;
 2007|       |
 2008|  7.76k|    { it_bit_buff->initial_cnt_bits = it_bit_buff->cnt_bits; }
 2009|       |
 2010|  7.76k|    ixheaacd_byte_align(
 2011|  7.76k|        p_state_enhaacplus_dec->ptr_bit_stream,
 2012|  7.76k|        &p_state_enhaacplus_dec->pstr_aac_dec_info[0]->byte_align_bits);
 2013|       |
 2014|  7.76k|    if (p_state_enhaacplus_dec->s_adts_hdr_present) {
  ------------------
  |  Branch (2014:9): [True: 4.93k, False: 2.83k]
  ------------------
 2015|  4.93k|      WORD32 error;
 2016|       |
 2017|  4.93k|      if (p_state_enhaacplus_dec->b_n_raw_data_blk == 0) {
  ------------------
  |  Branch (2017:11): [True: 4.93k, False: 0]
  ------------------
 2018|  4.93k|        error = ixheaacd_readifadts(p_state_enhaacplus_dec, it_bit_buff, &adts);
 2019|       |
 2020|  4.93k|        if (error) return error;
  ------------------
  |  Branch (2020:13): [True: 0, False: 4.93k]
  ------------------
 2021|       |
 2022|  4.93k|        p_state_enhaacplus_dec->protection_absent = adts.protection_absent;
 2023|       |
 2024|  4.93k|        if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (2024:13): [True: 0, False: 4.93k]
  ------------------
 2025|  4.93k|            p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (2025:13): [True: 0, False: 4.93k]
  ------------------
 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.93k|      }
 2033|  4.93k|    }
 2034|       |
 2035|  7.76k|    if (p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT) {
  ------------------
  |  |   29|  7.76k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (2035:9): [True: 3.80k, False: 3.96k]
  ------------------
 2036|  3.80k|      WORD32 result;
 2037|  3.80k|      WORD32 sync;
 2038|  3.80k|      WORD32 cnt_bits;
 2039|       |
 2040|  3.80k|      sync = ixheaacd_read_bits_buf(it_bit_buff, 11);
 2041|  3.80k|      cnt_bits = it_bit_buff->cnt_bits;
 2042|  3.80k|      if (it_bit_buff->cnt_bits <= 24) {
  ------------------
  |  Branch (2042:11): [True: 0, False: 3.80k]
  ------------------
 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.80k|      while (sync != 0x2b7) {
  ------------------
  |  Branch (2046:14): [True: 0, False: 3.80k]
  ------------------
 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.80k|      it_bit_buff->audio_mux_align = it_bit_buff->cnt_bits - 13;
 2057|       |
 2058|  3.80k|      if (sync == 0x2b7) {
  ------------------
  |  Branch (2058:11): [True: 3.80k, False: 0]
  ------------------
 2059|  3.80k|        result = ixheaacd_latm_audio_mux_element(
 2060|  3.80k|            it_bit_buff, &p_state_enhaacplus_dec->latm_struct_element,
 2061|  3.80k|            p_state_enhaacplus_dec,
 2062|  3.80k|            (ia_sampling_rate_info_struct *)&p_obj_exhaacplus_dec->aac_tables
 2063|  3.80k|                .pstr_huffmann_tables->str_sample_rate_info[0]);
 2064|  3.80k|        if (result < 0) {
  ------------------
  |  Branch (2064:13): [True: 0, False: 3.80k]
  ------------------
 2065|      0|          return result;
 2066|      0|        }
 2067|  3.80k|      }
 2068|  3.80k|    }
 2069|       |
 2070|  7.76k|    p_state_enhaacplus_dec->pstr_aac_dec_info[0]->byte_align_bits =
 2071|  7.76k|        it_bit_buff->cnt_bits;
 2072|       |
 2073|  7.76k|    type = -1;
 2074|  7.76k|    ch_idx = 0;
 2075|       |
 2076|  15.0k|    while ((type != 7)) {
  ------------------
  |  Branch (2076:12): [True: 11.0k, False: 4.09k]
  ------------------
 2077|  11.0k|      ia_aac_dec_scratch_struct aac_scratch_struct;
 2078|  11.0k|      memset(&aac_scratch_struct, 0, sizeof(aac_scratch_struct));
 2079|       |
 2080|  11.0k|      if (ch_idx >= elements_number) {
  ------------------
  |  Branch (2080:11): [True: 12, False: 10.9k]
  ------------------
 2081|     12|        p_state_enhaacplus_dec->i_bytes_consumed = 1;
 2082|       |
 2083|     12|        return IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
  ------------------
  |  |   85|     12|#define IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX 0xFFFF9002
  ------------------
 2084|     12|      }
 2085|       |
 2086|  10.9k|      ixheaacd_allocate_aac_scr(
 2087|  10.9k|          &aac_scratch_struct, p_state_enhaacplus_dec->aac_scratch_mem_v,
 2088|  10.9k|          time_data, 1, p_obj_exhaacplus_dec->aac_config.ui_max_channels,
 2089|  10.9k|          p_state_enhaacplus_dec->audio_object_type);
 2090|       |
 2091|  10.9k|      p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->p_ind_channel_info =
 2092|  10.9k|          &p_state_enhaacplus_dec->ind_cc_info;
 2093|  10.9k|      if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (2093:11): [True: 0, False: 10.9k]
  ------------------
 2094|      0|        p_obj_exhaacplus_dec->aac_config.first_frame = 1;
 2095|      0|      }
 2096|       |
 2097|  10.9k|      error_code = ixheaacd_aacdec_decodeframe(
 2098|  10.9k|          p_obj_exhaacplus_dec, &aac_scratch_struct, time_data, frame_status, &type, &ch_idx, 1,
 2099|  10.9k|          2, p_obj_exhaacplus_dec->aac_config.element_instance_order, 0, 1, 0,
 2100|  10.9k|          p_obj_exhaacplus_dec->aac_config.ui_max_channels, 2,
 2101|  10.9k|          p_obj_exhaacplus_dec->p_state_aac->frame_length,
 2102|  10.9k|          p_obj_exhaacplus_dec->p_state_aac->frame_size, p_state_enhaacplus_dec->pstr_drc_dec,
 2103|  10.9k|          p_state_enhaacplus_dec->audio_object_type, p_state_enhaacplus_dec->ch_config,
 2104|  10.9k|          p_state_enhaacplus_dec->eld_specific_config, p_state_enhaacplus_dec->s_adts_hdr_present,
 2105|  10.9k|          &p_state_enhaacplus_dec->drc_dummy, p_state_enhaacplus_dec->ldmps_present,
 2106|  10.9k|          &p_state_enhaacplus_dec->slot_pos, mps_buffer, &p_state_enhaacplus_dec->mps_header,
 2107|  10.9k|          &p_state_enhaacplus_dec->ui_mps_out_bytes, 1,
 2108|  10.9k|          p_obj_exhaacplus_dec->aac_config.first_frame);
 2109|       |
 2110|  10.9k|      if (p_state_enhaacplus_dec->pstr_drc_dec->drc_element_found == 1) {
  ------------------
  |  Branch (2110:11): [True: 417, False: 10.5k]
  ------------------
 2111|    417|        if (p_obj_exhaacplus_dec->aac_config.i_loud_ref_level < 0) {
  ------------------
  |  Branch (2111:13): [True: 0, False: 417]
  ------------------
 2112|      0|          p_obj_exhaacplus_dec->aac_config.output_level =
 2113|      0|              p_state_enhaacplus_dec->pstr_drc_dec->prog_ref_level;
 2114|    417|        } else {
 2115|    417|          p_obj_exhaacplus_dec->aac_config.output_level =
 2116|    417|              p_obj_exhaacplus_dec->aac_config.i_loud_ref_level;
 2117|    417|        }
 2118|    417|      }
 2119|       |
 2120|  10.9k|      memset(&(p_obj_exhaacplus_dec->p_state_aac->pstr_aac_dec_info[ch_idx]
 2121|  10.9k|                   ->pstr_aac_dec_ch_info[0]
 2122|  10.9k|                   ->str_ics_info.ltp),
 2123|  10.9k|             0, sizeof(ltp_info));
 2124|  10.9k|      memset(&(p_obj_exhaacplus_dec->p_state_aac->pstr_aac_dec_info[ch_idx]
 2125|  10.9k|                   ->pstr_aac_dec_ch_info[0]
 2126|  10.9k|                   ->str_ics_info.ltp2),
 2127|  10.9k|             0, sizeof(ltp_info));
 2128|  10.9k|      memset(&(p_obj_exhaacplus_dec->p_state_aac->pstr_aac_dec_info[ch_idx]
 2129|  10.9k|                   ->pstr_aac_dec_ch_info[1]
 2130|  10.9k|                   ->str_ics_info.ltp),
 2131|  10.9k|             0, sizeof(ltp_info));
 2132|  10.9k|      memset(&(p_obj_exhaacplus_dec->p_state_aac->pstr_aac_dec_info[ch_idx]
 2133|  10.9k|                   ->pstr_aac_dec_ch_info[1]
 2134|  10.9k|                   ->str_ics_info.ltp2),
 2135|  10.9k|             0, sizeof(ltp_info));
 2136|       |
 2137|  10.9k|      {
 2138|       |
 2139|  10.9k|        frame_size_1 = p_state_enhaacplus_dec->frame_length;
 2140|  10.9k|        sample_rate_1 =
 2141|  10.9k|            p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->sampling_rate;
 2142|  10.9k|        num_channels_1 =
 2143|  10.9k|            p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->channels;
 2144|  10.9k|      }
 2145|       |
 2146|  10.9k|      if ((p_obj_exhaacplus_dec->aac_config.ui_max_channels <= 2) &&
  ------------------
  |  Branch (2146:11): [True: 0, False: 10.9k]
  ------------------
 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.9k|      if (p_state_enhaacplus_dec->pstr_stream_sbr[0][0].no_elements) {
  ------------------
  |  Branch (2152:11): [True: 1.78k, False: 9.20k]
  ------------------
 2153|  1.78k|        sbr_present_flag = 1;
 2154|  1.78k|        p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 1;
 2155|  1.78k|      }
 2156|       |
 2157|  10.9k|      if (error_code) {
  ------------------
  |  Branch (2157:11): [True: 326, False: 10.6k]
  ------------------
 2158|    326|        if (p_state_enhaacplus_dec->ui_input_over) {
  ------------------
  |  Branch (2158:13): [True: 0, False: 326]
  ------------------
 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|    326|        ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
 2163|    326|        return error_code;
 2164|    326|      }
 2165|       |
 2166|  10.6k|      if (p_state_enhaacplus_dec->s_adts_hdr_present) {
  ------------------
  |  Branch (2166:11): [True: 5.62k, False: 5.03k]
  ------------------
 2167|  5.62k|        if (adts.no_raw_data_blocks != 0) {
  ------------------
  |  Branch (2167:13): [True: 3.24k, False: 2.38k]
  ------------------
 2168|  3.24k|          if (adts.protection_absent == 0 && it_bit_buff->cnt_bits >= 16) {
  ------------------
  |  Branch (2168:15): [True: 68, False: 3.17k]
  |  Branch (2168:46): [True: 62, False: 6]
  ------------------
 2169|     62|            adts.crc_check = ixheaacd_read_bits_buf(it_bit_buff, 16);
 2170|     62|          }
 2171|  3.24k|        }
 2172|  5.62k|        p_state_enhaacplus_dec->b_n_raw_data_blk--;
 2173|  5.62k|      }
 2174|       |
 2175|  10.6k|      sample_rate_2 = sample_rate_1;
 2176|  10.6k|      frame_size_2 = frame_size_1;
 2177|       |
 2178|  10.6k|      if (!p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] &&
  ------------------
  |  Branch (2178:11): [True: 10.0k, False: 644]
  ------------------
 2179|  10.0k|          p_state_enhaacplus_dec->pstr_stream_sbr[0][0].no_elements) {
  ------------------
  |  Branch (2179:11): [True: 1.77k, False: 8.23k]
  ------------------
 2180|  1.77k|        WORD32 harmonic_sbr_flag = 0;
 2181|  1.77k|        if ((p_obj_exhaacplus_dec->aac_config.flag_16khz_out == 1) &&
  ------------------
  |  Branch (2181:13): [True: 0, False: 1.77k]
  ------------------
 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.77k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = ixheaacd_init_sbr(
 2187|  1.77k|            sample_rate_1, frame_size_1,
 2188|  1.77k|            (FLAG *)&p_obj_exhaacplus_dec->aac_config.down_sample_flag,
 2189|  1.77k|            p_state_enhaacplus_dec->sbr_persistent_mem_v,
 2190|  1.77k|            p_state_enhaacplus_dec->ptr_overlap_buf, MAXNRSBRCHANNELS, (WORD)1,
  ------------------
  |  |   54|  1.77k|#define MAXNRSBRCHANNELS 2
  ------------------
 2191|  1.77k|            1, frame_size_1 * 2, &harmonic_sbr_flag, NULL,
 2192|  1.77k|            p_state_enhaacplus_dec->str_sbr_config,
 2193|  1.77k|            p_state_enhaacplus_dec->audio_object_type,
 2194|  1.77k|            p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
 2195|  1.77k|                .ldmps_present_flag,
 2196|  1.77k|            p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
 2197|  1.77k|                .no_ldsbr_present);
 2198|  1.77k|        if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (2198:13): [True: 1.76k, False: 12]
  ------------------
 2199|  1.76k|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->xaac_jmp_buf =
 2200|  1.76k|              &(p_state_enhaacplus_dec->xaac_jmp_buf);
 2201|  1.76k|        }
 2202|  8.88k|      } else {
 2203|  8.88k|      }
 2204|       |
 2205|  10.6k|      if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] &&
  ------------------
  |  Branch (2205:11): [True: 1.76k, False: 8.89k]
  ------------------
 2206|  1.76k|          p_state_enhaacplus_dec->pstr_stream_sbr[0][0].no_elements) {
  ------------------
  |  Branch (2206:11): [True: 1.76k, False: 0]
  ------------------
 2207|  1.76k|        ia_sbr_scr_struct sbr_scratch_struct;
 2208|  1.76k|        WORD16 num_channels_1_t = num_channels_1;
 2209|  1.76k|        ixheaacd_allocate_sbr_scr(&sbr_scratch_struct, p_state_enhaacplus_dec->aac_scratch_mem_v,
 2210|  1.76k|                                  time_data, 0, NULL, 0, 0);
 2211|  1.76k|        {
 2212|  1.76k|          WORD32 audio_object_type = p_state_enhaacplus_dec->audio_object_type;
 2213|       |
 2214|  1.76k|          if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (2214:15): [True: 403, False: 1.36k]
  |  Branch (2214:54): [True: 403, False: 0]
  ------------------
 2215|    403|            WORD32 i = 0;
 2216|    403|            ia_dec_data_struct *pstr_dec_data =
 2217|    403|                (ia_dec_data_struct *)p_state_enhaacplus_dec->pstr_dec_data;
 2218|    403|            if (num_channels_1 == 1) {
  ------------------
  |  Branch (2218:17): [True: 358, False: 45]
  ------------------
 2219|   366k|              for (; i < 1024; i++) {
  ------------------
  |  Branch (2219:22): [True: 366k, False: 358]
  ------------------
 2220|   366k|                pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
 2221|   366k|                    ((FLOAT32)time_data[i]);
 2222|   366k|              }
 2223|    358|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
 2224|    358|                  &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
 2225|       |
 2226|    358|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
 2227|    358|                  &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
 2228|    358|            } else if (num_channels_1 == 2) {
  ------------------
  |  Branch (2228:24): [True: 45, False: 0]
  ------------------
 2229|  46.1k|              for (; i < 1024; i++) {
  ------------------
  |  Branch (2229:22): [True: 46.0k, False: 45]
  ------------------
 2230|  46.0k|                pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
 2231|  46.0k|                    ((FLOAT32)time_data[2 * i + 0]);
 2232|  46.0k|                pstr_dec_data->str_usac_data.time_sample_vector[1][i] =
 2233|  46.0k|                    ((FLOAT32)time_data[2 * i + 1]);
 2234|  46.0k|              }
 2235|     45|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
 2236|     45|                  &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
 2237|       |
 2238|     45|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
 2239|     45|                  &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
 2240|     45|            }
 2241|    403|          }
 2242|  1.76k|        }
 2243|  1.76k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->ec_flag =
 2244|  1.76k|            p_obj_exhaacplus_dec->aac_config.ui_err_conceal;
 2245|  1.76k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->esbr_hq =
 2246|  1.76k|            p_obj_exhaacplus_dec->aac_config.ui_hq_esbr;
 2247|  1.76k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->enh_sbr =
 2248|  1.76k|            p_obj_exhaacplus_dec->aac_config.ui_enh_sbr;
 2249|  1.76k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->enh_sbr_ps =
 2250|  1.76k|            p_obj_exhaacplus_dec->aac_config.ui_enh_sbr_ps;
 2251|       |
 2252|  1.76k|        if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (2252:13): [True: 1.76k, False: 0]
  ------------------
 2253|  1.76k|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->xaac_jmp_buf =
 2254|  1.76k|              &(p_state_enhaacplus_dec->xaac_jmp_buf);
 2255|  1.76k|        }
 2256|       |
 2257|  1.76k|        if (ixheaacd_applysbr(p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx],
  ------------------
  |  Branch (2257:13): [True: 17, False: 1.75k]
  ------------------
 2258|  1.76k|                              &p_state_enhaacplus_dec->pstr_stream_sbr[0][0], time_data,
 2259|  1.76k|                              &num_channels_1, frame_status,
 2260|  1.76k|                              p_obj_exhaacplus_dec->aac_config.down_sample_flag, 0,
 2261|  1.76k|                              &sbr_scratch_struct, 1, 1, 0, NULL, NULL,
 2262|  1.76k|                              p_state_enhaacplus_dec->eld_specific_config.ld_sbr_flag_present,
 2263|  1.76k|                              p_state_enhaacplus_dec->audio_object_type, 1,
 2264|  1.76k|                              p_state_enhaacplus_dec->ldmps_present, frame_size_1,
 2265|  1.76k|                              p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present,
 2266|  1.76k|                              p_obj_exhaacplus_dec->aac_config.ui_err_conceal,
 2267|  1.76k|                              p_obj_exhaacplus_dec->aac_config.first_frame) != SBRDEC_OK) {
  ------------------
  |  |   33|  1.76k|#define SBRDEC_OK 0
  ------------------
 2268|     17|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = 0;
 2269|     17|          return -1;
 2270|  1.75k|        } else {
 2271|  1.75k|          if (!p_obj_exhaacplus_dec->aac_config.down_sample_flag) {
  ------------------
  |  Branch (2271:15): [True: 887, False: 863]
  ------------------
 2272|    887|            sample_rate_1 *= 2;
 2273|    887|          }
 2274|  1.75k|          if (p_state_enhaacplus_dec->eld_specific_config.ld_sbr_flag_present == 1) {
  ------------------
  |  Branch (2274:15): [True: 1.32k, False: 430]
  ------------------
 2275|  1.32k|            p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.pre_mix_req = 1;
 2276|  1.32k|            ixheaacd_mps_payload(
 2277|  1.32k|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx],
 2278|  1.32k|              p_obj_exhaacplus_dec);
 2279|  1.32k|          }
 2280|  1.75k|        }
 2281|  1.75k|        {
 2282|  1.75k|          WORD32 audio_object_type = p_state_enhaacplus_dec->audio_object_type;
 2283|       |
 2284|  1.75k|          if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (2284:15): [True: 403, False: 1.34k]
  |  Branch (2284:54): [True: 403, False: 0]
  ------------------
 2285|    403|            WORD32 out_bytes = 0;
 2286|    403|            ia_dec_data_struct *pstr_dec_data =
 2287|    403|                (ia_dec_data_struct *)p_state_enhaacplus_dec->pstr_dec_data;
 2288|    403|            ixheaacd_samples_sat((WORD8 *)time_data, 2048, 16,
 2289|    403|                                 pstr_dec_data->str_usac_data.time_sample_vector, &out_bytes, 1);
 2290|    403|          }
 2291|  1.75k|        }
 2292|  1.75k|        if (p_obj_exhaacplus_dec->aac_config.flag_downmix) {
  ------------------
  |  Branch (2292:13): [True: 0, False: 1.75k]
  ------------------
 2293|      0|          num_channels_1 = 1;
 2294|      0|        }
 2295|  1.75k|        if (num_channels_1_t == 1 && num_channels_1 == 2) ps_detected = 1;
  ------------------
  |  Branch (2295:13): [True: 710, False: 1.04k]
  |  Branch (2295:38): [True: 0, False: 710]
  ------------------
 2296|  8.89k|      } else {
 2297|  8.89k|        p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.no_ldsbr_present = 1;
 2298|  8.89k|      }
 2299|       |
 2300|  10.6k|      p_state_enhaacplus_dec->i_bytes_consumed = 0;
 2301|  10.6k|      p_state_enhaacplus_dec->pstr_bit_buf = it_bit_buff;
 2302|       |
 2303|  10.6k|      {
 2304|  10.6k|        p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx] =
 2305|  10.6k|            ixheaacd_aac_decoder_init(
 2306|  10.6k|                p_state_enhaacplus_dec,
 2307|  10.6k|                p_state_enhaacplus_dec->pstr_stream_sbr[0], 2,
 2308|  10.6k|                p_state_enhaacplus_dec->aac_persistent_mem_v,
 2309|  10.6k|                p_state_enhaacplus_dec->frame_length);
 2310|       |
 2311|  10.6k|        if (!p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]) {
  ------------------
  |  Branch (2311:13): [True: 0, False: 10.6k]
  ------------------
 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.6k|        if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (2316:13): [True: 1.69k, False: 8.94k]
  ------------------
 2317|  1.69k|          WORD32 harmonic_sbr_flag = 0;
 2318|  1.69k|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = ixheaacd_init_sbr(
 2319|  1.69k|              sample_rate_2, frame_size_2,
 2320|  1.69k|              (FLAG *)&p_obj_exhaacplus_dec->aac_config.down_sample_flag,
 2321|  1.69k|              p_state_enhaacplus_dec->sbr_persistent_mem_v,
 2322|  1.69k|              p_state_enhaacplus_dec->ptr_overlap_buf, MAXNRSBRCHANNELS, 1, 1,
  ------------------
  |  |   54|  1.69k|#define MAXNRSBRCHANNELS 2
  ------------------
 2323|  1.69k|              frame_size_2 * 2, &harmonic_sbr_flag, NULL,
 2324|  1.69k|              p_state_enhaacplus_dec->str_sbr_config,
 2325|  1.69k|              p_state_enhaacplus_dec->audio_object_type,
 2326|  1.69k|              p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
 2327|  1.69k|                .ldmps_present_flag,
 2328|  1.69k|              p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
 2329|  1.69k|                .no_ldsbr_present);
 2330|  1.69k|        }
 2331|  10.6k|        if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (2331:13): [True: 1.69k, False: 8.94k]
  ------------------
 2332|  1.69k|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->xaac_jmp_buf =
 2333|  1.69k|              &(p_state_enhaacplus_dec->xaac_jmp_buf);
 2334|  1.69k|        }
 2335|  10.6k|      }
 2336|       |
 2337|  10.6k|      if (sample_rate < sample_rate_1) sample_rate = sample_rate_1;
  ------------------
  |  Branch (2337:11): [True: 8.16k, False: 2.48k]
  ------------------
 2338|       |
 2339|  10.6k|      ch_idx++;
 2340|       |
 2341|  10.6k|      if (p_state_enhaacplus_dec->audio_object_type >= ER_OBJECT_START &&
  ------------------
  |  |   64|  21.2k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (2341:11): [True: 3.33k, False: 7.30k]
  ------------------
 2342|  3.33k|          (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (2342:12): [True: 1.71k, False: 1.62k]
  ------------------
 2343|  1.62k|          p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (2343:11): [True: 937, False: 684]
  ------------------
 2344|    684|          p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LC))
  ------------------
  |  Branch (2344:11): [True: 664, False: 20]
  ------------------
 2345|  3.31k|        break;
 2346|  10.6k|    }
 2347|       |
 2348|  7.41k|    {
 2349|  7.41k|      ia_adts_crc_info_struct *ptr_adts_crc_info =
 2350|  7.41k|          p_state_enhaacplus_dec->ptr_bit_stream->pstr_adts_crc_info;
 2351|  7.41k|      if (ptr_adts_crc_info->crc_active == 1) {
  ------------------
  |  Branch (2351:11): [True: 40, False: 7.37k]
  ------------------
 2352|     40|        if ((error_code = ixheaacd_adts_crc_check_crc(ptr_adts_crc_info))) {
  ------------------
  |  Branch (2352:13): [True: 40, False: 0]
  ------------------
 2353|     40|          return error_code;
 2354|     40|        }
 2355|     40|      }
 2356|  7.41k|    }
 2357|       |
 2358|  7.37k|    {
 2359|  7.37k|      VOID *temp;
 2360|  7.37k|      WORD prev_persistent_used_t;
 2361|  7.37k|      WORD prev_sbrpersistent_used_t;
 2362|  7.37k|      WORD ps_enable;
 2363|  7.37k|      WORD ch_idx_err = 0;
 2364|  7.37k|      WORD persistent_used_t = 0;
 2365|  7.37k|      WORD channel_check = 0;
 2366|  7.37k|      WORD cc_channel_check = 0;
 2367|  7.37k|      WORD max_ch_num = p_obj_exhaacplus_dec->aac_config.ui_max_channels;
 2368|  7.37k|      WORD32 harmonic_sbr_flag = 0;
 2369|  7.37k|      i = 0;
 2370|       |
 2371|  7.37k|      p_obj_exhaacplus_dec->aac_config.ui_n_channels = ch_idx;
 2372|  16.3k|      while (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx_err] <= 3 &&
  ------------------
  |  Branch (2372:14): [True: 16.7k, False: 18.4E]
  ------------------
 2373|  16.7k|             p_obj_exhaacplus_dec->aac_config.element_type[ch_idx_err] >= 0) {
  ------------------
  |  Branch (2373:14): [True: 9.00k, False: 7.72k]
  ------------------
 2374|  9.00k|        ch_idx_err++;
 2375|  9.00k|      }
 2376|       |
 2377|  7.37k|      if (ch_idx_err == 0) {
  ------------------
  |  Branch (2377:11): [True: 11, False: 7.36k]
  ------------------
 2378|     11|        p_obj_exhaacplus_dec->p_state_aac->header_dec_done = 0;
 2379|     11|        p_state_enhaacplus_dec->i_bytes_consumed = (WORD32)(
 2380|     11|            it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base);
 2381|     11|        return IA_XHEAAC_DEC_INIT_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |   80|     11|#define IA_XHEAAC_DEC_INIT_NONFATAL_DECODE_FRAME_ERROR 0x00001004
  ------------------
 2382|     11|      }
 2383|       |
 2384|  7.36k|      if (ch_idx_err == 1)
  ------------------
  |  Branch (2384:11): [True: 7.18k, False: 172]
  ------------------
 2385|  7.18k|        ps_enable = 1;
 2386|    172|      else
 2387|    172|        ps_enable = 0;
 2388|       |
 2389|  12.9k|      while (p_obj_exhaacplus_dec->aac_config.element_type[i] >= 0 &&
  ------------------
  |  Branch (2389:14): [True: 8.99k, False: 3.97k]
  ------------------
 2390|  8.99k|             p_obj_exhaacplus_dec->aac_config.element_type[i] <= 3) {
  ------------------
  |  Branch (2390:14): [True: 8.99k, False: 0]
  ------------------
 2391|  8.99k|        WORD32 channel = 0;
 2392|  8.99k|        switch (p_obj_exhaacplus_dec->aac_config.element_type[i]) {
 2393|  5.98k|          case 0:
  ------------------
  |  Branch (2393:11): [True: 5.98k, False: 3.00k]
  ------------------
 2394|  7.17k|          case 3:
  ------------------
  |  Branch (2394:11): [True: 1.19k, False: 7.79k]
  ------------------
 2395|  7.17k|            channel = 1;
 2396|  7.17k|            break;
 2397|  1.52k|          case 1:
  ------------------
  |  Branch (2397:11): [True: 1.52k, False: 7.46k]
  ------------------
 2398|  1.52k|            channel = 2;
 2399|  1.52k|            break;
 2400|    288|          case 2:
  ------------------
  |  Branch (2400:11): [True: 288, False: 8.70k]
  ------------------
 2401|    288|            if (max_ch_num > 2) {
  ------------------
  |  Branch (2401:17): [True: 288, False: 0]
  ------------------
 2402|    288|              if (p_obj_exhaacplus_dec->aac_config.element_instance_order[i] !=
  ------------------
  |  Branch (2402:19): [True: 183, False: 105]
  ------------------
 2403|    288|                  p_obj_exhaacplus_dec->aac_config.ui_coupling_channel) {
 2404|    183|                i++;
 2405|    183|                continue;
 2406|    183|              }
 2407|    105|              channel = 1;
 2408|    105|            } else {
 2409|      0|              i++;
 2410|      0|              continue;
 2411|      0|            }
 2412|    105|            cc_channel_check++;
 2413|    105|            break;
 2414|      0|          default:
  ------------------
  |  Branch (2414:11): [True: 0, False: 8.99k]
  ------------------
 2415|      0|            return -1;
 2416|  8.99k|        }
 2417|       |
 2418|  8.80k|        if (cc_channel_check > MAX_CC_CHANNEL_NUM)
  ------------------
  |  |   23|  8.80k|#define MAX_CC_CHANNEL_NUM (2)
  ------------------
  |  Branch (2418:13): [True: 1, False: 8.80k]
  ------------------
 2419|      1|          return IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE;
  ------------------
  |  |  119|      1|#define IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE 0xFFFF9800
  ------------------
 2420|  8.80k|        if (ps_enable == 1) {
  ------------------
  |  Branch (2420:13): [True: 7.17k, False: 1.63k]
  ------------------
 2421|  7.17k|          channel = 2;
 2422|  7.17k|        }
 2423|       |
 2424|  8.80k|        if (p_obj_exhaacplus_dec->aac_config.element_type[i] != 2) {
  ------------------
  |  Branch (2424:13): [True: 8.70k, False: 104]
  ------------------
 2425|  8.70k|          channel_check += channel;
 2426|  8.70k|        }
 2427|       |
 2428|  8.80k|        if (channel_check > max_ch_num) {
  ------------------
  |  Branch (2428:13): [True: 4, False: 8.80k]
  ------------------
 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.80k|        temp = p_state_enhaacplus_dec->aac_persistent_mem_v;
 2434|       |
 2435|  8.80k|        prev_persistent_used_t = persistent_used_t;
 2436|       |
 2437|  8.80k|        ixheaacd_allocate_mem_persistent(
 2438|  8.80k|            p_obj_exhaacplus_dec, p_state_enhaacplus_dec, channel,
 2439|  8.80k|            &persistent_used_t, &prev_sbrpersistent_used_t, ps_enable);
 2440|       |
 2441|  8.80k|        p_state_enhaacplus_dec->aac_persistent_mem_v = temp;
 2442|  8.80k|        p_state_enhaacplus_dec->last_frame_ok = 1;
 2443|       |
 2444|  8.80k|        p_state_enhaacplus_dec->num_channel_last = 0;
 2445|  8.80k|        p_state_enhaacplus_dec->ui_init_done = 0;
 2446|  8.80k|        p_state_enhaacplus_dec->ui_input_over = 0;
 2447|  8.80k|        p_state_enhaacplus_dec->ptr_bit_stream =
 2448|  8.80k|            p_state_enhaacplus_dec->pstr_bit_buf;
 2449|       |
 2450|  8.80k|        p_state_enhaacplus_dec->pstr_aac_dec_info[i] = 0;
 2451|       |
 2452|  8.80k|        p_state_enhaacplus_dec->pstr_aac_dec_info[i] =
 2453|  8.80k|            ixheaacd_aac_decoder_init(
 2454|  8.80k|                p_state_enhaacplus_dec,
 2455|  8.80k|                p_state_enhaacplus_dec->pstr_stream_sbr[i], channel,
 2456|  8.80k|                (WORD8 *)p_state_enhaacplus_dec->aac_persistent_mem_v +
 2457|  8.80k|                    prev_persistent_used_t,
 2458|  8.80k|                p_state_enhaacplus_dec->frame_length);
 2459|       |
 2460|  8.80k|        if (!p_state_enhaacplus_dec->pstr_aac_dec_info[i]) {
  ------------------
  |  Branch (2460:13): [True: 0, False: 8.80k]
  ------------------
 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.80k|        p_state_enhaacplus_dec->str_sbr_dec_info[i] = ixheaacd_init_sbr(
 2466|  8.80k|            sample_rate_2, frame_size_2,
 2467|  8.80k|            (FLAG *)&p_obj_exhaacplus_dec->aac_config.down_sample_flag,
 2468|  8.80k|            p_state_enhaacplus_dec->sbr_persistent_mem_v,
 2469|  8.80k|            p_state_enhaacplus_dec->ptr_overlap_buf, channel, ps_enable, 1,
 2470|  8.80k|            frame_size_2 * 2, &harmonic_sbr_flag, NULL,
 2471|  8.80k|            p_state_enhaacplus_dec->str_sbr_config,
 2472|  8.80k|            p_state_enhaacplus_dec->audio_object_type,
 2473|  8.80k|            p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
 2474|  8.80k|                .ldmps_present_flag,
 2475|  8.80k|            p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
 2476|  8.80k|                .no_ldsbr_present);
 2477|  8.80k|        if (p_state_enhaacplus_dec->str_sbr_dec_info[i]) {
  ------------------
  |  Branch (2477:13): [True: 8.76k, False: 41]
  ------------------
 2478|  8.76k|          p_state_enhaacplus_dec->str_sbr_dec_info[i]->xaac_jmp_buf =
 2479|  8.76k|              &(p_state_enhaacplus_dec->xaac_jmp_buf);
 2480|  8.76k|        }
 2481|  8.80k|        if ((sbr_present_flag &&
  ------------------
  |  Branch (2481:14): [True: 1.74k, False: 7.06k]
  ------------------
 2482|  1.74k|            ((p_obj_exhaacplus_dec->p_state_aac->audio_object_type ==
  ------------------
  |  Branch (2482:14): [True: 412, False: 1.32k]
  ------------------
 2483|  1.74k|              AOT_AAC_LC) ||
 2484|  1.32k|             (p_obj_exhaacplus_dec->p_state_aac->audio_object_type ==
  ------------------
  |  Branch (2484:14): [True: 0, False: 1.32k]
  ------------------
 2485|  1.32k|              AOT_SBR) ||
 2486|  1.32k|             (p_obj_exhaacplus_dec->p_state_aac->audio_object_type ==
  ------------------
  |  Branch (2486:14): [True: 0, False: 1.32k]
  ------------------
 2487|  1.32k|               AOT_PS))) ||
 2488|  8.39k|            ((p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
  ------------------
  |  Branch (2488:14): [True: 270, False: 8.12k]
  ------------------
 2489|  8.39k|                  .ldmps_present_flag == 1) &&
 2490|    270|             (p_obj_exhaacplus_dec->p_state_aac->audio_object_type ==
  ------------------
  |  Branch (2490:14): [True: 270, False: 0]
  ------------------
 2491|    270|              AOT_ER_AAC_ELD)))
 2492|    682|          p_obj_exhaacplus_dec->aac_config.flag_to_stereo = 1;
 2493|  8.80k|        copy_qmf_to_ldmps(&p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle,
 2494|  8.80k|                          p_state_enhaacplus_dec->sbr_persistent_mem_v);
 2495|  8.80k|        if (p_state_enhaacplus_dec->audio_object_type == AOT_AAC_LC &&
  ------------------
  |  Branch (2495:13): [True: 4.79k, False: 4.00k]
  ------------------
 2496|  4.79k|            p_state_enhaacplus_dec->ui_mps_out_bytes != 0) {
  ------------------
  |  Branch (2496:13): [True: 3.38k, False: 1.41k]
  ------------------
 2497|  3.38k|          p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present = 1;
 2498|  3.38k|          if (p_state_enhaacplus_dec->pstr_stream_sbr[0][0].no_elements) {
  ------------------
  |  Branch (2498:15): [True: 0, False: 3.38k]
  ------------------
 2499|      0|            p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.mps_with_sbr = 1;
 2500|      0|          }
 2501|  3.38k|          error_code =
 2502|  3.38k|              ixheaacd_aac_mps_init(p_obj_exhaacplus_dec, mps_buffer,
 2503|  3.38k|                                    p_state_enhaacplus_dec->ui_mps_out_bytes, sample_rate_1);
 2504|  3.38k|          if (error_code) return error_code;
  ------------------
  |  Branch (2504:15): [True: 66, False: 3.31k]
  ------------------
 2505|  3.31k|          p_obj_exhaacplus_dec->aac_config.ui_n_channels =
 2506|  3.31k|              p_state_enhaacplus_dec->heaac_mps_handle.num_output_channels_at;
 2507|  3.31k|          if (p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.mps_with_sbr == 1) {
  ------------------
  |  Branch (2507:15): [True: 0, False: 3.31k]
  ------------------
 2508|      0|            p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 1;
 2509|      0|          }
 2510|  3.31k|          if (p_obj_exhaacplus_dec->aac_config.element_type[i + 1] >= 0 &&
  ------------------
  |  Branch (2510:15): [True: 1, False: 3.31k]
  ------------------
 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.31k|          break;
 2515|  3.31k|        }
 2516|  5.41k|        i++;
 2517|  5.41k|      }
 2518|  7.28k|      p_state_enhaacplus_dec->pers_mem_ptr =
 2519|  7.28k|          (WORD8 *)p_state_enhaacplus_dec->aac_persistent_mem_v +
 2520|  7.28k|          persistent_used_t;
 2521|       |
 2522|  7.28k|      p_obj_exhaacplus_dec->aac_config.i_channel_mask =
 2523|  7.28k|          ixheaacd_get_channel_mask(p_obj_exhaacplus_dec);
 2524|       |
 2525|  7.28k|      {
 2526|  7.28k|        num_channels_1 = 0;
 2527|  7.28k|        ch_idx = 0;
 2528|  16.1k|        while (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] >= 0 &&
  ------------------
  |  Branch (2528:16): [True: 8.85k, False: 7.28k]
  ------------------
 2529|  8.85k|               p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] <= 3) {
  ------------------
  |  Branch (2529:16): [True: 8.85k, False: 0]
  ------------------
 2530|  8.85k|          if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == 0 ||
  ------------------
  |  Branch (2530:15): [True: 5.86k, False: 2.98k]
  ------------------
 2531|  2.98k|              p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == 3)
  ------------------
  |  Branch (2531:15): [True: 1.18k, False: 1.80k]
  ------------------
 2532|  7.05k|            num_channels_1 += 1;
 2533|  8.85k|          if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == 1)
  ------------------
  |  Branch (2533:15): [True: 1.52k, False: 7.33k]
  ------------------
 2534|  1.52k|            num_channels_1 += 2;
 2535|  8.85k|          ch_idx++;
 2536|  8.85k|        }
 2537|       |
 2538|  7.28k|        if (ch_idx == 2 && num_channels_1 == 2) {
  ------------------
  |  Branch (2538:13): [True: 240, False: 7.04k]
  |  Branch (2538:28): [True: 166, False: 74]
  ------------------
 2539|    166|          p_obj_exhaacplus_dec->aac_config.ui_channel_mode = 2;
 2540|    166|        }
 2541|  7.28k|        if (ch_idx == 1) {
  ------------------
  |  Branch (2541:13): [True: 7.09k, False: 198]
  ------------------
 2542|  7.09k|          if (num_channels_1 == 1)
  ------------------
  |  Branch (2542:15): [True: 5.74k, False: 1.35k]
  ------------------
 2543|  5.74k|            p_obj_exhaacplus_dec->aac_config.ui_channel_mode = 0;
 2544|  7.09k|          if (num_channels_1 == 2)
  ------------------
  |  Branch (2544:15): [True: 1.33k, False: 5.75k]
  ------------------
 2545|  1.33k|            p_obj_exhaacplus_dec->aac_config.ui_channel_mode = 1;
 2546|  7.09k|        }
 2547|       |
 2548|  7.28k|        if (ps_detected == 1 && num_channels_1 == 1) num_channels_1 = 2;
  ------------------
  |  Branch (2548:13): [True: 0, False: 7.28k]
  |  Branch (2548:33): [True: 0, False: 0]
  ------------------
 2549|  7.28k|      }
 2550|  7.28k|    }
 2551|  7.28k|    if (1 == p_obj_exhaacplus_dec->aac_config.downmix) num_channels_1 = 2;
  ------------------
  |  Branch (2551:9): [True: 0, False: 7.28k]
  ------------------
 2552|       |
 2553|  7.28k|    if (p_obj_exhaacplus_dec->aac_config.flag_downmix == 1) {
  ------------------
  |  Branch (2553:9): [True: 0, False: 7.28k]
  ------------------
 2554|      0|      num_channels_1 = 1;
 2555|      0|    }
 2556|       |
 2557|  7.28k|    if ((p_obj_exhaacplus_dec->aac_config.flag_to_stereo == 1) &&
  ------------------
  |  Branch (2557:9): [True: 599, False: 6.69k]
  ------------------
 2558|    599|        (ch_idx == 1 || num_channels_1 <= 2)) {
  ------------------
  |  Branch (2558:10): [True: 542, False: 57]
  |  Branch (2558:25): [True: 23, False: 34]
  ------------------
 2559|    565|      num_channels_1 = 2;
 2560|    565|    }
 2561|       |
 2562|  7.28k|    p_obj_exhaacplus_dec->aac_config.ui_n_channels = num_channels_1;
 2563|  7.28k|    p_obj_exhaacplus_dec->aac_config.ui_samp_freq = sample_rate;
 2564|  7.28k|    p_state_enhaacplus_dec->ui_init_done = 1;
 2565|       |
 2566|  7.28k|    memcpy(it_bit_buff, &temp_bit_buff, sizeof(struct ia_bit_buf_struct));
 2567|       |
 2568|  7.28k|    p_state_enhaacplus_dec->b_n_raw_data_blk = 0;
 2569|       |
 2570|  7.60k|    if (p_obj_exhaacplus_dec->p_state_aac->header_dec_done == 1) {
  ------------------
  |  Branch (2570:9): [True: 7.60k, False: 18.4E]
  ------------------
 2571|  7.60k|      p_obj_exhaacplus_dec->p_state_aac->header_dec_done = 0;
 2572|  7.60k|    }
 2573|  7.28k|  }
 2574|  16.4k|  return err_code;
 2575|  22.5k|}
ixheaacd_fill_slot_order:
 2579|  20.4k|                              WORD8 *ptr_tag_select, WORD32 *ptr_idx_no) {
 2580|  20.4k|  WORD32 i;
 2581|  20.4k|  WORD32 idx_no = *ptr_idx_no;
 2582|  20.4k|  WORD *p_slot_element = p_state_enhaacplus_dec->p_config->slot_element;
 2583|  20.4k|  WORD *p_element_type = p_state_enhaacplus_dec->p_config->element_type;
 2584|  20.4k|  WORD *p_element_instance_order =
 2585|  20.4k|      p_state_enhaacplus_dec->p_config->element_instance_order;
 2586|       |
 2587|  27.9k|  for (i = 0; i < ch; i++) {
  ------------------
  |  Branch (2587:15): [True: 7.51k, False: 20.4k]
  ------------------
 2588|  7.51k|    if (ptr_is_cpe[i] == 0) {
  ------------------
  |  Branch (2588:9): [True: 3.82k, False: 3.68k]
  ------------------
 2589|  3.82k|      *p_slot_element++ = idx_no++;
 2590|  3.82k|      *p_element_type++ = 0;
 2591|  3.82k|      *p_element_instance_order++ = ptr_tag_select[i];
 2592|  3.82k|    }
 2593|  7.51k|  }
 2594|  20.4k|  *ptr_idx_no = idx_no;
 2595|  20.4k|}
ixheaacd_fill_prog_config_slots:
 2598|  6.81k|    ia_aac_dec_state_struct *p_state_enhaacplus_dec) {
 2599|  6.81k|  WORD32 idx_no = 0;
 2600|       |
 2601|  6.81k|  ixheaacd_fill_slot_order(
 2602|  6.81k|      p_state_enhaacplus_dec, p_state_enhaacplus_dec->p_config->str_prog_config
 2603|  6.81k|                                  .num_front_channel_elements,
 2604|  6.81k|      p_state_enhaacplus_dec->p_config->str_prog_config.front_element_is_cpe,
 2605|  6.81k|      p_state_enhaacplus_dec->p_config->str_prog_config
 2606|  6.81k|          .front_element_tag_select,
 2607|  6.81k|      &idx_no);
 2608|       |
 2609|  6.81k|  ixheaacd_fill_slot_order(
 2610|  6.81k|      p_state_enhaacplus_dec, p_state_enhaacplus_dec->p_config->str_prog_config
 2611|  6.81k|                                  .num_side_channel_elements,
 2612|  6.81k|      p_state_enhaacplus_dec->p_config->str_prog_config.side_element_is_cpe,
 2613|  6.81k|      p_state_enhaacplus_dec->p_config->str_prog_config.side_element_tag_select,
 2614|  6.81k|      &idx_no);
 2615|       |
 2616|  6.81k|  ixheaacd_fill_slot_order(
 2617|  6.81k|      p_state_enhaacplus_dec, p_state_enhaacplus_dec->p_config->str_prog_config
 2618|  6.81k|                                  .num_back_channel_elements,
 2619|  6.81k|      p_state_enhaacplus_dec->p_config->str_prog_config.back_element_is_cpe,
 2620|  6.81k|      p_state_enhaacplus_dec->p_config->str_prog_config.back_element_tag_select,
 2621|  6.81k|      &idx_no);
 2622|  6.81k|}
ixheaacd_dec_execute:
 2625|   405k|    ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec) {
 2626|   405k|  ia_adts_header_struct adts = {0};
 2627|   405k|  ia_aac_dec_state_struct *p_state_enhaacplus_dec;
 2628|       |
 2629|   405k|  UWORD8 *in_buffer;
 2630|   405k|  WORD16 *time_data;
 2631|   405k|  WORD16 num_of_out_samples = 0;
 2632|   405k|  WORD16 frame_size = 0;
 2633|   405k|  WORD32 sample_rate_dec = 0;
 2634|   405k|  WORD32 sample_rate = 0;
 2635|   405k|  WORD16 num_ch = 0;
 2636|   405k|  struct ia_bit_buf_struct *it_bit_buff;
 2637|   405k|  UWORD8 *mps_buffer;
 2638|   405k|  WORD32 error_code = IA_NO_ERROR;
  ------------------
  |  |   23|   405k|#define IA_NO_ERROR 0x00000000
  ------------------
 2639|   405k|  WORD ch_idx1;
 2640|   405k|  WORD type;
 2641|   405k|  WORD total_channels = 0;
 2642|   405k|  WORD total_elements = 0;
 2643|   405k|  WORD16 *actual_out_buffer = NULL;
 2644|   405k|  WORD ps_enable;
 2645|   405k|  WORD esbr_mono_downmix = 0;
 2646|   405k|  WORD8 element_used[MAX_BS_ELEMENT];
 2647|   405k|  WORD32 channel_coupling_flag = 0;
 2648|       |
 2649|   405k|  SIZE_T bytes_for_sync;
  ------------------
  |  |   28|   405k|#define SIZE_T size_t
  ------------------
 2650|   405k|  WORD32 audio_mux_length_bytes_last = 0;
 2651|   405k|  WORD32 ret_val;
 2652|   405k|  WORD32 mps_out_samples;
 2653|       |
 2654|   405k|  p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 0;
 2655|   405k|  p_obj_exhaacplus_dec->aac_config.frame_status = 1;
 2656|       |
 2657|   405k|  if (p_obj_exhaacplus_dec->p_state_aac != NULL) {
  ------------------
  |  Branch (2657:7): [True: 405k, False: 0]
  ------------------
 2658|   405k|    ret_val = setjmp(p_obj_exhaacplus_dec->p_state_aac->xaac_jmp_buf);
 2659|   405k|    if (ret_val != 0) {
  ------------------
  |  Branch (2659:9): [True: 3.76k, False: 401k]
  ------------------
 2660|  3.76k|      p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
 2661|  3.76k|          p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
 2662|  3.76k|      p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = 0;
 2663|  3.76k|      p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 2664|  3.76k|      return IA_NO_ERROR;
  ------------------
  |  |   23|  3.76k|#define IA_NO_ERROR 0x00000000
  ------------------
 2665|  3.76k|    }
 2666|   405k|  }
 2667|       |
 2668|   401k|  time_data = (WORD16 *)(p_obj_exhaacplus_dec
 2669|   401k|                             ->pp_mem_aac[IA_ENHAACPLUS_DEC_OUTPUT_IDX]);
  ------------------
  |  |   35|   401k|#define IA_ENHAACPLUS_DEC_OUTPUT_IDX (3)
  ------------------
 2670|   401k|  in_buffer = p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_INPUT_IDX];
  ------------------
  |  |   34|   401k|#define IA_ENHAACPLUS_DEC_INPUT_IDX (2)
  ------------------
 2671|   401k|  p_state_enhaacplus_dec = p_obj_exhaacplus_dec->p_state_aac;
 2672|   401k|  p_state_enhaacplus_dec->aac_scratch_mem_v =
 2673|   401k|      p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_SCRATCH_IDX];
  ------------------
  |  |   33|   401k|#define IA_ENHAACPLUS_DEC_SCRATCH_IDX (1)
  ------------------
 2674|   401k|  p_state_enhaacplus_dec->mps_header = -1;
 2675|   401k|  mps_buffer = p_state_enhaacplus_dec->mps_buffer;
 2676|   401k|  it_bit_buff = p_state_enhaacplus_dec->pstr_bit_buf;
 2677|       |
 2678|   401k|  ch_idx1 = 0;
 2679|   401k|  p_state_enhaacplus_dec->i_bytes_consumed = 0;
 2680|       |
 2681|   401k|  if (p_state_enhaacplus_dec->audio_object_type == AOT_USAC) {
  ------------------
  |  Branch (2681:7): [True: 193k, False: 208k]
  ------------------
 2682|   193k|    WORD32 pcm_size = p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz;
 2683|   193k|    WORD8 *inbuffer = (WORD8 *)(p_obj_exhaacplus_dec
 2684|   193k|                                    ->pp_mem_aac[IA_ENHAACPLUS_DEC_INPUT_IDX]);
  ------------------
  |  |   34|   193k|#define IA_ENHAACPLUS_DEC_INPUT_IDX (2)
  ------------------
 2685|   193k|    WORD8 *outbuffer =
 2686|   193k|        (WORD8 *)(p_obj_exhaacplus_dec
 2687|   193k|                      ->pp_mem_aac[IA_ENHAACPLUS_DEC_OUTPUT_IDX]);
  ------------------
  |  |   35|   193k|#define IA_ENHAACPLUS_DEC_OUTPUT_IDX (3)
  ------------------
 2688|   193k|    WORD32 out_bytes = 0;
 2689|       |
 2690|   193k|    WORD32 frames_done = p_obj_exhaacplus_dec->p_state_aac->frame_counter;
 2691|       |
 2692|   193k|    ia_dec_data_struct *pstr_dec_data =
 2693|   193k|        (ia_dec_data_struct *)(p_obj_exhaacplus_dec->p_state_aac
 2694|   193k|                                   ->pstr_dec_data);
 2695|       |
 2696|   193k|    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: 193k]
  ------------------
 2697|       |
 2698|   193k|    if (p_obj_exhaacplus_dec->p_state_aac->ui_input_over == 0) {
  ------------------
  |  Branch (2698:9): [True: 193k, False: 0]
  ------------------
 2699|   193k|      ia_audio_specific_config_struct *ptr_audio_specific_config =
 2700|   193k|          ((ia_audio_specific_config_struct *)
 2701|   193k|               p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
 2702|       |
 2703|   193k|      ptr_audio_specific_config->str_usac_config.str_usac_dec_config
 2704|   193k|          .preroll_counter = 0;
 2705|   193k|      {
 2706|   193k|        WORD32 iii = 0;
 2707|   965k|        for (iii = 0; iii < (MAX_AUDIO_PREROLLS + 1); iii++) {
  ------------------
  |  |  249|   965k|#define MAX_AUDIO_PREROLLS 3
  ------------------
  |  Branch (2707:23): [True: 772k, False: 193k]
  ------------------
 2708|   772k|          ((ia_dec_data_struct *)(p_obj_exhaacplus_dec->p_state_aac
 2709|   772k|                                      ->pstr_dec_data))
 2710|   772k|              ->str_frame_data.str_audio_specific_config.str_usac_config
 2711|   772k|              .str_usac_dec_config.usac_ext_gain_payload_len[iii] = 0;
 2712|   772k|          ptr_audio_specific_config->str_usac_config.str_usac_dec_config
 2713|   772k|              .usac_ext_gain_payload_len[iii] =
 2714|   772k|              0;  // reinitilize the payload len buff
 2715|   772k|          ptr_audio_specific_config->str_usac_config.str_usac_dec_config
 2716|   772k|              .preroll_bytes[iii] = 0;
 2717|   772k|        }
 2718|   193k|      }
 2719|       |
 2720|   193k|      ((ia_dec_data_struct *)(p_obj_exhaacplus_dec->p_state_aac->pstr_dec_data))
 2721|   193k|          ->str_frame_data.str_audio_specific_config.str_usac_config
 2722|   193k|          .str_usac_dec_config.preroll_counter = 0;
 2723|   193k|      error_code = ixheaacd_dec_main(
 2724|   193k|          p_obj_exhaacplus_dec, inbuffer, outbuffer, &out_bytes, frames_done,
 2725|   193k|          pcm_size, &p_obj_exhaacplus_dec->p_state_aac->num_of_output_ch);
 2726|   193k|      if (error_code) {
  ------------------
  |  Branch (2726:11): [True: 966, False: 192k]
  ------------------
 2727|    966|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (2727:13): [True: 0, False: 966]
  ------------------
 2728|      0|          p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 2729|    966|        } else {
 2730|    966|          return error_code;
 2731|    966|        }
 2732|    966|      }
 2733|   192k|      p_obj_exhaacplus_dec->p_state_aac->frame_counter++;
 2734|   192k|    } else {
 2735|      0|      out_bytes = 0;
 2736|      0|    }
 2737|       |
 2738|   192k|    if (pstr_dec_data->str_usac_data.ec_flag == 0) {
  ------------------
  |  Branch (2738:9): [True: 190k, False: 1.85k]
  ------------------
 2739|   190k|      if (p_state_enhaacplus_dec->bs_format != LOAS_BSFORMAT) {
  ------------------
  |  |   29|   190k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (2739:11): [True: 1.66k, False: 188k]
  ------------------
 2740|  1.66k|        p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
 2741|  1.66k|            p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
 2742|  1.66k|      }
 2743|   190k|    } else {
 2744|  1.85k|      if (p_state_enhaacplus_dec->bs_format != LOAS_BSFORMAT) {
  ------------------
  |  |   29|  1.85k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (2744:11): [True: 0, False: 1.85k]
  ------------------
 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.85k|    }
 2767|       |
 2768|   192k|    p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = out_bytes;
 2769|   192k|    p_obj_exhaacplus_dec->aac_config.ui_n_channels =
 2770|   192k|        p_obj_exhaacplus_dec->p_state_aac->num_of_output_ch;
 2771|   192k|    pstr_dec_data->str_usac_data.sbr_parse_err_flag = 0;
 2772|       |
 2773|   192k|    return 0;
 2774|   193k|  }
 2775|       |
 2776|   446k|  while (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] <= 3 &&
  ------------------
  |  Branch (2776:10): [True: 450k, False: 18.4E]
  ------------------
 2777|   450k|         p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] >= 0) {
  ------------------
  |  Branch (2777:10): [True: 237k, False: 212k]
  ------------------
 2778|   237k|    if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] == 0 ||
  ------------------
  |  Branch (2778:9): [True: 177k, False: 60.3k]
  ------------------
 2779|   189k|        p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] == 3) {
  ------------------
  |  Branch (2779:9): [True: 12.2k, False: 48.0k]
  ------------------
 2780|   189k|      total_channels += 1;
 2781|   189k|      total_elements += 1;
 2782|   189k|    }
 2783|   237k|    if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] == 1) {
  ------------------
  |  Branch (2783:9): [True: 46.6k, False: 191k]
  ------------------
 2784|  46.6k|      total_elements += 1;
 2785|  46.6k|      total_channels += 2;
 2786|  46.6k|    }
 2787|   237k|    if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] == 2) {
  ------------------
  |  Branch (2787:9): [True: 1.38k, False: 236k]
  ------------------
 2788|  1.38k|      total_elements += 1;
 2789|  1.38k|    }
 2790|       |
 2791|   237k|    ch_idx1++;
 2792|   237k|    if (ch_idx1 > MAX_BS_ELEMENT) {
  ------------------
  |  |   24|   237k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|   237k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (2792:9): [True: 0, False: 237k]
  ------------------
 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|   237k|  }
 2799|       |
 2800|   208k|  if (ch_idx1 != 1) {
  ------------------
  |  Branch (2800:7): [True: 15.4k, False: 193k]
  ------------------
 2801|  15.4k|    ps_enable = 0;
 2802|  15.4k|    if (p_obj_exhaacplus_dec->aac_config.ui_max_channels > 2) {
  ------------------
  |  Branch (2802:9): [True: 15.4k, False: 0]
  ------------------
 2803|  15.4k|      WORD32 scratch_pointer;
 2804|       |
 2805|  15.4k|      scratch_pointer = (MAX_SCR_SIZE - SCR_INTER_SCR_SIZE);
  ------------------
  |  |  167|  15.4k|#define MAX_SCR_SIZE (max(max(HEAACV2_MAX_SIZE, ELDV2_MAX_SIZE), LD_MAX_SIZE))
  |  |  ------------------
  |  |  |  |   74|   123k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:20): [Folded, False: 15.4k]
  |  |  |  |  |  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: 15.4k]
  |  |  |  |  |  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: 15.4k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    scratch_pointer = (MAX_SCR_SIZE - SCR_INTER_SCR_SIZE);
  ------------------
  |  |  143|  15.4k|  (MAX_CHANNEL_COUNT *                                                              \
  |  |  ------------------
  |  |  |  |  212|  15.4k|#define MAX_CHANNEL_COUNT (128)
  |  |  ------------------
  |  |  144|  15.4k|   IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD16)), \
  |  |  ------------------
  |  |  |  |   87|  15.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  145|  15.4k|                            BYTE_ALIGN_8))
  ------------------
 2806|       |
 2807|  15.4k|      p_state_enhaacplus_dec->coup_ch_output =
 2808|  15.4k|          (WORD32 *)((WORD8 *)
 2809|  15.4k|                         p_obj_exhaacplus_dec->p_state_aac->aac_scratch_mem_v +
 2810|  15.4k|                     scratch_pointer);
 2811|  15.4k|    }
 2812|       |
 2813|  15.4k|  }
 2814|       |
 2815|   193k|  else {
 2816|   193k|    if (total_channels < (WORD)p_obj_exhaacplus_dec->aac_config.ui_n_channels)
  ------------------
  |  Branch (2816:9): [True: 20.9k, False: 172k]
  ------------------
 2817|  20.9k|      total_channels = p_obj_exhaacplus_dec->aac_config.ui_n_channels;
 2818|   193k|    ps_enable = 1;
 2819|   193k|  }
 2820|       |
 2821|   208k|  p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = 0;
 2822|   208k|  p_obj_exhaacplus_dec->p_state_aac->ui_mps_out_bytes = 0;
 2823|   208k|  if (p_state_enhaacplus_dec->ui_in_bytes == 0) {
  ------------------
  |  Branch (2823:7): [True: 0, False: 208k]
  ------------------
 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|   208k|  if (ch_idx1 == 0) {
  ------------------
  |  Branch (2874:7): [True: 0, False: 208k]
  ------------------
 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|   208k|  if (total_channels > (WORD)p_obj_exhaacplus_dec->aac_config.ui_max_channels) {
  ------------------
  |  Branch (2882:7): [True: 35, False: 208k]
  ------------------
 2883|     35|    p_state_enhaacplus_dec->i_bytes_consumed = 1;
 2884|     35|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (2884:9): [True: 0, False: 35]
  ------------------
 2885|      0|      p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 2886|     35|    } else {
 2887|     35|      return IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL;
  ------------------
  |  |   50|     35|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL 0x00000808
  ------------------
 2888|     35|    }
 2889|     35|  }
 2890|       |
 2891|   208k|  if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (2891:7): [True: 64.7k, False: 143k]
  ------------------
 2892|   143k|      p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (2892:7): [True: 58.3k, False: 85.6k]
  ------------------
 2893|   126k|    if (p_obj_exhaacplus_dec->aac_config.ui_mp4_flag)
  ------------------
  |  Branch (2893:9): [True: 379, False: 126k]
  ------------------
 2894|    379|      p_state_enhaacplus_dec->frame_size = p_state_enhaacplus_dec->ui_in_bytes;
 2895|   126k|  }
 2896|       |
 2897|   208k|  if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LC) {
  ------------------
  |  Branch (2897:7): [True: 38.3k, False: 170k]
  ------------------
 2898|  38.3k|    if (p_obj_exhaacplus_dec->aac_config.ui_mp4_flag)
  ------------------
  |  Branch (2898:9): [True: 141, False: 38.1k]
  ------------------
 2899|    141|      p_state_enhaacplus_dec->frame_size = 1024;
 2900|  38.3k|  }
 2901|       |
 2902|   208k|  {
 2903|   208k|    ixheaacd_create_init_bit_buf(it_bit_buff, in_buffer,
 2904|   208k|                                 p_state_enhaacplus_dec->ui_in_bytes);
 2905|   208k|    it_bit_buff->xaac_jmp_buf = &(p_state_enhaacplus_dec->xaac_jmp_buf);
 2906|       |
 2907|   208k|    it_bit_buff->adts_header_present =
 2908|   208k|        p_state_enhaacplus_dec->s_adts_hdr_present;
 2909|   208k|    it_bit_buff->no_raw_data_blocks =
 2910|   208k|        (WORD8)p_state_enhaacplus_dec->b_n_raw_data_blk;
 2911|   208k|    it_bit_buff->protection_absent = p_state_enhaacplus_dec->protection_absent;
 2912|       |
 2913|   208k|    if (p_state_enhaacplus_dec->s_adts_hdr_present) {
  ------------------
  |  Branch (2913:9): [True: 32.4k, False: 176k]
  ------------------
 2914|  32.4k|      if (p_state_enhaacplus_dec->b_n_raw_data_blk == 0) {
  ------------------
  |  Branch (2914:11): [True: 30.7k, False: 1.73k]
  ------------------
 2915|  30.7k|        WORD32 error;
 2916|       |
 2917|  30.7k|        error = ixheaacd_readifadts(p_state_enhaacplus_dec, it_bit_buff, &adts);
 2918|  30.7k|        if (error) {
  ------------------
  |  Branch (2918:13): [True: 819, False: 29.9k]
  ------------------
 2919|    819|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (2919:15): [True: 0, False: 819]
  ------------------
 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|    819|          } else {
 2925|    819|            return error;
 2926|    819|          }
 2927|    819|        }
 2928|       |
 2929|  29.9k|        if ((WORD32)p_state_enhaacplus_dec->sampling_rate !=
  ------------------
  |  Branch (2929:13): [True: 13, False: 29.9k]
  ------------------
 2930|  29.9k|            (WORD32)((p_obj_exhaacplus_dec->aac_tables.pstr_huffmann_tables
 2931|  29.9k|                          ->str_sample_rate_info[adts.samp_freq_index]
 2932|  29.9k|                          .sampling_frequency))) {
 2933|     13|          p_state_enhaacplus_dec->i_bytes_consumed = 0;
 2934|     13|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (2934:15): [True: 0, False: 13]
  ------------------
 2935|      0|            p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 2936|     13|          } else {
 2937|     13|            return IA_XHEAAC_DEC_EXE_NONFATAL_CHANGED_ADTS_SF;
  ------------------
  |  |  107|     13|#define IA_XHEAAC_DEC_EXE_NONFATAL_CHANGED_ADTS_SF 0x0000180C
  ------------------
 2938|     13|          }
 2939|     13|        }
 2940|  29.9k|      }
 2941|  32.4k|    }
 2942|       |
 2943|   207k|    bytes_for_sync = (SIZE_T)it_bit_buff->ptr_read_next;
 2944|       |
 2945|   207k|    if (p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT) {
  ------------------
  |  |   29|   207k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (2945:9): [True: 178k, False: 29.7k]
  ------------------
 2946|   178k|      WORD32 result, audio_mux_len_bytes_last;
 2947|   178k|      WORD32 cnt_bits = it_bit_buff->cnt_bits;
 2948|   178k|      WORD32 sync = ixheaacd_read_bits_buf(it_bit_buff, 11);
 2949|   178k|      UWORD32 curr_samp_rate = 0;
 2950|       |
 2951|   178k|      if (p_state_enhaacplus_dec->latm_initialized)
  ------------------
  |  Branch (2951:11): [True: 174k, False: 3.50k]
  ------------------
 2952|   174k|        curr_samp_rate =
 2953|   174k|            p_state_enhaacplus_dec->latm_struct_element.layer_info[0][0]
 2954|   174k|                .asc.sampling_freq;
 2955|       |
 2956|   144M|      while (sync != 0x2b7) {
  ------------------
  |  Branch (2956:14): [True: 144M, False: 177k]
  ------------------
 2957|   144M|        sync = ((sync & 0x3ff) << 1) | ixheaacd_read_bits_buf(it_bit_buff, 1);
 2958|   144M|        if (it_bit_buff->cnt_bits < 13) {
  ------------------
  |  Branch (2958:13): [True: 1.07k, False: 144M]
  ------------------
 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: 18, False: 1.06k]
  ------------------
 2964|     18|            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|   144M|      }
 2972|       |
 2973|   177k|      it_bit_buff->audio_mux_align = it_bit_buff->cnt_bits - 13;
 2974|       |
 2975|   177k|      audio_mux_len_bytes_last = ixheaacd_read_bits_buf(it_bit_buff, 13);
 2976|       |
 2977|   177k|      audio_mux_length_bytes_last = audio_mux_len_bytes_last;
 2978|       |
 2979|   177k|      bytes_for_sync = (SIZE_T)it_bit_buff->ptr_read_next - bytes_for_sync;
 2980|       |
 2981|   177k|      if (it_bit_buff->cnt_bits < (audio_mux_len_bytes_last << 3)) {
  ------------------
  |  Branch (2981:11): [True: 699, False: 176k]
  ------------------
 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|   176k|      } else {
 2990|   176k|        ixheaacd_read_bidirection(it_bit_buff, -(13));
 2991|   176k|      }
 2992|       |
 2993|   176k|      if (sync == 0x2b7) {
  ------------------
  |  Branch (2993:11): [True: 176k, False: 8]
  ------------------
 2994|   176k|        result = ixheaacd_latm_audio_mux_element(
 2995|   176k|            it_bit_buff, &p_state_enhaacplus_dec->latm_struct_element,
 2996|   176k|            p_state_enhaacplus_dec,
 2997|   176k|            (ia_sampling_rate_info_struct *)&p_obj_exhaacplus_dec->aac_tables
 2998|   176k|                .pstr_huffmann_tables->str_sample_rate_info[0]);
 2999|   176k|        if (result < 0) {
  ------------------
  |  Branch (2999:13): [True: 346, False: 176k]
  ------------------
 3000|    346|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3000:15): [True: 0, False: 346]
  ------------------
 3001|      0|            p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3002|    346|          } else {
 3003|    346|            return result;
 3004|    346|          }
 3005|    346|        }
 3006|   176k|        if (!p_state_enhaacplus_dec->latm_initialized) {
  ------------------
  |  Branch (3006:13): [True: 3.49k, False: 172k]
  ------------------
 3007|  3.49k|          p_state_enhaacplus_dec->sampling_rate =
 3008|  3.49k|              p_state_enhaacplus_dec->latm_struct_element.layer_info[0][0].asc.sampling_freq;
 3009|  3.49k|          p_state_enhaacplus_dec->latm_initialized = 1;
 3010|   172k|        } else {
 3011|   172k|          if (p_state_enhaacplus_dec->sampling_rate != curr_samp_rate) {
  ------------------
  |  Branch (3011:15): [True: 137, False: 172k]
  ------------------
 3012|    137|            p_state_enhaacplus_dec->i_bytes_consumed = 0;
 3013|    137|            if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3013:17): [True: 0, False: 137]
  ------------------
 3014|      0|              p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3015|    137|            } else {
 3016|    137|              return IA_XHEAAC_DEC_EXE_NONFATAL_CHANGED_ADTS_SF;
  ------------------
  |  |  107|    137|#define IA_XHEAAC_DEC_EXE_NONFATAL_CHANGED_ADTS_SF 0x0000180C
  ------------------
 3017|    137|            }
 3018|    137|          }
 3019|   172k|        }
 3020|   176k|      }
 3021|   176k|    }
 3022|   207k|  }
 3023|       |
 3024|   205k|  if (total_elements == 2 && total_channels == 2 &&
  ------------------
  |  Branch (3024:7): [True: 10.1k, False: 195k]
  |  Branch (3024:30): [True: 9.97k, False: 160]
  ------------------
 3025|  9.97k|      (p_state_enhaacplus_dec->p_config->ui_pce_found_in_hdr == 1 ||
  ------------------
  |  Branch (3025:8): [True: 4.29k, False: 5.67k]
  ------------------
 3026|  6.29k|       p_state_enhaacplus_dec->p_config->ui_pce_found_in_hdr == 3)) {
  ------------------
  |  Branch (3026:8): [True: 1.99k, False: 3.68k]
  ------------------
 3027|  6.29k|    ixheaacd_fill_prog_config_slots(p_state_enhaacplus_dec);
 3028|  6.29k|  }
 3029|       |
 3030|   205k|  memset(element_used, 0, sizeof(WORD8) * MAX_BS_ELEMENT);
  ------------------
  |  |   24|   205k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|   205k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 3031|       |
 3032|   205k|  if (it_bit_buff->cnt_bits <= 0) {
  ------------------
  |  Branch (3032:7): [True: 18, False: 205k]
  ------------------
 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|   205k|  { it_bit_buff->initial_cnt_bits = it_bit_buff->cnt_bits; }
 3043|       |
 3044|   205k|  if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (3044:7): [True: 67.5k, False: 138k]
  ------------------
 3045|  67.5k|    if (p_state_enhaacplus_dec->s_adts_hdr_present)
  ------------------
  |  Branch (3045:9): [True: 0, False: 67.5k]
  ------------------
 3046|      0|      p_state_enhaacplus_dec->frame_size = adts.aac_frame_length;
 3047|  67.5k|  }
 3048|       |
 3049|   205k|  if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LC) {
  ------------------
  |  Branch (3049:7): [True: 38.0k, False: 167k]
  ------------------
 3050|  38.0k|    if (p_state_enhaacplus_dec->s_adts_hdr_present)
  ------------------
  |  Branch (3050:9): [True: 0, False: 38.0k]
  ------------------
 3051|      0|      p_state_enhaacplus_dec->frame_size = 1024;
 3052|  38.0k|  }
 3053|       |
 3054|   209k|  if (p_state_enhaacplus_dec->pstr_drc_dec) {
  ------------------
  |  Branch (3054:7): [True: 209k, False: 18.4E]
  ------------------
 3055|   209k|    p_state_enhaacplus_dec->pstr_drc_dec->num_drc_elements = 0;
 3056|       |
 3057|   209k|    p_state_enhaacplus_dec->pstr_drc_dec->state = 1;
 3058|   209k|  }
 3059|   205k|  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3059:7): [True: 0, False: 205k]
  ------------------
 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|   205k|  WORD16 *intermediate_scr = (WORD16 *)(WORD8 *)p_state_enhaacplus_dec->aac_scratch_mem_v +
 3066|   205k|                             (MAX_SCR_SIZE - SCR_INTER_SCR_SIZE - SCR_COUP_CH_OUT_SIZE);
  ------------------
  |  |  167|   205k|#define MAX_SCR_SIZE (max(max(HEAACV2_MAX_SIZE, ELDV2_MAX_SIZE), LD_MAX_SIZE))
  |  |  ------------------
  |  |  |  |   74|  1.64M|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:20): [Folded, False: 205k]
  |  |  |  |  |  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: 205k]
  |  |  |  |  |  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: 209k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                           (MAX_SCR_SIZE - SCR_INTER_SCR_SIZE - SCR_COUP_CH_OUT_SIZE);
  ------------------
  |  |  143|   205k|  (MAX_CHANNEL_COUNT *                                                              \
  |  |  ------------------
  |  |  |  |  212|   205k|#define MAX_CHANNEL_COUNT (128)
  |  |  ------------------
  |  |  144|   205k|   IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD16)), \
  |  |  ------------------
  |  |  |  |   87|   205k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  145|   205k|                            BYTE_ALIGN_8))
  ------------------
                                           (MAX_SCR_SIZE - SCR_INTER_SCR_SIZE - SCR_COUP_CH_OUT_SIZE);
  ------------------
  |  |  147|   205k|  (MAX_CHANNEL_COUNT *                                                              \
  |  |  ------------------
  |  |  |  |  212|   205k|#define MAX_CHANNEL_COUNT (128)
  |  |  ------------------
  |  |  148|   205k|   IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD16)), \
  |  |  ------------------
  |  |  |  |   87|   205k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  149|   205k|                            BYTE_ALIGN_8))
  ------------------
 3067|       |
 3068|   426k|  for (ch_idx1 = 0; ch_idx1 < total_elements; ch_idx1++) {
  ------------------
  |  Branch (3068:21): [True: 227k, False: 198k]
  ------------------
 3069|   227k|    WORD32 skip_full_decode = 0;
 3070|   227k|    WORD32 ch_idx = ch_idx1;
 3071|   227k|    WORD32 channel = 0;
 3072|   227k|    WORD ch_fac, slot_ele;
 3073|       |
 3074|   227k|    if (p_state_enhaacplus_dec->audio_object_type < ER_OBJECT_START ||
  ------------------
  |  |   64|   455k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (3074:9): [True: 64.7k, False: 162k]
  ------------------
 3075|   162k|        (p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_LD &&
  ------------------
  |  Branch (3075:10): [True: 95.3k, False: 67.5k]
  ------------------
 3076|  95.3k|         p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (3076:10): [True: 38.0k, False: 57.3k]
  ------------------
 3077|  64.7k|         p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_LC)) {
  ------------------
  |  Branch (3077:10): [True: 6, False: 38.0k]
  ------------------
 3078|  64.7k|      jmp_buf local;
 3079|       |
 3080|  64.7k|      if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal == 1) {
  ------------------
  |  Branch (3080:11): [True: 0, False: 64.7k]
  ------------------
 3081|      0|        ret_val = setjmp(local);
 3082|      0|      }
 3083|  64.7k|      if (ret_val == 0) {
  ------------------
  |  Branch (3083:11): [True: 64.7k, False: 0]
  ------------------
 3084|  64.7k|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal == 1) {
  ------------------
  |  Branch (3084:13): [True: 0, False: 64.7k]
  ------------------
 3085|      0|          p_obj_exhaacplus_dec->p_state_aac->ptr_bit_stream->xaac_jmp_buf = &local;
 3086|      0|        }
 3087|  64.7k|        error_code = ixheaacd_get_element_index_tag(
 3088|  64.7k|            p_obj_exhaacplus_dec, ch_idx1, &ch_idx, &channel,
 3089|  64.7k|            p_obj_exhaacplus_dec->aac_config.element_instance_order, total_elements, element_used,
 3090|  64.7k|            total_channels, p_state_enhaacplus_dec->pstr_drc_dec,
 3091|  64.7k|            &p_state_enhaacplus_dec->drc_dummy, mps_buffer, &p_state_enhaacplus_dec->mps_header,
 3092|  64.7k|            &p_state_enhaacplus_dec->ui_mps_out_bytes);
 3093|  64.7k|      }
 3094|       |
 3095|  64.7k|      if (error_code || ret_val) {
  ------------------
  |  Branch (3095:11): [True: 2.80k, False: 61.9k]
  |  Branch (3095:25): [True: 0, False: 61.9k]
  ------------------
 3096|  2.58k|        ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
 3097|  2.58k|        if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (3097:13): [True: 15, False: 2.56k]
  ------------------
 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.58k|        p_state_enhaacplus_dec->i_bytes_consumed = 1;
 3103|  2.58k|        p_state_enhaacplus_dec->b_n_raw_data_blk = 0;
 3104|  2.58k|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3104:13): [True: 0, False: 2.58k]
  ------------------
 3105|      0|          p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3106|  2.58k|        } else {
 3107|  2.58k|          return error_code;
 3108|  2.58k|        }
 3109|  2.58k|      }
 3110|  62.1k|      if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == ID_CPE)
  ------------------
  |  Branch (3110:11): [True: 1.48k, False: 60.6k]
  ------------------
 3111|  1.48k|      {
 3112|  1.48k|        if (channel != 2)
  ------------------
  |  Branch (3112:13): [True: 0, False: 1.48k]
  ------------------
 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.48k|      }
 3125|  60.6k|      else
 3126|  60.6k|      {
 3127|  60.6k|        if (channel != 1)
  ------------------
  |  Branch (3127:13): [True: 0, False: 60.6k]
  ------------------
 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|  60.6k|      }
 3140|   162k|    } else {
 3141|   162k|      if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == ID_SCE)
  ------------------
  |  Branch (3141:11): [True: 120k, False: 42.6k]
  ------------------
 3142|   120k|        channel = 1;
 3143|  42.6k|      else
 3144|  42.6k|        channel = 2;
 3145|   162k|    }
 3146|       |
 3147|   225k|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && (error_code || ret_val)) {
  ------------------
  |  Branch (3147:9): [True: 0, False: 225k]
  |  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|   225k|    ch_fac = total_channels;
 3177|   225k|    slot_ele = p_obj_exhaacplus_dec->aac_config.slot_element[ch_idx];
 3178|   225k|    actual_out_buffer = time_data;
 3179|   225k|    if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == 2) {
  ------------------
  |  Branch (3179:9): [True: 535, False: 224k]
  ------------------
 3180|    535|      p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->p_ind_channel_info =
 3181|    535|          &p_state_enhaacplus_dec->ind_cc_info;
 3182|    535|      if (p_obj_exhaacplus_dec->aac_config.element_instance_order[ch_idx] !=
  ------------------
  |  Branch (3182:11): [True: 185, False: 350]
  ------------------
 3183|    535|          p_obj_exhaacplus_dec->aac_config.ui_coupling_channel) {
 3184|    185|        skip_full_decode = 1;
 3185|    185|        ixheaacd_set_aac_persistent_buffers(
 3186|    185|            p_state_enhaacplus_dec->pers_mem_ptr, channel);
 3187|       |
 3188|    185|        {
 3189|    185|          struct ia_aac_persistent_struct *aac_persistent_mem =
 3190|    185|              (struct ia_aac_persistent_struct *)
 3191|    185|                  p_state_enhaacplus_dec->pers_mem_ptr;
 3192|    185|          aac_persistent_mem->str_aac_decoder.pstr_aac_tables =
 3193|    185|              &p_obj_exhaacplus_dec->aac_tables;
 3194|    185|          aac_persistent_mem->str_aac_decoder.pstr_common_tables =
 3195|    185|              p_obj_exhaacplus_dec->common_tables;
 3196|    185|        }
 3197|       |
 3198|    185|        p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx] = 0;
 3199|       |
 3200|    185|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = 0;
 3201|       |
 3202|    185|        p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx] =
 3203|    185|            ixheaacd_aac_decoder_init(
 3204|    185|                p_state_enhaacplus_dec,
 3205|       |
 3206|    185|                p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx],
 3207|       |
 3208|    185|                channel, p_state_enhaacplus_dec->pers_mem_ptr,
 3209|    185|                p_state_enhaacplus_dec->frame_length
 3210|       |
 3211|    185|                );
 3212|    185|        if (!p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]) {
  ------------------
  |  Branch (3212:13): [True: 0, False: 185]
  ------------------
 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|    185|        p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->p_ind_channel_info =
 3221|    185|            (WORD8 *)p_state_enhaacplus_dec->aac_scratch_mem_v + (P_IND_CH_INFO_OFFSET);
  ------------------
  |  |  152|    185|  (SCR_BASE_SCR_8K_SIZE + SCR_EXTRA_SCR_4K_0_SIZE + SCR_EXTRA_SCR_4K_2_SIZE)
  |  |  ------------------
  |  |  |  |  128|    185|  (IXHEAAC_GET_SIZE_ALIGNED((2 * CHANNELS * MAX_BINS_LONG * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|    185|#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|    185|  (2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_channel_info_struct), sizeof(WORD32)) + \
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|    185|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  |  |  ------------------
  |  |  |  |  131|    185|   2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_sfb_code_book_struct), sizeof(WORD32)) +    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|    185|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  |  |  ------------------
  |  |  |  |  132|    185|   IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_pns_stereo_data_struct), sizeof(WORD32)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|    185|#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|    185|  (IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|    185|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3222|    185|      }
 3223|    535|      if (p_obj_exhaacplus_dec->aac_config.element_type[1] < 3 &&
  ------------------
  |  Branch (3223:11): [True: 484, False: 51]
  ------------------
 3224|    484|          p_obj_exhaacplus_dec->aac_config.element_type[1] > 0 &&
  ------------------
  |  Branch (3224:11): [True: 118, False: 366]
  ------------------
 3225|    118|          p_obj_exhaacplus_dec->aac_config.ui_max_channels > 2) {
  ------------------
  |  Branch (3225:11): [True: 118, False: 0]
  ------------------
 3226|    118|        actual_out_buffer =
 3227|    118|            (WORD16 *)(VOID *)p_state_enhaacplus_dec->coup_ch_output;
 3228|    118|      }
 3229|    535|      ch_fac = 1;
 3230|    535|      slot_ele = 0;
 3231|    535|    }
 3232|       |
 3233|   225k|    type = -1;
 3234|   225k|    p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0].no_elements = 0;
 3235|       |
 3236|   225k|    {
 3237|   225k|      WORD element_index_order1[MAX_BS_ELEMENT];
 3238|   225k|      ia_aac_dec_scratch_struct aac_scratch_struct;
 3239|   225k|      memset(&aac_scratch_struct, 0, sizeof(aac_scratch_struct));
 3240|       |
 3241|   225k|      ixheaacd_allocate_aac_scr(
 3242|   225k|          &aac_scratch_struct, p_state_enhaacplus_dec->aac_scratch_mem_v,
 3243|   225k|          time_data, channel, p_obj_exhaacplus_dec->aac_config.ui_max_channels,
 3244|   225k|          p_state_enhaacplus_dec->audio_object_type);
 3245|       |
 3246|   225k|      if (p_state_enhaacplus_dec->ch_config == 2 && channel == 1) {
  ------------------
  |  Branch (3246:11): [True: 42.6k, False: 182k]
  |  Branch (3246:53): [True: 111, False: 42.4k]
  ------------------
 3247|    111|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3247:13): [True: 0, False: 111]
  ------------------
 3248|      0|          p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3249|    111|        } else {
 3250|    111|          return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |  102|    111|#define IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
  ------------------
 3251|    111|        }
 3252|    111|      }
 3253|       |
 3254|   224k|      error_code = ixheaacd_aacdec_decodeframe(
 3255|   224k|          p_obj_exhaacplus_dec, &aac_scratch_struct, actual_out_buffer,
 3256|   224k|          p_obj_exhaacplus_dec->aac_config.frame_status, &type, &ch_idx, 0, channel,
 3257|   224k|          element_index_order1, skip_full_decode, ch_fac, slot_ele,
 3258|   224k|          p_obj_exhaacplus_dec->aac_config.ui_max_channels, total_channels,
 3259|   224k|          p_obj_exhaacplus_dec->p_state_aac->frame_length,
 3260|   224k|          p_obj_exhaacplus_dec->p_state_aac->frame_size, p_state_enhaacplus_dec->pstr_drc_dec,
 3261|   224k|          p_state_enhaacplus_dec->audio_object_type, p_state_enhaacplus_dec->ch_config,
 3262|   224k|          p_state_enhaacplus_dec->eld_specific_config, p_state_enhaacplus_dec->s_adts_hdr_present,
 3263|   224k|          &p_state_enhaacplus_dec->drc_dummy, p_state_enhaacplus_dec->ldmps_present,
 3264|   224k|          &p_state_enhaacplus_dec->slot_pos, mps_buffer, &p_state_enhaacplus_dec->mps_header,
 3265|   224k|          &p_state_enhaacplus_dec->ui_mps_out_bytes, 0,
 3266|   224k|          p_obj_exhaacplus_dec->aac_config.first_frame);
 3267|       |
 3268|   224k|      p_state_enhaacplus_dec->slot_pos -= (channel - 1);
 3269|   224k|      p_state_enhaacplus_dec->sbr_present = 0;
 3270|       |
 3271|   224k|      if (p_obj_exhaacplus_dec->p_state_aac->qshift_adj[0] != LD_OBJ &&
  ------------------
  |  |  125|   449k|#define LD_OBJ -2
  ------------------
  |  Branch (3271:11): [True: 167k, False: 57.2k]
  ------------------
 3272|   167k|          p_state_enhaacplus_dec->frame_counter == 0) {
  ------------------
  |  Branch (3272:11): [True: 6.66k, False: 160k]
  ------------------
 3273|  6.66k|        ixheaacd_peak_limiter_init(
 3274|  6.66k|            &p_state_enhaacplus_dec->peak_limiter, total_channels,
 3275|  6.66k|            p_obj_exhaacplus_dec->p_state_aac->p_config->ui_samp_freq,
 3276|  6.66k|            &p_state_enhaacplus_dec->peak_limiter.buffer[0],
 3277|  6.66k|            &p_obj_exhaacplus_dec->p_state_aac->delay_in_samples);
 3278|  6.66k|        p_obj_exhaacplus_dec->p_state_aac->peak_lim_init = 1;
 3279|  6.66k|      }
 3280|       |
 3281|   224k|      if (p_state_enhaacplus_dec->audio_object_type < ER_OBJECT_START ||
  ------------------
  |  |   64|   449k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (3281:11): [True: 62.6k, False: 162k]
  ------------------
 3282|   162k|          (p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_LD &&
  ------------------
  |  Branch (3282:12): [True: 94.8k, False: 67.4k]
  ------------------
 3283|  94.8k|           p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (3283:12): [True: 37.5k, False: 57.2k]
  ------------------
 3284|  61.6k|           p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_LC)) {
  ------------------
  |  Branch (3284:12): [True: 4, False: 37.5k]
  ------------------
 3285|  61.6k|        if ((error_code == 0) && ((ch_idx1 + 1) == total_elements) &&
  ------------------
  |  Branch (3285:13): [True: 60.8k, False: 819]
  |  Branch (3285:34): [True: 42.2k, False: 18.6k]
  ------------------
 3286|  42.2k|            (type != ID_END)) {
  ------------------
  |  Branch (3286:13): [True: 1.03k, False: 41.2k]
  ------------------
 3287|  1.03k|          {
 3288|  1.03k|            p_state_enhaacplus_dec->i_bytes_consumed = (WORD32)(
 3289|  1.03k|                it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base);
 3290|  1.03k|            p_state_enhaacplus_dec->b_n_raw_data_blk = 0;
 3291|  1.03k|            if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3291:17): [True: 0, False: 1.03k]
  ------------------
 3292|      0|              p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3293|  1.03k|            } else {
 3294|  1.03k|            return IA_XHEAAC_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND;
  ------------------
  |  |  100|  1.03k|#define IA_XHEAAC_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND 0x00001805
  ------------------
 3295|  1.03k|          }
 3296|  1.03k|          }
 3297|  1.03k|        }
 3298|  61.6k|      }
 3299|       |
 3300|   223k|      num_ch = p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->channels;
 3301|   223k|      if (skip_full_decode == 0) {
  ------------------
  |  Branch (3301:11): [True: 222k, False: 1.17k]
  ------------------
 3302|   222k|        if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (3302:13): [True: 57.2k, False: 165k]
  ------------------
 3303|   165k|            p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (3303:13): [True: 67.4k, False: 98.0k]
  ------------------
 3304|   124k|          frame_size = p_state_enhaacplus_dec->frame_length;
 3305|  98.0k|        else {
 3306|  98.0k|          frame_size = p_state_enhaacplus_dec->frame_length;
 3307|  98.0k|        }
 3308|       |
 3309|   222k|        sample_rate_dec =
 3310|   222k|            p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->sampling_rate;
 3311|   222k|      }
 3312|   223k|    }
 3313|       |
 3314|   223k|    if (skip_full_decode == 1) {
  ------------------
  |  Branch (3314:9): [True: 177, False: 223k]
  ------------------
 3315|    177|      p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0].no_elements = 0;
 3316|    177|    }
 3317|       |
 3318|   223k|    if (p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0].no_elements != 0) {
  ------------------
  |  Branch (3318:9): [True: 42.8k, False: 181k]
  ------------------
 3319|  42.8k|      p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 1;
 3320|  42.8k|    }
 3321|       |
 3322|   223k|    if (error_code) {
  ------------------
  |  Branch (3322:9): [True: 3.27k, False: 220k]
  ------------------
 3323|  3.27k|      if (p_state_enhaacplus_dec->ui_input_over) {
  ------------------
  |  Branch (3323:11): [True: 0, False: 3.27k]
  ------------------
 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.27k|      ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
 3331|  3.27k|      p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes +=
 3332|  3.27k|          p_state_enhaacplus_dec->num_of_out_samples * num_ch * sizeof(WORD16);
 3333|  3.27k|      if (error_code) {
  ------------------
  |  Branch (3333:11): [True: 3.27k, False: 0]
  ------------------
 3334|  3.27k|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3334:13): [True: 0, False: 3.27k]
  ------------------
 3335|      0|          p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3336|  3.27k|        } else {
 3337|  3.27k|          return error_code;
 3338|  3.27k|        }
 3339|  3.27k|      }
 3340|  3.27k|    }
 3341|       |
 3342|   220k|    error_code = IA_NO_ERROR;
  ------------------
  |  |   23|   220k|#define IA_NO_ERROR 0x00000000
  ------------------
 3343|       |
 3344|   220k|    if (p_obj_exhaacplus_dec->aac_config.ui_auto_sbr_upsample == 0) {
  ------------------
  |  Branch (3344:9): [True: 0, False: 220k]
  ------------------
 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|   220k|    if ((!p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) &&
  ------------------
  |  Branch (3351:9): [True: 1.00k, False: 219k]
  ------------------
 3352|  1.00k|        p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0].no_elements) {
  ------------------
  |  Branch (3352:9): [True: 22, False: 979]
  ------------------
 3353|     22|      WORD32 harmonic_sbr_flag = 0;
 3354|     22|      error_code = IA_XHEAAC_DEC_EXE_NONFATAL_SBR_TURNED_ON;
  ------------------
  |  |   96|     22|#define IA_XHEAAC_DEC_EXE_NONFATAL_SBR_TURNED_ON 0x00001802
  ------------------
 3355|     22|      p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = ixheaacd_init_sbr(
 3356|     22|          sample_rate_dec, frame_size,
 3357|     22|          (FLAG *)&p_obj_exhaacplus_dec->aac_config.down_sample_flag,
 3358|     22|          p_state_enhaacplus_dec->sbr_persistent_mem_v,
 3359|     22|          p_state_enhaacplus_dec->ptr_overlap_buf, ps_enable ? 2 : channel,
  ------------------
  |  Branch (3359:52): [True: 22, False: 0]
  ------------------
 3360|     22|          ps_enable, 1, frame_size * 2, &harmonic_sbr_flag, NULL,
 3361|     22|          p_state_enhaacplus_dec->str_sbr_config,
 3362|     22|          p_state_enhaacplus_dec->audio_object_type,
 3363|     22|          p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
 3364|     22|              .ldmps_present_flag,
 3365|     22|          p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.no_ldsbr_present);
 3366|     22|      if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (3366:11): [True: 1, False: 21]
  ------------------
 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|     22|    }
 3371|       |
 3372|   220k|    {
 3373|   220k|      if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] &&
  ------------------
  |  Branch (3373:11): [True: 218k, False: 1.99k]
  ------------------
 3374|   218k|          p_state_enhaacplus_dec->pstr_stream_sbr[0][0].no_elements) {
  ------------------
  |  Branch (3374:11): [True: 42.5k, False: 176k]
  ------------------
 3375|  42.5k|        ia_sbr_scr_struct sbr_scratch_struct;
 3376|  42.5k|        ixheaacd_allocate_sbr_scr(&sbr_scratch_struct, p_state_enhaacplus_dec->aac_scratch_mem_v,
 3377|  42.5k|                                  time_data, total_channels,
 3378|  42.5k|                                  p_obj_exhaacplus_dec->p_state_aac->qshift_adj,
 3379|  42.5k|                                  p_state_enhaacplus_dec->slot_pos, channel);
 3380|       |
 3381|  42.5k|        p_state_enhaacplus_dec->sbr_present = 1;
 3382|  42.5k|        p_state_enhaacplus_dec->peak_lim_init = 0;
 3383|       |
 3384|  42.5k|        if (p_obj_exhaacplus_dec->aac_config.ui_enh_sbr)
  ------------------
  |  Branch (3384:13): [True: 42.5k, False: 0]
  ------------------
 3385|  42.5k|        {
 3386|  42.5k|          WORD32 audio_object_type = p_state_enhaacplus_dec->audio_object_type;
 3387|       |
 3388|  42.5k|          if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (3388:15): [True: 15.5k, False: 26.9k]
  |  Branch (3388:54): [True: 15.5k, False: 0]
  ------------------
 3389|  15.5k|            WORD32 i = 0;
 3390|  15.5k|            ia_dec_data_struct* pstr_dec_data =
 3391|  15.5k|                (ia_dec_data_struct*)p_state_enhaacplus_dec->pstr_dec_data;
 3392|  15.5k|            if (ch_fac == 1) {
  ------------------
  |  Branch (3392:17): [True: 1.40k, False: 14.1k]
  ------------------
 3393|  1.44M|              for (; i < 1024; i++) {
  ------------------
  |  Branch (3393:22): [True: 1.44M, False: 1.40k]
  ------------------
 3394|  1.44M|                pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
 3395|  1.44M|                    (FLOAT32)time_data[i];
 3396|  1.44M|              }
 3397|  1.40k|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
 3398|  1.40k|                  &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
 3399|       |
 3400|  1.40k|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
 3401|  1.40k|                  &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
 3402|  14.1k|            } else if (ch_fac == 2) {
  ------------------
  |  Branch (3402:24): [True: 14.0k, False: 121]
  ------------------
 3403|  14.3M|              for (; i < 1024; i++) {
  ------------------
  |  Branch (3403:22): [True: 14.3M, False: 14.0k]
  ------------------
 3404|  14.3M|                pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
 3405|  14.3M|                    (FLOAT32)time_data[2 * i + 0];
 3406|  14.3M|                pstr_dec_data->str_usac_data.time_sample_vector[1][i] =
 3407|  14.3M|                    (FLOAT32)time_data[2 * i + 1];
 3408|  14.3M|              }
 3409|  14.0k|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
 3410|  14.0k|                  &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
 3411|       |
 3412|  14.0k|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
 3413|  14.0k|                  &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
 3414|  14.0k|            } else if (ch_fac > 2) {
  ------------------
  |  Branch (3414:24): [True: 121, False: 0]
  ------------------
 3415|    121|              if (channel == 1) {
  ------------------
  |  Branch (3415:19): [True: 83, False: 38]
  ------------------
 3416|  85.0k|                for (; i < 1024; i++) {
  ------------------
  |  Branch (3416:24): [True: 84.9k, False: 83]
  ------------------
 3417|  84.9k|                  pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
 3418|  84.9k|                      (FLOAT32)(time_data + slot_ele)[i* ch_fac];
 3419|  84.9k|                }
 3420|     83|                p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
 3421|     83|                    &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
 3422|     83|              } else if (channel == 2) {
  ------------------
  |  Branch (3422:26): [True: 38, False: 0]
  ------------------
 3423|  38.9k|                for (; i < 1024; i++) {
  ------------------
  |  Branch (3423:24): [True: 38.9k, False: 38]
  ------------------
 3424|  38.9k|                  pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
 3425|  38.9k|                      (FLOAT32)(time_data + slot_ele)[ch_fac * i + 0];
 3426|  38.9k|                  pstr_dec_data->str_usac_data.time_sample_vector[1][i] =
 3427|  38.9k|                      (FLOAT32)(time_data + slot_ele)[ch_fac * i + 1];
 3428|  38.9k|                }
 3429|     38|                p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
 3430|     38|                    &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
 3431|       |
 3432|     38|                p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
 3433|     38|                    &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
 3434|     38|              }
 3435|    121|            }
 3436|  15.5k|          }
 3437|  42.5k|        }
 3438|  42.5k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->esbr_hq =
 3439|  42.5k|            p_obj_exhaacplus_dec->aac_config.ui_hq_esbr;
 3440|  42.5k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->enh_sbr =
 3441|  42.5k|            p_obj_exhaacplus_dec->aac_config.ui_enh_sbr;
 3442|  42.5k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->enh_sbr_ps =
 3443|  42.5k|            p_obj_exhaacplus_dec->aac_config.ui_enh_sbr_ps;
 3444|       |
 3445|  42.5k|        if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (3445:13): [True: 42.5k, False: 0]
  ------------------
 3446|  42.5k|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->xaac_jmp_buf =
 3447|  42.5k|              &(p_state_enhaacplus_dec->xaac_jmp_buf);
 3448|  42.5k|        }
 3449|       |
 3450|  42.5k|        if (ixheaacd_applysbr(p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx],
  ------------------
  |  Branch (3450:13): [True: 187, False: 42.3k]
  ------------------
 3451|  42.5k|                              &p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0],
 3452|  42.5k|                              actual_out_buffer, &num_ch,
 3453|  42.5k|                              p_obj_exhaacplus_dec->aac_config.frame_status,
 3454|  42.5k|                              p_obj_exhaacplus_dec->aac_config.down_sample_flag,
 3455|  42.5k|                              esbr_mono_downmix, &sbr_scratch_struct, ps_enable, ch_fac, slot_ele,
 3456|  42.5k|                              NULL, &p_state_enhaacplus_dec->str_drc_dec_info,
 3457|  42.5k|                              p_state_enhaacplus_dec->eld_specific_config.ld_sbr_flag_present,
 3458|  42.5k|                              p_state_enhaacplus_dec->audio_object_type, 0,
 3459|  42.5k|                              p_state_enhaacplus_dec->ldmps_present, frame_size,
 3460|  42.5k|                              p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present,
 3461|  42.5k|                              p_obj_exhaacplus_dec->aac_config.ui_err_conceal,
 3462|  42.5k|                              p_obj_exhaacplus_dec->aac_config.first_frame) != SBRDEC_OK) {
  ------------------
  |  |   33|  42.5k|#define SBRDEC_OK 0
  ------------------
 3463|    187|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = 0;
 3464|    187|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3464:15): [True: 0, False: 187]
  ------------------
 3465|      0|            p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3466|    187|          } else {
 3467|    187|            return -1;
 3468|    187|          }
 3469|  42.3k|        } else {
 3470|  42.3k|          if (!p_obj_exhaacplus_dec->aac_config.down_sample_flag) {
  ------------------
  |  Branch (3470:15): [True: 24.8k, False: 17.5k]
  ------------------
 3471|  24.8k|            frame_size = (WORD16)(frame_size * 2);
 3472|  24.8k|            sample_rate_dec *= 2;
 3473|  24.8k|          }
 3474|  42.3k|          if (p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
  ------------------
  |  Branch (3474:15): [True: 2.11k, False: 40.2k]
  ------------------
 3475|  42.3k|                  .ldmps_present_flag == 1) {
 3476|  2.11k|            ixheaacd_mps_payload(
 3477|  2.11k|                p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx],
 3478|  2.11k|                p_obj_exhaacplus_dec);
 3479|  2.11k|          }
 3480|  42.3k|        }
 3481|       |
 3482|  42.3k|        if (p_obj_exhaacplus_dec->aac_config.ui_enh_sbr)
  ------------------
  |  Branch (3482:13): [True: 42.0k, False: 328]
  ------------------
 3483|  42.0k|        {
 3484|  42.0k|          WORD32 audio_object_type = p_state_enhaacplus_dec->audio_object_type;
 3485|       |
 3486|  42.0k|          if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (3486:15): [True: 15.5k, False: 26.4k]
  |  Branch (3486:54): [True: 15.5k, False: 0]
  ------------------
 3487|  15.5k|            WORD32 out_bytes = 0;
 3488|  15.5k|            ia_dec_data_struct *pstr_dec_data =
 3489|  15.5k|                (ia_dec_data_struct *)p_state_enhaacplus_dec->pstr_dec_data;
 3490|  15.5k|            if (ch_fac <= 2) {
  ------------------
  |  Branch (3490:17): [True: 15.4k, False: 121]
  ------------------
 3491|  15.4k|              ixheaacd_samples_sat((WORD8*)time_data, 2048, 16,
 3492|  15.4k|                                   pstr_dec_data->str_usac_data.time_sample_vector,
 3493|  15.4k|                                   &out_bytes, ch_fac);
 3494|  15.4k|            } else {
 3495|    121|              ixheaacd_samples_sat_mc((WORD8*)(time_data + slot_ele), 2048,
 3496|    121|                                      pstr_dec_data->str_usac_data.time_sample_vector,
 3497|    121|                                      &out_bytes, channel, ch_fac);
 3498|    121|            }
 3499|  15.5k|          }
 3500|  42.0k|        }
 3501|  42.3k|        p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.no_ldsbr_present =
 3502|  42.3k|            0;
 3503|  42.3k|        if (p_state_enhaacplus_dec->ui_mps_out_bytes > 0) {
  ------------------
  |  Branch (3503:13): [True: 470, False: 41.8k]
  ------------------
 3504|    470|          p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present = 1;
 3505|    470|        }
 3506|   178k|      } else {
 3507|   178k|        p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.no_ldsbr_present = 1;
 3508|   178k|      }
 3509|   220k|    }
 3510|       |
 3511|   220k|    if (p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
  ------------------
  |  Branch (3511:9): [True: 13.1k, False: 207k]
  ------------------
 3512|   220k|                .ldmps_present_flag == 1 &&
 3513|  13.1k|         p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] &&
  ------------------
  |  Branch (3513:10): [True: 13.0k, False: 69]
  ------------------
 3514|  13.0k|         p_state_enhaacplus_dec->mps_dec_handle.mps_init_done == 1) {
  ------------------
  |  Branch (3514:10): [True: 2.26k, False: 10.8k]
  ------------------
 3515|  2.26k|      if (p_state_enhaacplus_dec->ec_enable) {
  ------------------
  |  Branch (3515:11): [True: 0, False: 2.26k]
  ------------------
 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.26k|      } else {
 3521|  2.26k|        error_code = ixheaacd_ld_mps_apply(p_obj_exhaacplus_dec, actual_out_buffer);
 3522|       |
 3523|  2.26k|        if (error_code)
  ------------------
  |  Branch (3523:13): [True: 47, False: 2.21k]
  ------------------
 3524|     47|          return error_code;
 3525|  2.26k|      }
 3526|  2.26k|    }
 3527|   220k|    if (sample_rate < sample_rate_dec) {
  ------------------
  |  Branch (3527:9): [True: 201k, False: 18.5k]
  ------------------
 3528|   201k|      sample_rate = sample_rate_dec;
 3529|   201k|    }
 3530|       |
 3531|   220k|    if (p_state_enhaacplus_dec->sbr_present ||
  ------------------
  |  Branch (3531:9): [True: 43.2k, False: 177k]
  ------------------
 3532|   177k|        p_obj_exhaacplus_dec->p_state_aac->qshift_adj[0] == LD_OBJ) {
  ------------------
  |  |  125|   177k|#define LD_OBJ -2
  ------------------
  |  Branch (3532:9): [True: 48.0k, False: 129k]
  ------------------
 3533|  89.9k|      num_of_out_samples = frame_size;
 3534|       |
 3535|   130k|    } else {
 3536|   130k|      num_of_out_samples =
 3537|   130k|          frame_size -
 3538|   130k|          MIN((WORD16)p_obj_exhaacplus_dec->p_state_aac->delay_in_samples, frame_size);
  ------------------
  |  |   23|   130k|#define MIN(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (23:20): [True: 129k, False: 1.41k]
  |  |  ------------------
  ------------------
 3539|   130k|    }
 3540|       |
 3541|   220k|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal &&
  ------------------
  |  Branch (3541:9): [True: 0, False: 220k]
  ------------------
 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|   220k|    p_obj_exhaacplus_dec->aac_config.ui_samp_freq = sample_rate;
 3549|       |
 3550|   220k|    p_state_enhaacplus_dec->num_channel_last = num_ch;
 3551|   220k|    p_state_enhaacplus_dec->num_of_out_samples = num_of_out_samples;
 3552|       |
 3553|   220k|    if (p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
  ------------------
  |  Branch (3553:9): [True: 13.1k, False: 207k]
  ------------------
 3554|   220k|            .ldmps_present_flag == 1 &&
 3555|  13.1k|        p_state_enhaacplus_dec->mps_dec_handle.mps_init_done == 1 &&
  ------------------
  |  Branch (3555:9): [True: 2.21k, False: 10.8k]
  ------------------
 3556|  2.21k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (3556:9): [True: 2.21k, False: 2]
  ------------------
 3557|  2.21k|      if (p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.output_buffer) {
  ------------------
  |  Branch (3557:11): [True: 2.21k, False: 0]
  ------------------
 3558|  2.21k|        ixheaacd_samples_sat((WORD8 *)actual_out_buffer, num_of_out_samples,
 3559|  2.21k|                             p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz,
 3560|  2.21k|                             p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.output_buffer,
 3561|  2.21k|                             &mps_out_samples, 2);
 3562|  2.21k|        p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = mps_out_samples;
 3563|  2.21k|      }
 3564|  2.21k|      num_ch = p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.out_ch_count;
 3565|  2.21k|      if (p_state_enhaacplus_dec->ec_enable) {
  ------------------
  |  Branch (3565:11): [True: 0, False: 2.21k]
  ------------------
 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|   218k|    } else {
 3572|   218k|      if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] != 2) {
  ------------------
  |  Branch (3572:11): [True: 216k, False: 1.81k]
  ------------------
 3573|   216k|        if (p_obj_exhaacplus_dec->aac_config.flag_to_stereo == 1 &&
  ------------------
  |  Branch (3573:13): [True: 14.2k, False: 202k]
  ------------------
 3574|  14.2k|          channel == 1 && total_elements == 1 && num_ch == 1) {
  ------------------
  |  Branch (3574:11): [True: 14.1k, False: 96]
  |  Branch (3574:27): [True: 14.0k, False: 105]
  |  Branch (3574:50): [True: 4.63k, False: 9.40k]
  ------------------
 3575|  4.63k|        num_ch = 2;
 3576|  4.63k|        p_obj_exhaacplus_dec->aac_config.dup_stereo_flag = 1;
 3577|       |
 3578|   211k|      } else {
 3579|   211k|        p_obj_exhaacplus_dec->aac_config.dup_stereo_flag = 0;
 3580|   211k|      }
 3581|       |
 3582|   216k|      p_obj_exhaacplus_dec->aac_config.ui_n_channels = 2;
 3583|       |
 3584|   216k|      p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes +=
 3585|   216k|          p_state_enhaacplus_dec->num_of_out_samples * num_ch * sizeof(WORD16);
 3586|       |
 3587|   216k|    } else {
 3588|  1.81k|      channel_coupling_flag = 1;
 3589|  1.81k|    }
 3590|   218k|  }
 3591|       |
 3592|   220k|    if (p_state_enhaacplus_dec->sbr_present && total_channels > 2) {
  ------------------
  |  Branch (3592:9): [True: 41.9k, False: 178k]
  |  Branch (3592:48): [True: 122, False: 41.8k]
  ------------------
 3593|    282|      for (WORD32 j = 0; j < channel; j++) {
  ------------------
  |  Branch (3593:26): [True: 160, False: 122]
  ------------------
 3594|   236k|        for (WORD32 i = 0; i < frame_size; i++) {
  ------------------
  |  Branch (3594:28): [True: 236k, False: 160]
  ------------------
 3595|   236k|          intermediate_scr[total_channels * i + j +
 3596|   236k|                           p_state_enhaacplus_dec->slot_pos] =
 3597|   236k|              actual_out_buffer[total_channels * i + j +
 3598|   236k|                                p_state_enhaacplus_dec->slot_pos];
 3599|   236k|        }
 3600|    160|      }
 3601|    122|    }
 3602|   220k|  }
 3603|       |
 3604|   198k|  if (p_state_enhaacplus_dec->sbr_present && total_channels > 2) {
  ------------------
  |  Branch (3604:7): [True: 41.8k, False: 156k]
  |  Branch (3604:46): [True: 43, False: 41.8k]
  ------------------
 3605|     43|    memcpy(time_data, intermediate_scr,
 3606|     43|           sizeof(WORD16) * frame_size * total_channels);
 3607|     43|  }
 3608|       |
 3609|   198k|  {
 3610|   198k|    ia_adts_crc_info_struct *ptr_adts_crc_info =
 3611|   198k|        p_state_enhaacplus_dec->ptr_bit_stream->pstr_adts_crc_info;
 3612|   198k|    if (ptr_adts_crc_info->crc_active == 1) {
  ------------------
  |  Branch (3612:9): [True: 11, False: 198k]
  ------------------
 3613|     11|      if ((error_code = ixheaacd_adts_crc_check_crc(ptr_adts_crc_info))) {
  ------------------
  |  Branch (3613:11): [True: 11, False: 0]
  ------------------
 3614|     11|        if (error_code) {
  ------------------
  |  Branch (3614:13): [True: 11, False: 0]
  ------------------
 3615|     11|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3615:15): [True: 0, False: 11]
  ------------------
 3616|      0|            p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3617|     11|          } else {
 3618|     11|            return error_code;
 3619|     11|          }
 3620|     11|        }
 3621|     11|      }
 3622|     11|    }
 3623|   198k|  }
 3624|       |
 3625|   198k|  p_obj_exhaacplus_dec->aac_config.ui_n_channels = total_channels;
 3626|       |
 3627|   198k|  p_state_enhaacplus_dec->frame_counter++;
 3628|       |
 3629|   198k|  WORD32 i, j;
 3630|       |
 3631|   198k|  if (channel_coupling_flag) {
  ------------------
  |  Branch (3631:7): [True: 310, False: 198k]
  ------------------
 3632|    310|    error_code = ixheaacd_dec_ind_coupling(p_obj_exhaacplus_dec,
 3633|    310|                                           p_state_enhaacplus_dec->coup_ch_output,
 3634|    310|                                           num_of_out_samples, total_channels, time_data);
 3635|    310|    if (error_code)
  ------------------
  |  Branch (3635:9): [True: 11, False: 299]
  ------------------
 3636|     11|      return error_code;
 3637|    310|  }
 3638|       |
 3639|   476k|  for (i = 0; i < total_channels; i++) {
  ------------------
  |  Branch (3639:15): [True: 277k, False: 198k]
  ------------------
 3640|   277k|    if (p_obj_exhaacplus_dec->p_state_aac->qshift_adj[i + 1] == 0)
  ------------------
  |  Branch (3640:9): [True: 244k, False: 33.0k]
  ------------------
 3641|   244k|      p_obj_exhaacplus_dec->p_state_aac->qshift_adj[i + 1] =
 3642|   244k|          p_obj_exhaacplus_dec->p_state_aac->qshift_adj[0];
 3643|   277k|  }
 3644|       |
 3645|   198k|  if (p_obj_exhaacplus_dec->aac_config.flag_to_stereo == 1 &&
  ------------------
  |  Branch (3645:7): [True: 16.3k, False: 181k]
  ------------------
 3646|  16.3k|      total_elements == 1 && num_ch == 2 &&
  ------------------
  |  Branch (3646:7): [True: 16.3k, False: 63]
  |  Branch (3646:30): [True: 16.2k, False: 5]
  ------------------
 3647|  16.2k|      p_obj_exhaacplus_dec->aac_config.dup_stereo_flag == 1) {
  ------------------
  |  Branch (3647:7): [True: 4.63k, False: 11.6k]
  ------------------
 3648|  4.63k|    WORD i;
 3649|       |
 3650|  4.63k|    if (!p_state_enhaacplus_dec->sbr_present &&
  ------------------
  |  Branch (3650:9): [True: 100, False: 4.53k]
  ------------------
 3651|    100|        p_obj_exhaacplus_dec->p_state_aac->qshift_adj[0] != LD_OBJ) {
  ------------------
  |  |  125|    100|#define LD_OBJ -2
  ------------------
  |  Branch (3651:9): [True: 98, False: 2]
  ------------------
 3652|   100k|      for (i = 0; i < frame_size; i++) {
  ------------------
  |  Branch (3652:19): [True: 100k, False: 98]
  ------------------
 3653|   100k|        *((WORD32 *)actual_out_buffer + 2 * i + 1) =
 3654|   100k|            *((WORD32 *)actual_out_buffer + 2 * i);
 3655|   100k|      }
 3656|  4.53k|    } else {
 3657|  9.25M|      for (i = 0; i < frame_size; i++) {
  ------------------
  |  Branch (3657:19): [True: 9.25M, False: 4.53k]
  ------------------
 3658|  9.25M|        *(actual_out_buffer + 2 * i + 1) = *(actual_out_buffer + 2 * i);
 3659|  9.25M|      }
 3660|  4.53k|    }
 3661|  4.63k|  }
 3662|       |
 3663|   198k|  if (!p_state_enhaacplus_dec->sbr_present &&
  ------------------
  |  Branch (3663:7): [True: 158k, False: 39.7k]
  ------------------
 3664|   158k|      p_obj_exhaacplus_dec->p_state_aac->peak_lim_init == 1 &&
  ------------------
  |  Branch (3664:7): [True: 97.0k, False: 61.5k]
  ------------------
 3665|  97.0k|      p_obj_exhaacplus_dec->p_state_aac->qshift_adj[0] != LD_OBJ) {
  ------------------
  |  |  125|  97.0k|#define LD_OBJ -2
  ------------------
  |  Branch (3665:7): [True: 88.5k, False: 8.56k]
  ------------------
 3666|  88.5k|    if (!p_obj_exhaacplus_dec->aac_config.peak_limiter_off) {
  ------------------
  |  Branch (3666:9): [True: 88.5k, False: 0]
  ------------------
 3667|  88.5k|      ixheaacd_peak_limiter_process(
 3668|  88.5k|          &p_state_enhaacplus_dec->peak_limiter, time_data, frame_size,
 3669|  88.5k|          p_obj_exhaacplus_dec->p_state_aac->qshift_adj);
 3670|  88.5k|    } 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|   152M|    for (i = 0; i < frame_size * 2; i++) {
  ------------------
  |  Branch (3676:17): [True: 152M, False: 88.5k]
  ------------------
 3677|   348M|      for (j = 0; j < total_channels; j++) {
  ------------------
  |  Branch (3677:19): [True: 196M, False: 152M]
  ------------------
 3678|   196M|        *((WORD16 *)time_data + total_channels * i + j) =
 3679|   196M|            ixheaac_round16(*((WORD32 *)time_data + total_channels * i + j));
 3680|   196M|      }
 3681|   152M|    }
 3682|       |
 3683|  88.5k|    memmove(
 3684|  88.5k|        time_data,
 3685|  88.5k|        (time_data +
 3686|  88.5k|         total_channels * p_obj_exhaacplus_dec->p_state_aac->delay_in_samples),
 3687|  88.5k|        sizeof(WORD16) * num_of_out_samples * total_channels);
 3688|       |
 3689|  88.5k|    p_obj_exhaacplus_dec->p_state_aac->delay_in_samples =
 3690|  88.5k|        p_obj_exhaacplus_dec->p_state_aac->delay_in_samples -
 3691|  88.5k|        MIN(p_obj_exhaacplus_dec->p_state_aac->delay_in_samples, (UWORD16)frame_size);
  ------------------
  |  |   23|  88.5k|#define MIN(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (23:20): [True: 88.5k, False: 2]
  |  |  ------------------
  ------------------
 3692|  88.5k|  }
 3693|   198k|  if (p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present == 1) {
  ------------------
  |  Branch (3693:7): [True: 15.0k, False: 183k]
  ------------------
 3694|  15.0k|    ia_heaac_mps_state_struct *pstr_mps_state =
 3695|  15.0k|        &p_state_enhaacplus_dec->heaac_mps_handle;
 3696|  15.0k|    if (p_state_enhaacplus_dec->sbr_present == 0) {
  ------------------
  |  Branch (3696:9): [True: 13.9k, False: 1.05k]
  ------------------
 3697|  13.9k|      p_state_enhaacplus_dec->heaac_mps_handle.mps_decode = 1;
 3698|  13.9k|    } else {
 3699|  1.05k|      p_state_enhaacplus_dec->heaac_mps_handle.mps_with_sbr = 1;
 3700|  1.05k|    }
 3701|  15.0k|    if (!p_obj_exhaacplus_dec->aac_config.ui_enh_sbr)
  ------------------
  |  Branch (3701:9): [True: 0, False: 15.0k]
  ------------------
 3702|      0|    {
 3703|      0|      p_state_enhaacplus_dec->heaac_mps_handle.mps_decode = 1;
 3704|      0|    }
 3705|  15.0k|    if (p_state_enhaacplus_dec->heaac_mps_handle.mps_init_done == 1) {
  ------------------
  |  Branch (3705:9): [True: 14.4k, False: 606]
  ------------------
 3706|  14.4k|      p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.frame_ok =
 3707|  14.4k|          p_obj_exhaacplus_dec->aac_config.frame_status;
 3708|  14.4k|      p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.ec_flag =
 3709|  14.4k|          p_obj_exhaacplus_dec->aac_config.ui_err_conceal;
 3710|       |
 3711|  14.4k|      error_code = ixheaacd_heaac_mps_apply(p_obj_exhaacplus_dec, actual_out_buffer, mps_buffer,
 3712|  14.4k|                                            p_state_enhaacplus_dec->ui_mps_out_bytes);
 3713|       |
 3714|  14.4k|      if (error_code != IA_NO_ERROR) {
  ------------------
  |  |   23|  14.4k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (3714:11): [True: 694, False: 13.7k]
  ------------------
 3715|    694|        return error_code;
 3716|    694|      }
 3717|       |
 3718|  13.7k|      p_state_enhaacplus_dec->heaac_mps_handle.mps_decode = 1;
 3719|  13.7k|      p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes =
 3720|  13.7k|          (pstr_mps_state->num_output_channels_at *
 3721|  13.7k|           pstr_mps_state->frame_length *
 3722|  13.7k|           (p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz >> 3));
 3723|  13.7k|      p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.first_frame = 0;
 3724|  13.7k|    }
 3725|  15.0k|  }
 3726|   197k|  if ((total_channels > 2) && (1 == p_obj_exhaacplus_dec->aac_config.downmix)) {
  ------------------
  |  Branch (3726:7): [True: 2.56k, False: 195k]
  |  Branch (3726:31): [True: 0, False: 2.56k]
  ------------------
 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|   197k|  if (p_obj_exhaacplus_dec->aac_config.flag_downmix && total_channels == 2) {
  ------------------
  |  Branch (3735:7): [True: 0, False: 197k]
  |  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|   197k|  if (p_state_enhaacplus_dec->s_adts_hdr_present) {
  ------------------
  |  Branch (3760:7): [True: 28.9k, False: 168k]
  ------------------
 3761|  28.9k|    if (adts.no_raw_data_blocks != 0) {
  ------------------
  |  Branch (3761:9): [True: 2.18k, False: 26.8k]
  ------------------
 3762|  2.18k|      if (adts.protection_absent == 0 && it_bit_buff->cnt_bits >= 16) {
  ------------------
  |  Branch (3762:11): [True: 0, False: 2.18k]
  |  Branch (3762:42): [True: 0, False: 0]
  ------------------
 3763|      0|        adts.crc_check = ixheaacd_read_bits_buf(it_bit_buff, 16);
 3764|      0|      }
 3765|  2.18k|    }
 3766|  28.9k|    p_state_enhaacplus_dec->b_n_raw_data_blk--;
 3767|  28.9k|  }
 3768|       |
 3769|   197k|  ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
 3770|       |
 3771|   197k|  if (p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT)
  ------------------
  |  |   29|   197k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (3771:7): [True: 170k, False: 27.3k]
  ------------------
 3772|   170k|    p_state_enhaacplus_dec->i_bytes_consumed =
 3773|   170k|        (WORD32)(audio_mux_length_bytes_last + bytes_for_sync);
 3774|       |
 3775|   197k|  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal &&
  ------------------
  |  Branch (3775:7): [True: 0, False: 197k]
  ------------------
 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|   197k|  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3780:7): [True: 0, False: 197k]
  ------------------
 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|   197k|  } else {
 3786|   197k|    return error_code;
 3787|   197k|  }
 3788|   197k|}
ixheaacd_api.c:ixheaacd_init_sbr_tables:
  219|  14.7k|ixheaacd_init_sbr_tables(ia_sbr_tables_struct *ptr_sbr_tables) {
  220|  14.7k|  ptr_sbr_tables->env_calc_tables_ptr =
  221|  14.7k|      (ia_env_calc_tables_struct *)&ixheaacd_aac_dec_env_calc_tables;
  222|  14.7k|  ptr_sbr_tables->qmf_dec_tables_ptr =
  223|  14.7k|      (ia_qmf_dec_tables_struct *)&ixheaacd_aac_qmf_dec_tables;
  224|  14.7k|  ptr_sbr_tables->env_extr_tables_ptr =
  225|  14.7k|      (ia_env_extr_tables_struct *)&ixheaacd_aac_dec_env_extr_tables;
  226|  14.7k|  ptr_sbr_tables->ps_tables_ptr =
  227|  14.7k|      (ia_ps_tables_struct *)&ixheaacd_aac_dec_ps_tables;
  228|  14.7k|}
ixheaacd_api.c:ixheaacd_persistent_buffer_sizes:
 1256|  14.7k|ixheaacd_persistent_buffer_sizes(WORD32 num_channel) {
 1257|  14.7k|  WORD32 size_buffers = 0;
 1258|       |
 1259|  14.7k|  WORD32 temp;
 1260|  14.7k|  WORD32 max_channels;
 1261|       |
 1262|  14.7k|  size_buffers += IXHEAAC_GET_SIZE_ALIGNED(4 * 512 * num_channel * sizeof(WORD32), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1263|       |
 1264|  14.7k|  size_buffers +=
 1265|  14.7k|      num_channel * IXHEAAC_GET_SIZE_ALIGNED(ltp_buffer_size * sizeof(WORD16), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1266|       |
 1267|  14.7k|  size_buffers +=
 1268|  14.7k|      num_channel * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_channel_info), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1269|       |
 1270|  14.7k|  if (num_channel > 2) {
  ------------------
  |  Branch (1270:7): [True: 14.7k, False: 0]
  ------------------
 1271|  14.7k|    max_channels = MAX_BS_ELEMENT;
  ------------------
  |  |   24|  14.7k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  14.7k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 1272|  14.7k|  } else {
 1273|      0|    max_channels = 2;
 1274|      0|  }
 1275|  14.7k|  size_buffers += (max_channels)*2 *
 1276|  14.7k|                  IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_sbr_bitstream_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1277|       |
 1278|  14.7k|  size_buffers +=
 1279|  14.7k|      num_channel * IXHEAAC_GET_SIZE_ALIGNED(MAXSBRBYTES * sizeof(WORD8), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1280|       |
 1281|  14.7k|  size_buffers +=
 1282|  14.7k|      num_channel * IXHEAAC_GET_SIZE_ALIGNED(MAXSBRBYTES * sizeof(WORD8), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1283|       |
 1284|  14.7k|  size_buffers +=
 1285|  14.7k|      2 * num_channel *
 1286|  14.7k|      IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1287|  14.7k|          (QMF_FILTER_STATE_ANA_SIZE + 2 * NO_ANALYSIS_CHANNELS) * sizeof(WORD16), BYTE_ALIGN_8);
 1288|       |
 1289|  14.7k|  size_buffers +=
 1290|  14.7k|      2 * num_channel *
 1291|  14.7k|      IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1292|  14.7k|          (QMF_FILTER_STATE_ANA_SIZE + 2 * NO_ANALYSIS_CHANNELS) * sizeof(WORD32), BYTE_ALIGN_8);
 1293|       |
 1294|  14.7k|  size_buffers +=
 1295|  14.7k|      2 * num_channel *
 1296|  14.7k|      IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1297|  14.7k|          (QMF_FILTER_STATE_SYN_SIZE + 2 * NO_SYNTHESIS_CHANNELS) * sizeof(WORD16), BYTE_ALIGN_8);
 1298|       |
 1299|  14.7k|  size_buffers +=
 1300|  14.7k|      2 * num_channel *
 1301|  14.7k|      IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1302|  14.7k|          (QMF_FILTER_STATE_SYN_SIZE + 2 * NO_SYNTHESIS_CHANNELS) * sizeof(WORD32), BYTE_ALIGN_8);
 1303|       |
 1304|  14.7k|  size_buffers += num_channel * 2 *
 1305|  14.7k|                  IXHEAAC_GET_SIZE_ALIGNED(MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32),
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1306|  14.7k|                                           BYTE_ALIGN_8);
 1307|       |
 1308|  14.7k|  size_buffers += 2 * LPC_ORDER * num_channel *
  ------------------
  |  |   65|  14.7k|#define LPC_ORDER 2
  ------------------
 1309|  14.7k|                  IXHEAAC_GET_SIZE_ALIGNED(NO_ANALYSIS_CHANNELS * sizeof(WORD32), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1310|       |
 1311|  14.7k|  size_buffers += 2 * IXHEAAC_GET_SIZE_ALIGNED(LPC_ORDER * sizeof(WORD32 *), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1312|       |
 1313|  14.7k|  size_buffers += 2 * LPC_ORDER * num_channel *
  ------------------
  |  |   65|  14.7k|#define LPC_ORDER 2
  ------------------
 1314|  14.7k|                  IXHEAAC_GET_SIZE_ALIGNED(NO_ANALYSIS_CHANNELS * sizeof(WORD32), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1315|       |
 1316|  14.7k|  size_buffers += 2 * num_channel * 3 *
 1317|  14.7k|                  IXHEAAC_GET_SIZE_ALIGNED(MAX_FREQ_COEFFS * sizeof(WORD16), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1318|       |
 1319|  14.7k|  temp = IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_freq_band_data_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1320|  14.7k|         IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_sbr_prev_frame_data_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1321|  14.7k|         IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_sbr_channel_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1322|  14.7k|         IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_sbr_header_data_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1323|  14.7k|  size_buffers += 2 * num_channel * temp;
 1324|       |
 1325|  14.7k|  size_buffers += MAX_BS_ELEMENT *
  ------------------
  |  |   24|  14.7k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  14.7k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 1326|  14.7k|                  IXHEAAC_GET_SIZE_ALIGNED(sizeof(ixheaac_drc_bs_data_struct *), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1327|       |
 1328|  14.7k|  size_buffers += num_channel * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_ps_dec_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1329|       |
 1330|  14.7k|  {
 1331|  14.7k|    WORD32 temp_size = 0;
 1332|  14.7k|    size_buffers += (num_channel * 2 *
 1333|  14.7k|                     IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_sbr_frame_info_data_struct) +
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1334|  14.7k|                                                  MAX_FREQ_COEFFS * sizeof(WORD32) * 2 + 8,
 1335|  14.7k|                                              BYTE_ALIGN_8));
 1336|  14.7k|    temp_size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_pvc_data_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1337|  14.7k|    temp_size += 2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_esbr_hbe_txposer_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1338|  14.7k|    temp_size += 2 * IXHEAAC_GET_SIZE_ALIGNED(MAX_HBE_PERSISTENT_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1339|  14.7k|    temp_size +=
 1340|  14.7k|        2 * 2 * IXHEAAC_GET_SIZE_ALIGNED(MAX_QMF_BUF_LEN * sizeof(FLOAT32 *), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1341|  14.7k|    temp_size += 2 * 2 * MAX_QMF_BUF_LEN *
  ------------------
  |  |  137|  14.7k|#define MAX_QMF_BUF_LEN 78
  ------------------
 1342|  14.7k|                 IXHEAAC_GET_SIZE_ALIGNED(MAX_QMF_BUF_LEN * sizeof(FLOAT32), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1343|  14.7k|    temp_size += 2 * 2 * MAX_ENV_COLS *
  ------------------
  |  |   71|  14.7k|#define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   69|  14.7k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  14.7k|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  14.7k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  14.7k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|  14.7k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   70|  14.7k|#define MAX_OV_COLS 6
  |  |  ------------------
  ------------------
 1344|  14.7k|                 IXHEAAC_GET_SIZE_ALIGNED(MAX_QMF_BUF_LEN * sizeof(WORD32), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.7k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1345|  14.7k|    size_buffers += num_channel * temp_size;
 1346|  14.7k|  }
 1347|       |
 1348|  14.7k|  return (size_buffers);
 1349|  14.7k|}
ixheaacd_api.c:ixheaacd_allocate_aac_scr:
  297|   235k|    WORD32 audio_object_type) {
  298|   235k|  WORD32 scratch_used = 0;
  299|   235k|  aac_scratch_struct->base_scr_8k = base_scratch_ptr;
  300|   235k|  aac_scratch_struct->extra_scr_4k[1] = (WORD8 *)base_scratch_ptr;
  301|   235k|  scratch_used += SCR_BASE_SCR_8K_SIZE;
  ------------------
  |  |  128|   235k|  (IXHEAAC_GET_SIZE_ALIGNED((2 * CHANNELS * MAX_BINS_LONG * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  ------------------
  |  |  |  |   87|   235k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  302|   235k|  if (channel == 1) {
  ------------------
  |  Branch (302:7): [True: 191k, False: 44.1k]
  ------------------
  303|   191k|    aac_scratch_struct->extra_scr_4k[0] = (WORD8 *)base_scratch_ptr + scratch_used;
  304|   191k|    scratch_used += SCR_EXTRA_SCR_4K_0_SIZE;
  ------------------
  |  |  130|   191k|  (2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_channel_info_struct), sizeof(WORD32)) + \
  |  |  ------------------
  |  |  |  |   87|   191k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  131|   191k|   2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_sfb_code_book_struct), sizeof(WORD32)) +    \
  |  |  ------------------
  |  |  |  |   87|   191k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  132|   191k|   IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_pns_stereo_data_struct), sizeof(WORD32)))
  |  |  ------------------
  |  |  |  |   87|   191k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  305|   191k|    aac_scratch_struct->extra_scr_4k[2] = (WORD8 *)base_scratch_ptr + scratch_used;
  306|   191k|    scratch_used += SCR_EXTRA_SCR_4K_2_SIZE;
  ------------------
  |  |  134|   191k|  (IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  ------------------
  |  |  |  |   87|   191k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  307|   191k|  } else {
  308|  44.1k|    aac_scratch_struct->extra_scr_4k[0] = output_ptr;
  309|       |
  310|  44.1k|    if (max_channel > 2) {
  ------------------
  |  Branch (310:9): [True: 44.1k, False: 0]
  ------------------
  311|  44.1k|      aac_scratch_struct->extra_scr_4k[0] = (WORD8 *)base_scratch_ptr + scratch_used;
  312|  44.1k|      scratch_used += SCR_EXTRA_SCR_4K_0_SIZE;
  ------------------
  |  |  130|  44.1k|  (2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_channel_info_struct), sizeof(WORD32)) + \
  |  |  ------------------
  |  |  |  |   87|  44.1k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  131|  44.1k|   2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_sfb_code_book_struct), sizeof(WORD32)) +    \
  |  |  ------------------
  |  |  |  |   87|  44.1k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  132|  44.1k|   IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_pns_stereo_data_struct), sizeof(WORD32)))
  |  |  ------------------
  |  |  |  |   87|  44.1k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  313|  44.1k|    }
  314|  44.1k|    aac_scratch_struct->extra_scr_4k[2] = (WORD8 *)base_scratch_ptr + scratch_used;
  315|  44.1k|    scratch_used += SCR_EXTRA_SCR_4K_2_SIZE;
  ------------------
  |  |  134|  44.1k|  (IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  ------------------
  |  |  |  |   87|  44.1k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  316|  44.1k|  }
  317|       |
  318|   235k|  if (audio_object_type == AOT_ER_AAC_ELD || audio_object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (318:7): [True: 59.1k, False: 176k]
  |  Branch (318:46): [True: 68.5k, False: 108k]
  ------------------
  319|   127k|    aac_scratch_struct->extra_scr_4k[0] = (WORD8 *)base_scratch_ptr + scratch_used;
  320|   127k|    scratch_used += SCR_EXTRA_SCR_4K_0_SIZE;
  ------------------
  |  |  130|   127k|  (2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_channel_info_struct), sizeof(WORD32)) + \
  |  |  ------------------
  |  |  |  |   87|   127k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  131|   127k|   2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_sfb_code_book_struct), sizeof(WORD32)) +    \
  |  |  ------------------
  |  |  |  |   87|   127k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  132|   127k|   IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_pns_stereo_data_struct), sizeof(WORD32)))
  |  |  ------------------
  |  |  |  |   87|   127k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  321|       |
  322|   127k|    aac_scratch_struct->extra_scr_4k[2] = (WORD8 *)base_scratch_ptr + scratch_used;
  323|   127k|    scratch_used += SCR_EXTRA_SCR_4K_2_SIZE;
  ------------------
  |  |  134|   127k|  (IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  ------------------
  |  |  |  |   87|   127k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  324|       |
  325|   127k|    aac_scratch_struct->extra_scr_4k[3] = (WORD8 *)base_scratch_ptr + scratch_used;
  326|   127k|    scratch_used += SCR_EXTRA_SCR_4K_3_SIZE;
  ------------------
  |  |  136|   127k|  (IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  ------------------
  |  |  |  |   87|   127k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  327|   127k|  }
  328|   235k|  if ((audio_object_type == AOT_ER_AAC_LD) || (audio_object_type == AOT_AAC_LTP)) {
  ------------------
  |  Branch (328:7): [True: 68.5k, False: 167k]
  |  Branch (328:47): [True: 31.5k, False: 135k]
  ------------------
  329|   100k|    aac_scratch_struct->out_data = (WORD32 *)((WORD8 *)base_scratch_ptr + scratch_used);
  330|   100k|    scratch_used += SCR_OUT_DATA_SIZE;
  ------------------
  |  |  138|   100k|  (IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  ------------------
  |  |  |  |   87|   100k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  331|       |
  332|   100k|    aac_scratch_struct->in_data = (WORD32 *)((WORD8 *)base_scratch_ptr + scratch_used);
  333|   100k|    scratch_used += SCR_IN_DATA_SIZE;
  ------------------
  |  |  140|   100k|  (2 * IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD32)), \
  |  |  ------------------
  |  |  |  |   87|   100k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  141|   100k|                                BYTE_ALIGN_8))
  ------------------
  334|   100k|  }
  335|   235k|}
ixheaacd_api.c:copy_qmf_to_ldmps:
  249|  8.80k|                              VOID *sbr_persistent_mem_v) {
  250|  8.80k|  ia_sbr_pers_struct *sbr_persistent_mem =
  251|  8.80k|      (ia_sbr_pers_struct *)sbr_persistent_mem_v;
  252|  8.80k|  memcpy(&mps_dec_handle->str_mps_qmf_bank,
  253|  8.80k|         &sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_channel[0]
  254|  8.80k|              ->str_sbr_dec.str_codec_qmf_bank,
  255|  8.80k|         sizeof(ia_sbr_qmf_filter_bank_struct));
  256|       |
  257|  8.80k|  mps_dec_handle->sbr_tables_ptr =
  258|  8.80k|      sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_tables;
  259|  8.80k|  mps_dec_handle->qmf_dec_tables_ptr =
  260|  8.80k|      sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_tables->qmf_dec_tables_ptr;
  261|  8.80k|  mps_dec_handle->str_sbr_scale_fact =
  262|  8.80k|      &sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_channel[0]
  263|  8.80k|           ->str_sbr_dec.str_sbr_scale_fact;
  264|  8.80k|}

ixheaacd_copy_to_bitbuff:
 1666|   655k|                              ia_bit_buf_struct *it_bit_buff_dst) {
 1667|   655k|  *it_bit_buff_dst = *it_bit_buff_src;
 1668|   655k|}
ixheaacd_arth_decoding_level2:
 1802|   655k|                                   WORD32 n, WORD32 pres_n, WORD32 *quant) {
 1803|   655k|  state_arith as;
 1804|   655k|  WORD32 a, b;
 1805|   655k|  WORD32 i, j, lev, pki, esc_nb;
 1806|   655k|  WORD32 m;
 1807|   655k|  WORD32 c = 0;
 1808|   655k|  struct ia_bit_buf_struct it_bit_buff_temp = {0};
 1809|   655k|  WORD32 bit_count = 0;
 1810|   655k|  WORD32 s1;
 1811|   655k|  WORD32 temp;
 1812|   655k|  WORD32 bit_count_5;
 1813|   655k|  ixheaacd_copy_to_bitbuff(it_bit_buff, &it_bit_buff_temp);
 1814|       |
 1815|  90.0M|  for (i = 0; i < pres_n; i++) {
  ------------------
  |  Branch (1815:15): [True: 89.4M, False: 655k]
  ------------------
 1816|  89.4M|    c_prev[i] = c_pres[i];
 1817|  89.4M|    c_pres[i] = 1;
 1818|  89.4M|  }
 1819|       |
 1820|   655k|  bit_count = ixheaacd_arith_first_symbol(&it_bit_buff_temp, &as);
 1821|       |
 1822|   655k|  c = (WORD32)c_prev[0] << 12;
 1823|   655k|  lev = 0;
 1824|       |
 1825|  29.5M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1825:15): [True: 28.9M, False: 579k]
  ------------------
 1826|  28.9M|    s1 = ixheaacd_arith_get_context(c_prev + i, c_pres + i, &c, i);
 1827|       |
 1828|  31.2M|    for (lev = esc_nb = 0;;) {
 1829|  31.2M|      pki = ixheaacd_arith_get_pk(s1 + ixheaacd_esc_nb_offset[esc_nb]);
 1830|  31.2M|      bit_count = ixheaacd_arith_decode(&it_bit_buff_temp, bit_count, &m, &as,
 1831|  31.2M|                                        ixheaacd_ari_cf_m[pki], 17);
 1832|  31.2M|      if (bit_count == -1) {
  ------------------
  |  Branch (1832:11): [True: 0, False: 31.2M]
  ------------------
 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|  31.2M|      if (m < ARITH_ESCAPE) {
  ------------------
  |  |   52|  31.2M|#define ARITH_ESCAPE 16
  ------------------
  |  Branch (1837:11): [True: 28.9M, False: 2.25M]
  ------------------
 1838|  28.9M|        break;
 1839|  28.9M|      }
 1840|       |
 1841|  2.25M|      lev += 1;
 1842|  2.25M|      esc_nb = lev;
 1843|       |
 1844|  2.25M|      if (esc_nb > 7) {
  ------------------
  |  Branch (1844:11): [True: 23.5k, False: 2.23M]
  ------------------
 1845|  23.5k|        esc_nb = 7;
 1846|  23.5k|      }
 1847|  2.25M|    }
 1848|       |
 1849|  28.9M|    if (m == 0) {
  ------------------
  |  Branch (1849:9): [True: 15.9M, False: 12.9M]
  ------------------
 1850|  15.9M|      if (esc_nb > 0) break;
  ------------------
  |  Branch (1850:11): [True: 75.3k, False: 15.8M]
  ------------------
 1851|       |
 1852|  15.8M|      quant[2 * i + 0] = 0;
 1853|  15.8M|      quant[2 * i + 1] = 0;
 1854|  15.8M|      c_pres[i] = 1;
 1855|  15.8M|    } else {
 1856|  12.9M|      b = m >> 2;
 1857|  12.9M|      a = m & 0x3;
 1858|       |
 1859|  15.1M|      for (j = 0; j < lev; j++) {
  ------------------
  |  Branch (1859:19): [True: 2.17M, False: 12.9M]
  ------------------
 1860|  2.17M|        WORD32 lsbidx = (a == 0) ? 1 : ((b == 0) ? 0 : 2);
  ------------------
  |  Branch (1860:25): [True: 323k, False: 1.85M]
  |  Branch (1860:41): [True: 359k, False: 1.49M]
  ------------------
 1861|  2.17M|        bit_count = ixheaacd_arith_decode(&it_bit_buff_temp, bit_count, &m, &as,
 1862|  2.17M|                                          ixheaacd_ari_cf_r[lsbidx], 4);
 1863|  2.17M|        if (bit_count == -1) {
  ------------------
  |  Branch (1863:13): [True: 0, False: 2.17M]
  ------------------
 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.17M|        a = (a << 1) | (m & 1);
 1868|  2.17M|        b = (b << 1) | ((m >> 1) & 1);
 1869|  2.17M|      }
 1870|  12.9M|      if ((a > (8183)) || (b > (8183))) {
  ------------------
  |  Branch (1870:11): [True: 291, False: 12.9M]
  |  Branch (1870:27): [True: 100, False: 12.9M]
  ------------------
 1871|    333|        longjmp(*(it_bit_buff->xaac_jmp_buf),
 1872|    333|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    333|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1873|    333|      }
 1874|  12.9M|      if ((a < (-8183)) || (b < (-8183))) {
  ------------------
  |  Branch (1874:11): [True: 89, False: 12.9M]
  |  Branch (1874:28): [True: 0, False: 12.9M]
  ------------------
 1875|     31|        longjmp(*(it_bit_buff->xaac_jmp_buf),
 1876|     31|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     31|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1877|     31|      }
 1878|  12.9M|      quant[2 * i + 0] = a;
 1879|  12.9M|      quant[2 * i + 1] = b;
 1880|  12.9M|      temp = a + b + 1;
 1881|  12.9M|      c_pres[i] = (WORD8)temp;
 1882|  12.9M|      if (temp > 0xF) {
  ------------------
  |  Branch (1882:11): [True: 310k, False: 12.6M]
  ------------------
 1883|   310k|        c_pres[i] = 0xF;
 1884|   310k|      }
 1885|  12.9M|    }
 1886|  28.9M|  }
 1887|       |
 1888|   654k|  bit_count -= 16 - 2;
 1889|   654k|  if (bit_count > it_bit_buff->cnt_bits) {
  ------------------
  |  Branch (1889:7): [True: 275, False: 654k]
  ------------------
 1890|    275|    longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    275|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1891|    275|  }
 1892|       |
 1893|   654k|  if (bit_count > 0) {
  ------------------
  |  Branch (1893:7): [True: 654k, False: 61]
  ------------------
 1894|   654k|    bit_count_5 = bit_count >> 5;
 1895|   654k|    bit_count_5 = (bit_count_5 * 32) + (bit_count & 31);
 1896|   654k|    ixheaacd_skip_bits_buf(it_bit_buff, bit_count_5);
 1897|   654k|  }
 1898|       |
 1899|  89.9M|  for (i = 0; i < pres_n; i++) {
  ------------------
  |  Branch (1899:15): [True: 89.2M, False: 654k]
  ------------------
 1900|  89.2M|    WORD32 temp0 = quant[0];
 1901|  89.2M|    WORD32 temp1 = quant[1];
 1902|  89.2M|    if (temp0) {
  ------------------
  |  Branch (1902:9): [True: 9.32M, False: 79.9M]
  ------------------
 1903|  9.32M|      m = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1904|  9.32M|      bit_count++;
 1905|       |
 1906|  9.32M|      m = (m << 1) * temp0;
 1907|  9.32M|      temp0 = m - (temp0);
 1908|  9.32M|    }
 1909|       |
 1910|  89.2M|    if (temp1) {
  ------------------
  |  Branch (1910:9): [True: 9.39M, False: 79.8M]
  ------------------
 1911|  9.39M|      m = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1912|  9.39M|      bit_count++;
 1913|       |
 1914|  9.39M|      m = (m << 1) * temp1;
 1915|  9.39M|      temp1 = m - (temp1);
 1916|  9.39M|    }
 1917|  89.2M|    if ((temp0 > (8183)) || (temp1 > (8183))) {
  ------------------
  |  Branch (1917:9): [True: 102, False: 89.2M]
  |  Branch (1917:29): [True: 0, False: 89.2M]
  ------------------
 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|  89.2M|    if ((temp0 < (-8183)) || (temp1 < (-8183))) {
  ------------------
  |  Branch (1920:9): [True: 102, False: 89.2M]
  |  Branch (1920:30): [True: 0, False: 89.2M]
  ------------------
 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|  89.2M|    *quant++ = temp0;
 1924|  89.2M|    *quant++ = temp1;
 1925|  89.2M|  }
 1926|   654k|  return;
 1927|   654k|}
ixheaacd_ac_spectral_data:
 2088|   239k|                                 WORD32 ch) {
 2089|   239k|  WORD32 i;
 2090|       |
 2091|   239k|  WORD32 *x_ac_dec = usac_data->x_ac_dec;
 2092|   239k|  WORD32 sbk;
 2093|       |
 2094|   239k|  const WORD32 max_win_len = usac_data->pstr_sfb_info[ch]->max_win_len;
 2095|   239k|  WORD8 *c_prev = &usac_data->c_prev[ch][0];
 2096|   239k|  WORD8 *c_pres = &usac_data->c[ch][0];
 2097|       |
 2098|   239k|  WORD8 *ptr_scratch_buf = (WORD8 *)&usac_data->scratch_buffer[0];
 2099|       |
 2100|   239k|  memset(x_ac_dec, 0, 1024 * sizeof(WORD32));
 2101|       |
 2102|   239k|  ixheaacd_arith_map_context(arith_pres_n, usac_data->arith_prev_n[ch], c_prev,
 2103|   239k|                             c_pres, arith_reset_flag, ptr_scratch_buf);
 2104|       |
 2105|   239k|  usac_data->arith_prev_n[ch] = arith_pres_n;
 2106|       |
 2107|   239k|  if (max_spec_coefficients > 0) {
  ------------------
  |  Branch (2107:7): [True: 144k, False: 95.5k]
  ------------------
 2108|   689k|    for (sbk = 0; sbk < max_win_len; sbk++) {
  ------------------
  |  Branch (2108:19): [True: 544k, False: 144k]
  ------------------
 2109|   544k|      ixheaacd_arth_decoding_level2(it_bit_buff, c_prev + 2, c_pres + 2,
 2110|   544k|                                    max_spec_coefficients / 2, arith_pres_n / 2,
 2111|   544k|                                    &x_ac_dec[sbk * arith_pres_n]);
 2112|       |
 2113|  54.4M|      for (i = max_spec_coefficients / 2; i < arith_pres_n / 2; i++) {
  ------------------
  |  Branch (2113:43): [True: 53.8M, False: 544k]
  ------------------
 2114|  53.8M|        x_ac_dec[sbk * arith_pres_n + 2 * i + 0] = 0;
 2115|  53.8M|        x_ac_dec[sbk * arith_pres_n + 2 * i + 1] = 0;
 2116|  53.8M|      }
 2117|   544k|    }
 2118|   144k|  } else {
 2119|  36.2M|    for (i = 0; i < (arith_pres_n / 2); i++) {
  ------------------
  |  Branch (2119:17): [True: 36.1M, False: 95.5k]
  ------------------
 2120|  36.1M|      c_pres[i + 2] = 1;
 2121|  36.1M|    }
 2122|  95.5k|  }
 2123|       |
 2124|   239k|  ixheaacd_apply_scfs_and_nf(noise_filling, usac_data, x_ac_dec, noise_level,
 2125|   239k|                             noise_offset, max_sfb, ch);
 2126|       |
 2127|   239k|  return 0;
 2128|   239k|}
ixheaacd_arith_data:
 2133|   110k|                           WORD32 first_tcx_flag, WORD32 k) {
 2134|   110k|  WORD32 *arith_prev_n = &usac_data->arith_prev_n[usac_data->present_chan];
 2135|   110k|  WORD32 arith_reset_flag =
 2136|   110k|      first_tcx_flag && pstr_td_frame_data->arith_reset_flag;
  ------------------
  |  Branch (2136:7): [True: 64.6k, False: 45.6k]
  |  Branch (2136:25): [True: 31.2k, False: 33.3k]
  ------------------
 2137|   110k|  WORD32 tcx_size = pstr_td_frame_data->tcx_lg[k];
 2138|   110k|  WORD8 *c_prev = usac_data->c_prev[usac_data->present_chan];
 2139|   110k|  WORD8 *c_pres = usac_data->c[usac_data->present_chan];
 2140|       |
 2141|   110k|  WORD8 *ptr_scratch_buf = (WORD8 *)&usac_data->scratch_buffer[0];
 2142|       |
 2143|   110k|  memset(x_ac_dec, 0, tcx_size * sizeof(WORD32));
 2144|       |
 2145|   110k|  ixheaacd_arith_map_context(tcx_size, *arith_prev_n, c_prev, c_pres,
 2146|   110k|                             arith_reset_flag, ptr_scratch_buf);
 2147|       |
 2148|   110k|  *arith_prev_n = tcx_size;
 2149|       |
 2150|   110k|  ixheaacd_arth_decoding_level2(it_bit_buff, c_prev + 2, c_pres + 2, tcx_size / 2, tcx_size / 2,
 2151|   110k|                                x_ac_dec);
 2152|       |
 2153|   110k|  return;
 2154|   110k|}
ixheaacd_arith_dec.c:ixheaacd_arith_first_symbol:
 1688|   655k|                                          state_arith *s) {
 1689|   655k|  register WORD32 val;
 1690|       |
 1691|   655k|  WORD32 bit_count = 16;
 1692|       |
 1693|   655k|  val = 0;
 1694|   655k|  if (it_bit_buff->cnt_bits < 16) {
  ------------------
  |  Branch (1694:7): [True: 74, False: 655k]
  ------------------
 1695|     74|    WORD32 shift_value = 16 - it_bit_buff->cnt_bits;
 1696|     74|    val = ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
 1697|     74|    val <<= shift_value;
 1698|   655k|  } else {
 1699|   655k|    val = ixheaacd_read_bits_buf(it_bit_buff, 16);
 1700|   655k|  }
 1701|       |
 1702|   655k|  s->low = 0;
 1703|   655k|  s->high = 65535;
 1704|   655k|  s->value = val;
 1705|       |
 1706|   655k|  return bit_count;
 1707|   655k|}
ixheaacd_arith_dec.c:ixheaacd_arith_get_context:
 1671|  28.9M|                                         WORD32 *c, WORD32 i) {
 1672|  28.9M|  WORD32 tmp = (WORD32)c_prev[1] << 12;
 1673|       |
 1674|  28.9M|  *c = *c >> 4;
 1675|  28.9M|  *c = *c + tmp;
 1676|  28.9M|  *c = (*c & 0xFFF0) + c_pres[-1];
 1677|       |
 1678|  28.9M|  if (i > 3) {
  ------------------
  |  Branch (1678:7): [True: 26.7M, False: 2.25M]
  ------------------
 1679|  26.7M|    if ((c_pres[-1] + c_pres[-2] + c_pres[-3]) < 5) {
  ------------------
  |  Branch (1679:9): [True: 14.1M, False: 12.5M]
  ------------------
 1680|  14.1M|      return (*c + 0x10000);
 1681|  14.1M|    }
 1682|  26.7M|  }
 1683|       |
 1684|  14.8M|  return (*c);
 1685|  28.9M|}
ixheaacd_arith_dec.c:ixheaacd_arith_get_pk:
 1709|  31.2M|static UWORD32 ixheaacd_arith_get_pk(UWORD32 c) {
 1710|  31.2M|  UWORD32 j;
 1711|  31.2M|  WORD32 i, i_min, i_max;
 1712|       |
 1713|  31.2M|  i_min = -1;
 1714|  31.2M|  i = i_min;
 1715|  31.2M|  i_max = 742 - 1;
 1716|   299M|  while ((i_max - i_min) > 1) {
  ------------------
  |  Branch (1716:10): [True: 284M, False: 14.9M]
  ------------------
 1717|   284M|    i = i_min + ((i_max - i_min) >> 1);
 1718|   284M|    j = ixheaacd_ari_hash_m[i];
 1719|   284M|    if (c < j)
  ------------------
  |  Branch (1719:9): [True: 150M, False: 133M]
  ------------------
 1720|   150M|      i_max = i;
 1721|   133M|    else if (c > j)
  ------------------
  |  Branch (1721:14): [True: 117M, False: 16.3M]
  ------------------
 1722|   117M|      i_min = i;
 1723|  16.3M|    else
 1724|  16.3M|      return (UWORD32)ixheaacd_ari_hash_m_1[i];
 1725|   284M|  }
 1726|       |
 1727|  14.9M|  return (ixheaacd_ari_lookup_m[i_max]);
 1728|  31.2M|}
ixheaacd_arith_dec.c:ixheaacd_arith_decode:
 1732|  33.3M|                                    UWORD16 const *cum_freq, WORD32 cfl) {
 1733|  33.3M|  register WORD32 symbol;
 1734|  33.3M|  register WORD32 low, high, range, value;
 1735|  33.3M|  register WORD32 cumulative;
 1736|  33.3M|  register UWORD16 const *p;
 1737|  33.3M|  register UWORD16 const *q;
 1738|       |
 1739|  33.3M|  low = s->low;
 1740|  33.3M|  high = s->high;
 1741|  33.3M|  value = s->value;
 1742|       |
 1743|  33.3M|  range = high - low + 1;
 1744|  33.3M|  cumulative = ((((WORD32)(value - low + 1)) << 14) - ((WORD32)1)) / ((WORD32)range);
 1745|       |
 1746|  33.3M|  if (it_bit_buff->cnt_bits == 0)
  ------------------
  |  Branch (1746:7): [True: 24.0k, False: 33.3M]
  ------------------
 1747|  24.0k|    if (cumulative <= 0) {
  ------------------
  |  Branch (1747:9): [True: 58, False: 24.0k]
  ------------------
 1748|     58|       longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     58|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1749|     58|    }
 1750|  33.3M|  p = cum_freq - 1;
 1751|       |
 1752|   131M|  do {
 1753|   131M|    q = p + (cfl >> 1);
 1754|       |
 1755|   131M|    if (*q > cumulative) {
  ------------------
  |  Branch (1755:9): [True: 32.8M, False: 98.7M]
  ------------------
 1756|  32.8M|      p = q;
 1757|  32.8M|      cfl++;
 1758|  32.8M|    }
 1759|   131M|    cfl >>= 1;
 1760|   131M|  } while (cfl > 1);
  ------------------
  |  Branch (1760:12): [True: 98.2M, False: 33.3M]
  ------------------
 1761|       |
 1762|  33.3M|  symbol = (WORD32)(p - cum_freq + 1);
 1763|       |
 1764|  33.3M|  if (symbol) high = low + ((range * cum_freq[symbol - 1]) >> 14) - 1;
  ------------------
  |  Branch (1764:7): [True: 16.7M, False: 16.6M]
  ------------------
 1765|       |
 1766|  33.3M|  low += ((range * cum_freq[symbol]) >> 14);
 1767|       |
 1768|  96.8M|  for (;;) {
 1769|  96.8M|    if (high < 32768) {
  ------------------
  |  Branch (1769:9): [True: 22.8M, False: 73.9M]
  ------------------
 1770|  73.9M|    } else if (low >= 32768) {
  ------------------
  |  Branch (1770:16): [True: 18.2M, False: 55.6M]
  ------------------
 1771|  18.2M|      value -= 32768;
 1772|  18.2M|      low -= 32768;
 1773|  18.2M|      high -= 32768;
 1774|  55.6M|    } else if (low >= 16384 && high < 49152) {
  ------------------
  |  Branch (1774:16): [True: 35.1M, False: 20.5M]
  |  Branch (1774:32): [True: 22.3M, False: 12.7M]
  ------------------
 1775|  22.3M|      value -= 16384;
 1776|  22.3M|      low -= 16384;
 1777|  22.3M|      high -= 16384;
 1778|  22.3M|    } else
 1779|  33.3M|      break;
 1780|       |
 1781|  63.4M|    low += low;
 1782|  63.4M|    high += high + 1;
 1783|       |
 1784|  63.4M|    if (it_bit_buff->cnt_bits > 0)
  ------------------
  |  Branch (1784:9): [True: 63.3M, False: 46.3k]
  ------------------
 1785|  63.3M|      value = (value << 1) | ixheaacd_read_bits_buf(it_bit_buff, 1);
 1786|  46.3k|    else
 1787|  46.3k|      value = (value << 1);
 1788|       |
 1789|  63.4M|    bit_count++;
 1790|  63.4M|  }
 1791|       |
 1792|  33.3M|  s->low = low;
 1793|  33.3M|  s->high = high;
 1794|  33.3M|  s->value = value;
 1795|       |
 1796|  33.3M|  *m = symbol;
 1797|       |
 1798|  33.3M|  return bit_count;
 1799|  33.3M|}
ixheaacd_arith_dec.c:ixheaacd_arith_map_context:
 1636|   350k|                                       WORD8 *ptr_scratch) {
 1637|   350k|  WORD32 i, k;
 1638|   350k|  FLOAT32 ratio;
 1639|   350k|  WORD8 *c_prev_tmp = ptr_scratch;
 1640|   350k|  WORD8 *c_tmp = ptr_scratch + 516;
 1641|       |
 1642|   350k|  if (arith_reset_flag) {
  ------------------
  |  Branch (1642:7): [True: 92.8k, False: 257k]
  ------------------
 1643|  47.9M|    for (i = 0; i < (1024 / 2) + 4; i++) {
  ------------------
  |  Branch (1643:17): [True: 47.8M, False: 92.8k]
  ------------------
 1644|  47.8M|      c_prev[i] = 0;
 1645|  47.8M|      c[i] = 0;
 1646|  47.8M|    }
 1647|       |
 1648|   257k|  } else {
 1649|  77.0M|    for (i = 2; i < (prev_n / 2 + 4); i++) {
  ------------------
  |  Branch (1649:17): [True: 76.8M, False: 257k]
  ------------------
 1650|  76.8M|      c_prev_tmp[i] = c_prev[i];
 1651|  76.8M|      c_tmp[i] = c[i];
 1652|  76.8M|    }
 1653|       |
 1654|   257k|    ratio = (FLOAT32)(prev_n) / (FLOAT32)(pres_n);
 1655|  76.9M|    for (i = 0; i < (pres_n / 2); i++) {
  ------------------
  |  Branch (1655:17): [True: 76.7M, False: 257k]
  ------------------
 1656|  76.7M|      k = (WORD32)((FLOAT32)(i)*ratio);
 1657|  76.7M|      c_prev[2 + i] = c_prev_tmp[2 + k];
 1658|  76.7M|      c[2 + i] = c_tmp[2 + k];
 1659|  76.7M|    }
 1660|   257k|    c_prev[(pres_n / 2) + 2] = c_prev_tmp[(prev_n / 2) + 2];
 1661|   257k|    c[(pres_n / 2) + 3] = c_tmp[(prev_n / 2) + 3];
 1662|   257k|  }
 1663|   350k|}
ixheaacd_arith_dec.c:ixheaacd_apply_scfs_and_nf:
 1997|   239k|                                       WORD32 ch) {
 1998|   239k|  WORD32 grp = 0, win_tot = 0, sfb = 0;
 1999|   239k|  WORD32 noise_filling_start_offset = 0;
 2000|   239k|  WORD32 fac = 0, length = 0;
 2001|   239k|  WORD64 fac_fix;
 2002|   239k|  WORD32 noise_level_fix = 0;
 2003|   239k|  ia_sfb_info_struct *pstr_sfb_info = usac_data->pstr_sfb_info[ch];
 2004|   239k|  WORD32 *coef = &usac_data->coef_fix[ch][0];
 2005|   239k|  WORD16 *factors = usac_data->factors[ch];
 2006|   239k|  UWORD32 *seed_value = &usac_data->seed_value[ch];
 2007|       |
 2008|   239k|  if (noise_filling) {
  ------------------
  |  Branch (2008:7): [True: 149k, False: 89.7k]
  ------------------
 2009|   149k|    noise_level_fix = ixheaacd_pow_14_3[noise_level];
 2010|   149k|    noise_filling_start_offset = (usac_data->ccfl == 768)
  ------------------
  |  Branch (2010:34): [True: 6.84k, False: 142k]
  ------------------
 2011|   149k|                                     ? (pstr_sfb_info->islong ? 120 : 15)
  ------------------
  |  Branch (2011:41): [True: 5.63k, False: 1.21k]
  ------------------
 2012|   149k|                                     : (pstr_sfb_info->islong ? 160 : 20);
  ------------------
  |  Branch (2012:41): [True: 80.7k, False: 61.8k]
  ------------------
 2013|   149k|  }
 2014|       |
 2015|   849k|  for (grp = 0; grp < pstr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (2015:17): [True: 610k, False: 239k]
  ------------------
 2016|   610k|    WORD32 grp_win = 0;
 2017|  3.35M|    for (sfb = 0; sfb < (WORD32)max_sfb; sfb++) {
  ------------------
  |  Branch (2017:19): [True: 2.74M, False: 610k]
  ------------------
 2018|  2.74M|      WORD32 noise_filling_present = 0;
 2019|  2.74M|      WORD32 band_quantized_to_zero = 1;
 2020|       |
 2021|  2.74M|      WORD32 sfb_offset = win_tot * pstr_sfb_info->sfb_per_sbk;
 2022|  2.74M|      fac = (WORD32)(factors[sfb_offset + sfb] - SF_OFFSET);
 2023|       |
 2024|  2.74M|      if (noise_filling) {
  ------------------
  |  Branch (2024:11): [True: 1.55M, False: 1.18M]
  ------------------
 2025|  4.33M|        for (grp_win = 0; grp_win < pstr_sfb_info->group_len[grp]; grp_win++) {
  ------------------
  |  Branch (2025:27): [True: 2.77M, False: 1.55M]
  ------------------
 2026|  2.77M|          WORD32 win = grp_win + win_tot;
 2027|  2.77M|          WORD32 ixheaacd_drc_offset = win * pstr_sfb_info->bins_per_sbk;
 2028|  2.77M|          WORD32 start = (sfb == 0) ? 0 : pstr_sfb_info->ptr_sfb_tbl[sfb - 1];
  ------------------
  |  Branch (2028:26): [True: 353k, False: 2.42M]
  ------------------
 2029|  2.77M|          WORD32 idx = 0;
 2030|  11.3M|          for (idx = start; idx < pstr_sfb_info->ptr_sfb_tbl[sfb]; idx++) {
  ------------------
  |  Branch (2030:29): [True: 10.7M, False: 567k]
  ------------------
 2031|  10.7M|            if (quant[ixheaacd_drc_offset + idx] != 0) {
  ------------------
  |  Branch (2031:17): [True: 1.58M, False: 9.15M]
  ------------------
 2032|  1.58M|              band_quantized_to_zero = 0;
 2033|  1.58M|              break;
 2034|  1.58M|            }
 2035|  9.15M|            if (!band_quantized_to_zero) break;
  ------------------
  |  Branch (2035:17): [True: 622k, False: 8.53M]
  ------------------
 2036|  9.15M|          }
 2037|  2.77M|        }
 2038|  1.55M|      }
 2039|       |
 2040|  2.74M|      if (band_quantized_to_zero && noise_filling) fac += (noise_offset - 16);
  ------------------
  |  Branch (2040:11): [True: 1.59M, False: 1.14M]
  |  Branch (2040:37): [True: 404k, False: 1.18M]
  ------------------
 2041|  2.74M|      {
 2042|  2.74M|        WORD16 exp, frac;
 2043|       |
 2044|  2.74M|        exp = fac >> 2;
 2045|  2.74M|        frac = fac & 3;
 2046|       |
 2047|  2.74M|        if (exp > 31) exp = 31;
  ------------------
  |  Branch (2047:13): [True: 179k, False: 2.56M]
  ------------------
 2048|       |
 2049|  2.74M|        if (fac < 0)
  ------------------
  |  Branch (2049:13): [True: 932k, False: 1.80M]
  ------------------
 2050|   932k|          fac_fix = 0;
 2051|  1.80M|        else {
 2052|  1.80M|          fac_fix = (WORD64)((WORD64)ixheaacd_table_frac[3 + frac] *
 2053|  1.80M|                             (WORD64)ixheaacd_table_exp[exp]);
 2054|  1.80M|          fac_fix >>= 15;
 2055|  1.80M|        }
 2056|  2.74M|      }
 2057|       |
 2058|  6.92M|      for (grp_win = 0; grp_win < pstr_sfb_info->group_len[grp]; grp_win++) {
  ------------------
  |  Branch (2058:25): [True: 4.18M, False: 2.74M]
  ------------------
 2059|  4.18M|        WORD32 win = win_tot + grp_win;
 2060|  4.18M|        WORD32 start = (sfb == 0) ? 0 : pstr_sfb_info->ptr_sfb_tbl[sfb - 1];
  ------------------
  |  Branch (2060:24): [True: 542k, False: 3.63M]
  ------------------
 2061|  4.18M|        WORD32 ixheaacd_drc_offset = win * pstr_sfb_info->bins_per_sbk;
 2062|       |
 2063|  4.18M|        if (noise_filling) {
  ------------------
  |  Branch (2063:13): [True: 2.77M, False: 1.40M]
  ------------------
 2064|  2.77M|          noise_filling_present =
 2065|  2.77M|              (start >= noise_filling_start_offset) & noise_filling;
 2066|  2.77M|        }
 2067|       |
 2068|  4.18M|        length = pstr_sfb_info->ptr_sfb_tbl[sfb] - start;
 2069|       |
 2070|  4.18M|        ixheaacd_esc_iquant(&quant[ixheaacd_drc_offset + start],
 2071|  4.18M|                            &coef[ixheaacd_drc_offset + start], noise_level_fix,
 2072|  4.18M|                            noise_filling_present, seed_value, length, fac_fix);
 2073|  4.18M|      }
 2074|  2.74M|    }
 2075|       |
 2076|   610k|    win_tot += pstr_sfb_info->group_len[grp];
 2077|   610k|  }
 2078|       |
 2079|   239k|  return;
 2080|   239k|}
ixheaacd_arith_dec.c:ixheaacd_esc_iquant:
 1942|  4.18M|                                WORD32 length, WORD64 fac_fix) {
 1943|  4.18M|  WORD32 q1 = 0;
 1944|  4.18M|  WORD64 temp;
 1945|  4.18M|  WORD16 interp;
 1946|  4.18M|  WORD32 i;
 1947|  4.18M|  WORD16 flag;
 1948|       |
 1949|  41.7M|  for (i = 0; i < length; i++) {
  ------------------
  |  Branch (1949:15): [True: 37.6M, False: 4.18M]
  ------------------
 1950|  37.6M|    flag = 1;
 1951|       |
 1952|  37.6M|    if (with_noise) {
  ------------------
  |  Branch (1952:9): [True: 16.8M, False: 20.7M]
  ------------------
 1953|  16.8M|      if (q[i] == 0) {
  ------------------
  |  Branch (1953:11): [True: 13.2M, False: 3.58M]
  ------------------
 1954|  13.2M|        coef[i] = (ixheaacd_randomsign_fix(seed_value) * noise_level);
 1955|  13.2M|        temp = (fac_fix * coef[i]);
 1956|  13.2M|        coef[i] = (WORD32)(temp >> 25);
 1957|  13.2M|        continue;
 1958|  13.2M|      }
 1959|  16.8M|    }
 1960|       |
 1961|  24.3M|    if (q[i] < 0) {
  ------------------
  |  Branch (1961:9): [True: 6.70M, False: 17.6M]
  ------------------
 1962|  6.70M|      flag = -1;
 1963|  6.70M|      q[i] = -q[i];
 1964|  6.70M|    }
 1965|       |
 1966|  24.3M|    if (q[i] >= 8192) {
  ------------------
  |  Branch (1966:9): [True: 0, False: 24.3M]
  ------------------
 1967|      0|      q[i] = 8191;
 1968|      0|    }
 1969|       |
 1970|  24.3M|    if (q[i] < 1024) {
  ------------------
  |  Branch (1970:9): [True: 24.3M, False: 709]
  ------------------
 1971|  24.3M|      coef[i] = flag * ixheaacd_pow_table_Q13[q[i]];
 1972|  24.3M|    } else {
 1973|    709|      q1 = (q[i]) >> 3;
 1974|       |
 1975|    709|      interp = q[i] - (q1 << 3);
 1976|       |
 1977|    709|      coef[i] = ixheaacd_pow_table_Q13[q1 + 1] - ixheaacd_pow_table_Q13[q1];
 1978|       |
 1979|    709|      coef[i] = (WORD32)(coef[i] * (WORD32)interp);
 1980|       |
 1981|    709|      coef[i] = coef[i] + (ixheaacd_pow_table_Q13[q1] << 3);
 1982|       |
 1983|    709|      coef[i] = flag * (coef[i] << 1);
 1984|    709|    }
 1985|  24.3M|    temp = ixheaac_mult64_sat(fac_fix, (WORD64)coef[i]);
 1986|       |
 1987|  24.3M|    coef[i] = (WORD32)(temp >> 22);
 1988|  24.3M|  }
 1989|       |
 1990|  4.18M|  return;
 1991|  4.18M|}
ixheaacd_arith_dec.c:ixheaacd_randomsign_fix:
 1929|  13.2M|static WORD32 ixheaacd_randomsign_fix(UWORD32 *seed) {
 1930|  13.2M|  WORD32 sign = 0;
 1931|  13.2M|  *seed = (UWORD32)(((UWORD64)(*seed) * (UWORD64)69069) + 5);
 1932|  13.2M|  if (((*seed) & 0x10000) > 0) {
  ------------------
  |  Branch (1932:7): [True: 6.67M, False: 6.57M]
  ------------------
 1933|  6.67M|    sign = -1;
 1934|  6.67M|  } else {
 1935|  6.57M|    sign = +1;
 1936|  6.57M|  }
 1937|  13.2M|  return sign;
 1938|  13.2M|}

ixheaacd_voronoi_search:
  103|   106k|                             WORD32 *rem2) {
  104|   106k|  WORD32 i, y0[8], y1[8];
  105|   106k|  WORD32 x1[8], tmp;
  106|   106k|  WORD32 e0, e1;
  107|       |
  108|   106k|  ixheaacd_nearest_neighbor_2d(x, y0, count, rem1);
  109|   956k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (109:15): [True: 849k, False: 106k]
  ------------------
  110|   849k|    if (x[i] == 0) {
  ------------------
  |  Branch (110:9): [True: 446k, False: 403k]
  ------------------
  111|   446k|      if (rem2[i] == 0) {
  ------------------
  |  Branch (111:11): [True: 174k, False: 272k]
  ------------------
  112|   174k|        x1[i] = x[i] - 1;
  113|   272k|      } else {
  114|   272k|        x1[i] = 0;
  115|   272k|        rem2[i] = ixheaac_sub32_sat(rem2[i], (1 << count));
  116|   272k|      }
  117|   446k|    } else {
  118|   403k|      x1[i] = ixheaac_sub32_sat(x[i], 1);
  119|   403k|    }
  120|   849k|  }
  121|       |
  122|   106k|  ixheaacd_nearest_neighbor_2d(x1, y1, count, rem2);
  123|       |
  124|   956k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (124:15): [True: 849k, False: 106k]
  ------------------
  125|   849k|    y1[i] = ixheaac_add32_sat(y1[i], 1);
  126|   849k|  }
  127|       |
  128|   106k|  e0 = e1 = 0;
  129|   956k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (129:15): [True: 849k, False: 106k]
  ------------------
  130|   849k|    tmp = rem1[i];
  131|   849k|    e0 = ixheaac_add32_sat(ixheaac_sat64_32((WORD64)tmp * (WORD64)tmp), e0);
  132|   849k|    tmp = rem2[i];
  133|   849k|    e1 = ixheaac_add32_sat(ixheaac_sat64_32((WORD64)tmp * (WORD64)tmp), e1);
  134|   849k|  }
  135|       |
  136|   106k|  if (e0 < e1) {
  ------------------
  |  Branch (136:7): [True: 78.2k, False: 27.9k]
  ------------------
  137|   704k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (137:17): [True: 626k, False: 78.2k]
  ------------------
  138|   626k|      y[i] = y0[i];
  139|   626k|    }
  140|  78.2k|  } else {
  141|   251k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (141:17): [True: 223k, False: 27.9k]
  ------------------
  142|   223k|      y[i] = y1[i];
  143|   223k|    }
  144|  27.9k|  }
  145|   106k|  return;
  146|   106k|}
ixheaacd_voronoi_idx_dec:
  148|   106k|VOID ixheaacd_voronoi_idx_dec(WORD32 *kv, WORD32 m, WORD32 *y, WORD32 count) {
  149|   106k|  WORD32 i, v[8], tmp, sum, *ptr1, *ptr2;
  150|   106k|  WORD32 z[8];
  151|   106k|  WORD32 rem1[8], rem2[8];
  152|       |
  153|   956k|  for (i = 0; i < 8; i++) y[i] = kv[7];
  ------------------
  |  Branch (153:15): [True: 849k, False: 106k]
  ------------------
  154|       |
  155|   106k|  z[7] = y[7] >> count;
  156|   106k|  rem1[7] = y[7] & (m - 1);
  157|   106k|  sum = 0;
  158|   743k|  for (i = 6; i >= 1; i--) {
  ------------------
  |  Branch (158:15): [True: 637k, False: 106k]
  ------------------
  159|   637k|    tmp = ixheaac_shl32_sat(kv[i], 1);
  160|   637k|    sum = ixheaac_add32_sat(sum, tmp);
  161|   637k|    y[i] = ixheaac_add32_sat(y[i], tmp);
  162|   637k|    z[i] = y[i] >> count;
  163|   637k|    rem1[i] = y[i] & (m - 1);
  164|   637k|  }
  165|   106k|  y[0] = ixheaac_add32_sat(
  166|   106k|      y[0],
  167|   106k|      ixheaac_add32_sat(ixheaac_sat64_32((WORD64)4 * (WORD64)kv[0]), sum));
  168|   106k|  z[0] = (ixheaac_sub32_sat(y[0], 2)) >> count;
  169|   106k|  if (m != 0)
  ------------------
  |  Branch (169:7): [True: 106k, False: 0]
  ------------------
  170|   106k|    rem1[0] = (ixheaac_sub32_sat(y[0], 2)) % m;
  171|      0|  else
  172|      0|    rem1[0] = ixheaac_sub32_sat(y[0], 2);
  173|       |
  174|   106k|  memcpy(rem2, rem1, 8 * sizeof(WORD32));
  175|       |
  176|   106k|  ixheaacd_voronoi_search(z, v, count, rem1, rem2);
  177|       |
  178|   106k|  ptr1 = y;
  179|   106k|  ptr2 = v;
  180|   956k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (180:15): [True: 849k, False: 106k]
  ------------------
  181|   849k|    *ptr1 = ixheaac_sub32_sat(*ptr1,
  182|   849k|                               ixheaac_sat64_32((WORD64)m * (WORD64)*ptr2++));
  183|   849k|    ptr1++;
  184|   849k|  }
  185|   106k|}
ixheaacd_rotated_gosset_mtx_dec:
  286|  3.18M|                                     WORD32 *kv, WORD32 *b) {
  287|  3.18M|  if (qn <= 4) {
  ------------------
  |  Branch (287:7): [True: 3.08M, False: 106k]
  ------------------
  288|  3.08M|    ixheaacd_gosset_decode_base_index(qn, code_book_idx, b);
  289|  3.08M|  } else {
  290|   106k|    WORD32 i, m, c[8];
  291|   106k|    WORD32 count = 0;
  292|   330k|    while (qn > 4) {
  ------------------
  |  Branch (292:12): [True: 224k, False: 106k]
  ------------------
  293|   224k|      count++;
  294|   224k|      qn -= 2;
  295|   224k|    }
  296|       |
  297|   106k|    if (count >= 31)
  ------------------
  |  Branch (297:9): [True: 0, False: 106k]
  ------------------
  298|      0|      m = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  299|   106k|    else
  300|   106k|      m = 1 << count;
  301|       |
  302|   106k|    ixheaacd_gosset_decode_base_index(qn, code_book_idx, b);
  303|       |
  304|   106k|    ixheaacd_voronoi_idx_dec(kv, m, c, count);
  305|       |
  306|   956k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (306:17): [True: 849k, False: 106k]
  ------------------
  307|   849k|      b[i] =
  308|   849k|          ixheaac_add32_sat(ixheaac_sat64_32((WORD64)m * (WORD64)b[i]), c[i]);
  309|   849k|    }
  310|   106k|  }
  311|  3.18M|  return;
  312|  3.18M|}
ixheaacd_avq_dec.c:ixheaacd_nearest_neighbor_2d:
   43|   212k|                                         WORD32 *rem) {
   44|   212k|  WORD32 i, j, sum;
   45|   212k|  WORD32 s, e[8], em;
   46|   212k|  WORD32 rem_temp[8];
   47|       |
   48|   212k|  memcpy(rem_temp, rem, 8 * sizeof(WORD32));
   49|       |
   50|   212k|  sum = 0;
   51|  1.91M|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (51:15): [True: 1.69M, False: 212k]
  ------------------
   52|  1.69M|    if (x[i] < 0) {
  ------------------
  |  Branch (52:9): [True: 183k, False: 1.51M]
  ------------------
   53|   183k|      y[i] = ixheaac_negate32_sat(
   54|   183k|          ixheaac_shl32_sat((ixheaac_sub32_sat(1, x[i]) >> 1), 1));
   55|  1.51M|    } else {
   56|  1.51M|      y[i] = ixheaac_shl32_sat((ixheaac_add32_sat(1, x[i]) >> 1), 1);
   57|  1.51M|    }
   58|  1.69M|    sum = ixheaac_add32_sat(sum, y[i]);
   59|       |
   60|  1.69M|    if (x[i] % 2 != 0) {
  ------------------
  |  Branch (60:9): [True: 577k, False: 1.12M]
  ------------------
   61|   577k|      if (x[i] < 0) {
  ------------------
  |  Branch (61:11): [True: 178k, False: 398k]
  ------------------
   62|   178k|        rem_temp[i] = ixheaac_negate32_sat(
   63|   178k|            ixheaac_sub32_sat(rem_temp[i], (1 << count)));
   64|   398k|      } else {
   65|   398k|        rem_temp[i] = ixheaac_sub32_sat(rem_temp[i], (1 << count));
   66|   398k|      }
   67|   577k|    }
   68|  1.69M|  }
   69|       |
   70|   212k|  if (sum % 4) {
  ------------------
  |  Branch (70:7): [True: 103k, False: 109k]
  ------------------
   71|   103k|    em = 0;
   72|   103k|    j = 0;
   73|   930k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (73:17): [True: 826k, False: 103k]
  ------------------
   74|   826k|      e[i] = rem_temp[i];
   75|   826k|    }
   76|   930k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (76:17): [True: 826k, False: 103k]
  ------------------
   77|   826k|      if (e[i] < 0) {
  ------------------
  |  Branch (77:11): [True: 354k, False: 472k]
  ------------------
   78|   354k|        s = -e[i];
   79|   472k|      } else {
   80|   472k|        s = e[i];
   81|   472k|      }
   82|       |
   83|   826k|      if (em < s) {
  ------------------
  |  Branch (83:11): [True: 137k, False: 689k]
  ------------------
   84|   137k|        em = s;
   85|   137k|        j = i;
   86|   137k|      }
   87|   826k|    }
   88|       |
   89|   103k|    if (e[j] < 0) {
  ------------------
  |  Branch (89:9): [True: 55.5k, False: 47.7k]
  ------------------
   90|  55.5k|      y[j] -= 2;
   91|  55.5k|      rem_temp[j] = ixheaac_add32_sat(rem_temp[j], (2 << count));
   92|  55.5k|    } else {
   93|  47.7k|      y[j] = ixheaac_add32_sat(y[j], 2);
   94|  47.7k|      rem_temp[j] = ixheaac_sub32_sat(rem_temp[j], (2 << count));
   95|  47.7k|    }
   96|   103k|  }
   97|       |
   98|   212k|  memcpy(rem, rem_temp, 8 * sizeof(WORD32));
   99|   212k|  return;
  100|   212k|}
ixheaacd_avq_dec.c:ixheaacd_gosset_decode_base_index:
  245|  3.18M|                                              WORD32 *ya) {
  246|  3.18M|  WORD32 i, im, t, sign_code, idx = 0, ks, rank;
  247|       |
  248|  3.18M|  if (n < 2) {
  ------------------
  |  Branch (248:7): [True: 1.64M, False: 1.54M]
  ------------------
  249|  14.7M|    for (i = 0; i < 8; i++) ya[i] = 0;
  ------------------
  |  Branch (249:17): [True: 13.1M, False: 1.64M]
  ------------------
  250|  1.64M|  } else {
  251|  1.54M|    switch (n) {
  ------------------
  |  Branch (251:13): [True: 1.54M, False: 0]
  ------------------
  252|   629k|      case 2:
  ------------------
  |  Branch (252:7): [True: 629k, False: 912k]
  ------------------
  253|  1.32M|      case 3:
  ------------------
  |  Branch (253:7): [True: 692k, False: 849k]
  ------------------
  254|  1.32M|        i = ixheaacd_get_abs_leader_tbl(ixheaacd_cardinality_offset_table_i3,
  255|  1.32M|                                        code_book_ind, LEN_I3);
  ------------------
  |  |   25|  1.32M|#define LEN_I3 9
  ------------------
  256|  1.32M|        idx = ixheaacd_pos_abs_leaders_a3[i];
  257|  1.32M|        break;
  258|   220k|      case 4:
  ------------------
  |  Branch (258:7): [True: 220k, False: 1.32M]
  ------------------
  259|   220k|        i = ixheaacd_get_abs_leader_tbl(ixheaacd_cardinality_offset_tab_i4,
  260|   220k|                                        code_book_ind, LEN_I4);
  ------------------
  |  |   26|   220k|#define LEN_I4 28
  ------------------
  261|   220k|        idx = ixheaacd_pos_abs_leaders_a4[i];
  262|   220k|        break;
  263|  1.54M|    }
  264|       |
  265|  13.8M|    for (i = 0; i < 8; i++) ya[i] = ixheaacd_absolute_leader_tab_da[idx][i];
  ------------------
  |  Branch (265:17): [True: 12.3M, False: 1.54M]
  ------------------
  266|       |
  267|  1.54M|    t = ixheaacd_iso_code_index_table[idx];
  268|  1.54M|    im = ixheaacd_iso_code_num_table[idx];
  269|  1.54M|    ks = ixheaacd_get_abs_leader_tbl(ixheaacd_signed_leader_is + t,
  270|  1.54M|                                     code_book_ind, im);
  271|       |
  272|  1.54M|    sign_code = 2 * ixheaacd_iso_code_data_table[t + ks];
  273|  13.8M|    for (i = 7; i >= 0; i--) {
  ------------------
  |  Branch (273:17): [True: 12.3M, False: 1.54M]
  ------------------
  274|  12.3M|      ya[i] *= (1 - (sign_code & 2));
  275|  12.3M|      sign_code >>= 1;
  276|  12.3M|    }
  277|       |
  278|  1.54M|    rank = code_book_ind - ixheaacd_signed_leader_is[t + ks];
  279|       |
  280|  1.54M|    ixheaacd_gosset_rank_of_permutation(rank, ya);
  281|  1.54M|  }
  282|  3.18M|  return;
  283|  3.18M|}
ixheaacd_avq_dec.c:ixheaacd_get_abs_leader_tbl:
  229|  3.08M|                                          UWORD32 code_book_ind, WORD32 size) {
  230|  3.08M|  WORD32 i;
  231|       |
  232|  4.04M|  for (i = 4; i < size; i += 4) {
  ------------------
  |  Branch (232:15): [True: 3.64M, False: 398k]
  ------------------
  233|  3.64M|    if (code_book_ind < table[i]) break;
  ------------------
  |  Branch (233:9): [True: 2.68M, False: 956k]
  ------------------
  234|  3.64M|  }
  235|  3.08M|  if (i > size) i = size;
  ------------------
  |  Branch (235:7): [True: 329k, False: 2.75M]
  ------------------
  236|       |
  237|  3.08M|  if (code_book_ind < table[i - 2]) i -= 2;
  ------------------
  |  Branch (237:7): [True: 2.16M, False: 917k]
  ------------------
  238|  3.08M|  if (code_book_ind < table[i - 1]) i--;
  ------------------
  |  Branch (238:7): [True: 1.49M, False: 1.59M]
  ------------------
  239|  3.08M|  i--;
  240|       |
  241|  3.08M|  return (i);
  242|  3.08M|}
ixheaacd_avq_dec.c:ixheaacd_gosset_rank_of_permutation:
  187|  1.54M|static VOID ixheaacd_gosset_rank_of_permutation(WORD32 rank, WORD32 *xs) {
  188|  1.54M|  WORD32 i, j, a[8], w[8], base, fac, fac_b, target;
  189|       |
  190|  1.54M|  j = 0;
  191|  1.54M|  w[j] = 1;
  192|  1.54M|  a[j] = xs[0];
  193|  1.54M|  base = 1;
  194|  12.3M|  for (i = 1; i < 8; i++) {
  ------------------
  |  Branch (194:15): [True: 10.7M, False: 1.54M]
  ------------------
  195|  10.7M|    if (xs[i] != xs[i - 1]) {
  ------------------
  |  Branch (195:9): [True: 2.64M, False: 8.14M]
  ------------------
  196|  2.64M|      j++;
  197|  2.64M|      w[j] = 1;
  198|  2.64M|      a[j] = xs[i];
  199|  8.14M|    } else {
  200|  8.14M|      w[j]++;
  201|  8.14M|      base *= w[j];
  202|  8.14M|    }
  203|  10.7M|  }
  204|       |
  205|  1.54M|  if (w[0] == 8) {
  ------------------
  |  Branch (205:7): [True: 45.5k, False: 1.49M]
  ------------------
  206|   409k|    for (i = 0; i < 8; i++) xs[i] = a[0];
  ------------------
  |  Branch (206:17): [True: 364k, False: 45.5k]
  ------------------
  207|  1.49M|  } else {
  208|  1.49M|    target = rank * base;
  209|  1.49M|    fac_b = 1;
  210|       |
  211|  13.4M|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (211:17): [True: 11.9M, False: 1.49M]
  ------------------
  212|  11.9M|      fac = fac_b * ixheaacd_factorial_7[i];
  213|  11.9M|      j = -1;
  214|  25.6M|      do {
  215|  25.6M|        target -= w[++j] * fac;
  216|  25.6M|      } while (target >= 0);
  ------------------
  |  Branch (216:16): [True: 13.6M, False: 11.9M]
  ------------------
  217|  11.9M|      xs[i] = a[j];
  218|       |
  219|  11.9M|      target += w[j] * fac;
  220|  11.9M|      fac_b *= w[j];
  221|  11.9M|      w[j]--;
  222|  11.9M|    }
  223|  1.49M|  }
  224|       |
  225|  1.54M|  return;
  226|  1.54M|}

ixheaacd_fix_mant_exp_add:
   37|   685k|                               WORD16 *ptr_result_exp) {
   38|   685k|  WORD32 new_mant;
   39|   685k|  WORD32 new_exp;
   40|   685k|  new_exp = op1_exp - op2_exp;
   41|   685k|  if (new_exp < 0) {
  ------------------
  |  Branch (41:7): [True: 373k, False: 312k]
  ------------------
   42|   373k|    if (new_exp < -31) {
  ------------------
  |  Branch (42:9): [True: 8.75k, False: 364k]
  ------------------
   43|  8.75k|      new_exp = -31;
   44|  8.75k|    }
   45|   373k|    op1_mant = op1_mant >> (-new_exp);
   46|   373k|    new_exp = op2_exp;
   47|   373k|  } else {
   48|   312k|    if (new_exp > 31) {
  ------------------
  |  Branch (48:9): [True: 61.1k, False: 251k]
  ------------------
   49|  61.1k|      new_exp = 31;
   50|  61.1k|    }
   51|   312k|    op2_mant = op2_mant >> new_exp;
   52|   312k|    new_exp = op1_exp;
   53|   312k|  }
   54|       |
   55|   685k|  new_mant = op1_mant + op2_mant;
   56|       |
   57|   685k|  if (ixheaac_abs32(new_mant) >= 0x8000) {
  ------------------
  |  Branch (57:7): [True: 7.18k, False: 678k]
  ------------------
   58|  7.18k|    new_mant = new_mant >> 1;
   59|  7.18k|    new_exp++;
   60|  7.18k|  }
   61|       |
   62|   685k|  *ptr_result_mant = new_mant;
   63|   685k|  *ptr_result_exp = (WORD16)(new_exp);
   64|   685k|}
ixheaacd_fix_mant_div:
   70|  4.06M|{
   71|  4.06M|  WORD32 pre_shift_val, post_shift_val;
   72|  4.06M|  WORD32 index;
   73|  4.06M|  WORD16 one_by_op2_mant;
   74|       |
   75|  4.06M|  pre_shift_val = ixheaac_norm32(op2_mant) - 16;
   76|       |
   77|  4.06M|  index = (op2_mant << pre_shift_val) >> (SHORT_BITS - 3 - 8);
  ------------------
  |  |   23|  4.06M|#define SHORT_BITS 16
  ------------------
   78|       |
   79|  4.06M|  index &= (1 << (8 + 1)) - 1;
   80|       |
   81|  4.06M|  if (index == 0) {
  ------------------
  |  Branch (81:7): [True: 1.33M, False: 2.72M]
  ------------------
   82|  1.33M|    post_shift_val = ixheaac_norm32(op1_mant) - 16;
   83|       |
   84|  1.33M|    *ptr_result_mant = (op1_mant << post_shift_val);
   85|  2.72M|  } else {
   86|  2.72M|    WORD32 ratio_m;
   87|       |
   88|  2.72M|    index = ((index - 1) >> 1);
   89|       |
   90|  2.72M|    one_by_op2_mant = pstr_common_tables->inv_table[index];
   91|       |
   92|  2.72M|    ratio_m = ixheaac_mult16x16in32(one_by_op2_mant, op1_mant);
   93|       |
   94|  2.72M|    post_shift_val = ixheaac_norm32(ratio_m) - 1;
   95|       |
   96|  2.72M|    *ptr_result_mant = (WORD16)((ratio_m << post_shift_val) >> 15);
   97|  2.72M|  }
   98|  4.06M|  return (pre_shift_val - post_shift_val);
   99|  4.06M|}
ixheaacd_fix_mant_exp_sqrt:
  101|  4.03M|VOID ixheaacd_fix_mant_exp_sqrt(WORD16 *ptr_in_out, WORD16 *sqrt_table) {
  102|  4.03M|  WORD32 index;
  103|  4.03M|  WORD32 pre_shift_val;
  104|  4.03M|  WORD32 op_mant = *ptr_in_out;
  105|  4.03M|  WORD32 op_exp = *(ptr_in_out + 1);
  106|  4.03M|  WORD32 result_m;
  107|  4.03M|  WORD32 result_e;
  108|       |
  109|  4.03M|  if (op_mant > 0) {
  ------------------
  |  Branch (109:7): [True: 2.70M, False: 1.33M]
  ------------------
  110|  2.70M|    pre_shift_val = (ixheaac_norm32((WORD16)op_mant) - 16);
  111|  2.70M|    op_exp = (op_exp - pre_shift_val);
  112|  2.70M|    index = (op_mant << pre_shift_val) >> (SHORT_BITS - 3 - 8);
  ------------------
  |  |   23|  2.70M|#define SHORT_BITS 16
  ------------------
  113|  2.70M|    index &= (1 << (8 + 1)) - 1;
  114|  2.70M|    result_m = sqrt_table[index >> 1];
  115|  2.70M|    if ((op_exp & 1) != 0) {
  ------------------
  |  Branch (115:9): [True: 1.37M, False: 1.32M]
  ------------------
  116|  1.37M|      result_m = (result_m * 0x5a82) >> 16;
  117|  1.37M|      op_exp += 3;
  118|  1.37M|    }
  119|  2.70M|    result_e = (op_exp >> 1);
  120|       |
  121|  2.70M|  } else {
  122|  1.33M|    result_m = 0;
  123|  1.33M|    result_e = -SHORT_BITS;
  ------------------
  |  |   23|  1.33M|#define SHORT_BITS 16
  ------------------
  124|  1.33M|  }
  125|       |
  126|  4.03M|  *ptr_in_out++ = (WORD16)result_m;
  127|  4.03M|  *ptr_in_out = (WORD16)result_e;
  128|  4.03M|}
ixheaacd_fix_div_dec:
  130|   710k|WORD32 ixheaacd_fix_div_dec(WORD32 op1, WORD32 op2) {
  131|   710k|  WORD32 quotient = 0;
  132|   710k|  UWORD32 abs_num, abs_den;
  133|   710k|  WORD32 k;
  134|   710k|  WORD32 sign;
  135|       |
  136|   710k|  abs_num = ixheaac_abs32(op1 >> 1);
  137|   710k|  abs_den = ixheaac_abs32(op2 >> 1);
  138|   710k|  sign = op1 ^ op2;
  139|       |
  140|   710k|  if (abs_num != 0) {
  ------------------
  |  Branch (140:7): [True: 710k, False: 0]
  ------------------
  141|  11.3M|    for (k = 15; k > 0; k--) {
  ------------------
  |  Branch (141:18): [True: 10.6M, False: 710k]
  ------------------
  142|  10.6M|      quotient = (quotient << 1);
  143|  10.6M|      abs_num = (abs_num << 1);
  144|  10.6M|      if (abs_num >= abs_den) {
  ------------------
  |  Branch (144:11): [True: 5.60M, False: 5.04M]
  ------------------
  145|  5.60M|        abs_num -= abs_den;
  146|  5.60M|        quotient++;
  147|  5.60M|      }
  148|  10.6M|    }
  149|   710k|  }
  150|   710k|  if (sign < 0) quotient = -(quotient);
  ------------------
  |  Branch (150:7): [True: 7.56k, False: 702k]
  ------------------
  151|       |
  152|   710k|  return quotient;
  153|   710k|}
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|   222k|VOID ixheaacd_memset(FLOAT32 *x, WORD32 n) {
   39|   222k|  memset(x, 0, n * sizeof(FLOAT32));
   40|   222k|  return;
   41|   222k|}
ixheaacd_mem_cpy:
   43|  1.94M|VOID ixheaacd_mem_cpy(const FLOAT32 x[], FLOAT32 y[], WORD32 n) {
   44|  1.94M|  memcpy(y, x, n * sizeof(FLOAT32));
   45|  1.94M|  return;
   46|  1.94M|}
ixheaacd_vec_cnst_mul:
   48|   230k|VOID ixheaacd_vec_cnst_mul(FLOAT32 a, FLOAT32 x[], FLOAT32 z[], WORD32 n) {
   49|   230k|  WORD32 i;
   50|  72.9M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (50:15): [True: 72.7M, False: 230k]
  ------------------
   51|  72.7M|    z[i] = (FLOAT32)a * x[i];
   52|  72.7M|  }
   53|   230k|  return;
   54|   230k|}
ixheaacd_combine_fac:
   57|  30.4k|                          WORD8 output_q, WORD8 fac_q) {
   58|  30.4k|  WORD32 i;
   59|  30.4k|  if (fac_q > output_q) {
  ------------------
  |  Branch (59:7): [True: 7.36k, False: 23.0k]
  ------------------
   60|  1.65M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (60:17): [True: 1.65M, False: 7.36k]
  ------------------
   61|  1.65M|      *dest = ixheaac_add32_sat(*src1, ((*src2) >> (fac_q - output_q)));
   62|  1.65M|      dest++;
   63|  1.65M|      src1++;
   64|  1.65M|      src2++;
   65|  1.65M|    }
   66|  23.0k|  } else {
   67|  5.50M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (67:17): [True: 5.48M, False: 23.0k]
  ------------------
   68|  5.48M|      *dest = ixheaac_add32_sat(
   69|  5.48M|          *src1, ixheaac_shl32_sat((*src2), (output_q - fac_q)));
   70|  5.48M|      dest++;
   71|  5.48M|      src1++;
   72|  5.48M|      src2++;
   73|  5.48M|    }
   74|  23.0k|  }
   75|  30.4k|}
ixheaacd_windowing_long1:
   80|   112k|                               WORD8 shift2) {
   81|   112k|  WORD32 i;
   82|   112k|  WORD32 *rsrc2 = src2 + vlen - 1;
   83|       |
   84|   112k|  if (shift1 > shift2) {
  ------------------
  |  Branch (84:7): [True: 108k, False: 3.46k]
  ------------------
   85|  54.1M|    for (i = 0; i < vlen / 2; i++) {
  ------------------
  |  Branch (85:17): [True: 54.0M, False: 108k]
  ------------------
   86|  54.0M|      *dest = ixheaac_add32_sat(
   87|  54.0M|          ((ixheaacd_mult32_sh1(*src1, *win_fwd)) >> (shift1 - shift2)),
   88|  54.0M|          ixheaacd_mult32_sh1(*src2, *win_rev));
   89|  54.0M|      *(dest + (vlen - (2 * i)) - 1) = ixheaac_add32_sat(
   90|  54.0M|          ((ixheaacd_mult32_sh1(ixheaac_negate32_sat(*src1), *win_rev)) >>
   91|  54.0M|           (shift1 - shift2)),
   92|  54.0M|          ixheaacd_mult32_sh1(*rsrc2, *win_fwd));
   93|       |
   94|  54.0M|      src1++;
   95|  54.0M|      src2++;
   96|  54.0M|      win_fwd++;
   97|  54.0M|      win_rev--;
   98|  54.0M|      rsrc2--;
   99|  54.0M|      dest++;
  100|  54.0M|    }
  101|   108k|    return (shift2);
  102|   108k|  } else {
  103|  1.76M|    for (i = 0; i < vlen / 2; i++) {
  ------------------
  |  Branch (103:17): [True: 1.75M, False: 3.46k]
  ------------------
  104|  1.75M|      *dest = ixheaac_add32_sat(
  105|  1.75M|          ixheaacd_mult32_sh1(*src1, *win_fwd),
  106|  1.75M|          ((ixheaacd_mult32_sh1(*src2, *win_rev)) >> (shift2 - shift1)));
  107|       |
  108|  1.75M|      *(dest + (vlen - (2 * i)) - 1) = ixheaac_add32_sat(
  109|  1.75M|          ixheaacd_mult32_sh1(ixheaac_negate32_sat(*src1), *win_rev),
  110|  1.75M|          ((ixheaacd_mult32_sh1(*rsrc2, *win_fwd)) >> (shift2 - shift1)));
  111|  1.75M|      src1++;
  112|  1.75M|      src2++;
  113|  1.75M|      win_fwd++;
  114|  1.75M|      win_rev--;
  115|  1.75M|      rsrc2--;
  116|  1.75M|      dest++;
  117|  1.75M|    }
  118|  3.46k|    return (shift1);
  119|  3.46k|  }
  120|   112k|}
ixheaacd_windowing_long2:
  126|  27.0k|                               WORD8 shiftp, WORD8 shift_olap, WORD8 fac_q) {
  127|  27.0k|  WORD32 i;
  128|  27.0k|  WORD32 *dest = p_out_buffer;
  129|       |
  130|  27.0k|  win_fwd += ixheaacd_drc_offset->lfac;
  131|       |
  132|  27.0k|  if (shiftp > fac_q) {
  ------------------
  |  Branch (132:7): [True: 18.4k, False: 8.65k]
  ------------------
  133|  18.4k|    if (shift_olap > fac_q) {
  ------------------
  |  Branch (133:9): [True: 4.22k, False: 14.1k]
  ------------------
  134|  4.22k|      for (i = 0;
  135|  2.27M|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  ------------------
  |  Branch (135:12): [True: 2.26M, False: 4.22k]
  ------------------
  136|  2.26M|           i++) {
  137|  2.26M|        dest[i] = over_lap[i] >> (shift_olap - fac_q);
  138|  2.26M|      }
  139|       |
  140|  4.22k|      for (i = ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  141|   305k|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
  ------------------
  |  Branch (141:12): [True: 301k, False: 4.22k]
  ------------------
  142|   301k|           i++) {
  143|   301k|        dest[i] = ixheaac_add32_sat(
  144|   301k|            (ixheaacd_mult32_sh1(
  145|   301k|                 ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  146|   301k|                                            ixheaacd_drc_offset->n_flat_ls +
  147|   301k|                                            ixheaacd_drc_offset->lfac - i - 1]),
  148|   301k|                 *win_fwd) >>
  149|   301k|             (shiftp - fac_q)),
  150|   301k|            (*fac_data_out));
  151|   301k|        win_fwd++;
  152|   301k|        fac_data_out++;
  153|   301k|      }
  154|       |
  155|  4.22k|      for (;
  156|   777k|           i < ixheaacd_drc_offset->n_flat_ls + (ixheaacd_drc_offset->lfac * 3);
  ------------------
  |  Branch (156:12): [True: 773k, False: 4.22k]
  ------------------
  157|   773k|           i++) {
  158|   773k|        dest[i] = ixheaac_add32_sat(
  159|   773k|            (ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  160|   773k|                                        ixheaacd_drc_offset->n_flat_ls +
  161|   773k|                                        ixheaacd_drc_offset->lfac - i - 1]) >>
  162|   773k|             (shiftp - fac_q)),
  163|   773k|            (*fac_data_out));
  164|   773k|        fac_data_out++;
  165|   773k|      }
  166|       |
  167|   960k|      for (; i < ixheaacd_drc_offset->n_long; i++) {
  ------------------
  |  Branch (167:14): [True: 956k, False: 4.22k]
  ------------------
  168|   956k|        dest[i] =
  169|   956k|            ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  170|   956k|                                       ixheaacd_drc_offset->n_flat_ls +
  171|   956k|                                       ixheaacd_drc_offset->lfac - i - 1]) >>
  172|   956k|            (shiftp - fac_q);
  173|   956k|      }
  174|  4.22k|      return (fac_q);
  175|  14.1k|    } else {
  176|  14.1k|      memcpy(dest, over_lap, sizeof(WORD32) * (ixheaacd_drc_offset->n_flat_ls +
  177|  14.1k|                                               ixheaacd_drc_offset->lfac));
  178|       |
  179|  14.1k|      for (i = ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  180|   137k|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
  ------------------
  |  Branch (180:12): [True: 123k, False: 14.1k]
  ------------------
  181|   123k|           i++) {
  182|   123k|        dest[i] = ixheaac_add32_sat(
  183|   123k|            (ixheaacd_mult32_sh1(
  184|   123k|                 ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  185|   123k|                                            ixheaacd_drc_offset->n_flat_ls +
  186|   123k|                                            ixheaacd_drc_offset->lfac - i - 1]),
  187|   123k|                 *win_fwd) >>
  188|   123k|             (shiftp - shift_olap)),
  189|   123k|            (*fac_data_out) >> (fac_q - shift_olap));
  190|   123k|        win_fwd++;
  191|   123k|        fac_data_out++;
  192|   123k|      }
  193|       |
  194|  14.1k|      for (;
  195|  3.52M|           i < ixheaacd_drc_offset->n_flat_ls + (ixheaacd_drc_offset->lfac * 3);
  ------------------
  |  Branch (195:12): [True: 3.50M, False: 14.1k]
  ------------------
  196|  3.50M|           i++) {
  197|  3.50M|        dest[i] = ixheaac_add32_sat(
  198|  3.50M|            (ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  199|  3.50M|                                        ixheaacd_drc_offset->n_flat_ls +
  200|  3.50M|                                        ixheaacd_drc_offset->lfac - i - 1]) >>
  201|  3.50M|             (shiftp - shift_olap)),
  202|  3.50M|            (*fac_data_out) >> (fac_q - shift_olap));
  203|  3.50M|        fac_data_out++;
  204|  3.50M|      }
  205|       |
  206|  2.79M|      for (; i < ixheaacd_drc_offset->n_long; i++) {
  ------------------
  |  Branch (206:14): [True: 2.78M, False: 14.1k]
  ------------------
  207|  2.78M|        dest[i] =
  208|  2.78M|            ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  209|  2.78M|                                       ixheaacd_drc_offset->n_flat_ls +
  210|  2.78M|                                       ixheaacd_drc_offset->lfac - i - 1]) >>
  211|  2.78M|            (shiftp - shift_olap);
  212|  2.78M|      }
  213|  14.1k|      return (shift_olap);
  214|  14.1k|    }
  215|  18.4k|  } else {
  216|  8.65k|    if (shift_olap > shiftp) {
  ------------------
  |  Branch (216:9): [True: 5.45k, False: 3.19k]
  ------------------
  217|  5.45k|      for (i = 0;
  218|  3.12M|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  ------------------
  |  Branch (218:12): [True: 3.11M, False: 5.45k]
  ------------------
  219|  3.11M|           i++) {
  220|  3.11M|        dest[i] = over_lap[i] >> (shift_olap - shiftp);
  221|  3.11M|      }
  222|       |
  223|  5.45k|      for (i = ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  224|  44.0k|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
  ------------------
  |  Branch (224:12): [True: 38.5k, False: 5.45k]
  ------------------
  225|  38.5k|           i++) {
  226|  38.5k|        dest[i] = ixheaac_add32_sat(
  227|  38.5k|            ixheaacd_mult32_sh1(
  228|  38.5k|                ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  229|  38.5k|                                           ixheaacd_drc_offset->n_flat_ls +
  230|  38.5k|                                           ixheaacd_drc_offset->lfac - i - 1]),
  231|  38.5k|                *win_fwd),
  232|  38.5k|            (*fac_data_out) >> (fac_q - shiftp));
  233|  38.5k|        win_fwd++;
  234|  38.5k|        fac_data_out++;
  235|  38.5k|      }
  236|       |
  237|  5.45k|      for (;
  238|  1.36M|           i < ixheaacd_drc_offset->n_flat_ls + (ixheaacd_drc_offset->lfac * 3);
  ------------------
  |  Branch (238:12): [True: 1.35M, False: 5.45k]
  ------------------
  239|  1.35M|           i++) {
  240|  1.35M|        dest[i] = ixheaac_add32_sat(
  241|  1.35M|            ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  242|  1.35M|                                       ixheaacd_drc_offset->n_flat_ls +
  243|  1.35M|                                       ixheaacd_drc_offset->lfac - i - 1]),
  244|  1.35M|            (*fac_data_out) >> (fac_q - shiftp));
  245|  1.35M|        fac_data_out++;
  246|  1.35M|      }
  247|       |
  248|  1.07M|      for (; i < ixheaacd_drc_offset->n_long; i++) {
  ------------------
  |  Branch (248:14): [True: 1.06M, False: 5.45k]
  ------------------
  249|  1.06M|        dest[i] =
  250|  1.06M|            ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  251|  1.06M|                                       ixheaacd_drc_offset->n_flat_ls +
  252|  1.06M|                                       ixheaacd_drc_offset->lfac - i - 1]);
  253|  1.06M|      }
  254|  5.45k|      return (shiftp);
  255|  5.45k|    } else {
  256|  3.19k|      memcpy(dest, over_lap, sizeof(WORD32) * (ixheaacd_drc_offset->n_flat_ls +
  257|  3.19k|                                               ixheaacd_drc_offset->lfac));
  258|       |
  259|  3.19k|      for (i = ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  260|  9.91k|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
  ------------------
  |  Branch (260:12): [True: 6.72k, False: 3.19k]
  ------------------
  261|  6.72k|           i++) {
  262|  6.72k|        dest[i] = ixheaac_add32_sat(
  263|  6.72k|            (ixheaacd_mult32_sh1(
  264|  6.72k|                 ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  265|  6.72k|                                            ixheaacd_drc_offset->n_flat_ls +
  266|  6.72k|                                            ixheaacd_drc_offset->lfac - i - 1]),
  267|  6.72k|                 *win_fwd) >>
  268|  6.72k|             (shiftp - shift_olap)),
  269|  6.72k|            (*fac_data_out) >> (fac_q - shift_olap));
  270|  6.72k|        win_fwd++;
  271|  6.72k|        fac_data_out++;
  272|  6.72k|      }
  273|       |
  274|  3.19k|      for (;
  275|   813k|           i < ixheaacd_drc_offset->n_flat_ls + (ixheaacd_drc_offset->lfac * 3);
  ------------------
  |  Branch (275:12): [True: 810k, False: 3.19k]
  ------------------
  276|   810k|           i++) {
  277|   810k|        dest[i] = ixheaac_add32_sat(
  278|   810k|            (ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  279|   810k|                                        ixheaacd_drc_offset->n_flat_ls +
  280|   810k|                                        ixheaacd_drc_offset->lfac - i - 1]) >>
  281|   810k|             (shiftp - shift_olap)),
  282|   810k|            (*fac_data_out) >> (fac_q - shift_olap));
  283|   810k|        fac_data_out++;
  284|   810k|      }
  285|       |
  286|   619k|      for (; i < ixheaacd_drc_offset->n_long; i++) {
  ------------------
  |  Branch (286:14): [True: 616k, False: 3.19k]
  ------------------
  287|   616k|        dest[i] =
  288|   616k|            ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  289|   616k|                                       ixheaacd_drc_offset->n_flat_ls +
  290|   616k|                                       ixheaacd_drc_offset->lfac - i - 1]) >>
  291|   616k|            (shiftp - shift_olap);
  292|   616k|      }
  293|  3.19k|      return (shift_olap);
  294|  3.19k|    }
  295|  8.65k|  }
  296|  27.0k|}
ixheaacd_windowing_long3:
  302|  28.1k|                               WORD8 shiftp, WORD8 shift_olap) {
  303|  28.1k|  WORD32 i;
  304|  28.1k|  WORD32 *dest = p_out_buffer;
  305|       |
  306|  28.1k|  if (shiftp > shift_olap) {
  ------------------
  |  Branch (306:7): [True: 19.7k, False: 8.43k]
  ------------------
  307|  19.7k|    memcpy(dest, over_lap, sizeof(FLOAT32) * ixheaacd_drc_offset->n_flat_ls);
  308|       |
  309|  19.7k|    for (i = ixheaacd_drc_offset->n_flat_ls;
  310|  1.48M|         i < ixheaacd_drc_offset->n_long / 2; i++) {
  ------------------
  |  Branch (310:10): [True: 1.46M, False: 19.7k]
  ------------------
  311|  1.46M|      dest[i] = ixheaac_add32_sat(
  312|  1.46M|          (ixheaacd_mult32_sh1(src1[i], *win_fwd) >> (shiftp - shift_olap)),
  313|  1.46M|          ixheaacd_mult32_sh1(over_lap[i], *win_rev));
  314|  1.46M|      win_fwd++;
  315|  1.46M|      win_rev--;
  316|  1.46M|    }
  317|       |
  318|  19.7k|    for (i = ixheaacd_drc_offset->n_long / 2;
  319|  1.48M|         i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
  ------------------
  |  Branch (319:10): [True: 1.46M, False: 19.7k]
  ------------------
  320|  1.46M|         i++) {
  321|  1.46M|      dest[i] = ixheaac_add32_sat(
  322|  1.46M|          (ixheaacd_mult32_sh1(
  323|  1.46M|               ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]),
  324|  1.46M|               *win_fwd) >>
  325|  1.46M|           (shiftp - shift_olap)),
  326|  1.46M|          ixheaacd_mult32_sh1(over_lap[i], *win_rev));
  327|  1.46M|      win_fwd++;
  328|  1.46M|      win_rev--;
  329|  1.46M|    }
  330|       |
  331|  8.54M|    for (; i < ixheaacd_drc_offset->n_long; i++) {
  ------------------
  |  Branch (331:12): [True: 8.52M, False: 19.7k]
  ------------------
  332|  8.52M|      dest[i] =
  333|  8.52M|          ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]) >>
  334|  8.52M|          (shiftp - shift_olap);
  335|  8.52M|    }
  336|       |
  337|  19.7k|    return (shift_olap);
  338|  19.7k|  } else {
  339|  3.66M|    for (i = 0; i < ixheaacd_drc_offset->n_flat_ls; i++) {
  ------------------
  |  Branch (339:17): [True: 3.65M, False: 8.43k]
  ------------------
  340|  3.65M|      dest[i] = over_lap[i] >> (shift_olap - shiftp);
  341|  3.65M|    }
  342|       |
  343|  8.43k|    for (i = ixheaacd_drc_offset->n_flat_ls;
  344|   623k|         i < ixheaacd_drc_offset->n_long / 2; i++) {
  ------------------
  |  Branch (344:10): [True: 615k, False: 8.43k]
  ------------------
  345|   615k|      dest[i] = ixheaac_add32_sat(
  346|   615k|          ixheaacd_mult32_sh1(src1[i], *win_fwd),
  347|   615k|          ixheaacd_mult32_sh1(over_lap[i], *win_rev) >> (shift_olap - shiftp));
  348|   615k|      win_fwd++;
  349|   615k|      win_rev--;
  350|   615k|    }
  351|       |
  352|  8.43k|    for (i = ixheaacd_drc_offset->n_long / 2;
  353|   623k|         i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
  ------------------
  |  Branch (353:10): [True: 615k, False: 8.43k]
  ------------------
  354|   615k|         i++) {
  355|   615k|      dest[i] = ixheaac_add32_sat(
  356|   615k|          ixheaacd_mult32_sh1(
  357|   615k|              ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]),
  358|   615k|              *win_fwd),
  359|   615k|          ixheaacd_mult32_sh1(over_lap[i], *win_rev) >> (shift_olap - shiftp));
  360|   615k|      win_fwd++;
  361|   615k|      win_rev--;
  362|   615k|    }
  363|       |
  364|  3.66M|    for (; i < ixheaacd_drc_offset->n_long; i++) {
  ------------------
  |  Branch (364:12): [True: 3.65M, False: 8.43k]
  ------------------
  365|  3.65M|      dest[i] =
  366|  3.65M|          ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]);
  367|  3.65M|    }
  368|       |
  369|  8.43k|    return (shiftp);
  370|  8.43k|  }
  371|  28.1k|}
ixheaacd_windowing_short1:
  375|  30.4k|                               WORD8 shiftp, WORD8 shift_olap) {
  376|  30.4k|  WORD32 i;
  377|  30.4k|  WORD32 *dest = fp;
  378|       |
  379|  30.4k|  if (shift_olap > shiftp) {
  ------------------
  |  Branch (379:7): [True: 14.6k, False: 15.7k]
  ------------------
  380|  14.6k|    if (ixheaacd_drc_offset->n_short > ixheaacd_drc_offset->lfac) {
  ------------------
  |  Branch (380:9): [True: 2.74k, False: 11.9k]
  ------------------
  381|   178k|      for (i = 0; i < ixheaacd_drc_offset->lfac; i++) {
  ------------------
  |  Branch (381:19): [True: 175k, False: 2.74k]
  ------------------
  382|   175k|        dest[i] = dest[i] >> (shift_olap - shiftp);
  383|   175k|      }
  384|   178k|      for (i = ixheaacd_drc_offset->lfac; i < ixheaacd_drc_offset->n_short;
  ------------------
  |  Branch (384:43): [True: 175k, False: 2.74k]
  ------------------
  385|   175k|           i++) {
  386|   175k|        dest[i] = ixheaacd_mult32_sh1(
  387|   175k|            ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_short - i - 1]),
  388|   175k|            src2[i]);
  389|   175k|      }
  390|       |
  391|  1.05M|      for (; i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  ------------------
  |  Branch (391:14): [True: 1.05M, False: 2.74k]
  ------------------
  392|  1.05M|           i++) {
  393|  1.05M|        dest[i] = 0;
  394|  1.05M|      }
  395|  11.9k|    } else {
  396|  1.54M|      for (i = 0; i < ixheaacd_drc_offset->lfac; i++) {
  ------------------
  |  Branch (396:19): [True: 1.52M, False: 11.9k]
  ------------------
  397|  1.52M|        dest[i] = dest[i] >> (shift_olap - shiftp);
  398|  1.52M|      }
  399|  11.9k|      for (i = ixheaacd_drc_offset->lfac;
  400|  5.36M|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  ------------------
  |  Branch (400:12): [True: 5.35M, False: 11.9k]
  ------------------
  401|  5.35M|           i++) {
  402|  5.35M|        dest[i] = 0;
  403|  5.35M|      }
  404|  11.9k|    }
  405|  15.7k|  } else {
  406|  15.7k|    if (ixheaacd_drc_offset->n_short > ixheaacd_drc_offset->lfac) {
  ------------------
  |  Branch (406:9): [True: 2.27k, False: 13.4k]
  ------------------
  407|   143k|      for (i = ixheaacd_drc_offset->lfac; i < ixheaacd_drc_offset->n_short;
  ------------------
  |  Branch (407:43): [True: 141k, False: 2.27k]
  ------------------
  408|   141k|           i++) {
  409|   141k|        dest[i] =
  410|   141k|            ixheaacd_mult32_sh1(ixheaac_negate32_sat(
  411|   141k|                                    src1[ixheaacd_drc_offset->n_short - i - 1]),
  412|   141k|                                src2[i]) >>
  413|   141k|            (shiftp - shift_olap);
  414|   141k|      }
  415|       |
  416|   848k|      for (; i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  ------------------
  |  Branch (416:14): [True: 846k, False: 2.27k]
  ------------------
  417|   846k|           i++) {
  418|   846k|        dest[i] = 0;
  419|   846k|      }
  420|  13.4k|    } else {
  421|  13.4k|      for (i = ixheaacd_drc_offset->lfac;
  422|  6.03M|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  ------------------
  |  Branch (422:12): [True: 6.02M, False: 13.4k]
  ------------------
  423|  6.02M|           i++) {
  424|  6.02M|        dest[i] = 0;
  425|  6.02M|      }
  426|  13.4k|    }
  427|  15.7k|  }
  428|  30.4k|}
ixheaacd_windowing_short2:
  432|  61.4k|                               WORD8 shiftp, WORD8 shift_olap) {
  433|  61.4k|  WORD32 i;
  434|       |
  435|  61.4k|  WORD32 *win_rev = win_fwd + ixheaacd_drc_offset->n_short - 1;
  436|       |
  437|  61.4k|  if (shift_olap > shiftp) {
  ------------------
  |  Branch (437:7): [True: 15.9k, False: 45.5k]
  ------------------
  438|  1.02M|    for (i = 0; i < ixheaacd_drc_offset->n_short / 2; i++) {
  ------------------
  |  Branch (438:17): [True: 1.01M, False: 15.9k]
  ------------------
  439|  1.01M|      fp[i] = ixheaac_add32_sat(
  440|  1.01M|          ixheaacd_mult32_sh1(src1[i], *win_fwd),
  441|  1.01M|          (ixheaacd_mult32_sh1(fp[i], *win_rev) >> (shift_olap - shiftp)));
  442|       |
  443|  1.01M|      fp[ixheaacd_drc_offset->n_short - i - 1] = ixheaac_add32_sat(
  444|  1.01M|          ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[i]), *win_rev),
  445|  1.01M|          (ixheaacd_mult32_sh1(fp[ixheaacd_drc_offset->n_short - i - 1],
  446|  1.01M|                               *win_fwd) >>
  447|  1.01M|           (shift_olap - shiftp)));
  448|  1.01M|      win_fwd++;
  449|  1.01M|      win_rev--;
  450|  1.01M|    }
  451|       |
  452|  15.9k|    for (i = ixheaacd_drc_offset->n_short;
  453|  7.11M|         i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_short;
  ------------------
  |  Branch (453:10): [True: 7.09M, False: 15.9k]
  ------------------
  454|  7.09M|         i++) {
  455|  7.09M|      fp[i] = 0;
  456|  7.09M|    }
  457|  45.5k|  } else {
  458|  2.90M|    for (i = 0; i < ixheaacd_drc_offset->n_short / 2; i++) {
  ------------------
  |  Branch (458:17): [True: 2.86M, False: 45.5k]
  ------------------
  459|  2.86M|      fp[i] = ixheaac_add32_sat(
  460|  2.86M|          (ixheaacd_mult32_sh1(src1[i], *win_fwd) >> (shiftp - shift_olap)),
  461|  2.86M|          ixheaacd_mult32_sh1(fp[i], *win_rev));
  462|       |
  463|  2.86M|      fp[ixheaacd_drc_offset->n_short - i - 1] = ixheaac_add32_sat(
  464|  2.86M|          (ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[i]), *win_rev) >>
  465|  2.86M|           (shiftp - shift_olap)),
  466|  2.86M|          ixheaacd_mult32_sh1(fp[ixheaacd_drc_offset->n_short - i - 1],
  467|  2.86M|                              *win_fwd));
  468|       |
  469|  2.86M|      win_fwd++;
  470|  2.86M|      win_rev--;
  471|  2.86M|    }
  472|       |
  473|  45.5k|    for (i = ixheaacd_drc_offset->n_short;
  474|  20.0M|         i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_short;
  ------------------
  |  Branch (474:10): [True: 20.0M, False: 45.5k]
  ------------------
  475|  20.0M|         i++) {
  476|  20.0M|      fp[i] = 0;
  477|  20.0M|    }
  478|  45.5k|  }
  479|  61.4k|}
ixheaacd_windowing_short3:
  483|  91.9k|                                WORD8 shift_olap) {
  484|  91.9k|  WORD32 i;
  485|  91.9k|  const WORD32 *win_fwd = win_rev - n_short + 1;
  486|  91.9k|  if (shift_olap > shiftp) {
  ------------------
  |  Branch (486:7): [True: 30.6k, False: 61.2k]
  ------------------
  487|  1.98M|    for (i = 0; i < n_short / 2; i++) {
  ------------------
  |  Branch (487:17): [True: 1.95M, False: 30.6k]
  ------------------
  488|  1.95M|      fp[i] = ixheaac_add32_sat(
  489|  1.95M|          ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 - i - 1]),
  490|  1.95M|                              *win_rev),
  491|  1.95M|          (fp[i] >> (shift_olap - shiftp)));
  492|       |
  493|  1.95M|      fp[n_short - i - 1] = ixheaac_add32_sat(
  494|  1.95M|          ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 - i - 1]),
  495|  1.95M|                              *win_fwd),
  496|  1.95M|          (fp[n_short - i - 1] >> (shift_olap - shiftp)));
  497|  1.95M|      win_rev--;
  498|  1.95M|      win_fwd++;
  499|  1.95M|    }
  500|  30.6k|    return (shiftp);
  501|  61.2k|  } else {
  502|  3.92M|    for (i = 0; i < n_short / 2; i++) {
  ------------------
  |  Branch (502:17): [True: 3.86M, False: 61.2k]
  ------------------
  503|  3.86M|      fp[i] = ixheaac_add32_sat(
  504|  3.86M|          (ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 - i - 1]),
  505|  3.86M|                               *win_rev) >>
  506|  3.86M|           (shiftp - shift_olap)),
  507|  3.86M|          fp[i]);
  508|       |
  509|  3.86M|      fp[n_short - i - 1] = ixheaac_add32_sat(
  510|  3.86M|          (ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 - i - 1]),
  511|  3.86M|                               *win_fwd) >>
  512|  3.86M|           (shiftp - shift_olap)),
  513|  3.86M|          fp[n_short - i - 1]);
  514|       |
  515|  3.86M|      win_rev--;
  516|  3.86M|      win_fwd++;
  517|  3.86M|    }
  518|  61.2k|    return (shift_olap);
  519|  61.2k|  }
  520|  91.9k|}
ixheaacd_windowing_short4:
  525|   643k|                                WORD8 output_q) {
  526|   643k|  WORD32 i;
  527|   643k|  const WORD32 *win_rev = win_fwd + n_short - 1;
  528|   643k|  const WORD32 *win_rev1 = win_fwd1 - n_short + 1;
  529|   643k|  if (shift_olap > output_q) {
  ------------------
  |  Branch (529:7): [True: 214k, False: 428k]
  ------------------
  530|  13.8M|    for (i = 0; i < n_short / 2; i++) {
  ------------------
  |  Branch (530:17): [True: 13.6M, False: 214k]
  ------------------
  531|  13.6M|      fp[i] = ixheaac_add32_sat(
  532|  13.6M|          ixheaacd_mult32_sh1(src1[n_short / 2 + i], *win_fwd) >>
  533|  13.6M|              (shiftp - output_q),
  534|  13.6M|          fp[i]);
  535|       |
  536|  13.6M|      fp[n_short - i - 1] = ixheaac_add32_sat(
  537|  13.6M|          ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 + i]),
  538|  13.6M|                              *win_rev) >>
  539|  13.6M|              (shiftp - output_q),
  540|  13.6M|          fp[n_short - i - 1]);
  541|       |
  542|  13.6M|      win_fwd++;
  543|  13.6M|      win_rev--;
  544|  13.6M|    }
  545|   214k|    if (flag == 1) {
  ------------------
  |  Branch (545:9): [True: 183k, False: 30.6k]
  ------------------
  546|  11.9M|      for (; i < n_short; i++) {
  ------------------
  |  Branch (546:14): [True: 11.7M, False: 183k]
  ------------------
  547|  11.7M|        fp[i + n_short / 2] = ixheaac_add32_sat(
  548|  11.7M|            ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short - i - 1]),
  549|  11.7M|                                *win_fwd1) >>
  550|  11.7M|                (shiftp - output_q),
  551|  11.7M|            (fp[i + n_short / 2] >> (shift_olap - output_q)));
  552|       |
  553|  11.7M|        fp[3 * n_short - n_short / 2 - i - 1] = ixheaac_add32_sat(
  554|  11.7M|            ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short - i - 1]),
  555|  11.7M|                                *win_rev1) >>
  556|  11.7M|                (shiftp - output_q),
  557|  11.7M|            (fp[3 * n_short - n_short / 2 - i - 1] >> (shift_olap - output_q)));
  558|       |
  559|  11.7M|        win_fwd1--;
  560|  11.7M|        win_rev1++;
  561|  11.7M|      }
  562|   183k|    } else {
  563|  1.98M|      for (; i < n_short; i++) {
  ------------------
  |  Branch (563:14): [True: 1.95M, False: 30.6k]
  ------------------
  564|  1.95M|        fp[i + n_short / 2] = ixheaac_add32_sat(
  565|  1.95M|            ixheaac_negate32_sat(src1[n_short - i - 1]) >> (shiftp - output_q),
  566|  1.95M|            fp[i + n_short / 2] >> (shift_olap - output_q));
  567|  1.95M|        fp[3 * n_short - n_short / 2 - i - 1] = ixheaac_add32_sat(
  568|  1.95M|            ixheaac_negate32_sat(src1[n_short - i - 1]) >> (shiftp - output_q),
  569|  1.95M|            fp[3 * n_short - n_short / 2 - i - 1] >> (shift_olap - output_q));
  570|  1.95M|      }
  571|  30.6k|    }
  572|   214k|    return (output_q);
  573|   428k|  } else {
  574|  27.4M|    for (i = 0; i < n_short / 2; i++) {
  ------------------
  |  Branch (574:17): [True: 27.0M, False: 428k]
  ------------------
  575|  27.0M|      fp[i] = ixheaac_add32_sat(
  576|  27.0M|          ixheaacd_mult32_sh1(src1[n_short / 2 + i], *win_fwd) >>
  577|  27.0M|              (shiftp - shift_olap),
  578|  27.0M|          fp[i] >> (output_q - shift_olap));
  579|       |
  580|  27.0M|      fp[n_short - i - 1] = ixheaac_add32_sat(
  581|  27.0M|          ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 + i]),
  582|  27.0M|                              *win_rev) >>
  583|  27.0M|              (shiftp - shift_olap),
  584|  27.0M|          fp[n_short - i - 1]);
  585|       |
  586|  27.0M|      win_fwd++;
  587|  27.0M|      win_rev--;
  588|  27.0M|    }
  589|   428k|    if (flag == 1) {
  ------------------
  |  Branch (589:9): [True: 367k, False: 61.2k]
  ------------------
  590|  23.5M|      for (; i < n_short; i++) {
  ------------------
  |  Branch (590:14): [True: 23.1M, False: 367k]
  ------------------
  591|  23.1M|        fp[i + n_short / 2] = ixheaac_add32_sat(
  592|  23.1M|            ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short - i - 1]),
  593|  23.1M|                                *win_fwd1) >>
  594|  23.1M|                (shiftp - shift_olap),
  595|  23.1M|            fp[i + n_short / 2]);
  596|       |
  597|  23.1M|        fp[3 * n_short - n_short / 2 - i - 1] = ixheaac_add32_sat(
  598|  23.1M|            ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short - i - 1]),
  599|  23.1M|                                *win_rev1) >>
  600|  23.1M|                (shiftp - shift_olap),
  601|  23.1M|            fp[3 * n_short - n_short / 2 - i - 1]);
  602|       |
  603|  23.1M|        win_fwd1--;
  604|  23.1M|        win_rev1++;
  605|  23.1M|      }
  606|   367k|    } else {
  607|  3.92M|      for (; i < n_short; i++) {
  ------------------
  |  Branch (607:14): [True: 3.86M, False: 61.2k]
  ------------------
  608|  3.86M|        fp[i + n_short / 2] =
  609|  3.86M|            ixheaac_add32_sat(ixheaac_negate32_sat(src1[n_short - i - 1]) >>
  610|  3.86M|                                   (shiftp - shift_olap),
  611|  3.86M|                               fp[i + n_short / 2]);
  612|  3.86M|        fp[3 * n_short - n_short / 2 - i - 1] =
  613|  3.86M|            ixheaac_add32_sat(ixheaac_negate32_sat(src1[n_short - i - 1]) >>
  614|  3.86M|                                   (shiftp - shift_olap),
  615|  3.86M|                               fp[3 * n_short - n_short / 2 - i - 1]);
  616|  3.86M|      }
  617|  61.2k|    }
  618|   428k|    return (shift_olap);
  619|   428k|  }
  620|   643k|}
ixheaacd_scale_down:
  623|   275k|                         WORD8 shift2) {
  624|   275k|  WORD32 i;
  625|   275k|  if (shift1 > shift2) {
  ------------------
  |  Branch (625:7): [True: 30.6k, False: 245k]
  ------------------
  626|  13.7M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (626:17): [True: 13.6M, False: 30.6k]
  ------------------
  627|  13.6M|      *dest = *src >> (shift1 - shift2);
  628|  13.6M|      src++;
  629|  13.6M|      dest++;
  630|  13.6M|    }
  631|   245k|  } else {
  632|   213M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (632:17): [True: 213M, False: 245k]
  ------------------
  633|   213M|      *dest = ixheaac_shl32_sat((*src), (shift2 - shift1));
  634|   213M|      src++;
  635|   213M|      dest++;
  636|   213M|    }
  637|   245k|  }
  638|   275k|}
ixheaacd_scale_down_adj:
  641|   167k|                             WORD8 shift1, WORD8 shift2) {
  642|   167k|  WORD32 i;
  643|   167k|  if (shift1 > shift2) {
  ------------------
  |  Branch (643:7): [True: 0, False: 167k]
  ------------------
  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|   167k|  } else {
  650|   167M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (650:17): [True: 167M, False: 167k]
  ------------------
  651|   167M|      *dest = ixheaac_add32_sat(ixheaac_shl32_sat((*src), (shift2 - shift1)),
  652|   167M|                                 ADJ_SCALE);
  ------------------
  |  |   70|   167M|#define ADJ_SCALE 11
  ------------------
  653|   167M|      src++;
  654|   167M|      dest++;
  655|   167M|    }
  656|   167k|  }
  657|   167k|}
ixheaacd_basic_ops.c:ixheaacd_mult32_sh1:
   28|   410M|static PLATFORM_INLINE WORD32 ixheaacd_mult32_sh1(WORD32 a, WORD32 b) {
   29|   410M|  WORD32 result;
   30|   410M|  WORD64 temp_result;
   31|       |
   32|   410M|  temp_result = (WORD64)a * (WORD64)b;
   33|   410M|  result = (WORD32)(temp_result >> 31);
   34|       |
   35|   410M|  return (result);
   36|   410M|}

ixheaacd_byte_align:
   39|   133k|                         WORD32 *align_bits_cnt) {
   40|   133k|  WORD alignment;
   41|   133k|  alignment = (WORD)((*align_bits_cnt - it_bit_buff->cnt_bits) & 0x07);
   42|       |
   43|   133k|  if (alignment) {
  ------------------
  |  Branch (43:7): [True: 51.8k, False: 82.1k]
  ------------------
   44|  51.8k|    ixheaacd_read_bits_buf(it_bit_buff, (8 - alignment));
   45|  51.8k|  }
   46|       |
   47|   133k|  *align_bits_cnt = it_bit_buff->cnt_bits;
   48|   133k|}
ixheaacd_skip_bits_buf:
   50|  4.63G|WORD32 ixheaacd_skip_bits_buf(ia_bit_buf_struct *it_bit_buff, WORD no_of_bits) {
   51|  4.63G|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
   52|  4.63G|  WORD bit_pos = it_bit_buff->bit_pos;
   53|       |
   54|  4.63G|  if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0)
  ------------------
  |  Branch (54:7): [True: 139, False: 4.63G]
  |  Branch (54:45): [True: 0, False: 4.63G]
  ------------------
   55|    139|    longjmp(*(it_bit_buff->xaac_jmp_buf),
   56|    139|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    139|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
   57|  4.63G|  it_bit_buff->cnt_bits -= no_of_bits;
   58|       |
   59|  4.63G|  ptr_read_next += no_of_bits / 8;
   60|  4.63G|  bit_pos -= (no_of_bits % 8);
   61|  4.63G|  if (bit_pos < 0) {
  ------------------
  |  Branch (61:7): [True: 580M, False: 4.05G]
  ------------------
   62|   580M|    bit_pos += 8;
   63|   580M|    ptr_read_next++;
   64|   580M|  }
   65|  4.63G|  assert(bit_pos >= 0 && bit_pos <= 7);
  ------------------
  |  Branch (65:3): [True: 0, False: 4.63G]
  |  Branch (65:3): [True: 0, False: 0]
  |  Branch (65:3): [True: 4.63G, False: 0]
  |  Branch (65:3): [True: 4.63G, False: 0]
  ------------------
   66|       |
   67|  4.63G|  it_bit_buff->ptr_read_next = ptr_read_next;
   68|  4.63G|  it_bit_buff->bit_pos = (WORD16)bit_pos;
   69|  4.63G|  return no_of_bits;
   70|  4.63G|}
ixheaacd_show_bits_buf:
   72|  4.44M|WORD32 ixheaacd_show_bits_buf(ia_bit_buf_struct *it_bit_buff, WORD no_of_bits) {
   73|  4.44M|  UWORD32 ret_val;
   74|  4.44M|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
   75|  4.44M|  WORD bit_pos = it_bit_buff->bit_pos;
   76|       |
   77|  4.44M|  if (no_of_bits == 0) {
  ------------------
  |  Branch (77:7): [True: 115, False: 4.44M]
  ------------------
   78|    115|    return 0;
   79|    115|  }
   80|       |
   81|  4.44M|  if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0 ||
  ------------------
  |  Branch (81:7): [True: 3, False: 4.44M]
  |  Branch (81:45): [True: 0, False: 4.44M]
  ------------------
   82|  4.44M|      no_of_bits > 25) {
  ------------------
  |  Branch (82:7): [True: 0, False: 4.44M]
  ------------------
   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.44M|  ret_val = (UWORD32)*ptr_read_next;
   88|       |
   89|  4.44M|  bit_pos -= no_of_bits;
   90|  15.1M|  while (bit_pos < -1) {
  ------------------
  |  Branch (90:10): [True: 10.7M, False: 4.44M]
  ------------------
   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.44M|  if (bit_pos == -1) {
  ------------------
  |  Branch (99:7): [True: 564k, False: 3.87M]
  ------------------
  100|   564k|    bit_pos += 8;
  101|   564k|    ret_val <<= 8;
  102|   564k|    ptr_read_next++;
  103|   564k|  }
  104|       |
  105|  4.44M|  ret_val = ret_val << ((31 - no_of_bits) - bit_pos) >> (32 - no_of_bits);
  106|       |
  107|  4.44M|  return ret_val;
  108|  4.44M|}
ixheaacd_read_bits_buf:
  110|   356M|WORD32 ixheaacd_read_bits_buf(ia_bit_buf_struct *it_bit_buff, WORD no_of_bits) {
  111|   356M|  UWORD32 ret_val;
  112|   356M|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  113|   356M|  WORD bit_pos = it_bit_buff->bit_pos;
  114|       |
  115|   356M|  if (no_of_bits == 0) {
  ------------------
  |  Branch (115:7): [True: 26.8M, False: 329M]
  ------------------
  116|  26.8M|    return 0;
  117|  26.8M|  }
  118|       |
  119|   329M|  if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0 ||
  ------------------
  |  Branch (119:7): [True: 3.05k, False: 329M]
  |  Branch (119:45): [True: 3, False: 329M]
  ------------------
  120|   329M|      no_of_bits > 25) {
  ------------------
  |  Branch (120:7): [True: 116, False: 329M]
  ------------------
  121|  3.17k|    longjmp(*(it_bit_buff->xaac_jmp_buf),
  122|  3.17k|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|  3.17k|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  123|  3.17k|  }
  124|       |
  125|   329M|  it_bit_buff->cnt_bits -= no_of_bits;
  126|   329M|  ret_val = (UWORD32)*ptr_read_next;
  127|       |
  128|   329M|  bit_pos -= no_of_bits;
  129|   384M|  while (bit_pos < -1) {
  ------------------
  |  Branch (129:10): [True: 55.3M, False: 329M]
  ------------------
  130|  55.3M|    bit_pos += 8;
  131|  55.3M|    ptr_read_next++;
  132|       |
  133|  55.3M|    ret_val <<= 8;
  134|       |
  135|  55.3M|    ret_val |= (UWORD32)*ptr_read_next;
  136|  55.3M|  }
  137|       |
  138|   329M|  if (bit_pos == -1) {
  ------------------
  |  Branch (138:7): [True: 42.8M, False: 286M]
  ------------------
  139|  42.8M|    bit_pos += 8;
  140|  42.8M|    ret_val <<= 8;
  141|  42.8M|    ptr_read_next++;
  142|  42.8M|  }
  143|       |
  144|   329M|  ret_val = ret_val << ((31 - no_of_bits) - bit_pos) >> (32 - no_of_bits);
  145|   329M|  it_bit_buff->ptr_read_next = ptr_read_next;
  146|   329M|  it_bit_buff->bit_pos = (WORD16)bit_pos;
  147|   329M|  return ret_val;
  148|   329M|}
ixheaacd_aac_read_byte:
  151|  2.91k|                            WORD32 *readword) {
  152|  2.91k|  UWORD8 *v = *ptr_read_next;
  153|  2.91k|  WORD32 bits_consumed = *bit_pos;
  154|       |
  155|  2.91k|  if ((bits_consumed -= 8) >= 0) {
  ------------------
  |  Branch (155:7): [True: 677, False: 2.24k]
  ------------------
  156|    677|    *readword = (*readword << 8) | *v;
  157|    677|    v++;
  158|  2.24k|  } else {
  159|  2.24k|    bits_consumed += 8;
  160|  2.24k|  }
  161|  2.91k|  *bit_pos = bits_consumed;
  162|  2.91k|  *ptr_read_next = v;
  163|  2.91k|  return;
  164|  2.91k|}
ixheaacd_aac_read_byte_corr1:
  167|  7.35M|                                  WORD32 *readword, UWORD8 *p_bit_buf_end) {
  168|  7.35M|  UWORD8 *v = *ptr_read_next;
  169|  7.35M|  WORD32 bits_consumed = *ptr_bit_pos;
  170|  7.35M|  WORD32 temp_bit_count = 0;
  171|       |
  172|  10.1M|  while (bits_consumed >= 8) {
  ------------------
  |  Branch (172:10): [True: 2.75M, False: 7.35M]
  ------------------
  173|  2.75M|    bits_consumed -= 8;
  174|  2.75M|    if ((p_bit_buf_end < v) && (p_bit_buf_end != 0))
  ------------------
  |  Branch (174:9): [True: 569k, False: 2.18M]
  |  Branch (174:32): [True: 38.1k, False: 531k]
  ------------------
  175|  38.1k|      temp_bit_count += 8;
  176|  2.71M|    else {
  177|  2.71M|      *readword = (*readword << 8) | *v;
  178|  2.71M|      v++;
  179|  2.71M|    }
  180|  2.75M|  }
  181|       |
  182|  7.35M|  if (bits_consumed > (31 - temp_bit_count)) {
  ------------------
  |  Branch (182:7): [True: 4.99k, False: 7.35M]
  ------------------
  183|  4.99k|    if ((p_bit_buf_end != NULL) && (p_bit_buf_end < v)) {
  ------------------
  |  Branch (183:9): [True: 4.99k, False: 0]
  |  Branch (183:36): [True: 4.99k, False: 0]
  ------------------
  184|  4.99k|      bits_consumed = 31 - temp_bit_count;
  185|  4.99k|    }
  186|  4.99k|  }
  187|       |
  188|  7.35M|  *ptr_bit_pos = bits_consumed + temp_bit_count;
  189|  7.35M|  *ptr_read_next = v;
  190|  7.35M|  return;
  191|  7.35M|}
ixheaacd_aac_read_byte_corr:
  194|  24.8M|                                 WORD32 *readword, UWORD8 *p_bit_buf_end) {
  195|  24.8M|  UWORD8 *v = *ptr_read_next;
  196|  24.8M|  WORD32 bits_consumed = *ptr_bit_pos;
  197|       |
  198|  24.8M|  if ((bits_consumed -= 8) >= 0) {
  ------------------
  |  Branch (198:7): [True: 6.09M, False: 18.7M]
  ------------------
  199|  6.09M|    if (p_bit_buf_end < v)
  ------------------
  |  Branch (199:9): [True: 250k, False: 5.84M]
  ------------------
  200|   250k|      bits_consumed += 8;
  201|  5.84M|    else {
  202|  5.84M|      *readword = (*readword << 8) | *v;
  203|  5.84M|      v++;
  204|  5.84M|    }
  205|  18.7M|  } else {
  206|  18.7M|    bits_consumed += 8;
  207|  18.7M|  }
  208|       |
  209|  24.8M|  if (bits_consumed > 31) {
  ------------------
  |  Branch (209:7): [True: 163k, False: 24.6M]
  ------------------
  210|   163k|    if (p_bit_buf_end < v) {
  ------------------
  |  Branch (210:9): [True: 163k, False: 389]
  ------------------
  211|   163k|      bits_consumed = 31;
  212|   163k|    }
  213|   163k|  }
  214|       |
  215|  24.8M|  *ptr_bit_pos = bits_consumed;
  216|  24.8M|  *ptr_read_next = v;
  217|  24.8M|  return;
  218|  24.8M|}
ixheaacd_aac_read_bit:
  220|  10.7M|WORD32 ixheaacd_aac_read_bit(ia_bit_buf_struct *it_bit_buff) {
  221|  10.7M|  UWORD8 ret_val;
  222|  10.7M|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  223|  10.7M|  WORD bit_pos = it_bit_buff->bit_pos;
  224|  10.7M|  UWORD32 temp;
  225|  10.7M|  WORD no_of_bits = 1;
  226|       |
  227|  10.7M|  if (bit_pos < 0) {
  ------------------
  |  Branch (227:7): [True: 1.09M, False: 9.62M]
  ------------------
  228|  1.09M|    bit_pos = 7;
  229|  1.09M|    ptr_read_next--;
  230|  1.09M|  }
  231|       |
  232|  10.7M|  if (ptr_read_next < it_bit_buff->ptr_bit_buf_base) {
  ------------------
  |  Branch (232:7): [True: 145, False: 10.7M]
  ------------------
  233|    145|    longjmp(*(it_bit_buff->xaac_jmp_buf),
  234|    145|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    145|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  235|    145|  }
  236|       |
  237|  10.7M|  it_bit_buff->cnt_bits += no_of_bits;
  238|  10.7M|  ret_val = *ptr_read_next;
  239|  10.7M|  bit_pos -= no_of_bits;
  240|       |
  241|  10.7M|  temp = (ret_val << 24) << (bit_pos + no_of_bits);
  242|  10.7M|  it_bit_buff->ptr_read_next = ptr_read_next;
  243|  10.7M|  it_bit_buff->bit_pos = (WORD16)bit_pos;
  244|       |
  245|  10.7M|  return temp >> (32 - no_of_bits);
  246|  10.7M|}
ixheaacd_aac_read_bit_rev:
  248|  8.71M|WORD32 ixheaacd_aac_read_bit_rev(ia_bit_buf_struct *it_bit_buff) {
  249|  8.71M|  UWORD8 ret_val;
  250|  8.71M|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  251|  8.71M|  WORD bit_pos = it_bit_buff->bit_pos;
  252|  8.71M|  UWORD32 temp;
  253|  8.71M|  WORD no_of_bits = 1;
  254|       |
  255|  8.71M|  if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (255:7): [True: 61, False: 8.71M]
  |  Branch (255:45): [True: 0, False: 8.71M]
  ------------------
  256|     61|    longjmp(*(it_bit_buff->xaac_jmp_buf),
  257|     61|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     61|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  258|     61|  }
  259|       |
  260|  8.71M|  if (bit_pos >= 8) {
  ------------------
  |  Branch (260:7): [True: 458k, False: 8.25M]
  ------------------
  261|   458k|    bit_pos -= 8;
  262|   458k|    ptr_read_next++;
  263|   458k|  }
  264|       |
  265|  8.71M|  it_bit_buff->cnt_bits -= no_of_bits;
  266|  8.71M|  ret_val = *ptr_read_next;
  267|  8.71M|  bit_pos += no_of_bits;
  268|       |
  269|  8.71M|  temp = (ret_val << 24) << (bit_pos - no_of_bits);
  270|  8.71M|  it_bit_buff->ptr_read_next = ptr_read_next;
  271|  8.71M|  it_bit_buff->bit_pos = (WORD16)bit_pos;
  272|       |
  273|  8.71M|  return temp >> (32 - no_of_bits);
  274|  8.71M|}
ixheaacd_write_bit:
  279|  15.0M|{
  280|  15.0M|  WORD32 mask;
  281|       |
  282|  15.0M|  if (no_of_bits == 0) return;
  ------------------
  |  Branch (282:7): [True: 234k, False: 14.7M]
  ------------------
  283|       |
  284|  14.7M|  mask = 0x1;
  285|  14.7M|  mask <<= no_of_bits - 1;
  286|       |
  287|  14.7M|  it_bit_buff->bit_count += no_of_bits;
  288|       |
  289|  31.8M|  while (no_of_bits > 0) {
  ------------------
  |  Branch (289:10): [True: 17.0M, False: 14.7M]
  ------------------
  290|  54.2M|    while (no_of_bits > 0 && it_bit_buff->valid_bits < 8) {
  ------------------
  |  Branch (290:12): [True: 39.4M, False: 14.7M]
  |  Branch (290:30): [True: 37.1M, False: 2.27M]
  ------------------
  291|  37.1M|      it_bit_buff->byte <<= 1;
  292|  37.1M|      if (value & mask) it_bit_buff->byte |= 0x1;
  ------------------
  |  Branch (292:11): [True: 6.69M, False: 30.4M]
  ------------------
  293|  37.1M|      value <<= 1;
  294|  37.1M|      no_of_bits--;
  295|  37.1M|      it_bit_buff->valid_bits++;
  296|  37.1M|    }
  297|  17.0M|    if (it_bit_buff->valid_bits == 8) {
  ------------------
  |  Branch (297:9): [True: 4.64M, False: 12.4M]
  ------------------
  298|  4.64M|      *it_bit_buff->byte_ptr++ = it_bit_buff->byte;
  299|  4.64M|      it_bit_buff->byte = 0;
  300|  4.64M|      it_bit_buff->valid_bits = 0;
  301|  4.64M|    }
  302|  17.0M|  }
  303|  14.7M|}
ixheaacd_read_bit:
  305|   513k|WORD32 ixheaacd_read_bit(ia_bit_buf_struct *it_bit_buff, WORD32 no_of_bits) {
  306|   513k|  UWORD32 ret_val;
  307|   513k|  UWORD8 *ptr_read_next = it_bit_buff->byte_ptr;
  308|       |
  309|   513k|  if (no_of_bits == 0) {
  ------------------
  |  Branch (309:7): [True: 242k, False: 271k]
  ------------------
  310|   242k|    return 0;
  311|   242k|  }
  312|       |
  313|   271k|  ret_val =
  314|   271k|      ixheaacd_aac_showbits_32(ptr_read_next, it_bit_buff->bit_count, NULL);
  315|   271k|  it_bit_buff->byte_ptr += (no_of_bits >> 3);
  316|       |
  317|   271k|  if (it_bit_buff->valid_bits != 8) {
  ------------------
  |  Branch (317:7): [True: 14.9k, False: 256k]
  ------------------
  318|  14.9k|    UWORD8 *v = it_bit_buff->byte_ptr;
  319|  14.9k|    ret_val = (ret_val << (8 - it_bit_buff->valid_bits)) |
  320|  14.9k|              (*v >> it_bit_buff->valid_bits);
  321|  14.9k|  }
  322|       |
  323|   271k|  it_bit_buff->valid_bits -= (no_of_bits % 8);
  324|       |
  325|   271k|  ret_val = ret_val >> (32 - no_of_bits);
  326|       |
  327|   271k|  return ret_val;
  328|   513k|}

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

ixheaacd_aac_showbits_32:
   94|  1.88M|                                 WORD32 *increment) {
   95|  1.88M|  UWORD8 *v = ptr_read_next;
   96|  1.88M|  UWORD32 b = 0;
   97|  1.88M|  WORD32 i;
   98|  1.88M|  WORD32 bumped = 0;
   99|       |
  100|  9.43M|  for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (100:15): [True: 7.55M, False: 1.88M]
  ------------------
  101|  7.55M|    b = b << 8;
  102|  7.55M|    if (cnt_bits > 0) {
  ------------------
  |  Branch (102:9): [True: 7.54M, False: 3.27k]
  ------------------
  103|  7.54M|      b = b | *v;
  104|  7.54M|      v++;
  105|  7.54M|      bumped++;
  106|  7.54M|    }
  107|  7.55M|    cnt_bits -= 8;
  108|  7.55M|  }
  109|  1.88M|  if (increment != NULL) {
  ------------------
  |  Branch (109:7): [True: 1.25M, False: 630k]
  ------------------
  110|  1.25M|    *increment = bumped;
  111|  1.25M|  }
  112|  1.88M|  return b;
  113|  1.88M|}
ixheaacd_getscalefactorbandoffsets:
  117|   288k|    ia_aac_dec_tables_struct *ptr_aac_tables) {
  118|   288k|  if (ptr_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   288k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (118:7): [True: 224k, False: 64.1k]
  ------------------
  119|   224k|    return ptr_aac_tables->sfb_long_table;
  120|   224k|  } else {
  121|  64.1k|    return ptr_aac_tables->sfb_short_table;
  122|  64.1k|  }
  123|   288k|}
ixheaacd_getscalefactorbandwidth:
  127|  45.1k|    ia_aac_dec_tables_struct *ptr_aac_tables) {
  128|  45.1k|  if (ptr_ics_info->frame_length == 512) {
  ------------------
  |  Branch (128:7): [True: 14.2k, False: 30.8k]
  ------------------
  129|  14.2k|    return (
  130|  14.2k|        WORD8 *)(&ptr_aac_tables
  131|  14.2k|                      ->scale_fac_bands_512[ptr_ics_info->sampling_rate_index]
  132|  14.2k|                                           [0]);
  133|  30.8k|  } else if (ptr_ics_info->frame_length == 1024) {
  ------------------
  |  Branch (133:14): [True: 4.97k, False: 25.8k]
  ------------------
  134|  4.97k|    return (
  135|  4.97k|        WORD8 *)(&ptr_aac_tables
  136|  4.97k|                      ->scale_factor_bands_long[ptr_ics_info->sampling_rate_index]
  137|  4.97k|                                               [0]);
  138|  25.8k|  } else {
  139|  25.8k|    return (
  140|  25.8k|        WORD8 *)(&ptr_aac_tables
  141|  25.8k|                      ->scale_fac_bands_480[ptr_ics_info->sampling_rate_index]
  142|  25.8k|                                           [0]);
  143|  25.8k|  }
  144|  45.1k|}
ixheaacd_cblock_scale_spect_data:
  153|  45.1k|    WORD32 object_type, WORD32 aac_sf_data_resil_flag) {
  154|  45.1k|  WORD32 *ptr_spect_coeff = ptr_aac_dec_channel_info->ptr_spec_coeff;
  155|  45.1k|  WORD8 *ptr_sfb_width = (WORD8 *)(ixheaacd_getscalefactorbandwidth(
  156|  45.1k|      &(ptr_aac_dec_channel_info->str_ics_info), ptr_aac_tables));
  157|  45.1k|  WORD16 *ptr_scale_fac = ptr_aac_dec_channel_info->ptr_scale_factor;
  158|  45.1k|  WORD tot_bands = ptr_aac_dec_channel_info->str_ics_info.max_sfb;
  159|       |
  160|  45.1k|  WORD num_win_grp, group_len;
  161|  45.1k|  WORD32 *ptr_scale_table = ptr_aac_tables->pstr_block_tables->scale_table;
  162|  45.1k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
  163|       |
  164|  45.1k|  if (object_type == AOT_ER_AAC_LC)
  ------------------
  |  Branch (164:7): [True: 22.9k, False: 22.1k]
  ------------------
  165|  22.9k|    ptr_sfb_width = ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence]
  166|  22.9k|      .sfb_width;
  167|   104k|  for (num_win_grp = 0; num_win_grp < ptr_ics_info->num_window_groups;
  ------------------
  |  Branch (167:25): [True: 59.3k, False: 45.1k]
  ------------------
  168|  59.3k|      num_win_grp++) {
  169|  59.3k|    for (group_len = 0;
  170|   196k|        group_len < ptr_ics_info->window_group_length[num_win_grp];
  ------------------
  |  Branch (170:9): [True: 137k, False: 59.3k]
  ------------------
  171|   137k|        group_len++) {
  172|   137k|      (*ixheaacd_scale_factor_process)(
  173|   137k|          &ptr_spect_coeff[0], &ptr_scale_fac[0], tot_bands,
  174|   137k|          (WORD8 *)ptr_sfb_width, ptr_scale_table, total_channels,
  175|   137k|          object_type, aac_sf_data_resil_flag);
  176|       |
  177|   137k|      ptr_spect_coeff += MAX_BINS_SHORT;
  ------------------
  |  |   29|   137k|#define MAX_BINS_SHORT 128
  ------------------
  178|   137k|    }
  179|  59.3k|    ptr_scale_fac += MAX_SCALE_FACTOR_BANDS_SHORT;
  ------------------
  |  |   30|  59.3k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  180|  59.3k|  }
  181|  45.1k|}
ixheaacd_read_pulse_data:
  185|  38.9k|                                ia_aac_dec_tables_struct *ptr_aac_tables) {
  186|  38.9k|  WORD32 i, total_offset;
  187|  38.9k|  WORD32 error_code = 0;
  188|       |
  189|  38.9k|  WORD32 value = ixheaacd_read_bits_buf(it_bit_buff, 8);
  190|  38.9k|  ptr_pulse_info->number_pulse = value >> 6;
  191|  38.9k|  ptr_pulse_info->pulse_start_band = value & 0x3F;
  192|       |
  193|  38.9k|  if (ptr_pulse_info->pulse_start_band >= 52) {
  ------------------
  |  Branch (193:7): [True: 121, False: 38.8k]
  ------------------
  194|    121|    return (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
  ------------------
  |  |  108|    121|#define IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR 0x0000180D
  ------------------
  195|    121|  }
  196|       |
  197|  38.8k|  total_offset = ptr_aac_tables->str_aac_sfb_info[0]
  198|  38.8k|                     .sfb_index[ptr_pulse_info->pulse_start_band];
  199|       |
  200|   126k|  for (i = 0; i < ptr_pulse_info->number_pulse + 1; i++) {
  ------------------
  |  Branch (200:15): [True: 87.2k, False: 38.8k]
  ------------------
  201|  87.2k|    WORD32 value = ixheaacd_read_bits_buf(it_bit_buff, 9);
  202|  87.2k|    ptr_pulse_info->pulse_offset[i] = value >> 4;
  203|  87.2k|    ptr_pulse_info->pulse_amp[i] = value & 0xF;
  204|  87.2k|    total_offset += ptr_pulse_info->pulse_offset[i];
  205|       |
  206|  87.2k|    if (total_offset >= 1024) {
  ------------------
  |  Branch (206:9): [True: 22, False: 87.2k]
  ------------------
  207|     22|      error_code = (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
  ------------------
  |  |  108|     22|#define IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR 0x0000180D
  ------------------
  208|     22|    }
  209|  87.2k|  }
  210|       |
  211|  38.8k|  return error_code;
  212|  38.9k|}
ixheaacd_ltp_decode:
  328|  10.7k|                                 WORD32 ch) {
  329|  10.7k|  IA_ERRORCODE retval = AAC_DEC_OK;
  ------------------
  |  |   23|  10.7k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  10.7k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  330|       |
  331|  10.7k|  if (ptr_ics_info->predictor_data_present) {
  ------------------
  |  Branch (331:7): [True: 4.11k, False: 6.60k]
  ------------------
  332|  4.11k|    if (ch == 0) {
  ------------------
  |  Branch (332:9): [True: 2.06k, False: 2.05k]
  ------------------
  333|  2.06k|      ixheaacd_init_ltp_object(&(ptr_ics_info->ltp));
  334|  2.06k|      ptr_ics_info->ltp.data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  335|  2.06k|      if (ptr_ics_info->ltp.data_present) {
  ------------------
  |  Branch (335:11): [True: 678, False: 1.38k]
  ------------------
  336|    678|        if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (336:13): [True: 0, False: 678]
  ------------------
  337|    678|                                        &(ptr_ics_info->ltp), it_bit_buff,
  338|    678|                                        frame_size)) > 0) {
  339|      0|          return retval;
  340|      0|        }
  341|    678|      }
  342|  2.06k|    } else {
  343|  2.05k|      ixheaacd_init_ltp_object(&(ptr_ics_info->ltp2));
  344|  2.05k|      ptr_ics_info->ltp2.data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  345|  2.05k|      if (ptr_ics_info->ltp2.data_present) {
  ------------------
  |  Branch (345:11): [True: 1.08k, False: 965]
  ------------------
  346|  1.08k|        if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (346:13): [True: 0, False: 1.08k]
  ------------------
  347|  1.08k|                                        &(ptr_ics_info->ltp2), it_bit_buff,
  348|  1.08k|                                        frame_size)) > 0) {
  349|      0|          return retval;
  350|      0|        }
  351|  1.08k|      }
  352|  2.05k|    }
  353|  4.11k|  }
  354|  10.7k|  return retval;
  355|  10.7k|}
ixheaacd_ics_read:
  359|   238k|                         WORD32 common_window, WORD32 frame_size) {
  360|   238k|  WORD i;
  361|   238k|  WORD mask;
  362|   238k|  WORD value = 0;
  363|       |
  364|   238k|  if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (364:7): [True: 59.0k, False: 179k]
  ------------------
  365|  59.0k|    ptr_ics_info->window_sequence = 0;
  366|  59.0k|    ptr_ics_info->window_shape = 1;
  367|   179k|  } else {
  368|   179k|    if (object_type != AOT_ER_AAC_LD)
  ------------------
  |  Branch (368:9): [True: 109k, False: 70.2k]
  ------------------
  369|   109k|    {
  370|   109k|      if (frame_size == 960)
  ------------------
  |  Branch (370:11): [True: 56.0k, False: 53.6k]
  ------------------
  371|  56.0k|        ptr_ics_info->frame_length = 960;
  372|  53.6k|      else
  373|  53.6k|        ptr_ics_info->frame_length = 1024;
  374|   109k|    }
  375|   179k|    value = ixheaacd_read_bits_buf(it_bit_buff, 4);
  376|   179k|    ptr_ics_info->window_sequence = (WORD16)((value & 0x6) >> 1);
  377|   179k|    ptr_ics_info->window_shape = (WORD16)((value & 0x1));
  378|   179k|  }
  379|       |
  380|   238k|  if (ptr_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   238k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (380:7): [True: 204k, False: 34.1k]
  ------------------
  381|   204k|    ptr_ics_info->num_swb_window = num_swb_window[0];
  382|       |
  383|   204k|    ptr_ics_info->num_window_groups = 1;
  384|   204k|    ptr_ics_info->window_group_length[0] = 1;
  385|       |
  386|   204k|    if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (386:9): [True: 59.0k, False: 145k]
  ------------------
  387|  59.0k|      ptr_ics_info->max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 6);
  388|  59.0k|      if (ptr_ics_info->max_sfb == 0) ptr_ics_info->num_swb_window = 0;
  ------------------
  |  Branch (388:11): [True: 18.1k, False: 40.9k]
  ------------------
  389|   145k|    } else {
  390|   145k|      value = ixheaacd_read_bits_buf(it_bit_buff, 7);
  391|   145k|      ptr_ics_info->max_sfb = (value & 0x7E) >> 1;
  392|   145k|    }
  393|       |
  394|   204k|    if ((object_type != AOT_ER_AAC_LD) && (object_type != AOT_AAC_LTP)) {
  ------------------
  |  Branch (394:9): [True: 146k, False: 58.1k]
  |  Branch (394:43): [True: 117k, False: 29.6k]
  ------------------
  395|   117k|      if (value & 1) {
  ------------------
  |  Branch (395:11): [True: 296, False: 116k]
  ------------------
  396|    296|        return (WORD16)(
  397|    296|            (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PREDICTION_DATA_PRESENT);
  ------------------
  |  |  106|    296|#define IA_XHEAAC_DEC_EXE_NONFATAL_PREDICTION_DATA_PRESENT 0x0000180B
  ------------------
  398|    296|      }
  399|       |
  400|   117k|    } else {
  401|  87.7k|      ptr_ics_info->predictor_data_present = value & 1;
  402|       |
  403|  87.7k|      if (ptr_ics_info->predictor_data_present) {
  ------------------
  |  Branch (403:11): [True: 55.0k, False: 32.7k]
  ------------------
  404|  55.0k|        WORD32 retval = AAC_DEC_OK;
  ------------------
  |  |   23|  55.0k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  55.0k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  405|       |
  406|  55.0k|        ixheaacd_init_ltp_object(&(ptr_ics_info->ltp));
  407|  55.0k|        if (object_type < ER_OBJECT_START) {
  ------------------
  |  |   64|  55.0k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (407:13): [True: 9.98k, False: 45.0k]
  ------------------
  408|  9.98k|          if ((ptr_ics_info->ltp.data_present =
  ------------------
  |  Branch (408:15): [True: 9.90k, False: 74]
  ------------------
  409|  9.98k|                   ixheaacd_read_bits_buf(it_bit_buff, 1)) &
  410|  9.98k|              1) {
  411|  9.90k|            if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (411:17): [True: 0, False: 9.90k]
  ------------------
  412|  9.90k|                                            &(ptr_ics_info->ltp), it_bit_buff,
  413|  9.90k|                                            frame_size)) > 0) {
  414|      0|              return retval;
  415|      0|            }
  416|  9.90k|          }
  417|  9.98k|          if (common_window) {
  ------------------
  |  Branch (417:15): [True: 351, False: 9.63k]
  ------------------
  418|    351|            ixheaacd_init_ltp_object(&(ptr_ics_info->ltp2));
  419|    351|            if ((ptr_ics_info->ltp2.data_present =
  ------------------
  |  Branch (419:17): [True: 12, False: 339]
  ------------------
  420|    351|                     ixheaacd_read_bits_buf(it_bit_buff, 1)) &
  421|    351|                1) {
  422|     12|              if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (422:19): [True: 0, False: 12]
  ------------------
  423|     12|                                              &(ptr_ics_info->ltp2),
  424|     12|                                              it_bit_buff, frame_size)) > 0) {
  425|      0|                return retval;
  426|      0|              }
  427|     12|            }
  428|    351|          }
  429|  9.98k|        }
  430|  55.0k|        if ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)) {
  ------------------
  |  Branch (430:13): [True: 8, False: 54.9k]
  |  Branch (430:48): [True: 45.0k, False: 9.97k]
  ------------------
  431|  45.0k|          if (!common_window && (object_type >= ER_OBJECT_START)) {
  ------------------
  |  |   64|  42.8k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (431:15): [True: 42.8k, False: 2.18k]
  |  Branch (431:33): [True: 42.8k, False: 0]
  ------------------
  432|  42.8k|            if ((ptr_ics_info->ltp.data_present =
  ------------------
  |  Branch (432:17): [True: 36.3k, False: 6.52k]
  ------------------
  433|  42.8k|                     ixheaacd_read_bits_buf(it_bit_buff, 1)) &
  434|  42.8k|                1) {
  435|  36.3k|              if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (435:19): [True: 6, False: 36.3k]
  ------------------
  436|  36.3k|                                              &(ptr_ics_info->ltp), it_bit_buff,
  437|  36.3k|                                              frame_size)) < 0) {
  438|      6|                return retval;
  439|      6|              }
  440|  36.3k|            }
  441|  42.8k|          }
  442|  45.0k|        }
  443|  55.0k|      }
  444|  87.7k|    }
  445|       |
  446|   204k|  } else {
  447|  34.1k|    WORD32 num_groups = 0, scale_factor_grouping;
  448|  34.1k|    ptr_ics_info->num_swb_window = num_swb_window[1];
  449|       |
  450|  34.1k|    value = ixheaacd_read_bits_buf(it_bit_buff, 11);
  451|  34.1k|    ptr_ics_info->max_sfb = (value & 0x780) >> 7;
  452|       |
  453|  34.1k|    scale_factor_grouping = (value & 0x7F);
  454|       |
  455|  34.1k|    mask = 0x40;
  456|   273k|    for (i = 0; i < 7; i++) {
  ------------------
  |  Branch (456:17): [True: 239k, False: 34.1k]
  ------------------
  457|   239k|      ptr_ics_info->window_group_length[i] = 1;
  458|       |
  459|   239k|      if (scale_factor_grouping & mask) {
  ------------------
  |  Branch (459:11): [True: 145k, False: 93.3k]
  ------------------
  460|   145k|        ptr_ics_info->window_group_length[num_groups] =
  461|   145k|            ptr_ics_info->window_group_length[num_groups] + 1;
  462|       |
  463|   145k|      } else {
  464|  93.3k|        num_groups = num_groups + 1;
  465|  93.3k|      }
  466|       |
  467|   239k|      mask = mask >> 1;
  468|   239k|    }
  469|       |
  470|  34.1k|    ptr_ics_info->window_group_length[7] = 1;
  471|  34.1k|    ptr_ics_info->num_window_groups = num_groups + 1;
  472|  34.1k|  }
  473|       |
  474|   238k|  if (ptr_ics_info->max_sfb > ptr_ics_info->num_swb_window) {
  ------------------
  |  Branch (474:7): [True: 24.7k, False: 213k]
  ------------------
  475|  24.7k|    return (WORD16)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED;
  ------------------
  |  |  103|  24.7k|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED 0x00001808
  ------------------
  476|  24.7k|  }
  477|       |
  478|   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
  |  |  ------------------
  ------------------
  479|   238k|}
ixheaacd_individual_ch_stream:
  484|   211k|    ia_eld_specific_config_struct eld_specific_config, WORD32 ele_type) {
  485|   211k|  WORD16 error_code = AAC_DEC_OK;
  ------------------
  |  |   23|   211k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   211k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  486|   211k|  WORD32 ch;
  487|   211k|  WORD32 crc_reg = 0;
  488|       |
  489|   439k|  for (ch = 0; ch < num_ch; ch++) {
  ------------------
  |  Branch (489:16): [True: 231k, False: 207k]
  ------------------
  490|   231k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_ch_info =
  491|   231k|        aac_dec_handle->pstr_aac_dec_ch_info[ch];
  492|   231k|    ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_ch_info->str_ics_info;
  493|       |
  494|   231k|    if (ch == 1) {
  ------------------
  |  Branch (494:9): [True: 20.6k, False: 211k]
  ------------------
  495|  20.6k|      if (it_bit_buff->pstr_adts_crc_info->crc_active == 1 &&
  ------------------
  |  Branch (495:11): [True: 36, False: 20.6k]
  ------------------
  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|  20.6k|    }
  502|   231k|    ptr_aac_dec_ch_info->global_gain =
  503|   231k|        (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 8);
  504|       |
  505|   231k|    if (!(aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->common_window)) {
  ------------------
  |  |   40|   231k|#define LEFT 0
  ------------------
  |  Branch (505:9): [True: 196k, False: 34.9k]
  ------------------
  506|   196k|      error_code = ixheaacd_ics_read(
  507|   196k|          it_bit_buff, ptr_ics_info, aac_dec_handle->num_swb_window,
  508|   196k|          object_type,
  509|   196k|          aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->common_window,
  ------------------
  |  |   40|   196k|#define LEFT 0
  ------------------
  510|   196k|          aac_dec_handle->samples_per_frame);
  511|   196k|      if (ch == 1)
  ------------------
  |  Branch (511:11): [True: 3.53k, False: 193k]
  ------------------
  512|  3.53k|        aac_dec_handle->pstr_aac_dec_ch_info[ch - 1]->str_ics_info.ltp2.lag =
  513|  3.53k|            ptr_ics_info->ltp.lag;
  514|       |
  515|   196k|      if (error_code) {
  ------------------
  |  Branch (515:11): [True: 546, False: 196k]
  ------------------
  516|    546|        if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (516:13): [True: 0, False: 546]
  ------------------
  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|    546|        return error_code;
  521|    546|      }
  522|   196k|    }
  523|       |
  524|   231k|    error_code = ixheaacd_read_block_data(
  525|   231k|        it_bit_buff, ptr_aac_dec_ch_info, aac_dec_handle->pstr_aac_tables,
  526|   231k|        total_channels, frame_size, object_type,
  527|   231k|        eld_specific_config.aac_spect_data_resil_flag,
  528|   231k|        eld_specific_config.aac_sect_data_resil_flag,
  529|   231k|        eld_specific_config.aac_sf_data_resil_flag, ele_type,
  530|   231k|        aac_dec_handle->pstr_aac_dec_overlap_info[ch]);
  531|   231k|    if (error_code) {
  ------------------
  |  Branch (531:9): [True: 2.92k, False: 228k]
  ------------------
  532|  2.92k|      if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (532:11): [True: 78, False: 2.84k]
  ------------------
  533|     78|        error_code = (WORD16)(
  534|     78|            (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     78|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  535|     78|      }
  536|       |
  537|  2.92k|      return error_code;
  538|  2.92k|    }
  539|       |
  540|   228k|    if (ch == 0) {
  ------------------
  |  Branch (540:9): [True: 206k, False: 21.2k]
  ------------------
  541|   206k|      if ((object_type == AOT_ER_AAC_LD) &&
  ------------------
  |  Branch (541:11): [True: 67.1k, False: 139k]
  ------------------
  542|  67.1k|          (aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->common_window) &&
  ------------------
  |  |   40|  67.1k|#define LEFT 0
  ------------------
  |  Branch (542:11): [True: 5.34k, False: 61.7k]
  ------------------
  543|  5.34k|          (ele_type == ID_CPE)) {
  ------------------
  |  Branch (543:11): [True: 5.34k, False: 0]
  ------------------
  544|  5.34k|        IA_ERRORCODE temp =
  545|  5.34k|            ixheaacd_ltp_decode(it_bit_buff, ptr_ics_info, object_type,
  546|  5.34k|                                aac_dec_handle->samples_per_frame, 1);
  547|       |
  548|  5.34k|        if (temp != 0) {
  ------------------
  |  Branch (548:13): [True: 1, False: 5.34k]
  ------------------
  549|      1|          return temp;
  550|      1|        }
  551|  5.34k|        aac_dec_handle->pstr_aac_dec_ch_info[ch + 1]->str_ics_info.ltp.lag =
  552|  5.34k|            ptr_ics_info->ltp2.lag;
  553|  5.34k|      }
  554|   206k|    }
  555|   228k|    if (ch == 1) {
  ------------------
  |  Branch (555:9): [True: 20.3k, False: 207k]
  ------------------
  556|  20.3k|      if (it_bit_buff->pstr_adts_crc_info->crc_active == 1) {
  ------------------
  |  Branch (556:11): [True: 25, False: 20.3k]
  ------------------
  557|     25|        ixheaacd_adts_crc_end_reg(it_bit_buff->pstr_adts_crc_info, it_bit_buff,
  558|     25|                                  crc_reg);
  559|     25|      }
  560|  20.3k|    }
  561|   228k|  }
  562|       |
  563|   207k|  return error_code;
  564|   211k|}
ixheaacd_read_ms_data:
  568|  17.7k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_ch_info) {
  569|  17.7k|  WORD32 num_win_group, sfb;
  570|  17.7k|  WORD32 ms_mask_present;
  571|  17.7k|  UWORD8 *ptr_ms_used = &ptr_aac_dec_ch_info->pstr_stereo_info->ms_used[0][0];
  572|  17.7k|  WORD32 num_window_groups =
  573|  17.7k|      ptr_aac_dec_ch_info->str_ics_info.num_window_groups;
  574|  17.7k|  WORD16 max_sfb = ptr_aac_dec_ch_info->str_ics_info.max_sfb;
  575|       |
  576|  17.7k|  ms_mask_present = ixheaacd_read_bits_buf(it_bit_buff, 2);
  577|       |
  578|  17.7k|  if (ms_mask_present < 1) {
  ------------------
  |  Branch (578:7): [True: 8.91k, False: 8.87k]
  ------------------
  579|  8.91k|    memset(ptr_ms_used, 0,
  580|  8.91k|           sizeof(UWORD8) * JOINT_STEREO_MAX_BANDS * JOINT_STEREO_MAX_GROUPS);
  ------------------
  |  |   31|  8.91k|#define JOINT_STEREO_MAX_BANDS 64
  ------------------
                         sizeof(UWORD8) * JOINT_STEREO_MAX_BANDS * JOINT_STEREO_MAX_GROUPS);
  ------------------
  |  |   30|  8.91k|#define JOINT_STEREO_MAX_GROUPS 8
  ------------------
  581|  8.91k|  }
  582|       |
  583|  8.87k|  else if (ms_mask_present == 1) {
  ------------------
  |  Branch (583:12): [True: 1.82k, False: 7.04k]
  ------------------
  584|  3.81k|    for (num_win_group = 0; num_win_group < num_window_groups;
  ------------------
  |  Branch (584:29): [True: 1.98k, False: 1.82k]
  ------------------
  585|  1.98k|         num_win_group++) {
  586|  7.27k|      for (sfb = 0; sfb < max_sfb; sfb++) {
  ------------------
  |  Branch (586:21): [True: 5.28k, False: 1.98k]
  ------------------
  587|  5.28k|        ptr_aac_dec_ch_info->pstr_stereo_info->ms_used[num_win_group][sfb] =
  588|  5.28k|            (UWORD8)ixheaacd_read_bits_buf(it_bit_buff, 1);
  589|  5.28k|      }
  590|  1.98k|    }
  591|       |
  592|  7.04k|  } else {
  593|  23.8k|    for (num_win_group = 0; num_win_group < num_window_groups;
  ------------------
  |  Branch (593:29): [True: 16.8k, False: 7.04k]
  ------------------
  594|  16.8k|         num_win_group++) {
  595|  16.8k|      ptr_ms_used =
  596|  16.8k|          &ptr_aac_dec_ch_info->pstr_stereo_info->ms_used[num_win_group][0];
  597|  16.8k|      memset(ptr_ms_used, 1, (max_sfb) * sizeof(UWORD8));
  598|  16.8k|    }
  599|  7.04k|  }
  600|  17.7k|}
ixheaacd_channel_pair_process:
  606|   206k|    WORD32 *out_data, void *self_ptr) {
  607|   206k|  WORD32 channel;
  608|   206k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|   206k|#define IA_NO_ERROR 0x00000000
  ------------------
  609|   206k|  ia_aac_decoder_struct *self = self_ptr;
  610|   206k|  if (aac_spect_data_resil_flag &&
  ------------------
  |  Branch (610:7): [True: 45.0k, False: 161k]
  ------------------
  611|  45.0k|      ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_ER_AAC_ELD) ||
  ------------------
  |  Branch (611:8): [True: 19.2k, False: 25.8k]
  |  Branch (611:42): [True: 2.89k, False: 22.9k]
  ------------------
  612|  45.0k|      (object_type == AOT_ER_AAC_LC))) {
  ------------------
  |  Branch (612:7): [True: 22.9k, False: 0]
  ------------------
  613|  90.2k|    for (channel = 0; channel < num_ch; channel++) {
  ------------------
  |  Branch (613:23): [True: 45.1k, False: 45.0k]
  ------------------
  614|  45.1k|      err = ixheaacd_cblock_inv_quant_spect_data(
  615|  45.1k|          ptr_aac_dec_channel_info[channel], ptr_aac_tables);
  616|  45.1k|      if (err) return err;
  ------------------
  |  Branch (616:11): [True: 0, False: 45.1k]
  ------------------
  617|  45.1k|      ixheaacd_cblock_scale_spect_data(ptr_aac_dec_channel_info[channel],
  618|  45.1k|                                       ptr_aac_tables, num_ch, object_type,
  619|  45.1k|                                       aac_sf_data_resil_flag);
  620|  45.1k|    }
  621|  45.0k|  }
  622|       |
  623|   206k|  if (num_ch > 1) {
  ------------------
  |  Branch (623:7): [True: 20.3k, False: 186k]
  ------------------
  624|  20.3k|    if (ptr_aac_dec_channel_info[LEFT]->common_window) {
  ------------------
  |  |   40|  20.3k|#define LEFT 0
  ------------------
  |  Branch (624:9): [True: 16.8k, False: 3.51k]
  ------------------
  625|  16.8k|      if (ptr_aac_dec_channel_info[LEFT]->str_pns_info.pns_active ||
  ------------------
  |  |   40|  16.8k|#define LEFT 0
  ------------------
  |  Branch (625:11): [True: 3.00k, False: 13.8k]
  ------------------
  626|  13.8k|          ptr_aac_dec_channel_info[RIGHT]->str_pns_info.pns_active) {
  ------------------
  |  |   41|  13.8k|#define RIGHT 1
  ------------------
  |  Branch (626:11): [True: 117, False: 13.7k]
  ------------------
  627|  3.12k|        ixheaacd_map_ms_mask_pns(ptr_aac_dec_channel_info);
  628|  3.12k|      }
  629|       |
  630|  16.8k|      ixheaacd_ms_stereo_process(ptr_aac_dec_channel_info, ptr_aac_tables);
  631|  16.8k|    }
  632|       |
  633|  20.3k|    ixheaacd_intensity_stereo_process(
  634|  20.3k|        ptr_aac_dec_channel_info, ptr_aac_tables, object_type,
  635|  20.3k|        aac_sf_data_resil_flag,
  636|  20.3k|        ptr_aac_dec_channel_info[LEFT]->str_ics_info.frame_length);
  ------------------
  |  |   40|  20.3k|#define LEFT 0
  ------------------
  637|  20.3k|  }
  638|       |
  639|   433k|  for (channel = 0; channel < num_ch; channel++) {
  ------------------
  |  Branch (639:21): [True: 226k, False: 206k]
  ------------------
  640|   226k|    WORD32 *p_spectrum = ptr_aac_dec_channel_info[channel]->ptr_spec_coeff;
  641|       |
  642|   226k|    if (total_channels > 2) {
  ------------------
  |  Branch (642:9): [True: 13.6k, False: 213k]
  ------------------
  643|  13.6k|      if (ptr_aac_dec_channel_info[channel]->str_ics_info.window_sequence !=
  ------------------
  |  Branch (643:11): [True: 10.6k, False: 3.01k]
  ------------------
  644|  13.6k|          EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  13.6k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  645|  10.6k|        WORD16 *band_offsets = ptr_aac_tables->sfb_long_table;
  646|  10.6k|        WORD32 no_spec_coeff = band_offsets[ptr_aac_dec_channel_info[channel]
  647|  10.6k|                                                ->str_ics_info.max_sfb];
  648|  10.6k|        ixheaacd_right_shift_block(p_spectrum, no_spec_coeff, 3);
  649|  10.6k|      } else {
  650|  3.01k|        ixheaacd_right_shift_block(p_spectrum, 1024, 3);
  651|  3.01k|      }
  652|  13.6k|    }
  653|       |
  654|   226k|    ixheaacd_pns_process(ptr_aac_dec_channel_info, channel, ptr_aac_tables);
  655|       |
  656|   226k|    if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP)) {
  ------------------
  |  Branch (656:9): [True: 74.1k, False: 152k]
  |  Branch (656:43): [True: 31.8k, False: 120k]
  ------------------
  657|   105k|      {
  658|   105k|        if (channel == 0) {
  ------------------
  |  Branch (658:13): [True: 97.9k, False: 8.04k]
  ------------------
  659|  97.9k|          ltp_info *ltp1 =
  660|  97.9k|              &(ptr_aac_dec_channel_info[channel]->str_ics_info.ltp);
  661|  97.9k|          ixheaacd_lt_prediction(ptr_aac_dec_channel_info[channel], ltp1,
  662|  97.9k|                                 p_spectrum, ptr_aac_tables,
  663|  97.9k|                                 self->ptr_aac_dec_static_channel_info[LEFT]
  ------------------
  |  |   40|  97.9k|#define LEFT 0
  ------------------
  664|  97.9k|                                     ->overlap_add_data.win_shape,
  665|  97.9k|                                 self->sampling_rate_index, object_type,
  666|  97.9k|                                 self->samples_per_frame, in_data, out_data);
  667|       |
  668|  97.9k|        } else {
  669|  8.04k|          ltp_info *ltp2 =
  670|  8.04k|              (self->pstr_aac_dec_ch_info[0]->common_window)
  ------------------
  |  Branch (670:15): [True: 5.34k, False: 2.69k]
  ------------------
  671|  8.04k|                  ? &(ptr_aac_dec_channel_info[0]->str_ics_info.ltp2)
  672|  8.04k|                  :
  673|       |
  674|  8.04k|                  &(ptr_aac_dec_channel_info[1]->str_ics_info.ltp);
  675|  8.04k|          ixheaacd_lt_prediction(ptr_aac_dec_channel_info[channel], ltp2,
  676|  8.04k|                                 p_spectrum, ptr_aac_tables,
  677|  8.04k|                                 self->ptr_aac_dec_static_channel_info[RIGHT]
  ------------------
  |  |   41|  8.04k|#define RIGHT 1
  ------------------
  678|  8.04k|                                     ->overlap_add_data.win_shape,
  679|  8.04k|                                 self->sampling_rate_index, object_type,
  680|  8.04k|                                 self->samples_per_frame, in_data, out_data);
  681|  8.04k|        }
  682|   105k|      }
  683|   105k|    }
  684|       |
  685|   226k|    if (ptr_aac_dec_channel_info[channel]->str_tns_info.tns_data_present) {
  ------------------
  |  Branch (685:9): [True: 55.7k, False: 171k]
  ------------------
  686|  55.7k|      ixheaacd_aac_tns_process(ptr_aac_dec_channel_info[channel],
  687|  55.7k|                               total_channels, ptr_aac_tables, object_type, 1,
  688|       |                               NULL);
  689|  55.7k|    }
  690|   226k|  }
  691|   206k|  return err;
  692|   206k|}
ixheaacd_set_corr_info:
  695|  58.3k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info, WORD16 pns_band) {
  696|  58.3k|  ia_pns_correlation_info_struct *ptr_corr_info =
  697|  58.3k|      ptr_aac_dec_channel_info->pstr_pns_corr_info;
  698|  58.3k|  ptr_corr_info->correlated[(pns_band >> PNS_BAND_FLAGS_SHIFT)] |=
  ------------------
  |  |   26|  58.3k|#define PNS_BAND_FLAGS_SHIFT 3
  ------------------
  699|  58.3k|      (1 << (pns_band & PNS_BAND_FLAGS_MASK));
  ------------------
  |  |   25|  58.3k|  ((WORD16)((((WORD16)1) << PNS_BAND_FLAGS_SHIFT) - 1))
  |  |  ------------------
  |  |  |  |   26|  58.3k|#define PNS_BAND_FLAGS_SHIFT 3
  |  |  ------------------
  ------------------
  700|  58.3k|}
ixheaacd_map_ms_mask_pns:
  703|  3.12k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info[CHANNELS]) {
  704|  3.12k|  WORD32 num_win_group, sfb;
  705|       |
  706|  3.12k|  for (num_win_group = 0;
  707|  6.26k|       num_win_group <
  ------------------
  |  Branch (707:8): [True: 3.14k, False: 3.12k]
  ------------------
  708|  6.26k|       ptr_aac_dec_channel_info[LEFT]->str_ics_info.num_window_groups;
  ------------------
  |  |   40|  6.26k|#define LEFT 0
  ------------------
  709|  3.14k|       num_win_group++) {
  710|  70.1k|    for (sfb = 0; sfb < ptr_aac_dec_channel_info[LEFT]->str_ics_info.max_sfb;
  ------------------
  |  |   40|  70.1k|#define LEFT 0
  ------------------
  |  Branch (710:19): [True: 66.9k, False: 3.14k]
  ------------------
  711|  66.9k|         sfb++) {
  712|  66.9k|      if (ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  66.9k|#define LEFT 0
  ------------------
  |  Branch (712:11): [True: 58.3k, False: 8.65k]
  ------------------
  713|  66.9k|              ->pstr_stereo_info->ms_used[num_win_group][sfb]) {
  714|  58.3k|        WORD16 pns_band = (num_win_group << 4) + sfb;
  715|  58.3k|        ixheaacd_set_corr_info(ptr_aac_dec_channel_info[LEFT], pns_band);
  ------------------
  |  |   40|  58.3k|#define LEFT 0
  ------------------
  716|       |
  717|  58.3k|        if (ptr_aac_dec_channel_info[LEFT]->str_pns_info.pns_used[pns_band] &&
  ------------------
  |  |   40|  58.3k|#define LEFT 0
  ------------------
  |  Branch (717:13): [True: 34.3k, False: 23.9k]
  ------------------
  718|  34.3k|            ptr_aac_dec_channel_info[RIGHT]->str_pns_info.pns_used[pns_band]) {
  ------------------
  |  |   41|  34.3k|#define RIGHT 1
  ------------------
  |  Branch (718:13): [True: 18.2k, False: 16.0k]
  ------------------
  719|  18.2k|          ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  18.2k|#define LEFT 0
  ------------------
  720|  18.2k|              ->pstr_stereo_info->ms_used[num_win_group][sfb] ^= 1;
  721|  18.2k|        }
  722|  58.3k|      }
  723|  66.9k|    }
  724|  3.14k|  }
  725|  3.12k|}
ixheaacd_pulse_data_apply:
  729|   157k|                               const WORD16 *ptr_swb_offset, WORD object_type) {
  730|   157k|  WORD i;
  731|   157k|  WORD32 k;
  732|       |
  733|   157k|  memset(pulse_scratch, 0, sizeof(WORD32) * 256);
  734|       |
  735|   157k|  if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (735:7): [True: 117k, False: 40.2k]
  ------------------
  736|   117k|    if (ptr_pulse_info->pulse_data_present) {
  ------------------
  |  Branch (736:9): [True: 26.6k, False: 90.8k]
  ------------------
  737|  26.6k|      k = ptr_swb_offset[ptr_pulse_info->pulse_start_band];
  738|       |
  739|  86.3k|      for (i = 0; i <= ptr_pulse_info->number_pulse; i++) {
  ------------------
  |  Branch (739:19): [True: 59.7k, False: 26.6k]
  ------------------
  740|  59.7k|        k = k + ptr_pulse_info->pulse_offset[i];
  741|  59.7k|        pulse_scratch[k] = ptr_pulse_info->pulse_amp[i];
  742|  59.7k|      }
  743|  26.6k|    }
  744|   117k|  } else {
  745|  40.2k|    ptr_pulse_info->pulse_data_present = 0;
  746|  40.2k|  }
  747|   157k|}
ixheaacd_read_spectral_data:
  754|   228k|    WORD32 aac_sf_data_resil_flag) {
  755|   228k|  WORD sfb, max_sfb;
  756|   228k|  WORD num_win_grp, group_len, grp_offset;
  757|       |
  758|   228k|  WORD index;
  759|   228k|  WORD8 *ptr_code_book;
  760|   228k|  WORD16 *ptr_scale_factor;
  761|   228k|  WORD32 *ptr_spec_coef;
  762|   228k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
  763|   228k|  WORD16 *swb_offset;
  764|       |
  765|   228k|  WORD32 maximum_bins_short = ptr_ics_info->frame_length >> 3;
  766|       |
  767|   228k|  WORD32 *ptr_spec_coef_out;
  768|       |
  769|   228k|  ptr_code_book = ptr_aac_dec_channel_info->ptr_code_book;
  770|   228k|  ptr_scale_factor = ptr_aac_dec_channel_info->ptr_scale_factor;
  771|   228k|  ptr_spec_coef = ptr_aac_dec_channel_info->ptr_spec_coeff;
  772|   228k|  max_sfb = ptr_ics_info->max_sfb;
  773|       |
  774|   228k|  swb_offset =
  775|   228k|      ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence].sfb_index;
  776|       |
  777|   228k|  if (!aac_spect_data_resil_flag) {
  ------------------
  |  Branch (777:7): [True: 182k, False: 45.8k]
  ------------------
  778|   182k|    if (ptr_aac_dec_channel_info->str_ics_info.window_sequence !=
  ------------------
  |  Branch (778:9): [True: 157k, False: 24.7k]
  ------------------
  779|   182k|        EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   182k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  780|   157k|      WORD8 *ptr_scratch;
  781|       |
  782|   157k|      if (object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (782:11): [True: 40.2k, False: 117k]
  ------------------
  783|  40.2k|        ptr_scratch = (WORD8 *)ptr_aac_dec_channel_info->pulse_scratch;
  784|   117k|      else
  785|   117k|        ptr_scratch = (WORD8 *)ptr_aac_dec_channel_info->scratch_buf_ptr;
  786|       |
  787|   157k|      memset(ptr_spec_coef, 0, sizeof(WORD32) * 1024);
  788|       |
  789|   157k|      ixheaacd_pulse_data_apply(&ptr_aac_dec_channel_info->str_pulse_info,
  790|   157k|                                ptr_scratch, swb_offset, object_type);
  791|       |
  792|   157k|      ptr_spec_coef_out = &ptr_spec_coef[0];
  793|   356k|      for (sfb = 0; sfb < max_sfb;) {
  ------------------
  |  Branch (793:21): [True: 198k, False: 157k]
  ------------------
  794|   198k|        WORD ret_val;
  795|   198k|        WORD32 sfb_width;
  796|   198k|        WORD32 sect_cb = ptr_code_book[sfb];
  797|   198k|        WORD start = sfb;
  798|   198k|        if ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (798:13): [True: 42.9k, False: 155k]
  |  Branch (798:48): [True: 57.1k, False: 98.6k]
  ------------------
  799|   126k|            || (object_type == AOT_ER_AAC_LC)) {
  ------------------
  |  Branch (799:16): [True: 26.0k, False: 72.5k]
  ------------------
  800|   126k|          if ((sect_cb >= 16) && (sect_cb <= 31)) {
  ------------------
  |  Branch (800:15): [True: 42.7k, False: 83.4k]
  |  Branch (800:34): [True: 42.7k, False: 0]
  ------------------
  801|  42.7k|            ptr_code_book[sfb] = sect_cb = 11;
  802|  42.7k|          }
  803|   126k|        }
  804|  1.98M|        for (; sfb < max_sfb && (ptr_code_book[sfb] == sect_cb); sfb++)
  ------------------
  |  Branch (804:16): [True: 1.90M, False: 79.3k]
  |  Branch (804:33): [True: 1.78M, False: 119k]
  ------------------
  805|  1.78M|          ;
  806|       |
  807|   198k|        sfb_width = swb_offset[sfb] - swb_offset[start];
  808|       |
  809|   198k|        if (sect_cb > ZERO_HCB && (sect_cb < NOISE_HCB)) {
  ------------------
  |  |   33|   397k|#define ZERO_HCB 0
  ------------------
                      if (sect_cb > ZERO_HCB && (sect_cb < NOISE_HCB)) {
  ------------------
  |  |   38|   162k|#define NOISE_HCB 13
  ------------------
  |  Branch (809:13): [True: 162k, False: 36.6k]
  |  Branch (809:35): [True: 130k, False: 31.2k]
  ------------------
  810|   130k|          ret_val = ixheaacd_huffman_dec_word2(it_bit_buff, sect_cb, sfb_width,
  811|   130k|                                               ptr_aac_tables,
  812|   130k|                                               ptr_spec_coef_out, ptr_scratch);
  813|       |
  814|   130k|          if (ret_val != 0) {
  ------------------
  |  Branch (814:15): [True: 218, False: 130k]
  ------------------
  815|    218|            return (WORD16)(
  816|    218|                (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL);
  ------------------
  |  |  101|    218|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL 0x00001806
  ------------------
  817|    218|          }
  818|   130k|        }
  819|       |
  820|  67.8k|        else {
  821|  67.8k|          if (ptr_aac_dec_channel_info->str_pulse_info.pulse_data_present) {
  ------------------
  |  Branch (821:15): [True: 24.5k, False: 43.3k]
  ------------------
  822|  24.5k|            ixheaacd_inverse_quantize(
  823|  24.5k|                ptr_spec_coef_out, sfb_width,
  824|  24.5k|                (WORD32 *)
  825|  24.5k|                    ptr_aac_tables->pstr_block_tables->ixheaacd_pow_table_Q13,
  826|  24.5k|                ptr_scratch);
  827|  24.5k|          }
  828|  67.8k|        }
  829|   198k|        ptr_scratch += sfb_width;
  830|   198k|        ptr_spec_coef_out += sfb_width;
  831|   198k|      }
  832|       |
  833|   157k|      if ((object_type != AOT_ER_AAC_ELD) && (object_type != AOT_ER_AAC_LD))
  ------------------
  |  Branch (833:11): [True: 117k, False: 40.1k]
  |  Branch (833:46): [True: 76.0k, False: 41.2k]
  ------------------
  834|  76.0k|        index = 1024 - swb_offset[max_sfb];
  835|  81.4k|      else
  836|  81.4k|        index = frame_size - swb_offset[max_sfb];
  837|       |
  838|   157k|      if (index < 0) return -1;
  ------------------
  |  Branch (838:11): [True: 6, False: 157k]
  ------------------
  839|       |
  840|   157k|    } else {
  841|  24.7k|      memset(ptr_spec_coef, 0, sizeof(WORD32) * 1024);
  842|       |
  843|  24.7k|      grp_offset = 0;
  844|       |
  845|   152k|      for (num_win_grp = 0; num_win_grp < ptr_ics_info->num_window_groups;
  ------------------
  |  Branch (845:29): [True: 127k, False: 24.6k]
  ------------------
  846|   127k|           num_win_grp++) {
  847|   127k|        WORD grp_len = ptr_ics_info->window_group_length[num_win_grp];
  848|       |
  849|   127k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (849:13): [True: 32.8k, False: 94.7k]
  ------------------
  850|  32.8k|          ptr_spec_coef_out = &ptr_spec_coef[grp_offset * maximum_bins_short];
  851|  94.7k|        else
  852|  94.7k|          ptr_spec_coef_out = &ptr_spec_coef[grp_offset * MAX_BINS_SHORT];
  ------------------
  |  |   29|  94.7k|#define MAX_BINS_SHORT 128
  ------------------
  853|       |
  854|   127k|        WORD bands = num_win_grp * MAX_SCALE_FACTOR_BANDS_SHORT;
  ------------------
  |  |   30|   127k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  855|   189k|        for (sfb = 0; sfb < max_sfb;) {
  ------------------
  |  Branch (855:23): [True: 61.4k, False: 127k]
  ------------------
  856|  61.4k|          WORD sect_cb = ptr_code_book[bands];
  857|  61.4k|          WORD start = sfb;
  858|  61.4k|          WORD ret_val;
  859|       |
  860|  61.4k|          if ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (860:15): [True: 0, False: 61.4k]
  |  Branch (860:50): [True: 0, False: 61.4k]
  ------------------
  861|  61.4k|              || (object_type == AOT_ER_AAC_LC)) {
  ------------------
  |  Branch (861:18): [True: 49.6k, False: 11.8k]
  ------------------
  862|  49.6k|            if ((sect_cb >= 16) && (sect_cb <= 31)) {
  ------------------
  |  Branch (862:17): [True: 36.2k, False: 13.3k]
  |  Branch (862:36): [True: 36.2k, False: 0]
  ------------------
  863|  36.2k|              ptr_code_book[bands] = sect_cb = 11;
  864|  36.2k|            }
  865|  49.6k|          }
  866|       |
  867|   203k|          for (; sfb < max_sfb && (ptr_code_book[bands] == sect_cb);
  ------------------
  |  Branch (867:18): [True: 191k, False: 11.9k]
  |  Branch (867:35): [True: 142k, False: 49.5k]
  ------------------
  868|   142k|               sfb++, bands++)
  869|   142k|            ;
  870|       |
  871|  61.4k|          if (sect_cb > ZERO_HCB && (sect_cb < NOISE_HCB)) {
  ------------------
  |  |   33|   122k|#define ZERO_HCB 0
  ------------------
                        if (sect_cb > ZERO_HCB && (sect_cb < NOISE_HCB)) {
  ------------------
  |  |   38|  57.2k|#define NOISE_HCB 13
  ------------------
  |  Branch (871:15): [True: 57.2k, False: 4.22k]
  |  Branch (871:37): [True: 47.4k, False: 9.85k]
  ------------------
  872|  47.4k|            ret_val = ixheaacd_decode_huffman(
  873|  47.4k|                it_bit_buff, sect_cb, ptr_spec_coef_out, (WORD16 *)swb_offset,
  874|  47.4k|                start, sfb, grp_len, ptr_aac_tables, maximum_bins_short);
  875|       |
  876|  47.4k|            if (ret_val != 0) {
  ------------------
  |  Branch (876:17): [True: 57, False: 47.3k]
  ------------------
  877|     57|              return (WORD16)(
  878|     57|                  (WORD32)
  879|     57|                      IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL);
  ------------------
  |  |  101|     57|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL 0x00001806
  ------------------
  880|     57|            }
  881|  47.4k|          }
  882|  61.4k|        }
  883|   127k|        grp_offset = (grp_offset + grp_len);
  884|   127k|      }
  885|  24.7k|    }
  886|   182k|    {
  887|   182k|      WORD32 *ptr_scale_table;
  888|       |
  889|   182k|      if (maximum_bins_short != 120)
  ------------------
  |  Branch (889:11): [True: 143k, False: 38.9k]
  ------------------
  890|   143k|        ptr_scale_table = ptr_aac_tables->pstr_block_tables->scale_table;
  891|  38.9k|      else
  892|  38.9k|        ptr_scale_table = ptr_aac_tables->pstr_block_tables->scale_table_960;
  893|       |
  894|   182k|      WORD8 *ptr_sfb_width =
  895|   182k|          ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence]
  896|   182k|              .sfb_width;
  897|       |
  898|   467k|      for (num_win_grp = 0; num_win_grp < ptr_ics_info->num_window_groups;
  ------------------
  |  Branch (898:29): [True: 285k, False: 182k]
  ------------------
  899|   285k|           num_win_grp++) {
  900|   285k|        for (group_len = 0;
  901|   639k|             group_len < ptr_ics_info->window_group_length[num_win_grp];
  ------------------
  |  Branch (901:14): [True: 354k, False: 285k]
  ------------------
  902|   354k|             group_len++) {
  903|   354k|          (*ixheaacd_scale_factor_process)(
  904|   354k|              &ptr_spec_coef[0], &ptr_scale_factor[0], max_sfb,
  905|   354k|              (WORD8 *)ptr_sfb_width, ptr_scale_table, total_channels,
  906|   354k|              object_type, aac_sf_data_resil_flag);
  907|       |
  908|   354k|          if (maximum_bins_short == 120)
  ------------------
  |  Branch (908:15): [True: 75.8k, False: 278k]
  ------------------
  909|  75.8k|            ptr_spec_coef += maximum_bins_short;
  910|   278k|          else
  911|   278k|            ptr_spec_coef += MAX_BINS_SHORT;
  ------------------
  |  |   29|   278k|#define MAX_BINS_SHORT 128
  ------------------
  912|   354k|        }
  913|       |
  914|   285k|        ptr_scale_factor += MAX_SCALE_FACTOR_BANDS_SHORT;
  ------------------
  |  |   30|   285k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  915|   285k|      }
  916|   182k|    }
  917|   182k|  } else {
  918|  45.8k|    ia_hcr_info_struct *pstr_hcr_info = &ptr_aac_dec_channel_info->str_hcr_info;
  919|  45.8k|    WORD32 error = 0;
  920|       |
  921|  45.8k|    memset(ptr_spec_coef, 0, sizeof(WORD32) * 1024);
  922|       |
  923|  45.8k|    if (ptr_aac_dec_channel_info->reorder_spect_data_len != 0) {
  ------------------
  |  Branch (923:9): [True: 34.0k, False: 11.8k]
  ------------------
  924|  34.0k|      error = ixheaacd_huff_code_reorder_init(
  925|  34.0k|          pstr_hcr_info, ptr_aac_dec_channel_info, ptr_aac_tables, it_bit_buff);
  926|       |
  927|  34.0k|      if (error != 0) {
  ------------------
  |  Branch (927:11): [True: 216, False: 33.8k]
  ------------------
  928|    216|        return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |  102|    216|#define IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
  ------------------
  929|    216|      }
  930|  33.8k|      error = ixheaacd_hcr_decoder(pstr_hcr_info, ptr_aac_dec_channel_info,
  931|  33.8k|                                   ptr_aac_tables, it_bit_buff);
  932|       |
  933|  33.8k|      if (error != 0) {
  ------------------
  |  Branch (933:11): [True: 27.5k, False: 6.30k]
  ------------------
  934|  27.5k|        ixheaacd_huff_mute_erroneous_lines(pstr_hcr_info);
  935|  27.5k|      }
  936|       |
  937|  33.8k|      if (it_bit_buff->cnt_bits <
  ------------------
  |  Branch (937:11): [True: 264, False: 33.5k]
  ------------------
  938|  33.8k|          ptr_aac_dec_channel_info->reorder_spect_data_len) {
  939|    264|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  940|    264|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    264|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  941|    264|      }
  942|       |
  943|  33.5k|      it_bit_buff->cnt_bits +=
  944|  33.5k|          -ptr_aac_dec_channel_info->reorder_spect_data_len;
  945|  33.5k|      it_bit_buff->ptr_read_next =
  946|  33.5k|          it_bit_buff->ptr_bit_buf_base +
  947|  33.5k|          ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
  948|  33.5k|      it_bit_buff->bit_pos = (it_bit_buff->size - it_bit_buff->cnt_bits) & 7;
  949|       |
  950|  33.5k|    } else {
  951|  11.8k|      it_bit_buff->ptr_read_next =
  952|  11.8k|          it_bit_buff->ptr_bit_buf_base +
  953|  11.8k|          ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
  954|  11.8k|      it_bit_buff->bit_pos = (it_bit_buff->size - it_bit_buff->cnt_bits) & 7;
  955|  11.8k|    }
  956|  45.8k|  }
  957|       |
  958|   227k|  return AAC_DEC_OK;
  ------------------
  |  |   23|   227k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   227k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  959|   228k|}
ixheaacd_read_tns_data:
  963|  56.4k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
  964|  56.4k|  WORD win_size, window_per_frame;
  965|  56.4k|  WORD n_filt_bits, start_band_bits, order_bits;
  966|  56.4k|  WORD32 bottom;
  967|       |
  968|  56.4k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
  969|  56.4k|  ia_tns_info_aac_struct *ptr_tns_info =
  970|  56.4k|      &ptr_aac_dec_channel_info->str_tns_info;
  971|       |
  972|  56.4k|  if (ptr_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  56.4k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (972:7): [True: 38.8k, False: 17.5k]
  ------------------
  973|  38.8k|    n_filt_bits = 2;
  974|  38.8k|    start_band_bits = 6;
  975|  38.8k|    order_bits = 5;
  976|  38.8k|    window_per_frame = 1;
  977|       |
  978|  38.8k|  } else {
  979|  17.5k|    n_filt_bits = 1;
  980|  17.5k|    start_band_bits = 4;
  981|  17.5k|    order_bits = 3;
  982|  17.5k|    window_per_frame = 8;
  983|  17.5k|  }
  984|       |
  985|  56.4k|  bottom = ptr_ics_info->num_swb_window;
  986|       |
  987|   235k|  for (win_size = 0; win_size < window_per_frame; win_size++) {
  ------------------
  |  Branch (987:22): [True: 179k, False: 56.2k]
  ------------------
  988|   179k|    WORD n_filt;
  989|   179k|    WORD start_band, coef_res;
  990|   179k|    ptr_tns_info->n_filt[win_size] = n_filt =
  991|   179k|        (WORD16)ixheaacd_read_bits_buf(it_bit_buff, n_filt_bits);
  992|       |
  993|   179k|    if (n_filt) {
  ------------------
  |  Branch (993:9): [True: 71.7k, False: 107k]
  ------------------
  994|  71.7k|      WORD filt;
  995|  71.7k|      WORD top;
  996|       |
  997|  71.7k|      coef_res = ixheaacd_read_bits_buf(it_bit_buff, 1);
  998|       |
  999|  71.7k|      top = bottom;
 1000|   152k|      for (filt = 0; filt < n_filt; filt++) {
  ------------------
  |  Branch (1000:22): [True: 81.4k, False: 71.5k]
  ------------------
 1001|  81.4k|        WORD order;
 1002|  81.4k|        ia_filter_info_struct *filter =
 1003|  81.4k|            &ptr_tns_info->str_filter[win_size][filt];
 1004|       |
 1005|  81.4k|        start_band = ixheaacd_read_bits_buf(it_bit_buff, start_band_bits);
 1006|       |
 1007|  81.4k|        if (top < start_band) {
  ------------------
  |  Branch (1007:13): [True: 62.9k, False: 18.4k]
  ------------------
 1008|  62.9k|          top = start_band;
 1009|  62.9k|        }
 1010|  81.4k|        filter->start_band = top - start_band;
 1011|  81.4k|        filter->stop_band = top;
 1012|       |
 1013|  81.4k|        top = filter->start_band;
 1014|       |
 1015|  81.4k|        if (filter->start_band < 0) {
  ------------------
  |  Branch (1015:13): [True: 0, False: 81.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|  81.4k|        filter->order = order = ixheaacd_read_bits_buf(it_bit_buff, order_bits);
 1021|       |
 1022|  81.4k|        if ((order - MAX_ORDER_LONG) > 0) {
  ------------------
  |  |   25|  81.4k|#define MAX_ORDER_LONG 12
  ------------------
  |  Branch (1022:13): [True: 199, False: 81.2k]
  ------------------
 1023|    199|          return (WORD16)(
 1024|    199|              (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_TNS_ORDER_ERROR);
  ------------------
  |  |  105|    199|#define IA_XHEAAC_DEC_EXE_NONFATAL_TNS_ORDER_ERROR 0x0000180A
  ------------------
 1025|    199|        }
 1026|       |
 1027|  81.2k|        if (order) {
  ------------------
  |  Branch (1027:13): [True: 71.2k, False: 9.99k]
  ------------------
 1028|  71.2k|          WORD i;
 1029|  71.2k|          WORD32 coef, coef_compress;
 1030|  71.2k|          WORD resolution, shift;
 1031|       |
 1032|  71.2k|          filter->direction =
 1033|  71.2k|              (WORD8)(ixheaacd_read_bits_buf(it_bit_buff, 1) ? -1 : 1);
  ------------------
  |  Branch (1033:23): [True: 43.1k, False: 28.1k]
  ------------------
 1034|       |
 1035|  71.2k|          coef_compress = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1036|       |
 1037|  71.2k|          filter->resolution = coef_res;
 1038|       |
 1039|  71.2k|          resolution = coef_res + 3 - coef_compress;
 1040|       |
 1041|  71.2k|          shift = 32 - resolution;
 1042|       |
 1043|   487k|          for (i = 0; i < order; i++) {
  ------------------
  |  Branch (1043:23): [True: 416k, False: 71.2k]
  ------------------
 1044|   416k|            coef = ixheaacd_read_bits_buf(it_bit_buff, resolution);
 1045|   416k|            coef = coef << shift;
 1046|   416k|            filter->coef[i] = (WORD8)(coef >> shift);
 1047|   416k|          }
 1048|  71.2k|        }
 1049|  81.2k|      }
 1050|  71.7k|    }
 1051|   179k|  }
 1052|  56.2k|  return AAC_DEC_OK;
  ------------------
  |  |   23|  56.2k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  56.2k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
 1053|  56.4k|}
ixheaacd_inv_quant:
 1057|  21.3k|{
 1058|  21.3k|  WORD32 q1;
 1059|  21.3k|  WORD32 temp;
 1060|  21.3k|  WORD32 q_abs;
 1061|  21.3k|  WORD16 interp;
 1062|  21.3k|  WORD32 shift;
 1063|       |
 1064|  21.3k|  q_abs = *px_quant;
 1065|       |
 1066|  21.3k|  if (q_abs > (8191 + 32))
  ------------------
  |  Branch (1066:7): [True: 255, False: 21.0k]
  ------------------
 1067|    255|    return IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL;
  ------------------
  |  |  101|    255|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL 0x00001806
  ------------------
 1068|       |
 1069|  21.0k|  if (q_abs < 1024) {
  ------------------
  |  Branch (1069:7): [True: 15.8k, False: 5.23k]
  ------------------
 1070|  15.8k|    shift = 3;
 1071|  15.8k|  } else {
 1072|  5.23k|    shift = 6;
 1073|  5.23k|  }
 1074|       |
 1075|  21.0k|  q1 = (q_abs) >> shift;
 1076|       |
 1077|  21.0k|  interp = q_abs - (q1 << shift);
 1078|       |
 1079|  21.0k|  temp = ixheaacd_pow_table_Q13[q1 + 1] - ixheaacd_pow_table_Q13[q1];
 1080|       |
 1081|  21.0k|  temp = (WORD32)(temp * (WORD32)interp);
 1082|       |
 1083|  21.0k|  temp = temp + (ixheaacd_pow_table_Q13[q1] << shift);
 1084|       |
 1085|  21.0k|  if (shift == 3)
  ------------------
  |  Branch (1085:7): [True: 15.8k, False: 5.23k]
  ------------------
 1086|  15.8k|    temp = temp << 1;
 1087|  5.23k|  else
 1088|  5.23k|    temp = temp << 2;
 1089|       |
 1090|  21.0k|  *px_quant = temp;
 1091|       |
 1092|  21.0k|  return 0;
 1093|  21.3k|}
ixheaacd_cblock_inv_quant_spect_data:
 1107|  45.1k|    ia_aac_dec_tables_struct *ptr_aac_tables) {
 1108|  45.1k|  int window, group, grp_win, band;
 1109|  45.1k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|  45.1k|#define IA_NO_ERROR 0x00000000
  ------------------
 1110|  45.1k|  int sf_bands_transmitted = ptr_aac_dec_channel_info->str_ics_info.max_sfb;
 1111|  45.1k|  WORD8 *ptr_code_book = ptr_aac_dec_channel_info->ptr_code_book;
 1112|  45.1k|  const WORD16 *band_offsets = (WORD16 *)ixheaacd_getscalefactorbandoffsets(
 1113|  45.1k|      &(ptr_aac_dec_channel_info->str_ics_info), ptr_aac_tables);
 1114|  45.1k|  WORD32 *ptr_pow_table_Q13 =
 1115|  45.1k|      (WORD32 *)ptr_aac_tables->pstr_block_tables->ixheaacd_pow_table_Q13;
 1116|       |
 1117|  45.1k|  for (window = 0, group = 0;
 1118|   104k|       group < ptr_aac_dec_channel_info->str_ics_info.num_window_groups;
  ------------------
  |  Branch (1118:8): [True: 59.3k, False: 45.1k]
  ------------------
 1119|  59.3k|       group++) {
 1120|  59.3k|    for (grp_win = 0;
 1121|   196k|         grp_win <
  ------------------
  |  Branch (1121:10): [True: 137k, False: 59.3k]
  ------------------
 1122|   196k|         ptr_aac_dec_channel_info->str_ics_info.window_group_length[group];
 1123|   137k|         grp_win++, window++) {
 1124|  1.86M|      for (band = 0; band < sf_bands_transmitted; band++) {
  ------------------
  |  Branch (1124:22): [True: 1.73M, False: 137k]
  ------------------
 1125|  1.73M|        WORD32 *ptr_spec_coef =
 1126|  1.73M|            SPEC(ptr_aac_dec_channel_info->ptr_spec_coeff, window,
  ------------------
  |  |   91|  1.73M|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
 1127|  1.73M|                 ptr_aac_dec_channel_info->granule_len) +
 1128|  1.73M|            band_offsets[band];
 1129|  1.73M|        int num_lines = band_offsets[band + 1] - band_offsets[band];
 1130|  1.73M|        int bnds = group * 16 + band;
 1131|  1.73M|        int i;
 1132|       |
 1133|  1.73M|        if ((ptr_code_book[bnds] == ZERO_HCB) ||
  ------------------
  |  |   33|  1.73M|#define ZERO_HCB 0
  ------------------
  |  Branch (1133:13): [True: 56.6k, False: 1.67M]
  ------------------
 1134|  1.67M|            (ptr_code_book[bnds] == INTENSITY_HCB) ||
  ------------------
  |  |   40|  1.67M|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1134:13): [True: 254k, False: 1.42M]
  ------------------
 1135|  1.42M|            (ptr_code_book[bnds] == INTENSITY_HCB2))
  ------------------
  |  |   39|  1.42M|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1135:13): [True: 247k, False: 1.17M]
  ------------------
 1136|   558k|          continue;
 1137|       |
 1138|  1.17M|        if (ptr_code_book[bnds] == NOISE_HCB) {
  ------------------
  |  |   38|  1.17M|#define NOISE_HCB 13
  ------------------
  |  Branch (1138:13): [True: 147k, False: 1.02M]
  ------------------
 1139|   147k|          continue;
 1140|   147k|        }
 1141|       |
 1142|  14.3M|        for (i = 0; i < num_lines; i++) {
  ------------------
  |  Branch (1142:21): [True: 13.3M, False: 1.02M]
  ------------------
 1143|  13.3M|          WORD8 temp = 0;
 1144|  13.3M|          WORD32 out1 = ptr_spec_coef[i];
 1145|  13.3M|          if (out1 <= 0) {
  ------------------
  |  Branch (1145:15): [True: 10.8M, False: 2.50M]
  ------------------
 1146|  10.8M|            out1 = sub_d(temp, out1);
  ------------------
  |  |   24|  10.8M|#define sub_d(a, b) ((a) - (b))
  ------------------
 1147|  10.8M|            if (out1 > 127) {
  ------------------
  |  Branch (1147:17): [True: 3.58k, False: 10.8M]
  ------------------
 1148|  3.58k|              err = ixheaacd_inv_quant(&out1, ptr_pow_table_Q13);
 1149|  3.58k|              if (err) return err;
  ------------------
  |  Branch (1149:19): [True: 0, False: 3.58k]
  ------------------
 1150|  3.58k|            } else
 1151|  10.8M|              out1 = ptr_pow_table_Q13[out1];
 1152|  10.8M|            ptr_spec_coef[i] = -out1;
 1153|       |
 1154|  10.8M|          } else {
 1155|  2.50M|            if (out1 > 127) {
  ------------------
  |  Branch (1155:17): [True: 4.58k, False: 2.49M]
  ------------------
 1156|  4.58k|              err = ixheaacd_inv_quant(&out1, ptr_pow_table_Q13);
 1157|  4.58k|              if (err) return err;
  ------------------
  |  Branch (1157:19): [True: 0, False: 4.58k]
  ------------------
 1158|  4.58k|            } else
 1159|  2.49M|              out1 = ptr_pow_table_Q13[out1];
 1160|       |
 1161|  2.50M|            ptr_spec_coef[i] = out1;
 1162|  2.50M|          }
 1163|  13.3M|        }
 1164|  1.02M|      }
 1165|   137k|    }
 1166|  59.3k|  }
 1167|       |
 1168|  45.1k|  return AAC_DEC_OK;
  ------------------
  |  |   23|  45.1k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  45.1k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
 1169|  45.1k|}
ixheaacd_init_ltp_object:
 1171|  59.4k|void ixheaacd_init_ltp_object(ltp_info *ltp) {
 1172|  59.4k|  ltp->data_present = 0;
 1173|  59.4k|  ltp->last_band = 0;
 1174|       |
 1175|  59.4k|  ltp->lag_update = 0;
 1176|  59.4k|  ltp->coef = 0;
 1177|  59.4k|}
ixheaacd_ltp_data:
 1181|  48.0k|                         WORD32 frame_len) {
 1182|  48.0k|  UWORD8 sfb, w;
 1183|       |
 1184|  48.0k|  if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1184:7): [True: 38.0k, False: 9.92k]
  ------------------
 1185|  38.0k|    ltp->lag_update = ixheaacd_read_bits_buf(it_bit_buf, 1);
 1186|       |
 1187|  38.0k|    if (ltp->lag_update) {
  ------------------
  |  Branch (1187:9): [True: 11.3k, False: 26.7k]
  ------------------
 1188|  11.3k|      ltp->lag = (UWORD16)ixheaacd_read_bits_buf(it_bit_buf, 10);
 1189|  11.3k|    }
 1190|  38.0k|  } else {
 1191|  9.92k|    ltp->lag = (UWORD16)ixheaacd_read_bits_buf(it_bit_buf, 11);
 1192|  9.92k|  }
 1193|       |
 1194|  48.0k|  if (ltp->lag > (frame_len << 1)) return -1;
  ------------------
  |  Branch (1194:7): [True: 7.44k, False: 40.5k]
  ------------------
 1195|       |
 1196|  40.5k|  ltp->coef = (UWORD8)ixheaacd_read_bits_buf(it_bit_buf, 3);
 1197|       |
 1198|  40.5k|  if (ics->window_sequence == EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  40.5k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (1198:7): [True: 0, False: 40.5k]
  ------------------
 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|  40.5k|  } else {
 1208|  40.5k|    ltp->last_band = (ics->max_sfb < MAX_LTP_SFB ? ics->max_sfb : MAX_LTP_SFB);
  ------------------
  |  |   24|  40.5k|#define MAX_LTP_SFB 40
  ------------------
                  ltp->last_band = (ics->max_sfb < MAX_LTP_SFB ? ics->max_sfb : MAX_LTP_SFB);
  ------------------
  |  |   24|    160|#define MAX_LTP_SFB 40
  ------------------
  |  Branch (1208:23): [True: 40.3k, False: 160]
  ------------------
 1209|       |
 1210|   869k|    for (sfb = 0; sfb < ltp->last_band; sfb++) {
  ------------------
  |  Branch (1210:19): [True: 828k, False: 40.5k]
  ------------------
 1211|   828k|      ltp->long_used[sfb] = ixheaacd_read_bits_buf(it_bit_buf, 1);
 1212|   828k|    }
 1213|  40.5k|  }
 1214|  40.5k|  if (ics->frame_length == 480) {
  ------------------
  |  Branch (1214:7): [True: 2.58k, False: 37.9k]
  ------------------
 1215|  2.58k|    if ((ics->sampling_rate_index > 5) &&
  ------------------
  |  Branch (1215:9): [True: 90, False: 2.49k]
  ------------------
 1216|     90|        (ltp->last_band > MAX_LTP_SFB_SR_FIVE_PLUS_480))
  ------------------
  |  |   25|     90|#define MAX_LTP_SFB_SR_FIVE_PLUS_480 31
  ------------------
  |  Branch (1216:9): [True: 62, False: 28]
  ------------------
 1217|     62|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_PLUS_480;
  ------------------
  |  |   25|     62|#define MAX_LTP_SFB_SR_FIVE_PLUS_480 31
  ------------------
 1218|  2.52k|    else if ((ics->sampling_rate_index == 5) &&
  ------------------
  |  Branch (1218:14): [True: 1.54k, False: 983]
  ------------------
 1219|  1.54k|             (ltp->last_band > MAX_LTP_SFB_SR_FIVE_480))
  ------------------
  |  |   26|  1.54k|#define MAX_LTP_SFB_SR_FIVE_480 38
  ------------------
  |  Branch (1219:14): [True: 6, False: 1.53k]
  ------------------
 1220|      6|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_480;
  ------------------
  |  |   26|      6|#define MAX_LTP_SFB_SR_FIVE_480 38
  ------------------
 1221|  2.51k|    else if ((ics->sampling_rate_index < 5) &&
  ------------------
  |  Branch (1221:14): [True: 955, False: 1.56k]
  ------------------
 1222|    955|             (ltp->last_band > MAX_LTP_SFB_SR_FIVE_LESS_480))
  ------------------
  |  |   27|    955|#define MAX_LTP_SFB_SR_FIVE_LESS_480 36
  ------------------
  |  Branch (1222:14): [True: 24, False: 931]
  ------------------
 1223|     24|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_LESS_480;
  ------------------
  |  |   27|     24|#define MAX_LTP_SFB_SR_FIVE_LESS_480 36
  ------------------
 1224|  37.9k|  } else if (ics->frame_length == 512) {
  ------------------
  |  Branch (1224:14): [True: 25.0k, False: 12.8k]
  ------------------
 1225|  25.0k|    if ((ics->sampling_rate_index > 5) &&
  ------------------
  |  Branch (1225:9): [True: 960, False: 24.1k]
  ------------------
 1226|    960|        (ltp->last_band > MAX_LTP_SFB_SR_FIVE_PLUS_512))
  ------------------
  |  |   28|    960|#define MAX_LTP_SFB_SR_FIVE_PLUS_512 32
  ------------------
  |  Branch (1226:9): [True: 97, False: 863]
  ------------------
 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.9k|    else if ((ics->sampling_rate_index == 5) &&
  ------------------
  |  Branch (1228:14): [True: 22.9k, False: 1.99k]
  ------------------
 1229|  22.9k|             (ltp->last_band > MAX_LTP_SFB_SR_FIVE_512))
  ------------------
  |  |   29|  22.9k|#define MAX_LTP_SFB_SR_FIVE_512 38
  ------------------
  |  Branch (1229:14): [True: 20, False: 22.9k]
  ------------------
 1230|     20|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_512;
  ------------------
  |  |   29|     20|#define MAX_LTP_SFB_SR_FIVE_512 38
  ------------------
 1231|  24.9k|    else if ((ics->sampling_rate_index < 5) &&
  ------------------
  |  Branch (1231:14): [True: 1.13k, False: 23.8k]
  ------------------
 1232|  1.13k|             (ltp->last_band > MAX_LTP_SFB_SR_FIVE_LESS_512))
  ------------------
  |  |   30|  1.13k|#define MAX_LTP_SFB_SR_FIVE_LESS_512 37
  ------------------
  |  Branch (1232:14): [True: 8, False: 1.12k]
  ------------------
 1233|      8|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_LESS_512;
  ------------------
  |  |   30|      8|#define MAX_LTP_SFB_SR_FIVE_LESS_512 37
  ------------------
 1234|  25.0k|  }
 1235|  40.5k|  return 0;
 1236|  48.0k|}
ixheaacd_channel.c:ixheaacd_read_block_data:
  222|   230k|{
  223|   230k|  FLAG gain_control_data_present;
  224|   230k|  WORD16 error_code = AAC_DEC_OK;
  ------------------
  |  |   23|   230k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   230k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  225|       |
  226|   230k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (226:7): [True: 38.3k, False: 192k]
  ------------------
  227|   230k|      EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   230k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  228|  38.3k|    memset(ptr_aac_dec_channel_info->ptr_scale_factor, 0,
  229|  38.3k|           MAX_WINDOWS * MAX_SCALE_FACTOR_BANDS_SHORT * 3);
  ------------------
  |  |   26|  38.3k|#define MAX_WINDOWS 8
  ------------------
                         MAX_WINDOWS * MAX_SCALE_FACTOR_BANDS_SHORT * 3);
  ------------------
  |  |   30|  38.3k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  230|  38.3k|  }
  231|       |
  232|   230k|  error_code = ixheaacd_read_section_data(
  233|   230k|      it_bit_buff, ptr_aac_dec_channel_info, aac_spect_data_resil_flag,
  234|   230k|      aac_sect_data_resil_flag, ptr_aac_tables);
  235|       |
  236|   230k|  if (error_code) {
  ------------------
  |  Branch (236:7): [True: 1.43k, False: 229k]
  ------------------
  237|  1.43k|    return error_code;
  238|  1.43k|  }
  239|   229k|  if (aac_sf_data_resil_flag &&
  ------------------
  |  Branch (239:7): [True: 82.7k, False: 146k]
  ------------------
  240|  82.7k|      ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)))
  ------------------
  |  Branch (240:8): [True: 23.0k, False: 59.6k]
  |  Branch (240:43): [True: 33.3k, False: 26.3k]
  ------------------
  241|  56.4k|    ixheaacd_rvlc_read(it_bit_buff, ptr_aac_dec_channel_info);
  242|   172k|  else
  243|   172k|    ixheaacd_read_scale_factor_data(it_bit_buff, ptr_aac_dec_channel_info,
  244|   172k|                                    ptr_aac_tables, object_type);
  245|       |
  246|   229k|  error_code = 0;
  247|   229k|  if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (247:7): [True: 185k, False: 43.4k]
  ------------------
  248|   185k|    ptr_aac_dec_channel_info->str_pulse_info.pulse_data_present =
  249|   185k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  250|   185k|    if (ptr_aac_dec_channel_info->str_pulse_info.pulse_data_present) {
  ------------------
  |  Branch (250:9): [True: 38.9k, False: 147k]
  ------------------
  251|  38.9k|      error_code = ixheaacd_read_pulse_data(
  252|  38.9k|          it_bit_buff, &ptr_aac_dec_channel_info->str_pulse_info,
  253|  38.9k|          ptr_aac_tables);
  254|  38.9k|    }
  255|       |
  256|   185k|    if (error_code) {
  ------------------
  |  Branch (256:9): [True: 130, False: 185k]
  ------------------
  257|    130|      return error_code;
  258|    130|    }
  259|   185k|  }
  260|       |
  261|   229k|  ptr_aac_dec_channel_info->str_tns_info.tns_data_present =
  262|   229k|      (FLAG)ixheaacd_read_bits_buf(it_bit_buff, 1);
  263|       |
  264|   229k|  if (object_type < ER_OBJECT_START) {
  ------------------
  |  |   64|   229k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (264:7): [True: 69.8k, False: 159k]
  ------------------
  265|  69.8k|    error_code = 0;
  266|  69.8k|    if (ptr_aac_dec_channel_info->str_tns_info.tns_data_present) {
  ------------------
  |  Branch (266:9): [True: 19.6k, False: 50.2k]
  ------------------
  267|  19.6k|      error_code =
  268|  19.6k|          ixheaacd_read_tns_data(it_bit_buff, ptr_aac_dec_channel_info);
  269|  19.6k|    }
  270|       |
  271|  69.8k|    if (error_code) {
  ------------------
  |  Branch (271:9): [True: 62, False: 69.8k]
  ------------------
  272|     62|      return error_code;
  273|     62|    }
  274|  69.8k|  }
  275|       |
  276|   229k|  if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (276:7): [True: 185k, False: 43.4k]
  ------------------
  277|   185k|    gain_control_data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  278|       |
  279|   185k|    if (gain_control_data_present) {
  ------------------
  |  Branch (279:9): [True: 579, False: 185k]
  ------------------
  280|    579|      return (WORD16)(
  281|    579|          (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_GAIN_CONTROL_DATA_PRESENT);
  ------------------
  |  |  104|    579|#define IA_XHEAAC_DEC_EXE_NONFATAL_GAIN_CONTROL_DATA_PRESENT 0x00001809
  ------------------
  282|    579|    }
  283|   185k|  }
  284|       |
  285|   228k|  if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (285:7): [True: 43.3k, False: 185k]
  ------------------
  286|  43.3k|    if (ptr_aac_dec_channel_info->str_tns_info.tns_data_present)
  ------------------
  |  Branch (286:9): [True: 4.56k, False: 38.7k]
  ------------------
  287|  4.56k|      error_code =
  288|  4.56k|          ixheaacd_read_tns_data(it_bit_buff, ptr_aac_dec_channel_info);
  289|  43.3k|    if (error_code) return error_code;
  ------------------
  |  Branch (289:9): [True: 67, False: 43.2k]
  ------------------
  290|  43.3k|  }
  291|       |
  292|   228k|  if (aac_spect_data_resil_flag &&
  ------------------
  |  Branch (292:7): [True: 45.8k, False: 182k]
  ------------------
  293|  45.8k|      ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (293:8): [True: 2.98k, False: 42.9k]
  |  Branch (293:43): [True: 19.4k, False: 23.4k]
  ------------------
  294|  23.4k|      || (object_type == AOT_ER_AAC_LC)))
  ------------------
  |  Branch (294:10): [True: 23.4k, False: 0]
  ------------------
  295|  45.8k|    ixheaacd_hcr_read(it_bit_buff, ptr_aac_dec_channel_info, ele_type);
  296|       |
  297|   228k|  if (aac_sf_data_resil_flag &&
  ------------------
  |  Branch (297:7): [True: 82.5k, False: 146k]
  ------------------
  298|  82.5k|      ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD))) {
  ------------------
  |  Branch (298:8): [True: 23.0k, False: 59.5k]
  |  Branch (298:43): [True: 33.3k, False: 26.2k]
  ------------------
  299|  56.3k|    error_code = ixheaacd_rvlc_dec(
  300|  56.3k|        ptr_aac_dec_channel_info, ptr_aac_dec_static_channel_info, it_bit_buff);
  301|  56.3k|    if (error_code) return error_code;
  ------------------
  |  Branch (301:9): [True: 78, False: 56.2k]
  ------------------
  302|       |
  303|  56.2k|    it_bit_buff->bit_pos = 7 - it_bit_buff->bit_pos;
  304|  56.2k|  }
  305|       |
  306|   228k|  if (object_type == AOT_ER_AAC_LD || object_type == AOT_ER_AAC_LC) {
  ------------------
  |  Branch (306:7): [True: 74.5k, False: 153k]
  |  Branch (306:39): [True: 41.2k, False: 112k]
  ------------------
  307|   115k|    if (ptr_aac_dec_channel_info->str_tns_info.tns_data_present)
  ------------------
  |  Branch (307:9): [True: 32.2k, False: 83.4k]
  ------------------
  308|  32.2k|      error_code =
  309|  32.2k|          ixheaacd_read_tns_data(it_bit_buff, ptr_aac_dec_channel_info);
  310|   115k|    if (error_code) return error_code;
  ------------------
  |  Branch (310:9): [True: 70, False: 115k]
  ------------------
  311|   115k|  }
  312|       |
  313|   228k|  { it_bit_buff->bit_pos = 7 - it_bit_buff->bit_pos; }
  314|       |
  315|   228k|  error_code = ixheaacd_read_spectral_data(
  316|   228k|      it_bit_buff, ptr_aac_dec_channel_info, ptr_aac_tables, total_channels,
  317|   228k|      frame_size, object_type, aac_spect_data_resil_flag,
  318|   228k|      aac_sf_data_resil_flag);
  319|       |
  320|   228k|  it_bit_buff->bit_pos = (7 - it_bit_buff->bit_pos);
  321|       |
  322|   228k|  return error_code;
  323|   228k|}

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

ixheaacd_get_channel_mask:
  108|  7.60k|    ia_exhaacplus_dec_api_struct *p_obj_enhaacplus_dec) {
  109|  7.60k|  WORD ixheaacd_drc_offset = 0, channel_mask = 0;
  110|  7.60k|  WORD flag1 = 0, flag2 = 0;
  111|  7.60k|  WORD ch_idx;
  112|  7.60k|  WORD *ptr_slot_element = p_obj_enhaacplus_dec->aac_config.slot_element;
  113|  7.60k|  WORD *ptr_element_type = p_obj_enhaacplus_dec->aac_config.element_type;
  114|       |
  115|  7.60k|  memset(ptr_slot_element, 0, sizeof(WORD) * MAX_BS_ELEMENT);
  ------------------
  |  |   24|  7.60k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  7.60k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  116|       |
  117|  69.2k|  for (ch_idx = 0; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  69.2k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  69.2k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (117:20): [True: 63.0k, False: 6.14k]
  ------------------
  118|  63.0k|    if (ptr_element_type[ch_idx] == 1) {
  ------------------
  |  Branch (118:9): [True: 1.45k, False: 61.6k]
  ------------------
  119|  1.45k|      channel_mask += 0x3;
  120|  1.45k|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  121|  1.45k|      ixheaacd_drc_offset += 2;
  122|  1.45k|      flag1 = ch_idx + 1;
  123|  1.45k|      break;
  124|  1.45k|    }
  125|  63.0k|  }
  126|       |
  127|  32.5k|  for (ch_idx = 0; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  32.5k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  32.5k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (127:20): [True: 30.0k, False: 2.46k]
  ------------------
  128|  30.0k|    if (ptr_element_type[ch_idx] == 0) {
  ------------------
  |  Branch (128:9): [True: 5.13k, False: 24.9k]
  ------------------
  129|  5.13k|      channel_mask += 0x4;
  130|  5.13k|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  131|  5.13k|      ixheaacd_drc_offset += 1;
  132|  5.13k|      flag2 = ch_idx + 1;
  133|  5.13k|      break;
  134|  5.13k|    }
  135|  30.0k|  }
  136|  72.1k|  for (ch_idx = 0; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  72.1k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  72.1k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (136:20): [True: 65.7k, False: 6.43k]
  ------------------
  137|  65.7k|    if (ptr_element_type[ch_idx] == 3) {
  ------------------
  |  Branch (137:9): [True: 1.16k, False: 64.5k]
  ------------------
  138|  1.16k|      channel_mask += 0x8;
  139|  1.16k|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  140|  1.16k|      ixheaacd_drc_offset += 1;
  141|  1.16k|      break;
  142|  1.16k|    }
  143|  65.7k|  }
  144|  81.6k|  for (ch_idx = flag1; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  81.6k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  81.6k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (144:24): [True: 74.1k, False: 7.55k]
  ------------------
  145|  74.1k|    if (ptr_element_type[ch_idx] == 1) {
  ------------------
  |  Branch (145:9): [True: 46, False: 74.0k]
  ------------------
  146|     46|      channel_mask += 0x30;
  147|     46|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  148|     46|      ixheaacd_drc_offset += 2;
  149|     46|      flag1 = ch_idx + 1;
  150|     46|      break;
  151|     46|    }
  152|  74.1k|  }
  153|  75.0k|  for (ch_idx = flag2; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  75.0k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  75.0k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (153:24): [True: 67.8k, False: 7.22k]
  ------------------
  154|  67.8k|    if (ptr_element_type[ch_idx] == 0) {
  ------------------
  |  Branch (154:9): [True: 377, False: 67.4k]
  ------------------
  155|    377|      channel_mask += 0x100;
  156|    377|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  157|    377|      ixheaacd_drc_offset += 1;
  158|    377|      break;
  159|    377|    }
  160|  67.8k|  }
  161|  81.8k|  for (ch_idx = flag1; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  81.8k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  81.8k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (161:24): [True: 74.2k, False: 7.58k]
  ------------------
  162|  74.2k|    if (ptr_element_type[ch_idx] == 1) {
  ------------------
  |  Branch (162:9): [True: 20, False: 74.2k]
  ------------------
  163|     20|      {
  164|     20|        channel_mask += (0x40 + 0x80);
  165|     20|        ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  166|     20|        ixheaacd_drc_offset += 2;
  167|     20|        break;
  168|     20|      }
  169|     20|    }
  170|  74.2k|  }
  171|       |
  172|  7.60k|  return channel_mask;
  173|  7.60k|}
ixheaacd_read_data_stream_element:
  177|  15.7k|                                       ia_drc_dec_struct *drc_handle) {
  178|  15.7k|  ia_bit_buf_struct temp_bs = {0};
  179|  15.7k|  WORD32 count = ixheaacd_read_bits_buf(it_bit_buff, 13);
  180|  15.7k|  WORD32 cnt = (count & 0xff);
  181|  15.7k|  WORD32 start_pos = 0;
  182|       |
  183|  15.7k|  if (cnt == 255) {
  ------------------
  |  Branch (183:7): [True: 592, False: 15.1k]
  ------------------
  184|    592|    cnt += ixheaacd_read_bits_buf(it_bit_buff, 8);
  185|    592|  }
  186|       |
  187|  15.7k|  if ((count & 0x0100) >> 8) {
  ------------------
  |  Branch (187:7): [True: 11.9k, False: 3.81k]
  ------------------
  188|  11.9k|    ixheaacd_byte_align(it_bit_buff, byte_align_bits);
  189|  11.9k|  }
  190|       |
  191|  15.7k|  {
  192|  15.7k|    memcpy(&temp_bs, it_bit_buff, sizeof(ia_bit_buf_struct));
  193|  15.7k|    start_pos = temp_bs.cnt_bits;
  194|       |
  195|  15.7k|    if (ixheaacd_read_bits_buf(&temp_bs, 8) == DVB_ANC_DATA_SYNC_BYTE) {
  ------------------
  |  |   38|  15.7k|#define DVB_ANC_DATA_SYNC_BYTE (0xBC)
  ------------------
  |  Branch (195:9): [True: 85, False: 15.6k]
  ------------------
  196|     85|      int dmx_level_present, compression_present;
  197|     85|      int coarse_gain_present, fine_grain_present;
  198|       |
  199|     85|      ixheaacd_read_bits_buf(&temp_bs, 8);
  200|       |
  201|     85|      ixheaacd_read_bits_buf(&temp_bs, 3);
  202|     85|      dmx_level_present = ixheaacd_read_bits_buf(&temp_bs, 1);
  203|     85|      ixheaacd_read_bits_buf(&temp_bs, 1);
  204|     85|      compression_present = ixheaacd_read_bits_buf(&temp_bs, 1);
  205|     85|      coarse_gain_present = ixheaacd_read_bits_buf(&temp_bs, 1);
  206|     85|      fine_grain_present = ixheaacd_read_bits_buf(&temp_bs, 1);
  207|       |
  208|     85|      if (dmx_level_present) ixheaacd_read_bits_buf(&temp_bs, 8);
  ------------------
  |  Branch (208:11): [True: 68, False: 17]
  ------------------
  209|       |
  210|     85|      if (compression_present) ixheaacd_read_bits_buf(&temp_bs, 16);
  ------------------
  |  Branch (210:11): [True: 48, False: 37]
  ------------------
  211|       |
  212|     85|      if (coarse_gain_present) ixheaacd_read_bits_buf(&temp_bs, 16);
  ------------------
  |  Branch (212:11): [True: 45, False: 40]
  ------------------
  213|       |
  214|     85|      if (fine_grain_present) ixheaacd_read_bits_buf(&temp_bs, 16);
  ------------------
  |  Branch (214:11): [True: 48, False: 37]
  ------------------
  215|       |
  216|     85|      if (!drc_handle->dvb_anc_data_present && temp_bs.cnt_bits >= 0) {
  ------------------
  |  Branch (216:11): [True: 62, False: 23]
  |  Branch (216:48): [True: 62, False: 0]
  ------------------
  217|     62|        drc_handle->dvb_anc_data_pos = start_pos;
  218|     62|        drc_handle->dvb_anc_data_present = 1;
  219|     62|      }
  220|     85|    }
  221|  15.7k|  }
  222|       |
  223|  15.7k|  if (it_bit_buff->cnt_bits < (cnt << 3)) {
  ------------------
  |  Branch (223:7): [True: 124, False: 15.6k]
  ------------------
  224|    124|    longjmp(*(it_bit_buff->xaac_jmp_buf),
  225|    124|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    124|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  226|    124|  }
  227|  15.6k|  it_bit_buff->ptr_read_next += cnt;
  228|  15.6k|  it_bit_buff->cnt_bits -= ((cnt) << 3);
  229|  15.6k|}
ixheaacd_read_fill_element:
  234|  11.5k|    WORD32 *mps_bytes) {
  235|  11.5k|  WORD32 count;
  236|  11.5k|  count = ixheaacd_read_bits_buf(it_bit_buff, 4);
  237|       |
  238|  11.5k|  if ((count - 15) == 0) {
  ------------------
  |  Branch (238:7): [True: 8, False: 11.5k]
  ------------------
  239|      8|    count = ixheaacd_read_bits_buf(it_bit_buff, 8);
  240|      8|    count = (count + 14);
  241|      8|  }
  242|       |
  243|  11.5k|  if (count > 0) {
  ------------------
  |  Branch (243:7): [True: 11.4k, False: 107]
  ------------------
  244|  11.4k|    WORD32 extension_type;
  245|       |
  246|  11.4k|    extension_type = ixheaacd_read_bits_buf(it_bit_buff, 4);
  247|       |
  248|  11.4k|    if (extension_type == EXT_DYNAMIC_RANGE) {
  ------------------
  |  |   23|  11.4k|#define EXT_DYNAMIC_RANGE 11
  ------------------
  |  Branch (248:9): [True: 14, False: 11.4k]
  ------------------
  249|     14|      ptr_drc_dec->drc_element_found = 1;
  250|     14|      count -=
  251|     14|          ixheaacd_dec_drc_read_element(ptr_drc_dec, drc_dummy, it_bit_buff);
  252|     14|    }
  253|  11.4k|    if (EXT_SAC_DATA == extension_type) {
  ------------------
  |  |   25|  11.4k|#define EXT_SAC_DATA 12
  ------------------
  |  Branch (253:9): [True: 11.0k, False: 323]
  ------------------
  254|  11.0k|      WORD32 anc_type, i;
  255|  11.0k|      anc_type = ixheaacd_read_bits_buf(it_bit_buff, 2);
  256|  11.0k|      *mps_header = anc_type;
  257|       |
  258|  11.0k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  259|       |
  260|  11.0k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  261|       |
  262|   110k|      for (i = 0; i < count - 1; i++) {
  ------------------
  |  Branch (262:19): [True: 99.5k, False: 11.0k]
  ------------------
  263|  99.5k|        mps_buffer[i] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  264|  99.5k|      }
  265|       |
  266|  11.0k|      *mps_bytes = count - 1;
  267|  11.0k|    }
  268|    323|    else {
  269|    323|      ixheaacd_read_bits_buf(it_bit_buff, 4);
  270|       |
  271|    323|      if (it_bit_buff->cnt_bits < ((count - 1) << 3)) {
  ------------------
  |  Branch (271:11): [True: 23, False: 300]
  ------------------
  272|     23|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  273|     23|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     23|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  274|     23|      }
  275|    300|      it_bit_buff->ptr_read_next += count - 1;
  276|    300|      it_bit_buff->cnt_bits -= ((count - 1) << 3);
  277|    300|    }
  278|  11.4k|  }
  279|  11.5k|}
ixheaacd_get_element_index_tag:
  288|  64.7k|) {
  289|  64.7k|  WORD element_tag, j;
  290|  64.7k|  ia_aac_dec_state_struct *p_state_enhaacplus_dec =
  291|  64.7k|      p_obj_enhaacplus_dec->p_state_aac;
  292|       |
  293|  64.7k|  ia_bit_buf_struct *it_bit_buff = p_state_enhaacplus_dec->ptr_bit_stream;
  294|  64.7k|  WORD element_idx;
  295|  64.7k|  WORD element_type;
  296|       |
  297|  64.7k|  ia_aac_decoder_struct *aac_dec_handle =
  298|  64.7k|      p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx1];
  299|       |
  300|  64.7k|  *ch_idx = ch_idx1;
  301|       |
  302|  64.7k|  if (p_state_enhaacplus_dec->bs_format != LOAS_BSFORMAT) {
  ------------------
  |  |   29|  64.7k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (302:7): [True: 34.2k, False: 30.4k]
  ------------------
  303|  34.2k|    if (ch_idx1 == 0) {
  ------------------
  |  Branch (303:9): [True: 32.8k, False: 1.47k]
  ------------------
  304|  32.8k|      ixheaacd_byte_align(it_bit_buff, &aac_dec_handle->byte_align_bits);
  305|  32.8k|    }
  306|  34.2k|  }
  307|  64.7k|  {
  308|  64.7k|    if (ch_idx1 == 0) {
  ------------------
  |  Branch (308:9): [True: 46.1k, False: 18.5k]
  ------------------
  309|  46.1k|      aac_dec_handle->byte_align_bits = it_bit_buff->cnt_bits;
  310|  46.1k|    }
  311|  64.7k|  }
  312|       |
  313|  64.7k|  if (it_bit_buff->cnt_bits < 3) {
  ------------------
  |  Branch (313:7): [True: 4, False: 64.7k]
  ------------------
  314|      4|    it_bit_buff->cnt_bits = -1;
  315|      4|    return (WORD16)(
  316|      4|        (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      4|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  317|      4|  }
  318|       |
  319|  64.7k|  element_tag = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 7);
  320|  64.7k|  ixheaacd_read_bidirection(it_bit_buff, -7);
  321|       |
  322|  64.7k|  element_idx = (element_tag & 0xF);
  323|  64.7k|  element_type = (element_tag >> 4) & 0x7;
  324|       |
  325|  64.7k|  p_obj_enhaacplus_dec->aac_config.str_prog_config.alignment_bits =
  326|  64.7k|      it_bit_buff->bit_pos;
  327|       |
  328|  84.3k|  while (element_type == 4 || element_type == 5 || element_type == 6) {
  ------------------
  |  Branch (328:10): [True: 8.25k, False: 76.1k]
  |  Branch (328:31): [True: 312, False: 75.8k]
  |  Branch (328:52): [True: 11.5k, False: 64.3k]
  ------------------
  329|  19.8k|    WORD type = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 3);
  330|       |
  331|  19.8k|    if (it_bit_buff->cnt_bits < 3) {
  ------------------
  |  Branch (331:9): [True: 0, False: 19.8k]
  ------------------
  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|  19.8k|    if (type == 4) {
  ------------------
  |  Branch (337:9): [True: 8.03k, False: 11.8k]
  ------------------
  338|  8.03k|      ixheaacd_read_data_stream_element(
  339|  8.03k|          it_bit_buff, &aac_dec_handle->byte_align_bits, pstr_drc_dec);
  340|  8.03k|    }
  341|  19.8k|    if (type == 5) {
  ------------------
  |  Branch (341:9): [True: 312, False: 19.5k]
  ------------------
  342|    312|      WORD32 error_code = 0;
  343|    312|      error_code = ixheaacd_decode_pce(
  344|    312|          it_bit_buff, &p_obj_enhaacplus_dec->aac_config.ui_pce_found_in_hdr,
  345|    312|          &p_obj_enhaacplus_dec->aac_config.str_prog_config);
  346|    312|      if (error_code != 0) {
  ------------------
  |  Branch (346:11): [True: 174, False: 138]
  ------------------
  347|    174|        if (error_code < 0) return error_code;
  ------------------
  |  Branch (347:13): [True: 37, False: 137]
  ------------------
  348|    137|        return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |  102|    137|#define IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
  ------------------
  349|    174|      }
  350|    312|    }
  351|  19.6k|    if (type == 6) {
  ------------------
  |  Branch (351:9): [True: 11.5k, False: 8.17k]
  ------------------
  352|  11.5k|      ixheaacd_read_fill_element(it_bit_buff, drc_dummy, pstr_drc_dec,
  353|  11.5k|                                 mps_buffer, mps_header, mps_bytes);
  354|  11.5k|    }
  355|       |
  356|  19.6k|    if (it_bit_buff->cnt_bits < 7) {
  ------------------
  |  Branch (356:9): [True: 11, False: 19.6k]
  ------------------
  357|     11|      it_bit_buff->cnt_bits = -1;
  358|     11|      return (WORD16)(
  359|     11|          (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     11|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  360|     11|    }
  361|       |
  362|  19.6k|    element_tag = (WORD)ixheaacd_aac_showbits_7(it_bit_buff);
  363|  19.6k|    element_idx = (element_tag & 0xF);
  364|  19.6k|    element_type = (element_tag >> 4) & 0x7;
  365|  19.6k|  }
  366|       |
  367|  64.5k|  if (total_elements == 2 && total_channels == 2 &&
  ------------------
  |  Branch (367:7): [True: 19.2k, False: 45.2k]
  |  Branch (367:30): [True: 19.0k, False: 252]
  ------------------
  368|  19.0k|      p_state_enhaacplus_dec->p_config->ui_pce_found_in_hdr == 2 &&
  ------------------
  |  Branch (368:7): [True: 838, False: 18.1k]
  ------------------
  369|    838|      ch_idx1 == 0) {
  ------------------
  |  Branch (369:7): [True: 521, False: 317]
  ------------------
  370|    521|    ixheaacd_fill_prog_config_slots(p_state_enhaacplus_dec);
  371|    521|  }
  372|       |
  373|  64.5k|  *channel = 1;
  374|  64.5k|  if (element_type == 1) {
  ------------------
  |  Branch (374:7): [True: 1.67k, False: 62.8k]
  ------------------
  375|  1.67k|    *channel = 2;
  376|  1.67k|  }
  377|       |
  378|   100k|  for (j = 0; j < total_elements; j++) {
  ------------------
  |  Branch (378:15): [True: 97.6k, False: 2.61k]
  ------------------
  379|  97.6k|    if (p_obj_enhaacplus_dec->aac_config.element_type[j] == element_type &&
  ------------------
  |  Branch (379:9): [True: 90.6k, False: 6.99k]
  ------------------
  380|  90.6k|        (element_idx == ele_idx_order[j]) && (element_used[j] == 0)) {
  ------------------
  |  Branch (380:9): [True: 80.7k, False: 9.89k]
  |  Branch (380:46): [True: 61.9k, False: 18.8k]
  ------------------
  381|  61.9k|      *ch_idx = j;
  382|  61.9k|      element_used[j] = 1;
  383|  61.9k|      break;
  384|  61.9k|    }
  385|  97.6k|  }
  386|       |
  387|  64.5k|  if (j == total_elements) {
  ------------------
  |  Branch (387:7): [True: 2.39k, False: 62.1k]
  ------------------
  388|  2.39k|    if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (388:9): [True: 0, False: 2.39k]
  ------------------
  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.39k|    ixheaacd_read_bidirection(
  394|  2.39k|        it_bit_buff, (WORD16)(it_bit_buff->cnt_bits - it_bit_buff->size));
  395|  2.39k|    return IA_XHEAAC_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND;
  ------------------
  |  |  100|  2.39k|#define IA_XHEAAC_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND 0x00001805
  ------------------
  396|  2.39k|  } else
  397|  62.1k|    return 0;
  398|  64.5k|}
ixheaacd_common_lpfuncs.c:ixheaacd_aac_showbits_7:
   93|  19.4k|ixheaacd_aac_showbits_7(ia_bit_buf_struct *it_bit_buff) {
   94|  19.4k|  UWORD8 *v = it_bit_buff->ptr_read_next;
   95|  19.4k|  UWORD32 b = 0;
   96|  19.4k|  UWORD32 x;
   97|  19.4k|  b = ((WORD32)v[0] << 8);
   98|  19.4k|  if (it_bit_buff->bit_pos < 6) {
  ------------------
  |  Branch (98:7): [True: 11.3k, False: 8.09k]
  ------------------
   99|  11.3k|    b |= (WORD32)(v[1]);
  100|  11.3k|  }
  101|  19.4k|  x = (UWORD32)b << (15 + 8 - it_bit_buff->bit_pos);
  102|  19.4k|  x = (UWORD32)x >> (25);
  103|       |
  104|  19.4k|  return x;
  105|  19.4k|}

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

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

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

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

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

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

ixheaacd_shellsort:
   48|  1.40M|VOID ixheaacd_shellsort(WORD32 *in, WORD32 n) {
   49|  1.40M|  WORD32 i, j, v;
   50|  1.40M|  WORD32 inc = 1;
   51|       |
   52|  1.40M|  do
   53|  3.00M|    inc = 3 * inc + 1;
   54|  3.00M|  while (inc <= n);
  ------------------
  |  Branch (54:10): [True: 1.59M, False: 1.40M]
  ------------------
   55|       |
   56|  3.00M|  do {
   57|  3.00M|    inc = inc / 3;
   58|  23.0M|    for (i = inc + 1; i <= n; i++) {
  ------------------
  |  Branch (58:23): [True: 20.0M, False: 3.00M]
  ------------------
   59|  20.0M|      v = in[i - 1];
   60|  20.0M|      j = i;
   61|  26.7M|      while (in[j - inc - 1] > v) {
  ------------------
  |  Branch (61:14): [True: 7.41M, False: 19.3M]
  ------------------
   62|  7.41M|        in[j - 1] = in[j - inc - 1];
   63|  7.41M|        j -= inc;
   64|  7.41M|        if (j <= inc) break;
  ------------------
  |  Branch (64:13): [True: 688k, False: 6.72M]
  ------------------
   65|  7.41M|      }
   66|  20.0M|      in[j - 1] = v;
   67|  20.0M|    }
   68|  3.00M|  } while (inc > 1);
  ------------------
  |  Branch (68:12): [True: 1.59M, False: 1.40M]
  ------------------
   69|  1.40M|}
ixheaacd_sbr_env_calc:
   75|   233k|                             WORD32 ec_flag) {
   76|   233k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|   233k|#define IA_NO_ERROR 0x00000000
  ------------------
   77|   233k|  WORD8 harmonics[64];
   78|   233k|  FLOAT32(*env_tmp)[48];
   79|   233k|  FLOAT32(*noise_level_pvc)[48];
   80|   233k|  FLOAT32(*nrg_est_pvc)[48];
   81|   233k|  FLOAT32(*nrg_ref_pvc)[48];
   82|   233k|  FLOAT32(*nrg_gain_pvc)[48];
   83|   233k|  FLOAT32(*nrg_tone_pvc)[48];
   84|       |
   85|   233k|  WORD32 n, c, li, ui, i, j, k = 0, l, m = 0, kk = 0, o, next = -1, ui2, flag,
   86|   233k|                             tmp, noise_absc_flag, smooth_length;
   87|   233k|  WORD32 upsamp_4_flag = frame_data->pstr_sbr_header->is_usf_4;
   88|       |
   89|   233k|  FLOAT32 *ptr_real_buf, *ptr_imag_buf, nrg = 0, p_ref, p_est, avg_gain, g_max,
   90|   233k|                                        p_adj, boost_gain, sb_gain, sb_noise,
   91|   233k|                                        temp[64];
   92|       |
   93|   233k|  WORD32 t;
   94|   233k|  WORD32 start_pos = 0;
   95|   233k|  WORD32 end_pos = 0;
   96|       |
   97|   233k|  WORD32 slot_idx;
   98|       |
   99|   233k|  FLOAT32 *prev_env_noise_level = frame_data->prev_noise_level;
  100|   233k|  FLOAT32 *nrg_tone = scratch_buff;
  101|   233k|  FLOAT32 *noise_level = scratch_buff + 64;
  102|   233k|  FLOAT32 *nrg_est = scratch_buff + 128;
  103|   233k|  FLOAT32 *nrg_ref = scratch_buff + 192;
  104|   233k|  FLOAT32 *nrg_gain = scratch_buff + 256;
  105|       |
  106|   233k|  const FLOAT32 *smooth_filt;
  107|       |
  108|   233k|  FLOAT32 *sfb_nrg = frame_data->flt_env_sf_arr;
  109|   233k|  FLOAT32 *noise_floor = frame_data->flt_noise_floor;
  110|   233k|  ia_frame_info_struct *p_frame_info = &frame_data->str_frame_info_details;
  111|       |
  112|   233k|  ia_frame_info_struct *pvc_frame_info = &frame_data->str_pvc_frame_info;
  113|   233k|  WORD32 smoothing_length = frame_data->pstr_sbr_header->smoothing_mode ? 0 : 4;
  ------------------
  |  Branch (113:29): [True: 211k, False: 21.4k]
  ------------------
  114|   233k|  WORD32 int_mode = frame_data->pstr_sbr_header->interpol_freq;
  115|   233k|  WORD32 limiter_band = frame_data->pstr_sbr_header->limiter_bands;
  116|   233k|  WORD32 limiter_gains = frame_data->pstr_sbr_header->limiter_gains;
  117|   233k|  WORD32 *add_harmonics = frame_data->add_harmonics;
  118|   233k|  WORD32 sub_band_start =
  119|   233k|      frame_data->pstr_sbr_header->pstr_freq_band_data->sub_band_start;
  120|   233k|  WORD32 sub_band_end =
  121|   233k|      frame_data->pstr_sbr_header->pstr_freq_band_data->sub_band_end;
  122|   233k|  WORD32 reset = frame_data->reset_flag;
  123|   233k|  WORD32 num_subbands = sub_band_end - sub_band_start;
  124|   233k|  WORD32 bs_num_env = p_frame_info->num_env;
  125|   233k|  WORD32 trans_env = p_frame_info->transient_env;
  126|   233k|  WORD32 sbr_mode = frame_data->sbr_mode;
  127|   233k|  WORD32 prev_sbr_mode = frame_data->prev_sbr_mode;
  128|       |
  129|   233k|  WORD16 *freq_band_table[2];
  130|   233k|  const WORD16 *num_sf_bands =
  131|   233k|      frame_data->pstr_sbr_header->pstr_freq_band_data->num_sf_bands;
  132|   233k|  WORD16 *freq_band_table_noise =
  133|   233k|      frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_noise;
  134|   233k|  WORD32 num_nf_bands =
  135|   233k|      frame_data->pstr_sbr_header->pstr_freq_band_data->num_nf_bands;
  136|       |
  137|   233k|  WORD32 harm_index = frame_data->harm_index;
  138|   233k|  WORD32 phase_index = frame_data->phase_index;
  139|   233k|  WORD32 esbr_start_up = frame_data->pstr_sbr_header->esbr_start_up;
  140|   233k|  WORD32 esbr_start_up_pvc = frame_data->pstr_sbr_header->esbr_start_up_pvc;
  141|   233k|  WORD8(*harm_flag_prev)[64] = &frame_data->harm_flag_prev;
  142|   233k|  FLOAT32(*e_gain)[5][64] = &frame_data->e_gain;
  143|   233k|  FLOAT32(*noise_buf)[5][64] = &frame_data->noise_buf;
  144|   233k|  WORD32(*lim_table)[4][12 + 1] = &frame_data->lim_table;
  145|   233k|  WORD32(*gate_mode)[4] = &frame_data->gate_mode;
  146|   233k|  WORD32 freq_inv = 1;
  147|       |
  148|   233k|  WORD8(*harm_flag_varlen_prev)[64] = &frame_data->harm_flag_varlen_prev;
  149|   233k|  WORD8(*harm_flag_varlen)[64] = &frame_data->harm_flag_varlen;
  150|   233k|  WORD32 band_loop_end;
  151|       |
  152|   233k|  WORD32 rate = upsamp_4_flag ? 4 : 2;
  ------------------
  |  Branch (152:17): [True: 21.6k, False: 211k]
  ------------------
  153|   233k|  FLOAT64 guard = 1e-17;
  154|       |
  155|   233k|  if (ldmps_present == 1) rate = 1;
  ------------------
  |  Branch (155:7): [True: 4.22k, False: 229k]
  ------------------
  156|       |
  157|   233k|  env_tmp = frame_data->env_tmp;
  158|   233k|  noise_level_pvc = frame_data->noise_level_pvc;
  159|   233k|  nrg_est_pvc = frame_data->nrg_est_pvc;
  160|   233k|  nrg_ref_pvc = frame_data->nrg_ref_pvc;
  161|   233k|  nrg_gain_pvc = frame_data->nrg_gain_pvc;
  162|   233k|  nrg_tone_pvc = frame_data->nrg_tone_pvc;
  163|       |
  164|   233k|  freq_band_table[0] =
  165|   233k|      frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_table[0];
  166|   233k|  freq_band_table[1] =
  167|   233k|      frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_table[1];
  168|       |
  169|   233k|  if (reset || (ldmps_present == 1)) {
  ------------------
  |  Branch (169:7): [True: 41.6k, False: 191k]
  |  Branch (169:16): [True: 3.66k, False: 187k]
  ------------------
  170|  45.2k|    esbr_start_up = 1;
  171|  45.2k|    esbr_start_up_pvc = 1;
  172|  45.2k|    if (reset) phase_index = 0;
  ------------------
  |  Branch (172:9): [True: 41.6k, False: 3.66k]
  ------------------
  173|  45.2k|    if (ixheaacd_createlimiterbands(
  ------------------
  |  Branch (173:9): [True: 0, False: 45.2k]
  ------------------
  174|  45.2k|            (*lim_table), (*gate_mode),
  175|  45.2k|            frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_lo, num_sf_bands[LOW],
  ------------------
  |  |   27|  45.2k|#define LOW 0
  ------------------
  176|  45.2k|            x_over_qmf, frame_data->sbr_patching_mode, upsamp_4_flag, &frame_data->patch_param,
  177|  45.2k|            ec_flag))
  178|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  179|  45.2k|  }
  180|       |
  181|   233k|  if (frame_data->sbr_patching_mode != frame_data->prev_sbr_patching_mode) {
  ------------------
  |  Branch (181:7): [True: 36.7k, False: 196k]
  ------------------
  182|  36.7k|    if (ixheaacd_createlimiterbands(
  ------------------
  |  Branch (182:9): [True: 0, False: 36.7k]
  ------------------
  183|  36.7k|            (*lim_table), (*gate_mode),
  184|  36.7k|            frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_lo, num_sf_bands[LOW],
  ------------------
  |  |   27|  36.7k|#define LOW 0
  ------------------
  185|  36.7k|            x_over_qmf, frame_data->sbr_patching_mode, upsamp_4_flag, &frame_data->patch_param,
  186|  36.7k|            ec_flag))
  187|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  188|       |
  189|  36.7k|    frame_data->prev_sbr_patching_mode = frame_data->sbr_patching_mode;
  190|  36.7k|  }
  191|       |
  192|   233k|  memset(harmonics, 0, 64 * sizeof(WORD8));
  193|       |
  194|   233k|  if (sbr_mode == PVC_SBR) {
  ------------------
  |  Branch (194:7): [True: 63.7k, False: 169k]
  ------------------
  195|  1.01M|    for (i = 0; i < num_sf_bands[HIGH]; i++) {
  ------------------
  |  |   28|  1.01M|#define HIGH 1
  ------------------
  |  Branch (195:17): [True: 948k, False: 63.7k]
  ------------------
  196|   948k|      li =
  197|   948k|          frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_hi[i];
  198|   948k|      ui = frame_data->pstr_sbr_header->pstr_freq_band_data
  199|   948k|               ->freq_band_tbl_hi[i + 1];
  200|   948k|      tmp = ((ui + li) - (sub_band_start << 1)) >> 1;
  201|       |
  202|   948k|      if ((tmp >= 64) || (tmp < 0)) {
  ------------------
  |  Branch (202:11): [True: 0, False: 948k]
  |  Branch (202:26): [True: 0, False: 948k]
  ------------------
  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|   948k|      harmonics[tmp] = add_harmonics[i];
  210|   948k|    }
  211|       |
  212|  76.6k|    for (t = 0; t < p_frame_info->border_vec[0]; t++) {
  ------------------
  |  Branch (212:17): [True: 12.8k, False: 63.7k]
  ------------------
  213|   838k|      for (c = 0; c < 64; c++) {
  ------------------
  |  Branch (213:19): [True: 825k, False: 12.8k]
  ------------------
  214|   825k|        frame_data->qmapped_pvc[c][t] = frame_data->qmapped_pvc[c][t + 16];
  215|   825k|      }
  216|  12.8k|    }
  217|       |
  218|   169k|    for (i = 0; i < bs_num_env; i++) {
  ------------------
  |  Branch (218:17): [True: 105k, False: 63.7k]
  ------------------
  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.02M, False: 105k]
  ------------------
  238|  1.02M|        band_loop_end = num_sf_bands[p_frame_info->freq_res[i]];
  239|       |
  240|  8.69M|        for (c = 0, o = 0, j = 0; j < band_loop_end; j++) {
  ------------------
  |  Branch (240:35): [True: 7.67M, False: 1.02M]
  ------------------
  241|  7.67M|          li = freq_band_table[p_frame_info->freq_res[i]][j];
  242|  7.67M|          ui = freq_band_table[p_frame_info->freq_res[i]][j + 1];
  243|  7.67M|          ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  244|  7.67M|                    ->freq_band_tbl_noise[o + 1];
  245|       |
  246|  37.6M|          for (k = 0; k < ui - li; k++) {
  ------------------
  |  Branch (246:23): [True: 29.9M, False: 7.67M]
  ------------------
  247|  29.9M|            o = (k + li >= ui2) ? o + 1 : o;
  ------------------
  |  Branch (247:17): [True: 2.48M, False: 27.4M]
  ------------------
  248|  29.9M|            if (o >= MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|  29.9M|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (248:17): [True: 0, False: 29.9M]
  ------------------
  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.9M|            ui2 = freq_band_table_noise[o + 1];
  255|       |
  256|  29.9M|            frame_data->qmapped_pvc[c][t] =
  257|  29.9M|                noise_floor[next * num_nf_bands + o];
  258|  29.9M|            c++;
  259|  29.9M|          }
  260|  7.67M|        }
  261|  1.02M|      }
  262|   105k|    }
  263|       |
  264|  63.7k|    kk = 0;
  265|  63.7k|    next = -1;
  266|       |
  267|   169k|    for (i = 0; i < bs_num_env; i++) {
  ------------------
  |  Branch (267:17): [True: 105k, False: 63.7k]
  ------------------
  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.12M|      for (t = start_pos; t < end_pos; t++) {
  ------------------
  |  Branch (285:27): [True: 1.02M, False: 105k]
  ------------------
  286|  66.3M|        for (c = 0; c < 64; c++) {
  ------------------
  |  Branch (286:21): [True: 65.2M, False: 1.02M]
  ------------------
  287|  65.2M|          env_tmp[c][t] = env_out[64 * t + c];
  288|  65.2M|        }
  289|  1.02M|      }
  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: 370, False: 105k]
  ------------------
  293|       |
  294|   105k|      if (prev_sbr_mode == ORIG_SBR) noise_absc_flag = 0;
  ------------------
  |  Branch (294:11): [True: 1.75k, False: 103k]
  ------------------
  295|       |
  296|   105k|      smooth_length = (noise_absc_flag ? 0 : smoothing_length);
  ------------------
  |  Branch (296:24): [True: 352, False: 105k]
  ------------------
  297|   105k|      smooth_filt = *ixheaac_fir_table[smooth_length];
  298|       |
  299|   113k|      for (t = start_pos; t < frame_data->sin_len_for_cur_top; t++) {
  ------------------
  |  Branch (299:27): [True: 7.52k, False: 105k]
  ------------------
  300|  7.52k|        band_loop_end =
  301|  7.52k|            num_sf_bands[frame_data->str_frame_info_prev
  302|  7.52k|                             .freq_res[frame_data->var_len_id_prev]];
  303|       |
  304|  61.3k|        for (c = 0, o = 0, j = 0; j < band_loop_end; j++) {
  ------------------
  |  Branch (304:35): [True: 53.8k, False: 7.52k]
  ------------------
  305|  53.8k|          double tmp;
  306|       |
  307|  53.8k|          li = freq_band_table[frame_data->str_frame_info_prev
  308|  53.8k|                                   .freq_res[frame_data->var_len_id_prev]][j];
  309|  53.8k|          ui = freq_band_table[frame_data->str_frame_info_prev
  310|  53.8k|                                   .freq_res[frame_data->var_len_id_prev]]
  311|  53.8k|                              [j + 1];
  312|  53.8k|          ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  313|  53.8k|                    ->freq_band_tbl_noise[o + 1];
  314|       |
  315|   254k|          for (flag = 0, k = li; k < ui; k++) {
  ------------------
  |  Branch (315:34): [True: 200k, False: 53.8k]
  ------------------
  316|   200k|            flag = ((*harm_flag_varlen)[c] &&
  ------------------
  |  Branch (316:21): [True: 33.3k, False: 167k]
  ------------------
  317|  33.3k|                    (t >= frame_data->sin_start_for_cur_top ||
  ------------------
  |  Branch (317:22): [True: 26.0k, False: 7.30k]
  ------------------
  318|  7.30k|                     (*harm_flag_varlen_prev)[c + sub_band_start]))
  ------------------
  |  Branch (318:22): [True: 5.93k, False: 1.36k]
  ------------------
  319|   200k|                       ? 1
  320|   200k|                       : flag;
  321|       |
  322|   200k|            nrg_ref_pvc[c][t] = env_tmp[k][t];
  323|   603k|            for (nrg = 0, l = 0; l < rate; l++) {
  ------------------
  |  Branch (323:34): [True: 402k, False: 200k]
  ------------------
  324|   402k|              nrg +=
  325|   402k|                  (input_real[rate * t + l][k] * input_real[rate * t + l][k]) +
  326|   402k|                  (input_imag[rate * t + l][k] * input_imag[rate * t + l][k]);
  327|   402k|            }
  328|   200k|            nrg_est_pvc[c][t] = nrg / rate;
  329|   200k|            c++;
  330|   200k|          }
  331|       |
  332|  53.8k|          if (!int_mode && ui != li) {
  ------------------
  |  Branch (332:15): [True: 10.3k, False: 43.4k]
  |  Branch (332:28): [True: 10.3k, False: 82]
  ------------------
  333|  56.0k|            for (nrg = 0, k = c - (ui - li); k < c; k++) {
  ------------------
  |  Branch (333:46): [True: 45.7k, False: 10.3k]
  ------------------
  334|  45.7k|              nrg += nrg_est_pvc[k][t];
  335|  45.7k|            }
  336|  10.3k|            nrg /= (ui - li);
  337|  43.5k|          } else {
  338|  43.5k|            nrg = 0;
  339|  43.5k|          }
  340|  53.8k|          c -= (ui - li);
  341|       |
  342|   254k|          for (k = 0; k < ui - li; k++) {
  ------------------
  |  Branch (342:23): [True: 200k, False: 53.8k]
  ------------------
  343|   200k|            o = (k + li >= ui2) ? o + 1 : o;
  ------------------
  |  Branch (343:17): [True: 12.1k, False: 188k]
  ------------------
  344|   200k|            if (o >= MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|   200k|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (344:17): [True: 0, False: 200k]
  ------------------
  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|   200k|            ui2 = freq_band_table_noise[o + 1];
  351|   200k|            nrg_est_pvc[c][t] = (!int_mode) ? nrg : nrg_est_pvc[c][t];
  ------------------
  |  Branch (351:33): [True: 45.7k, False: 154k]
  ------------------
  352|   200k|            nrg_tone_pvc[c][t] = 0.0f;
  353|       |
  354|   200k|            tmp = frame_data->qmapped_pvc[c][t] /
  355|   200k|                  (1 + frame_data->qmapped_pvc[c][t] + guard);
  356|       |
  357|   200k|            if (flag) {
  ------------------
  |  Branch (357:17): [True: 114k, False: 85.6k]
  ------------------
  358|   114k|              nrg_gain_pvc[c][t] = (FLOAT32)sqrt(nrg_ref_pvc[c][t] * tmp /
  359|   114k|                                                 (nrg_est_pvc[c][t] + 1));
  360|       |
  361|   114k|              nrg_tone_pvc[c][t] = (FLOAT32)(
  362|   114k|                  (harmonics[c] && (t >= frame_data->sine_position ||
  ------------------
  |  Branch (362:20): [True: 11.5k, False: 103k]
  |  Branch (362:37): [True: 392, False: 11.1k]
  ------------------
  363|  11.1k|                                    (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (363:37): [True: 9.34k, False: 1.83k]
  ------------------
  364|   114k|                      ? sqrt(nrg_ref_pvc[c][t] * tmp /
  365|  9.73k|                             (frame_data->qmapped_pvc[c][t] + guard))
  366|   114k|                      : nrg_tone_pvc[c][t]);
  367|       |
  368|   114k|              nrg_tone_pvc[c][t] =
  369|   114k|                  (FLOAT32)(((*harm_flag_varlen)[c] &&
  ------------------
  |  Branch (369:30): [True: 32.1k, False: 82.7k]
  ------------------
  370|  32.1k|                             (t >= frame_data->sin_start_for_cur_top ||
  ------------------
  |  Branch (370:31): [True: 26.0k, False: 6.12k]
  ------------------
  371|  6.12k|                              (*harm_flag_varlen_prev)[c + sub_band_start]))
  ------------------
  |  Branch (371:31): [True: 5.93k, False: 191]
  ------------------
  372|   114k|                                ? sqrt(nrg_ref_pvc[c][t] * tmp /
  373|  31.9k|                                       (prev_env_noise_level[o] + guard))
  374|   114k|                                : nrg_tone_pvc[c][t]);
  375|       |
  376|   114k|            } else {
  377|  85.6k|              if (noise_absc_flag) {
  ------------------
  |  Branch (377:19): [True: 0, False: 85.6k]
  ------------------
  378|      0|                nrg_gain_pvc[c][t] =
  379|      0|                    (FLOAT32)sqrt(nrg_ref_pvc[c][t] / (nrg_est_pvc[c][t] + 1));
  380|  85.6k|              } else {
  381|  85.6k|                nrg_gain_pvc[c][t] = (FLOAT32)sqrt(
  382|  85.6k|                    nrg_ref_pvc[c][t] * tmp /
  383|  85.6k|                    ((nrg_est_pvc[c][t] + 1) * (frame_data->qmapped_pvc[c][t] + guard)));
  384|  85.6k|              }
  385|  85.6k|            }
  386|       |
  387|   200k|            noise_level_pvc[c][t] = (FLOAT32)sqrt(nrg_ref_pvc[c][t] * tmp);
  388|   200k|            c++;
  389|   200k|          }
  390|  53.8k|        }
  391|       |
  392|  31.6k|        for (c = 0; c < (*gate_mode)[limiter_band]; c++) {
  ------------------
  |  Branch (392:21): [True: 24.1k, False: 7.52k]
  ------------------
  393|  24.1k|          p_ref = p_est = 0.0f;
  394|  24.1k|          p_adj = 0;
  395|  24.1k|          for (k = (*lim_table)[limiter_band][c];
  396|   224k|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (396:16): [True: 199k, False: 24.1k]
  ------------------
  397|   199k|            p_ref += nrg_ref_pvc[k][t];
  398|   199k|            p_est += nrg_est_pvc[k][t];
  399|   199k|          }
  400|  24.1k|          avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|  24.1k|#define EPS 1e-12f
  ------------------
                        avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|  24.1k|#define EPS 1e-12f
  ------------------
  401|  24.1k|          g_max = avg_gain * ixheaac_g_lim_gains[limiter_gains];
  402|  24.1k|          g_max > 1.0e5f ? g_max = 1.0e5f : 0;
  ------------------
  |  Branch (402:11): [True: 2.17k, False: 21.9k]
  ------------------
  403|  24.1k|          for (k = (*lim_table)[limiter_band][c];
  404|   224k|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (404:16): [True: 199k, False: 24.1k]
  ------------------
  405|   199k|            if (g_max <= nrg_gain_pvc[k][t]) {
  ------------------
  |  Branch (405:17): [True: 44.3k, False: 155k]
  ------------------
  406|  44.3k|              noise_level_pvc[k][t] =
  407|  44.3k|                  (FLOAT32)(noise_level_pvc[k][t] * (g_max / (nrg_gain_pvc[k][t] + guard)));
  408|  44.3k|              nrg_gain_pvc[k][t] = g_max;
  409|  44.3k|            }
  410|       |
  411|   199k|            p_adj +=
  412|   199k|                nrg_gain_pvc[k][t] * nrg_gain_pvc[k][t] * nrg_est_pvc[k][t];
  413|       |
  414|   199k|            if (nrg_tone_pvc[k][t]) {
  ------------------
  |  Branch (414:17): [True: 32.0k, False: 167k]
  ------------------
  415|  32.0k|              p_adj += nrg_tone_pvc[k][t] * nrg_tone_pvc[k][t];
  416|   167k|            } else if (!noise_absc_flag) {
  ------------------
  |  Branch (416:24): [True: 167k, False: 0]
  ------------------
  417|   167k|              p_adj += noise_level_pvc[k][t] * noise_level_pvc[k][t];
  418|   167k|            }
  419|   199k|          }
  420|  24.1k|          boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|  24.1k|#define EPS 1e-12f
  ------------------
                        boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|  24.1k|#define EPS 1e-12f
  ------------------
  421|  24.1k|          boost_gain = boost_gain > 1.584893192f ? 1.584893192f : boost_gain;
  ------------------
  |  Branch (421:24): [True: 6.27k, False: 17.8k]
  ------------------
  422|       |
  423|  24.1k|          for (k = (*lim_table)[limiter_band][c];
  424|   224k|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (424:16): [True: 199k, False: 24.1k]
  ------------------
  425|   199k|            nrg_gain_pvc[k][t] *= boost_gain;
  426|   199k|            noise_level_pvc[k][t] *= boost_gain;
  427|   199k|            nrg_tone_pvc[k][t] *= boost_gain;
  428|   199k|          }
  429|  24.1k|        }
  430|  7.52k|      }
  431|       |
  432|  1.11M|      for (; t < end_pos; t++) {
  ------------------
  |  Branch (432:14): [True: 1.01M, False: 105k]
  ------------------
  433|  1.01M|        band_loop_end = num_sf_bands[pvc_frame_info->freq_res[i]];
  434|       |
  435|  8.62M|        for (c = 0, o = 0, j = 0; j < band_loop_end; j++) {
  ------------------
  |  Branch (435:35): [True: 7.61M, False: 1.01M]
  ------------------
  436|  7.61M|          double tmp;
  437|       |
  438|  7.61M|          li = freq_band_table[pvc_frame_info->freq_res[i]][j];
  439|  7.61M|          ui = freq_band_table[pvc_frame_info->freq_res[i]][j + 1];
  440|  7.61M|          ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  441|  7.61M|                    ->freq_band_tbl_noise[o + 1];
  442|       |
  443|  37.3M|          for (flag = 0, k = li; k < ui; k++) {
  ------------------
  |  Branch (443:34): [True: 29.7M, False: 7.61M]
  ------------------
  444|  29.7M|            flag = (harmonics[c] && (t >= frame_data->sine_position ||
  ------------------
  |  Branch (444:21): [True: 1.19M, False: 28.5M]
  |  Branch (444:38): [True: 175k, False: 1.01M]
  ------------------
  445|  1.01M|                                     (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (445:38): [True: 415k, False: 601k]
  ------------------
  446|  29.7M|                       ? 1
  447|  29.7M|                       : flag;
  448|       |
  449|  29.7M|            nrg_ref_pvc[c][t] = env_tmp[k][t];
  450|  93.1M|            for (nrg = 0, l = 0; l < rate; l++) {
  ------------------
  |  Branch (450:34): [True: 63.3M, False: 29.7M]
  ------------------
  451|  63.3M|              nrg +=
  452|  63.3M|                  (input_real[rate * t + l][k] * input_real[rate * t + l][k]) +
  453|  63.3M|                  (input_imag[rate * t + l][k] * input_imag[rate * t + l][k]);
  454|  63.3M|            }
  455|  29.7M|            nrg_est_pvc[c][t] = nrg / rate;
  456|  29.7M|            c++;
  457|  29.7M|          }
  458|       |
  459|  7.61M|          if (!int_mode && ui != li) {
  ------------------
  |  Branch (459:15): [True: 1.00M, False: 6.60M]
  |  Branch (459:28): [True: 999k, False: 10.3k]
  ------------------
  460|  6.36M|            for (nrg = 0, k = c - (ui - li); k < c; k++) {
  ------------------
  |  Branch (460:46): [True: 5.36M, False: 999k]
  ------------------
  461|  5.36M|              nrg += nrg_est_pvc[k][t];
  462|  5.36M|            }
  463|   999k|            nrg /= (ui - li);
  464|  6.61M|          } else {
  465|  6.61M|            nrg = 0;
  466|  6.61M|          }
  467|  7.61M|          c -= (ui - li);
  468|       |
  469|  37.3M|          for (k = 0; k < ui - li; k++) {
  ------------------
  |  Branch (469:23): [True: 29.7M, False: 7.61M]
  ------------------
  470|  29.7M|            o = (k + li >= ui2) ? o + 1 : o;
  ------------------
  |  Branch (470:17): [True: 2.47M, False: 27.2M]
  ------------------
  471|  29.7M|            if (o >= MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|  29.7M|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (471:17): [True: 0, False: 29.7M]
  ------------------
  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.7M|            ui2 = freq_band_table_noise[o + 1];
  478|  29.7M|            nrg_est_pvc[c][t] = (!int_mode) ? nrg : nrg_est_pvc[c][t];
  ------------------
  |  Branch (478:33): [True: 5.36M, False: 24.3M]
  ------------------
  479|  29.7M|            nrg_tone_pvc[c][t] = 0.0f;
  480|       |
  481|  29.7M|            tmp = frame_data->qmapped_pvc[c][t] /
  482|  29.7M|                  (1 + frame_data->qmapped_pvc[c][t] + guard);
  483|       |
  484|  29.7M|            if (flag) {
  ------------------
  |  Branch (484:17): [True: 1.88M, False: 27.8M]
  ------------------
  485|  1.88M|              nrg_gain_pvc[c][t] = (FLOAT32)sqrt(nrg_ref_pvc[c][t] * tmp /
  486|  1.88M|                                                 (nrg_est_pvc[c][t] + 1));
  487|       |
  488|  1.88M|              nrg_tone_pvc[c][t] = (FLOAT32)(
  489|  1.88M|                  (harmonics[c] && (t >= frame_data->sine_position ||
  ------------------
  |  Branch (489:20): [True: 595k, False: 1.28M]
  |  Branch (489:37): [True: 175k, False: 420k]
  ------------------
  490|   420k|                                    (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (490:37): [True: 415k, False: 5.31k]
  ------------------
  491|  1.88M|                      ? sqrt(nrg_ref_pvc[c][t] * tmp /
  492|   590k|                             (frame_data->qmapped_pvc[c][t] + guard))
  493|  1.88M|                      : nrg_tone_pvc[c][t]);
  494|  27.8M|            } else {
  495|  27.8M|              if (noise_absc_flag) {
  ------------------
  |  Branch (495:19): [True: 46.7k, False: 27.8M]
  ------------------
  496|  46.7k|                nrg_gain_pvc[c][t] =
  497|  46.7k|                    (FLOAT32)sqrt(nrg_ref_pvc[c][t] / (nrg_est_pvc[c][t] + 1));
  498|  27.8M|              } else {
  499|  27.8M|                nrg_gain_pvc[c][t] = (FLOAT32)sqrt(
  500|  27.8M|                    nrg_ref_pvc[c][t] * tmp /
  501|  27.8M|                    ((nrg_est_pvc[c][t] + 1) * (frame_data->qmapped_pvc[c][t] + guard)));
  502|  27.8M|              }
  503|  27.8M|            }
  504|       |
  505|  29.7M|            noise_level_pvc[c][t] = (FLOAT32)sqrt(nrg_ref_pvc[c][t] * tmp);
  506|  29.7M|            c++;
  507|  29.7M|          }
  508|  7.61M|        }
  509|       |
  510|  5.20M|        for (c = 0; c < (*gate_mode)[limiter_band]; c++) {
  ------------------
  |  Branch (510:21): [True: 4.19M, False: 1.01M]
  ------------------
  511|  4.19M|          p_ref = p_est = 0.0f;
  512|  4.19M|          p_adj = 0;
  513|  4.19M|          for (k = (*lim_table)[limiter_band][c];
  514|  33.7M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (514:16): [True: 29.5M, False: 4.19M]
  ------------------
  515|  29.5M|            p_ref += nrg_ref_pvc[k][t];
  516|  29.5M|            p_est += nrg_est_pvc[k][t];
  517|  29.5M|          }
  518|  4.19M|          avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|  4.19M|#define EPS 1e-12f
  ------------------
                        avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|  4.19M|#define EPS 1e-12f
  ------------------
  519|  4.19M|          g_max = avg_gain * ixheaac_g_lim_gains[limiter_gains];
  520|  4.19M|          g_max > 1.0e5f ? g_max = 1.0e5f : 0;
  ------------------
  |  Branch (520:11): [True: 1.81M, False: 2.37M]
  ------------------
  521|       |
  522|  4.19M|          for (k = (*lim_table)[limiter_band][c];
  523|  33.7M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (523:16): [True: 29.5M, False: 4.19M]
  ------------------
  524|  29.5M|            if (g_max <= nrg_gain_pvc[k][t]) {
  ------------------
  |  Branch (524:17): [True: 2.77M, False: 26.8M]
  ------------------
  525|  2.77M|              noise_level_pvc[k][t] =
  526|  2.77M|                  (FLOAT32)(noise_level_pvc[k][t] *
  527|  2.77M|                            (g_max / (nrg_gain_pvc[k][t] + guard)));
  528|  2.77M|              nrg_gain_pvc[k][t] = g_max;
  529|  2.77M|            }
  530|       |
  531|  29.5M|            p_adj +=
  532|  29.5M|                nrg_gain_pvc[k][t] * nrg_gain_pvc[k][t] * nrg_est_pvc[k][t];
  533|       |
  534|  29.5M|            if (nrg_tone_pvc[k][t]) {
  ------------------
  |  Branch (534:17): [True: 589k, False: 29.0M]
  ------------------
  535|   589k|              p_adj += nrg_tone_pvc[k][t] * nrg_tone_pvc[k][t];
  536|  29.0M|            } else if (!noise_absc_flag) {
  ------------------
  |  Branch (536:24): [True: 28.9M, False: 44.3k]
  ------------------
  537|  28.9M|              p_adj += noise_level_pvc[k][t] * noise_level_pvc[k][t];
  538|  28.9M|            }
  539|  29.5M|          }
  540|       |
  541|  4.19M|          boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|  4.19M|#define EPS 1e-12f
  ------------------
                        boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|  4.19M|#define EPS 1e-12f
  ------------------
  542|  4.19M|          boost_gain = boost_gain > 1.584893192f ? 1.584893192f : boost_gain;
  ------------------
  |  Branch (542:24): [True: 503k, False: 3.68M]
  ------------------
  543|       |
  544|  4.19M|          for (k = (*lim_table)[limiter_band][c];
  545|  33.7M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (545:16): [True: 29.5M, False: 4.19M]
  ------------------
  546|  29.5M|            nrg_gain_pvc[k][t] *= boost_gain;
  547|  29.5M|            noise_level_pvc[k][t] *= boost_gain;
  548|  29.5M|            nrg_tone_pvc[k][t] *= boost_gain;
  549|  29.5M|          }
  550|  4.19M|        }
  551|  1.01M|      }
  552|       |
  553|   105k|      if (esbr_start_up_pvc) {
  ------------------
  |  Branch (553:11): [True: 8.33k, False: 97.2k]
  ------------------
  554|  41.6k|        for (n = 0; n < 4; n++) {
  ------------------
  |  Branch (554:21): [True: 33.3k, False: 8.33k]
  ------------------
  555|  1.02M|          for (c = 0; c < num_subbands; c++) {
  ------------------
  |  Branch (555:23): [True: 993k, False: 33.3k]
  ------------------
  556|   993k|            (*e_gain)[n][c] = nrg_gain_pvc[c][start_pos];
  557|   993k|            (*noise_buf)[n][c] = noise_level_pvc[c][start_pos];
  558|   993k|          }
  559|  33.3k|        }
  560|  8.33k|        esbr_start_up_pvc = 0;
  561|  8.33k|        esbr_start_up = 0;
  562|  8.33k|      }
  563|   105k|      for (l = rate * pvc_frame_info->border_vec[i];
  564|  2.35M|           l < rate * pvc_frame_info->border_vec[1 + i]; l++) {
  ------------------
  |  Branch (564:12): [True: 2.24M, False: 105k]
  ------------------
  565|  2.24M|        ptr_real_buf = *(input_real + l) + sub_band_start;
  566|  2.24M|        ptr_imag_buf = *(input_imag + l) + sub_band_start;
  567|       |
  568|  2.24M|        slot_idx = (WORD32)l / rate;
  569|  2.24M|        if (sub_band_start & 1) {
  ------------------
  |  Branch (569:13): [True: 691k, False: 1.55M]
  ------------------
  570|   691k|          freq_inv = -1;
  571|  1.55M|        } else {
  572|  1.55M|          freq_inv = 1;
  573|  1.55M|        }
  574|       |
  575|  65.9M|        for (k = 0; k < num_subbands; k++) {
  ------------------
  |  Branch (575:21): [True: 63.7M, False: 2.24M]
  ------------------
  576|  63.7M|          (*e_gain)[4][k] = nrg_gain_pvc[k][slot_idx];
  577|  63.7M|          (*noise_buf)[4][k] = noise_level_pvc[k][slot_idx];
  578|  63.7M|          c = 0, sb_gain = 0, sb_noise = 0;
  579|   173M|          for (n = 4 - smooth_length; n <= 4; n++) {
  ------------------
  |  Branch (579:39): [True: 109M, False: 63.7M]
  ------------------
  580|   109M|            sb_gain += (*e_gain)[n][k] * smooth_filt[c];
  581|   109M|            sb_noise += (*noise_buf)[n][k] * smooth_filt[c++];
  582|   109M|          }
  583|  63.7M|          phase_index = (phase_index + 1) & 511;
  584|  63.7M|          sb_noise = (nrg_tone_pvc[k][slot_idx] != 0 || noise_absc_flag)
  ------------------
  |  Branch (584:23): [True: 1.32M, False: 62.4M]
  |  Branch (584:57): [True: 98.7k, False: 62.3M]
  ------------------
  585|  63.7M|                         ? 0
  586|  63.7M|                         : sb_noise;
  587|       |
  588|  63.7M|          *ptr_real_buf =
  589|  63.7M|              *ptr_real_buf * sb_gain +
  590|  63.7M|              sb_noise * ixheaac_random_phase[phase_index][0] +
  591|  63.7M|              nrg_tone_pvc[k][slot_idx] * ixheaac_hphase_tbl[0][harm_index];
  592|  63.7M|          *ptr_imag_buf = *ptr_imag_buf * sb_gain +
  593|  63.7M|                          sb_noise * ixheaac_random_phase[phase_index][1] +
  594|  63.7M|                          nrg_tone_pvc[k][slot_idx] * freq_inv *
  595|  63.7M|                              ixheaac_hphase_tbl[1][harm_index];
  596|       |
  597|  63.7M|          ptr_real_buf++;
  598|  63.7M|          ptr_imag_buf++;
  599|  63.7M|          freq_inv = -freq_inv;
  600|  63.7M|        }
  601|       |
  602|  2.24M|        harm_index = (harm_index + 1) & 3;
  603|       |
  604|  2.24M|        memcpy(temp, (*e_gain)[0], 64 * sizeof(FLOAT32));
  605|  11.2M|        for (n = 0; n < 4; n++) {
  ------------------
  |  Branch (605:21): [True: 8.98M, False: 2.24M]
  ------------------
  606|  8.98M|          memcpy((*e_gain)[n], (*e_gain)[n + 1], 64 * sizeof(FLOAT32));
  607|  8.98M|        }
  608|  2.24M|        memcpy((*e_gain)[4], temp, 64 * sizeof(FLOAT32));
  609|       |
  610|  2.24M|        memcpy(temp, (*noise_buf)[0], 64 * sizeof(FLOAT32));
  611|  11.2M|        for (n = 0; n < 4; n++) {
  ------------------
  |  Branch (611:21): [True: 8.98M, False: 2.24M]
  ------------------
  612|  8.98M|          memcpy((*noise_buf)[n], (*noise_buf)[n + 1], 64 * sizeof(FLOAT32));
  613|  8.98M|        }
  614|  2.24M|        memcpy((*noise_buf)[4], temp, 64 * sizeof(FLOAT32));
  615|  2.24M|      }
  616|   105k|    }
  617|   169k|  } else {
  618|  2.39M|    for (i = 0; i < num_sf_bands[HIGH]; i++) {
  ------------------
  |  |   28|  2.39M|#define HIGH 1
  ------------------
  |  Branch (618:17): [True: 2.22M, False: 169k]
  ------------------
  619|  2.22M|      li =
  620|  2.22M|          frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_hi[i];
  621|  2.22M|      ui = frame_data->pstr_sbr_header->pstr_freq_band_data
  622|  2.22M|               ->freq_band_tbl_hi[i + 1];
  623|  2.22M|      tmp = ((ui + li) - (sub_band_start << 1)) >> 1;
  624|  2.22M|      if ((tmp >= 64) || (tmp < 0)) return -1;
  ------------------
  |  Branch (624:11): [True: 0, False: 2.22M]
  |  Branch (624:26): [True: 0, False: 2.22M]
  ------------------
  625|       |
  626|  2.22M|      harmonics[tmp] = add_harmonics[i];
  627|  2.22M|    }
  628|       |
  629|   496k|    for (i = 0; i < bs_num_env; i++) {
  ------------------
  |  Branch (629:17): [True: 327k, False: 169k]
  ------------------
  630|   327k|      if (kk > MAX_NOISE_ENVELOPES) {
  ------------------
  |  |   44|   327k|#define MAX_NOISE_ENVELOPES 2
  ------------------
  |  Branch (630:11): [True: 10, False: 327k]
  ------------------
  631|     10|        if (ec_flag)
  ------------------
  |  Branch (631:13): [True: 0, False: 10]
  ------------------
  632|      0|          kk = MAX_NOISE_ENVELOPES;
  ------------------
  |  |   44|      0|#define MAX_NOISE_ENVELOPES 2
  ------------------
  633|     10|        else
  634|     10|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|     10|#define IA_FATAL_ERROR 0x80000000
  ------------------
  635|     10|      }
  636|       |
  637|   327k|      if (p_frame_info->border_vec[i] == p_frame_info->noise_border_vec[kk])
  ------------------
  |  Branch (637:11): [True: 246k, False: 81.0k]
  ------------------
  638|   246k|        kk++, next++;
  639|       |
  640|   327k|      noise_absc_flag =
  641|   327k|          (i == trans_env || i == frame_data->env_short_flag_prev) ? 1 : 0;
  ------------------
  |  Branch (641:12): [True: 27.1k, False: 300k]
  |  Branch (641:30): [True: 11.6k, False: 288k]
  ------------------
  642|       |
  643|   327k|      smooth_length = (noise_absc_flag ? 0 : smoothing_length);
  ------------------
  |  Branch (643:24): [True: 38.7k, False: 288k]
  ------------------
  644|   327k|      smooth_filt = *ixheaac_fir_table[smooth_length];
  645|       |
  646|   327k|      if (sbr_mode == ORIG_SBR) {
  ------------------
  |  Branch (646:11): [True: 327k, False: 187]
  ------------------
  647|  3.13M|        for (c = 0, o = 0, j = 0; j < num_sf_bands[p_frame_info->freq_res[i]];
  ------------------
  |  Branch (647:35): [True: 2.80M, False: 327k]
  ------------------
  648|  2.80M|             j++) {
  649|  2.80M|          double tmp;
  650|  2.80M|          li = freq_band_table[p_frame_info->freq_res[i]][j];
  651|  2.80M|          ui = freq_band_table[p_frame_info->freq_res[i]][j + 1];
  652|  2.80M|          ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  653|  2.80M|                    ->freq_band_tbl_noise[o + 1];
  654|       |
  655|  2.80M|          if (p_frame_info->border_vec[i] >= p_frame_info->border_vec[i + 1]) {
  ------------------
  |  Branch (655:15): [True: 42.6k, False: 2.76M]
  ------------------
  656|   149k|            for (flag = 0, k = li; k < ui; k++) {
  ------------------
  |  Branch (656:36): [True: 106k, False: 42.6k]
  ------------------
  657|   106k|              flag = (harmonics[c] &&
  ------------------
  |  Branch (657:23): [True: 1.12k, False: 105k]
  ------------------
  658|  1.12k|                (i >= trans_env || (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (658:18): [True: 954, False: 170]
  |  Branch (658:36): [True: 54, False: 116]
  ------------------
  659|   106k|                ? 1
  660|   106k|                : flag;
  661|   106k|              nrg_est[c++] = 0;
  662|   106k|            }
  663|  2.76M|          } else {
  664|  9.32M|            for (flag = 0, k = li; k < ui; k++) {
  ------------------
  |  Branch (664:36): [True: 6.56M, False: 2.76M]
  ------------------
  665|  6.56M|              for (nrg = 0, l = rate * p_frame_info->border_vec[i];
  666|   136M|                l < rate * p_frame_info->border_vec[i + 1]; l++) {
  ------------------
  |  Branch (666:17): [True: 129M, False: 6.56M]
  ------------------
  667|   129M|                nrg += (input_real[l][k] * input_real[l][k]) +
  668|   129M|                  (input_imag[l][k] * input_imag[l][k]);
  669|   129M|              }
  670|  6.56M|              flag = (harmonics[c] &&
  ------------------
  |  Branch (670:23): [True: 489k, False: 6.07M]
  ------------------
  671|   489k|                (i >= trans_env || (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (671:18): [True: 368k, False: 121k]
  |  Branch (671:36): [True: 74.3k, False: 47.0k]
  ------------------
  672|  6.56M|                ? 1
  673|  6.56M|                : flag;
  674|  6.56M|              nrg_est[c++] = nrg / (rate * p_frame_info->border_vec[i + 1] -
  675|  6.56M|                rate * p_frame_info->border_vec[i]);
  676|  6.56M|            }
  677|  2.76M|          }
  678|  2.80M|          if (!int_mode && ui != li) {
  ------------------
  |  Branch (678:15): [True: 136k, False: 2.67M]
  |  Branch (678:28): [True: 136k, False: 208]
  ------------------
  679|   567k|            for (nrg = 0, k = c - (ui - li); k < c; k++) {
  ------------------
  |  Branch (679:46): [True: 430k, False: 136k]
  ------------------
  680|   430k|              nrg += nrg_est[k];
  681|   430k|            }
  682|   136k|            nrg /= (ui - li);
  683|  2.67M|          } else {
  684|  2.67M|            nrg = 0;
  685|  2.67M|          }
  686|  2.80M|          c -= (ui - li);
  687|       |
  688|  9.47M|          for (k = 0; k < ui - li; k++) {
  ------------------
  |  Branch (688:23): [True: 6.66M, False: 2.80M]
  ------------------
  689|  6.66M|            o = (k + li >= ui2) ? o + 1 : o;
  ------------------
  |  Branch (689:17): [True: 344k, False: 6.32M]
  ------------------
  690|  6.66M|            if (o >= MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|  6.66M|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (690:17): [True: 0, False: 6.66M]
  ------------------
  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.66M|            ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  697|  6.66M|                      ->freq_band_tbl_noise[o + 1];
  698|  6.66M|            nrg_ref[c] = sfb_nrg[m];
  699|  6.66M|            nrg_est[c] = (!int_mode) ? nrg : nrg_est[c];
  ------------------
  |  Branch (699:26): [True: 430k, False: 6.23M]
  ------------------
  700|  6.66M|            nrg_tone[c] = 0;
  701|  6.66M|            tmp = noise_floor[next * num_nf_bands + o] /
  702|  6.66M|                  (1 + noise_floor[next * num_nf_bands + o] + guard);
  703|  6.66M|            if (flag) {
  ------------------
  |  Branch (703:17): [True: 858k, False: 5.81M]
  ------------------
  704|   858k|              nrg_gain[c] = (FLOAT32)sqrt(nrg_ref[c] * tmp / (nrg_est[c] + 1));
  705|   858k|              nrg_tone[c] = (FLOAT32)(
  706|   858k|                  (harmonics[c] &&
  ------------------
  |  Branch (706:20): [True: 444k, False: 413k]
  ------------------
  707|   444k|                   (i >= trans_env || (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (707:21): [True: 368k, False: 75.9k]
  |  Branch (707:39): [True: 74.3k, False: 1.56k]
  ------------------
  708|   858k|                      ? sqrt(nrg_ref[c] * tmp /
  709|   443k|                             ABS(noise_floor[next * num_nf_bands + o] + guard))
  ------------------
  |  |   46|   443k|#define ABS(A) fabs(A)
  ------------------
  710|   858k|                      : nrg_tone[c]);
  711|  5.81M|            } else {
  712|  5.81M|              if (noise_absc_flag)
  ------------------
  |  Branch (712:19): [True: 486k, False: 5.32M]
  ------------------
  713|   486k|                nrg_gain[c] = (FLOAT32)sqrt(nrg_ref[c] / (nrg_est[c] + 1));
  714|  5.32M|              else
  715|  5.32M|                nrg_gain[c] = (FLOAT32)sqrt(
  716|  5.32M|                    nrg_ref[c] * tmp /
  717|  5.32M|                    ((nrg_est[c] + 1) *
  718|  5.32M|                     ABS(noise_floor[next * num_nf_bands + o] + guard)));
  ------------------
  |  |   46|  5.32M|#define ABS(A) fabs(A)
  ------------------
  719|  5.81M|            }
  720|  6.66M|            noise_level[c] = (FLOAT32)sqrt(nrg_ref[c] * tmp);
  721|  6.66M|            c++;
  722|  6.66M|          }
  723|  2.80M|          m++;
  724|  2.80M|        }
  725|       |
  726|  1.25M|        for (c = 0; c < (*gate_mode)[limiter_band]; c++) {
  ------------------
  |  Branch (726:21): [True: 928k, False: 327k]
  ------------------
  727|   928k|          p_ref = p_est = 0;
  728|   928k|          for (k = (*lim_table)[limiter_band][c];
  729|  7.59M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (729:16): [True: 6.66M, False: 928k]
  ------------------
  730|  6.66M|            p_ref += nrg_ref[k];
  731|  6.66M|            p_est += nrg_est[k];
  732|  6.66M|          }
  733|   928k|          avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|   928k|#define EPS 1e-12f
  ------------------
                        avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|   928k|#define EPS 1e-12f
  ------------------
  734|   928k|          g_max = avg_gain * ixheaac_g_lim_gains[limiter_gains];
  735|   928k|          g_max > 1.0e5f ? g_max = 1.0e5f : 0;
  ------------------
  |  Branch (735:11): [True: 306k, False: 621k]
  ------------------
  736|   928k|          for (k = (*lim_table)[limiter_band][c];
  737|  7.59M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (737:16): [True: 6.66M, False: 928k]
  ------------------
  738|  6.66M|            if (g_max <= nrg_gain[k]) {
  ------------------
  |  Branch (738:17): [True: 888k, False: 5.78M]
  ------------------
  739|   888k|              noise_level[k] = (FLOAT32)(noise_level[k] * (g_max / (nrg_gain[k] + guard)));
  740|   888k|              nrg_gain[k] = g_max;
  741|   888k|            }
  742|  6.66M|          }
  743|   928k|          p_adj = 0;
  744|   928k|          for (k = (*lim_table)[limiter_band][c];
  745|  7.59M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (745:16): [True: 6.66M, False: 928k]
  ------------------
  746|  6.66M|            p_adj += nrg_gain[k] * nrg_gain[k] * nrg_est[k];
  747|  6.66M|            if (nrg_tone[k])
  ------------------
  |  Branch (747:17): [True: 404k, False: 6.26M]
  ------------------
  748|   404k|              p_adj += nrg_tone[k] * nrg_tone[k];
  749|  6.26M|            else if (!noise_absc_flag)
  ------------------
  |  Branch (749:22): [True: 5.67M, False: 585k]
  ------------------
  750|  5.67M|              p_adj += noise_level[k] * noise_level[k];
  751|  6.66M|          }
  752|   928k|          boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|   928k|#define EPS 1e-12f
  ------------------
                        boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|   928k|#define EPS 1e-12f
  ------------------
  753|   928k|          boost_gain = boost_gain > 1.584893192f ? 1.584893192f : boost_gain;
  ------------------
  |  Branch (753:24): [True: 183k, False: 744k]
  ------------------
  754|   928k|          for (k = (*lim_table)[limiter_band][c];
  755|  7.59M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (755:16): [True: 6.66M, False: 928k]
  ------------------
  756|  6.66M|            nrg_gain[k] *= boost_gain;
  757|  6.66M|            noise_level[k] *= boost_gain;
  758|  6.66M|            nrg_tone[k] *= boost_gain;
  759|  6.66M|          }
  760|   928k|        }
  761|       |
  762|   327k|        if (esbr_start_up && (ldmps_present != 1)) {
  ------------------
  |  Branch (762:13): [True: 37.3k, False: 289k]
  |  Branch (762:30): [True: 32.6k, False: 4.66k]
  ------------------
  763|   163k|          for (n = 0; n < 4; n++) {
  ------------------
  |  Branch (763:23): [True: 130k, False: 32.6k]
  ------------------
  764|   130k|            memcpy((*e_gain)[n], nrg_gain, num_subbands * sizeof(FLOAT32));
  765|   130k|            memcpy((*noise_buf)[n], noise_level,
  766|   130k|                   num_subbands * sizeof(FLOAT32));
  767|   130k|          }
  768|  32.6k|          esbr_start_up = 0;
  769|  32.6k|          esbr_start_up_pvc = 0;
  770|  32.6k|        }
  771|       |
  772|   327k|        for (l = rate * p_frame_info->border_vec[i];
  773|  6.15M|             l < rate * p_frame_info->border_vec[i + 1]; l++) {
  ------------------
  |  Branch (773:14): [True: 5.82M, False: 327k]
  ------------------
  774|  5.82M|          ptr_real_buf = *(input_real + l) + sub_band_start;
  775|  5.82M|          ptr_imag_buf = *(input_imag + l) + sub_band_start;
  776|       |
  777|  5.82M|          freq_inv = 1;
  778|  5.82M|          if ((ldmps_present == 1) && (sub_band_start & 1)) freq_inv = -1;
  ------------------
  |  Branch (778:15): [True: 66.5k, False: 5.76M]
  |  Branch (778:39): [True: 39.9k, False: 26.6k]
  ------------------
  779|       |
  780|   135M|          for (k = 0; k < num_subbands; k++) {
  ------------------
  |  Branch (780:23): [True: 129M, False: 5.82M]
  ------------------
  781|   129M|            (*e_gain)[4][k] = nrg_gain[k];
  782|   129M|            (*noise_buf)[4][k] = noise_level[k];
  783|   129M|            c = 0, sb_gain = 0, sb_noise = 0;
  784|   295M|            for (n = 4 - smooth_length; n <= 4; n++) {
  ------------------
  |  Branch (784:41): [True: 165M, False: 129M]
  ------------------
  785|   165M|              sb_gain += (*e_gain)[n][k] * smooth_filt[c];
  786|   165M|              sb_noise += (*noise_buf)[n][k] * smooth_filt[c++];
  787|   165M|            }
  788|       |
  789|   129M|            phase_index = (phase_index + 1) & 511;
  790|   129M|            sb_noise = (nrg_tone[k] != 0 || noise_absc_flag) ? 0 : sb_noise;
  ------------------
  |  Branch (790:25): [True: 29.7M, False: 100M]
  |  Branch (790:45): [True: 9.09M, False: 90.9M]
  ------------------
  791|       |
  792|   129M|            if (ldmps_present == 1) {
  ------------------
  |  Branch (792:17): [True: 1.79M, False: 128M]
  ------------------
  793|  1.79M|              *ptr_real_buf = *ptr_real_buf * sb_gain +
  794|  1.79M|                              sb_noise * ixheaac_random_phase[phase_index][0] +
  795|  1.79M|                              nrg_tone[k] * ixheaac_hphase_tbl[0][harm_index];
  796|  1.79M|              *ptr_imag_buf =
  797|  1.79M|                  *ptr_imag_buf * sb_gain +
  798|  1.79M|                  sb_noise * ixheaac_random_phase[phase_index][1] +
  799|  1.79M|                  nrg_tone[k] * freq_inv * ixheaac_hphase_tbl[1][harm_index];
  800|       |
  801|  1.79M|              freq_inv = -freq_inv;
  802|   128M|            } else {
  803|   128M|                *ptr_real_buf = *ptr_real_buf * sb_gain +
  804|   128M|                            sb_noise * ixheaac_random_phase[phase_index][0];
  805|   128M|                *ptr_imag_buf = *ptr_imag_buf * sb_gain +
  806|   128M|                            sb_noise * ixheaac_random_phase[phase_index][1];
  807|   128M|            }
  808|       |
  809|   129M|            ptr_real_buf++;
  810|   129M|            ptr_imag_buf++;
  811|   129M|          }
  812|  5.82M|          if (ldmps_present == 1) harm_index = (harm_index + 1) & 3;
  ------------------
  |  Branch (812:15): [True: 66.5k, False: 5.76M]
  ------------------
  813|       |
  814|  5.82M|          memcpy(temp, (*e_gain)[0], 64 * sizeof(FLOAT32));
  815|  29.1M|          for (n = 0; n < 4; n++)
  ------------------
  |  Branch (815:23): [True: 23.3M, False: 5.82M]
  ------------------
  816|  23.3M|            memcpy((*e_gain)[n], (*e_gain)[n + 1], 64 * sizeof(FLOAT32));
  817|  5.82M|          memcpy((*e_gain)[4], temp, 64 * sizeof(FLOAT32));
  818|  5.82M|          memcpy(temp, (*noise_buf)[0], 64 * sizeof(FLOAT32));
  819|  29.1M|          for (n = 0; n < 4; n++)
  ------------------
  |  Branch (819:23): [True: 23.3M, False: 5.82M]
  ------------------
  820|  23.3M|            memcpy((*noise_buf)[n], (*noise_buf)[n + 1], 64 * sizeof(FLOAT32));
  821|  5.82M|          memcpy((*noise_buf)[4], temp, 64 * sizeof(FLOAT32));
  822|  5.82M|        }
  823|       |
  824|   327k|        if (ldmps_present != 1) {
  ------------------
  |  Branch (824:13): [True: 322k, False: 4.66k]
  ------------------
  825|   322k|          err_code = ixheaacd_apply_inter_tes(
  826|   322k|              *(input_real1 + rate * p_frame_info->border_vec[i]),
  827|   322k|              *(input_imag1 + rate * p_frame_info->border_vec[i]),
  828|   322k|              *(input_real + rate * p_frame_info->border_vec[i]),
  829|   322k|              *(input_imag + rate * p_frame_info->border_vec[i]),
  830|   322k|              rate * p_frame_info->border_vec[i + 1] - rate * p_frame_info->border_vec[i],
  831|   322k|              sub_band_start, num_subbands, frame_data->inter_temp_shape_mode[i]);
  832|   322k|          if (err_code != 0) {
  ------------------
  |  Branch (832:15): [True: 0, False: 322k]
  ------------------
  833|      0|            return err_code;
  834|      0|          }
  835|       |
  836|   322k|        for (l = rate * p_frame_info->border_vec[i];
  837|  6.08M|             l < rate * p_frame_info->border_vec[i + 1]; l++) {
  ------------------
  |  Branch (837:14): [True: 5.76M, False: 322k]
  ------------------
  838|  5.76M|          ptr_real_buf = *(input_real + l) + sub_band_start;
  839|  5.76M|          ptr_imag_buf = *(input_imag + l) + sub_band_start;
  840|  5.76M|          if (sub_band_start & 1) {
  ------------------
  |  Branch (840:15): [True: 2.63M, False: 3.12M]
  ------------------
  841|  2.63M|            freq_inv = -1;
  842|  3.12M|          } else {
  843|  3.12M|            freq_inv = 1;
  844|  3.12M|          }
  845|   133M|          for (k = 0; k < num_subbands; k++) {
  ------------------
  |  Branch (845:23): [True: 128M, False: 5.76M]
  ------------------
  846|   128M|            *ptr_real_buf += nrg_tone[k] * ixheaac_hphase_tbl[0][harm_index];
  847|   128M|            *ptr_imag_buf +=
  848|   128M|                nrg_tone[k] * freq_inv * ixheaac_hphase_tbl[1][harm_index];
  849|       |
  850|   128M|            ptr_real_buf++;
  851|   128M|            ptr_imag_buf++;
  852|   128M|            freq_inv = -freq_inv;
  853|   128M|          }
  854|  5.76M|          harm_index = (harm_index + 1) & 3;
  855|  5.76M|        }
  856|   322k|      }
  857|   327k|    }
  858|   327k|  }
  859|   169k|}
  860|       |
  861|  15.1M|  for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (861:15): [True: 14.9M, False: 233k]
  ------------------
  862|  14.9M|    (*harm_flag_varlen_prev)[i] = (*harm_flag_prev)[i];
  863|  14.9M|    (*harm_flag_varlen)[i] = harmonics[i];
  864|  14.9M|  }
  865|       |
  866|   233k|  memcpy(&((*harm_flag_prev)[0]) + sub_band_start, harmonics,
  867|   233k|         (64 - sub_band_start) * sizeof(WORD8));
  868|       |
  869|   233k|  if (trans_env == bs_num_env) {
  ------------------
  |  Branch (869:7): [True: 8.06k, False: 225k]
  ------------------
  870|  8.06k|    frame_data->env_short_flag_prev = 0;
  871|   225k|  } else {
  872|   225k|    frame_data->env_short_flag_prev = -1;
  873|   225k|  }
  874|       |
  875|   233k|  if (ldmps_present != 1) {
  ------------------
  |  Branch (875:7): [True: 229k, False: 4.22k]
  ------------------
  876|   229k|  memcpy((VOID *)&frame_data->str_frame_info_prev,
  877|   229k|         (VOID *)&frame_data->str_frame_info_details,
  878|   229k|         sizeof(ia_frame_info_struct));
  879|       |
  880|   229k|  if (frame_data->str_frame_info_details.num_env == 1) {
  ------------------
  |  Branch (880:7): [True: 110k, False: 118k]
  ------------------
  881|   110k|    frame_data->var_len_id_prev = 0;
  882|   118k|  } else if (frame_data->str_frame_info_details.num_env == 2) {
  ------------------
  |  Branch (882:14): [True: 67.7k, False: 50.5k]
  ------------------
  883|  67.7k|    frame_data->var_len_id_prev = 1;
  884|  67.7k|  }
  885|       |
  886|   229k|  if ((frame_data->str_frame_info_details.num_noise_env < 1) ||
  ------------------
  |  Branch (886:7): [True: 0, False: 229k]
  ------------------
  887|   229k|        (frame_data->str_frame_info_details.num_noise_env > 2)) {
  ------------------
  |  Branch (887:9): [True: 0, False: 229k]
  ------------------
  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|   826k|  for (i = 0; i < num_nf_bands; i++) {
  ------------------
  |  Branch (894:15): [True: 596k, False: 229k]
  ------------------
  895|   596k|    prev_env_noise_level[i] =
  896|   596k|        frame_data->flt_noise_floor
  897|   596k|            [(frame_data->str_frame_info_details.num_noise_env - 1) *
  898|   596k|                 num_nf_bands +
  899|   596k|             i];
  900|   596k|  }
  901|   229k|}
  902|       |
  903|   233k|  frame_data->harm_index = harm_index;
  904|   233k|  frame_data->phase_index = phase_index;
  905|   233k|  frame_data->pstr_sbr_header->esbr_start_up = esbr_start_up;
  906|   233k|  frame_data->pstr_sbr_header->esbr_start_up_pvc = esbr_start_up_pvc;
  907|   233k|  return 0;
  908|   233k|}
ixheaacd_createlimiterbands:
  915|  82.0k|                                         WORD32 ec_flag) {
  916|  82.0k|  WORD32 i, j, k, is_patch_border[2];
  917|  82.0k|  WORD32 patch_borders[MAX_NUM_PATCHES + 1];
  918|  82.0k|  WORD32 temp_limiter_band_calc[32 + MAX_NUM_PATCHES + 1];
  919|       |
  920|  82.0k|  double num_octave;
  921|  82.0k|  WORD32 num_patches;
  922|       |
  923|  82.0k|  WORD32 sub_band_start = freq_band_tbl[0];
  924|  82.0k|  WORD32 sub_band_end = freq_band_tbl[ixheaacd_num_bands];
  925|       |
  926|  82.0k|  const double log2 = log(2.0);
  927|  82.0k|  const double limbnd_per_oct[4] = {0, 1.2, 2.0, 3.0};
  928|       |
  929|  82.0k|  if (!b_patching_mode && (x_over_qmf != NULL)) {
  ------------------
  |  Branch (929:7): [True: 45.5k, False: 36.5k]
  |  Branch (929:27): [True: 28.8k, False: 16.6k]
  ------------------
  930|  28.8k|    num_patches = 0;
  931|  28.8k|    if (upsamp_4_flag) {
  ------------------
  |  Branch (931:9): [True: 5.04k, False: 23.8k]
  ------------------
  932|  30.2k|      for (i = 1; i < MAX_NUM_PATCHES; i++)
  ------------------
  |  |   23|  30.2k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (932:19): [True: 25.2k, False: 5.04k]
  ------------------
  933|  25.2k|        if (x_over_qmf[i] != 0) num_patches++;
  ------------------
  |  Branch (933:13): [True: 8.76k, False: 16.4k]
  ------------------
  934|  23.8k|    } else {
  935|  95.3k|      for (i = 1; i < 4; i++)
  ------------------
  |  Branch (935:19): [True: 71.5k, False: 23.8k]
  ------------------
  936|  71.5k|        if (x_over_qmf[i] != 0) num_patches++;
  ------------------
  |  Branch (936:13): [True: 59.4k, False: 12.0k]
  ------------------
  937|  23.8k|    }
  938|  97.1k|    for (i = 0; i < num_patches; i++) {
  ------------------
  |  Branch (938:17): [True: 68.2k, False: 28.8k]
  ------------------
  939|  68.2k|      patch_borders[i] = x_over_qmf[i] - sub_band_start;
  940|  68.2k|    }
  941|  53.1k|  } else {
  942|  53.1k|    num_patches = patch_param->num_patches;
  943|   202k|    for (i = 0; i < num_patches; i++) {
  ------------------
  |  Branch (943:17): [True: 149k, False: 53.1k]
  ------------------
  944|   149k|      patch_borders[i] = patch_param->start_subband[i] - sub_band_start;
  945|   149k|    }
  946|  53.1k|  }
  947|  82.0k|  patch_borders[i] = sub_band_end - sub_band_start;
  948|       |
  949|  82.0k|  lim_table[0][0] = freq_band_tbl[0] - sub_band_start;
  950|  82.0k|  lim_table[0][1] = freq_band_tbl[ixheaacd_num_bands] - sub_band_start;
  951|  82.0k|  gate_mode[0] = 1;
  952|       |
  953|   328k|  for (i = 1; i < 4; i++) {
  ------------------
  |  Branch (953:15): [True: 246k, False: 82.0k]
  ------------------
  954|  2.21M|    for (k = 0; k <= ixheaacd_num_bands; k++) {
  ------------------
  |  Branch (954:17): [True: 1.96M, False: 246k]
  ------------------
  955|  1.96M|      temp_limiter_band_calc[k] = freq_band_tbl[k] - sub_band_start;
  956|  1.96M|    }
  957|       |
  958|   653k|    for (k = 1; k < num_patches; k++) {
  ------------------
  |  Branch (958:17): [True: 407k, False: 246k]
  ------------------
  959|   407k|      temp_limiter_band_calc[ixheaacd_num_bands + k] = patch_borders[k];
  960|   407k|    }
  961|       |
  962|   246k|    gate_mode[i] = ixheaacd_num_bands + num_patches - 1;
  963|   246k|    ixheaacd_shellsort(temp_limiter_band_calc, gate_mode[i] + 1);
  964|       |
  965|  2.37M|    for (j = 1; j <= gate_mode[i]; j++) {
  ------------------
  |  Branch (965:17): [True: 2.12M, False: 246k]
  ------------------
  966|  2.12M|      num_octave = log((double)(temp_limiter_band_calc[j] + sub_band_start) /
  967|  2.12M|                       (temp_limiter_band_calc[j - 1] + sub_band_start)) /
  968|  2.12M|                   log2;
  969|       |
  970|  2.12M|      if (num_octave * limbnd_per_oct[i] < 0.49) {
  ------------------
  |  Branch (970:11): [True: 1.26M, False: 860k]
  ------------------
  971|  1.26M|        if (temp_limiter_band_calc[j] == temp_limiter_band_calc[j - 1]) {
  ------------------
  |  Branch (971:13): [True: 255k, False: 1.01M]
  ------------------
  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|  1.01M|        is_patch_border[0] = is_patch_border[1] = 0;
  980|       |
  981|  3.10M|        for (k = 0; k <= num_patches; k++) {
  ------------------
  |  Branch (981:21): [True: 2.67M, False: 431k]
  ------------------
  982|  2.67M|          if (temp_limiter_band_calc[j - 1] == patch_borders[k]) {
  ------------------
  |  Branch (982:15): [True: 582k, False: 2.08M]
  ------------------
  983|   582k|            is_patch_border[0] = 1;
  984|   582k|            break;
  985|   582k|          }
  986|  2.67M|        }
  987|       |
  988|  4.26M|        for (k = 0; k <= num_patches; k++) {
  ------------------
  |  Branch (988:21): [True: 3.53M, False: 724k]
  ------------------
  989|  3.53M|          if (temp_limiter_band_calc[j] == patch_borders[k]) {
  ------------------
  |  Branch (989:15): [True: 289k, False: 3.24M]
  ------------------
  990|   289k|            is_patch_border[1] = 1;
  991|   289k|            break;
  992|   289k|          }
  993|  3.53M|        }
  994|       |
  995|  1.01M|        if (!is_patch_border[1]) {
  ------------------
  |  Branch (995:13): [True: 724k, False: 289k]
  ------------------
  996|   724k|          temp_limiter_band_calc[j] = sub_band_end;
  997|   724k|          ixheaacd_shellsort(temp_limiter_band_calc, gate_mode[i] + 1);
  998|   724k|          gate_mode[i]--;
  999|   724k|          j--;
 1000|   724k|        } else if (!is_patch_border[0]) {
  ------------------
  |  Branch (1000:20): [True: 175k, False: 113k]
  ------------------
 1001|   175k|          temp_limiter_band_calc[j - 1] = sub_band_end;
 1002|   175k|          ixheaacd_shellsort(temp_limiter_band_calc, gate_mode[i] + 1);
 1003|   175k|          gate_mode[i]--;
 1004|   175k|          j--;
 1005|   175k|        }
 1006|  1.01M|      }
 1007|  2.12M|    }
 1008|   246k|    if (gate_mode[i] > 12) {
  ------------------
  |  Branch (1008:9): [True: 0, False: 246k]
  ------------------
 1009|      0|      if (ec_flag)
  ------------------
  |  Branch (1009:11): [True: 0, False: 0]
  ------------------
 1010|      0|        gate_mode[i] = 12;
 1011|      0|      else
 1012|      0|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1013|      0|    }
 1014|  1.46M|    for (k = 0; k <= gate_mode[i]; k++) {
  ------------------
  |  Branch (1014:17): [True: 1.22M, False: 246k]
  ------------------
 1015|  1.22M|      lim_table[i][k] = temp_limiter_band_calc[k];
 1016|  1.22M|    }
 1017|   246k|  }
 1018|  82.0k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  82.0k|#define IA_NO_ERROR 0x00000000
  ------------------
 1019|  82.0k|}
ixheaacd_apply_inter_tes:
 1024|   322k|                                WORD32 num_subband, WORD32 gamma_idx) {
 1025|   322k|  WORD32 sub_band_end = sub_band_start + num_subband;
 1026|   322k|  FLOAT32 subsample_power_high[TIMESLOT_BUFFER_SIZE],
 1027|   322k|      subsample_power_low[TIMESLOT_BUFFER_SIZE];
 1028|   322k|  FLOAT32 total_power_high = 0.0f;
 1029|   322k|  FLOAT32 total_power_low = 0.0f, total_power_high_after = 1.0e-6f;
 1030|   322k|  FLOAT32 gain[TIMESLOT_BUFFER_SIZE];
 1031|   322k|  FLOAT32 gain_adj, gain_adj_2;
 1032|   322k|  FLOAT32 gamma = ixheaac_q_gamma_table[gamma_idx];
 1033|   322k|  WORD32 i, j;
 1034|       |
 1035|   322k|  if (num_sample > TIMESLOT_BUFFER_SIZE)
  ------------------
  |  |   95|   322k|#define TIMESLOT_BUFFER_SIZE 78
  ------------------
  |  Branch (1035:7): [True: 0, False: 322k]
  ------------------
 1036|      0|  {
 1037|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1038|      0|  }
 1039|   322k|  if (gamma > 0) {
  ------------------
  |  Branch (1039:7): [True: 8.17k, False: 314k]
  ------------------
 1040|   151k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1040:17): [True: 142k, False: 8.17k]
  ------------------
 1041|   142k|      memcpy(&qmf_real[64 * i], &qmf_real1[64 * i],
 1042|   142k|             sub_band_start * sizeof(FLOAT32));
 1043|   142k|      memcpy(&qmf_imag[64 * i], &qmf_imag1[64 * i],
 1044|   142k|             sub_band_start * sizeof(FLOAT32));
 1045|   142k|    }
 1046|       |
 1047|   151k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1047:17): [True: 142k, False: 8.17k]
  ------------------
 1048|   142k|      subsample_power_low[i] = 0.0f;
 1049|  2.84M|      for (j = 0; j < sub_band_start; j++) {
  ------------------
  |  Branch (1049:19): [True: 2.70M, False: 142k]
  ------------------
 1050|  2.70M|        subsample_power_low[i] += qmf_real[64 * i + j] * qmf_real[64 * i + j];
 1051|  2.70M|        subsample_power_low[i] += qmf_imag[64 * i + j] * qmf_imag[64 * i + j];
 1052|  2.70M|      }
 1053|   142k|      subsample_power_high[i] = 0.0f;
 1054|  4.35M|      for (j = sub_band_start; j < sub_band_end; j++) {
  ------------------
  |  Branch (1054:32): [True: 4.20M, False: 142k]
  ------------------
 1055|  4.20M|        subsample_power_high[i] += qmf_real[64 * i + j] * qmf_real[64 * i + j];
 1056|  4.20M|        subsample_power_high[i] += qmf_imag[64 * i + j] * qmf_imag[64 * i + j];
 1057|  4.20M|      }
 1058|   142k|      total_power_low += subsample_power_low[i];
 1059|   142k|      total_power_high += subsample_power_high[i];
 1060|   142k|    }
 1061|       |
 1062|   151k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1062:17): [True: 142k, False: 8.17k]
  ------------------
 1063|   142k|      gain[i] = (FLOAT32)(sqrt(subsample_power_low[i] * num_sample /
 1064|   142k|                               (total_power_low + 1.0e-6f)));
 1065|   142k|    }
 1066|       |
 1067|   151k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1067:17): [True: 142k, False: 8.17k]
  ------------------
 1068|   142k|      gain[i] = (FLOAT32)(1.0f + gamma * (gain[i] - 1.0f));
 1069|   142k|    }
 1070|       |
 1071|   151k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1071:17): [True: 142k, False: 8.17k]
  ------------------
 1072|   142k|      if (gain[i] < 0.2f) {
  ------------------
  |  Branch (1072:11): [True: 97.7k, False: 45.1k]
  ------------------
 1073|  97.7k|        gain[i] = 0.2f;
 1074|  97.7k|      }
 1075|       |
 1076|   142k|      subsample_power_high[i] *= gain[i] * gain[i];
 1077|   142k|      total_power_high_after += subsample_power_high[i];
 1078|   142k|    }
 1079|       |
 1080|  8.17k|    gain_adj_2 = total_power_high / total_power_high_after;
 1081|  8.17k|    gain_adj = (FLOAT32)(sqrt(gain_adj_2));
 1082|       |
 1083|   151k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1083:17): [True: 142k, False: 8.17k]
  ------------------
 1084|   142k|      gain[i] *= gain_adj;
 1085|       |
 1086|  4.35M|      for (j = sub_band_start; j < sub_band_end; j++) {
  ------------------
  |  Branch (1086:32): [True: 4.20M, False: 142k]
  ------------------
 1087|  4.20M|        qmf_real[64 * i + j] *= gain[i];
 1088|  4.20M|        qmf_imag[64 * i + j] *= gain[i];
 1089|  4.20M|      }
 1090|   142k|    }
 1091|  8.17k|  }
 1092|   322k|  return 0;
 1093|   322k|}

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

ixheaacd_usac_cplx_save_prev:
  150|  72.4k|                                  WORD32 *r_spec_prev) {
  151|  72.4k|  WORD32 ixheaacd_drc_offset;
  152|       |
  153|  72.4k|  ixheaacd_drc_offset = info->samp_per_bk - info->bins_per_sbk;
  154|       |
  155|  72.4k|  memcpy(l_spec_prev + ixheaacd_drc_offset, l_spec + ixheaacd_drc_offset,
  156|  72.4k|         sizeof(WORD32) * info->bins_per_sbk);
  157|  72.4k|  memcpy(r_spec_prev + ixheaacd_drc_offset, r_spec + ixheaacd_drc_offset,
  158|  72.4k|         sizeof(WORD32) * info->bins_per_sbk);
  159|  72.4k|}
ixheaacd_ms_stereo:
  320|  9.06k|                        WORD32 *l_spec, WORD32 chn, WORD32 nband) {
  321|  9.06k|  WORD32 temp_r, temp_l;
  322|  9.06k|  WORD32 sfb, k, grp, grp_len;
  323|  9.06k|  ia_sfb_info_struct *ptr_sfb_info = usac_data->pstr_sfb_info[chn];
  324|  9.06k|  UWORD8 *ms_used = usac_data->ms_used[chn];
  325|  9.06k|  WORD32 ixheaacd_drc_offset = 0;
  326|       |
  327|  22.3k|  for (grp = 0; grp < ptr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (327:17): [True: 13.2k, False: 9.06k]
  ------------------
  328|  29.8k|    for (grp_len = 0; grp_len < ptr_sfb_info->group_len[grp]; grp_len++) {
  ------------------
  |  Branch (328:23): [True: 16.5k, False: 13.2k]
  ------------------
  329|  16.5k|      ixheaacd_drc_offset = 0;
  330|  84.3k|      for (sfb = 0; sfb < nband; sfb++) {
  ------------------
  |  Branch (330:21): [True: 67.7k, False: 16.5k]
  ------------------
  331|  67.7k|        ixheaacd_drc_offset += ptr_sfb_info->sfb_width[sfb];
  332|  67.7k|        if (ms_used[sfb]) {
  ------------------
  |  Branch (332:13): [True: 52.9k, False: 14.8k]
  ------------------
  333|   692k|          for (k = 0; k < ptr_sfb_info->sfb_width[sfb]; k++) {
  ------------------
  |  Branch (333:23): [True: 639k, False: 52.9k]
  ------------------
  334|   639k|            temp_r = *r_spec;
  335|   639k|            temp_l = *l_spec;
  336|   639k|            *l_spec = ixheaac_add32_sat(temp_r, temp_l);
  337|   639k|            *r_spec = ixheaac_sub32_sat(temp_l, temp_r);
  338|   639k|            r_spec++;
  339|   639k|            l_spec++;
  340|   639k|          }
  341|  52.9k|        } else {
  342|  14.8k|          r_spec += ptr_sfb_info->sfb_width[sfb];
  343|  14.8k|          l_spec += ptr_sfb_info->sfb_width[sfb];
  344|  14.8k|        }
  345|  67.7k|      }
  346|       |
  347|  16.5k|      l_spec = l_spec + ptr_sfb_info->bins_per_sbk - ixheaacd_drc_offset;
  348|  16.5k|      r_spec = r_spec + ptr_sfb_info->bins_per_sbk - ixheaacd_drc_offset;
  349|  16.5k|    }
  350|       |
  351|  13.2k|    ms_used += ptr_sfb_info->sfb_per_sbk;
  352|  13.2k|  }
  353|  9.06k|}
ixheaacd_ics_info:
  601|   204k|{
  602|   204k|  WORD32 win;
  603|   204k|  WORD32 mask = 0x40;
  604|       |
  605|   204k|  UWORD8 *scf_group_ptr = usac_data->group_dis[chn];
  606|       |
  607|   204k|  win = ixheaacd_read_bits_buf(it_bit_buff, 2);
  608|       |
  609|   204k|  win = usac_data->window_sequence[chn] =
  610|   204k|      ixheaacd_win_seq_select(win, window_sequence_last);
  611|   204k|  if (win == -1) return -1;
  ------------------
  |  Branch (611:7): [True: 0, False: 204k]
  ------------------
  612|       |
  613|   204k|  usac_data->pstr_sfb_info[chn] =
  614|   204k|      usac_data->pstr_usac_winmap[usac_data->window_sequence[chn]];
  615|       |
  616|   204k|  usac_data->window_shape[chn] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  617|       |
  618|   204k|  if (usac_data->pstr_usac_winmap[win]->islong) {
  ------------------
  |  Branch (618:7): [True: 145k, False: 59.7k]
  ------------------
  619|   145k|    *max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 6);
  620|   145k|    *scf_group_ptr = 1;
  621|   145k|  } else {
  622|  59.7k|    WORD32 i, scale_factor_grouping;
  623|       |
  624|  59.7k|    *max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 4);
  625|       |
  626|  59.7k|    scale_factor_grouping = ixheaacd_read_bits_buf(it_bit_buff, 7);
  627|       |
  628|   477k|    for (i = 1; i < 8; i++) {
  ------------------
  |  Branch (628:17): [True: 418k, False: 59.7k]
  ------------------
  629|   418k|      if (!(scale_factor_grouping & mask)) *scf_group_ptr++ = i;
  ------------------
  |  Branch (629:11): [True: 277k, False: 141k]
  ------------------
  630|       |
  631|   418k|      mask = mask >> 1;
  632|   418k|    }
  633|  59.7k|    *scf_group_ptr++ = i;
  634|       |
  635|  59.7k|    ixheaacd_calc_grp_offset(usac_data->pstr_usac_winmap[win],
  636|  59.7k|                             &usac_data->group_dis[chn][0]);
  637|  59.7k|  }
  638|       |
  639|   204k|  if (*max_sfb > usac_data->pstr_sfb_info[chn]->sfb_per_sbk) {
  ------------------
  |  Branch (639:7): [True: 272, False: 204k]
  ------------------
  640|    272|    *max_sfb = usac_data->pstr_sfb_info[chn]->sfb_per_sbk;
  641|    272|    return -1;
  642|    272|  }
  643|       |
  644|   204k|  return 0;
  645|   204k|}
ixheaacd_core_coder_data:
  650|   210k|                                WORD32 nr_core_coder_channels) {
  651|   210k|  WORD32 err_code = 0;
  652|   210k|  WORD32 k = 0, ch = 0, chn = 0, left = 0, right = 0;
  653|       |
  654|   210k|  ia_usac_tmp_core_coder_struct str_tmp_core_coder = {0};
  655|   210k|  ia_usac_tmp_core_coder_struct *pstr_core_coder = &str_tmp_core_coder;
  656|   210k|  ia_td_frame_data_struct td_frame;
  657|   210k|  jmp_buf local;
  658|       |
  659|   210k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (659:7): [True: 0, False: 210k]
  ------------------
  660|      0|    err_code = setjmp(local);
  661|      0|    it_bit_buff->xaac_jmp_buf = &local;
  662|      0|  }
  663|   210k|  if (err_code == 0 &&
  ------------------
  |  Branch (663:7): [True: 210k, False: 0]
  ------------------
  664|   210k|      ((usac_data->ec_flag == 0) || (usac_data->frame_ok == 1 && usac_data->ec_flag == 1))) {
  ------------------
  |  Branch (664:8): [True: 210k, False: 0]
  |  Branch (664:38): [True: 0, False: 0]
  |  Branch (664:66): [True: 0, False: 0]
  ------------------
  665|   210k|    memset(&td_frame, 0, sizeof(td_frame));
  666|   210k|    pstr_core_coder->tns_on_lr = 0;
  667|   210k|    pstr_core_coder->pred_dir = 0;
  668|   210k|    if (id != ID_USAC_LFE) {
  ------------------
  |  |   29|   210k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (668:9): [True: 208k, False: 1.60k]
  ------------------
  669|   524k|      for (ch = 0; ch < nr_core_coder_channels; ch++)
  ------------------
  |  Branch (669:20): [True: 315k, False: 208k]
  ------------------
  670|   315k|        pstr_core_coder->core_mode[ch] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  671|   208k|    } else {
  672|  3.21k|      for (ch = 0; ch < nr_core_coder_channels; ch++) pstr_core_coder->core_mode[ch] = 0;
  ------------------
  |  Branch (672:20): [True: 1.60k, False: 1.60k]
  ------------------
  673|  1.60k|    }
  674|       |
  675|   210k|    if (nr_core_coder_channels == 2 && pstr_core_coder->core_mode[0] == 0 &&
  ------------------
  |  Branch (675:9): [True: 107k, False: 102k]
  |  Branch (675:40): [True: 89.4k, False: 18.1k]
  ------------------
  676|  89.4k|        pstr_core_coder->core_mode[1] == 0) {
  ------------------
  |  Branch (676:9): [True: 73.0k, False: 16.4k]
  ------------------
  677|  73.0k|      pstr_core_coder->tns_active = ixheaacd_read_bits_buf(it_bit_buff, 1);
  678|  73.0k|      pstr_core_coder->common_window = ixheaacd_read_bits_buf(it_bit_buff, 1);
  679|       |
  680|  73.0k|      if (pstr_core_coder->common_window) {
  ------------------
  |  Branch (680:11): [True: 35.5k, False: 37.5k]
  ------------------
  681|  35.5k|        left = chan_offset;
  682|  35.5k|        right = chan_offset + 1;
  683|       |
  684|  35.5k|        err_code = ixheaacd_ics_info(usac_data, left, &pstr_core_coder->max_sfb[left],
  685|  35.5k|                                     it_bit_buff, usac_data->window_sequence_last[left]);
  686|       |
  687|  35.5k|        if (err_code == -1) {
  ------------------
  |  Branch (687:13): [True: 17, False: 35.4k]
  ------------------
  688|     17|          if (usac_data->ec_flag) {
  ------------------
  |  Branch (688:15): [True: 0, False: 17]
  ------------------
  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|     17|          } else {
  694|     17|            return err_code;
  695|     17|          }
  696|     17|        }
  697|       |
  698|  35.4k|        pstr_core_coder->common_max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 1);
  699|       |
  700|  35.4k|        if (pstr_core_coder->common_max_sfb == 0) {
  ------------------
  |  Branch (700:13): [True: 11.6k, False: 23.8k]
  ------------------
  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.64k, False: 1.96k]
  ------------------
  702|  9.64k|            pstr_core_coder->max_sfb[right] = ixheaacd_read_bits_buf(it_bit_buff, 4);
  703|  1.96k|          else
  704|  1.96k|            pstr_core_coder->max_sfb[right] = ixheaacd_read_bits_buf(it_bit_buff, 6);
  705|  23.8k|        } else {
  706|  23.8k|          pstr_core_coder->max_sfb[right] = pstr_core_coder->max_sfb[left];
  707|  23.8k|        }
  708|       |
  709|  35.4k|        pstr_core_coder->max_sfb_ste =
  710|  35.4k|            max(pstr_core_coder->max_sfb[left], pstr_core_coder->max_sfb[right]);
  ------------------
  |  |   74|  35.4k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 1.82k, False: 33.6k]
  |  |  ------------------
  ------------------
  711|       |
  712|  35.4k|        usac_data->window_sequence[right] = usac_data->window_sequence[left];
  713|  35.4k|        usac_data->window_shape[right] = usac_data->window_shape[left];
  714|  35.4k|        memcpy(&usac_data->group_dis[right][0], &usac_data->group_dis[left][0], 8);
  715|  35.4k|        usac_data->pstr_sfb_info[right] = usac_data->pstr_sfb_info[left];
  716|  35.4k|        if (pstr_core_coder->max_sfb[right] > usac_data->pstr_sfb_info[right]->sfb_per_sbk)
  ------------------
  |  Branch (716:13): [True: 1.15k, False: 34.3k]
  ------------------
  717|  1.15k|          pstr_core_coder->max_sfb[right] = usac_data->pstr_sfb_info[right]->sfb_per_sbk;
  718|       |
  719|  35.4k|        pstr_core_coder->ms_mask_present[0] =
  720|  35.4k|            ixheaacd_read_ms_mask(usac_data, pstr_core_coder, it_bit_buff, left);
  721|  37.5k|      } else {
  722|  37.5k|        left = chan_offset;
  723|  37.5k|        right = chan_offset + 1;
  724|       |
  725|  37.5k|        pstr_core_coder->ms_mask_present[0] = 0;
  726|  37.5k|        pstr_core_coder->ms_mask_present[1] = 0;
  727|       |
  728|  5.13M|        for (k = 0; k < SFB_NUM_MAX; k++) {
  ------------------
  |  |  114|  5.13M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  5.13M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  5.13M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (728:21): [True: 5.10M, False: 37.5k]
  ------------------
  729|  5.10M|          usac_data->alpha_q_re_prev[k] = 0;
  730|  5.10M|          usac_data->alpha_q_im_prev[k] = 0;
  731|  5.10M|        }
  732|  37.5k|      }
  733|       |
  734|  73.0k|      if (usac_data->tw_mdct[elem_idx] == 1) {
  ------------------
  |  Branch (734:11): [True: 0, False: 73.0k]
  ------------------
  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|  73.0k|      if (pstr_core_coder->tns_active) {
  ------------------
  |  Branch (749:11): [True: 19.1k, False: 53.8k]
  ------------------
  750|  19.1k|        if (pstr_core_coder->common_window) {
  ------------------
  |  Branch (750:13): [True: 17.9k, False: 1.21k]
  ------------------
  751|  17.9k|          pstr_core_coder->common_tns = ixheaacd_read_bits_buf(it_bit_buff, 1);
  752|       |
  753|  17.9k|        } else {
  754|  1.21k|          pstr_core_coder->common_tns = 0;
  755|  1.21k|        }
  756|       |
  757|  19.1k|        pstr_core_coder->tns_on_lr = ixheaacd_read_bits_buf(it_bit_buff, 1);
  758|       |
  759|  19.1k|        if (pstr_core_coder->common_tns) {
  ------------------
  |  Branch (759:13): [True: 3.88k, False: 15.3k]
  ------------------
  760|  3.88k|          ixheaacd_read_tns_u(usac_data->pstr_sfb_info[0], &usac_data->pstr_tns[left][0],
  761|  3.88k|                              it_bit_buff);
  762|  3.88k|          memcpy(&usac_data->pstr_tns[right][0], &usac_data->pstr_tns[left][0],
  763|  3.88k|                 sizeof(ia_tns_frame_info_struct));
  764|       |
  765|  3.88k|          pstr_core_coder->tns_data_present[0] = 2;
  766|  3.88k|          pstr_core_coder->tns_data_present[1] = 2;
  767|  15.3k|        } else {
  768|  15.3k|          pstr_core_coder->tns_present_both = ixheaacd_read_bits_buf(it_bit_buff, 1);
  769|       |
  770|  15.3k|          if (pstr_core_coder->tns_present_both) {
  ------------------
  |  Branch (770:15): [True: 12.5k, False: 2.76k]
  ------------------
  771|  12.5k|            pstr_core_coder->tns_data_present[0] = 1;
  772|  12.5k|            pstr_core_coder->tns_data_present[1] = 1;
  773|  12.5k|          } else {
  774|  2.76k|            pstr_core_coder->tns_data_present[1] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  775|  2.76k|            pstr_core_coder->tns_data_present[0] = 1 - pstr_core_coder->tns_data_present[1];
  776|  2.76k|          }
  777|  15.3k|        }
  778|  53.8k|      } else {
  779|  53.8k|        pstr_core_coder->common_tns = 0;
  780|  53.8k|        pstr_core_coder->tns_data_present[0] = 0;
  781|  53.8k|        pstr_core_coder->tns_data_present[1] = 0;
  782|  53.8k|      }
  783|       |
  784|   136k|    } else {
  785|   136k|      pstr_core_coder->common_window = 0;
  786|   136k|      pstr_core_coder->common_tw = 0;
  787|   136k|      left = chan_offset;
  788|   136k|      right = chan_offset;
  789|   136k|      if (nr_core_coder_channels == 2) right = chan_offset + 1;
  ------------------
  |  Branch (789:11): [True: 34.5k, False: 102k]
  ------------------
  790|   136k|    }
  791|       |
  792|   526k|    for (ch = 0, chn = chan_offset; ch < nr_core_coder_channels; ch++, chn++) {
  ------------------
  |  Branch (792:37): [True: 317k, False: 209k]
  ------------------
  793|   317k|      if (pstr_core_coder->core_mode[chn] == CORE_MODE_LPD &&
  ------------------
  |  |   98|   634k|#define CORE_MODE_LPD 1
  ------------------
  |  Branch (793:11): [True: 56.3k, False: 260k]
  ------------------
  794|  56.3k|          usac_data->td_frame_prev[chn] == CORE_MODE_FD && usac_data->ec_flag) {
  ------------------
  |  |   97|   373k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (794:11): [True: 11.4k, False: 44.9k]
  |  Branch (794:60): [True: 0, False: 11.4k]
  ------------------
  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|   317k|      if (pstr_core_coder->core_mode[ch] == 1) {
  ------------------
  |  Branch (813:11): [True: 77.0k, False: 240k]
  ------------------
  814|  77.0k|        err_code = ixheaacd_tw_buff_update(usac_data, chn, usac_data->str_tddec[chn]);
  815|  77.0k|        if (err_code == -1) return err_code;
  ------------------
  |  Branch (815:13): [True: 0, False: 77.0k]
  ------------------
  816|       |
  817|  77.0k|        if (!usac_data->td_frame_prev[chn]) {
  ------------------
  |  Branch (817:13): [True: 16.2k, False: 60.8k]
  ------------------
  818|  16.2k|          ixheaacd_fix2flt_data(usac_data, usac_data->str_tddec[chn], chn);
  819|  16.2k|        }
  820|       |
  821|  71.7M|        for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (821:21): [True: 71.6M, False: 77.0k]
  ------------------
  822|  71.6M|          usac_data->time_sample_vector[chn][k] = (FLOAT32)(
  823|  71.6M|              (FLOAT32)usac_data->output_data_ptr[chn][k] * (FLOAT32)(ONE_BY_TWO_POW_15));
  ------------------
  |  |  146|  71.6M|#define ONE_BY_TWO_POW_15 0.000030517578125
  ------------------
  824|  71.6M|        }
  825|  77.0k|        usac_data->present_chan = chn;
  826|  77.0k|        err_code = ixheaacd_lpd_channel_stream(usac_data, &td_frame, it_bit_buff,
  827|  77.0k|                                               usac_data->time_sample_vector[chn]);
  828|  77.0k|        if (err_code == -1) return err_code;
  ------------------
  |  Branch (828:13): [True: 27, False: 77.0k]
  ------------------
  829|  77.0k|        if (usac_data->ec_flag) {
  ------------------
  |  Branch (829:13): [True: 0, False: 77.0k]
  ------------------
  830|      0|          it_bit_buff->xaac_jmp_buf = &local;
  831|      0|        }
  832|  77.0k|        if (usac_data->ec_flag && usac_data->frame_ok) {
  ------------------
  |  Branch (832:13): [True: 0, False: 77.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|  71.1M|        for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (836:21): [True: 71.0M, False: 77.0k]
  ------------------
  837|  71.0M|          usac_data->output_data_ptr[chn][k] =
  838|  71.0M|              (WORD32)(usac_data->time_sample_vector[chn][k] * (FLOAT32)((WORD64)1 << 15));
  839|  71.0M|        }
  840|       |
  841|  77.0k|        usac_data->window_shape[chn] = WIN_SEL_0;
  ------------------
  |  |   91|  77.0k|#define WIN_SEL_0 0
  ------------------
  842|       |
  843|  77.0k|        ixheaacd_td_frm_dec(usac_data, chn, td_frame.mod[0]);
  844|       |
  845|  77.0k|        usac_data->window_shape_prev[chn] = usac_data->window_shape[chn];
  846|  77.0k|        usac_data->window_sequence_last[chn] = EIGHT_SHORT_SEQUENCE;
  ------------------
  |  |  102|  77.0k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  847|       |
  848|   240k|      } else {
  849|   240k|        memset(usac_data->coef_fix[chn], 0, LN2 * sizeof(*usac_data->coef_fix[0]));
  850|       |
  851|   240k|        if (usac_data->str_tddec[chn] && usac_data->td_frame_prev[chn]) {
  ------------------
  |  Branch (851:13): [True: 240k, False: 0]
  |  Branch (851:42): [True: 14.3k, False: 225k]
  ------------------
  852|  14.3k|          if (usac_data->ec_flag) {
  ------------------
  |  Branch (852:15): [True: 0, False: 14.3k]
  ------------------
  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|  14.3k|          ixheaacd_lpd_dec_update(usac_data->str_tddec[chn], usac_data, chn);
  857|  14.3k|        }
  858|       |
  859|   240k|        if (id != ID_USAC_LFE) {
  ------------------
  |  |   29|   240k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (859:13): [True: 238k, False: 1.60k]
  ------------------
  860|   238k|          if ((nr_core_coder_channels == 1) ||
  ------------------
  |  Branch (860:15): [True: 74.6k, False: 163k]
  ------------------
  861|   163k|              (pstr_core_coder->core_mode[0] != pstr_core_coder->core_mode[1]))
  ------------------
  |  Branch (861:15): [True: 18.1k, False: 145k]
  ------------------
  862|  92.7k|            pstr_core_coder->tns_data_present[ch] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  863|   238k|        }
  864|       |
  865|   240k|        err_code = ixheaacd_fd_channel_stream(
  866|   240k|            usac_data, pstr_core_coder, &pstr_core_coder->max_sfb[ch],
  867|   240k|            usac_data->window_sequence_last[chn], chn, usac_data->noise_filling_config[elem_idx],
  868|   240k|            ch, it_bit_buff);
  869|   240k|        if (err_code == -1) return err_code;
  ------------------
  |  Branch (869:13): [True: 256, False: 239k]
  ------------------
  870|   240k|      }
  871|   317k|    }
  872|       |
  873|   209k|    if (pstr_core_coder->core_mode[0] == CORE_MODE_FD &&
  ------------------
  |  |   97|   419k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (873:9): [True: 164k, False: 45.0k]
  ------------------
  874|   164k|        pstr_core_coder->core_mode[1] == CORE_MODE_FD && nr_core_coder_channels == 2) {
  ------------------
  |  |   97|   374k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (874:9): [True: 148k, False: 16.3k]
  |  Branch (874:58): [True: 72.4k, False: 75.8k]
  ------------------
  875|  72.4k|      ixheaacd_cplx_prev_mdct_dmx(usac_data->pstr_sfb_info[left], usac_data->coef_save[left],
  876|  72.4k|                                  usac_data->coef_save[right], usac_data->dmx_re_prev,
  877|  72.4k|                                  pstr_core_coder->pred_dir);
  878|  72.4k|    }
  879|       |
  880|   209k|    if (pstr_core_coder->tns_on_lr == 0 && (id != ID_USAC_LFE)) {
  ------------------
  |  |   29|   193k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (880:9): [True: 193k, False: 16.6k]
  |  Branch (880:44): [True: 191k, False: 1.57k]
  ------------------
  881|   474k|      for (ch = 0, chn = left; chn <= right; ch++, chn++) {
  ------------------
  |  Branch (881:32): [True: 282k, False: 191k]
  ------------------
  882|   282k|        if (pstr_core_coder->core_mode[ch] == CORE_MODE_FD) {
  ------------------
  |  |   97|   282k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (882:13): [True: 206k, False: 76.2k]
  ------------------
  883|   206k|          err_code = ixheaacd_tns_apply(usac_data, usac_data->coef_fix[chn],
  884|   206k|                                        pstr_core_coder->max_sfb[ch],
  885|   206k|                                        usac_data->pstr_sfb_info[chn], usac_data->pstr_tns[chn]);
  886|   206k|          if (err_code) return err_code;
  ------------------
  |  Branch (886:15): [True: 0, False: 206k]
  ------------------
  887|   206k|        }
  888|   282k|      }
  889|   191k|    }
  890|       |
  891|   209k|    if (nr_core_coder_channels == 2 && pstr_core_coder->core_mode[0] == 0 &&
  ------------------
  |  Branch (891:9): [True: 106k, False: 103k]
  |  Branch (891:40): [True: 88.7k, False: 17.7k]
  ------------------
  892|  88.7k|        pstr_core_coder->core_mode[1] == 0) {
  ------------------
  |  Branch (892:9): [True: 72.4k, False: 16.3k]
  ------------------
  893|  72.4k|      if (pstr_core_coder->ms_mask_present[0] == 3) {
  ------------------
  |  Branch (893:11): [True: 15.0k, False: 57.3k]
  ------------------
  894|  15.0k|        ixheaacd_cplx_pred_upmixing(usac_data, usac_data->coef_fix[left],
  895|  15.0k|                                    usac_data->coef_fix[right], pstr_core_coder, left);
  896|       |
  897|  57.3k|      } else if (pstr_core_coder->ms_mask_present[0] > 0) {
  ------------------
  |  Branch (897:18): [True: 9.06k, False: 48.2k]
  ------------------
  898|  9.06k|        ixheaacd_ms_stereo(usac_data, usac_data->coef_fix[right], usac_data->coef_fix[left], left,
  899|  9.06k|                           pstr_core_coder->max_sfb[right] > pstr_core_coder->max_sfb[left]
  ------------------
  |  Branch (899:28): [True: 95, False: 8.97k]
  ------------------
  900|  9.06k|                               ? pstr_core_coder->max_sfb[right]
  901|  9.06k|                               : pstr_core_coder->max_sfb[left]);
  902|  9.06k|      }
  903|       |
  904|  72.4k|      if (pstr_core_coder->tns_on_lr) {
  ------------------
  |  Branch (904:11): [True: 15.3k, False: 57.1k]
  ------------------
  905|  45.9k|        for (ch = 0, chn = left; chn <= right; ch++, chn++) {
  ------------------
  |  Branch (905:34): [True: 30.6k, False: 15.3k]
  ------------------
  906|  30.6k|          if (pstr_core_coder->core_mode[ch] == CORE_MODE_FD) {
  ------------------
  |  |   97|  30.6k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (906:15): [True: 30.6k, False: 0]
  ------------------
  907|  30.6k|            err_code = ixheaacd_tns_apply(
  908|  30.6k|                usac_data, usac_data->coef_fix[chn], pstr_core_coder->max_sfb[ch],
  909|  30.6k|                usac_data->pstr_sfb_info[chn], usac_data->pstr_tns[chn]);
  910|  30.6k|            if (err_code) return err_code;
  ------------------
  |  Branch (910:17): [True: 0, False: 30.6k]
  ------------------
  911|  30.6k|          }
  912|  30.6k|        }
  913|  15.3k|      }
  914|       |
  915|  72.4k|      ixheaacd_usac_cplx_save_prev(usac_data->pstr_sfb_info[left], usac_data->coef_fix[left],
  916|  72.4k|                                   usac_data->coef_fix[right], usac_data->coef_save[left],
  917|  72.4k|                                   usac_data->coef_save[right]);
  918|  72.4k|    }
  919|   209k|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (919:9): [True: 0, False: 209k]
  ------------------
  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|   209k|  } 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|   524k|  for (ch = left; ch <= right; ch++) {
  ------------------
  |  Branch (977:19): [True: 314k, False: 209k]
  ------------------
  978|   314k|    FLOAT32 *ptr_scratch =
  979|   314k|        (FLOAT32 *)usac_data->str_error_concealment[ch].str_ec_scratch.spec_coeff;
  980|   314k|    if ((pstr_core_coder->core_mode[ch] != CORE_MODE_LPD &&
  ------------------
  |  |   98|   629k|#define CORE_MODE_LPD 1
  ------------------
  |  Branch (980:10): [True: 259k, False: 55.5k]
  ------------------
  981|   259k|         usac_data->td_frame_prev[ch] != CORE_MODE_LPD && usac_data->ec_flag) ||
  ------------------
  |  |   98|   574k|#define CORE_MODE_LPD 1
  ------------------
  |  Branch (981:10): [True: 229k, False: 30.1k]
  |  Branch (981:59): [True: 0, False: 229k]
  ------------------
  982|   314k|        (pstr_core_coder->core_mode[ch] == CORE_MODE_FD && usac_data->ec_flag == 0)) {
  ------------------
  |  |   97|   629k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (982:10): [True: 259k, False: 55.5k]
  |  Branch (982:60): [True: 259k, False: 0]
  ------------------
  983|   259k|      if (usac_data->tw_mdct[elem_idx]) {
  ------------------
  |  Branch (983:11): [True: 0, False: 259k]
  ------------------
  984|      0|        err_code = -1;
  985|      0|        return err_code;
  986|       |
  987|   259k|      } else {
  988|   259k|        if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (988:13): [True: 0, False: 259k]
  ------------------
  989|      0|          usac_data->fac_data_present[ch] = 0;
  990|      0|        }
  991|   259k|        err_code = ixheaacd_fd_frm_dec(usac_data, ch);
  992|   259k|        if (err_code == -1) return err_code;
  ------------------
  |  Branch (992:13): [True: 88, False: 259k]
  ------------------
  993|   259k|        if (usac_data->ec_flag) {
  ------------------
  |  Branch (993:13): [True: 0, False: 259k]
  ------------------
  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|   259k|        } else {
 1006|   261M|          for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (1006:23): [True: 260M, False: 259k]
  ------------------
 1007|   260M|            usac_data->time_sample_vector[ch][k] =
 1008|   260M|                (FLOAT32)((FLOAT32)usac_data->output_data_ptr[ch][k] *
 1009|   260M|                          (FLOAT32)(ONE_BY_TWO_POW_15));
  ------------------
  |  |  146|   260M|#define ONE_BY_TWO_POW_15 0.000030517578125
  ------------------
 1010|   260M|          }
 1011|   259k|        }
 1012|   259k|      }
 1013|   259k|      usac_data->window_shape_prev[ch] = usac_data->window_shape[ch];
 1014|   259k|      usac_data->window_sequence_last[ch] = usac_data->window_sequence[ch];
 1015|   259k|    } else {
 1016|  55.5k|      if (usac_data->ec_flag) {
  ------------------
  |  Branch (1016:11): [True: 0, False: 55.5k]
  ------------------
 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.5k|      } else {
 1041|  50.9M|        for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (1041:21): [True: 50.8M, False: 55.5k]
  ------------------
 1042|  50.8M|          usac_data->time_sample_vector[ch][k] =
 1043|  50.8M|              (FLOAT32)((FLOAT32)usac_data->output_data_ptr[ch][k] *
 1044|  50.8M|                        (FLOAT32)(ONE_BY_TWO_POW_15));
  ------------------
  |  |  146|  50.8M|#define ONE_BY_TWO_POW_15 0.000030517578125
  ------------------
 1045|  50.8M|        }
 1046|  55.5k|      }
 1047|  55.5k|    }
 1048|   314k|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (1048:9): [True: 0, False: 314k]
  ------------------
 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|   314k|  }
 1057|   209k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (1057:7): [True: 0, False: 209k]
  ------------------
 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|   209k|  } else {
 1064|   524k|    for (ch = 0, chn = left; chn <= right; chn++, ch++)
  ------------------
  |  Branch (1064:30): [True: 314k, False: 209k]
  ------------------
 1065|   314k|      usac_data->td_frame_prev[chn] = pstr_core_coder->core_mode[ch];
 1066|   209k|  }
 1067|       |
 1068|   209k|  return 0;
 1069|   209k|}
ixheaacd_ext_ch_ele.c:ixheaacd_read_ms_mask:
  271|  35.4k|    ia_bit_buf_struct *it_bit_buff, WORD32 chn) {
  272|  35.4k|  WORD32 g, sfb;
  273|  35.4k|  WORD32 ms_mask_present;
  274|       |
  275|  35.4k|  UWORD8 *sfb_group = usac_data->group_dis[chn];
  276|  35.4k|  UWORD8 max_sfb = pstr_core_coder->max_sfb_ste;
  277|  35.4k|  UWORD8 *ms_used = usac_data->ms_used[chn];
  278|  35.4k|  ia_sfb_info_struct *info = usac_data->pstr_sfb_info[chn];
  279|       |
  280|  35.4k|  ms_mask_present = ixheaacd_read_bits_buf(it_bit_buff, 2);
  281|       |
  282|  35.4k|  switch (ms_mask_present) {
  ------------------
  |  Branch (282:11): [True: 35.4k, False: 0]
  ------------------
  283|  11.1k|    case 0:
  ------------------
  |  Branch (283:5): [True: 11.1k, False: 24.3k]
  ------------------
  284|       |
  285|  11.1k|      break;
  286|       |
  287|    734|    case 1:
  ------------------
  |  Branch (287:5): [True: 734, False: 34.7k]
  ------------------
  288|  3.84k|      for (g = 0; g < info->max_win_len; g = *sfb_group++) {
  ------------------
  |  Branch (288:19): [True: 3.11k, False: 734]
  ------------------
  289|  19.0k|        for (sfb = 0; sfb < max_sfb; sfb++) {
  ------------------
  |  Branch (289:23): [True: 15.9k, False: 3.11k]
  ------------------
  290|  15.9k|          *ms_used = ixheaacd_read_bits_buf(it_bit_buff, 1);
  291|  15.9k|          ms_used++;
  292|  15.9k|        }
  293|  34.9k|        for (; sfb < info->sfb_per_sbk; sfb++) {
  ------------------
  |  Branch (293:16): [True: 31.8k, False: 3.11k]
  ------------------
  294|  31.8k|          *ms_used = 0;
  295|  31.8k|          ms_used++;
  296|  31.8k|        }
  297|  3.11k|      }
  298|       |
  299|    734|      break;
  300|  8.36k|    case 2:
  ------------------
  |  Branch (300:5): [True: 8.36k, False: 27.1k]
  ------------------
  301|  18.5k|      for (g = 0; g < info->max_win_len; g = *sfb_group++)
  ------------------
  |  Branch (301:19): [True: 10.2k, False: 8.36k]
  ------------------
  302|   383k|        for (sfb = 0; sfb < info->sfb_per_sbk; sfb++) *ms_used++ = 1;
  ------------------
  |  Branch (302:23): [True: 373k, False: 10.2k]
  ------------------
  303|  8.36k|      break;
  304|       |
  305|  15.2k|    case 3:
  ------------------
  |  Branch (305:5): [True: 15.2k, False: 20.2k]
  ------------------
  306|       |
  307|  15.2k|      ixheaacd_cplx_pred_data(usac_data, pstr_core_coder, info->num_groups,
  308|  15.2k|                              it_bit_buff);
  309|  15.2k|      return 3;
  310|  35.4k|  }
  311|       |
  312|  2.76M|  for (sfb = 0; sfb < SFB_NUM_MAX; sfb++) {
  ------------------
  |  |  114|  2.76M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  2.76M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  2.76M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (312:17): [True: 2.74M, False: 20.2k]
  ------------------
  313|  2.74M|    usac_data->alpha_q_re_prev[sfb] = 0;
  314|  2.74M|    usac_data->alpha_q_im_prev[sfb] = 0;
  315|  2.74M|  }
  316|  20.2k|  return ms_mask_present;
  317|  35.4k|}
ixheaacd_ext_ch_ele.c:ixheaacd_cplx_pred_data:
  164|  15.2k|    ia_bit_buf_struct *it_bit_buff) {
  165|  15.2k|  ia_huff_code_book_struct *ptr_huff_code_book = &ixheaacd_book;
  166|  15.2k|  const ia_huff_code_word_struct *ptr_huff_code_word =
  167|  15.2k|      ptr_huff_code_book->pstr_huff_code_word;
  168|  15.2k|  WORD32 cplx_pred_all;
  169|  15.2k|  WORD32 delta_code_time;
  170|  15.2k|  WORD32 g, sfb;
  171|  15.2k|  WORD32 dpcm_alpha, last_alpha_q_re, last_alpha_q_im;
  172|  15.2k|  UWORD8 max_sfb_ste = pstr_core_coder->max_sfb_ste;
  173|       |
  174|  15.2k|  WORD32(*alpha_q_re)[SFB_NUM_MAX] = usac_data->alpha_q_re;
  175|  15.2k|  WORD32(*alpha_q_im)[SFB_NUM_MAX] = usac_data->alpha_q_im;
  176|  15.2k|  WORD32 *alpha_q_re_prev = usac_data->alpha_q_re_prev;
  177|  15.2k|  WORD32 *alpha_q_im_prev = usac_data->alpha_q_im_prev;
  178|  15.2k|  UWORD8(*cplx_pred_used)[SFB_NUM_MAX] = usac_data->cplx_pred_used;
  179|       |
  180|  15.2k|  cplx_pred_all = ixheaacd_read_bits_buf(it_bit_buff, 1);
  181|       |
  182|  15.2k|  if (cplx_pred_all == 0) {
  ------------------
  |  Branch (182:7): [True: 10.0k, False: 5.25k]
  ------------------
  183|  64.8k|    for (g = 0; g < num_window_groups; g++) {
  ------------------
  |  Branch (183:17): [True: 54.7k, False: 10.0k]
  ------------------
  184|   150k|      for (sfb = 0; sfb < max_sfb_ste; sfb += SFB_PER_PRED_BAND) {
  ------------------
  |  |  120|  96.0k|#define SFB_PER_PRED_BAND 2
  ------------------
  |  Branch (184:21): [True: 96.0k, False: 54.7k]
  ------------------
  185|  96.0k|        cplx_pred_used[g][sfb] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  186|       |
  187|  96.0k|        if (sfb + 1 < max_sfb_ste)
  ------------------
  |  Branch (187:13): [True: 41.6k, False: 54.3k]
  ------------------
  188|  41.6k|          cplx_pred_used[g][sfb + 1] = cplx_pred_used[g][sfb];
  189|  96.0k|      }
  190|  7.36M|      for (sfb = max_sfb_ste; sfb < SFB_NUM_MAX; sfb++)
  ------------------
  |  |  114|  7.36M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  7.36M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  7.36M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (190:31): [True: 7.31M, False: 54.7k]
  ------------------
  191|  7.31M|        cplx_pred_used[g][sfb] = 0;
  192|  54.7k|    }
  193|  10.0k|  } else {
  194|  14.7k|    for (g = 0; g < num_window_groups; g++) {
  ------------------
  |  Branch (194:17): [True: 9.48k, False: 5.25k]
  ------------------
  195|  95.7k|      for (sfb = 0; sfb < max_sfb_ste; sfb++) cplx_pred_used[g][sfb] = 1;
  ------------------
  |  Branch (195:21): [True: 86.2k, False: 9.48k]
  ------------------
  196|       |
  197|  1.21M|      for (sfb = max_sfb_ste; sfb < SFB_NUM_MAX; sfb++)
  ------------------
  |  |  114|  1.21M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  1.21M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  1.21M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (197:31): [True: 1.20M, False: 9.48k]
  ------------------
  198|  1.20M|        cplx_pred_used[g][sfb] = 0;
  199|  9.48k|    }
  200|  5.25k|  }
  201|       |
  202|  15.2k|  pstr_core_coder->pred_dir = ixheaacd_read_bits_buf(it_bit_buff, 1);
  203|       |
  204|  15.2k|  pstr_core_coder->complex_coef = ixheaacd_read_bits_buf(it_bit_buff, 1);
  205|       |
  206|  15.2k|  if (pstr_core_coder->complex_coef) {
  ------------------
  |  Branch (206:7): [True: 7.26k, False: 8.01k]
  ------------------
  207|  7.26k|    if (usac_data->usac_independency_flg)
  ------------------
  |  Branch (207:9): [True: 6.62k, False: 635]
  ------------------
  208|  6.62k|      pstr_core_coder->use_prev_frame = 0;
  209|    635|    else
  210|    635|      pstr_core_coder->use_prev_frame = ixheaacd_read_bits_buf(it_bit_buff, 1);
  211|  7.26k|  }
  212|       |
  213|  15.2k|  if (usac_data->usac_independency_flg)
  ------------------
  |  Branch (213:7): [True: 7.64k, False: 7.63k]
  ------------------
  214|  7.64k|    delta_code_time = 0;
  215|  7.63k|  else
  216|  7.63k|    delta_code_time = ixheaacd_read_bits_buf(it_bit_buff, 1);
  217|       |
  218|  79.5k|  for (g = 0; g < num_window_groups; g++) {
  ------------------
  |  Branch (218:15): [True: 64.2k, False: 15.2k]
  ------------------
  219|   207k|    for (sfb = 0; sfb < max_sfb_ste; sfb += SFB_PER_PRED_BAND) {
  ------------------
  |  |  120|   143k|#define SFB_PER_PRED_BAND 2
  ------------------
  |  Branch (219:19): [True: 143k, False: 64.2k]
  ------------------
  220|   143k|      if (delta_code_time == 1) {
  ------------------
  |  Branch (220:11): [True: 1.32k, False: 142k]
  ------------------
  221|  1.32k|        last_alpha_q_re = alpha_q_re_prev[sfb];
  222|  1.32k|        last_alpha_q_im = alpha_q_im_prev[sfb];
  223|   142k|      } else {
  224|   142k|        if (sfb > 0) {
  ------------------
  |  Branch (224:13): [True: 78.6k, False: 63.3k]
  ------------------
  225|  78.6k|          last_alpha_q_re = alpha_q_re[g][sfb - 1];
  226|  78.6k|          last_alpha_q_im = alpha_q_im[g][sfb - 1];
  227|  78.6k|        } else {
  228|  63.3k|          last_alpha_q_re = last_alpha_q_im = 0;
  229|  63.3k|        }
  230|   142k|      }
  231|       |
  232|   143k|      if (cplx_pred_used[g][sfb] == 1) {
  ------------------
  |  Branch (232:11): [True: 92.9k, False: 50.4k]
  ------------------
  233|  92.9k|        dpcm_alpha =
  234|  92.9k|            -ixheaacd_huff_codeword(ptr_huff_code_word, 0, it_bit_buff) + 60;
  235|  92.9k|        alpha_q_re[g][sfb] = dpcm_alpha + last_alpha_q_re;
  236|       |
  237|  92.9k|        if (pstr_core_coder->complex_coef) {
  ------------------
  |  Branch (237:13): [True: 65.3k, False: 27.5k]
  ------------------
  238|  65.3k|          dpcm_alpha =
  239|  65.3k|              -ixheaacd_huff_codeword(ptr_huff_code_word, 0, it_bit_buff) + 60;
  240|  65.3k|          alpha_q_im[g][sfb] = dpcm_alpha + last_alpha_q_im;
  241|  65.3k|        } else {
  242|  27.5k|          alpha_q_im[g][sfb] = 0;
  243|  27.5k|        }
  244|  92.9k|      } else {
  245|  50.4k|        alpha_q_re[g][sfb] = 0;
  246|  50.4k|        alpha_q_im[g][sfb] = 0;
  247|  50.4k|      }
  248|       |
  249|   143k|      if ((sfb + 1) < max_sfb_ste) {
  ------------------
  |  Branch (249:11): [True: 80.6k, False: 62.7k]
  ------------------
  250|  80.6k|        alpha_q_re[g][sfb + 1] = alpha_q_re[g][sfb];
  251|  80.6k|        alpha_q_im[g][sfb + 1] = alpha_q_im[g][sfb];
  252|  80.6k|      }
  253|       |
  254|   143k|      alpha_q_re_prev[sfb] = alpha_q_re[g][sfb];
  255|   143k|      alpha_q_im_prev[sfb] = alpha_q_im[g][sfb];
  256|   143k|    }
  257|  8.58M|    for (sfb = max_sfb_ste; sfb < SFB_NUM_MAX; sfb++) {
  ------------------
  |  |  114|  8.58M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  8.58M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  8.58M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (257:29): [True: 8.51M, False: 64.2k]
  ------------------
  258|  8.51M|      alpha_q_re[g][sfb] = 0;
  259|  8.51M|      alpha_q_im[g][sfb] = 0;
  260|  8.51M|      alpha_q_re_prev[sfb] = 0;
  261|  8.51M|      alpha_q_im_prev[sfb] = 0;
  262|  8.51M|    }
  263|  64.2k|  }
  264|       |
  265|  15.2k|  return;
  266|  15.2k|}
ixheaacd_ext_ch_ele.c:ixheaacd_cplx_prev_mdct_dmx:
  582|  72.4k|                                        WORD32 *dmx_re_prev, WORD32 pred_dir) {
  583|  72.4k|  WORD32 offs, i;
  584|  72.4k|  WORD32 factor = 1;
  585|  72.4k|  if (pred_dir) factor = -1;
  ------------------
  |  Branch (585:7): [True: 14.3k, False: 58.0k]
  ------------------
  586|       |
  587|  72.4k|  offs = pstr_sfb_info->samp_per_bk - pstr_sfb_info->bins_per_sbk;
  588|       |
  589|  45.0M|  for (i = 0; i < pstr_sfb_info->bins_per_sbk; i++)
  ------------------
  |  Branch (589:15): [True: 45.0M, False: 72.4k]
  ------------------
  590|  45.0M|    dmx_re_prev[i] = (WORD32)(((WORD64)l_spec[i + offs] +
  591|  45.0M|                               ((WORD64)factor * (WORD64)r_spec[i + offs])) >>
  592|  45.0M|                              1);
  593|  72.4k|}
ixheaacd_ext_ch_ele.c:ixheaacd_cplx_pred_upmixing:
  480|  15.0k|    ia_usac_tmp_core_coder_struct *pstr_core_coder, WORD32 chn) {
  481|  15.0k|  ia_sfb_info_struct *pstr_sfb_info = usac_data->pstr_sfb_info[chn];
  482|  15.0k|  WORD32 *dmx_re = &usac_data->scratch_buffer[0];
  483|  15.0k|  WORD32 *dmx_im = &usac_data->x_ac_dec[0];
  484|       |
  485|  15.0k|  WORD32 grp, sfb, grp_len, i = 0, k;
  486|  15.0k|  WORD32 *dmx_re_prev = usac_data->dmx_re_prev;
  487|  15.0k|  WORD32(*alpha_q_re)[SFB_NUM_MAX] = usac_data->alpha_q_re;
  488|  15.0k|  WORD32(*alpha_q_im)[SFB_NUM_MAX] = usac_data->alpha_q_im;
  489|       |
  490|  15.0k|  UWORD8(*cplx_pred_used)[SFB_NUM_MAX] = usac_data->cplx_pred_used;
  491|       |
  492|  15.0k|  WORD32 alpha_q_re_temp;
  493|  15.0k|  WORD32 alpha_q_im_temp;
  494|  15.0k|  WORD32 factor = 1;
  495|       |
  496|  15.0k|  if (pstr_core_coder->pred_dir) factor = -1;
  ------------------
  |  Branch (496:7): [True: 14.3k, False: 715]
  ------------------
  497|       |
  498|  78.8k|  for (grp = 0; grp < pstr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (498:17): [True: 63.7k, False: 15.0k]
  ------------------
  499|   182k|    for (grp_len = 0; grp_len < pstr_sfb_info->group_len[grp]; grp_len++) {
  ------------------
  |  Branch (499:23): [True: 118k, False: 63.7k]
  ------------------
  500|  1.90M|      for (sfb = 0; sfb < pstr_sfb_info->sfb_per_sbk; sfb++) {
  ------------------
  |  Branch (500:21): [True: 1.78M, False: 118k]
  ------------------
  501|  1.78M|        if (cplx_pred_used[grp][sfb] == 1) {
  ------------------
  |  Branch (501:13): [True: 639k, False: 1.14M]
  ------------------
  502|   639k|          memcpy(&dmx_re[i], &l_spec[i],
  503|   639k|                 pstr_sfb_info->sfb_width[sfb] * sizeof(WORD32));
  504|   639k|          i += pstr_sfb_info->sfb_width[sfb];
  505|   639k|        }
  506|       |
  507|  1.14M|        else {
  508|  11.7M|          for (k = 0; k < pstr_sfb_info->sfb_width[sfb]; k++, i++) {
  ------------------
  |  Branch (508:23): [True: 10.5M, False: 1.14M]
  ------------------
  509|  10.5M|            dmx_re[i] = (WORD32)(
  510|  10.5M|                ((WORD64)l_spec[i] + ((WORD64)factor * (WORD64)r_spec[i])) >>
  511|  10.5M|                1);
  512|  10.5M|          }
  513|  1.14M|        }
  514|  1.78M|      }
  515|   118k|    }
  516|  63.7k|  }
  517|       |
  518|  15.0k|  memset(dmx_im, 0, sizeof(WORD32) * BLOCK_LEN_LONG);
  ------------------
  |  |   68|  15.0k|#define BLOCK_LEN_LONG 1024
  ------------------
  519|       |
  520|  15.0k|  if (pstr_core_coder->complex_coef) {
  ------------------
  |  Branch (520:7): [True: 7.07k, False: 7.99k]
  ------------------
  521|  7.07k|    WORD32 *p_dmx_re_prev =
  522|  7.07k|        pstr_core_coder->use_prev_frame ? dmx_re_prev : NULL;
  ------------------
  |  Branch (522:9): [True: 522, False: 6.55k]
  ------------------
  523|  7.07k|    ixheaacd_estimate_dmx_im(dmx_re, p_dmx_re_prev, dmx_im, pstr_sfb_info,
  524|  7.07k|                             usac_data->window_sequence[chn],
  525|  7.07k|                             usac_data->window_shape[chn],
  526|  7.07k|                             usac_data->window_shape_prev[chn]);
  527|       |
  528|  24.3k|    for (grp = 0, i = 0; grp < pstr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (528:26): [True: 17.2k, False: 7.07k]
  ------------------
  529|  72.6k|      for (grp_len = 0; grp_len < pstr_sfb_info->group_len[grp]; grp_len++) {
  ------------------
  |  Branch (529:25): [True: 55.3k, False: 17.2k]
  ------------------
  530|   889k|        for (sfb = 0; sfb < pstr_sfb_info->sfb_per_sbk; sfb++) {
  ------------------
  |  Branch (530:23): [True: 834k, False: 55.3k]
  ------------------
  531|   834k|          alpha_q_re_temp = ixheaac_sat64_32(ixheaac_mult32x32in64(alpha_q_re[grp][sfb], 1677722));
  532|   834k|          alpha_q_im_temp = ixheaac_sat64_32(ixheaac_mult32x32in64(alpha_q_im[grp][sfb], 1677722));
  533|   834k|          if (cplx_pred_used[grp][sfb]) {
  ------------------
  |  Branch (533:15): [True: 576k, False: 258k]
  ------------------
  534|  5.08M|            for (k = 0; k < pstr_sfb_info->sfb_width[sfb]; k++, i++) {
  ------------------
  |  Branch (534:25): [True: 4.51M, False: 576k]
  ------------------
  535|  4.51M|              WORD32 mid_side = ixheaac_sub32_sat(
  536|  4.51M|                  ixheaac_sub32_sat(r_spec[i],
  537|  4.51M|                                     (WORD32)((WORD64)ixheaac_mult32x32in64(
  538|  4.51M|                                                  alpha_q_re_temp, l_spec[i]) >>
  539|  4.51M|                                              24)),
  540|  4.51M|                  (WORD32)((WORD64)ixheaac_mult32x32in64(alpha_q_im_temp,
  541|  4.51M|                                                          dmx_im[i]) >>
  542|  4.51M|                           24));
  543|  4.51M|              r_spec[i] = ixheaac_sat64_32((WORD64)factor) *
  544|  4.51M|                          (WORD64)(ixheaac_sub32_sat(l_spec[i], mid_side));
  545|  4.51M|              l_spec[i] = ixheaac_add32_sat(l_spec[i], mid_side);
  546|  4.51M|            }
  547|   576k|          } else {
  548|   258k|            i += pstr_sfb_info->sfb_width[sfb];
  549|   258k|          }
  550|   834k|        }
  551|  55.3k|      }
  552|  17.2k|    }
  553|  7.99k|  } else {
  554|  54.4k|    for (grp = 0, i = 0; grp < pstr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (554:26): [True: 46.4k, False: 7.99k]
  ------------------
  555|   110k|      for (grp_len = 0; grp_len < pstr_sfb_info->group_len[grp]; grp_len++) {
  ------------------
  |  Branch (555:25): [True: 63.5k, False: 46.4k]
  ------------------
  556|  1.01M|        for (sfb = 0; sfb < pstr_sfb_info->sfb_per_sbk; sfb++) {
  ------------------
  |  Branch (556:23): [True: 954k, False: 63.5k]
  ------------------
  557|   954k|          alpha_q_re_temp = ixheaac_sat64_32(ixheaac_mult32x32in64(alpha_q_re[grp][sfb], 1677722));
  558|   954k|          if (cplx_pred_used[grp][sfb]) {
  ------------------
  |  Branch (558:15): [True: 62.8k, False: 891k]
  ------------------
  559|   422k|            for (k = 0; k < pstr_sfb_info->sfb_width[sfb]; k++, i++) {
  ------------------
  |  Branch (559:25): [True: 359k, False: 62.8k]
  ------------------
  560|   359k|              WORD32 mid_side = ixheaac_sub32_sat(
  561|   359k|                  r_spec[i], (WORD32)((WORD64)ixheaac_mult32x32in64(
  562|   359k|                                          alpha_q_re_temp, l_spec[i]) >>
  563|   359k|                                      24));
  564|       |
  565|   359k|              r_spec[i] = ixheaac_sat64_32((WORD64)factor) *
  566|   359k|                          (WORD64)(ixheaac_sub32_sat(l_spec[i], mid_side));
  567|   359k|              l_spec[i] = ixheaac_add32_sat(l_spec[i], mid_side);
  568|   359k|            }
  569|   891k|          } else {
  570|   891k|            i += pstr_sfb_info->sfb_width[sfb];
  571|   891k|          }
  572|   954k|        }
  573|  63.5k|      }
  574|  46.4k|    }
  575|  7.99k|  }
  576|       |
  577|  15.0k|  return;
  578|  15.0k|}
ixheaacd_ext_ch_ele.c:ixheaacd_estimate_dmx_im:
  429|  7.07k|                                     const WORD32 prev_w_shape) {
  430|  7.07k|  WORD32 i;
  431|  7.07k|  const WORD16 *mdst_fcoeff_curr, *mdst_fcoeff_prev;
  432|       |
  433|  7.07k|  switch (window) {
  434|     38|    case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|     38|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (434:5): [True: 38, False: 7.03k]
  ------------------
  435|  6.93k|    case EIGHT_SHORT_SEQUENCE:
  ------------------
  |  |  102|  6.93k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (435:5): [True: 6.89k, False: 177]
  ------------------
  436|  6.93k|      mdst_fcoeff_curr =
  437|  6.93k|          ixheaacd_mdst_fcoeff_longshort_curr[prev_w_shape][w_shape];
  438|  6.93k|      mdst_fcoeff_prev = ixheaacd_mdst_fcoeff_l_s_start_left_prev[prev_w_shape];
  439|  6.93k|      break;
  440|     13|    case LONG_START_SEQUENCE:
  ------------------
  |  |  101|     13|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (440:5): [True: 13, False: 7.06k]
  ------------------
  441|     13|      mdst_fcoeff_curr = ixheaacd_mdst_fcoeff_start_curr[prev_w_shape][w_shape];
  442|     13|      mdst_fcoeff_prev = ixheaacd_mdst_fcoeff_l_s_start_left_prev[prev_w_shape];
  443|     13|      break;
  444|     39|    case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|     39|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (444:5): [True: 39, False: 7.03k]
  ------------------
  445|     39|      mdst_fcoeff_curr = ixheaacd_mdst_fcoeff_stop_cur[prev_w_shape][w_shape];
  446|     39|      mdst_fcoeff_prev =
  447|     39|          ixheaacd_mdst_fcoeff_stop_stopstart_left_prev[prev_w_shape];
  448|     39|      break;
  449|     87|    case STOP_START_SEQUENCE:
  ------------------
  |  |  104|     87|#define STOP_START_SEQUENCE 4
  ------------------
  |  Branch (449:5): [True: 87, False: 6.98k]
  ------------------
  450|     87|      mdst_fcoeff_curr =
  451|     87|          ixheaacd_mdst_fcoeff_stopstart_cur[prev_w_shape][w_shape];
  452|     87|      mdst_fcoeff_prev =
  453|     87|          ixheaacd_mdst_fcoeff_stop_stopstart_left_prev[prev_w_shape];
  454|     87|      break;
  455|      0|    default:
  ------------------
  |  Branch (455:5): [True: 0, False: 7.07k]
  ------------------
  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|  7.07k|  }
  462|       |
  463|  62.4k|  for (i = 0; i < pstr_sfb_info->max_win_len; i++) {
  ------------------
  |  Branch (463:15): [True: 55.3k, False: 7.07k]
  ------------------
  464|  55.3k|    ixheaacd_filter_and_add(dmx_re, pstr_sfb_info->bins_per_sbk,
  465|  55.3k|                            mdst_fcoeff_curr, dmx_im, 1, 1);
  466|       |
  467|  55.3k|    if (dmx_re_prev)
  ------------------
  |  Branch (467:9): [True: 48.7k, False: 6.55k]
  ------------------
  468|  48.7k|      ixheaacd_filter_and_add(dmx_re_prev, pstr_sfb_info->bins_per_sbk,
  469|  48.7k|                              mdst_fcoeff_prev, dmx_im, -1, 1);
  470|       |
  471|  55.3k|    dmx_re_prev = dmx_re;
  472|  55.3k|    dmx_re += pstr_sfb_info->bins_per_sbk;
  473|  55.3k|    dmx_im += pstr_sfb_info->bins_per_sbk;
  474|  55.3k|  }
  475|  7.07k|  return;
  476|  7.07k|}
ixheaacd_ext_ch_ele.c:ixheaacd_filter_and_add:
  358|   104k|                                    const WORD32 factor_odd) {
  359|   104k|  WORD32 i;
  360|   104k|  WORD64 sum;
  361|       |
  362|   104k|  sum = ixheaac_mult32x32in64(in[2], filter[0]);
  363|   104k|  sum = ixheaac_mac32x32in64(sum, in[1], filter[1]);
  364|   104k|  sum = ixheaac_mac32x32in64(sum, in[0], filter[2]);
  365|   104k|  sum = ixheaac_mac32x32in64_n(sum, &in[0], &filter[3], 4);
  366|   104k|  *out = ixheaac_add32_sat(
  367|   104k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
  368|   104k|  out++;
  369|       |
  370|   104k|  sum = ixheaac_mult32x32in64(in[1], filter[0]);
  371|   104k|  sum = ixheaac_mac32x32in64(sum, in[0], filter[1]);
  372|   104k|  sum = ixheaac_mac32x32in64_n(sum, &in[0], &filter[2], 5);
  373|   104k|  *out = ixheaac_add32_sat(
  374|   104k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
  375|   104k|  out++;
  376|       |
  377|   104k|  sum = ixheaac_mult32x32in64(in[0], filter[0]);
  378|   104k|  sum = ixheaac_mac32x32in64_n(sum, &in[0], &filter[1], 6);
  379|   104k|  *out = ixheaac_add32_sat(
  380|   104k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
  381|   104k|  out++;
  382|       |
  383|  6.55M|  for (i = 3; i < length - 4; i += 2) {
  ------------------
  |  Branch (383:15): [True: 6.44M, False: 104k]
  ------------------
  384|  6.44M|    sum = 0;
  385|  6.44M|    sum = ixheaac_mac32x32in64_7(&in[i - 3], filter);
  386|  6.44M|    *out = ixheaac_add32_sat(
  387|  6.44M|        *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
  388|  6.44M|    out++;
  389|       |
  390|  6.44M|    sum = 0;
  391|  6.44M|    sum = ixheaac_mac32x32in64_7(&in[i - 2], filter);
  392|  6.44M|    *out = ixheaac_add32_sat(
  393|  6.44M|        *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
  394|  6.44M|    out++;
  395|  6.44M|  }
  396|   104k|  i = length - 3;
  397|   104k|  sum = 0;
  398|   104k|  sum = ixheaac_mac32x32in64_n(sum, &in[i - 3], filter, 6);
  399|   104k|  sum = ixheaac_mac32x32in64(sum, in[i + 2], filter[6]);
  400|   104k|  *out = ixheaac_add32_sat(
  401|   104k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
  402|       |
  403|   104k|  out++;
  404|   104k|  i = length - 2;
  405|   104k|  sum = 0;
  406|   104k|  sum = ixheaac_mac32x32in64_n(sum, &in[i - 3], filter, 5);
  407|   104k|  sum = ixheaac_mac32x32in64(sum, in[i + 1], filter[5]);
  408|   104k|  sum = ixheaac_mac32x32in64(sum, in[i], filter[6]);
  409|       |
  410|   104k|  *out = ixheaac_add32_sat(
  411|   104k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
  412|   104k|  out++;
  413|       |
  414|   104k|  i = length - 1;
  415|   104k|  sum = 0;
  416|   104k|  sum = ixheaac_mac32x32in64_n(sum, &in[i - 3], filter, 4);
  417|   104k|  sum = ixheaac_mac32x32in64(sum, in[i], filter[4]);
  418|   104k|  sum = ixheaac_mac32x32in64(sum, in[i - 1], filter[5]);
  419|   104k|  sum = ixheaac_mac32x32in64(sum, in[i - 2], filter[6]);
  420|       |
  421|   104k|  *out = ixheaac_add32_sat(
  422|   104k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
  423|   104k|}

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

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

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

ixheaacd_qmf_hbe_data_reinit:
  104|  67.0k|                                    WORD16 *p_num_sfb, WORD32 upsamp_4_flag) {
  105|  67.0k|  WORD32 synth_size, sfb, patch, stop_patch;
  106|       |
  107|  67.0k|  if (ptr_hbe_txposer != NULL) {
  ------------------
  |  Branch (107:7): [True: 67.0k, False: 0]
  ------------------
  108|  67.0k|    ptr_hbe_txposer->start_band = p_freq_band_tab[LOW][0];
  ------------------
  |  |   27|  67.0k|#define LOW 0
  ------------------
  109|  67.0k|    ptr_hbe_txposer->end_band = p_freq_band_tab[LOW][p_num_sfb[LOW]];
  ------------------
  |  |   27|  67.0k|#define LOW 0
  ------------------
                  ptr_hbe_txposer->end_band = p_freq_band_tab[LOW][p_num_sfb[LOW]];
  ------------------
  |  |   27|  67.0k|#define LOW 0
  ------------------
  110|       |
  111|  67.0k|    ptr_hbe_txposer->synth_size =
  112|  67.0k|        4 * ((ptr_hbe_txposer->start_band + 4) / 8 + 1);
  113|  67.0k|    ptr_hbe_txposer->k_start =
  114|  67.0k|        ixheaac_start_subband2kL_tbl[ptr_hbe_txposer->start_band];
  115|       |
  116|  67.0k|    ptr_hbe_txposer->upsamp_4_flag = upsamp_4_flag;
  117|  67.0k|    ptr_hbe_txposer->esbr_hq = 0;
  118|       |
  119|  67.0k|    if (upsamp_4_flag) {
  ------------------
  |  Branch (119:9): [True: 3.98k, False: 63.0k]
  ------------------
  120|  3.98k|      if (ptr_hbe_txposer->k_start + ptr_hbe_txposer->synth_size > 16)
  ------------------
  |  Branch (120:11): [True: 176, False: 3.80k]
  ------------------
  121|    176|        ptr_hbe_txposer->k_start = 16 - ptr_hbe_txposer->synth_size;
  122|  63.0k|    } else if (ptr_hbe_txposer->core_frame_length == 768) {
  ------------------
  |  Branch (122:16): [True: 2.41k, False: 60.6k]
  ------------------
  123|  2.41k|      if (ptr_hbe_txposer->k_start + ptr_hbe_txposer->synth_size > 24)
  ------------------
  |  Branch (123:11): [True: 1.26k, False: 1.14k]
  ------------------
  124|  1.26k|        ptr_hbe_txposer->k_start = 24 - ptr_hbe_txposer->synth_size;
  125|  2.41k|    }
  126|       |
  127|  67.0k|    memset(ptr_hbe_txposer->synth_buf, 0, 1280 * sizeof(FLOAT32));
  128|  67.0k|    synth_size = ptr_hbe_txposer->synth_size;
  129|  67.0k|    ptr_hbe_txposer->synth_buf_offset = 18 * synth_size;
  130|  67.0k|    switch (synth_size) {
  131|     86|      case 4:
  ------------------
  |  Branch (131:7): [True: 86, False: 66.9k]
  ------------------
  132|     86|        ptr_hbe_txposer->synth_cos_tab =
  133|     86|            (FLOAT32 *)ixheaac_synth_cos_table_kl_4;
  134|     86|        ptr_hbe_txposer->analy_cos_sin_tab =
  135|     86|            (FLOAT32 *)ixheaac_analy_cos_sin_table_kl_8;
  136|     86|        ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
  137|     86|        ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaac_cmplx_anal_fft_p2;
  138|     86|        break;
  139|  12.2k|      case 8:
  ------------------
  |  Branch (139:7): [True: 12.2k, False: 54.8k]
  ------------------
  140|  12.2k|        ptr_hbe_txposer->synth_cos_tab =
  141|  12.2k|            (FLOAT32 *)ixheaac_synth_cos_table_kl_8;
  142|  12.2k|        ptr_hbe_txposer->analy_cos_sin_tab =
  143|  12.2k|            (FLOAT32 *)ixheaac_analy_cos_sin_table_kl_16;
  144|  12.2k|        ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
  145|  12.2k|        ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaac_cmplx_anal_fft_p2;
  146|  12.2k|        break;
  147|  20.3k|      case 12:
  ------------------
  |  Branch (147:7): [True: 20.3k, False: 46.6k]
  ------------------
  148|  20.3k|        ptr_hbe_txposer->synth_cos_tab =
  149|  20.3k|            (FLOAT32 *)ixheaac_synth_cos_table_kl_12;
  150|  20.3k|        ptr_hbe_txposer->analy_cos_sin_tab =
  151|  20.3k|            (FLOAT32 *)ixheaac_analy_cos_sin_table_kl_24;
  152|  20.3k|        ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p3;
  153|  20.3k|        ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaac_cmplx_anal_fft_p3;
  154|  20.3k|        break;
  155|  6.61k|      case 16:
  ------------------
  |  Branch (155:7): [True: 6.61k, False: 60.4k]
  ------------------
  156|  6.61k|        ptr_hbe_txposer->synth_cos_tab =
  157|  6.61k|            (FLOAT32 *)ixheaac_synth_cos_table_kl_16;
  158|  6.61k|        ptr_hbe_txposer->analy_cos_sin_tab =
  159|  6.61k|            (FLOAT32 *)ixheaac_analy_cos_sin_table_kl_32;
  160|  6.61k|        ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
  161|  6.61k|        ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaac_cmplx_anal_fft_p2;
  162|  6.61k|        break;
  163|  27.7k|      case 20:
  ------------------
  |  Branch (163:7): [True: 27.7k, False: 39.3k]
  ------------------
  164|  27.7k|        ptr_hbe_txposer->synth_cos_tab =
  165|  27.7k|            (FLOAT32 *)ixheaac_synth_cos_table_kl_20;
  166|  27.7k|        ptr_hbe_txposer->analy_cos_sin_tab =
  167|  27.7k|            (FLOAT32 *)ixheaac_analy_cos_sin_table_kl_40;
  168|  27.7k|        break;
  169|      0|      default:
  ------------------
  |  Branch (169:7): [True: 0, False: 67.0k]
  ------------------
  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|  67.0k|    }
  177|       |
  178|  67.0k|    ptr_hbe_txposer->synth_wind_coeff = ixheaacd_map_prot_filter(synth_size);
  179|       |
  180|  67.0k|    memset(ptr_hbe_txposer->analy_buf, 0, 640 * sizeof(FLOAT32));
  181|  67.0k|    synth_size = 2 * ptr_hbe_txposer->synth_size;
  182|  67.0k|    ptr_hbe_txposer->analy_wind_coeff = ixheaacd_map_prot_filter(synth_size);
  183|       |
  184|  67.0k|    memset(ptr_hbe_txposer->x_over_qmf, 0, MAX_NUM_PATCHES * sizeof(WORD32));
  ------------------
  |  |   23|  67.0k|#define MAX_NUM_PATCHES 6
  ------------------
  185|  67.0k|    sfb = 0;
  186|  67.0k|    if (upsamp_4_flag) {
  ------------------
  |  Branch (186:9): [True: 3.98k, False: 63.0k]
  ------------------
  187|  3.98k|      stop_patch = MAX_NUM_PATCHES;
  ------------------
  |  |   23|  3.98k|#define MAX_NUM_PATCHES 6
  ------------------
  188|  3.98k|      ptr_hbe_txposer->max_stretch = MAX_STRETCH;
  ------------------
  |  |  157|  3.98k|#define MAX_STRETCH 4
  ------------------
  189|  63.0k|    } else {
  190|  63.0k|      stop_patch = MAX_STRETCH;
  ------------------
  |  |  157|  63.0k|#define MAX_STRETCH 4
  ------------------
  191|  63.0k|    }
  192|       |
  193|   186k|    for (patch = 1; patch <= stop_patch; patch++) {
  ------------------
  |  Branch (193:21): [True: 182k, False: 4.13k]
  ------------------
  194|   703k|      while (sfb <= p_num_sfb[LOW] &&
  ------------------
  |  |   27|   703k|#define LOW 0
  ------------------
  |  Branch (194:14): [True: 640k, False: 62.8k]
  ------------------
  195|   640k|             p_freq_band_tab[LOW][sfb] <= patch * ptr_hbe_txposer->start_band)
  ------------------
  |  |   27|   640k|#define LOW 0
  ------------------
  |  Branch (195:14): [True: 521k, False: 119k]
  ------------------
  196|   521k|        sfb++;
  197|   182k|      if (sfb <= p_num_sfb[LOW]) {
  ------------------
  |  |   27|   182k|#define LOW 0
  ------------------
  |  Branch (197:11): [True: 119k, False: 62.8k]
  ------------------
  198|   119k|        if ((patch * ptr_hbe_txposer->start_band -
  ------------------
  |  Branch (198:13): [True: 105k, False: 14.0k]
  ------------------
  199|   119k|             p_freq_band_tab[LOW][sfb - 1]) <= 3) {
  ------------------
  |  |   27|   119k|#define LOW 0
  ------------------
  200|   105k|          ptr_hbe_txposer->x_over_qmf[patch - 1] =
  201|   105k|              p_freq_band_tab[LOW][sfb - 1];
  ------------------
  |  |   27|   105k|#define LOW 0
  ------------------
  202|   105k|        } else {
  203|  14.0k|          WORD32 sfb = 0;
  204|   180k|          while (sfb <= p_num_sfb[HIGH] &&
  ------------------
  |  |   28|   180k|#define HIGH 1
  ------------------
  |  Branch (204:18): [True: 180k, False: 0]
  ------------------
  205|   180k|                 p_freq_band_tab[HIGH][sfb] <=
  ------------------
  |  |   28|   180k|#define HIGH 1
  ------------------
  |  Branch (205:18): [True: 166k, False: 14.0k]
  ------------------
  206|   180k|                     patch * ptr_hbe_txposer->start_band)
  207|   166k|            sfb++;
  208|  14.0k|          ptr_hbe_txposer->x_over_qmf[patch - 1] =
  209|  14.0k|              p_freq_band_tab[HIGH][sfb - 1];
  ------------------
  |  |   28|  14.0k|#define HIGH 1
  ------------------
  210|  14.0k|        }
  211|   119k|      } else {
  212|  62.8k|        ptr_hbe_txposer->x_over_qmf[patch - 1] = ptr_hbe_txposer->end_band;
  213|  62.8k|        ptr_hbe_txposer->max_stretch = min(patch, MAX_STRETCH);
  ------------------
  |  |   75|  62.8k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 50.8k, False: 12.0k]
  |  |  ------------------
  ------------------
  214|  62.8k|        break;
  215|  62.8k|      }
  216|   182k|    }
  217|  67.0k|    if (ptr_hbe_txposer->k_start < 0) {
  ------------------
  |  Branch (217:9): [True: 0, False: 67.0k]
  ------------------
  218|      0|      return -1;
  219|      0|    }
  220|  67.0k|  }
  221|  67.0k|  return 0;
  222|  67.0k|}
ixheaacd_qmf_hbe_apply:
  230|   254k|                              ia_sbr_header_data_struct *ptr_header_data) {
  231|   254k|  WORD32 i, qmf_band_idx;
  232|   254k|  WORD32 qmf_voc_columns = ptr_hbe_txposer->no_bins / 2;
  233|   254k|  WORD32 err_code = 0;
  234|       |
  235|   254k|  memcpy(ptr_hbe_txposer->ptr_input_buf,
  236|   254k|         ptr_hbe_txposer->ptr_input_buf +
  237|   254k|             ptr_hbe_txposer->no_bins * ptr_hbe_txposer->synth_size,
  238|   254k|         ptr_hbe_txposer->synth_size * sizeof(FLOAT32));
  239|       |
  240|   254k|  if (ptr_hbe_txposer->ixheaacd_cmplx_anal_fft == NULL) {
  ------------------
  |  Branch (240:7): [True: 18.0k, False: 236k]
  ------------------
  241|  18.0k|    WORD32 err = ixheaacd_qmf_hbe_data_reinit(
  242|  18.0k|        ptr_hbe_txposer,
  243|  18.0k|        ptr_header_data->pstr_freq_band_data->freq_band_table,
  244|  18.0k|        ptr_header_data->pstr_freq_band_data->num_sf_bands,
  245|  18.0k|        ptr_header_data->is_usf_4);
  246|  18.0k|    if (err)
  ------------------
  |  Branch (246:9): [True: 0, False: 18.0k]
  ------------------
  247|      0|      return err;
  248|  18.0k|  }
  249|       |
  250|   254k|  err_code = ixheaacd_real_synth_filt(ptr_hbe_txposer, num_columns,
  251|   254k|                                      qmf_buf_real, qmf_buf_imag);
  252|   254k|  if (err_code) return err_code;
  ------------------
  |  Branch (252:7): [True: 4, False: 254k]
  ------------------
  253|       |
  254|  3.30M|  for (i = 0; i < HBE_OPER_WIN_LEN - 1; i++) {
  ------------------
  |  |  108|  3.30M|#define HBE_OPER_WIN_LEN (13)
  ------------------
  |  Branch (254:15): [True: 3.05M, False: 254k]
  ------------------
  255|  3.05M|    memcpy(ptr_hbe_txposer->qmf_in_buf[i],
  256|  3.05M|           ptr_hbe_txposer->qmf_in_buf[i + qmf_voc_columns],
  257|  3.05M|           TWICE_QMF_SYNTH_CHANNELS_NUM * sizeof(FLOAT32));
  ------------------
  |  |  110|  3.05M|#define TWICE_QMF_SYNTH_CHANNELS_NUM 128
  ------------------
  258|  3.05M|  }
  259|       |
  260|   254k|  err_code = ixheaacd_complex_anal_filt(ptr_hbe_txposer);
  261|   254k|  if (err_code) return err_code;
  ------------------
  |  Branch (261:7): [True: 0, False: 254k]
  ------------------
  262|       |
  263|  9.43M|  for (i = 0; i < (ptr_hbe_txposer->hbe_qmf_out_len - ptr_hbe_txposer->no_bins);
  ------------------
  |  Branch (263:15): [True: 9.18M, False: 254k]
  ------------------
  264|  9.18M|       i++) {
  265|  9.18M|    memcpy(ptr_hbe_txposer->qmf_out_buf[i],
  266|  9.18M|           ptr_hbe_txposer->qmf_out_buf[i + ptr_hbe_txposer->no_bins],
  267|  9.18M|           TWICE_QMF_SYNTH_CHANNELS_NUM * sizeof(FLOAT32));
  ------------------
  |  |  110|  9.18M|#define TWICE_QMF_SYNTH_CHANNELS_NUM 128
  ------------------
  268|  9.18M|  }
  269|       |
  270|  9.43M|  for (; i < ptr_hbe_txposer->hbe_qmf_out_len; i++) {
  ------------------
  |  Branch (270:10): [True: 9.18M, False: 254k]
  ------------------
  271|  9.18M|    memset(ptr_hbe_txposer->qmf_out_buf[i], 0,
  272|  9.18M|           TWICE_QMF_SYNTH_CHANNELS_NUM * sizeof(FLOAT32));
  ------------------
  |  |  110|  9.18M|#define TWICE_QMF_SYNTH_CHANNELS_NUM 128
  ------------------
  273|  9.18M|  }
  274|       |
  275|   254k|  err_code = ixheaacd_hbe_post_anal_process(ptr_hbe_txposer, pitch_in_bins,
  276|   254k|                                            ptr_hbe_txposer->upsamp_4_flag);
  277|   254k|  if (err_code) return err_code;
  ------------------
  |  Branch (277:7): [True: 0, False: 254k]
  ------------------
  278|       |
  279|  9.43M|  for (i = 0; i < ptr_hbe_txposer->no_bins; i++) {
  ------------------
  |  Branch (279:15): [True: 9.18M, False: 254k]
  ------------------
  280|  9.18M|    for (qmf_band_idx = ptr_hbe_txposer->start_band;
  281|   207M|         qmf_band_idx < ptr_hbe_txposer->end_band; qmf_band_idx++) {
  ------------------
  |  Branch (281:10): [True: 198M, False: 9.18M]
  ------------------
  282|   198M|      pv_qmf_buf_real[i][qmf_band_idx] =
  283|   198M|          (FLOAT32)(ptr_hbe_txposer->qmf_out_buf[i][2 * qmf_band_idx] *
  284|   198M|                        ixheaac_phase_vocoder_cos_table[qmf_band_idx] -
  285|   198M|                    ptr_hbe_txposer->qmf_out_buf[i][2 * qmf_band_idx + 1] *
  286|   198M|                        ixheaac_phase_vocoder_sin_table[qmf_band_idx]);
  287|       |
  288|   198M|      pv_qmf_buf_imag[i][qmf_band_idx] =
  289|   198M|          (FLOAT32)(ptr_hbe_txposer->qmf_out_buf[i][2 * qmf_band_idx] *
  290|   198M|                        ixheaac_phase_vocoder_sin_table[qmf_band_idx] +
  291|   198M|                    ptr_hbe_txposer->qmf_out_buf[i][2 * qmf_band_idx + 1] *
  292|   198M|                        ixheaac_phase_vocoder_cos_table[qmf_band_idx]);
  293|   198M|    }
  294|  9.18M|  }
  295|   254k|  return 0;
  296|   254k|}
ixheaacd_norm_qmf_in_buf_4:
  299|  86.9k|                                WORD32 qmf_band_idx) {
  300|  86.9k|  WORD32 i;
  301|  86.9k|  FLOAT32 *in_buf = &ptr_hbe_txposer->qmf_in_buf[0][2 * qmf_band_idx];
  302|  86.9k|  FLOAT32 *norm_buf = &ptr_hbe_txposer->norm_qmf_in_buf[0][2 * qmf_band_idx];
  303|       |
  304|  2.56M|  for (; qmf_band_idx <= ptr_hbe_txposer->x_over_qmf[3]; qmf_band_idx++) {
  ------------------
  |  Branch (304:10): [True: 2.47M, False: 86.9k]
  ------------------
  305|  88.8M|    for (i = 0; i < ptr_hbe_txposer->hbe_qmf_in_len; i++) {
  ------------------
  |  Branch (305:17): [True: 86.3M, False: 2.47M]
  ------------------
  306|  86.3M|      FLOAT32 mag_scaling_fac = 0.0f;
  307|  86.3M|      FLOAT32 x_r, x_i, temp;
  308|  86.3M|      FLOAT64 base = 1e-17;
  309|  86.3M|      x_r = in_buf[0];
  310|  86.3M|      x_i = in_buf[1];
  311|       |
  312|  86.3M|      temp = x_r * x_r;
  313|  86.3M|      base = base + temp;
  314|  86.3M|      temp = x_i * x_i;
  315|  86.3M|      base = base + temp;
  316|       |
  317|  86.3M|      temp = (FLOAT32)sqrt(sqrt(base));
  318|  86.3M|      mag_scaling_fac = temp * (FLOAT32)(sqrt(temp));
  319|       |
  320|  86.3M|      mag_scaling_fac = 1 / mag_scaling_fac;
  321|       |
  322|  86.3M|      x_r *= mag_scaling_fac;
  323|  86.3M|      x_i *= mag_scaling_fac;
  324|       |
  325|  86.3M|      norm_buf[0] = x_r;
  326|  86.3M|      norm_buf[1] = x_i;
  327|       |
  328|  86.3M|      in_buf += 128;
  329|  86.3M|      norm_buf += 128;
  330|  86.3M|    }
  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|  86.9k|}
ixheaacd_norm_qmf_in_buf_2:
  338|   238k|                                WORD32 qmf_band_idx) {
  339|   238k|  WORD32 i;
  340|   238k|  FLOAT32 *in_buf = &ptr_hbe_txposer->qmf_in_buf[0][2 * qmf_band_idx];
  341|   238k|  FLOAT32 *norm_buf = &ptr_hbe_txposer->norm_qmf_in_buf[0][2 * qmf_band_idx];
  342|       |
  343|  3.20M|  for (; qmf_band_idx <= ptr_hbe_txposer->x_over_qmf[1]; qmf_band_idx++) {
  ------------------
  |  Branch (343:10): [True: 2.96M, False: 238k]
  ------------------
  344|   104M|    for (i = 0; i < ptr_hbe_txposer->hbe_qmf_in_len; i++) {
  ------------------
  |  Branch (344:17): [True: 101M, False: 2.96M]
  ------------------
  345|   101M|      FLOAT32 mag_scaling_fac = 0.0f;
  346|   101M|      FLOAT32 x_r, x_i, temp;
  347|   101M|      FLOAT64 base = 1e-17;
  348|   101M|      x_r = in_buf[0];
  349|   101M|      x_i = in_buf[1];
  350|       |
  351|   101M|      temp = x_r * x_r;
  352|   101M|      base = base + temp;
  353|   101M|      temp = x_i * x_i;
  354|   101M|      base = base + x_i * x_i;
  355|       |
  356|   101M|      mag_scaling_fac = (FLOAT32)(1.0f / base);
  357|   101M|      mag_scaling_fac = (FLOAT32)sqrt(sqrt(mag_scaling_fac));
  358|       |
  359|   101M|      x_r *= mag_scaling_fac;
  360|   101M|      x_i *= mag_scaling_fac;
  361|       |
  362|   101M|      norm_buf[0] = x_r;
  363|   101M|      norm_buf[1] = x_i;
  364|       |
  365|   101M|      in_buf += 128;
  366|   101M|      norm_buf += 128;
  367|   101M|    }
  368|       |
  369|  2.96M|    in_buf -= (128 * (ptr_hbe_txposer->hbe_qmf_in_len) - 2);
  370|  2.96M|    norm_buf -= (128 * (ptr_hbe_txposer->hbe_qmf_in_len) - 2);
  371|  2.96M|  }
  372|   238k|}
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.66M|  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: 833k, False: 1.61M]
  |  |  ------------------
  ------------------
  407|       |
  408|  2.44M|    if (temp > max_mag_value) {
  ------------------
  |  Branch (408:9): [True: 1.50M, False: 939k]
  ------------------
  409|  1.50M|      max_mag_value = temp;
  410|  1.50M|      max_trans_fac = tr;
  411|  1.50M|      max_n1 = n1;
  412|  1.50M|      max_n2 = n2;
  413|  1.50M|    }
  414|  2.44M|  }
  415|       |
  416|  1.22M|  if (max_mag_value > mag_zero_band && max_n1 >= 0 &&
  ------------------
  |  Branch (416:7): [True: 382k, False: 840k]
  |  Branch (416:40): [True: 382k, False: 0]
  ------------------
  417|   382k|      max_n2 < NO_QMF_SYNTH_CHANNELS) {
  ------------------
  |  |  109|   382k|#define NO_QMF_SYNTH_CHANNELS 64
  ------------------
  |  Branch (417:7): [True: 382k, False: 0]
  ------------------
  418|   382k|    FLOAT32 vec_y_r[2], vec_y_i[2], vec_o_r[2], vec_o_i[2];
  419|   382k|    FLOAT32 coeff_real[2], coeff_imag[2];
  420|   382k|    FLOAT32 d1, d2;
  421|   382k|    WORD32 mid_trans_fac, idx;
  422|   382k|    FLOAT64 base = 1e-17;
  423|   382k|    FLOAT32 mag_scaling_fac = 0;
  424|   382k|    FLOAT32 x_zero_band_r;
  425|   382k|    FLOAT32 x_zero_band_i;
  426|       |
  427|   382k|    x_zero_band_r = 0;
  428|   382k|    x_zero_band_i = 0;
  429|   382k|    mid_trans_fac = 3 - max_trans_fac;
  430|   382k|    if (max_trans_fac == 1) {
  ------------------
  |  Branch (430:9): [True: 166k, False: 215k]
  ------------------
  431|   166k|      WORD32 idx;
  432|   166k|      d1 = 0;
  433|   166k|      d2 = 1.5;
  434|   166k|      x_zero_band_r = qmf_in_buf_ri[2 * max_n1];
  435|   166k|      x_zero_band_i = qmf_in_buf_ri[2 * max_n1 + 1];
  436|       |
  437|   166k|      idx = max_n2 & 3;
  438|   166k|      idx = (idx + 1) & 3;
  439|   166k|      coeff_real[0] = ixheaac_hbe_post_anal_proc_interp_coeff[idx][0];
  440|   166k|      coeff_imag[0] = ixheaac_hbe_post_anal_proc_interp_coeff[idx][1];
  441|       |
  442|   166k|      coeff_real[1] = coeff_real[0];
  443|   166k|      coeff_imag[1] = -coeff_imag[0];
  444|       |
  445|   166k|      vec_y_r[1] = qmf_in_buf_ri[2 * max_n2];
  446|   166k|      vec_y_i[1] = qmf_in_buf_ri[2 * max_n2 + 1];
  447|       |
  448|   166k|      addrshift = -2;
  449|   166k|      temp_r = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift +
  450|   166k|                                           HBE_ZERO_BAND_IDX][2 * max_n2];
  ------------------
  |  |  204|   166k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  451|   166k|      temp_i = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift +
  452|   166k|                                           HBE_ZERO_BAND_IDX][2 * max_n2 + 1];
  ------------------
  |  |  204|   166k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  453|       |
  454|   166k|      vec_y_r[0] = coeff_real[1] * temp_r - coeff_imag[1] * temp_i;
  455|   166k|      vec_y_i[0] = coeff_imag[1] * temp_r + coeff_real[1] * temp_i;
  456|       |
  457|   166k|      temp_r = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift + 1 +
  458|   166k|                                           HBE_ZERO_BAND_IDX][2 * max_n2];
  ------------------
  |  |  204|   166k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  459|   166k|      temp_i = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift + 1 +
  460|   166k|                                           HBE_ZERO_BAND_IDX][2 * max_n2 + 1];
  ------------------
  |  |  204|   166k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  461|       |
  462|   166k|      vec_y_r[0] += coeff_real[0] * temp_r - coeff_imag[0] * temp_i;
  463|   166k|      vec_y_i[0] += coeff_imag[0] * temp_r + coeff_real[0] * temp_i;
  464|       |
  465|   215k|    } else {
  466|   215k|      WORD32 idx;
  467|   215k|      d1 = 1.5;
  468|   215k|      d2 = 0;
  469|   215k|      mid_trans_fac = max_trans_fac;
  470|   215k|      max_trans_fac = 3 - max_trans_fac;
  471|       |
  472|   215k|      x_zero_band_r = qmf_in_buf_ri[2 * max_n2];
  473|   215k|      x_zero_band_i = qmf_in_buf_ri[2 * max_n2 + 1];
  474|       |
  475|   215k|      idx = (max_n1 & 3);
  476|   215k|      idx = (idx + 1) & 3;
  477|   215k|      coeff_real[0] = ixheaac_hbe_post_anal_proc_interp_coeff[idx][0];
  478|   215k|      coeff_imag[0] = ixheaac_hbe_post_anal_proc_interp_coeff[idx][1];
  479|       |
  480|   215k|      coeff_real[1] = coeff_real[0];
  481|   215k|      coeff_imag[1] = -coeff_imag[0];
  482|       |
  483|   215k|      vec_y_r[1] = qmf_in_buf_ri[2 * max_n1];
  484|   215k|      vec_y_i[1] = qmf_in_buf_ri[2 * max_n1 + 1];
  485|       |
  486|   215k|      addrshift = -2;
  487|       |
  488|   215k|      temp_r = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift +
  489|   215k|                                           HBE_ZERO_BAND_IDX][2 * max_n1];
  ------------------
  |  |  204|   215k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  490|   215k|      temp_i = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift +
  491|   215k|                                           HBE_ZERO_BAND_IDX][2 * max_n1 + 1];
  ------------------
  |  |  204|   215k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  492|       |
  493|   215k|      vec_y_r[0] = coeff_real[1] * temp_r - coeff_imag[1] * temp_i;
  494|   215k|      vec_y_i[0] = coeff_imag[1] * temp_r + coeff_real[1] * temp_i;
  495|       |
  496|   215k|      temp_r = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift + 1 +
  497|   215k|                                           HBE_ZERO_BAND_IDX][2 * max_n1];
  ------------------
  |  |  204|   215k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  498|   215k|      temp_i = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift + 1 +
  499|   215k|                                           HBE_ZERO_BAND_IDX][2 * max_n1 + 1];
  ------------------
  |  |  204|   215k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  500|       |
  501|   215k|      vec_y_r[0] += coeff_real[0] * temp_r - coeff_imag[0] * temp_i;
  502|   215k|      vec_y_i[0] += coeff_imag[0] * temp_r + coeff_real[0] * temp_i;
  503|   215k|    }
  504|       |
  505|   382k|    base = 1e-17;
  506|   382k|    base = base + x_zero_band_r * x_zero_band_r;
  507|   382k|    base = base + x_zero_band_i * x_zero_band_i;
  508|   382k|    mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base));
  ------------------
  |  |   25|   382k|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  509|   382k|    x_zero_band_r *= mag_scaling_fac;
  510|   382k|    x_zero_band_i *= mag_scaling_fac;
  511|  1.14M|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (511:17): [True: 764k, False: 382k]
  ------------------
  512|   764k|      base = 1e-17;
  513|   764k|      base = base + vec_y_r[k] * vec_y_r[k];
  514|   764k|      base = base + vec_y_i[k] * vec_y_i[k];
  515|   764k|      mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base));
  ------------------
  |  |   25|   764k|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  516|   764k|      vec_y_r[k] *= mag_scaling_fac;
  517|   764k|      vec_y_i[k] *= mag_scaling_fac;
  518|   764k|    }
  519|       |
  520|   382k|    temp_r = x_zero_band_r;
  521|   382k|    temp_i = x_zero_band_i;
  522|   764k|    for (idx = 0; idx < mid_trans_fac - 1; idx++) {
  ------------------
  |  Branch (522:19): [True: 382k, False: 382k]
  ------------------
  523|   382k|      FLOAT32 tmp = x_zero_band_r;
  524|   382k|      x_zero_band_r = x_zero_band_r * temp_r - x_zero_band_i * temp_i;
  525|   382k|      x_zero_band_i = tmp * temp_i + x_zero_band_i * temp_r;
  526|   382k|    }
  527|       |
  528|  1.14M|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (528:17): [True: 764k, False: 382k]
  ------------------
  529|   764k|      temp_r = vec_y_r[k];
  530|   764k|      temp_i = vec_y_i[k];
  531|   764k|      for (idx = 0; idx < max_trans_fac - 1; idx++) {
  ------------------
  |  Branch (531:21): [True: 0, False: 764k]
  ------------------
  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|   764k|    }
  537|       |
  538|  1.14M|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (538:17): [True: 764k, False: 382k]
  ------------------
  539|   764k|      vec_o_r[k] = vec_y_r[k] * x_zero_band_r - vec_y_i[k] * x_zero_band_i;
  540|   764k|      vec_o_i[k] = vec_y_r[k] * x_zero_band_i + vec_y_i[k] * x_zero_band_r;
  541|   764k|    }
  542|       |
  543|   382k|    {
  544|   382k|      FLOAT32 cos_theta =
  545|   382k|          ixheaac_hbe_x_prod_cos_table_trans_3[(pitch_in_bins_idx << 1) + 0];
  546|   382k|      FLOAT32 sin_theta =
  547|   382k|          ixheaac_hbe_x_prod_cos_table_trans_3[(pitch_in_bins_idx << 1) + 1];
  548|   382k|      if (d2 < d1) {
  ------------------
  |  Branch (548:11): [True: 215k, False: 166k]
  ------------------
  549|   215k|        sin_theta = -sin_theta;
  550|   215k|      }
  551|   382k|      temp_r = vec_o_r[0];
  552|   382k|      temp_i = vec_o_i[0];
  553|   382k|      vec_o_r[0] = (FLOAT32)(cos_theta * temp_r - sin_theta * temp_i);
  554|   382k|      vec_o_i[0] = (FLOAT32)(cos_theta * temp_i + sin_theta * temp_r);
  555|   382k|    }
  556|       |
  557|  1.14M|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (557:17): [True: 764k, False: 382k]
  ------------------
  558|   764k|      ptr_hbe_txposer->qmf_out_buf[qmf_col_idx * 2 + (k + HBE_ZERO_BAND_IDX -
  ------------------
  |  |  204|   764k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  559|   764k|                                                      1)][2 * qmf_band_idx] +=
  560|   764k|          (FLOAT32)(mag_cmplx_gain * vec_o_r[k]);
  561|   764k|      ptr_hbe_txposer
  562|   764k|          ->qmf_out_buf[qmf_col_idx * 2 + (k + HBE_ZERO_BAND_IDX - 1)]
  ------------------
  |  |  204|   764k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  563|   764k|                       [2 * qmf_band_idx + 1] +=
  564|   764k|          (FLOAT32)(mag_cmplx_gain * vec_o_i[k]);
  565|   764k|    }
  566|   382k|  }
  567|  1.22M|}
ixheaacd_hbe_xprod_proc_4:
  571|   766k|                               FLOAT32 p, WORD32 pitch_in_bins_idx) {
  572|   766k|  WORD32 k;
  573|   766k|  WORD32 inp_band_idx = qmf_band_idx >> 1;
  574|   766k|  WORD32 tr, n1, n2, max_trans_fac, max_n1, max_n2;
  575|       |
  576|   766k|  FLOAT64 temp_fac;
  577|   766k|  FLOAT32 max_mag_value, mag_zero_band, mag_n1_band, mag_n2_band, temp;
  578|   766k|  FLOAT32 temp_r, temp_i;
  579|   766k|  FLOAT32 mag_cmplx_gain = 2.0f;
  580|       |
  581|   766k|  FLOAT32 *qmf_in_buf_ri =
  582|   766k|      ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX];
  ------------------
  |  |  204|   766k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  583|       |
  584|   766k|  mag_zero_band =
  585|   766k|      qmf_in_buf_ri[2 * inp_band_idx] * qmf_in_buf_ri[2 * inp_band_idx] +
  586|   766k|      qmf_in_buf_ri[2 * inp_band_idx + 1] * qmf_in_buf_ri[2 * inp_band_idx + 1];
  587|       |
  588|   766k|  max_mag_value = 0;
  589|   766k|  max_n1 = max_n2 = max_trans_fac = 0;
  590|       |
  591|  3.06M|  for (tr = 1; tr < 4; tr++) {
  ------------------
  |  Branch (591:16): [True: 2.30M, False: 766k]
  ------------------
  592|  2.30M|    temp_fac = (2.0 * qmf_band_idx + 1 - tr * p) * 0.25;
  593|  2.30M|    n1 = ((WORD32)(temp_fac)) << 1;
  594|  2.30M|    n2 = ((WORD32)(temp_fac + p)) << 1;
  595|       |
  596|  2.30M|    mag_n1_band = qmf_in_buf_ri[n1] * qmf_in_buf_ri[n1] +
  597|  2.30M|                  qmf_in_buf_ri[n1 + 1] * qmf_in_buf_ri[n1 + 1];
  598|  2.30M|    mag_n2_band = qmf_in_buf_ri[n2] * qmf_in_buf_ri[n2] +
  599|  2.30M|                  qmf_in_buf_ri[n2 + 1] * qmf_in_buf_ri[n2 + 1];
  600|       |
  601|  2.30M|    temp = min(mag_n1_band, mag_n2_band);
  ------------------
  |  |   75|  2.30M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 689k, False: 1.61M]
  |  |  ------------------
  ------------------
  602|       |
  603|  2.30M|    if (temp > max_mag_value) {
  ------------------
  |  Branch (603:9): [True: 1.06M, False: 1.23M]
  ------------------
  604|  1.06M|      max_mag_value = temp;
  605|  1.06M|      max_trans_fac = tr;
  606|  1.06M|      max_n1 = n1;
  607|  1.06M|      max_n2 = n2;
  608|  1.06M|    }
  609|  2.30M|  }
  610|   766k|  if (max_mag_value > mag_zero_band && max_n1 >= 0 &&
  ------------------
  |  Branch (610:7): [True: 260k, False: 506k]
  |  Branch (610:40): [True: 260k, False: 0]
  ------------------
  611|   260k|      max_n2 < TWICE_QMF_SYNTH_CHANNELS_NUM) {
  ------------------
  |  |  110|   260k|#define TWICE_QMF_SYNTH_CHANNELS_NUM 128
  ------------------
  |  Branch (611:7): [True: 260k, False: 0]
  ------------------
  612|   260k|    FLOAT32 vec_y_r[2], vec_y_i[2], vec_o_r[2], vec_o_i[2];
  613|   260k|    FLOAT32 d1, d2;
  614|   260k|    WORD32 mid_trans_fac, idx;
  615|   260k|    FLOAT32 x_zero_band_r;
  616|   260k|    FLOAT32 x_zero_band_i;
  617|   260k|    FLOAT64 base = 1e-17;
  618|   260k|    FLOAT32 mag_scaling_fac = 0.0f;
  619|       |
  620|   260k|    x_zero_band_r = 0;
  621|   260k|    x_zero_band_i = 0;
  622|   260k|    mid_trans_fac = 4 - max_trans_fac;
  623|       |
  624|   260k|    if (max_trans_fac == 1) {
  ------------------
  |  Branch (624:9): [True: 76.1k, False: 183k]
  ------------------
  625|  76.1k|      d1 = 0;
  626|  76.1k|      d2 = 2;
  627|  76.1k|      x_zero_band_r = qmf_in_buf_ri[max_n1];
  628|  76.1k|      x_zero_band_i = qmf_in_buf_ri[max_n1 + 1];
  629|   228k|      for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (629:19): [True: 152k, False: 76.1k]
  ------------------
  630|   152k|        vec_y_r[k] =
  631|   152k|            ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX +
  ------------------
  |  |  204|   152k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  632|   152k|                                        2 * (k - 1)][max_n2];
  633|   152k|        vec_y_i[k] =
  634|   152k|            ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX +
  ------------------
  |  |  204|   152k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  635|   152k|                                        2 * (k - 1)][max_n2 + 1];
  636|   152k|      }
  637|   183k|    } else if (max_trans_fac == 2) {
  ------------------
  |  Branch (637:16): [True: 92.9k, False: 90.8k]
  ------------------
  638|  92.9k|      d1 = 0;
  639|  92.9k|      d2 = 1;
  640|  92.9k|      x_zero_band_r = qmf_in_buf_ri[max_n1];
  641|  92.9k|      x_zero_band_i = qmf_in_buf_ri[max_n1 + 1];
  642|   278k|      for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (642:19): [True: 185k, False: 92.9k]
  ------------------
  643|   185k|        vec_y_r[k] =
  644|   185k|            ptr_hbe_txposer
  645|   185k|                ->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX + (k - 1)][max_n2];
  ------------------
  |  |  204|   185k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  646|   185k|        vec_y_i[k] =
  647|   185k|            ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX +
  ------------------
  |  |  204|   185k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  648|   185k|                                        (k - 1)][max_n2 + 1];
  649|   185k|      }
  650|  92.9k|    } else {
  651|  90.8k|      d1 = 2;
  652|  90.8k|      d2 = 0;
  653|  90.8k|      mid_trans_fac = max_trans_fac;
  654|  90.8k|      max_trans_fac = 4 - max_trans_fac;
  655|  90.8k|      x_zero_band_r = qmf_in_buf_ri[max_n2];
  656|  90.8k|      x_zero_band_i = qmf_in_buf_ri[max_n2 + 1];
  657|   272k|      for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (657:19): [True: 181k, False: 90.8k]
  ------------------
  658|   181k|        vec_y_r[k] =
  659|   181k|            ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX +
  ------------------
  |  |  204|   181k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  660|   181k|                                        2 * (k - 1)][max_n1];
  661|   181k|        vec_y_i[k] =
  662|   181k|            ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX +
  ------------------
  |  |  204|   181k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  663|   181k|                                        2 * (k - 1)][max_n1 + 1];
  664|   181k|      }
  665|  90.8k|    }
  666|       |
  667|   260k|    base = 1e-17;
  668|   260k|    base = base + x_zero_band_r * x_zero_band_r;
  669|   260k|    base = base + x_zero_band_i * x_zero_band_i;
  670|   260k|    {
  671|   260k|      temp = (FLOAT32)sqrt(sqrt(base));
  672|   260k|      mag_scaling_fac = temp * (FLOAT32)(sqrt(temp));
  673|   260k|      mag_scaling_fac = 1 / mag_scaling_fac;
  674|   260k|    }
  675|       |
  676|   260k|    x_zero_band_r *= mag_scaling_fac;
  677|   260k|    x_zero_band_i *= mag_scaling_fac;
  678|   780k|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (678:17): [True: 520k, False: 260k]
  ------------------
  679|   520k|      base = 1e-17;
  680|   520k|      base = base + vec_y_r[k] * vec_y_r[k];
  681|   520k|      base = base + vec_y_i[k] * vec_y_i[k];
  682|   520k|      {
  683|   520k|        temp = (FLOAT32)sqrt(sqrt(base));
  684|   520k|        mag_scaling_fac = temp * (FLOAT32)(sqrt(temp));
  685|       |
  686|   520k|        mag_scaling_fac = 1 / mag_scaling_fac;
  687|   520k|      }
  688|   520k|      vec_y_r[k] *= mag_scaling_fac;
  689|   520k|      vec_y_i[k] *= mag_scaling_fac;
  690|   520k|    }
  691|       |
  692|   260k|    temp_r = x_zero_band_r;
  693|   260k|    temp_i = x_zero_band_i;
  694|   687k|    for (idx = 0; idx < mid_trans_fac - 1; idx++) {
  ------------------
  |  Branch (694:19): [True: 427k, False: 260k]
  ------------------
  695|   427k|      FLOAT32 tmp = x_zero_band_r;
  696|   427k|      x_zero_band_r = x_zero_band_r * temp_r - x_zero_band_i * temp_i;
  697|   427k|      x_zero_band_i = tmp * temp_i + x_zero_band_i * temp_r;
  698|   427k|    }
  699|       |
  700|   780k|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (700:17): [True: 520k, False: 260k]
  ------------------
  701|   520k|      temp_r = vec_y_r[k];
  702|   520k|      temp_i = vec_y_i[k];
  703|   706k|      for (idx = 0; idx < max_trans_fac - 1; idx++) {
  ------------------
  |  Branch (703:21): [True: 185k, False: 520k]
  ------------------
  704|   185k|        FLOAT32 tmp = vec_y_r[k];
  705|   185k|        vec_y_r[k] = vec_y_r[k] * temp_r - vec_y_i[k] * temp_i;
  706|   185k|        vec_y_i[k] = tmp * temp_i + vec_y_i[k] * temp_r;
  707|   185k|      }
  708|   520k|    }
  709|       |
  710|   780k|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (710:17): [True: 520k, False: 260k]
  ------------------
  711|   520k|      vec_o_r[k] = vec_y_r[k] * x_zero_band_r - vec_y_i[k] * x_zero_band_i;
  712|   520k|      vec_o_i[k] = vec_y_r[k] * x_zero_band_i + vec_y_i[k] * x_zero_band_r;
  713|   520k|    }
  714|       |
  715|   260k|    {
  716|   260k|      FLOAT32 cos_theta;
  717|   260k|      FLOAT32 sin_theta;
  718|       |
  719|   260k|      if (d2 == 1) {
  ------------------
  |  Branch (719:11): [True: 92.9k, False: 167k]
  ------------------
  720|  92.9k|        cos_theta =
  721|  92.9k|            ixheaac_hbe_x_prod_cos_table_trans_4_1[(pitch_in_bins_idx << 1) +
  722|  92.9k|                                                    0];
  723|  92.9k|        sin_theta =
  724|  92.9k|            ixheaac_hbe_x_prod_cos_table_trans_4_1[(pitch_in_bins_idx << 1) +
  725|  92.9k|                                                    1];
  726|   167k|      } else {
  727|   167k|        cos_theta =
  728|   167k|            ixheaac_hbe_x_prod_cos_table_trans_4[(pitch_in_bins_idx << 1) + 0];
  729|   167k|        sin_theta =
  730|   167k|            ixheaac_hbe_x_prod_cos_table_trans_4[(pitch_in_bins_idx << 1) + 1];
  731|   167k|        if (d2 < d1) {
  ------------------
  |  Branch (731:13): [True: 90.8k, False: 76.1k]
  ------------------
  732|  90.8k|          sin_theta = -sin_theta;
  733|  90.8k|        }
  734|   167k|      }
  735|   260k|      temp_r = vec_o_r[0];
  736|   260k|      temp_i = vec_o_i[0];
  737|   260k|      vec_o_r[0] = (FLOAT32)(cos_theta * temp_r - sin_theta * temp_i);
  738|   260k|      vec_o_i[0] = (FLOAT32)(cos_theta * temp_i + sin_theta * temp_r);
  739|   260k|    }
  740|       |
  741|   780k|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (741:17): [True: 520k, False: 260k]
  ------------------
  742|   520k|      ptr_hbe_txposer->qmf_out_buf[qmf_col_idx * 2 + (k + HBE_ZERO_BAND_IDX -
  ------------------
  |  |  204|   520k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  743|   520k|                                                      1)][2 * qmf_band_idx] +=
  744|   520k|          (FLOAT32)(mag_cmplx_gain * vec_o_r[k]);
  745|   520k|      ptr_hbe_txposer
  746|   520k|          ->qmf_out_buf[qmf_col_idx * 2 + (k + HBE_ZERO_BAND_IDX - 1)]
  ------------------
  |  |  204|   520k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  747|   520k|                       [2 * qmf_band_idx + 1] +=
  748|   520k|          (FLOAT32)(mag_cmplx_gain * vec_o_i[k]);
  749|   520k|    }
  750|   260k|  }
  751|   766k|}
ixheaacd_hbe_post_anal_prod2:
  754|   228k|                                  WORD32 qmf_voc_columns, WORD32 qmf_band_idx) {
  755|   228k|  WORD32 i;
  756|   228k|  FLOAT32 *norm_ptr = &ptr_hbe_txposer->norm_qmf_in_buf[1][2 * qmf_band_idx];
  757|   228k|  FLOAT32 *out_ptr = &ptr_hbe_txposer->qmf_out_buf[1][2 * qmf_band_idx];
  758|   228k|  FLOAT32 *x_norm_ptr =
  759|   228k|      &ptr_hbe_txposer->norm_qmf_in_buf[HBE_ZERO_BAND_IDX][2 * qmf_band_idx];
  ------------------
  |  |  204|   228k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  760|       |
  761|   228k|  ixheaacd_norm_qmf_in_buf_2(ptr_hbe_txposer, qmf_band_idx);
  762|       |
  763|  2.83M|  for (; qmf_band_idx < ptr_hbe_txposer->x_over_qmf[1]; qmf_band_idx++) {
  ------------------
  |  Branch (763:10): [True: 2.60M, False: 228k]
  ------------------
  764|  47.1M|    for (i = 0; i < qmf_voc_columns; i++) {
  ------------------
  |  Branch (764:17): [True: 44.5M, False: 2.60M]
  ------------------
  765|  44.5M|      WORD32 k;
  766|  44.5M|      FLOAT32 x_zero_band_r, x_zero_band_i;
  767|       |
  768|  44.5M|      x_zero_band_r = *x_norm_ptr++;
  769|  44.5M|      x_zero_band_i = *x_norm_ptr++;
  770|       |
  771|   489M|      for (k = 0; k < HBE_OPER_BLK_LEN_2; k++) {
  ------------------
  |  |  127|   489M|#define HBE_OPER_BLK_LEN_2 10
  ------------------
  |  Branch (771:19): [True: 445M, False: 44.5M]
  ------------------
  772|   445M|        register FLOAT32 tmp_r, tmp_i;
  773|   445M|        tmp_r = *norm_ptr++;
  774|   445M|        tmp_i = *norm_ptr++;
  775|       |
  776|   445M|        *out_ptr++ +=
  777|   445M|            ((tmp_r * x_zero_band_r - tmp_i * x_zero_band_i) * 0.3333333f);
  778|       |
  779|   445M|        *out_ptr++ +=
  780|   445M|            ((tmp_r * x_zero_band_i + tmp_i * x_zero_band_r) * 0.3333333f);
  781|       |
  782|   445M|        norm_ptr += 126;
  783|   445M|        out_ptr += 126;
  784|   445M|      }
  785|       |
  786|  44.5M|      norm_ptr -= 128 * 9;
  787|  44.5M|      out_ptr -= 128 * 8;
  788|  44.5M|      x_norm_ptr += 126;
  789|  44.5M|    }
  790|  2.60M|    out_ptr -= (128 * 2 * qmf_voc_columns) - 2;
  791|  2.60M|    norm_ptr -= (128 * qmf_voc_columns) - 2;
  792|  2.60M|    x_norm_ptr -= (128 * qmf_voc_columns) - 2;
  793|  2.60M|  }
  794|   228k|}
ixheaacd_hbe_post_anal_prod3:
  797|   135k|                                  WORD32 qmf_voc_columns, WORD32 qmf_band_idx) {
  798|   135k|  WORD32 i, inp_band_idx, rem;
  799|       |
  800|   135k|  FLOAT32 *out_buf = &ptr_hbe_txposer->qmf_out_buf[2][2 * qmf_band_idx];
  801|       |
  802|  1.45M|  for (; qmf_band_idx < ptr_hbe_txposer->x_over_qmf[2]; qmf_band_idx++) {
  ------------------
  |  Branch (802:10): [True: 1.31M, False: 135k]
  ------------------
  803|  1.31M|    FLOAT32 temp_r, temp_i;
  804|  1.31M|    FLOAT32 temp_r1, temp_i1;
  805|  1.31M|    const FLOAT32 *ptr_sel, *ptr_sel1;
  806|       |
  807|  1.31M|    inp_band_idx = (2 * qmf_band_idx) / 3;
  808|  1.31M|    ptr_sel = &ixheaac_sel_case[(inp_band_idx + 1) & 3][0];
  809|  1.31M|    ptr_sel1 = &ixheaac_sel_case[((inp_band_idx + 1) & 3) + 1][0];
  810|  1.31M|    rem = 2 * qmf_band_idx - 3 * inp_band_idx;
  811|       |
  812|  1.31M|    if (rem == 0 || rem == 1) {
  ------------------
  |  Branch (812:9): [True: 450k, False: 866k]
  |  Branch (812:21): [True: 434k, False: 431k]
  ------------------
  813|   885k|      FLOAT32 *in_buf = &ptr_hbe_txposer->qmf_in_buf[0][2 * inp_band_idx];
  814|       |
  815|  16.3M|      for (i = 0; i < qmf_voc_columns; i += 1) {
  ------------------
  |  Branch (815:19): [True: 15.4M, False: 885k]
  ------------------
  816|  15.4M|        WORD32 k;
  817|  15.4M|        FLOAT32 vec_x[2 * HBE_OPER_WIN_LEN];
  818|  15.4M|        FLOAT32 *ptr_vec_x = &vec_x[0];
  819|  15.4M|        FLOAT32 x_zero_band_r, x_zero_band_i;
  820|       |
  821|  15.4M|        FLOAT32 mag_scaling_fac;
  822|       |
  823|  77.0M|        for (k = 0; k < (HBE_OPER_BLK_LEN_3); k += 2) {
  ------------------
  |  |  128|  77.0M|#define HBE_OPER_BLK_LEN_3 8
  ------------------
  |  Branch (823:21): [True: 61.6M, False: 15.4M]
  ------------------
  824|  61.6M|          FLOAT64 base1;
  825|  61.6M|          FLOAT64 base = 1e-17;
  826|       |
  827|  61.6M|          temp_r = in_buf[0];
  828|  61.6M|          temp_i = in_buf[1];
  829|       |
  830|  61.6M|          in_buf += 256;
  831|       |
  832|  61.6M|          base1 = base + temp_r * temp_r;
  833|  61.6M|          base1 = base1 + temp_i * temp_i;
  834|       |
  835|  61.6M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  61.6M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  836|       |
  837|  61.6M|          ptr_vec_x[0] = temp_r * mag_scaling_fac;
  838|  61.6M|          ptr_vec_x[1] = temp_i * mag_scaling_fac;
  839|       |
  840|  61.6M|          temp_r = in_buf[0];
  841|  61.6M|          temp_i = in_buf[1];
  842|       |
  843|  61.6M|          in_buf -= 128;
  844|       |
  845|  61.6M|          temp_r1 = ptr_sel[0] * temp_r + ptr_sel[1] * temp_i;
  846|  61.6M|          temp_i1 = ptr_sel[2] * temp_r + ptr_sel[3] * temp_i;
  847|       |
  848|  61.6M|          temp_r = in_buf[0];
  849|  61.6M|          temp_i = in_buf[1];
  850|       |
  851|  61.6M|          temp_r1 += ptr_sel[4] * temp_r + ptr_sel[5] * temp_i;
  852|  61.6M|          temp_i1 += ptr_sel[6] * temp_r + ptr_sel[7] * temp_i;
  853|       |
  854|  61.6M|          temp_r1 *= 0.3984033437f;
  855|  61.6M|          temp_i1 *= 0.3984033437f;
  856|       |
  857|  61.6M|          base1 = base + temp_r1 * temp_r1;
  858|  61.6M|          base1 = base1 + temp_i1 * temp_i1;
  859|  61.6M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  61.6M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  860|       |
  861|  61.6M|          ptr_vec_x[2] = temp_r1 * mag_scaling_fac;
  862|  61.6M|          ptr_vec_x[3] = temp_i1 * mag_scaling_fac;
  863|       |
  864|  61.6M|          ptr_vec_x += 4;
  865|  61.6M|          in_buf += 256;
  866|  61.6M|        }
  867|  15.4M|        ptr_vec_x = &vec_x[0];
  868|  15.4M|        temp_r = vec_x[2 * (HBE_ZERO_BAND_IDX - 2)];
  ------------------
  |  |  204|  15.4M|#define HBE_ZERO_BAND_IDX 6
  ------------------
  869|  15.4M|        temp_i = vec_x[(2 * (HBE_ZERO_BAND_IDX - 2)) + 1];
  ------------------
  |  |  204|  15.4M|#define HBE_ZERO_BAND_IDX 6
  ------------------
  870|       |
  871|  15.4M|        x_zero_band_r = temp_r * temp_r - temp_i * temp_i;
  872|  15.4M|        x_zero_band_i = temp_r * temp_i + temp_i * temp_r;
  873|       |
  874|   138M|        for (k = 0; k < (HBE_OPER_BLK_LEN_3); k++) {
  ------------------
  |  |  128|   138M|#define HBE_OPER_BLK_LEN_3 8
  ------------------
  |  Branch (874:21): [True: 123M, False: 15.4M]
  ------------------
  875|   123M|          temp_r = ptr_vec_x[0] * x_zero_band_r - ptr_vec_x[1] * x_zero_band_i;
  876|   123M|          temp_i = ptr_vec_x[0] * x_zero_band_i + ptr_vec_x[1] * x_zero_band_r;
  877|       |
  878|   123M|          out_buf[0] += (temp_r * 0.4714045f);
  879|   123M|          out_buf[1] += (temp_i * 0.4714045f);
  880|       |
  881|   123M|          ptr_vec_x += 2;
  882|   123M|          out_buf += 128;
  883|   123M|        }
  884|       |
  885|  15.4M|        in_buf -= 128 * 11;
  886|  15.4M|        out_buf -= 128 * 6;
  887|  15.4M|      }
  888|   885k|    } else {
  889|   431k|      FLOAT32 *in_buf = &ptr_hbe_txposer->qmf_in_buf[0][2 * inp_band_idx];
  890|   431k|      FLOAT32 *in_buf1 =
  891|   431k|          &ptr_hbe_txposer->qmf_in_buf[0][2 * (inp_band_idx + 1)];
  892|       |
  893|  7.93M|      for (i = 0; i < qmf_voc_columns; i++) {
  ------------------
  |  Branch (893:19): [True: 7.50M, False: 431k]
  ------------------
  894|  7.50M|        WORD32 k;
  895|  7.50M|        FLOAT32 vec_x[2 * HBE_OPER_WIN_LEN];
  896|  7.50M|        FLOAT32 vec_x_cap[2 * HBE_OPER_WIN_LEN];
  897|       |
  898|  7.50M|        FLOAT32 x_zero_band_r, x_zero_band_i;
  899|  7.50M|        FLOAT32 *ptr_vec_x = &vec_x[0];
  900|  7.50M|        FLOAT32 *ptr_vec_x_cap = &vec_x_cap[0];
  901|       |
  902|  7.50M|        FLOAT32 mag_scaling_fac;
  903|       |
  904|  37.5M|        for (k = 0; k < (HBE_OPER_BLK_LEN_3); k += 2) {
  ------------------
  |  |  128|  37.5M|#define HBE_OPER_BLK_LEN_3 8
  ------------------
  |  Branch (904:21): [True: 30.0M, False: 7.50M]
  ------------------
  905|  30.0M|          FLOAT32 tmp_vr, tmp_vi;
  906|  30.0M|          FLOAT32 tmp_cr, tmp_ci;
  907|  30.0M|          FLOAT64 base1;
  908|  30.0M|          FLOAT64 base = 1e-17;
  909|       |
  910|  30.0M|          temp_r1 = in_buf[0];
  911|  30.0M|          temp_i1 = in_buf[1];
  912|  30.0M|          temp_r = in_buf1[0];
  913|  30.0M|          temp_i = in_buf1[1];
  914|       |
  915|  30.0M|          base1 = base + temp_r * temp_r;
  916|  30.0M|          base1 = base1 + temp_i * temp_i;
  917|       |
  918|  30.0M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  30.0M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  919|       |
  920|  30.0M|          ptr_vec_x[0] = temp_r * mag_scaling_fac;
  921|  30.0M|          ptr_vec_x[1] = temp_i * mag_scaling_fac;
  922|       |
  923|  30.0M|          base1 = base + temp_r1 * temp_r1;
  924|  30.0M|          base1 = base1 + temp_i1 * temp_i1;
  925|       |
  926|  30.0M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  30.0M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  927|       |
  928|  30.0M|          ptr_vec_x_cap[0] = temp_r1 * mag_scaling_fac;
  929|  30.0M|          ptr_vec_x_cap[1] = temp_i1 * mag_scaling_fac;
  930|       |
  931|  30.0M|          in_buf += 256;
  932|       |
  933|  30.0M|          temp_r = in_buf[0];
  934|  30.0M|          temp_i = in_buf[1];
  935|       |
  936|  30.0M|          temp_r1 = ptr_sel[0] * temp_r + ptr_sel[1] * temp_i;
  937|  30.0M|          temp_i1 = ptr_sel[2] * temp_r + ptr_sel[3] * temp_i;
  938|       |
  939|  30.0M|          in_buf -= 128;
  940|       |
  941|  30.0M|          temp_r = in_buf[0];
  942|  30.0M|          temp_i = in_buf[1];
  943|       |
  944|  30.0M|          tmp_cr = temp_r1 + ptr_sel[4] * temp_r + ptr_sel[5] * temp_i;
  945|  30.0M|          tmp_ci = temp_i1 + ptr_sel[6] * temp_r + ptr_sel[7] * temp_i;
  946|       |
  947|  30.0M|          in_buf1 += 256;
  948|       |
  949|  30.0M|          temp_r = in_buf1[0];
  950|  30.0M|          temp_i = in_buf1[1];
  951|       |
  952|  30.0M|          temp_r1 = ptr_sel1[0] * temp_r + ptr_sel1[1] * temp_i;
  953|  30.0M|          temp_i1 = ptr_sel1[2] * temp_r + ptr_sel1[3] * temp_i;
  954|       |
  955|  30.0M|          in_buf1 -= 128;
  956|       |
  957|  30.0M|          temp_r = in_buf1[0];
  958|  30.0M|          temp_i = in_buf1[1];
  959|       |
  960|  30.0M|          tmp_vr = temp_r1 + ptr_sel1[4] * temp_r + ptr_sel1[5] * temp_i;
  961|  30.0M|          tmp_vi = temp_i1 + ptr_sel1[6] * temp_r + ptr_sel1[7] * temp_i;
  962|       |
  963|  30.0M|          tmp_cr *= 0.3984033437f;
  964|  30.0M|          tmp_ci *= 0.3984033437f;
  965|       |
  966|  30.0M|          tmp_vr *= 0.3984033437f;
  967|  30.0M|          tmp_vi *= 0.3984033437f;
  968|       |
  969|  30.0M|          base1 = base + tmp_vr * tmp_vr;
  970|  30.0M|          base1 = base1 + tmp_vi * tmp_vi;
  971|       |
  972|  30.0M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  30.0M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  973|       |
  974|  30.0M|          ptr_vec_x[2] = tmp_vr * mag_scaling_fac;
  975|  30.0M|          ptr_vec_x[3] = tmp_vi * mag_scaling_fac;
  976|       |
  977|  30.0M|          base1 = base + tmp_cr * tmp_cr;
  978|  30.0M|          base1 = base1 + tmp_ci * tmp_ci;
  979|       |
  980|  30.0M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  30.0M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  981|       |
  982|  30.0M|          ptr_vec_x_cap[2] = tmp_cr * mag_scaling_fac;
  983|  30.0M|          ptr_vec_x_cap[3] = tmp_ci * mag_scaling_fac;
  984|       |
  985|  30.0M|          in_buf += 256;
  986|  30.0M|          in_buf1 += 256;
  987|  30.0M|          ptr_vec_x += 4;
  988|  30.0M|          ptr_vec_x_cap += 4;
  989|  30.0M|        }
  990|  7.50M|        ptr_vec_x = &vec_x[0];
  991|  7.50M|        ptr_vec_x_cap = &vec_x_cap[0];
  992|       |
  993|  7.50M|        temp_r = vec_x_cap[2 * (HBE_ZERO_BAND_IDX - 2)];
  ------------------
  |  |  204|  7.50M|#define HBE_ZERO_BAND_IDX 6
  ------------------
  994|  7.50M|        temp_i = vec_x_cap[2 * (HBE_ZERO_BAND_IDX - 2) + 1];
  ------------------
  |  |  204|  7.50M|#define HBE_ZERO_BAND_IDX 6
  ------------------
  995|  7.50M|        temp_r1 = vec_x[2 * (HBE_ZERO_BAND_IDX - 2)];
  ------------------
  |  |  204|  7.50M|#define HBE_ZERO_BAND_IDX 6
  ------------------
  996|  7.50M|        temp_i1 = vec_x[2 * (HBE_ZERO_BAND_IDX - 2) + 1];
  ------------------
  |  |  204|  7.50M|#define HBE_ZERO_BAND_IDX 6
  ------------------
  997|       |
  998|  7.50M|        x_zero_band_r = temp_r * temp_r - temp_i * temp_i;
  999|  7.50M|        x_zero_band_i = temp_r * temp_i + temp_i * temp_r;
 1000|       |
 1001|  7.50M|        temp_r = temp_r1 * temp_r1 - temp_i1 * temp_i1;
 1002|  7.50M|        temp_i = temp_r1 * temp_i1 + temp_i1 * temp_r1;
 1003|       |
 1004|  67.5M|        for (k = 0; k < (HBE_OPER_BLK_LEN_3); k++) {
  ------------------
  |  |  128|  67.5M|#define HBE_OPER_BLK_LEN_3 8
  ------------------
  |  Branch (1004:21): [True: 60.0M, False: 7.50M]
  ------------------
 1005|  60.0M|          temp_r1 = ptr_vec_x[0] * x_zero_band_r - ptr_vec_x[1] * x_zero_band_i;
 1006|  60.0M|          temp_i1 = ptr_vec_x[0] * x_zero_band_i + ptr_vec_x[1] * x_zero_band_r;
 1007|       |
 1008|  60.0M|          temp_r1 += ptr_vec_x_cap[0] * temp_r - ptr_vec_x_cap[1] * temp_i;
 1009|  60.0M|          temp_i1 += ptr_vec_x_cap[0] * temp_i + ptr_vec_x_cap[1] * temp_r;
 1010|       |
 1011|  60.0M|          out_buf[0] += (temp_r1 * 0.23570225f);
 1012|  60.0M|          out_buf[1] += (temp_i1 * 0.23570225f);
 1013|       |
 1014|  60.0M|          out_buf += 128;
 1015|  60.0M|          ptr_vec_x += 2;
 1016|  60.0M|          ptr_vec_x_cap += 2;
 1017|  60.0M|        }
 1018|       |
 1019|  7.50M|        in_buf -= 128 * 11;
 1020|  7.50M|        in_buf1 -= 128 * 11;
 1021|  7.50M|        out_buf -= 128 * 6;
 1022|  7.50M|      }
 1023|   431k|    }
 1024|       |
 1025|  1.31M|    out_buf -= (256 * qmf_voc_columns) - 2;
 1026|  1.31M|  }
 1027|   135k|}
ixheaacd_hbe_post_anal_prod4:
 1030|  81.4k|                                  WORD32 qmf_voc_columns, WORD32 qmf_band_idx) {
 1031|  81.4k|  WORD32 i, inp_band_idx;
 1032|  81.4k|  FLOAT32 *out_ptr = &ptr_hbe_txposer->qmf_out_buf[3][2 * qmf_band_idx];
 1033|       |
 1034|  81.4k|  ixheaacd_norm_qmf_in_buf_4(ptr_hbe_txposer, ((qmf_band_idx >> 1) - 1));
 1035|       |
 1036|   802k|  for (; qmf_band_idx < ptr_hbe_txposer->x_over_qmf[3]; qmf_band_idx++) {
  ------------------
  |  Branch (1036:10): [True: 721k, False: 81.4k]
  ------------------
 1037|   721k|    WORD32 ip_idx;
 1038|   721k|    FLOAT32 temp, temp_r, temp_i;
 1039|   721k|    FLOAT32 *norm_ptr, *x_norm_ptr;
 1040|   721k|    inp_band_idx = qmf_band_idx >> 1;
 1041|   721k|    ip_idx = (qmf_band_idx & 1) ? (inp_band_idx + 1) : (inp_band_idx - 1);
  ------------------
  |  Branch (1041:14): [True: 374k, False: 346k]
  ------------------
 1042|       |
 1043|   721k|    norm_ptr = &ptr_hbe_txposer->norm_qmf_in_buf[0][2 * ip_idx];
 1044|   721k|    x_norm_ptr =
 1045|   721k|        &ptr_hbe_txposer->norm_qmf_in_buf[HBE_ZERO_BAND_IDX][2 * inp_band_idx];
  ------------------
  |  |  204|   721k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1046|       |
 1047|  13.2M|    for (i = 0; i < qmf_voc_columns; i++) {
  ------------------
  |  Branch (1047:17): [True: 12.5M, False: 721k]
  ------------------
 1048|  12.5M|      WORD32 k;
 1049|  12.5M|      FLOAT32 x_zero_band_r, x_zero_band_i;
 1050|       |
 1051|  12.5M|      temp_r = x_zero_band_r = *x_norm_ptr++;
 1052|  12.5M|      temp_i = x_zero_band_i = *x_norm_ptr++;
 1053|       |
 1054|  12.5M|      temp = x_zero_band_r * x_zero_band_r - x_zero_band_i * x_zero_band_i;
 1055|  12.5M|      x_zero_band_i =
 1056|  12.5M|          x_zero_band_r * x_zero_band_i + x_zero_band_i * x_zero_band_r;
 1057|       |
 1058|  12.5M|      x_zero_band_r = temp_r * temp - temp_i * x_zero_band_i;
 1059|  12.5M|      x_zero_band_i = temp_r * x_zero_band_i + temp_i * temp;
 1060|       |
 1061|  87.9M|      for (k = 0; k < HBE_OPER_BLK_LEN_4; k++) {
  ------------------
  |  |  129|  87.9M|#define HBE_OPER_BLK_LEN_4 6
  ------------------
  |  Branch (1061:19): [True: 75.4M, False: 12.5M]
  ------------------
 1062|  75.4M|        temp = *norm_ptr++;
 1063|  75.4M|        temp_i = *norm_ptr++;
 1064|       |
 1065|  75.4M|        temp_r = temp * x_zero_band_r - temp_i * x_zero_band_i;
 1066|  75.4M|        temp_i = temp * x_zero_band_i + temp_i * x_zero_band_r;
 1067|       |
 1068|  75.4M|        *out_ptr++ += (temp_r * 0.6666667f);
 1069|  75.4M|        *out_ptr++ += (temp_i * 0.6666667f);
 1070|       |
 1071|  75.4M|        norm_ptr += 254;
 1072|  75.4M|        out_ptr += 126;
 1073|  75.4M|      }
 1074|       |
 1075|  12.5M|      norm_ptr -= 128 * 11;
 1076|  12.5M|      out_ptr -= 128 * 4;
 1077|  12.5M|      x_norm_ptr += 126;
 1078|  12.5M|    }
 1079|       |
 1080|   721k|    out_ptr -= (128 * 2 * qmf_voc_columns) - 2;
 1081|   721k|  }
 1082|  81.4k|}
ixheaacd_hbe_post_anal_xprod2:
 1086|  9.76k|                                   FLOAT32 p, FLOAT32 *cos_sin_theta) {
 1087|  9.76k|  WORD32 i;
 1088|  9.76k|  FLOAT32 *norm_ptr = &ptr_hbe_txposer->norm_qmf_in_buf[1][2 * qmf_band_idx];
 1089|  9.76k|  FLOAT32 *out_ptr = &ptr_hbe_txposer->qmf_out_buf[1][2 * qmf_band_idx];
 1090|  9.76k|  FLOAT32 *x_norm_ptr =
 1091|  9.76k|      &ptr_hbe_txposer->norm_qmf_in_buf[HBE_ZERO_BAND_IDX][2 * qmf_band_idx];
  ------------------
  |  |  204|  9.76k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1092|       |
 1093|  9.76k|  ixheaacd_norm_qmf_in_buf_2(ptr_hbe_txposer, qmf_band_idx);
 1094|       |
 1095|   133k|  for (; qmf_band_idx < ptr_hbe_txposer->x_over_qmf[1]; qmf_band_idx++) {
  ------------------
  |  Branch (1095:10): [True: 123k, False: 9.76k]
  ------------------
 1096|   123k|    WORD32 n1, n2;
 1097|   123k|    FLOAT64 temp_fac;
 1098|   123k|    FLOAT32 mag_cmplx_gain = 1.666666667f;
 1099|   123k|    temp_fac = (2.0 * qmf_band_idx + 1 - p) * 0.5;
 1100|   123k|    n1 = ((WORD32)(temp_fac)) << 1;
 1101|   123k|    n2 = ((WORD32)(temp_fac + p)) << 1;
 1102|       |
 1103|  2.18M|    for (i = 0; i < qmf_voc_columns; i++) {
  ------------------
  |  Branch (1103:17): [True: 2.06M, False: 123k]
  ------------------
 1104|  2.06M|      WORD32 k;
 1105|  2.06M|      FLOAT32 x_zero_band_r, x_zero_band_i;
 1106|       |
 1107|  2.06M|      x_zero_band_r = *x_norm_ptr++;
 1108|  2.06M|      x_zero_band_i = *x_norm_ptr++;
 1109|       |
 1110|  22.7M|      for (k = 1; k < (HBE_OPER_BLK_LEN_2 + 1); k++) {
  ------------------
  |  |  127|  22.7M|#define HBE_OPER_BLK_LEN_2 10
  ------------------
  |  Branch (1110:19): [True: 20.6M, False: 2.06M]
  ------------------
 1111|  20.6M|        register FLOAT32 tmp_r, tmp_i;
 1112|  20.6M|        tmp_r = *norm_ptr++;
 1113|  20.6M|        tmp_i = *norm_ptr++;
 1114|       |
 1115|  20.6M|        *out_ptr++ +=
 1116|  20.6M|            ((tmp_r * x_zero_band_r - tmp_i * x_zero_band_i) * 0.3333333f);
 1117|       |
 1118|  20.6M|        *out_ptr++ +=
 1119|  20.6M|            ((tmp_r * x_zero_band_i + tmp_i * x_zero_band_r) * 0.3333333f);
 1120|       |
 1121|  20.6M|        norm_ptr += 126;
 1122|  20.6M|        out_ptr += 126;
 1123|  20.6M|      }
 1124|  2.06M|      norm_ptr -= 128 * 9;
 1125|  2.06M|      out_ptr -= 128 * 8;
 1126|  2.06M|      x_norm_ptr += 126;
 1127|       |
 1128|  2.06M|      {
 1129|  2.06M|        WORD32 max_trans_fac, max_n1, max_n2;
 1130|  2.06M|        FLOAT32 max_mag_value;
 1131|  2.06M|        FLOAT32 mag_zero_band, mag_n1_band, mag_n2_band, temp;
 1132|       |
 1133|  2.06M|        FLOAT32 *qmf_in_buf_ri =
 1134|  2.06M|            ptr_hbe_txposer->qmf_in_buf[i + HBE_ZERO_BAND_IDX];
  ------------------
  |  |  204|  2.06M|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1135|       |
 1136|  2.06M|        mag_zero_band =
 1137|  2.06M|            qmf_in_buf_ri[2 * qmf_band_idx] * qmf_in_buf_ri[2 * qmf_band_idx] +
 1138|  2.06M|            qmf_in_buf_ri[2 * qmf_band_idx + 1] *
 1139|  2.06M|                qmf_in_buf_ri[2 * qmf_band_idx + 1];
 1140|       |
 1141|  2.06M|        mag_n1_band = qmf_in_buf_ri[n1] * qmf_in_buf_ri[n1] +
 1142|  2.06M|                      qmf_in_buf_ri[n1 + 1] * qmf_in_buf_ri[n1 + 1];
 1143|  2.06M|        mag_n2_band = qmf_in_buf_ri[n2] * qmf_in_buf_ri[n2] +
 1144|  2.06M|                      qmf_in_buf_ri[n2 + 1] * qmf_in_buf_ri[n2 + 1];
 1145|       |
 1146|  2.06M|        temp = min(mag_n1_band, mag_n2_band);
  ------------------
  |  |   75|  2.06M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 716k, False: 1.34M]
  |  |  ------------------
  ------------------
 1147|       |
 1148|  2.06M|        max_mag_value = 0;
 1149|  2.06M|        max_trans_fac = 0;
 1150|  2.06M|        max_n1 = 0;
 1151|  2.06M|        max_n2 = 0;
 1152|       |
 1153|  2.06M|        if (temp > 0) {
  ------------------
  |  Branch (1153:13): [True: 1.74M, False: 322k]
  ------------------
 1154|  1.74M|          max_mag_value = temp;
 1155|  1.74M|          max_trans_fac = 1;
 1156|  1.74M|          max_n1 = n1;
 1157|  1.74M|          max_n2 = n2;
 1158|  1.74M|        }
 1159|       |
 1160|  2.06M|        if (max_mag_value > mag_zero_band && max_n1 >= 0 &&
  ------------------
  |  Branch (1160:13): [True: 479k, False: 1.58M]
  |  Branch (1160:46): [True: 479k, False: 0]
  ------------------
 1161|   479k|            max_n2 < TWICE_QMF_SYNTH_CHANNELS_NUM) {
  ------------------
  |  |  110|   479k|#define TWICE_QMF_SYNTH_CHANNELS_NUM 128
  ------------------
  |  Branch (1161:13): [True: 479k, False: 0]
  ------------------
 1162|   479k|          FLOAT32 vec_y_r[2], vec_y_i[2];
 1163|   479k|          FLOAT32 temp_r, temp_i, tmp_r1;
 1164|   479k|          WORD32 mid_trans_fac, idx;
 1165|   479k|          FLOAT64 base;
 1166|   479k|          WORD32 k;
 1167|   479k|          FLOAT32 mag_scaling_fac = 0.0f;
 1168|   479k|          FLOAT32 x_zero_band_r = 0;
 1169|   479k|          FLOAT32 x_zero_band_i = 0;
 1170|       |
 1171|   479k|          mid_trans_fac = 2 - max_trans_fac;
 1172|       |
 1173|   479k|          x_zero_band_r = qmf_in_buf_ri[max_n1];
 1174|   479k|          x_zero_band_i = qmf_in_buf_ri[max_n1 + 1];
 1175|   479k|          base = 1e-17;
 1176|   479k|          base = base + x_zero_band_r * x_zero_band_r;
 1177|   479k|          base = base + x_zero_band_i * x_zero_band_i;
 1178|       |
 1179|   479k|          mag_scaling_fac = (FLOAT32)(1.0f / base);
 1180|   479k|          mag_scaling_fac = (FLOAT32)sqrt(sqrt(mag_scaling_fac));
 1181|       |
 1182|   479k|          x_zero_band_r *= mag_scaling_fac;
 1183|   479k|          x_zero_band_i *= mag_scaling_fac;
 1184|       |
 1185|   479k|          temp_r = x_zero_band_r;
 1186|   479k|          temp_i = x_zero_band_i;
 1187|   479k|          for (idx = 0; idx < mid_trans_fac - 1; idx++) {
  ------------------
  |  Branch (1187:25): [True: 0, False: 479k]
  ------------------
 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.43M|          for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (1193:23): [True: 958k, False: 479k]
  ------------------
 1194|   958k|            temp_r = ptr_hbe_txposer
 1195|   958k|                         ->qmf_in_buf[i + HBE_ZERO_BAND_IDX - 1 + k][max_n2];
  ------------------
  |  |  204|   958k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1196|   958k|            temp_i =
 1197|   958k|                ptr_hbe_txposer
 1198|   958k|                    ->qmf_in_buf[i + HBE_ZERO_BAND_IDX - 1 + k][max_n2 + 1];
  ------------------
  |  |  204|   958k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1199|       |
 1200|   958k|            base = 1e-17;
 1201|   958k|            base = base + temp_r * temp_r;
 1202|   958k|            base = base + temp_i * temp_i;
 1203|       |
 1204|   958k|            mag_scaling_fac = (FLOAT32)(1.0f / base);
 1205|   958k|            mag_scaling_fac = (FLOAT32)sqrt(sqrt(mag_scaling_fac));
 1206|       |
 1207|   958k|            temp_r *= mag_scaling_fac;
 1208|   958k|            temp_i *= mag_scaling_fac;
 1209|       |
 1210|   958k|            vec_y_r[k] = temp_r;
 1211|   958k|            vec_y_i[k] = temp_i;
 1212|   958k|          }
 1213|       |
 1214|   479k|          temp_r = vec_y_r[0] * x_zero_band_r - vec_y_i[0] * x_zero_band_i;
 1215|   479k|          temp_i = vec_y_r[0] * x_zero_band_i + vec_y_i[0] * x_zero_band_r;
 1216|       |
 1217|   479k|          tmp_r1 =
 1218|   479k|              (FLOAT32)(cos_sin_theta[0] * temp_r - cos_sin_theta[1] * temp_i);
 1219|   479k|          temp_i =
 1220|   479k|              (FLOAT32)(cos_sin_theta[0] * temp_i + cos_sin_theta[1] * temp_r);
 1221|       |
 1222|   479k|          ptr_hbe_txposer->qmf_out_buf[i * 2 + (HBE_ZERO_BAND_IDX - 1)]
  ------------------
  |  |  204|   479k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1223|   479k|                                      [2 * qmf_band_idx] +=
 1224|   479k|              (FLOAT32)(mag_cmplx_gain * tmp_r1);
 1225|       |
 1226|   479k|          ptr_hbe_txposer->qmf_out_buf[i * 2 + (HBE_ZERO_BAND_IDX - 1)]
  ------------------
  |  |  204|   479k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1227|   479k|                                      [2 * qmf_band_idx + 1] +=
 1228|   479k|              (FLOAT32)(mag_cmplx_gain * temp_i);
 1229|       |
 1230|   479k|          temp_r = vec_y_r[1] * x_zero_band_r - vec_y_i[1] * x_zero_band_i;
 1231|   479k|          temp_i = vec_y_r[1] * x_zero_band_i + vec_y_i[1] * x_zero_band_r;
 1232|       |
 1233|   479k|          ptr_hbe_txposer->qmf_out_buf[i * 2 + (1 + HBE_ZERO_BAND_IDX - 1)]
  ------------------
  |  |  204|   479k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1234|   479k|                                      [2 * qmf_band_idx] +=
 1235|   479k|              (FLOAT32)(mag_cmplx_gain * temp_r);
 1236|       |
 1237|   479k|          ptr_hbe_txposer->qmf_out_buf[i * 2 + (1 + HBE_ZERO_BAND_IDX - 1)]
  ------------------
  |  |  204|   479k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1238|   479k|                                      [2 * qmf_band_idx + 1] +=
 1239|   479k|              (FLOAT32)(mag_cmplx_gain * temp_i);
 1240|   479k|        }
 1241|  2.06M|      }
 1242|  2.06M|    }
 1243|       |
 1244|   123k|    out_ptr -= (128 * 2 * qmf_voc_columns) - 2;
 1245|   123k|    norm_ptr -= (128 * qmf_voc_columns) - 2;
 1246|   123k|    x_norm_ptr -= (128 * qmf_voc_columns) - 2;
 1247|   123k|  }
 1248|  9.76k|}
ixheaacd_hbe_post_anal_xprod3:
 1252|  7.76k|                                   FLOAT32 p, WORD32 pitch_in_bins_idx) {
 1253|  7.76k|  WORD32 i, inp_band_idx, rem;
 1254|       |
 1255|  7.76k|  FLOAT32 *out_buf = &ptr_hbe_txposer->qmf_out_buf[2][2 * qmf_band_idx];
 1256|       |
 1257|  79.4k|  for (; qmf_band_idx < ptr_hbe_txposer->x_over_qmf[2]; qmf_band_idx++) {
  ------------------
  |  Branch (1257:10): [True: 71.7k, False: 7.76k]
  ------------------
 1258|  71.7k|    FLOAT32 temp_r, temp_i;
 1259|  71.7k|    FLOAT32 temp_r1, temp_i1;
 1260|  71.7k|    const FLOAT32 *ptr_sel, *ptr_sel1;
 1261|       |
 1262|  71.7k|    inp_band_idx = (2 * qmf_band_idx) / 3;
 1263|  71.7k|    ptr_sel = &ixheaac_sel_case[(inp_band_idx + 1) & 3][0];
 1264|  71.7k|    ptr_sel1 = &ixheaac_sel_case[((inp_band_idx + 1) & 3) + 1][0];
 1265|  71.7k|    rem = 2 * qmf_band_idx - 3 * inp_band_idx;
 1266|       |
 1267|  71.7k|    if (rem == 0 || rem == 1) {
  ------------------
  |  Branch (1267:9): [True: 23.6k, False: 48.0k]
  |  Branch (1267:21): [True: 24.4k, False: 23.5k]
  ------------------
 1268|  48.1k|      FLOAT32 *in_buf = &ptr_hbe_txposer->qmf_in_buf[0][2 * inp_band_idx];
 1269|       |
 1270|   866k|      for (i = 0; i < qmf_voc_columns; i += 1) {
  ------------------
  |  Branch (1270:19): [True: 818k, False: 48.1k]
  ------------------
 1271|   818k|        WORD32 k;
 1272|   818k|        FLOAT32 vec_x[2 * HBE_OPER_WIN_LEN];
 1273|   818k|        FLOAT32 *ptr_vec_x = &vec_x[0];
 1274|   818k|        FLOAT32 x_zero_band_r, x_zero_band_i;
 1275|       |
 1276|   818k|        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: 818k]
  ------------------
 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|   818k|        ptr_vec_x = &vec_x[0];
 1323|   818k|        temp_r = vec_x[2 * (HBE_ZERO_BAND_IDX - 2)];
  ------------------
  |  |  204|   818k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1324|   818k|        temp_i = vec_x[(2 * (HBE_ZERO_BAND_IDX - 2)) + 1];
  ------------------
  |  |  204|   818k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1325|       |
 1326|   818k|        x_zero_band_r = temp_r * temp_r - temp_i * temp_i;
 1327|   818k|        x_zero_band_i = temp_r * temp_i + temp_i * temp_r;
 1328|       |
 1329|  7.36M|        for (k = 0; k < (HBE_OPER_BLK_LEN_3); k++) {
  ------------------
  |  |  128|  7.36M|#define HBE_OPER_BLK_LEN_3 8
  ------------------
  |  Branch (1329:21): [True: 6.54M, False: 818k]
  ------------------
 1330|  6.54M|          temp_r = ptr_vec_x[0] * x_zero_band_r - ptr_vec_x[1] * x_zero_band_i;
 1331|  6.54M|          temp_i = ptr_vec_x[0] * x_zero_band_i + ptr_vec_x[1] * x_zero_band_r;
 1332|       |
 1333|  6.54M|          out_buf[0] += (temp_r * 0.4714045f);
 1334|  6.54M|          out_buf[1] += (temp_i * 0.4714045f);
 1335|       |
 1336|  6.54M|          ptr_vec_x += 2;
 1337|  6.54M|          out_buf += 128;
 1338|  6.54M|        }
 1339|       |
 1340|   818k|        ixheaacd_hbe_xprod_proc_3(ptr_hbe_txposer, qmf_band_idx, i, p,
 1341|   818k|                                  pitch_in_bins_idx);
 1342|       |
 1343|   818k|        in_buf -= 128 * 11;
 1344|   818k|        out_buf -= 128 * 6;
 1345|   818k|      }
 1346|  48.1k|    } 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|   428k|      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.64M|        for (k = 0; k < (HBE_OPER_BLK_LEN_3); k++) {
  ------------------
  |  |  128|  3.64M|#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.7k|    out_buf -= (256 * qmf_voc_columns) - 2;
 1487|  71.7k|  }
 1488|  7.76k|}
ixheaacd_hbe_post_anal_xprod4:
 1492|  5.50k|                                   FLOAT32 p, WORD32 pitch_in_bins_idx) {
 1493|  5.50k|  WORD32 i, inp_band_idx;
 1494|  5.50k|  FLOAT32 *out_ptr = &ptr_hbe_txposer->qmf_out_buf[3][2 * qmf_band_idx];
 1495|       |
 1496|  5.50k|  ixheaacd_norm_qmf_in_buf_4(ptr_hbe_txposer, ((qmf_band_idx >> 1) - 1));
 1497|       |
 1498|  52.0k|  for (; qmf_band_idx < ptr_hbe_txposer->x_over_qmf[3]; qmf_band_idx++) {
  ------------------
  |  Branch (1498:10): [True: 46.5k, False: 5.50k]
  ------------------
 1499|  46.5k|    WORD32 ip_idx;
 1500|  46.5k|    FLOAT32 temp, temp_r, temp_i;
 1501|  46.5k|    FLOAT32 *norm_ptr, *x_norm_ptr;
 1502|  46.5k|    inp_band_idx = qmf_band_idx >> 1;
 1503|  46.5k|    ip_idx = (qmf_band_idx & 1) ? (inp_band_idx + 1) : (inp_band_idx - 1);
  ------------------
  |  Branch (1503:14): [True: 24.6k, False: 21.8k]
  ------------------
 1504|       |
 1505|  46.5k|    norm_ptr = &ptr_hbe_txposer->norm_qmf_in_buf[0][2 * ip_idx];
 1506|  46.5k|    x_norm_ptr =
 1507|  46.5k|        &ptr_hbe_txposer->norm_qmf_in_buf[HBE_ZERO_BAND_IDX][2 * inp_band_idx];
  ------------------
  |  |  204|  46.5k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1508|       |
 1509|   813k|    for (i = 0; i < qmf_voc_columns; i++) {
  ------------------
  |  Branch (1509:17): [True: 766k, False: 46.5k]
  ------------------
 1510|   766k|      WORD32 k;
 1511|   766k|      FLOAT32 x_zero_band_r, x_zero_band_i;
 1512|       |
 1513|   766k|      temp_r = x_zero_band_r = *x_norm_ptr++;
 1514|   766k|      temp_i = x_zero_band_i = *x_norm_ptr++;
 1515|       |
 1516|   766k|      temp = x_zero_band_r * x_zero_band_r - x_zero_band_i * x_zero_band_i;
 1517|   766k|      x_zero_band_i =
 1518|   766k|          x_zero_band_r * x_zero_band_i + x_zero_band_i * x_zero_band_r;
 1519|       |
 1520|   766k|      x_zero_band_r = temp_r * temp - temp_i * x_zero_band_i;
 1521|   766k|      x_zero_band_i = temp_r * x_zero_band_i + temp_i * temp;
 1522|       |
 1523|  5.36M|      for (k = 0; k < HBE_OPER_BLK_LEN_4; k++) {
  ------------------
  |  |  129|  5.36M|#define HBE_OPER_BLK_LEN_4 6
  ------------------
  |  Branch (1523:19): [True: 4.60M, False: 766k]
  ------------------
 1524|  4.60M|        temp = *norm_ptr++;
 1525|  4.60M|        temp_i = *norm_ptr++;
 1526|       |
 1527|  4.60M|        temp_r = temp * x_zero_band_r - temp_i * x_zero_band_i;
 1528|  4.60M|        temp_i = temp * x_zero_band_i + temp_i * x_zero_band_r;
 1529|       |
 1530|  4.60M|        *out_ptr++ += (temp_r * 0.6666667f);
 1531|  4.60M|        *out_ptr++ += (temp_i * 0.6666667f);
 1532|       |
 1533|  4.60M|        norm_ptr += 254;
 1534|  4.60M|        out_ptr += 126;
 1535|  4.60M|      }
 1536|       |
 1537|   766k|      norm_ptr -= 128 * 11;
 1538|   766k|      out_ptr -= 128 * 4;
 1539|   766k|      x_norm_ptr += 126;
 1540|       |
 1541|   766k|      ixheaacd_hbe_xprod_proc_4(ptr_hbe_txposer, qmf_band_idx, i, p,
 1542|   766k|                                pitch_in_bins_idx);
 1543|   766k|    }
 1544|       |
 1545|  46.5k|    out_ptr -= (128 * 2 * qmf_voc_columns) - 2;
 1546|  46.5k|  }
 1547|  5.50k|}
ixheaacd_hbe_post_anal_process:
 1551|   254k|    WORD32 sbr_upsamp_4_flg) {
 1552|   254k|  FLOAT32 p;
 1553|   254k|  WORD32 trans_fac;
 1554|   254k|  WORD32 qmf_voc_columns = ptr_hbe_txposer->no_bins / 2;
 1555|   254k|  FLOAT32 cos_sin_theta[2];
 1556|       |
 1557|   254k|  p = (sbr_upsamp_4_flg) ? (FLOAT32)(pitch_in_bins * 0.04166666666666)
  ------------------
  |  Branch (1557:7): [True: 32.5k, False: 221k]
  ------------------
 1558|   254k|                         : (FLOAT32)(pitch_in_bins * 0.08333333333333);
 1559|       |
 1560|   254k|  if (p < SBR_CONST_PMIN) {
  ------------------
  |  |   69|   254k|#define SBR_CONST_PMIN 1.0f
  ------------------
  |  Branch (1560:7): [True: 244k, False: 10.3k]
  ------------------
 1561|   244k|    trans_fac = 2;
 1562|   244k|    if (trans_fac <= ptr_hbe_txposer->max_stretch)
  ------------------
  |  Branch (1562:9): [True: 228k, False: 15.7k]
  ------------------
 1563|   228k|      ixheaacd_hbe_post_anal_prod2(ptr_hbe_txposer, qmf_voc_columns,
 1564|   228k|                                   ptr_hbe_txposer->x_over_qmf[0]);
 1565|       |
 1566|   244k|    trans_fac = 3;
 1567|   244k|    if (trans_fac <= ptr_hbe_txposer->max_stretch)
  ------------------
  |  Branch (1567:9): [True: 135k, False: 108k]
  ------------------
 1568|   135k|      ixheaacd_hbe_post_anal_prod3(ptr_hbe_txposer, qmf_voc_columns,
 1569|   135k|                                   ptr_hbe_txposer->x_over_qmf[1]);
 1570|       |
 1571|   244k|    trans_fac = 4;
 1572|   244k|    if (trans_fac <= ptr_hbe_txposer->max_stretch) {
  ------------------
  |  Branch (1572:9): [True: 81.4k, False: 162k]
  ------------------
 1573|  81.4k|      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: 81.4k]
  ------------------
 1574|  81.4k|      ixheaacd_hbe_post_anal_prod4(ptr_hbe_txposer, qmf_voc_columns,
 1575|  81.4k|                                   ptr_hbe_txposer->x_over_qmf[2]);
 1576|  81.4k|    }
 1577|       |
 1578|   244k|  } else {
 1579|  10.3k|    trans_fac = 2;
 1580|  10.3k|    if (trans_fac <= ptr_hbe_txposer->max_stretch) {
  ------------------
  |  Branch (1580:9): [True: 9.76k, False: 586]
  ------------------
 1581|  9.76k|      cos_sin_theta[0] = ixheaac_hbe_x_prod_cos_table_trans_2
 1582|  9.76k|          [((pitch_in_bins + sbr_upsamp_4_flg * 128) << 1) + 0];
 1583|  9.76k|      cos_sin_theta[1] = ixheaac_hbe_x_prod_cos_table_trans_2
 1584|  9.76k|          [((pitch_in_bins + sbr_upsamp_4_flg * 128) << 1) + 1];
 1585|       |
 1586|  9.76k|      ixheaacd_hbe_post_anal_xprod2(ptr_hbe_txposer, qmf_voc_columns,
 1587|  9.76k|                                    ptr_hbe_txposer->x_over_qmf[0], p,
 1588|  9.76k|                                    cos_sin_theta);
 1589|  9.76k|    }
 1590|       |
 1591|  10.3k|    trans_fac = 3;
 1592|  10.3k|    if (trans_fac <= ptr_hbe_txposer->max_stretch)
  ------------------
  |  Branch (1592:9): [True: 7.76k, False: 2.58k]
  ------------------
 1593|  7.76k|      ixheaacd_hbe_post_anal_xprod3(ptr_hbe_txposer, qmf_voc_columns,
 1594|  7.76k|                                    ptr_hbe_txposer->x_over_qmf[1], p,
 1595|  7.76k|                                    (pitch_in_bins + sbr_upsamp_4_flg * 128));
 1596|       |
 1597|  10.3k|    trans_fac = 4;
 1598|  10.3k|    if (trans_fac <= ptr_hbe_txposer->max_stretch) {
  ------------------
  |  Branch (1598:9): [True: 5.50k, False: 4.83k]
  ------------------
 1599|  5.50k|      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.50k]
  ------------------
 1600|  5.50k|      ixheaacd_hbe_post_anal_xprod4(ptr_hbe_txposer, qmf_voc_columns,
 1601|  5.50k|                                    ptr_hbe_txposer->x_over_qmf[2], p,
 1602|  5.50k|                                    (pitch_in_bins + sbr_upsamp_4_flg * 128));
 1603|  5.50k|    }
 1604|  10.3k|  }
 1605|   254k|  return IA_NO_ERROR;
  ------------------
  |  |   23|   254k|#define IA_NO_ERROR 0x00000000
  ------------------
 1606|   254k|}
ixheaacd_hbe_trans.c:ixheaacd_map_prot_filter:
   71|   134k|static FLOAT32 *ixheaacd_map_prot_filter(WORD32 filt_length) {
   72|   134k|  switch (filt_length) {
   73|     86|    case 4:
  ------------------
  |  Branch (73:5): [True: 86, False: 133k]
  ------------------
   74|     86|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[0];
   75|      0|      break;
   76|  12.2k|    case 8:
  ------------------
  |  Branch (76:5): [True: 12.2k, False: 121k]
  ------------------
   77|  12.2k|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[40];
   78|      0|      break;
   79|  20.3k|    case 12:
  ------------------
  |  Branch (79:5): [True: 20.3k, False: 113k]
  ------------------
   80|  20.3k|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[120];
   81|      0|      break;
   82|  18.8k|    case 16:
  ------------------
  |  Branch (82:5): [True: 18.8k, False: 115k]
  ------------------
   83|  18.8k|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[240];
   84|      0|      break;
   85|  27.7k|    case 20:
  ------------------
  |  Branch (85:5): [True: 27.7k, False: 106k]
  ------------------
   86|  27.7k|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[400];
   87|      0|      break;
   88|  20.3k|    case 24:
  ------------------
  |  Branch (88:5): [True: 20.3k, False: 113k]
  ------------------
   89|  20.3k|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[600];
   90|      0|      break;
   91|  6.61k|    case 32:
  ------------------
  |  Branch (91:5): [True: 6.61k, False: 127k]
  ------------------
   92|  6.61k|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[840];
   93|      0|      break;
   94|  27.7k|    case 40:
  ------------------
  |  Branch (94:5): [True: 27.7k, False: 106k]
  ------------------
   95|  27.7k|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[1160];
   96|      0|      break;
   97|      0|    default:
  ------------------
  |  Branch (97:5): [True: 0, False: 134k]
  ------------------
   98|      0|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[0];
   99|   134k|  }
  100|   134k|}

ixheaacd_read_pce_channel_info:
  118|  10.5k|                                      struct ia_bit_buf_struct *it_bit_buff) {
  119|  10.5k|  WORD32 num_ch = 0, i, tmp;
  120|  32.1k|  for (i = 0; i < ch; i++) {
  ------------------
  |  Branch (120:15): [True: 21.5k, False: 10.5k]
  ------------------
  121|  21.5k|    tmp = ixheaacd_read_bits_buf(it_bit_buff, 5);
  122|  21.5k|    ptr_is_cpe[i] = (tmp & 0x10) >> 4;
  123|       |
  124|  21.5k|    if (ptr_is_cpe[i]) {
  ------------------
  |  Branch (124:9): [True: 4.95k, False: 16.6k]
  ------------------
  125|  4.95k|      num_ch += 2;
  126|  16.6k|    } else {
  127|  16.6k|      num_ch++;
  128|  16.6k|    }
  129|       |
  130|  21.5k|    ptr_tag_select[i] = (tmp & 0xF);
  131|  21.5k|  }
  132|  10.5k|  return num_ch;
  133|  10.5k|}
ixheaacd_read_pce_mixdown_data:
  137|  10.5k|                                    WORD32 mix_down_element_no) {
  138|  10.5k|  WORD32 mix_down_flag = ixheaacd_read_bits_buf(it_bit_buff, mix_down_present);
  139|  10.5k|  if (mix_down_flag == 1) {
  ------------------
  |  Branch (139:7): [True: 4.36k, False: 6.20k]
  ------------------
  140|  4.36k|    ixheaacd_read_bits_buf(it_bit_buff, mix_down_element_no);
  141|  4.36k|  }
  142|  10.5k|}
ixheaacd_skip_bits:
  145|  9.95k|                        WORD32 num_element) {
  146|  9.95k|  WORD32 i;
  147|   106k|  for (i = 0; i < num_element; i++) {
  ------------------
  |  Branch (147:15): [True: 96.8k, False: 9.95k]
  ------------------
  148|  96.8k|    ixheaacd_read_bits_buf(it_bit_buff, bits);
  149|  96.8k|  }
  150|  9.95k|}
ixheaacd_read_prog_config_element:
  154|  18.1k|    struct ia_bit_buf_struct *it_bit_buff) {
  155|  18.1k|  WORD32 i, tmp;
  156|  18.1k|  WORD count = 0, num_ch = 0;
  157|       |
  158|  18.1k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 6);
  159|       |
  160|  18.1k|  ptr_config_element->element_instance_tag = (tmp >> 2);
  161|  18.1k|  ptr_config_element->object_type = tmp & 0x3;
  162|       |
  163|  18.1k|  if ((ptr_config_element->object_type + 1) != 2
  ------------------
  |  Branch (163:7): [True: 5.04k, False: 13.0k]
  ------------------
  164|       |
  165|  5.04k|      && (ptr_config_element->object_type + 1) != 4
  ------------------
  |  Branch (165:10): [True: 2.36k, False: 2.68k]
  ------------------
  166|       |
  167|  18.1k|      ) {
  168|  2.36k|    return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|  2.36k|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  169|  2.36k|  }
  170|       |
  171|  15.7k|  ptr_config_element->samp_freq_index = ixheaacd_read_bits_buf(it_bit_buff, 4);
  172|  15.7k|  if (ptr_config_element->samp_freq_index > 11) {
  ------------------
  |  Branch (172:7): [True: 11.3k, False: 4.39k]
  ------------------
  173|  11.3k|    return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |  102|  11.3k|#define IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
  ------------------
  174|  11.3k|  }
  175|       |
  176|  4.39k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 21);
  177|       |
  178|  4.39k|  count += ptr_config_element->num_front_channel_elements = (tmp >> 17);
  179|  4.39k|  count += ptr_config_element->num_side_channel_elements =
  180|  4.39k|      (tmp & 0x1E000) >> 13;
  181|  4.39k|  count += ptr_config_element->num_back_channel_elements = (tmp & 0x1E00) >> 9;
  182|  4.39k|  count += ptr_config_element->num_lfe_channel_elements = (tmp & 0x180) >> 7;
  183|  4.39k|  ptr_config_element->num_assoc_data_elements = (tmp & 0x70) >> 4;
  184|  4.39k|  count += ptr_config_element->num_valid_cc_elements = tmp & 0xF;
  185|       |
  186|  4.39k|  if (count > MAX_BS_ELEMENT) {
  ------------------
  |  |   24|  4.39k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  4.39k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (186:7): [True: 853, False: 3.54k]
  ------------------
  187|    853|    return IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
  ------------------
  |  |   85|    853|#define IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX 0xFFFF9002
  ------------------
  188|    853|  }
  189|       |
  190|  3.54k|  ixheaacd_read_pce_mixdown_data(it_bit_buff, 1, 4);
  191|  3.54k|  ixheaacd_read_pce_mixdown_data(it_bit_buff, 1, 4);
  192|  3.54k|  ixheaacd_read_pce_mixdown_data(it_bit_buff, 1, 3);
  193|       |
  194|  3.54k|  num_ch += ixheaacd_read_pce_channel_info(
  195|  3.54k|      ptr_config_element->num_front_channel_elements,
  196|  3.54k|      ptr_config_element->front_element_is_cpe,
  197|  3.54k|      ptr_config_element->front_element_tag_select, it_bit_buff);
  198|       |
  199|  3.54k|  num_ch += ixheaacd_read_pce_channel_info(
  200|  3.54k|      ptr_config_element->num_side_channel_elements,
  201|  3.54k|      ptr_config_element->side_element_is_cpe,
  202|  3.54k|      ptr_config_element->side_element_tag_select, it_bit_buff);
  203|       |
  204|  3.54k|  num_ch += ixheaacd_read_pce_channel_info(
  205|  3.54k|      ptr_config_element->num_back_channel_elements,
  206|  3.54k|      ptr_config_element->back_element_is_cpe,
  207|  3.54k|      ptr_config_element->back_element_tag_select, it_bit_buff);
  208|       |
  209|  3.54k|  num_ch += ptr_config_element->num_lfe_channel_elements;
  210|       |
  211|  6.15k|  for (i = 0; i < (ptr_config_element->num_lfe_channel_elements); i++) {
  ------------------
  |  Branch (211:15): [True: 2.61k, False: 3.54k]
  ------------------
  212|  2.61k|    ptr_config_element->lfe_element_tag_select[i] =
  213|  2.61k|        ixheaacd_read_bits_buf(it_bit_buff, 4);
  214|  2.61k|  }
  215|       |
  216|  3.54k|  ptr_config_element->channels = num_ch;
  217|       |
  218|  11.6k|  for (i = 0; i < (ptr_config_element->num_assoc_data_elements); i++) {
  ------------------
  |  Branch (218:15): [True: 8.15k, False: 3.54k]
  ------------------
  219|  8.15k|    ixheaacd_read_bits_buf(it_bit_buff, 4);
  220|  8.15k|  }
  221|       |
  222|  3.54k|  ixheaacd_skip_bits(it_bit_buff, 5, ptr_config_element->num_valid_cc_elements);
  223|       |
  224|  3.54k|  {
  225|  3.54k|    WORD32 bits_to_read = ptr_config_element->alignment_bits;
  226|  3.54k|    if (bits_to_read <= it_bit_buff->bit_pos) {
  ------------------
  |  Branch (226:9): [True: 120, False: 3.42k]
  ------------------
  227|    120|      bits_to_read = it_bit_buff->bit_pos - bits_to_read;
  228|  3.42k|    } else {
  229|  3.42k|      bits_to_read = 8 - (bits_to_read) + it_bit_buff->bit_pos;
  230|  3.42k|    }
  231|  3.54k|    tmp = ixheaacd_read_bits_buf(it_bit_buff, bits_to_read);
  232|  3.54k|  }
  233|  3.54k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 8);
  234|       |
  235|  3.54k|  ixheaacd_skip_bits(it_bit_buff, 8, tmp);
  236|       |
  237|  3.54k|  return 0;
  238|  4.39k|}
ixheaacd_decode_pce:
  242|    426|                         ia_program_config_struct *ptr_prog_config) {
  243|    426|  WORD32 error_code = 0;
  244|       |
  245|    426|  if (*ui_pce_found_in_hdr == 1 || *ui_pce_found_in_hdr == 3) {
  ------------------
  |  Branch (245:7): [True: 83, False: 343]
  |  Branch (245:36): [True: 31, False: 312]
  ------------------
  246|    114|    ia_program_config_struct ptr_config_element = {0};
  247|    114|    ptr_config_element.alignment_bits = ptr_prog_config->alignment_bits;
  248|    114|    error_code =
  249|    114|        ixheaacd_read_prog_config_element(&ptr_config_element, it_bit_buff);
  250|    114|    *ui_pce_found_in_hdr = 3;
  251|    312|  } else {
  252|    312|    error_code =
  253|    312|        ixheaacd_read_prog_config_element(ptr_prog_config, it_bit_buff);
  254|    312|    *ui_pce_found_in_hdr = 2;
  255|    312|  }
  256|    426|  return error_code;
  257|    426|}
ixheaacd_find_syncword:
  297|   143k|                              struct ia_bit_buf_struct *it_bit_buff) {
  298|   143k|  adts->sync_word = (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 12);
  299|   143k|  if (adts->sync_word == 0xFFF) {
  ------------------
  |  Branch (299:7): [True: 143k, False: 805]
  ------------------
  300|   143k|    return 0;
  301|   143k|  }
  302|       |
  303|   839k|  while (1) {
  ------------------
  |  Branch (303:10): [True: 839k, Folded]
  ------------------
  304|   839k|    ixheaacd_read_bidirection(it_bit_buff, -4);
  305|   839k|    if (it_bit_buff->cnt_bits < 12) {
  ------------------
  |  Branch (305:9): [True: 277, False: 839k]
  ------------------
  306|    277|      return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|    277|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  307|    277|    }
  308|   839k|    adts->sync_word = (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 12);
  309|   839k|    if (adts->sync_word == 0xFFF) {
  ------------------
  |  Branch (309:9): [True: 433, False: 838k]
  ------------------
  310|    433|      ixheaacd_read_bidirection(it_bit_buff, -12);
  311|    433|      return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|    433|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  312|    433|    }
  313|   839k|  }
  314|    805|}
ixheaacd_adtsframe:
  317|   108k|                          struct ia_bit_buf_struct *it_bit_buff) {
  318|   108k|  WORD32 tmp;
  319|   108k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|   108k|#define IA_NO_ERROR 0x00000000
  ------------------
  320|   108k|  WORD32 crc_reg;
  321|   108k|  ia_adts_crc_info_struct *ptr_adts_crc_info = it_bit_buff->pstr_adts_crc_info;
  322|   108k|  ptr_adts_crc_info->crc_active = 1;
  323|   108k|  ptr_adts_crc_info->no_reg = 0;
  324|   108k|  ixheaacd_read_bidirection(it_bit_buff, -12);
  325|   108k|  crc_reg = ixheaacd_adts_crc_start_reg(ptr_adts_crc_info, it_bit_buff,
  326|   108k|                                        CRC_ADTS_HEADER_LEN);
  ------------------
  |  |   25|   108k|#define CRC_ADTS_HEADER_LEN 56
  ------------------
  327|   108k|  err = ixheaacd_find_syncword(adts, it_bit_buff);
  328|   108k|  if (err) return err;
  ------------------
  |  Branch (328:7): [True: 0, False: 108k]
  ------------------
  329|       |
  330|   108k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 10);
  331|       |
  332|   108k|  adts->id = (tmp & 0x200) >> 9;
  333|   108k|  adts->layer = (tmp & 0x180) >> 7;
  334|   108k|  adts->protection_absent = (tmp & 0x40) >> 6;
  335|   108k|  adts->profile = (tmp & 0x30) >> 4;
  336|   108k|  { adts->profile++; }
  337|   108k|  adts->samp_freq_index = (tmp & 0xF);
  338|       |
  339|   108k|  if (((adts->profile != AAC_LC_PROFILE)) || (adts->samp_freq_index > 11))
  ------------------
  |  |  101|   108k|#define AAC_LC_PROFILE (2)
  ------------------
  |  Branch (339:7): [True: 53.9k, False: 54.1k]
  |  Branch (339:46): [True: 1.28k, False: 52.8k]
  ------------------
  340|       |
  341|  55.2k|  {
  342|  55.2k|    return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|  55.2k|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  343|  55.2k|  }
  344|       |
  345|  52.9k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 21);
  346|       |
  347|  52.9k|  adts->channel_configuration = (WORD32)(tmp & 0xE0000) >> 17;
  348|       |
  349|  52.9k|  adts->aac_frame_length = (tmp & 0x1FFF);
  350|       |
  351|  52.9k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 13);
  352|       |
  353|  52.9k|  adts->no_raw_data_blocks = (tmp & 0x3);
  354|       |
  355|  52.9k|  ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff, crc_reg);
  356|       |
  357|  52.9k|  if (adts->protection_absent == 0) {
  ------------------
  |  Branch (357:7): [True: 2.09k, False: 50.8k]
  ------------------
  358|  2.09k|    ixheaacd_skip_bits(it_bit_buff, 16, adts->no_raw_data_blocks);
  359|  2.09k|    adts->crc_check = ixheaacd_read_bits_buf(it_bit_buff, 16);
  360|       |
  361|  2.09k|    ptr_adts_crc_info->crc_active = 1;
  362|  2.09k|    ptr_adts_crc_info->file_value = adts->crc_check;
  363|  2.09k|  } else
  364|  50.8k|    ptr_adts_crc_info->crc_active = 0;
  365|       |
  366|  52.9k|  ixheaacd_aac_bytealign(it_bit_buff);
  367|  52.9k|  return 0;
  368|   108k|}
ixheaacd_get_samp_rate:
  373|   154k|    ia_audio_specific_config_struct *pstr_audio_specific_config) {
  374|   154k|  WORD32 index;
  375|   154k|  WORD32 sampling_rate;
  376|   154k|  index = ixheaacd_read_bits_buf(it_bit_buff, 4);
  377|   154k|  pstr_audio_specific_config->samp_frequency_index = index;
  378|       |
  379|   154k|  if (index == 0x0F) {
  ------------------
  |  Branch (379:7): [True: 639, False: 153k]
  ------------------
  380|    639|    sampling_rate = ixheaacd_read_bits_buf(it_bit_buff, 24);
  381|       |
  382|    639|    if (pstr_audio_specific_config->audio_object_type != AOT_USAC) {
  ------------------
  |  Branch (382:9): [True: 415, False: 224]
  ------------------
  383|    415|      if (sampling_rate < 9391)
  ------------------
  |  Branch (383:11): [True: 12, False: 403]
  ------------------
  384|     12|        sampling_rate = 8000;
  385|    403|      else if ((sampling_rate >= 9391) && (sampling_rate < 11502))
  ------------------
  |  Branch (385:16): [True: 403, False: 0]
  |  Branch (385:43): [True: 14, False: 389]
  ------------------
  386|     14|        sampling_rate = 11025;
  387|    389|      else if ((sampling_rate >= 11502) && (sampling_rate < 13856))
  ------------------
  |  Branch (387:16): [True: 389, False: 0]
  |  Branch (387:44): [True: 20, False: 369]
  ------------------
  388|     20|        sampling_rate = 12000;
  389|    369|      else if ((sampling_rate >= 13856) && (sampling_rate < 18783))
  ------------------
  |  Branch (389:16): [True: 369, False: 0]
  |  Branch (389:44): [True: 10, False: 359]
  ------------------
  390|     10|        sampling_rate = 16000;
  391|    359|      else if ((sampling_rate >= 18783) && (sampling_rate < 23004))
  ------------------
  |  Branch (391:16): [True: 359, False: 0]
  |  Branch (391:44): [True: 14, False: 345]
  ------------------
  392|     14|        sampling_rate = 22050;
  393|    345|      else if ((sampling_rate >= 23004) && (sampling_rate < 27713))
  ------------------
  |  Branch (393:16): [True: 345, False: 0]
  |  Branch (393:44): [True: 16, False: 329]
  ------------------
  394|     16|        sampling_rate = 24000;
  395|    329|      else if ((sampling_rate >= 27713) && (sampling_rate < 37566))
  ------------------
  |  Branch (395:16): [True: 329, False: 0]
  |  Branch (395:44): [True: 17, False: 312]
  ------------------
  396|     17|        sampling_rate = 32000;
  397|    312|      else if ((sampling_rate >= 37566) && (sampling_rate < 46009))
  ------------------
  |  Branch (397:16): [True: 312, False: 0]
  |  Branch (397:44): [True: 19, False: 293]
  ------------------
  398|     19|        sampling_rate = 44100;
  399|    293|      else if ((sampling_rate >= 46009) && (sampling_rate < 55426))
  ------------------
  |  Branch (399:16): [True: 293, False: 0]
  |  Branch (399:44): [True: 17, False: 276]
  ------------------
  400|     17|        sampling_rate = 48000;
  401|    276|      else if ((sampling_rate >= 55426) && (sampling_rate < 75132))
  ------------------
  |  Branch (401:16): [True: 276, False: 0]
  |  Branch (401:44): [True: 21, False: 255]
  ------------------
  402|     21|        sampling_rate = 64000;
  403|    255|      else if ((sampling_rate >= 75132) && (sampling_rate < 92017))
  ------------------
  |  Branch (403:16): [True: 255, False: 0]
  |  Branch (403:44): [True: 20, False: 235]
  ------------------
  404|     20|        sampling_rate = 88200;
  405|    235|      else if (sampling_rate >= 92017)
  ------------------
  |  Branch (405:16): [True: 235, False: 0]
  ------------------
  406|    235|        sampling_rate = 96000;
  407|    415|    }
  408|    639|    return sampling_rate;
  409|   153k|  } else if ((index > 12) && (index < 15)) {
  ------------------
  |  Branch (409:14): [True: 11, False: 153k]
  |  Branch (409:30): [True: 11, False: 0]
  ------------------
  410|     11|    return -1;
  411|   153k|  } else {
  412|   153k|    return ((pstr_samp_rate_info[index].sampling_frequency));
  413|   153k|  }
  414|   154k|}
ixheaacd_eld_sbr_header:
  457|  16.5k|                               ia_sbr_header_data_struct *pstr_sbr_config) {
  458|  16.5k|  int num_sbr_header, el, bit_cnt = 0;
  459|  16.5k|  switch (channels) {
  460|    552|    default:
  ------------------
  |  Branch (460:5): [True: 552, False: 16.0k]
  ------------------
  461|    552|      num_sbr_header = 0;
  462|    552|      break;
  463|    163|    case 1:
  ------------------
  |  Branch (463:5): [True: 163, False: 16.3k]
  ------------------
  464|  7.08k|    case 2:
  ------------------
  |  Branch (464:5): [True: 6.92k, False: 9.63k]
  ------------------
  465|  7.08k|      num_sbr_header = 1;
  466|  7.08k|      break;
  467|  7.69k|    case 3:
  ------------------
  |  Branch (467:5): [True: 7.69k, False: 8.86k]
  ------------------
  468|  7.69k|      num_sbr_header = 2;
  469|  7.69k|      break;
  470|      3|    case 4:
  ------------------
  |  Branch (470:5): [True: 3, False: 16.5k]
  ------------------
  471|     12|    case 5:
  ------------------
  |  Branch (471:5): [True: 9, False: 16.5k]
  ------------------
  472|     18|    case 6:
  ------------------
  |  Branch (472:5): [True: 6, False: 16.5k]
  ------------------
  473|     18|      num_sbr_header = 3;
  474|     18|      break;
  475|  1.20k|    case 7:
  ------------------
  |  Branch (475:5): [True: 1.20k, False: 15.3k]
  ------------------
  476|  1.20k|      num_sbr_header = 4;
  477|  1.20k|      break;
  478|  16.5k|  }
  479|  43.9k|  for (el = 0; el < num_sbr_header; el++) {
  ------------------
  |  Branch (479:16): [True: 27.3k, False: 16.5k]
  ------------------
  480|  27.3k|    bit_cnt = ixheaacd_get_ld_sbr_header(it_bit_buff, pstr_sbr_config);
  481|  27.3k|  }
  482|  16.5k|  return (bit_cnt);
  483|  16.5k|}
ixheaacd_ga_hdr_dec:
  488|   154k|                           struct ia_bit_buf_struct *it_bit_buff) {
  489|   154k|  WORD32 tmp;
  490|   154k|  WORD32 cnt_bits = it_bit_buff->cnt_bits;
  491|   154k|  UWORD32 aot_init;
  492|   154k|  UWORD32 tmp_aot;
  493|       |
  494|   154k|  ia_audio_specific_config_struct *pstr_audio_specific_config;
  495|       |
  496|   154k|  memset(aac_state_struct->ia_audio_specific_config, 0,
  497|   154k|         sizeof(ia_audio_specific_config_struct));
  498|       |
  499|   154k|  memset(&(aac_state_struct->eld_specific_config), 0,
  500|   154k|         sizeof(ia_eld_specific_config_struct));
  501|       |
  502|   154k|  pstr_audio_specific_config = aac_state_struct->ia_audio_specific_config;
  503|       |
  504|   154k|  aac_state_struct->p_config->str_prog_config.alignment_bits =
  505|   154k|      it_bit_buff->bit_pos;
  506|       |
  507|   154k|  aot_init = aac_state_struct->audio_object_type;
  508|   154k|  aac_state_struct->frame_length = FRAME_SIZE;
  ------------------
  |  |   25|   154k|#define FRAME_SIZE 1024
  ------------------
  509|       |
  510|   154k|  tmp_aot = ixheaacd_read_bits_buf(it_bit_buff, 5);
  511|       |
  512|   154k|  if (tmp_aot == 31) {
  ------------------
  |  Branch (512:7): [True: 42.7k, False: 111k]
  ------------------
  513|  42.7k|    tmp = ixheaacd_read_bits_buf(it_bit_buff, 6);
  514|  42.7k|    tmp_aot = 32 + tmp;
  515|  42.7k|  }
  516|       |
  517|   154k|  if (aac_state_struct->header_dec_done || aac_state_struct->ui_init_done) {
  ------------------
  |  Branch (517:7): [True: 3.80k, False: 150k]
  |  Branch (517:44): [True: 139k, False: 10.3k]
  ------------------
  518|   143k|    if (tmp_aot != aot_init && tmp_aot != AOT_SBR && tmp_aot != AOT_PS)
  ------------------
  |  Branch (518:9): [True: 144, False: 143k]
  |  Branch (518:32): [True: 137, False: 7]
  |  Branch (518:54): [True: 125, False: 12]
  ------------------
  519|    125|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|    125|#define IA_FATAL_ERROR 0x80000000
  ------------------
  520|   143k|  }
  521|       |
  522|   153k|  pstr_audio_specific_config->audio_object_type =
  523|   153k|      aac_state_struct->audio_object_type = tmp_aot;
  524|       |
  525|   153k|  tmp = ixheaacd_get_samp_rate(it_bit_buff, pstr_samp_rate_info,
  526|   153k|                               pstr_audio_specific_config);
  527|   153k|  pstr_audio_specific_config->sampling_frequency = tmp;
  528|       |
  529|   153k|  if (tmp == -1) {
  ------------------
  |  Branch (529:7): [True: 3, False: 153k]
  ------------------
  530|      3|    *bytes_consumed = 1;
  531|      3|    return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      3|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  532|      3|  } else
  533|   153k|    aac_state_struct->sampling_rate = tmp;
  534|   153k|  aac_state_struct->p_config->ui_samp_freq = tmp;
  535|       |
  536|   153k|  aac_state_struct->ch_config = ixheaacd_read_bits_buf(it_bit_buff, 4);
  537|       |
  538|   153k|  if (aac_state_struct->audio_object_type == AOT_USAC &&
  ------------------
  |  Branch (538:7): [True: 24.3k, False: 129k]
  ------------------
  539|  24.3k|      ((aac_state_struct->ch_config >= 3) && (aac_state_struct->ch_config != 8))) {
  ------------------
  |  Branch (539:8): [True: 94, False: 24.2k]
  |  Branch (539:46): [True: 5, False: 89]
  ------------------
  540|      5|    return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      5|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  541|      5|  }
  542|       |
  543|   153k|  pstr_audio_specific_config->channel_configuration =
  544|   153k|      aac_state_struct->ch_config;
  545|       |
  546|   153k|  if (aac_state_struct->audio_object_type == AOT_SBR ||
  ------------------
  |  Branch (546:7): [True: 133, False: 153k]
  ------------------
  547|   153k|      aac_state_struct->audio_object_type == AOT_PS) {
  ------------------
  |  Branch (547:7): [True: 29, False: 153k]
  ------------------
  548|    115|    tmp = ixheaacd_get_samp_rate(it_bit_buff, pstr_samp_rate_info,
  549|    115|                                 pstr_audio_specific_config);
  550|    115|    aac_state_struct->sbr_present_flag = 1;
  551|    115|    if (tmp == -1) {
  ------------------
  |  Branch (551:9): [True: 7, False: 108]
  ------------------
  552|      7|      *bytes_consumed = 1;
  553|      7|      return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      7|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  554|      7|    } else
  555|    108|      aac_state_struct->extension_samp_rate = tmp;
  556|       |
  557|    108|    aac_state_struct->audio_object_type =
  558|    108|        ixheaacd_read_bits_buf(it_bit_buff, 5);
  559|    108|  }
  560|       |
  561|   153k|  if (aac_state_struct->header_dec_done || aac_state_struct->ui_init_done) {
  ------------------
  |  Branch (561:7): [True: 3.85k, False: 150k]
  |  Branch (561:44): [True: 139k, False: 10.2k]
  ------------------
  562|   143k|    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: 143k]
  ------------------
  563|   143k|  }
  564|       |
  565|   153k|  if (((aac_state_struct->audio_object_type >= AOT_AAC_MAIN &&
  ------------------
  |  Branch (565:9): [True: 153k, False: 69]
  ------------------
  566|   153k|        aac_state_struct->audio_object_type <= AOT_AAC_LTP) ||
  ------------------
  |  Branch (566:9): [True: 13.4k, False: 140k]
  ------------------
  567|   140k|       aac_state_struct->audio_object_type == AOT_AAC_SCAL ||
  ------------------
  |  Branch (567:8): [True: 182, False: 140k]
  ------------------
  568|   140k|       aac_state_struct->audio_object_type == AOT_TWIN_VQ ||
  ------------------
  |  Branch (568:8): [True: 70, False: 140k]
  ------------------
  569|   140k|       aac_state_struct->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (569:8): [True: 64.0k, False: 76.0k]
  ------------------
  570|  76.0k|       aac_state_struct->audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (570:8): [True: 18.2k, False: 57.8k]
  ------------------
  571|  57.8k|       aac_state_struct->audio_object_type == AOT_ER_AAC_SCAL ||
  ------------------
  |  Branch (571:8): [True: 84, False: 57.7k]
  ------------------
  572|  57.7k|       aac_state_struct->audio_object_type == AOT_ER_AAC_LC) &&
  ------------------
  |  Branch (572:8): [True: 33.2k, False: 24.5k]
  ------------------
  573|   129k|      aac_state_struct->audio_object_type != AOT_USAC)
  ------------------
  |  Branch (573:7): [True: 129k, False: 0]
  ------------------
  574|       |
  575|   129k|  {
  576|   129k|    aac_state_struct->usac_flag = 0;
  577|       |
  578|   129k|    aac_state_struct->frame_len_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  579|   129k|    if (aac_state_struct->audio_object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (579:9): [True: 111k, False: 18.2k]
  ------------------
  580|   111k|      aac_state_struct->depends_on_core_coder =
  581|   111k|          ixheaacd_read_bits_buf(it_bit_buff, 1);
  582|   111k|      aac_state_struct->extension_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  583|       |
  584|   111k|      if (aac_state_struct->ch_config == 0) {
  ------------------
  |  Branch (584:11): [True: 11.1k, False: 99.9k]
  ------------------
  585|  11.1k|        WORD32 error_code;
  586|  11.1k|        error_code = ixheaacd_read_prog_config_element(
  587|  11.1k|            &aac_state_struct->p_config->str_prog_config, it_bit_buff);
  588|  11.1k|        if (error_code != 0) {
  ------------------
  |  Branch (588:13): [True: 10.8k, False: 312]
  ------------------
  589|  10.8k|          *bytes_consumed = 1;
  590|  10.8k|          return error_code;
  591|  10.8k|        }
  592|    312|        aac_state_struct->p_config->ui_pce_found_in_hdr = 1;
  593|    312|      }
  594|   111k|    }
  595|   118k|    if (aac_state_struct->audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (595:9): [True: 18.2k, False: 100k]
  ------------------
  596|   100k|        aac_state_struct->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (596:9): [True: 53.5k, False: 46.6k]
  ------------------
  597|  46.6k|        aac_state_struct->audio_object_type == AOT_ER_AAC_LC ||
  ------------------
  |  Branch (597:9): [True: 33.1k, False: 13.4k]
  ------------------
  598|   105k|        aac_state_struct->audio_object_type == AOT_ER_AAC_SCAL) {
  ------------------
  |  Branch (598:9): [True: 1, False: 13.4k]
  ------------------
  599|   105k|      aac_state_struct->eld_specific_config.aac_sect_data_resil_flag = 0;
  600|   105k|      aac_state_struct->eld_specific_config.aac_sf_data_resil_flag = 0;
  601|   105k|      aac_state_struct->eld_specific_config.aac_spect_data_resil_flag = 0;
  602|   105k|      aac_state_struct->eld_specific_config.ep_config = 0;
  603|   105k|      if ((aac_state_struct->extension_flag == 1) ||
  ------------------
  |  Branch (603:11): [True: 84.9k, False: 20.0k]
  ------------------
  604|   103k|          aac_state_struct->audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (604:11): [True: 18.2k, False: 1.78k]
  ------------------
  605|   103k|        if (aac_state_struct->audio_object_type >= ER_OBJECT_START) {
  ------------------
  |  |   64|   103k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (605:13): [True: 103k, False: 0]
  ------------------
  606|   103k|          aac_state_struct->eld_specific_config.aac_sect_data_resil_flag =
  607|   103k|              ixheaacd_read_bits_buf(it_bit_buff, 1);
  608|   103k|          aac_state_struct->eld_specific_config.aac_sf_data_resil_flag =
  609|   103k|              ixheaacd_read_bits_buf(it_bit_buff, 1);
  610|   103k|          aac_state_struct->eld_specific_config.aac_spect_data_resil_flag =
  611|   103k|              ixheaacd_read_bits_buf(it_bit_buff, 1);
  612|   103k|          if (aac_state_struct->audio_object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (612:15): [True: 53.4k, False: 49.7k]
  ------------------
  613|  53.4k|            aac_state_struct->eld_specific_config.ep_config =
  614|  53.4k|                ixheaacd_read_bits_buf(it_bit_buff, 2);
  615|   103k|          if (aac_state_struct->audio_object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (615:15): [True: 18.2k, False: 84.9k]
  ------------------
  616|  18.2k|            aac_state_struct->eld_specific_config.ld_sbr_flag_present =
  617|  18.2k|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  618|   103k|        }
  619|   103k|      }
  620|   105k|    }
  621|   118k|  }
  622|   143k|  if (pstr_audio_specific_config->audio_object_type == AOT_USAC) {
  ------------------
  |  Branch (622:7): [True: 24.3k, False: 118k]
  ------------------
  623|  24.3k|    {
  624|  24.3k|      pstr_audio_specific_config->sbr_present_flag = 0;
  625|  24.3k|      pstr_audio_specific_config->ext_audio_object_type = 0;
  626|  24.3k|    }
  627|       |
  628|  24.3k|    {
  629|  24.3k|      {
  630|  24.3k|        SIZE_T tmp = 0xf;
  ------------------
  |  |   28|  24.3k|#define SIZE_T size_t
  ------------------
  631|  24.3k|        UWORD32 i;
  632|  24.3k|        WORD32 err = 0;
  633|       |
  634|  24.3k|        aac_state_struct->usac_flag = 1;
  635|       |
  636|  24.3k|        ixheaacd_conf_default(&(pstr_audio_specific_config->str_usac_config));
  637|  24.3k|        err = ixheaacd_config(it_bit_buff, &(pstr_audio_specific_config->str_usac_config),
  638|  24.3k|                              &(pstr_audio_specific_config->channel_configuration),
  639|  24.3k|                              aac_state_struct->ec_enable);
  640|  24.3k|        if (err != 0) return err;
  ------------------
  |  Branch (640:13): [True: 94, False: 24.2k]
  ------------------
  641|       |
  642|  24.2k|        pstr_audio_specific_config->sampling_frequency =
  643|  24.2k|            pstr_audio_specific_config->str_usac_config.usac_sampling_frequency;
  644|       |
  645|  24.2k|        if (pstr_audio_specific_config->audio_object_type == AOT_USAC) {
  ------------------
  |  Branch (645:13): [True: 24.2k, False: 84]
  ------------------
  646|  24.2k|          pstr_audio_specific_config->sbr_present_flag = 1;
  647|  24.2k|          pstr_audio_specific_config->ext_audio_object_type = AOT_SBR;
  648|  24.2k|          pstr_audio_specific_config->ext_sampling_frequency =
  649|  24.2k|              pstr_audio_specific_config->sampling_frequency;
  650|  24.2k|          pstr_audio_specific_config->ext_samp_frequency_index =
  651|  24.2k|              pstr_audio_specific_config->samp_frequency_index;
  652|       |
  653|   276k|          for (i = 0; i < sizeof(ixheaacd_sampl_freq_idx_table) /
  ------------------
  |  Branch (653:23): [True: 274k, False: 1.86k]
  ------------------
  654|   276k|                              sizeof(ixheaacd_sampl_freq_idx_table[0]);
  655|   274k|               i++) {
  656|   274k|            if (ixheaacd_sampl_freq_idx_table[i] ==
  ------------------
  |  Branch (656:17): [True: 22.3k, False: 252k]
  ------------------
  657|   274k|                (int)(pstr_audio_specific_config->sampling_frequency)) {
  658|  22.3k|              tmp = i;
  659|  22.3k|              break;
  660|  22.3k|            }
  661|   274k|          }
  662|  24.2k|          pstr_audio_specific_config->samp_frequency_index = (UINT32)tmp;
  663|  24.2k|        } else {
  664|     84|          pstr_audio_specific_config->sbr_present_flag = 0;
  665|     84|        }
  666|  24.2k|      }
  667|  24.2k|    }
  668|       |
  669|  24.2k|    if (aac_state_struct->bs_format != LOAS_BSFORMAT) {
  ------------------
  |  |   29|  24.2k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (669:9): [True: 1.12k, False: 23.1k]
  ------------------
  670|  1.12k|      ixheaacd_skip_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
  671|       |
  672|  1.12k|      if ((SIZE_T)it_bit_buff->ptr_read_next ==
  ------------------
  |  Branch (672:11): [True: 0, False: 1.12k]
  ------------------
  673|  1.12k|          (SIZE_T)it_bit_buff->ptr_bit_buf_base) {
  674|      0|        *bytes_consumed = ((WORD32)it_bit_buff->size) >> 3;
  675|  1.12k|      } else {
  676|  1.12k|        *bytes_consumed = (WORD32)((((((SIZE_T)it_bit_buff->ptr_read_next -
  677|  1.12k|                              (SIZE_T)it_bit_buff->ptr_bit_buf_base))
  678|  1.12k|                            << 3) +
  679|  1.12k|                            7 - it_bit_buff->bit_pos + 7) >>
  680|  1.12k|                            3);
  681|  1.12k|      }
  682|  1.12k|    }
  683|  24.2k|    return 0;
  684|  24.3k|  }
  685|       |
  686|   118k|  aac_state_struct->frame_length = FRAME_SIZE;
  ------------------
  |  |   25|   118k|#define FRAME_SIZE 1024
  ------------------
  687|   118k|  if (aac_state_struct->frame_len_flag)
  ------------------
  |  Branch (687:7): [True: 57.9k, False: 60.7k]
  ------------------
  688|  57.9k|    aac_state_struct->frame_length = FRAME_SIZE_SMALL;
  ------------------
  |  |   26|  57.9k|#define FRAME_SIZE_SMALL 960
  ------------------
  689|       |
  690|   118k|  if (aac_state_struct->extension_flag)
  ------------------
  |  Branch (690:7): [True: 85.3k, False: 33.3k]
  ------------------
  691|  85.3k|    aac_state_struct->extension_flag_3 = ixheaacd_read_bits_buf(it_bit_buff, 1);
  692|       |
  693|   118k|  if (aac_state_struct->audio_object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (693:7): [True: 53.5k, False: 65.0k]
  ------------------
  694|  53.5k|    aac_state_struct->frame_length >>= 1;
  695|       |
  696|   118k|  if (aac_state_struct->audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (696:7): [True: 18.2k, False: 100k]
  ------------------
  697|  18.2k|    aac_state_struct->frame_length >>= 1;
  698|  18.2k|    if (aac_state_struct->eld_specific_config.ld_sbr_flag_present) {
  ------------------
  |  Branch (698:9): [True: 16.5k, False: 1.67k]
  ------------------
  699|  16.5k|      aac_state_struct->eld_specific_config.ld_sbr_samp_rate =
  700|  16.5k|          ixheaacd_read_bits_buf(it_bit_buff, 1);
  701|  16.5k|      aac_state_struct->eld_specific_config.ld_sbr_crc_flag =
  702|  16.5k|          ixheaacd_read_bits_buf(it_bit_buff, 1);
  703|       |
  704|  16.5k|      ixheaacd_eld_sbr_header(it_bit_buff, aac_state_struct->ch_config,
  705|  16.5k|                              &aac_state_struct->str_sbr_config);
  706|       |
  707|  16.5k|      aac_state_struct->dwnsmp_signal =
  708|  16.5k|          !aac_state_struct->eld_specific_config.ld_sbr_samp_rate;
  709|  16.5k|    }
  710|       |
  711|  18.2k|    {
  712|  18.2k|      UWORD16 len, eld_ext_type;
  713|  18.2k|      WORD32 err;
  714|  18.2k|      UWORD16 cnt;
  715|       |
  716|  18.2k|      if (ixheaacd_show_bits_buf(it_bit_buff, 4) != ELDEXT_TERM) {
  ------------------
  |  |   96|  18.2k|#define ELDEXT_TERM 0
  ------------------
  |  Branch (716:11): [True: 10.2k, False: 7.97k]
  ------------------
  717|  10.2k|        while ((eld_ext_type = ixheaacd_read_bits_buf(it_bit_buff, 4)) !=
  ------------------
  |  Branch (717:16): [True: 10.2k, False: 0]
  ------------------
  718|  10.2k|               ELDEXT_TERM) {
  ------------------
  |  |   96|  10.2k|#define ELDEXT_TERM 0
  ------------------
  719|  10.2k|          len = ixheaacd_read_bits_buf(it_bit_buff, 4);
  720|  10.2k|          if (len == 15) {
  ------------------
  |  Branch (720:15): [True: 79, False: 10.1k]
  ------------------
  721|     79|            len += ixheaacd_read_bits_buf(it_bit_buff, 8);
  722|     79|          }
  723|  10.2k|          if (len == 15 + 255) {
  ------------------
  |  Branch (723:15): [True: 15, False: 10.2k]
  ------------------
  724|     15|            len += ixheaacd_read_bits_buf(it_bit_buff, 16);
  725|     15|          }
  726|       |
  727|  10.2k|          switch (eld_ext_type) {
  728|    811|            case ELDEXT_SAOC:
  ------------------
  |  |   95|    811|#define ELDEXT_SAOC 1
  ------------------
  |  Branch (728:13): [True: 811, False: 9.45k]
  ------------------
  729|    811|              break;
  730|  1.22k|            case ELDEXT_LDSAC:
  ------------------
  |  |   97|  1.22k|#define ELDEXT_LDSAC 2
  ------------------
  |  Branch (730:13): [True: 1.22k, False: 9.04k]
  ------------------
  731|  1.22k|              aac_state_struct->ldmps_present = 1;
  732|  1.22k|              aac_state_struct->mps_dec_handle.ldmps_config.ldmps_present_flag =
  733|  1.22k|                  1;
  734|  1.22k|              aac_state_struct->mps_dec_handle.object_type =
  735|  1.22k|                  aac_state_struct->audio_object_type;
  736|  1.22k|              aac_state_struct->mps_dec_handle.ec_flag = aac_state_struct->ec_enable;
  737|  1.22k|              err = ixheaacd_ld_spatial_specific_config(
  738|  1.22k|                  &(aac_state_struct->mps_dec_handle.ldmps_config), it_bit_buff);
  739|  1.22k|              if (err) return err;
  ------------------
  |  Branch (739:19): [True: 18, False: 1.20k]
  ------------------
  740|       |
  741|  1.20k|              if (ixheaacd_mps_create(
  ------------------
  |  Branch (741:19): [True: 21, False: 1.18k]
  ------------------
  742|  1.20k|                      &aac_state_struct->mps_dec_handle,
  743|  1.20k|                      aac_state_struct->mps_dec_handle.ldmps_config
  744|  1.20k|                          .bs_frame_length,
  745|  1.20k|                      0, &(aac_state_struct->mps_dec_handle.ldmps_config))) {
  746|     21|                return -1;
  747|     21|              }
  748|  1.18k|              break;
  749|  8.23k|            default:
  ------------------
  |  Branch (749:13): [True: 8.23k, False: 2.03k]
  ------------------
  750|  15.8k|              for (cnt = 0; cnt < len; cnt++) {
  ------------------
  |  Branch (750:29): [True: 7.60k, False: 8.23k]
  ------------------
  751|  7.60k|                ixheaacd_read_bits_buf(it_bit_buff, 8);
  752|  7.60k|              }
  753|       |
  754|  8.23k|              break;
  755|  10.2k|          }
  756|  9.99k|          break;
  757|  10.2k|        }
  758|  10.2k|      }
  759|  18.2k|    }
  760|  17.9k|    if (!((aac_state_struct->ldmps_present == 1) &&
  ------------------
  |  Branch (760:11): [True: 6.58k, False: 11.3k]
  ------------------
  761|  6.58k|          !(it_bit_buff->cnt_bits >= 1)))
  ------------------
  |  Branch (761:11): [True: 12, False: 6.57k]
  ------------------
  762|  17.9k|    ixheaacd_read_bits_buf(it_bit_buff, 1);
  763|  17.9k|  }
  764|   118k|  if (!((aac_state_struct->ldmps_present == 1) && !(it_bit_buff->cnt_bits > 0))) {
  ------------------
  |  Branch (764:9): [True: 6.58k, False: 111k]
  |  Branch (764:51): [True: 12, False: 6.57k]
  ------------------
  765|   118k|    if (aac_state_struct->audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (765:9): [True: 17.9k, False: 100k]
  ------------------
  766|   100k|        aac_state_struct->audio_object_type == AOT_ER_AAC_LC ||
  ------------------
  |  Branch (766:9): [True: 33.1k, False: 67.1k]
  ------------------
  767|  67.1k|        aac_state_struct->audio_object_type == AOT_ER_AAC_SCAL) {
  ------------------
  |  Branch (767:9): [True: 1, False: 67.1k]
  ------------------
  768|  51.1k|      WORD32 ep_config = ixheaacd_read_bits_buf(it_bit_buff, 2);
  769|  51.1k|      if (ep_config == 2 || ep_config == 3) {
  ------------------
  |  Branch (769:11): [True: 72, False: 51.0k]
  |  Branch (769:29): [True: 184, False: 50.8k]
  ------------------
  770|    255|      }
  771|  51.1k|      if (ep_config == 3) {
  ------------------
  |  Branch (771:11): [True: 184, False: 50.9k]
  ------------------
  772|    184|        WORD32 direct_map = ixheaacd_read_bits_buf(it_bit_buff, 1);
  773|    184|        if (!direct_map) {
  ------------------
  |  Branch (773:13): [True: 10, False: 174]
  ------------------
  774|     10|        }
  775|    184|      }
  776|  51.1k|    }
  777|       |
  778|   118k|    tmp = (header_len * 8) - it_bit_buff->cnt_bits;
  779|       |
  780|   118k|    if (aac_state_struct->audio_object_type != AOT_SBR &&
  ------------------
  |  Branch (780:9): [True: 118k, False: 7]
  ------------------
  781|   118k|        (it_bit_buff->cnt_bits >= 16)) {
  ------------------
  |  Branch (781:9): [True: 118k, False: 111]
  ------------------
  782|   118k|      tmp = ixheaacd_read_bits_buf(it_bit_buff, 11);
  783|       |
  784|   118k|      if (tmp == 0x2b7) {
  ------------------
  |  Branch (784:11): [True: 56, False: 118k]
  ------------------
  785|     56|        tmp = ixheaacd_read_bits_buf(it_bit_buff, 5);
  786|       |
  787|     56|        if (tmp == AOT_SBR) {
  ------------------
  |  Branch (787:13): [True: 46, False: 10]
  ------------------
  788|     46|          WORD32 sbr_present_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  789|     46|          if (sbr_present_flag) {
  ------------------
  |  Branch (789:15): [True: 40, False: 6]
  ------------------
  790|     40|            tmp = ixheaacd_get_samp_rate(it_bit_buff, pstr_samp_rate_info,
  791|     40|                                         pstr_audio_specific_config);
  792|     40|            if (tmp == -1) {
  ------------------
  |  Branch (792:17): [True: 1, False: 39]
  ------------------
  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|     39|              aac_state_struct->extension_samp_rate = tmp;
  797|       |
  798|     39|            if (it_bit_buff->cnt_bits >= 12) {
  ------------------
  |  Branch (798:17): [True: 12, False: 27]
  ------------------
  799|     12|              tmp = ixheaacd_read_bits_buf(it_bit_buff, 11);
  800|     12|              if (tmp == 0x548) {
  ------------------
  |  Branch (800:19): [True: 0, False: 12]
  ------------------
  801|      0|                tmp = ixheaacd_read_bits_buf(it_bit_buff, 1);
  802|      0|              }
  803|     12|            }
  804|     39|          }
  805|     46|        }
  806|   118k|      } else if (aac_state_struct->bs_format == LOAS_BSFORMAT) {
  ------------------
  |  |   29|   118k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (806:18): [True: 118k, False: 94]
  ------------------
  807|   118k|        ixheaacd_read_bidirection(it_bit_buff, -11);
  808|   118k|      }
  809|   118k|    }
  810|   118k|  }
  811|       |
  812|   118k|  if (aac_state_struct->audio_object_type != AOT_AAC_LC &&
  ------------------
  |  Branch (812:7): [True: 118k, False: 162]
  ------------------
  813|   118k|      aac_state_struct->audio_object_type != AOT_SBR &&
  ------------------
  |  Branch (813:7): [True: 118k, False: 6]
  ------------------
  814|   118k|      aac_state_struct->audio_object_type != AOT_PS &&
  ------------------
  |  Branch (814:7): [True: 118k, False: 10]
  ------------------
  815|   118k|      aac_state_struct->audio_object_type != AOT_ER_AAC_LC &&
  ------------------
  |  Branch (815:7): [True: 85.0k, False: 33.1k]
  ------------------
  816|  85.0k|      aac_state_struct->audio_object_type != AOT_ER_AAC_LD &&
  ------------------
  |  Branch (816:7): [True: 31.4k, False: 53.5k]
  ------------------
  817|  31.4k|      aac_state_struct->audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (817:7): [True: 13.4k, False: 17.9k]
  ------------------
  818|  13.4k|      aac_state_struct->audio_object_type != AOT_AAC_LTP) {
  ------------------
  |  Branch (818:7): [True: 127, False: 13.3k]
  ------------------
  819|    127|    *bytes_consumed = 1;
  820|    127|    return IA_XHEAAC_DEC_INIT_FATAL_AUDIOOBJECTTYPE_NOT_SUPPORTED;
  ------------------
  |  |   86|    127|#define IA_XHEAAC_DEC_INIT_FATAL_AUDIOOBJECTTYPE_NOT_SUPPORTED 0xFFFF9003
  ------------------
  821|   118k|  } else {
  822|   118k|    if (aac_state_struct->bs_format == LOAS_BSFORMAT) {
  ------------------
  |  |   29|   118k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (822:9): [True: 118k, False: 252]
  ------------------
  823|   118k|      *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) >> 3;
  824|   118k|      if (it_bit_buff->bit_pos < 7) *bytes_consumed += 1;
  ------------------
  |  Branch (824:11): [True: 104k, False: 13.5k]
  ------------------
  825|       |
  826|   118k|    } else
  827|    252|      *bytes_consumed = header_len;
  828|       |
  829|   118k|    return 0;
  830|   118k|  }
  831|   118k|}
ixheaacd_check_if_adts:
  835|   108k|                              WORD32 usr_max_ch) {
  836|   108k|  WORD32 max_frm_len_per_ch, result = 0;
  837|       |
  838|   108k|  result = ixheaacd_adtsframe(adts, it_bit_buff);
  839|       |
  840|   108k|  max_frm_len_per_ch = ixheaac_mult32(768, (adts->no_raw_data_blocks + 1));
  841|       |
  842|   108k|  if (adts->channel_configuration != 0)
  ------------------
  |  Branch (842:7): [True: 77.3k, False: 30.8k]
  ------------------
  843|  77.3k|    max_frm_len_per_ch =
  844|  77.3k|        ixheaac_mult32(max_frm_len_per_ch, adts->channel_configuration);
  845|  30.8k|  else
  846|  30.8k|    max_frm_len_per_ch = max_frm_len_per_ch * usr_max_ch;
  847|       |
  848|   108k|  return ((result != 0) || (adts->aac_frame_length < 8) || (adts->layer != 0) ||
  ------------------
  |  Branch (848:11): [True: 55.2k, False: 52.8k]
  |  Branch (848:28): [True: 676, False: 52.1k]
  |  Branch (848:60): [True: 3.83k, False: 48.3k]
  ------------------
  849|  48.3k|          (adts->profile != AAC_LC_PROFILE));
  ------------------
  |  |  101|  48.3k|#define AAC_LC_PROFILE (2)
  ------------------
  |  Branch (849:11): [True: 0, False: 48.3k]
  ------------------
  850|   108k|}
ixheaacd_latm_header_decode:
  855|  8.25k|    ia_sampling_rate_info_struct *pstr_samp_rate_info) {
  856|  8.25k|  WORD32 sync;
  857|  8.25k|  IA_ERRORCODE result;
  858|  8.25k|  WORD32 next_sync, audio_mux_len_bytes_last;
  859|  8.25k|  WORD32 audio_mux_len_bits_last;
  860|  8.25k|  WORD32 sync_status = aac_state_struct->sync_status;
  861|  8.25k|  WORD32 bit_count = aac_state_struct->bit_count;
  862|  8.25k|  WORD32 cnt_bits = it_bit_buff->cnt_bits;
  863|       |
  864|  8.25k|  *bytes_consumed = 0;
  865|       |
  866|  8.25k|  aac_state_struct->bs_format = LOAS_BSFORMAT;
  ------------------
  |  |   29|  8.25k|#define LOAS_BSFORMAT 3
  ------------------
  867|       |
  868|  8.25k|  if (sync_status == 0) {
  ------------------
  |  Branch (868:7): [True: 8.25k, False: 0]
  ------------------
  869|  25.7k|    do {
  870|  25.7k|      sync = ixheaacd_read_bits_buf(it_bit_buff, 11);
  871|  25.7k|      bit_count += 11;
  872|  10.8M|      while (sync != 0x2B7) {
  ------------------
  |  Branch (872:14): [True: 10.7M, False: 25.7k]
  ------------------
  873|  10.7M|        sync = ((sync & 0x3ff) << 1) | ixheaacd_read_bits_buf(it_bit_buff, 1);
  874|  10.7M|        bit_count += 1;
  875|  10.7M|        if (it_bit_buff->cnt_bits < 13) {
  ------------------
  |  Branch (875:13): [True: 18, False: 10.7M]
  ------------------
  876|     18|          ixheaacd_read_bidirection(it_bit_buff, -11);
  877|     18|          *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8;
  878|     18|          return (IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START);
  ------------------
  |  |   76|     18|#define IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START 0x00001000
  ------------------
  879|     18|        }
  880|  10.7M|      }
  881|       |
  882|  25.7k|      audio_mux_len_bytes_last = ixheaacd_read_bits_buf(it_bit_buff, 13);
  883|  25.7k|      bit_count += 13;
  884|  25.7k|      audio_mux_len_bits_last = audio_mux_len_bytes_last << 3;
  885|  25.7k|      if (it_bit_buff->cnt_bits >= (audio_mux_len_bits_last + 11)) {
  ------------------
  |  Branch (885:11): [True: 25.6k, False: 76]
  ------------------
  886|  25.6k|        ixheaacd_read_bidirection(it_bit_buff, audio_mux_len_bits_last);
  887|  25.6k|        bit_count += audio_mux_len_bits_last;
  888|       |
  889|  25.6k|        next_sync = ixheaacd_read_bits_buf(it_bit_buff, 11);
  890|  25.6k|        bit_count += 11;
  891|       |
  892|  25.6k|        if (next_sync == 0x2B7) {
  ------------------
  |  Branch (892:13): [True: 8.15k, False: 17.5k]
  ------------------
  893|  8.15k|          ixheaacd_read_bidirection(it_bit_buff,
  894|  8.15k|                                    -(11 + audio_mux_len_bits_last + 13 + 11));
  895|  8.15k|          bit_count -= 11 + audio_mux_len_bits_last + 13 + 11;
  896|  8.15k|          break;
  897|  17.5k|        } else {
  898|  17.5k|          ixheaacd_read_bidirection(it_bit_buff,
  899|  17.5k|                                    -(audio_mux_len_bits_last + 24 + 11 - 1));
  900|  17.5k|          bit_count -= audio_mux_len_bits_last + 24 + 11 - 1;
  901|  17.5k|        }
  902|       |
  903|  25.6k|      } else {
  904|     76|        if (it_bit_buff->cnt_bits != audio_mux_len_bits_last) {
  ------------------
  |  Branch (904:13): [True: 17, False: 59]
  ------------------
  905|     17|          ixheaacd_read_bidirection(it_bit_buff, -(13 + 11));
  906|     17|          bit_count -= (13 + 11);
  907|     17|          *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8;
  908|     17|          return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|     17|#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|     76|      }
  915|  25.7k|    } while (1);
  ------------------
  |  Branch (915:14): [True: 17.5k, Folded]
  ------------------
  916|       |
  917|  8.21k|    do {
  918|  8.21k|      WORD32 audio_mux_len_bytes_last;
  919|  8.21k|      WORD32 use_same_stream_mux;
  920|       |
  921|  8.21k|      sync = ixheaacd_read_bits_buf(it_bit_buff, 11);
  922|  8.21k|      bit_count += 11;
  923|       |
  924|  8.21k|      if (sync != 0x2b7) {
  ------------------
  |  Branch (924:11): [True: 0, False: 8.21k]
  ------------------
  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|  8.21k|      audio_mux_len_bytes_last = ixheaacd_read_bits_buf(it_bit_buff, 13);
  932|  8.21k|      bit_count += 13;
  933|       |
  934|  8.21k|      use_same_stream_mux = ixheaacd_read_bits_buf(it_bit_buff, 1);
  935|  8.21k|      bit_count += 1;
  936|       |
  937|  8.21k|      if (!use_same_stream_mux) {
  ------------------
  |  Branch (937:11): [True: 8.21k, False: 3]
  ------------------
  938|  8.21k|        ixheaacd_read_bidirection(it_bit_buff, -25);
  939|  8.21k|        bit_count -= 25;
  940|  8.21k|        sync_status = 1;
  941|  8.21k|        aac_state_struct->sync_status = sync_status;
  942|  8.21k|        break;
  943|  8.21k|      } 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|  8.21k|    *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8;
  958|  8.21k|    {
  959|  8.21k|      ixheaacd_latm_struct latm_struct_element;
  960|  8.21k|      WORD32 sync;
  961|  8.21k|      memset(&latm_struct_element, 0, sizeof(ixheaacd_latm_struct));
  962|       |
  963|  8.21k|      sync = ixheaacd_read_bits_buf(it_bit_buff, 11);
  964|  8.21k|      if (sync == 0x2b7) {
  ------------------
  |  Branch (964:11): [True: 8.21k, False: 0]
  ------------------
  965|  8.21k|        result = ixheaacd_latm_audio_mux_element(
  966|  8.21k|            it_bit_buff, &latm_struct_element, aac_state_struct,
  967|  8.21k|            pstr_samp_rate_info);
  968|  8.21k|        if (result != 0) {
  ------------------
  |  Branch (968:13): [True: 377, False: 7.83k]
  ------------------
  969|    377|          sync_status = 0;
  970|    377|          aac_state_struct->sync_status = sync_status;
  971|       |
  972|    377|          *bytes_consumed += 1;
  973|    377|          return result;
  974|    377|        }
  975|  8.21k|      }
  976|  8.21k|    }
  977|  8.21k|  }
  978|  7.83k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  7.83k|#define IA_NO_ERROR 0x00000000
  ------------------
  979|  8.25k|}
ixheaacd_aac_headerdecode:
  984|  14.7k|    const ia_aac_dec_huffman_tables_struct *pstr_huffmann_tables) {
  985|  14.7k|  struct ia_bit_buf_struct it_bit_buff = {0}, *handle_bit_buff;
  986|  14.7k|  ia_adif_header_struct adif = {0};
  987|  14.7k|  ia_adts_header_struct adts = {0};
  988|  14.7k|  WORD32 result;
  989|  14.7k|  WORD32 header_len;
  990|  14.7k|  WORD32 sync = 0;
  991|       |
  992|  14.7k|  WORD32 disable_sync = p_obj_exhaacplus_dec->aac_config.ui_disable_sync;
  993|  14.7k|  WORD32 is_ga_header = p_obj_exhaacplus_dec->aac_config.ui_mp4_flag;
  994|       |
  995|  14.7k|  WORD32 loas_present = p_obj_exhaacplus_dec->aac_config.loas_present;
  996|       |
  997|  14.7k|  ia_aac_dec_state_struct *aac_state_struct =
  998|  14.7k|      p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_PERSIST_IDX];
  ------------------
  |  |   32|  14.7k|#define IA_ENHAACPLUS_DEC_PERSIST_IDX (0)
  ------------------
  999|  14.7k|  WORD32 usr_max_ch = aac_state_struct->p_config->ui_max_channels;
 1000|       |
 1001|  14.7k|  ia_sampling_rate_info_struct *pstr_samp_rate_info =
 1002|  14.7k|      (ia_sampling_rate_info_struct *)&pstr_huffmann_tables
 1003|  14.7k|          ->str_sample_rate_info[0];
 1004|       |
 1005|  14.7k|  if (buffer == 0) {
  ------------------
  |  Branch (1005:7): [True: 0, False: 14.7k]
  ------------------
 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.7k|  header_len = aac_state_struct->ui_in_bytes;
 1010|       |
 1011|  14.7k|  handle_bit_buff = ixheaacd_create_bit_buf(&it_bit_buff, (UWORD8 *)buffer,
 1012|  14.7k|                                            (WORD16)header_len);
 1013|  14.7k|  handle_bit_buff->cnt_bits += (header_len << 3);
 1014|  14.7k|  handle_bit_buff->xaac_jmp_buf = &aac_state_struct->xaac_jmp_buf;
 1015|       |
 1016|  14.7k|  if (is_ga_header == 1) {
  ------------------
  |  Branch (1016:7): [True: 1.78k, False: 12.9k]
  ------------------
 1017|  1.78k|    return ixheaacd_ga_hdr_dec(aac_state_struct, header_len, bytes_consumed,
 1018|  1.78k|                               pstr_samp_rate_info, handle_bit_buff);
 1019|  12.9k|  } else if (loas_present) {
  ------------------
  |  Branch (1019:14): [True: 0, False: 12.9k]
  ------------------
 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.9k|  else {
 1025|  12.9k|    WORD32 header_found = 0;
 1026|  12.9k|    WORD32 bytes_taken = -1;
 1027|  12.9k|    WORD32 prev_offset = 0;
 1028|  12.9k|    WORD32 run_once = 1;
 1029|  12.9k|    if (disable_sync == 0) run_once = 0;
  ------------------
  |  Branch (1029:9): [True: 12.9k, False: 0]
  ------------------
 1030|       |
 1031|   586k|    do {
 1032|   586k|      bytes_taken++;
 1033|   586k|      buffer += (bytes_taken - prev_offset);
 1034|       |
 1035|   586k|      prev_offset = bytes_taken;
 1036|       |
 1037|   586k|      handle_bit_buff = ixheaacd_create_bit_buf(
 1038|   586k|          &it_bit_buff, (UWORD8 *)buffer, (WORD16)(header_len - bytes_taken));
 1039|   586k|      handle_bit_buff->cnt_bits += (8 * (header_len - bytes_taken));
 1040|       |
 1041|   586k|      handle_bit_buff->pstr_adts_crc_info = &handle_bit_buff->str_adts_crc_info;
 1042|   586k|      ixheaacd_adts_crc_open(handle_bit_buff->pstr_adts_crc_info);
 1043|       |
 1044|   586k|      aac_state_struct->ldmps_present = 0;
 1045|   586k|      aac_state_struct->latm_initialized = 0;
 1046|   586k|      memset(&aac_state_struct->mps_dec_handle, 0,
 1047|   586k|             sizeof(aac_state_struct->mps_dec_handle));
 1048|   586k|      memset(&aac_state_struct->eld_specific_config, 0,
 1049|   586k|             sizeof(aac_state_struct->eld_specific_config));
 1050|       |
 1051|   586k|      if ((buffer[0] == 'A') && (buffer[1] == 'D') && (buffer[2] == 'I') &&
  ------------------
  |  Branch (1051:11): [True: 8.47k, False: 578k]
  |  Branch (1051:33): [True: 6.21k, False: 2.25k]
  |  Branch (1051:55): [True: 5.26k, False: 953]
  ------------------
 1052|  5.26k|          (buffer[3] == 'F')) {
  ------------------
  |  Branch (1052:11): [True: 3.56k, False: 1.69k]
  ------------------
 1053|  3.56k|        adif.prog_config_present = 0;
 1054|  3.56k|        result = ixheaacd_get_adif_header(&adif, handle_bit_buff);
 1055|  3.56k|        if (result == 0) {
  ------------------
  |  Branch (1055:13): [True: 3, False: 3.56k]
  ------------------
 1056|      3|          if (adif.prog_config_present == 1) {
  ------------------
  |  Branch (1056:15): [True: 3, False: 0]
  ------------------
 1057|      3|            aac_state_struct->p_config->ui_pce_found_in_hdr = 1;
 1058|      3|            aac_state_struct->p_config->str_prog_config = adif.str_prog_config;
 1059|      3|          }
 1060|      3|          aac_state_struct->s_adif_hdr_present = 1;
 1061|      3|          aac_state_struct->audio_object_type =
 1062|      3|              adif.str_prog_config.object_type;
 1063|      3|          aac_state_struct->sampling_rate =
 1064|      3|              pstr_samp_rate_info[adif.str_prog_config.samp_freq_index]
 1065|      3|                  .sampling_frequency;
 1066|      3|          aac_state_struct->ch_config = adif.str_prog_config.channels;
 1067|      3|          bytes_taken +=
 1068|      3|              ((handle_bit_buff->size - handle_bit_buff->cnt_bits) >> 3);
 1069|       |
 1070|      3|          header_found = 1;
 1071|      3|          aac_state_struct->frame_length = FRAME_SIZE;
  ------------------
  |  |   25|      3|#define FRAME_SIZE 1024
  ------------------
 1072|      3|          if (aac_state_struct->audio_object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (1072:15): [True: 0, False: 3]
  ------------------
 1073|      0|            aac_state_struct->frame_length >>= 1;
 1074|      3|        }
 1075|  3.56k|      }
 1076|       |
 1077|   583k|      else if ((sync = ixheaacd_read_bits_buf(&it_bit_buff, 12)) == 0xfff) {
  ------------------
  |  Branch (1077:16): [True: 71.8k, False: 511k]
  ------------------
 1078|  71.8k|        result = ixheaacd_check_if_adts(&adts, handle_bit_buff, usr_max_ch);
 1079|  71.8k|        if (result != 0) {
  ------------------
  |  Branch (1079:13): [True: 58.5k, False: 13.3k]
  ------------------
 1080|  58.5k|          continue;
 1081|  58.5k|        }
 1082|       |
 1083|  13.3k|        if ((adts.aac_frame_length + ADTS_HEADER_LENGTH) <
  ------------------
  |  |  103|  13.3k|#define ADTS_HEADER_LENGTH 7
  ------------------
  |  Branch (1083:13): [True: 8.37k, False: 4.92k]
  ------------------
 1084|  13.3k|            (header_len - bytes_taken)) {
 1085|  8.37k|          ia_adts_header_struct adts_loc = {0};
 1086|       |
 1087|  8.37k|          ixheaacd_create_init_bit_buf(
 1088|  8.37k|              &it_bit_buff, (UWORD8 *)(buffer + adts.aac_frame_length),
 1089|  8.37k|              (WORD16)(header_len - bytes_taken - adts.aac_frame_length));
 1090|       |
 1091|  8.37k|          handle_bit_buff = &it_bit_buff;
 1092|       |
 1093|  8.37k|          adts_loc.sync_word =
 1094|  8.37k|              (WORD16)ixheaacd_read_bits_buf(handle_bit_buff, 12);
 1095|       |
 1096|  8.37k|          if (adts_loc.sync_word != 0xFFF) {
  ------------------
  |  Branch (1096:15): [True: 6.99k, False: 1.38k]
  ------------------
 1097|  6.99k|            continue;
 1098|  6.99k|          }
 1099|       |
 1100|  1.38k|          result =
 1101|  1.38k|              ixheaacd_check_if_adts(&adts_loc, handle_bit_buff, usr_max_ch);
 1102|  1.38k|          if ((result != 0) ||
  ------------------
  |  Branch (1102:15): [True: 1.06k, False: 320]
  ------------------
 1103|    320|              (adts.samp_freq_index != adts_loc.samp_freq_index) ||
  ------------------
  |  Branch (1103:15): [True: 256, False: 64]
  ------------------
 1104|  1.37k|              (adts.channel_configuration != adts_loc.channel_configuration)) {
  ------------------
  |  Branch (1104:15): [True: 51, False: 13]
  ------------------
 1105|  1.37k|            continue;
 1106|  1.37k|          }
 1107|  1.38k|        }
 1108|       |
 1109|  4.93k|        {
 1110|  4.93k|          WORD32 obj_type;
 1111|  4.93k|          obj_type = adts.profile;
 1112|       |
 1113|  4.93k|          aac_state_struct->audio_object_type = obj_type;
 1114|  4.93k|          aac_state_struct->sampling_rate =
 1115|  4.93k|              ((pstr_samp_rate_info[adts.samp_freq_index].sampling_frequency));
 1116|  4.93k|          aac_state_struct->ch_config = adts.channel_configuration;
 1117|  4.93k|          aac_state_struct->s_adts_hdr_present = 1;
 1118|  4.93k|          header_found = 1;
 1119|  4.93k|          aac_state_struct->bs_format = ADTS_BSFORMAT;
  ------------------
  |  |   28|  4.93k|#define ADTS_BSFORMAT 2
  ------------------
 1120|  4.93k|          aac_state_struct->frame_length = FRAME_SIZE;
  ------------------
  |  |   25|  4.93k|#define FRAME_SIZE 1024
  ------------------
 1121|  4.93k|          if (aac_state_struct->audio_object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (1121:15): [True: 0, False: 4.93k]
  ------------------
 1122|      0|            aac_state_struct->frame_length >>= 1;
 1123|  4.93k|        }
 1124|   511k|      } else if (0x2b7 == (sync >> 1)) {
  ------------------
  |  Branch (1124:18): [True: 8.25k, False: 503k]
  ------------------
 1125|  8.25k|        ixheaacd_read_bidirection(&it_bit_buff, -12);
 1126|  8.25k|        result =
 1127|  8.25k|            ixheaacd_latm_header_decode(aac_state_struct, &it_bit_buff,
 1128|  8.25k|                                        bytes_consumed, pstr_samp_rate_info);
 1129|  8.25k|        if (result != 0) {
  ------------------
  |  Branch (1129:13): [True: 415, False: 7.83k]
  ------------------
 1130|    415|          if ((result == (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES) ||
  ------------------
  |  |   98|    415|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  |  Branch (1130:15): [True: 20, False: 395]
  ------------------
 1131|    395|              (result < 0)) {
  ------------------
  |  Branch (1131:15): [True: 38, False: 357]
  ------------------
 1132|     58|            bytes_taken += *bytes_consumed;
 1133|     58|            *bytes_consumed = bytes_taken;
 1134|     58|            return result;
 1135|     58|          } else
 1136|    357|            bytes_taken += *bytes_consumed - 1;
 1137|    357|          continue;
 1138|    415|        }
 1139|  7.83k|        header_found = 1;
 1140|  7.83k|        aac_state_struct->bs_format = LOAS_BSFORMAT;
  ------------------
  |  |   29|  7.83k|#define LOAS_BSFORMAT 3
  ------------------
 1141|  7.83k|        bytes_taken += *bytes_consumed;
 1142|  7.83k|      }
 1143|       |
 1144|   586k|    } while ((header_found == 0 && ((bytes_taken + 1) < (header_len - 68))) &&
  ------------------
  |  Branch (1144:15): [True: 573k, False: 12.7k]
  |  Branch (1144:36): [True: 573k, False: 107]
  ------------------
 1145|   573k|             run_once != 1);
  ------------------
  |  Branch (1145:14): [True: 573k, False: 0]
  ------------------
 1146|       |
 1147|  12.9k|    if (header_found == 0 && disable_sync == 1) {
  ------------------
  |  Branch (1147:9): [True: 107, False: 12.7k]
  |  Branch (1147:30): [True: 0, False: 107]
  ------------------
 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.9k|    switch (aac_state_struct->audio_object_type) {
 1159|      4|        case AOT_AAC_MAIN:
  ------------------
  |  Branch (1159:9): [True: 4, False: 12.9k]
  ------------------
 1160|  4.94k|        case AOT_AAC_LC:
  ------------------
  |  Branch (1160:9): [True: 4.93k, False: 7.96k]
  ------------------
 1161|  4.94k|        case AOT_AAC_SSR:
  ------------------
  |  Branch (1161:9): [True: 1, False: 12.9k]
  ------------------
 1162|  5.23k|        case AOT_AAC_LTP:
  ------------------
  |  Branch (1162:9): [True: 293, False: 12.6k]
  ------------------
 1163|  5.24k|        case AOT_AAC_SCAL:
  ------------------
  |  Branch (1163:9): [True: 7, False: 12.8k]
  ------------------
 1164|  5.24k|        case AOT_TWIN_VQ:
  ------------------
  |  Branch (1164:9): [True: 3, False: 12.9k]
  ------------------
 1165|  6.20k|        case AOT_ER_AAC_LD:
  ------------------
  |  Branch (1165:9): [True: 959, False: 11.9k]
  ------------------
 1166|  8.01k|        case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (1166:9): [True: 1.80k, False: 11.0k]
  ------------------
 1167|  8.75k|        case AOT_ER_AAC_LC:
  ------------------
  |  Branch (1167:9): [True: 739, False: 12.1k]
  ------------------
 1168|  12.7k|        case AOT_USAC:
  ------------------
  |  Branch (1168:9): [True: 4.02k, False: 8.87k]
  ------------------
 1169|  12.7k|          break;
 1170|     95|        default:
  ------------------
  |  Branch (1170:9): [True: 95, False: 12.8k]
  ------------------
 1171|     95|          return IA_XHEAAC_DEC_INIT_FATAL_AUDIOOBJECTTYPE_NOT_SUPPORTED;
  ------------------
  |  |   86|     95|#define IA_XHEAAC_DEC_INIT_FATAL_AUDIOOBJECTTYPE_NOT_SUPPORTED 0xFFFF9003
  ------------------
 1172|  12.9k|      }
 1173|       |
 1174|  12.7k|    if (aac_state_struct->audio_object_type != AOT_USAC)
  ------------------
  |  Branch (1174:9): [True: 8.75k, False: 4.02k]
  ------------------
 1175|  8.75k|      aac_state_struct->usac_flag = 0;
 1176|  12.7k|    *bytes_consumed = bytes_taken;
 1177|       |
 1178|  12.7k|    if ((handle_bit_buff->cnt_bits < 0) &&
  ------------------
  |  Branch (1178:9): [True: 0, False: 12.7k]
  ------------------
 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.7k|    if (header_found == 0) {
  ------------------
  |  Branch (1185:9): [True: 12, False: 12.7k]
  ------------------
 1186|     12|      *bytes_consumed = bytes_taken + 1;
 1187|     12|      return IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START;
  ------------------
  |  |   76|     12|#define IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START 0x00001000
  ------------------
 1188|  12.7k|    } else {
 1189|  12.7k|      return 0;
 1190|  12.7k|    }
 1191|  12.7k|  }
 1192|  14.7k|}
ixheaacd_headerdecode.c:ixheaacd_aac_bytealign:
  106|  52.8k|ixheaacd_aac_bytealign(struct ia_bit_buf_struct *it_bit_buff) {
  107|  52.8k|  WORD16 num_bit;
  108|  52.8k|  num_bit = (it_bit_buff->bit_pos + 1);
  109|  52.8k|  if (num_bit != 8) {
  ------------------
  |  Branch (109:7): [True: 0, False: 52.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|  52.8k|}
ixheaacd_headerdecode.c:ixheaacd_get_ld_sbr_header:
  417|  27.3k|    ia_sbr_header_data_struct *sbr_header_data) {
  418|  27.3k|  WORD32 header_extra_1, header_extra_2;
  419|  27.3k|  UWORD32 tmp, bit_cnt = 0;
  420|       |
  421|  27.3k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 16);
  422|  27.3k|  bit_cnt += 16;
  423|       |
  424|  27.3k|  sbr_header_data->amp_res = (tmp & 0x8000) >> 15;
  425|  27.3k|  sbr_header_data->start_freq = (tmp & 0x7800) >> 11;
  426|  27.3k|  sbr_header_data->stop_freq = (tmp & 0x780) >> 7;
  427|  27.3k|  sbr_header_data->xover_band = (tmp & 0x70) >> 4;
  428|  27.3k|  header_extra_1 = (tmp & 0x0002) >> 1;
  429|  27.3k|  header_extra_2 = (tmp & 0x0001);
  430|       |
  431|  27.3k|  if (header_extra_1) {
  ------------------
  |  Branch (431:7): [True: 3.63k, False: 23.7k]
  ------------------
  432|  3.63k|    sbr_header_data->freq_scale = ixheaacd_read_bits_buf(it_bit_buff, 2);
  433|  3.63k|    sbr_header_data->alter_scale = ixheaacd_read_bits_buf(it_bit_buff, 1);
  434|  3.63k|    sbr_header_data->noise_bands = ixheaacd_read_bits_buf(it_bit_buff, 2);
  435|  23.7k|  } else {
  436|  23.7k|    sbr_header_data->freq_scale = 2;
  437|  23.7k|    sbr_header_data->alter_scale = 1;
  438|  23.7k|    sbr_header_data->noise_bands = 2;
  439|  23.7k|  }
  440|       |
  441|  27.3k|  if (header_extra_2) {
  ------------------
  |  Branch (441:7): [True: 1.96k, False: 25.3k]
  ------------------
  442|  1.96k|    sbr_header_data->limiter_bands = ixheaacd_read_bits_buf(it_bit_buff, 2);
  443|  1.96k|    sbr_header_data->limiter_gains = ixheaacd_read_bits_buf(it_bit_buff, 2);
  444|  1.96k|    sbr_header_data->interpol_freq = ixheaacd_read_bits_buf(it_bit_buff, 1);
  445|  1.96k|    sbr_header_data->smoothing_mode = ixheaacd_read_bits_buf(it_bit_buff, 1);
  446|  25.3k|  } else {
  447|  25.3k|    sbr_header_data->limiter_bands = 2;
  448|  25.3k|    sbr_header_data->limiter_gains = 2;
  449|  25.3k|    sbr_header_data->interpol_freq = 1;
  450|  25.3k|    sbr_header_data->smoothing_mode = 1;
  451|  25.3k|  }
  452|       |
  453|  27.3k|  return (bit_cnt);
  454|  27.3k|}
ixheaacd_headerdecode.c:ixheaacd_get_adif_header:
  260|  3.56k|    ia_adif_header_struct *adif, struct ia_bit_buf_struct *it_bit_buff) {
  261|  3.56k|  WORD32 i;
  262|  3.56k|  WORD32 ret_val = 0, tmp;
  263|       |
  264|  3.56k|  ixheaacd_read_bits_buf(it_bit_buff, 16);
  265|  3.56k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 17);
  266|       |
  267|  3.56k|  if (tmp & 0x1) {
  ------------------
  |  Branch (267:7): [True: 847, False: 2.72k]
  ------------------
  268|    847|    ixheaacd_skip_bits(it_bit_buff, 8, 9);
  269|    847|  }
  270|       |
  271|  3.56k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 3);
  272|       |
  273|  3.56k|  adif->bit_stream_type = (tmp & 0x1);
  274|       |
  275|  3.56k|  ixheaacd_read_bits_buf(it_bit_buff, 23);
  276|       |
  277|  3.56k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 4);
  278|       |
  279|  6.57k|  for (i = 0; i <= tmp; i++) {
  ------------------
  |  Branch (279:15): [True: 6.55k, False: 23]
  ------------------
  280|  6.55k|    if (adif->bit_stream_type == 0) {
  ------------------
  |  Branch (280:9): [True: 6.13k, False: 421]
  ------------------
  281|  6.13k|      ixheaacd_read_bits_buf(it_bit_buff, 20);
  282|  6.13k|    }
  283|       |
  284|  6.55k|    adif->prog_config_present = 1;
  285|  6.55k|    adif->str_prog_config.alignment_bits = 7;
  286|  6.55k|    ret_val =
  287|  6.55k|        ixheaacd_read_prog_config_element(&adif->str_prog_config, it_bit_buff);
  288|  6.55k|    if (ret_val) {
  ------------------
  |  Branch (288:9): [True: 3.54k, False: 3.00k]
  ------------------
  289|  3.54k|      return ret_val;
  290|  3.54k|    }
  291|  6.55k|  }
  292|       |
  293|     23|  return 0;
  294|  3.56k|}

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

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

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

ixheaacd_sbr_ratio:
   81|  24.3k|UWORD32 ixheaacd_sbr_ratio(UWORD32 core_sbr_framelength_idx) {
   82|  24.3k|  UWORD32 sbr_ratio_index = 0x0FF;
   83|       |
   84|  24.3k|  switch (core_sbr_framelength_idx) {
  ------------------
  |  Branch (84:11): [True: 24.3k, False: 0]
  ------------------
   85|  1.50k|    case 0:
  ------------------
  |  Branch (85:5): [True: 1.50k, False: 22.8k]
  ------------------
   86|  18.2k|    case 1:
  ------------------
  |  Branch (86:5): [True: 16.7k, False: 7.58k]
  ------------------
   87|  18.2k|      sbr_ratio_index = USAC_SBR_RATIO_NO_SBR;
  ------------------
  |  |   33|  18.2k|#define USAC_SBR_RATIO_NO_SBR 0
  ------------------
   88|  18.2k|      break;
   89|  1.45k|    case 2:
  ------------------
  |  Branch (89:5): [True: 1.45k, False: 22.8k]
  ------------------
   90|  1.45k|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_8_3;
  ------------------
  |  |   35|  1.45k|#define USAC_SBR_RATIO_INDEX_8_3 2
  ------------------
   91|  1.45k|      break;
   92|  4.14k|    case 3:
  ------------------
  |  Branch (92:5): [True: 4.14k, False: 20.2k]
  ------------------
   93|  4.14k|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_2_1;
  ------------------
  |  |   34|  4.14k|#define USAC_SBR_RATIO_INDEX_2_1 1
  ------------------
   94|  4.14k|      break;
   95|    486|    case 4:
  ------------------
  |  Branch (95:5): [True: 486, False: 23.8k]
  ------------------
   96|    486|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_4_1;
  ------------------
  |  |   36|    486|#define USAC_SBR_RATIO_INDEX_4_1 3
  ------------------
   97|    486|      break;
   98|  24.3k|  }
   99|       |
  100|  24.3k|  return sbr_ratio_index;
  101|  24.3k|}
ixheaacd_sbr_params:
  115|  5.16k|                            UWORD32 *sample_freq_indx) {
  116|  5.16k|  UWORD32 sbr_ratio_index = 0x0FF;
  117|       |
  118|  5.16k|  *output_framelength = -1;
  119|       |
  120|  5.16k|  switch (core_sbr_framelength_idx) {
  ------------------
  |  Branch (120:11): [True: 5.16k, False: 0]
  ------------------
  121|  1.06k|    case 0:
  ------------------
  |  Branch (121:5): [True: 1.06k, False: 4.10k]
  ------------------
  122|  1.06k|      sbr_ratio_index = USAC_SBR_RATIO_NO_SBR;
  ------------------
  |  |   33|  1.06k|#define USAC_SBR_RATIO_NO_SBR 0
  ------------------
  123|  1.06k|      *output_framelength = USAC_OUT_FRAMELENGTH_768;
  ------------------
  |  |   38|  1.06k|#define USAC_OUT_FRAMELENGTH_768 768
  ------------------
  124|  1.06k|      *block_size = 768;
  125|  1.06k|      *output_samples = *block_size;
  126|  1.06k|      break;
  127|  1.13k|    case 1:
  ------------------
  |  Branch (127:5): [True: 1.13k, False: 4.02k]
  ------------------
  128|  1.13k|      sbr_ratio_index = USAC_SBR_RATIO_NO_SBR;
  ------------------
  |  |   33|  1.13k|#define USAC_SBR_RATIO_NO_SBR 0
  ------------------
  129|  1.13k|      *output_framelength = USAC_OUT_FRAMELENGTH_1024;
  ------------------
  |  |   39|  1.13k|#define USAC_OUT_FRAMELENGTH_1024 1024
  ------------------
  130|  1.13k|      *block_size = 1024;
  131|  1.13k|      *output_samples = *block_size;
  132|  1.13k|      break;
  133|    665|    case 2:
  ------------------
  |  Branch (133:5): [True: 665, False: 4.49k]
  ------------------
  134|    665|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_8_3;
  ------------------
  |  |   35|    665|#define USAC_SBR_RATIO_INDEX_8_3 2
  ------------------
  135|    665|      *output_framelength = USAC_OUT_FRAMELENGTH_2048;
  ------------------
  |  |   40|    665|#define USAC_OUT_FRAMELENGTH_2048 2048
  ------------------
  136|    665|      *block_size = 768;
  137|    665|      *output_samples = (*block_size * 8) / 3;
  138|    665|      *sample_rate_layer = (*sample_rate_layer * 3) >> 3;
  139|    665|      break;
  140|  2.02k|    case 3:
  ------------------
  |  Branch (140:5): [True: 2.02k, False: 3.14k]
  ------------------
  141|  2.02k|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_2_1;
  ------------------
  |  |   34|  2.02k|#define USAC_SBR_RATIO_INDEX_2_1 1
  ------------------
  142|  2.02k|      *output_framelength = USAC_OUT_FRAMELENGTH_2048;
  ------------------
  |  |   40|  2.02k|#define USAC_OUT_FRAMELENGTH_2048 2048
  ------------------
  143|  2.02k|      *block_size = 1024;
  144|  2.02k|      *output_samples = *block_size * 2;
  145|  2.02k|      *sample_rate_layer = *sample_rate_layer >> 1;
  146|  2.02k|      break;
  147|    275|    case 4:
  ------------------
  |  Branch (147:5): [True: 275, False: 4.88k]
  ------------------
  148|    275|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_4_1;
  ------------------
  |  |   36|    275|#define USAC_SBR_RATIO_INDEX_4_1 3
  ------------------
  149|    275|      *output_framelength = USAC_OUT_FRAMELENGTH_4096;
  ------------------
  |  |   41|    275|#define USAC_OUT_FRAMELENGTH_4096 4096
  ------------------
  150|    275|      *block_size = 1024;
  151|    275|      *output_samples = *block_size * 4;
  152|    275|      *sample_rate_layer = *sample_rate_layer >> 2;
  153|    275|      break;
  154|  5.16k|  }
  155|       |
  156|  5.16k|  *sample_freq_indx = ixheaacd_get_sample_freq_indx(*sample_rate_layer);
  157|       |
  158|  5.16k|  return sbr_ratio_index;
  159|  5.16k|}
ixheaacd_read_escape_value:
  163|  89.2k|                                UWORD32 no_bits2, UWORD32 no_bits3) {
  164|  89.2k|  UWORD32 value = 0;
  165|  89.2k|  UWORD32 val_add = 0;
  166|  89.2k|  UWORD32 max_val1 = (1 << no_bits1) - 1;
  167|  89.2k|  UWORD32 max_val2 = (1 << no_bits2) - 1;
  168|       |
  169|  89.2k|  value = ixheaacd_read_bits_buf(it_bit_buff, no_bits1);
  170|       |
  171|  89.2k|  if (value == max_val1) {
  ------------------
  |  Branch (171:7): [True: 4.69k, False: 84.5k]
  ------------------
  172|  4.69k|    val_add = ixheaacd_read_bits_buf(it_bit_buff, no_bits2);
  173|       |
  174|  4.69k|    value += val_add;
  175|       |
  176|  4.69k|    if (val_add == max_val2) {
  ------------------
  |  Branch (176:9): [True: 622, False: 4.07k]
  ------------------
  177|    622|      val_add = ixheaacd_read_bits_buf(it_bit_buff, no_bits3);
  178|       |
  179|    622|      value += val_add;
  180|    622|    }
  181|  4.69k|  }
  182|       |
  183|  89.2k|  *ext_ele_value = value;
  184|  89.2k|}
ixheaacd_sbr_config:
  217|  6.02k|                         ia_usac_dec_sbr_config_struct *pstr_usac_sbr_config) {
  218|  6.02k|  pstr_usac_sbr_config->harmonic_sbr = ixheaacd_read_bits_buf(it_bit_buff, 1);
  219|  6.02k|  pstr_usac_sbr_config->bs_inter_tes = ixheaacd_read_bits_buf(it_bit_buff, 1);
  220|  6.02k|  pstr_usac_sbr_config->bs_pvc = ixheaacd_read_bits_buf(it_bit_buff, 1);
  221|  6.02k|  pstr_usac_sbr_config->dflt_start_freq =
  222|  6.02k|      ixheaacd_read_bits_buf(it_bit_buff, 4);
  223|       |
  224|  6.02k|  pstr_usac_sbr_config->dflt_stop_freq = ixheaacd_read_bits_buf(it_bit_buff, 4);
  225|  6.02k|  pstr_usac_sbr_config->dflt_header_extra1 =
  226|  6.02k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  227|  6.02k|  pstr_usac_sbr_config->dflt_header_extra2 =
  228|  6.02k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  229|       |
  230|  6.02k|  if (pstr_usac_sbr_config->dflt_header_extra1) {
  ------------------
  |  Branch (230:7): [True: 2.98k, False: 3.03k]
  ------------------
  231|  2.98k|    pstr_usac_sbr_config->dflt_freq_scale =
  232|  2.98k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  233|  2.98k|    pstr_usac_sbr_config->dflt_alter_scale =
  234|  2.98k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  235|  2.98k|    pstr_usac_sbr_config->dflt_noise_bands =
  236|  2.98k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  237|  2.98k|  }
  238|       |
  239|  6.02k|  if (pstr_usac_sbr_config->dflt_header_extra2) {
  ------------------
  |  Branch (239:7): [True: 1.05k, False: 4.97k]
  ------------------
  240|  1.05k|    pstr_usac_sbr_config->dflt_limiter_bands =
  241|  1.05k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  242|  1.05k|    pstr_usac_sbr_config->dflt_limiter_gains =
  243|  1.05k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  244|  1.05k|    pstr_usac_sbr_config->dflt_interpol_freq =
  245|  1.05k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  246|  1.05k|    pstr_usac_sbr_config->dflt_smoothing_mode =
  247|  1.05k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  248|  1.05k|  }
  249|  6.02k|}
ixheaacd_ext_element_config:
  255|  14.3k|    WORD32 *preroll_flag) {
  256|  14.3k|  UWORD32 usac_ext_element_type, usac_ext_element_config_length, flag;
  257|       |
  258|  14.3k|  UWORD32 i;
  259|       |
  260|  14.3k|  ixheaacd_read_escape_value(it_bit_buff, &(usac_ext_element_type), 4, 8, 16);
  261|       |
  262|  14.3k|  ixheaacd_read_escape_value(it_bit_buff, &(usac_ext_element_config_length), 4,
  263|  14.3k|                             8, 16);
  264|  14.3k|  if (usac_ext_element_config_length >= 768) return -1;
  ------------------
  |  Branch (264:7): [True: 2, False: 14.3k]
  ------------------
  265|       |
  266|  14.3k|  flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  267|       |
  268|  14.3k|  *ptr_usac_ext_ele_payload_len = 0;
  269|       |
  270|  14.3k|  if (flag) {
  ------------------
  |  Branch (270:7): [True: 3.02k, False: 11.3k]
  ------------------
  271|  3.02k|    ixheaacd_read_escape_value(
  272|  3.02k|        it_bit_buff,
  273|  3.02k|        (UWORD32 *)(&(pstr_usac_element_config->usac_ext_eleme_def_len)), 8, 16,
  274|  3.02k|        0);
  275|  3.02k|    pstr_usac_element_config->usac_ext_eleme_def_len += 1;
  276|       |
  277|  11.3k|  } else {
  278|  11.3k|    pstr_usac_element_config->usac_ext_eleme_def_len = 0;
  279|  11.3k|  }
  280|       |
  281|  14.3k|  pstr_usac_element_config->usac_ext_elem_pld_frag =
  282|  14.3k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  283|       |
  284|  14.3k|  switch (usac_ext_element_type) {
  285|     24|    case ID_EXT_ELE_FILL:
  ------------------
  |  |   46|     24|#define ID_EXT_ELE_FILL 0
  ------------------
  |  Branch (285:5): [True: 24, False: 14.3k]
  ------------------
  286|     24|      break;
  287|  6.23k|    case ID_EXT_ELE_AUDIOPREROLL:
  ------------------
  |  |   49|  6.23k|#define ID_EXT_ELE_AUDIOPREROLL 3
  ------------------
  |  Branch (287:5): [True: 6.23k, False: 8.09k]
  ------------------
  288|  6.23k|      *preroll_flag = 1;
  289|  6.23k|      break;
  290|  1.76k|    case ID_EXT_ELE_UNI_DRC:
  ------------------
  |  |   50|  1.76k|#define ID_EXT_ELE_UNI_DRC 4
  ------------------
  |  Branch (290:5): [True: 1.76k, False: 12.5k]
  ------------------
  291|  46.1k|      for (i = 0; i < usac_ext_element_config_length; i++) {
  ------------------
  |  Branch (291:19): [True: 44.3k, False: 1.76k]
  ------------------
  292|  44.3k|        ptr_usac_ext_ele_payload[i] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  293|  44.3k|      }
  294|  1.76k|      *ptr_usac_ext_ele_payload_len = usac_ext_element_config_length;
  295|  1.76k|      break;
  296|       |
  297|  6.29k|    default:
  ------------------
  |  Branch (297:5): [True: 6.29k, False: 8.03k]
  ------------------
  298|  6.29k|      if ((it_bit_buff->cnt_bits >> 3) < (WORD32)usac_ext_element_config_length)
  ------------------
  |  Branch (298:11): [True: 9, False: 6.28k]
  ------------------
  299|      9|        return -1;
  300|  6.28k|      it_bit_buff->ptr_read_next += usac_ext_element_config_length;
  301|  6.28k|      it_bit_buff->cnt_bits -= (usac_ext_element_config_length << 3);
  302|       |
  303|  6.28k|      break;
  304|  14.3k|  }
  305|       |
  306|  14.3k|  return 0;
  307|  14.3k|}
ixheaacd_mps212_config:
  312|  2.63k|    WORD32 stereo_config_index) {
  313|  2.63k|  pstr_usac_mps212_config->bs_freq_res = ixheaacd_read_bits_buf(it_bit_buff, 3);
  314|       |
  315|  2.63k|  pstr_usac_mps212_config->bs_fixed_gain_dmx =
  316|  2.63k|      ixheaacd_read_bits_buf(it_bit_buff, 3);
  317|       |
  318|  2.63k|  pstr_usac_mps212_config->bs_temp_shape_config =
  319|  2.63k|      ixheaacd_read_bits_buf(it_bit_buff, 2);
  320|       |
  321|  2.63k|  pstr_usac_mps212_config->bs_decorr_config =
  322|  2.63k|      ixheaacd_read_bits_buf(it_bit_buff, 2);
  323|  2.63k|  if (pstr_usac_mps212_config->bs_decorr_config > MAX_DECOR_CONFIG_IDX)
  ------------------
  |  |   27|  2.63k|#define MAX_DECOR_CONFIG_IDX (2)
  ------------------
  |  Branch (323:7): [True: 1, False: 2.63k]
  ------------------
  324|      1|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  325|       |
  326|  2.63k|  pstr_usac_mps212_config->bs_high_rate_mode =
  327|  2.63k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  328|       |
  329|  2.63k|  pstr_usac_mps212_config->bs_phase_coding =
  330|  2.63k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  331|       |
  332|  2.63k|  pstr_usac_mps212_config->bs_ott_bands_phase_present =
  333|  2.63k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  334|       |
  335|  2.63k|  if (pstr_usac_mps212_config->bs_ott_bands_phase_present) {
  ------------------
  |  Branch (335:7): [True: 1.04k, False: 1.59k]
  ------------------
  336|  1.04k|    pstr_usac_mps212_config->bs_ott_bands_phase =
  337|  1.04k|        ixheaacd_read_bits_buf(it_bit_buff, 5);
  338|  1.04k|    if (pstr_usac_mps212_config->bs_ott_bands_phase > MAX_PARAMETER_BANDS)
  ------------------
  |  |   55|  1.04k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (338:9): [True: 1, False: 1.04k]
  ------------------
  339|      1|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  340|  1.04k|  }
  341|       |
  342|  2.63k|  if (stereo_config_index > 1) {
  ------------------
  |  Branch (342:7): [True: 1.71k, False: 924]
  ------------------
  343|  1.71k|    pstr_usac_mps212_config->bs_residual_bands =
  344|  1.71k|        ixheaacd_read_bits_buf(it_bit_buff, 5);
  345|       |
  346|  1.71k|    if (pstr_usac_mps212_config->bs_residual_bands > MAX_PARAMETER_BANDS)
  ------------------
  |  |   55|  1.71k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (346:9): [True: 1, False: 1.71k]
  ------------------
  347|      1|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  348|       |
  349|  1.71k|    pstr_usac_mps212_config->bs_ott_bands_phase =
  350|  1.71k|        max(pstr_usac_mps212_config->bs_ott_bands_phase,
  ------------------
  |  |   74|  1.71k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 198, False: 1.51k]
  |  |  ------------------
  ------------------
  351|  1.71k|            pstr_usac_mps212_config->bs_residual_bands);
  352|       |
  353|  1.71k|    pstr_usac_mps212_config->bs_pseudo_lr =
  354|  1.71k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  355|  1.71k|  }
  356|       |
  357|  2.63k|  if (pstr_usac_mps212_config->bs_temp_shape_config == 2)
  ------------------
  |  Branch (357:7): [True: 478, False: 2.15k]
  ------------------
  358|    478|    pstr_usac_mps212_config->bs_env_quant_mode =
  359|    478|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  360|       |
  361|  2.63k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  2.63k|#define IA_NO_ERROR 0x00000000
  ------------------
  362|  2.63k|}
ixheaacd_cpe_config:
  367|  10.1k|    WORD32 sbr_ratio_index) {
  368|  10.1k|  pstr_usac_element_config->tw_mdct = ixheaacd_read_bits_buf(it_bit_buff, 1);
  369|  10.1k|  pstr_usac_element_config->noise_filling =
  370|  10.1k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  371|       |
  372|  10.1k|  if (sbr_ratio_index > 0) {
  ------------------
  |  Branch (372:7): [True: 2.82k, False: 7.33k]
  ------------------
  373|  2.82k|    ixheaacd_sbr_config(it_bit_buff,
  374|  2.82k|                        &(pstr_usac_element_config->str_usac_sbr_config));
  375|  2.82k|    pstr_usac_element_config->stereo_config_index =
  376|  2.82k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  377|       |
  378|  7.33k|  } else {
  379|  7.33k|    pstr_usac_element_config->stereo_config_index = 0;
  380|  7.33k|  }
  381|       |
  382|  10.1k|  if (pstr_usac_element_config->stereo_config_index > 0)
  ------------------
  |  Branch (382:7): [True: 2.63k, False: 7.51k]
  ------------------
  383|  2.63k|    return ixheaacd_mps212_config(
  384|  2.63k|        it_bit_buff, &(pstr_usac_element_config->str_usac_mps212_config),
  385|  2.63k|        pstr_usac_element_config->stereo_config_index);
  386|       |
  387|  7.51k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  7.51k|#define IA_NO_ERROR 0x00000000
  ------------------
  388|  10.1k|}
ixheaacd_decoder_config:
  393|  24.3k|    WORD32 sbr_ratio_index, UINT32 *chan, WORD32 ec_flag) {
  394|  24.3k|  UWORD32 elem_idx = 0;
  395|  24.3k|  UWORD32 err = 0;
  396|  24.3k|  WORD32 num_channels = 0;
  397|       |
  398|  24.3k|  ixheaacd_read_escape_value(
  399|  24.3k|      it_bit_buff, &(pstr_usac_decoder_config->num_elements), 4, 8, 16);
  400|  24.3k|  pstr_usac_decoder_config->num_elements += 1;
  401|  24.3k|  pstr_usac_decoder_config->preroll_flag = 0;
  402|       |
  403|  24.3k|  if (pstr_usac_decoder_config->num_elements > USAC_MAX_ELEMENTS) {
  ------------------
  |  |   23|  24.3k|#define USAC_MAX_ELEMENTS (16)
  ------------------
  |  Branch (403:7): [True: 10, False: 24.3k]
  ------------------
  404|     10|    if (ec_flag) {
  ------------------
  |  Branch (404:9): [True: 0, False: 10]
  ------------------
  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|     10|    } else {
  408|     10|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|     10|#define IA_FATAL_ERROR 0x80000000
  ------------------
  409|     10|    }
  410|     10|  }
  411|       |
  412|  62.5k|  for (elem_idx = 0; elem_idx < pstr_usac_decoder_config->num_elements;
  ------------------
  |  Branch (412:22): [True: 38.2k, False: 24.2k]
  ------------------
  413|  38.2k|       elem_idx++) {
  414|  38.2k|    ia_usac_dec_element_config_struct *pstr_usac_element_config =
  415|  38.2k|        &(pstr_usac_decoder_config->str_usac_element_config[elem_idx]);
  416|       |
  417|  38.2k|    pstr_usac_decoder_config->usac_element_type[elem_idx] =
  418|  38.2k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  419|       |
  420|  38.2k|    switch (pstr_usac_decoder_config->usac_element_type[elem_idx]) {
  421|  13.4k|      case ID_USAC_SCE:
  ------------------
  |  |   27|  13.4k|#define ID_USAC_SCE 0
  ------------------
  |  Branch (421:7): [True: 13.4k, False: 24.8k]
  ------------------
  422|  13.4k|        num_channels++;
  423|  13.4k|        pstr_usac_element_config->tw_mdct =
  424|  13.4k|            ixheaacd_read_bits_buf(it_bit_buff, 1);
  425|  13.4k|        pstr_usac_element_config->noise_filling =
  426|  13.4k|            ixheaacd_read_bits_buf(it_bit_buff, 1);
  427|  13.4k|        pstr_usac_element_config->stereo_config_index = 0;
  428|  13.4k|        if (sbr_ratio_index > 0)
  ------------------
  |  Branch (428:13): [True: 3.19k, False: 10.2k]
  ------------------
  429|  3.19k|          ixheaacd_sbr_config(it_bit_buff,
  430|  3.19k|                              &(pstr_usac_element_config->str_usac_sbr_config));
  431|       |
  432|  13.4k|        break;
  433|       |
  434|  10.1k|      case ID_USAC_CPE:
  ------------------
  |  |   28|  10.1k|#define ID_USAC_CPE 1
  ------------------
  |  Branch (434:7): [True: 10.1k, False: 28.0k]
  ------------------
  435|  10.1k|        num_channels += 2;
  436|  10.1k|        if (ixheaacd_cpe_config(it_bit_buff, pstr_usac_element_config, sbr_ratio_index) !=
  ------------------
  |  Branch (436:13): [True: 3, False: 10.1k]
  ------------------
  437|  10.1k|            IA_NO_ERROR) {
  ------------------
  |  |   23|  10.1k|#define IA_NO_ERROR 0x00000000
  ------------------
  438|      3|          if (ec_flag) {
  ------------------
  |  Branch (438:15): [True: 0, False: 3]
  ------------------
  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|      3|          } else {
  442|      3|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
  443|      3|          }
  444|      3|        }
  445|  10.1k|        if (pstr_usac_element_config->stereo_config_index > 1 && *chan < 2) {
  ------------------
  |  Branch (445:13): [True: 1.71k, False: 8.44k]
  |  Branch (445:66): [True: 2, False: 1.70k]
  ------------------
  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|  10.1k|        break;
  454|       |
  455|  10.1k|      case ID_USAC_LFE:
  ------------------
  |  |   29|    310|#define ID_USAC_LFE 2
  ------------------
  |  Branch (455:7): [True: 310, False: 37.9k]
  ------------------
  456|    310|        num_channels++;
  457|    310|        pstr_usac_element_config->tw_mdct = 0;
  458|    310|        pstr_usac_element_config->noise_filling = 0;
  459|    310|        pstr_usac_element_config->stereo_config_index = 0;
  460|    310|        break;
  461|       |
  462|  14.3k|      case ID_USAC_EXT:
  ------------------
  |  |   30|  14.3k|#define ID_USAC_EXT 3
  ------------------
  |  Branch (462:7): [True: 14.3k, False: 23.9k]
  ------------------
  463|  14.3k|        err = ixheaacd_ext_element_config(
  464|  14.3k|            it_bit_buff, pstr_usac_element_config,
  465|  14.3k|            &pstr_usac_decoder_config->usac_ext_ele_payload_buf[elem_idx][0],
  466|  14.3k|            &pstr_usac_decoder_config->usac_ext_ele_payload_len[elem_idx],
  467|  14.3k|            &(pstr_usac_decoder_config->preroll_flag));
  468|       |
  469|  14.3k|        if (pstr_usac_decoder_config->usac_ext_ele_payload_len[elem_idx] > 0) {
  ------------------
  |  Branch (469:13): [True: 1.68k, False: 12.6k]
  ------------------
  470|  1.68k|          pstr_usac_decoder_config->usac_ext_ele_payload_present[elem_idx] = 1;
  471|  12.6k|        } else {
  472|  12.6k|          pstr_usac_decoder_config->usac_ext_ele_payload_present[elem_idx] = 0;
  473|  12.6k|        }
  474|  14.3k|        if (err != 0) {
  ------------------
  |  Branch (474:13): [True: 11, False: 14.3k]
  ------------------
  475|     11|          if (ec_flag) {
  ------------------
  |  Branch (475:15): [True: 0, False: 11]
  ------------------
  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|     11|          } else {
  479|     11|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|     11|#define IA_FATAL_ERROR 0x80000000
  ------------------
  480|     11|          }
  481|     11|        }
  482|  14.3k|        break;
  483|  14.3k|      default:
  ------------------
  |  Branch (483:7): [True: 0, False: 38.2k]
  ------------------
  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|  38.2k|    }
  492|  38.1k|    if (num_channels > 2) {
  ------------------
  |  Branch (492:9): [True: 13, False: 38.1k]
  ------------------
  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|  38.1k|  }
  501|  24.2k|  return err;
  502|  24.3k|}
ixheaacd_config_extension:
  505|  2.86k|    ia_usac_decoder_config_struct *pstr_usac_decoder_config, WORD32 ec_flag) {
  506|  2.86k|  UWORD32 i, j;
  507|  2.86k|  UWORD32 num_config_extensions;
  508|  2.86k|  UWORD32 usac_config_ext_type, usac_config_ext_len;
  509|       |
  510|  2.86k|  ixheaacd_read_escape_value(it_bit_buff, &(num_config_extensions), 2, 4, 8);
  511|  2.86k|  num_config_extensions += 1;
  512|  2.86k|  if (USAC_MAX_CONFIG_EXTENSIONS < num_config_extensions) {
  ------------------
  |  |   25|  2.86k|#define USAC_MAX_CONFIG_EXTENSIONS (16)
  ------------------
  |  Branch (512:7): [True: 3, False: 2.86k]
  ------------------
  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.86k|  pstr_usac_decoder_config->num_config_extensions = num_config_extensions;
  521|  2.86k|  memset(pstr_usac_decoder_config->usac_cfg_ext_info_len, 0,
  522|  2.86k|         USAC_MAX_CONFIG_EXTENSIONS * sizeof(WORD32));
  ------------------
  |  |   25|  2.86k|#define USAC_MAX_CONFIG_EXTENSIONS (16)
  ------------------
  523|  2.86k|  memset(pstr_usac_decoder_config->usac_cfg_ext_info_present, 0,
  524|  2.86k|         USAC_MAX_CONFIG_EXTENSIONS * sizeof(WORD32));
  ------------------
  |  |   25|  2.86k|#define USAC_MAX_CONFIG_EXTENSIONS (16)
  ------------------
  525|       |
  526|  15.6k|  for (j = 0; j < num_config_extensions; j++) {
  ------------------
  |  Branch (526:15): [True: 12.8k, False: 2.82k]
  ------------------
  527|  12.8k|    UWORD32 fill_byte_val = 0xa5;
  528|       |
  529|  12.8k|    ixheaacd_read_escape_value(it_bit_buff, &(usac_config_ext_type), 4, 8, 16);
  530|  12.8k|    ixheaacd_read_escape_value(it_bit_buff, &(usac_config_ext_len), 4, 8, 16);
  531|       |
  532|  12.8k|    if (usac_config_ext_len > 768) {
  ------------------
  |  Branch (532:9): [True: 4, False: 12.8k]
  ------------------
  533|      4|      if (ec_flag) {
  ------------------
  |  Branch (533:11): [True: 0, False: 4]
  ------------------
  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|      4|      } else {
  537|      4|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      4|#define IA_FATAL_ERROR 0x80000000
  ------------------
  538|      4|      }
  539|      4|    }
  540|       |
  541|  12.8k|    switch (usac_config_ext_type) {
  542|  5.84k|      case ID_CONFIG_EXT_FILL:
  ------------------
  |  |   52|  5.84k|#define ID_CONFIG_EXT_FILL 0
  ------------------
  |  Branch (542:7): [True: 5.84k, False: 6.97k]
  ------------------
  543|  5.86k|        for (i = 0; i < usac_config_ext_len; i++) {
  ------------------
  |  Branch (543:21): [True: 24, False: 5.83k]
  ------------------
  544|     24|          fill_byte_val = ixheaacd_read_bits_buf(it_bit_buff, 8);
  545|     24|          if (fill_byte_val != 0xa5) {
  ------------------
  |  Branch (545:15): [True: 7, False: 17]
  ------------------
  546|      7|            if (ec_flag) {
  ------------------
  |  Branch (546:17): [True: 0, False: 7]
  ------------------
  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|      7|            } else {
  550|      7|              return IA_FATAL_ERROR;
  ------------------
  |  |   25|      7|#define IA_FATAL_ERROR 0x80000000
  ------------------
  551|      7|            }
  552|      7|          }
  553|     24|        }
  554|  5.83k|        break;
  555|  6.95k|      default:
  ------------------
  |  Branch (555:7): [True: 6.95k, False: 5.85k]
  ------------------
  556|  6.95k|        if ((WORD32)usac_config_ext_len > (it_bit_buff->cnt_bits >> 3)) {
  ------------------
  |  Branch (556:13): [True: 14, False: 6.94k]
  ------------------
  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.94k|        if (ID_CONFIG_EXT_LOUDNESS_INFO == usac_config_ext_type) {
  ------------------
  |  |   53|  6.94k|#define ID_CONFIG_EXT_LOUDNESS_INFO (2)
  ------------------
  |  Branch (564:13): [True: 1.38k, False: 5.55k]
  ------------------
  565|  40.1k|          for (i = 0; i < usac_config_ext_len; i++) {
  ------------------
  |  Branch (565:23): [True: 38.7k, False: 1.38k]
  ------------------
  566|  38.7k|            UWORD8 byte_val = ixheaacd_read_bits_buf(it_bit_buff, 8);
  567|  38.7k|            pstr_usac_decoder_config->usac_cfg_ext_info_buf[j][i] = byte_val;
  568|  38.7k|          }
  569|  1.38k|          pstr_usac_decoder_config->usac_cfg_ext_info_len[j] =
  570|  1.38k|              usac_config_ext_len;
  571|  1.38k|          pstr_usac_decoder_config->usac_cfg_ext_info_present[j] = 1;
  572|  5.55k|        } else {
  573|  21.5k|          for (i = 0; i < usac_config_ext_len; i++)
  ------------------
  |  Branch (573:23): [True: 15.9k, False: 5.55k]
  ------------------
  574|  15.9k|            ixheaacd_read_bits_buf(it_bit_buff, 8);
  575|  5.55k|        }
  576|  6.94k|        break;
  577|  12.8k|    }
  578|  12.8k|  }
  579|       |
  580|  2.82k|  return 0;
  581|  2.86k|}
ixheaacd_config:
  584|  24.4k|                       UINT32 *chan, WORD32 ec_flag) {
  585|  24.4k|  WORD32 tmp, err;
  586|  24.4k|  err = 0;
  587|       |
  588|  24.4k|  pstr_usac_conf->usac_sampling_frequency_index =
  589|  24.4k|      ixheaacd_read_bits_buf(it_bit_buff, 5);
  590|       |
  591|  24.4k|  if (pstr_usac_conf->usac_sampling_frequency_index == 0x1f) {
  ------------------
  |  Branch (591:7): [True: 33, False: 24.3k]
  ------------------
  592|     33|    pstr_usac_conf->usac_sampling_frequency =
  593|     33|        ixheaacd_read_bits_buf(it_bit_buff, 24);
  594|       |
  595|     33|    if (pstr_usac_conf->usac_sampling_frequency > USAC_MAX_SAMPLE_RATE) {
  ------------------
  |  |   50|     33|#define USAC_MAX_SAMPLE_RATE (96000)
  ------------------
  |  Branch (595:9): [True: 4, False: 29]
  ------------------
  596|      4|      if (ec_flag) {
  ------------------
  |  Branch (596:11): [True: 0, False: 4]
  ------------------
  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|      4|      } else {
  600|      4|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      4|#define IA_FATAL_ERROR 0x80000000
  ------------------
  601|      4|      }
  602|      4|    }
  603|       |
  604|  24.3k|  } else {
  605|  24.3k|    pstr_usac_conf->usac_sampling_frequency =
  606|  24.3k|        sampling_rate_tbl[pstr_usac_conf->usac_sampling_frequency_index];
  607|  24.3k|  }
  608|       |
  609|  24.4k|  if (pstr_usac_conf->usac_sampling_frequency == 0) {
  ------------------
  |  Branch (609:7): [True: 1, False: 24.4k]
  ------------------
  610|      1|    if (ec_flag) {
  ------------------
  |  Branch (610:9): [True: 0, False: 1]
  ------------------
  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|      1|    } else {
  613|      1|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  614|      1|    }
  615|      1|  }
  616|  24.4k|  pstr_usac_conf->core_sbr_framelength_index =
  617|  24.4k|      ixheaacd_read_bits_buf(it_bit_buff, 3);
  618|       |
  619|  24.4k|  if (pstr_usac_conf->core_sbr_framelength_index > MAX_CORE_SBR_FRAME_LEN_IDX) {
  ------------------
  |  |   43|  24.4k|#define MAX_CORE_SBR_FRAME_LEN_IDX (4)
  ------------------
  |  Branch (619:7): [True: 7, False: 24.3k]
  ------------------
  620|      7|    if (ec_flag) {
  ------------------
  |  Branch (620:9): [True: 0, False: 7]
  ------------------
  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|      7|    } else {
  623|      7|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      7|#define IA_FATAL_ERROR 0x80000000
  ------------------
  624|      7|    }
  625|      7|  }
  626|       |
  627|  24.3k|  pstr_usac_conf->channel_configuration_index =
  628|  24.3k|      ixheaacd_read_bits_buf(it_bit_buff, 5);
  629|  24.3k|  if ((pstr_usac_conf->channel_configuration_index >= 3) &&
  ------------------
  |  Branch (629:7): [True: 1.09k, False: 23.3k]
  ------------------
  630|  1.09k|      (pstr_usac_conf->channel_configuration_index != 8)) {
  ------------------
  |  Branch (630:7): [True: 10, False: 1.08k]
  ------------------
  631|     10|    if (ec_flag) {
  ------------------
  |  Branch (631:9): [True: 0, False: 10]
  ------------------
  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|     10|    } else {
  634|     10|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|     10|#define IA_FATAL_ERROR 0x80000000
  ------------------
  635|     10|    }
  636|     10|  }
  637|       |
  638|  24.3k|  if (pstr_usac_conf->channel_configuration_index == 0) {
  ------------------
  |  Branch (638:7): [True: 4.77k, False: 19.6k]
  ------------------
  639|  4.77k|    UWORD32 i;
  640|       |
  641|  4.77k|    ixheaacd_read_escape_value(it_bit_buff,
  642|  4.77k|                               (UWORD32 *)(&(pstr_usac_conf->num_out_channels)),
  643|  4.77k|                               5, 8, 16);
  644|  4.77k|    if (BS_MAX_NUM_OUT_CHANNELS < pstr_usac_conf->num_out_channels) {
  ------------------
  |  |  209|  4.77k|#define BS_MAX_NUM_OUT_CHANNELS (255)
  ------------------
  |  Branch (644:9): [True: 5, False: 4.77k]
  ------------------
  645|      5|      return IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
  ------------------
  |  |   85|      5|#define IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX 0xFFFF9002
  ------------------
  646|      5|    }
  647|  4.77k|    if (pstr_usac_conf->num_out_channels < 1) {
  ------------------
  |  Branch (647:9): [True: 10, False: 4.76k]
  ------------------
  648|     10|      return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|     10|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  649|     10|    }
  650|   378k|    for (i = 0; i < pstr_usac_conf->num_out_channels; i++)
  ------------------
  |  Branch (650:17): [True: 373k, False: 4.76k]
  ------------------
  651|   373k|      pstr_usac_conf->output_channel_pos[i] =
  652|   373k|          ixheaacd_read_bits_buf(it_bit_buff, 5);
  653|       |
  654|  4.76k|    if (ec_flag) {
  ------------------
  |  Branch (654:9): [True: 0, False: 4.76k]
  ------------------
  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.6k|  } else {
  658|  19.6k|    err = ixheaacd_get_usac_chan_conf(pstr_usac_conf, pstr_usac_conf->channel_configuration_index,
  659|  19.6k|                                      it_bit_buff, ec_flag);
  660|  19.6k|    if (err != 0)
  ------------------
  |  Branch (660:9): [True: 0, False: 19.6k]
  ------------------
  661|      0|      return err;
  662|  19.6k|  }
  663|       |
  664|  24.3k|  err = ixheaacd_decoder_config(
  665|  24.3k|      it_bit_buff, &(pstr_usac_conf->str_usac_dec_config),
  666|  24.3k|      ixheaacd_sbr_ratio(pstr_usac_conf->core_sbr_framelength_index), chan, ec_flag);
  667|  24.3k|  if (err != 0) return err;
  ------------------
  |  Branch (667:7): [True: 39, False: 24.3k]
  ------------------
  668|       |
  669|  24.3k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 1);
  670|       |
  671|  24.3k|  if (tmp) {
  ------------------
  |  Branch (671:7): [True: 2.86k, False: 21.4k]
  ------------------
  672|  2.86k|    err = ixheaacd_config_extension(it_bit_buff,
  673|  2.86k|                                    &pstr_usac_conf->str_usac_dec_config, ec_flag);
  674|  2.86k|    if (err != 0) return -1;
  ------------------
  |  Branch (674:9): [True: 28, False: 2.84k]
  ------------------
  675|  2.86k|  }
  676|       |
  677|  24.3k|  return err;
  678|  24.3k|}
ixheaacd_conf_default:
  680|  24.3k|VOID ixheaacd_conf_default(ia_usac_config_struct *pstr_usac_conf) {
  681|  24.3k|  WORD32 i;
  682|       |
  683|  24.3k|  pstr_usac_conf->num_out_channels = 0;
  684|       |
  685|  6.24M|  for (i = 0; i < BS_MAX_NUM_OUT_CHANNELS; i++)
  ------------------
  |  |  209|  6.24M|#define BS_MAX_NUM_OUT_CHANNELS (255)
  ------------------
  |  Branch (685:15): [True: 6.21M, False: 24.3k]
  ------------------
  686|  6.21M|    pstr_usac_conf->output_channel_pos[i] = BS_OUTPUT_CHANNEL_POS_NA;
  ------------------
  |  |  173|  6.21M|#define BS_OUTPUT_CHANNEL_POS_NA -1   /* n/a                                */
  ------------------
  687|       |
  688|  24.3k|  pstr_usac_conf->str_usac_dec_config.num_elements = 0;
  689|       |
  690|   414k|  for (i = 0; i < USAC_MAX_ELEMENTS; i++)
  ------------------
  |  |   23|   414k|#define USAC_MAX_ELEMENTS (16)
  ------------------
  |  Branch (690:15): [True: 390k, False: 24.3k]
  ------------------
  691|   390k|    pstr_usac_conf->str_usac_dec_config.usac_element_type[i] = ID_USAC_INVALID;
  ------------------
  |  |   31|   390k|#define ID_USAC_INVALID 0xFF
  ------------------
  692|       |
  693|  24.3k|  return;
  694|  24.3k|}
ixheaacd_init_config.c:ixheaacd_get_sample_freq_indx:
  103|  5.16k|static WORD32 ixheaacd_get_sample_freq_indx(WORD32 sampling_freq) {
  104|  5.16k|  WORD32 index;
  105|  5.16k|  const WORD32 tbl_size = sizeof(sampling_rate_tbl) / sizeof(WORD32) - 1;
  106|       |
  107|  96.2k|  for (index = 0; index < tbl_size; index++) {
  ------------------
  |  Branch (107:19): [True: 94.5k, False: 1.71k]
  ------------------
  108|  94.5k|    if (sampling_rate_tbl[index] == sampling_freq) break;
  ------------------
  |  Branch (108:9): [True: 3.44k, False: 91.0k]
  ------------------
  109|  94.5k|  }
  110|  5.16k|  return index;
  111|  5.16k|}
ixheaacd_init_config.c:ixheaacd_get_usac_chan_conf:
  188|  19.5k|{
  189|  19.5k|  switch (ch_config_index) {
  190|    581|    case 1:
  ------------------
  |  Branch (190:5): [True: 581, False: 19.0k]
  ------------------
  191|    581|      pstr_usac_config->num_out_channels = 1;
  192|    581|      pstr_usac_config->output_channel_pos[0] = BS_OUTPUT_CHANNEL_POS_C;
  ------------------
  |  |  176|    581|#define BS_OUTPUT_CHANNEL_POS_C 2     /* Center Front                        */
  ------------------
  193|    581|      break;
  194|  17.9k|    case 2:
  ------------------
  |  Branch (194:5): [True: 17.9k, False: 1.66k]
  ------------------
  195|  17.9k|      pstr_usac_config->num_out_channels = 2;
  196|  17.9k|      pstr_usac_config->output_channel_pos[0] = BS_OUTPUT_CHANNEL_POS_L;
  ------------------
  |  |  174|  17.9k|#define BS_OUTPUT_CHANNEL_POS_L 0     /* Left Front                          */
  ------------------
  197|  17.9k|      pstr_usac_config->output_channel_pos[1] = BS_OUTPUT_CHANNEL_POS_R;
  ------------------
  |  |  175|  17.9k|#define BS_OUTPUT_CHANNEL_POS_R 1     /* Right Front                         */
  ------------------
  198|  17.9k|      break;
  199|  1.08k|    case 8:
  ------------------
  |  Branch (199:5): [True: 1.08k, False: 18.5k]
  ------------------
  200|  1.08k|      pstr_usac_config->num_out_channels = 2;
  201|  1.08k|      pstr_usac_config->output_channel_pos[0] = BS_OUTPUT_CHANNEL_POS_NA;
  ------------------
  |  |  173|  1.08k|#define BS_OUTPUT_CHANNEL_POS_NA -1   /* n/a                                */
  ------------------
  202|  1.08k|      pstr_usac_config->output_channel_pos[1] = BS_OUTPUT_CHANNEL_POS_NA;
  ------------------
  |  |  173|  1.08k|#define BS_OUTPUT_CHANNEL_POS_NA -1   /* n/a                                */
  ------------------
  203|  1.08k|      break;
  204|       |
  205|      0|    default:
  ------------------
  |  Branch (205:5): [True: 0, False: 19.5k]
  ------------------
  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.5k|  }
  213|  19.5k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  19.5k|#define IA_NO_ERROR 0x00000000
  ------------------
  214|  19.5k|}

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

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

ixheaacd_ld_spatial_specific_config:
  207|  1.22k|    ia_usac_dec_mps_config_struct *config, ia_bit_buf_struct *it_bit_buff) {
  208|  1.22k|  WORD32 i, num_header_bits;
  209|  1.22k|  UWORD32 hc, hb;
  210|  1.22k|  WORD32 sac_header_len;
  211|  1.22k|  WORD32 bits_available;
  212|  1.22k|  WORD32 tmp = it_bit_buff->cnt_bits;
  213|  1.22k|  WORD32 err = 0;
  214|       |
  215|  1.22k|  sac_header_len = tmp;
  216|       |
  217|  1.22k|  bits_available = sac_header_len;
  218|  1.22k|  config->bs_sampling_freq_index = ixheaacd_read_bits_buf(it_bit_buff, 4);
  219|  1.22k|  if (config->bs_sampling_freq_index == 15) {
  ------------------
  |  Branch (219:7): [True: 12, False: 1.21k]
  ------------------
  220|     12|    config->bs_fampling_frequency = ixheaacd_read_bits_buf(it_bit_buff, 24);
  221|     12|  }
  222|       |
  223|  1.22k|  config->bs_frame_length = ixheaacd_read_bits_buf(it_bit_buff, 5);
  224|  1.22k|  config->bs_freq_res = ixheaacd_read_bits_buf(it_bit_buff, 3);
  225|  1.22k|  config->bs_tree_config = ixheaacd_read_bits_buf(it_bit_buff, 4);
  226|       |
  227|  1.22k|  if (config->bs_tree_config > 7) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (227:7): [True: 1, False: 1.22k]
  ------------------
  228|       |
  229|  1.22k|  if (config->bs_tree_config != 15) {
  ------------------
  |  Branch (229:7): [True: 1.21k, False: 4]
  ------------------
  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.31k|    for (i = 0; i < MAX_NUM_OTT; i++) {
  ------------------
  |  |   56|  7.31k|#define MAX_NUM_OTT (5)
  ------------------
  |  Branch (238:17): [True: 6.09k, False: 1.21k]
  ------------------
  239|  6.09k|      config->ott_mode_lfe[i] =
  240|  6.09k|          ixheaacd_tree_property_table[config->bs_tree_config].ott_mode_lfe[i];
  241|  6.09k|    }
  242|  1.21k|  }
  243|  1.22k|  config->bs_quant_mode = ixheaacd_read_bits_buf(it_bit_buff, 2);
  244|  1.22k|  if (config->bs_tree_config != 7) {
  ------------------
  |  Branch (244:7): [True: 1.03k, False: 185]
  ------------------
  245|  1.03k|    config->bs_one_icc = ixheaacd_read_bits_buf(it_bit_buff, 1);
  246|  1.03k|  }
  247|  1.22k|  config->bs_arbitrary_downmix = ixheaacd_read_bits_buf(it_bit_buff, 1);
  248|  1.22k|  if (config->bs_tree_config != 7) {
  ------------------
  |  Branch (248:7): [True: 1.03k, False: 185]
  ------------------
  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.22k|  config->bs_fixed_gain_dmx = ixheaacd_read_bits_buf(it_bit_buff, 3);
  253|  1.22k|  if (config->bs_tree_config != 7) {
  ------------------
  |  Branch (253:7): [True: 1.03k, False: 185]
  ------------------
  254|  1.03k|    config->bs_matrix_mode = ixheaacd_read_bits_buf(it_bit_buff, 1);
  255|  1.03k|  }
  256|  1.22k|  config->bs_temp_shape_config = ixheaacd_read_bits_buf(it_bit_buff, 2);
  257|  1.22k|  config->bs_decorr_config = ixheaacd_read_bits_buf(it_bit_buff, 2);
  258|  1.22k|  if (config->bs_tree_config != 7) {
  ------------------
  |  Branch (258:7): [True: 1.03k, False: 186]
  ------------------
  259|  1.03k|    config->bs_3D_audio_mode = ixheaacd_read_bits_buf(it_bit_buff, 1);
  260|  1.03k|  } else {
  261|    186|    config->bs_3D_audio_mode = 0;
  262|    186|  }
  263|       |
  264|       |  // ott_config
  265|  5.46k|  for (i = 0; i < config->num_ott_boxes; i++) {
  ------------------
  |  Branch (265:15): [True: 4.23k, False: 1.22k]
  ------------------
  266|  4.23k|    if (config->ott_mode_lfe[i]) {
  ------------------
  |  Branch (266:9): [True: 762, False: 3.47k]
  ------------------
  267|    762|      config->bs_ott_bands[i] = ixheaacd_read_bits_buf(it_bit_buff, 5);
  268|  3.47k|    } else {
  269|  3.47k|      config->bs_ott_bands[i] = ixheaacd_freq_res_table[config->bs_freq_res];
  270|  3.47k|    }
  271|  4.23k|  }
  272|       |
  273|       |  // ttt_config
  274|  1.39k|  for (i = 0; i < config->num_ttt_boxes; i++) {
  ------------------
  |  Branch (274:15): [True: 170, False: 1.22k]
  ------------------
  275|    170|    config->bs_ttt_dual_mode[i] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  276|    170|    config->bs_ttt_mode_low[i] = ixheaacd_read_bits_buf(it_bit_buff, 3);
  277|    170|    if (config->bs_ttt_dual_mode[i]) {
  ------------------
  |  Branch (277:9): [True: 15, False: 155]
  ------------------
  278|     15|      config->bs_ttt_mode_high[i] = ixheaacd_read_bits_buf(it_bit_buff, 3);
  279|     15|      config->bs_ttt_bands_low[i] = ixheaacd_read_bits_buf(it_bit_buff, 5);
  280|     15|      config->bs_ttt_bands_high[i] = ixheaacd_freq_res_table[config->bs_freq_res];
  281|    155|    } else {
  282|    155|      config->bs_ttt_bands_low[i] = ixheaacd_freq_res_table[config->bs_freq_res];
  283|    155|    }
  284|    170|  }
  285|       |
  286|  1.22k|  if (config->bs_temp_shape_config == 2) {
  ------------------
  |  Branch (286:7): [True: 312, False: 911]
  ------------------
  287|    312|    config->bs_env_quant_mode = ixheaacd_read_bits_buf(it_bit_buff, 1);
  288|    312|  }
  289|       |
  290|  1.22k|  if (config->bs_3D_audio_mode) {
  ------------------
  |  Branch (290:7): [True: 204, False: 1.01k]
  ------------------
  291|    204|    config->bs_3D_audio_HRTF_set = ixheaacd_read_bits_buf(it_bit_buff, 2);
  292|       |    // param_HRTF_set
  293|    204|    if (config->bs_3D_audio_HRTF_set == 0) {
  ------------------
  |  Branch (293:9): [True: 62, False: 142]
  ------------------
  294|     62|      config->bs_HRTF_freq_res = ixheaacd_read_bits_buf(it_bit_buff, 3);
  295|     62|      config->bs_HRTF_num_chan = 5;
  296|     62|      config->bs_HRTF_asymmetric = ixheaacd_read_bits_buf(it_bit_buff, 1);
  297|       |
  298|     62|      config->HRTF_num_band = ixheaacd_hrtf_freq_res_table[0][config->bs_HRTF_freq_res];
  299|     62|      config->HRTF_num_phase = ixheaacd_hrtf_freq_res_table[1][config->bs_HRTF_freq_res];
  300|       |
  301|    281|      for (hc = 0; hc < config->bs_HRTF_num_chan; hc++) {
  ------------------
  |  Branch (301:20): [True: 219, False: 62]
  ------------------
  302|  1.71k|        for (hb = 0; hb < config->HRTF_num_band; hb++) {
  ------------------
  |  Branch (302:22): [True: 1.49k, False: 219]
  ------------------
  303|  1.49k|          config->bs_HRTF_level_left[hc][hb] =
  304|  1.49k|              ixheaacd_read_bits_buf(it_bit_buff, 6);
  305|  1.49k|        }
  306|  1.67k|        for (hb = 0; hb < config->HRTF_num_band; hb++) {
  ------------------
  |  Branch (306:22): [True: 1.45k, False: 219]
  ------------------
  307|  1.45k|          config->bs_HRTF_level_right[hc][hb] =
  308|  1.45k|              config->bs_HRTF_asymmetric
  ------------------
  |  Branch (308:15): [True: 271, False: 1.18k]
  ------------------
  309|  1.45k|                  ? ixheaacd_read_bits_buf(it_bit_buff, 6)
  310|  1.45k|                  : config->bs_HRTF_level_left[hc][hb];
  311|  1.45k|        }
  312|    219|        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: 846, False: 219]
  ------------------
  314|    846|          config->bs_HRTF_phase_LR[hc][hb] =
  315|    846|              config->bs_HRTF_phase[hc] ? ixheaacd_read_bits_buf(it_bit_buff, 6)
  ------------------
  |  Branch (315:15): [True: 419, False: 427]
  ------------------
  316|    846|                                        : 0;
  317|    846|        }
  318|    219|        config->bs_HRTF_icc[hc] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  319|    219|        if (config->bs_HRTF_icc[hc]) {
  ------------------
  |  Branch (319:13): [True: 74, False: 145]
  ------------------
  320|    629|          for (hb = 0; hb < config->HRTF_num_band; hb++)
  ------------------
  |  Branch (320:24): [True: 555, False: 74]
  ------------------
  321|    555|            config->bs_HRTF_icc_LR[hc][hb] =
  322|    555|                ixheaacd_read_bits_buf(it_bit_buff, 3);
  323|     74|        }
  324|    219|      }
  325|     62|    }
  326|    204|  }
  327|       |
  328|       |  // byte_align
  329|  1.22k|  i = (it_bit_buff->cnt_bits & 0x7);
  330|  1.22k|  ixheaacd_read_bits_buf(it_bit_buff, i);
  331|       |
  332|  1.22k|  num_header_bits = tmp - (it_bit_buff->cnt_bits);
  333|  1.22k|  bits_available -= num_header_bits;
  334|       |
  335|  1.22k|  err =
  336|  1.22k|      ixheaacd_ld_spatial_extension_config(it_bit_buff, config, bits_available);
  337|  1.22k|  return err;
  338|  1.22k|}
ixheaacd_ld_mps_config.c:ixheaacd_ld_spatial_extension_config:
   53|  1.18k|    WORD32 bits_available) {
   54|  1.18k|  WORD32 j, ch, idx, tmp, tmp_open, sac_ext_len, bits_read, n_fill_bits;
   55|  1.18k|  UWORD32 i;
   56|  1.18k|  WORD32 ba = bits_available;
   57|       |
   58|  1.18k|  config->sac_ext_cnt = 0;
   59|       |
   60|  1.18k|  tmp = it_bit_buff->cnt_bits;
   61|       |
   62|  1.18k|  WORD32 num_slots = config->bs_frame_length + 1;
   63|       |
   64|  8.21k|  while (ba >= 8) {
  ------------------
  |  Branch (64:10): [True: 7.07k, False: 1.14k]
  ------------------
   65|  7.07k|    if (config->sac_ext_cnt >= MAX_NUM_EXT_TYPES) return IA_FATAL_ERROR;
  ------------------
  |  |   61|  7.07k|#define MAX_NUM_EXT_TYPES (8)
  ------------------
                  if (config->sac_ext_cnt >= MAX_NUM_EXT_TYPES) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      4|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (65:9): [True: 4, False: 7.06k]
  ------------------
   66|       |
   67|  7.06k|    config->bs_sac_ext_type[config->sac_ext_cnt] =
   68|  7.06k|        ixheaacd_read_bits_buf(it_bit_buff, 4);
   69|  7.06k|    ba -= 4;
   70|       |
   71|  7.06k|    sac_ext_len = ixheaacd_read_bits_buf(it_bit_buff, 4);
   72|  7.06k|    ba -= 4;
   73|       |
   74|  7.06k|    if ((ba >= 6) && (sac_ext_len > 0)) {
  ------------------
  |  Branch (74:9): [True: 7.02k, False: 37]
  |  Branch (74:22): [True: 4.12k, False: 2.90k]
  ------------------
   75|  4.12k|      if (sac_ext_len == 15) {
  ------------------
  |  Branch (75:11): [True: 2.23k, False: 1.88k]
  ------------------
   76|  2.23k|        sac_ext_len += ixheaacd_read_bits_buf(it_bit_buff, 8);
   77|  2.23k|        ba -= 8;
   78|  2.23k|        if (sac_ext_len == 15 + 255) {
  ------------------
  |  Branch (78:13): [True: 792, False: 1.44k]
  ------------------
   79|    792|          sac_ext_len += ixheaacd_read_bits_buf(it_bit_buff, 16);
   80|    792|          ba -= 16;
   81|    792|        }
   82|  2.23k|      }
   83|       |
   84|  4.12k|      switch (config->bs_sac_ext_type[config->sac_ext_cnt]) {
   85|     32|        case 0:
  ------------------
  |  Branch (85:9): [True: 32, False: 4.08k]
  ------------------
   86|     32|          config->bs_residual_coding = 1;
   87|       |
   88|     32|          config->bs_residual_sampling_freq_index =
   89|     32|              ixheaacd_read_bits_buf(it_bit_buff, 4);
   90|     32|          if (config->bs_residual_sampling_freq_index > MAX_RES_SAMP_FREQ_IDX) {
  ------------------
  |  |   71|     32|#define MAX_RES_SAMP_FREQ_IDX 11
  ------------------
  |  Branch (90:15): [True: 1, False: 31]
  ------------------
   91|      1|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
   92|      1|          }
   93|     31|          config->bs_residual_frames_per_spatial_frame =
   94|     31|              ixheaacd_read_bits_buf(it_bit_buff, 2);
   95|       |
   96|     31|          if (!ixheaacd_validate_res_frames_per_spatial_frame(
  ------------------
  |  Branch (96:15): [True: 4, False: 27]
  ------------------
   97|     31|                  num_slots, config->bs_residual_frames_per_spatial_frame)) {
   98|      4|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      4|#define IA_FATAL_ERROR 0x80000000
  ------------------
   99|      4|          }
  100|       |
  101|     27|          if ((config->num_ott_boxes + config->num_ttt_boxes) >
  ------------------
  |  Branch (101:15): [True: 1, False: 26]
  ------------------
  102|     27|              MAX_RESIDUAL_CHANNELS)
  ------------------
  |  |   59|     27|#define MAX_RESIDUAL_CHANNELS (3)
  ------------------
  103|      1|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  104|     70|          for (j = 0; j < config->num_ott_boxes + config->num_ttt_boxes; j++) {
  ------------------
  |  Branch (104:23): [True: 45, False: 25]
  ------------------
  105|     45|            config->bs_residual_present[j] =
  106|     45|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  107|     45|            if (config->bs_residual_present[j]) {
  ------------------
  |  Branch (107:17): [True: 13, False: 32]
  ------------------
  108|     13|              config->bs_residual_bands_ld_mps[j] =
  109|     13|                  ixheaacd_read_bits_buf(it_bit_buff, 5);
  110|     13|              if (config->bs_residual_bands_ld_mps[j] > MAX_PARAMETER_BANDS)
  ------------------
  |  |   55|     13|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (110:19): [True: 1, False: 12]
  ------------------
  111|      1|              {
  112|      1|                return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  113|      1|              }
  114|     13|            }
  115|     45|          }
  116|     25|          break;
  117|       |
  118|     25|        case 1:
  ------------------
  |  Branch (118:9): [True: 15, False: 4.10k]
  ------------------
  119|     15|          config->bs_arbitrary_downmix = 2;
  120|       |
  121|     15|          config->bs_arbitrary_downmix_residual_sampling_freq_index =
  122|     15|              ixheaacd_read_bits_buf(it_bit_buff, 4);
  123|     15|          if (config->bs_arbitrary_downmix_residual_sampling_freq_index > MAX_RES_SAMP_FREQ_IDX) {
  ------------------
  |  |   71|     15|#define MAX_RES_SAMP_FREQ_IDX 11
  ------------------
  |  Branch (123:15): [True: 2, False: 13]
  ------------------
  124|      2|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
  125|      2|          }
  126|     13|          config->bs_arbitrary_downmix_residual_frames_per_spatial_frame =
  127|     13|              ixheaacd_read_bits_buf(it_bit_buff, 2);
  128|       |
  129|     13|          if (!ixheaacd_validate_res_frames_per_spatial_frame(
  ------------------
  |  Branch (129:15): [True: 2, False: 11]
  ------------------
  130|     13|                  num_slots, config->bs_arbitrary_downmix_residual_frames_per_spatial_frame)) {
  131|      2|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
  132|      2|          }
  133|       |
  134|     11|          config->bs_arbitrary_downmix_residual_bands =
  135|     11|              ixheaacd_read_bits_buf(it_bit_buff, 5);
  136|     11|          if (config->bs_arbitrary_downmix_residual_bands >=
  ------------------
  |  Branch (136:15): [True: 1, False: 10]
  ------------------
  137|     11|              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|     10|          break;
  142|       |
  143|    200|        case 2:
  ------------------
  |  Branch (143:9): [True: 200, False: 3.92k]
  ------------------
  144|    200|          config->num_out_chan_AT = 0;
  145|    200|          config->num_ott_boxes_AT = 0;
  146|    200|          if (config->num_output_channels > MAX_OUTPUT_CHANNELS)
  ------------------
  |  |   60|    200|#define MAX_OUTPUT_CHANNELS (7)
  ------------------
  |  Branch (146:15): [True: 1, False: 199]
  ------------------
  147|      1|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  148|  1.31k|          for (ch = 0; ch < config->num_output_channels; ch++) {
  ------------------
  |  Branch (148:24): [True: 1.11k, False: 199]
  ------------------
  149|  1.11k|            tmp_open = 1;
  150|  1.11k|            idx = 0;
  151|  4.64k|            while ((tmp_open > 0) && (idx < MAX_ARBITRARY_TREE_INDEX)) {
  ------------------
  |  |   69|  3.89k|#define MAX_ARBITRARY_TREE_INDEX ((1 << (MAX_ARBITRARY_TREE_LEVELS + 1)) - 1)
  |  |  ------------------
  |  |  |  |   66|  3.89k|#define MAX_ARBITRARY_TREE_LEVELS (2)
  |  |  ------------------
  ------------------
  |  Branch (151:20): [True: 3.89k, False: 748]
  |  Branch (151:38): [True: 3.52k, False: 368]
  ------------------
  152|  3.52k|              config->bs_ott_box_present_AT[ch][idx] =
  153|  3.52k|                  ixheaacd_read_bits_buf(it_bit_buff, 1);
  154|  3.52k|              if (config->bs_ott_box_present_AT[ch][idx]) {
  ------------------
  |  Branch (154:19): [True: 2.41k, False: 1.11k]
  ------------------
  155|  2.41k|                config->num_ott_boxes_AT++;
  156|  2.41k|                tmp_open++;
  157|  2.41k|              } else {
  158|  1.11k|                config->num_out_chan_AT++;
  159|  1.11k|                tmp_open--;
  160|  1.11k|              }
  161|  3.52k|              idx++;
  162|  3.52k|            }
  163|  1.11k|          }
  164|       |
  165|  2.54k|          for (i = 0; i < config->num_ott_boxes_AT; i++) {
  ------------------
  |  Branch (165:23): [True: 2.34k, False: 199]
  ------------------
  166|  2.34k|            config->bs_ott_default_cld_AT[i] =
  167|  2.34k|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  168|  2.34k|            config->bs_ott_mode_lfe_AT[i] =
  169|  2.34k|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  170|  2.34k|            if (config->bs_ott_mode_lfe_AT[i]) {
  ------------------
  |  Branch (170:17): [True: 1.03k, False: 1.31k]
  ------------------
  171|  1.03k|              config->bs_ott_bands_AT[i] =
  172|  1.03k|                  ixheaacd_read_bits_buf(it_bit_buff, 5);
  173|  1.31k|            } else {
  174|  1.31k|              config->bs_ott_bands_AT[i] = ixheaacd_freq_res_table[config->bs_freq_res];
  175|  1.31k|            }
  176|  2.34k|          }
  177|       |
  178|  1.23k|          for (i = 0; i < config->num_out_chan_AT; i++) {
  ------------------
  |  Branch (178:23): [True: 1.03k, False: 199]
  ------------------
  179|  1.03k|            config->bs_output_channel_pos_AT[i] =
  180|  1.03k|                ixheaacd_read_bits_buf(it_bit_buff, 5);
  181|  1.03k|          }
  182|       |
  183|    199|          break;
  184|       |
  185|  3.87k|        default:;
  ------------------
  |  Branch (185:9): [True: 3.87k, False: 248]
  ------------------
  186|  4.12k|      }
  187|  4.12k|    }
  188|       |
  189|  7.03k|    bits_read = tmp - it_bit_buff->cnt_bits;
  190|  7.03k|    n_fill_bits = 8 * sac_ext_len - bits_read;
  191|       |
  192|  1.32M|    while (n_fill_bits > 7) {
  ------------------
  |  Branch (192:12): [True: 1.31M, False: 7.03k]
  ------------------
  193|  1.31M|      ixheaacd_read_bits_buf(it_bit_buff, 8);
  194|  1.31M|      n_fill_bits -= 8;
  195|  1.31M|    }
  196|  7.03k|    if (n_fill_bits > 0) {
  ------------------
  |  Branch (196:9): [True: 164, False: 6.86k]
  ------------------
  197|    164|      ixheaacd_read_bits_buf(it_bit_buff, n_fill_bits);
  198|    164|    }
  199|       |
  200|  7.03k|    ba -= 8 * sac_ext_len;
  201|  7.03k|    config->sac_ext_cnt++;
  202|  7.03k|  }
  203|  1.14k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  1.14k|#define IA_NO_ERROR 0x00000000
  ------------------
  204|  1.18k|}

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

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

ixheaacd_reset_acelp_data_fix:
  104|  47.1k|                                   WORD32 was_last_short, WORD32 tw_mdct) {
  105|  47.1k|  WORD32 i;
  106|       |
  107|  47.1k|  if (was_last_short == 1) {
  ------------------
  |  Branch (107:7): [True: 6.66k, False: 40.5k]
  ------------------
  108|  6.66k|    st->mode_prev = -2;
  109|  40.5k|  } else {
  110|  40.5k|    st->mode_prev = -1;
  111|  40.5k|  }
  112|       |
  113|   377k|  for (i = 0; i < NUM_SUBFR_SUPERFRAME_BY2 - 1; i++) {
  ------------------
  |  |   36|   377k|#define NUM_SUBFR_SUPERFRAME_BY2 (NUM_SUBFR_SUPERFRAME / 2)
  |  |  ------------------
  |  |  |  |   35|   377k|#define NUM_SUBFR_SUPERFRAME 16
  |  |  ------------------
  ------------------
  |  Branch (113:15): [True: 330k, False: 47.1k]
  ------------------
  114|   330k|    st->pitch_prev[i] = 64;
  115|   330k|    st->gain_prev[i] = 0;
  116|   330k|  }
  117|       |
  118|  47.1k|  st->bpf_active_prev = 0;
  119|       |
  120|  47.1k|  if (ptr_overlap_buf != NULL && !tw_mdct) {
  ------------------
  |  Branch (120:7): [True: 16.2k, False: 30.9k]
  |  Branch (120:34): [True: 16.2k, False: 0]
  ------------------
  121|  16.2k|    const WORD32 *ptr_window_coeff;
  122|  16.2k|    WORD32 fac_length;
  123|  16.2k|    if (was_last_short) {
  ------------------
  |  Branch (123:9): [True: 6.66k, False: 9.55k]
  ------------------
  124|  6.66k|      fac_length = (usac_data->ccfl) / 16;
  125|  9.55k|    } else {
  126|  9.55k|      fac_length = (usac_data->len_subfrm) / 2;
  127|  9.55k|    }
  128|       |
  129|  16.2k|    if (fac_length == 48) {
  ------------------
  |  Branch (129:9): [True: 1.00k, False: 15.2k]
  ------------------
  130|  1.00k|      ptr_window_coeff = ixheaacd_sine_win_96;
  131|  15.2k|    } else if (fac_length == 64) {
  ------------------
  |  Branch (131:16): [True: 5.66k, False: 9.55k]
  ------------------
  132|  5.66k|      ptr_window_coeff = ixheaacd_sine_win_128;
  133|  9.55k|    } else if (fac_length == 96) {
  ------------------
  |  Branch (133:16): [True: 1.73k, False: 7.81k]
  ------------------
  134|  1.73k|      ptr_window_coeff = ixheaacd_sine_win_192;
  135|  7.81k|    } else {
  136|  7.81k|      ptr_window_coeff = ixheaacd_sine_win_256;
  137|  7.81k|    }
  138|       |
  139|  3.17M|    for (i = 0; i < 2 * fac_length; i++) {
  ------------------
  |  Branch (139:17): [True: 3.15M, False: 16.2k]
  ------------------
  140|  3.15M|      ptr_overlap_buf[(usac_data->ccfl) / 2 - fac_length + i] =
  141|  3.15M|          ixheaacd_mult32_m(
  142|  3.15M|              ptr_overlap_buf[(usac_data->ccfl) / 2 - fac_length + i],
  143|  3.15M|              ptr_window_coeff[2 * fac_length - 1 - i]);
  144|  3.15M|    }
  145|  6.39M|    for (i = 0; i < (usac_data->ccfl) / 2 - fac_length; i++) {
  ------------------
  |  Branch (145:17): [True: 6.37M, False: 16.2k]
  ------------------
  146|  6.37M|      ptr_overlap_buf[(usac_data->ccfl) / 2 + fac_length + i] = 0;
  147|  6.37M|    }
  148|       |
  149|  16.2k|    if (ptr_overlap_buf != NULL) {
  ------------------
  |  Branch (149:9): [True: 16.2k, False: 0]
  ------------------
  150|   426k|      for (i = 0; i < (usac_data->len_subfrm) / 2 - fac_length; i++) {
  ------------------
  |  Branch (150:19): [True: 410k, False: 16.2k]
  ------------------
  151|   410k|        st->exc_prev[i] = 0.0f;
  152|   410k|      }
  153|  3.18M|      for (i = 0; i < 2 * fac_length + 1; i++) {
  ------------------
  |  Branch (153:19): [True: 3.17M, False: 16.2k]
  ------------------
  154|  3.17M|        st->exc_prev[(usac_data->len_subfrm) / 2 - fac_length + i] =
  155|  3.17M|            ptr_overlap_buf[i + usac_data->ccfl / 2 - fac_length - 1] /
  156|  3.17M|            (float)(16384);
  157|  3.17M|      }
  158|  16.2k|    } else {
  159|      0|      ixheaacd_memset(st->exc_prev, 1 + (2 * FAC_LENGTH));
  ------------------
  |  |   33|      0|#define FAC_LENGTH 128
  ------------------
  160|      0|    }
  161|  16.2k|  }
  162|       |
  163|  47.1k|  return;
  164|  47.1k|}
ixheaacd_fix2flt_data:
  167|  16.2k|                           ia_usac_lpd_decoder_handle st, WORD32 k) {
  168|  16.2k|  WORD32 i;
  169|  16.2k|  WORD32 fac_length;
  170|  16.2k|  WORD32 window_sequence_last = usac_data->window_sequence_last[k];
  171|  16.2k|  WORD32 *p_ola_buffer = usac_data->overlap_data_ptr[k];
  172|  16.2k|  if (window_sequence_last == EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  16.2k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (172:7): [True: 6.66k, False: 9.55k]
  ------------------
  173|  6.66k|    fac_length = (usac_data->ccfl) / 16;
  174|  9.55k|  } else {
  175|  9.55k|    fac_length = (usac_data->len_subfrm) / 2;
  176|  9.55k|  }
  177|       |
  178|  16.2k|  ixheaacd_memset(st->lp_flt_coeff_a_prev, 2 * (ORDER + 1));
  ------------------
  |  |   30|  16.2k|#define ORDER 16
  ------------------
  179|  16.2k|  ixheaacd_memset(st->xcitation_prev, MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   55|  16.2k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  16.2k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  16.2k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  16.2k|   (6 *           \
  |  |   57|  16.2k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  16.2k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  16.2k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  16.2k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  16.2k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  16.2k|#define TMIN 34
  |  |  ------------------
  ------------------
                ixheaacd_memset(st->xcitation_prev, MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   51|  16.2k|#define INTER_LP_FIL_ORDER 16
  ------------------
  180|  16.2k|  ixheaacd_memset(st->synth_prev, MAX_PITCH + SYNTH_DELAY_LMAX);
  ------------------
  |  |   55|  16.2k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  16.2k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  16.2k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  16.2k|   (6 *           \
  |  |   57|  16.2k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  16.2k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  16.2k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  16.2k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  16.2k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  16.2k|#define TMIN 34
  |  |  ------------------
  ------------------
                ixheaacd_memset(st->synth_prev, MAX_PITCH + SYNTH_DELAY_LMAX);
  ------------------
  |  |   37|  16.2k|#define SYNTH_DELAY_LMAX ((NUM_SUBFR_SUPERFRAME_BY2 - 1) * LEN_SUBFR)
  |  |  ------------------
  |  |  |  |   36|  16.2k|#define NUM_SUBFR_SUPERFRAME_BY2 (NUM_SUBFR_SUPERFRAME / 2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  16.2k|#define NUM_SUBFR_SUPERFRAME 16
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SYNTH_DELAY_LMAX ((NUM_SUBFR_SUPERFRAME_BY2 - 1) * LEN_SUBFR)
  |  |  ------------------
  |  |  |  |  118|  16.2k|#define LEN_SUBFR 64
  |  |  ------------------
  ------------------
  181|  16.2k|  ixheaacd_memset(st->bpf_prev, FILTER_DELAY + LEN_SUBFR);
  ------------------
  |  |   43|  16.2k|#define FILTER_DELAY 12
  ------------------
                ixheaacd_memset(st->bpf_prev, FILTER_DELAY + LEN_SUBFR);
  ------------------
  |  |  118|  16.2k|#define LEN_SUBFR 64
  ------------------
  182|       |
  183|  16.2k|  st->gain_threshold = 0.0f;
  184|       |
  185|  16.2k|  if (p_ola_buffer != NULL) {
  ------------------
  |  Branch (185:7): [True: 16.2k, False: 0]
  ------------------
  186|   426k|    for (i = 0; i < (usac_data->len_subfrm) / 2 - fac_length; i++) {
  ------------------
  |  Branch (186:17): [True: 410k, False: 16.2k]
  ------------------
  187|   410k|      st->exc_prev[i] = 0;
  188|   410k|    }
  189|  3.18M|    for (i = 0; i < 2 * fac_length + 1; i++) {
  ------------------
  |  Branch (189:17): [True: 3.17M, False: 16.2k]
  ------------------
  190|  3.17M|      st->exc_prev[(usac_data->len_subfrm) / 2 - fac_length + i] = (FLOAT32)(
  191|  3.17M|          p_ola_buffer[i + usac_data->ccfl / 2 - fac_length - 1] / 16384.0);
  192|  3.17M|    }
  193|  16.2k|  } else {
  194|      0|    ixheaacd_memset(st->exc_prev, 1 + (2 * FAC_LENGTH));
  ------------------
  |  |   33|      0|#define FAC_LENGTH 128
  ------------------
  195|      0|  }
  196|       |
  197|  16.2k|  return;
  198|  16.2k|}
ixheaacd_init_acelp_data:
  201|  30.9k|                              ia_usac_lpd_decoder_handle st) {
  202|       |  ixheaacd_reset_acelp_data_fix(usac_data, st, NULL, 0, 0);
  203|  30.9k|}
ixheaacd_lsp_2_lsf_conversion:
  208|  27.9k|void ixheaacd_lsp_2_lsf_conversion(float lsp[], float lsf[], WORD32 m) {
  209|  27.9k|  short i;
  210|   475k|  for (i = 0; i < m; i++) {
  ------------------
  |  Branch (210:15): [True: 447k, False: 27.9k]
  ------------------
  211|   447k|    lsf[i] = (float)(acos(lsp[i]) * SCALE1);
  ------------------
  |  |  206|   447k|#define SCALE1 (6400.0 / PI)
  |  |  ------------------
  |  |  |  |  153|   447k|#define PI 3.14159265358979323846264338327950288
  |  |  ------------------
  ------------------
  212|   447k|  }
  213|  27.9k|  return;
  214|  27.9k|}
ixheaacd_lpd_dec:
  354|  70.5k|                        WORD32 short_fac_flag, WORD32 bpf_control_info) {
  355|  70.5k|  FLOAT32 *synth_buf = usac_data->synth_buf;
  356|  70.5k|  FLOAT32 *xcitation_buff = usac_data->exc_buf;
  357|  70.5k|  FLOAT32 lsp_curr[ORDER];
  358|  70.5k|  FLOAT32 lsf_curr[ORDER];
  359|  70.5k|  FLOAT32 *lp_flt_coff_a = usac_data->lp_flt_coff;
  360|  70.5k|  FLOAT32 *synth, *xcitation_curr;
  361|  70.5k|  WORD32 *pitch = usac_data->pitch;
  362|  70.5k|  FLOAT32 *pitch_gain = usac_data->pitch_gain;
  363|  70.5k|  FLOAT32 lsf_flt[(2 * NUM_FRAMES + 1) * ORDER];
  364|       |
  365|  70.5k|  WORD32 i, k, tp, mode;
  366|  70.5k|  WORD32 *mod;
  367|  70.5k|  FLOAT32 gain, stability_factor = 0.0f;
  368|  70.5k|  FLOAT32 tmp, synth_corr, synth_energy;
  369|       |
  370|  70.5k|  WORD32 len_fr;
  371|  70.5k|  WORD32 len_subfrm;
  372|  70.5k|  WORD32 num_subfr;
  373|  70.5k|  WORD32 num_subfr_in_superfr;
  374|  70.5k|  WORD32 num_subfr_by2;
  375|  70.5k|  WORD32 synth_delay;
  376|  70.5k|  WORD32 num_samples = 0;
  377|       |
  378|  70.5k|  WORD32 *ptr_scratch = &usac_data->scratch_buffer[0];
  379|       |
  380|  70.5k|  WORD32 subfr_len = 0, n_subfr = 0;
  381|  70.5k|  WORD32 err = 0;
  382|  70.5k|  WORD32 ch = usac_data->present_chan;
  383|       |
  384|  70.5k|  len_fr = usac_data->ccfl;
  385|  70.5k|  len_subfrm = usac_data->len_subfrm;
  386|  70.5k|  num_subfr = usac_data->num_subfrm;
  387|  70.5k|  num_subfr_in_superfr = NUM_FRAMES * num_subfr;
  ------------------
  |  |   27|  70.5k|#define NUM_FRAMES 4
  ------------------
  388|  70.5k|  num_subfr_by2 = (num_subfr_in_superfr / 2) - 1;
  389|  70.5k|  synth_delay = num_subfr_by2 * LEN_SUBFR;
  ------------------
  |  |  118|  70.5k|#define LEN_SUBFR 64
  ------------------
  390|       |
  391|  70.5k|  synth = synth_buf + MAX_PITCH + synth_delay;
  ------------------
  |  |   55|  70.5k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  70.5k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  70.5k|   (6 *           \
  |  |   57|  70.5k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  70.5k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  70.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  70.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  ------------------
  ------------------
  392|  70.5k|  ixheaacd_mem_cpy(st->synth_prev, synth_buf, MAX_PITCH + synth_delay);
  ------------------
  |  |   55|  70.5k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  70.5k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  70.5k|   (6 *           \
  |  |   57|  70.5k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  70.5k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  70.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  70.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  ------------------
  ------------------
  393|  70.5k|  ixheaacd_memset(synth, SYNTH_DELAY_LMAX + LEN_SUPERFRAME - synth_delay);
  ------------------
  |  |   37|  70.5k|#define SYNTH_DELAY_LMAX ((NUM_SUBFR_SUPERFRAME_BY2 - 1) * LEN_SUBFR)
  |  |  ------------------
  |  |  |  |   36|  70.5k|#define NUM_SUBFR_SUPERFRAME_BY2 (NUM_SUBFR_SUPERFRAME / 2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  70.5k|#define NUM_SUBFR_SUPERFRAME 16
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SYNTH_DELAY_LMAX ((NUM_SUBFR_SUPERFRAME_BY2 - 1) * LEN_SUBFR)
  |  |  ------------------
  |  |  |  |  118|  70.5k|#define LEN_SUBFR 64
  |  |  ------------------
  ------------------
                ixheaacd_memset(synth, SYNTH_DELAY_LMAX + LEN_SUPERFRAME - synth_delay);
  ------------------
  |  |   25|  70.5k|#define LEN_SUPERFRAME 1024
  ------------------
  394|       |
  395|  70.5k|  xcitation_curr = xcitation_buff + MAX_PITCH + INTER_LP_FIL_ORDER + 1;
  ------------------
  |  |   55|  70.5k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  70.5k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  70.5k|   (6 *           \
  |  |   57|  70.5k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  70.5k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  70.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  70.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  ------------------
  ------------------
                xcitation_curr = xcitation_buff + MAX_PITCH + INTER_LP_FIL_ORDER + 1;
  ------------------
  |  |   51|  70.5k|#define INTER_LP_FIL_ORDER 16
  ------------------
  396|  70.5k|  ixheaacd_mem_cpy(st->xcitation_prev, xcitation_buff,
  397|  70.5k|                   MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   55|  70.5k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  70.5k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  70.5k|   (6 *           \
  |  |   57|  70.5k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  70.5k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  70.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  70.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  ------------------
  ------------------
                                 MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   51|  70.5k|#define INTER_LP_FIL_ORDER 16
  ------------------
  398|  70.5k|  memset(xcitation_curr, 0, sizeof(FLOAT32) * (LEN_SUPERFRAME + 1));
  ------------------
  |  |   25|  70.5k|#define LEN_SUPERFRAME 1024
  ------------------
  399|       |
  400|  70.5k|  mod = pstr_td_frame_data->mod;
  401|  70.5k|  if (usac_data->frame_ok == 1) {
  ------------------
  |  Branch (401:7): [True: 70.5k, False: 0]
  ------------------
  402|  70.5k|    usac_data->num_lost_lpd_frames[usac_data->present_chan] = 0;
  403|  70.5k|  }
  404|       |
  405|  70.5k|  if (usac_data->ec_flag && usac_data->frame_ok == 0) {
  ------------------
  |  Branch (405:7): [True: 0, False: 70.5k]
  |  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|   513k|  for (i = 0; i < num_subfr_by2; i++) {
  ------------------
  |  Branch (409:15): [True: 442k, False: 70.5k]
  ------------------
  410|   442k|    pitch[i] = st->pitch_prev[i];
  411|   442k|    pitch_gain[i] = st->gain_prev[i];
  412|   442k|  }
  413|  1.09M|  for (i = 0; i < num_subfr_in_superfr; i++) {
  ------------------
  |  Branch (413:15): [True: 1.02M, False: 70.5k]
  ------------------
  414|  1.02M|    pitch[i + num_subfr_by2] = 64;
  415|  1.02M|    pitch_gain[i + num_subfr_by2] = 0.0f;
  416|  1.02M|  }
  417|       |
  418|  70.5k|  if (usac_data->frame_ok) {
  ------------------
  |  Branch (418:7): [True: 70.5k, False: 0]
  ------------------
  419|  70.5k|    if (!first_lpd_flag) {
  ------------------
  |  Branch (419:9): [True: 27.9k, False: 42.5k]
  ------------------
  420|  27.9k|      ixheaacd_lsp_2_lsf_conversion(st->lspold, lsf_flt, ORDER);
  ------------------
  |  |   30|  27.9k|#define ORDER 16
  ------------------
  421|  27.9k|    }
  422|       |
  423|  70.5k|    ixheaacd_alg_vec_dequant(pstr_td_frame_data, first_lpd_flag, lsf_flt, pstr_td_frame_data->mod,
  424|  70.5k|                             usac_data->ec_flag);
  425|  70.5k|  }
  426|  70.5k|  if (usac_data->ec_flag && !(usac_data->frame_ok)) {
  ------------------
  |  Branch (426:7): [True: 0, False: 70.5k]
  |  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|  70.5k|  if (first_lpd_flag) {
  ------------------
  |  Branch (431:7): [True: 42.5k, False: 27.9k]
  ------------------
  432|  42.5k|    ixheaacd_mem_cpy(&lsf_flt[0], st->lsf_prev, ORDER);
  ------------------
  |  |   30|  42.5k|#define ORDER 16
  ------------------
  433|  42.5k|    ixheaacd_lsf_2_lsp_conversion_float(st->lsf_prev, st->lspold, ORDER);
  ------------------
  |  |   30|  42.5k|#define ORDER 16
  ------------------
  434|  42.5k|  }
  435|       |
  436|  70.5k|  if ((first_lpd_flag && mod[0] == 0) || (first_lpd_flag && mod[1] == 0) ||
  ------------------
  |  Branch (436:8): [True: 42.5k, False: 27.9k]
  |  Branch (436:26): [True: 16.4k, False: 26.1k]
  |  Branch (436:43): [True: 26.1k, False: 27.9k]
  |  Branch (436:61): [True: 11.0k, False: 15.0k]
  ------------------
  437|  43.0k|      ((first_lpd_flag && mod[2] == 0 && len_subfrm != LEN_FRAME))) {
  ------------------
  |  |   26|  3.36k|#define LEN_FRAME 256
  ------------------
  |  Branch (437:9): [True: 15.0k, False: 27.9k]
  |  Branch (437:27): [True: 3.36k, False: 11.7k]
  |  Branch (437:42): [True: 1.23k, False: 2.12k]
  ------------------
  438|  28.7k|    FLOAT32 lp_flt_coeff_a[9 * (ORDER + 1)];
  439|  28.7k|    FLOAT32 tmp_buf[3 * LEN_FRAME + ORDER];
  440|  28.7k|    FLOAT32 tmp_res_buf[3 * LEN_FRAME];
  441|  28.7k|    FLOAT32 *tmp = &(tmp_buf[LEN_FRAME]);
  ------------------
  |  |   26|  28.7k|#define LEN_FRAME 256
  ------------------
  442|  28.7k|    FLOAT32 *ptr_tmp = &(tmp_res_buf[LEN_FRAME]);
  ------------------
  |  |   26|  28.7k|#define LEN_FRAME 256
  ------------------
  443|  28.7k|    WORD32 tmp_start;
  444|  28.7k|    FLOAT32 mem = 0;
  445|  28.7k|    WORD32 gain;
  446|  28.7k|    WORD32 length;
  447|       |
  448|  28.7k|    ixheaacd_interpolation_lsp_params(st->lspold, st->lspold, lp_flt_coeff_a,
  449|  28.7k|                                      8);
  450|       |
  451|  28.7k|    memcpy(st->lp_flt_coeff_a_prev, lp_flt_coeff_a,
  452|  28.7k|           (ORDER + 1) * sizeof(FLOAT32));
  ------------------
  |  |   30|  28.7k|#define ORDER 16
  ------------------
  453|  28.7k|    memcpy(st->lp_flt_coeff_a_prev + ORDER + 1, lp_flt_coeff_a,
  ------------------
  |  |   30|  28.7k|#define ORDER 16
  ------------------
  454|  28.7k|           (ORDER + 1) * sizeof(FLOAT32));
  ------------------
  |  |   30|  28.7k|#define ORDER 16
  ------------------
  455|       |
  456|  28.7k|    if (mod[0] == 0) {
  ------------------
  |  Branch (456:9): [True: 16.4k, False: 12.2k]
  ------------------
  457|  16.4k|      WORD32 fac_length;
  458|  16.4k|      if (short_fac_flag) {
  ------------------
  |  Branch (458:11): [True: 3.41k, False: 13.0k]
  ------------------
  459|  3.41k|        fac_length = (len_subfrm * NUM_FRAMES) / 16;
  ------------------
  |  |   27|  3.41k|#define NUM_FRAMES 4
  ------------------
  460|  13.0k|      } else {
  461|  13.0k|        fac_length = len_subfrm / 2;
  462|  13.0k|      }
  463|       |
  464|  16.4k|      if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (464:11): [True: 0, False: 16.4k]
  ------------------
  465|      0|        memset(&pstr_td_frame_data->fac_data[0], 0, sizeof(pstr_td_frame_data->fac_data));
  466|      0|      }
  467|  16.4k|      gain = ixheaacd_pow_10_i_by_128[pstr_td_frame_data->fac_data[0]];
  468|       |
  469|  16.4k|      memcpy(ptr_scratch, &pstr_td_frame_data->fac_data[0],
  470|  16.4k|             129 * sizeof(WORD32));
  471|       |
  472|   885k|      for (i = 0; i < fac_length / 2; i++) {
  ------------------
  |  Branch (472:19): [True: 869k, False: 16.4k]
  ------------------
  473|   869k|        pstr_td_frame_data->fac_data[i] = ptr_scratch[2 * i + 1] << 16;
  474|   869k|        pstr_td_frame_data->fac_data[fac_length / 2 + i] =
  475|   869k|            ptr_scratch[fac_length - 2 * i] << 16;
  476|   869k|      }
  477|       |
  478|  16.4k|      if (usac_data->ec_flag == 0) {
  ------------------
  |  Branch (478:11): [True: 16.4k, False: 0]
  ------------------
  479|  16.4k|        if (fac_length & (fac_length - 1)) {
  ------------------
  |  Branch (479:13): [True: 4.87k, False: 11.5k]
  ------------------
  480|  4.87k|          if ((fac_length != 48) && (fac_length != 96) && (fac_length != 192) &&
  ------------------
  |  Branch (480:15): [True: 4.53k, False: 339]
  |  Branch (480:37): [True: 0, False: 4.53k]
  |  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.87k|        }
  485|  16.4k|      }
  486|       |
  487|  16.4k|      ixheaacd_fwd_alias_cancel_tool(usac_data, pstr_td_frame_data, fac_length, lp_flt_coeff_a,
  488|  16.4k|                                     gain);
  489|       |
  490|  16.4k|      memset(&usac_data->overlap_data_ptr[usac_data->present_chan][(len_fr / 2)], 0,
  491|  16.4k|             fac_length * sizeof(WORD32));
  492|  16.4k|    }
  493|       |
  494|  13.3M|    for (i = 0; i < 2 * len_subfrm; i++)
  ------------------
  |  Branch (494:17): [True: 13.3M, False: 28.7k]
  ------------------
  495|  13.3M|      st->fd_synth[ORDER + i] = (FLOAT32)(
  ------------------
  |  |   30|  13.3M|#define ORDER 16
  ------------------
  496|  13.3M|          (FLOAT32)usac_data->overlap_data_ptr[usac_data->present_chan][i] /
  497|  13.3M|          16384.0);
  498|  28.7k|    num_samples = min(2 * len_subfrm, MAX_PITCH + synth_delay);
  ------------------
  |  |   75|  28.7k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 28.7k, False: 0]
  |  |  ------------------
  ------------------
  499|       |
  500|  28.7k|    ixheaacd_mem_cpy(st->fd_synth + ORDER, synth - 2 * len_subfrm,
  ------------------
  |  |   30|  28.7k|#define ORDER 16
  ------------------
  501|  28.7k|                     2 * len_subfrm);
  502|       |
  503|  28.7k|    ixheaacd_preemphsis_tool_float(st->fd_synth + ORDER, PREEMPH_FILT_FAC,
  ------------------
  |  |   30|  28.7k|#define ORDER 16
  ------------------
                  ixheaacd_preemphsis_tool_float(st->fd_synth + ORDER, PREEMPH_FILT_FAC,
  ------------------
  |  |   61|  28.7k|#define PREEMPH_FILT_FAC 0.68f
  ------------------
  504|  28.7k|                                   2 * len_subfrm, mem);
  505|       |
  506|  28.7k|    ixheaacd_memset(tmp, ORDER);
  ------------------
  |  |   30|  28.7k|#define ORDER 16
  ------------------
  507|  28.7k|    ixheaacd_mem_cpy(st->fd_synth + ORDER, tmp + ORDER, 2 * len_subfrm);
  ------------------
  |  |   30|  28.7k|#define ORDER 16
  ------------------
                  ixheaacd_mem_cpy(st->fd_synth + ORDER, tmp + ORDER, 2 * len_subfrm);
  ------------------
  |  |   30|  28.7k|#define ORDER 16
  ------------------
  508|  28.7k|    tmp_start = 0;
  509|       |
  510|  28.7k|    ixheaacd_memset(ptr_tmp - len_subfrm, 3 * len_subfrm);
  511|  28.7k|    memset(st->fd_synth, 0, ORDER * sizeof(WORD32));
  ------------------
  |  |   30|  28.7k|#define ORDER 16
  ------------------
  512|  28.7k|    length = (2 * len_subfrm - tmp_start) / LEN_SUBFR;
  ------------------
  |  |  118|  28.7k|#define LEN_SUBFR 64
  ------------------
  513|       |
  514|  28.7k|    ixheaacd_residual_tool_float1(lp_flt_coeff_a,
  515|  28.7k|                                  &st->fd_synth[ORDER + tmp_start],
  ------------------
  |  |   30|  28.7k|#define ORDER 16
  ------------------
  516|  28.7k|                                  &ptr_tmp[tmp_start], LEN_SUBFR, length);
  ------------------
  |  |  118|  28.7k|#define LEN_SUBFR 64
  ------------------
  517|       |
  518|  28.7k|    if (mod[0] != 0 && (len_subfrm == LEN_FRAME || mod[1] != 0)) {
  ------------------
  |  |   26|  24.5k|#define LEN_FRAME 256
  ------------------
  |  Branch (518:9): [True: 12.2k, False: 16.4k]
  |  Branch (518:25): [True: 6.30k, False: 5.95k]
  |  Branch (518:52): [True: 1.23k, False: 4.71k]
  ------------------
  519|  7.54k|      num_samples = min(len_subfrm, MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   75|  7.54k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 7.54k, False: 0]
  |  |  ------------------
  ------------------
  520|  21.1k|    } else {
  521|  21.1k|      num_samples = min(2 * len_subfrm, MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   75|  21.1k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 9.58k, False: 11.5k]
  |  |  ------------------
  ------------------
  522|  21.1k|    }
  523|  28.7k|    ixheaacd_mem_cpy(ptr_tmp + 2 * len_subfrm - num_samples,
  524|  28.7k|                     xcitation_curr - num_samples, num_samples);
  525|  28.7k|  }
  526|       |
  527|  70.5k|  k = 0;
  528|       |
  529|   321k|  while (k < 4) {
  ------------------
  |  Branch (529:10): [True: 250k, False: 70.5k]
  ------------------
  530|   250k|    if (usac_data->ec_flag && usac_data->frame_ok == 0) {
  ------------------
  |  Branch (530:9): [True: 0, False: 250k]
  |  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|   250k|    mode = mod[k];
  539|   250k|    if ((st->mode_prev == 0) && (mode > 0) &&
  ------------------
  |  Branch (539:9): [True: 130k, False: 120k]
  |  Branch (539:33): [True: 57.7k, False: 73.1k]
  ------------------
  540|  57.7k|        (k != 0 || st->bpf_active_prev == 1)) {
  ------------------
  |  Branch (540:10): [True: 30.6k, False: 27.0k]
  |  Branch (540:20): [True: 4.10k, False: 22.9k]
  ------------------
  541|  34.7k|      i = (k * num_subfr) + num_subfr_by2;
  542|  34.7k|      pitch[i + 1] = pitch[i] = pitch[i - 1];
  543|  34.7k|      pitch_gain[i + 1] = pitch_gain[i] = pitch_gain[i - 1];
  544|  34.7k|    }
  545|   250k|    if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (545:9): [True: 0, False: 250k]
  ------------------
  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|   250k|    } else {
  548|   250k|      if ((mode == 0) || (mode == 1))
  ------------------
  |  Branch (548:11): [True: 141k, False: 109k]
  |  Branch (548:26): [True: 79.2k, False: 30.4k]
  ------------------
  549|   220k|        memcpy(lsf_curr, &lsf_flt[(k + 1) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|   220k|#define ORDER 16
  ------------------
                      memcpy(lsf_curr, &lsf_flt[(k + 1) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|   220k|#define ORDER 16
  ------------------
  550|  30.4k|      else if (mode == 2)
  ------------------
  |  Branch (550:16): [True: 30.1k, False: 307]
  ------------------
  551|  30.1k|        memcpy(lsf_curr, &lsf_flt[(k + 2) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|  30.1k|#define ORDER 16
  ------------------
                      memcpy(lsf_curr, &lsf_flt[(k + 2) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|  30.1k|#define ORDER 16
  ------------------
  552|    307|      else
  553|    307|        memcpy(lsf_curr, &lsf_flt[(k + 4) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|    307|#define ORDER 16
  ------------------
                      memcpy(lsf_curr, &lsf_flt[(k + 4) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|    307|#define ORDER 16
  ------------------
  554|   250k|    }
  555|       |
  556|   250k|    ixheaacd_lsf_2_lsp_conversion_float(lsf_curr, lsp_curr, ORDER);
  ------------------
  |  |   30|   250k|#define ORDER 16
  ------------------
  557|   250k|    if (usac_data->frame_ok) {
  ------------------
  |  Branch (557:9): [True: 250k, False: 0]
  ------------------
  558|   250k|      tmp = 0.0f;
  559|  4.26M|      for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  4.26M|#define ORDER 16
  ------------------
  |  Branch (559:19): [True: 4.01M, False: 250k]
  ------------------
  560|  4.01M|        tmp += (lsf_curr[i] - st->lsf_prev[i]) * (lsf_curr[i] - st->lsf_prev[i]);
  561|  4.01M|      }
  562|   250k|      stability_factor = (FLOAT32)(1.25f - (tmp / 400000.0f));
  563|   250k|      if (stability_factor > 1.0f) {
  ------------------
  |  Branch (563:11): [True: 54.6k, False: 196k]
  ------------------
  564|  54.6k|        stability_factor = 1.0f;
  565|  54.6k|      }
  566|   250k|      if (stability_factor < 0.0f) {
  ------------------
  |  Branch (566:11): [True: 127k, False: 123k]
  ------------------
  567|   127k|        stability_factor = 0.0f;
  568|   127k|      }
  569|   250k|      if (usac_data->ec_flag) {
  ------------------
  |  Branch (569:11): [True: 0, False: 250k]
  ------------------
  570|      0|        usac_data->stability_factor_old = stability_factor;
  571|      0|      }
  572|   250k|    }
  573|   250k|    if (usac_data->ec_flag && !(usac_data->frame_ok)) {
  ------------------
  |  Branch (573:9): [True: 0, False: 250k]
  |  Branch (573:31): [True: 0, False: 0]
  ------------------
  574|      0|      stability_factor = usac_data->stability_factor_old;
  575|      0|    }
  576|   250k|    if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (576:9): [True: 0, False: 250k]
  ------------------
  577|      0|      mode = st->mode_prev;
  578|      0|    }
  579|   250k|    if ((usac_data->frame_ok == 1 && mode == 0) ||
  ------------------
  |  Branch (579:10): [True: 250k, False: 0]
  |  Branch (579:38): [True: 141k, False: 109k]
  ------------------
  580|   141k|        (usac_data->frame_ok == 0 && (st->mode_prev == 0 || st->mode_prev == 1))) {
  ------------------
  |  Branch (580:10): [True: 0, False: 109k]
  |  Branch (580:39): [True: 0, False: 0]
  |  Branch (580:61): [True: 0, False: 0]
  ------------------
  581|   141k|      ixheaacd_interpolation_lsp_params(st->lspold, lsp_curr, lp_flt_coff_a, num_subfr);
  582|       |
  583|   141k|      if (usac_data->frame_ok == 1 || (usac_data->frame_ok == 0 && st->mode_prev == 0)) {
  ------------------
  |  Branch (583:11): [True: 141k, False: 0]
  |  Branch (583:40): [True: 0, False: 0]
  |  Branch (583:68): [True: 0, False: 0]
  ------------------
  584|   141k|        ixheaacd_acelp_alias_cnx(usac_data, pstr_td_frame_data, k, lp_flt_coff_a,
  585|   141k|                                 stability_factor, st);
  586|   141k|      }
  587|       |
  588|   141k|      if (usac_data->frame_ok == 0 && st->mode_prev == 1) {
  ------------------
  |  Branch (588:11): [True: 0, False: 141k]
  |  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|   141k|      if ((st->mode_prev != 0) && bpf_control_info) {
  ------------------
  |  Branch (592:11): [True: 68.0k, False: 73.1k]
  |  Branch (592:35): [True: 21.7k, False: 46.3k]
  ------------------
  593|  21.7k|        i = (k * num_subfr) + num_subfr_by2;
  594|  21.7k|        pitch[i - 1] = pitch[i];
  595|  21.7k|        pitch_gain[i - 1] = pitch_gain[i];
  596|  21.7k|        if (st->mode_prev != -2) {
  ------------------
  |  Branch (596:13): [True: 20.8k, False: 923]
  ------------------
  597|  20.8k|          pitch[i - 2] = pitch[i];
  598|  20.8k|          pitch_gain[i - 2] = pitch_gain[i];
  599|  20.8k|        }
  600|  21.7k|      }
  601|   141k|      k++;
  602|   141k|    } else {
  603|   109k|      if (mode == 1) {
  ------------------
  |  Branch (603:11): [True: 79.2k, False: 30.4k]
  ------------------
  604|  79.2k|        subfr_len = len_subfrm;
  605|  79.2k|        n_subfr = num_subfr;
  606|  79.2k|      } else if (mode == 2) {
  ------------------
  |  Branch (606:18): [True: 30.1k, False: 307]
  ------------------
  607|  30.1k|        subfr_len = len_subfrm << 1;
  608|  30.1k|        n_subfr = num_subfr_in_superfr / 2;
  609|  30.1k|      } else if (mode == 3) {
  ------------------
  |  Branch (609:18): [True: 307, False: 0]
  ------------------
  610|    307|        subfr_len = len_subfrm << 2;
  611|    307|        n_subfr = num_subfr_in_superfr;
  612|    307|      } 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|   109k|      ixheaacd_lpc_coef_gen(st->lspold, lsp_curr, lp_flt_coff_a, n_subfr,
  621|   109k|                            ORDER);
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
  622|       |
  623|   109k|      err = ixheaacd_tcx_mdct(usac_data, pstr_td_frame_data, k, lp_flt_coff_a,
  624|   109k|                              subfr_len, st);
  625|   109k|      if (err) return err;
  ------------------
  |  Branch (625:11): [True: 0, False: 109k]
  ------------------
  626|   109k|      if (usac_data->frame_ok == 1 && k == 2) {
  ------------------
  |  Branch (626:11): [True: 109k, False: 0]
  |  Branch (626:39): [True: 30.7k, False: 78.9k]
  ------------------
  627|  30.7k|        memcpy(usac_data->lp_flt_coff_a_ec, &lp_flt_coff_a[k * (ORDER + 1)],
  ------------------
  |  |   30|  30.7k|#define ORDER 16
  ------------------
  628|  30.7k|               sizeof(usac_data->lp_flt_coff_a_ec));
  629|  30.7k|      }
  630|   109k|      k += (1 << (mode - 1));
  631|   109k|    }
  632|       |
  633|   250k|    st->mode_prev = mode;
  634|   250k|    if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (634:9): [True: 0, False: 250k]
  ------------------
  635|      0|      memcpy(usac_data->lspold_ec, st->lspold, sizeof(st->lspold));
  636|      0|    }
  637|   250k|    ixheaacd_mem_cpy(lsp_curr, st->lspold, ORDER);
  ------------------
  |  |   30|   250k|#define ORDER 16
  ------------------
  638|   250k|    ixheaacd_mem_cpy(lsf_curr, st->lsf_prev, ORDER);
  ------------------
  |  |   30|   250k|#define ORDER 16
  ------------------
  639|   250k|  }
  640|       |
  641|  70.5k|  ixheaacd_mem_cpy(xcitation_buff + len_fr, st->xcitation_prev,
  642|  70.5k|                   MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   55|  70.5k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  70.5k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  70.5k|   (6 *           \
  |  |   57|  70.5k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  70.5k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  70.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  70.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  ------------------
  ------------------
                                 MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   51|  70.5k|#define INTER_LP_FIL_ORDER 16
  ------------------
  643|       |
  644|  70.5k|  ixheaacd_mem_cpy(synth_buf + len_fr, st->synth_prev, MAX_PITCH + synth_delay);
  ------------------
  |  |   55|  70.5k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  70.5k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  70.5k|   (6 *           \
  |  |   57|  70.5k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  70.5k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  70.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  70.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  ------------------
  ------------------
  645|       |
  646|  70.5k|  if (!bpf_control_info) {
  ------------------
  |  Branch (646:7): [True: 48.8k, False: 21.6k]
  ------------------
  647|  48.8k|    if (mod[0] != 0 && st->bpf_active_prev) {
  ------------------
  |  Branch (647:9): [True: 39.0k, False: 9.78k]
  |  Branch (647:24): [True: 2.42k, False: 36.6k]
  ------------------
  648|  33.6k|      for (i = 2; i < num_subfr_in_superfr; i++)
  ------------------
  |  Branch (648:19): [True: 31.2k, False: 2.42k]
  ------------------
  649|  31.2k|        pitch_gain[num_subfr_by2 + i] = 0.0;
  650|  46.4k|    } else {
  651|   714k|      for (i = 0; i < num_subfr_in_superfr; i++)
  ------------------
  |  Branch (651:19): [True: 668k, False: 46.4k]
  ------------------
  652|   668k|        pitch_gain[num_subfr_by2 + i] = 0.0;
  653|  46.4k|    }
  654|  48.8k|  }
  655|  70.5k|  st->bpf_active_prev = bpf_control_info;
  656|       |
  657|   513k|  for (i = 0; i < num_subfr_by2; i++) {
  ------------------
  |  Branch (657:15): [True: 442k, False: 70.5k]
  ------------------
  658|   442k|    st->pitch_prev[i] = pitch[num_subfr_in_superfr + i];
  659|   442k|    st->gain_prev[i] = pitch_gain[num_subfr_in_superfr + i];
  660|   442k|  }
  661|       |
  662|  70.5k|  synth = synth_buf + MAX_PITCH;
  ------------------
  |  |   55|  70.5k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  70.5k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  70.5k|   (6 *           \
  |  |   57|  70.5k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  70.5k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  70.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  70.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  70.5k|#define TMIN 34
  |  |  ------------------
  ------------------
  663|       |
  664|  1.09M|  for (i = 0; i < num_subfr_in_superfr; i++) {
  ------------------
  |  Branch (664:15): [True: 1.02M, False: 70.5k]
  ------------------
  665|  1.02M|    tp = pitch[i];
  666|  1.02M|    gain = pitch_gain[i];
  667|  1.02M|    if (gain > 0.0f) {
  ------------------
  |  Branch (667:9): [True: 225k, False: 801k]
  ------------------
  668|   225k|      synth_corr = 0.0f, synth_energy = 1e-6f;
  669|   225k|      if ((((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |  118|   225k|#define LEN_SUBFR 64
  ------------------
                    if ((((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |  118|   225k|#define LEN_SUBFR 64
  ------------------
                    if ((((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |   25|   225k|#define LEN_SUPERFRAME 1024
  ------------------
  |  Branch (669:11): [True: 0, False: 225k]
  ------------------
  670|   225k|          ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |  118|   225k|#define LEN_SUBFR 64
  ------------------
                        ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |  118|   225k|#define LEN_SUBFR 64
  ------------------
                        ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |   25|   225k|#define LEN_SUPERFRAME 1024
  ------------------
  |  Branch (670:11): [True: 0, False: 225k]
  ------------------
  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.6M|      for (k = 0; k < LEN_SUBFR; k++) {
  ------------------
  |  |  118|  14.6M|#define LEN_SUBFR 64
  ------------------
  |  Branch (676:19): [True: 14.4M, False: 225k]
  ------------------
  677|  14.4M|        synth_corr +=
  678|  14.4M|            synth[i * LEN_SUBFR + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  14.4M|#define LEN_SUBFR 64
  ------------------
                          synth[i * LEN_SUBFR + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  14.4M|#define LEN_SUBFR 64
  ------------------
  679|  14.4M|        synth_energy +=
  680|  14.4M|            synth[(i * LEN_SUBFR) - tp + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  14.4M|#define LEN_SUBFR 64
  ------------------
                          synth[(i * LEN_SUBFR) - tp + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  14.4M|#define LEN_SUBFR 64
  ------------------
  681|  14.4M|      }
  682|   225k|      pitch_gain[i] = synth_corr / synth_energy;
  683|   225k|    }
  684|  1.02M|  }
  685|       |
  686|  70.5k|  if (mod[3] == 0) {
  ------------------
  |  Branch (686:7): [True: 45.0k, False: 25.4k]
  ------------------
  687|  45.0k|    err = ixheaacd_bass_post_filter(synth, pitch, pitch_gain, fsynth, len_fr, synth_delay,
  688|  45.0k|                                    st->bpf_prev, usac_data->ec_flag);
  689|  45.0k|  } else {
  690|  25.4k|    err = ixheaacd_bass_post_filter(synth, pitch, pitch_gain, fsynth, len_fr,
  691|  25.4k|                                    synth_delay - (len_subfrm / 2), st->bpf_prev,
  692|  25.4k|                                    usac_data->ec_flag);
  693|  25.4k|  }
  694|  70.5k|  if (err) return err;
  ------------------
  |  Branch (694:7): [True: 27, False: 70.4k]
  ------------------
  695|  70.4k|  if (usac_data->ec_flag && usac_data->frame_ok) {
  ------------------
  |  Branch (695:7): [True: 0, False: 70.4k]
  |  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|  70.4k|  return err;
  703|  70.5k|}
ixheaacd_lpd_dec_update:
  706|  14.3k|                             ia_usac_data_struct *usac_data, WORD32 i_ch) {
  707|  14.3k|  WORD32 i, k;
  708|       |
  709|  14.3k|  WORD32 *ptr_overlap = &usac_data->overlap_data_ptr[i_ch][0];
  710|  14.3k|  WORD32 len_fr, lpd_sbf_len, lpd_delay, num_subfr_by2, synth_delay, fac_length;
  711|       |
  712|  14.3k|  if (usac_data->tw_mdct[0])
  ------------------
  |  Branch (712:7): [True: 0, False: 14.3k]
  ------------------
  713|      0|    ptr_overlap = &usac_data->overlap_data_ptr[i_ch][usac_data->ccfl / 2];
  714|       |
  715|  14.3k|  len_fr = usac_data->ccfl;
  716|  14.3k|  lpd_sbf_len = (NUM_FRAMES * usac_data->num_subfrm) / 2;
  ------------------
  |  |   27|  14.3k|#define NUM_FRAMES 4
  ------------------
  717|  14.3k|  lpd_delay = lpd_sbf_len * LEN_SUBFR;
  ------------------
  |  |  118|  14.3k|#define LEN_SUBFR 64
  ------------------
  718|  14.3k|  num_subfr_by2 = lpd_sbf_len - 1;
  719|  14.3k|  synth_delay = num_subfr_by2 * LEN_SUBFR;
  ------------------
  |  |  118|  14.3k|#define LEN_SUBFR 64
  ------------------
  720|  14.3k|  fac_length = (usac_data->len_subfrm) / 2;
  721|       |
  722|  7.10M|  for (i = 0; i < LEN_SUBFR + synth_delay; i++)
  ------------------
  |  |  118|  7.10M|#define LEN_SUBFR 64
  ------------------
  |  Branch (722:15): [True: 7.09M, False: 14.3k]
  ------------------
  723|  7.09M|    ptr_overlap[i] = (WORD32)(
  724|  7.09M|        (FLOAT32)tddec->synth_prev[MAX_PITCH - (LEN_SUBFR) + i] * 16384.0);
  ------------------
  |  |   55|  7.09M|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  7.09M|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  7.09M|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  7.09M|   (6 *           \
  |  |   57|  7.09M|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  7.09M|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  7.09M|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  7.09M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  7.09M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  7.09M|#define TMIN 34
  |  |  ------------------
  ------------------
                      (FLOAT32)tddec->synth_prev[MAX_PITCH - (LEN_SUBFR) + i] * 16384.0);
  ------------------
  |  |  118|  7.09M|#define LEN_SUBFR 64
  ------------------
  725|       |
  726|  14.3k|  ptr_overlap += LEN_SUBFR + synth_delay - fac_length;
  ------------------
  |  |  118|  14.3k|#define LEN_SUBFR 64
  ------------------
  727|       |
  728|  3.56M|  for (k = 0; k < 2 * fac_length; k++)
  ------------------
  |  Branch (728:15): [True: 3.54M, False: 14.3k]
  ------------------
  729|  3.54M|    ptr_overlap[k] = (WORD32)((FLOAT32)tddec->exc_prev[k + 1] * 16384.0);
  730|       |
  731|  14.3k|  ptr_overlap = &usac_data->overlap_data_ptr[i_ch][lpd_delay + fac_length];
  732|       |
  733|  5.33M|  for (i = 0; i < len_fr - lpd_delay - fac_length; i++) ptr_overlap[i] = 0;
  ------------------
  |  Branch (733:15): [True: 5.32M, False: 14.3k]
  ------------------
  734|       |
  735|  14.3k|  usac_data->window_shape[i_ch] = WIN_SEL_0;
  ------------------
  |  |   91|  14.3k|#define WIN_SEL_0 0
  ------------------
  736|  14.3k|  usac_data->window_sequence_last[i_ch] = EIGHT_SHORT_SEQUENCE;
  ------------------
  |  |  102|  14.3k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  737|  14.3k|  usac_data->td_frame_prev[i_ch] = 1;
  738|       |
  739|  14.3k|  if (tddec->mode_prev == 0) {
  ------------------
  |  Branch (739:7): [True: 9.46k, False: 4.93k]
  ------------------
  740|  9.46k|    memmove(usac_data->lpc_prev[i_ch], &tddec->lp_flt_coeff_a_prev[ORDER + 1],
  ------------------
  |  |   30|  9.46k|#define ORDER 16
  ------------------
  741|  9.46k|            (ORDER + 1) * sizeof(FLOAT32));
  ------------------
  |  |   30|  9.46k|#define ORDER 16
  ------------------
  742|  9.46k|    memmove(usac_data->acelp_in[i_ch], tddec->exc_prev,
  743|  9.46k|            (1 + (2 * FAC_LENGTH)) * sizeof(FLOAT32));
  ------------------
  |  |   33|  9.46k|#define FAC_LENGTH 128
  ------------------
  744|  9.46k|  }
  745|       |
  746|  14.3k|  return;
  747|  14.3k|}
ixheaacd_lpd_bpf_fix:
  751|  30.1k|                            ia_usac_lpd_decoder_handle st) {
  752|  30.1k|  WORD32 i, tp, k;
  753|  30.1k|  float synth_buf[MAX_PITCH + SYNTH_DELAY_LMAX + LEN_SUPERFRAME];
  754|  30.1k|  float signal_out[LEN_SUPERFRAME];
  755|  30.1k|  float *synth, synth_corr, synth_energy;
  756|  30.1k|  WORD32 pitch[NUM_SUBFR_SUPERFRAME_BY2 + 3];
  757|  30.1k|  float pitch_gain[NUM_SUBFR_SUPERFRAME_BY2 + 3];
  758|  30.1k|  WORD32 len_fr, lpd_sbf_len, num_subfr_by2, synth_delay;
  759|  30.1k|  WORD32 err = 0;
  760|       |
  761|  30.1k|  len_fr = usac_data->ccfl;
  762|  30.1k|  lpd_sbf_len = (NUM_FRAMES * usac_data->num_subfrm) / 2;
  ------------------
  |  |   27|  30.1k|#define NUM_FRAMES 4
  ------------------
  763|  30.1k|  num_subfr_by2 = lpd_sbf_len - 1;
  764|  30.1k|  synth_delay = num_subfr_by2 * LEN_SUBFR;
  ------------------
  |  |  118|  30.1k|#define LEN_SUBFR 64
  ------------------
  765|       |
  766|  30.1k|  ixheaacd_memset(synth_buf, MAX_PITCH + synth_delay + len_fr);
  ------------------
  |  |   55|  30.1k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  30.1k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  30.1k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  30.1k|   (6 *           \
  |  |   57|  30.1k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  30.1k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  30.1k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  30.1k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  30.1k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  30.1k|#define TMIN 34
  |  |  ------------------
  ------------------
  767|  30.1k|  ixheaacd_mem_cpy(st->synth_prev, synth_buf, MAX_PITCH + synth_delay);
  ------------------
  |  |   55|  30.1k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  30.1k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  30.1k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  30.1k|   (6 *           \
  |  |   57|  30.1k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  30.1k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  30.1k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  30.1k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  30.1k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  30.1k|#define TMIN 34
  |  |  ------------------
  ------------------
  768|  30.1k|  ixheaacd_mem_cpy(out_buffer, synth_buf + MAX_PITCH - (LEN_SUBFR),
  ------------------
  |  |   55|  30.1k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  30.1k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  30.1k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  30.1k|   (6 *           \
  |  |   57|  30.1k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  30.1k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  30.1k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  30.1k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  30.1k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  30.1k|#define TMIN 34
  |  |  ------------------
  ------------------
                ixheaacd_mem_cpy(out_buffer, synth_buf + MAX_PITCH - (LEN_SUBFR),
  ------------------
  |  |  118|  30.1k|#define LEN_SUBFR 64
  ------------------
  769|  30.1k|                   synth_delay + len_fr + (LEN_SUBFR));
  ------------------
  |  |  118|  30.1k|#define LEN_SUBFR 64
  ------------------
  770|       |
  771|   228k|  for (i = 0; i < num_subfr_by2; i++) {
  ------------------
  |  Branch (771:15): [True: 198k, False: 30.1k]
  ------------------
  772|   198k|    pitch[i] = st->pitch_prev[i];
  773|   198k|    pitch_gain[i] = st->gain_prev[i];
  774|   198k|  }
  775|   150k|  for (i = num_subfr_by2; i < lpd_sbf_len + 3; i++) {
  ------------------
  |  Branch (775:27): [True: 120k, False: 30.1k]
  ------------------
  776|   120k|    pitch[i] = 64;
  777|   120k|    pitch_gain[i] = 0.0f;
  778|   120k|  }
  779|  30.1k|  if (st->mode_prev == 0) {
  ------------------
  |  Branch (779:7): [True: 19.6k, False: 10.4k]
  ------------------
  780|  19.6k|    pitch[num_subfr_by2] = pitch[num_subfr_by2 - 1];
  781|  19.6k|    pitch_gain[num_subfr_by2] = pitch_gain[num_subfr_by2 - 1];
  782|  19.6k|    if (!is_short_flag) {
  ------------------
  |  Branch (782:9): [True: 11.1k, False: 8.45k]
  ------------------
  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.6k|  }
  787|       |
  788|  30.1k|  synth = synth_buf + MAX_PITCH;
  ------------------
  |  |   55|  30.1k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  30.1k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  30.1k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  30.1k|   (6 *           \
  |  |   57|  30.1k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  30.1k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  30.1k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  30.1k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  30.1k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  30.1k|#define TMIN 34
  |  |  ------------------
  ------------------
  789|       |
  790|   288k|  for (i = 0; i < num_subfr_by2 + 2; i++) {
  ------------------
  |  Branch (790:15): [True: 258k, False: 30.0k]
  ------------------
  791|   258k|    tp = pitch[i];
  792|   258k|    if ((i * LEN_SUBFR + MAX_PITCH) < tp) {
  ------------------
  |  |  118|   258k|#define LEN_SUBFR 64
  ------------------
                  if ((i * LEN_SUBFR + MAX_PITCH) < tp) {
  ------------------
  |  |   55|   258k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|   258k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   258k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|   258k|   (6 *           \
  |  |   57|   258k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|   258k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   258k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   258k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   258k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   258k|#define TMIN 34
  |  |  ------------------
  ------------------
  |  Branch (792:9): [True: 8, False: 258k]
  ------------------
  793|      8|      if (usac_data->ec_flag == 0)
  ------------------
  |  Branch (793:11): [True: 8, False: 0]
  ------------------
  794|      8|        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|   258k|    } else if (((i * LEN_SUBFR + MAX_PITCH - tp) >= 1883) ||
  ------------------
  |  |  118|   258k|#define LEN_SUBFR 64
  ------------------
                  } else if (((i * LEN_SUBFR + MAX_PITCH - tp) >= 1883) ||
  ------------------
  |  |   55|   258k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|   258k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   258k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|   258k|   (6 *           \
  |  |   57|   258k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|   258k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   258k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   258k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   258k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   258k|#define TMIN 34
  |  |  ------------------
  ------------------
  |  Branch (798:16): [True: 0, False: 258k]
  ------------------
  799|   258k|               (((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |  118|   258k|#define LEN_SUBFR 64
  ------------------
                             (((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |  118|   258k|#define LEN_SUBFR 64
  ------------------
                             (((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |   25|   258k|#define LEN_SUPERFRAME 1024
  ------------------
  |  Branch (799:16): [True: 0, False: 258k]
  ------------------
  800|   258k|               ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |  118|   258k|#define LEN_SUBFR 64
  ------------------
                             ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |  118|   258k|#define LEN_SUBFR 64
  ------------------
                             ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |   25|   258k|#define LEN_SUPERFRAME 1024
  ------------------
  |  Branch (800:16): [True: 0, False: 258k]
  ------------------
  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|   258k|    if (pitch_gain[i] > 0.0f) {
  ------------------
  |  Branch (808:9): [True: 22.6k, False: 235k]
  ------------------
  809|  22.6k|      synth_corr = 0.0f, synth_energy = 1e-6f;
  810|  1.47M|      for (k = 0; k < LEN_SUBFR; k++) {
  ------------------
  |  |  118|  1.47M|#define LEN_SUBFR 64
  ------------------
  |  Branch (810:19): [True: 1.45M, False: 22.6k]
  ------------------
  811|  1.45M|        synth_corr +=
  812|  1.45M|            synth[i * LEN_SUBFR + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  1.45M|#define LEN_SUBFR 64
  ------------------
                          synth[i * LEN_SUBFR + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  1.45M|#define LEN_SUBFR 64
  ------------------
  813|  1.45M|        synth_energy +=
  814|  1.45M|            synth[(i * LEN_SUBFR) - tp + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  1.45M|#define LEN_SUBFR 64
  ------------------
                          synth[(i * LEN_SUBFR) - tp + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  1.45M|#define LEN_SUBFR 64
  ------------------
  815|  1.45M|      }
  816|  22.6k|      pitch_gain[i] = synth_corr / synth_energy;
  817|  22.6k|    }
  818|   258k|  }
  819|       |
  820|  30.0k|  err = ixheaacd_bass_post_filter(
  821|  30.0k|      synth, pitch, pitch_gain, signal_out, (lpd_sbf_len + 2) * LEN_SUBFR + LEN_SUBFR,
  ------------------
  |  |  118|  30.0k|#define LEN_SUBFR 64
  ------------------
                    synth, pitch, pitch_gain, signal_out, (lpd_sbf_len + 2) * LEN_SUBFR + LEN_SUBFR,
  ------------------
  |  |  118|  30.0k|#define LEN_SUBFR 64
  ------------------
  822|  30.0k|      len_fr - (lpd_sbf_len + 4) * LEN_SUBFR, st->bpf_prev, usac_data->ec_flag);
  ------------------
  |  |  118|  30.0k|#define LEN_SUBFR 64
  ------------------
  823|  30.0k|  if (err != 0) return err;
  ------------------
  |  Branch (823:7): [True: 17, False: 30.0k]
  ------------------
  824|       |
  825|  30.0k|  ixheaacd_mem_cpy(signal_out, out_buffer,
  826|  30.0k|                   (lpd_sbf_len + 2) * LEN_SUBFR + LEN_SUBFR);
  ------------------
  |  |  118|  30.0k|#define LEN_SUBFR 64
  ------------------
                                 (lpd_sbf_len + 2) * LEN_SUBFR + LEN_SUBFR);
  ------------------
  |  |  118|  30.0k|#define LEN_SUBFR 64
  ------------------
  827|  30.0k|  return err;
  828|  30.0k|}
ixheaacd_lpc.c:ixheaacd_mult32_m:
   91|  3.15M|static PLATFORM_INLINE WORD32 ixheaacd_mult32_m(WORD32 a, WORD32 b) {
   92|  3.15M|  WORD32 result;
   93|  3.15M|  WORD64 temp_result;
   94|       |
   95|  3.15M|  temp_result = (WORD64)a * (WORD64)b;
   96|  3.15M|  result = (WORD32)(temp_result >> 31);
   97|       |
   98|  3.15M|  return (result);
   99|  3.15M|}
ixheaacd_lpc.c:ixheaacd_lsf_2_lsp_conversion_float:
  217|   293k|                                                WORD32 m) {
  218|   293k|  WORD32 i;
  219|  4.98M|  for (i = 0; i < m; i++)
  ------------------
  |  Branch (219:15): [True: 4.69M, False: 293k]
  ------------------
  220|  4.69M|    lsp[i] = (FLOAT32)cos((double)lsf[i] * (double)PI_BY_6400);
  ------------------
  |  |  205|  4.69M|#define PI_BY_6400 (PI / 6400.0)
  |  |  ------------------
  |  |  |  |  153|  4.69M|#define PI 3.14159265358979323846264338327950288
  |  |  ------------------
  ------------------
  221|       |
  222|   293k|  return;
  223|   293k|}
ixheaacd_lpc.c:ixheaacd_bass_post_filter:
  227|   100k|                                        FLOAT32 bpf_prev[], WORD32 ec_flag) {
  228|   100k|  WORD32 i, j, sf, num_subfr, pitch_lag, lg;
  229|   100k|  FLOAT32 x_energy, xy_corr, y_energy, norm_corr, energy, gain, tmp, alpha;
  230|   100k|  FLOAT32 noise_buf[FILTER_DELAY + (2 * LEN_SUBFR)], *noise_tmp1, *noise_tmp2,
  231|   100k|      *x, *y;
  232|       |
  233|   100k|  noise_tmp1 = noise_buf + FILTER_DELAY;
  ------------------
  |  |   43|   100k|#define FILTER_DELAY 12
  ------------------
  234|   100k|  noise_tmp2 = noise_buf + FILTER_DELAY + LEN_SUBFR;
  ------------------
  |  |   43|   100k|#define FILTER_DELAY 12
  ------------------
                noise_tmp2 = noise_buf + FILTER_DELAY + LEN_SUBFR;
  ------------------
  |  |  118|   100k|#define LEN_SUBFR 64
  ------------------
  235|       |
  236|   100k|  memcpy(synth_out, synth_sig - LEN_SUBFR, len_fr * sizeof(FLOAT32));
  ------------------
  |  |  118|   100k|#define LEN_SUBFR 64
  ------------------
  237|       |
  238|   100k|  if (len_fr % 64)
  ------------------
  |  Branch (238:7): [True: 0, False: 100k]
  ------------------
  239|      0|    memset(synth_out + len_fr, 0, (LEN_SUBFR - len_fr % 64) * sizeof(FLOAT32));
  ------------------
  |  |  118|      0|#define LEN_SUBFR 64
  ------------------
  240|       |
  241|   100k|  sf = 0;
  242|  1.44M|  for (num_subfr = 0; num_subfr < len_fr; num_subfr += LEN_SUBFR, sf++) {
  ------------------
  |  |  118|  1.34M|#define LEN_SUBFR 64
  ------------------
  |  Branch (242:23): [True: 1.34M, False: 100k]
  ------------------
  243|  1.34M|    pitch_lag = pitch[sf];
  244|  1.34M|    gain = pitch_gain[sf];
  245|  1.34M|    if (((pitch_lag >> 1) + 96 - num_subfr) > MAX_PITCH) {
  ------------------
  |  |   55|  1.34M|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  1.34M|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.34M|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  1.34M|   (6 *           \
  |  |   57|  1.34M|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  1.34M|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  1.34M|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  1.34M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  1.34M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  1.34M|#define TMIN 34
  |  |  ------------------
  ------------------
  |  Branch (245:9): [True: 1, False: 1.34M]
  ------------------
  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.34M|    if (gain > 1.0f) gain = 1.0f;
  ------------------
  |  Branch (252:9): [True: 22.5k, False: 1.32M]
  ------------------
  253|  1.34M|    if (gain < 0.0f) gain = 0.0f;
  ------------------
  |  Branch (253:9): [True: 51.0k, False: 1.29M]
  ------------------
  254|       |
  255|  1.34M|    x = &synth_sig[num_subfr - 96];
  256|  1.34M|    y = &synth_sig[num_subfr - pitch_lag / 2 - 96];
  257|       |
  258|  1.34M|    x_energy = 0.01f;
  259|  1.34M|    xy_corr = 0.01f;
  260|  1.34M|    y_energy = 0.01f;
  261|   216M|    for (i = 0; i < LEN_SUBFR + 96; i++) {
  ------------------
  |  |  118|   216M|#define LEN_SUBFR 64
  ------------------
  |  Branch (261:17): [True: 215M, False: 1.34M]
  ------------------
  262|   215M|      x_energy += x[i] * x[i];
  263|   215M|      xy_corr += x[i] * y[i];
  264|   215M|      y_energy += y[i] * y[i];
  265|   215M|    }
  266|       |
  267|  1.34M|    norm_corr = xy_corr / (FLOAT32)sqrt(x_energy * y_energy);
  268|       |
  269|  1.34M|    if (norm_corr > 0.95f) pitch_lag >>= 1;
  ------------------
  |  Branch (269:9): [True: 284k, False: 1.06M]
  ------------------
  270|       |
  271|  1.34M|    lg = len_fr + len2 - pitch_lag - num_subfr;
  272|  1.34M|    if (lg < 0) lg = 0;
  ------------------
  |  Branch (272:9): [True: 156, False: 1.34M]
  ------------------
  273|  1.34M|    if (lg > LEN_SUBFR) lg = LEN_SUBFR;
  ------------------
  |  |  118|  1.34M|#define LEN_SUBFR 64
  ------------------
                  if (lg > LEN_SUBFR) lg = LEN_SUBFR;
  ------------------
  |  |  118|  1.34M|#define LEN_SUBFR 64
  ------------------
  |  Branch (273:9): [True: 1.34M, False: 475]
  ------------------
  274|       |
  275|  1.34M|    if (pitch_lag > MAX_PITCH) {
  ------------------
  |  |   55|  1.34M|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  1.34M|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.34M|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  1.34M|   (6 *           \
  |  |   57|  1.34M|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  1.34M|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  1.34M|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  1.34M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  1.34M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  1.34M|#define TMIN 34
  |  |  ------------------
  ------------------
  |  Branch (275:9): [True: 43, False: 1.34M]
  ------------------
  276|     43|      if (ec_flag) {
  ------------------
  |  Branch (276:11): [True: 0, False: 43]
  ------------------
  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|     43|      } else {
  279|     43|        return -1;
  280|     43|      }
  281|     43|    }
  282|       |
  283|  1.34M|    if (gain > 0) {
  ------------------
  |  Branch (283:9): [True: 144k, False: 1.20M]
  ------------------
  284|   144k|      if (lg > 0) {
  ------------------
  |  Branch (284:11): [True: 144k, False: 75]
  ------------------
  285|   144k|        tmp = 0.01f;
  286|  9.40M|        for (i = 0; i < lg; i++) {
  ------------------
  |  Branch (286:21): [True: 9.25M, False: 144k]
  ------------------
  287|  9.25M|          tmp += synth_sig[i + num_subfr] * synth_sig[i + num_subfr];
  288|  9.25M|        }
  289|   144k|        energy = 0.01f;
  290|  9.40M|        for (i = 0; i < lg; i++) {
  ------------------
  |  Branch (290:21): [True: 9.25M, False: 144k]
  ------------------
  291|  9.25M|          energy += synth_sig[i + num_subfr + pitch_lag] *
  292|  9.25M|                    synth_sig[i + num_subfr + pitch_lag];
  293|  9.25M|        }
  294|   144k|        tmp = (FLOAT32)sqrt(tmp / energy);
  295|   144k|        if (tmp < gain) gain = tmp;
  ------------------
  |  Branch (295:13): [True: 30.5k, False: 114k]
  ------------------
  296|   144k|      }
  297|       |
  298|   144k|      alpha = 0.5f * gain;
  299|  9.40M|      for (i = 0; i < lg; i++) {
  ------------------
  |  Branch (299:19): [True: 9.25M, False: 144k]
  ------------------
  300|  9.25M|        noise_tmp2[i] = alpha * (synth_sig[i + num_subfr] -
  301|  9.25M|                                 0.5f * synth_sig[i + num_subfr - pitch_lag] -
  302|  9.25M|                                 0.5f * synth_sig[i + num_subfr + pitch_lag]);
  303|  9.25M|      }
  304|   154k|      for (i = lg; i < LEN_SUBFR; i++) {
  ------------------
  |  |  118|   154k|#define LEN_SUBFR 64
  ------------------
  |  Branch (304:20): [True: 9.22k, False: 144k]
  ------------------
  305|  9.22k|        noise_tmp2[i] = alpha * (synth_sig[i + num_subfr] -
  306|  9.22k|                                 synth_sig[i + num_subfr - pitch_lag]);
  307|  9.22k|      }
  308|  1.20M|    } else {
  309|  1.20M|      memset(noise_tmp2, 0, LEN_SUBFR * sizeof(FLOAT32));
  ------------------
  |  |  118|  1.20M|#define LEN_SUBFR 64
  ------------------
  310|  1.20M|    }
  311|       |
  312|  1.34M|    memcpy(noise_buf, bpf_prev, (FILTER_DELAY + LEN_SUBFR) * sizeof(FLOAT32));
  ------------------
  |  |   43|  1.34M|#define FILTER_DELAY 12
  ------------------
                  memcpy(noise_buf, bpf_prev, (FILTER_DELAY + LEN_SUBFR) * sizeof(FLOAT32));
  ------------------
  |  |  118|  1.34M|#define LEN_SUBFR 64
  ------------------
  313|  1.34M|    memcpy(bpf_prev, noise_buf + LEN_SUBFR,
  ------------------
  |  |  118|  1.34M|#define LEN_SUBFR 64
  ------------------
  314|  1.34M|           (FILTER_DELAY + LEN_SUBFR) * sizeof(FLOAT32));
  ------------------
  |  |   43|  1.34M|#define FILTER_DELAY 12
  ------------------
                         (FILTER_DELAY + LEN_SUBFR) * sizeof(FLOAT32));
  ------------------
  |  |  118|  1.34M|#define LEN_SUBFR 64
  ------------------
  315|       |
  316|  87.4M|    for (i = 0; i < LEN_SUBFR; i++) {
  ------------------
  |  |  118|  87.4M|#define LEN_SUBFR 64
  ------------------
  |  Branch (316:17): [True: 86.0M, False: 1.34M]
  ------------------
  317|  86.0M|      tmp = ixheaacd_fir_lp_filt[0] * noise_tmp1[i];
  318|  1.11G|      for (j = 1; j <= FILTER_DELAY; j++) {
  ------------------
  |  |   43|  1.11G|#define FILTER_DELAY 12
  ------------------
  |  Branch (318:19): [True: 1.03G, False: 86.0M]
  ------------------
  319|  1.03G|        tmp +=
  320|  1.03G|            ixheaacd_fir_lp_filt[j] * (noise_tmp1[i - j] + noise_tmp1[i + j]);
  321|  1.03G|      }
  322|  86.0M|      synth_out[i + num_subfr] -= tmp;
  323|  86.0M|    }
  324|  1.34M|  }
  325|       |
  326|   100k|  return 0;
  327|   100k|}

ixheaacd_lsf_weight_2st_flt:
   52|   114k|VOID ixheaacd_lsf_weight_2st_flt(FLOAT32 *lsfq, FLOAT32 *w, WORD32 mode) {
   53|   114k|  WORD32 i;
   54|   114k|  FLOAT32 d[ORDER + 1];
   55|       |
   56|   114k|  d[0] = lsfq[0];
   57|   114k|  d[ORDER] = FREQ_MAX - lsfq[ORDER - 1];
  ------------------
  |  |   30|   114k|#define ORDER 16
  ------------------
                d[ORDER] = FREQ_MAX - lsfq[ORDER - 1];
  ------------------
  |  |   47|   114k|#define FREQ_MAX 6400.0f
  ------------------
                d[ORDER] = FREQ_MAX - lsfq[ORDER - 1];
  ------------------
  |  |   30|   114k|#define ORDER 16
  ------------------
   58|  1.83M|  for (i = 1; i < ORDER; i++) {
  ------------------
  |  |   30|  1.83M|#define ORDER 16
  ------------------
  |  Branch (58:15): [True: 1.71M, False: 114k]
  ------------------
   59|  1.71M|    d[i] = lsfq[i] - lsfq[i - 1];
   60|  1.71M|  }
   61|       |
   62|  1.94M|  for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  1.94M|#define ORDER 16
  ------------------
  |  Branch (62:15): [True: 1.83M, False: 114k]
  ------------------
   63|  1.83M|    w[i] = (FLOAT32)((factor_table[mode] * sqrt(d[i] * d[i + 1])) / FREQ_DIV);
  ------------------
  |  |   48|  1.83M|#define FREQ_DIV 400.0f
  ------------------
   64|  1.83M|  }
   65|       |
   66|   114k|  return;
   67|   114k|}
ixheaacd_avq_first_approx_rel:
  136|   114k|WORD32 ixheaacd_avq_first_approx_rel(FLOAT32 *lsf, WORD32 *indx, WORD32 mode) {
  137|   114k|  WORD32 i;
  138|   114k|  FLOAT32 w[ORDER];
  139|   114k|  WORD32 avq[ORDER];
  140|   114k|  WORD32 position = 0;
  141|   114k|  FLOAT32 lsf_min;
  142|       |
  143|   114k|  ixheaacd_lsf_weight_2st_flt(lsf, w, mode);
  144|       |
  145|   114k|  position = ixheaacd_decoding_avq_tool(indx, avq);
  146|       |
  147|   114k|  lsf_min = LSF_GAP;
  ------------------
  |  |   46|   114k|#define LSF_GAP 50.0f
  ------------------
  148|       |
  149|  1.94M|  for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  1.94M|#define ORDER 16
  ------------------
  |  Branch (149:15): [True: 1.83M, False: 114k]
  ------------------
  150|  1.83M|    lsf[i] += (w[i] * avq[i]);
  151|       |
  152|  1.83M|    if (lsf[i] < lsf_min) lsf[i] = lsf_min;
  ------------------
  |  Branch (152:9): [True: 129k, False: 1.70M]
  ------------------
  153|       |
  154|  1.83M|    lsf_min = lsf[i] + LSF_GAP;
  ------------------
  |  |   46|  1.83M|#define LSF_GAP 50.0f
  ------------------
  155|  1.83M|  }
  156|       |
  157|   114k|  return position;
  158|   114k|}
ixheaacd_alg_vec_dequant:
  161|  70.5k|                              FLOAT32 *lsf, WORD32 mod[], WORD32 ec_flag) {
  162|  70.5k|  WORD32 i;
  163|  70.5k|  WORD32 *lpc_index, mode_lpc, pos = 0;
  164|  70.5k|  WORD32 lpc_present[5] = {0, 0, 0, 0, 0};
  165|  70.5k|  lpc_index = pstr_td_frame_data->lpc_first_approx_idx;
  166|  70.5k|  lpc_present[4] = 1;
  167|  70.5k|  pos = ixheaacd_avq_first_approx_abs(&lsf[4 * ORDER], &lpc_index[0]);
  ------------------
  |  |   30|  70.5k|#define ORDER 16
  ------------------
  168|       |
  169|  70.5k|  lpc_index += pos;
  170|       |
  171|  70.5k|  if (first_lpd_flag) {
  ------------------
  |  Branch (171:7): [True: 42.5k, False: 27.9k]
  ------------------
  172|  42.5k|    mode_lpc = lpc_index[0];
  173|  42.5k|    lpc_index++;
  174|       |
  175|  42.5k|    if (mode_lpc == 0) {
  ------------------
  |  Branch (175:9): [True: 27.8k, False: 14.6k]
  ------------------
  176|  27.8k|      pos = ixheaacd_avq_first_approx_abs(&lsf[0], &lpc_index[0]);
  177|       |
  178|  27.8k|    } else if (mode_lpc == 1) {
  ------------------
  |  Branch (178:16): [True: 14.6k, False: 0]
  ------------------
  179|   249k|      for (i = 0; i < ORDER; i++) lsf[i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   249k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   235k|#define ORDER 16
  ------------------
  |  Branch (179:19): [True: 235k, False: 14.6k]
  ------------------
  180|  14.6k|      pos = ixheaacd_avq_first_approx_rel(&lsf[0], &lpc_index[0], 3);
  181|  14.6k|    }
  182|       |
  183|  42.5k|    lpc_index += pos;
  184|  42.5k|  }
  185|  70.5k|  lpc_present[0] = 1;
  186|       |
  187|  70.5k|  if (mod[0] < 3) {
  ------------------
  |  Branch (187:7): [True: 70.2k, False: 307]
  ------------------
  188|  70.2k|    mode_lpc = lpc_index[0];
  189|  70.2k|    lpc_index++;
  190|  70.2k|    lpc_present[2] = 1;
  191|       |
  192|  70.2k|    if (mode_lpc == 0) {
  ------------------
  |  Branch (192:9): [True: 46.9k, False: 23.2k]
  ------------------
  193|  46.9k|      pos = ixheaacd_avq_first_approx_abs(&lsf[2 * ORDER], &lpc_index[0]);
  ------------------
  |  |   30|  46.9k|#define ORDER 16
  ------------------
  194|  46.9k|    } else if (mode_lpc == 1) {
  ------------------
  |  Branch (194:16): [True: 23.2k, False: 0]
  ------------------
  195|   394k|      for (i = 0; i < ORDER; i++) lsf[2 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   394k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[2 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   371k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[2 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   371k|#define ORDER 16
  ------------------
  |  Branch (195:19): [True: 371k, False: 23.2k]
  ------------------
  196|  23.2k|      pos = ixheaacd_avq_first_approx_rel(&lsf[2 * ORDER], &lpc_index[0], 3);
  ------------------
  |  |   30|  23.2k|#define ORDER 16
  ------------------
  197|  23.2k|    }
  198|       |
  199|  70.2k|    lpc_index += pos;
  200|  70.2k|  }
  201|       |
  202|  70.5k|  if (mod[0] < 2) {
  ------------------
  |  Branch (202:7): [True: 47.0k, False: 23.4k]
  ------------------
  203|  47.0k|    mode_lpc = lpc_index[0];
  204|  47.0k|    lpc_index++;
  205|  47.0k|    lpc_present[1] = 1;
  206|       |
  207|  47.0k|    if (mode_lpc == 1) {
  ------------------
  |  Branch (207:9): [True: 3.68k, False: 43.3k]
  ------------------
  208|  62.7k|      for (i = 0; i < ORDER; i++)
  ------------------
  |  |   30|  62.7k|#define ORDER 16
  ------------------
  |  Branch (208:19): [True: 59.0k, False: 3.68k]
  ------------------
  209|  59.0k|        lsf[ORDER + i] = 0.5f * (lsf[i] + lsf[2 * ORDER + i]);
  ------------------
  |  |   30|  59.0k|#define ORDER 16
  ------------------
                      lsf[ORDER + i] = 0.5f * (lsf[i] + lsf[2 * ORDER + i]);
  ------------------
  |  |   30|  59.0k|#define ORDER 16
  ------------------
  210|  43.3k|    } else {
  211|  43.3k|      if (mode_lpc == 0) {
  ------------------
  |  Branch (211:11): [True: 11.6k, False: 31.7k]
  ------------------
  212|  11.6k|        pos = ixheaacd_avq_first_approx_abs(&lsf[ORDER], &lpc_index[0]);
  ------------------
  |  |   30|  11.6k|#define ORDER 16
  ------------------
  213|  31.7k|      } else if (mode_lpc == 2) {
  ------------------
  |  Branch (213:18): [True: 31.7k, False: 0]
  ------------------
  214|   539k|        for (i = 0; i < ORDER; i++) lsf[ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|   539k|#define ORDER 16
  ------------------
                      for (i = 0; i < ORDER; i++) lsf[ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|   508k|#define ORDER 16
  ------------------
                      for (i = 0; i < ORDER; i++) lsf[ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|   508k|#define ORDER 16
  ------------------
  |  Branch (214:21): [True: 508k, False: 31.7k]
  ------------------
  215|  31.7k|        pos = ixheaacd_avq_first_approx_rel(&lsf[ORDER], &lpc_index[0], 2);
  ------------------
  |  |   30|  31.7k|#define ORDER 16
  ------------------
  216|  31.7k|      }
  217|       |
  218|  43.3k|      lpc_index += pos;
  219|  43.3k|    }
  220|  47.0k|  }
  221|       |
  222|  70.5k|  if (mod[2] < 2) {
  ------------------
  |  Branch (222:7): [True: 63.1k, False: 7.35k]
  ------------------
  223|  63.1k|    mode_lpc = lpc_index[0];
  224|  63.1k|    lpc_index++;
  225|  63.1k|    lpc_present[3] = 1;
  226|       |
  227|  63.1k|    if (mode_lpc == 0) {
  ------------------
  |  Branch (227:9): [True: 18.2k, False: 44.9k]
  ------------------
  228|  18.2k|      pos = ixheaacd_avq_first_approx_abs(&lsf[3 * ORDER], &lpc_index[0]);
  ------------------
  |  |   30|  18.2k|#define ORDER 16
  ------------------
  229|  44.9k|    } else if (mode_lpc == 1) {
  ------------------
  |  Branch (229:16): [True: 38.1k, False: 6.73k]
  ------------------
  230|   648k|      for (i = 0; i < ORDER; i++)
  ------------------
  |  |   30|   648k|#define ORDER 16
  ------------------
  |  Branch (230:19): [True: 610k, False: 38.1k]
  ------------------
  231|   610k|        lsf[3 * ORDER + i] = 0.5f * (lsf[2 * ORDER + i] + lsf[4 * ORDER + i]);
  ------------------
  |  |   30|   610k|#define ORDER 16
  ------------------
                      lsf[3 * ORDER + i] = 0.5f * (lsf[2 * ORDER + i] + lsf[4 * ORDER + i]);
  ------------------
  |  |   30|   610k|#define ORDER 16
  ------------------
                      lsf[3 * ORDER + i] = 0.5f * (lsf[2 * ORDER + i] + lsf[4 * ORDER + i]);
  ------------------
  |  |   30|   610k|#define ORDER 16
  ------------------
  232|  38.1k|      pos = ixheaacd_avq_first_approx_rel(&lsf[3 * ORDER], &lpc_index[0], 1);
  ------------------
  |  |   30|  38.1k|#define ORDER 16
  ------------------
  233|  38.1k|    } else if (mode_lpc == 2) {
  ------------------
  |  Branch (233:16): [True: 2.11k, False: 4.61k]
  ------------------
  234|  36.0k|      for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|  36.0k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|  33.9k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|  33.9k|#define ORDER 16
  ------------------
  |  Branch (234:19): [True: 33.9k, False: 2.11k]
  ------------------
  235|  2.11k|      pos = ixheaacd_avq_first_approx_rel(&lsf[3 * ORDER], &lpc_index[0], 2);
  ------------------
  |  |   30|  2.11k|#define ORDER 16
  ------------------
  236|  4.61k|    } else if (mode_lpc == 3) {
  ------------------
  |  Branch (236:16): [True: 4.61k, False: 0]
  ------------------
  237|  78.4k|      for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|  78.4k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|  73.8k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|  73.8k|#define ORDER 16
  ------------------
  |  Branch (237:19): [True: 73.8k, False: 4.61k]
  ------------------
  238|  4.61k|      pos = ixheaacd_avq_first_approx_rel(&lsf[3 * ORDER], &lpc_index[0], 2);
  ------------------
  |  |   30|  4.61k|#define ORDER 16
  ------------------
  239|  4.61k|    }
  240|       |
  241|  63.1k|    lpc_index += pos;
  242|  63.1k|  }
  243|  70.5k|  if (ec_flag) {
  ------------------
  |  Branch (243:7): [True: 0, False: 70.5k]
  ------------------
  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|  70.5k|}
ixheaacd_lpc_dec.c:ixheaacd_decoding_avq_tool:
   69|   289k|static WORD32 ixheaacd_decoding_avq_tool(WORD32 *read_arr, WORD32 *nvecq) {
   70|   289k|  WORD32 i, k, qn, kv[8] = {0};
   71|   289k|  WORD32 code_book_idx;
   72|   289k|  WORD32 *ptr_kv = &kv[0];
   73|       |
   74|   289k|  WORD32 position = 2;
   75|       |
   76|   869k|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (76:15): [True: 579k, False: 289k]
  ------------------
   77|   579k|    qn = read_arr[k];
   78|       |
   79|   579k|    if (qn > 0) {
  ------------------
  |  Branch (79:9): [True: 511k, False: 68.5k]
  ------------------
   80|   511k|      code_book_idx = read_arr[position++];
   81|       |
   82|   511k|      ptr_kv = &read_arr[position];
   83|   511k|      position += 8;
   84|       |
   85|   511k|    } else {
   86|  68.5k|      code_book_idx = 0;
   87|   616k|      for (i = 0; i < 8; i++) ptr_kv = &kv[0];
  ------------------
  |  Branch (87:19): [True: 548k, False: 68.5k]
  ------------------
   88|  68.5k|    }
   89|       |
   90|   579k|    ixheaacd_rotated_gosset_mtx_dec(qn, code_book_idx, ptr_kv, &nvecq[k * 8]);
   91|   579k|  }
   92|       |
   93|   289k|  return position;
   94|   289k|}
ixheaacd_lpc_dec.c:ixheaacd_avq_first_approx_abs:
   96|   175k|static WORD32 ixheaacd_avq_first_approx_abs(FLOAT32 *lsf, WORD32 *indx) {
   97|   175k|  WORD32 i;
   98|   175k|  extern const FLOAT32 ixheaacd_dico_lsf_abs_8b_flt[];
   99|   175k|  extern const FLOAT32 ixheaacd_weight_table_avq[];
  100|   175k|  WORD32 position = 0;
  101|   175k|  WORD32 avq[ORDER];
  102|   175k|  FLOAT32 lsf_min;
  103|   175k|  const FLOAT32 *ptr_w;
  104|       |
  105|   175k|  ptr_w = &ixheaacd_weight_table_avq[(indx[0] * ORDER)];
  ------------------
  |  |   30|   175k|#define ORDER 16
  ------------------
  106|       |
  107|   175k|  position++;
  108|       |
  109|  2.97M|  for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  2.97M|#define ORDER 16
  ------------------
  |  Branch (109:15): [True: 2.80M, False: 175k]
  ------------------
  110|  2.80M|    lsf[i] = ixheaacd_dico_lsf_abs_8b_flt[indx[0] * ORDER + i];
  ------------------
  |  |   30|  2.80M|#define ORDER 16
  ------------------
  111|  2.80M|  }
  112|       |
  113|   175k|  position += ixheaacd_decoding_avq_tool(&indx[position], avq);
  114|       |
  115|   175k|  lsf_min = LSF_GAP;
  ------------------
  |  |   46|   175k|#define LSF_GAP 50.0f
  ------------------
  116|  2.97M|  for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  2.97M|#define ORDER 16
  ------------------
  |  Branch (116:15): [True: 2.80M, False: 175k]
  ------------------
  117|  2.80M|    lsf[i] += (ptr_w[i] * avq[i]);
  118|       |
  119|  2.80M|    if (lsf[i] < lsf_min) lsf[i] = lsf_min;
  ------------------
  |  Branch (119:9): [True: 154k, False: 2.64M]
  ------------------
  120|       |
  121|  2.80M|    lsf_min = lsf[i] + LSF_GAP;
  ------------------
  |  |   46|  2.80M|#define LSF_GAP 50.0f
  ------------------
  122|  2.80M|  }
  123|       |
  124|   175k|  lsf_min = FREQ_MAX - LSF_GAP;
  ------------------
  |  |   47|   175k|#define FREQ_MAX 6400.0f
  ------------------
                lsf_min = FREQ_MAX - LSF_GAP;
  ------------------
  |  |   46|   175k|#define LSF_GAP 50.0f
  ------------------
  125|  2.97M|  for (i = ORDER - 1; i >= 0; i--) {
  ------------------
  |  |   30|   175k|#define ORDER 16
  ------------------
  |  Branch (125:23): [True: 2.80M, False: 175k]
  ------------------
  126|  2.80M|    if (lsf[i] > lsf_min) {
  ------------------
  |  Branch (126:9): [True: 27.7k, False: 2.77M]
  ------------------
  127|  27.7k|      lsf[i] = lsf_min;
  128|  27.7k|    }
  129|       |
  130|  2.80M|    lsf_min = lsf[i] - LSF_GAP;
  ------------------
  |  |   46|  2.80M|#define LSF_GAP 50.0f
  ------------------
  131|  2.80M|  }
  132|       |
  133|   175k|  return position;
  134|   175k|}

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

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

ixheaacd_lt_prediction:
   57|   105k|    UWORD32 frame_len, WORD32 *in_data, WORD32 *out_data) {
   58|   105k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
   59|   105k|  WORD16 *lt_pred_stat = ptr_aac_dec_channel_info->ltp_buf;
   60|   105k|  UWORD16 win_shape = ptr_aac_dec_channel_info->str_ics_info.window_shape;
   61|   105k|  WORD16 sfb;
   62|   105k|  WORD16 bin, i, num_samples;
   63|   105k|  const WORD8 *swb_offset = aac_tables_ptr->scale_factor_bands_long[sr_index];
   64|   105k|  WORD32 *ptr_spec = &spec[0];
   65|   105k|  WORD32 *ptr_x_est = &out_data[0];
   66|       |
   67|   105k|  if (512 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (67:7): [True: 54.9k, False: 50.9k]
  ------------------
   68|  54.9k|    swb_offset = aac_tables_ptr->scale_fac_bands_512[sr_index];
   69|  54.9k|  } else if (480 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (69:14): [True: 8.91k, False: 42.0k]
  ------------------
   70|  8.91k|    swb_offset = aac_tables_ptr->scale_fac_bands_480[sr_index];
   71|  8.91k|  }
   72|       |
   73|   105k|  if (ptr_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   105k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (73:7): [True: 88.7k, False: 17.2k]
  ------------------
   74|  88.7k|    if (ltp->data_present) {
  ------------------
  |  Branch (74:9): [True: 46.7k, False: 41.9k]
  ------------------
   75|  46.7k|      num_samples = frame_len << 1;
   76|       |
   77|  55.8M|      for (i = 0; i < num_samples; i++) {
  ------------------
  |  Branch (77:19): [True: 55.7M, False: 46.7k]
  ------------------
   78|  55.7M|        in_data[i] =
   79|  55.7M|            ixheaac_shr32(ixheaac_mult32x16in32_shl_sat(
   80|  55.7M|                               ixheaacd_codebook_Q30[ltp->coef],
   81|  55.7M|                               lt_pred_stat[num_samples + i - ltp->lag]),
   82|  55.7M|                           SHIFT_VAL);
  ------------------
  |  |   50|  55.7M|#define SHIFT_VAL 8
  ------------------
   83|  55.7M|      }
   84|       |
   85|  46.7k|      ixheaacd_filter_bank_ltp(aac_tables_ptr, ptr_ics_info->window_sequence,
   86|  46.7k|                               win_shape, win_shape_prev, in_data, out_data,
   87|  46.7k|                               object_type, frame_len);
   88|       |
   89|  46.7k|      if (ptr_aac_dec_channel_info->str_tns_info.tns_data_present == 1)
  ------------------
  |  Branch (89:11): [True: 9.21k, False: 37.5k]
  ------------------
   90|  9.21k|        ixheaacd_aac_tns_process(ptr_aac_dec_channel_info, 1, aac_tables_ptr,
   91|  9.21k|                                 object_type, 0, out_data);
   92|       |
   93|   851k|      for (sfb = 0; sfb < ltp->last_band; sfb++) {
  ------------------
  |  Branch (93:21): [True: 804k, False: 46.7k]
  ------------------
   94|   804k|        WORD8 sfb_width = swb_offset[sfb];
   95|   804k|        if (ltp->long_used[sfb]) {
  ------------------
  |  Branch (95:13): [True: 353k, False: 451k]
  ------------------
   96|  3.59M|          for (bin = sfb_width - 1; bin >= 0; bin--) {
  ------------------
  |  Branch (96:37): [True: 3.23M, False: 353k]
  ------------------
   97|  3.23M|            WORD32 temp = *ptr_spec;
   98|  3.23M|            temp = ixheaac_add32_sat(temp,
   99|  3.23M|                                      ixheaac_shr32(*ptr_x_est++, SHIFT_VAL1));
  ------------------
  |  |   51|  3.23M|#define SHIFT_VAL1 (15 - SHIFT_VAL)
  |  |  ------------------
  |  |  |  |   50|  3.23M|#define SHIFT_VAL 8
  |  |  ------------------
  ------------------
  100|  3.23M|            *ptr_spec++ = temp;
  101|  3.23M|          }
  102|   451k|        } else {
  103|   451k|          ptr_spec += sfb_width;
  104|   451k|          ptr_x_est += sfb_width;
  105|   451k|        }
  106|   804k|      }
  107|  46.7k|    }
  108|  88.7k|  }
  109|   105k|}
ixheaacd_filter_bank_ltp:
  115|  46.7k|                              UWORD32 frame_len) {
  116|  46.7k|  WORD32 i;
  117|       |
  118|  46.7k|  const WORD16 *window_long = NULL;
  119|  46.7k|  const WORD16 *window_long_prev = NULL;
  120|  46.7k|  const WORD16 *window_short = NULL;
  121|  46.7k|  const WORD16 *window_short_prev = NULL;
  122|       |
  123|  46.7k|  UWORD16 nlong = frame_len;
  124|  46.7k|  UWORD16 nlong2 = frame_len << 1;
  125|  46.7k|  UWORD16 nshort = frame_len / 8;
  126|  46.7k|  UWORD16 nflat_ls = (nlong - nshort) / 2;
  127|  46.7k|  WORD32 imdct_scale = 0;
  128|  46.7k|  WORD32 expo = 0;
  129|       |
  130|  46.7k|  if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (130:7): [True: 37.3k, False: 9.35k]
  ------------------
  131|  37.3k|    if (!window_shape) {
  ------------------
  |  Branch (131:9): [True: 16.5k, False: 20.8k]
  ------------------
  132|  16.5k|      if (512 == frame_len) {
  ------------------
  |  Branch (132:11): [True: 11.9k, False: 4.56k]
  ------------------
  133|  11.9k|        window_long =
  134|  11.9k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->window_sine_512;
  135|  11.9k|      } else {
  136|  4.56k|        window_long =
  137|  4.56k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->window_sine_480;
  138|  4.56k|      }
  139|  20.8k|    } else {
  140|  20.8k|      if (512 == frame_len) {
  ------------------
  |  Branch (140:11): [True: 14.5k, False: 6.31k]
  ------------------
  141|  14.5k|        window_long =
  142|  14.5k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->low_overlap_win;
  143|  14.5k|      } else {
  144|  6.31k|        window_long =
  145|  6.31k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->low_overlap_win_480;
  146|  6.31k|      }
  147|  20.8k|    }
  148|       |
  149|  37.3k|    if (!window_shape_prev) {
  ------------------
  |  Branch (149:9): [True: 18.2k, False: 19.1k]
  ------------------
  150|  18.2k|      if (512 == frame_len) {
  ------------------
  |  Branch (150:11): [True: 13.2k, False: 4.98k]
  ------------------
  151|  13.2k|        window_long_prev =
  152|  13.2k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->window_sine_512;
  153|  13.2k|      } else {
  154|  4.98k|        window_long_prev =
  155|  4.98k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->window_sine_480;
  156|  4.98k|      }
  157|  19.1k|    } else {
  158|  19.1k|      if (512 == frame_len) {
  ------------------
  |  Branch (158:11): [True: 13.2k, False: 5.90k]
  ------------------
  159|  13.2k|        window_long_prev =
  160|  13.2k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->low_overlap_win;
  161|  13.2k|      } else {
  162|  5.90k|        window_long_prev =
  163|  5.90k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->low_overlap_win_480;
  164|  5.90k|      }
  165|  19.1k|    }
  166|       |
  167|  37.3k|    if (!window_shape)
  ------------------
  |  Branch (167:9): [True: 16.5k, False: 20.8k]
  ------------------
  168|  16.5k|      window_short = aac_tables_ptr->pstr_imdct_tables->only_short_window_sine;
  169|  20.8k|    else
  170|  20.8k|      window_short = aac_tables_ptr->pstr_imdct_tables->only_short_window_kbd;
  171|  37.3k|    if (!window_shape_prev)
  ------------------
  |  Branch (171:9): [True: 18.2k, False: 19.1k]
  ------------------
  172|  18.2k|      window_short_prev =
  173|  18.2k|          aac_tables_ptr->pstr_imdct_tables->only_short_window_sine;
  174|  19.1k|    else
  175|  19.1k|      window_short_prev =
  176|  19.1k|          aac_tables_ptr->pstr_imdct_tables->only_short_window_kbd;
  177|       |
  178|  37.3k|  } else {
  179|  9.35k|    if (!window_shape)
  ------------------
  |  Branch (179:9): [True: 7.19k, False: 2.16k]
  ------------------
  180|  7.19k|      window_long = aac_tables_ptr->pstr_imdct_tables->only_long_window_sine;
  181|  2.16k|    else
  182|  2.16k|      window_long = aac_tables_ptr->pstr_imdct_tables->only_long_window_kbd;
  183|  9.35k|    if (!window_shape_prev)
  ------------------
  |  Branch (183:9): [True: 7.50k, False: 1.85k]
  ------------------
  184|  7.50k|      window_long_prev =
  185|  7.50k|          aac_tables_ptr->pstr_imdct_tables->only_long_window_sine;
  186|  1.85k|    else
  187|  1.85k|      window_long_prev =
  188|  1.85k|          aac_tables_ptr->pstr_imdct_tables->only_long_window_kbd;
  189|       |
  190|  9.35k|    if (!window_shape)
  ------------------
  |  Branch (190:9): [True: 7.19k, False: 2.16k]
  ------------------
  191|  7.19k|      window_short = aac_tables_ptr->pstr_imdct_tables->only_short_window_sine;
  192|  2.16k|    else
  193|  2.16k|      window_short = aac_tables_ptr->pstr_imdct_tables->only_short_window_kbd;
  194|  9.35k|    if (!window_shape_prev)
  ------------------
  |  Branch (194:9): [True: 7.50k, False: 1.85k]
  ------------------
  195|  7.50k|      window_short_prev =
  196|  7.50k|          aac_tables_ptr->pstr_imdct_tables->only_short_window_sine;
  197|  1.85k|    else
  198|  1.85k|      window_short_prev =
  199|  1.85k|          aac_tables_ptr->pstr_imdct_tables->only_short_window_kbd;
  200|  9.35k|  }
  201|       |
  202|  46.7k|  switch (window_sequence) {
  ------------------
  |  Branch (202:11): [True: 46.7k, False: 0]
  ------------------
  203|  23.2k|    case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|  23.2k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (203:5): [True: 23.2k, False: 23.4k]
  ------------------
  204|       |
  205|  23.2k|      if ((512 != nlong) && (480 != nlong)) {
  ------------------
  |  Branch (205:11): [True: 12.3k, False: 10.8k]
  |  Branch (205:29): [True: 7.18k, False: 5.21k]
  ------------------
  206|  3.45M|        for (i = 0; i<nlong>> 1; i++) {
  ------------------
  |  Branch (206:21): [True: 3.44M, False: 7.18k]
  ------------------
  207|  3.44M|          in_data[i] =
  208|  3.44M|              ixheaac_mult32x16in32_shl(in_data[i], window_long_prev[2 * i]);
  209|       |
  210|  3.44M|          in_data[i + nlong] = ixheaac_mult32x16in32_shl(
  211|  3.44M|              in_data[i + nlong], window_long[2 * i + 1]);
  212|  3.44M|        }
  213|  3.45M|        for (i = 0; i<nlong>> 1; i++) {
  ------------------
  |  Branch (213:21): [True: 3.44M, False: 7.18k]
  ------------------
  214|  3.44M|          in_data[i + (nlong >> 1)] = ixheaac_mult32x16in32_shl(
  215|  3.44M|              in_data[i + (nlong >> 1)], window_long_prev[nlong - 1 - 2 * i]);
  216|       |
  217|  3.44M|          in_data[i + nlong + (nlong >> 1)] =
  218|  3.44M|              ixheaac_mult32x16in32_shl(in_data[i + nlong + (nlong >> 1)],
  219|  3.44M|                                         window_long[nlong - 1 - 2 * i - 1]);
  220|  3.44M|        }
  221|       |
  222|  16.1k|      } else {
  223|  16.1k|        WORD32 *win1, *win2;
  224|  16.1k|        WORD32 *ptr_in1, *ptr_in2;
  225|  16.1k|        win1 = (WORD32 *)window_long_prev;
  226|  16.1k|        win2 = (WORD32 *)window_long;
  227|  16.1k|        ptr_in1 = &in_data[0];
  228|  16.1k|        ptr_in2 = &in_data[nlong];
  229|       |
  230|  8.09M|        for (i = nlong - 1; i >= 0; i--) {
  ------------------
  |  Branch (230:29): [True: 8.07M, False: 16.1k]
  ------------------
  231|  8.07M|          WORD32 temp1 = ixheaac_mult32_shl(*ptr_in1, *win1++);
  232|  8.07M|          WORD32 temp2 = ixheaac_mult32_shl(*ptr_in2, win2[i]);
  233|       |
  234|  8.07M|          *ptr_in1++ = temp1;
  235|  8.07M|          *ptr_in2++ = temp2;
  236|  8.07M|        }
  237|  16.1k|      }
  238|       |
  239|  7.51M|      for (i = 0; i < nlong / 2; i++) {
  ------------------
  |  Branch (239:19): [True: 7.48M, False: 23.2k]
  ------------------
  240|  7.48M|        out_mdct[nlong / 2 + i] =
  241|  7.48M|            ixheaac_sub32(in_data[i], in_data[nlong - 1 - i]);
  242|  7.48M|        out_mdct[i] = (-ixheaac_add32(in_data[nlong + i + nlong / 2],
  243|  7.48M|                                       in_data[nlong2 - nlong / 2 - 1 - i]));
  244|  7.48M|      }
  245|       |
  246|  23.2k|      if (512 == nlong || (480 == nlong)) {
  ------------------
  |  Branch (246:11): [True: 10.8k, False: 12.3k]
  |  Branch (246:27): [True: 5.21k, False: 7.18k]
  ------------------
  247|  16.1k|        if (512 == nlong)
  ------------------
  |  Branch (247:13): [True: 10.8k, False: 5.21k]
  ------------------
  248|  10.8k|          ixheaacd_inverse_transform_512(
  249|  10.8k|              out_mdct, in_data, &imdct_scale,
  250|  10.8k|              aac_tables_ptr->pstr_imdct_tables->cosine_array_1024,
  251|  10.8k|              aac_tables_ptr->pstr_imdct_tables, object_type);
  252|       |
  253|  5.21k|        else
  254|  5.21k|          ixheaacd_mdct_480_ld(out_mdct, in_data, &imdct_scale, 1,
  255|  5.21k|                               aac_tables_ptr->pstr_imdct_tables, object_type);
  256|       |
  257|  16.1k|        imdct_scale += 1;
  258|       |
  259|  16.1k|        if (imdct_scale > 0) {
  ------------------
  |  Branch (259:13): [True: 9.87k, False: 6.22k]
  ------------------
  260|  9.87k|          WORD32 *ptr_out_mdct = &out_mdct[0];
  261|       |
  262|  1.24M|          for (i = nlong - 1; i >= 0; i -= 4) {
  ------------------
  |  Branch (262:31): [True: 1.23M, False: 9.87k]
  ------------------
  263|  1.23M|            *ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
  264|  1.23M|            ptr_out_mdct++;
  265|  1.23M|            *ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
  266|  1.23M|            ptr_out_mdct++;
  267|  1.23M|            *ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
  268|  1.23M|            ptr_out_mdct++;
  269|  1.23M|            *ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
  270|  1.23M|            ptr_out_mdct++;
  271|  1.23M|          }
  272|  9.87k|        } else if (imdct_scale < 0) {
  ------------------
  |  Branch (272:20): [True: 6.12k, False: 102]
  ------------------
  273|  6.12k|          WORD32 *ptr_out_mdct = &out_mdct[0];
  274|  6.12k|          imdct_scale = -imdct_scale;
  275|   775k|          for (i = nlong - 1; i >= 0; i -= 4) {
  ------------------
  |  Branch (275:31): [True: 769k, False: 6.12k]
  ------------------
  276|   769k|            *ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
  277|   769k|            ptr_out_mdct++;
  278|   769k|            *ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
  279|   769k|            ptr_out_mdct++;
  280|   769k|            *ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
  281|   769k|            ptr_out_mdct++;
  282|   769k|            *ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
  283|   769k|            ptr_out_mdct++;
  284|   769k|          }
  285|  6.12k|        }
  286|  16.1k|      }
  287|       |
  288|  7.18k|      else if (1024 == nlong) {
  ------------------
  |  Branch (288:16): [True: 20, False: 7.16k]
  ------------------
  289|     20|        expo = ixheaacd_calc_max_spectral_line_dec(out_mdct, 1024) - 1;
  290|       |
  291|     20|        expo = 8 - expo;
  292|       |
  293|     20|        imdct_scale = ixheaacd_inverse_transform(
  294|     20|            out_mdct, in_data, aac_tables_ptr->pstr_imdct_tables, expo, 1024);
  295|       |
  296|     20|        ixheaacd_post_twiddle_dec(in_data, out_mdct,
  297|     20|                                  aac_tables_ptr->pstr_imdct_tables, 1024);
  298|       |
  299|     20|        imdct_scale += 1;
  300|       |
  301|  20.5k|        for (i = 0; i < nlong; i++) {
  ------------------
  |  Branch (301:21): [True: 20.4k, False: 20]
  ------------------
  302|  20.4k|          out_mdct[i] = ixheaac_shl32_dir(in_data[i], imdct_scale);
  303|  20.4k|        }
  304|     20|      }
  305|       |
  306|  23.2k|      break;
  307|       |
  308|  13.7k|    case LONG_START_SEQUENCE:
  ------------------
  |  |  101|  13.7k|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (308:5): [True: 13.7k, False: 33.0k]
  ------------------
  309|       |
  310|  4.03M|      for (i = 0; i<nlong>> 1; i++)
  ------------------
  |  Branch (310:19): [True: 4.02M, False: 13.7k]
  ------------------
  311|  4.02M|        in_data[i] =
  312|  4.02M|            ixheaac_mult32x16in32_shl(in_data[i], window_long_prev[2 * i]);
  313|       |
  314|  4.03M|      for (i = 0; i<nlong>> 1; i++)
  ------------------
  |  Branch (314:19): [True: 4.02M, False: 13.7k]
  ------------------
  315|  4.02M|        in_data[i + (nlong >> 1)] = ixheaac_mult32x16in32_shl(
  316|  4.02M|            in_data[i + (nlong >> 1)], window_long_prev[nlong - 1 - 2 * i - 1]);
  317|       |
  318|   516k|      for (i = 0; i<nshort>> 1; i++)
  ------------------
  |  Branch (318:19): [True: 502k, False: 13.7k]
  ------------------
  319|   502k|        in_data[i + nlong + nflat_ls + (nshort >> 1)] =
  320|   502k|            ixheaac_mult32x16in32_shl(
  321|   502k|                in_data[i + nlong + nflat_ls + (nshort >> 1)],
  322|   502k|                window_short[nshort - 1 - 2 * i - 1]);
  323|       |
  324|  3.53M|      for (i = 0; i < nflat_ls; i++) in_data[i + nlong + nflat_ls + nshort] = 0;
  ------------------
  |  Branch (324:19): [True: 3.52M, False: 13.7k]
  ------------------
  325|       |
  326|  4.03M|      for (i = 0; i < nlong / 2; i++) {
  ------------------
  |  Branch (326:19): [True: 4.02M, False: 13.7k]
  ------------------
  327|  4.02M|        out_mdct[nlong / 2 + i] =
  328|  4.02M|            ixheaac_sub32(in_data[i], in_data[nlong - 1 - i]);
  329|  4.02M|        out_mdct[nlong / 2 - 1 - i] =
  330|  4.02M|            -ixheaac_add32(in_data[nlong + i], in_data[nlong2 - 1 - i]);
  331|  4.02M|      }
  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|  8.06M|      for (i = 0; i < nlong; i++) {
  ------------------
  |  Branch (346:19): [True: 8.04M, False: 13.7k]
  ------------------
  347|  8.04M|        out_mdct[i] = ixheaac_shl32_dir(in_data[i], imdct_scale);
  348|  8.04M|      }
  349|  13.7k|      break;
  350|       |
  351|  9.72k|    case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|  9.72k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (351:5): [True: 9.72k, False: 37.0k]
  ------------------
  352|  2.14M|      for (i = 0; i < nflat_ls; i++) in_data[i] = 0;
  ------------------
  |  Branch (352:19): [True: 2.13M, False: 9.72k]
  ------------------
  353|       |
  354|   314k|      for (i = 0; i<nshort>> 1; i++)
  ------------------
  |  Branch (354:19): [True: 304k, False: 9.72k]
  ------------------
  355|   304k|        in_data[i + nflat_ls] = ixheaac_mult32x16in32_shl(
  356|   304k|            in_data[i + nflat_ls], window_short_prev[2 * i]);
  357|       |
  358|   314k|      for (i = 0; i<nshort>> 1; i++)
  ------------------
  |  Branch (358:19): [True: 304k, False: 9.72k]
  ------------------
  359|   304k|        in_data[i + nflat_ls + (nshort >> 1)] =
  360|   304k|            ixheaac_mult32x16in32_shl(in_data[i + nflat_ls + (nshort >> 1)],
  361|   304k|                                       window_short_prev[127 - 2 * i]);
  362|       |
  363|  2.44M|      for (i = 0; i<nlong>> 1; i++)
  ------------------
  |  Branch (363:19): [True: 2.43M, False: 9.72k]
  ------------------
  364|  2.43M|        in_data[i + nlong] = ixheaac_mult32x16in32_shl(in_data[i + nlong],
  365|  2.43M|                                                        window_long[2 * i + 1]);
  366|       |
  367|  2.44M|      for (i = 0; i<nlong>> 1; i++)
  ------------------
  |  Branch (367:19): [True: 2.43M, False: 9.72k]
  ------------------
  368|  2.43M|        in_data[i + nlong + (nlong >> 1)] =
  369|  2.43M|            ixheaac_mult32x16in32_shl(in_data[i + nlong + (nlong >> 1)],
  370|  2.43M|                                       window_long[nlong - 1 - 2 * i - 1]);
  371|       |
  372|  2.44M|      for (i = 0; i < nlong / 2; i++) {
  ------------------
  |  Branch (372:19): [True: 2.43M, False: 9.72k]
  ------------------
  373|  2.43M|        out_mdct[nlong / 2 + i] =
  374|  2.43M|            ixheaac_sub32(in_data[i], in_data[nlong - 1 - i]);
  375|  2.43M|        out_mdct[nlong / 2 - 1 - i] =
  376|  2.43M|            -ixheaac_add32(in_data[nlong + i], in_data[nlong2 - 1 - i]);
  377|  2.43M|      }
  378|       |
  379|  9.72k|      {
  380|  9.72k|        expo = ixheaacd_calc_max_spectral_line_dec(out_mdct, 1024) - 1;
  381|       |
  382|  9.72k|        expo = 8 - expo;
  383|  9.72k|        imdct_scale = ixheaacd_inverse_transform(
  384|  9.72k|            out_mdct, in_data, aac_tables_ptr->pstr_imdct_tables, expo, 1024);
  385|       |
  386|  9.72k|        ixheaacd_post_twiddle_dec(in_data, out_mdct,
  387|  9.72k|                                  aac_tables_ptr->pstr_imdct_tables, 1024);
  388|  9.72k|      }
  389|       |
  390|  9.72k|      imdct_scale += 1;
  391|       |
  392|  4.88M|      for (i = 0; i < nlong; i++) {
  ------------------
  |  Branch (392:19): [True: 4.87M, False: 9.72k]
  ------------------
  393|  4.87M|        out_mdct[i] = ixheaac_shl32_dir(in_data[i], imdct_scale);
  394|  4.87M|      }
  395|       |
  396|  9.72k|      break;
  397|  46.7k|  }
  398|  46.7k|}
ixheaacd_lt_update_state:
  404|   105k|                              WORD slot_element) {
  405|   105k|  WORD32 i;
  406|       |
  407|   105k|  if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (407:7): [True: 74.0k, False: 31.8k]
  ------------------
  408|  74.0k|    WORD16 *ptr_ltp_state0 = &lt_pred_stat[0];
  409|  74.0k|    WORD16 *ptr_ltp_state_fl = &lt_pred_stat[frame_len + 0];
  410|  74.0k|    WORD16 *ptr_ltp_state_2fl = &lt_pred_stat[(frame_len * 2) + 0];
  411|  74.0k|    WORD16 *time = (WORD16 *)time_t - slot_element;
  412|  74.0k|    WORD16 *ptr_time_in = &time[0 * stride];
  413|       |
  414|  37.4M|    for (i = 0; i < frame_len; i++) {
  ------------------
  |  Branch (414:17): [True: 37.3M, False: 74.0k]
  ------------------
  415|  37.3M|      *ptr_ltp_state0++ = *ptr_ltp_state_fl;
  416|  37.3M|      *ptr_ltp_state_fl++ = *ptr_ltp_state_2fl;
  417|  37.3M|      *ptr_ltp_state_2fl++ = *ptr_time_in;
  418|  37.3M|      ptr_time_in += stride;
  419|  37.3M|    }
  420|       |
  421|  74.0k|  } else {
  422|  31.8k|    WORD16 *ptr_ltp_state0 = &lt_pred_stat[0];
  423|  31.8k|    WORD16 *ptr_ltp_state_fl = &lt_pred_stat[frame_len + 0];
  424|  31.8k|    WORD32 *time = (WORD32 *)time_t;
  425|  31.8k|    WORD32 *ptr_time_in = &time[0 * stride];
  426|       |
  427|  31.8k|    time = (WORD32 *)time_t;
  428|       |
  429|  31.0M|    for (i = 0; i < frame_len; i++) {
  ------------------
  |  Branch (429:17): [True: 31.0M, False: 31.8k]
  ------------------
  430|  31.0M|      *ptr_ltp_state0++ = *ptr_ltp_state_fl;
  431|  31.0M|      *ptr_ltp_state_fl++ =
  432|  31.0M|          ixheaac_round16(ixheaac_shl32_sat(*ptr_time_in, 2));
  433|  31.0M|      ptr_time_in += stride;
  434|  31.0M|    }
  435|  31.8k|  }
  436|       |
  437|   105k|  if ((window_sequence == ONLY_LONG_SEQUENCE) ||
  ------------------
  |  |  100|   105k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (437:7): [True: 59.8k, False: 46.0k]
  ------------------
  438|  72.5k|      (window_sequence == LONG_STOP_SEQUENCE)) {
  ------------------
  |  |  103|  46.0k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (438:7): [True: 12.7k, False: 33.3k]
  ------------------
  439|  72.5k|    if (512 == frame_len) {
  ------------------
  |  Branch (439:9): [True: 35.4k, False: 37.1k]
  ------------------
  440|  35.4k|      WORD32 *window = (WORD32 *)p_window_next;
  441|       |
  442|  9.11M|      for (i = 0; i < 256; i++) {
  ------------------
  |  Branch (442:19): [True: 9.07M, False: 35.4k]
  ------------------
  443|  9.07M|        lt_pred_stat[(frame_len * 3) + i] =
  444|  9.07M|            ixheaac_round16(ixheaac_mult16x16in32_shl(
  445|  9.07M|                (WORD16)ixheaac_shl16(
  446|  9.07M|                    (WORD16)-ixheaac_sat16(overlap[255 - i]), 1),
  447|  9.07M|                (WORD16)ixheaac_shr32(window[511 - i], 15)));
  448|       |
  449|  9.07M|        lt_pred_stat[(frame_len * 3) + 256 + i] =
  450|  9.07M|            ixheaac_round16(ixheaac_mult16x16in32_shl(
  451|  9.07M|                (WORD16)ixheaac_shl16((WORD16)-ixheaac_sat16(overlap[i]), 1),
  452|  9.07M|                (WORD16)ixheaac_shr32(window[255 - i], 15)));
  453|  9.07M|      }
  454|  37.1k|    } else if (480 == frame_len) {
  ------------------
  |  Branch (454:16): [True: 12.4k, False: 24.6k]
  ------------------
  455|  12.4k|      WORD32 *window = (WORD32 *)p_window_next;
  456|       |
  457|  3.01M|      for (i = 0; i < 240; i++) {
  ------------------
  |  Branch (457:19): [True: 2.99M, False: 12.4k]
  ------------------
  458|  2.99M|        lt_pred_stat[(frame_len * 3) + i] =
  459|  2.99M|            ixheaac_round16(ixheaac_mult16x16in32_shl(
  460|  2.99M|                (WORD16)ixheaac_shl16(
  461|  2.99M|                    (WORD16)-ixheaac_sat16(overlap[239 - i]), 1),
  462|  2.99M|                (WORD16)ixheaac_shr32(window[479 - i], 15)));
  463|       |
  464|  2.99M|        lt_pred_stat[(frame_len * 3) + 240 + i] =
  465|  2.99M|            ixheaac_round16(ixheaac_mult16x16in32_shl(
  466|  2.99M|                (WORD16)ixheaac_shl16((WORD16)-ixheaac_sat16(overlap[i]), 1),
  467|  2.99M|                (WORD16)ixheaac_shr32(window[239 - i], 15)));
  468|  2.99M|      }
  469|  24.6k|    } else {
  470|  12.6M|      for (i = 0; i < 512; i++) {
  ------------------
  |  Branch (470:19): [True: 12.5M, False: 24.6k]
  ------------------
  471|  12.5M|        lt_pred_stat[(frame_len * 2) + i] = ixheaac_round16(
  472|  12.5M|            ixheaac_shl32_sat(ixheaac_mult16x16in32_shl(
  473|  12.5M|                                   (WORD16)-ixheaac_sat16(overlap[511 - i]),
  474|  12.5M|                                   p_window_next[2 * i + 1]),
  475|  12.5M|                               1));
  476|       |
  477|  12.5M|        lt_pred_stat[(frame_len * 2) + 512 + i] =
  478|  12.5M|            ixheaac_round16(ixheaac_shl32_sat(
  479|  12.5M|                ixheaac_mult16x16in32_shl((WORD16)-ixheaac_sat16(overlap[i]),
  480|  12.5M|                                           p_window_next[1023 - 2 * i - 1]),
  481|  12.5M|                1));
  482|  12.5M|      }
  483|  24.6k|    }
  484|       |
  485|  72.5k|  } else if (window_sequence == LONG_START_SEQUENCE) {
  ------------------
  |  |  101|  33.3k|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (485:14): [True: 16.0k, False: 17.2k]
  ------------------
  486|  7.20M|    for (i = 0; i < 448; i++) {
  ------------------
  |  Branch (486:17): [True: 7.19M, False: 16.0k]
  ------------------
  487|  7.19M|      lt_pred_stat[(frame_len * 2) + i] =
  488|  7.19M|          ixheaac_shl16((WORD16)-ixheaac_sat16(overlap[511 - i]), 1);
  489|  7.19M|    }
  490|  1.04M|    for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (490:17): [True: 1.02M, False: 16.0k]
  ------------------
  491|  1.02M|      lt_pred_stat[(frame_len * 2) + 448 + i] =
  492|  1.02M|          ixheaac_round16(ixheaac_shl32_sat(
  493|  1.02M|              ixheaac_mult16x16in32_shl(
  494|  1.02M|                  (WORD16)-ixheaac_sat16(overlap[511 - 448 - i]),
  495|  1.02M|                  p_window_next[2 * i + 1]),
  496|  1.02M|              1));
  497|  1.02M|    }
  498|  1.04M|    for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (498:17): [True: 1.02M, False: 16.0k]
  ------------------
  499|  1.02M|      lt_pred_stat[(frame_len * 2) + 512 + i] =
  500|  1.02M|          ixheaac_round16(ixheaac_shl32_sat(
  501|  1.02M|              ixheaac_mult16x16in32_shl((WORD16)-ixheaac_sat16(overlap[i]),
  502|  1.02M|                                         p_window_next[127 - 2 * i - 1]),
  503|  1.02M|              1));
  504|  1.02M|    }
  505|  7.20M|    for (i = 576; i < 1024; i++) {
  ------------------
  |  Branch (505:19): [True: 7.19M, False: 16.0k]
  ------------------
  506|  7.19M|      lt_pred_stat[(frame_len * 2) + i] = 0;
  507|  7.19M|    }
  508|  17.2k|  } else {
  509|  7.75M|    for (i = 0; i < 448; i++) {
  ------------------
  |  Branch (509:17): [True: 7.73M, False: 17.2k]
  ------------------
  510|  7.73M|      lt_pred_stat[(frame_len * 2) + i] =
  511|  7.73M|          ixheaac_shl16(ixheaac_sat16(overlap[i]), 1);
  512|  7.73M|    }
  513|  1.12M|    for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (513:17): [True: 1.10M, False: 17.2k]
  ------------------
  514|  1.10M|      lt_pred_stat[(frame_len * 2) + 448 + i] = ixheaac_round16(
  515|  1.10M|          ixheaac_shl32_sat(ixheaac_mult16x16in32_shl(
  516|  1.10M|                                 (WORD16)-ixheaac_sat16(overlap[511 - i]),
  517|  1.10M|                                 p_window_next[2 * i + 1]),
  518|  1.10M|                             1));
  519|  1.10M|    }
  520|  1.12M|    for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (520:17): [True: 1.10M, False: 17.2k]
  ------------------
  521|  1.10M|      lt_pred_stat[(frame_len * 2) + 512 + i] = ixheaac_round16(
  522|  1.10M|          ixheaac_shl32_sat(ixheaac_mult16x16in32_shl(
  523|  1.10M|                                 (WORD16)-ixheaac_sat16(overlap[448 + i]),
  524|  1.10M|                                 p_window_next[127 - 2 * i - 1]),
  525|  1.10M|                             1));
  526|  1.10M|    }
  527|  7.75M|    for (i = 576; i < 1024; i++) {
  ------------------
  |  Branch (527:19): [True: 7.73M, False: 17.2k]
  ------------------
  528|  7.73M|      lt_pred_stat[(frame_len * 2) + i] = 0;
  529|  7.73M|    }
  530|  17.2k|  }
  531|   105k|}

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

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

ixheaacd_apply_m2:
   45|  13.7k|VOID ixheaacd_apply_m2(ia_heaac_mps_state_struct *pstr_mps_state) {
   46|  13.7k|  WORD32 ts, qs, row, col;
   47|  13.7k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
   48|  13.7k|  ia_mps_persistent_mem *persistent_mem = &curr_state->mps_persistent_mem;
   49|  13.7k|  ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
   50|  13.7k|  ia_mps_dec_m2_param_struct *p_m2_param = pstr_mps_state->aux_struct->m2_param;
   51|       |
   52|  13.7k|  WORD32 num_direct_signals = curr_state->num_direct_signals;
   53|  13.7k|  WORD32 temp_1, loop_counter, col_counter = num_direct_signals + curr_state->num_decor_signals;
   54|       |
   55|  13.7k|  WORD32 *rout_ptr, *rout_kernel_ptr;
   56|       |
   57|  13.7k|  WORD32 *hyb_output_real_dry, *hyb_output_imag_dry, *hyb_output_real_wet, *hyb_output_imag_wet;
   58|       |
   59|  13.7k|  WORD32 *p_hyb_out_dry_real, *p_hyb_out_dry_imag, *p_hyb_out_dry_re, *p_hyb_out_dry_im;
   60|       |
   61|  13.7k|  WORD32 *w_wet_real, *w_wet_imag, *w_dry_real, *w_dry_imag;
   62|       |
   63|  13.7k|  WORD32 *m2_decor_real_prev = persistent_mem->m2_decor_real_prev;
   64|  13.7k|  WORD32 *m2_decor_imag_prev = persistent_mem->m2_decor_imag_prev;
   65|       |
   66|  13.7k|  WORD32 *p_buffer_real, *p_buffer_imag, *p_buffer_re, *p_buffer_im;
   67|  13.7k|  WORD32 *p_buf_real, *p_buf_imag, *p_buf_re, *p_buf_im;
   68|       |
   69|  13.7k|  WORD32 *m2_resid_real_prev = persistent_mem->m2_resid_real_prev;
   70|  13.7k|  WORD32 *m2_resid_imag_prev = persistent_mem->m2_resid_imag_prev;
   71|       |
   72|  13.7k|  WORD32 idx = 0;
   73|  13.7k|  WORD32 w_wet_offset = num_direct_signals * TSXHB;
  ------------------
  |  |  106|  13.7k|#define TSXHB (5112)
  ------------------
   74|       |
   75|  13.7k|  WORD32 num_output_channels = curr_state->num_output_channels;
   76|  13.7k|  WORD32 time_slots = curr_state->time_slots;
   77|  13.7k|  WORD32 hybrid_bands = curr_state->hybrid_bands;
   78|  13.7k|  WORD32 m2_param_imag_present = curr_state->m2_param_imag_present;
   79|  13.7k|  WORD32 num_parameter_bands = curr_state->num_parameter_bands;
   80|  13.7k|  WORD32 up_mix_type = curr_state->up_mix_type;
   81|  13.7k|  WORD32 residual_coding = curr_state->residual_coding;
   82|  13.7k|  WORD32 *index_ptr = curr_state->index;
   83|       |
   84|  13.7k|  SIZE_T params[4];
  ------------------
  |  |   28|  13.7k|#define SIZE_T size_t
  ------------------
   85|       |
   86|  13.7k|  params[0] = (SIZE_T)(&curr_state->kernels[0]);
   87|  13.7k|  params[1] = time_slots;
   88|  13.7k|  params[2] = num_parameter_bands;
   89|  13.7k|  params[3] = hybrid_bands;
   90|       |
   91|  13.7k|  rout_ptr = pstr_mps_state->mps_scratch_mem_v;
   92|  13.7k|  rout_kernel_ptr =
   93|  13.7k|      rout_ptr + IXHEAAC_GET_SIZE_ALIGNED_TYPE(TSXHB, sizeof(*rout_kernel_ptr), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.7k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   94|       |
   95|  13.7k|  p_hyb_out_dry_real = p_array_struct->hyb_output_real_dry;
   96|  13.7k|  p_hyb_out_dry_imag = p_array_struct->hyb_output_imag_dry;
   97|       |
   98|   121k|  for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (98:17): [True: 107k, False: 13.7k]
  ------------------
   99|   107k|    hyb_output_real_dry = p_hyb_out_dry_real;
  100|   107k|    hyb_output_imag_dry = p_hyb_out_dry_imag;
  101|       |
  102|  3.03M|    for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (102:18): [True: 2.92M, False: 107k]
  ------------------
  103|  2.92M|      memset(hyb_output_real_dry, 0, (hybrid_bands) * sizeof(hyb_output_real_dry[0]));
  104|  2.92M|      memset(hyb_output_imag_dry, 0, (hybrid_bands) * sizeof(hyb_output_imag_dry[0]));
  105|       |
  106|  2.92M|      hyb_output_real_dry += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.92M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.92M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  107|  2.92M|      hyb_output_imag_dry += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.92M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.92M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  108|  2.92M|    }
  109|       |
  110|   107k|    p_hyb_out_dry_real += TSXHB;
  ------------------
  |  |  106|   107k|#define TSXHB (5112)
  ------------------
  111|   107k|    p_hyb_out_dry_imag += TSXHB;
  ------------------
  |  |  106|   107k|#define TSXHB (5112)
  ------------------
  112|   107k|  }
  113|       |
  114|  13.7k|  if (residual_coding)
  ------------------
  |  Branch (114:7): [True: 362, False: 13.4k]
  ------------------
  115|    362|    loop_counter = col_counter;
  116|  13.4k|  else
  117|  13.4k|    loop_counter = num_direct_signals;
  118|       |
  119|  13.7k|  idx = 0;
  120|       |
  121|  13.7k|  p_hyb_out_dry_real = p_array_struct->hyb_output_real_dry;
  122|  13.7k|  p_hyb_out_dry_imag = p_array_struct->hyb_output_imag_dry;
  123|       |
  124|   121k|  for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (124:17): [True: 107k, False: 13.7k]
  ------------------
  125|   107k|    p_buffer_real = p_array_struct->buf_real;
  126|   107k|    p_buffer_imag = p_array_struct->buf_imag;
  127|       |
  128|   680k|    for (col = 0; col < num_direct_signals; col++) {
  ------------------
  |  Branch (128:19): [True: 573k, False: 107k]
  ------------------
  129|   573k|      p_buffer_re = p_buffer_real;
  130|   573k|      p_buffer_im = p_buffer_imag;
  131|       |
  132|   573k|      if (curr_state->m2_param_present[row][col] & 2) {
  ------------------
  |  Branch (132:11): [True: 107k, False: 466k]
  ------------------
  133|   107k|        ixheaacd_dec_interp_umx(p_m2_param->m2_resid_real[idx++], rout_ptr, m2_resid_real_prev,
  134|   107k|                                pstr_mps_state);
  135|   107k|        ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
  136|       |
  137|   107k|        p_hyb_out_dry_re = p_hyb_out_dry_real;
  138|   107k|        p_hyb_out_dry_im = p_hyb_out_dry_imag;
  139|       |
  140|  3.03M|        for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (140:22): [True: 2.92M, False: 107k]
  ------------------
  141|  2.92M|          hyb_output_real_dry = p_hyb_out_dry_re;
  142|  2.92M|          hyb_output_imag_dry = p_hyb_out_dry_im;
  143|       |
  144|  2.92M|          w_dry_real = p_buffer_re;
  145|  2.92M|          w_dry_imag = p_buffer_im;
  146|       |
  147|   176M|          for (qs = 0; qs < hybrid_bands; qs++) {
  ------------------
  |  Branch (147:24): [True: 173M, False: 2.92M]
  ------------------
  148|   173M|            temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_real, *rout_kernel_ptr);
  149|   173M|            w_dry_real++;
  150|   173M|            *hyb_output_real_dry = ixheaac_add32_sat(*hyb_output_real_dry, temp_1);
  151|   173M|            hyb_output_real_dry++;
  152|       |
  153|   173M|            temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_imag, *rout_kernel_ptr);
  154|   173M|            w_dry_imag++;
  155|   173M|            rout_kernel_ptr++;
  156|   173M|            *hyb_output_imag_dry = ixheaac_add32_sat(*hyb_output_imag_dry, temp_1);
  157|   173M|            hyb_output_imag_dry++;
  158|   173M|          }
  159|  2.92M|          p_buffer_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.92M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.92M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  160|  2.92M|          p_buffer_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.92M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.92M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  161|       |
  162|  2.92M|          p_hyb_out_dry_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.92M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.92M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  163|  2.92M|          p_hyb_out_dry_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.92M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.92M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  164|  2.92M|        }
  165|   107k|        m2_resid_real_prev += num_parameter_bands;
  166|   107k|      }
  167|   573k|      p_buffer_real += TSXHB;
  ------------------
  |  |  106|   573k|#define TSXHB (5112)
  ------------------
  168|   573k|      p_buffer_imag += TSXHB;
  ------------------
  |  |  106|   573k|#define TSXHB (5112)
  ------------------
  169|   573k|    }
  170|       |
  171|   113k|    for (; col < loop_counter; col++) {
  ------------------
  |  Branch (171:12): [True: 6.58k, False: 107k]
  ------------------
  172|  6.58k|      WORD32 index;
  173|  6.58k|      WORD32 res = ixheaacd_get_res_idx(pstr_mps_state, col);
  174|  6.58k|      index = index_ptr[res];
  175|       |
  176|  6.58k|      if (curr_state->m2_param_present[row][col] & 2) {
  ------------------
  |  Branch (176:11): [True: 2.48k, False: 4.09k]
  ------------------
  177|  2.48k|        WORD32 *p_dry_real = p_array_struct->w_dry_real + res * TSXHB;
  ------------------
  |  |  106|  2.48k|#define TSXHB (5112)
  ------------------
  178|  2.48k|        WORD32 *p_dry_imag = p_array_struct->w_dry_imag + res * TSXHB;
  ------------------
  |  |  106|  2.48k|#define TSXHB (5112)
  ------------------
  179|       |
  180|  2.48k|        ixheaacd_dec_interp_umx(p_m2_param->m2_resid_real[idx++], rout_ptr, m2_resid_real_prev,
  181|  2.48k|                                pstr_mps_state);
  182|  2.48k|        ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
  183|       |
  184|  2.48k|        p_hyb_out_dry_re = p_hyb_out_dry_real;
  185|  2.48k|        p_hyb_out_dry_im = p_hyb_out_dry_imag;
  186|       |
  187|  64.3k|        for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (187:22): [True: 61.8k, False: 2.48k]
  ------------------
  188|  61.8k|          hyb_output_real_dry = p_hyb_out_dry_re;
  189|  61.8k|          hyb_output_imag_dry = p_hyb_out_dry_im;
  190|       |
  191|  61.8k|          w_dry_real = p_dry_real;
  192|  61.8k|          w_dry_imag = p_dry_imag;
  193|       |
  194|   715k|          for (qs = 0; qs < index; qs++) {
  ------------------
  |  Branch (194:24): [True: 653k, False: 61.8k]
  ------------------
  195|   653k|            temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_real, *rout_kernel_ptr);
  196|   653k|            w_dry_real++;
  197|   653k|            *hyb_output_real_dry = ixheaac_add32_sat(*hyb_output_real_dry, temp_1);
  198|   653k|            hyb_output_real_dry++;
  199|       |
  200|   653k|            temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_imag, *rout_kernel_ptr);
  201|   653k|            w_dry_imag++;
  202|   653k|            rout_kernel_ptr++;
  203|   653k|            *hyb_output_imag_dry = ixheaac_add32_sat(*hyb_output_imag_dry, temp_1);
  204|   653k|            hyb_output_imag_dry++;
  205|   653k|          }
  206|  61.8k|          rout_kernel_ptr += hybrid_bands - index;
  207|       |
  208|  61.8k|          p_hyb_out_dry_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  61.8k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  61.8k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  209|  61.8k|          p_hyb_out_dry_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  61.8k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  61.8k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  210|       |
  211|  61.8k|          p_dry_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  61.8k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  61.8k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  212|  61.8k|          p_dry_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  61.8k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  61.8k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  213|  61.8k|        }
  214|  2.48k|        m2_resid_real_prev += num_parameter_bands;
  215|  2.48k|      }
  216|  6.58k|    }
  217|       |
  218|   107k|    p_hyb_out_dry_real += TSXHB;
  ------------------
  |  |  106|   107k|#define TSXHB (5112)
  ------------------
  219|   107k|    p_hyb_out_dry_imag += TSXHB;
  ------------------
  |  |  106|   107k|#define TSXHB (5112)
  ------------------
  220|   107k|  }
  221|       |
  222|  13.7k|  if (up_mix_type == 2) {
  ------------------
  |  Branch (222:7): [True: 0, False: 13.7k]
  ------------------
  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.7k|  p_buffer_real = p_array_struct->buf_real;
  358|  13.7k|  p_buffer_imag = p_array_struct->buf_imag;
  359|       |
  360|   121k|  for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (360:17): [True: 107k, False: 13.7k]
  ------------------
  361|   107k|    hyb_output_real_wet = p_buffer_real;
  362|   107k|    hyb_output_imag_wet = p_buffer_imag;
  363|       |
  364|  3.03M|    for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (364:18): [True: 2.92M, False: 107k]
  ------------------
  365|  2.92M|      memset(hyb_output_real_wet, 0, (hybrid_bands) * sizeof(*hyb_output_real_wet));
  366|  2.92M|      memset(hyb_output_imag_wet, 0, (hybrid_bands) * sizeof(*hyb_output_imag_wet));
  367|       |
  368|  2.92M|      hyb_output_real_wet += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.92M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.92M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  369|  2.92M|      hyb_output_imag_wet += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.92M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.92M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  370|  2.92M|    }
  371|   107k|    p_buffer_real += TSXHB;
  ------------------
  |  |  106|   107k|#define TSXHB (5112)
  ------------------
  372|   107k|    p_buffer_imag += TSXHB;
  ------------------
  |  |  106|   107k|#define TSXHB (5112)
  ------------------
  373|   107k|  }
  374|  13.7k|  idx = 0;
  375|       |
  376|  13.7k|  p_buffer_real = p_array_struct->buf_real;
  377|  13.7k|  p_buffer_imag = p_array_struct->buf_imag;
  378|       |
  379|   121k|  for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (379:17): [True: 107k, False: 13.7k]
  ------------------
  380|   107k|    p_buf_real = p_array_struct->buffer_real + w_wet_offset;
  381|   107k|    p_buf_imag = p_array_struct->buffer_imag + w_wet_offset;
  382|   346k|    for (col = num_direct_signals; col < col_counter; col++) {
  ------------------
  |  Branch (382:36): [True: 238k, False: 107k]
  ------------------
  383|   238k|      if (curr_state->m2_param_present[row][col] & 1) {
  ------------------
  |  Branch (383:11): [True: 66.4k, False: 172k]
  ------------------
  384|  66.4k|        ixheaacd_dec_interp_umx(p_m2_param->m2_decor_real[idx++], rout_ptr, m2_decor_real_prev,
  385|  66.4k|                                pstr_mps_state);
  386|       |
  387|  66.4k|        ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
  388|  66.4k|        p_buffer_re = p_buffer_real;
  389|  66.4k|        p_buffer_im = p_buffer_imag;
  390|       |
  391|  66.4k|        p_buf_re = p_buf_real;
  392|  66.4k|        p_buf_im = p_buf_imag;
  393|  1.84M|        for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (393:22): [True: 1.78M, False: 66.4k]
  ------------------
  394|  1.78M|          hyb_output_real_wet = p_buffer_re;
  395|  1.78M|          hyb_output_imag_wet = p_buffer_im;
  396|       |
  397|  1.78M|          w_wet_real = p_buf_re;
  398|  1.78M|          w_wet_imag = p_buf_im;
  399|       |
  400|   102M|          for (qs = 0; qs < hybrid_bands; qs++) {
  ------------------
  |  Branch (400:24): [True: 100M, False: 1.78M]
  ------------------
  401|   100M|            temp_1 = ixheaacd_mps_mult32_shr_15(*w_wet_real, *rout_kernel_ptr);
  402|   100M|            w_wet_real++;
  403|   100M|            *hyb_output_real_wet = ixheaac_add32_sat(*hyb_output_real_wet, temp_1);
  404|   100M|            hyb_output_real_wet++;
  405|       |
  406|   100M|            temp_1 = ixheaacd_mps_mult32_shr_15(*w_wet_imag, *rout_kernel_ptr);
  407|   100M|            w_wet_imag++;
  408|   100M|            rout_kernel_ptr++;
  409|   100M|            *hyb_output_imag_wet = ixheaac_add32_sat(*hyb_output_imag_wet, temp_1);
  410|   100M|            hyb_output_imag_wet++;
  411|   100M|          }
  412|  1.78M|          p_buffer_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.78M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.78M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  413|  1.78M|          p_buffer_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.78M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.78M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  414|       |
  415|  1.78M|          p_buf_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.78M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.78M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  416|  1.78M|          p_buf_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.78M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.78M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  417|  1.78M|        }
  418|  66.4k|        m2_decor_real_prev += num_parameter_bands;
  419|  66.4k|      }
  420|   238k|      p_buf_real += TSXHB;
  ------------------
  |  |  106|   238k|#define TSXHB (5112)
  ------------------
  421|   238k|      p_buf_imag += TSXHB;
  ------------------
  |  |  106|   238k|#define TSXHB (5112)
  ------------------
  422|   238k|    }
  423|   107k|    p_buffer_real += TSXHB;
  ------------------
  |  |  106|   107k|#define TSXHB (5112)
  ------------------
  424|   107k|    p_buffer_imag += TSXHB;
  ------------------
  |  |  106|   107k|#define TSXHB (5112)
  ------------------
  425|   107k|  }
  426|       |
  427|  13.7k|  if (up_mix_type == 2) {
  ------------------
  |  Branch (427:7): [True: 0, False: 13.7k]
  ------------------
  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.7k|  return;
  498|  13.7k|}

ixheaacd_mps_dec.c:ixheaacd_mps_mult32_shr_15:
  222|  94.4M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|  94.4M|  WORD32 result;
  224|  94.4M|  WORD64 temp_result;
  225|  94.4M|  temp_result = (WORD64)a * (WORD64)b;
  226|  94.4M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|  94.4M|  return (result);
  229|  94.4M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_narrow:
   50|  46.7M|static PLATFORM_INLINE WORD32 ixheaacd_mps_narrow(WORD64 a, WORD16 *qfac) {
   51|  46.7M|  WORD32 x;
   52|  46.7M|  x = ixheaacd_mps_get_rshift_bits(a);
   53|  46.7M|  *qfac = 20 - x;
   54|  46.7M|  return (WORD32)((WORD64)a >> x);
   55|  46.7M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_get_rshift_bits:
   34|  46.7M|static PLATFORM_INLINE WORD32 ixheaacd_mps_get_rshift_bits(WORD64 a) {
   35|  46.7M|  WORD32 temp_1, temp_2;
   36|  46.7M|  temp_1 = (WORD32)(a >> 32);
   37|  46.7M|  temp_2 = ixheaac_norm32(temp_1);
   38|  46.7M|  if (temp_2 < 31) {
  ------------------
  |  Branch (38:7): [True: 35.0M, False: 11.6M]
  ------------------
   39|  35.0M|    return (32 - temp_2);
   40|  35.0M|  } else {
   41|  11.6M|    temp_2 = (WORD32)(a);
   42|  11.6M|    if ((temp_1 ^ temp_2) < 0) {
  ------------------
  |  Branch (42:9): [True: 92.5k, False: 11.5M]
  ------------------
   43|  92.5k|      return 1;
   44|  11.5M|    } else {
   45|  11.5M|      return 0;
   46|  11.5M|    }
   47|  11.6M|  }
   48|  46.7M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_add32:
  108|  46.7M|static PLATFORM_INLINE WORD32 ixheaacd_mps_add32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  109|  46.7M|  WORD64 temp_result;
  110|       |
  111|  46.7M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (111:7): [True: 10.1M, False: 36.5M]
  |  Branch (111:17): [True: 653k, False: 35.9M]
  ------------------
  112|  10.7M|    if (b == 0) {
  ------------------
  |  Branch (112:9): [True: 10.4M, False: 320k]
  ------------------
  113|  10.4M|      return a;
  114|  10.4M|    } else {
  115|   320k|      *q_a = q_b;
  116|   320k|      return b;
  117|   320k|    }
  118|  10.7M|  }
  119|  35.9M|  if (*q_a > q_b) {
  ------------------
  |  Branch (119:7): [True: 1.26M, False: 34.6M]
  ------------------
  120|  1.26M|    if (((*q_a) - q_b) > 31) {
  ------------------
  |  Branch (120:9): [True: 1.43k, False: 1.26M]
  ------------------
  121|  1.43k|      a = 0;
  122|  1.43k|      *q_a = q_b;
  123|  1.26M|    } else {
  124|  1.26M|      a = (a >> ((*q_a) - q_b));
  125|  1.26M|      *q_a = q_b;
  126|  1.26M|    }
  127|  34.6M|  } else {
  128|  34.6M|    if ((q_b - (*q_a)) > 31) {
  ------------------
  |  Branch (128:9): [True: 135k, False: 34.5M]
  ------------------
  129|   135k|      b = 0;
  130|  34.5M|    } else {
  131|  34.5M|      b = (b >> (q_b - (*q_a)));
  132|  34.5M|      q_b = *q_a;
  133|  34.5M|    }
  134|  34.6M|  }
  135|  35.9M|  temp_result = (WORD64)a + (WORD64)b;
  136|  35.9M|  if (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (136:7): [True: 1.10M, False: 34.8M]
  |  Branch (136:43): [True: 0, False: 34.8M]
  ------------------
  137|  1.10M|    temp_result = temp_result >> 1;
  138|  1.10M|    *q_a -= 1;
  139|  1.10M|  }
  140|       |
  141|  35.9M|  return (WORD32)temp_result;
  142|  46.7M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_mult32x16_shr_16:
  214|  1.94G|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32x16_shr_16(WORD32 a, WORD32 b) {
  215|  1.94G|  WORD32 result;
  216|  1.94G|  WORD64 temp_result;
  217|  1.94G|  temp_result = (WORD64)a * (WORD64)b;
  218|  1.94G|  result = (WORD32)(temp_result >> 16);
  219|  1.94G|  return (result);
  220|  1.94G|}
ixheaacd_mps_decorr.c:ixheaacd_mps_comp:
  366|  38.2M|static PLATFORM_INLINE WORD32 ixheaacd_mps_comp(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  367|  38.2M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (367:7): [True: 8.94M, False: 29.3M]
  |  Branch (367:17): [True: 945k, False: 28.3M]
  ------------------
  368|  9.88M|    if (a == 0) {
  ------------------
  |  Branch (368:9): [True: 8.94M, False: 945k]
  ------------------
  369|  8.94M|      if (b < 0)
  ------------------
  |  Branch (369:11): [True: 0, False: 8.94M]
  ------------------
  370|      0|        return 1;
  371|  8.94M|      else
  372|  8.94M|        return 0;
  373|  8.94M|    } else if (b == 0) {
  ------------------
  |  Branch (373:16): [True: 945k, False: 0]
  ------------------
  374|   945k|      if (a > 0)
  ------------------
  |  Branch (374:11): [True: 945k, False: 0]
  ------------------
  375|   945k|        return 1;
  376|      0|      else
  377|      0|        return 0;
  378|   945k|    }
  379|  9.88M|  }
  380|       |
  381|  28.3M|  if (*q_a > q_b) {
  ------------------
  |  Branch (381:7): [True: 18.3M, False: 10.0M]
  ------------------
  382|  18.3M|    a = (a >> ((*q_a) - q_b));
  383|  18.3M|  } else {
  384|  10.0M|    b = (b >> (q_b - (*q_a)));
  385|  10.0M|  }
  386|       |
  387|  28.3M|  if (a > b)
  ------------------
  |  Branch (387:7): [True: 11.7M, False: 16.5M]
  ------------------
  388|  11.7M|    return 1;
  389|  16.5M|  else
  390|  16.5M|    return 0;
  391|  28.3M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_div_32:
  242|  12.7M|static PLATFORM_INLINE WORD32 ixheaacd_mps_div_32(WORD32 a, WORD32 b, WORD16 *q_format) {
  243|  12.7M|  WORD32 quotient;
  244|  12.7M|  UWORD32 mantissa_nr, mantissa_dr;
  245|  12.7M|  LOOPINDEX i;
  246|  12.7M|  WORD q_nr, q_dr;
  247|       |
  248|  12.7M|  quotient = 0;
  249|       |
  250|  12.7M|  if (0 == b) {
  ------------------
  |  Branch (250:7): [True: 883k, False: 11.8M]
  ------------------
  251|   883k|    *q_format = 0;
  252|   883k|    return (a);
  253|   883k|  }
  254|       |
  255|  11.8M|  quotient = 0;
  256|       |
  257|  11.8M|  q_nr = ixheaac_norm32(a);
  258|  11.8M|  mantissa_nr = (UWORD32)a << (q_nr);
  259|  11.8M|  q_dr = ixheaac_norm32(b);
  260|  11.8M|  mantissa_dr = (UWORD32)b << (q_dr);
  261|  11.8M|  *q_format = (WORD)(30 + q_nr - q_dr);
  262|       |
  263|   379M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (263:15): [True: 367M, False: 11.8M]
  ------------------
  264|   367M|    quotient <<= 1;
  265|       |
  266|   367M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (266:9): [True: 183M, False: 183M]
  ------------------
  267|   183M|      mantissa_nr -= mantissa_dr;
  268|   183M|      quotient += 1;
  269|   183M|    }
  270|   367M|    mantissa_nr <<= 1;
  271|   367M|  }
  272|       |
  273|  11.8M|  if ((a ^ b) < 0) {
  ------------------
  |  Branch (273:7): [True: 0, False: 11.8M]
  ------------------
  274|      0|    return -(quotient);
  275|      0|  }
  276|       |
  277|  11.8M|  return quotient;
  278|  11.8M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_sqrt:
   57|  10.0M|static PLATFORM_INLINE WORD32 ixheaacd_mps_sqrt(WORD32 num, WORD16 *q, const WORD32 *sqrt_tab) {
   58|  10.0M|  WORD32 index, answer, temp;
   59|  10.0M|  WORD k;
   60|       |
   61|  10.0M|  if (num == 0) return 0;
  ------------------
  |  Branch (61:7): [True: 61.5k, False: 10.0M]
  ------------------
   62|       |
   63|  10.0M|  k = ixheaac_norm32(num);
   64|  10.0M|  temp = ixheaac_shr32(ixheaac_shl32(num, k), 21);
   65|  10.0M|  *q += k;
   66|  10.0M|  index = temp & 0x1FF;
   67|  10.0M|  answer = sqrt_tab[index];
   68|  10.0M|  if (*q & 1) {
  ------------------
  |  Branch (68:7): [True: 4.07M, False: 5.95M]
  ------------------
   69|  4.07M|    *q -= 1;
   70|  4.07M|    answer = ixheaac_mult32_shl(answer, INV_SQRT_2_Q31);
  ------------------
  |  |   24|  4.07M|#define INV_SQRT_2_Q31 (1518500250)
  ------------------
   71|  4.07M|  }
   72|  10.0M|  *q = *q >> 1;
   73|  10.0M|  *q += Q_SQRT_TAB;
  ------------------
  |  |   25|  10.0M|#define Q_SQRT_TAB (15)
  ------------------
   74|  10.0M|  return answer;
   75|  10.0M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_mult32_shr_n:
  185|  42.6M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_n(WORD32 a, WORD32 b, WORD16 n) {
  186|  42.6M|  WORD32 result;
  187|  42.6M|  WORD64 temp_result;
  188|       |
  189|  42.6M|  temp_result = (WORD64)a * (WORD64)b;
  190|  42.6M|  result = (WORD32)(temp_result >> n);
  191|       |
  192|  42.6M|  return (result);
  193|  42.6M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_mult32_shr_14:
  231|  95.2M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_14(WORD32 a, WORD32 b) {
  232|  95.2M|  WORD32 result;
  233|  95.2M|  WORD64 temp_result;
  234|       |
  235|  95.2M|  temp_result = (WORD64)a * (WORD64)b;
  236|  95.2M|  result = (WORD32)(temp_result >> 16);
  237|  95.2M|  result = result << 2;
  238|       |
  239|  95.2M|  return (result);
  240|  95.2M|}
ixheaacd_mps_hybrid_filt.c:ixheaacd_mps_mult32x16_shr_16:
  214|  39.7M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32x16_shr_16(WORD32 a, WORD32 b) {
  215|  39.7M|  WORD32 result;
  216|  39.7M|  WORD64 temp_result;
  217|  39.7M|  temp_result = (WORD64)a * (WORD64)b;
  218|  39.7M|  result = (WORD32)(temp_result >> 16);
  219|  39.7M|  return (result);
  220|  39.7M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_mps_mult32_shr_30:
  195|  2.28M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  2.28M|  WORD32 result;
  197|  2.28M|  WORD64 temp_result;
  198|       |
  199|  2.28M|  temp_result = (WORD64)a * (WORD64)b;
  200|  2.28M|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  2.28M|  return (result);
  203|  2.28M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_mps_mult32_shr_15:
  222|  93.4M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|  93.4M|  WORD32 result;
  224|  93.4M|  WORD64 temp_result;
  225|  93.4M|  temp_result = (WORD64)a * (WORD64)b;
  226|  93.4M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|  93.4M|  return (result);
  229|  93.4M|}
ixheaacd_mps_polyphase.c:ixheaacd_mps_mult32_shr_30:
  195|  1.52G|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  1.52G|  WORD32 result;
  197|  1.52G|  WORD64 temp_result;
  198|       |
  199|  1.52G|  temp_result = (WORD64)a * (WORD64)b;
  200|  1.52G|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  1.52G|  return (result);
  203|  1.52G|}
ixheaacd_mps_polyphase.c:ixheaacd_mps_mult32_shr_15:
  222|   106M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   106M|  WORD32 result;
  224|   106M|  WORD64 temp_result;
  225|   106M|  temp_result = (WORD64)a * (WORD64)b;
  226|   106M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   106M|  return (result);
  229|   106M|}
ixheaacd_mps_process.c:ixheaacd_mps_mult32_shr_30:
  195|  1.09M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  1.09M|  WORD32 result;
  197|  1.09M|  WORD64 temp_result;
  198|       |
  199|  1.09M|  temp_result = (WORD64)a * (WORD64)b;
  200|  1.09M|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  1.09M|  return (result);
  203|  1.09M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_reshape_add32:
   78|  35.0M|                                                         WORD16 qop2) {
   79|  35.0M|  WORD64 tempresult;
   80|  35.0M|  if (0 == op2) {
  ------------------
  |  Branch (80:7): [True: 8.93M, False: 26.1M]
  ------------------
   81|  8.93M|    return op1;
   82|  8.93M|  }
   83|  26.1M|  if (0 == op1) {
  ------------------
  |  Branch (83:7): [True: 1.87M, False: 24.2M]
  ------------------
   84|  1.87M|    *qop1 = qop2;
   85|  1.87M|    return op2;
   86|  1.87M|  }
   87|  24.2M|  if (*qop1 < qop2) {
  ------------------
  |  Branch (87:7): [True: 17.2M, False: 6.94M]
  ------------------
   88|  17.2M|    if ((qop2 - *qop1) > 31)
  ------------------
  |  Branch (88:9): [True: 54.6k, False: 17.2M]
  ------------------
   89|  54.6k|      op2 = 0;
   90|  17.2M|    else
   91|  17.2M|      op2 = op2 >> (qop2 - *qop1);
   92|  17.2M|    tempresult = (WORD64)op1 + (WORD64)op2;
   93|  17.2M|  } else {
   94|  6.94M|    if ((*qop1 - qop2) > 31)
  ------------------
  |  Branch (94:9): [True: 13.5k, False: 6.92M]
  ------------------
   95|  13.5k|      op1 = 0;
   96|  6.92M|    else
   97|  6.92M|      op1 = op1 >> (*qop1 - qop2);
   98|  6.94M|    *qop1 = qop2;
   99|  6.94M|    tempresult = (WORD64)op1 + (WORD64)op2;
  100|  6.94M|  }
  101|  24.2M|  if (tempresult > (WORD32)0x7fffffff || tempresult < (WORD32)0x80000000) {
  ------------------
  |  Branch (101:7): [True: 4.97M, False: 19.2M]
  |  Branch (101:42): [True: 435, False: 19.2M]
  ------------------
  102|  4.97M|    tempresult = tempresult >> 1;
  103|  4.97M|    *qop1 -= 1;
  104|  4.97M|  }
  105|  24.2M|  return (WORD32)tempresult;
  106|  26.1M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_mult32x32:
  167|  1.20M|                                                     WORD16 q_b) {
  168|  1.20M|  WORD64 temp_result;
  169|  1.20M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (169:7): [True: 306k, False: 901k]
  |  Branch (169:17): [True: 1.89k, False: 899k]
  ------------------
  170|   308k|    temp_result = 0;
  171|   308k|    *q_a = 15;
  172|   308k|    return (WORD32)temp_result;
  173|   308k|  }
  174|   899k|  *q_a = *q_a + q_b;
  175|       |
  176|   899k|  temp_result = (WORD64)a * (WORD64)b;
  177|  22.9M|  while (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (177:10): [True: 21.4M, False: 1.41M]
  |  Branch (177:46): [True: 517k, False: 899k]
  ------------------
  178|  22.0M|    temp_result = temp_result >> 1;
  179|  22.0M|    *q_a -= 1;
  180|  22.0M|  }
  181|       |
  182|   899k|  return (WORD32)temp_result;
  183|  1.20M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_narrow:
   50|  10.9M|static PLATFORM_INLINE WORD32 ixheaacd_mps_narrow(WORD64 a, WORD16 *qfac) {
   51|  10.9M|  WORD32 x;
   52|  10.9M|  x = ixheaacd_mps_get_rshift_bits(a);
   53|  10.9M|  *qfac = 20 - x;
   54|  10.9M|  return (WORD32)((WORD64)a >> x);
   55|  10.9M|}
ixheaacd_mps_reshape_bb_env.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: 7.75M, False: 3.20M]
  ------------------
   39|  7.75M|    return (32 - temp_2);
   40|  7.75M|  } else {
   41|  3.20M|    temp_2 = (WORD32)(a);
   42|  3.20M|    if ((temp_1 ^ temp_2) < 0) {
  ------------------
  |  Branch (42:9): [True: 23.5k, False: 3.17M]
  ------------------
   43|  23.5k|      return 1;
   44|  3.17M|    } else {
   45|  3.17M|      return 0;
   46|  3.17M|    }
   47|  3.20M|  }
   48|  10.9M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_div_32:
  242|  11.3M|static PLATFORM_INLINE WORD32 ixheaacd_mps_div_32(WORD32 a, WORD32 b, WORD16 *q_format) {
  243|  11.3M|  WORD32 quotient;
  244|  11.3M|  UWORD32 mantissa_nr, mantissa_dr;
  245|  11.3M|  LOOPINDEX i;
  246|  11.3M|  WORD q_nr, q_dr;
  247|       |
  248|  11.3M|  quotient = 0;
  249|       |
  250|  11.3M|  if (0 == b) {
  ------------------
  |  Branch (250:7): [True: 2.48M, False: 8.85M]
  ------------------
  251|  2.48M|    *q_format = 0;
  252|  2.48M|    return (a);
  253|  2.48M|  }
  254|       |
  255|  8.85M|  quotient = 0;
  256|       |
  257|  8.85M|  q_nr = ixheaac_norm32(a);
  258|  8.85M|  mantissa_nr = (UWORD32)a << (q_nr);
  259|  8.85M|  q_dr = ixheaac_norm32(b);
  260|  8.85M|  mantissa_dr = (UWORD32)b << (q_dr);
  261|  8.85M|  *q_format = (WORD)(30 + q_nr - q_dr);
  262|       |
  263|   283M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (263:15): [True: 274M, False: 8.85M]
  ------------------
  264|   274M|    quotient <<= 1;
  265|       |
  266|   274M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (266:9): [True: 129M, False: 144M]
  ------------------
  267|   129M|      mantissa_nr -= mantissa_dr;
  268|   129M|      quotient += 1;
  269|   129M|    }
  270|   274M|    mantissa_nr <<= 1;
  271|   274M|  }
  272|       |
  273|  8.85M|  if ((a ^ b) < 0) {
  ------------------
  |  Branch (273:7): [True: 299k, False: 8.55M]
  ------------------
  274|   299k|    return -(quotient);
  275|   299k|  }
  276|       |
  277|  8.55M|  return quotient;
  278|  8.85M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_add32:
  108|  54.4k|static PLATFORM_INLINE WORD32 ixheaacd_mps_add32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  109|  54.4k|  WORD64 temp_result;
  110|       |
  111|  54.4k|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (111:7): [True: 33.9k, False: 20.5k]
  |  Branch (111:17): [True: 20, False: 20.5k]
  ------------------
  112|  33.9k|    if (b == 0) {
  ------------------
  |  Branch (112:9): [True: 30, False: 33.9k]
  ------------------
  113|     30|      return a;
  114|  33.9k|    } else {
  115|  33.9k|      *q_a = q_b;
  116|  33.9k|      return b;
  117|  33.9k|    }
  118|  33.9k|  }
  119|  20.5k|  if (*q_a > q_b) {
  ------------------
  |  Branch (119:7): [True: 6.17k, False: 14.3k]
  ------------------
  120|  6.17k|    if (((*q_a) - q_b) > 31) {
  ------------------
  |  Branch (120:9): [True: 237, False: 5.94k]
  ------------------
  121|    237|      a = 0;
  122|    237|      *q_a = q_b;
  123|  5.94k|    } else {
  124|  5.94k|      a = (a >> ((*q_a) - q_b));
  125|  5.94k|      *q_a = q_b;
  126|  5.94k|    }
  127|  14.3k|  } else {
  128|  14.3k|    if ((q_b - (*q_a)) > 31) {
  ------------------
  |  Branch (128:9): [True: 0, False: 14.3k]
  ------------------
  129|      0|      b = 0;
  130|  14.3k|    } else {
  131|  14.3k|      b = (b >> (q_b - (*q_a)));
  132|  14.3k|      q_b = *q_a;
  133|  14.3k|    }
  134|  14.3k|  }
  135|  20.5k|  temp_result = (WORD64)a + (WORD64)b;
  136|  20.5k|  if (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (136:7): [True: 29, False: 20.5k]
  |  Branch (136:43): [True: 0, False: 20.5k]
  ------------------
  137|     29|    temp_result = temp_result >> 1;
  138|     29|    *q_a -= 1;
  139|     29|  }
  140|       |
  141|  20.5k|  return (WORD32)temp_result;
  142|  54.4k|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_sqrt:
   57|   449k|static PLATFORM_INLINE WORD32 ixheaacd_mps_sqrt(WORD32 num, WORD16 *q, const WORD32 *sqrt_tab) {
   58|   449k|  WORD32 index, answer, temp;
   59|   449k|  WORD k;
   60|       |
   61|   449k|  if (num == 0) return 0;
  ------------------
  |  Branch (61:7): [True: 70.1k, False: 379k]
  ------------------
   62|       |
   63|   379k|  k = ixheaac_norm32(num);
   64|   379k|  temp = ixheaac_shr32(ixheaac_shl32(num, k), 21);
   65|   379k|  *q += k;
   66|   379k|  index = temp & 0x1FF;
   67|   379k|  answer = sqrt_tab[index];
   68|   379k|  if (*q & 1) {
  ------------------
  |  Branch (68:7): [True: 197k, False: 181k]
  ------------------
   69|   197k|    *q -= 1;
   70|   197k|    answer = ixheaac_mult32_shl(answer, INV_SQRT_2_Q31);
  ------------------
  |  |   24|   197k|#define INV_SQRT_2_Q31 (1518500250)
  ------------------
   71|   197k|  }
   72|   379k|  *q = *q >> 1;
   73|   379k|  *q += Q_SQRT_TAB;
  ------------------
  |  |   25|   379k|#define Q_SQRT_TAB (15)
  ------------------
   74|   379k|  return answer;
   75|   449k|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_convert_to_qn:
  280|   476k|static WORD32 ixheaacd_mps_convert_to_qn(WORD32 temp, WORD16 qtemp, WORD16 n) {
  281|   476k|  WORD64 result;
  282|   476k|  if (qtemp == n)
  ------------------
  |  Branch (282:7): [True: 27, False: 476k]
  ------------------
  283|     27|    return temp;
  284|   476k|  else if (qtemp > n)
  ------------------
  |  Branch (284:12): [True: 452k, False: 23.9k]
  ------------------
  285|   452k|    temp = (WORD32)((WORD64)temp >> (qtemp - n));
  286|  23.9k|  else {
  287|  23.9k|    result = (WORD32)((WORD64)temp << (n - qtemp));
  288|  23.9k|    if (result > (WORD32)0x7fffffff || result < (WORD32)0x80000000) {
  ------------------
  |  Branch (288:9): [True: 0, False: 23.9k]
  |  Branch (288:40): [True: 0, False: 23.9k]
  ------------------
  289|      0|      return 0;
  290|      0|    } else
  291|  23.9k|      temp = (WORD32)result;
  292|  23.9k|  }
  293|   476k|  return temp;
  294|   476k|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_mult32_shr_16:
  205|  27.2k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_16(WORD32 a, WORD32 b) {
  206|  27.2k|  WORD32 result;
  207|  27.2k|  WORD64 temp_result;
  208|       |
  209|  27.2k|  temp_result = (WORD64)a * (WORD64)b;
  210|  27.2k|  result = (WORD32)(temp_result >> 16);
  211|  27.2k|  return (result);
  212|  27.2k|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_mult32_shr_15:
  222|  2.72M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|  2.72M|  WORD32 result;
  224|  2.72M|  WORD64 temp_result;
  225|  2.72M|  temp_result = (WORD64)a * (WORD64)b;
  226|  2.72M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|  2.72M|  return (result);
  229|  2.72M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_mult32:
  144|  58.9M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  145|  58.9M|  WORD64 temp_result;
  146|  58.9M|  WORD32 temp;
  147|       |
  148|  58.9M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (148:7): [True: 47.4M, False: 11.4M]
  |  Branch (148:17): [True: 24.9k, False: 11.4M]
  ------------------
  149|  47.5M|    temp_result = 0;
  150|  47.5M|    *q_a = 15;
  151|  47.5M|    return (WORD32)temp_result;
  152|  47.5M|  }
  153|       |
  154|  11.4M|  *q_a = *q_a + q_b;
  155|       |
  156|  11.4M|  temp_result = (WORD64)a * (WORD64)b;
  157|  11.4M|  temp = ixheaacd_mps_get_rshift_bits(temp_result);
  158|  11.4M|  if (0 != temp) {
  ------------------
  |  Branch (158:7): [True: 3.20M, False: 8.25M]
  ------------------
  159|  3.20M|    *q_a -= temp;
  160|  3.20M|    temp_result = temp_result >> temp;
  161|  3.20M|  }
  162|       |
  163|  11.4M|  return (WORD32)temp_result;
  164|  58.9M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_get_rshift_bits:
   34|  11.4M|static PLATFORM_INLINE WORD32 ixheaacd_mps_get_rshift_bits(WORD64 a) {
   35|  11.4M|  WORD32 temp_1, temp_2;
   36|  11.4M|  temp_1 = (WORD32)(a >> 32);
   37|  11.4M|  temp_2 = ixheaac_norm32(temp_1);
   38|  11.4M|  if (temp_2 < 31) {
  ------------------
  |  Branch (38:7): [True: 2.77M, False: 8.68M]
  ------------------
   39|  2.77M|    return (32 - temp_2);
   40|  8.68M|  } else {
   41|  8.68M|    temp_2 = (WORD32)(a);
   42|  8.68M|    if ((temp_1 ^ temp_2) < 0) {
  ------------------
  |  Branch (42:9): [True: 424k, False: 8.25M]
  ------------------
   43|   424k|      return 1;
   44|  8.25M|    } else {
   45|  8.25M|      return 0;
   46|  8.25M|    }
   47|  8.68M|  }
   48|  11.4M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_add32:
  108|  47.2M|static PLATFORM_INLINE WORD32 ixheaacd_mps_add32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  109|  47.2M|  WORD64 temp_result;
  110|       |
  111|  47.2M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (111:7): [True: 34.9M, False: 12.2M]
  |  Branch (111:17): [True: 267k, False: 12.0M]
  ------------------
  112|  35.2M|    if (b == 0) {
  ------------------
  |  Branch (112:9): [True: 34.2M, False: 965k]
  ------------------
  113|  34.2M|      return a;
  114|  34.2M|    } else {
  115|   965k|      *q_a = q_b;
  116|   965k|      return b;
  117|   965k|    }
  118|  35.2M|  }
  119|  12.0M|  if (*q_a > q_b) {
  ------------------
  |  Branch (119:7): [True: 770k, False: 11.2M]
  ------------------
  120|   770k|    if (((*q_a) - q_b) > 31) {
  ------------------
  |  Branch (120:9): [True: 2.49k, False: 767k]
  ------------------
  121|  2.49k|      a = 0;
  122|  2.49k|      *q_a = q_b;
  123|   767k|    } else {
  124|   767k|      a = (a >> ((*q_a) - q_b));
  125|   767k|      *q_a = q_b;
  126|   767k|    }
  127|  11.2M|  } else {
  128|  11.2M|    if ((q_b - (*q_a)) > 31) {
  ------------------
  |  Branch (128:9): [True: 2.11k, False: 11.2M]
  ------------------
  129|  2.11k|      b = 0;
  130|  11.2M|    } else {
  131|  11.2M|      b = (b >> (q_b - (*q_a)));
  132|  11.2M|      q_b = *q_a;
  133|  11.2M|    }
  134|  11.2M|  }
  135|  12.0M|  temp_result = (WORD64)a + (WORD64)b;
  136|  12.0M|  if (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (136:7): [True: 1.13M, False: 10.8M]
  |  Branch (136:43): [True: 0, False: 10.8M]
  ------------------
  137|  1.13M|    temp_result = temp_result >> 1;
  138|  1.13M|    *q_a -= 1;
  139|  1.13M|  }
  140|       |
  141|  12.0M|  return (WORD32)temp_result;
  142|  47.2M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_mult32_shr_15:
  222|  8.10M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|  8.10M|  WORD32 result;
  224|  8.10M|  WORD64 temp_result;
  225|  8.10M|  temp_result = (WORD64)a * (WORD64)b;
  226|  8.10M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|  8.10M|  return (result);
  229|  8.10M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_div_32:
  242|  1.08M|static PLATFORM_INLINE WORD32 ixheaacd_mps_div_32(WORD32 a, WORD32 b, WORD16 *q_format) {
  243|  1.08M|  WORD32 quotient;
  244|  1.08M|  UWORD32 mantissa_nr, mantissa_dr;
  245|  1.08M|  LOOPINDEX i;
  246|  1.08M|  WORD q_nr, q_dr;
  247|       |
  248|  1.08M|  quotient = 0;
  249|       |
  250|  1.08M|  if (0 == b) {
  ------------------
  |  Branch (250:7): [True: 0, False: 1.08M]
  ------------------
  251|      0|    *q_format = 0;
  252|      0|    return (a);
  253|      0|  }
  254|       |
  255|  1.08M|  quotient = 0;
  256|       |
  257|  1.08M|  q_nr = ixheaac_norm32(a);
  258|  1.08M|  mantissa_nr = (UWORD32)a << (q_nr);
  259|  1.08M|  q_dr = ixheaac_norm32(b);
  260|  1.08M|  mantissa_dr = (UWORD32)b << (q_dr);
  261|  1.08M|  *q_format = (WORD)(30 + q_nr - q_dr);
  262|       |
  263|  34.5M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (263:15): [True: 33.4M, False: 1.08M]
  ------------------
  264|  33.4M|    quotient <<= 1;
  265|       |
  266|  33.4M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (266:9): [True: 5.28M, False: 28.2M]
  ------------------
  267|  5.28M|      mantissa_nr -= mantissa_dr;
  268|  5.28M|      quotient += 1;
  269|  5.28M|    }
  270|  33.4M|    mantissa_nr <<= 1;
  271|  33.4M|  }
  272|       |
  273|  1.08M|  if ((a ^ b) < 0) {
  ------------------
  |  Branch (273:7): [True: 0, False: 1.08M]
  ------------------
  274|      0|    return -(quotient);
  275|      0|  }
  276|       |
  277|  1.08M|  return quotient;
  278|  1.08M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_sqrt:
   57|   726k|static PLATFORM_INLINE WORD32 ixheaacd_mps_sqrt(WORD32 num, WORD16 *q, const WORD32 *sqrt_tab) {
   58|   726k|  WORD32 index, answer, temp;
   59|   726k|  WORD k;
   60|       |
   61|   726k|  if (num == 0) return 0;
  ------------------
  |  Branch (61:7): [True: 144k, False: 581k]
  ------------------
   62|       |
   63|   581k|  k = ixheaac_norm32(num);
   64|   581k|  temp = ixheaac_shr32(ixheaac_shl32(num, k), 21);
   65|   581k|  *q += k;
   66|   581k|  index = temp & 0x1FF;
   67|   581k|  answer = sqrt_tab[index];
   68|   581k|  if (*q & 1) {
  ------------------
  |  Branch (68:7): [True: 286k, False: 294k]
  ------------------
   69|   286k|    *q -= 1;
   70|   286k|    answer = ixheaac_mult32_shl(answer, INV_SQRT_2_Q31);
  ------------------
  |  |   24|   286k|#define INV_SQRT_2_Q31 (1518500250)
  ------------------
   71|   286k|  }
   72|   581k|  *q = *q >> 1;
   73|   581k|  *q += Q_SQRT_TAB;
  ------------------
  |  |   25|   581k|#define Q_SQRT_TAB (15)
  ------------------
   74|   581k|  return answer;
   75|   726k|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_convert_to_qn:
  280|   734k|static WORD32 ixheaacd_mps_convert_to_qn(WORD32 temp, WORD16 qtemp, WORD16 n) {
  281|   734k|  WORD64 result;
  282|   734k|  if (qtemp == n)
  ------------------
  |  Branch (282:7): [True: 655k, False: 78.7k]
  ------------------
  283|   655k|    return temp;
  284|  78.7k|  else if (qtemp > n)
  ------------------
  |  Branch (284:12): [True: 0, False: 78.7k]
  ------------------
  285|      0|    temp = (WORD32)((WORD64)temp >> (qtemp - n));
  286|  78.7k|  else {
  287|  78.7k|    result = (WORD32)((WORD64)temp << (n - qtemp));
  288|  78.7k|    if (result > (WORD32)0x7fffffff || result < (WORD32)0x80000000) {
  ------------------
  |  Branch (288:9): [True: 0, False: 78.7k]
  |  Branch (288:40): [True: 0, False: 78.7k]
  ------------------
  289|      0|      return 0;
  290|      0|    } else
  291|  78.7k|      temp = (WORD32)result;
  292|  78.7k|  }
  293|  78.7k|  return temp;
  294|   734k|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_mult32_shr_30:
  195|   156k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|   156k|  WORD32 result;
  197|   156k|  WORD64 temp_result;
  198|       |
  199|   156k|  temp_result = (WORD64)a * (WORD64)b;
  200|   156k|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|   156k|  return (result);
  203|   156k|}
ixheaacd_mps_apply_m1.c:ixheaacd_mps_mult32_shr_15:
  222|   648M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   648M|  WORD32 result;
  224|   648M|  WORD64 temp_result;
  225|   648M|  temp_result = (WORD64)a * (WORD64)b;
  226|   648M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   648M|  return (result);
  229|   648M|}
ixheaacd_mps_apply_m2.c:ixheaacd_mps_mult32_shr_15:
  222|   548M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   548M|  WORD32 result;
  224|   548M|  WORD64 temp_result;
  225|   548M|  temp_result = (WORD64)a * (WORD64)b;
  226|   548M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   548M|  return (result);
  229|   548M|}
ixheaacd_mps_calc_m1m2_tree_515x.c:ixheaacd_mps_mult32_shr_15:
  222|   687k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   687k|  WORD32 result;
  224|   687k|  WORD64 temp_result;
  225|   687k|  temp_result = (WORD64)a * (WORD64)b;
  226|   687k|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   687k|  return (result);
  229|   687k|}
ixheaacd_mps_calc_m1m2_tree_52xx.c:ixheaacd_mps_mult32_shr_15:
  222|   127k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   127k|  WORD32 result;
  224|   127k|  WORD64 temp_result;
  225|   127k|  temp_result = (WORD64)a * (WORD64)b;
  226|   127k|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   127k|  return (result);
  229|   127k|}
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|   842k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   842k|  WORD32 result;
  224|   842k|  WORD64 temp_result;
  225|   842k|  temp_result = (WORD64)a * (WORD64)b;
  226|   842k|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   842k|  return (result);
  229|   842k|}
ixheaacd_mps_calc_m1m2_tree_727x.c:ixheaacd_mps_mult32_shr_30:
  195|  10.8k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  10.8k|  WORD32 result;
  197|  10.8k|  WORD64 temp_result;
  198|       |
  199|  10.8k|  temp_result = (WORD64)a * (WORD64)b;
  200|  10.8k|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  10.8k|  return (result);
  203|  10.8k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_mult32:
  144|  2.49k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  145|  2.49k|  WORD64 temp_result;
  146|  2.49k|  WORD32 temp;
  147|       |
  148|  2.49k|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (148:7): [True: 0, False: 2.49k]
  |  Branch (148:17): [True: 1.66k, False: 832]
  ------------------
  149|  1.66k|    temp_result = 0;
  150|  1.66k|    *q_a = 15;
  151|  1.66k|    return (WORD32)temp_result;
  152|  1.66k|  }
  153|       |
  154|    832|  *q_a = *q_a + q_b;
  155|       |
  156|    832|  temp_result = (WORD64)a * (WORD64)b;
  157|    832|  temp = ixheaacd_mps_get_rshift_bits(temp_result);
  158|    832|  if (0 != temp) {
  ------------------
  |  Branch (158:7): [True: 0, False: 832]
  ------------------
  159|      0|    *q_a -= temp;
  160|      0|    temp_result = temp_result >> temp;
  161|      0|  }
  162|       |
  163|    832|  return (WORD32)temp_result;
  164|  2.49k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_get_rshift_bits:
   34|    832|static PLATFORM_INLINE WORD32 ixheaacd_mps_get_rshift_bits(WORD64 a) {
   35|    832|  WORD32 temp_1, temp_2;
   36|    832|  temp_1 = (WORD32)(a >> 32);
   37|    832|  temp_2 = ixheaac_norm32(temp_1);
   38|    832|  if (temp_2 < 31) {
  ------------------
  |  Branch (38:7): [True: 0, False: 832]
  ------------------
   39|      0|    return (32 - temp_2);
   40|    832|  } else {
   41|    832|    temp_2 = (WORD32)(a);
   42|    832|    if ((temp_1 ^ temp_2) < 0) {
  ------------------
  |  Branch (42:9): [True: 0, False: 832]
  ------------------
   43|      0|      return 1;
   44|    832|    } else {
   45|    832|      return 0;
   46|    832|    }
   47|    832|  }
   48|    832|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_convert_to_qn:
  280|   689k|static WORD32 ixheaacd_mps_convert_to_qn(WORD32 temp, WORD16 qtemp, WORD16 n) {
  281|   689k|  WORD64 result;
  282|   689k|  if (qtemp == n)
  ------------------
  |  Branch (282:7): [True: 3.10k, False: 686k]
  ------------------
  283|  3.10k|    return temp;
  284|   686k|  else if (qtemp > n)
  ------------------
  |  Branch (284:12): [True: 615k, False: 70.6k]
  ------------------
  285|   615k|    temp = (WORD32)((WORD64)temp >> (qtemp - n));
  286|  70.6k|  else {
  287|  70.6k|    result = (WORD32)((WORD64)temp << (n - qtemp));
  288|  70.6k|    if (result > (WORD32)0x7fffffff || result < (WORD32)0x80000000) {
  ------------------
  |  Branch (288:9): [True: 0, False: 70.6k]
  |  Branch (288:40): [True: 0, False: 70.6k]
  ------------------
  289|      0|      return 0;
  290|      0|    } else
  291|  70.6k|      temp = (WORD32)result;
  292|  70.6k|  }
  293|   686k|  return temp;
  294|   689k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_add32:
  108|  1.26k|static PLATFORM_INLINE WORD32 ixheaacd_mps_add32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  109|  1.26k|  WORD64 temp_result;
  110|       |
  111|  1.26k|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (111:7): [True: 861, False: 399]
  |  Branch (111:17): [True: 0, False: 399]
  ------------------
  112|    861|    if (b == 0) {
  ------------------
  |  Branch (112:9): [True: 0, False: 861]
  ------------------
  113|      0|      return a;
  114|    861|    } else {
  115|    861|      *q_a = q_b;
  116|    861|      return b;
  117|    861|    }
  118|    861|  }
  119|    399|  if (*q_a > q_b) {
  ------------------
  |  Branch (119:7): [True: 0, False: 399]
  ------------------
  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|    399|  } else {
  128|    399|    if ((q_b - (*q_a)) > 31) {
  ------------------
  |  Branch (128:9): [True: 0, False: 399]
  ------------------
  129|      0|      b = 0;
  130|    399|    } else {
  131|    399|      b = (b >> (q_b - (*q_a)));
  132|    399|      q_b = *q_a;
  133|    399|    }
  134|    399|  }
  135|    399|  temp_result = (WORD64)a + (WORD64)b;
  136|    399|  if (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (136:7): [True: 0, False: 399]
  |  Branch (136:43): [True: 0, False: 399]
  ------------------
  137|      0|    temp_result = temp_result >> 1;
  138|      0|    *q_a -= 1;
  139|      0|  }
  140|       |
  141|    399|  return (WORD32)temp_result;
  142|  1.26k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_div_32:
  242|   697k|static PLATFORM_INLINE WORD32 ixheaacd_mps_div_32(WORD32 a, WORD32 b, WORD16 *q_format) {
  243|   697k|  WORD32 quotient;
  244|   697k|  UWORD32 mantissa_nr, mantissa_dr;
  245|   697k|  LOOPINDEX i;
  246|   697k|  WORD q_nr, q_dr;
  247|       |
  248|   697k|  quotient = 0;
  249|       |
  250|   697k|  if (0 == b) {
  ------------------
  |  Branch (250:7): [True: 72.1k, False: 625k]
  ------------------
  251|  72.1k|    *q_format = 0;
  252|  72.1k|    return (a);
  253|  72.1k|  }
  254|       |
  255|   625k|  quotient = 0;
  256|       |
  257|   625k|  q_nr = ixheaac_norm32(a);
  258|   625k|  mantissa_nr = (UWORD32)a << (q_nr);
  259|   625k|  q_dr = ixheaac_norm32(b);
  260|   625k|  mantissa_dr = (UWORD32)b << (q_dr);
  261|   625k|  *q_format = (WORD)(30 + q_nr - q_dr);
  262|       |
  263|  20.0M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (263:15): [True: 19.3M, False: 625k]
  ------------------
  264|  19.3M|    quotient <<= 1;
  265|       |
  266|  19.3M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (266:9): [True: 6.57M, False: 12.8M]
  ------------------
  267|  6.57M|      mantissa_nr -= mantissa_dr;
  268|  6.57M|      quotient += 1;
  269|  6.57M|    }
  270|  19.3M|    mantissa_nr <<= 1;
  271|  19.3M|  }
  272|       |
  273|   625k|  if ((a ^ b) < 0) {
  ------------------
  |  Branch (273:7): [True: 192, False: 625k]
  ------------------
  274|    192|    return -(quotient);
  275|    192|  }
  276|       |
  277|   625k|  return quotient;
  278|   625k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_sqrt:
   57|   470k|static PLATFORM_INLINE WORD32 ixheaacd_mps_sqrt(WORD32 num, WORD16 *q, const WORD32 *sqrt_tab) {
   58|   470k|  WORD32 index, answer, temp;
   59|   470k|  WORD k;
   60|       |
   61|   470k|  if (num == 0) return 0;
  ------------------
  |  Branch (61:7): [True: 31.3k, False: 439k]
  ------------------
   62|       |
   63|   439k|  k = ixheaac_norm32(num);
   64|   439k|  temp = ixheaac_shr32(ixheaac_shl32(num, k), 21);
   65|   439k|  *q += k;
   66|   439k|  index = temp & 0x1FF;
   67|   439k|  answer = sqrt_tab[index];
   68|   439k|  if (*q & 1) {
  ------------------
  |  Branch (68:7): [True: 173k, False: 266k]
  ------------------
   69|   173k|    *q -= 1;
   70|   173k|    answer = ixheaac_mult32_shl(answer, INV_SQRT_2_Q31);
  ------------------
  |  |   24|   173k|#define INV_SQRT_2_Q31 (1518500250)
  ------------------
   71|   173k|  }
   72|   439k|  *q = *q >> 1;
   73|   439k|  *q += Q_SQRT_TAB;
  ------------------
  |  |   25|   439k|#define Q_SQRT_TAB (15)
  ------------------
   74|   439k|  return answer;
   75|   470k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_mult32_shr_15:
  222|  4.73M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|  4.73M|  WORD32 result;
  224|  4.73M|  WORD64 temp_result;
  225|  4.73M|  temp_result = (WORD64)a * (WORD64)b;
  226|  4.73M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|  4.73M|  return (result);
  229|  4.73M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_div32_in_q15:
  296|   214k|static PLATFORM_INLINE WORD32 ixheaacd_mps_div32_in_q15(WORD32 num, WORD32 den) {
  297|   214k|  WORD32 quotient;
  298|   214k|  WORD16 q_quotient;
  299|       |
  300|   214k|  quotient = ixheaacd_mps_div_32(num, den, &q_quotient);
  301|   214k|  quotient = ixheaacd_mps_convert_to_qn(quotient, q_quotient, 15);
  302|   214k|  return quotient;
  303|   214k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_mult32_shr_n:
  185|   184k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_n(WORD32 a, WORD32 b, WORD16 n) {
  186|   184k|  WORD32 result;
  187|   184k|  WORD64 temp_result;
  188|       |
  189|   184k|  temp_result = (WORD64)a * (WORD64)b;
  190|   184k|  result = (WORD32)(temp_result >> n);
  191|       |
  192|   184k|  return (result);
  193|   184k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_mult32_shr_30:
  195|  65.5k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  65.5k|  WORD32 result;
  197|  65.5k|  WORD64 temp_result;
  198|       |
  199|  65.5k|  temp_result = (WORD64)a * (WORD64)b;
  200|  65.5k|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  65.5k|  return (result);
  203|  65.5k|}

ixheaacd_validate_res_frames_per_spatial_frame:
   60|    941|FLAG ixheaacd_validate_res_frames_per_spatial_frame(WORD32 num_slots, WORD32 val) {
   61|    941|  switch (num_slots) {
   62|     15|    case 15:
  ------------------
  |  Branch (62:5): [True: 15, False: 926]
  ------------------
   63|    462|    case 16:
  ------------------
  |  Branch (63:5): [True: 447, False: 494]
  ------------------
   64|    483|    case 18:
  ------------------
  |  Branch (64:5): [True: 21, False: 920]
  ------------------
   65|    612|    case 24:
  ------------------
  |  Branch (65:5): [True: 129, False: 812]
  ------------------
   66|    650|    case 30:
  ------------------
  |  Branch (66:5): [True: 38, False: 903]
  ------------------
   67|    650|      return val == 0;
   68|    209|    case 32:
  ------------------
  |  Branch (68:5): [True: 209, False: 732]
  ------------------
   69|    209|      return val == 0 || val == 1;
  ------------------
  |  Branch (69:14): [True: 195, False: 14]
  |  Branch (69:26): [True: 13, False: 1]
  ------------------
   70|     40|    case 36:
  ------------------
  |  Branch (70:5): [True: 40, False: 901]
  ------------------
   71|     51|    case 48:
  ------------------
  |  Branch (71:5): [True: 11, False: 930]
  ------------------
   72|     70|    case 60:
  ------------------
  |  Branch (72:5): [True: 19, False: 922]
  ------------------
   73|     70|      return val == 1;
   74|      4|    case 64:
  ------------------
  |  Branch (74:5): [True: 4, False: 937]
  ------------------
   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: 938]
  ------------------
   77|      3|      return val == 2;
   78|      5|    default:
  ------------------
  |  Branch (78:5): [True: 5, False: 936]
  ------------------
   79|      5|      return 0;
   80|    941|  }
   81|    941|}
ixheaacd_parse_specific_config:
  249|  3.38k|                                            WORD32 sac_header_len) {
  250|  3.38k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  3.38k|#define IA_NO_ERROR 0x00000000
  ------------------
  251|  3.38k|  ia_mps_spatial_bs_config_struct *config = &(pstr_mps_state->bs_config);
  252|  3.38k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
  253|  3.38k|  const ia_mps_dec_tree_properties_struct *p_tree_property_table =
  254|  3.38k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr->tree_property_table;
  255|  3.38k|  ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
  256|       |
  257|  3.38k|  WORD32 i, hc, hb, num_header_bits, ott_mode_lfe[MAX_NUM_OTT];
  258|       |
  259|  3.38k|  WORD32 tmp = (WORD32)(((mps_bit_buf->ptr_read_next - mps_bit_buf->ptr_bit_buf_base + 1) << 3) -
  260|  3.38k|                        (mps_bit_buf->bit_pos + 1));
  261|  3.38k|  WORD32 bits_available = (sac_header_len << 3);
  262|  3.38k|  WORD32 temp, alignment_bits = 0;
  263|       |
  264|  3.38k|  config->bs_sampling_freq_index = ixheaacd_read_bits_buf(mps_bit_buf, 4);
  265|  3.38k|  if (config->bs_sampling_freq_index == 15) {
  ------------------
  |  Branch (265:7): [True: 19, False: 3.36k]
  ------------------
  266|     19|    config->bs_sampling_frequency = ixheaacd_read_bits_buf(mps_bit_buf, 24);
  267|     19|  }
  268|  3.38k|  temp = ixheaacd_read_bits_buf(mps_bit_buf, 14);
  269|  3.38k|  config->bs_frame_length = (temp >> 7) & SEVEN_BIT_MASK;
  ------------------
  |  |  210|  3.38k|#define SEVEN_BIT_MASK (0x0000007F)
  ------------------
  270|  3.38k|  if (config->bs_frame_length >= (MAX_QMF_BUF_LEN - 1)) {
  ------------------
  |  |  137|  3.38k|#define MAX_QMF_BUF_LEN 78
  ------------------
  |  Branch (270:7): [True: 1, False: 3.38k]
  ------------------
  271|      1|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  272|      1|  }
  273|  3.38k|  config->bs_freq_res = (temp >> 4) & THREE_BIT_MASK;
  ------------------
  |  |  206|  3.38k|#define THREE_BIT_MASK (0x00000007)
  ------------------
  274|  3.38k|  if (config->bs_freq_res == 0) {
  ------------------
  |  Branch (274:7): [True: 2, False: 3.38k]
  ------------------
  275|      2|    return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_BANDS;
  ------------------
  |  |  137|      2|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_BANDS 0xFFFF9812
  ------------------
  276|      2|  }
  277|  3.38k|  config->bs_tree_config = (temp)&FOUR_BIT_MASK;
  ------------------
  |  |  207|  3.38k|#define FOUR_BIT_MASK (0x0000000F)
  ------------------
  278|       |
  279|  3.38k|  if (config->bs_tree_config >= 7) {
  ------------------
  |  Branch (279:7): [True: 1, False: 3.38k]
  ------------------
  280|      1|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  281|      1|  }
  282|       |
  283|  3.38k|  if (config->bs_tree_config != 15) {
  ------------------
  |  Branch (283:7): [True: 3.37k, False: 3]
  ------------------
  284|  3.37k|    curr_state->num_ott_boxes = p_tree_property_table[config->bs_tree_config].num_ott_boxes;
  285|  3.37k|    curr_state->num_ttt_boxes = p_tree_property_table[config->bs_tree_config].num_ttt_boxes;
  286|  3.37k|    curr_state->num_input_channels =
  287|  3.37k|        p_tree_property_table[config->bs_tree_config].num_input_channels;
  288|  3.37k|    curr_state->num_output_channels =
  289|  3.37k|        p_tree_property_table[config->bs_tree_config].num_output_channels;
  290|  20.2k|    for (i = 0; i < MAX_NUM_OTT; i++) {
  ------------------
  |  |   56|  20.2k|#define MAX_NUM_OTT (5)
  ------------------
  |  Branch (290:17): [True: 16.8k, False: 3.37k]
  ------------------
  291|  16.8k|      ott_mode_lfe[i] = p_tree_property_table[config->bs_tree_config].ott_mode_lfe[i];
  292|  16.8k|    }
  293|  3.37k|  }
  294|  3.38k|  temp = ixheaacd_read_bits_buf(mps_bit_buf, 19);
  295|  3.38k|  config->bs_quant_mode = (temp >> 17) & TWO_BIT_MASK;
  ------------------
  |  |  205|  3.38k|#define TWO_BIT_MASK (0x00000003)
  ------------------
  296|  3.38k|  config->bs_one_icc = (temp >> 16) & ONE_BIT_MASK;
  ------------------
  |  |  204|  3.38k|#define ONE_BIT_MASK (0x00000001)
  ------------------
  297|  3.38k|  config->bs_arbitrary_downmix = (temp >> 15) & ONE_BIT_MASK;
  ------------------
  |  |  204|  3.38k|#define ONE_BIT_MASK (0x00000001)
  ------------------
  298|  3.38k|  config->bs_fixed_gain_sur = (temp >> 12) & THREE_BIT_MASK;
  ------------------
  |  |  206|  3.38k|#define THREE_BIT_MASK (0x00000007)
  ------------------
  299|  3.38k|  if (config->bs_fixed_gain_sur >= 5) {
  ------------------
  |  Branch (299:7): [True: 1, False: 3.38k]
  ------------------
  300|      1|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  301|      1|  }
  302|  3.38k|  config->bs_fixed_gain_lfe = (temp >> 9) & THREE_BIT_MASK;
  ------------------
  |  |  206|  3.38k|#define THREE_BIT_MASK (0x00000007)
  ------------------
  303|       |
  304|  3.38k|  if (config->bs_fixed_gain_lfe >= 5) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (304:7): [True: 0, False: 3.38k]
  ------------------
  305|  3.38k|  config->bs_fixed_gain_dmx = (temp >> 6) & THREE_BIT_MASK;
  ------------------
  |  |  206|  3.38k|#define THREE_BIT_MASK (0x00000007)
  ------------------
  306|  3.38k|  config->bs_matrix_mode = (temp >> 5) & ONE_BIT_MASK;
  ------------------
  |  |  204|  3.38k|#define ONE_BIT_MASK (0x00000001)
  ------------------
  307|  3.38k|  config->bs_temp_shape_config = (temp >> 3) & TWO_BIT_MASK;
  ------------------
  |  |  205|  3.38k|#define TWO_BIT_MASK (0x00000003)
  ------------------
  308|  3.38k|  if (config->bs_temp_shape_config == 3)
  ------------------
  |  Branch (308:7): [True: 1, False: 3.37k]
  ------------------
  309|      1|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  310|       |
  311|  3.37k|  config->bs_decorr_config = (temp >> 1) & TWO_BIT_MASK;
  ------------------
  |  |  205|  3.37k|#define TWO_BIT_MASK (0x00000003)
  ------------------
  312|  3.37k|  config->bs_3d_audio_mode = (temp)&ONE_BIT_MASK;
  ------------------
  |  |  204|  3.37k|#define ONE_BIT_MASK (0x00000001)
  ------------------
  313|       |
  314|  14.9k|  for (i = 0; i < curr_state->num_ott_boxes; i++) {
  ------------------
  |  Branch (314:15): [True: 11.5k, False: 3.37k]
  ------------------
  315|  11.5k|    if (ott_mode_lfe[i]) {
  ------------------
  |  Branch (315:9): [True: 2.23k, False: 9.35k]
  ------------------
  316|  2.23k|      config->bs_ott_bands[i] = ixheaacd_read_bits_buf(mps_bit_buf, 5);
  317|  2.23k|      if (config->bs_ott_bands[i] > MAX_PARAMETER_BANDS) return IA_FATAL_ERROR;
  ------------------
  |  |   55|  2.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                    if (config->bs_ott_bands[i] > MAX_PARAMETER_BANDS) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (317:11): [True: 2, False: 2.23k]
  ------------------
  318|  2.23k|    }
  319|  11.5k|  }
  320|       |
  321|  4.89k|  for (i = 0; i < curr_state->num_ttt_boxes; i++) {
  ------------------
  |  Branch (321:15): [True: 1.51k, False: 3.37k]
  ------------------
  322|  1.51k|    temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
  323|  1.51k|    config->bs_ttt_dual_mode[i] = (temp >> 3) & ONE_BIT_MASK;
  ------------------
  |  |  204|  1.51k|#define ONE_BIT_MASK (0x00000001)
  ------------------
  324|  1.51k|    config->bs_ttt_mode_low[i] = (temp)&THREE_BIT_MASK;
  ------------------
  |  |  206|  1.51k|#define THREE_BIT_MASK (0x00000007)
  ------------------
  325|  1.51k|    if (config->bs_ttt_dual_mode[i]) {
  ------------------
  |  Branch (325:9): [True: 1.11k, False: 407]
  ------------------
  326|  1.11k|      temp = ixheaacd_read_bits_buf(mps_bit_buf, 8);
  327|  1.11k|      config->bs_ttt_mode_high[i] = (temp >> 5) & THREE_BIT_MASK;
  ------------------
  |  |  206|  1.11k|#define THREE_BIT_MASK (0x00000007)
  ------------------
  328|  1.11k|      config->bs_ttt_bands_low[i] = (temp)&FIVE_BIT_MASK;
  ------------------
  |  |  208|  1.11k|#define FIVE_BIT_MASK (0x0000001F)
  ------------------
  329|  1.11k|      if (config->bs_ttt_bands_low[i] > MAX_PARAMETER_BANDS) return IA_FATAL_ERROR;
  ------------------
  |  |   55|  1.11k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                    if (config->bs_ttt_bands_low[i] > MAX_PARAMETER_BANDS) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (329:11): [True: 1, False: 1.11k]
  ------------------
  330|  1.11k|    }
  331|  1.51k|  }
  332|       |
  333|  3.37k|  if (config->bs_temp_shape_config == 2) {
  ------------------
  |  Branch (333:7): [True: 1.07k, False: 2.30k]
  ------------------
  334|  1.07k|    config->bs_env_quant_mode = ixheaacd_read_bits_buf(mps_bit_buf, 1);
  335|  1.07k|  }
  336|       |
  337|  3.37k|  if (config->bs_3d_audio_mode) {
  ------------------
  |  Branch (337:7): [True: 33, False: 3.34k]
  ------------------
  338|     33|    config->bs_3d_audio_hrtf_set = ixheaacd_read_bits_buf(mps_bit_buf, 2);
  339|     33|    if (config->bs_3d_audio_hrtf_set == 0) {
  ------------------
  |  Branch (339:9): [True: 29, False: 4]
  ------------------
  340|     29|      temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
  341|     29|      config->bs_hrtf_freq_res = (temp >> 1) & THREE_BIT_MASK;
  ------------------
  |  |  206|     29|#define THREE_BIT_MASK (0x00000007)
  ------------------
  342|     29|      config->bs_hrtf_num_chan = 5;
  343|     29|      config->bs_hrtf_asymmetric = (temp)&ONE_BIT_MASK;
  ------------------
  |  |  204|     29|#define ONE_BIT_MASK (0x00000001)
  ------------------
  344|       |
  345|     29|      config->hrtf_num_band = pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr
  346|     29|                                  ->freq_res_table[config->bs_hrtf_freq_res];
  347|       |
  348|    108|      for (hc = 0; hc < config->bs_hrtf_num_chan; hc++) {
  ------------------
  |  Branch (348:20): [True: 79, False: 29]
  ------------------
  349|    783|        for (hb = 0; hb < config->hrtf_num_band; hb++) {
  ------------------
  |  Branch (349:22): [True: 704, False: 79]
  ------------------
  350|    704|          config->bs_hrtf_level_left[hc][hb] = ixheaacd_read_bits_buf(mps_bit_buf, 6);
  351|    704|        }
  352|    716|        for (hb = 0; hb < config->hrtf_num_band; hb++) {
  ------------------
  |  Branch (352:22): [True: 637, False: 79]
  ------------------
  353|    637|          config->bs_hrtf_level_right[hc][hb] = config->bs_hrtf_asymmetric
  ------------------
  |  Branch (353:49): [True: 98, False: 539]
  ------------------
  354|    637|                                                    ? ixheaacd_read_bits_buf(mps_bit_buf, 6)
  355|    637|                                                    : config->bs_hrtf_level_left[hc][hb];
  356|    637|        }
  357|     79|        config->bs_hrtf_phase[hc] = ixheaacd_read_bits_buf(mps_bit_buf, 1);
  358|    643|        for (hb = 0; hb < config->hrtf_num_band; hb++) {
  ------------------
  |  Branch (358:22): [True: 564, False: 79]
  ------------------
  359|    564|          config->bs_hrtf_phase_lr[hc][hb] =
  360|    564|              config->bs_hrtf_phase[hc] ? ixheaacd_read_bits_buf(mps_bit_buf, 6) : 0;
  ------------------
  |  Branch (360:15): [True: 141, False: 423]
  ------------------
  361|    564|        }
  362|     79|      }
  363|     29|    }
  364|     33|  }
  365|       |
  366|  3.37k|  ixheaacd_byte_align(mps_bit_buf, &alignment_bits);
  367|       |
  368|  3.37k|  num_header_bits =
  369|  3.37k|      (WORD32)(((mps_bit_buf->ptr_read_next - mps_bit_buf->ptr_bit_buf_base + 1) << 3) -
  370|  3.37k|               (mps_bit_buf->bit_pos + 1) - tmp);
  371|  3.37k|  bits_available -= num_header_bits;
  372|       |
  373|  3.37k|  err_code = ixheaacd_parse_extension_config(
  374|  3.37k|      config, curr_state->num_ott_boxes, curr_state->num_ttt_boxes,
  375|  3.37k|      curr_state->num_output_channels, bits_available, mps_bit_buf,
  376|  3.37k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr);
  377|  3.37k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  3.37k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (377:7): [True: 44, False: 3.33k]
  ------------------
  378|       |
  379|  3.33k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  3.33k|#define IA_NO_ERROR 0x00000000
  ------------------
  380|  3.37k|}
ixheaacd_parse_frame:
 1056|  14.4k|IA_ERRORCODE ixheaacd_parse_frame(ia_heaac_mps_state_struct *pstr_mps_state) {
 1057|  14.4k|  ia_mps_spatial_bs_config_struct *p_bs_config = &pstr_mps_state->bs_config;
 1058|       |
 1059|  14.4k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
 1060|  14.4k|  WORD32 i, bs_framing_type, prev_param_slot, data_bands, bs_temp_shape_enable,
 1061|  14.4k|      num_temp_shape_chan;
 1062|  14.4k|  WORD32 ttt_off, ps, pg, ts, pb, temp;
 1063|  14.4k|  WORD32 *bs_env_shape_data = pstr_mps_state->mps_scratch_mem_v;
 1064|  14.4k|  WORD32 const *reciprocal_tab = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->reciprocal;
 1065|  14.4k|  WORD32 num_parameter_sets;
 1066|       |
 1067|  14.4k|  ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
 1068|  14.4k|  ia_mps_dec_bitdec_tables_struct *bitdec_table =
 1069|  14.4k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
 1070|  14.4k|  WORD32 bs_num_output_channels =
 1071|  14.4k|      bitdec_table->tree_property_table[pstr_mps_state->tree_config].num_output_channels;
 1072|       |
 1073|  14.4k|  WORD32 time_slots = pstr_mps_state->time_slots;
 1074|  14.4k|  WORD32 bitstream_parameter_bands = pstr_mps_state->bitstream_parameter_bands;
 1075|  14.4k|  WORD32 *b_ott_bands = pstr_mps_state->bitstream_ott_bands;
 1076|  14.4k|  WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
 1077|       |
 1078|  14.4k|  WORD32 num_ott_boxes = pstr_mps_state->num_ott_boxes;
 1079|       |
 1080|  14.4k|  WORD32 reciprocal, alignment_bits = 0;
 1081|  14.4k|  ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
 1082|  14.4k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  14.4k|#define IA_NO_ERROR 0x00000000
  ------------------
 1083|       |
 1084|  14.4k|  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: 14.4k]
  ------------------
 1085|       |
 1086|  14.4k|  temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
 1087|  14.4k|  bs_framing_type = (temp >> 3) & ONE_BIT_MASK;
  ------------------
  |  |  204|  14.4k|#define ONE_BIT_MASK (0x00000001)
  ------------------
 1088|  14.4k|  num_parameter_sets = (temp & THREE_BIT_MASK) + 1;
  ------------------
  |  |  206|  14.4k|#define THREE_BIT_MASK (0x00000007)
  ------------------
 1089|  14.4k|  pstr_mps_state->num_parameter_sets = num_parameter_sets;
 1090|       |
 1091|  14.4k|  reciprocal = reciprocal_tab[num_parameter_sets - 1];
 1092|       |
 1093|  14.4k|  prev_param_slot = -1;
 1094|  37.8k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1094:15): [True: 23.4k, False: 14.4k]
  ------------------
 1095|  23.4k|    if (bs_framing_type) {
  ------------------
  |  Branch (1095:9): [True: 7.37k, False: 16.1k]
  ------------------
 1096|  7.37k|      WORD32 bits_param_slot = 0;
 1097|  31.4k|      while ((1 << bits_param_slot) < (time_slots - num_parameter_sets + i - prev_param_slot))
  ------------------
  |  Branch (1097:14): [True: 24.0k, False: 7.37k]
  ------------------
 1098|  24.0k|        bits_param_slot++;
 1099|  7.37k|      param_slot[i] =
 1100|  7.37k|          bits_param_slot
  ------------------
  |  Branch (1100:11): [True: 5.42k, False: 1.95k]
  ------------------
 1101|  7.37k|              ? prev_param_slot + 1 + ixheaacd_read_bits_buf(mps_bit_buf, bits_param_slot)
 1102|  7.37k|              : prev_param_slot + 1;
 1103|  7.37k|      prev_param_slot = param_slot[i];
 1104|  16.1k|    } else {
 1105|  16.1k|      WORD64 temp = (WORD64)(
 1106|  16.1k|          ((WORD64)((time_slots * (i + 1)) + num_parameter_sets - 1) * (WORD64)reciprocal) >> 28);
 1107|  16.1k|      param_slot[i] = (WORD32)(temp - 1);
 1108|  16.1k|    }
 1109|  23.4k|  }
 1110|  14.4k|  frame->bs_independency_flag = ixheaacd_read_bits_buf(mps_bit_buf, 1);
 1111|       |
 1112|  51.3k|  for (i = 0; i < num_ott_boxes; i++) {
  ------------------
  |  Branch (1112:15): [True: 36.9k, False: 14.3k]
  ------------------
 1113|  36.9k|    error_code =
 1114|  36.9k|        ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data, frame->cmp_ott_cld_idx,
 1115|  36.9k|                             frame->cmp_ott_cld_idx_prev, CLD, i, i, 0, b_ott_bands[i]);
  ------------------
  |  |   23|  36.9k|#define CLD (0)
  ------------------
 1116|  36.9k|    if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  36.9k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1116:9): [True: 16, False: 36.9k]
  ------------------
 1117|  36.9k|  }
 1118|  14.3k|  if (pstr_mps_state->one_icc) {
  ------------------
  |  Branch (1118:7): [True: 3.02k, False: 11.3k]
  ------------------
 1119|  3.02k|    error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->icc_lossless_data,
 1120|  3.02k|                                      frame->cmp_ott_icc_idx, frame->cmp_ott_icc_idx_prev, ICC, 0,
  ------------------
  |  |   24|  3.02k|#define ICC (1)
  ------------------
 1121|  3.02k|                                      0, 0, bitstream_parameter_bands);
 1122|  3.02k|    if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  3.02k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1122:9): [True: 9, False: 3.01k]
  ------------------
 1123|  11.3k|  } else {
 1124|  35.2k|    for (i = 0; i < num_ott_boxes; i++) {
  ------------------
  |  Branch (1124:17): [True: 23.9k, False: 11.3k]
  ------------------
 1125|  23.9k|      if (!pstr_mps_state->ott_mode_lfe[i]) {
  ------------------
  |  Branch (1125:11): [True: 23.3k, False: 630]
  ------------------
 1126|  23.3k|        error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->icc_lossless_data,
 1127|  23.3k|                                          frame->cmp_ott_icc_idx, frame->cmp_ott_icc_idx_prev,
 1128|  23.3k|                                          ICC, i, i, 0, b_ott_bands[i]);
  ------------------
  |  |   24|  23.3k|#define ICC (1)
  ------------------
 1129|  23.3k|        if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  23.3k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1129:13): [True: 19, False: 23.2k]
  ------------------
 1130|  23.3k|      }
 1131|  23.9k|    }
 1132|  11.3k|  }
 1133|       |
 1134|  14.3k|  ttt_off = num_ott_boxes;
 1135|  17.0k|  for (i = 0; i < pstr_mps_state->num_ttt_boxes; i++) {
  ------------------
  |  Branch (1135:15): [True: 2.66k, False: 14.3k]
  ------------------
 1136|  2.66k|    if (p_aux_struct->ttt_config[0][i].mode < 2) {
  ------------------
  |  Branch (1136:9): [True: 999, False: 1.66k]
  ------------------
 1137|    999|      error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cpc_lossless_data,
 1138|    999|                                        frame->cmp_ttt_cpc_1_idx, frame->cmp_ttt_cpc_1_idx_prev,
 1139|    999|                                        CPC, i, ttt_off + 4 * i,
  ------------------
  |  |   26|    999|#define CPC (3)
  ------------------
 1140|    999|                                        p_aux_struct->ttt_config[0][i].bitstream_start_band,
 1141|    999|                                        p_aux_struct->ttt_config[0][i].bitstream_stop_band);
 1142|    999|      if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    999|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1142:11): [True: 1, False: 998]
  ------------------
 1143|       |
 1144|    998|      error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cpc_lossless_data,
 1145|    998|                                        frame->cmp_ttt_cpc_2_idx, frame->cmp_ttt_cpc_2_idx_prev,
 1146|    998|                                        CPC, i, ttt_off + 4 * i + 1,
  ------------------
  |  |   26|    998|#define CPC (3)
  ------------------
 1147|    998|                                        p_aux_struct->ttt_config[0][i].bitstream_start_band,
 1148|    998|                                        p_aux_struct->ttt_config[0][i].bitstream_stop_band);
 1149|    998|      if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    998|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1149:11): [True: 2, False: 996]
  ------------------
 1150|       |
 1151|    996|      error_code =
 1152|    996|          ixheaacd_ec_data_dec(pstr_mps_state, &frame->icc_lossless_data, frame->cmp_ttt_icc_idx,
 1153|    996|                               frame->cmp_ttt_icc_idx_prev, ICC, i, ttt_off + 4 * i,
  ------------------
  |  |   24|    996|#define ICC (1)
  ------------------
 1154|    996|                               p_aux_struct->ttt_config[0][i].bitstream_start_band,
 1155|    996|                               p_aux_struct->ttt_config[0][i].bitstream_stop_band);
 1156|    996|      if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    996|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1156:11): [True: 7, False: 989]
  ------------------
 1157|  1.66k|    } else {
 1158|  1.66k|      error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data,
 1159|  1.66k|                                        frame->cmp_ttt_cld_1_idx, frame->cmp_ttt_cld_1_idx_prev,
 1160|  1.66k|                                        CLD, i, ttt_off + 4 * i,
  ------------------
  |  |   23|  1.66k|#define CLD (0)
  ------------------
 1161|  1.66k|                                        p_aux_struct->ttt_config[0][i].bitstream_start_band,
 1162|  1.66k|                                        p_aux_struct->ttt_config[0][i].bitstream_stop_band);
 1163|  1.66k|      if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  1.66k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1163:11): [True: 5, False: 1.66k]
  ------------------
 1164|       |
 1165|  1.66k|      error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data,
 1166|  1.66k|                                        frame->cmp_ttt_cld_2_idx, frame->cmp_ttt_cld_2_idx_prev,
 1167|  1.66k|                                        CLD, i, ttt_off + 4 * i + 1,
  ------------------
  |  |   23|  1.66k|#define CLD (0)
  ------------------
 1168|  1.66k|                                        p_aux_struct->ttt_config[0][i].bitstream_start_band,
 1169|  1.66k|                                        p_aux_struct->ttt_config[0][i].bitstream_stop_band);
 1170|  1.66k|      if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  1.66k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1170:11): [True: 2, False: 1.66k]
  ------------------
 1171|  1.66k|    }
 1172|       |
 1173|  2.65k|    if (p_aux_struct->ttt_config[1][i].bitstream_start_band <
  ------------------
  |  Branch (1173:9): [True: 864, False: 1.78k]
  ------------------
 1174|  2.65k|        p_aux_struct->ttt_config[1][i].bitstream_stop_band) {
 1175|    864|      if (p_aux_struct->ttt_config[1][i].mode < 2) {
  ------------------
  |  Branch (1175:11): [True: 260, False: 604]
  ------------------
 1176|    260|        error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cpc_lossless_data,
 1177|    260|                                          frame->cmp_ttt_cpc_1_idx, frame->cmp_ttt_cpc_1_idx_prev,
 1178|    260|                                          CPC, i, ttt_off + 4 * i + 2,
  ------------------
  |  |   26|    260|#define CPC (3)
  ------------------
 1179|    260|                                          p_aux_struct->ttt_config[1][i].bitstream_start_band,
 1180|    260|                                          p_aux_struct->ttt_config[1][i].bitstream_stop_band);
 1181|    260|        if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    260|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1181:13): [True: 1, False: 259]
  ------------------
 1182|       |
 1183|    259|        error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cpc_lossless_data,
 1184|    259|                                          frame->cmp_ttt_cpc_2_idx, frame->cmp_ttt_cpc_2_idx_prev,
 1185|    259|                                          CPC, i, ttt_off + 4 * i + 3,
  ------------------
  |  |   26|    259|#define CPC (3)
  ------------------
 1186|    259|                                          p_aux_struct->ttt_config[1][i].bitstream_start_band,
 1187|    259|                                          p_aux_struct->ttt_config[1][i].bitstream_stop_band);
 1188|    259|        if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    259|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1188:13): [True: 1, False: 258]
  ------------------
 1189|       |
 1190|    258|        error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->icc_lossless_data,
 1191|    258|                                          frame->cmp_ttt_icc_idx, frame->cmp_ttt_icc_idx_prev,
 1192|    258|                                          ICC, i, ttt_off + 4 * i + 2,
  ------------------
  |  |   24|    258|#define ICC (1)
  ------------------
 1193|    258|                                          p_aux_struct->ttt_config[1][i].bitstream_start_band,
 1194|    258|                                          p_aux_struct->ttt_config[1][i].bitstream_stop_band);
 1195|    258|        if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    258|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1195:13): [True: 5, False: 253]
  ------------------
 1196|    604|      } else {
 1197|    604|        error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data,
 1198|    604|                                          frame->cmp_ttt_cld_1_idx, frame->cmp_ttt_cld_1_idx_prev,
 1199|    604|                                          CLD, i, ttt_off + 4 * i + 2,
  ------------------
  |  |   23|    604|#define CLD (0)
  ------------------
 1200|    604|                                          p_aux_struct->ttt_config[1][i].bitstream_start_band,
 1201|    604|                                          p_aux_struct->ttt_config[1][i].bitstream_stop_band);
 1202|    604|        if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    604|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1202:13): [True: 1, False: 603]
  ------------------
 1203|       |
 1204|    603|        error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data,
 1205|    603|                                          frame->cmp_ttt_cld_2_idx, frame->cmp_ttt_cld_2_idx_prev,
 1206|    603|                                          CLD, i, ttt_off + 4 * i + 3,
  ------------------
  |  |   23|    603|#define CLD (0)
  ------------------
 1207|    603|                                          p_aux_struct->ttt_config[1][i].bitstream_start_band,
 1208|    603|                                          p_aux_struct->ttt_config[1][i].bitstream_stop_band);
 1209|    603|        if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    603|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1209:13): [True: 3, False: 600]
  ------------------
 1210|    603|      }
 1211|    864|    }
 1212|  2.65k|  }
 1213|       |
 1214|  14.3k|  frame->bs_smooth_control = 1;
 1215|       |
 1216|  14.3k|  if (frame->bs_smooth_control) {
  ------------------
  |  Branch (1216:7): [True: 14.2k, False: 92]
  ------------------
 1217|  36.8k|    for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (1217:18): [True: 22.6k, False: 14.2k]
  ------------------
 1218|  22.6k|      frame->bs_smooth_mode[ps] = ixheaacd_read_bits_buf(mps_bit_buf, 2);
 1219|  22.6k|      if (frame->bs_smooth_mode[ps] > 3 || frame->bs_smooth_mode[ps] < 0) {
  ------------------
  |  Branch (1219:11): [True: 6, False: 22.6k]
  |  Branch (1219:44): [True: 0, False: 22.6k]
  ------------------
 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|  22.6k|      if (frame->bs_smooth_mode[ps] >= 2) {
  ------------------
  |  Branch (1222:11): [True: 5.74k, False: 16.8k]
  ------------------
 1223|  5.74k|        frame->bs_smooth_time[ps] = ixheaacd_read_bits_buf(mps_bit_buf, 2);
 1224|  5.74k|      }
 1225|  22.6k|      if (frame->bs_smooth_mode[ps] == 3) {
  ------------------
  |  Branch (1225:11): [True: 2.10k, False: 20.5k]
  ------------------
 1226|  2.10k|        frame->bs_freq_res_stride_smg[ps] = ixheaacd_read_bits_buf(mps_bit_buf, 2);
 1227|  2.10k|        data_bands = (bitstream_parameter_bands - 1) /
 1228|  2.10k|                         bitdec_table->pb_stride_table[frame->bs_freq_res_stride_smg[ps]] +
 1229|  2.10k|                     1;
 1230|  12.1k|        for (pg = 0; pg < data_bands; pg++) {
  ------------------
  |  Branch (1230:22): [True: 10.0k, False: 2.10k]
  ------------------
 1231|  10.0k|          frame->bs_smg_data[ps][pg] = ixheaacd_read_bits_buf(mps_bit_buf, 1);
 1232|  10.0k|        }
 1233|  2.10k|      }
 1234|  22.6k|    }
 1235|  14.2k|  }
 1236|       |
 1237|   124k|  for (i = 0; i < bs_num_output_channels; i++) {
  ------------------
  |  Branch (1237:15): [True: 110k, False: 14.3k]
  ------------------
 1238|   110k|    p_aux_struct->temp_shape_enable_channel_stp[i] = 0;
 1239|   110k|    p_aux_struct->temp_shape_enable_channel_ges[i] = 0;
 1240|   110k|  }
 1241|       |
 1242|  14.3k|  if (p_bs_config->bs_temp_shape_config != 0) {
  ------------------
  |  Branch (1242:7): [True: 13.6k, False: 672]
  ------------------
 1243|  13.6k|    bs_temp_shape_enable = ixheaacd_read_bits_buf(mps_bit_buf, 1);
 1244|  13.6k|    if (bs_temp_shape_enable) {
  ------------------
  |  Branch (1244:9): [True: 2.84k, False: 10.8k]
  ------------------
 1245|  2.84k|      num_temp_shape_chan =
 1246|  2.84k|          bitdec_table->temp_shape_chan_table[p_bs_config->bs_temp_shape_config - 1]
 1247|  2.84k|                                             [p_bs_config->bs_tree_config];
 1248|  2.84k|      switch (pstr_mps_state->temp_shape_config) {
 1249|    733|        case 1:
  ------------------
  |  Branch (1249:9): [True: 733, False: 2.11k]
  ------------------
 1250|  4.06k|          for (i = 0; i < num_temp_shape_chan; i++) {
  ------------------
  |  Branch (1250:23): [True: 3.33k, False: 733]
  ------------------
 1251|  3.33k|            p_aux_struct->temp_shape_enable_channel_stp[i] =
 1252|  3.33k|                ixheaacd_read_bits_buf(mps_bit_buf, 1);
 1253|  3.33k|          }
 1254|    733|          break;
 1255|  2.11k|        case 2:
  ------------------
  |  Branch (1255:9): [True: 2.11k, False: 733]
  ------------------
 1256|  10.8k|          for (i = 0; i < num_temp_shape_chan; i++) {
  ------------------
  |  Branch (1256:23): [True: 8.73k, False: 2.11k]
  ------------------
 1257|  8.73k|            p_aux_struct->temp_shape_enable_channel_ges[i] =
 1258|  8.73k|                ixheaacd_read_bits_buf(mps_bit_buf, 1);
 1259|  8.73k|          }
 1260|  10.8k|          for (i = 0; i < num_temp_shape_chan; i++) {
  ------------------
  |  Branch (1260:23): [True: 8.69k, False: 2.11k]
  ------------------
 1261|  8.69k|            if (p_aux_struct->temp_shape_enable_channel_ges[i]) {
  ------------------
  |  Branch (1261:17): [True: 1.05k, False: 7.63k]
  ------------------
 1262|  1.05k|              WORD32 const *envshape_data =
 1263|  1.05k|                  &bitdec_table->envshape_data[pstr_mps_state->env_quant_mode][0];
 1264|  1.05k|              ixheaacd_mps_huff_decode(mps_bit_buf, bs_env_shape_data, time_slots);
 1265|  30.4k|              for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (1265:28): [True: 29.4k, False: 1.05k]
  ------------------
 1266|  29.4k|                p_aux_struct->env_shape_data[i][ts] = envshape_data[bs_env_shape_data[ts]];
 1267|  29.4k|              }
 1268|  1.05k|            }
 1269|  8.69k|          }
 1270|  2.11k|          break;
 1271|      0|        default:
  ------------------
  |  Branch (1271:9): [True: 0, False: 2.84k]
  ------------------
 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.84k|      }
 1274|  2.84k|    }
 1275|  13.6k|  }
 1276|       |
 1277|  14.3k|  if (pstr_mps_state->up_mix_type == 2) {
  ------------------
  |  Branch (1277:7): [True: 0, False: 14.3k]
  ------------------
 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|  14.3k|  if (pstr_mps_state->arbitrary_downmix != 0) {
  ------------------
  |  Branch (1284:7): [True: 1.16k, False: 13.1k]
  ------------------
 1285|  1.16k|    ixheaacd_parse_arbitrary_downmix_data(pstr_mps_state);
 1286|  1.16k|  }
 1287|       |
 1288|  14.3k|  ixheaacd_byte_align(mps_bit_buf, &alignment_bits);
 1289|  14.3k|  error_code = ixheaacd_parse_extension_frame(pstr_mps_state);
 1290|  14.3k|  if (error_code) {
  ------------------
  |  Branch (1290:7): [True: 83, False: 14.2k]
  ------------------
 1291|     83|    if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (1291:9): [True: 0, False: 83]
  ------------------
 1292|      0|      pstr_mps_state->frame_ok = 0;
 1293|      0|    }
 1294|     83|    else
 1295|     83|      return error_code;
 1296|     83|  }
 1297|       |
 1298|  49.7k|  for (i = 0; i < num_ott_boxes; i++) {
  ------------------
  |  Branch (1298:15): [True: 35.4k, False: 14.2k]
  ------------------
 1299|  98.1k|    for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (1299:18): [True: 62.6k, False: 35.4k]
  ------------------
 1300|  62.6k|      if (!frame->res_data.bs_icc_diff_present[i][ps] || (pstr_mps_state->up_mix_type == 2) ||
  ------------------
  |  Branch (1300:11): [True: 62.4k, False: 153]
  |  Branch (1300:58): [True: 0, False: 153]
  ------------------
 1301|  62.4k|          (pstr_mps_state->up_mix_type == 3)) {
  ------------------
  |  Branch (1301:11): [True: 0, False: 153]
  ------------------
 1302|  1.05M|        for (pb = 0; pb < bitstream_parameter_bands; pb++) {
  ------------------
  |  Branch (1302:22): [True: 991k, False: 62.4k]
  ------------------
 1303|   991k|          pstr_mps_state->bs_frame->ott_icc_diff_idx[i][ps][pb] = 0;
 1304|   991k|        }
 1305|  62.4k|      }
 1306|  62.6k|    }
 1307|  35.4k|  }
 1308|       |
 1309|  14.2k|  pstr_mps_state->parse_next_bitstream_frame = 1;
 1310|       |
 1311|  14.2k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  14.2k|#define IA_NO_ERROR 0x00000000
  ------------------
 1312|  14.3k|}
ixheaacd_decode_frame:
 2254|  13.9k|IA_ERRORCODE ixheaacd_decode_frame(ia_heaac_mps_state_struct *pstr_mps_state) {
 2255|  13.9k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  13.9k|#define IA_NO_ERROR 0x00000000
  ------------------
 2256|  13.9k|  ia_mps_spatial_bs_config_struct *p_bs_config = &pstr_mps_state->bs_config;
 2257|  13.9k|  WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
 2258|       |
 2259|  13.9k|  pstr_mps_state->extend_frame = 0;
 2260|  13.9k|  if (param_slot[pstr_mps_state->num_parameter_sets - 1] != pstr_mps_state->time_slots - 1) {
  ------------------
  |  Branch (2260:7): [True: 3.78k, False: 10.1k]
  ------------------
 2261|  3.78k|    pstr_mps_state->extend_frame = 1;
 2262|  3.78k|  }
 2263|  13.9k|  if (pstr_mps_state->extend_frame)
  ------------------
  |  Branch (2263:7): [True: 3.78k, False: 10.1k]
  ------------------
 2264|  3.78k|  {
 2265|  3.78k|    if (pstr_mps_state->num_parameter_sets == MAX_PARAMETER_SETS) {
  ------------------
  |  |   74|  3.78k|#define MAX_PARAMETER_SETS (8)
  ------------------
  |  Branch (2265:9): [True: 4, False: 3.77k]
  ------------------
 2266|      4|      if (pstr_mps_state->ec_flag)
  ------------------
  |  Branch (2266:11): [True: 0, False: 4]
  ------------------
 2267|      0|        pstr_mps_state->num_parameter_sets = 1;
 2268|      4|      else
 2269|      4|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      4|#define IA_FATAL_ERROR 0x80000000
  ------------------
 2270|      4|    }
 2271|  3.78k|  }
 2272|       |
 2273|  13.9k|  error_code = ixheaacd_decode_and_map_frame_ott(pstr_mps_state);
 2274|  13.9k|  if (error_code)
  ------------------
  |  Branch (2274:7): [True: 126, False: 13.8k]
  ------------------
 2275|    126|  {
 2276|    126|    if (pstr_mps_state->ec_flag)
  ------------------
  |  Branch (2276:9): [True: 0, False: 126]
  ------------------
 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|    126|    else
 2290|    126|      return error_code;
 2291|    126|  }
 2292|       |
 2293|  13.8k|  error_code = ixheaacd_decode_and_map_frame_ttt(pstr_mps_state);
 2294|  13.8k|  if (error_code)
  ------------------
  |  Branch (2294:7): [True: 37, False: 13.8k]
  ------------------
 2295|     37|  {
 2296|     37|    if (pstr_mps_state->ec_flag)
  ------------------
  |  Branch (2296:9): [True: 0, False: 37]
  ------------------
 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|     37|    else
 2304|     37|      return error_code;
 2305|     37|  }
 2306|       |
 2307|  13.8k|  ixheaacd_decode_and_map_frame_smg(pstr_mps_state);
 2308|  13.8k|  if (p_bs_config->arbitrary_tree != 0) {
  ------------------
  |  Branch (2308:7): [True: 7, False: 13.8k]
  ------------------
 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.8k|  if (pstr_mps_state->arbitrary_downmix != 0) {
  ------------------
  |  Branch (2327:7): [True: 995, False: 12.8k]
  ------------------
 2328|    995|    error_code = ixheaacd_decode_and_map_frame_arbdmx(pstr_mps_state);
 2329|    995|    if (error_code)
  ------------------
  |  Branch (2329:9): [True: 15, False: 980]
  ------------------
 2330|     15|    {
 2331|     15|      if (pstr_mps_state->ec_flag)
  ------------------
  |  Branch (2331:11): [True: 0, False: 15]
  ------------------
 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|     15|      else
 2342|     15|        return error_code;
 2343|     15|    }
 2344|    995|  }
 2345|       |
 2346|  13.7k|  if (pstr_mps_state->extend_frame) {
  ------------------
  |  Branch (2346:7): [True: 3.72k, False: 10.0k]
  ------------------
 2347|  3.72k|    pstr_mps_state->num_parameter_sets++;
 2348|  3.72k|    param_slot[pstr_mps_state->num_parameter_sets - 1] = pstr_mps_state->time_slots - 1;
 2349|  3.72k|  }
 2350|  13.7k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  13.7k|#define IA_NO_ERROR 0x00000000
  ------------------
 2351|  13.8k|}
ixheaacd_set_current_state_parameters:
 2353|  3.29k|IA_ERRORCODE ixheaacd_set_current_state_parameters(ia_heaac_mps_state_struct *pstr_mps_state) {
 2354|  3.29k|  WORD32 i;
 2355|       |
 2356|  3.29k|  ia_mps_spatial_bs_config_struct *config = &(pstr_mps_state->bs_config);
 2357|  3.29k|  ia_mps_spatial_bs_config_struct *p_bs_config = &pstr_mps_state->bs_config;
 2358|  3.29k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
 2359|  3.29k|  ia_mps_dec_bitdec_tables_struct *bitdec_table =
 2360|  3.29k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
 2361|  3.29k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
 2362|  3.29k|  WORD32 *b_ott_bands = curr_state->bitstream_ott_bands;
 2363|       |
 2364|  3.29k|  if (config->bs_sampling_freq_index == 15) {
  ------------------
  |  Branch (2364:7): [True: 15, False: 3.28k]
  ------------------
 2365|     15|    curr_state->sampling_freq = config->bs_sampling_frequency;
 2366|  3.28k|  } else {
 2367|  3.28k|    curr_state->sampling_freq = bitdec_table->sampling_freq_table[config->bs_sampling_freq_index];
 2368|  3.28k|  }
 2369|  3.29k|  curr_state->time_slots = config->bs_frame_length + 1;
 2370|  3.29k|  curr_state->frame_length = curr_state->time_slots * curr_state->qmf_bands;
 2371|  3.29k|  curr_state->bitstream_parameter_bands = bitdec_table->freq_res_table[config->bs_freq_res];
 2372|       |
 2373|  3.29k|  curr_state->hybrid_bands = curr_state->qmf_bands - QMF_BANDS_TO_HYBRID + 10;
  ------------------
  |  |   64|  3.29k|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
 2374|  3.29k|  curr_state->tp_hyb_band_border = 12;
 2375|  3.29k|  if (curr_state->hybrid_bands > 71) {
  ------------------
  |  Branch (2375:7): [True: 1, False: 3.29k]
  ------------------
 2376|      1|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
 2377|      1|  }
 2378|  3.29k|  if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2378:7): [True: 0, False: 3.29k]
  ------------------
 2379|      0|    curr_state->num_parameter_bands = MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
 2380|  3.29k|  } else {
 2381|  3.29k|    curr_state->num_parameter_bands = curr_state->bitstream_parameter_bands;
 2382|  3.29k|  }
 2383|       |
 2384|  3.29k|  switch (curr_state->num_parameter_bands) {
 2385|    396|    case PARAMETER_BANDS_4:
  ------------------
  |  Branch (2385:5): [True: 396, False: 2.90k]
  ------------------
 2386|  16.0k|      for (i = 0; i < curr_state->hybrid_bands; i++) {
  ------------------
  |  Branch (2386:19): [True: 15.6k, False: 396]
  ------------------
 2387|  15.6k|        curr_state->kernels[i] = bitdec_table->kernel_table.kernels_4_to_71[i];
 2388|  15.6k|      }
 2389|    396|      break;
 2390|    295|    case PARAMETER_BANDS_5:
  ------------------
  |  Branch (2390:5): [True: 295, False: 3.00k]
  ------------------
 2391|  17.5k|      for (i = 0; i < curr_state->hybrid_bands; i++) {
  ------------------
  |  Branch (2391:19): [True: 17.2k, False: 295]
  ------------------
 2392|  17.2k|        curr_state->kernels[i] = bitdec_table->kernel_table.kernels_5_to_71[i];
 2393|  17.2k|      }
 2394|    295|      break;
 2395|     24|    case PARAMETER_BANDS_7:
  ------------------
  |  Branch (2395:5): [True: 24, False: 3.27k]
  ------------------
 2396|  1.12k|      for (i = 0; i < curr_state->hybrid_bands; i++) {
  ------------------
  |  Branch (2396:19): [True: 1.09k, False: 24]
  ------------------
 2397|  1.09k|        curr_state->kernels[i] = bitdec_table->kernel_table.kernels_7_to_71[i];
 2398|  1.09k|      }
 2399|     24|      break;
 2400|    127|    case PARAMETER_BANDS_10:
  ------------------
  |  Branch (2400:5): [True: 127, False: 3.16k]
  ------------------
 2401|  5.33k|      for (i = 0; i < curr_state->hybrid_bands; i++) {
  ------------------
  |  Branch (2401:19): [True: 5.20k, False: 127]
  ------------------
 2402|  5.20k|        curr_state->kernels[i] = bitdec_table->kernel_table.kernels_10_to_71[i];
 2403|  5.20k|      }
 2404|    127|      break;
 2405|  1.03k|    case PARAMETER_BANDS_14:
  ------------------
  |  Branch (2405:5): [True: 1.03k, False: 2.26k]
  ------------------
 2406|  41.6k|      for (i = 0; i < curr_state->hybrid_bands; i++) {
  ------------------
  |  Branch (2406:19): [True: 40.6k, False: 1.03k]
  ------------------
 2407|  40.6k|        curr_state->kernels[i] = bitdec_table->kernel_table.kernels_14_to_71[i];
 2408|  40.6k|      }
 2409|  1.03k|      break;
 2410|  1.19k|    case PARAMETER_BANDS_20:
  ------------------
  |  Branch (2410:5): [True: 1.19k, False: 2.09k]
  ------------------
 2411|  66.5k|      for (i = 0; i < curr_state->hybrid_bands; i++) {
  ------------------
  |  Branch (2411:19): [True: 65.3k, False: 1.19k]
  ------------------
 2412|  65.3k|        curr_state->kernels[i] = bitdec_table->kernel_table.kernels_20_to_71[i];
 2413|  65.3k|      }
 2414|  1.19k|      break;
 2415|    221|    case PARAMETER_BANDS_28:
  ------------------
  |  Branch (2415:5): [True: 221, False: 3.07k]
  ------------------
 2416|  8.90k|      for (i = 0; i < curr_state->hybrid_bands; i++) {
  ------------------
  |  Branch (2416:19): [True: 8.68k, False: 221]
  ------------------
 2417|  8.68k|        curr_state->kernels[i] = bitdec_table->kernel_table.kernels_28_to_71[i];
 2418|  8.68k|      }
 2419|    221|      break;
 2420|      0|    default:
  ------------------
  |  Branch (2420:5): [True: 0, False: 3.29k]
  ------------------
 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.29k|  };
 2423|       |
 2424|  3.29k|  curr_state->tree_config = config->bs_tree_config;
 2425|       |
 2426|  3.29k|  switch (curr_state->tree_config) {
 2427|    336|    case TREE_5151:
  ------------------
  |  Branch (2427:5): [True: 336, False: 2.96k]
  ------------------
 2428|    689|    case TREE_5152:
  ------------------
  |  Branch (2428:5): [True: 353, False: 2.94k]
  ------------------
 2429|  1.59k|    case TREE_525:
  ------------------
  |  Branch (2429:5): [True: 903, False: 2.39k]
  ------------------
 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|    341|    case TREE_7271:
  ------------------
  |  Branch (2432:5): [True: 341, False: 2.95k]
  ------------------
 2433|    511|    case TREE_7571:
  ------------------
  |  Branch (2433:5): [True: 170, False: 3.12k]
  ------------------
 2434|    511|      config->ui_channel_mask = SEVEN_POINT_ONE_CHANNEL_MASK1;
  ------------------
  |  |   24|    511|#define SEVEN_POINT_ONE_CHANNEL_MASK1 (0xFF)
  ------------------
 2435|    511|      break;
 2436|    230|    case TREE_7272:
  ------------------
  |  Branch (2436:5): [True: 230, False: 3.06k]
  ------------------
 2437|  1.19k|    case TREE_7572:
  ------------------
  |  Branch (2437:5): [True: 963, False: 2.33k]
  ------------------
 2438|  1.19k|      config->ui_channel_mask = SEVEN_POINT_ONE_CHANNEL_MASK2;
  ------------------
  |  |   25|  1.19k|#define SEVEN_POINT_ONE_CHANNEL_MASK2 (0x33F)
  ------------------
 2439|  1.19k|      break;
 2440|      0|    default:
  ------------------
  |  Branch (2440:5): [True: 0, False: 3.29k]
  ------------------
 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.29k|  }
 2443|       |
 2444|  3.29k|  curr_state->num_ott_boxes =
 2445|  3.29k|      bitdec_table->tree_property_table[curr_state->tree_config].num_ott_boxes;
 2446|  3.29k|  curr_state->num_ttt_boxes =
 2447|  3.29k|      bitdec_table->tree_property_table[curr_state->tree_config].num_ttt_boxes;
 2448|  3.29k|  curr_state->num_input_channels =
 2449|  3.29k|      bitdec_table->tree_property_table[curr_state->tree_config].num_input_channels;
 2450|  3.29k|  curr_state->num_output_channels =
 2451|  3.29k|      bitdec_table->tree_property_table[curr_state->tree_config].num_output_channels;
 2452|  3.29k|  curr_state->quant_mode = config->bs_quant_mode;
 2453|  3.29k|  curr_state->one_icc = config->bs_one_icc;
 2454|  3.29k|  curr_state->arbitrary_downmix = config->bs_arbitrary_downmix;
 2455|  3.29k|  curr_state->residual_coding = config->bs_residual_coding;
 2456|  3.29k|  curr_state->smooth_config = config->bs_smooth_config;
 2457|  3.29k|  curr_state->mtx_inversion = config->bs_matrix_mode;
 2458|  3.29k|  curr_state->temp_shape_config = config->bs_temp_shape_config;
 2459|  3.29k|  curr_state->decorr_config = config->bs_decorr_config;
 2460|  3.29k|  curr_state->env_quant_mode = config->bs_env_quant_mode;
 2461|  3.29k|  curr_state->lfe_gain = bitdec_table->lfe_gain_table[config->bs_fixed_gain_lfe];
 2462|  3.29k|  curr_state->surround_gain = bitdec_table->surround_gain_table[config->bs_fixed_gain_sur];
 2463|  3.29k|  curr_state->clip_protect_gain = bitdec_table->clip_gain_table[config->bs_fixed_gain_dmx];
 2464|       |
 2465|  3.29k|  if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2465:7): [True: 0, False: 3.29k]
  ------------------
 2466|      0|    curr_state->num_output_channels = 2;
 2467|      0|    curr_state->decorr_config = 0;
 2468|      0|  }
 2469|       |
 2470|  3.29k|  if (curr_state->up_mix_type == 3) {
  ------------------
  |  Branch (2470:7): [True: 0, False: 3.29k]
  ------------------
 2471|      0|    curr_state->num_output_channels = 2;
 2472|      0|  }
 2473|       |
 2474|  3.29k|  if (p_bs_config->arbitrary_tree == 1)
  ------------------
  |  Branch (2474:7): [True: 12, False: 3.28k]
  ------------------
 2475|     12|    curr_state->num_output_channels_at = p_bs_config->num_out_chan_at;
 2476|  3.28k|  else
 2477|  3.28k|    curr_state->num_output_channels_at = curr_state->num_output_channels;
 2478|       |
 2479|  3.29k|  p_bs_config->ui_out_channels = curr_state->num_output_channels_at;
 2480|       |
 2481|  3.29k|  curr_state->_3d_stereo_inversion = config->bs_3d_audio_mode;
 2482|       |
 2483|  3.29k|  if (curr_state->mtx_inversion == 1 || curr_state->_3d_stereo_inversion == 1)
  ------------------
  |  Branch (2483:7): [True: 1.56k, False: 1.73k]
  |  Branch (2483:41): [True: 4, False: 1.73k]
  ------------------
 2484|  1.56k|    curr_state->m1_param_imag_present = 1;
 2485|       |
 2486|  14.5k|  for (i = 0; i < curr_state->num_ott_boxes; i++) {
  ------------------
  |  Branch (2486:15): [True: 11.2k, False: 3.29k]
  ------------------
 2487|  11.2k|    if (bitdec_table->tree_property_table[curr_state->tree_config].ott_mode_lfe[i]) {
  ------------------
  |  Branch (2487:9): [True: 2.16k, False: 9.11k]
  ------------------
 2488|  2.16k|      b_ott_bands[i] = config->bs_ott_bands[i];
 2489|  2.16k|      curr_state->ott_mode_lfe[i] = 1;
 2490|  9.11k|    } else {
 2491|  9.11k|      b_ott_bands[i] = curr_state->bitstream_parameter_bands;
 2492|  9.11k|      curr_state->ott_mode_lfe[i] = 0;
 2493|  9.11k|    }
 2494|       |
 2495|  11.2k|    if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2495:9): [True: 0, False: 11.2k]
  ------------------
 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.2k|    } else {
 2500|  11.2k|      p_aux_struct->num_ott_bands[i] = b_ott_bands[i];
 2501|  11.2k|    }
 2502|  11.2k|  }
 2503|  4.77k|  for (i = 0; i < curr_state->num_ttt_boxes; i++) {
  ------------------
  |  Branch (2503:15): [True: 1.47k, False: 3.29k]
  ------------------
 2504|  1.47k|    p_aux_struct->ttt_config[0][i].mode = config->bs_ttt_mode_low[i];
 2505|  1.47k|    p_aux_struct->ttt_config[1][i].mode = config->bs_ttt_mode_high[i];
 2506|  1.47k|    p_aux_struct->ttt_config[0][i].bitstream_start_band = 0;
 2507|  1.47k|    p_aux_struct->ttt_config[1][i].bitstream_stop_band = curr_state->bitstream_parameter_bands;
 2508|       |
 2509|  1.47k|    if (config->bs_ttt_dual_mode[i]) {
  ------------------
  |  Branch (2509:9): [True: 1.08k, False: 392]
  ------------------
 2510|  1.08k|      p_aux_struct->ttt_config[0][i].bitstream_stop_band = config->bs_ttt_bands_low[i];
 2511|  1.08k|      p_aux_struct->ttt_config[1][i].bitstream_start_band = config->bs_ttt_bands_low[i];
 2512|  1.08k|    } 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.47k|    if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2517:9): [True: 0, False: 1.47k]
  ------------------
 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.47k|    } else {
 2538|  1.47k|      p_aux_struct->ttt_config[0][i].start_band =
 2539|  1.47k|          p_aux_struct->ttt_config[0][i].bitstream_start_band;
 2540|  1.47k|      p_aux_struct->ttt_config[0][i].stop_band =
 2541|  1.47k|          p_aux_struct->ttt_config[0][i].bitstream_stop_band;
 2542|  1.47k|      p_aux_struct->ttt_config[1][i].start_band =
 2543|  1.47k|          p_aux_struct->ttt_config[1][i].bitstream_start_band;
 2544|  1.47k|      p_aux_struct->ttt_config[1][i].stop_band =
 2545|  1.47k|          p_aux_struct->ttt_config[1][i].bitstream_stop_band;
 2546|  1.47k|    }
 2547|  1.47k|  }
 2548|  3.29k|  curr_state->residual_coding = config->bs_residual_coding;
 2549|  3.29k|  curr_state->num_residual_signals = 0;
 2550|  3.29k|  if (curr_state->residual_coding) {
  ------------------
  |  Branch (2550:7): [True: 527, False: 2.76k]
  ------------------
 2551|  2.73k|    for (i = 0; i < curr_state->num_ttt_boxes + curr_state->num_ott_boxes; i++) {
  ------------------
  |  Branch (2551:17): [True: 2.21k, False: 527]
  ------------------
 2552|  2.21k|      if (config->bs_residual_present[i]) {
  ------------------
  |  Branch (2552:11): [True: 726, False: 1.48k]
  ------------------
 2553|    726|        curr_state->res_bands[i] = config->bs_residual_bands[i];
 2554|    726|        curr_state->num_residual_signals++;
 2555|  1.48k|      } else {
 2556|  1.48k|        curr_state->res_bands[i] = 0;
 2557|  1.48k|      }
 2558|       |
 2559|  2.21k|      if (curr_state->up_mix_type == 2 || curr_state->up_mix_type == 3) {
  ------------------
  |  Branch (2559:11): [True: 0, False: 2.21k]
  |  Branch (2559:43): [True: 0, False: 2.21k]
  ------------------
 2560|      0|        curr_state->res_bands[i] = 0;
 2561|      0|      }
 2562|  2.21k|    }
 2563|    527|  }
 2564|       |
 2565|  3.29k|  curr_state->residual_frames_per_spatial_frame =
 2566|  3.29k|      p_bs_config->bs_residual_frames_per_spatial_frame + 1;
 2567|  3.29k|  if (curr_state->residual_frames_per_spatial_frame > 0) {
  ------------------
  |  Branch (2567:7): [True: 3.29k, False: 0]
  ------------------
 2568|  3.29k|    WORD32 const *reciprocal_tab =
 2569|  3.29k|        pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->reciprocal;
 2570|       |
 2571|  3.29k|    WORD64 temp =
 2572|  3.29k|        (WORD64)(((WORD64)(p_bs_config->bs_frame_length + 1) *
 2573|  3.29k|                  (WORD64)reciprocal_tab[p_bs_config->bs_residual_frames_per_spatial_frame]) >>
 2574|  3.29k|                 28);
 2575|  3.29k|    curr_state->upd_qmf = (WORD32)temp;
 2576|  3.29k|    if (curr_state->upd_qmf != UPD_QMF_15 && curr_state->upd_qmf != UPD_QMF_16 &&
  ------------------
  |  |   30|  6.59k|#define UPD_QMF_15 (15)
  ------------------
                  if (curr_state->upd_qmf != UPD_QMF_15 && curr_state->upd_qmf != UPD_QMF_16 &&
  ------------------
  |  |   31|  6.57k|#define UPD_QMF_16 (16)
  ------------------
  |  Branch (2576:9): [True: 3.28k, False: 13]
  |  Branch (2576:46): [True: 2.19k, False: 1.08k]
  ------------------
 2577|  2.19k|        curr_state->upd_qmf != UPD_QMF_32 && curr_state->upd_qmf != UPD_QMF_18 &&
  ------------------
  |  |   35|  5.49k|#define UPD_QMF_32 (32)
  ------------------
                      curr_state->upd_qmf != UPD_QMF_32 && curr_state->upd_qmf != UPD_QMF_18 &&
  ------------------
  |  |   32|  3.87k|#define UPD_QMF_18 (18)
  ------------------
  |  Branch (2577:9): [True: 581, False: 1.61k]
  |  Branch (2577:46): [True: 553, False: 28]
  ------------------
 2578|    553|        curr_state->upd_qmf != UPD_QMF_30 && curr_state->upd_qmf != UPD_QMF_24)
  ------------------
  |  |   34|  3.84k|#define UPD_QMF_30 (30)
  ------------------
                      curr_state->upd_qmf != UPD_QMF_30 && curr_state->upd_qmf != UPD_QMF_24)
  ------------------
  |  |   33|    519|#define UPD_QMF_24 (24)
  ------------------
  |  Branch (2578:9): [True: 519, False: 34]
  |  Branch (2578:46): [True: 4, False: 515]
  ------------------
 2579|      4|      return IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_QMF_UPDATE;
  ------------------
  |  |  114|      4|#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_QMF_UPDATE 0x00001813
  ------------------
 2580|  3.29k|  }
 2581|       |
 2582|  3.29k|  curr_state->arbdmx_residual_bands = config->bs_arbitrary_downmix_residual_bands;
 2583|  3.29k|  curr_state->arbdmx_frames_per_spatial_frame =
 2584|  3.29k|      config->bs_arbitrary_downmix_residual_frames_per_spatial_frame + 1;
 2585|  3.29k|  if (curr_state->arbdmx_frames_per_spatial_frame > 0) {
  ------------------
  |  Branch (2585:7): [True: 3.29k, False: 0]
  ------------------
 2586|  3.29k|    curr_state->arbdmx_upd_qmf =
 2587|  3.29k|        curr_state->time_slots / curr_state->arbdmx_frames_per_spatial_frame;
 2588|  3.29k|    if (curr_state->arbdmx_upd_qmf != UPD_QMF_15 && curr_state->arbdmx_upd_qmf != UPD_QMF_16 &&
  ------------------
  |  |   30|  6.58k|#define UPD_QMF_15 (15)
  ------------------
                  if (curr_state->arbdmx_upd_qmf != UPD_QMF_15 && curr_state->arbdmx_upd_qmf != UPD_QMF_16 &&
  ------------------
  |  |   31|  6.57k|#define UPD_QMF_16 (16)
  ------------------
  |  Branch (2588:9): [True: 3.27k, False: 13]
  |  Branch (2588:53): [True: 2.19k, False: 1.08k]
  ------------------
 2589|  2.19k|        curr_state->arbdmx_upd_qmf != UPD_QMF_32 && curr_state->arbdmx_upd_qmf != UPD_QMF_18 &&
  ------------------
  |  |   35|  5.48k|#define UPD_QMF_32 (32)
  ------------------
                      curr_state->arbdmx_upd_qmf != UPD_QMF_32 && curr_state->arbdmx_upd_qmf != UPD_QMF_18 &&
  ------------------
  |  |   32|  3.86k|#define UPD_QMF_18 (18)
  ------------------
  |  Branch (2589:9): [True: 577, False: 1.61k]
  |  Branch (2589:53): [True: 549, False: 28]
  ------------------
 2590|    549|        curr_state->arbdmx_upd_qmf != UPD_QMF_30 && curr_state->arbdmx_upd_qmf != UPD_QMF_24)
  ------------------
  |  |   34|  3.84k|#define UPD_QMF_30 (30)
  ------------------
                      curr_state->arbdmx_upd_qmf != UPD_QMF_30 && curr_state->arbdmx_upd_qmf != UPD_QMF_24)
  ------------------
  |  |   33|    516|#define UPD_QMF_24 (24)
  ------------------
  |  Branch (2590:9): [True: 516, False: 33]
  |  Branch (2590:53): [True: 1, False: 515]
  ------------------
 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.29k|    if ((curr_state->arbdmx_upd_qmf * 1.5f) > (curr_state->upd_qmf * 2))
  ------------------
  |  Branch (2593:9): [True: 1, False: 3.29k]
  ------------------
 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.29k|  }
 2596|       |
 2597|  3.29k|  curr_state->cpc_default = 10;
 2598|  3.29k|  curr_state->ttt_cld_1_default[0] = 15;
 2599|  3.29k|  curr_state->ttt_cld_2_default[0] = 0;
 2600|  3.29k|  curr_state->icc_default = 0;
 2601|  3.29k|  curr_state->arbdmx_gain_default = 0;
 2602|       |
 2603|  3.29k|  if (curr_state->_3d_stereo_inversion) {
  ------------------
  |  Branch (2603:7): [True: 3, False: 3.28k]
  ------------------
 2604|      3|    if (config->bs_3d_audio_hrtf_set == 0) {
  ------------------
  |  Branch (2604:9): [True: 2, False: 1]
  ------------------
 2605|      2|      return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_HRTF_SET;
  ------------------
  |  |  132|      2|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_HRTF_SET 0xFFFF980D
  ------------------
 2606|      2|    } 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|      3|  }
 2610|       |
 2611|  3.28k|  switch (curr_state->tree_config) {
 2612|    335|    case TREE_5151:
  ------------------
  |  Branch (2612:5): [True: 335, False: 2.95k]
  ------------------
 2613|    335|      curr_state->num_direct_signals = 1;
 2614|    335|      curr_state->num_decor_signals = 4;
 2615|       |
 2616|    335|      if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2616:11): [True: 0, False: 335]
  ------------------
 2617|      0|        curr_state->num_decor_signals = 1;
 2618|      0|      }
 2619|       |
 2620|    335|      if (curr_state->up_mix_type == 3) {
  ------------------
  |  Branch (2620:11): [True: 0, False: 335]
  ------------------
 2621|      0|        curr_state->num_decor_signals = 3;
 2622|      0|      }
 2623|       |
 2624|    335|      curr_state->num_x_channels = 1;
 2625|    335|      if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (2625:11): [True: 161, False: 174]
  ------------------
 2626|    161|        curr_state->num_x_channels += 1;
 2627|    161|      }
 2628|    335|      curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
 2629|    335|      curr_state->num_w_channels = curr_state->num_v_channels;
 2630|    335|      curr_state->w_start_residual_idx = 0;
 2631|    335|      curr_state->ott_cld_default[0] = 15;
 2632|    335|      curr_state->ott_cld_default[1] = 15;
 2633|    335|      curr_state->ott_cld_default[2] = 0;
 2634|    335|      curr_state->ott_cld_default[3] = 0;
 2635|    335|      curr_state->ott_cld_default[4] = 15;
 2636|    335|      break;
 2637|    352|    case TREE_5152:
  ------------------
  |  Branch (2637:5): [True: 352, False: 2.93k]
  ------------------
 2638|    352|      curr_state->num_direct_signals = 1;
 2639|    352|      curr_state->num_decor_signals = 4;
 2640|       |
 2641|    352|      if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2641:11): [True: 0, False: 352]
  ------------------
 2642|      0|        curr_state->num_decor_signals = 1;
 2643|      0|      }
 2644|       |
 2645|    352|      if (curr_state->up_mix_type == 3) {
  ------------------
  |  Branch (2645:11): [True: 0, False: 352]
  ------------------
 2646|      0|        curr_state->num_decor_signals = 2;
 2647|      0|      }
 2648|       |
 2649|    352|      curr_state->num_x_channels = 1;
 2650|    352|      if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (2650:11): [True: 18, False: 334]
  ------------------
 2651|     18|        curr_state->num_x_channels += 1;
 2652|     18|      }
 2653|    352|      curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
 2654|    352|      curr_state->num_w_channels = curr_state->num_v_channels;
 2655|    352|      curr_state->w_start_residual_idx = 0;
 2656|    352|      curr_state->ott_cld_default[0] = 15;
 2657|    352|      curr_state->ott_cld_default[1] = 0;
 2658|    352|      curr_state->ott_cld_default[2] = 15;
 2659|    352|      curr_state->ott_cld_default[3] = 15;
 2660|    352|      curr_state->ott_cld_default[4] = 15;
 2661|    352|      break;
 2662|    900|    case TREE_525:
  ------------------
  |  Branch (2662:5): [True: 900, False: 2.38k]
  ------------------
 2663|    900|      curr_state->num_direct_signals = 3;
 2664|       |
 2665|  2.69k|      for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (2665:19): [True: 1.80k, False: 899]
  ------------------
 2666|  1.80k|        switch (p_aux_struct->ttt_config[i][0].mode) {
 2667|    719|          case TTT_MODE_0:
  ------------------
  |  Branch (2667:11): [True: 719, False: 1.08k]
  ------------------
 2668|    719|            p_aux_struct->ttt_config[i][0].use_ttt_decorr = 1;
 2669|    719|            curr_state->num_decor_signals = 3;
 2670|    719|            break;
 2671|    174|          case TTT_MODE_1:
  ------------------
  |  Branch (2671:11): [True: 174, False: 1.62k]
  ------------------
 2672|    291|          case TTT_MODE_2:
  ------------------
  |  Branch (2672:11): [True: 117, False: 1.68k]
  ------------------
 2673|    466|          case TTT_MODE_3:
  ------------------
  |  Branch (2673:11): [True: 175, False: 1.62k]
  ------------------
 2674|    773|          case TTT_MODE_4:
  ------------------
  |  Branch (2674:11): [True: 307, False: 1.49k]
  ------------------
 2675|    938|          case TTT_MODE_5:
  ------------------
  |  Branch (2675:11): [True: 165, False: 1.63k]
  ------------------
 2676|    938|            p_aux_struct->ttt_config[i][0].use_ttt_decorr = 0;
 2677|    938|            curr_state->num_decor_signals = 2;
 2678|    938|            break;
 2679|    143|          default:
  ------------------
  |  Branch (2679:11): [True: 143, False: 1.65k]
  ------------------
 2680|    143|            if (p_bs_config->bs_ttt_mode_low[0] <= 1)
  ------------------
  |  Branch (2680:17): [True: 1, False: 142]
  ------------------
 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|    142|            break;
 2683|  1.80k|        }
 2684|  1.80k|      }
 2685|       |
 2686|    899|      if (curr_state->residual_coding == 1) {
  ------------------
  |  Branch (2686:11): [True: 434, False: 465]
  ------------------
 2687|    434|        curr_state->num_x_channels = 3;
 2688|    465|      } else {
 2689|    465|        curr_state->num_x_channels = 2;
 2690|    465|      }
 2691|       |
 2692|    899|      if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (2692:11): [True: 37, False: 862]
  ------------------
 2693|     37|        curr_state->num_x_channels = 5;
 2694|     37|      }
 2695|       |
 2696|    899|      if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2696:11): [True: 0, False: 899]
  ------------------
 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|    899|      curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
 2708|    899|      curr_state->num_w_channels = curr_state->num_v_channels;
 2709|    899|      curr_state->w_start_residual_idx = 1;
 2710|    899|      curr_state->ott_cld_default[0] = 15;
 2711|    899|      curr_state->ott_cld_default[1] = 15;
 2712|    899|      curr_state->ott_cld_default[2] = 15;
 2713|    899|      break;
 2714|    341|    case TREE_7271:
  ------------------
  |  Branch (2714:5): [True: 341, False: 2.94k]
  ------------------
 2715|    570|    case TREE_7272:
  ------------------
  |  Branch (2715:5): [True: 229, False: 3.05k]
  ------------------
 2716|    570|      curr_state->num_direct_signals = 3;
 2717|       |
 2718|  1.70k|      for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (2718:19): [True: 1.14k, False: 569]
  ------------------
 2719|  1.14k|        switch (p_aux_struct->ttt_config[i][0].mode) {
 2720|    483|          case TTT_MODE_0:
  ------------------
  |  Branch (2720:11): [True: 483, False: 657]
  ------------------
 2721|    483|            p_aux_struct->ttt_config[i][0].use_ttt_decorr = 1;
 2722|    483|            curr_state->num_decor_signals = 5;
 2723|    483|            break;
 2724|     58|          case TTT_MODE_1:
  ------------------
  |  Branch (2724:11): [True: 58, False: 1.08k]
  ------------------
 2725|    144|          case TTT_MODE_2:
  ------------------
  |  Branch (2725:11): [True: 86, False: 1.05k]
  ------------------
 2726|    318|          case TTT_MODE_3:
  ------------------
  |  Branch (2726:11): [True: 174, False: 966]
  ------------------
 2727|    450|          case TTT_MODE_4:
  ------------------
  |  Branch (2727:11): [True: 132, False: 1.00k]
  ------------------
 2728|    491|          case TTT_MODE_5:
  ------------------
  |  Branch (2728:11): [True: 41, False: 1.09k]
  ------------------
 2729|    491|            p_aux_struct->ttt_config[i][0].use_ttt_decorr = 0;
 2730|    491|            curr_state->num_decor_signals = 5;
 2731|    491|            break;
 2732|    166|          default:
  ------------------
  |  Branch (2732:11): [True: 166, False: 974]
  ------------------
 2733|    166|            if (p_bs_config->bs_ttt_mode_low[0] <= 1)
  ------------------
  |  Branch (2733:17): [True: 1, False: 165]
  ------------------
 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|    165|            break;
 2736|  1.14k|        }
 2737|  1.14k|      }
 2738|       |
 2739|    569|      if (curr_state->residual_coding == 1) {
  ------------------
  |  Branch (2739:11): [True: 33, False: 536]
  ------------------
 2740|     33|        curr_state->num_x_channels = 3;
 2741|    536|      } else {
 2742|    536|        curr_state->num_x_channels = 2;
 2743|    536|      }
 2744|       |
 2745|    569|      if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (2745:11): [True: 26, False: 543]
  ------------------
 2746|     26|        curr_state->num_x_channels = 5;
 2747|     26|      }
 2748|       |
 2749|    569|      if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2749:11): [True: 0, False: 569]
  ------------------
 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|    569|      curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
 2761|    569|      curr_state->num_w_channels = curr_state->num_v_channels;
 2762|    569|      curr_state->w_start_residual_idx = 1;
 2763|    569|      curr_state->ott_cld_default[0] = 15;
 2764|    569|      curr_state->ott_cld_default[1] = 15;
 2765|    569|      curr_state->ott_cld_default[2] = 15;
 2766|    569|      curr_state->ott_cld_default[3] = 15;
 2767|    569|      curr_state->ott_cld_default[4] = 15;
 2768|    569|      break;
 2769|    169|    case TREE_7571:
  ------------------
  |  Branch (2769:5): [True: 169, False: 3.11k]
  ------------------
 2770|  1.13k|    case TREE_7572:
  ------------------
  |  Branch (2770:5): [True: 961, False: 2.32k]
  ------------------
 2771|  1.13k|      curr_state->num_direct_signals = 6;
 2772|  1.13k|      curr_state->num_decor_signals = 2;
 2773|  1.13k|      curr_state->num_x_channels = 6;
 2774|  1.13k|      curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
 2775|  1.13k|      curr_state->num_w_channels = curr_state->num_v_channels;
 2776|  1.13k|      curr_state->w_start_residual_idx = 0;
 2777|  1.13k|      curr_state->ott_cld_default[0] = 15;
 2778|  1.13k|      curr_state->ott_cld_default[1] = 15;
 2779|  1.13k|      break;
 2780|      0|    default:
  ------------------
  |  Branch (2780:5): [True: 0, False: 3.28k]
  ------------------
 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.28k|  }
 2784|  3.28k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  3.28k|#define IA_NO_ERROR 0x00000000
  ------------------
 2785|  3.28k|}
ixheaacd_mps_bitdec.c:ixheaacd_parse_extension_config:
  104|  3.35k|    ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
  105|  3.35k|  WORD32 i, ch, idx, tmp, tmp_open, sac_ext_len, bits_read, n_fill_bits, temp;
  106|  3.35k|  WORD32 ba = bits_available;
  107|       |
  108|  3.35k|  config->sac_ext_cnt = 0;
  109|       |
  110|  3.35k|  WORD32 num_slots = config->bs_frame_length + 1;
  111|       |
  112|  4.24k|  while (ba >= 8) {
  ------------------
  |  Branch (112:10): [True: 950, False: 3.29k]
  ------------------
  113|    950|    ba -= 8;
  114|    950|    temp = ixheaacd_read_bits_buf(it_bit_buff, 8);
  115|    950|    config->bs_sac_ext_type[config->sac_ext_cnt] = (temp >> 4) & FOUR_BIT_MASK;
  ------------------
  |  |  207|    950|#define FOUR_BIT_MASK (0x0000000F)
  ------------------
  116|    950|    sac_ext_len = temp & FOUR_BIT_MASK;
  ------------------
  |  |  207|    950|#define FOUR_BIT_MASK (0x0000000F)
  ------------------
  117|    950|    if (sac_ext_len == 15) {
  ------------------
  |  Branch (117:9): [True: 4, False: 946]
  ------------------
  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|    950|    tmp = (WORD32)(((it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base + 1) << 3) -
  127|    950|                   (it_bit_buff->bit_pos + 1));
  128|       |
  129|    950|    switch (config->bs_sac_ext_type[config->sac_ext_cnt]) {
  130|    634|      case EXT_TYPE_0:
  ------------------
  |  Branch (130:7): [True: 634, False: 316]
  ------------------
  131|    634|        config->bs_residual_coding = 1;
  132|    634|        temp = ixheaacd_read_bits_buf(it_bit_buff, 6);
  133|    634|        config->bs_residual_sampling_freq_index = (temp >> 2) & FOUR_BIT_MASK;
  ------------------
  |  |  207|    634|#define FOUR_BIT_MASK (0x0000000F)
  ------------------
  134|    634|        if (config->bs_residual_sampling_freq_index > MAX_RES_SAMP_FREQ_IDX) {
  ------------------
  |  |   71|    634|#define MAX_RES_SAMP_FREQ_IDX 11
  ------------------
  |  Branch (134:13): [True: 3, False: 631]
  ------------------
  135|      3|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
  136|      3|        }
  137|    631|        config->bs_residual_frames_per_spatial_frame = temp & TWO_BIT_MASK;
  ------------------
  |  |  205|    631|#define TWO_BIT_MASK (0x00000003)
  ------------------
  138|       |
  139|    631|        if (!ixheaacd_validate_res_frames_per_spatial_frame(
  ------------------
  |  Branch (139:13): [True: 8, False: 623]
  ------------------
  140|    631|                num_slots, config->bs_residual_frames_per_spatial_frame)) {
  141|      8|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      8|#define IA_FATAL_ERROR 0x80000000
  ------------------
  142|      8|        }
  143|       |
  144|  3.23k|        for (i = 0; i < num_ott_boxes + num_ttt_boxes; i++) {
  ------------------
  |  Branch (144:21): [True: 2.61k, False: 617]
  ------------------
  145|  2.61k|          config->bs_residual_present[i] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  146|  2.61k|          if (config->bs_residual_present[i]) {
  ------------------
  |  Branch (146:15): [True: 798, False: 1.81k]
  ------------------
  147|    798|            config->bs_residual_bands[i] = ixheaacd_read_bits_buf(it_bit_buff, 5);
  148|    798|            if (config->bs_residual_bands[i] > MAX_PARAMETER_BANDS)
  ------------------
  |  |   55|    798|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (148:17): [True: 6, False: 792]
  ------------------
  149|      6|            {
  150|      6|              return IA_FATAL_ERROR;
  ------------------
  |  |   25|      6|#define IA_FATAL_ERROR 0x80000000
  ------------------
  151|      6|            }
  152|    798|          }
  153|  2.61k|        }
  154|    617|        break;
  155|       |
  156|    617|      case EXT_TYPE_1:
  ------------------
  |  Branch (156:7): [True: 267, False: 683]
  ------------------
  157|    267|        config->bs_arbitrary_downmix = 2;
  158|       |
  159|    267|        temp = ixheaacd_read_bits_buf(it_bit_buff, 11);
  160|    267|        config->bs_arbitrary_downmix_residual_sampling_freq_index = (temp >> 7) & FOUR_BIT_MASK;
  ------------------
  |  |  207|    267|#define FOUR_BIT_MASK (0x0000000F)
  ------------------
  161|    267|        if (config->bs_arbitrary_downmix_residual_sampling_freq_index > MAX_RES_SAMP_FREQ_IDX) {
  ------------------
  |  |   71|    267|#define MAX_RES_SAMP_FREQ_IDX 11
  ------------------
  |  Branch (161:13): [True: 1, False: 266]
  ------------------
  162|      1|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  163|      1|        }
  164|    266|        config->bs_arbitrary_downmix_residual_frames_per_spatial_frame =
  165|    266|            (temp >> 5) & TWO_BIT_MASK;
  ------------------
  |  |  205|    266|#define TWO_BIT_MASK (0x00000003)
  ------------------
  166|       |
  167|    266|        if (!ixheaacd_validate_res_frames_per_spatial_frame(
  ------------------
  |  Branch (167:13): [True: 3, False: 263]
  ------------------
  168|    266|                num_slots, config->bs_arbitrary_downmix_residual_frames_per_spatial_frame)) {
  169|      3|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
  170|      3|        }
  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: 40, False: 910]
  ------------------
  181|     40|        config->arbitrary_tree = 1;
  182|     40|        config->num_out_chan_at = 0;
  183|     40|        config->num_ott_boxes_at = 0;
  184|    243|        for (ch = 0; ch < num_out_chan; ch++) {
  ------------------
  |  Branch (184:22): [True: 215, False: 28]
  ------------------
  185|    215|          tmp_open = 1;
  186|    215|          idx = 0;
  187|    573|          while (tmp_open > 0) {
  ------------------
  |  Branch (187:18): [True: 370, False: 203]
  ------------------
  188|    370|            config->bs_ott_box_present_at[ch][idx] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  189|    370|            if (config->bs_ott_box_present_at[ch][idx]) {
  ------------------
  |  Branch (189:17): [True: 96, False: 274]
  ------------------
  190|     96|              config->num_ott_boxes_at++;
  191|     96|              tmp_open++;
  192|    274|            } else {
  193|    274|              config->num_out_chan_at++;
  194|    274|              tmp_open--;
  195|    274|            }
  196|    370|            if (config->num_ott_boxes_at >= 56) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (196:17): [True: 0, False: 370]
  ------------------
  197|    370|            if (config->num_out_chan_at > MAX_OUTPUT_CHANNELS_AT_MPS) return IA_FATAL_ERROR;
  ------------------
  |  |   86|    370|#define MAX_OUTPUT_CHANNELS_AT_MPS (8)
  ------------------
                          if (config->num_out_chan_at > MAX_OUTPUT_CHANNELS_AT_MPS) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      5|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (197:17): [True: 5, False: 365]
  ------------------
  198|    365|            idx++;
  199|    365|            if (idx >= MAX_ARBITRARY_TREE_INDEX) return IA_FATAL_ERROR;
  ------------------
  |  |   69|    365|#define MAX_ARBITRARY_TREE_INDEX ((1 << (MAX_ARBITRARY_TREE_LEVELS + 1)) - 1)
  |  |  ------------------
  |  |  |  |   66|    365|#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: 358]
  ------------------
  200|    365|          }
  201|    215|        }
  202|       |
  203|     63|        for (i = 0; i < config->num_ott_boxes_at; i++) {
  ------------------
  |  Branch (203:21): [True: 36, False: 27]
  ------------------
  204|     36|          temp = ixheaacd_read_bits_buf(it_bit_buff, 2);
  205|     36|          config->bs_ott_default_cld_at[i] = (temp >> 1) & ONE_BIT_MASK;
  ------------------
  |  |  204|     36|#define ONE_BIT_MASK (0x00000001)
  ------------------
  206|     36|          config->bs_ott_mode_lfe_at[i] = temp & ONE_BIT_MASK;
  ------------------
  |  |  204|     36|#define ONE_BIT_MASK (0x00000001)
  ------------------
  207|     36|          if (config->bs_ott_mode_lfe_at[i]) {
  ------------------
  |  Branch (207:15): [True: 14, False: 22]
  ------------------
  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|     22|          } else {
  211|     22|            config->bs_ott_bands_at[i] =
  212|     22|                ixheaacd_mps_dec_bitdec_tables->freq_res_table[config->bs_freq_res];
  213|     22|          }
  214|     36|        }
  215|       |
  216|    212|        for (i = 0; i < config->num_out_chan_at; i++) {
  ------------------
  |  Branch (216:21): [True: 185, False: 27]
  ------------------
  217|    185|          config->bs_output_channel_pos_at[i] = ixheaacd_read_bits_buf(it_bit_buff, 5);
  218|    185|        }
  219|       |
  220|     27|        break;
  221|       |
  222|      6|      default:
  ------------------
  |  Branch (222:7): [True: 6, False: 944]
  ------------------
  223|      6|        return IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_EXTENSION_TYPE;
  ------------------
  |  |  113|      6|#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_EXTENSION_TYPE 0x00001812
  ------------------
  224|    950|    }
  225|       |
  226|    901|    bits_read = (WORD32)(((it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base + 1) << 3) -
  227|    901|                         (it_bit_buff->bit_pos + 1) - tmp);
  228|    901|    n_fill_bits = 8 * sac_ext_len - bits_read;
  229|       |
  230|  3.37k|    while (n_fill_bits > 7) {
  ------------------
  |  Branch (230:12): [True: 2.47k, False: 901]
  ------------------
  231|  2.47k|      ixheaacd_read_bits_buf(it_bit_buff, 8);
  232|  2.47k|      n_fill_bits -= 8;
  233|  2.47k|    }
  234|    901|    if (n_fill_bits > 0) {
  ------------------
  |  Branch (234:9): [True: 440, False: 461]
  ------------------
  235|    440|      ixheaacd_read_bits_buf(it_bit_buff, n_fill_bits);
  236|    440|    }
  237|       |
  238|    901|    ba -= 8 * sac_ext_len;
  239|    901|    config->sac_ext_cnt++;
  240|    901|    if (config->sac_ext_cnt >= MAX_NUM_EXT_TYPES) {
  ------------------
  |  |   61|    901|#define MAX_NUM_EXT_TYPES (8)
  ------------------
  |  Branch (240:9): [True: 2, False: 899]
  ------------------
  241|      2|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
  242|      2|    }
  243|    901|  }
  244|       |
  245|  3.29k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  3.29k|#define IA_NO_ERROR 0x00000000
  ------------------
  246|  3.35k|}
ixheaacd_mps_bitdec.c:ixheaacd_ec_data_dec:
  498|  73.3k|                                         WORD32 stop_band) {
  499|  73.3k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  73.3k|#define IA_NO_ERROR 0x00000000
  ------------------
  500|  73.3k|  WORD32 i, pb, data_sets, set_idx, bs_data_pair, data_bands, old_quant_coarse_xxx, temp;
  501|  73.3k|  WORD32 a_strides[MAX_PARAMETER_BANDS + 1] = {0};
  502|       |
  503|  73.3k|  ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
  504|  73.3k|  ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
  505|       |
  506|  73.3k|  data_sets = 0;
  507|   203k|  for (i = 0; i < pstr_mps_state->num_parameter_sets; i++) {
  ------------------
  |  Branch (507:15): [True: 130k, False: 73.3k]
  ------------------
  508|   130k|    ll_data->bs_xxx_data_mode[param_idx][i] = ixheaacd_read_bits_buf(mps_bit_buf, 2);
  509|   130k|    if (ll_data->bs_xxx_data_mode[param_idx][i] == 3) {
  ------------------
  |  Branch (509:9): [True: 24.3k, False: 105k]
  ------------------
  510|  24.3k|      data_sets++;
  511|  24.3k|    }
  512|   130k|  }
  513|  73.3k|  set_idx = 0;
  514|  73.3k|  old_quant_coarse_xxx = ll_data->bs_quant_coarse_xxx_prev[param_idx];
  515|       |
  516|  93.1k|  while (set_idx < data_sets) {
  ------------------
  |  Branch (516:10): [True: 19.9k, False: 73.2k]
  ------------------
  517|  19.9k|    temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
  518|  19.9k|    bs_data_pair = (temp >> 3) & ONE_BIT_MASK;
  ------------------
  |  |  204|  19.9k|#define ONE_BIT_MASK (0x00000001)
  ------------------
  519|  19.9k|    ll_data->bs_quant_coarse_xxx[param_idx][set_idx] = (temp >> 2) & ONE_BIT_MASK;
  ------------------
  |  |  204|  19.9k|#define ONE_BIT_MASK (0x00000001)
  ------------------
  520|  19.9k|    ll_data->bs_freq_res_stride_xxx[param_idx][set_idx] = temp & TWO_BIT_MASK;
  ------------------
  |  |  205|  19.9k|#define TWO_BIT_MASK (0x00000003)
  ------------------
  521|       |
  522|  19.9k|    if (set_idx == 7 && bs_data_pair == 1) {
  ------------------
  |  Branch (522:9): [True: 25, False: 19.8k]
  |  Branch (522:25): [True: 3, False: 22]
  ------------------
  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.9k|    if (ll_data->bs_quant_coarse_xxx[param_idx][set_idx] != old_quant_coarse_xxx) {
  ------------------
  |  Branch (530:9): [True: 6.64k, False: 13.2k]
  ------------------
  531|  6.64k|      if (old_quant_coarse_xxx) {
  ------------------
  |  Branch (531:11): [True: 1.00k, False: 5.63k]
  ------------------
  532|  1.00k|        ixheaacd_coarse_2_fine(lastdata[box_idx], datatype, start_band, stop_band - start_band);
  533|  5.63k|      } else {
  534|  5.63k|        ixheaacd_fine_2_coarse(lastdata[box_idx], start_band, stop_band - start_band);
  535|  5.63k|      }
  536|  6.64k|    }
  537|       |
  538|  19.9k|    data_bands = ixheaacd_get_stride_map(ll_data->bs_freq_res_stride_xxx[param_idx][set_idx],
  539|  19.9k|                                         start_band, stop_band, a_strides,
  540|  19.9k|                                         pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr);
  541|       |
  542|   135k|    for (pb = 0; pb < data_bands; pb++) {
  ------------------
  |  Branch (542:18): [True: 115k, False: 19.9k]
  ------------------
  543|   115k|      lastdata[box_idx][start_band + pb] = lastdata[box_idx][a_strides[pb]];
  544|   115k|    }
  545|       |
  546|  19.9k|    error_code = ixheaacd_mps_ecdatapairdec(
  547|  19.9k|        mps_bit_buf, data[box_idx], lastdata[box_idx], datatype, set_idx, start_band, data_bands,
  548|  19.9k|        bs_data_pair, ll_data->bs_quant_coarse_xxx[param_idx][set_idx],
  549|  19.9k|        (!frame->bs_independency_flag || (set_idx > 0)), 0, 1, pstr_mps_state->ec_flag);
  ------------------
  |  Branch (549:10): [True: 10.9k, False: 8.97k]
  |  Branch (549:42): [True: 2.89k, False: 6.08k]
  ------------------
  550|  19.9k|    if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  19.9k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (550:9): [True: 6, False: 19.9k]
  ------------------
  551|       |
  552|  19.9k|    if (datatype == CLD) {
  ------------------
  |  |   23|  19.9k|#define CLD (0)
  ------------------
  |  Branch (552:9): [True: 15.2k, False: 4.65k]
  ------------------
  553|  15.2k|      WORD32 band;
  554|  67.2k|      for (i = 0; i < pstr_mps_state->num_parameter_sets; i++) {
  ------------------
  |  Branch (554:19): [True: 52.0k, False: 15.1k]
  ------------------
  555|   794k|        for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (555:33): [True: 742k, False: 51.9k]
  ------------------
  556|   742k|          if (data[box_idx][i][band] > 15 || data[box_idx][i][band] < -15) {
  ------------------
  |  Branch (556:15): [True: 37, False: 742k]
  |  Branch (556:46): [True: 7, False: 742k]
  ------------------
  557|     44|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|     44|#define IA_FATAL_ERROR 0x80000000
  ------------------
  558|     44|          }
  559|   742k|        }
  560|  52.0k|      }
  561|  15.2k|    } else if (datatype == ICC) {
  ------------------
  |  |   24|  4.65k|#define ICC (1)
  ------------------
  |  Branch (561:16): [True: 3.51k, False: 1.14k]
  ------------------
  562|  3.51k|      WORD32 band;
  563|  19.1k|      for (i = 0; i < pstr_mps_state->num_parameter_sets; i++) {
  ------------------
  |  Branch (563:19): [True: 15.7k, False: 3.47k]
  ------------------
  564|   231k|        for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (564:33): [True: 215k, False: 15.6k]
  ------------------
  565|   215k|          if (data[box_idx][i][band] > 7 || data[box_idx][i][band] < 0) {
  ------------------
  |  Branch (565:15): [True: 18, False: 215k]
  |  Branch (565:45): [True: 21, False: 215k]
  ------------------
  566|     39|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|     39|#define IA_FATAL_ERROR 0x80000000
  ------------------
  567|     39|          }
  568|   215k|        }
  569|  15.7k|      }
  570|  3.51k|    }
  571|       |
  572|   133k|    for (pb = 0; pb < data_bands; pb++) {
  ------------------
  |  Branch (572:18): [True: 113k, False: 19.8k]
  ------------------
  573|   426k|      for (i = a_strides[pb]; i < a_strides[pb + 1]; i++) {
  ------------------
  |  Branch (573:31): [True: 313k, False: 113k]
  ------------------
  574|   313k|        lastdata[box_idx][i] = data[box_idx][set_idx + bs_data_pair][start_band + pb];
  575|   313k|      }
  576|   113k|    }
  577|       |
  578|  19.8k|    old_quant_coarse_xxx = ll_data->bs_quant_coarse_xxx[param_idx][set_idx];
  579|       |
  580|  19.8k|    if (bs_data_pair) {
  ------------------
  |  Branch (580:9): [True: 12.2k, False: 7.53k]
  ------------------
  581|  12.2k|      ll_data->bs_quant_coarse_xxx[param_idx][set_idx + 1] =
  582|  12.2k|          ll_data->bs_quant_coarse_xxx[param_idx][set_idx];
  583|  12.2k|      ll_data->bs_freq_res_stride_xxx[param_idx][set_idx + 1] =
  584|  12.2k|          ll_data->bs_freq_res_stride_xxx[param_idx][set_idx];
  585|  12.2k|    }
  586|  19.8k|    set_idx += bs_data_pair + 1;
  587|  19.8k|  }
  588|  73.2k|  return error_code;
  589|  73.3k|}
ixheaacd_mps_bitdec.c:ixheaacd_coarse_2_fine:
  445|  6.99k|                                   WORD32 num_bands) {
  446|  6.99k|  WORD32 i;
  447|       |
  448|  80.8k|  for (i = start_band; i < start_band + num_bands; i++) {
  ------------------
  |  Branch (448:24): [True: 73.8k, False: 6.99k]
  ------------------
  449|  73.8k|    data[i] <<= 1;
  450|  73.8k|  }
  451|       |
  452|  6.99k|  if (data_type == CLD) {
  ------------------
  |  |   23|  6.99k|#define CLD (0)
  ------------------
  |  Branch (452:7): [True: 5.05k, False: 1.93k]
  ------------------
  453|  52.6k|    for (i = start_band; i < start_band + num_bands; i++) {
  ------------------
  |  Branch (453:26): [True: 47.5k, False: 5.05k]
  ------------------
  454|  47.5k|      if (data[i] == -14)
  ------------------
  |  Branch (454:11): [True: 7.38k, False: 40.1k]
  ------------------
  455|  7.38k|        data[i] = -15;
  456|  40.1k|      else if (data[i] == 14)
  ------------------
  |  Branch (456:16): [True: 7.15k, False: 33.0k]
  ------------------
  457|  7.15k|        data[i] = 15;
  458|  47.5k|    }
  459|  5.05k|  }
  460|  6.99k|}
ixheaacd_mps_bitdec.c:ixheaacd_fine_2_coarse:
  462|  5.63k|static VOID ixheaacd_fine_2_coarse(WORD32 *data, WORD32 start_band, WORD32 num_bands) {
  463|  5.63k|  WORD32 i;
  464|       |
  465|  79.1k|  for (i = start_band; i < start_band + num_bands; i++) {
  ------------------
  |  Branch (465:24): [True: 73.5k, False: 5.63k]
  ------------------
  466|  73.5k|    data[i] >>= 1;
  467|  73.5k|  }
  468|  5.63k|}
ixheaacd_mps_bitdec.c:ixheaacd_get_stride_map:
  472|  19.9k|    ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
  473|  19.9k|  WORD32 i, pb, pb_stride, data_bands, str_offset;
  474|       |
  475|  19.9k|  pb_stride = ixheaacd_mps_dec_bitdec_tables->pb_stride_table[freq_res_stride];
  476|  19.9k|  data_bands = (stop_band - start_band - 1) / pb_stride + 1;
  477|       |
  478|  19.9k|  a_strides[0] = start_band;
  479|   135k|  for (pb = 1; pb <= data_bands; pb++) {
  ------------------
  |  Branch (479:16): [True: 115k, False: 19.9k]
  ------------------
  480|   115k|    a_strides[pb] = a_strides[pb - 1] + pb_stride;
  481|   115k|  }
  482|  19.9k|  str_offset = 0;
  483|   118k|  while (a_strides[data_bands] > stop_band) {
  ------------------
  |  Branch (483:10): [True: 98.9k, False: 19.9k]
  ------------------
  484|  98.9k|    if (str_offset < data_bands) str_offset++;
  ------------------
  |  Branch (484:9): [True: 9.76k, False: 89.2k]
  ------------------
  485|   205k|    for (i = str_offset; i <= data_bands; i++) {
  ------------------
  |  Branch (485:26): [True: 106k, False: 98.9k]
  ------------------
  486|   106k|      a_strides[i]--;
  487|   106k|    }
  488|  98.9k|  }
  489|       |
  490|  19.9k|  return data_bands;
  491|  19.9k|}
ixheaacd_mps_bitdec.c:ixheaacd_parse_arbitrary_downmix_data:
  592|  1.16k|    ia_heaac_mps_state_struct *pstr_mps_state) {
  593|  1.16k|  ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
  594|  1.16k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  1.16k|#define IA_NO_ERROR 0x00000000
  ------------------
  595|  1.16k|  WORD32 offset = pstr_mps_state->num_ott_boxes + 4 * pstr_mps_state->num_ttt_boxes;
  596|  1.16k|  WORD32 num_input_channels = pstr_mps_state->num_input_channels;
  597|  1.16k|  WORD32 bitstream_parameter_bands = pstr_mps_state->bitstream_parameter_bands;
  598|  1.16k|  WORD32 ch;
  599|       |
  600|  2.90k|  for (ch = 0; ch < num_input_channels; ch++) {
  ------------------
  |  Branch (600:16): [True: 1.76k, False: 1.14k]
  ------------------
  601|  1.76k|    error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data,
  602|  1.76k|                                      frame->cmp_arbdmx_gain_idx, frame->cmp_arbdmx_gain_idx_prev,
  603|  1.76k|                                      CLD, ch, offset + ch, 0, bitstream_parameter_bands);
  ------------------
  |  |   23|  1.76k|#define CLD (0)
  ------------------
  604|  1.76k|    if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  1.76k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (604:9): [True: 19, False: 1.74k]
  ------------------
  605|  1.76k|  }
  606|  1.14k|  return error_code;
  607|  1.16k|}
ixheaacd_mps_bitdec.c:ixheaacd_parse_extension_frame:
  714|  14.2k|static IA_ERRORCODE ixheaacd_parse_extension_frame(ia_heaac_mps_state_struct *pstr_mps_state) {
  715|  14.2k|  WORD32 i, fr, gr, offset, ch;
  716|  14.2k|  WORD32 ext_num, sac_ext_type, sac_ext_len, tmp, bits_read, n_fill_bits, temp;
  717|  14.2k|  WORD32 channel_grouping[MAX_INPUT_CHANNELS_MPS];
  718|       |
  719|  14.2k|  ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
  720|  14.2k|  ia_mps_spatial_bs_config_struct *p_bs_config = &pstr_mps_state->bs_config;
  721|       |
  722|  14.2k|  ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr =
  723|  14.2k|      pstr_mps_state->ia_mps_dec_mps_table.aac_tab;
  724|       |
  725|  14.2k|  WORD32 arbdmx_upd_qmf = pstr_mps_state->arbdmx_upd_qmf;
  726|  14.2k|  WORD32 num_ott_boxes = pstr_mps_state->num_ott_boxes;
  727|  14.2k|  WORD32 num_input_channels = pstr_mps_state->num_input_channels;
  728|  14.2k|  WORD32 num_ttt_boxes = pstr_mps_state->num_ttt_boxes;
  729|  14.2k|  WORD32 arbdmx_frames_per_spatial_frame = pstr_mps_state->arbdmx_frames_per_spatial_frame;
  730|  14.2k|  WORD32 *p_res_mdct, *p_mdct_res;
  731|       |
  732|  14.2k|  WORD32 sfidx;
  733|  14.2k|  VOID *free_scratch = pstr_mps_state->mps_scratch_mem_v;
  734|  14.2k|  ia_mps_dec_residual_sfband_info_struct *p_sfband_info_tab = &pstr_mps_state->sfband_info_tab;
  735|  14.2k|  ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
  736|  14.2k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  14.2k|#define IA_NO_ERROR 0x00000000
  ------------------
  737|       |
  738|  42.6k|  for (ch = 0; ch < 2; ch++) {
  ------------------
  |  Branch (738:16): [True: 28.4k, False: 14.2k]
  ------------------
  739|  28.4k|    pstr_mps_state->p_aac_decoder_channel_info[ch] = free_scratch;
  740|  28.4k|    free_scratch =
  741|  28.4k|        (WORD8 *)free_scratch +
  742|  28.4k|        IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_residual_channel_info_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  28.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  743|  28.4k|    pstr_mps_state->p_aac_decoder_dynamic_data_init[ch] = free_scratch;
  744|  28.4k|    free_scratch =
  745|  28.4k|        (WORD8 *)free_scratch +
  746|  28.4k|        IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_residual_dynamic_data_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  28.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  747|  28.4k|    pstr_mps_state->p_aac_decoder_channel_info[ch]->p_scale_factor =
  748|  28.4k|        pstr_mps_state->p_aac_decoder_dynamic_data_init[ch]->a_scale_factor;
  749|  28.4k|    pstr_mps_state->p_aac_decoder_channel_info[ch]->p_code_book =
  750|  28.4k|        pstr_mps_state->p_aac_decoder_dynamic_data_init[ch]->a_code_book;
  751|  28.4k|    pstr_mps_state->p_aac_decoder_channel_info[ch]->p_spectral_coefficient = free_scratch;
  752|  28.4k|    free_scratch = (WORD8 *)free_scratch + IXHEAAC_GET_SIZE_ALIGNED(4096, BYTE_ALIGN_8);
  ------------------
  |  |   87|  28.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  753|  28.4k|    pstr_mps_state->p_aac_decoder_channel_info[ch]->p_tns_scratch = free_scratch;
  754|  28.4k|    free_scratch = (WORD8 *)free_scratch + IXHEAAC_GET_SIZE_ALIGNED(4096, BYTE_ALIGN_8);
  ------------------
  |  |   87|  28.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  755|  28.4k|    pstr_mps_state->p_aac_decoder_channel_info[ch]->ics_info.frame_length = AAC_FRAME_LENGTH;
  ------------------
  |  |   23|  28.4k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  756|  28.4k|    pstr_mps_state->p_aac_decoder_channel_info[ch]->common_window = 0;
  757|  28.4k|  }
  758|  14.2k|  if (pstr_mps_state->arbitrary_downmix == 2)
  ------------------
  |  Branch (758:7): [True: 250, False: 13.9k]
  ------------------
  759|    250|    sfidx = p_bs_config->bs_arbitrary_downmix_residual_sampling_freq_index;
  760|  13.9k|  else
  761|  13.9k|    sfidx = p_bs_config->bs_residual_sampling_freq_index;
  762|  14.2k|  {
  763|  14.2k|    WORD16 *psfb_idx[2];
  764|  14.2k|    const WORD8 *psfb_width[2];
  765|  14.2k|    WORD width_idx;
  766|  14.2k|    WORD32 j;
  767|       |
  768|  14.2k|    pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.sampling_rate_index = sfidx;
  769|  14.2k|    psfb_idx[0] = p_sfband_info_tab->sfb_long_idx;
  770|  14.2k|    psfb_idx[1] = p_sfband_info_tab->sfb_short_idx;
  771|  14.2k|    psfb_width[0] = aac_tables_ptr->scale_factor_bands_long[sfidx];
  772|  14.2k|    psfb_width[1] = aac_tables_ptr->scale_factor_bands_short[sfidx];
  773|       |
  774|  42.6k|    for (j = 1; j >= 0; j--) {
  ------------------
  |  Branch (774:17): [True: 28.4k, False: 14.2k]
  ------------------
  775|  28.4k|      const WORD8 *ptr_w = psfb_width[j];
  776|  28.4k|      WORD16 *ptr_i = psfb_idx[j];
  777|  28.4k|      width_idx = 0;
  778|  28.4k|      *ptr_i++ = width_idx;
  779|   756k|      do {
  780|   756k|        width_idx += (*ptr_w++);
  781|   756k|        *ptr_i++ = width_idx;
  782|   756k|      } while (*ptr_w != -1);
  ------------------
  |  Branch (782:16): [True: 727k, False: 28.4k]
  ------------------
  783|       |
  784|  28.4k|      pstr_mps_state->tot_sf_bands_ls[j] = (WORD8)(ptr_w - psfb_width[j]);
  785|  28.4k|    }
  786|       |
  787|  14.2k|    {
  788|  14.2k|      aac_tables_ptr->sfb_index_long = p_sfband_info_tab->sfb_long_idx;
  789|  14.2k|      aac_tables_ptr->sfb_index_short = p_sfband_info_tab->sfb_short_idx;
  790|  14.2k|      aac_tables_ptr->sfb_index_long_width = (WORD8 *)psfb_width[0];
  791|  14.2k|      aac_tables_ptr->sfb_index_short_width = (WORD8 *)psfb_width[1];
  792|  14.2k|    }
  793|  14.2k|  }
  794|       |
  795|  14.8k|  for (ext_num = 0; ext_num < p_bs_config->sac_ext_cnt; ext_num++) {
  ------------------
  |  Branch (795:21): [True: 798, False: 14.0k]
  ------------------
  796|    798|    sac_ext_type = p_bs_config->bs_sac_ext_type[ext_num];
  797|       |
  798|    798|    if (sac_ext_type < 12) {
  ------------------
  |  Branch (798:9): [True: 798, False: 0]
  ------------------
  799|    798|      sac_ext_len = ixheaacd_read_bits_buf(mps_bit_buf, 8);
  800|    798|      if (sac_ext_len == 255) {
  ------------------
  |  Branch (800:11): [True: 2, False: 796]
  ------------------
  801|      2|        sac_ext_len += ixheaacd_read_bits_buf(mps_bit_buf, 16);
  802|      2|      }
  803|       |
  804|    798|      tmp = (WORD32)(((mps_bit_buf->ptr_read_next - mps_bit_buf->ptr_bit_buf_base + 1) << 3) -
  805|    798|                     (mps_bit_buf->bit_pos + 1));
  806|       |
  807|    798|      switch (sac_ext_type) {
  808|    541|        case EXT_TYPE_0:
  ------------------
  |  Branch (808:9): [True: 541, False: 257]
  ------------------
  809|    541|          error_code = ixheaacd_parse_residual_data(pstr_mps_state);
  810|    541|          if (error_code) {
  ------------------
  |  Branch (810:15): [True: 42, False: 499]
  ------------------
  811|     42|            if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (811:17): [True: 0, False: 42]
  ------------------
  812|      0|              pstr_mps_state->frame_ok = 0;
  813|      0|            } else
  814|     42|              return error_code;
  815|     42|          }
  816|    499|          break;
  817|       |
  818|    499|        case EXT_TYPE_1:
  ------------------
  |  Branch (818:9): [True: 242, False: 556]
  ------------------
  819|    242|          switch (num_input_channels) {
  820|    180|            case IN_CH_1:
  ------------------
  |  Branch (820:13): [True: 180, False: 62]
  ------------------
  821|    180|              channel_grouping[0] = 1;
  822|    180|              break;
  823|     54|            case IN_CH_2:
  ------------------
  |  Branch (823:13): [True: 54, False: 188]
  ------------------
  824|     54|              channel_grouping[0] = 2;
  825|     54|              break;
  826|      8|            case IN_CH_6:
  ------------------
  |  Branch (826:13): [True: 8, False: 234]
  ------------------
  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: 242]
  ------------------
  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|    242|          }
  835|       |
  836|    242|          offset = num_ott_boxes + num_ttt_boxes;
  837|       |
  838|    242|          p_res_mdct = pstr_mps_state->array_struct->res_mdct + offset * RFX2XMDCTCOEF;
  ------------------
  |  |  196|    242|#define RFX2XMDCTCOEF (8192)
  ------------------
  839|       |
  840|    459|          for (ch = 0, gr = 0; ch < num_input_channels; ch += channel_grouping[gr++]) {
  ------------------
  |  Branch (840:32): [True: 257, False: 202]
  ------------------
  841|    257|            p_mdct_res = p_res_mdct;
  842|       |
  843|    257|            temp = ixheaacd_read_bits_buf(mps_bit_buf, 2);
  844|    257|            frame->bs_arbitrary_downmix_residual_abs[ch] = (temp >> 1) & ONE_BIT_MASK;
  ------------------
  |  |  204|    257|#define ONE_BIT_MASK (0x00000001)
  ------------------
  845|    257|            frame->bs_arbitrary_downmix_residual_alpha_update_set[ch] = temp & ONE_BIT_MASK;
  ------------------
  |  |  204|    257|#define ONE_BIT_MASK (0x00000001)
  ------------------
  846|       |
  847|    257|            if (channel_grouping[gr] == 1) {
  ------------------
  |  Branch (847:17): [True: 180, False: 77]
  ------------------
  848|    340|              for (fr = 0; fr < arbdmx_frames_per_spatial_frame; fr++) {
  ------------------
  |  Branch (848:28): [True: 182, False: 158]
  ------------------
  849|    182|                error_code =
  850|    182|                    ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info,
  851|    182|                                          1, aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
  852|    182|                if (error_code) {
  ------------------
  |  Branch (852:21): [True: 21, False: 161]
  ------------------
  853|     21|                  if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (853:23): [True: 0, False: 21]
  ------------------
  854|      0|                    pstr_mps_state->frame_ok = 0;
  855|      0|                  } else
  856|     21|                    return error_code;
  857|     21|                }
  858|    161|                if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
  ------------------
  |  Branch (858:21): [True: 41, False: 120]
  ------------------
  859|     41|                  ixheaacd_res_ctns_apply(
  860|     41|                      pstr_mps_state->p_aac_decoder_channel_info[0],
  861|     41|                      pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
  862|     41|                      aac_tables_ptr);
  863|       |
  864|    161|                pstr_mps_state->res_block_type[offset + ch][fr] =
  865|    161|                    pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
  866|   162k|                for (i = 0; i < AAC_FRAME_LENGTH; i++) {
  ------------------
  |  |   23|   162k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  |  Branch (866:29): [True: 162k, False: 161]
  ------------------
  867|   162k|                  *p_mdct_res++ =
  868|   162k|                      (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
  869|   162k|                }
  870|       |
  871|    161|                if ((pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence ==
  ------------------
  |  Branch (871:21): [True: 19, False: 142]
  ------------------
  872|    161|                     EIGHT_SHORT_SEQUENCE) &&
  ------------------
  |  |  102|    161|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  873|     19|                    ((arbdmx_upd_qmf == UPD_QMF_18) || (arbdmx_upd_qmf == UPD_QMF_24) ||
  ------------------
  |  |   32|     19|#define UPD_QMF_18 (18)
  ------------------
                                  ((arbdmx_upd_qmf == UPD_QMF_18) || (arbdmx_upd_qmf == UPD_QMF_24) ||
  ------------------
  |  |   33|     18|#define UPD_QMF_24 (24)
  ------------------
  |  Branch (873:22): [True: 1, False: 18]
  |  Branch (873:56): [True: 2, False: 16]
  ------------------
  874|     16|                     (arbdmx_upd_qmf == UPD_QMF_30))) {
  ------------------
  |  |   34|     16|#define UPD_QMF_30 (30)
  ------------------
  |  Branch (874:22): [True: 2, False: 14]
  ------------------
  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|    161|              }
  896|    158|              p_res_mdct += RFX2XMDCTCOEF;
  ------------------
  |  |  196|    158|#define RFX2XMDCTCOEF (8192)
  ------------------
  897|    158|            } else {
  898|     77|              frame->bs_arbitrary_downmix_residual_abs[ch + 1] =
  899|     77|                  frame->bs_arbitrary_downmix_residual_abs[ch];
  900|     77|              frame->bs_arbitrary_downmix_residual_alpha_update_set[ch + 1] =
  901|     77|                  frame->bs_arbitrary_downmix_residual_alpha_update_set[ch];
  902|       |
  903|    151|              for (fr = 0; fr < arbdmx_frames_per_spatial_frame; fr++) {
  ------------------
  |  Branch (903:28): [True: 92, False: 59]
  ------------------
  904|     92|                WORD32 *res_mdct_1 = p_mdct_res + RFX2XMDCTCOEF;
  ------------------
  |  |  196|     92|#define RFX2XMDCTCOEF (8192)
  ------------------
  905|     92|                WORD32 temp, win1, win2;
  906|     92|                temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
  907|     92|                temp = ixheaacd_read_bits_buf(mps_bit_buf, 1);
  908|       |
  909|     92|                if (temp != 0) {
  ------------------
  |  Branch (909:21): [True: 1, False: 91]
  ------------------
  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|     91|                error_code =
  914|     91|                    ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info,
  915|     91|                                          1, aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
  916|     91|                if (error_code) {
  ------------------
  |  Branch (916:21): [True: 4, False: 87]
  ------------------
  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|     87|                if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
  ------------------
  |  Branch (923:21): [True: 2, False: 85]
  ------------------
  924|      2|                  ixheaacd_res_ctns_apply(
  925|      2|                      pstr_mps_state->p_aac_decoder_channel_info[0],
  926|      2|                      pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
  927|      2|                      aac_tables_ptr);
  928|     87|                win1 = pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
  929|     87|                pstr_mps_state->res_block_type[offset + ch][fr] =
  930|     87|                    pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
  931|       |
  932|  89.1k|                for (i = 0; i < AAC_FRAME_LENGTH; i++) {
  ------------------
  |  |   23|  89.1k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  |  Branch (932:29): [True: 89.0k, False: 87]
  ------------------
  933|  89.0k|                  *p_mdct_res++ =
  934|  89.0k|                      (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
  935|  89.0k|                }
  936|       |
  937|     87|                error_code =
  938|     87|                    ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info,
  939|     87|                                          1, aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
  940|     87|                if (error_code) {
  ------------------
  |  Branch (940:21): [True: 5, False: 82]
  ------------------
  941|      5|                  if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (941:23): [True: 0, False: 5]
  ------------------
  942|      0|                    pstr_mps_state->frame_ok = 0;
  943|      0|                  } else
  944|      5|                    return error_code;
  945|      5|                }
  946|       |
  947|     82|                if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
  ------------------
  |  Branch (947:21): [True: 9, False: 73]
  ------------------
  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|     82|                win2 = pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
  953|  78.9k|                for (i = 0; i < AAC_FRAME_LENGTH; i++) {
  ------------------
  |  |   23|  78.9k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  |  Branch (953:29): [True: 78.8k, False: 82]
  ------------------
  954|  78.8k|                  *res_mdct_1++ =
  955|  78.8k|                      (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
  956|  78.8k|                }
  957|       |
  958|     82|                if (win1 != win2) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_WINDOW_SEQUENCE;
  ------------------
  |  |  130|      3|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_WINDOW_SEQUENCE 0xFFFF980B
  ------------------
  |  Branch (958:21): [True: 3, False: 79]
  ------------------
  959|       |
  960|     79|                if ((win1 == EIGHT_SHORT_SEQUENCE) &&
  ------------------
  |  |  102|     79|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (960:21): [True: 12, False: 67]
  ------------------
  961|     12|                    ((arbdmx_upd_qmf == UPD_QMF_18) || (arbdmx_upd_qmf == UPD_QMF_24) ||
  ------------------
  |  |   32|     12|#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: 7, False: 5]
  |  Branch (961:56): [True: 2, False: 3]
  ------------------
  962|     10|                     (arbdmx_upd_qmf == UPD_QMF_30))) {
  ------------------
  |  |   34|      3|#define UPD_QMF_30 (30)
  ------------------
  |  Branch (962:22): [True: 1, False: 2]
  ------------------
  963|     10|                  temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
  964|     10|                  temp = ixheaacd_read_bits_buf(mps_bit_buf, 1);
  965|       |
  966|     10|                  if (temp != 0) {
  ------------------
  |  Branch (966:23): [True: 1, False: 9]
  ------------------
  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|      9|                  error_code = ixheaacd_res_read_ics(
  971|      9|                      mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info, 1, aac_tables_ptr,
  972|      9|                      pstr_mps_state->tot_sf_bands_ls);
  973|      9|                  if (error_code) {
  ------------------
  |  Branch (973:23): [True: 2, False: 7]
  ------------------
  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|      7|                  if (1 ==
  ------------------
  |  Branch (980:23): [True: 0, False: 7]
  ------------------
  981|      7|                      pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
  982|      0|                    ixheaacd_res_ctns_apply(
  983|      0|                        pstr_mps_state->p_aac_decoder_channel_info[0],
  984|      0|                        pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
  985|      0|                        aac_tables_ptr);
  986|      7|                  win1 = pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
  987|       |
  988|  6.15k|                  for (i = 0; i < AAC_FRAME_LENGTH; i++) {
  ------------------
  |  |   23|  6.15k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  |  Branch (988:31): [True: 6.14k, False: 7]
  ------------------
  989|  6.14k|                    *p_mdct_res++ = (pstr_mps_state->p_aac_decoder_channel_info[0]
  990|  6.14k|                                         ->p_spectral_coefficient[i]);
  991|  6.14k|                  }
  992|       |
  993|      7|                  error_code = ixheaacd_res_read_ics(
  994|      7|                      mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info, 1, aac_tables_ptr,
  995|      7|                      pstr_mps_state->tot_sf_bands_ls);
  996|      7|                  if (error_code) {
  ------------------
  |  Branch (996:23): [True: 1, False: 6]
  ------------------
  997|      1|                    if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (997:25): [True: 0, False: 1]
  ------------------
  998|      0|                      pstr_mps_state->frame_ok = 0;
  999|      0|                    } else
 1000|      1|                      return error_code;
 1001|      1|                  }
 1002|       |
 1003|      6|                  if (1 ==
  ------------------
  |  Branch (1003:23): [True: 0, False: 6]
  ------------------
 1004|      6|                      pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
 1005|      0|                    ixheaacd_res_ctns_apply(
 1006|      0|                        pstr_mps_state->p_aac_decoder_channel_info[0],
 1007|      0|                        pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
 1008|      0|                        aac_tables_ptr);
 1009|      6|                  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: 6]
  ------------------
 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|      6|                  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: 5]
  ------------------
 1016|      6|                }
 1017|     79|              }
 1018|     59|              p_res_mdct += RFX2XMDCTCOEF;
  ------------------
  |  |  196|     59|#define RFX2XMDCTCOEF (8192)
  ------------------
 1019|     59|            }
 1020|    257|          }
 1021|       |
 1022|    202|          break;
 1023|       |
 1024|    202|        case EXT_TYPE_2:
  ------------------
  |  Branch (1024:9): [True: 13, False: 785]
  ------------------
 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: 798]
  ------------------
 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|    798|      }
 1038|       |
 1039|    666|      bits_read =
 1040|    666|          (WORD32)(((mps_bit_buf->ptr_read_next - mps_bit_buf->ptr_bit_buf_base + 1) << 3) -
 1041|    666|                   (mps_bit_buf->bit_pos + 1) - tmp);
 1042|    666|      n_fill_bits = (sac_ext_len << 3) - bits_read;
 1043|       |
 1044|  1.30k|      while (n_fill_bits > 7) {
  ------------------
  |  Branch (1044:14): [True: 641, False: 666]
  ------------------
 1045|    641|        ixheaacd_read_bits_buf(mps_bit_buf, 8);
 1046|    641|        n_fill_bits -= 8;
 1047|    641|      }
 1048|    666|      if (n_fill_bits > 0) {
  ------------------
  |  Branch (1048:11): [True: 5, False: 661]
  ------------------
 1049|      5|        ixheaacd_read_bits_buf(mps_bit_buf, n_fill_bits);
 1050|      5|      }
 1051|    666|    }
 1052|    798|  }
 1053|  14.0k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  14.0k|#define IA_NO_ERROR 0x00000000
  ------------------
 1054|  14.2k|}
ixheaacd_mps_bitdec.c:ixheaacd_parse_residual_data:
  619|    541|static IA_ERRORCODE ixheaacd_parse_residual_data(ia_heaac_mps_state_struct *pstr_mps_state) {
  620|    541|  WORD32 ich, ch;
  621|    541|  WORD32 rfpsf;
  622|    541|  WORD32 ps;
  623|    541|  WORD32 pb;
  624|       |
  625|    541|  ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr =
  626|    541|      pstr_mps_state->ia_mps_dec_mps_table.aac_tab;
  627|    541|  WORD32 i;
  628|       |
  629|    541|  ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
  630|    541|  ia_mps_spatial_bs_config_struct *config = &(pstr_mps_state->bs_config);
  631|       |
  632|    541|  WORD32 num_ott_boxes = pstr_mps_state->num_ott_boxes;
  633|    541|  WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
  634|    541|  WORD32 residual_frames_per_spatial_frame = pstr_mps_state->residual_frames_per_spatial_frame;
  635|    541|  WORD32 upd_qmf = pstr_mps_state->upd_qmf;
  636|       |
  637|    541|  WORD32 loop_counter = num_ott_boxes + pstr_mps_state->num_ttt_boxes;
  638|    541|  WORD32 *p_mdct_res;
  639|       |
  640|    541|  WORD32 *p_res_mdct = pstr_mps_state->array_struct->res_mdct;
  641|    541|  ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
  642|    541|  WORD16 error_code = IA_NO_ERROR;
  ------------------
  |  |   23|    541|#define IA_NO_ERROR 0x00000000
  ------------------
  643|       |
  644|  2.61k|  for (ich = 0; ich < loop_counter; ich++) {
  ------------------
  |  Branch (644:17): [True: 2.11k, False: 499]
  ------------------
  645|  2.11k|    ch = ich;
  646|       |
  647|  2.11k|    p_mdct_res = p_res_mdct;
  648|  2.11k|    if (config->bs_residual_bands[ch] > 0) {
  ------------------
  |  Branch (648:9): [True: 623, False: 1.49k]
  ------------------
  649|    623|      if (ch < num_ott_boxes) {
  ------------------
  |  Branch (649:11): [True: 598, False: 25]
  ------------------
  650|  1.80k|        for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (650:22): [True: 1.20k, False: 598]
  ------------------
  651|  1.20k|          frame->res_data.bs_icc_diff_present[ch][ps] = ixheaacd_read_bits_buf(mps_bit_buf, 1);
  652|  1.20k|          if (frame->res_data.bs_icc_diff_present[ch][ps]) {
  ------------------
  |  Branch (652:15): [True: 259, False: 945]
  ------------------
  653|  4.18k|            for (pb = 0; pb < config->bs_residual_bands[ch]; pb++) {
  ------------------
  |  Branch (653:26): [True: 3.92k, False: 259]
  ------------------
  654|  3.92k|              frame->res_data.bs_icc_diff[ch][ps][pb] =
  655|  3.92k|                  ixheaacd_decode_icc_diff_code(mps_bit_buf);
  656|  3.92k|              frame->ott_icc_diff_idx[ch][ps][pb] = frame->res_data.bs_icc_diff[ch][ps][pb];
  657|  3.92k|            }
  658|    259|          }
  659|  1.20k|        }
  660|    598|      }
  661|    623|      p_mdct_res = p_res_mdct;
  662|  1.24k|      for (rfpsf = 0; rfpsf < residual_frames_per_spatial_frame; rfpsf++) {
  ------------------
  |  Branch (662:23): [True: 664, False: 581]
  ------------------
  663|    664|        error_code =
  664|    664|            ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info, 1,
  665|    664|                                  aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
  666|    664|        if (error_code) {
  ------------------
  |  Branch (666:13): [True: 36, False: 628]
  ------------------
  667|     36|          if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (667:15): [True: 0, False: 36]
  ------------------
  668|      0|            pstr_mps_state->frame_ok = 0;
  669|      0|          } else
  670|     36|            return error_code;
  671|     36|        }
  672|    628|        if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
  ------------------
  |  Branch (672:13): [True: 142, False: 486]
  ------------------
  673|    142|          ixheaacd_res_ctns_apply(
  674|    142|              pstr_mps_state->p_aac_decoder_channel_info[0],
  675|    142|              pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
  676|    142|              aac_tables_ptr);
  677|    628|        pstr_mps_state->res_block_type[ch][rfpsf] =
  678|    628|            pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
  679|   635k|        for (i = 0; i < AAC_FRAME_LENGTH; i++) {
  ------------------
  |  |   23|   635k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  |  Branch (679:21): [True: 634k, False: 628]
  ------------------
  680|   634k|          *p_mdct_res++ =
  681|   634k|              (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
  682|   634k|        }
  683|       |
  684|    628|        if ((pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence ==
  ------------------
  |  Branch (684:13): [True: 278, False: 350]
  ------------------
  685|    628|             EIGHT_SHORT_SEQUENCE) &&
  ------------------
  |  |  102|    628|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  686|    278|            ((upd_qmf == UPD_QMF_18) || (upd_qmf == UPD_QMF_24) || (upd_qmf == UPD_QMF_30))) {
  ------------------
  |  |   32|    278|#define UPD_QMF_18 (18)
  ------------------
                          ((upd_qmf == UPD_QMF_18) || (upd_qmf == UPD_QMF_24) || (upd_qmf == UPD_QMF_30))) {
  ------------------
  |  |   33|    257|#define UPD_QMF_24 (24)
  ------------------
                          ((upd_qmf == UPD_QMF_18) || (upd_qmf == UPD_QMF_24) || (upd_qmf == UPD_QMF_30))) {
  ------------------
  |  |   34|    242|#define UPD_QMF_30 (30)
  ------------------
  |  Branch (686:14): [True: 21, False: 257]
  |  Branch (686:41): [True: 15, False: 242]
  |  Branch (686:68): [True: 24, False: 218]
  ------------------
  687|     60|          error_code =
  688|     60|              ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info, 1,
  689|     60|                                    aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
  690|     60|          if (error_code) {
  ------------------
  |  Branch (690:15): [True: 6, False: 54]
  ------------------
  691|      6|            if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (691:17): [True: 0, False: 6]
  ------------------
  692|      0|              pstr_mps_state->frame_ok = 0;
  693|      0|            } else
  694|      6|              return error_code;
  695|      6|          }
  696|     54|          if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
  ------------------
  |  Branch (696:15): [True: 6, False: 48]
  ------------------
  697|      6|            ixheaacd_res_ctns_apply(
  698|      6|                pstr_mps_state->p_aac_decoder_channel_info[0],
  699|      6|                pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
  700|      6|                aac_tables_ptr);
  701|  34.8k|          for (i = 0; i < AAC_FRAME_LENGTH; i++) {
  ------------------
  |  |   23|  34.8k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  |  Branch (701:23): [True: 34.8k, False: 54]
  ------------------
  702|  34.8k|            *p_mdct_res++ =
  703|  34.8k|                (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
  704|  34.8k|          }
  705|     54|        }
  706|    628|      }
  707|    623|    }
  708|       |
  709|  2.07k|    p_res_mdct += RFX2XMDCTCOEF;
  ------------------
  |  |  196|  2.07k|#define RFX2XMDCTCOEF (8192)
  ------------------
  710|  2.07k|  }
  711|    499|  return IA_NO_ERROR;
  ------------------
  |  |   23|    499|#define IA_NO_ERROR 0x00000000
  ------------------
  712|    541|}
ixheaacd_mps_bitdec.c:ixheaacd_decode_icc_diff_code:
  609|  3.92k|static WORD32 ixheaacd_decode_icc_diff_code(ia_bit_buf_struct *it_bit_buff) {
  610|  3.92k|  WORD32 value = 0;
  611|  3.92k|  WORD32 count = 0;
  612|  8.65k|  while ((ixheaacd_read_bits_buf(it_bit_buff, 1) == 0) && (count++ < 7)) {
  ------------------
  |  Branch (612:10): [True: 5.04k, False: 3.61k]
  |  Branch (612:59): [True: 4.72k, False: 311]
  ------------------
  613|  4.72k|    value++;
  614|  4.72k|  }
  615|       |
  616|  3.92k|  return value;
  617|  3.92k|}
ixheaacd_mps_bitdec.c:ixheaacd_decode_and_map_frame_ott:
 1761|  13.9k|{
 1762|  13.9k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  13.9k|#define IA_NO_ERROR 0x00000000
  ------------------
 1763|  13.9k|  ia_mps_dec_spatial_bs_frame_struct *p_cur_bs;
 1764|  13.9k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
 1765|  13.9k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
 1766|  13.9k|  ia_mps_dec_bitdec_tables_struct *bitdec_table =
 1767|  13.9k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
 1768|  13.9k|  WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
 1769|       |
 1770|  13.9k|  WORD32 i, num_parameter_sets, ott_idx, band;
 1771|  13.9k|  WORD32 num_ott_boxes;
 1772|  13.9k|  VOID *free_scratch;
 1773|       |
 1774|  13.9k|  WORD32 ps, pb;
 1775|       |
 1776|  13.9k|  WORD32 *tot_db;
 1777|  13.9k|  WORD32 *ott_vs_tot_db_fc;
 1778|  13.9k|  WORD32 *ott_vs_tot_db_s;
 1779|  13.9k|  WORD32 *ott_vs_tot_db_f;
 1780|  13.9k|  WORD32 *ott_vs_tot_db_c;
 1781|  13.9k|  WORD32 *ott_vs_tot_db_lr;
 1782|  13.9k|  WORD32 *ott_vs_tot_db_l;
 1783|  13.9k|  WORD32 *ott_vs_tot_db_r;
 1784|  13.9k|  WORD32 *tmp1;
 1785|  13.9k|  WORD32 *tmp2;
 1786|       |
 1787|  13.9k|  WORD32 bitstream_parameter_bands = curr_state->bitstream_parameter_bands;
 1788|  13.9k|  WORD32 *b_ott_bands = curr_state->bitstream_ott_bands;
 1789|  13.9k|  WORD32 *ott_cld_default = curr_state->ott_cld_default;
 1790|  13.9k|  WORD32 parameter_sets = curr_state->num_parameter_sets;
 1791|  13.9k|  WORD32 extend_frame = curr_state->extend_frame;
 1792|  13.9k|  WORD32 quant_mode = curr_state->quant_mode;
 1793|       |
 1794|  13.9k|  tot_db = pstr_mps_state->mps_scratch_mem_v;
 1795|  13.9k|  ott_vs_tot_db_fc =
 1796|  13.9k|      tot_db + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PSXPB, sizeof(*ott_vs_tot_db_fc), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.9k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1797|  13.9k|  ott_vs_tot_db_s = ott_vs_tot_db_fc + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  13.9k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1798|  13.9k|                                           MAX_PSXPB, sizeof(*ott_vs_tot_db_s), BYTE_ALIGN_8);
 1799|  13.9k|  ott_vs_tot_db_f = ott_vs_tot_db_s + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  13.9k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1800|  13.9k|                                          MAX_PSXPB, sizeof(*ott_vs_tot_db_f), BYTE_ALIGN_8);
 1801|  13.9k|  ott_vs_tot_db_c = ott_vs_tot_db_f + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  13.9k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1802|  13.9k|                                          MAX_PSXPB, sizeof(*ott_vs_tot_db_c), BYTE_ALIGN_8);
 1803|  13.9k|  ott_vs_tot_db_lr = ott_vs_tot_db_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  13.9k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1804|  13.9k|                                           MAX_PSXPB, sizeof(*ott_vs_tot_db_lr), BYTE_ALIGN_8);
 1805|  13.9k|  ott_vs_tot_db_l = ott_vs_tot_db_lr + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  13.9k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1806|  13.9k|                                           MAX_PSXPB, sizeof(*ott_vs_tot_db_l), BYTE_ALIGN_8);
 1807|  13.9k|  ott_vs_tot_db_r = ott_vs_tot_db_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  13.9k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1808|  13.9k|                                          MAX_PSXPB, sizeof(*ott_vs_tot_db_r), BYTE_ALIGN_8);
 1809|  13.9k|  tmp1 = ott_vs_tot_db_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PSXPB, sizeof(*tmp1), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.9k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1810|  13.9k|  tmp2 = tmp1 + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PSXPB, sizeof(*tmp2), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.9k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1811|  13.9k|  free_scratch = tmp2 + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PSXPB, sizeof(*tmp2), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.9k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1812|       |
 1813|  13.9k|  p_cur_bs = pstr_mps_state->bs_frame;
 1814|  13.9k|  num_ott_boxes = curr_state->num_ott_boxes;
 1815|       |
 1816|  13.9k|  pb = MAX_PSXPB;
  ------------------
  |  |   84|  13.9k|#define MAX_PSXPB (224)
  ------------------
 1817|  3.14M|  for (i = 0; i < pb; i++) tot_db[i] = 0;
  ------------------
  |  Branch (1817:15): [True: 3.13M, False: 13.9k]
  ------------------
 1818|       |
 1819|  13.9k|  switch (curr_state->tree_config) {
 1820|    313|    case TREE_5151:
  ------------------
  |  Branch (1820:5): [True: 313, False: 13.6k]
  ------------------
 1821|    313|      i = 0;
 1822|    313|      error_code = ixheaacd_map_index_data(
 1823|    313|          &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
 1824|    313|          p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
  ------------------
  |  |   23|    313|#define CLD (0)
  ------------------
 1825|    313|          b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1826|    313|          quant_mode, tot_db, ott_vs_tot_db_fc, ott_vs_tot_db_s, bitdec_table, free_scratch);
 1827|    313|      if (error_code) return error_code;
  ------------------
  |  Branch (1827:11): [True: 4, False: 309]
  ------------------
 1828|       |
 1829|    309|      i = 1;
 1830|    309|      error_code = ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
 1831|    309|                              p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
 1832|    309|                              p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
  ------------------
  |  |   23|    309|#define CLD (0)
  ------------------
 1833|    309|                              ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1834|    309|                              quant_mode, ott_vs_tot_db_fc, ott_vs_tot_db_f, ott_vs_tot_db_c,
 1835|    309|                              bitdec_table, free_scratch);
 1836|    309|      if (error_code) return error_code;
  ------------------
  |  Branch (1836:11): [True: 3, False: 306]
  ------------------
 1837|       |
 1838|    306|      i = 2;
 1839|    306|      error_code = ixheaacd_map_index_data(
 1840|    306|          &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
 1841|    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)
  ------------------
 1842|    306|          b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1843|    306|          quant_mode, ott_vs_tot_db_s, tmp1, tmp2, bitdec_table, free_scratch);
 1844|    306|      if (error_code) return error_code;
  ------------------
  |  Branch (1844:11): [True: 12, False: 294]
  ------------------
 1845|       |
 1846|    294|      i = 3;
 1847|    294|      error_code = ixheaacd_map_index_data(
 1848|    294|          &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
 1849|    294|          p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
  ------------------
  |  |   23|    294|#define CLD (0)
  ------------------
 1850|    294|          b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1851|    294|          quant_mode, ott_vs_tot_db_f, tmp1, tmp2, bitdec_table, free_scratch);
 1852|    294|      if (error_code) return error_code;
  ------------------
  |  Branch (1852:11): [True: 6, False: 288]
  ------------------
 1853|       |
 1854|    288|      i = 4;
 1855|    288|      error_code = ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
 1856|    288|                              p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
 1857|    288|                              p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
  ------------------
  |  |   23|    288|#define CLD (0)
  ------------------
 1858|    288|                              ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1859|    288|                              quant_mode, tot_db, tmp1, tmp2, bitdec_table, free_scratch);
 1860|    288|      if (error_code) return error_code;
  ------------------
  |  Branch (1860:11): [True: 7, False: 281]
  ------------------
 1861|       |
 1862|    281|      break;
 1863|       |
 1864|    403|    case TREE_5152:
  ------------------
  |  Branch (1864:5): [True: 403, False: 13.5k]
  ------------------
 1865|    403|      i = 0;
 1866|    403|      error_code = ixheaacd_map_index_data(
 1867|    403|          &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
 1868|    403|          p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
  ------------------
  |  |   23|    403|#define CLD (0)
  ------------------
 1869|    403|          b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1870|    403|          quant_mode, tot_db, ott_vs_tot_db_lr, ott_vs_tot_db_c, bitdec_table, free_scratch);
 1871|    403|      if (error_code) return error_code;
  ------------------
  |  Branch (1871:11): [True: 2, False: 401]
  ------------------
 1872|       |
 1873|    401|      i = 1;
 1874|    401|      error_code = ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
 1875|    401|                              p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
 1876|    401|                              p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
  ------------------
  |  |   23|    401|#define CLD (0)
  ------------------
 1877|    401|                              ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1878|    401|                              quant_mode, ott_vs_tot_db_lr, ott_vs_tot_db_l, ott_vs_tot_db_r,
 1879|    401|                              bitdec_table, free_scratch);
 1880|    401|      if (error_code) return error_code;
  ------------------
  |  Branch (1880:11): [True: 7, False: 394]
  ------------------
 1881|       |
 1882|    394|      i = 2;
 1883|    394|      error_code = ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
 1884|    394|                              p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
 1885|    394|                              p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
  ------------------
  |  |   23|    394|#define CLD (0)
  ------------------
 1886|    394|                              ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1887|    394|                              quant_mode, tot_db, tmp1, tmp2, bitdec_table, free_scratch);
 1888|    394|      if (error_code) return error_code;
  ------------------
  |  Branch (1888:11): [True: 5, False: 389]
  ------------------
 1889|       |
 1890|    389|      i = 3;
 1891|    389|      error_code = ixheaacd_map_index_data(
 1892|    389|          &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
 1893|    389|          p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
  ------------------
  |  |   23|    389|#define CLD (0)
  ------------------
 1894|    389|          b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1895|    389|          quant_mode, ott_vs_tot_db_l, tmp1, tmp2, bitdec_table, free_scratch);
 1896|    389|      if (error_code) return error_code;
  ------------------
  |  Branch (1896:11): [True: 3, False: 386]
  ------------------
 1897|       |
 1898|    386|      i = 4;
 1899|    386|      error_code = ixheaacd_map_index_data(
 1900|    386|          &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
 1901|    386|          p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
  ------------------
  |  |   23|    386|#define CLD (0)
  ------------------
 1902|    386|          b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1903|    386|          quant_mode, ott_vs_tot_db_r, tmp1, tmp2, bitdec_table, free_scratch);
 1904|    386|      if (error_code) return error_code;
  ------------------
  |  Branch (1904:11): [True: 6, False: 380]
  ------------------
 1905|    380|      break;
 1906|       |
 1907|  13.2k|    default:
  ------------------
  |  Branch (1907:5): [True: 13.2k, False: 716]
  ------------------
 1908|  45.0k|      for (i = 0; i < num_ott_boxes; i++) {
  ------------------
  |  Branch (1908:19): [True: 31.8k, False: 13.2k]
  ------------------
 1909|  31.8k|        error_code = ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
 1910|  31.8k|                                p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
 1911|  31.8k|                                p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
  ------------------
  |  |   23|  31.8k|#define CLD (0)
  ------------------
 1912|  31.8k|                                ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1913|  31.8k|                                (curr_state->tree_config == TREE_525) ? 0 : quant_mode, NULL,
  ------------------
  |  Branch (1913:33): [True: 2.83k, False: 28.9k]
  ------------------
 1914|  31.8k|                                NULL, NULL, bitdec_table, free_scratch);
 1915|  31.8k|        if (error_code) return error_code;
  ------------------
  |  Branch (1915:13): [True: 34, False: 31.7k]
  ------------------
 1916|  31.8k|      }
 1917|  13.2k|      break;
 1918|  13.9k|  }
 1919|       |
 1920|  13.8k|  if (curr_state->one_icc == 1) {
  ------------------
  |  Branch (1920:7): [True: 2.78k, False: 11.1k]
  ------------------
 1921|  2.78k|    if (extend_frame == 0) {
  ------------------
  |  Branch (1921:9): [True: 2.18k, False: 600]
  ------------------
 1922|  2.18k|      num_parameter_sets = parameter_sets;
 1923|  2.18k|    } else {
 1924|    600|      num_parameter_sets = parameter_sets + 1;
 1925|    600|    }
 1926|       |
 1927|  11.9k|    for (ott_idx = 1; ott_idx < num_ott_boxes; ott_idx++) {
  ------------------
  |  Branch (1927:23): [True: 9.11k, False: 2.78k]
  ------------------
 1928|  9.11k|      if (curr_state->ott_mode_lfe[ott_idx] == 0) {
  ------------------
  |  Branch (1928:11): [True: 8.52k, False: 593]
  ------------------
 1929|  30.6k|        for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1929:21): [True: 22.1k, False: 8.52k]
  ------------------
 1930|   308k|          for (band = 0; band < bitstream_parameter_bands; band++) {
  ------------------
  |  Branch (1930:26): [True: 286k, False: 22.1k]
  ------------------
 1931|   286k|            p_cur_bs->cmp_ott_icc_idx[ott_idx][i][band] = p_cur_bs->cmp_ott_icc_idx[0][i][band];
 1932|   286k|          }
 1933|  22.1k|        }
 1934|  8.52k|      }
 1935|  9.11k|    }
 1936|       |
 1937|  14.6k|    for (ott_idx = 0; ott_idx < num_ott_boxes; ott_idx++) {
  ------------------
  |  Branch (1937:23): [True: 11.8k, False: 2.78k]
  ------------------
 1938|  11.8k|      if (curr_state->ott_mode_lfe[ott_idx] == 0) {
  ------------------
  |  Branch (1938:11): [True: 9.26k, False: 2.62k]
  ------------------
 1939|  9.26k|        error_code = ixheaacd_map_index_data(&p_cur_bs->icc_lossless_data, p_aux_struct->ott_icc,
 1940|  9.26k|                                p_cur_bs->ott_icc_idx, p_cur_bs->cmp_ott_icc_idx,
 1941|  9.26k|                                p_cur_bs->ott_icc_diff_idx, ott_idx, p_cur_bs->ott_icc_idx_prev,
 1942|  9.26k|                                0, ICC, 0, b_ott_bands[ott_idx], curr_state->icc_default,
  ------------------
  |  |   24|  9.26k|#define ICC (1)
  ------------------
 1943|  9.26k|                                parameter_sets, param_slot, extend_frame, quant_mode, NULL, NULL,
 1944|  9.26k|                                NULL, bitdec_table, free_scratch);
 1945|  9.26k|        if (error_code) return error_code;
  ------------------
  |  Branch (1945:13): [True: 5, False: 9.26k]
  ------------------
 1946|  9.26k|      }
 1947|  11.8k|    }
 1948|  11.1k|  } else {
 1949|  34.2k|    for (ott_idx = 0; ott_idx < num_ott_boxes; ott_idx++) {
  ------------------
  |  Branch (1949:23): [True: 23.1k, False: 11.0k]
  ------------------
 1950|  23.1k|      if (curr_state->ott_mode_lfe[ott_idx] == 0) {
  ------------------
  |  Branch (1950:11): [True: 22.7k, False: 425]
  ------------------
 1951|  22.7k|        error_code = ixheaacd_map_index_data(&p_cur_bs->icc_lossless_data, p_aux_struct->ott_icc,
 1952|  22.7k|                                p_cur_bs->ott_icc_idx, p_cur_bs->cmp_ott_icc_idx,
 1953|  22.7k|                                p_cur_bs->ott_icc_diff_idx, ott_idx, p_cur_bs->ott_icc_idx_prev,
 1954|  22.7k|                                ott_idx, ICC, 0, b_ott_bands[ott_idx], curr_state->icc_default,
  ------------------
  |  |   24|  22.7k|#define ICC (1)
  ------------------
 1955|  22.7k|                                parameter_sets, param_slot, extend_frame, quant_mode, NULL, NULL,
 1956|  22.7k|                                NULL, bitdec_table, free_scratch);
 1957|  22.7k|        if (error_code) return error_code;
  ------------------
  |  Branch (1957:13): [True: 32, False: 22.6k]
  ------------------
 1958|  22.7k|      }
 1959|  23.1k|    }
 1960|  11.1k|  }
 1961|       |
 1962|  13.8k|  if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (1962:7): [True: 0, False: 13.8k]
  ------------------
 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.8k|  return error_code;
 1979|  13.8k|}
ixheaacd_mps_bitdec.c:ixheaacd_map_index_data:
 1501|  74.7k|    ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables, VOID *scratch) {
 1502|  74.7k|  WORD32 *a_param_slots;
 1503|  74.7k|  WORD32 *a_interpolate;
 1504|       |
 1505|  74.7k|  WORD32 data_sets;
 1506|  74.7k|  WORD32 *a_map;
 1507|  74.7k|  VOID *free_scratch;
 1508|       |
 1509|  74.7k|  WORD32 set_idx, i, band, parm_slot;
 1510|  74.7k|  WORD32 data_bands, stride;
 1511|  74.7k|  WORD32 ps, pb;
 1512|       |
 1513|  74.7k|  WORD32 i1, i2, x1, xi, x2;
 1514|  74.7k|  WORD32 *db_in;
 1515|  74.7k|  WORD32 *db_1, *db_2;
 1516|  74.7k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  74.7k|#define IA_NO_ERROR 0x00000000
  ------------------
 1517|  74.7k|  db_in = ott_vs_tot_db_in;
 1518|  74.7k|  db_1 = ott_vs_tot_db_1;
 1519|  74.7k|  db_2 = ott_vs_tot_db_2;
 1520|  74.7k|  a_param_slots = scratch;
 1521|  74.7k|  a_interpolate = a_param_slots + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  74.7k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1522|  74.7k|                                      MAX_PARAMETER_SETS, sizeof(*a_interpolate), BYTE_ALIGN_8);
 1523|  74.7k|  a_map = a_interpolate +
 1524|  74.7k|          IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_SETS, sizeof(*a_map), BYTE_ALIGN_8);
  ------------------
  |  |   89|  74.7k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1525|  74.7k|  free_scratch = a_map + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS_PLUS_1, sizeof(*a_map),
  ------------------
  |  |   89|  74.7k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1526|  74.7k|                                                       BYTE_ALIGN_8);
 1527|       |
 1528|  74.7k|  data_sets = 0;
 1529|   207k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1529:15): [True: 132k, False: 74.7k]
  ------------------
 1530|   132k|    if (ll_data->bs_xxx_data_mode[param_idx][i] == 3) {
  ------------------
  |  Branch (1530:9): [True: 25.6k, False: 107k]
  ------------------
 1531|  25.6k|      a_param_slots[data_sets] = i;
 1532|  25.6k|      data_sets++;
 1533|  25.6k|    }
 1534|   132k|  }
 1535|       |
 1536|  74.7k|  set_idx = 0;
 1537|       |
 1538|   207k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1538:15): [True: 132k, False: 74.7k]
  ------------------
 1539|   132k|    if (ll_data->bs_xxx_data_mode[param_idx][i] == 0) {
  ------------------
  |  Branch (1539:9): [True: 86.8k, False: 45.9k]
  ------------------
 1540|  86.8k|      ll_data->no_cmp_quant_coarse_xxx[param_idx][i] = 0;
 1541|  1.50M|      for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1541:31): [True: 1.41M, False: 86.8k]
  ------------------
 1542|  1.41M|        output_idx_data[xtt_idx][i][band] = default_value;
 1543|  1.41M|      }
 1544|  1.50M|      for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1544:31): [True: 1.41M, False: 86.8k]
  ------------------
 1545|  1.41M|        idx_prev[xtt_idx][band] = output_idx_data[xtt_idx][i][band];
 1546|  1.41M|      }
 1547|  86.8k|    }
 1548|       |
 1549|   132k|    if (ll_data->bs_xxx_data_mode[param_idx][i] == 1) {
  ------------------
  |  Branch (1549:9): [True: 12.1k, False: 120k]
  ------------------
 1550|   200k|      for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1550:31): [True: 188k, False: 12.1k]
  ------------------
 1551|   188k|        output_idx_data[xtt_idx][i][band] = idx_prev[xtt_idx][band];
 1552|   188k|      }
 1553|  12.1k|      ll_data->no_cmp_quant_coarse_xxx[param_idx][i] =
 1554|  12.1k|          ll_data->bs_quant_coarse_xxx_prev[param_idx];
 1555|  12.1k|    }
 1556|       |
 1557|   132k|    if (ll_data->bs_xxx_data_mode[param_idx][i] == 2) {
  ------------------
  |  Branch (1557:9): [True: 8.14k, False: 124k]
  ------------------
 1558|   119k|      for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1558:31): [True: 111k, False: 8.14k]
  ------------------
 1559|   111k|        output_idx_data[xtt_idx][i][band] = idx_prev[xtt_idx][band];
 1560|   111k|      }
 1561|  8.14k|      a_interpolate[i] = 1;
 1562|   124k|    } else {
 1563|   124k|      a_interpolate[i] = 0;
 1564|   124k|    }
 1565|       |
 1566|   132k|    if (ll_data->bs_xxx_data_mode[param_idx][i] == 3) {
  ------------------
  |  Branch (1566:9): [True: 25.6k, False: 107k]
  ------------------
 1567|  25.6k|      parm_slot = a_param_slots[set_idx];
 1568|  25.6k|      stride = ixheaacd_mps_dec_bitdec_tables
 1569|  25.6k|                   ->pb_stride_table[ll_data->bs_freq_res_stride_xxx[param_idx][set_idx]];
 1570|  25.6k|      data_bands = (stop_band - start_band - 1) / stride + 1;
 1571|  25.6k|      ixheaacd_create_mapping(a_map, start_band, stop_band, stride, free_scratch);
 1572|  25.6k|      ixheaacd_map_frequency(&cmp_idx_data[xtt_idx][set_idx][0],
 1573|  25.6k|                             &output_idx_data[xtt_idx][parm_slot][0], a_map, data_bands);
 1574|       |
 1575|   415k|      for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1575:31): [True: 390k, False: 25.6k]
  ------------------
 1576|   390k|        idx_prev[xtt_idx][band] = output_idx_data[xtt_idx][parm_slot][band];
 1577|   390k|      }
 1578|       |
 1579|  25.6k|      ll_data->bs_quant_coarse_xxx_prev[param_idx] =
 1580|  25.6k|          ll_data->bs_quant_coarse_xxx[param_idx][set_idx];
 1581|  25.6k|      ll_data->no_cmp_quant_coarse_xxx[param_idx][i] =
 1582|  25.6k|          ll_data->bs_quant_coarse_xxx[param_idx][set_idx];
 1583|       |
 1584|  25.6k|      set_idx++;
 1585|  25.6k|    }
 1586|       |
 1587|   132k|    if (diff_idx_data != NULL) {
  ------------------
  |  Branch (1587:9): [True: 53.4k, False: 79.4k]
  ------------------
 1588|   929k|      for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1588:31): [True: 876k, False: 53.4k]
  ------------------
 1589|   876k|        output_idx_data[xtt_idx][i][band] += diff_idx_data[xtt_idx][i][band];
 1590|   876k|      }
 1591|  53.4k|    }
 1592|   132k|  }
 1593|       |
 1594|   207k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1594:15): [True: 132k, False: 74.6k]
  ------------------
 1595|   132k|    if (a_interpolate[i] != 1) {
  ------------------
  |  Branch (1595:9): [True: 124k, False: 8.12k]
  ------------------
 1596|   124k|      if (ll_data->no_cmp_quant_coarse_xxx[param_idx][i] == 1) {
  ------------------
  |  Branch (1596:11): [True: 13.5k, False: 111k]
  ------------------
 1597|   197k|        for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1597:33): [True: 183k, False: 13.5k]
  ------------------
 1598|   183k|          error_code = ixheaacd_deq_coarse(output_idx_data[xtt_idx][i][band], param_type,
 1599|   183k|                                           &(output_data[xtt_idx][i][band]),
 1600|   183k|                                           ixheaacd_mps_dec_bitdec_tables);
 1601|   183k|          if (error_code) {
  ------------------
  |  Branch (1601:15): [True: 51, False: 183k]
  ------------------
 1602|     51|            return error_code;
 1603|     51|          }
 1604|   183k|        }
 1605|   111k|      } else {
 1606|  1.91M|        for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1606:33): [True: 1.80M, False: 111k]
  ------------------
 1607|  1.80M|          error_code =
 1608|  1.80M|              ia_mps_dec_deq(output_idx_data[xtt_idx][i][band], param_type,
 1609|  1.80M|                             &(output_data[xtt_idx][i][band]), ixheaacd_mps_dec_bitdec_tables);
 1610|  1.80M|          if (error_code) {
  ------------------
  |  Branch (1610:15): [True: 8, False: 1.80M]
  ------------------
 1611|      8|            return error_code;
 1612|      8|          }
 1613|  1.80M|        }
 1614|   111k|      }
 1615|   124k|    }
 1616|   132k|  }
 1617|       |
 1618|  74.6k|  if (quant_mode && (param_type == CLD)) {
  ------------------
  |  |   23|  5.63k|#define CLD (0)
  ------------------
  |  Branch (1618:7): [True: 5.63k, False: 69.0k]
  |  Branch (1618:21): [True: 2.60k, False: 3.03k]
  ------------------
 1619|  2.60k|    if (db_in == 0 || db_1 == 0 || db_2 == 0)
  ------------------
  |  Branch (1619:9): [True: 13, False: 2.59k]
  |  Branch (1619:23): [True: 0, False: 2.59k]
  |  Branch (1619:36): [True: 0, False: 2.59k]
  ------------------
 1620|     13|      return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_MPS_PARAM;
  ------------------
  |  |  136|     13|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_MPS_PARAM 0xFFFF9811
  ------------------
 1621|       |
 1622|  11.1k|    for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (1622:18): [True: 8.54k, False: 2.59k]
  ------------------
 1623|  8.54k|      if (a_interpolate[ps] != 1) {
  ------------------
  |  Branch (1623:11): [True: 7.13k, False: 1.41k]
  ------------------
 1624|  7.13k|        if (ll_data->no_cmp_quant_coarse_xxx[param_idx][ps]) {
  ------------------
  |  Branch (1624:13): [True: 1.12k, False: 6.00k]
  ------------------
 1625|  1.12k|          ixheaacd_coarse_2_fine(output_idx_data[xtt_idx][ps], param_type, start_band,
 1626|  1.12k|                                 stop_band - start_band);
 1627|  1.12k|        }
 1628|  75.5k|        for (pb = start_band; pb < stop_band; pb++) {
  ------------------
  |  Branch (1628:31): [True: 68.3k, False: 7.13k]
  ------------------
 1629|  68.3k|          ll_data->no_cmp_quant_coarse_xxx[param_idx][ps] = 1;
 1630|  68.3k|          ixheaacd_factor_cld(&(output_idx_data[xtt_idx][ps][pb]), *db_in++, &(*db_1++),
 1631|  68.3k|                              &(*db_2++), quant_mode, ixheaacd_mps_dec_bitdec_tables);
 1632|  68.3k|          ia_mps_dec_deq(output_idx_data[xtt_idx][ps][pb], param_type,
 1633|  68.3k|                         &(output_data[xtt_idx][ps][pb]), ixheaacd_mps_dec_bitdec_tables);
 1634|  68.3k|        }
 1635|  7.13k|      }
 1636|  8.54k|    }
 1637|  2.59k|  }
 1638|       |
 1639|  74.6k|  i1 = 0;
 1640|  74.6k|  x1 = 0;
 1641|  74.6k|  i2 = 0;
 1642|   207k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1642:15): [True: 132k, False: 74.5k]
  ------------------
 1643|   132k|    if (a_interpolate[i] != 1) {
  ------------------
  |  Branch (1643:9): [True: 124k, False: 8.09k]
  ------------------
 1644|   124k|      i1 = i;
 1645|   124k|    }
 1646|   132k|    i2 = i;
 1647|   142k|    while (a_interpolate[i2] == 1) {
  ------------------
  |  Branch (1647:12): [True: 9.75k, False: 132k]
  ------------------
 1648|  9.75k|      i2++;
 1649|  9.75k|    }
 1650|   132k|    x1 = param_slot[i1];
 1651|   132k|    xi = param_slot[i];
 1652|   132k|    x2 = param_slot[i2];
 1653|       |
 1654|   132k|    if (a_interpolate[i] == 1) {
  ------------------
  |  Branch (1654:9): [True: 8.09k, False: 124k]
  ------------------
 1655|  8.09k|      if (i2 >= num_parameter_sets) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_SETS;
  ------------------
  |  |  135|    107|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_SETS 0xFFFF9810
  ------------------
  |  Branch (1655:11): [True: 107, False: 7.98k]
  ------------------
 1656|  7.98k|      if (ll_data->no_cmp_quant_coarse_xxx[param_idx][i1]) {
  ------------------
  |  Branch (1656:11): [True: 2.28k, False: 5.70k]
  ------------------
 1657|  2.28k|        ixheaacd_coarse_2_fine(output_idx_data[xtt_idx][i1], param_type, start_band,
 1658|  2.28k|                               stop_band - start_band);
 1659|  2.28k|      }
 1660|  7.98k|      if (ll_data->no_cmp_quant_coarse_xxx[param_idx][i2]) {
  ------------------
  |  Branch (1660:11): [True: 2.57k, False: 5.40k]
  ------------------
 1661|  2.57k|        ixheaacd_coarse_2_fine(output_idx_data[xtt_idx][i2], param_type, start_band,
 1662|  2.57k|                               stop_band - start_band);
 1663|  2.57k|      }
 1664|   117k|      for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1664:31): [True: 109k, False: 7.98k]
  ------------------
 1665|   109k|        WORD32 yi = 0, y1, y2;
 1666|   109k|        y1 = output_idx_data[xtt_idx][i1][band];
 1667|   109k|        y2 = output_idx_data[xtt_idx][i2][band];
 1668|       |
 1669|   109k|        if (x2 != x1) {
  ------------------
  |  Branch (1669:13): [True: 109k, False: 0]
  ------------------
 1670|   109k|          yi = y1 + (xi - x1) * (y2 - y1) / (x2 - x1);
 1671|   109k|        }
 1672|   109k|        output_idx_data[xtt_idx][i][band] = yi;
 1673|   109k|        ia_mps_dec_deq(output_idx_data[xtt_idx][i][band], param_type,
 1674|   109k|                       &(output_data[xtt_idx][i][band]), ixheaacd_mps_dec_bitdec_tables);
 1675|   109k|      }
 1676|  7.98k|    }
 1677|   132k|  }
 1678|       |
 1679|  74.5k|  ixheaacd_mps_check_index_bounds(output_idx_data, num_parameter_sets, start_band,
 1680|  74.5k|                                  stop_band, param_type, xtt_idx);
 1681|       |
 1682|  74.5k|  if (extend_frame) {
  ------------------
  |  Branch (1682:7): [True: 18.5k, False: 55.9k]
  ------------------
 1683|   353k|    for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1683:29): [True: 334k, False: 18.5k]
  ------------------
 1684|   334k|      output_data[xtt_idx][num_parameter_sets][band] =
 1685|   334k|          output_data[xtt_idx][num_parameter_sets - 1][band];
 1686|   334k|      output_idx_data[xtt_idx][num_parameter_sets][band] =
 1687|   334k|          output_idx_data[xtt_idx][num_parameter_sets - 1][band];
 1688|   334k|    }
 1689|  18.5k|  }
 1690|  74.5k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  74.5k|#define IA_NO_ERROR 0x00000000
  ------------------
 1691|  74.6k|}
ixheaacd_mps_bitdec.c:ixheaacd_create_mapping:
 1315|  27.5k|                                    WORD32 stop_band, WORD32 stride, VOID *scratch) {
 1316|  27.5k|  WORD32 in_bands, out_bands, bands_achived, bands_diff, incr, k, i;
 1317|  27.5k|  WORD32 *v_dk;
 1318|  27.5k|  in_bands = stop_band - start_band;
 1319|  27.5k|  out_bands = (in_bands - 1) / stride + 1;
 1320|  27.5k|  v_dk = scratch;
 1321|  27.5k|  if (out_bands < 1) {
  ------------------
  |  Branch (1321:7): [True: 18, False: 27.5k]
  ------------------
 1322|     18|    out_bands = 1;
 1323|     18|  }
 1324|       |
 1325|  27.5k|  bands_achived = out_bands * stride;
 1326|  27.5k|  bands_diff = in_bands - bands_achived;
 1327|   162k|  for (i = 0; i < out_bands; i++) {
  ------------------
  |  Branch (1327:15): [True: 134k, False: 27.5k]
  ------------------
 1328|   134k|    v_dk[i] = stride;
 1329|   134k|  }
 1330|       |
 1331|  27.5k|  if (bands_diff > 0) {
  ------------------
  |  Branch (1331:7): [True: 0, False: 27.5k]
  ------------------
 1332|      0|    incr = -1;
 1333|      0|    k = out_bands - 1;
 1334|  27.5k|  } else {
 1335|  27.5k|    incr = 1;
 1336|  27.5k|    k = 0;
 1337|  27.5k|  }
 1338|       |
 1339|   191k|  while (bands_diff != 0) {
  ------------------
  |  Branch (1339:10): [True: 164k, False: 27.5k]
  ------------------
 1340|   164k|    v_dk[k] = v_dk[k] - incr;
 1341|   164k|    k = k + incr;
 1342|   164k|    bands_diff = bands_diff + incr;
 1343|   164k|    if (k >= out_bands) {
  ------------------
  |  Branch (1343:9): [True: 160k, False: 3.88k]
  ------------------
 1344|   160k|      if (bands_diff > 0) {
  ------------------
  |  Branch (1344:11): [True: 0, False: 160k]
  ------------------
 1345|      0|        k = out_bands - 1;
 1346|   160k|      } else if (bands_diff < 0) {
  ------------------
  |  Branch (1346:18): [True: 148k, False: 11.4k]
  ------------------
 1347|   148k|        k = 0;
 1348|   148k|      }
 1349|   160k|    }
 1350|   164k|  }
 1351|  27.5k|  a_map[0] = start_band;
 1352|   162k|  for (i = 0; i < out_bands; i++) {
  ------------------
  |  Branch (1352:15): [True: 134k, False: 27.5k]
  ------------------
 1353|   134k|    a_map[i + 1] = a_map[i] + v_dk[i];
 1354|   134k|  }
 1355|  27.5k|}
ixheaacd_mps_bitdec.c:ixheaacd_map_frequency:
 1358|  25.6k|                                   WORD32 data_bands) {
 1359|  25.6k|  WORD32 i, j, start_band, stop_band, value;
 1360|  25.6k|  WORD32 start_band_0 = p_map[0];
 1361|       |
 1362|   151k|  for (i = 0; i < data_bands; i++) {
  ------------------
  |  Branch (1362:15): [True: 126k, False: 25.6k]
  ------------------
 1363|   126k|    value = p_input[i + start_band_0];
 1364|       |
 1365|   126k|    start_band = p_map[i];
 1366|   126k|    stop_band = p_map[i + 1];
 1367|   516k|    for (j = start_band; j < stop_band; j++) {
  ------------------
  |  Branch (1367:26): [True: 390k, False: 126k]
  ------------------
 1368|   390k|      p_output[j] = value;
 1369|   390k|    }
 1370|   126k|  }
 1371|  25.6k|}
ixheaacd_mps_bitdec.c:ixheaacd_deq_coarse:
 1375|   183k|    ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
 1376|   183k|  switch (param_type) {
 1377|  76.4k|    case CLD:
  ------------------
  |  |   23|  76.4k|#define CLD (0)
  ------------------
  |  Branch (1377:5): [True: 76.4k, False: 107k]
  ------------------
 1378|  76.4k|      if (value >= 8 || value < -7) return IA_FATAL_ERROR;
  ------------------
  |  |   25|     47|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1378:11): [True: 46, False: 76.3k]
  |  Branch (1378:25): [True: 1, False: 76.3k]
  ------------------
 1379|  76.3k|      *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_cld_coarse[value + 7];
 1380|  76.3k|      break;
 1381|       |
 1382|  91.0k|    case ICC:
  ------------------
  |  |   24|  91.0k|#define ICC (1)
  ------------------
  |  Branch (1382:5): [True: 91.0k, False: 92.4k]
  ------------------
 1383|  91.0k|      if (value >= 8 || value < 0) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1383:11): [True: 1, False: 91.0k]
  |  Branch (1383:25): [True: 0, False: 91.0k]
  ------------------
 1384|  91.0k|      *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_icc[value];
 1385|  91.0k|      break;
 1386|       |
 1387|  16.0k|    case CPC:
  ------------------
  |  |   26|  16.0k|#define CPC (3)
  ------------------
  |  Branch (1387:5): [True: 16.0k, False: 167k]
  ------------------
 1388|  16.0k|      if (value >= 16 || value < -10) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1388:11): [True: 0, False: 16.0k]
  |  Branch (1388:26): [True: 3, False: 16.0k]
  ------------------
 1389|  16.0k|      *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_cpc_coarse[value + 10];
 1390|  16.0k|      break;
 1391|      0|    default:
  ------------------
  |  Branch (1391:5): [True: 0, False: 183k]
  ------------------
 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|   183k|  }
 1394|   183k|  return IA_NO_ERROR;
  ------------------
  |  |   23|   183k|#define IA_NO_ERROR 0x00000000
  ------------------
 1395|   183k|}
ixheaacd_mps_bitdec.c:ia_mps_dec_deq:
 1399|  1.98M|    ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
 1400|  1.98M|  switch (param_type) {
 1401|  1.13M|    case CLD:
  ------------------
  |  |   23|  1.13M|#define CLD (0)
  ------------------
  |  Branch (1401:5): [True: 1.13M, False: 845k]
  ------------------
 1402|  1.13M|      if (value >= 16 || value < -15) return IA_FATAL_ERROR;
  ------------------
  |  |   25|  5.17k|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1402:11): [True: 4.29k, False: 1.13M]
  |  Branch (1402:26): [True: 882, False: 1.13M]
  ------------------
 1403|  1.13M|      *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_cld[value + 15];
 1404|  1.13M|      break;
 1405|       |
 1406|   809k|    case ICC:
  ------------------
  |  |   24|   809k|#define ICC (1)
  ------------------
  |  Branch (1406:5): [True: 809k, False: 1.17M]
  ------------------
 1407|   809k|      if (value >= 8 || value < 0) return IA_FATAL_ERROR;
  ------------------
  |  |   25|  2.20k|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1407:11): [True: 2.20k, False: 807k]
  |  Branch (1407:25): [True: 0, False: 807k]
  ------------------
 1408|   807k|      *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_icc[value];
 1409|   807k|      break;
 1410|       |
 1411|  36.0k|    case CPC:
  ------------------
  |  |   26|  36.0k|#define CPC (3)
  ------------------
  |  Branch (1411:5): [True: 36.0k, False: 1.94M]
  ------------------
 1412|  36.0k|      if (value >= 32 || value < -20) return IA_FATAL_ERROR;
  ------------------
  |  |   25|    115|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1412:11): [True: 21, False: 36.0k]
  |  Branch (1412:26): [True: 94, False: 35.9k]
  ------------------
 1413|  35.9k|      *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_cpc[value + 20];
 1414|  35.9k|      break;
 1415|       |
 1416|      0|    default:
  ------------------
  |  Branch (1416:5): [True: 0, False: 1.98M]
  ------------------
 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.98M|  }
 1419|  1.97M|  return IA_NO_ERROR;
  ------------------
  |  |   23|  1.97M|#define IA_NO_ERROR 0x00000000
  ------------------
 1420|  1.98M|}
ixheaacd_mps_bitdec.c:ixheaacd_factor_cld:
 1468|  68.3k|                                ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
 1469|  68.3k|  WORD32 factor = 0;
 1470|  68.3k|  WORD32 c1;
 1471|  68.3k|  WORD32 c2;
 1472|  68.3k|  WORD32 cld_idx;
 1473|       |
 1474|  68.3k|  ixheaacd_factor_funct(ott_vs_tot_db, quant_mode, &factor);
 1475|       |
 1476|  68.3k|  cld_idx = ixheaac_mul32_sh(*idx, factor, 23);
 1477|  68.3k|  cld_idx = ixheaac_shr32(ixheaac_add32(cld_idx, 1), 1);
 1478|       |
 1479|  68.3k|  cld_idx = min(cld_idx, 15);
  ------------------
  |  |   75|  68.3k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 46.6k, False: 21.7k]
  |  |  ------------------
  ------------------
 1480|  68.3k|  cld_idx = max(cld_idx, -15);
  ------------------
  |  |   74|  68.3k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 66.6k, False: 1.72k]
  |  |  ------------------
  ------------------
 1481|       |
 1482|  68.3k|  *idx = cld_idx;
 1483|       |
 1484|  68.3k|  c1 = ixheaacd_mps_dec_bitdec_tables->factor_cld_tab_1[*idx + 15];
 1485|  68.3k|  c2 = ixheaacd_mps_dec_bitdec_tables->factor_cld_tab_1[15 - *idx];
 1486|       |
 1487|  68.3k|  *ott_vs_tot_db_1 = ixheaac_add32_sat(c1, ott_vs_tot_db);
 1488|  68.3k|  *ott_vs_tot_db_2 = ixheaac_add32_sat(c2, ott_vs_tot_db);
 1489|  68.3k|}
ixheaacd_mps_bitdec.c:ixheaacd_factor_funct:
 1423|  68.3k|                                          WORD32 *factor) {
 1424|  68.3k|  WORD32 db_diff;
 1425|  68.3k|  WORD32 x_linear = 0;
 1426|       |
 1427|  68.3k|  WORD32 maxfactor = 0;
 1428|  68.3k|  WORD32 constfact;
 1429|       |
 1430|  68.3k|  if (ott_vs_tot_db > 0) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_MPS_PARAM;
  ------------------
  |  |  136|    318|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_MPS_PARAM 0xFFFF9811
  ------------------
  |  Branch (1430:7): [True: 318, False: 68.0k]
  ------------------
 1431|  68.0k|  db_diff = ixheaac_negate32_sat(ott_vs_tot_db);
 1432|       |
 1433|  68.0k|  switch (quant_mode) {
 1434|      0|    case QUANT_MODE_0:
  ------------------
  |  Branch (1434:5): [True: 0, False: 68.0k]
  ------------------
 1435|      0|      return (ONE_IN_Q24);
  ------------------
  |  |   50|      0|#define ONE_IN_Q24 (16777216)
  ------------------
 1436|      0|      break;
 1437|  14.7k|    case QUANT_MODE_1:
  ------------------
  |  Branch (1437:5): [True: 14.7k, False: 53.3k]
  ------------------
 1438|  14.7k|      x_linear = 1024;
 1439|       |
 1440|  14.7k|      maxfactor = 83886080;
 1441|  14.7k|      constfact = 3277;
 1442|  14.7k|      break;
 1443|  20.7k|    case QUANT_MODE_2:
  ------------------
  |  Branch (1443:5): [True: 20.7k, False: 47.3k]
  ------------------
 1444|  20.7k|      x_linear = 1024;
 1445|       |
 1446|  20.7k|      maxfactor = (ONE_IN_Q27);
  ------------------
  |  |   51|  20.7k|#define ONE_IN_Q27 (134217728)
  ------------------
 1447|  20.7k|      constfact = 4779;
 1448|  20.7k|      break;
 1449|  32.6k|    default:
  ------------------
  |  Branch (1449:5): [True: 32.6k, False: 35.4k]
  ------------------
 1450|  32.6k|      return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_QUANT_MODE;
  ------------------
  |  |  127|  32.6k|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_QUANT_MODE 0xFFFF9808
  ------------------
 1451|  68.0k|  }
 1452|       |
 1453|  35.4k|  if (db_diff > (x_linear << 5)) {
  ------------------
  |  Branch (1453:7): [True: 12.3k, False: 23.0k]
  ------------------
 1454|  12.3k|    WORD32 db_diff_fix = db_diff >> 5;
 1455|  12.3k|    *factor = ixheaac_add32_sat(
 1456|  12.3k|        ixheaac_sat64_32(ixheaac_mult64(ixheaac_sub32_sat(db_diff_fix, x_linear), constfact)),
 1457|  12.3k|        ONE_IN_Q24);
  ------------------
  |  |   50|  12.3k|#define ONE_IN_Q24 (16777216)
  ------------------
 1458|  23.0k|  } else {
 1459|  23.0k|    *factor = ONE_IN_Q24;
  ------------------
  |  |   50|  23.0k|#define ONE_IN_Q24 (16777216)
  ------------------
 1460|  23.0k|  }
 1461|       |
 1462|  35.4k|  *factor = min(maxfactor, *factor);
  ------------------
  |  |   75|  35.4k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 4.11k, False: 31.3k]
  |  |  ------------------
  ------------------
 1463|  35.4k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  35.4k|#define IA_NO_ERROR 0x00000000
  ------------------
 1464|  68.0k|}
ixheaacd_mps_bitdec.c:ixheaacd_mps_check_index_bounds:
   86|  74.5k|    WORD32 param_type, WORD32 xtt_idx) {
   87|  74.5k|  WORD32 i, band;
   88|   206k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (88:15): [True: 132k, False: 74.5k]
  ------------------
   89|  2.22M|    for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (89:29): [True: 2.09M, False: 132k]
  ------------------
   90|  2.09M|      if (param_type == CLD) {
  ------------------
  |  |   23|  2.09M|#define CLD (0)
  ------------------
  |  Branch (90:11): [True: 1.14M, False: 950k]
  ------------------
   91|  1.14M|        output_idx_data[xtt_idx][i][band] =
   92|  1.14M|          ixheaacd_bound_check(output_idx_data[xtt_idx][i][band], -15, 15);
   93|  1.14M|      } else if (param_type == ICC) {
  ------------------
  |  |   24|   950k|#define ICC (1)
  ------------------
  |  Branch (93:18): [True: 899k, False: 51.4k]
  ------------------
   94|   899k|        output_idx_data[xtt_idx][i][band] =
   95|   899k|        ixheaacd_bound_check(output_idx_data[xtt_idx][i][band], 0, 7);
   96|   899k|      }
   97|  2.09M|    }
   98|   132k|  }
   99|  74.5k|}
ixheaacd_mps_bitdec.c:ixheaacd_bound_check:
   54|  2.04M|static WORD32 ixheaacd_bound_check(WORD32 var, WORD32 lower_bound, WORD32 upper_bound) {
   55|  2.04M|  var = min(var, upper_bound);
  ------------------
  |  |   75|  2.04M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 1.33M, False: 711k]
  |  |  ------------------
  ------------------
   56|  2.04M|  var = max(var, lower_bound);
  ------------------
  |  |   74|  2.04M|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 1.25M, False: 789k]
  |  |  ------------------
  ------------------
   57|  2.04M|  return var;
   58|  2.04M|}
ixheaacd_mps_bitdec.c:ixheaacd_decode_and_map_frame_ttt:
 1982|  13.8k|{
 1983|  13.8k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  13.8k|#define IA_NO_ERROR 0x00000000
  ------------------
 1984|  13.8k|  ia_mps_dec_spatial_bs_frame_struct *p_cur_bs;
 1985|  13.8k|  ia_mps_dec_bitdec_tables_struct *bitdec_table =
 1986|  13.8k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
 1987|  13.8k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
 1988|  13.8k|  WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
 1989|       |
 1990|  13.8k|  WORD32 num_bands;
 1991|       |
 1992|  13.8k|  WORD32 i, j, offset;
 1993|  13.8k|  WORD32 num_ttt_boxes;
 1994|  13.8k|  VOID *free_scratch;
 1995|       |
 1996|  13.8k|  p_cur_bs = pstr_mps_state->bs_frame;
 1997|  13.8k|  num_bands = pstr_mps_state->bitstream_parameter_bands;
 1998|  13.8k|  offset = pstr_mps_state->num_ott_boxes;
 1999|  13.8k|  num_ttt_boxes = pstr_mps_state->num_ttt_boxes;
 2000|  13.8k|  free_scratch = pstr_mps_state->mps_scratch_mem_v;
 2001|       |
 2002|  16.2k|  for (i = 0; i < num_ttt_boxes; i++) {
  ------------------
  |  Branch (2002:15): [True: 2.38k, False: 13.8k]
  ------------------
 2003|  2.38k|    for (j = 0;
 2004|  4.92k|         (j < 2) &&
  ------------------
  |  Branch (2004:10): [True: 4.48k, False: 442]
  ------------------
 2005|  4.48k|         p_aux_struct->ttt_config[j][i].start_band < p_aux_struct->ttt_config[j][i].stop_band;
  ------------------
  |  Branch (2005:10): [True: 2.58k, False: 1.90k]
  ------------------
 2006|  2.58k|         j++) {
 2007|  2.58k|      if (p_aux_struct->ttt_config[j][i].mode < 2) {
  ------------------
  |  Branch (2007:11): [True: 797, False: 1.78k]
  ------------------
 2008|    797|        error_code = ixheaacd_map_index_data(
 2009|    797|            &p_cur_bs->cpc_lossless_data, p_aux_struct->ttt_cpc_1, p_cur_bs->ttt_cpc_1_idx,
 2010|    797|            p_cur_bs->cmp_ttt_cpc_1_idx, NULL, i, p_cur_bs->ttt_cpc_1_idx_prev,
 2011|    797|            offset + 4 * i + 2 * j, CPC, p_aux_struct->ttt_config[j][i].bitstream_start_band,
  ------------------
  |  |   26|    797|#define CPC (3)
  ------------------
 2012|    797|            p_aux_struct->ttt_config[j][i].bitstream_stop_band, pstr_mps_state->cpc_default,
 2013|    797|            pstr_mps_state->num_parameter_sets, param_slot, pstr_mps_state->extend_frame,
 2014|    797|            pstr_mps_state->quant_mode, NULL, NULL, NULL, bitdec_table, free_scratch);
 2015|    797|        if (error_code) return error_code;
  ------------------
  |  Branch (2015:13): [True: 8, False: 789]
  ------------------
 2016|       |
 2017|    789|        error_code = ixheaacd_map_index_data(
 2018|    789|            &p_cur_bs->cpc_lossless_data, p_aux_struct->ttt_cpc_2, p_cur_bs->ttt_cpc_2_idx,
 2019|    789|            p_cur_bs->cmp_ttt_cpc_2_idx, NULL, i, p_cur_bs->ttt_cpc_2_idx_prev,
 2020|    789|            offset + 4 * i + 1 + 2 * j, CPC, p_aux_struct->ttt_config[j][i].bitstream_start_band,
  ------------------
  |  |   26|    789|#define CPC (3)
  ------------------
 2021|    789|            p_aux_struct->ttt_config[j][i].bitstream_stop_band, pstr_mps_state->cpc_default,
 2022|    789|            pstr_mps_state->num_parameter_sets, param_slot, pstr_mps_state->extend_frame,
 2023|    789|            pstr_mps_state->quant_mode, NULL, NULL, NULL, bitdec_table, free_scratch);
 2024|    789|        if (error_code) return error_code;
  ------------------
  |  Branch (2024:13): [True: 7, False: 782]
  ------------------
 2025|       |
 2026|    782|        error_code = ixheaacd_map_index_data(
 2027|    782|            &p_cur_bs->icc_lossless_data, p_aux_struct->ttt_icc, p_cur_bs->ttt_icc_idx,
 2028|    782|            p_cur_bs->cmp_ttt_icc_idx, NULL, i, p_cur_bs->ttt_icc_idx_prev,
 2029|    782|            offset + 4 * i + 2 * j, ICC, p_aux_struct->ttt_config[j][i].bitstream_start_band,
  ------------------
  |  |   24|    782|#define ICC (1)
  ------------------
 2030|    782|            p_aux_struct->ttt_config[j][i].bitstream_stop_band, pstr_mps_state->icc_default,
 2031|    782|            pstr_mps_state->num_parameter_sets, param_slot, pstr_mps_state->extend_frame,
 2032|    782|            pstr_mps_state->quant_mode, NULL, NULL, NULL, bitdec_table, free_scratch);
 2033|    782|        if (error_code) return error_code;
  ------------------
  |  Branch (2033:13): [True: 5, False: 777]
  ------------------
 2034|    782|      }
 2035|       |
 2036|  1.78k|      else {
 2037|  1.78k|        error_code = ixheaacd_map_index_data(
 2038|  1.78k|            &p_cur_bs->cld_lossless_data, p_aux_struct->ttt_cld_1, p_cur_bs->ttt_cld_1_idx,
 2039|  1.78k|            p_cur_bs->cmp_ttt_cld_1_idx, NULL, i, p_cur_bs->ttt_cld_1_idx_prev,
 2040|  1.78k|            offset + 4 * i + 2 * j, CLD, p_aux_struct->ttt_config[j][i].bitstream_start_band,
  ------------------
  |  |   23|  1.78k|#define CLD (0)
  ------------------
 2041|  1.78k|            p_aux_struct->ttt_config[j][i].bitstream_stop_band,
 2042|  1.78k|            pstr_mps_state->ttt_cld_1_default[i], pstr_mps_state->num_parameter_sets, param_slot,
 2043|  1.78k|            pstr_mps_state->extend_frame, pstr_mps_state->quant_mode, NULL, NULL, NULL,
 2044|  1.78k|            bitdec_table, free_scratch);
 2045|  1.78k|        if (error_code) return error_code;
  ------------------
  |  Branch (2045:13): [True: 13, False: 1.77k]
  ------------------
 2046|       |
 2047|  1.77k|        error_code = ixheaacd_map_index_data(
 2048|  1.77k|            &p_cur_bs->cld_lossless_data, p_aux_struct->ttt_cld_2, p_cur_bs->ttt_cld_2_idx,
 2049|  1.77k|            p_cur_bs->cmp_ttt_cld_2_idx, NULL, i, p_cur_bs->ttt_cld_2_idx_prev,
 2050|  1.77k|            offset + 4 * i + 1 + 2 * j, CLD, p_aux_struct->ttt_config[j][i].bitstream_start_band,
  ------------------
  |  |   23|  1.77k|#define CLD (0)
  ------------------
 2051|  1.77k|            p_aux_struct->ttt_config[j][i].bitstream_stop_band,
 2052|  1.77k|            pstr_mps_state->ttt_cld_2_default[i], pstr_mps_state->num_parameter_sets, param_slot,
 2053|  1.77k|            pstr_mps_state->extend_frame, pstr_mps_state->quant_mode, NULL, NULL, NULL,
 2054|  1.77k|            bitdec_table, free_scratch);
 2055|  1.77k|        if (error_code) return error_code;
  ------------------
  |  Branch (2055:13): [True: 4, False: 1.76k]
  ------------------
 2056|  1.77k|      }
 2057|       |
 2058|  2.54k|      if (pstr_mps_state->up_mix_type == 2) {
  ------------------
  |  Branch (2058:11): [True: 0, False: 2.54k]
  ------------------
 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.54k|    }
 2075|  2.38k|  }
 2076|  13.8k|  return error_code;
 2077|  13.8k|}
ixheaacd_mps_bitdec.c:ixheaacd_decode_and_map_frame_smg:
 2079|  13.8k|static VOID ixheaacd_decode_and_map_frame_smg(ia_heaac_mps_state_struct *pstr_mps_state) {
 2080|  13.8k|  ia_mps_dec_smoothing_state_struct *smooth_state =
 2081|  13.8k|      pstr_mps_state->mps_persistent_mem.smooth_state;
 2082|  13.8k|  ia_mps_dec_bitdec_tables_struct *bitdec_table =
 2083|  13.8k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
 2084|  13.8k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
 2085|  13.8k|  WORD32 *smg_time = p_aux_struct->smg_time;
 2086|  13.8k|  WORD32 ps, pb, pg, pb_stride, data_bands, pb_start, pb_stop;
 2087|  13.8k|  WORD32 *a_group_to_band;
 2088|  13.8k|  VOID *free_scratch;
 2089|  13.8k|  ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
 2090|  13.8k|  pstr_mps_state->smooth_control = frame->bs_smooth_control;
 2091|  13.8k|  a_group_to_band = pstr_mps_state->mps_scratch_mem_v;
 2092|  13.8k|  free_scratch =
 2093|  13.8k|      a_group_to_band + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS_PLUS_1,
  ------------------
  |  |   89|  13.8k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 2094|  13.8k|                                                      sizeof(*a_group_to_band), BYTE_ALIGN_8);
 2095|       |
 2096|  13.8k|  if (pstr_mps_state->smooth_control) {
  ------------------
  |  Branch (2096:7): [True: 13.8k, False: 0]
  ------------------
 2097|  35.3k|    for (ps = 0; ps < pstr_mps_state->num_parameter_sets; ps++) {
  ------------------
  |  Branch (2097:18): [True: 21.5k, False: 13.8k]
  ------------------
 2098|  21.5k|      switch (frame->bs_smooth_mode[ps]) {
 2099|  11.1k|        case SMOOTH_MODE_0:
  ------------------
  |  Branch (2099:9): [True: 11.1k, False: 10.3k]
  ------------------
 2100|  11.1k|          smg_time[ps] = 256;
 2101|   198k|          for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
  ------------------
  |  Branch (2101:24): [True: 187k, False: 11.1k]
  ------------------
 2102|   187k|            p_aux_struct->smg_data[ps][pb] = 0;
 2103|   187k|          }
 2104|  11.1k|          break;
 2105|       |
 2106|  5.05k|        case SMOOTH_MODE_1:
  ------------------
  |  Branch (2106:9): [True: 5.05k, False: 16.4k]
  ------------------
 2107|  5.05k|          if (ps > 0)
  ------------------
  |  Branch (2107:15): [True: 979, False: 4.07k]
  ------------------
 2108|    979|            smg_time[ps] = smg_time[ps - 1];
 2109|  4.07k|          else
 2110|  4.07k|            smg_time[ps] = smooth_state->prev_smg_time;
 2111|       |
 2112|   100k|          for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
  ------------------
  |  Branch (2112:24): [True: 95.1k, False: 5.05k]
  ------------------
 2113|  95.1k|            if (ps > 0)
  ------------------
  |  Branch (2113:17): [True: 15.6k, False: 79.5k]
  ------------------
 2114|  15.6k|              p_aux_struct->smg_data[ps][pb] = p_aux_struct->smg_data[ps - 1][pb];
 2115|  79.5k|            else
 2116|  79.5k|              p_aux_struct->smg_data[ps][pb] = smooth_state->prev_smg_data[pb];
 2117|  95.1k|          }
 2118|  5.05k|          break;
 2119|       |
 2120|  3.43k|        case SMOOTH_MODE_2:
  ------------------
  |  Branch (2120:9): [True: 3.43k, False: 18.0k]
  ------------------
 2121|  3.43k|          smg_time[ps] = bitdec_table->smg_time_table[frame->bs_smooth_time[ps]];
 2122|  67.4k|          for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
  ------------------
  |  Branch (2122:24): [True: 63.9k, False: 3.43k]
  ------------------
 2123|  63.9k|            p_aux_struct->smg_data[ps][pb] = 1;
 2124|  63.9k|          }
 2125|  3.43k|          break;
 2126|       |
 2127|  1.87k|        case SMOOTH_MODE_3:
  ------------------
  |  Branch (2127:9): [True: 1.87k, False: 19.6k]
  ------------------
 2128|  1.87k|          smg_time[ps] = bitdec_table->smg_time_table[frame->bs_smooth_time[ps]];
 2129|  1.87k|          pb_stride = bitdec_table->pb_stride_table[frame->bs_freq_res_stride_smg[ps]];
 2130|  1.87k|          data_bands = (pstr_mps_state->bitstream_parameter_bands - 1) / pb_stride + 1;
 2131|  1.87k|          ixheaacd_create_mapping(a_group_to_band, 0, pstr_mps_state->bitstream_parameter_bands,
 2132|  1.87k|                                  pb_stride, free_scratch);
 2133|  10.6k|          for (pg = 0; pg < data_bands; pg++) {
  ------------------
  |  Branch (2133:24): [True: 8.82k, False: 1.87k]
  ------------------
 2134|  8.82k|            pb_start = a_group_to_band[pg];
 2135|  8.82k|            pb_stop = a_group_to_band[pg + 1];
 2136|  34.1k|            for (pb = pb_start; pb < pb_stop; pb++) {
  ------------------
  |  Branch (2136:33): [True: 25.3k, False: 8.82k]
  ------------------
 2137|  25.3k|              p_aux_struct->smg_data[ps][pb] = frame->bs_smg_data[ps][pg];
 2138|  25.3k|            }
 2139|  8.82k|          }
 2140|  1.87k|          break;
 2141|       |
 2142|      0|        default:
  ------------------
  |  Branch (2142:9): [True: 0, False: 21.5k]
  ------------------
 2143|      0|          break;
 2144|  21.5k|      }
 2145|  21.5k|    }
 2146|       |
 2147|  13.8k|    smooth_state->prev_smg_time = smg_time[pstr_mps_state->num_parameter_sets - 1];
 2148|   265k|    for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
  ------------------
  |  Branch (2148:18): [True: 251k, False: 13.8k]
  ------------------
 2149|   251k|      smooth_state->prev_smg_data[pb] =
 2150|   251k|          p_aux_struct->smg_data[pstr_mps_state->num_parameter_sets - 1][pb];
 2151|   251k|    }
 2152|       |
 2153|  13.8k|    if (pstr_mps_state->extend_frame) {
  ------------------
  |  Branch (2153:9): [True: 3.72k, False: 10.0k]
  ------------------
 2154|  3.72k|      smg_time[pstr_mps_state->num_parameter_sets] =
 2155|  3.72k|          smg_time[pstr_mps_state->num_parameter_sets - 1];
 2156|  73.9k|      for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
  ------------------
  |  Branch (2156:20): [True: 70.2k, False: 3.72k]
  ------------------
 2157|  70.2k|        p_aux_struct->smg_data[pstr_mps_state->num_parameter_sets][pb] =
 2158|  70.2k|            p_aux_struct->smg_data[pstr_mps_state->num_parameter_sets - 1][pb];
 2159|  70.2k|      }
 2160|  3.72k|    }
 2161|       |
 2162|  13.8k|    if (pstr_mps_state->up_mix_type == 2) {
  ------------------
  |  Branch (2162:9): [True: 0, False: 13.8k]
  ------------------
 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.8k|  }
 2182|  13.8k|  return;
 2183|  13.8k|}
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|    995|  ia_heaac_mps_state_struct *pstr_mps_state) {
 2187|    995|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|    995|#define IA_NO_ERROR 0x00000000
  ------------------
 2188|    995|  ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
 2189|    995|  ia_mps_dec_bitdec_tables_struct *bitdec_table =
 2190|    995|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
 2191|    995|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
 2192|    995|  WORD32 *param_slot = p_aux_struct->param_slot;
 2193|    995|  WORD32 offset = pstr_mps_state->num_ott_boxes + 4 * pstr_mps_state->num_ttt_boxes;
 2194|    995|  WORD32 ch;
 2195|       |
 2196|    995|  VOID *scratch = pstr_mps_state->mps_scratch_mem_v;
 2197|       |
 2198|  2.49k|  for (ch = 0; ch < pstr_mps_state->num_input_channels; ch++) {
  ------------------
  |  Branch (2198:16): [True: 1.51k, False: 980]
  ------------------
 2199|  1.51k|    error_code = ixheaacd_map_index_data(
 2200|  1.51k|        &frame->cld_lossless_data, p_aux_struct->arbdmx_gain, frame->arbdmx_gain_idx,
 2201|  1.51k|        frame->cmp_arbdmx_gain_idx, NULL, ch, frame->arbdmx_gain_idx_prev, offset + ch, CLD, 0,
  ------------------
  |  |   23|  1.51k|#define CLD (0)
  ------------------
 2202|  1.51k|        pstr_mps_state->bitstream_parameter_bands, pstr_mps_state->arbdmx_gain_default,
 2203|  1.51k|        pstr_mps_state->num_parameter_sets, param_slot, pstr_mps_state->extend_frame, 0, NULL,
 2204|  1.51k|        NULL, NULL, bitdec_table, scratch);
 2205|  1.51k|    if (error_code) return error_code;
  ------------------
  |  Branch (2205:9): [True: 15, False: 1.50k]
  ------------------
 2206|       |
 2207|  1.50k|    p_aux_struct->arbdmx_residual_abs[ch] = frame->bs_arbitrary_downmix_residual_abs[ch];
 2208|  1.50k|    p_aux_struct->arbdmx_alpha_upd_set[ch] =
 2209|  1.50k|        frame->bs_arbitrary_downmix_residual_alpha_update_set[ch];
 2210|       |
 2211|  1.50k|    if (pstr_mps_state->up_mix_type == 2) {
  ------------------
  |  Branch (2211:9): [True: 0, False: 1.50k]
  ------------------
 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.50k|  }
 2225|    980|  return error_code;
 2226|    995|}

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

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

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

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

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

ixheaacd_mps_create:
   90|  2.28k|                           ia_usac_dec_mps_config_struct* mps212_config) {
   91|  2.28k|  WORD32 num_ch;
   92|  2.28k|  WORD32 err_code = 0;
   93|       |
   94|  2.28k|  ia_mps_bs_frame bs_frame;
   95|       |
   96|  2.28k|  self->num_parameter_sets = 1;
   97|  2.28k|  self->qmf_band_count = 64;
   98|       |
   99|  2.28k|  self->res_ch_count = 0;
  100|       |
  101|  2.28k|  if (mps212_config) {
  ------------------
  |  Branch (101:7): [True: 2.28k, False: 0]
  ------------------
  102|  2.28k|    self->config = mps212_config;
  103|  2.28k|    self->frame_length = bs_frame_len;
  104|  2.28k|    self->in_ch_count = 1;
  105|  2.28k|    self->out_ch_count = 2;
  106|  2.28k|    self->residual_coding = residual_coding;
  107|  2.28k|    if (self->residual_coding) {
  ------------------
  |  Branch (107:9): [True: 848, False: 1.43k]
  ------------------
  108|    848|      self->bs_residual_present = 1;
  109|    848|      self->bs_residual_bands = mps212_config->bs_residual_bands;
  110|    848|      if (self->config->bs_phase_coding) {
  ------------------
  |  Branch (110:11): [True: 581, False: 267]
  ------------------
  111|    581|        self->config->bs_phase_coding = 2;
  112|    581|      }
  113|    848|    }
  114|  2.28k|  }
  115|       |
  116|  2.28k|  err_code = ixheaacd_mps_header_decode(self);
  117|       |
  118|  2.28k|  if (err_code != IA_NO_ERROR) {
  ------------------
  |  |   23|  2.28k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (118:7): [True: 7, False: 2.27k]
  ------------------
  119|      7|    self->mps_init_done = 0;
  120|      7|    return err_code;
  121|      7|  }
  122|       |
  123|  2.27k|  if ((self->residual_coding) && (self->res_bands > 0)) self->res_ch_count++;
  ------------------
  |  Branch (123:7): [True: 848, False: 1.42k]
  |  Branch (123:34): [True: 597, False: 251]
  ------------------
  124|       |
  125|  2.27k|  ixheaacd_mps_env_init(self);
  126|       |
  127|  2.27k|  self->resolution = self->qmf_band_count;
  128|       |
  129|  6.83k|  for (num_ch = 0; num_ch < self->out_ch_count; num_ch++) {
  ------------------
  |  Branch (129:20): [True: 4.55k, False: 2.27k]
  ------------------
  130|  4.55k|    ixheaacd_mps_synt_init(self->qmf_filt_state[num_ch]);
  131|  4.55k|  }
  132|       |
  133|  2.27k|  ixheaacd_mps_qmf_hybrid_analysis_init(&self->hyb_filt_state[0]);
  134|       |
  135|  2.27k|  if ((self->residual_coding) && (self->res_bands > 0))
  ------------------
  |  Branch (135:7): [True: 848, False: 1.42k]
  |  Branch (135:34): [True: 597, False: 251]
  ------------------
  136|    597|    ixheaacd_mps_qmf_hybrid_analysis_init(&self->hyb_filt_state[1]);
  137|       |
  138|  2.27k|  err_code = ixheaacd_mps_decor_init(&(self->mps_decor), self->hyb_band_count_max,
  139|  2.27k|                                     self->config->bs_decorr_config,
  140|  2.27k|                                     self->object_type);
  141|       |
  142|  2.27k|  if (err_code != IA_NO_ERROR) {
  ------------------
  |  |   23|  2.27k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (142:7): [True: 15, False: 2.26k]
  ------------------
  143|     15|    self->mps_init_done = 0;
  144|     15|    return err_code;
  145|     15|  }
  146|       |
  147|  2.26k|  ixheaacd_mps_init_pre_and_post_matrix(self);
  148|       |
  149|  2.26k|  self->parse_nxt_frame = 1;
  150|       |
  151|  2.26k|  bs_frame = self->bs_frame;
  152|  2.26k|  memset(bs_frame.cld_idx_pre, 0, MAX_PARAMETER_BANDS * sizeof(WORD32));
  ------------------
  |  |   55|  2.26k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  153|  2.26k|  memset(bs_frame.icc_idx_pre, 0, MAX_PARAMETER_BANDS * sizeof(WORD32));
  ------------------
  |  |   55|  2.26k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  154|  2.26k|  memset(bs_frame.cmp_cld_idx_prev, 0, MAX_PARAMETER_BANDS * sizeof(WORD32));
  ------------------
  |  |   55|  2.26k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  155|  2.26k|  memset(bs_frame.cmp_icc_idx_prev, 0, MAX_PARAMETER_BANDS * sizeof(WORD32));
  ------------------
  |  |   55|  2.26k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  156|       |
  157|  2.26k|  self->subband_var.init_flag = 0;
  158|  2.26k|  self->subband_var.update_old_ener = 0;
  159|  2.26k|  self->subband_var.nrg_dir = 0;
  160|  2.26k|  memset(self->subband_var.nrg_diff, 0, 2 * sizeof(FLOAT32));
  161|       |
  162|  2.26k|  memset(self->opd_smooth.smooth_l_phase, 0,
  163|  2.26k|         MAX_PARAMETER_BANDS * sizeof(WORD32));
  ------------------
  |  |   55|  2.26k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  164|  2.26k|  memset(self->opd_smooth.smooth_r_phase, 0,
  165|  2.26k|         MAX_PARAMETER_BANDS * sizeof(WORD32));
  ------------------
  |  |   55|  2.26k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  166|  2.26k|  self->mps_init_done = 1;
  167|       |
  168|  2.26k|  return 0;
  169|  2.27k|}
ixheaacd_mps_qmf_hyb_analysis:
  179|  15.6k|VOID ixheaacd_mps_qmf_hyb_analysis(ia_mps_dec_state_struct* self) {
  180|  15.6k|  if (self->object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (180:7): [True: 2.21k, False: 13.3k]
  ------------------
  181|  13.3k|      self->object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (181:7): [True: 0, False: 13.3k]
  ------------------
  182|  2.21k|    WORD32 k, n;
  183|       |
  184|  46.8k|    for (n = 0; n < self->time_slots; n++) {
  ------------------
  |  Branch (184:17): [True: 44.5k, False: 2.21k]
  ------------------
  185|  2.51M|      for (k = 0; k < self->qmf_band_count; k++) {
  ------------------
  |  Branch (185:19): [True: 2.46M, False: 44.5k]
  ------------------
  186|  2.46M|        self->hyb_in[0][k][n].re = self->qmf_in[0][n][k].re;
  187|  2.46M|        self->hyb_in[0][k][n].im = self->qmf_in[0][n][k].im;
  188|  2.46M|      }
  189|  44.5k|    }
  190|  13.3k|  } else {
  191|  13.3k|      ixheaacd_mps_qmf_hybrid_analysis(&self->hyb_filt_state[0], self->qmf_in[0],
  192|  13.3k|                                   self->qmf_band_count, self->time_slots,
  193|  13.3k|                                   self->hyb_in[0]);
  194|  13.3k|  }
  195|       |
  196|  15.6k|  if ((self->residual_coding) && (self->res_bands > 0)) {
  ------------------
  |  Branch (196:7): [True: 10.9k, False: 4.61k]
  |  Branch (196:34): [True: 9.13k, False: 1.86k]
  ------------------
  197|  9.13k|    ixheaacd_mps_qmf_hybrid_analysis(&self->hyb_filt_state[self->in_ch_count],
  198|  9.13k|                                     self->qmf_in[1], self->band_count[1],
  199|  9.13k|                                     self->time_slots, self->hyb_res);
  200|  9.13k|  }
  201|  15.6k|}
ixheaacd_mps_qmf_hyb_synthesis:
  203|  81.6k|VOID ixheaacd_mps_qmf_hyb_synthesis(ia_mps_dec_state_struct* self) {
  204|  81.6k|  WORD32 ch;
  205|       |
  206|  81.6k|  if (self->object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (206:7): [True: 2.21k, False: 79.4k]
  ------------------
  207|  79.4k|      self->object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (207:7): [True: 0, False: 79.4k]
  ------------------
  208|  2.21k|    WORD32 k, n;
  209|  6.65k|    for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (209:18): [True: 4.43k, False: 2.21k]
  ------------------
  210|  93.6k|      for (n = 0; n < self->time_slots; n++) {
  ------------------
  |  Branch (210:19): [True: 89.1k, False: 4.43k]
  ------------------
  211|  5.02M|        for (k = 0; k < self->qmf_band_count; k++) {
  ------------------
  |  Branch (211:21): [True: 4.93M, False: 89.1k]
  ------------------
  212|  4.93M|          self->qmf_out_dir[ch][n][k].re = self->hyb_dir_out[ch][n][k].re;
  213|  4.93M|          self->qmf_out_dir[ch][n][k].im = self->hyb_dir_out[ch][n][k].im;
  214|  4.93M|        }
  215|  89.1k|      }
  216|  4.43k|    }
  217|  79.4k|  } else {
  218|   238k|      for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (218:20): [True: 158k, False: 79.4k]
  ------------------
  219|   158k|          ixheaacd_mps_qmf_hybrid_synthesis(self->hyb_dir_out[ch],
  220|   158k|                                      self->qmf_band_count, self->time_slots,
  221|   158k|                                      self->qmf_out_dir[ch]);
  222|   158k|      }
  223|  79.4k|  }
  224|  81.6k|}
ixheaacd_mps_decor:
  226|  15.6k|VOID ixheaacd_mps_decor(ia_mps_dec_state_struct* self) {
  227|  15.6k|  WORD32 k, sb_sample, idx;
  228|       |
  229|  15.6k|  ia_cmplx_flt_struct(*scratch)[MAX_HYBRID_BANDS_MPS];
  230|       |
  231|  15.6k|  ia_cmplx_flt_struct coeff;
  232|  15.6k|  WORD32 band_start = 7;
  233|       |
  234|  15.6k|  scratch = self->scratch;
  235|       |
  236|  31.2k|  for (k = self->dir_sig_count; k < self->dir_sig_count + self->decor_sig_count;
  ------------------
  |  Branch (236:33): [True: 15.6k, False: 15.6k]
  ------------------
  237|  15.6k|       k++) {
  238|  15.6k|    if (self->bs_tsd_enable) {
  ------------------
  |  Branch (238:9): [True: 8.90k, False: 6.69k]
  ------------------
  239|   430k|      for (sb_sample = 0; sb_sample < self->time_slots; sb_sample++) {
  ------------------
  |  Branch (239:27): [True: 421k, False: 8.90k]
  ------------------
  240|   421k|        if (self->bs_tsd_sep_data[sb_sample]) {
  ------------------
  |  Branch (240:13): [True: 63.3k, False: 358k]
  ------------------
  241|  1.74M|          for (idx = band_start; idx < self->mps_decor.num_bins; idx++) {
  ------------------
  |  Branch (241:34): [True: 1.68M, False: 63.3k]
  ------------------
  242|  1.68M|            scratch[sb_sample][idx].re = self->v[k][sb_sample][idx].re;
  243|  1.68M|            scratch[sb_sample][idx].im = self->v[k][sb_sample][idx].im;
  244|  1.68M|            self->v[k][sb_sample][idx].re = 0.0f;
  245|  1.68M|            self->v[k][sb_sample][idx].im = 0.0f;
  246|  1.68M|          }
  247|  63.3k|        }
  248|   421k|      }
  249|  8.90k|    }
  250|       |
  251|  15.6k|    ixheaacd_mps_decor_apply(&self->mps_decor, self->v[k], self->w_diff[k],
  252|  15.6k|                             self->time_slots, NO_RES_BANDS,
  ------------------
  |  |   45|  15.6k|#define NO_RES_BANDS -1
  ------------------
  253|  15.6k|                             self->ldmps_config.ldmps_present_flag);
  254|       |
  255|  15.6k|    if (self->bs_tsd_enable) {
  ------------------
  |  Branch (255:9): [True: 8.90k, False: 6.69k]
  ------------------
  256|   430k|      for (sb_sample = 0; sb_sample < self->time_slots; sb_sample++) {
  ------------------
  |  Branch (256:27): [True: 421k, False: 8.90k]
  ------------------
  257|   421k|        if (self->bs_tsd_sep_data[sb_sample]) {
  ------------------
  |  Branch (257:13): [True: 63.3k, False: 358k]
  ------------------
  258|  63.3k|          coeff.re = ixheaacd_tsd_mul_re[self->bs_tsd_tr_phase_data[sb_sample]];
  259|  63.3k|          coeff.im = ixheaacd_tsd_mul_im[self->bs_tsd_tr_phase_data[sb_sample]];
  260|       |
  261|  1.74M|          for (idx = band_start; idx < self->mps_decor.num_bins; idx++) {
  ------------------
  |  Branch (261:34): [True: 1.68M, False: 63.3k]
  ------------------
  262|  1.68M|            self->w_diff[k][sb_sample][idx].re +=
  263|  1.68M|                coeff.re * scratch[sb_sample][idx].re -
  264|  1.68M|                coeff.im * scratch[sb_sample][idx].im;
  265|  1.68M|            self->w_diff[k][sb_sample][idx].im +=
  266|  1.68M|                coeff.im * scratch[sb_sample][idx].re +
  267|  1.68M|                coeff.re * scratch[sb_sample][idx].im;
  268|  1.68M|          }
  269|  63.3k|        }
  270|   421k|      }
  271|  8.90k|    }
  272|  15.6k|  }
  273|  15.6k|}
ixheaacd_mps_mix_res_decor:
  275|  15.6k|VOID ixheaacd_mps_mix_res_decor(ia_mps_dec_state_struct* self) {
  276|  15.6k|  WORD32 ts, qs, row, indx;
  277|       |
  278|   679k|  for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (278:16): [True: 663k, False: 15.6k]
  ------------------
  279|  24.6M|    for (qs = 0; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (279:18): [True: 23.9M, False: 663k]
  ------------------
  280|  23.9M|      indx = self->hyb_band_to_processing_band_table[qs];
  281|       |
  282|  47.9M|      for (row = 0; row < self->dir_sig_count; row++) {
  ------------------
  |  Branch (282:21): [True: 23.9M, False: 23.9M]
  ------------------
  283|  23.9M|        self->w_dir[row][ts][qs].re = self->v[row][ts][qs].re;
  284|  23.9M|        self->w_dir[row][ts][qs].im = self->v[row][ts][qs].im;
  285|  23.9M|      }
  286|       |
  287|  23.9M|      for (row = self->dir_sig_count;
  288|  47.9M|           row < (self->dir_sig_count + self->decor_sig_count); row++) {
  ------------------
  |  Branch (288:12): [True: 23.9M, False: 23.9M]
  ------------------
  289|  23.9M|        if (indx < self->res_bands) {
  ------------------
  |  Branch (289:13): [True: 11.0M, False: 12.9M]
  ------------------
  290|  11.0M|          self->w_dir[row][ts][qs].re = self->hyb_res[qs][ts].re;
  291|  11.0M|          self->w_dir[row][ts][qs].im = self->hyb_res[qs][ts].im;
  292|  12.9M|        } else {
  293|  12.9M|          self->w_dir[row][ts][qs].re = 0.0f;
  294|  12.9M|          self->w_dir[row][ts][qs].im = 0.0f;
  295|  12.9M|        }
  296|  23.9M|      }
  297|       |
  298|  47.9M|      for (row = 0; row < self->dir_sig_count; row++) {
  ------------------
  |  Branch (298:21): [True: 23.9M, False: 23.9M]
  ------------------
  299|  23.9M|        self->w_diff[row][ts][qs].re = 0.0f;
  300|  23.9M|        self->w_diff[row][ts][qs].im = 0.0f;
  301|  23.9M|      }
  302|       |
  303|  23.9M|      for (row = self->dir_sig_count;
  304|  47.9M|           row < (self->dir_sig_count + self->decor_sig_count); row++) {
  ------------------
  |  Branch (304:12): [True: 23.9M, False: 23.9M]
  ------------------
  305|  23.9M|        if (indx < self->res_bands) {
  ------------------
  |  Branch (305:13): [True: 11.0M, False: 12.9M]
  ------------------
  306|  11.0M|          self->w_diff[row][ts][qs].re = 0.0f;
  307|  11.0M|          self->w_diff[row][ts][qs].im = 0.0f;
  308|  11.0M|        }
  309|  23.9M|      }
  310|  23.9M|    }
  311|   663k|  }
  312|  15.6k|}
ixheaacd_mps_mix_res_decor_residual_band:
  314|  27.5k|VOID ixheaacd_mps_mix_res_decor_residual_band(ia_mps_dec_state_struct* self) {
  315|  27.5k|  WORD32 ts, qs, indx;
  316|  1.42M|  for (qs = 0; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (316:16): [True: 1.40M, False: 27.5k]
  ------------------
  317|  1.40M|    indx = self->hyb_band_to_processing_band_table[qs];
  318|  1.40M|    if (indx >= self->res_bands) {
  ------------------
  |  Branch (318:9): [True: 890k, False: 511k]
  ------------------
  319|   890k|      if (qs < self->hyb_band_count[1]) {
  ------------------
  |  Branch (319:11): [True: 481k, False: 409k]
  ------------------
  320|  16.1M|        for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (320:22): [True: 15.6M, False: 481k]
  ------------------
  321|  15.6M|          self->w_dir[1][ts][qs].re = 0.0f;
  322|  15.6M|          self->w_dir[1][ts][qs].im = 0.0f;
  323|  15.6M|        }
  324|   481k|      }
  325|   890k|    } else {
  326|  23.6M|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (326:20): [True: 23.0M, False: 511k]
  ------------------
  327|  23.0M|        self->w_diff[1][ts][qs].re = 0.0f;
  328|  23.0M|        self->w_diff[1][ts][qs].im = 0.0f;
  329|  23.0M|      }
  330|   511k|    }
  331|  1.40M|  }
  332|  27.5k|}
ixheaacd_mps_create_w:
  334|  15.6k|VOID ixheaacd_mps_create_w(ia_mps_dec_state_struct* self) {
  335|  15.6k|  ixheaacd_mps_decor(self);
  336|  15.6k|  ixheaacd_mps_mix_res_decor(self);
  337|  15.6k|}
ixheaacd_mps_qmf_hyb_analysis_no_pre_mix:
  339|  66.0k|VOID ixheaacd_mps_qmf_hyb_analysis_no_pre_mix(ia_mps_dec_state_struct* self) {
  340|  66.0k|  ixheaacd_mps_qmf_hybrid_analysis_no_pre_mix(
  341|  66.0k|      &self->hyb_filt_state[0], self->qmf_in[0], self->band_count[0],
  342|  66.0k|      self->time_slots, self->w_dir[0]);
  343|       |
  344|  66.0k|  if (self->res_bands) {
  ------------------
  |  Branch (344:7): [True: 36.1k, False: 29.9k]
  ------------------
  345|  36.1k|    ixheaacd_mps_qmf_hybrid_analysis_no_pre_mix(
  346|  36.1k|        &self->hyb_filt_state[1], self->qmf_in[1], self->band_count[1],
  347|  36.1k|        self->time_slots, self->w_dir[1]);
  348|       |
  349|  36.1k|    if (self->res_bands != 28) {
  ------------------
  |  Branch (349:9): [True: 27.5k, False: 8.66k]
  ------------------
  350|  27.5k|      ixheaacd_mps_decor_apply(&self->mps_decor, self->w_dir[0],
  351|  27.5k|                               self->w_diff[1], self->time_slots,
  352|  27.5k|                               self->res_bands,
  353|  27.5k|                               self->ldmps_config.ldmps_present_flag);
  354|       |
  355|  27.5k|      ixheaacd_mps_mix_res_decor_residual_band(self);
  356|  27.5k|    }
  357|  36.1k|  } else {
  358|  29.9k|    ixheaacd_mps_decor_apply(&self->mps_decor, self->w_dir[0], self->w_diff[1],
  359|  29.9k|                             self->time_slots, NO_RES_BANDS,
  ------------------
  |  |   45|  29.9k|#define NO_RES_BANDS -1
  ------------------
  360|  29.9k|                             self->ldmps_config.ldmps_present_flag);
  361|  29.9k|  }
  362|  66.0k|}
ixheaacd_mps_apply:
  366|  79.5k|                          FLOAT32 (*output_buffer)[4096]) {
  367|  79.5k|  WORD32 ch, ts, qs;
  368|  79.5k|  WORD32 time_slots = self->time_slots;
  369|  79.5k|  WORD32 in_ch_count = self->in_ch_count + self->res_ch_count;
  370|  79.5k|  WORD32 err = 0;
  371|  79.5k|  self->hyb_band_count[0] = self->band_count[0] - QMF_BANDS_TO_HYBRID + 10;
  ------------------
  |  |   64|  79.5k|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
  372|  79.5k|  self->hyb_band_count[1] = self->band_count[1] - QMF_BANDS_TO_HYBRID + 10;
  ------------------
  |  |   64|  79.5k|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
  373|  79.5k|  self->hyb_band_count_max =
  374|  79.5k|      max(self->hyb_band_count[0], self->hyb_band_count[1]);
  ------------------
  |  |   74|  79.5k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 24.4k, False: 55.0k]
  |  |  ------------------
  ------------------
  375|  79.5k|  self->mps_decor.decor_nrg_smooth.num_bins = self->hyb_band_count_max;
  376|  79.5k|  self->mps_decor.num_bins = self->hyb_band_count_max;
  377|  79.5k|  self->output_buffer = output_buffer;
  378|       |
  379|  79.5k|  err = ixheaacd_mps_frame_decode(self);
  380|       |
  381|  79.5k|  if (err != IA_NO_ERROR) return err;
  ------------------
  |  |   23|  79.5k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (381:7): [True: 52, False: 79.4k]
  ------------------
  382|       |
  383|  79.4k|  ixheaacd_pre_and_mix_matrix_calculation(self);
  384|       |
  385|  79.4k|  ixheaacd_mps_pre_matrix_mix_matrix_smoothing(self);
  386|       |
  387|   204k|  for (ch = 0; ch < in_ch_count; ch++) {
  ------------------
  |  Branch (387:16): [True: 124k, False: 79.4k]
  ------------------
  388|  5.00M|    for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (388:18): [True: 4.88M, False: 124k]
  ------------------
  389|   158M|      for (qs = 0; qs < self->band_count[ch]; qs++) {
  ------------------
  |  Branch (389:20): [True: 153M, False: 4.88M]
  ------------------
  390|   153M|        self->qmf_in[ch][qs][ts].re =
  391|   153M|            self->input_gain * input_buffer[2 * ch][ts][qs];
  392|   153M|        self->qmf_in[ch][qs][ts].im =
  393|   153M|            self->input_gain * input_buffer[2 * ch + 1][ts][qs];
  394|   153M|      }
  395|  4.88M|    }
  396|   124k|  }
  397|       |
  398|  79.4k|  if (!(self->pre_mix_req | self->bs_tsd_enable)) {
  ------------------
  |  Branch (398:7): [True: 66.0k, False: 13.3k]
  ------------------
  399|  66.0k|    ixheaacd_mps_qmf_hyb_analysis_no_pre_mix(self);
  400|  66.0k|  } else {
  401|  13.3k|    ixheaacd_mps_qmf_hyb_analysis(self);
  402|       |
  403|  13.3k|    ixheaacd_mps_apply_pre_matrix(self);
  404|       |
  405|  13.3k|    ixheaacd_mps_create_w(self);
  406|  13.3k|  }
  407|       |
  408|  79.4k|  if ((!(self->res_bands | self->pre_mix_req)) &&
  ------------------
  |  Branch (408:7): [True: 31.5k, False: 47.9k]
  ------------------
  409|  31.5k|      (self->config->bs_phase_coding == 0)) {
  ------------------
  |  Branch (409:7): [True: 10.3k, False: 21.2k]
  ------------------
  410|  10.3k|    ixheaacd_mps_apply_mix_matrix_type1(self);
  411|       |
  412|  69.1k|  } else if (self->pre_mix_req) {
  ------------------
  |  Branch (412:14): [True: 5.46k, False: 63.6k]
  ------------------
  413|  5.46k|    ixheaacd_mps_apply_mix_matrix_type2(self);
  414|       |
  415|  63.6k|  } else {
  416|  63.6k|    ixheaacd_mps_apply_mix_matrix_type3(self);
  417|  63.6k|  }
  418|       |
  419|  79.4k|  if (self->config->bs_temp_shape_config == 2) {
  ------------------
  |  Branch (419:7): [True: 4.30k, False: 75.1k]
  ------------------
  420|  4.30k|    ixheaacd_mps_time_env_shaping(self);
  421|  4.30k|  }
  422|       |
  423|  79.4k|  err = ixheaacd_mps_temp_process(self);
  424|  79.4k|  if (err) return err;
  ------------------
  |  Branch (424:7): [True: 12, False: 79.4k]
  ------------------
  425|       |
  426|  79.4k|  self->parse_nxt_frame = 1;
  427|  79.4k|  self->pre_mix_req = 0;
  428|  79.4k|  return 0;
  429|  79.4k|}
ixheaacd_mps_ecdatapairdec:
 1496|  46.5k|                                  WORD32 ld_mps_flag, WORD32 heaac_mps_present, WORD32 ec_flag) {
 1497|  46.5k|  WORD32 attach_lsb_flag = 0;
 1498|  46.5k|  WORD32 pcm_coding_flag = 0;
 1499|  46.5k|  WORD32 pilot_coding_flag = 0;
 1500|  46.5k|  WORD32 pilot_data[2] = {0, 0};
 1501|  46.5k|  WORD32 mixed_time_pair = 0, pcm_val = 0;
 1502|  46.5k|  WORD32 quant_levels = 0, quant_offset = 0;
 1503|  46.5k|  UWORD32 data = 0;
 1504|  46.5k|  WORD32 band_start = 0;
 1505|       |
 1506|  46.5k|  WORD32 data_pair[2][MAXBANDS] = {{0}};
 1507|  46.5k|  WORD32 data_diff[2][MAXBANDS] = {{0}};
 1508|       |
 1509|  46.5k|  WORD32 msb_state[MAXBANDS] = {0};
 1510|       |
 1511|  46.5k|  WORD32* data_array[2] = {NULL, NULL};
 1512|       |
 1513|  46.5k|  WORD32 diff_type[2] = {DIFF_FREQ, DIFF_FREQ};
  ------------------
  |  |   31|  46.5k|#define DIFF_FREQ (0)
  ------------------
                WORD32 diff_type[2] = {DIFF_FREQ, DIFF_FREQ};
  ------------------
  |  |   31|  46.5k|#define DIFF_FREQ (0)
  ------------------
 1514|  46.5k|  WORD32 cdg_scheme = HUFF_1D;
  ------------------
  |  |   34|  46.5k|#define HUFF_1D (0)
  ------------------
 1515|  46.5k|  WORD32 direction = BACKWARDS;
  ------------------
  |  |   28|  46.5k|#define BACKWARDS (0)
  ------------------
 1516|       |
 1517|  46.5k|  if (heaac_mps_present == 1) {
  ------------------
  |  Branch (1517:7): [True: 19.9k, False: 26.6k]
  ------------------
 1518|  19.9k|    band_start = start_band;
 1519|  19.9k|  }
 1520|       |
 1521|  46.5k|  switch (data_type) {
 1522|  27.4k|    case CLD:
  ------------------
  |  |   23|  27.4k|#define CLD (0)
  ------------------
  |  Branch (1522:5): [True: 27.4k, False: 19.1k]
  ------------------
 1523|  27.4k|      if (coarse_flag) {
  ------------------
  |  Branch (1523:11): [True: 9.98k, False: 17.4k]
  ------------------
 1524|  9.98k|        attach_lsb_flag = 0;
 1525|  9.98k|        quant_levels = 15;
 1526|  9.98k|        quant_offset = 7;
 1527|  17.4k|      } else {
 1528|  17.4k|        attach_lsb_flag = 0;
 1529|  17.4k|        quant_levels = 31;
 1530|  17.4k|        quant_offset = 15;
 1531|  17.4k|      }
 1532|       |
 1533|  27.4k|      break;
 1534|       |
 1535|  14.2k|    case ICC:
  ------------------
  |  |   24|  14.2k|#define ICC (1)
  ------------------
  |  Branch (1535:5): [True: 14.2k, False: 32.3k]
  ------------------
 1536|  14.2k|      if (coarse_flag) {
  ------------------
  |  Branch (1536:11): [True: 6.03k, False: 8.20k]
  ------------------
 1537|  6.03k|        attach_lsb_flag = 0;
 1538|  6.03k|        quant_levels = 4;
 1539|  6.03k|        quant_offset = 0;
 1540|  8.20k|      } else {
 1541|  8.20k|        attach_lsb_flag = 0;
 1542|  8.20k|        quant_levels = 8;
 1543|  8.20k|        quant_offset = 0;
 1544|  8.20k|      }
 1545|       |
 1546|  14.2k|      break;
 1547|       |
 1548|  3.77k|    case IPD:
  ------------------
  |  |   25|  3.77k|#define IPD (2)
  ------------------
  |  Branch (1548:5): [True: 3.77k, False: 42.7k]
  ------------------
 1549|  3.77k|      if (coarse_flag) {
  ------------------
  |  Branch (1549:11): [True: 1.90k, False: 1.86k]
  ------------------
 1550|  1.90k|        attach_lsb_flag = 0;
 1551|  1.90k|        quant_levels = 8;
 1552|  1.90k|        quant_offset = 0;
 1553|  1.90k|      } else {
 1554|  1.86k|        attach_lsb_flag = 1;
 1555|  1.86k|        quant_levels = 16;
 1556|  1.86k|        quant_offset = 0;
 1557|  1.86k|      }
 1558|  3.77k|      break;
 1559|       |
 1560|  1.10k|    case CPC:
  ------------------
  |  |   26|  1.10k|#define CPC (3)
  ------------------
  |  Branch (1560:5): [True: 1.10k, False: 45.4k]
  ------------------
 1561|  1.10k|      if (coarse_flag) {
  ------------------
  |  Branch (1561:11): [True: 831, False: 274]
  ------------------
 1562|    831|        attach_lsb_flag = 0;
 1563|    831|        quant_levels = 26;
 1564|    831|        quant_offset = 10;
 1565|    831|      } else {
 1566|    274|        attach_lsb_flag = 1;
 1567|    274|        quant_levels = 51;
 1568|    274|        quant_offset = 20;
 1569|    274|      }
 1570|  1.10k|      break;
 1571|       |
 1572|      0|    default:
  ------------------
  |  Branch (1572:5): [True: 0, False: 46.5k]
  ------------------
 1573|      0|      break;
 1574|  46.5k|  }
 1575|       |
 1576|  46.5k|  data = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1577|  46.5k|  pcm_coding_flag = data;
 1578|       |
 1579|  46.5k|  pilot_coding_flag = 0;
 1580|       |
 1581|  46.5k|  if (heaac_mps_present == 1) {
  ------------------
  |  Branch (1581:7): [True: 19.9k, False: 26.6k]
  ------------------
 1582|  19.9k|    if (pcm_coding_flag && data_bands > 4) {
  ------------------
  |  Branch (1582:9): [True: 12.5k, False: 7.37k]
  |  Branch (1582:28): [True: 6.18k, False: 6.33k]
  ------------------
 1583|  6.18k|      data = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1584|  6.18k|      pilot_coding_flag = data;
 1585|  6.18k|    }
 1586|  19.9k|  }
 1587|       |
 1588|  46.5k|  if (pcm_coding_flag && !pilot_coding_flag) {
  ------------------
  |  Branch (1588:7): [True: 25.1k, False: 21.4k]
  |  Branch (1588:26): [True: 19.5k, False: 5.57k]
  ------------------
 1589|  19.5k|    if (pair_flag) {
  ------------------
  |  Branch (1589:9): [True: 9.89k, False: 9.67k]
  ------------------
 1590|  9.89k|      data_array[0] = data_pair[0];
 1591|  9.89k|      data_array[1] = data_pair[1];
 1592|  9.89k|      pcm_val = 2 * data_bands;
 1593|  9.89k|    } else {
 1594|  9.67k|      data_array[0] = data_pair[0];
 1595|  9.67k|      data_array[1] = NULL;
 1596|  9.67k|      pcm_val = data_bands;
 1597|  9.67k|    }
 1598|       |
 1599|  19.5k|    ixheaacd_mps_pcm_decode(it_bit_buff, data_array[0], data_array[1],
 1600|  19.5k|                            quant_offset, pcm_val, quant_levels);
 1601|       |
 1602|  26.9k|  } else {
 1603|  26.9k|    if (pair_flag) {
  ------------------
  |  Branch (1603:9): [True: 13.4k, False: 13.5k]
  ------------------
 1604|  13.4k|      data_array[0] = data_diff[0];
 1605|  13.4k|      data_array[1] = data_diff[1];
 1606|  13.5k|    } else {
 1607|  13.5k|      data_array[0] = data_diff[0];
 1608|  13.5k|      data_array[1] = NULL;
 1609|  13.5k|    }
 1610|       |
 1611|  26.9k|    diff_type[0] = DIFF_FREQ;
  ------------------
  |  |   31|  26.9k|#define DIFF_FREQ (0)
  ------------------
 1612|  26.9k|    diff_type[1] = DIFF_FREQ;
  ------------------
  |  |   31|  26.9k|#define DIFF_FREQ (0)
  ------------------
 1613|       |
 1614|  26.9k|    direction = BACKWARDS;
  ------------------
  |  |   28|  26.9k|#define BACKWARDS (0)
  ------------------
 1615|       |
 1616|  26.9k|    if (!pilot_coding_flag) {
  ------------------
  |  Branch (1616:9): [True: 21.4k, False: 5.57k]
  ------------------
 1617|  21.4k|      if (pair_flag || diff_time_back_flag) {
  ------------------
  |  Branch (1617:11): [True: 8.42k, False: 12.9k]
  |  Branch (1617:24): [True: 7.91k, False: 5.06k]
  ------------------
 1618|  16.3k|        data = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1619|  16.3k|        diff_type[0] = data;
 1620|  16.3k|      }
 1621|       |
 1622|  21.4k|      if (pair_flag && ((diff_type[0] == DIFF_FREQ) || diff_time_back_flag)) {
  ------------------
  |  |   31|  8.42k|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1622:11): [True: 8.42k, False: 12.9k]
  |  Branch (1622:25): [True: 6.65k, False: 1.76k]
  |  Branch (1622:56): [True: 1.27k, False: 497]
  ------------------
 1623|  7.92k|        data = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1624|  7.92k|        diff_type[1] = data;
 1625|  7.92k|      }
 1626|  21.4k|    }
 1627|       |
 1628|  26.9k|    if (data_bands <= 0) {
  ------------------
  |  Branch (1628:9): [True: 317, False: 26.6k]
  ------------------
 1629|    317|      if (!ec_flag)
  ------------------
  |  Branch (1629:11): [True: 317, False: 0]
  ------------------
 1630|    317|        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|    317|    }
 1634|       |
 1635|  26.6k|    ixheaacd_huff_decode(it_bit_buff, data_array[0], data_array[1], data_type, diff_type[0],
 1636|  26.6k|                         diff_type[1], pilot_coding_flag, pilot_data, data_bands, &cdg_scheme,
 1637|  26.6k|                         ld_mps_flag);
 1638|       |
 1639|  26.6k|    if (pilot_coding_flag && heaac_mps_present == 1) {
  ------------------
  |  Branch (1639:9): [True: 5.56k, False: 21.1k]
  |  Branch (1639:30): [True: 5.56k, False: 0]
  ------------------
 1640|  5.56k|      WORD32 i;
 1641|  62.5k|      for (i = 0; i < data_bands; i++) {
  ------------------
  |  Branch (1641:19): [True: 57.0k, False: 5.56k]
  ------------------
 1642|  57.0k|        data_pair[0][i] = data_diff[0][i] + pilot_data[0];
 1643|  57.0k|      }
 1644|       |
 1645|  5.56k|      if (pair_flag) {
  ------------------
  |  Branch (1645:11): [True: 5.01k, False: 551]
  ------------------
 1646|  55.2k|        for (i = 0; i < data_bands; i++) {
  ------------------
  |  Branch (1646:21): [True: 50.2k, False: 5.01k]
  ------------------
 1647|  50.2k|          data_pair[1][i] = data_diff[1][i] + pilot_data[0];
 1648|  50.2k|        }
 1649|  5.01k|      }
 1650|  21.1k|    } else {
 1651|  21.1k|      if ((diff_type[0] == DIFF_TIME) || (diff_type[1] == DIFF_TIME)) {
  ------------------
  |  |   32|  21.1k|#define DIFF_TIME (1)
  ------------------
                    if ((diff_type[0] == DIFF_TIME) || (diff_type[1] == DIFF_TIME)) {
  ------------------
  |  |   32|  16.2k|#define DIFF_TIME (1)
  ------------------
  |  Branch (1651:11): [True: 4.81k, False: 16.2k]
  |  Branch (1651:42): [True: 3.83k, False: 12.4k]
  ------------------
 1652|  8.57k|        if (pair_flag) {
  ------------------
  |  Branch (1652:13): [True: 5.59k, False: 2.97k]
  ------------------
 1653|  5.59k|          if ((diff_type[0] == DIFF_TIME) && !diff_time_back_flag) {
  ------------------
  |  |   32|  5.59k|#define DIFF_TIME (1)
  ------------------
  |  Branch (1653:15): [True: 1.75k, False: 3.83k]
  |  Branch (1653:46): [True: 493, False: 1.26k]
  ------------------
 1654|    493|            direction = FORWARDS;
  ------------------
  |  |   29|    493|#define FORWARDS (1)
  ------------------
 1655|  5.10k|          } else if (diff_type[1] == DIFF_TIME) {
  ------------------
  |  |   32|  5.10k|#define DIFF_TIME (1)
  ------------------
  |  Branch (1655:22): [True: 4.52k, False: 574]
  ------------------
 1656|  4.52k|            direction = BACKWARDS;
  ------------------
  |  |   28|  4.52k|#define BACKWARDS (0)
  ------------------
 1657|  4.52k|          } else {
 1658|    574|            data = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1659|    574|            direction = data;
 1660|    574|          }
 1661|  5.59k|        } else {
 1662|  2.97k|          direction = BACKWARDS;
  ------------------
  |  |   28|  2.97k|#define BACKWARDS (0)
  ------------------
 1663|  2.97k|        }
 1664|  8.57k|      }
 1665|       |
 1666|  21.1k|      mixed_time_pair = (diff_type[0] != diff_type[1]) &&
  ------------------
  |  Branch (1666:25): [True: 7.88k, False: 13.2k]
  ------------------
 1667|  7.88k|                        ((cdg_scheme & PAIR_MASK) == TIME_PAIR);
  ------------------
  |  |   41|  7.88k|#define PAIR_MASK 0xf
  ------------------
                                      ((cdg_scheme & PAIR_MASK) == TIME_PAIR);
  ------------------
  |  |   38|  7.88k|#define TIME_PAIR (1)
  ------------------
  |  Branch (1667:25): [True: 3.51k, False: 4.36k]
  ------------------
 1668|       |
 1669|  21.1k|      if (direction == BACKWARDS) {
  ------------------
  |  |   28|  21.1k|#define BACKWARDS (0)
  ------------------
  |  Branch (1669:11): [True: 20.3k, False: 779]
  ------------------
 1670|  20.3k|        if (diff_type[0] == DIFF_FREQ) {
  ------------------
  |  |   31|  20.3k|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1670:13): [True: 16.2k, False: 4.03k]
  ------------------
 1671|  16.2k|          ixheaacd_diff_freq_decode(data_diff[0], data_pair[0], data_bands);
 1672|  16.2k|        } else {
 1673|  4.03k|          WORD32 i;
 1674|  30.3k|          for (i = 0; i < data_bands; i++) {
  ------------------
  |  Branch (1674:23): [True: 26.2k, False: 4.03k]
  ------------------
 1675|  26.2k|            msb_state[i] = history[i + band_start] + quant_offset;
 1676|  26.2k|            if (attach_lsb_flag) {
  ------------------
  |  Branch (1676:17): [True: 3.04k, False: 23.2k]
  ------------------
 1677|  3.04k|              msb_state[i] >>= 1;
 1678|  3.04k|            }
 1679|  26.2k|          }
 1680|  4.03k|          ixheaacd_mps_diff_time_dec_bwd(msb_state, data_diff[0], data_pair[0],
 1681|  4.03k|                                         mixed_time_pair, data_bands);
 1682|  4.03k|        }
 1683|  20.3k|        if (diff_type[1] == DIFF_FREQ) {
  ------------------
  |  |   31|  20.3k|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1683:13): [True: 15.8k, False: 4.52k]
  ------------------
 1684|  15.8k|          ixheaacd_diff_freq_decode(data_diff[1], data_pair[1], data_bands);
 1685|  15.8k|        } else {
 1686|  4.52k|          ixheaacd_mps_diff_time_dec_bwd(data_pair[0], data_diff[1], data_pair[1],
 1687|  4.52k|                                         mixed_time_pair, data_bands);
 1688|  4.52k|        }
 1689|  20.3k|      } else {
 1690|    779|        ixheaacd_diff_freq_decode(data_diff[1], data_pair[1], data_bands);
 1691|       |
 1692|    779|        if (diff_type[0] == DIFF_FREQ) {
  ------------------
  |  |   31|    779|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1692:13): [True: 0, False: 779]
  ------------------
 1693|      0|          ixheaacd_diff_freq_decode(data_diff[0], data_pair[0], data_bands);
 1694|    779|        } else {
 1695|    779|          ixheaacd_mps_diff_time_dec_fwd(data_pair[1], data_diff[0], data_pair[0],
 1696|    779|                                         mixed_time_pair, data_bands);
 1697|    779|        }
 1698|    779|      }
 1699|  21.1k|    }
 1700|  26.6k|    ixheaacd_attach_lsb(it_bit_buff, data_pair[0], quant_offset,
 1701|  26.6k|                        attach_lsb_flag ? 1 : 0, data_bands, data_pair[0]);
  ------------------
  |  Branch (1701:25): [True: 808, False: 25.8k]
  ------------------
 1702|  26.6k|    if (pair_flag) {
  ------------------
  |  Branch (1702:9): [True: 13.0k, False: 13.5k]
  ------------------
 1703|  13.0k|      ixheaacd_attach_lsb(it_bit_buff, data_pair[1], quant_offset,
 1704|  13.0k|                          attach_lsb_flag ? 1 : 0, data_bands, data_pair[1]);
  ------------------
  |  Branch (1704:27): [True: 266, False: 12.8k]
  ------------------
 1705|  13.0k|    }
 1706|  26.6k|  }
 1707|       |
 1708|  46.2k|  memcpy(outdata[set_idx] + band_start, data_pair[0],
 1709|  46.2k|         sizeof(WORD32) * data_bands);
 1710|  46.2k|  if (pair_flag) {
  ------------------
  |  Branch (1710:7): [True: 22.9k, False: 23.2k]
  ------------------
 1711|  22.9k|    memcpy(outdata[set_idx + 1] + band_start, data_pair[1],
 1712|  22.9k|           sizeof(WORD32) * data_bands);
 1713|  22.9k|  }
 1714|       |
 1715|  46.2k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  46.2k|#define IA_NO_ERROR 0x00000000
  ------------------
 1716|  46.5k|}
ixheaacd_mps_huff_decode:
 1719|  2.47k|                              WORD32* out_data, WORD32 num_val) {
 1720|  2.47k|  WORD32 val_rcvd = 0, dummy = 0, i = 0, val = 0, len = 0;
 1721|  2.47k|  WORD32 rl_data[2] = {0};
 1722|       |
 1723|  26.1k|  while (val_rcvd < num_val) {
  ------------------
  |  Branch (1723:10): [True: 23.6k, False: 2.47k]
  ------------------
 1724|  23.6k|    ixheaacd_mps_huff_read_2d(it_bit_buff,
 1725|  23.6k|                              (ia_huff_node_struct)&ixheaacd_huff_reshape_nodes,
 1726|  23.6k|                              rl_data, &dummy);
 1727|  23.6k|    val = rl_data[0];
 1728|  23.6k|    len = rl_data[1] + 1;
 1729|  81.4k|    for (i = val_rcvd; i < val_rcvd + len; i++) {
  ------------------
  |  Branch (1729:24): [True: 57.7k, False: 23.6k]
  ------------------
 1730|  57.7k|      out_data[i] = val;
 1731|  57.7k|    }
 1732|  23.6k|    val_rcvd += len;
 1733|  23.6k|  }
 1734|       |
 1735|  2.47k|  return;
 1736|  2.47k|}
ixheaacd_update_out_buffer:
 1739|  13.7k|                                WORD16 *out_buf) {
 1740|  13.7k|  WORD32 ch, sam;
 1741|  13.7k|  WORD32 num_output_channels_at = pstr_mps_state->num_output_channels_at;
 1742|  13.7k|  WORD32 frame_length = pstr_mps_state->frame_length;
 1743|       |
 1744|  13.7k|  WORD32 *p_time_out = pstr_mps_state->array_struct->time_out;
 1745|       |
 1746|   121k|  for (ch = 0; ch < num_output_channels_at; ch++) {
  ------------------
  |  Branch (1746:16): [True: 107k, False: 13.7k]
  ------------------
 1747|   107k|    WORD32 *time_out = p_time_out;
 1748|   152M|    for (sam = 0; sam < frame_length; sam++) {
  ------------------
  |  Branch (1748:19): [True: 152M, False: 107k]
  ------------------
 1749|   152M|      out_buf[sam * num_output_channels_at + ch] = (*time_out++) >> 16;
 1750|   152M|    }
 1751|   107k|    p_time_out += QBXTS;
  ------------------
  |  |   98|   107k|#define QBXTS (4608)
  ------------------
 1752|   107k|  }
 1753|       |
 1754|  13.7k|  return;
 1755|  13.7k|}
ixheaacd_update_time_out_buffer:
 1757|  13.7k|VOID ixheaacd_update_time_out_buffer(ia_heaac_mps_state_struct *pstr_mps_state) {
 1758|  13.7k|  WORD32 n;
 1759|  13.7k|  WORD32 up_mix_type = pstr_mps_state->up_mix_type;
 1760|  13.7k|  WORD32 tree_config = pstr_mps_state->tree_config;
 1761|  13.7k|  WORD32 lfe_gain = pstr_mps_state->lfe_gain;
 1762|  13.7k|  WORD32 surround_gain = pstr_mps_state->surround_gain;
 1763|       |
 1764|  13.7k|  if (!pstr_mps_state->bs_config.arbitrary_tree && up_mix_type != 2 && up_mix_type != 3) {
  ------------------
  |  Branch (1764:7): [True: 13.7k, False: 6]
  |  Branch (1764:52): [True: 13.7k, False: 0]
  |  Branch (1764:72): [True: 13.7k, False: 0]
  ------------------
 1765|  13.7k|    WORD32 frame_length = pstr_mps_state->frame_length;
 1766|       |
 1767|  13.7k|    WORD32 *time_out_3 = pstr_mps_state->array_struct->time_out + QBXTSX3;
  ------------------
  |  |  100|  13.7k|#define QBXTSX3 (13824)
  ------------------
 1768|  13.7k|    WORD32 *time_out_4 = time_out_3 + QBXTS;
  ------------------
  |  |   98|  13.7k|#define QBXTS (4608)
  ------------------
 1769|  13.7k|    WORD32 *time_out_5 = time_out_4 + QBXTS;
  ------------------
  |  |   98|  13.7k|#define QBXTS (4608)
  ------------------
 1770|  13.7k|    WORD32 *time_out_6 = time_out_5 + QBXTS;
  ------------------
  |  |   98|  13.7k|#define QBXTS (4608)
  ------------------
 1771|  13.7k|    WORD32 *time_out_7 = time_out_6 + QBXTS;
  ------------------
  |  |   98|  13.7k|#define QBXTS (4608)
  ------------------
 1772|       |
 1773|  19.4M|    for (n = 0; n < frame_length; n++) {
  ------------------
  |  Branch (1773:17): [True: 19.4M, False: 13.7k]
  ------------------
 1774|  19.4M|      *time_out_3 = ixheaacd_mps_mult32_shr_15(*time_out_3, lfe_gain);
 1775|  19.4M|      time_out_3++;
 1776|  19.4M|      *time_out_4 = ixheaacd_mps_mult32_shr_15(*time_out_4, surround_gain);
 1777|  19.4M|      time_out_4++;
 1778|  19.4M|      *time_out_5 = ixheaacd_mps_mult32_shr_15(*time_out_5, surround_gain);
 1779|  19.4M|      time_out_5++;
 1780|  19.4M|    }
 1781|       |
 1782|  13.7k|    if (tree_config == 4 || tree_config == 6) {
  ------------------
  |  Branch (1782:9): [True: 320, False: 13.4k]
  |  Branch (1782:29): [True: 10.3k, False: 3.15k]
  ------------------
 1783|  17.0M|      for (n = 0; n < frame_length; n++) {
  ------------------
  |  Branch (1783:19): [True: 17.0M, False: 10.6k]
  ------------------
 1784|  17.0M|        *time_out_6 = ixheaacd_mps_mult32_shr_15(*time_out_6, surround_gain);
 1785|  17.0M|        time_out_6++;
 1786|  17.0M|        *time_out_7 = ixheaacd_mps_mult32_shr_15(*time_out_7, surround_gain);
 1787|  17.0M|        time_out_7++;
 1788|  17.0M|      }
 1789|  10.6k|    }
 1790|  13.7k|  }
 1791|  13.7k|}
ixheaacd_heaac_mps_apply:
 1988|  14.4k|                                      WORD32 mps_bytes) {
 1989|  14.4k|  ia_heaac_mps_state_struct *pstr_mps_state =
 1990|  14.4k|      &self->p_state_aac->heaac_mps_handle;
 1991|  14.4k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  14.4k|#define IA_NO_ERROR 0x00000000
  ------------------
 1992|  14.4k|  WORD32 n_channels, n_time_slots, qmf_bands, channel;
 1993|  14.4k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
 1994|       |
 1995|  14.4k|  WORD32 *p_qmf_real = pstr_mps_state->array_struct->m_qmf_real;
 1996|  14.4k|  WORD32 *p_qmf_imag = pstr_mps_state->array_struct->m_qmf_imag;
 1997|  14.4k|  WORD32 buffer_size = mps_bytes;
 1998|       |
 1999|  14.4k|  if (self->p_state_aac->heaac_mps_handle.is_first == 1) {
  ------------------
  |  Branch (1999:7): [True: 11.1k, False: 3.28k]
  ------------------
 2000|  11.1k|    self->p_state_aac->heaac_mps_handle.is_first = 1;
 2001|  11.1k|    if (pstr_mps_state->bytes_remaining != 0) {
  ------------------
  |  Branch (2001:9): [True: 9.90k, False: 1.25k]
  ------------------
 2002|  9.90k|      buffer_size = mps_bytes + pstr_mps_state->bytes_remaining;
 2003|  9.90k|      if (buffer_size > 1024) {
  ------------------
  |  Branch (2003:11): [True: 14, False: 9.88k]
  ------------------
 2004|     14|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|     14|#define IA_FATAL_ERROR 0x80000000
  ------------------
 2005|     14|      }
 2006|   163k|      for (WORD32 ii = 0; ii < mps_bytes; ii++) {
  ------------------
  |  Branch (2006:27): [True: 153k, False: 9.88k]
  ------------------
 2007|   153k|        pstr_mps_state->temp_buf[ii + pstr_mps_state->bytes_remaining] =
 2008|   153k|            mps_buffer[ii];
 2009|   153k|      }
 2010|       |
 2011|  9.88k|      pstr_mps_state->ptr_mps_bit_buff = ixheaacd_create_bit_buf(
 2012|  9.88k|          &pstr_mps_state->mps_bit_buf, (UWORD8 *)pstr_mps_state->temp_buf,
 2013|  9.88k|          buffer_size);
 2014|  9.88k|      pstr_mps_state->ptr_mps_bit_buff->xaac_jmp_buf =
 2015|  9.88k|          &self->p_state_aac->xaac_jmp_buf;
 2016|       |
 2017|  9.88k|      pstr_mps_state->ptr_mps_bit_buff->cnt_bits += (8 * buffer_size);
 2018|  9.88k|    } else {
 2019|  1.25k|      memcpy(pstr_mps_state->temp_buf, mps_buffer, mps_bytes);
 2020|  1.25k|      buffer_size = mps_bytes;
 2021|  1.25k|      pstr_mps_state->ptr_mps_bit_buff = ixheaacd_create_bit_buf(
 2022|  1.25k|          &pstr_mps_state->mps_bit_buf, (UWORD8 *)mps_buffer, buffer_size);
 2023|  1.25k|      pstr_mps_state->ptr_mps_bit_buff->cnt_bits += (8 * buffer_size);
 2024|       |
 2025|  1.25k|      pstr_mps_state->ptr_mps_bit_buff->xaac_jmp_buf =
 2026|  1.25k|          &self->p_state_aac->xaac_jmp_buf;
 2027|  1.25k|    }
 2028|  11.1k|  }
 2029|       |
 2030|  14.4k|  if (curr_state->num_input_channels > 2 && pstr_mps_state->mps_with_sbr == 1) {
  ------------------
  |  Branch (2030:7): [True: 10.8k, False: 3.53k]
  |  Branch (2030:45): [True: 1, False: 10.8k]
  ------------------
 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|  14.4k|  n_channels = curr_state->num_input_channels;
 2040|  14.4k|  n_time_slots = curr_state->time_slots;
 2041|  14.4k|  qmf_bands = curr_state->qmf_bands;
 2042|       |
 2043|  14.4k|  if (pstr_mps_state->mps_decode == 1) {
  ------------------
  |  Branch (2043:7): [True: 14.4k, False: 5]
  ------------------
 2044|  14.4k|    if (pstr_mps_state->mps_with_sbr) {
  ------------------
  |  Branch (2044:9): [True: 1.03k, False: 13.3k]
  ------------------
 2045|  3.07k|      for (channel = 0; channel < n_channels; channel++) {
  ------------------
  |  Branch (2045:25): [True: 2.04k, False: 1.03k]
  ------------------
 2046|  2.04k|        WORD32 kk = 0;
 2047|  2.04k|        if (self->aac_config.ui_enh_sbr)
  ------------------
  |  Branch (2047:13): [True: 2.04k, False: 0]
  ------------------
 2048|  2.04k|        {
 2049|  36.8k|          for (WORD32 ii = 0; ii < n_time_slots; ii++) {
  ------------------
  |  Branch (2049:31): [True: 34.7k, False: 2.04k]
  ------------------
 2050|  34.7k|            FLOAT32 *qmf_re = self->p_state_aac->str_sbr_dec_info[0]
 2051|  34.7k|                ->pstr_sbr_channel[channel]->str_sbr_dec.pp_qmf_buf_real[ii];
 2052|  34.7k|            FLOAT32 *qmf_im = self->p_state_aac->str_sbr_dec_info[0]
 2053|  34.7k|                ->pstr_sbr_channel[channel]->str_sbr_dec.pp_qmf_buf_imag[ii];
 2054|       |
 2055|  1.14M|            for (WORD32 jj = 0; jj < qmf_bands; jj++) {
  ------------------
  |  Branch (2055:33): [True: 1.11M, False: 34.7k]
  ------------------
 2056|  1.11M|              p_qmf_real[kk] = ixheaacd_mps_mult32_shr_15(
 2057|  1.11M|                  curr_state->clip_protect_gain, (WORD32)(qmf_re[jj] * 1024));
 2058|  1.11M|              p_qmf_imag[kk++] = ixheaacd_mps_mult32_shr_15(
 2059|  1.11M|                  curr_state->clip_protect_gain, (WORD32)(qmf_im[jj] * 1024));
 2060|  1.11M|            }
 2061|  34.7k|          }
 2062|  2.04k|        }
 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|  2.04k|        p_qmf_real += QBXTS;
  ------------------
  |  |   98|  2.04k|#define QBXTS (4608)
  ------------------
 2080|  2.04k|        p_qmf_imag += QBXTS;
  ------------------
  |  |   98|  2.04k|#define QBXTS (4608)
  ------------------
 2081|  2.04k|      }
 2082|  13.3k|    } else {
 2083|  82.9k|      for (channel = 0; channel < n_channels; channel++) {
  ------------------
  |  Branch (2083:25): [True: 69.5k, False: 13.3k]
  ------------------
 2084|  69.5k|        ixheaacd_calc_ana_filt_bank(pstr_mps_state, output_buf, p_qmf_real,
 2085|  69.5k|                                    p_qmf_imag, channel);
 2086|       |
 2087|  69.5k|        p_qmf_real += QBXTS;
  ------------------
  |  |   98|  69.5k|#define QBXTS (4608)
  ------------------
 2088|  69.5k|        p_qmf_imag += QBXTS;
  ------------------
  |  |   98|  69.5k|#define QBXTS (4608)
  ------------------
 2089|  69.5k|      }
 2090|  13.3k|    }
 2091|  14.4k|    if (!pstr_mps_state->ec_flag && pstr_mps_state->frame_ok) {
  ------------------
  |  Branch (2091:9): [True: 14.4k, False: 0]
  |  Branch (2091:37): [True: 14.4k, False: 0]
  ------------------
 2092|  14.4k|      error_code = ixheaacd_parse_frame(pstr_mps_state);
 2093|  14.4k|      if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  14.4k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (2093:11): [True: 155, False: 14.2k]
  ------------------
 2094|  14.4k|    }
 2095|       |
 2096|  14.2k|    if (!pstr_mps_state->first_frame || !pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (2096:9): [True: 11.3k, False: 2.88k]
  |  Branch (2096:41): [True: 2.88k, False: 0]
  ------------------
 2097|  13.9k|      error_code = ixheaacd_apply_frame(pstr_mps_state, n_time_slots,
 2098|  13.9k|                                        pstr_mps_state->array_struct->m_qmf_real,
 2099|  13.9k|                                        pstr_mps_state->array_struct->m_qmf_imag, output_buf);
 2100|  13.9k|      if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  13.9k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (2100:11): [True: 190, False: 13.7k]
  ------------------
 2101|  13.9k|    }
 2102|  14.0k|    if (error_code == 0 && pstr_mps_state->ec_flag && pstr_mps_state->frame_ok) {
  ------------------
  |  Branch (2102:9): [True: 13.7k, False: 272]
  |  Branch (2102:28): [True: 0, False: 13.7k]
  |  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|  14.0k|    pstr_mps_state->i_bytes_consumed_mps =
 2110|  14.0k|        (WORD32)(pstr_mps_state->ptr_mps_bit_buff->ptr_read_next -
 2111|  14.0k|                 pstr_mps_state->ptr_mps_bit_buff->ptr_bit_buf_base);
 2112|       |
 2113|  14.0k|    pstr_mps_state->bytes_remaining =
 2114|  14.0k|        buffer_size - pstr_mps_state->i_bytes_consumed_mps;
 2115|  14.0k|    if (pstr_mps_state->bytes_remaining < 0)
  ------------------
  |  Branch (2115:9): [True: 334, False: 13.7k]
  ------------------
 2116|    334|    {
 2117|    334|      if (pstr_mps_state->ec_flag)
  ------------------
  |  Branch (2117:11): [True: 0, False: 334]
  ------------------
 2118|      0|      {
 2119|      0|        pstr_mps_state->bytes_remaining = 0;
 2120|      0|        pstr_mps_state->frame_ok = 0;
 2121|      0|      }
 2122|    334|      else
 2123|    334|      {
 2124|    334|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|    334|#define IA_FATAL_ERROR 0x80000000
  ------------------
 2125|    334|      }
 2126|    334|    }
 2127|       |
 2128|  13.7k|    if (pstr_mps_state->bytes_remaining != 0) {
  ------------------
  |  Branch (2128:9): [True: 11.8k, False: 1.87k]
  ------------------
 2129|   809k|      for (WORD32 ii = 0; ii < pstr_mps_state->bytes_remaining; ii++) {
  ------------------
  |  Branch (2129:27): [True: 797k, False: 11.8k]
  ------------------
 2130|   797k|        pstr_mps_state->temp_buf[ii] =
 2131|   797k|            pstr_mps_state->temp_buf[ii + pstr_mps_state->i_bytes_consumed_mps];
 2132|   797k|      }
 2133|  11.8k|    }
 2134|  13.7k|  }
 2135|  13.7k|  self->p_state_aac->heaac_mps_handle.is_first = 1;
 2136|  13.7k|  self->p_state_aac->heaac_mps_handle.first_frame = 0;
 2137|       |
 2138|  13.7k|  return error_code;
 2139|  14.4k|}
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|     24|    case 3:
  ------------------
  |  Branch (444:5): [True: 24, False: 19.6k]
  ------------------
  445|     24|      max_grp_len = 5;
  446|     24|      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|     96|    case 51:
  ------------------
  |  Branch (462:5): [True: 96, False: 19.5k]
  ------------------
  463|     96|      max_grp_len = 4;
  464|     96|      break;
  465|  4.23k|    case 4:
  ------------------
  |  Branch (465:5): [True: 4.23k, False: 15.4k]
  ------------------
  466|  8.03k|    case 8:
  ------------------
  |  Branch (466:5): [True: 3.80k, False: 15.8k]
  ------------------
  467|  14.9k|    case 15:
  ------------------
  |  Branch (467:5): [True: 6.93k, False: 12.7k]
  ------------------
  468|  16.1k|    case 16:
  ------------------
  |  Branch (468:5): [True: 1.22k, False: 18.4k]
  ------------------
  469|  16.8k|    case 26:
  ------------------
  |  Branch (469:5): [True: 637, False: 19.0k]
  ------------------
  470|  19.4k|    case 31:
  ------------------
  |  Branch (470:5): [True: 2.66k, False: 16.9k]
  ------------------
  471|  19.4k|      max_grp_len = 1;
  472|  19.4k|      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.7k|  for (i = 1; i <= max_grp_len; i++) {
  ------------------
  |  Branch (479:15): [True: 20.1k, False: 19.6k]
  ------------------
  480|  20.1k|    pcm_chunk_size[i] = (WORD32)ceil((FLOAT32)(i)*ld_nlev);
  481|  20.1k|  }
  482|       |
  483|   159k|  for (i = 0; i < num_val; i += max_grp_len) {
  ------------------
  |  Branch (483:15): [True: 139k, False: 19.6k]
  ------------------
  484|   139k|    grp_len = min(max_grp_len, num_val - i);
  ------------------
  |  |   75|   139k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 120k, False: 18.6k]
  |  |  ------------------
  ------------------
  485|   139k|    data = ixheaacd_read_bits_buf(it_bit_buff, pcm_chunk_size[grp_len]);
  486|       |
  487|   139k|    grp_val = data;
  488|       |
  489|   279k|    for (j = 0; j < grp_len; j++) {
  ------------------
  |  Branch (489:17): [True: 139k, False: 139k]
  ------------------
  490|   139k|      idx = i + (grp_len - j - 1);
  491|   139k|      next_val = grp_val % num_levels;
  492|       |
  493|   139k|      if (out_data_2 == NULL) {
  ------------------
  |  Branch (493:11): [True: 97.7k, False: 42.2k]
  ------------------
  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: 42.2k]
  ------------------
  496|      0|        out_data_2[idx] = next_val - ixheaacd_drc_offset;
  497|  42.2k|      } else {
  498|  42.2k|        if (idx % 2) {
  ------------------
  |  Branch (498:13): [True: 21.1k, False: 21.1k]
  ------------------
  499|  21.1k|          out_data_2[idx / 2] = next_val - ixheaacd_drc_offset;
  500|  21.1k|        } else {
  501|  21.1k|          out_data_1[idx / 2] = next_val - ixheaacd_drc_offset;
  502|  21.1k|        }
  503|  42.2k|      }
  504|       |
  505|   139k|      grp_val = (grp_val - next_val) / num_levels;
  506|   139k|    }
  507|   139k|  }
  508|       |
  509|  19.6k|  return;
  510|  19.6k|}
ixheaacd_mps_dec.c:ixheaacd_huff_decode:
 1061|  26.6k|                                 WORD32 num_val, WORD32 *cdg_scheme, WORD32 ld_mps_flag) {
 1062|  26.6k|  WORD32 diff_type;
 1063|       |
 1064|  26.6k|  WORD32 i = 0;
 1065|  26.6k|  UWORD32 data = 0;
 1066|       |
 1067|  26.6k|  WORD32 pair_vec[MAXBANDS][2];
 1068|       |
 1069|  26.6k|  WORD32* p0_data_1[2] = {NULL, NULL};
 1070|  26.6k|  WORD32* p0_data_2[2] = {NULL, NULL};
 1071|       |
 1072|  26.6k|  WORD32 p0_flag[2];
 1073|       |
 1074|  26.6k|  WORD32 num_val_1_int = num_val;
 1075|  26.6k|  WORD32 num_val_2_int = num_val;
 1076|       |
 1077|  26.6k|  WORD32* out_data_1_int = out_data_1;
 1078|  26.6k|  WORD32* out_data_2_int = out_data_2;
 1079|       |
 1080|  26.6k|  WORD32 df_rest_flag_1 = 0;
 1081|  26.6k|  WORD32 df_rest_flag_2 = 0;
 1082|       |
 1083|  26.6k|  WORD32 huff_yy_1;
 1084|  26.6k|  WORD32 huff_yy_2;
 1085|  26.6k|  WORD32 huff_yy;
 1086|  26.6k|  if (pilot_coding_flag) {
  ------------------
  |  Branch (1086:7): [True: 5.57k, False: 21.0k]
  ------------------
 1087|  5.57k|    switch (data_type) {
 1088|  5.05k|      case CLD:
  ------------------
  |  |   23|  5.05k|#define CLD (0)
  ------------------
  |  Branch (1088:7): [True: 5.05k, False: 523]
  ------------------
 1089|  5.05k|        if (out_data_1 != NULL) {
  ------------------
  |  Branch (1089:13): [True: 5.05k, False: 0]
  ------------------
 1090|  5.05k|          ixheaacd_mps_huff_dec_pilot(
 1091|  5.05k|              it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_pilot_nodes.cld,
 1092|  5.05k|              pilot_data);
 1093|  5.05k|        }
 1094|  5.05k|        break;
 1095|       |
 1096|    463|      case ICC:
  ------------------
  |  |   24|    463|#define ICC (1)
  ------------------
  |  Branch (1096:7): [True: 463, False: 5.11k]
  ------------------
 1097|    463|        if (out_data_1 != NULL) {
  ------------------
  |  Branch (1097:13): [True: 463, False: 0]
  ------------------
 1098|    463|          ixheaacd_mps_huff_dec_pilot(
 1099|    463|              it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_pilot_nodes.icc,
 1100|    463|              pilot_data);
 1101|    463|        }
 1102|    463|        break;
 1103|       |
 1104|     60|      case CPC:
  ------------------
  |  |   26|     60|#define CPC (3)
  ------------------
  |  Branch (1104:7): [True: 60, False: 5.51k]
  ------------------
 1105|     60|        if (out_data_1 != NULL) {
  ------------------
  |  Branch (1105:13): [True: 60, False: 0]
  ------------------
 1106|     60|          ixheaacd_mps_huff_dec_pilot(
 1107|     60|              it_bit_buff,
 1108|     60|              (ia_huff_node_struct) & (ixheaacd_huff_pilot_nodes.cpc),
 1109|     60|              pilot_data);
 1110|     60|        }
 1111|     60|        break;
 1112|       |
 1113|      0|      default:
  ------------------
  |  Branch (1113:7): [True: 0, False: 5.57k]
  ------------------
 1114|      0|        break;
 1115|  5.57k|    }
 1116|  5.57k|  }
 1117|       |
 1118|  26.6k|  data = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1119|  26.6k|  *cdg_scheme = data << PAIR_SHIFT;
  ------------------
  |  |   40|  26.6k|#define PAIR_SHIFT 4
  ------------------
 1120|       |
 1121|  26.6k|  if (*cdg_scheme >> PAIR_SHIFT == HUFF_2D) {
  ------------------
  |  |   40|  26.6k|#define PAIR_SHIFT 4
  ------------------
                if (*cdg_scheme >> PAIR_SHIFT == HUFF_2D) {
  ------------------
  |  |   35|  26.6k|#define HUFF_2D (1)
  ------------------
  |  Branch (1121:7): [True: 17.3k, False: 9.31k]
  ------------------
 1122|  17.3k|    if ((out_data_1 != NULL) && (out_data_2 != NULL) && (ld_mps_flag != 1)) {
  ------------------
  |  Branch (1122:9): [True: 17.3k, False: 0]
  |  Branch (1122:33): [True: 9.68k, False: 7.67k]
  |  Branch (1122:57): [True: 9.18k, False: 497]
  ------------------
 1123|  9.18k|      data = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1124|  9.18k|      *cdg_scheme |= data;
 1125|  9.18k|    } else {
 1126|  8.17k|      *cdg_scheme |= FREQ_PAIR;
  ------------------
  |  |   37|  8.17k|#define FREQ_PAIR (0)
  ------------------
 1127|  8.17k|    }
 1128|  17.3k|  }
 1129|       |
 1130|  26.6k|  if (pilot_coding_flag) {
  ------------------
  |  Branch (1130:7): [True: 5.57k, False: 21.0k]
  ------------------
 1131|  5.57k|    huff_yy_1 = PCM_PLT;
  ------------------
  |  |   43|  5.57k|#define PCM_PLT 0x2
  ------------------
 1132|  5.57k|    huff_yy_2 = PCM_PLT;
  ------------------
  |  |   43|  5.57k|#define PCM_PLT 0x2
  ------------------
 1133|  21.0k|  } else {
 1134|  21.0k|    huff_yy_1 = diff_type_1;
 1135|  21.0k|    huff_yy_2 = diff_type_2;
 1136|  21.0k|  }
 1137|       |
 1138|  26.6k|  switch (*cdg_scheme >> PAIR_SHIFT) {
  ------------------
  |  |   40|  26.6k|#define PAIR_SHIFT 4
  ------------------
 1139|  9.31k|    case HUFF_1D:
  ------------------
  |  |   34|  9.31k|#define HUFF_1D (0)
  ------------------
  |  Branch (1139:5): [True: 9.31k, False: 17.3k]
  ------------------
 1140|       |
 1141|  9.31k|      p0_flag[0] = (diff_type_1 == DIFF_FREQ) && !pilot_coding_flag;
  ------------------
  |  |   31|  9.31k|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1141:20): [True: 8.39k, False: 921]
  |  Branch (1141:50): [True: 7.53k, False: 858]
  ------------------
 1142|  9.31k|      p0_flag[1] = (diff_type_2 == DIFF_FREQ) && !pilot_coding_flag;
  ------------------
  |  |   31|  9.31k|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1142:20): [True: 8.67k, False: 640]
  |  Branch (1142:50): [True: 7.81k, False: 858]
  ------------------
 1143|       |
 1144|  9.31k|      switch (data_type) {
 1145|  6.06k|        case CLD:
  ------------------
  |  |   23|  6.06k|#define CLD (0)
  ------------------
  |  Branch (1145:9): [True: 6.06k, False: 3.25k]
  ------------------
 1146|  6.06k|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (1146:15): [True: 6.06k, False: 0]
  ------------------
 1147|  6.06k|            ixheaacd_mps_huff_dec_cld_1d(
 1148|  6.06k|                it_bit_buff, &ixheaacd_huff_cld_nodes.h_1_dim[huff_yy_1],
 1149|  6.06k|                out_data_1, num_val_1_int, p0_flag[0]);
 1150|  6.06k|          }
 1151|  6.06k|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (1151:15): [True: 2.22k, False: 3.83k]
  ------------------
 1152|  2.22k|            ixheaacd_mps_huff_dec_cld_1d(
 1153|  2.22k|                it_bit_buff, &ixheaacd_huff_cld_nodes.h_1_dim[huff_yy_2],
 1154|  2.22k|                out_data_2, num_val_2_int, p0_flag[1]);
 1155|  2.22k|          }
 1156|       |
 1157|  6.06k|          break;
 1158|       |
 1159|  2.18k|        case ICC:
  ------------------
  |  |   24|  2.18k|#define ICC (1)
  ------------------
  |  Branch (1159:9): [True: 2.18k, False: 7.12k]
  ------------------
 1160|  2.18k|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (1160:15): [True: 2.18k, False: 0]
  ------------------
 1161|  2.18k|            ixheaacd_mps_huff_dec_icc_1d(
 1162|  2.18k|                it_bit_buff, &ixheaacd_huff_icc_nodes.h_1_dim[huff_yy_1],
 1163|  2.18k|                out_data_1, num_val_1_int, p0_flag[0]);
 1164|  2.18k|          }
 1165|  2.18k|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (1165:15): [True: 799, False: 1.38k]
  ------------------
 1166|    799|            ixheaacd_mps_huff_dec_icc_1d(
 1167|    799|                it_bit_buff, &ixheaacd_huff_icc_nodes.h_1_dim[huff_yy_2],
 1168|    799|                out_data_2, num_val_2_int, p0_flag[1]);
 1169|    799|          }
 1170|       |
 1171|  2.18k|          break;
 1172|       |
 1173|    874|        case IPD:
  ------------------
  |  |   25|    874|#define IPD (2)
  ------------------
  |  Branch (1173:9): [True: 874, False: 8.43k]
  ------------------
 1174|    874|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (1174:15): [True: 874, False: 0]
  ------------------
 1175|    874|            ixheaacd_mps_huff_dec_ipd_1d(
 1176|    874|                it_bit_buff, &ixheaacd_huff_ipd_nodes.h_1_dim[huff_yy_1],
 1177|    874|                out_data_1, num_val_1_int, p0_flag[0]);
 1178|    874|          }
 1179|    874|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (1179:15): [True: 305, False: 569]
  ------------------
 1180|    305|            ixheaacd_mps_huff_dec_ipd_1d(
 1181|    305|                it_bit_buff, &ixheaacd_huff_ipd_nodes.h_1_dim[huff_yy_2],
 1182|    305|                out_data_2, num_val_2_int, p0_flag[1]);
 1183|    305|          }
 1184|       |
 1185|    874|          break;
 1186|    188|        case CPC:
  ------------------
  |  |   26|    188|#define CPC (3)
  ------------------
  |  Branch (1186:9): [True: 188, False: 9.12k]
  ------------------
 1187|    188|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (1187:15): [True: 188, False: 0]
  ------------------
 1188|    188|            ia_mps_dec_huff_dec_cpc_1d(
 1189|    188|                &(ixheaacd_huff_cpc_nodes.h_1_dim[huff_yy_1]), out_data_1,
 1190|    188|                num_val_1_int, p0_flag[0], it_bit_buff);
 1191|    188|          }
 1192|    188|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (1192:15): [True: 115, False: 73]
  ------------------
 1193|    115|            ia_mps_dec_huff_dec_cpc_1d(
 1194|    115|                &(ixheaacd_huff_cpc_nodes.h_1_dim[huff_yy_2]), out_data_2,
 1195|    115|                num_val_2_int, p0_flag[1], it_bit_buff);
 1196|    115|          }
 1197|       |
 1198|    188|          break;
 1199|      0|        default:
  ------------------
  |  Branch (1199:9): [True: 0, False: 9.31k]
  ------------------
 1200|      0|          break;
 1201|  9.31k|      }
 1202|       |
 1203|  9.26k|      break;
 1204|       |
 1205|  17.3k|    case HUFF_2D:
  ------------------
  |  |   35|  17.3k|#define HUFF_2D (1)
  ------------------
  |  Branch (1205:5): [True: 17.3k, False: 9.31k]
  ------------------
 1206|       |
 1207|  17.3k|      switch (*cdg_scheme & PAIR_MASK) {
  ------------------
  |  |   41|  17.3k|#define PAIR_MASK 0xf
  ------------------
 1208|  13.0k|        case FREQ_PAIR:
  ------------------
  |  |   37|  13.0k|#define FREQ_PAIR (0)
  ------------------
  |  Branch (1208:9): [True: 13.0k, False: 4.27k]
  ------------------
 1209|       |
 1210|  13.0k|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (1210:15): [True: 13.0k, False: 0]
  ------------------
 1211|  13.0k|            if (!pilot_coding_flag && diff_type_1 == DIFF_FREQ) {
  ------------------
  |  |   31|  8.63k|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1211:17): [True: 8.63k, False: 4.44k]
  |  Branch (1211:39): [True: 5.52k, False: 3.10k]
  ------------------
 1212|  5.52k|              p0_data_1[0] = &out_data_1[0];
 1213|  5.52k|              p0_data_1[1] = NULL;
 1214|       |
 1215|  5.52k|              num_val_1_int -= 1;
 1216|  5.52k|              out_data_1_int += 1;
 1217|  5.52k|            }
 1218|  13.0k|            df_rest_flag_1 = num_val_1_int % 2;
 1219|  13.0k|            if (df_rest_flag_1) num_val_1_int -= 1;
  ------------------
  |  Branch (1219:17): [True: 3.77k, False: 9.30k]
  ------------------
 1220|  13.0k|          }
 1221|  13.0k|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (1221:15): [True: 5.40k, False: 7.67k]
  ------------------
 1222|  5.40k|            if (!pilot_coding_flag && diff_type_2 == DIFF_FREQ) {
  ------------------
  |  |   31|  1.20k|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1222:17): [True: 1.20k, False: 4.19k]
  |  Branch (1222:39): [True: 603, False: 602]
  ------------------
 1223|    603|              p0_data_2[0] = NULL;
 1224|    603|              p0_data_2[1] = &out_data_2[0];
 1225|       |
 1226|    603|              num_val_2_int -= 1;
 1227|    603|              out_data_2_int += 1;
 1228|    603|            }
 1229|  5.40k|            df_rest_flag_2 = num_val_2_int % 2;
 1230|  5.40k|            if (df_rest_flag_2) num_val_2_int -= 1;
  ------------------
  |  Branch (1230:17): [True: 691, False: 4.71k]
  ------------------
 1231|  5.40k|          }
 1232|       |
 1233|  13.0k|          switch (data_type) {
 1234|  9.53k|            case CLD:
  ------------------
  |  |   23|  9.53k|#define CLD (0)
  ------------------
  |  Branch (1234:13): [True: 9.53k, False: 3.54k]
  ------------------
 1235|       |
 1236|  9.53k|              if (out_data_1 != NULL) {
  ------------------
  |  Branch (1236:19): [True: 9.53k, False: 0]
  ------------------
 1237|  9.53k|                ixheaacd_mps_huff_dec_cld_2d(
 1238|  9.53k|                    it_bit_buff,
 1239|  9.53k|                    &ixheaacd_huff_cld_nodes.h_2_dim[huff_yy_1][FREQ_PAIR],
  ------------------
  |  |   37|  9.53k|#define FREQ_PAIR (0)
  ------------------
 1240|  9.53k|                    pair_vec, num_val_1_int, 2, p0_data_1);
 1241|  9.53k|                if (df_rest_flag_1) {
  ------------------
  |  Branch (1241:21): [True: 1.63k, False: 7.89k]
  ------------------
 1242|  1.63k|                  ixheaacd_mps_huff_dec_cld_1d(
 1243|  1.63k|                      it_bit_buff, &ixheaacd_huff_cld_nodes.h_1_dim[huff_yy_1],
 1244|  1.63k|                      out_data_1_int + num_val_1_int, 1, 0);
 1245|  1.63k|                }
 1246|  9.53k|              }
 1247|  9.53k|              if (out_data_2 != NULL) {
  ------------------
  |  Branch (1247:19): [True: 4.80k, False: 4.72k]
  ------------------
 1248|  4.80k|                ixheaacd_mps_huff_dec_cld_2d(
 1249|  4.80k|                    it_bit_buff,
 1250|  4.80k|                    &ixheaacd_huff_cld_nodes.h_2_dim[huff_yy_2][FREQ_PAIR],
  ------------------
  |  |   37|  4.80k|#define FREQ_PAIR (0)
  ------------------
 1251|  4.80k|                    pair_vec + 1, num_val_2_int, 2, p0_data_2);
 1252|  4.80k|                if (df_rest_flag_2) {
  ------------------
  |  Branch (1252:21): [True: 353, False: 4.45k]
  ------------------
 1253|    353|                  ixheaacd_mps_huff_dec_cld_1d(
 1254|    353|                      it_bit_buff, &ixheaacd_huff_cld_nodes.h_1_dim[huff_yy_2],
 1255|    353|                      out_data_2_int + num_val_2_int, 1, 0);
 1256|    353|                }
 1257|  4.80k|              }
 1258|  9.53k|              break;
 1259|       |
 1260|  3.10k|            case ICC:
  ------------------
  |  |   24|  3.10k|#define ICC (1)
  ------------------
  |  Branch (1260:13): [True: 3.10k, False: 9.97k]
  ------------------
 1261|  3.10k|              if (out_data_1 != NULL) {
  ------------------
  |  Branch (1261:19): [True: 3.10k, False: 0]
  ------------------
 1262|  3.10k|                ixheaacd_mps_huff_dec_icc_2d(
 1263|  3.10k|                    it_bit_buff,
 1264|  3.10k|                    &ixheaacd_huff_icc_nodes.h_2_dim[huff_yy_1][FREQ_PAIR],
  ------------------
  |  |   37|  3.10k|#define FREQ_PAIR (0)
  ------------------
 1265|  3.10k|                    pair_vec, num_val_1_int, 2, p0_data_1);
 1266|  3.10k|                if (df_rest_flag_1) {
  ------------------
  |  Branch (1266:21): [True: 1.99k, False: 1.11k]
  ------------------
 1267|  1.99k|                  ixheaacd_mps_huff_dec_icc_1d(
 1268|  1.99k|                      it_bit_buff, &ixheaacd_huff_icc_nodes.h_1_dim[huff_yy_1],
 1269|  1.99k|                      out_data_1_int + num_val_1_int, 1, 0);
 1270|  1.99k|                }
 1271|  3.10k|              }
 1272|  3.10k|              if (out_data_2 != NULL) {
  ------------------
  |  Branch (1272:19): [True: 501, False: 2.60k]
  ------------------
 1273|    501|                ixheaacd_mps_huff_dec_icc_2d(
 1274|    501|                    it_bit_buff,
 1275|    501|                    &ixheaacd_huff_icc_nodes.h_2_dim[huff_yy_2][FREQ_PAIR],
  ------------------
  |  |   37|    501|#define FREQ_PAIR (0)
  ------------------
 1276|    501|                    pair_vec + 1, num_val_2_int, 2, p0_data_2);
 1277|    501|                if (df_rest_flag_2) {
  ------------------
  |  Branch (1277:21): [True: 289, False: 212]
  ------------------
 1278|    289|                  ixheaacd_mps_huff_dec_icc_1d(
 1279|    289|                      it_bit_buff, &ixheaacd_huff_icc_nodes.h_1_dim[huff_yy_2],
 1280|    289|                      out_data_2_int + num_val_2_int, 1, 0);
 1281|    289|                }
 1282|    501|              }
 1283|  3.10k|              break;
 1284|       |
 1285|    342|            case IPD:
  ------------------
  |  |   25|    342|#define IPD (2)
  ------------------
  |  Branch (1285:13): [True: 342, False: 12.7k]
  ------------------
 1286|    342|              if (out_data_1 != NULL) {
  ------------------
  |  Branch (1286:19): [True: 342, False: 0]
  ------------------
 1287|    342|                ixheaacd_mps_huff_dec_ipd_2d(
 1288|    342|                    it_bit_buff,
 1289|    342|                    &ixheaacd_huff_ipd_nodes.h_2_dim[huff_yy_1][FREQ_PAIR],
  ------------------
  |  |   37|    342|#define FREQ_PAIR (0)
  ------------------
 1290|    342|                    pair_vec, num_val_1_int, 2, p0_data_1);
 1291|    342|                if (df_rest_flag_1) {
  ------------------
  |  Branch (1291:21): [True: 86, False: 256]
  ------------------
 1292|     86|                  ixheaacd_mps_huff_dec_ipd_1d(
 1293|     86|                      it_bit_buff, &ixheaacd_huff_ipd_nodes.h_1_dim[huff_yy_1],
 1294|     86|                      out_data_1_int + num_val_1_int, 1, 0);
 1295|     86|                }
 1296|    342|              }
 1297|    342|              if (out_data_2 != NULL) {
  ------------------
  |  Branch (1297:19): [True: 64, False: 278]
  ------------------
 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: 28, False: 36]
  ------------------
 1303|     28|                  ixheaacd_mps_huff_dec_ipd_1d(
 1304|     28|                      it_bit_buff, &ixheaacd_huff_ipd_nodes.h_1_dim[huff_yy_2],
 1305|     28|                      out_data_2_int + num_val_2_int, 1, 0);
 1306|     28|                }
 1307|     64|              }
 1308|    342|              break;
 1309|     98|            case CPC:
  ------------------
  |  |   26|     98|#define CPC (3)
  ------------------
  |  Branch (1309:13): [True: 98, False: 12.9k]
  ------------------
 1310|     98|              if (out_data_1 != NULL) {
  ------------------
  |  Branch (1310:19): [True: 98, False: 0]
  ------------------
 1311|     98|                ia_mps_dec_huff_dec_cpc_2d(
 1312|     98|                    &(ixheaacd_huff_cpc_nodes.h_2_dim[huff_yy_1][FREQ_PAIR]), pair_vec,
  ------------------
  |  |   37|     98|#define FREQ_PAIR (0)
  ------------------
 1313|     98|                    num_val_1_int, 2, p0_data_1, it_bit_buff);
 1314|     98|                if (df_rest_flag_1) {
  ------------------
  |  Branch (1314:21): [True: 56, False: 42]
  ------------------
 1315|     56|                  ia_mps_dec_huff_dec_cpc_1d(&(ixheaacd_huff_cpc_nodes.h_1_dim[huff_yy_1]),
 1316|     56|                      out_data_1_int + num_val_1_int, 1, 0, it_bit_buff);
 1317|     56|                }
 1318|     98|              }
 1319|     98|              if (out_data_2 != NULL) {
  ------------------
  |  Branch (1319:19): [True: 32, False: 66]
  ------------------
 1320|     32|                ia_mps_dec_huff_dec_cpc_2d(
 1321|     32|                    &(ixheaacd_huff_cpc_nodes.h_2_dim[huff_yy_2][FREQ_PAIR]), pair_vec + 1,
  ------------------
  |  |   37|     32|#define FREQ_PAIR (0)
  ------------------
 1322|     32|                    num_val_2_int, 2, p0_data_2, it_bit_buff);
 1323|       |
 1324|     32|                if (df_rest_flag_2) {
  ------------------
  |  Branch (1324:21): [True: 17, False: 15]
  ------------------
 1325|     17|                  ia_mps_dec_huff_dec_cpc_1d(
 1326|     17|                      &(ixheaacd_huff_cpc_nodes.h_1_dim[huff_yy_2]),
 1327|     17|                      out_data_2_int + num_val_2_int, 1, 0, it_bit_buff);
 1328|     17|                }
 1329|     32|              }
 1330|     98|              break;
 1331|      0|            default:
  ------------------
  |  Branch (1331:13): [True: 0, False: 13.0k]
  ------------------
 1332|      0|              break;
 1333|  13.0k|          }
 1334|       |
 1335|  13.0k|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (1335:15): [True: 13.0k, False: 0]
  ------------------
 1336|  58.2k|            for (i = 0; i < num_val_1_int - 1; i += 2) {
  ------------------
  |  Branch (1336:25): [True: 45.1k, False: 13.0k]
  ------------------
 1337|  45.1k|              out_data_1_int[i] = pair_vec[i][0];
 1338|  45.1k|              out_data_1_int[i + 1] = pair_vec[i][1];
 1339|  45.1k|            }
 1340|  13.0k|          }
 1341|  13.0k|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (1341:15): [True: 5.39k, False: 7.66k]
  ------------------
 1342|  29.2k|            for (i = 0; i < num_val_2_int - 1; i += 2) {
  ------------------
  |  Branch (1342:25): [True: 23.8k, False: 5.39k]
  ------------------
 1343|  23.8k|              out_data_2_int[i] = pair_vec[i + 1][0];
 1344|  23.8k|              out_data_2_int[i + 1] = pair_vec[i + 1][1];
 1345|  23.8k|            }
 1346|  5.39k|          }
 1347|       |
 1348|  13.0k|          break;
 1349|       |
 1350|  4.27k|        case TIME_PAIR:
  ------------------
  |  |   38|  4.27k|#define TIME_PAIR (1)
  ------------------
  |  Branch (1350:9): [True: 4.27k, False: 13.0k]
  ------------------
 1351|       |
 1352|  4.27k|          if (!pilot_coding_flag &&
  ------------------
  |  Branch (1352:15): [True: 4.00k, False: 268]
  ------------------
 1353|  4.00k|              ((diff_type_1 == DIFF_FREQ) || (diff_type_2 == DIFF_FREQ))) {
  ------------------
  |  |   31|  4.00k|#define DIFF_FREQ (0)
  ------------------
                            ((diff_type_1 == DIFF_FREQ) || (diff_type_2 == DIFF_FREQ))) {
  ------------------
  |  |   31|    720|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1353:16): [True: 3.28k, False: 720]
  |  Branch (1353:46): [True: 474, False: 246]
  ------------------
 1354|  3.76k|            p0_data_1[0] = &out_data_1[0];
 1355|  3.76k|            p0_data_1[1] = &out_data_2[0];
 1356|       |
 1357|  3.76k|            out_data_1_int += 1;
 1358|  3.76k|            out_data_2_int += 1;
 1359|       |
 1360|  3.76k|            num_val_1_int -= 1;
 1361|  3.76k|          }
 1362|       |
 1363|  4.27k|          if ((diff_type_1 == DIFF_TIME) || (diff_type_2 == DIFF_TIME)) {
  ------------------
  |  |   32|  4.27k|#define DIFF_TIME (1)
  ------------------
                        if ((diff_type_1 == DIFF_TIME) || (diff_type_2 == DIFF_TIME)) {
  ------------------
  |  |   32|  3.55k|#define DIFF_TIME (1)
  ------------------
  |  Branch (1363:15): [True: 720, False: 3.55k]
  |  Branch (1363:45): [True: 3.05k, False: 506]
  ------------------
 1364|  3.77k|            diff_type = DIFF_TIME;
  ------------------
  |  |   32|  3.77k|#define DIFF_TIME (1)
  ------------------
 1365|  3.77k|          } else {
 1366|    506|            diff_type = DIFF_FREQ;
  ------------------
  |  |   31|    506|#define DIFF_FREQ (0)
  ------------------
 1367|    506|          }
 1368|  4.27k|          if (pilot_coding_flag) {
  ------------------
  |  Branch (1368:15): [True: 268, False: 4.00k]
  ------------------
 1369|    268|            huff_yy = PCM_PLT;
  ------------------
  |  |   43|    268|#define PCM_PLT 0x2
  ------------------
 1370|  4.00k|          } else {
 1371|  4.00k|            huff_yy = diff_type;
 1372|  4.00k|          }
 1373|       |
 1374|  4.27k|          switch (data_type) {
 1375|  1.95k|            case CLD:
  ------------------
  |  |   23|  1.95k|#define CLD (0)
  ------------------
  |  Branch (1375:13): [True: 1.95k, False: 2.31k]
  ------------------
 1376|  1.95k|              ixheaacd_mps_huff_dec_cld_2d(
 1377|  1.95k|                  it_bit_buff,
 1378|  1.95k|                  &ixheaacd_huff_cld_nodes.h_2_dim[huff_yy][TIME_PAIR],
  ------------------
  |  |   38|  1.95k|#define TIME_PAIR (1)
  ------------------
 1379|  1.95k|                  pair_vec, num_val_1_int, 1, p0_data_1);
 1380|  1.95k|              break;
 1381|       |
 1382|  2.07k|            case ICC:
  ------------------
  |  |   24|  2.07k|#define ICC (1)
  ------------------
  |  Branch (1382:13): [True: 2.07k, False: 2.20k]
  ------------------
 1383|  2.07k|              ixheaacd_mps_huff_dec_icc_2d(
 1384|  2.07k|                  it_bit_buff,
 1385|  2.07k|                  &ixheaacd_huff_icc_nodes.h_2_dim[huff_yy][TIME_PAIR],
  ------------------
  |  |   38|  2.07k|#define TIME_PAIR (1)
  ------------------
 1386|  2.07k|                  pair_vec, num_val_1_int, 1, p0_data_1);
 1387|  2.07k|              break;
 1388|       |
 1389|    160|            case IPD:
  ------------------
  |  |   25|    160|#define IPD (2)
  ------------------
  |  Branch (1389:13): [True: 160, False: 4.11k]
  ------------------
 1390|    160|              ixheaacd_mps_huff_dec_ipd_2d(
 1391|    160|                  it_bit_buff,
 1392|    160|                  &ixheaacd_huff_ipd_nodes.h_2_dim[huff_yy][TIME_PAIR],
  ------------------
  |  |   38|    160|#define TIME_PAIR (1)
  ------------------
 1393|    160|                  pair_vec, num_val_1_int, 1, p0_data_1);
 1394|    160|              break;
 1395|     83|            case CPC:
  ------------------
  |  |   26|     83|#define CPC (3)
  ------------------
  |  Branch (1395:13): [True: 83, False: 4.19k]
  ------------------
 1396|     83|              ia_mps_dec_huff_dec_cpc_2d(&(ixheaacd_huff_cpc_nodes.h_2_dim[huff_yy][TIME_PAIR]),
  ------------------
  |  |   38|     83|#define TIME_PAIR (1)
  ------------------
 1397|     83|                  pair_vec, num_val_1_int, 1, p0_data_1, it_bit_buff);
 1398|     83|              break;
 1399|      0|            default:
  ------------------
  |  Branch (1399:13): [True: 0, False: 4.27k]
  ------------------
 1400|      0|              break;
 1401|  4.27k|          }
 1402|       |
 1403|  24.5k|          for (i = 0; i < num_val_1_int; i++) {
  ------------------
  |  Branch (1403:23): [True: 20.3k, False: 4.26k]
  ------------------
 1404|  20.3k|            out_data_1_int[i] = pair_vec[i][0];
 1405|  20.3k|            out_data_2_int[i] = pair_vec[i][1];
 1406|  20.3k|          }
 1407|       |
 1408|  4.26k|          break;
 1409|       |
 1410|      0|        default:
  ------------------
  |  Branch (1410:9): [True: 0, False: 17.3k]
  ------------------
 1411|      0|          break;
 1412|  17.3k|      }
 1413|       |
 1414|  17.3k|      break;
 1415|       |
 1416|  17.3k|    default:
  ------------------
  |  Branch (1416:5): [True: 0, False: 26.6k]
  ------------------
 1417|      0|      break;
 1418|  26.6k|  }
 1419|       |
 1420|  26.5k|  return;
 1421|  26.6k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_dec_pilot:
  617|  5.57k|                                        WORD32* pilot_data) {
  618|  5.57k|  WORD32 node = 0;
  619|       |
  620|  5.57k|  ixheaacd_mps_huff_read(it_bit_buff, node_tab, &node);
  621|  5.57k|  *pilot_data = -(node + 1);
  622|       |
  623|  5.57k|  return;
  624|  5.57k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_read:
  514|   264k|                                   WORD32* out_data) {
  515|   264k|  WORD32 node = 0;
  516|   264k|  UWORD32 next_bit = 0;
  517|       |
  518|   596k|  do {
  519|   596k|    next_bit = ixheaacd_read_bits_buf(it_bit_buff, 1);
  520|   596k|    node = (*node_tab)[node][next_bit];
  521|   596k|  } while (node > 0);
  ------------------
  |  Branch (521:12): [True: 332k, False: 264k]
  ------------------
  522|       |
  523|   264k|  *out_data = node;
  524|       |
  525|   264k|  return;
  526|   264k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_dec_cld_1d:
  629|  10.2k|    WORD32 num_val, WORD32 p0_flag) {
  630|  10.2k|  WORD32 i = 0, node = 0, ixheaacd_drc_offset = 0;
  631|  10.2k|  WORD32 od = 0, od_sign = 0;
  632|  10.2k|  UWORD32 data = 0;
  633|       |
  634|  10.2k|  if (p0_flag) {
  ------------------
  |  Branch (634:7): [True: 6.28k, False: 3.98k]
  ------------------
  635|  6.28k|    ixheaacd_mps_huff_read(it_bit_buff,
  636|  6.28k|                           (ia_huff_node_struct)&ixheaacd_huff_part0_nodes.cld,
  637|  6.28k|                           &node);
  638|  6.28k|    out_data[0] = -(node + 1);
  639|  6.28k|    ixheaacd_drc_offset = 1;
  640|  6.28k|  }
  641|       |
  642|  71.6k|  for (i = ixheaacd_drc_offset; i < num_val; i++) {
  ------------------
  |  Branch (642:33): [True: 61.3k, False: 10.2k]
  ------------------
  643|  61.3k|    ixheaacd_mps_huff_read(it_bit_buff,
  644|  61.3k|                           (ia_huff_node_struct)&huff_nodes->node_tab, &node);
  645|  61.3k|    od = -(node + 1);
  646|       |
  647|  61.3k|    if (od != 0) {
  ------------------
  |  Branch (647:9): [True: 12.8k, False: 48.5k]
  ------------------
  648|  12.8k|      data = ixheaacd_read_bits_buf(it_bit_buff, 1);
  649|  12.8k|      od_sign = data;
  650|       |
  651|  12.8k|      if (od_sign) od = -od;
  ------------------
  |  Branch (651:11): [True: 4.46k, False: 8.37k]
  ------------------
  652|  12.8k|    }
  653|       |
  654|  61.3k|    out_data[i] = od;
  655|  61.3k|  }
  656|       |
  657|  10.2k|  return;
  658|  10.2k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_dec_icc_1d:
  688|  5.27k|    WORD32 num_val, WORD32 p0_flag) {
  689|  5.27k|  WORD32 i = 0, node = 0, ixheaacd_drc_offset = 0;
  690|  5.27k|  WORD32 od = 0, od_sign = 0;
  691|  5.27k|  UWORD32 data = 0;
  692|       |
  693|  5.27k|  if (p0_flag) {
  ------------------
  |  Branch (693:7): [True: 2.35k, False: 2.91k]
  ------------------
  694|  2.35k|    ixheaacd_mps_huff_read(it_bit_buff,
  695|  2.35k|                           (ia_huff_node_struct)&ixheaacd_huff_part0_nodes.icc,
  696|  2.35k|                           &node);
  697|  2.35k|    out_data[0] = -(node + 1);
  698|  2.35k|    ixheaacd_drc_offset = 1;
  699|  2.35k|  }
  700|       |
  701|  30.6k|  for (i = ixheaacd_drc_offset; i < num_val; i++) {
  ------------------
  |  Branch (701:33): [True: 25.3k, False: 5.27k]
  ------------------
  702|  25.3k|    ixheaacd_mps_huff_read(it_bit_buff,
  703|  25.3k|                           (ia_huff_node_struct)&huff_nodes->node_tab, &node);
  704|  25.3k|    od = -(node + 1);
  705|       |
  706|  25.3k|    if (od != 0) {
  ------------------
  |  Branch (706:9): [True: 7.97k, False: 17.3k]
  ------------------
  707|  7.97k|      data = ixheaacd_read_bits_buf(it_bit_buff, 1);
  708|  7.97k|      od_sign = data;
  709|       |
  710|  7.97k|      if (od_sign) od = -od;
  ------------------
  |  Branch (710:11): [True: 2.82k, False: 5.14k]
  ------------------
  711|  7.97k|    }
  712|       |
  713|  25.3k|    out_data[i] = od;
  714|  25.3k|  }
  715|       |
  716|  5.27k|  return;
  717|  5.27k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_dec_ipd_1d:
  663|  1.29k|    WORD32 num_val, WORD32 p0_flag) {
  664|  1.29k|  WORD32 i = 0, node = 0, ixheaacd_drc_offset = 0;
  665|  1.29k|  WORD32 od = 0;
  666|       |
  667|  1.29k|  if (p0_flag) {
  ------------------
  |  Branch (667:7): [True: 967, False: 326]
  ------------------
  668|    967|    ixheaacd_mps_huff_read(
  669|    967|        it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_ipd_nodes.hp0.node_tab,
  670|    967|        &node);
  671|    967|    out_data[0] = -(node + 1);
  672|    967|    ixheaacd_drc_offset = 1;
  673|    967|  }
  674|       |
  675|  11.4k|  for (i = ixheaacd_drc_offset; i < num_val; i++) {
  ------------------
  |  Branch (675:33): [True: 10.1k, False: 1.29k]
  ------------------
  676|  10.1k|    ixheaacd_mps_huff_read(it_bit_buff,
  677|  10.1k|                           (ia_huff_node_struct)&huff_nodes->node_tab, &node);
  678|  10.1k|    od = -(node + 1);
  679|  10.1k|    out_data[i] = od;
  680|  10.1k|  }
  681|       |
  682|  1.29k|  return;
  683|  1.29k|}
ixheaacd_mps_dec.c:ia_mps_dec_huff_dec_cpc_1d:
  721|    376|    WORD32 num_val, WORD32 p0_flag, ia_bit_buf_struct *h_bit_buf) {
  722|    376|  WORD32 i = 0, node = 0, offset = 0;
  723|    376|  WORD32 od = 0, od_sign = 0;
  724|    376|  WORD32 data = 0;
  725|       |
  726|    376|  if (p0_flag) {
  ------------------
  |  Branch (726:7): [True: 181, False: 195]
  ------------------
  727|    181|    ixheaacd_mps_huff_read(
  728|    181|        h_bit_buf, (ia_huff_node_struct) & (ixheaacd_huff_part0_nodes.cpc),
  729|    181|        &node);
  730|    181|    out_data[0] = -(node + 1);
  731|    181|    offset = 1;
  732|    181|  }
  733|       |
  734|  2.74k|  for (i = offset; i < num_val; i++) {
  ------------------
  |  Branch (734:20): [True: 2.36k, False: 376]
  ------------------
  735|  2.36k|    ixheaacd_mps_huff_read(h_bit_buf,
  736|  2.36k|                           (ia_huff_node_struct)&huff_nodes->node_tab, &node);
  737|  2.36k|    od = -(node + 1);
  738|       |
  739|  2.36k|    if (od != 0) {
  ------------------
  |  Branch (739:9): [True: 1.55k, False: 812]
  ------------------
  740|  1.55k|      data = ixheaacd_read_bits_buf(h_bit_buf, 1);
  741|  1.55k|      od_sign = data;
  742|       |
  743|  1.55k|      if (od_sign) od = -od;
  ------------------
  |  Branch (743:11): [True: 727, False: 829]
  ------------------
  744|  1.55k|    }
  745|       |
  746|  2.36k|    out_data[i] = od;
  747|  2.36k|  }
  748|    376|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_dec_cld_2d:
  753|  16.2k|    WORD32 num_val, WORD32 ch_fac, WORD32* p0_data[2]) {
  754|  16.2k|  WORD32 i = 0, lav = 0, escape = 0, esc_contrl = 0;
  755|  16.2k|  WORD32 node = 0;
  756|  16.2k|  UWORD32 data = 0;
  757|       |
  758|  16.2k|  WORD32 esc_data[MAXBANDS][2] = {{0}};
  759|  16.2k|  WORD32 esc_idx[MAXBANDS] = {0};
  760|       |
  761|  16.2k|  ixheaacd_mps_huff_read(
  762|  16.2k|      it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_lav_idx_nodes.node_tab,
  763|  16.2k|      &node);
  764|  16.2k|  data = -(node + 1);
  765|       |
  766|  16.2k|  lav = 2 * data + 3;
  767|       |
  768|  16.2k|  if (p0_data[0] != NULL) {
  ------------------
  |  Branch (768:7): [True: 6.27k, False: 10.0k]
  ------------------
  769|  6.27k|    ixheaacd_mps_huff_read(it_bit_buff,
  770|  6.27k|                           (ia_huff_node_struct)&ixheaacd_huff_part0_nodes.cld,
  771|  6.27k|                           &node);
  772|  6.27k|    *p0_data[0] = -(node + 1);
  773|  6.27k|  }
  774|  16.2k|  if (p0_data[1] != NULL) {
  ------------------
  |  Branch (774:7): [True: 2.14k, False: 14.1k]
  ------------------
  775|  2.14k|    ixheaacd_mps_huff_read(it_bit_buff,
  776|  2.14k|                           (ia_huff_node_struct)&ixheaacd_huff_part0_nodes.cld,
  777|  2.14k|                           &node);
  778|  2.14k|    *p0_data[1] = -(node + 1);
  779|  2.14k|  }
  780|       |
  781|  79.1k|  for (i = 0; i < num_val; i += ch_fac) {
  ------------------
  |  Branch (781:15): [True: 62.8k, False: 16.2k]
  ------------------
  782|  62.8k|    switch (lav) {
  783|  38.7k|      case 3:
  ------------------
  |  Branch (783:7): [True: 38.7k, False: 24.0k]
  ------------------
  784|  38.7k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  785|  38.7k|                                  (ia_huff_node_struct)&huff_nodes->lav3,
  786|  38.7k|                                  out_data[i], &escape);
  787|  38.7k|        break;
  788|  8.50k|      case 5:
  ------------------
  |  Branch (788:7): [True: 8.50k, False: 54.3k]
  ------------------
  789|  8.50k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  790|  8.50k|                                  (ia_huff_node_struct)&huff_nodes->lav5,
  791|  8.50k|                                  out_data[i], &escape);
  792|  8.50k|        break;
  793|  13.3k|      case 7:
  ------------------
  |  Branch (793:7): [True: 13.3k, False: 49.5k]
  ------------------
  794|  13.3k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  795|  13.3k|                                  (ia_huff_node_struct)&huff_nodes->lav7,
  796|  13.3k|                                  out_data[i], &escape);
  797|  13.3k|        break;
  798|  2.23k|      case 9:
  ------------------
  |  Branch (798:7): [True: 2.23k, False: 60.6k]
  ------------------
  799|  2.23k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  800|  2.23k|                                  (ia_huff_node_struct)&huff_nodes->lav9,
  801|  2.23k|                                  out_data[i], &escape);
  802|  2.23k|        break;
  803|      0|      default:
  ------------------
  |  Branch (803:7): [True: 0, False: 62.8k]
  ------------------
  804|      0|        break;
  805|  62.8k|    }
  806|       |
  807|  62.8k|    if (escape) {
  ------------------
  |  Branch (807:9): [True: 0, False: 62.8k]
  ------------------
  808|      0|      esc_idx[esc_contrl++] = i;
  809|  62.8k|    } else {
  810|  62.8k|      ixheaacd_mps_sym_restore(it_bit_buff, lav, out_data[i]);
  811|  62.8k|    }
  812|  62.8k|  }
  813|       |
  814|  16.2k|  if (esc_contrl > 0) {
  ------------------
  |  Branch (814:7): [True: 0, False: 16.2k]
  ------------------
  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|  16.2k|  return;
  825|  16.2k|}
ixheaacd_mps_dec.c:ixheaacd_mps_sym_restore:
  552|  85.7k|                                     WORD32 lav, WORD32 data[2]) {
  553|  85.7k|  WORD32 tmp = 0;
  554|  85.7k|  UWORD32 sym_bit = 0;
  555|       |
  556|  85.7k|  WORD32 sum_val = data[0] + data[1];
  557|  85.7k|  WORD32 diff_val = data[0] - data[1];
  558|       |
  559|  85.7k|  if (sum_val > lav) {
  ------------------
  |  Branch (559:7): [True: 20.6k, False: 65.1k]
  ------------------
  560|  20.6k|    data[0] = -sum_val + (2 * lav + 1);
  561|  20.6k|    data[1] = -diff_val;
  562|  65.1k|  } else {
  563|  65.1k|    data[0] = sum_val;
  564|  65.1k|    data[1] = diff_val;
  565|  65.1k|  }
  566|       |
  567|  85.7k|  if (data[0] + data[1] != 0) {
  ------------------
  |  Branch (567:7): [True: 32.1k, False: 53.5k]
  ------------------
  568|  32.1k|    sym_bit = ixheaacd_read_bits_buf(it_bit_buff, 1);
  569|  32.1k|    if (sym_bit) {
  ------------------
  |  Branch (569:9): [True: 10.3k, False: 21.8k]
  ------------------
  570|  10.3k|      data[0] = -data[0];
  571|  10.3k|      data[1] = -data[1];
  572|  10.3k|    }
  573|  32.1k|  }
  574|       |
  575|  85.7k|  if (data[0] - data[1] != 0) {
  ------------------
  |  Branch (575:7): [True: 28.7k, False: 56.9k]
  ------------------
  576|  28.7k|    sym_bit = ixheaacd_read_bits_buf(it_bit_buff, 1);
  577|  28.7k|    if (sym_bit) {
  ------------------
  |  Branch (577:9): [True: 8.45k, False: 20.3k]
  ------------------
  578|  8.45k|      tmp = data[0];
  579|  8.45k|      data[0] = data[1];
  580|  8.45k|      data[1] = tmp;
  581|  8.45k|    }
  582|  28.7k|  }
  583|       |
  584|  85.7k|  return;
  585|  85.7k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_dec_icc_2d:
  830|  5.68k|    WORD32 num_val, WORD32 ch_fac, WORD32* p0_data[2]) {
  831|  5.68k|  WORD32 i = 0, lav = 0, escape = 0, esc_contrl = 0;
  832|  5.68k|  WORD32 node = 0;
  833|  5.68k|  UWORD32 data = 0;
  834|       |
  835|  5.68k|  WORD32 esc_data[2][MAXBANDS] = {{0}};
  836|  5.68k|  WORD32 esc_idx[MAXBANDS] = {0};
  837|       |
  838|  5.68k|  ixheaacd_mps_huff_read(
  839|  5.68k|      it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_lav_idx_nodes.node_tab,
  840|  5.68k|      &node);
  841|  5.68k|  data = -(node + 1);
  842|       |
  843|  5.68k|  lav = 2 * data + 1;
  844|       |
  845|  5.68k|  if (p0_data[0] != NULL) {
  ------------------
  |  Branch (845:7): [True: 2.74k, False: 2.93k]
  ------------------
  846|  2.74k|    ixheaacd_mps_huff_read(it_bit_buff,
  847|  2.74k|                           (ia_huff_node_struct)&ixheaacd_huff_part0_nodes.icc,
  848|  2.74k|                           &node);
  849|  2.74k|    *p0_data[0] = -(node + 1);
  850|  2.74k|  }
  851|  5.68k|  if (p0_data[1] != NULL) {
  ------------------
  |  Branch (851:7): [True: 2.02k, False: 3.65k]
  ------------------
  852|  2.02k|    ixheaacd_mps_huff_read(it_bit_buff,
  853|  2.02k|                           (ia_huff_node_struct)&ixheaacd_huff_part0_nodes.icc,
  854|  2.02k|                           &node);
  855|  2.02k|    *p0_data[1] = -(node + 1);
  856|  2.02k|  }
  857|       |
  858|  27.7k|  for (i = 0; i < num_val; i += ch_fac) {
  ------------------
  |  Branch (858:15): [True: 22.0k, False: 5.68k]
  ------------------
  859|  22.0k|    switch (lav) {
  ------------------
  |  Branch (859:13): [True: 22.0k, False: 0]
  ------------------
  860|  12.5k|      case 1:
  ------------------
  |  Branch (860:7): [True: 12.5k, False: 9.42k]
  ------------------
  861|  12.5k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  862|  12.5k|                                  (ia_huff_node_struct)&huff_nodes->lav1,
  863|  12.5k|                                  out_data[i], &escape);
  864|  12.5k|        break;
  865|  7.07k|      case 3:
  ------------------
  |  Branch (865:7): [True: 7.07k, False: 14.9k]
  ------------------
  866|  7.07k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  867|  7.07k|                                  (ia_huff_node_struct)&huff_nodes->lav3,
  868|  7.07k|                                  out_data[i], &escape);
  869|  7.07k|        break;
  870|    838|      case 5:
  ------------------
  |  Branch (870:7): [True: 838, False: 21.1k]
  ------------------
  871|    838|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  872|    838|                                  (ia_huff_node_struct)&huff_nodes->lav5,
  873|    838|                                  out_data[i], &escape);
  874|    838|        break;
  875|  1.51k|      case 7:
  ------------------
  |  Branch (875:7): [True: 1.51k, False: 20.5k]
  ------------------
  876|  1.51k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  877|  1.51k|                                  (ia_huff_node_struct)&huff_nodes->lav7,
  878|  1.51k|                                  out_data[i], &escape);
  879|  1.51k|        break;
  880|  22.0k|    }
  881|       |
  882|  22.0k|    if (escape) {
  ------------------
  |  Branch (882:9): [True: 72, False: 21.9k]
  ------------------
  883|     72|      esc_idx[esc_contrl++] = i;
  884|  21.9k|    } else {
  885|  21.9k|      ixheaacd_mps_sym_restore(it_bit_buff, lav, out_data[i]);
  886|  21.9k|    }
  887|  22.0k|  }
  888|       |
  889|  5.68k|  if (esc_contrl > 0) {
  ------------------
  |  Branch (889:7): [True: 16, False: 5.66k]
  ------------------
  890|     16|    ixheaacd_mps_pcm_decode(it_bit_buff, esc_data[0], esc_data[1], 0,
  891|     16|                            2 * esc_contrl, (2 * lav + 1));
  892|       |
  893|     88|    for (i = 0; i < esc_contrl; i++) {
  ------------------
  |  Branch (893:17): [True: 72, False: 16]
  ------------------
  894|     72|      out_data[esc_idx[i]][0] = esc_data[0][i] - lav;
  895|     72|      out_data[esc_idx[i]][1] = esc_data[1][i] - lav;
  896|     72|    }
  897|     16|  }
  898|       |
  899|  5.68k|  return;
  900|  5.68k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_dec_ipd_2d:
  905|    566|    WORD32 num_val, WORD32 ch_fac, WORD32* p0_data[2]) {
  906|    566|  WORD32 i = 0, lav = 0, escape = 0, esc_contrl = 0;
  907|    566|  WORD32 node = 0;
  908|    566|  UWORD32 data = 0;
  909|       |
  910|    566|  WORD32 esc_data[2][MAXBANDS] = {{0}};
  911|    566|  WORD32 esc_idx[MAXBANDS] = {0};
  912|       |
  913|    566|  ixheaacd_mps_huff_read(
  914|    566|      it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_lav_idx_nodes.node_tab,
  915|    566|      &node);
  916|       |
  917|    566|  data = -(node + 1);
  918|    566|  if (data == 0)
  ------------------
  |  Branch (918:7): [True: 120, False: 446]
  ------------------
  919|    120|    data = 3;
  920|    446|  else
  921|    446|    data--;
  922|       |
  923|    566|  lav = 2 * data + 1;
  924|       |
  925|    566|  if (p0_data[0] != NULL) {
  ------------------
  |  Branch (925:7): [True: 174, False: 392]
  ------------------
  926|    174|    ixheaacd_mps_huff_read(
  927|    174|        it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_ipd_nodes.hp0.node_tab,
  928|    174|        &node);
  929|    174|    *p0_data[0] = -(node + 1);
  930|    174|  }
  931|    566|  if (p0_data[1] != NULL) {
  ------------------
  |  Branch (931:7): [True: 117, False: 449]
  ------------------
  932|    117|    ixheaacd_mps_huff_read(
  933|    117|        it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_ipd_nodes.hp0.node_tab,
  934|    117|        &node);
  935|    117|    *p0_data[1] = -(node + 1);
  936|    117|  }
  937|       |
  938|  4.19k|  for (i = 0; i < num_val; i += ch_fac) {
  ------------------
  |  Branch (938:15): [True: 3.63k, False: 566]
  ------------------
  939|  3.63k|    switch (lav) {
  ------------------
  |  Branch (939:13): [True: 3.63k, False: 0]
  ------------------
  940|  1.25k|      case 1:
  ------------------
  |  Branch (940:7): [True: 1.25k, False: 2.37k]
  ------------------
  941|  1.25k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  942|  1.25k|                                  (ia_huff_node_struct)&huff_nodes->lav1,
  943|  1.25k|                                  out_data[i], &escape);
  944|  1.25k|        break;
  945|    933|      case 3:
  ------------------
  |  Branch (945:7): [True: 933, False: 2.70k]
  ------------------
  946|    933|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  947|    933|                                  (ia_huff_node_struct)&huff_nodes->lav3,
  948|    933|                                  out_data[i], &escape);
  949|    933|        break;
  950|    541|      case 5:
  ------------------
  |  Branch (950:7): [True: 541, False: 3.09k]
  ------------------
  951|    541|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  952|    541|                                  (ia_huff_node_struct)&huff_nodes->lav5,
  953|    541|                                  out_data[i], &escape);
  954|    541|        break;
  955|    905|      case 7:
  ------------------
  |  Branch (955:7): [True: 905, False: 2.72k]
  ------------------
  956|    905|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  957|    905|                                  (ia_huff_node_struct)&huff_nodes->lav7,
  958|    905|                                  out_data[i], &escape);
  959|    905|        break;
  960|  3.63k|    }
  961|       |
  962|  3.63k|    if (escape) {
  ------------------
  |  Branch (962:9): [True: 146, False: 3.48k]
  ------------------
  963|    146|      esc_idx[esc_contrl++] = i;
  964|  3.48k|    } else {
  965|  3.48k|      ixheaacd_mps_sym_restoreipd(it_bit_buff, lav, out_data[i]);
  966|  3.48k|    }
  967|  3.63k|  }
  968|       |
  969|    566|  if (esc_contrl > 0) {
  ------------------
  |  Branch (969:7): [True: 62, False: 504]
  ------------------
  970|     62|    ixheaacd_mps_pcm_decode(it_bit_buff, esc_data[0], esc_data[1], 0,
  971|     62|                            2 * esc_contrl, (2 * lav + 1));
  972|       |
  973|    208|    for (i = 0; i < esc_contrl; i++) {
  ------------------
  |  Branch (973:17): [True: 146, False: 62]
  ------------------
  974|    146|      out_data[esc_idx[i]][0] = esc_data[0][i] - lav;
  975|    146|      out_data[esc_idx[i]][1] = esc_data[1][i] - lav;
  976|    146|    }
  977|     62|  }
  978|       |
  979|    566|  return;
  980|    566|}
ixheaacd_mps_dec.c:ixheaacd_mps_sym_restoreipd:
  588|  3.48k|                                        WORD32 lav, WORD32 data[2]) {
  589|  3.48k|  WORD32 tmp = 0;
  590|  3.48k|  UWORD32 sym_bit = 0;
  591|       |
  592|  3.48k|  WORD32 sum_val = data[0] + data[1];
  593|  3.48k|  WORD32 diff_val = data[0] - data[1];
  594|       |
  595|  3.48k|  if (sum_val > lav) {
  ------------------
  |  Branch (595:7): [True: 597, False: 2.89k]
  ------------------
  596|    597|    data[0] = -sum_val + (2 * lav + 1);
  597|    597|    data[1] = -diff_val;
  598|  2.89k|  } else {
  599|  2.89k|    data[0] = sum_val;
  600|  2.89k|    data[1] = diff_val;
  601|  2.89k|  }
  602|       |
  603|  3.48k|  if (data[0] - data[1] != 0) {
  ------------------
  |  Branch (603:7): [True: 922, False: 2.56k]
  ------------------
  604|    922|    sym_bit = ixheaacd_read_bits_buf(it_bit_buff, 1);
  605|    922|    if (sym_bit) {
  ------------------
  |  Branch (605:9): [True: 563, False: 359]
  ------------------
  606|    563|      tmp = data[0];
  607|    563|      data[0] = data[1];
  608|    563|      data[1] = tmp;
  609|    563|    }
  610|    922|  }
  611|       |
  612|  3.48k|  return;
  613|  3.48k|}
ixheaacd_mps_dec.c:ia_mps_dec_huff_dec_cpc_2d:
  985|    213|    ia_bit_buf_struct *h_bit_buf) {
  986|    213|  WORD32 i = 0, lav = 0, escape = 0, esc_cntr = 0;
  987|    213|  WORD32 node = 0;
  988|    213|  WORD32 data = 0;
  989|       |
  990|    213|  WORD32 esc_data[2][MAXBANDS] = {{0}};
  991|    213|  WORD32 esc_idx[MAXBANDS] = {0};
  992|       |
  993|    213|  ixheaacd_mps_huff_read(
  994|    213|      h_bit_buf, (ia_huff_node_struct) & (ixheaacd_huff_lav_idx_nodes.node_tab),
  995|    213|      &node);
  996|    213|  data = -(node + 1);
  997|       |
  998|    213|  lav = 3 * data + 3;
  999|       |
 1000|    213|  if (p0_data[0] != NULL) {
  ------------------
  |  Branch (1000:7): [True: 98, False: 115]
  ------------------
 1001|     98|    ixheaacd_mps_huff_read(
 1002|     98|        h_bit_buf, (ia_huff_node_struct) & (ixheaacd_huff_part0_nodes.cpc),
 1003|     98|        &node);
 1004|     98|    *p0_data[0] = -(node + 1);
 1005|     98|  }
 1006|    213|  if (p0_data[1] != NULL) {
  ------------------
  |  Branch (1006:7): [True: 80, False: 133]
  ------------------
 1007|     80|    ixheaacd_mps_huff_read(
 1008|     80|        h_bit_buf, (ia_huff_node_struct) & (ixheaacd_huff_part0_nodes.cpc),
 1009|     80|        &node);
 1010|     80|    *p0_data[1] = -(node + 1);
 1011|     80|  }
 1012|       |
 1013|  1.18k|  for (i = 0; i < num_val; i += stride) {
  ------------------
  |  Branch (1013:15): [True: 974, False: 208]
  ------------------
 1014|    974|    switch (lav) {
 1015|    426|      case LAV_3:
  ------------------
  |  Branch (1015:7): [True: 426, False: 548]
  ------------------
 1016|    426|        ixheaacd_mps_huff_read_2d(h_bit_buf,
 1017|    426|                                  (ia_huff_node_struct)&huff_nodes->lav3,
 1018|    426|                                  out_data[i], &escape);
 1019|    426|        break;
 1020|    203|      case LAV_6:
  ------------------
  |  Branch (1020:7): [True: 203, False: 771]
  ------------------
 1021|    203|        ixheaacd_mps_huff_read_2d(h_bit_buf,
 1022|    203|                                  (ia_huff_node_struct)&huff_nodes->lav6,
 1023|    203|                                  out_data[i], &escape);
 1024|    203|        break;
 1025|     91|      case LAV_9:
  ------------------
  |  Branch (1025:7): [True: 91, False: 883]
  ------------------
 1026|     91|        ixheaacd_mps_huff_read_2d(h_bit_buf,
 1027|     91|                                  (ia_huff_node_struct)&huff_nodes->lav9,
 1028|     91|                                  out_data[i], &escape);
 1029|     91|        break;
 1030|    254|      case LAV_12:
  ------------------
  |  Branch (1030:7): [True: 254, False: 720]
  ------------------
 1031|    254|        ixheaacd_mps_huff_read_2d(h_bit_buf,
 1032|    254|                                  (ia_huff_node_struct)&huff_nodes->lav12,
 1033|    254|                                  out_data[i], &escape);
 1034|    254|        break;
 1035|      0|      default:
  ------------------
  |  Branch (1035:7): [True: 0, False: 974]
  ------------------
 1036|      0|        break;
 1037|    974|    }
 1038|       |
 1039|    969|    if (escape) {
  ------------------
  |  Branch (1039:9): [True: 0, False: 969]
  ------------------
 1040|      0|      esc_idx[esc_cntr++] = i;
 1041|    969|    } else {
 1042|    969|      ixheaacd_mps_sym_restore(h_bit_buf, lav, out_data[i]);
 1043|    969|    }
 1044|    969|  }
 1045|       |
 1046|    208|  if (esc_cntr > 0) {
  ------------------
  |  Branch (1046:7): [True: 0, False: 208]
  ------------------
 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|    208|  return;
 1056|    213|}
ixheaacd_mps_dec.c:ixheaacd_diff_freq_decode:
 1424|  32.8k|                                      WORD32 num_val) {
 1425|  32.8k|  WORD32 i = 0;
 1426|       |
 1427|  32.8k|  out_data[0] = diff_data[0];
 1428|       |
 1429|   231k|  for (i = 1; i < num_val; i++) {
  ------------------
  |  Branch (1429:15): [True: 198k, False: 32.8k]
  ------------------
 1430|   198k|    out_data[i] = out_data[i - 1] + diff_data[i];
 1431|   198k|  }
 1432|  32.8k|}
ixheaacd_mps_dec.c:ixheaacd_mps_diff_time_dec_bwd:
 1437|  8.56k|                                           WORD32 num_val) {
 1438|  8.56k|  WORD32 i = 0;
 1439|       |
 1440|  8.56k|  if (mixed_diff_type) {
  ------------------
  |  Branch (1440:7): [True: 3.17k, False: 5.38k]
  ------------------
 1441|  3.17k|    out_data[0] = diff_data[0];
 1442|  16.5k|    for (i = 1; i < num_val; i++) {
  ------------------
  |  Branch (1442:17): [True: 13.3k, False: 3.17k]
  ------------------
 1443|  13.3k|      out_data[i] = prev_data[i] + diff_data[i];
 1444|  13.3k|    }
 1445|  5.38k|  } else {
 1446|  41.4k|    for (i = 0; i < num_val; i++) {
  ------------------
  |  Branch (1446:17): [True: 36.0k, False: 5.38k]
  ------------------
 1447|  36.0k|      out_data[i] = prev_data[i] + diff_data[i];
 1448|  36.0k|    }
 1449|  5.38k|  }
 1450|  8.56k|}
ixheaacd_mps_dec.c:ixheaacd_mps_diff_time_dec_fwd:
 1455|    701|                                           WORD32 num_val) {
 1456|    701|  WORD32 i = 0;
 1457|       |
 1458|    701|  if (mixed_diff_type) {
  ------------------
  |  Branch (1458:7): [True: 338, False: 363]
  ------------------
 1459|    338|    out_data[0] = diff_data[0];
 1460|  2.07k|    for (i = 1; i < num_val; i++) {
  ------------------
  |  Branch (1460:17): [True: 1.74k, False: 338]
  ------------------
 1461|  1.74k|      out_data[i] = prev_data[i] - diff_data[i];
 1462|  1.74k|    }
 1463|    363|  } else {
 1464|  2.53k|    for (i = 0; i < num_val; i++) {
  ------------------
  |  Branch (1464:17): [True: 2.16k, False: 363]
  ------------------
 1465|  2.16k|      out_data[i] = prev_data[i] - diff_data[i];
 1466|  2.16k|    }
 1467|    363|  }
 1468|    701|}
ixheaacd_mps_dec.c:ixheaacd_attach_lsb:
 1473|  39.6k|                                WORD32* out_data) {
 1474|  39.6k|  WORD32 i = 0, lsb = 0, msb = 0;
 1475|  39.6k|  UWORD32 data = 0;
 1476|       |
 1477|   340k|  for (i = 0; i < num_val; i++) {
  ------------------
  |  Branch (1477:15): [True: 300k, False: 39.6k]
  ------------------
 1478|   300k|    msb = in_data_msb[i];
 1479|       |
 1480|   300k|    if (num_lsb > 0) {
  ------------------
  |  Branch (1480:9): [True: 12.0k, False: 288k]
  ------------------
 1481|  12.0k|      data = ixheaacd_read_bits_buf(it_bit_buff, num_lsb);
 1482|  12.0k|      lsb = data;
 1483|       |
 1484|  12.0k|      out_data[i] = ((msb << num_lsb) | lsb) - ixheaacd_drc_offset;
 1485|  12.0k|    } else
 1486|   288k|      out_data[i] = msb - ixheaacd_drc_offset;
 1487|   300k|  }
 1488|       |
 1489|  39.6k|  return;
 1490|  39.6k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_read_2d:
  532|   113k|{
  533|   113k|  WORD32 huff_2d_8bit = 0;
  534|   113k|  WORD32 node = 0;
  535|       |
  536|   113k|  ixheaacd_mps_huff_read(it_bit_buff, node_tab, &node);
  537|   113k|  *escape = (node == 0);
  538|       |
  539|   113k|  if (*escape) {
  ------------------
  |  Branch (539:7): [True: 218, False: 112k]
  ------------------
  540|    218|    out_data[0] = 0;
  541|    218|    out_data[1] = 1;
  542|   112k|  } else {
  543|   112k|    huff_2d_8bit = -(node + 1);
  544|   112k|    out_data[0] = huff_2d_8bit >> 4;
  545|   112k|    out_data[1] = huff_2d_8bit & 0xf;
  546|   112k|  }
  547|       |
  548|   113k|  return;
  549|   113k|}
ixheaacd_mps_dec.c:ixheaacd_apply_frame:
 1796|  13.9k|                                         WORD16 *out_buf) {
 1797|  13.9k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  13.9k|#define IA_NO_ERROR 0x00000000
  ------------------
 1798|  13.9k|  WORD32 ch, ts, qs;
 1799|  13.9k|  WORD32 *pbuf_real, *pbuf_imag, *pbuf_re, *pbuf_im;
 1800|  13.9k|  WORD32 *buf_real, *buf_imag;
 1801|  13.9k|  WORD32 *qmf_input_delay_real_2 =
 1802|  13.9k|      pstr_mps_state->mps_persistent_mem.qmf_input_delay_real;
 1803|  13.9k|  WORD32 *qmf_input_delay_imag_2 =
 1804|  13.9k|      pstr_mps_state->mps_persistent_mem.qmf_input_delay_imag;
 1805|  13.9k|  WORD32 num_input_channels = pstr_mps_state->num_input_channels;
 1806|  13.9k|  WORD32 qmf_bands = pstr_mps_state->qmf_bands;
 1807|  13.9k|  WORD32 cur_time_slot = pstr_mps_state->cur_time_slot;
 1808|  13.9k|  WORD32 time_slots = pstr_mps_state->time_slots;
 1809|  13.9k|  WORD32 qmf_input_delay_index = pstr_mps_state->qmf_input_delay_index;
 1810|  13.9k|  WORD32 up_mix_type = pstr_mps_state->up_mix_type;
 1811|  13.9k|  WORD32 residual_coding = pstr_mps_state->residual_coding;
 1812|  13.9k|  WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix;
 1813|       |
 1814|  13.9k|  WORD32 *qmf_input_delay_real_1, *qmf_input_delay_imag_1;
 1815|  13.9k|  WORD32 *qmf_input_delay_real, *qmf_input_delay_imag;
 1816|       |
 1817|  13.9k|  WORD32 *p_qmf_real = m_qmf_real;
 1818|  13.9k|  WORD32 *p_qmf_imag = m_qmf_imag;
 1819|  13.9k|  WORD32 *p_qmf_re, *p_qmf_im, *qmf_real, *qmf_imag;
 1820|       |
 1821|  13.9k|  if (cur_time_slot + in_time_slots > time_slots) {
  ------------------
  |  Branch (1821:7): [True: 0, False: 13.9k]
  ------------------
 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.9k|  if (time_slots % HOP_SLOTS != 0) {
  ------------------
  |  |   23|  13.9k|#define HOP_SLOTS (4)
  ------------------
  |  Branch (1827:7): [True: 7, False: 13.9k]
  ------------------
 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.9k|  pbuf_real = pstr_mps_state->array_struct->buf_real;
 1835|  13.9k|  pbuf_imag = pstr_mps_state->array_struct->buf_imag;
 1836|       |
 1837|  13.9k|  if (up_mix_type == 1) {
  ------------------
  |  Branch (1837:7): [True: 0, False: 13.9k]
  ------------------
 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.9k|  } else {
 1869|  84.6k|    for (ch = 0; ch < num_input_channels; ch++) {
  ------------------
  |  Branch (1869:18): [True: 70.6k, False: 13.9k]
  ------------------
 1870|  70.6k|      WORD32 offset = ch * PCXQB;
  ------------------
  |  |  194|  70.6k|#define PCXQB (320)
  ------------------
 1871|  70.6k|      qmf_input_delay_index = pstr_mps_state->qmf_input_delay_index;
 1872|  70.6k|      qmf_input_delay_real_1 = qmf_input_delay_real_2 + offset;
 1873|  70.6k|      qmf_input_delay_imag_1 = qmf_input_delay_imag_2 + offset;
 1874|       |
 1875|  70.6k|      pbuf_re = pbuf_real + cur_time_slot * MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  70.6k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  70.6k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1876|  70.6k|      pbuf_im = pbuf_imag + cur_time_slot * MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  70.6k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  70.6k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1877|       |
 1878|  70.6k|      p_qmf_re = p_qmf_real;
 1879|  70.6k|      p_qmf_im = p_qmf_imag;
 1880|       |
 1881|  2.05M|      for (ts = 0; ts < in_time_slots; ts++) {
  ------------------
  |  Branch (1881:20): [True: 1.98M, False: 70.6k]
  ------------------
 1882|  1.98M|        WORD32 off_set = qmf_input_delay_index * MAX_NUM_QMF_BANDS;
  ------------------
  |  |   62|  1.98M|#define MAX_NUM_QMF_BANDS (64)
  ------------------
 1883|  1.98M|        qmf_input_delay_real = qmf_input_delay_real_1 + off_set;
 1884|  1.98M|        qmf_input_delay_imag = qmf_input_delay_imag_1 + off_set;
 1885|       |
 1886|  1.98M|        buf_real = pbuf_re;
 1887|  1.98M|        buf_imag = pbuf_im;
 1888|       |
 1889|  1.98M|        qmf_real = p_qmf_re;
 1890|  1.98M|        qmf_imag = p_qmf_im;
 1891|       |
 1892|   109M|        for (qs = 0; qs < qmf_bands; qs++) {
  ------------------
  |  Branch (1892:22): [True: 107M, False: 1.98M]
  ------------------
 1893|   107M|          {
 1894|   107M|            *buf_real++ = *qmf_input_delay_real;
 1895|   107M|            *buf_imag++ = *qmf_input_delay_imag;
 1896|       |
 1897|   107M|            *qmf_input_delay_real++ = *qmf_real++;
 1898|   107M|            *qmf_input_delay_imag++ = *qmf_imag++;
 1899|   107M|          }
 1900|   107M|        }
 1901|       |
 1902|  1.98M|        qmf_input_delay_index++;
 1903|       |
 1904|  1.98M|        if (qmf_input_delay_index == PC_FILTERDELAY) {
  ------------------
  |  |   58|  1.98M|#define PC_FILTERDELAY ((PC_FILTERLENGTH - 1) / 2)
  |  |  ------------------
  |  |  |  |   57|  1.98M|#define PC_FILTERLENGTH (11)
  |  |  ------------------
  ------------------
  |  Branch (1904:13): [True: 392k, False: 1.58M]
  ------------------
 1905|   392k|          qmf_input_delay_index = 0;
 1906|   392k|        }
 1907|  1.98M|        pbuf_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.98M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.98M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1908|  1.98M|        pbuf_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.98M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.98M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1909|       |
 1910|  1.98M|        p_qmf_re += MAX_NUM_QMF_BANDS;
  ------------------
  |  |   62|  1.98M|#define MAX_NUM_QMF_BANDS (64)
  ------------------
 1911|  1.98M|        p_qmf_im += MAX_NUM_QMF_BANDS;
  ------------------
  |  |   62|  1.98M|#define MAX_NUM_QMF_BANDS (64)
  ------------------
 1912|  1.98M|      }
 1913|  70.6k|      pbuf_real += TSXHB;
  ------------------
  |  |  106|  70.6k|#define TSXHB (5112)
  ------------------
 1914|  70.6k|      pbuf_imag += TSXHB;
  ------------------
  |  |  106|  70.6k|#define TSXHB (5112)
  ------------------
 1915|       |
 1916|  70.6k|      p_qmf_real += QBXTS;
  ------------------
  |  |   98|  70.6k|#define QBXTS (4608)
  ------------------
 1917|  70.6k|      p_qmf_imag += QBXTS;
  ------------------
  |  |   98|  70.6k|#define QBXTS (4608)
  ------------------
 1918|  70.6k|    }
 1919|  13.9k|    pstr_mps_state->qmf_input_delay_index = qmf_input_delay_index;
 1920|  13.9k|  }
 1921|       |
 1922|  13.9k|  pstr_mps_state->cur_time_slot += in_time_slots;
 1923|  13.9k|  cur_time_slot = pstr_mps_state->cur_time_slot;
 1924|       |
 1925|  13.9k|  if (pstr_mps_state->cur_time_slot < time_slots) {
  ------------------
  |  Branch (1925:7): [True: 0, False: 13.9k]
  ------------------
 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.9k|  pstr_mps_state->cur_time_slot = 0;
 1933|       |
 1934|  13.9k|  err_code = ixheaacd_decode_frame(pstr_mps_state);
 1935|  13.9k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  13.9k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1935:7): [True: 183, False: 13.7k]
  ------------------
 1936|       |
 1937|  13.7k|  ixheaacd_mdct_2_qmf(pstr_mps_state);
 1938|       |
 1939|  13.7k|  ixheaacd_hybrid_qmf_analysis(pstr_mps_state);
 1940|       |
 1941|  13.7k|  if (residual_coding || (arbitrary_downmix == 2)) {
  ------------------
  |  Branch (1941:7): [True: 362, False: 13.4k]
  |  Branch (1941:26): [True: 133, False: 13.3k]
  ------------------
 1942|    495|    ixheaacd_update_buffers(pstr_mps_state);
 1943|    495|  }
 1944|       |
 1945|  13.7k|  if (up_mix_type == 1) {
  ------------------
  |  Branch (1945:7): [True: 0, False: 13.7k]
  ------------------
 1946|      0|    ixheaacd_apply_blind(pstr_mps_state);
 1947|      0|  }
 1948|       |
 1949|  13.7k|  ixheaacd_calc_m1m2(pstr_mps_state);
 1950|       |
 1951|  13.7k|  ixheaacd_smooth_m1m2(pstr_mps_state);
 1952|       |
 1953|  13.7k|  ixheaacd_mps_apply_m1(pstr_mps_state);
 1954|       |
 1955|  13.7k|  ixheaacd_buffer_m1(pstr_mps_state);
 1956|       |
 1957|  13.7k|  if (up_mix_type != 2) {
  ------------------
  |  Branch (1957:7): [True: 13.7k, False: 0]
  ------------------
 1958|  13.7k|    if (pstr_mps_state->temp_shape_config == 2) {
  ------------------
  |  Branch (1958:9): [True: 7.00k, False: 6.79k]
  ------------------
 1959|  7.00k|      ixheaacd_pre_reshape_bb_env(pstr_mps_state);
 1960|  7.00k|    }
 1961|  13.7k|  }
 1962|       |
 1963|  13.7k|  ixheaacd_create_w(pstr_mps_state);
 1964|       |
 1965|  13.7k|  ixheaacd_apply_m2(pstr_mps_state);
 1966|       |
 1967|  13.7k|  ixheaacd_buffer_m2(pstr_mps_state);
 1968|       |
 1969|  13.7k|  if (up_mix_type != 2) {
  ------------------
  |  Branch (1969:7): [True: 13.7k, False: 0]
  ------------------
 1970|  13.7k|    if (pstr_mps_state->temp_shape_config == 2) {
  ------------------
  |  Branch (1970:9): [True: 7.00k, False: 6.79k]
  ------------------
 1971|  7.00k|      ixheaacd_reshape_bb_env(pstr_mps_state);
 1972|  7.00k|    }
 1973|  13.7k|  }
 1974|       |
 1975|  13.7k|  ixheaacd_tp_process(pstr_mps_state);
 1976|       |
 1977|  13.7k|  ixheaacd_update_time_out_buffer(pstr_mps_state);
 1978|       |
 1979|  13.7k|  ixheaacd_update_out_buffer(pstr_mps_state, out_buf);
 1980|       |
 1981|  13.7k|  pstr_mps_state->parse_next_bitstream_frame = 1;
 1982|       |
 1983|  13.7k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  13.7k|#define IA_NO_ERROR 0x00000000
  ------------------
 1984|  13.9k|}

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

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

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

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

ixheaacd_buffer_m1:
   45|  13.7k|VOID ixheaacd_buffer_m1(ia_heaac_mps_state_struct *pstr_mps_state) {
   46|  13.7k|  ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
   47|  13.7k|  WORD32 pb, row, col;
   48|       |
   49|  13.7k|  ia_mps_persistent_mem *persistent_mem = &pstr_mps_state->mps_persistent_mem;
   50|  13.7k|  WORD32 *m1_param_real_prev = persistent_mem->m1_param_real_prev;
   51|  13.7k|  WORD32 *m1_param_imag_prev = persistent_mem->m1_param_imag_prev;
   52|       |
   53|  13.7k|  WORD32 *m1_param_real, *m1_param_imag;
   54|       |
   55|  13.7k|  WORD32 *p_m1_param_real, *p_m1_param_re;
   56|       |
   57|  13.7k|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
   58|  13.7k|  WORD32 num_v_channels = pstr_mps_state->num_v_channels;
   59|  13.7k|  WORD32 num_x_channels = pstr_mps_state->num_x_channels;
   60|  13.7k|  WORD32 m1_param_imag_present = pstr_mps_state->m1_param_imag_present;
   61|       |
   62|  13.7k|  WORD32 num_parameter_sets_prev;
   63|       |
   64|  13.7k|  pstr_mps_state->num_parameter_sets_prev = pstr_mps_state->num_parameter_sets;
   65|  13.7k|  num_parameter_sets_prev = pstr_mps_state->num_parameter_sets_prev;
   66|       |
   67|  13.7k|  if (m1_param_imag_present) {
  ------------------
  |  Branch (67:7): [True: 10.4k, False: 3.34k]
  ------------------
   68|  10.4k|    WORD32 *p_m1_param_imag = &m1_param->m1_param_imag[0][0][0][0];
   69|  10.4k|    p_m1_param_real = &m1_param->m1_param_real[0][0][0][0];
   70|  92.9k|    for (row = 0; row < num_v_channels; row++) {
  ------------------
  |  Branch (70:19): [True: 82.4k, False: 10.4k]
  ------------------
   71|  82.4k|      WORD32 *p_m1_param_im = p_m1_param_imag;
   72|  82.4k|      p_m1_param_re = p_m1_param_real;
   73|       |
   74|   556k|      for (col = 0; col < num_x_channels; col++) {
  ------------------
  |  Branch (74:21): [True: 473k, False: 82.4k]
  ------------------
   75|   473k|        m1_param_real = p_m1_param_re + (num_parameter_sets_prev - 1) * MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   473k|#define MAX_PARAMETER_BANDS (28)
  ------------------
   76|   473k|        m1_param_imag = p_m1_param_im + (num_parameter_sets_prev - 1) * MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   473k|#define MAX_PARAMETER_BANDS (28)
  ------------------
   77|       |
   78|  9.78M|        for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (78:22): [True: 9.30M, False: 473k]
  ------------------
   79|  9.30M|          *m1_param_real_prev++ = *m1_param_real++;
   80|  9.30M|          *m1_param_imag_prev++ = *m1_param_imag++;
   81|  9.30M|        }
   82|   473k|        p_m1_param_re += PBXPS;
  ------------------
  |  |  168|   473k|#define PBXPS (224)
  ------------------
   83|   473k|        p_m1_param_im += PBXPS;
  ------------------
  |  |  168|   473k|#define PBXPS (224)
  ------------------
   84|   473k|      }
   85|  82.4k|      p_m1_param_real += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |   66|  82.4k|#define MAX_INPUT_CHANNELS_MPS (6)
  ------------------
                    p_m1_param_real += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |  168|  82.4k|#define PBXPS (224)
  ------------------
   86|  82.4k|      p_m1_param_imag += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |   66|  82.4k|#define MAX_INPUT_CHANNELS_MPS (6)
  ------------------
                    p_m1_param_imag += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |  168|  82.4k|#define PBXPS (224)
  ------------------
   87|  82.4k|    }
   88|  10.4k|  } else {
   89|  3.34k|    p_m1_param_real = &m1_param->m1_param_real[0][0][0][0];
   90|  24.0k|    for (row = 0; row < num_v_channels; row++) {
  ------------------
  |  Branch (90:19): [True: 20.7k, False: 3.34k]
  ------------------
   91|  20.7k|      p_m1_param_re = p_m1_param_real;
   92|  98.5k|      for (col = 0; col < num_x_channels; col++) {
  ------------------
  |  Branch (92:21): [True: 77.8k, False: 20.7k]
  ------------------
   93|  77.8k|        m1_param_real = p_m1_param_re + (num_parameter_sets_prev - 1) * MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  77.8k|#define MAX_PARAMETER_BANDS (28)
  ------------------
   94|  1.44M|        for (pb = 0; pb < num_parameter_bands; pb++) *m1_param_real_prev++ = *m1_param_real++;
  ------------------
  |  Branch (94:22): [True: 1.36M, False: 77.8k]
  ------------------
   95|       |
   96|  77.8k|        p_m1_param_re += PBXPS;
  ------------------
  |  |  168|  77.8k|#define PBXPS (224)
  ------------------
   97|  77.8k|      }
   98|  20.7k|      p_m1_param_real += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |   66|  20.7k|#define MAX_INPUT_CHANNELS_MPS (6)
  ------------------
                    p_m1_param_real += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |  168|  20.7k|#define PBXPS (224)
  ------------------
   99|  20.7k|    }
  100|  3.34k|  }
  101|  13.7k|}
ixheaacd_buffer_m2:
  103|  13.7k|VOID ixheaacd_buffer_m2(ia_heaac_mps_state_struct *pstr_mps_state) {
  104|  13.7k|  WORD32 num_direct_signals = pstr_mps_state->num_direct_signals;
  105|  13.7k|  WORD32 pb, row, col, col_counter = num_direct_signals + pstr_mps_state->num_decor_signals;
  106|       |
  107|  13.7k|  ia_mps_persistent_mem *persistent_mem = &pstr_mps_state->mps_persistent_mem;
  108|  13.7k|  ia_mps_dec_m2_param_struct *m2_param = pstr_mps_state->aux_struct->m2_param;
  109|       |
  110|  13.7k|  WORD32 *m2_decor_real_prev = persistent_mem->m2_decor_real_prev;
  111|  13.7k|  WORD32 *m2_decor_imag_prev = persistent_mem->m2_decor_imag_prev;
  112|       |
  113|  13.7k|  WORD32 *m2_resid_real_prev = persistent_mem->m2_resid_real_prev;
  114|  13.7k|  WORD32 *m2_resid_imag_prev = persistent_mem->m2_resid_imag_prev;
  115|       |
  116|  13.7k|  WORD32 *m2_decor_real, *m2_decor_imag, *m2_resid_real, *m2_resid_imag;
  117|  13.7k|  WORD32 idx = -1;
  118|       |
  119|  13.7k|  WORD32 resid_col_counter;
  120|       |
  121|  13.7k|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
  122|  13.7k|  WORD32 num_output_channels = pstr_mps_state->num_output_channels;
  123|  13.7k|  WORD32 num_parameter_sets_prev = pstr_mps_state->num_parameter_sets_prev;
  124|       |
  125|  13.7k|  if (pstr_mps_state->residual_coding)
  ------------------
  |  Branch (125:7): [True: 362, False: 13.4k]
  ------------------
  126|    362|    resid_col_counter = col_counter;
  127|  13.4k|  else
  128|  13.4k|    resid_col_counter = num_direct_signals;
  129|       |
  130|  13.7k|  if (pstr_mps_state->m2_param_imag_present) {
  ------------------
  |  Branch (130:7): [True: 0, False: 13.7k]
  ------------------
  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.7k|  } else {
  160|   121k|    for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (160:19): [True: 107k, False: 13.7k]
  ------------------
  161|   346k|      for (col = num_direct_signals; col < col_counter; col++) {
  ------------------
  |  Branch (161:38): [True: 238k, False: 107k]
  ------------------
  162|   238k|        if (pstr_mps_state->m2_param_present[row][col] & 1) {
  ------------------
  |  Branch (162:13): [True: 66.4k, False: 172k]
  ------------------
  163|  66.4k|          idx++;
  164|  66.4k|          m2_decor_real = &m2_param->m2_decor_real[idx][num_parameter_sets_prev - 1][0];
  165|       |
  166|  1.20M|          for (pb = 0; pb < num_parameter_bands; pb++) *m2_decor_real_prev++ = *m2_decor_real++;
  ------------------
  |  Branch (166:24): [True: 1.13M, False: 66.4k]
  ------------------
  167|  66.4k|        }
  168|   238k|      }
  169|   107k|    }
  170|       |
  171|  13.7k|    idx = -1;
  172|   121k|    for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (172:19): [True: 107k, False: 13.7k]
  ------------------
  173|   687k|      for (col = 0; col < resid_col_counter; col++) {
  ------------------
  |  Branch (173:21): [True: 579k, False: 107k]
  ------------------
  174|   579k|        if (pstr_mps_state->m2_param_present[row][col] & 2) {
  ------------------
  |  Branch (174:13): [True: 109k, False: 470k]
  ------------------
  175|   109k|          idx++;
  176|   109k|          m2_resid_real = &m2_param->m2_resid_real[idx][num_parameter_sets_prev - 1][0];
  177|       |
  178|  2.11M|          for (pb = 0; pb < num_parameter_bands; pb++) *m2_resid_real_prev++ = *m2_resid_real++;
  ------------------
  |  Branch (178:24): [True: 2.00M, False: 109k]
  ------------------
  179|   109k|        }
  180|   579k|      }
  181|   107k|    }
  182|  13.7k|  }
  183|  13.7k|}
ixheaacd_calc_m1m2:
  218|  13.7k|VOID ixheaacd_calc_m1m2(ia_heaac_mps_state_struct *pstr_mps_state) {
  219|  13.7k|  WORD32 up_mix_type = pstr_mps_state->up_mix_type;
  220|  13.7k|  WORD32 binaural_quality = pstr_mps_state->binaural_quality;
  221|       |
  222|  13.7k|  if (pstr_mps_state->arbitrary_downmix != 0) {
  ------------------
  |  Branch (222:7): [True: 980, False: 12.8k]
  ------------------
  223|    980|    ixheaacd_update_alpha(pstr_mps_state);
  224|    980|  }
  225|       |
  226|  13.7k|  switch (pstr_mps_state->tree_config) {
  227|    277|    case TREE_5151: {
  ------------------
  |  Branch (227:5): [True: 277, False: 13.5k]
  ------------------
  228|    277|      if (up_mix_type == 3) {
  ------------------
  |  Branch (228:11): [True: 0, False: 277]
  ------------------
  229|      0|        ixheaacd_calc_m1m2_51s1(pstr_mps_state);
  230|    277|      } else {
  231|    277|        ixheaacd_calc_m1m2_5151(pstr_mps_state);
  232|    277|      }
  233|    277|    } break;
  234|    371|    case TREE_5152: {
  ------------------
  |  Branch (234:5): [True: 371, False: 13.4k]
  ------------------
  235|    371|      if (up_mix_type == 3) {
  ------------------
  |  Branch (235:11): [True: 0, False: 371]
  ------------------
  236|      0|        ixheaacd_calc_m1m2_51s2(pstr_mps_state);
  237|    371|      } else {
  238|    371|        ixheaacd_calc_m1m2_5152(pstr_mps_state);
  239|    371|      }
  240|    371|    } break;
  241|    903|    case TREE_525:
  ------------------
  |  Branch (241:5): [True: 903, False: 12.8k]
  ------------------
  242|    903|      if (up_mix_type == 1) {
  ------------------
  |  Branch (242:11): [True: 0, False: 903]
  ------------------
  243|      0|        ixheaacd_calc_m1m2_emm(pstr_mps_state);
  244|    903|      } else if (up_mix_type == 2) {
  ------------------
  |  Branch (244:18): [True: 0, False: 903]
  ------------------
  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|    903|      } else {
  249|    903|        ixheaacd_calc_m1m2_5251(pstr_mps_state);
  250|    903|      }
  251|    903|      break;
  252|  1.12k|    case TREE_7271:
  ------------------
  |  Branch (252:5): [True: 1.12k, False: 12.6k]
  ------------------
  253|  1.12k|      if (up_mix_type == 0) {
  ------------------
  |  Branch (253:11): [True: 1.12k, False: 0]
  ------------------
  254|  1.12k|        ixheaacd_calc_m1m2_7271(pstr_mps_state);
  255|  1.12k|      } 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.12k|      break;
  261|    320|    case TREE_7272:
  ------------------
  |  Branch (261:5): [True: 320, False: 13.4k]
  ------------------
  262|    320|      if (up_mix_type == 0) {
  ------------------
  |  Branch (262:11): [True: 320, False: 0]
  ------------------
  263|    320|        ixheaacd_calc_m1m2_7272(pstr_mps_state);
  264|    320|      } 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|    320|      break;
  270|    486|    case TREE_7571:
  ------------------
  |  Branch (270:5): [True: 486, False: 13.3k]
  ------------------
  271|    486|      ixheaacd_calc_m1m2_7571(pstr_mps_state);
  272|    486|      break;
  273|  10.3k|    case TREE_7572:
  ------------------
  |  Branch (273:5): [True: 10.3k, False: 3.47k]
  ------------------
  274|  10.3k|      ixheaacd_calc_m1m2_7572(pstr_mps_state);
  275|  10.3k|      break;
  276|      0|    default:
  ------------------
  |  Branch (276:5): [True: 0, False: 13.7k]
  ------------------
  277|      0|      break;
  278|  13.7k|  };
  279|       |
  280|  13.7k|  return;
  281|  13.7k|}
ixheaacd_mps_m1m2_common.c:ixheaacd_update_alpha:
  185|    980|static VOID ixheaacd_update_alpha(ia_heaac_mps_state_struct *pstr_mps_state) {
  186|    980|  WORD32 alpha;
  187|       |
  188|    980|  WORD32 *arbdmx_alpha_prev = pstr_mps_state->mps_persistent_mem.arbdmx_alpha_prev;
  189|    980|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  190|    980|  WORD32 *arbdmx_alpha = p_aux_struct->arbdmx_alpha;
  191|       |
  192|    980|  WORD32 n_ch_in = pstr_mps_state->num_input_channels;
  193|    980|  WORD32 ch;
  194|       |
  195|  2.47k|  for (ch = 0; ch < n_ch_in; ch++) {
  ------------------
  |  Branch (195:16): [True: 1.49k, False: 980]
  ------------------
  196|  1.49k|    *arbdmx_alpha_prev++ = arbdmx_alpha[ch];
  197|       |
  198|  1.49k|    if (pstr_mps_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (198:9): [True: 209, False: 1.29k]
  ------------------
  199|    209|      alpha = arbdmx_alpha[ch];
  200|       |
  201|    209|      if (p_aux_struct->arbdmx_residual_abs[ch]) {
  ------------------
  |  Branch (201:11): [True: 113, False: 96]
  ------------------
  202|    113|        alpha -= POINT_THREE_THREE_Q15;
  ------------------
  |  |   60|    113|#define POINT_THREE_THREE_Q15 (10813)
  ------------------
  203|       |
  204|    113|        if (alpha < 0) alpha = 0;
  ------------------
  |  Branch (204:13): [True: 113, False: 0]
  ------------------
  205|    113|      } else {
  206|     96|        alpha += POINT_THREE_THREE_Q15;
  ------------------
  |  |   60|     96|#define POINT_THREE_THREE_Q15 (10813)
  ------------------
  207|       |
  208|     96|        if (alpha > ONE_IN_Q15) alpha = ONE_IN_Q15;
  ------------------
  |  |   41|     96|#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: 96]
  ------------------
  209|     96|      }
  210|  1.29k|    } else {
  211|  1.29k|      alpha = ONE_IN_Q15;
  ------------------
  |  |   41|  1.29k|#define ONE_IN_Q15 (32768)
  ------------------
  212|  1.29k|    }
  213|       |
  214|  1.49k|    arbdmx_alpha[ch] = alpha;
  215|  1.49k|  }
  216|    980|}

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

ixheaacd_mps_frame_parsing:
  420|  79.6k|                                        ia_bit_buf_struct *bitstream) {
  421|  79.6k|  WORD32 i, bs_frame_type, data_bands, bs_temp_shape_enable, num_of_temp_shape_ch;
  422|  79.6k|  WORD32 ps, pg, ts, pb;
  423|  79.6k|  WORD32 env_shape_data[MAX_TIME_SLOTS];
  424|       |
  425|  79.6k|  WORD32 bits_param_slot = 0;
  426|       |
  427|  79.6k|  ia_mps_bs_frame *frame = &(self->bs_frame);
  428|  79.6k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|  79.6k|#define IA_NO_ERROR 0x00000000
  ------------------
  429|       |
  430|  79.6k|  if (self->parse_nxt_frame == 0) return IA_NO_ERROR;
  ------------------
  |  |   23|      0|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (430:7): [True: 0, False: 79.6k]
  ------------------
  431|       |
  432|  79.6k|  self->num_parameter_sets_prev = self->num_parameter_sets;
  433|       |
  434|  79.6k|  if (self->bs_high_rate_mode) {
  ------------------
  |  Branch (434:7): [True: 20.1k, False: 59.5k]
  ------------------
  435|  20.1k|    bs_frame_type = ixheaacd_read_bits_buf(bitstream, 1);
  436|  20.1k|    self->num_parameter_sets = ixheaacd_read_bits_buf(bitstream, 3) + 1;
  437|  59.5k|  } else {
  438|  59.5k|    bs_frame_type = 0;
  439|  59.5k|    self->num_parameter_sets = 1;
  440|  59.5k|  }
  441|       |
  442|  79.6k|  if (self->time_slots == 32)
  ------------------
  |  Branch (442:7): [True: 65.4k, False: 14.2k]
  ------------------
  443|  65.4k|    bits_param_slot = 5;
  444|  14.2k|  else if (self->time_slots == 64)
  ------------------
  |  Branch (444:12): [True: 14.2k, False: 8]
  ------------------
  445|  14.2k|    bits_param_slot = 6;
  446|       |
  447|  79.6k|  if (bs_frame_type) {
  ------------------
  |  Branch (447:7): [True: 3.00k, False: 76.6k]
  ------------------
  448|  3.00k|    WORD32 prev_param_slot = -1;
  449|  6.06k|    for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (449:17): [True: 3.10k, False: 2.96k]
  ------------------
  450|  3.10k|      self->param_slots[i] = ixheaacd_read_bits_buf(bitstream, bits_param_slot);
  451|       |
  452|  3.10k|      if (prev_param_slot >= self->param_slots[i] || self->param_slots[i] >= self->time_slots) {
  ------------------
  |  Branch (452:11): [True: 43, False: 3.06k]
  |  Branch (452:54): [True: 0, False: 3.06k]
  ------------------
  453|     38|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|     38|#define IA_FATAL_ERROR 0x80000000
  ------------------
  454|     38|      }
  455|  3.06k|      prev_param_slot = self->param_slots[i];
  456|  3.06k|    }
  457|  76.6k|  } else {
  458|   165k|    for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (458:17): [True: 89.1k, False: 76.6k]
  ------------------
  459|  89.1k|      self->param_slots[i] = (((self->time_slots * (i + 1)) + self->num_parameter_sets - 1) /
  460|  89.1k|                              self->num_parameter_sets) -
  461|  89.1k|                             1;
  462|  89.1k|    }
  463|  76.6k|  }
  464|       |
  465|  79.6k|  if (!usac_independency_flag) {
  ------------------
  |  Branch (465:7): [True: 77.7k, False: 1.86k]
  ------------------
  466|  77.7k|    frame->independency_flag = ixheaacd_read_bits_buf(bitstream, 1);
  467|  77.7k|  } else {
  468|  1.86k|    frame->independency_flag = 1;
  469|  1.86k|  }
  470|       |
  471|  79.6k|  err = ixheaacd_mps_ecdata_decoding(self, bitstream, frame->cmp_cld_idx, CLD);
  ------------------
  |  |   23|  79.6k|#define CLD (0)
  ------------------
  472|  79.6k|  if (err) return err;
  ------------------
  |  Branch (472:7): [True: 0, False: 79.6k]
  ------------------
  473|       |
  474|  79.6k|  err = ixheaacd_mps_ecdata_decoding(self, bitstream, frame->cmp_icc_idx, ICC);
  ------------------
  |  |   24|  79.6k|#define ICC (1)
  ------------------
  475|  79.6k|  if (err) return err;
  ------------------
  |  Branch (475:7): [True: 0, False: 79.6k]
  ------------------
  476|       |
  477|  79.6k|  if (self->config->bs_phase_coding) {
  ------------------
  |  Branch (477:7): [True: 62.8k, False: 16.7k]
  ------------------
  478|  62.8k|    self->bs_phase_mode = ixheaacd_read_bits_buf(bitstream, 1);
  479|       |
  480|  62.8k|    if (!self->bs_phase_mode) {
  ------------------
  |  Branch (480:9): [True: 47.5k, False: 15.3k]
  ------------------
  481|   667k|      for (pb = 0; pb < self->num_bands_ipd; pb++) {
  ------------------
  |  Branch (481:20): [True: 620k, False: 47.5k]
  ------------------
  482|   620k|        frame->ipd_idx_data_prev[pb] = 0;
  483|  1.36M|        for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (483:21): [True: 745k, False: 620k]
  ------------------
  484|   745k|          frame->ipd_idx_data[i][pb] = 0;
  485|   745k|          self->bs_frame.ipd_idx[i][pb] = 0;
  486|   745k|        }
  487|   620k|        self->bs_frame.ipd_idx_prev[pb] = 0;
  488|   620k|      }
  489|  47.5k|      self->opd_smoothing_mode = 0;
  490|  47.5k|    } else {
  491|  15.3k|      self->opd_smoothing_mode = ixheaacd_read_bits_buf(bitstream, 1);
  492|  15.3k|      err = ixheaacd_mps_ecdata_decoding(self, bitstream, frame->ipd_idx_data,
  493|  15.3k|                                         IPD);
  ------------------
  |  |   25|  15.3k|#define IPD (2)
  ------------------
  494|  15.3k|      if (err) return err;
  ------------------
  |  Branch (494:11): [True: 2, False: 15.2k]
  ------------------
  495|  15.3k|    }
  496|  62.8k|  }
  497|       |
  498|  16.7k|  else {
  499|  16.7k|    self->bs_phase_mode = 0;
  500|  97.1k|    for (pb = 0; pb < self->num_bands_ipd; pb++) {
  ------------------
  |  Branch (500:18): [True: 80.4k, False: 16.7k]
  ------------------
  501|  80.4k|      frame->ipd_idx_data_prev[pb] = 0;
  502|   183k|      for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (502:19): [True: 103k, False: 80.4k]
  ------------------
  503|   103k|        frame->ipd_idx_data[i][pb] = 0;
  504|   103k|        self->bs_frame.ipd_idx[i][pb] = 0;
  505|   103k|      }
  506|  80.4k|      self->bs_frame.ipd_idx_prev[pb] = 0;
  507|  80.4k|    }
  508|  16.7k|    self->opd_smoothing_mode = 0;
  509|  16.7k|  }
  510|       |
  511|  79.6k|  if (self->bs_high_rate_mode) {
  ------------------
  |  Branch (511:7): [True: 20.0k, False: 59.5k]
  ------------------
  512|  52.5k|    for (ps = 0; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (512:18): [True: 32.4k, False: 20.0k]
  ------------------
  513|  32.4k|      frame->bs_smooth_mode[ps] = ixheaacd_read_bits_buf(bitstream, 2);
  514|  32.4k|      if (frame->bs_smooth_mode[ps] >= 2) {
  ------------------
  |  Branch (514:11): [True: 8.32k, False: 24.1k]
  ------------------
  515|  8.32k|        frame->bs_smooth_time[ps] = ixheaacd_read_bits_buf(bitstream, 2);
  516|  8.32k|      }
  517|  32.4k|      if (frame->bs_smooth_mode[ps] == 3) {
  ------------------
  |  Branch (517:11): [True: 2.14k, False: 30.3k]
  ------------------
  518|  2.14k|        frame->bs_freq_res_stride_smg[ps] =
  519|  2.14k|            ixheaacd_read_bits_buf(bitstream, 2);
  520|  2.14k|        data_bands =
  521|  2.14k|            (self->bs_param_bands - 1) /
  522|  2.14k|                ixheaacd_mps_stride_table[frame->bs_freq_res_stride_smg[ps]] +
  523|  2.14k|            1;
  524|  21.0k|        for (pg = 0; pg < data_bands; pg++) {
  ------------------
  |  Branch (524:22): [True: 18.9k, False: 2.14k]
  ------------------
  525|  18.9k|          frame->bs_smg_data[ps][pg] = ixheaacd_read_bits_buf(bitstream, 1);
  526|  18.9k|        }
  527|  2.14k|      }
  528|  32.4k|    }
  529|  59.5k|  } else {
  530|   119k|    for (ps = 0; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (530:18): [True: 59.5k, False: 59.5k]
  ------------------
  531|  59.5k|      frame->bs_smooth_mode[ps] = 0;
  532|  59.5k|    }
  533|  59.5k|  }
  534|       |
  535|   238k|  for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (535:15): [True: 159k, False: 79.6k]
  ------------------
  536|   159k|    self->temp_shape_enable_ch_stp[i] = 0;
  537|   159k|    self->temp_shape_enable_ch_ges[i] = 0;
  538|   159k|  }
  539|       |
  540|  79.6k|  self->bs_tsd_enable = 0;
  541|  79.6k|  if (self->config->bs_temp_shape_config == 3) {
  ------------------
  |  Branch (541:7): [True: 38.3k, False: 41.2k]
  ------------------
  542|  38.3k|    self->bs_tsd_enable = ixheaacd_read_bits_buf(bitstream, 1);
  543|  41.2k|  } else if (self->config->bs_temp_shape_config != 0) {
  ------------------
  |  Branch (543:14): [True: 24.7k, False: 16.5k]
  ------------------
  544|  24.7k|    bs_temp_shape_enable = ixheaacd_read_bits_buf(bitstream, 1);
  545|  24.7k|    if (bs_temp_shape_enable) {
  ------------------
  |  Branch (545:9): [True: 3.77k, False: 20.9k]
  ------------------
  546|  3.77k|      num_of_temp_shape_ch = 2;
  547|  3.77k|      switch (self->config->bs_temp_shape_config) {
  548|  2.70k|        case 1:
  ------------------
  |  Branch (548:9): [True: 2.70k, False: 1.07k]
  ------------------
  549|  8.11k|          for (i = 0; i < num_of_temp_shape_ch; i++) {
  ------------------
  |  Branch (549:23): [True: 5.41k, False: 2.70k]
  ------------------
  550|  5.41k|            self->temp_shape_enable_ch_stp[i] =
  551|  5.41k|                ixheaacd_read_bits_buf(bitstream, 1);
  552|  5.41k|          }
  553|  2.70k|          break;
  554|  1.07k|        case 2:
  ------------------
  |  Branch (554:9): [True: 1.07k, False: 2.70k]
  ------------------
  555|  3.21k|          for (i = 0; i < num_of_temp_shape_ch; i++) {
  ------------------
  |  Branch (555:23): [True: 2.14k, False: 1.07k]
  ------------------
  556|  2.14k|            self->temp_shape_enable_ch_ges[i] =
  557|  2.14k|                ixheaacd_read_bits_buf(bitstream, 1);
  558|  2.14k|          }
  559|  3.20k|          for (i = 0; i < num_of_temp_shape_ch; i++) {
  ------------------
  |  Branch (559:23): [True: 2.13k, False: 1.07k]
  ------------------
  560|  2.13k|            if (self->temp_shape_enable_ch_ges[i]) {
  ------------------
  |  Branch (560:17): [True: 635, False: 1.49k]
  ------------------
  561|    635|              ixheaacd_mps_huff_decode(bitstream, env_shape_data,
  562|    635|                                       self->time_slots);
  563|  23.4k|              for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (563:28): [True: 22.8k, False: 635]
  ------------------
  564|  22.8k|                self->env_shape_data[i][ts] = (FLOAT32)pow(
  565|  22.8k|                    2, (FLOAT32)env_shape_data[ts] /
  566|  22.8k|                               (self->config->bs_env_quant_mode + 2) -
  567|  22.8k|                           1);
  568|  22.8k|              }
  569|    635|            }
  570|  2.13k|          }
  571|  1.07k|          break;
  572|      0|        default:
  ------------------
  |  Branch (572:9): [True: 0, False: 3.77k]
  ------------------
  573|      0|          return -1;
  574|  3.77k|      }
  575|  3.77k|    }
  576|  24.7k|  }
  577|       |
  578|  79.6k|  if (self->bs_tsd_enable) {
  ------------------
  |  Branch (578:7): [True: 8.93k, False: 70.6k]
  ------------------
  579|  8.93k|    UWORD16 s[4];
  580|  8.93k|    UWORD64 s_64;
  581|  8.93k|    UWORD16 c[5];
  582|  8.93k|    UWORD64 c_64;
  583|  8.93k|    UWORD16 b;
  584|  8.93k|    UWORD16 r[1];
  585|  8.93k|    static const UWORD16 table_64[] = {
  586|  8.93k|        6,  11, 16, 20, 23, 27, 30, 33, 35, 38, 40, 42, 44, 46, 48, 49,
  587|  8.93k|        51, 52, 53, 55, 56, 57, 58, 58, 59, 60, 60, 60, 61, 61, 61, 61};
  588|  8.93k|    static const UWORD16 table_32[] = {5,  9,  13, 16, 18, 20, 22, 24,
  589|  8.93k|                                              25, 26, 27, 28, 29, 29, 30, 30};
  590|  8.93k|    unsigned const short *tab = NULL;
  591|  8.93k|    WORD32 k;
  592|  8.93k|    UWORD16 h;
  593|  8.93k|    WORD32 nbits_tr_slots = 0;
  594|       |
  595|  8.93k|    if (self->time_slots == 32) {
  ------------------
  |  Branch (595:9): [True: 4.66k, False: 4.27k]
  ------------------
  596|  4.66k|      nbits_tr_slots = 4;
  597|  4.66k|      tab = table_32;
  598|  4.66k|    } else if (self->time_slots == 64) {
  ------------------
  |  Branch (598:16): [True: 4.27k, False: 0]
  ------------------
  599|  4.27k|      nbits_tr_slots = 5;
  600|  4.27k|      tab = table_64;
  601|  4.27k|    }
  602|       |
  603|  8.93k|    self->tsd_num_tr_slots = ixheaacd_read_bits_buf(bitstream, nbits_tr_slots);
  604|  8.93k|    self->tsd_num_tr_slots++;
  605|  8.93k|    self->tsd_codeword_len = tab[self->tsd_num_tr_slots - 1];
  606|       |
  607|  8.93k|    if (self->tsd_codeword_len > 48) {
  ------------------
  |  Branch (607:9): [True: 52, False: 8.87k]
  ------------------
  608|     52|      s[3] = ixheaacd_read_bits_buf(bitstream, self->tsd_codeword_len - 48);
  609|     52|      s_64 = s[3];
  610|     52|      s[2] = ixheaacd_read_bits_buf(bitstream, 16);
  611|     52|      s_64 = (s_64 << 16) | s[2];
  612|     52|      s[1] = ixheaacd_read_bits_buf(bitstream, 16);
  613|     52|      s_64 = (s_64 << 16) | s[1];
  614|     52|      s[0] = ixheaacd_read_bits_buf(bitstream, 16);
  615|     52|      s_64 = (s_64 << 16) | s[0];
  616|  8.87k|    } else if (self->tsd_codeword_len > 32) {
  ------------------
  |  Branch (616:16): [True: 1.71k, False: 7.16k]
  ------------------
  617|  1.71k|      s[3] = 0;
  618|  1.71k|      s_64 = s[3];
  619|  1.71k|      s[2] = ixheaacd_read_bits_buf(bitstream, self->tsd_codeword_len - 32);
  620|  1.71k|      s_64 = (s_64 << 16) | s[2];
  621|  1.71k|      s[1] = ixheaacd_read_bits_buf(bitstream, 16);
  622|  1.71k|      s_64 = (s_64 << 16) | s[1];
  623|  1.71k|      s[0] = ixheaacd_read_bits_buf(bitstream, 16);
  624|  1.71k|      s_64 = (s_64 << 16) | s[0];
  625|  7.16k|    } else if (self->tsd_codeword_len > 16) {
  ------------------
  |  Branch (625:16): [True: 3.85k, False: 3.30k]
  ------------------
  626|  3.85k|      s[3] = 0;
  627|  3.85k|      s_64 = s[3];
  628|  3.85k|      s[2] = 0;
  629|  3.85k|      s_64 = (s_64 << 16) | s[2];
  630|  3.85k|      s[1] = ixheaacd_read_bits_buf(bitstream, self->tsd_codeword_len - 16);
  631|  3.85k|      s_64 = (s_64 << 16) | s[1];
  632|  3.85k|      s[0] = ixheaacd_read_bits_buf(bitstream, 16);
  633|  3.85k|      s_64 = (s_64 << 16) | s[0];
  634|  3.85k|    } else {
  635|  3.30k|      s[3] = 0;
  636|  3.30k|      s_64 = s[3];
  637|  3.30k|      s[2] = 0;
  638|  3.30k|      s_64 = (s_64 << 16) | s[2];
  639|  3.30k|      s[1] = 0;
  640|  3.30k|      s_64 = (s_64 << 16) | s[1];
  641|  3.30k|      s[0] = ixheaacd_read_bits_buf(bitstream, self->tsd_codeword_len);
  642|  3.30k|      s_64 = (s_64 << 16) | s[0];
  643|  3.30k|    }
  644|       |
  645|  8.93k|    {
  646|  8.93k|      WORD32 p = self->tsd_num_tr_slots;
  647|       |
  648|   430k|      for (i = 0; i < self->time_slots; i++) self->bs_tsd_sep_data[i] = 0;
  ------------------
  |  Branch (648:19): [True: 421k, False: 8.93k]
  ------------------
  649|       |
  650|   341k|      for (k = self->time_slots - 1; k >= 0; k--) {
  ------------------
  |  Branch (650:38): [True: 341k, False: 8]
  ------------------
  651|   341k|        if (p > k) {
  ------------------
  |  Branch (651:13): [True: 1.09k, False: 340k]
  ------------------
  652|  3.20k|          for (; k >= 0; k--) self->bs_tsd_sep_data[k] = 1;
  ------------------
  |  Branch (652:18): [True: 2.11k, False: 1.09k]
  ------------------
  653|  1.09k|          break;
  654|  1.09k|        }
  655|       |
  656|   340k|        c[0] = k - p + 1;
  657|   340k|        c_64 = c[0];
  658|  1.70M|        for (i = 1; i < 5; i++) c[i] = 0;
  ------------------
  |  Branch (658:21): [True: 1.36M, False: 340k]
  ------------------
  659|       |
  660|  1.35M|        for (h = 2; h <= p; h++) {
  ------------------
  |  Branch (660:21): [True: 1.01M, False: 340k]
  ------------------
  661|  1.01M|          b = k - p + h;
  662|  1.01M|          c_64 = c_64 * (b / h);
  663|  1.01M|          ixheaacd_longmult1(c, b, c, 5);
  664|  1.01M|          b = h;
  665|  1.01M|          ixheaacd_longdiv(c, b, c, r, 5);
  666|  1.01M|        }
  667|       |
  668|   340k|        if (ixheaacd_longcompare(s, c, 4)) {
  ------------------
  |  Branch (668:13): [True: 61.3k, False: 278k]
  ------------------
  669|  61.3k|          ixheaacd_longsub(s, c, 4, 4);
  670|  61.3k|          self->bs_tsd_sep_data[k] = 1;
  671|  61.3k|          p--;
  672|  61.3k|          if (p == 0) break;
  ------------------
  |  Branch (672:15): [True: 7.83k, False: 53.5k]
  ------------------
  673|  61.3k|        }
  674|   340k|      }
  675|  8.93k|    }
  676|       |
  677|   430k|    for (i = 0; i < self->time_slots; i++) {
  ------------------
  |  Branch (677:17): [True: 421k, False: 8.93k]
  ------------------
  678|   421k|      if (self->bs_tsd_sep_data[i])
  ------------------
  |  Branch (678:11): [True: 63.4k, False: 358k]
  ------------------
  679|  63.4k|        self->bs_tsd_tr_phase_data[i] = ixheaacd_read_bits_buf(bitstream, 3);
  680|   421k|    }
  681|  8.93k|  }
  682|       |
  683|  79.6k|  self->parse_nxt_frame = 0;
  684|  79.6k|  return err;
  685|  79.6k|}
ixheaacd_ld_mps_frame_parsing:
  796|  2.13k|    ia_mps_dec_state_struct *self, ia_bit_buf_struct *it_bit_buff) {
  797|  2.13k|  WORD32 i, bs_frame_type, data_bands, bs_temp_shape_enable,
  798|  2.13k|      num_of_temp_shape_ch;
  799|  2.13k|  WORD32 ps, pg, ts, ic;
  800|  2.13k|  WORD32 env_shape_data[MAX_TIME_SLOTS];
  801|  2.13k|  WORD32 alignment;
  802|  2.13k|  WORD32 bits_param_slot = 0;
  803|       |
  804|  2.13k|  ia_mps_bs_frame *frame = &(self->bs_frame);
  805|  2.13k|  alignment = it_bit_buff->cnt_bits;
  806|  2.13k|  if (self->parse_nxt_frame == 0) return IA_NO_ERROR;
  ------------------
  |  |   23|      0|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (806:7): [True: 0, False: 2.13k]
  ------------------
  807|       |
  808|  2.13k|  self->num_parameter_sets_prev = self->num_parameter_sets;
  809|       |
  810|  2.13k|  bs_frame_type = ixheaacd_read_bits_buf(it_bit_buff, 1);
  811|  2.13k|  self->num_parameter_sets = ixheaacd_read_bits_buf(it_bit_buff, 1) + 1;
  812|       |
  813|  2.13k|  if (self->time_slots == 32)
  ------------------
  |  Branch (813:7): [True: 448, False: 1.69k]
  ------------------
  814|    448|    bits_param_slot = 5;
  815|  1.69k|  else if (self->time_slots == 64)
  ------------------
  |  Branch (815:12): [True: 0, False: 1.69k]
  ------------------
  816|      0|    bits_param_slot = 6;
  817|  1.69k|  else if (self->time_slots == 8)
  ------------------
  |  Branch (817:12): [True: 19, False: 1.67k]
  ------------------
  818|     19|    bits_param_slot = 3;
  819|  1.67k|  else if (self->time_slots == 16 || self->time_slots == 15)
  ------------------
  |  Branch (819:12): [True: 42, False: 1.63k]
  |  Branch (819:38): [True: 17, False: 1.61k]
  ------------------
  820|     59|    bits_param_slot = 4;
  821|       |
  822|  2.13k|  if (bs_frame_type) {
  ------------------
  |  Branch (822:7): [True: 417, False: 1.72k]
  ------------------
  823|    417|    WORD32 prev_param_slot = -1;
  824|    860|    for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (824:17): [True: 486, False: 374]
  ------------------
  825|    486|      self->param_slots[i] = ixheaacd_read_bits_buf(it_bit_buff, bits_param_slot);
  826|       |
  827|    486|      if (prev_param_slot >= self->param_slots[i] || self->param_slots[i] >= self->time_slots) {
  ------------------
  |  Branch (827:11): [True: 42, False: 444]
  |  Branch (827:54): [True: 1, False: 443]
  ------------------
  828|     43|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|     43|#define IA_FATAL_ERROR 0x80000000
  ------------------
  829|     43|      }
  830|    443|      prev_param_slot = self->param_slots[i];
  831|    443|    }
  832|  1.72k|  } else {
  833|  4.08k|    for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (833:17): [True: 2.36k, False: 1.72k]
  ------------------
  834|  2.36k|      self->param_slots[i] = (((self->time_slots * (i + 1)) + self->num_parameter_sets - 1) /
  835|  2.36k|                              self->num_parameter_sets) -
  836|  2.36k|                             1;
  837|  2.36k|    }
  838|  1.72k|  }
  839|       |
  840|  2.09k|  frame->independency_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  841|       |
  842|  10.0k|  for (i = 0; i < self->ldmps_config.num_ott_boxes; i++) {
  ------------------
  |  Branch (842:15): [True: 7.94k, False: 2.09k]
  ------------------
  843|  7.94k|    ixheaacd_ld_mps_ecdata_decoding(self, it_bit_buff, frame->cmp_cld_idx, CLD,
  ------------------
  |  |   23|  7.94k|#define CLD (0)
  ------------------
  844|  7.94k|                                    0);
  845|  7.94k|  }
  846|       |
  847|  2.09k|  if (self->ldmps_config.bs_one_icc) {
  ------------------
  |  Branch (847:7): [True: 1.02k, False: 1.07k]
  ------------------
  848|  1.02k|    ixheaacd_ld_mps_ecdata_decoding(self, it_bit_buff, frame->cmp_icc_idx, ICC,
  ------------------
  |  |   24|  1.02k|#define ICC (1)
  ------------------
  849|  1.02k|                                    0);
  850|  1.07k|  } else {
  851|  5.57k|    for (i = 0; i < self->ldmps_config.num_ott_boxes; i++) {
  ------------------
  |  Branch (851:17): [True: 4.49k, False: 1.07k]
  ------------------
  852|  4.49k|      if (!self->ldmps_config.ott_mode_lfe[i])
  ------------------
  |  Branch (852:11): [True: 3.67k, False: 826]
  ------------------
  853|  3.67k|        ixheaacd_ld_mps_ecdata_decoding(self, it_bit_buff, frame->cmp_icc_idx,
  854|  3.67k|                                        ICC, 0);
  ------------------
  |  |   24|  3.67k|#define ICC (1)
  ------------------
  855|  4.49k|    }
  856|  1.07k|  }
  857|       |
  858|  4.82k|  for (ps = 0; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (858:16): [True: 2.72k, False: 2.09k]
  ------------------
  859|  2.72k|    frame->bs_smooth_mode[ps] = ixheaacd_read_bits_buf(it_bit_buff, 2);
  860|  2.72k|    if (frame->bs_smooth_mode[ps] >= 2) {
  ------------------
  |  Branch (860:9): [True: 1.17k, False: 1.55k]
  ------------------
  861|  1.17k|      frame->bs_smooth_time[ps] = ixheaacd_read_bits_buf(it_bit_buff, 2);
  862|  1.17k|    }
  863|  2.72k|    if (frame->bs_smooth_mode[ps] == 3) {
  ------------------
  |  Branch (863:9): [True: 758, False: 1.96k]
  ------------------
  864|    758|      frame->bs_freq_res_stride_smg[ps] =
  865|    758|          ixheaacd_read_bits_buf(it_bit_buff, 2);
  866|    758|      data_bands =
  867|    758|          (ixheaacd_freq_res_table_ld[self->ldmps_config.bs_freq_res] - 1) /
  868|    758|              ixheaacd_mps_stride_table[frame->bs_freq_res_stride_smg[ps]] +
  869|    758|          1;
  870|  3.55k|      for (pg = 0; pg < data_bands; pg++) {
  ------------------
  |  Branch (870:20): [True: 2.79k, False: 758]
  ------------------
  871|  2.79k|        frame->bs_smg_data[ps][pg] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  872|  2.79k|      }
  873|    758|    }
  874|  2.72k|  }
  875|       |
  876|  6.24k|  for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (876:15): [True: 4.15k, False: 2.09k]
  ------------------
  877|  4.15k|    self->temp_shape_enable_ch_stp[i] = 0;
  878|  4.15k|    self->temp_shape_enable_ch_ges[i] = 0;
  879|  4.15k|  }
  880|       |
  881|  2.09k|  if (self->ldmps_config.bs_temp_shape_config != 0) {
  ------------------
  |  Branch (881:7): [True: 1.59k, False: 497]
  ------------------
  882|  1.59k|    bs_temp_shape_enable = ixheaacd_read_bits_buf(it_bit_buff, 1);
  883|  1.59k|    if (bs_temp_shape_enable) {
  ------------------
  |  Branch (883:9): [True: 810, False: 789]
  ------------------
  884|    810|      num_of_temp_shape_ch = 2;
  885|    810|      switch (self->ldmps_config.bs_temp_shape_config) {
  886|    213|        case 1:
  ------------------
  |  Branch (886:9): [True: 213, False: 597]
  ------------------
  887|    639|          for (i = 0; i < num_of_temp_shape_ch; i++) {
  ------------------
  |  Branch (887:23): [True: 426, False: 213]
  ------------------
  888|    426|            self->temp_shape_enable_ch_stp[i] =
  889|    426|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  890|    426|          }
  891|    213|          break;
  892|    586|        case 2:
  ------------------
  |  Branch (892:9): [True: 586, False: 224]
  ------------------
  893|  1.75k|          for (i = 0; i < num_of_temp_shape_ch; i++) {
  ------------------
  |  Branch (893:23): [True: 1.17k, False: 586]
  ------------------
  894|  1.17k|            self->temp_shape_enable_ch_ges[i] =
  895|  1.17k|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  896|  1.17k|          }
  897|  1.75k|          for (i = 0; i < num_of_temp_shape_ch; i++) {
  ------------------
  |  Branch (897:23): [True: 1.17k, False: 586]
  ------------------
  898|  1.17k|            if (self->temp_shape_enable_ch_ges[i]) {
  ------------------
  |  Branch (898:17): [True: 781, False: 391]
  ------------------
  899|    781|              ixheaacd_mps_huff_decode(it_bit_buff, env_shape_data,
  900|    781|                                       self->time_slots);
  901|  3.94k|              for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (901:28): [True: 3.16k, False: 781]
  ------------------
  902|  3.16k|                self->env_shape_data[i][ts] = (FLOAT32)pow(
  903|  3.16k|                    2, (FLOAT32)env_shape_data[ts] /
  904|  3.16k|                               (self->ldmps_config.bs_env_quant_mode + 2) -
  905|  3.16k|                           1);
  906|  3.16k|              }
  907|    781|            }
  908|  1.17k|          }
  909|    586|          break;
  910|     11|        default:
  ------------------
  |  Branch (910:9): [True: 11, False: 799]
  ------------------
  911|     11|          if (self->ec_flag == 0) {
  ------------------
  |  Branch (911:15): [True: 11, False: 0]
  ------------------
  912|     11|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|     11|#define IA_FATAL_ERROR 0x80000000
  ------------------
  913|     11|      }
  914|      0|          break;
  915|    810|      }
  916|    810|    }
  917|  1.59k|  }
  918|       |
  919|  2.08k|  if (self->ldmps_config.bs_arbitrary_downmix != 0) {
  ------------------
  |  Branch (919:7): [True: 1.60k, False: 480]
  ------------------
  920|  5.06k|    for (ic = 0; ic < self->ldmps_config.num_input_channels; ic++) {
  ------------------
  |  Branch (920:18): [True: 3.45k, False: 1.60k]
  ------------------
  921|  3.45k|      ixheaacd_ld_mps_ecdata_decoding(self, it_bit_buff, frame->cmp_cld_idx,
  922|  3.45k|                                      CLD, 0);
  ------------------
  |  |   23|  3.45k|#define CLD (0)
  ------------------
  923|  3.45k|    }
  924|  1.60k|  }
  925|       |
  926|  2.08k|  ixheaacd_byte_align(it_bit_buff, &alignment);
  927|       |
  928|  8.88M|  while (it_bit_buff->cnt_bits > 8) {
  ------------------
  |  Branch (928:10): [True: 8.88M, False: 2.08k]
  ------------------
  929|  8.88M|    ixheaacd_read_bits_buf(it_bit_buff, 8);
  930|  8.88M|  }
  931|  2.08k|  ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
  932|  2.08k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  2.08k|#define IA_NO_ERROR 0x00000000
  ------------------
  933|  2.09k|}
ixheaacd_mps_frame_decode:
 1280|  81.7k|IA_ERRORCODE ixheaacd_mps_frame_decode(ia_mps_dec_state_struct *self) {
 1281|  81.7k|  WORD32 i;
 1282|  81.7k|  IA_ERRORCODE err_code = 0;
 1283|  81.7k|  if (self->ldmps_config.ldmps_present_flag != 1)
  ------------------
  |  Branch (1283:7): [True: 79.5k, False: 2.26k]
  ------------------
 1284|  79.5k|    if (self->parse_nxt_frame == 1) return err_code;
  ------------------
  |  Branch (1284:9): [True: 0, False: 79.5k]
  ------------------
 1285|  81.7k|  self->ext_frame_flag = 0;
 1286|  81.7k|  if (self->param_slots[self->num_parameter_sets - 1] != self->time_slots - 1) {
  ------------------
  |  Branch (1286:7): [True: 3.21k, False: 78.5k]
  ------------------
 1287|  3.21k|    self->ext_frame_flag = 1;
 1288|  3.21k|  }
 1289|       |
 1290|  81.7k|  err_code = ixheaacd_mps_dec_and_mapframeott(self);
 1291|  81.7k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  81.7k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1291:7): [True: 59, False: 81.7k]
  ------------------
 1292|  81.7k|  ixheaacd_mps_dec_and_mapframesmg(self);
 1293|       |
 1294|  81.7k|  if (self->ext_frame_flag) {
  ------------------
  |  Branch (1294:7): [True: 3.21k, False: 78.5k]
  ------------------
 1295|  3.21k|    self->num_parameter_sets++;
 1296|  3.21k|    self->param_slots[self->num_parameter_sets - 1] = self->time_slots - 1;
 1297|  3.21k|  }
 1298|  81.7k|  self->param_slot_diff[0] = self->param_slots[0] + 1;
 1299|  81.7k|  if (MAX_TIME_SLOTS < (self->param_slot_diff[0])) {
  ------------------
  |  |   48|  81.7k|#define MAX_TIME_SLOTS (72)
  ------------------
  |  Branch (1299:7): [True: 0, False: 81.7k]
  ------------------
 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|  81.7k|  self->inv_param_slot_diff[0] = (FLOAT32)1 / self->param_slot_diff[0];
 1307|  81.7k|  self->inv_param_slot_diff_Q30[0] =
 1308|  81.7k|      (WORD32)floor(self->inv_param_slot_diff[0] * 1073741824 + 0.5);
 1309|  98.7k|  for (i = 1; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (1309:15): [True: 17.0k, False: 81.7k]
  ------------------
 1310|  17.0k|    self->param_slot_diff[i] = self->param_slots[i] - self->param_slots[i - 1];
 1311|  17.0k|    if ((MAX_TIME_SLOTS < (self->param_slot_diff[0] + self->param_slot_diff[i])) ||
  ------------------
  |  |   48|  17.0k|#define MAX_TIME_SLOTS (72)
  ------------------
  |  Branch (1311:9): [True: 0, False: 17.0k]
  ------------------
 1312|  17.0k|        (self->param_slot_diff[i] == 0)) {
  ------------------
  |  Branch (1312:9): [True: 5, False: 17.0k]
  ------------------
 1313|      5|      if (self->ec_flag == 0) {
  ------------------
  |  Branch (1313:11): [True: 5, False: 0]
  ------------------
 1314|      5|        return -1;
 1315|      5|      } else {
 1316|      0|        self->param_slot_diff[i] = 1;
 1317|      0|        self->inv_param_slot_diff[i] = 1;
 1318|      0|      }
 1319|      5|    }
 1320|  17.0k|    self->inv_param_slot_diff[i] = (FLOAT32)1 / self->param_slot_diff[i];
 1321|  17.0k|    self->inv_param_slot_diff_Q30[i] =
 1322|  17.0k|        (WORD32)floor(self->inv_param_slot_diff[i] * 1073741824 + 0.5);
 1323|  17.0k|  }
 1324|  81.7k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  81.7k|#define IA_NO_ERROR 0x00000000
  ------------------
 1325|  81.7k|}
ixheaacd_mps_header_decode:
 1327|  2.28k|WORD32 ixheaacd_mps_header_decode(ia_mps_dec_state_struct *self) {
 1328|  2.28k|  WORD32 samp_freq;
 1329|  2.28k|  WORD32 sampling_rate_tbl[] = {96000, 88200, 64000, 48000, 44100, 32000,
 1330|  2.28k|                                24000, 22050, 16000, 12000, 11025, 8000,
 1331|  2.28k|                                7350,  0,     0,     0};
 1332|       |
 1333|  2.28k|  if (self->ldmps_config.ldmps_present_flag == 1)
  ------------------
  |  Branch (1333:7): [True: 987, False: 1.29k]
  ------------------
 1334|    987|    self->time_slots = self->frame_length + 1;
 1335|  1.29k|  else
 1336|  1.29k|    self->time_slots = self->frame_length;
 1337|       |
 1338|  2.28k|  self->bs_param_bands = ixheaacd_freq_res_table[self->config->bs_freq_res];
 1339|       |
 1340|  2.28k|  if (self->ldmps_config.ldmps_present_flag == 1) {
  ------------------
  |  Branch (1340:7): [True: 987, False: 1.29k]
  ------------------
 1341|    987|    if (self->ldmps_config.bs_sampling_freq_index == 15) {
  ------------------
  |  Branch (1341:9): [True: 10, False: 977]
  ------------------
 1342|     10|      samp_freq = self->ldmps_config.bs_fampling_frequency;
 1343|    977|    } else {
 1344|    977|      samp_freq = sampling_rate_tbl[self->ldmps_config.bs_sampling_freq_index];
 1345|    977|    }
 1346|       |
 1347|    987|    if (samp_freq < 27713.0) {
  ------------------
  |  Branch (1347:9): [True: 574, False: 413]
  ------------------
 1348|    574|      self->qmf_band_count = 32;
 1349|    574|    } else if (samp_freq >= 55426.0) {
  ------------------
  |  Branch (1349:16): [True: 16, False: 397]
  ------------------
 1350|     16|      self->qmf_band_count = 128;
 1351|    397|    } else {
 1352|    397|      self->qmf_band_count = 64;
 1353|    397|    }
 1354|    987|  }
 1355|       |
 1356|  2.28k|  if (self->object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (1356:7): [True: 987, False: 1.29k]
  ------------------
 1357|  1.29k|      self->object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1357:7): [True: 0, False: 1.29k]
  ------------------
 1358|    987|    self->bs_param_bands =
 1359|    987|        ixheaacd_freq_res_table_ld[self->config->bs_freq_res];
 1360|    987|    self->hyb_band_count_max = self->qmf_band_count;
 1361|    987|  } else
 1362|  1.29k|    self->hyb_band_count_max = self->qmf_band_count - QMF_BANDS_TO_HYBRID + 10;
  ------------------
  |  |   64|  1.29k|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
 1363|       |
 1364|  2.28k|  if (self->object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (1364:7): [True: 987, False: 1.29k]
  ------------------
 1365|  1.29k|      self->object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1365:7): [True: 0, False: 1.29k]
  ------------------
 1366|    987|    switch (self->bs_param_bands) {
 1367|     80|      case 4:
  ------------------
  |  Branch (1367:7): [True: 80, False: 907]
  ------------------
 1368|       |
 1369|     80|        self->hyb_band_to_processing_band_table =
 1370|     80|            ixheaacd_hybrid_band_64_to_processing_band_4_map;
 1371|     80|        break;
 1372|     22|      case 5:
  ------------------
  |  Branch (1372:7): [True: 22, False: 965]
  ------------------
 1373|       |
 1374|     22|        self->hyb_band_to_processing_band_table =
 1375|     22|            ixheaacd_hybrid_band_64_to_processing_band_5_map;
 1376|     22|        break;
 1377|     56|      case 7:
  ------------------
  |  Branch (1377:7): [True: 56, False: 931]
  ------------------
 1378|       |
 1379|     56|        self->hyb_band_to_processing_band_table =
 1380|     56|            ixheaacd_hybrid_band_64_to_processing_band_7_map;
 1381|     56|        break;
 1382|    104|      case 9:
  ------------------
  |  Branch (1382:7): [True: 104, False: 883]
  ------------------
 1383|       |
 1384|    104|        self->hyb_band_to_processing_band_table =
 1385|    104|            ixheaacd_hybrid_band_64_to_processing_band_9_map;
 1386|    104|        break;
 1387|     95|      case 12:
  ------------------
  |  Branch (1387:7): [True: 95, False: 892]
  ------------------
 1388|       |
 1389|     95|        self->hyb_band_to_processing_band_table =
 1390|     95|            ixheaacd_hybrid_band_64_to_processing_band_12_map;
 1391|     95|        break;
 1392|    132|      case 15:
  ------------------
  |  Branch (1392:7): [True: 132, False: 855]
  ------------------
 1393|       |
 1394|    132|        self->hyb_band_to_processing_band_table =
 1395|    132|            ixheaacd_hybrid_band_64_to_processing_band_15_map;
 1396|    132|        break;
 1397|    492|      case 23:
  ------------------
  |  Branch (1397:7): [True: 492, False: 495]
  ------------------
 1398|       |
 1399|    492|        self->hyb_band_to_processing_band_table =
 1400|    492|            ixheaacd_hybrid_band_64_to_processing_band_23_map;
 1401|    492|        break;
 1402|      6|      default:
  ------------------
  |  Branch (1402:7): [True: 6, False: 981]
  ------------------
 1403|      6|        self->hyb_band_to_processing_band_table = NULL;
 1404|      6|        return -1;
 1405|      0|        break;
 1406|    987|    }
 1407|  1.29k|  } else {
 1408|  1.29k|    switch (self->bs_param_bands) {
 1409|    347|      case 4:
  ------------------
  |  Branch (1409:7): [True: 347, False: 950]
  ------------------
 1410|    347|        self->hyb_band_to_processing_band_table =
 1411|    347|            ixheaacd_hybrid_band_71_to_processing_band_4_map;
 1412|    347|        break;
 1413|    175|      case 5:
  ------------------
  |  Branch (1413:7): [True: 175, False: 1.12k]
  ------------------
 1414|    175|        self->hyb_band_to_processing_band_table =
 1415|    175|            ixheaacd_hybrid_band_71_to_processing_band_5_map;
 1416|    175|        break;
 1417|    191|      case 7:
  ------------------
  |  Branch (1417:7): [True: 191, False: 1.10k]
  ------------------
 1418|    191|        self->hyb_band_to_processing_band_table =
 1419|    191|            ixheaacd_hybrid_band_71_to_processing_band_7_map;
 1420|    191|        break;
 1421|    149|      case 10:
  ------------------
  |  Branch (1421:7): [True: 149, False: 1.14k]
  ------------------
 1422|    149|        self->hyb_band_to_processing_band_table =
 1423|    149|            ixheaacd_hybrid_band_71_to_processing_band_10_map;
 1424|    149|        break;
 1425|    131|      case 14:
  ------------------
  |  Branch (1425:7): [True: 131, False: 1.16k]
  ------------------
 1426|    131|        self->hyb_band_to_processing_band_table =
 1427|    131|            ixheaacd_hybrid_band_71_to_processing_band_14_map;
 1428|    131|        break;
 1429|     67|      case 20:
  ------------------
  |  Branch (1429:7): [True: 67, False: 1.23k]
  ------------------
 1430|     67|        self->hyb_band_to_processing_band_table =
 1431|     67|            ixheaacd_hybrid_band_71_to_processing_band_20_map;
 1432|     67|        break;
 1433|    236|      case 28:
  ------------------
  |  Branch (1433:7): [True: 236, False: 1.06k]
  ------------------
 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.29k]
  ------------------
 1438|      1|        self->hyb_band_to_processing_band_table = NULL;
 1439|      1|        return -1;
 1440|      0|        break;
 1441|  1.29k|    }
 1442|  1.29k|  }
 1443|  2.27k|  self->in_ch_count = 1;
 1444|  2.27k|  self->out_ch_count = 2;
 1445|       |
 1446|  2.27k|  self->input_gain =
 1447|  2.27k|      ixheaacd_mps_clip_gain_table[self->config->bs_fixed_gain_dmx];
 1448|       |
 1449|  2.27k|  if (self->config->bs_ott_bands_phase_present) {
  ------------------
  |  Branch (1449:7): [True: 508, False: 1.76k]
  ------------------
 1450|    508|    self->num_bands_ipd = self->config->bs_ott_bands_phase;
 1451|  1.76k|  } else {
 1452|  1.76k|    if (!(self->object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (1452:11): [True: 981, False: 788]
  ------------------
 1453|    788|          self->object_type == AOT_ER_AAC_LD)) {
  ------------------
  |  Branch (1453:11): [True: 0, False: 788]
  ------------------
 1454|    788|      switch (self->bs_param_bands) {
 1455|    306|        case 4:
  ------------------
  |  Branch (1455:9): [True: 306, False: 482]
  ------------------
 1456|    381|        case 5:
  ------------------
  |  Branch (1456:9): [True: 75, False: 713]
  ------------------
 1457|    381|          self->num_bands_ipd = 2;
 1458|    381|          break;
 1459|    138|        case 7:
  ------------------
  |  Branch (1459:9): [True: 138, False: 650]
  ------------------
 1460|    138|          self->num_bands_ipd = 3;
 1461|    138|          break;
 1462|     48|        case 10:
  ------------------
  |  Branch (1462:9): [True: 48, False: 740]
  ------------------
 1463|     48|          self->num_bands_ipd = 5;
 1464|     48|          break;
 1465|     82|        case 14:
  ------------------
  |  Branch (1465:9): [True: 82, False: 706]
  ------------------
 1466|     82|          self->num_bands_ipd = 7;
 1467|     82|          break;
 1468|     19|        case 20:
  ------------------
  |  Branch (1468:9): [True: 19, False: 769]
  ------------------
 1469|    139|        case 28:
  ------------------
  |  Branch (1469:9): [True: 120, False: 668]
  ------------------
 1470|    139|          self->num_bands_ipd = 10;
 1471|    139|          break;
 1472|      0|        default:
  ------------------
  |  Branch (1472:9): [True: 0, False: 788]
  ------------------
 1473|      0|          return -1;
 1474|      0|          break;
 1475|    788|      }
 1476|    788|    }
 1477|  1.76k|  }
 1478|       |
 1479|  2.27k|  if (self->residual_coding) {
  ------------------
  |  Branch (1479:7): [True: 848, False: 1.42k]
  ------------------
 1480|    848|    self->num_bands_ipd = max(self->bs_residual_bands, self->num_bands_ipd);
  ------------------
  |  |   74|    848|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 373, False: 475]
  |  |  ------------------
  ------------------
 1481|    848|    self->max_res_bands = 0;
 1482|    848|    if (self->bs_residual_present) {
  ------------------
  |  Branch (1482:9): [True: 848, False: 0]
  ------------------
 1483|    848|      self->res_bands = self->bs_residual_bands;
 1484|    848|      if (self->res_bands > self->max_res_bands) {
  ------------------
  |  Branch (1484:11): [True: 597, False: 251]
  ------------------
 1485|    597|        self->max_res_bands = self->res_bands;
 1486|    597|      }
 1487|    848|    } else {
 1488|      0|      self->res_bands = 0;
 1489|      0|    }
 1490|    848|  }
 1491|       |
 1492|  2.27k|  if (self->num_bands_ipd > MAX_PARAMETER_BANDS) return -1;
  ------------------
  |  |   55|  2.27k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (1492:7): [True: 0, False: 2.27k]
  ------------------
 1493|       |
 1494|  2.27k|  self->dir_sig_count = 1;
 1495|  2.27k|  self->decor_sig_count = 1;
 1496|       |
 1497|  2.27k|  self->bs_high_rate_mode = self->config->bs_high_rate_mode;
 1498|  2.27k|  self->pre_mix_req = 1;
 1499|       |
 1500|  2.27k|  return 0;
 1501|  2.27k|}
ixheaacd_mps_parse.c:ixheaacd_mps_ecdata_decoding:
  309|   174k|    WORD32 data[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS], WORD32 datatype) {
  310|   174k|  WORD32 i, j, pb, set_index, bs_data_pair, data_bands, old_quant_coarse_xxx;
  311|   174k|  WORD32 strides[MAX_PARAMETER_BANDS + 1] = {0};
  312|   174k|  WORD32 band_stop = 0;
  313|       |
  314|   174k|  WORD32 *lastdata = NULL;
  315|   174k|  ia_mps_data_struct *frame_xxx_data = NULL;
  316|   174k|  WORD32 default_val = 0;
  317|   174k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|   174k|#define IA_NO_ERROR 0x00000000
  ------------------
  318|       |
  319|   174k|  ia_mps_bs_frame *frame = &(self->bs_frame);
  320|       |
  321|   174k|  if (datatype == 0) {
  ------------------
  |  Branch (321:7): [True: 79.6k, False: 94.8k]
  ------------------
  322|  79.6k|    frame_xxx_data = &frame->cld_data;
  323|  79.6k|    lastdata = frame->cmp_cld_idx_prev;
  324|  79.6k|    band_stop = self->bs_param_bands;
  325|  94.8k|  } else if (datatype == 1) {
  ------------------
  |  Branch (325:14): [True: 79.5k, False: 15.2k]
  ------------------
  326|  79.5k|    frame_xxx_data = &frame->icc_data;
  327|  79.5k|    lastdata = frame->cmp_icc_idx_prev;
  328|  79.5k|    band_stop = self->bs_param_bands;
  329|  79.5k|  } else if (datatype == 2) {
  ------------------
  |  Branch (329:14): [True: 15.2k, False: 0]
  ------------------
  330|  15.2k|    frame_xxx_data = &frame->ipd_data;
  331|  15.2k|    lastdata = frame->ipd_idx_data_prev;
  332|  15.2k|    band_stop = self->num_bands_ipd;
  333|  15.2k|  } 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|   377k|  for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (339:15): [True: 202k, False: 174k]
  ------------------
  340|   202k|    frame_xxx_data->bs_xxx_data_mode[i] = ixheaacd_read_bits_buf(bitstream, 2);
  341|   202k|  }
  342|       |
  343|   174k|  set_index = 0;
  344|   174k|  bs_data_pair = 0;
  345|   174k|  old_quant_coarse_xxx = frame_xxx_data->bs_quant_coarse_xxx_prev;
  346|       |
  347|   376k|  for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (347:15): [True: 202k, False: 174k]
  ------------------
  348|   202k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 0) {
  ------------------
  |  Branch (348:9): [True: 118k, False: 83.8k]
  ------------------
  349|  1.63M|      for (pb = 0; pb < band_stop; pb++) {
  ------------------
  |  Branch (349:20): [True: 1.51M, False: 118k]
  ------------------
  350|  1.51M|        lastdata[pb] = default_val;
  351|  1.51M|      }
  352|       |
  353|   118k|      old_quant_coarse_xxx = 0;
  354|   118k|    }
  355|       |
  356|   202k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 3) {
  ------------------
  |  Branch (356:9): [True: 21.5k, False: 180k]
  ------------------
  357|  21.5k|      if (bs_data_pair) {
  ------------------
  |  Branch (357:11): [True: 698, False: 20.8k]
  ------------------
  358|    698|        bs_data_pair = 0;
  359|  20.8k|      } else {
  360|  20.8k|        bs_data_pair = ixheaacd_read_bits_buf(bitstream, 1);
  361|  20.8k|        frame_xxx_data->bs_quant_coarse_xxx[set_index] =
  362|  20.8k|            ixheaacd_read_bits_buf(bitstream, 1);
  363|  20.8k|        frame_xxx_data->bs_freq_res_stride_xxx[set_index] =
  364|  20.8k|            ixheaacd_read_bits_buf(bitstream, 2);
  365|       |
  366|  20.8k|        if (frame_xxx_data->bs_quant_coarse_xxx[set_index] !=
  ------------------
  |  Branch (366:13): [True: 4.83k, False: 16.0k]
  ------------------
  367|  20.8k|            old_quant_coarse_xxx) {
  368|  4.83k|          if (old_quant_coarse_xxx) {
  ------------------
  |  Branch (368:15): [True: 607, False: 4.22k]
  ------------------
  369|    607|            ixheaacd_mps_coarse2fine(lastdata, datatype, 0, band_stop - 0);
  370|  4.22k|          } else {
  371|  4.22k|            ixheaacd_mps_fine2coarse(lastdata, band_stop);
  372|  4.22k|          }
  373|  4.83k|        }
  374|       |
  375|  20.8k|        data_bands = ixheaacd_mps_getstridemap(
  376|  20.8k|            frame_xxx_data->bs_freq_res_stride_xxx[set_index], 0, band_stop,
  377|  20.8k|            strides);
  378|       |
  379|   195k|        for (pb = 0; pb < data_bands; pb++) {
  ------------------
  |  Branch (379:22): [True: 175k, False: 20.8k]
  ------------------
  380|   175k|          lastdata[pb] = lastdata[strides[pb]];
  381|   175k|        }
  382|       |
  383|  20.8k|        err = ixheaacd_mps_ecdatapairdec(
  384|  20.8k|            bitstream, data, lastdata, datatype, set_index, 0, data_bands, bs_data_pair,
  385|  20.8k|            frame_xxx_data->bs_quant_coarse_xxx[set_index],
  386|  20.8k|            !(frame->independency_flag && (i == 0)) || (set_index > 0), 0, 0, self->ec_flag);
  ------------------
  |  Branch (386:15): [True: 8.09k, False: 12.7k]
  |  Branch (386:43): [True: 5.46k, False: 2.63k]
  |  Branch (386:56): [True: 0, False: 5.46k]
  ------------------
  387|  20.8k|        if (err) return err;
  ------------------
  |  Branch (387:13): [True: 2, False: 20.8k]
  ------------------
  388|       |
  389|   195k|        for (pb = 0; pb < data_bands; pb++) {
  ------------------
  |  Branch (389:22): [True: 174k, False: 20.8k]
  ------------------
  390|   427k|          for (j = strides[pb]; j < strides[pb + 1]; j++) {
  ------------------
  |  Branch (390:33): [True: 252k, False: 174k]
  ------------------
  391|   252k|            if (datatype == IPD) {
  ------------------
  |  |   25|   252k|#define IPD (2)
  ------------------
  |  Branch (391:17): [True: 58.1k, False: 194k]
  ------------------
  392|  58.1k|              if (frame_xxx_data->bs_quant_coarse_xxx[set_index]) {
  ------------------
  |  Branch (392:19): [True: 27.3k, False: 30.8k]
  ------------------
  393|  27.3k|                lastdata[j] = data[set_index + bs_data_pair][pb] & 7;
  394|  30.8k|              } else {
  395|  30.8k|                lastdata[j] = data[set_index + bs_data_pair][pb] & 15;
  396|  30.8k|              }
  397|   194k|            } else {
  398|   194k|              lastdata[j] = data[set_index + bs_data_pair][pb];
  399|   194k|            }
  400|   252k|          }
  401|   174k|        }
  402|       |
  403|  20.8k|        old_quant_coarse_xxx = frame_xxx_data->bs_quant_coarse_xxx[set_index];
  404|       |
  405|  20.8k|        if (bs_data_pair) {
  ------------------
  |  Branch (405:13): [True: 6.98k, False: 13.8k]
  ------------------
  406|  6.98k|          frame_xxx_data->bs_quant_coarse_xxx[set_index + 1] =
  407|  6.98k|              frame_xxx_data->bs_quant_coarse_xxx[set_index];
  408|  6.98k|          frame_xxx_data->bs_freq_res_stride_xxx[set_index + 1] =
  409|  6.98k|              frame_xxx_data->bs_freq_res_stride_xxx[set_index];
  410|  6.98k|        }
  411|  20.8k|        set_index += bs_data_pair + 1;
  412|  20.8k|      }
  413|  21.5k|    }
  414|   202k|  }
  415|   174k|  return err;
  416|   174k|}
ixheaacd_mps_parse.c:ixheaacd_mps_coarse2fine:
  256|  34.0k|                                     WORD32 band_start, WORD32 ixheaacd_num_bands) {
  257|  34.0k|  WORD32 i;
  258|       |
  259|   583k|  for (i = band_start; i < band_start + ixheaacd_num_bands; i++) {
  ------------------
  |  Branch (259:24): [True: 549k, False: 34.0k]
  ------------------
  260|   549k|    data[i] <<= 1;
  261|   549k|  }
  262|       |
  263|  34.0k|  if (data_type == CLD) {
  ------------------
  |  |   23|  34.0k|#define CLD (0)
  ------------------
  |  Branch (263:7): [True: 8.63k, False: 25.4k]
  ------------------
  264|   136k|    for (i = band_start; i < band_start + ixheaacd_num_bands; i++) {
  ------------------
  |  Branch (264:26): [True: 128k, False: 8.63k]
  ------------------
  265|   128k|      if (data[i] == -14)
  ------------------
  |  Branch (265:11): [True: 14.2k, False: 114k]
  ------------------
  266|  14.2k|        data[i] = -15;
  267|   114k|      else if (data[i] == 14)
  ------------------
  |  Branch (267:16): [True: 3.79k, False: 110k]
  ------------------
  268|  3.79k|        data[i] = 15;
  269|   128k|    }
  270|  8.63k|  }
  271|  34.0k|}
ixheaacd_mps_parse.c:ixheaacd_mps_fine2coarse:
  273|  7.82k|static VOID ixheaacd_mps_fine2coarse(WORD32 *data, WORD32 ixheaacd_num_bands) {
  274|  7.82k|  WORD32 i;
  275|       |
  276|  91.9k|  for (i = 0; i < ixheaacd_num_bands; i++) {
  ------------------
  |  Branch (276:15): [True: 84.0k, False: 7.82k]
  ------------------
  277|  84.0k|    data[i] /= 2;
  278|  84.0k|  }
  279|  7.82k|}
ixheaacd_mps_parse.c:ixheaacd_mps_getstridemap:
  282|  26.6k|                                     WORD32 band_stop, WORD32 *strides) {
  283|  26.6k|  WORD32 i, pb, ch_fac, data_bands, start_offset;
  284|       |
  285|  26.6k|  ch_fac = ixheaacd_mps_stride_table[freq_res_stride];
  286|  26.6k|  data_bands = (band_stop - band_start - 1) / ch_fac + 1;
  287|       |
  288|  26.6k|  strides[0] = band_start;
  289|   232k|  for (pb = 1; pb <= data_bands; pb++) {
  ------------------
  |  Branch (289:16): [True: 205k, False: 26.6k]
  ------------------
  290|   205k|    strides[pb] = strides[pb - 1] + ch_fac;
  291|   205k|  }
  292|  26.6k|  start_offset = 0;
  293|   122k|  while (strides[data_bands] > band_stop) {
  ------------------
  |  Branch (293:10): [True: 95.4k, False: 26.6k]
  ------------------
  294|  95.4k|    if (start_offset < data_bands)
  ------------------
  |  Branch (294:9): [True: 8.86k, False: 86.6k]
  ------------------
  295|  8.86k|      start_offset++;
  296|  86.6k|    else
  297|  86.6k|      start_offset = 1;
  298|       |
  299|   205k|    for (i = start_offset; i <= data_bands; i++) {
  ------------------
  |  Branch (299:28): [True: 109k, False: 95.4k]
  ------------------
  300|   109k|      strides[i]--;
  301|   109k|    }
  302|  95.4k|  }
  303|       |
  304|  26.6k|  return data_bands;
  305|  26.6k|}
ixheaacd_mps_parse.c:ixheaacd_longmult1:
  180|  1.01M|                               UWORD16 d[], WORD32 len) {
  181|  1.01M|  WORD32 k;
  182|  1.01M|  UWORD32 tmp;
  183|  1.01M|  UWORD32 b0 = (UWORD32)b;
  184|       |
  185|  1.01M|  tmp = ((UWORD32)a[0]) * b0;
  186|  1.01M|  d[0] = (UWORD16)tmp;
  187|       |
  188|  5.09M|  for (k = 1; k < len; k++) {
  ------------------
  |  Branch (188:15): [True: 4.07M, False: 1.01M]
  ------------------
  189|  4.07M|    tmp = (tmp >> 16) + ((UWORD32)a[k]) * b0;
  190|  4.07M|    d[k] = (UWORD16)tmp;
  191|  4.07M|  }
  192|  1.01M|}
ixheaacd_mps_parse.c:ixheaacd_longdiv:
  195|  1.01M|                             UWORD16 d[], UWORD16 *pr, WORD32 len) {
  196|  1.01M|  UWORD32 r;
  197|  1.01M|  UWORD32 tmp;
  198|  1.01M|  UWORD32 temp;
  199|  1.01M|  WORD32 k;
  200|       |
  201|  1.01M|  if (a == 0)
  ------------------
  |  Branch (201:7): [True: 0, False: 1.01M]
  ------------------
  202|      0|    return;
  203|       |
  204|  1.01M|  r = 0;
  205|       |
  206|  6.11M|  for (k = len - 1; k >= 0; k--) {
  ------------------
  |  Branch (206:21): [True: 5.09M, False: 1.01M]
  ------------------
  207|  5.09M|    tmp = ((UWORD32)b[k]) + (r << 16);
  208|       |
  209|  5.09M|    if (tmp) {
  ------------------
  |  Branch (209:9): [True: 1.59M, False: 3.49M]
  ------------------
  210|  1.59M|      d[k] = (UWORD16)(tmp / a);
  211|  1.59M|      temp = d[k] * a;
  212|  1.59M|      r = tmp - temp;
  213|  3.49M|    } else {
  214|  3.49M|      d[k] = 0;
  215|  3.49M|    }
  216|  5.09M|  }
  217|  1.01M|  *pr = (UWORD16)r;
  218|  1.01M|}
ixheaacd_mps_parse.c:ixheaacd_longcompare:
  246|   340k|                                WORD32 len) {
  247|   340k|  WORD32 i;
  248|       |
  249|  1.25M|  for (i = len - 1; i > 0; i--) {
  ------------------
  |  Branch (249:21): [True: 1.00M, False: 247k]
  ------------------
  250|  1.00M|    if (a[i] != b[i]) break;
  ------------------
  |  Branch (250:9): [True: 92.1k, False: 912k]
  ------------------
  251|  1.00M|  }
  252|   340k|  return (a[i] >= b[i]) ? 1 : 0;
  ------------------
  |  Branch (252:10): [True: 61.3k, False: 278k]
  ------------------
  253|   340k|}
ixheaacd_mps_parse.c:ixheaacd_longsub:
  221|  61.3k|                             WORD32 lenb) {
  222|  61.3k|  WORD32 h;
  223|  61.3k|  WORD32 carry = 0;
  224|       |
  225|  61.3k|  if (lenb > lena)
  ------------------
  |  Branch (225:7): [True: 0, False: 61.3k]
  ------------------
  226|      0|    return;
  227|       |
  228|   306k|  for (h = 0; h < lenb; h++) {
  ------------------
  |  Branch (228:15): [True: 245k, False: 61.3k]
  ------------------
  229|   245k|    carry = carry + (WORD32)(a[h] - b[h]);
  230|   245k|    a[h] = (UWORD16)carry;
  231|   245k|    carry = carry >> 16;
  232|   245k|  }
  233|       |
  234|  61.3k|  for (; h < lena; h++) {
  ------------------
  |  Branch (234:10): [True: 0, False: 61.3k]
  ------------------
  235|      0|    carry = ((UWORD32)a[h]) + carry;
  236|      0|    a[h] = (UWORD16)carry;
  237|      0|    carry = carry >> 16;
  238|      0|  }
  239|       |
  240|  61.3k|  if (carry != 0)
  ------------------
  |  Branch (240:7): [True: 0, False: 61.3k]
  ------------------
  241|      0|    return;
  242|  61.3k|  return;
  243|  61.3k|}
ixheaacd_mps_parse.c:ixheaacd_ld_mps_ecdata_decoding:
  690|  16.0k|    WORD32 start_band) {
  691|  16.0k|  WORD32 i, j, pb, set_index, bs_data_pair, data_bands, old_quant_coarse_xxx;
  692|  16.0k|  WORD32 strides[MAX_PARAMETER_BANDS + 1] = {0};
  693|  16.0k|  WORD32 band_stop = 0;
  694|       |
  695|  16.0k|  WORD32 *lastdata = NULL;
  696|  16.0k|  ia_mps_data_struct *frame_xxx_data = NULL;
  697|  16.0k|  WORD32 default_val = 0;
  698|       |
  699|  16.0k|  ia_mps_bs_frame *frame = &(self->bs_frame);
  700|       |
  701|  16.0k|  if (datatype == CLD) {
  ------------------
  |  |   23|  16.0k|#define CLD (0)
  ------------------
  |  Branch (701:7): [True: 11.4k, False: 4.69k]
  ------------------
  702|  11.4k|    frame_xxx_data = &frame->cld_data;
  703|  11.4k|    lastdata = frame->cmp_cld_idx_prev;
  704|  11.4k|    band_stop = self->bs_param_bands;
  705|  11.4k|  } else if (datatype == ICC) {
  ------------------
  |  |   24|  4.69k|#define ICC (1)
  ------------------
  |  Branch (705:14): [True: 4.69k, False: 0]
  ------------------
  706|  4.69k|    frame_xxx_data = &frame->icc_data;
  707|  4.69k|    lastdata = frame->cmp_icc_idx_prev;
  708|  4.69k|    band_stop = self->bs_param_bands;
  709|  4.69k|  } 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|  37.6k|  for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (718:15): [True: 21.5k, False: 16.0k]
  ------------------
  719|  21.5k|    frame_xxx_data->bs_xxx_data_mode[i] =
  720|  21.5k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  721|  21.5k|  }
  722|       |
  723|  16.0k|  set_index = 0;
  724|  16.0k|  bs_data_pair = 0;
  725|  16.0k|  old_quant_coarse_xxx = frame_xxx_data->bs_quant_coarse_xxx_prev;
  726|       |
  727|  37.6k|  for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (727:15): [True: 21.5k, False: 16.0k]
  ------------------
  728|  21.5k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 0) {
  ------------------
  |  Branch (728:9): [True: 9.92k, False: 11.6k]
  ------------------
  729|  86.6k|      for (pb = 0; pb < band_stop; pb++) {
  ------------------
  |  Branch (729:20): [True: 76.7k, False: 9.92k]
  ------------------
  730|  76.7k|        lastdata[pb] = default_val;
  731|  76.7k|      }
  732|       |
  733|  9.92k|      old_quant_coarse_xxx = 0;
  734|  9.92k|    }
  735|       |
  736|  21.5k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 3) {
  ------------------
  |  Branch (736:9): [True: 6.66k, False: 14.8k]
  ------------------
  737|  6.66k|      if (bs_data_pair) {
  ------------------
  |  Branch (737:11): [True: 853, False: 5.81k]
  ------------------
  738|    853|        bs_data_pair = 0;
  739|  5.81k|      } else {
  740|  5.81k|        bs_data_pair = ixheaacd_read_bits_buf(it_bit_buff, 1);
  741|  5.81k|        frame_xxx_data->bs_quant_coarse_xxx[set_index] =
  742|  5.81k|            ixheaacd_read_bits_buf(it_bit_buff, 1);
  743|  5.81k|        frame_xxx_data->bs_freq_res_stride_xxx[set_index] =
  744|  5.81k|            ixheaacd_read_bits_buf(it_bit_buff, 2);
  745|       |
  746|  5.81k|        if (frame_xxx_data->bs_quant_coarse_xxx[set_index] !=
  ------------------
  |  Branch (746:13): [True: 4.26k, False: 1.54k]
  ------------------
  747|  5.81k|            old_quant_coarse_xxx) {
  748|  4.26k|          if (old_quant_coarse_xxx) {
  ------------------
  |  Branch (748:15): [True: 662, False: 3.60k]
  ------------------
  749|    662|            ixheaacd_mps_coarse2fine(lastdata, datatype, 0, band_stop - 0);
  750|  3.60k|          } else {
  751|  3.60k|            ixheaacd_mps_fine2coarse(lastdata, band_stop);
  752|  3.60k|          }
  753|  4.26k|        }
  754|       |
  755|  5.81k|        data_bands = ixheaacd_mps_getstridemap(
  756|  5.81k|            frame_xxx_data->bs_freq_res_stride_xxx[set_index], start_band,
  757|  5.81k|            band_stop, strides);
  758|  36.4k|        for (pb = 0; pb < data_bands; pb++) {
  ------------------
  |  Branch (758:22): [True: 30.6k, False: 5.81k]
  ------------------
  759|  30.6k|          lastdata[pb] = lastdata[strides[pb]];
  760|  30.6k|        }
  761|       |
  762|  5.81k|        ixheaacd_mps_ecdatapairdec(
  763|  5.81k|            it_bit_buff, data, lastdata, datatype, set_index, 0, data_bands, bs_data_pair,
  764|  5.81k|            frame_xxx_data->bs_quant_coarse_xxx[set_index],
  765|  5.81k|            !(frame->independency_flag && (i == 0)) || (set_index > 0), 1, 0, self->ec_flag);
  ------------------
  |  Branch (765:15): [True: 3.83k, False: 1.98k]
  |  Branch (765:43): [True: 2.46k, False: 1.36k]
  |  Branch (765:56): [True: 0, False: 2.46k]
  ------------------
  766|       |
  767|  36.2k|        for (pb = 0; pb < data_bands; pb++) {
  ------------------
  |  Branch (767:22): [True: 30.4k, False: 5.81k]
  ------------------
  768|  90.9k|          for (j = strides[pb]; j < strides[pb + 1]; j++) {
  ------------------
  |  Branch (768:33): [True: 60.5k, False: 30.4k]
  ------------------
  769|  60.5k|            if (datatype == IPD) {
  ------------------
  |  |   25|  60.5k|#define IPD (2)
  ------------------
  |  Branch (769:17): [True: 0, False: 60.5k]
  ------------------
  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|  60.5k|            } else {
  776|  60.5k|              lastdata[j] = data[set_index + bs_data_pair][pb];
  777|  60.5k|            }
  778|  60.5k|          }
  779|  30.4k|        }
  780|       |
  781|  5.81k|        old_quant_coarse_xxx = frame_xxx_data->bs_quant_coarse_xxx[set_index];
  782|       |
  783|  5.81k|        if (bs_data_pair) {
  ------------------
  |  Branch (783:13): [True: 3.94k, False: 1.86k]
  ------------------
  784|  3.94k|          frame_xxx_data->bs_quant_coarse_xxx[set_index + 1] =
  785|  3.94k|              frame_xxx_data->bs_quant_coarse_xxx[set_index];
  786|  3.94k|          frame_xxx_data->bs_freq_res_stride_xxx[set_index + 1] =
  787|  3.94k|              frame_xxx_data->bs_freq_res_stride_xxx[set_index];
  788|  3.94k|        }
  789|  5.81k|        set_index += bs_data_pair + 1;
  790|  5.81k|      }
  791|  6.66k|    }
  792|  21.5k|  }
  793|  16.0k|}
ixheaacd_mps_parse.c:ixheaacd_mps_dec_and_mapframeott:
 1169|  81.7k|    ia_mps_dec_state_struct *self) {
 1170|  81.7k|  ia_mps_bs_frame *cur_bit_stream_ptr = &(self->bs_frame);
 1171|  81.7k|  IA_ERRORCODE err_code = 0;
 1172|       |
 1173|  81.7k|  err_code = ixheaacd_mps_mapindexdata(
 1174|  81.7k|      self, &cur_bit_stream_ptr->cld_data, self->cld_data,
 1175|  81.7k|      cur_bit_stream_ptr->cld_idx, cur_bit_stream_ptr->cmp_cld_idx,
 1176|  81.7k|      cur_bit_stream_ptr->cld_idx_pre, CLD);
  ------------------
  |  |   23|  81.7k|#define CLD (0)
  ------------------
 1177|  81.7k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  81.7k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1177:7): [True: 30, False: 81.7k]
  ------------------
 1178|  81.7k|  err_code = ixheaacd_mps_mapindexdata(
 1179|  81.7k|      self, &cur_bit_stream_ptr->icc_data, self->icc_data,
 1180|  81.7k|      cur_bit_stream_ptr->icc_idx, cur_bit_stream_ptr->cmp_icc_idx,
 1181|  81.7k|      cur_bit_stream_ptr->icc_idx_pre, ICC);
  ------------------
  |  |   24|  81.7k|#define ICC (1)
  ------------------
 1182|  81.7k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  81.7k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1182:7): [True: 24, False: 81.7k]
  ------------------
 1183|  81.7k|  if ((self->config->bs_phase_coding)) {
  ------------------
  |  Branch (1183:7): [True: 62.8k, False: 18.9k]
  ------------------
 1184|  62.8k|    err_code = ixheaacd_mps_mapindexdata(
 1185|  62.8k|        self, &cur_bit_stream_ptr->ipd_data, self->ipd_data,
 1186|  62.8k|        cur_bit_stream_ptr->ipd_idx, cur_bit_stream_ptr->ipd_idx_data,
 1187|  62.8k|        cur_bit_stream_ptr->ipd_idx_prev, IPD);
  ------------------
  |  |   25|  62.8k|#define IPD (2)
  ------------------
 1188|       |
 1189|  62.8k|    if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  62.8k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1189:9): [True: 5, False: 62.8k]
  ------------------
 1190|  62.8k|  }
 1191|  81.7k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  81.7k|#define IA_NO_ERROR 0x00000000
  ------------------
 1192|  81.7k|}
ixheaacd_mps_parse.c:ixheaacd_mps_mapindexdata:
 1016|   226k|    WORD32 idx_prev[MAX_PARAMETER_BANDS], WORD32 param_type) {
 1017|   226k|  WORD32 interpolate_local[MAX_PARAMETER_SETS_MPS] = {0};
 1018|   226k|  WORD32 map[MAX_PARAMETER_BANDS + 1];
 1019|       |
 1020|   226k|  WORD32 set_index, i, band, parm_slot;
 1021|   226k|  WORD32 data_bands, ch_fac;
 1022|   226k|  WORD32 ps;
 1023|       |
 1024|   226k|  WORD32 i1, i2, x1, xi, x2;
 1025|   226k|  WORD32 band_start = 0;
 1026|   226k|  WORD32 ext_frame_flag = self->ext_frame_flag;
 1027|   226k|  WORD32 *param_slots = self->param_slots;
 1028|   226k|  WORD32 num_parameter_sets = self->num_parameter_sets;
 1029|   226k|  WORD32 band_stop = self->bs_param_bands;
 1030|   226k|  WORD32 default_val = 0;
 1031|       |
 1032|   226k|  set_index = 0;
 1033|       |
 1034|   490k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1034:15): [True: 264k, False: 226k]
  ------------------
 1035|   264k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 0) {
  ------------------
  |  Branch (1035:9): [True: 153k, False: 111k]
  ------------------
 1036|   153k|      frame_xxx_data->quant_coarse_xxx_flag[i] = 0;
 1037|  2.16M|      for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1037:31): [True: 2.00M, False: 153k]
  ------------------
 1038|  2.00M|        out_idx_data[i][band] = default_val;
 1039|  2.00M|      }
 1040|  2.16M|      for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1040:31): [True: 2.00M, False: 153k]
  ------------------
 1041|  2.00M|        idx_prev[band] = out_idx_data[i][band];
 1042|  2.00M|      }
 1043|       |
 1044|   153k|      frame_xxx_data->bs_quant_coarse_xxx_prev = 0;
 1045|   153k|    }
 1046|       |
 1047|   264k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 1) {
  ------------------
  |  Branch (1047:9): [True: 38.8k, False: 225k]
  ------------------
 1048|   543k|      for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1048:31): [True: 504k, False: 38.8k]
  ------------------
 1049|   504k|        out_idx_data[i][band] = idx_prev[band];
 1050|   504k|      }
 1051|  38.8k|      frame_xxx_data->quant_coarse_xxx_flag[i] =
 1052|  38.8k|          frame_xxx_data->bs_quant_coarse_xxx_prev;
 1053|  38.8k|    }
 1054|       |
 1055|   264k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 2) {
  ------------------
  |  Branch (1055:9): [True: 34.3k, False: 230k]
  ------------------
 1056|   520k|      for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1056:31): [True: 486k, False: 34.3k]
  ------------------
 1057|   486k|        out_idx_data[i][band] = idx_prev[band];
 1058|   486k|      }
 1059|  34.3k|      frame_xxx_data->quant_coarse_xxx_flag[i] =
 1060|  34.3k|          frame_xxx_data->bs_quant_coarse_xxx_prev;
 1061|  34.3k|      interpolate_local[i] = 1;
 1062|   230k|    } else {
 1063|   230k|      interpolate_local[i] = 0;
 1064|   230k|    }
 1065|       |
 1066|   264k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 3) {
  ------------------
  |  Branch (1066:9): [True: 38.0k, False: 226k]
  ------------------
 1067|  38.0k|      parm_slot = i;
 1068|  38.0k|      ch_fac =
 1069|  38.0k|          ixheaacd_mps_stride_table[frame_xxx_data
 1070|  38.0k|                                        ->bs_freq_res_stride_xxx[set_index]];
 1071|  38.0k|      data_bands = (band_stop - band_start - 1) / ch_fac + 1;
 1072|  38.0k|      ixheaacd_mps_createmapping(map, band_start, band_stop, ch_fac);
 1073|  38.0k|      ixheaacd_mps_mapfrequency(&cmp_idx_data[set_index][0],
 1074|  38.0k|                                &out_idx_data[parm_slot][0], map, data_bands);
 1075|       |
 1076|   575k|      for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1076:31): [True: 537k, False: 38.0k]
  ------------------
 1077|   537k|        idx_prev[band] = out_idx_data[parm_slot][band];
 1078|   537k|      }
 1079|       |
 1080|  38.0k|      frame_xxx_data->bs_quant_coarse_xxx_prev =
 1081|  38.0k|          frame_xxx_data->bs_quant_coarse_xxx[set_index];
 1082|  38.0k|      frame_xxx_data->quant_coarse_xxx_flag[i] =
 1083|  38.0k|          frame_xxx_data->bs_quant_coarse_xxx[set_index];
 1084|       |
 1085|  38.0k|      set_index++;
 1086|  38.0k|    }
 1087|   264k|  }
 1088|       |
 1089|   490k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1089:15): [True: 264k, False: 226k]
  ------------------
 1090|   264k|    if (frame_xxx_data->quant_coarse_xxx_flag[i] == 1) {
  ------------------
  |  Branch (1090:9): [True: 32.8k, False: 231k]
  ------------------
 1091|  32.8k|      ixheaacd_mps_coarse2fine(out_idx_data[i], param_type, band_start,
 1092|  32.8k|                               band_stop - band_start);
 1093|  32.8k|      frame_xxx_data->quant_coarse_xxx_flag[i] = 0;
 1094|  32.8k|    }
 1095|   264k|  }
 1096|       |
 1097|   226k|  i1 = -1;
 1098|   226k|  x1 = 0;
 1099|   226k|  i2 = 0;
 1100|   490k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1100:15): [True: 264k, False: 226k]
  ------------------
 1101|   264k|    if (interpolate_local[i] != 1) {
  ------------------
  |  Branch (1101:9): [True: 230k, False: 34.2k]
  ------------------
 1102|   230k|      i1 = i;
 1103|   230k|    }
 1104|   264k|    i2 = i;
 1105|   298k|    while (interpolate_local[i2] == 1) {
  ------------------
  |  Branch (1105:12): [True: 34.4k, False: 264k]
  ------------------
 1106|  34.4k|      i2++;
 1107|  34.4k|    }
 1108|   264k|    if (i1 == -1) {
  ------------------
  |  Branch (1108:9): [True: 31.6k, False: 232k]
  ------------------
 1109|  31.6k|      x1 = 0;
 1110|  31.6k|      i1 = 0;
 1111|   232k|    } else {
 1112|   232k|      x1 = param_slots[i1];
 1113|   232k|    }
 1114|   264k|    xi = param_slots[i];
 1115|   264k|    x2 = param_slots[i2];
 1116|       |
 1117|   264k|    if (interpolate_local[i] == 1) {
  ------------------
  |  Branch (1117:9): [True: 34.2k, False: 230k]
  ------------------
 1118|  34.2k|      if (i2 < num_parameter_sets) {
  ------------------
  |  Branch (1118:11): [True: 59, False: 34.2k]
  ------------------
 1119|     59|        if (self->ec_flag == 0) {
  ------------------
  |  Branch (1119:13): [True: 59, False: 0]
  ------------------
 1120|     59|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|     59|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1121|     59|        }
 1122|     59|      }
 1123|       |
 1124|   519k|      for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1124:31): [True: 485k, False: 34.2k]
  ------------------
 1125|   485k|        WORD32 yi, y1, y2;
 1126|   485k|        yi = 0;
 1127|   485k|        y1 = out_idx_data[i1][band];
 1128|   485k|        y2 = out_idx_data[i2][band];
 1129|   485k|        if (param_type == IPD) {
  ------------------
  |  |   25|   485k|#define IPD (2)
  ------------------
  |  Branch (1129:13): [True: 122k, False: 362k]
  ------------------
 1130|   122k|          if (y2 - y1 > 8) y1 += 16;
  ------------------
  |  Branch (1130:15): [True: 6.61k, False: 115k]
  ------------------
 1131|   122k|          if (y1 - y2 > 8) y2 += 16;
  ------------------
  |  Branch (1131:15): [True: 2.36k, False: 120k]
  ------------------
 1132|       |
 1133|   122k|          if (x2 != x1) yi = (y1 + (xi - x1) * (y2 - y1) / (x2 - x1)) % 16;
  ------------------
  |  Branch (1133:15): [True: 18.9k, False: 103k]
  ------------------
 1134|   362k|        } else {
 1135|   362k|          if (x2 != x1) {
  ------------------
  |  Branch (1135:15): [True: 38.0k, False: 324k]
  ------------------
 1136|  38.0k|            yi = y1 + (xi - x1) * (y2 - y1) / (x2 - x1);
 1137|  38.0k|          }
 1138|   362k|        }
 1139|   485k|        out_idx_data[i][band] = yi;
 1140|   485k|      }
 1141|  34.2k|    }
 1142|   264k|  }
 1143|       |
 1144|   490k|  for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (1144:16): [True: 264k, False: 226k]
  ------------------
 1145|  3.79M|    for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1145:29): [True: 3.53M, False: 264k]
  ------------------
 1146|  3.53M|      if (param_type == CLD) {
  ------------------
  |  |   23|  3.53M|#define CLD (0)
  ------------------
  |  Branch (1146:11): [True: 1.26M, False: 2.27M]
  ------------------
 1147|  1.26M|        out_idx_data[ps][band] = bound_check(out_idx_data[ps][band], -15, 15);
 1148|  2.27M|      } else if (param_type == ICC)
  ------------------
  |  |   24|  2.27M|#define ICC (1)
  ------------------
  |  Branch (1148:18): [True: 1.25M, False: 1.01M]
  ------------------
 1149|  1.25M|      {
 1150|  1.25M|        out_idx_data[ps][band] = bound_check(out_idx_data[ps][band], 0, 7);
 1151|  1.25M|      }
 1152|  3.53M|      out_data[ps][band] =
 1153|  3.53M|          ixheaacd_mps_de_quantize(out_idx_data[ps][band], param_type);
 1154|  3.53M|    }
 1155|   264k|  }
 1156|       |
 1157|   226k|  if (ext_frame_flag) {
  ------------------
  |  Branch (1157:7): [True: 8.65k, False: 217k]
  ------------------
 1158|  91.3k|    for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1158:29): [True: 82.6k, False: 8.65k]
  ------------------
 1159|  82.6k|      out_data[num_parameter_sets][band] =
 1160|  82.6k|          out_data[num_parameter_sets - 1][band];
 1161|  82.6k|      out_idx_data[num_parameter_sets][band] =
 1162|  82.6k|          out_idx_data[num_parameter_sets - 1][band];
 1163|  82.6k|    }
 1164|  8.65k|  }
 1165|   226k|  return IA_NO_ERROR;
  ------------------
  |  |   23|   226k|#define IA_NO_ERROR 0x00000000
  ------------------
 1166|   226k|}
ixheaacd_mps_parse.c:ixheaacd_mps_createmapping:
  937|  41.1k|                                       WORD32 ch_fac) {
  938|  41.1k|  WORD32 input_bands, out_bands, bands_achived, bands_diff, incr, k, i;
  939|  41.1k|  WORD32 vdk[MAX_PARAMETER_BANDS + 1];
  940|  41.1k|  input_bands = band_stop - band_start;
  941|  41.1k|  out_bands = (input_bands - 1) / ch_fac + 1;
  942|  41.1k|  if (out_bands < 1) {
  ------------------
  |  Branch (942:7): [True: 0, False: 41.1k]
  ------------------
  943|      0|    out_bands = 1;
  944|      0|  }
  945|       |
  946|  41.1k|  bands_achived = out_bands * ch_fac;
  947|  41.1k|  bands_diff = input_bands - bands_achived;
  948|   373k|  for (i = 0; i < out_bands; i++) {
  ------------------
  |  Branch (948:15): [True: 332k, False: 41.1k]
  ------------------
  949|   332k|    vdk[i] = ch_fac;
  950|   332k|  }
  951|       |
  952|  41.1k|  if (bands_diff > 0) {
  ------------------
  |  Branch (952:7): [True: 0, False: 41.1k]
  ------------------
  953|      0|    incr = -1;
  954|      0|    k = out_bands - 1;
  955|  41.1k|  } else {
  956|  41.1k|    incr = 1;
  957|  41.1k|    k = 0;
  958|  41.1k|  }
  959|       |
  960|   155k|  while (bands_diff != 0) {
  ------------------
  |  Branch (960:10): [True: 114k, False: 41.1k]
  ------------------
  961|   114k|    vdk[k] = vdk[k] - incr;
  962|   114k|    k = k + incr;
  963|   114k|    bands_diff = bands_diff + incr;
  964|   114k|    if (k >= out_bands) {
  ------------------
  |  Branch (964:9): [True: 103k, False: 11.2k]
  ------------------
  965|   103k|      if (bands_diff > 0) {
  ------------------
  |  Branch (965:11): [True: 0, False: 103k]
  ------------------
  966|      0|        k = out_bands - 1;
  967|   103k|      } else if (bands_diff < 0) {
  ------------------
  |  Branch (967:18): [True: 96.1k, False: 7.25k]
  ------------------
  968|  96.1k|        k = 0;
  969|  96.1k|      }
  970|   103k|    }
  971|   114k|  }
  972|  41.1k|  map[0] = band_start;
  973|   373k|  for (i = 0; i < out_bands; i++) {
  ------------------
  |  Branch (973:15): [True: 332k, False: 41.1k]
  ------------------
  974|   332k|    map[i + 1] = map[i] + vdk[i];
  975|   332k|  }
  976|  41.1k|}
ixheaacd_mps_parse.c:ixheaacd_mps_mapfrequency:
  979|  38.0k|                                      WORD32 data_bands) {
  980|  38.0k|  WORD32 i, j, band_start, band_stop, value;
  981|  38.0k|  WORD32 start_band_0 = map[0];
  982|       |
  983|   344k|  for (i = 0; i < data_bands; i++) {
  ------------------
  |  Branch (983:15): [True: 306k, False: 38.0k]
  ------------------
  984|   306k|    value = in[i + start_band_0];
  985|       |
  986|   306k|    band_start = map[i];
  987|   306k|    band_stop = map[i + 1];
  988|   843k|    for (j = band_start; j < band_stop; j++) {
  ------------------
  |  Branch (988:26): [True: 537k, False: 306k]
  ------------------
  989|   537k|      out[j] = value;
  990|   537k|    }
  991|   306k|  }
  992|  38.0k|}
ixheaacd_mps_parse.c:bound_check:
  173|  2.51M|static WORD32 bound_check(WORD32 var, WORD32 lower_bound, WORD32 upper_bound) {
  174|  2.51M|  var = min(var, upper_bound);
  ------------------
  |  |   75|  2.51M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 2.49M, False: 27.3k]
  |  |  ------------------
  ------------------
  175|  2.51M|  var = max(var, lower_bound);
  ------------------
  |  |   74|  2.51M|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 1.36M, False: 1.14M]
  |  |  ------------------
  ------------------
  176|  2.51M|  return var;
  177|  2.51M|}
ixheaacd_mps_parse.c:ixheaacd_mps_de_quantize:
  994|  3.53M|static FLOAT32 ixheaacd_mps_de_quantize(WORD32 value, WORD32 param_type) {
  995|  3.53M|  switch (param_type) {
  996|  1.26M|    case CLD:
  ------------------
  |  |   23|  1.26M|#define CLD (0)
  ------------------
  |  Branch (996:5): [True: 1.26M, False: 2.27M]
  ------------------
  997|  1.26M|      return ixheaacd_cld_de_quant_table[(value + 15)];
  998|       |
  999|  1.25M|    case ICC:
  ------------------
  |  |   24|  1.25M|#define ICC (1)
  ------------------
  |  Branch (999:5): [True: 1.25M, False: 2.27M]
  ------------------
 1000|  1.25M|      return ixheaacd_icc_de_quant_table[value];
 1001|       |
 1002|  1.01M|    case IPD:
  ------------------
  |  |   25|  1.01M|#define IPD (2)
  ------------------
  |  Branch (1002:5): [True: 1.01M, False: 2.51M]
  ------------------
 1003|  1.01M|      return ixheaacd_ipd_de_quant_table[(value & 15)];
 1004|       |
 1005|      0|    default:
  ------------------
  |  Branch (1005:5): [True: 0, False: 3.53M]
  ------------------
 1006|      0|      return 0;
 1007|      0|      return 0;
 1008|  3.53M|  }
 1009|  3.53M|}
ixheaacd_mps_parse.c:ixheaacd_mps_dec_and_mapframesmg:
 1194|  81.7k|static VOID ixheaacd_mps_dec_and_mapframesmg(ia_mps_dec_state_struct *self) {
 1195|  81.7k|  WORD32 ps, pb, pg, ch_fac, data_bands, param_band_start, param_band_stop,
 1196|  81.7k|      group_to_band[MAX_PARAMETER_BANDS + 1];
 1197|  81.7k|  ia_mps_bs_frame *frame = &(self->bs_frame);
 1198|   177k|  for (ps = 0; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (1198:16): [True: 95.5k, False: 81.7k]
  ------------------
 1199|  95.5k|    switch (frame->bs_smooth_mode[ps]) {
  ------------------
  |  Branch (1199:13): [True: 95.5k, False: 0]
  ------------------
 1200|  83.1k|      case 0:
  ------------------
  |  Branch (1200:7): [True: 83.1k, False: 12.3k]
  ------------------
 1201|  83.1k|        self->smoothing_time[ps] = 256;
 1202|  83.1k|        self->inv_smoothing_time[ps] = (FLOAT32)(1.0f / 256.0f);
 1203|       |
 1204|  1.16M|        for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1204:22): [True: 1.08M, False: 83.1k]
  ------------------
 1205|  1.08M|          self->smoothing_data[ps][pb] = 0;
 1206|  1.08M|        }
 1207|  83.1k|        break;
 1208|       |
 1209|  2.94k|      case 1:
  ------------------
  |  Branch (1209:7): [True: 2.94k, False: 92.5k]
  ------------------
 1210|  2.94k|        if (ps > 0) {
  ------------------
  |  Branch (1210:13): [True: 930, False: 2.01k]
  ------------------
 1211|    930|          self->smoothing_time[ps] = self->smoothing_time[ps - 1];
 1212|    930|          self->inv_smoothing_time[ps] = self->inv_smoothing_time[ps - 1];
 1213|  2.01k|        } else {
 1214|  2.01k|          self->smoothing_time[ps] = self->smoothing_filt_state.prev_smg_time;
 1215|  2.01k|          self->inv_smoothing_time[ps] =
 1216|  2.01k|              self->smoothing_filt_state.inv_prev_smg_time;
 1217|  2.01k|        }
 1218|       |
 1219|  38.6k|        for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1219:22): [True: 35.6k, False: 2.94k]
  ------------------
 1220|  35.6k|          if (ps > 0)
  ------------------
  |  Branch (1220:15): [True: 11.8k, False: 23.7k]
  ------------------
 1221|  11.8k|            self->smoothing_data[ps][pb] = self->smoothing_data[ps - 1][pb];
 1222|  23.7k|          else
 1223|  23.7k|            self->smoothing_data[ps][pb] =
 1224|  23.7k|                self->smoothing_filt_state.prev_smg_data[pb];
 1225|  35.6k|        }
 1226|  2.94k|        break;
 1227|       |
 1228|  6.38k|      case 2:
  ------------------
  |  Branch (1228:7): [True: 6.38k, False: 89.1k]
  ------------------
 1229|  6.38k|        self->smoothing_time[ps] =
 1230|  6.38k|            ixheaacd_smoothing_time_table[frame->bs_smooth_time[ps]];
 1231|  6.38k|        self->inv_smoothing_time[ps] =
 1232|  6.38k|            ixheaacd_inverse_smoothing_time_table[frame->bs_smooth_time[ps]];
 1233|  96.7k|        for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1233:22): [True: 90.3k, False: 6.38k]
  ------------------
 1234|  90.3k|          self->smoothing_data[ps][pb] = 1;
 1235|  90.3k|        }
 1236|  6.38k|        break;
 1237|       |
 1238|  3.05k|      case 3:
  ------------------
  |  Branch (1238:7): [True: 3.05k, False: 92.4k]
  ------------------
 1239|  3.05k|        self->smoothing_time[ps] =
 1240|  3.05k|            ixheaacd_smoothing_time_table[frame->bs_smooth_time[ps]];
 1241|  3.05k|        self->inv_smoothing_time[ps] =
 1242|  3.05k|            ixheaacd_inverse_smoothing_time_table[frame->bs_smooth_time[ps]];
 1243|       |
 1244|  3.05k|        ch_fac = ixheaacd_mps_stride_table[frame->bs_freq_res_stride_smg[ps]];
 1245|  3.05k|        data_bands = (self->bs_param_bands - 1) / ch_fac + 1;
 1246|  3.05k|        ixheaacd_mps_createmapping(group_to_band, 0, self->bs_param_bands,
 1247|  3.05k|                                   ch_fac);
 1248|  29.0k|        for (pg = 0; pg < data_bands; pg++) {
  ------------------
  |  Branch (1248:22): [True: 25.9k, False: 3.05k]
  ------------------
 1249|  25.9k|          param_band_start = group_to_band[pg];
 1250|  25.9k|          param_band_stop = group_to_band[pg + 1];
 1251|  72.1k|          for (pb = param_band_start; pb < param_band_stop; pb++) {
  ------------------
  |  Branch (1251:39): [True: 46.1k, False: 25.9k]
  ------------------
 1252|  46.1k|            self->smoothing_data[ps][pb] = frame->bs_smg_data[ps][pg];
 1253|  46.1k|          }
 1254|  25.9k|        }
 1255|  3.05k|        break;
 1256|  95.5k|    }
 1257|  95.5k|  }
 1258|       |
 1259|  81.7k|  self->smoothing_filt_state.prev_smg_time =
 1260|  81.7k|      self->smoothing_time[self->num_parameter_sets - 1];
 1261|  81.7k|  self->smoothing_filt_state.inv_prev_smg_time =
 1262|  81.7k|      self->inv_smoothing_time[self->num_parameter_sets - 1];
 1263|  1.13M|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1263:16): [True: 1.05M, False: 81.7k]
  ------------------
 1264|  1.05M|    self->smoothing_filt_state.prev_smg_data[pb] =
 1265|  1.05M|        self->smoothing_data[self->num_parameter_sets - 1][pb];
 1266|  1.05M|  }
 1267|       |
 1268|  81.7k|  if (self->ext_frame_flag) {
  ------------------
  |  Branch (1268:7): [True: 3.21k, False: 78.5k]
  ------------------
 1269|  3.21k|    self->smoothing_time[self->num_parameter_sets] =
 1270|  3.21k|        self->smoothing_time[self->num_parameter_sets - 1];
 1271|  3.21k|    self->inv_smoothing_time[self->num_parameter_sets] =
 1272|  3.21k|        self->inv_smoothing_time[self->num_parameter_sets - 1];
 1273|  34.0k|    for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1273:18): [True: 30.8k, False: 3.21k]
  ------------------
 1274|  30.8k|      self->smoothing_data[self->num_parameter_sets][pb] =
 1275|  30.8k|          self->smoothing_data[self->num_parameter_sets - 1][pb];
 1276|  30.8k|    }
 1277|  3.21k|  }
 1278|  81.7k|}

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

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

ixheaacd_pre_and_mix_matrix_calculation:
  104|  79.5k|VOID ixheaacd_pre_and_mix_matrix_calculation(ia_mps_dec_state_struct *self) {
  105|  79.5k|  WORD32 ps, pb;
  106|  79.5k|  ia_mps_bs_frame *curr_bit_stream = &(self->bs_frame);
  107|  79.5k|  FLOAT32 h_imag[2 * MAX_PARAMETER_BANDS];
  108|  79.5k|  FLOAT32 h_real[6 * MAX_PARAMETER_BANDS];
  109|       |
  110|  79.5k|  ixheaacd_mps_buffer_pre_and_mix_matrix(self);
  111|       |
  112|   174k|  for (ps = 0; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (112:16): [True: 94.7k, False: 79.5k]
  ------------------
  113|  94.7k|    FLOAT32 *h_im = &h_imag[0];
  114|  94.7k|    FLOAT32 *h_re = &h_real[0];
  115|       |
  116|  94.7k|    memset(h_real, 0, 6 * MAX_PARAMETER_BANDS * sizeof(FLOAT32));
  ------------------
  |  |   55|  94.7k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  117|  94.7k|    memset(h_imag, 0, 2 * MAX_PARAMETER_BANDS * sizeof(FLOAT32));
  ------------------
  |  |   55|  94.7k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  118|       |
  119|  94.7k|    switch (self->config->bs_phase_coding) {
  ------------------
  |  Branch (119:13): [True: 94.7k, False: 0]
  ------------------
  120|  19.4k|      case 0:
  ------------------
  |  Branch (120:7): [True: 19.4k, False: 75.2k]
  ------------------
  121|  19.4k|        if (self->residual_coding) {
  ------------------
  |  Branch (121:13): [True: 14.5k, False: 4.94k]
  ------------------
  122|  14.5k|          ixheaacd_mps_par2umx_pred(self, curr_bit_stream, h_imag, h_real, ps,
  123|  14.5k|                                    self->res_bands);
  124|  14.5k|        } else {
  125|  4.94k|          ixheaacd_mps_par2umx_ps(self, curr_bit_stream, h_real, ps);
  126|  4.94k|        }
  127|       |
  128|  19.4k|        break;
  129|  19.2k|      case 1:
  ------------------
  |  Branch (129:7): [True: 19.2k, False: 75.5k]
  ------------------
  130|  19.2k|        ixheaacd_mps_par2umx_ps_ipd_opd(self, curr_bit_stream, h_real, ps);
  131|  19.2k|        break;
  132|  56.0k|      case 2:
  ------------------
  |  Branch (132:7): [True: 56.0k, False: 38.7k]
  ------------------
  133|  56.0k|        ixheaacd_mps_par2umx_pred(self, curr_bit_stream, h_imag, h_real, ps,
  134|  56.0k|                                  self->res_bands);
  135|  56.0k|        break;
  136|  94.7k|    }
  137|       |
  138|  1.30M|    for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (138:18): [True: 1.20M, False: 94.7k]
  ------------------
  139|  1.20M|      self->m1_param_re[ps][pb][0][0] = 1.0f;
  140|  1.20M|      self->m1_param_re[ps][pb][1][0] = 1.0f;
  141|       |
  142|  1.20M|      self->m1_param_im[ps][pb][0][0] = 0;
  143|  1.20M|      self->m1_param_im[ps][pb][1][0] = 0;
  144|       |
  145|  1.20M|      self->m2_resid_re[ps][pb][0][0] = *h_re++;
  146|  1.20M|      self->m2_resid_im[ps][pb][0][0] = *h_im++;
  147|  1.20M|      self->m2_resid_im[ps][pb][0][1] = 0;
  148|       |
  149|  1.20M|      self->m2_resid_re[ps][pb][1][0] = *h_re++;
  150|  1.20M|      self->m2_resid_im[ps][pb][1][0] = *h_im++;
  151|  1.20M|      self->m2_resid_im[ps][pb][1][1] = 0;
  152|       |
  153|  1.20M|      self->m2_decor_re[ps][pb][0][0] = 0;
  154|  1.20M|      self->m2_decor_im[ps][pb][0][0] = 0;
  155|  1.20M|      self->m2_decor_re[ps][pb][0][1] = *h_re++;
  156|  1.20M|      self->m2_decor_im[ps][pb][0][1] = 0;
  157|       |
  158|  1.20M|      self->m2_decor_re[ps][pb][1][0] = 0;
  159|  1.20M|      self->m2_decor_im[ps][pb][1][0] = 0;
  160|  1.20M|      self->m2_decor_re[ps][pb][1][1] = *h_re++;
  161|  1.20M|      self->m2_decor_im[ps][pb][1][1] = 0;
  162|       |
  163|  1.20M|      self->m2_resid_re[ps][pb][0][1] = *h_re++;
  164|  1.20M|      self->m2_resid_re[ps][pb][1][1] = *h_re++;
  165|  1.20M|    }
  166|  94.7k|  }
  167|  79.5k|  ixheaacd_mps_smoothing_opd(self);
  168|  79.5k|}
ixheaacd_mps_par2umx_ps:
  205|  4.94k|                             WORD32 param_set_idx) {
  206|  4.94k|  ixheaacd_mps_par2umx_ps_core(curr_bit_stream->cld_idx[param_set_idx],
  207|  4.94k|                               curr_bit_stream->icc_idx[param_set_idx],
  208|  4.94k|                               self->bs_param_bands, h_real);
  209|  4.94k|}
ixheaacd_mps_par2umx_ps_ipd_opd:
  231|  19.2k|                                     FLOAT32 *h_real, WORD32 param_set_idx) {
  232|  19.2k|  WORD32 opd[MAX_PARAMETER_BANDS];
  233|  19.2k|  WORD32 ott_band_count = self->bs_param_bands;
  234|  19.2k|  WORD32 num_bands_ipd = self->num_bands_ipd;
  235|  19.2k|  WORD32 band;
  236|       |
  237|  19.2k|  ixheaacd_mps_par2umx_ps_core(curr_bit_stream->cld_idx[param_set_idx],
  238|  19.2k|                               curr_bit_stream->icc_idx[param_set_idx],
  239|  19.2k|                               ott_band_count, h_real);
  240|       |
  241|  19.2k|  if (self->bs_phase_mode) {
  ------------------
  |  Branch (241:7): [True: 2.78k, False: 16.4k]
  ------------------
  242|  2.78k|    ixheaacd_mps_opd_calc(self, curr_bit_stream, param_set_idx, opd);
  243|       |
  244|  24.6k|    for (band = 0; band < num_bands_ipd; band++) {
  ------------------
  |  Branch (244:20): [True: 21.8k, False: 2.78k]
  ------------------
  245|  21.8k|      WORD32 ipd_idx = curr_bit_stream->ipd_idx[param_set_idx][band] & 15;
  246|  21.8k|      WORD32 ipd = ixheaacd_ipd_de_quant_table_q28[ipd_idx];
  247|       |
  248|  21.8k|      self->phase_l[param_set_idx][band] =
  249|  21.8k|          ixheaacd_mps_phase_wraping(opd[band]) * ONE_BY_Q28_FLOAT_VAL;
  ------------------
  |  |   48|  21.8k|#define ONE_BY_Q28_FLOAT_VAL (1.0f / Q28_FLOAT_VAL)
  |  |  ------------------
  |  |  |  |   47|  21.8k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  |  |  ------------------
  ------------------
  250|  21.8k|      self->phase_r[param_set_idx][band] =
  251|  21.8k|          ixheaacd_mps_phase_wraping(opd[band] - ipd) * ONE_BY_Q28_FLOAT_VAL;
  ------------------
  |  |   48|  21.8k|#define ONE_BY_Q28_FLOAT_VAL (1.0f / Q28_FLOAT_VAL)
  |  |  ------------------
  |  |  |  |   47|  21.8k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  |  |  ------------------
  ------------------
  252|  21.8k|    }
  253|  16.4k|  } else {
  254|  16.4k|    num_bands_ipd = 0;
  255|  16.4k|  }
  256|       |
  257|   253k|  for (band = num_bands_ipd; band < ott_band_count; band++) {
  ------------------
  |  Branch (257:30): [True: 234k, False: 19.2k]
  ------------------
  258|   234k|    self->phase_l[param_set_idx][band] = 0;
  259|   234k|    self->phase_r[param_set_idx][band] = 0;
  260|   234k|  }
  261|  19.2k|}
ixheaacd_mps_par2umx_pred:
  266|  70.5k|                               WORD32 param_set_idx, WORD32 res_bands) {
  267|  70.5k|  WORD32 band;
  268|       |
  269|   988k|  for (band = 0; band < self->bs_param_bands; band++) {
  ------------------
  |  Branch (269:18): [True: 918k, False: 70.5k]
  ------------------
  270|   918k|    WORD32 cld_idx = curr_bit_stream->cld_idx[param_set_idx][band] + 15;
  271|   918k|    WORD32 icc_idx = curr_bit_stream->icc_idx[param_set_idx][band];
  272|   918k|    WORD32 ipd_idx = curr_bit_stream->ipd_idx[param_set_idx][band] & 15;
  273|       |
  274|   918k|    if ((band < self->num_bands_ipd) && (cld_idx == 15) && (icc_idx == 0) &&
  ------------------
  |  Branch (274:9): [True: 543k, False: 375k]
  |  Branch (274:41): [True: 473k, False: 69.4k]
  |  Branch (274:60): [True: 428k, False: 44.8k]
  ------------------
  275|   428k|        (ipd_idx == 8)) {
  ------------------
  |  Branch (275:9): [True: 3.52k, False: 425k]
  ------------------
  276|  3.52k|      FLOAT32 gain = 0.416666667f;
  277|  3.52k|      *h_imag++ = 0;
  278|  3.52k|      *h_imag++ = 0;
  279|       |
  280|  3.52k|      if (band < res_bands) {
  ------------------
  |  Branch (280:11): [True: 637, False: 2.89k]
  ------------------
  281|    637|        *h_real++ = gain;
  282|    637|        *h_real++ = gain;
  283|    637|        h_real += 2;
  284|       |
  285|    637|        *h_real++ = gain;
  286|    637|        *h_real++ = -gain;
  287|  2.89k|      } else {
  288|  2.89k|        *h_real++ = gain;
  289|  2.89k|        *h_real++ = -gain;
  290|       |
  291|  2.89k|        h_real += 4;
  292|  2.89k|      }
  293|   914k|    } else {
  294|   914k|      FLOAT32 weight, re_weight, im_weight;
  295|       |
  296|   914k|      weight = ixheaacd_weight[ipd_idx][icc_idx][cld_idx];
  297|   914k|      re_weight = ixheaacd_re_weight[ipd_idx][icc_idx][cld_idx];
  298|   914k|      im_weight = ixheaacd_im_weight[ipd_idx][icc_idx][cld_idx];
  299|       |
  300|   914k|      if (band < self->num_bands_ipd) {
  ------------------
  |  Branch (300:11): [True: 539k, False: 375k]
  ------------------
  301|   539k|        weight = ixheaacd_weight[ipd_idx][icc_idx][cld_idx];
  302|   539k|        re_weight = ixheaacd_re_weight[ipd_idx][icc_idx][cld_idx];
  303|   539k|        im_weight = ixheaacd_im_weight[ipd_idx][icc_idx][cld_idx];
  304|   539k|      } else {
  305|   375k|        weight = ixheaacd_weight[0][icc_idx][cld_idx];
  306|   375k|        re_weight = ixheaacd_re_weight[0][icc_idx][cld_idx];
  307|   375k|        im_weight = ixheaacd_im_weight[0][icc_idx][cld_idx];
  308|   375k|      }
  309|       |
  310|   914k|      *h_real++ = weight - re_weight;
  311|   914k|      *h_imag++ = -im_weight;
  312|   914k|      *h_real++ = weight + re_weight;
  313|   914k|      *h_imag++ = im_weight;
  314|       |
  315|   914k|      if (band < res_bands) {
  ------------------
  |  Branch (315:11): [True: 432k, False: 482k]
  ------------------
  316|   432k|        h_real += 2;
  317|       |
  318|   432k|        *h_real++ = weight;
  319|   432k|        *h_real++ = -weight;
  320|   482k|      } else {
  321|   482k|        FLOAT32 beta = ixheaacd_beta[ipd_idx][icc_idx][cld_idx];
  322|       |
  323|   482k|        *h_real++ = beta;
  324|   482k|        *h_real++ = -beta;
  325|   482k|        h_real += 2;
  326|   482k|      }
  327|   914k|    }
  328|   918k|  }
  329|  70.5k|}
ixheaacd_mps_apply_pre_matrix:
  331|  15.6k|VOID ixheaacd_mps_apply_pre_matrix(ia_mps_dec_state_struct *self) {
  332|  15.6k|  WORD32 ts, qs, row;
  333|  15.6k|  if (self->pre_mix_req) {
  ------------------
  |  Branch (333:7): [True: 5.77k, False: 9.83k]
  ------------------
  334|  5.77k|    ixheaacd_mps_upmix_interp_type1(
  335|  5.77k|        self->m1_param_re, self->r_out_re_in_m1, self->m1_param_re_prev,
  336|  5.77k|        (self->dir_sig_count + self->decor_sig_count), 1, self, self->bs_high_rate_mode);
  337|       |
  338|   254k|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (338:18): [True: 248k, False: 5.77k]
  ------------------
  339|   746k|      for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (339:20): [True: 497k, False: 248k]
  ------------------
  340|   497k|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  341|       |
  342|   497k|        FLOAT32 real =
  343|   497k|            self->hyb_in[0][qs][ts].re * self->r_out_re_in_m1[ts][indx][0][0];
  344|   497k|        FLOAT32 imag =
  345|   497k|            self->hyb_in[0][qs][ts].im * self->r_out_re_in_m1[ts][indx][0][0];
  346|  1.49M|        for (row = 0; row < (self->dir_sig_count + self->decor_sig_count);
  ------------------
  |  Branch (346:23): [True: 995k, False: 497k]
  ------------------
  347|   995k|             row++) {
  348|   995k|          self->v[row][ts][qs].re = real;
  349|   995k|          self->v[row][ts][qs].im = imag;
  350|   995k|        }
  351|   497k|      }
  352|  10.1M|      for (qs = 2; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (352:20): [True: 9.90M, False: 248k]
  ------------------
  353|  9.90M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  354|  9.90M|        FLOAT32 real =
  355|  9.90M|            self->hyb_in[0][qs][ts].re * self->r_out_re_in_m1[ts][indx][0][0];
  356|  9.90M|        FLOAT32 imag =
  357|  9.90M|            self->hyb_in[0][qs][ts].im * self->r_out_re_in_m1[ts][indx][0][0];
  358|  29.7M|        for (row = 0; row < (self->dir_sig_count + self->decor_sig_count);
  ------------------
  |  Branch (358:23): [True: 19.8M, False: 9.90M]
  ------------------
  359|  19.8M|             row++) {
  360|  19.8M|          self->v[row][ts][qs].re = real;
  361|  19.8M|          self->v[row][ts][qs].im = imag;
  362|  19.8M|        }
  363|  9.90M|      }
  364|   248k|    }
  365|  9.83k|  } else {
  366|   424k|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (366:18): [True: 414k, False: 9.83k]
  ------------------
  367|  13.5M|      for (qs = 0; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (367:20): [True: 13.1M, False: 414k]
  ------------------
  368|  13.1M|        FLOAT32 real = self->hyb_in[0][qs][ts].re;
  369|  13.1M|        FLOAT32 imag = self->hyb_in[0][qs][ts].im;
  370|  39.4M|        for (row = 0; row < (self->dir_sig_count + self->decor_sig_count);
  ------------------
  |  Branch (370:23): [True: 26.3M, False: 13.1M]
  ------------------
  371|  26.3M|             row++) {
  372|  26.3M|          self->v[row][ts][qs].re = real;
  373|  26.3M|          self->v[row][ts][qs].im = imag;
  374|  26.3M|        }
  375|  13.1M|      }
  376|   414k|    }
  377|  9.83k|  }
  378|  15.6k|  return;
  379|  15.6k|}
ixheaacd_mps_apply_mix_matrix_type1:
  587|  12.2k|VOID ixheaacd_mps_apply_mix_matrix_type1(ia_mps_dec_state_struct *self) {
  588|  12.2k|  WORD32 ts, qs, row;
  589|       |
  590|  12.2k|  ixheaacd_mps_upmix_interp_type2(self->m2_decor_re, self->r_out_diff_re_in_m2,
  591|  12.2k|                                  self->m2_decor_re_prev, self->out_ch_count, self, 1);
  592|       |
  593|  12.2k|  ixheaacd_mps_upmix_interp_type2(self->m2_resid_re, self->r_out_re_in_m2, self->m2_resid_re_prev,
  594|  12.2k|                                  self->out_ch_count, self, 0);
  595|       |
  596|   612k|  for (qs = 0; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (596:16): [True: 600k, False: 12.2k]
  ------------------
  597|   600k|    WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  598|  19.4M|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (598:18): [True: 18.8M, False: 600k]
  ------------------
  599|  56.5M|      for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (599:21): [True: 37.6M, False: 18.8M]
  ------------------
  600|  37.6M|        self->hyb_dir_out[row][ts][qs].re =
  601|  37.6M|            self->w_dir[0][ts][qs].re * self->r_out_re_in_m2[ts][indx][row][0];
  602|  37.6M|        self->hyb_dir_out[row][ts][qs].im =
  603|  37.6M|            self->w_dir[0][ts][qs].im * self->r_out_re_in_m2[ts][indx][row][0];
  604|  37.6M|        self->hyb_diff_out[row][ts][qs].re =
  605|  37.6M|            self->w_diff[1][ts][qs].re *
  606|  37.6M|            self->r_out_diff_re_in_m2[ts][indx][row][1];
  607|  37.6M|        self->hyb_diff_out[row][ts][qs].im =
  608|  37.6M|            self->w_diff[1][ts][qs].im *
  609|  37.6M|            self->r_out_diff_re_in_m2[ts][indx][row][1];
  610|  37.6M|      }
  611|  18.8M|    }
  612|   600k|  }
  613|  12.2k|  return;
  614|  12.2k|}
ixheaacd_mps_apply_mix_matrix_type2:
  616|  5.77k|VOID ixheaacd_mps_apply_mix_matrix_type2(ia_mps_dec_state_struct *self) {
  617|  5.77k|  WORD32 ts, qs, row, col;
  618|  5.77k|  WORD32 complex_m2 = ((self->config->bs_phase_coding != 0));
  619|  5.77k|  WORD32 phase_interpolation = (self->config->bs_phase_coding == 1);
  620|  5.77k|  WORD32 num_col_iters = 0;
  621|       |
  622|  5.77k|  ixheaacd_mps_upmix_interp_type1(self->m2_decor_re, self->r_out_diff_re_in_m2,
  623|  5.77k|                                  self->m2_decor_re_prev, self->out_ch_count,
  624|  5.77k|                                  (self->dir_sig_count + self->decor_sig_count), self, 1);
  625|  5.77k|  ixheaacd_mps_upmix_interp_type1(self->m2_resid_re, self->r_out_re_in_m2, self->m2_resid_re_prev,
  626|  5.77k|                                  self->out_ch_count,
  627|  5.77k|                                  (self->dir_sig_count + self->decor_sig_count), self, 1);
  628|       |
  629|  5.77k|  if (complex_m2 && !phase_interpolation) {
  ------------------
  |  Branch (629:7): [True: 4.89k, False: 878]
  |  Branch (629:21): [True: 2.64k, False: 2.25k]
  ------------------
  630|  2.64k|    ixheaacd_mps_upmix_interp_type1(self->m2_decor_im, self->r_out_diff_im_in_m2,
  631|  2.64k|                                    self->m2_decor_im_prev, self->out_ch_count,
  632|  2.64k|                                    (self->dir_sig_count + self->decor_sig_count), self, 1);
  633|  2.64k|    ixheaacd_mps_upmix_interp_type1(self->m2_resid_im, self->r_out_im_in_m2,
  634|  2.64k|                                    self->m2_resid_im_prev, self->out_ch_count,
  635|  2.64k|                                    (self->dir_sig_count + self->decor_sig_count), self, 1);
  636|  2.64k|  }
  637|       |
  638|  5.77k|  if (phase_interpolation) {
  ------------------
  |  Branch (638:7): [True: 2.25k, False: 3.52k]
  ------------------
  639|  2.25k|    ixheaacd_mps_phase_interpolation(
  640|  2.25k|        self->phase_l, self->phase_r, self->phase_l_prev, self->phase_r_prev,
  641|  2.25k|        self->r_out_ph_re_in_m2, self->r_out_ph_im_in_m2, self);
  642|       |
  643|  74.5k|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (643:18): [True: 72.2k, False: 2.25k]
  ------------------
  644|  72.2k|      WORD32 pb;
  645|  1.40M|      for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (645:20): [True: 1.33M, False: 72.2k]
  ------------------
  646|  1.33M|        self->r_out_im_in_m2[ts][pb][0][0] =
  647|  1.33M|            self->r_out_re_in_m2[ts][pb][0][0] *
  648|  1.33M|            self->r_out_ph_im_in_m2[ts][pb][0];
  649|       |
  650|  1.33M|        self->r_out_im_in_m2[ts][pb][0][1] =
  651|  1.33M|            self->r_out_re_in_m2[ts][pb][0][1] *
  652|  1.33M|            self->r_out_ph_im_in_m2[ts][pb][0];
  653|  1.33M|        self->r_out_im_in_m2[ts][pb][1][0] =
  654|  1.33M|            self->r_out_re_in_m2[ts][pb][1][0] *
  655|  1.33M|            self->r_out_ph_im_in_m2[ts][pb][1];
  656|       |
  657|  1.33M|        self->r_out_im_in_m2[ts][pb][1][1] =
  658|  1.33M|            self->r_out_re_in_m2[ts][pb][1][1] *
  659|  1.33M|            self->r_out_ph_im_in_m2[ts][pb][1];
  660|       |
  661|  1.33M|        self->r_out_re_in_m2[ts][pb][0][0] =
  662|  1.33M|            self->r_out_re_in_m2[ts][pb][0][0] *
  663|  1.33M|            self->r_out_ph_re_in_m2[ts][pb][0];
  664|       |
  665|  1.33M|        self->r_out_re_in_m2[ts][pb][0][1] =
  666|  1.33M|            self->r_out_re_in_m2[ts][pb][0][1] *
  667|  1.33M|            self->r_out_ph_re_in_m2[ts][pb][0];
  668|       |
  669|  1.33M|        self->r_out_re_in_m2[ts][pb][1][0] =
  670|  1.33M|            self->r_out_re_in_m2[ts][pb][1][0] *
  671|  1.33M|            self->r_out_ph_re_in_m2[ts][pb][1];
  672|       |
  673|  1.33M|        self->r_out_re_in_m2[ts][pb][1][1] =
  674|  1.33M|            self->r_out_re_in_m2[ts][pb][1][1] *
  675|  1.33M|            self->r_out_ph_re_in_m2[ts][pb][1];
  676|       |
  677|  1.33M|        self->r_out_diff_im_in_m2[ts][pb][0][0] = 0;
  678|  1.33M|        self->r_out_diff_im_in_m2[ts][pb][0][1] =
  679|  1.33M|            self->r_out_diff_re_in_m2[ts][pb][0][1] *
  680|  1.33M|            self->r_out_ph_im_in_m2[ts][pb][0];
  681|       |
  682|  1.33M|        self->r_out_diff_im_in_m2[ts][pb][1][0] = 0;
  683|  1.33M|        self->r_out_diff_im_in_m2[ts][pb][1][1] =
  684|  1.33M|            self->r_out_diff_re_in_m2[ts][pb][1][1] *
  685|  1.33M|            self->r_out_ph_im_in_m2[ts][pb][1];
  686|       |
  687|  1.33M|        self->r_out_diff_re_in_m2[ts][pb][0][0] = 0;
  688|  1.33M|        self->r_out_diff_re_in_m2[ts][pb][0][1] =
  689|  1.33M|            self->r_out_diff_re_in_m2[ts][pb][0][1] *
  690|  1.33M|            self->r_out_ph_re_in_m2[ts][pb][0];
  691|       |
  692|  1.33M|        self->r_out_diff_re_in_m2[ts][pb][1][0] = 0;
  693|  1.33M|        self->r_out_diff_re_in_m2[ts][pb][1][1] =
  694|  1.33M|            self->r_out_diff_re_in_m2[ts][pb][1][1] *
  695|  1.33M|            self->r_out_ph_re_in_m2[ts][pb][1];
  696|  1.33M|      }
  697|  72.2k|    }
  698|  2.25k|  }
  699|  5.77k|  if (self->res_bands == 0) {
  ------------------
  |  Branch (699:7): [True: 2.93k, False: 2.83k]
  ------------------
  700|  2.93k|    num_col_iters = self->dir_sig_count;
  701|  2.93k|  } else {
  702|  2.83k|    num_col_iters = (self->dir_sig_count + self->decor_sig_count);
  703|  2.83k|  }
  704|   254k|  for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (704:16): [True: 248k, False: 5.77k]
  ------------------
  705|  11.0M|    for (qs = 0; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (705:18): [True: 10.7M, False: 248k]
  ------------------
  706|  10.7M|      WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  707|       |
  708|  32.2M|      for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (708:21): [True: 21.5M, False: 10.7M]
  ------------------
  709|  21.5M|        FLOAT32 sum_re_dir = 0;
  710|  21.5M|        FLOAT32 sum_im_dir = 0;
  711|  53.0M|        for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (711:23): [True: 31.5M, False: 21.5M]
  ------------------
  712|  31.5M|          sum_re_dir += self->w_dir[col][ts][qs].re *
  713|  31.5M|                        self->r_out_re_in_m2[ts][indx][row][col];
  714|  31.5M|          sum_im_dir += self->w_dir[col][ts][qs].im *
  715|  31.5M|                        self->r_out_re_in_m2[ts][indx][row][col];
  716|  31.5M|        }
  717|  21.5M|        self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  718|  21.5M|        self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  719|       |
  720|  21.5M|        self->hyb_diff_out[row][ts][qs].re =
  721|  21.5M|            self->w_diff[1][ts][qs].re *
  722|  21.5M|            self->r_out_diff_re_in_m2[ts][indx][row][1];
  723|  21.5M|        self->hyb_diff_out[row][ts][qs].im =
  724|  21.5M|            self->w_diff[1][ts][qs].im *
  725|  21.5M|            self->r_out_diff_re_in_m2[ts][indx][row][1];
  726|  21.5M|      }
  727|  10.7M|    }
  728|   248k|  }
  729|       |
  730|  5.77k|  if (complex_m2) {
  ------------------
  |  Branch (730:7): [True: 4.89k, False: 878]
  ------------------
  731|  4.89k|    if (phase_interpolation) {
  ------------------
  |  Branch (731:9): [True: 2.25k, False: 2.64k]
  ------------------
  732|  74.5k|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (732:20): [True: 72.2k, False: 2.25k]
  ------------------
  733|   216k|        for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (733:22): [True: 144k, False: 72.2k]
  ------------------
  734|   144k|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  735|   433k|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (735:25): [True: 289k, False: 144k]
  ------------------
  736|   289k|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
  737|   289k|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
  738|   578k|            for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (738:27): [True: 289k, False: 289k]
  ------------------
  739|   289k|              sum_re_dir += self->w_dir[col][ts][qs].im *
  740|   289k|                            self->r_out_im_in_m2[ts][indx][row][col];
  741|   289k|              sum_im_dir -= self->w_dir[col][ts][qs].re *
  742|   289k|                            self->r_out_im_in_m2[ts][indx][row][col];
  743|   289k|            }
  744|   289k|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  745|   289k|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  746|   289k|            self->hyb_diff_out[row][ts][qs].re +=
  747|   289k|                self->w_diff[1][ts][qs].im *
  748|   289k|                self->r_out_diff_im_in_m2[ts][indx][row][1];
  749|   289k|            self->hyb_diff_out[row][ts][qs].im -=
  750|   289k|                self->w_diff[1][ts][qs].re *
  751|   289k|                self->r_out_diff_im_in_m2[ts][indx][row][1];
  752|   289k|          }
  753|   144k|        }
  754|  4.83M|        for (qs = 2; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (754:22): [True: 4.76M, False: 72.2k]
  ------------------
  755|  4.76M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  756|  14.2M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (756:25): [True: 9.52M, False: 4.76M]
  ------------------
  757|  9.52M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
  758|  9.52M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
  759|  19.0M|            for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (759:27): [True: 9.52M, False: 9.52M]
  ------------------
  760|  9.52M|              sum_re_dir -= self->w_dir[col][ts][qs].im *
  761|  9.52M|                            self->r_out_im_in_m2[ts][indx][row][col];
  762|  9.52M|              sum_im_dir += self->w_dir[col][ts][qs].re *
  763|  9.52M|                            self->r_out_im_in_m2[ts][indx][row][col];
  764|  9.52M|            }
  765|  9.52M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  766|  9.52M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  767|  9.52M|            self->hyb_diff_out[row][ts][qs].re -=
  768|  9.52M|                self->w_diff[1][ts][qs].im *
  769|  9.52M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
  770|  9.52M|            self->hyb_diff_out[row][ts][qs].im +=
  771|  9.52M|                self->w_diff[1][ts][qs].re *
  772|  9.52M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
  773|  9.52M|          }
  774|  4.76M|        }
  775|  72.2k|      }
  776|  2.64k|    } else {
  777|  2.64k|      WORD32 num_cols = (self->dir_sig_count + self->decor_sig_count) > 1
  ------------------
  |  Branch (777:25): [True: 2.64k, False: 0]
  ------------------
  778|  2.64k|                         ? 1
  779|  2.64k|                         : (self->dir_sig_count + self->decor_sig_count);
  780|   154k|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (780:20): [True: 152k, False: 2.64k]
  ------------------
  781|   456k|        for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (781:22): [True: 304k, False: 152k]
  ------------------
  782|   304k|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  783|   912k|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (783:25): [True: 608k, False: 304k]
  ------------------
  784|   608k|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
  785|   608k|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
  786|   608k|            if (num_cols > 0) {
  ------------------
  |  Branch (786:17): [True: 608k, False: 0]
  ------------------
  787|   608k|              sum_re_dir += self->w_dir[0][ts][qs].im *
  788|   608k|                            self->r_out_im_in_m2[ts][indx][row][0];
  789|   608k|              sum_im_dir -= self->w_dir[0][ts][qs].re *
  790|   608k|                            self->r_out_im_in_m2[ts][indx][row][0];
  791|   608k|            }
  792|   608k|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  793|   608k|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  794|   608k|          }
  795|   304k|        }
  796|  4.54M|        for (qs = 2; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (796:22): [True: 4.39M, False: 152k]
  ------------------
  797|  4.39M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  798|  13.1M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (798:25): [True: 8.79M, False: 4.39M]
  ------------------
  799|  8.79M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
  800|  8.79M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
  801|  8.79M|            if (num_cols > 0) {
  ------------------
  |  Branch (801:17): [True: 8.79M, False: 0]
  ------------------
  802|  8.79M|              sum_re_dir -= self->w_dir[0][ts][qs].im *
  803|  8.79M|                            self->r_out_im_in_m2[ts][indx][row][0];
  804|  8.79M|              sum_im_dir += self->w_dir[0][ts][qs].re *
  805|  8.79M|                            self->r_out_im_in_m2[ts][indx][row][0];
  806|  8.79M|            }
  807|  8.79M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  808|  8.79M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  809|  8.79M|          }
  810|  4.39M|        }
  811|   152k|      }
  812|  2.64k|    }
  813|  4.89k|  }
  814|  5.77k|  return;
  815|  5.77k|}
ixheaacd_mps_apply_mix_matrix_type3:
  817|  63.6k|VOID ixheaacd_mps_apply_mix_matrix_type3(ia_mps_dec_state_struct *self) {
  818|  63.6k|  WORD32 ts, qs, row, col;
  819|  63.6k|  WORD32 complex_m2 = ((self->config->bs_phase_coding != 0));
  820|  63.6k|  WORD32 phase_interpolation = (self->config->bs_phase_coding == 1);
  821|  63.6k|  WORD32 num_col_iters = 0;
  822|       |
  823|  63.6k|  if (self->res_bands != 28) {
  ------------------
  |  Branch (823:7): [True: 54.0k, False: 9.66k]
  ------------------
  824|  54.0k|    ixheaacd_mps_upmix_interp_type2(self->m2_decor_re, self->r_out_diff_re_in_m2,
  825|  54.0k|                                    self->m2_decor_re_prev, self->out_ch_count, self, 1);
  826|  54.0k|  }
  827|  63.6k|  if (self->res_bands == 0) {
  ------------------
  |  Branch (827:7): [True: 21.2k, False: 42.4k]
  ------------------
  828|  21.2k|    num_col_iters = self->dir_sig_count;
  829|  21.2k|    ixheaacd_mps_upmix_interp_type2(self->m2_resid_re, self->r_out_re_in_m2,
  830|  21.2k|                                    self->m2_resid_re_prev, self->out_ch_count, self, 0);
  831|  42.4k|  } else {
  832|  42.4k|    num_col_iters = (self->dir_sig_count + self->decor_sig_count);
  833|  42.4k|    ixheaacd_mps_upmix_interp_type1(self->m2_resid_re, self->r_out_re_in_m2,
  834|  42.4k|                                    self->m2_resid_re_prev, self->out_ch_count,
  835|  42.4k|                                    (self->dir_sig_count + self->decor_sig_count), self, 1);
  836|  42.4k|  }
  837|       |
  838|  63.6k|  if (complex_m2 && !phase_interpolation) {
  ------------------
  |  Branch (838:7): [True: 57.9k, False: 5.78k]
  |  Branch (838:21): [True: 46.5k, False: 11.4k]
  ------------------
  839|  46.5k|    ixheaacd_mps_upmix_interp_type2(self->m2_resid_im, self->r_out_im_in_m2,
  840|  46.5k|                                    self->m2_resid_im_prev, self->out_ch_count, self, 0);
  841|  46.5k|  }
  842|       |
  843|  63.6k|  if (phase_interpolation) {
  ------------------
  |  Branch (843:7): [True: 11.4k, False: 52.2k]
  ------------------
  844|  11.4k|    ixheaacd_mps_phase_interpolation(
  845|  11.4k|        self->phase_l, self->phase_r, self->phase_l_prev, self->phase_r_prev,
  846|  11.4k|        self->r_out_ph_re_in_m2, self->r_out_ph_im_in_m2, self);
  847|       |
  848|  11.4k|    if (self->res_bands == 0) {
  ------------------
  |  Branch (848:9): [True: 11.4k, False: 0]
  ------------------
  849|   376k|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (849:20): [True: 365k, False: 11.4k]
  ------------------
  850|   365k|        WORD32 pb;
  851|  3.84M|        for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (851:22): [True: 3.48M, False: 365k]
  ------------------
  852|  3.48M|          self->r_out_im_in_m2[ts][pb][0][0] =
  853|  3.48M|              self->r_out_re_in_m2[ts][pb][0][0] *
  854|  3.48M|              self->r_out_ph_im_in_m2[ts][pb][0];
  855|       |
  856|  3.48M|          self->r_out_im_in_m2[ts][pb][1][0] =
  857|  3.48M|              self->r_out_re_in_m2[ts][pb][1][0] *
  858|  3.48M|              self->r_out_ph_im_in_m2[ts][pb][1];
  859|       |
  860|  3.48M|          self->r_out_re_in_m2[ts][pb][0][0] =
  861|  3.48M|              self->r_out_re_in_m2[ts][pb][0][0] *
  862|  3.48M|              self->r_out_ph_re_in_m2[ts][pb][0];
  863|       |
  864|  3.48M|          self->r_out_re_in_m2[ts][pb][1][0] =
  865|  3.48M|              self->r_out_re_in_m2[ts][pb][1][0] *
  866|  3.48M|              self->r_out_ph_re_in_m2[ts][pb][1];
  867|       |
  868|  3.48M|          self->r_out_diff_im_in_m2[ts][pb][0][1] =
  869|  3.48M|              self->r_out_diff_re_in_m2[ts][pb][0][1] *
  870|  3.48M|              self->r_out_ph_im_in_m2[ts][pb][0];
  871|       |
  872|  3.48M|          self->r_out_diff_im_in_m2[ts][pb][1][1] =
  873|  3.48M|              self->r_out_diff_re_in_m2[ts][pb][1][1] *
  874|  3.48M|              self->r_out_ph_im_in_m2[ts][pb][1];
  875|       |
  876|  3.48M|          self->r_out_diff_re_in_m2[ts][pb][0][1] =
  877|  3.48M|              self->r_out_diff_re_in_m2[ts][pb][0][1] *
  878|  3.48M|              self->r_out_ph_re_in_m2[ts][pb][0];
  879|       |
  880|  3.48M|          self->r_out_diff_re_in_m2[ts][pb][1][1] =
  881|  3.48M|              self->r_out_diff_re_in_m2[ts][pb][1][1] *
  882|  3.48M|              self->r_out_ph_re_in_m2[ts][pb][1];
  883|  3.48M|        }
  884|   365k|      }
  885|  11.4k|    } 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|  11.4k|  }
  977|  63.6k|  if (self->res_bands == 0) {
  ------------------
  |  Branch (977:7): [True: 21.2k, False: 42.4k]
  ------------------
  978|   704k|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (978:18): [True: 683k, False: 21.2k]
  ------------------
  979|  30.8M|      for (qs = 0; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (979:20): [True: 30.1M, False: 683k]
  ------------------
  980|  30.1M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  981|  90.3M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (981:23): [True: 60.2M, False: 30.1M]
  ------------------
  982|  60.2M|          self->hyb_dir_out[row][ts][qs].re =
  983|  60.2M|              self->w_dir[0][ts][qs].re *
  984|  60.2M|              self->r_out_re_in_m2[ts][indx][row][0];
  985|  60.2M|          self->hyb_dir_out[row][ts][qs].im =
  986|  60.2M|              self->w_dir[0][ts][qs].im *
  987|  60.2M|              self->r_out_re_in_m2[ts][indx][row][0];
  988|  60.2M|          self->hyb_diff_out[row][ts][qs].re =
  989|  60.2M|              self->w_diff[1][ts][qs].re *
  990|  60.2M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
  991|  60.2M|          self->hyb_diff_out[row][ts][qs].im =
  992|  60.2M|              self->w_diff[1][ts][qs].im *
  993|  60.2M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
  994|  60.2M|        }
  995|  30.1M|      }
  996|   683k|    }
  997|  42.4k|  } else if (self->res_bands == 28) {
  ------------------
  |  Branch (997:14): [True: 9.66k, False: 32.8k]
  ------------------
  998|   319k|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (998:18): [True: 309k, False: 9.66k]
  ------------------
  999|  12.3M|      for (qs = 0; qs < self->hyb_band_count[1]; qs++) {
  ------------------
  |  Branch (999:20): [True: 12.0M, False: 309k]
  ------------------
 1000|  12.0M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1001|  36.1M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1001:23): [True: 24.1M, False: 12.0M]
  ------------------
 1002|  24.1M|          FLOAT32 sum_re_dir = 0;
 1003|  24.1M|          FLOAT32 sum_im_dir = 0;
 1004|  72.3M|          for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1004:25): [True: 48.2M, False: 24.1M]
  ------------------
 1005|  48.2M|            sum_re_dir += self->w_dir[col][ts][qs].re *
 1006|  48.2M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1007|  48.2M|            sum_im_dir += self->w_dir[col][ts][qs].im *
 1008|  48.2M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1009|  48.2M|          }
 1010|  24.1M|          self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1011|  24.1M|          self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1012|  24.1M|        }
 1013|  12.0M|      }
 1014|   330k|      for (; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (1014:14): [True: 20.6k, False: 309k]
  ------------------
 1015|  20.6k|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1016|  62.0k|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1016:23): [True: 41.3k, False: 20.6k]
  ------------------
 1017|  41.3k|          self->hyb_dir_out[row][ts][qs].re =
 1018|  41.3k|              self->w_dir[0][ts][qs].re *
 1019|  41.3k|              self->r_out_re_in_m2[ts][indx][row][0];
 1020|  41.3k|          self->hyb_dir_out[row][ts][qs].im =
 1021|  41.3k|              self->w_dir[0][ts][qs].im *
 1022|  41.3k|              self->r_out_re_in_m2[ts][indx][row][0];
 1023|  41.3k|        }
 1024|  20.6k|      }
 1025|   309k|    }
 1026|  32.8k|  } else {
 1027|  32.8k|    WORD32 dif_s = ixheaacd_mps_gain_set_indx[self->res_bands];
 1028|  1.44M|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (1028:18): [True: 1.41M, False: 32.8k]
  ------------------
 1029|  24.2M|      for (qs = 0; qs < dif_s; qs++) {
  ------------------
  |  Branch (1029:20): [True: 22.8M, False: 1.41M]
  ------------------
 1030|  22.8M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1031|  68.5M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1031:23): [True: 45.7M, False: 22.8M]
  ------------------
 1032|  45.7M|          FLOAT32 sum_re_dir = 0;
 1033|  45.7M|          FLOAT32 sum_im_dir = 0;
 1034|   137M|          for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1034:25): [True: 91.4M, False: 45.7M]
  ------------------
 1035|  91.4M|            sum_re_dir += self->w_dir[col][ts][qs].re *
 1036|  91.4M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1037|  91.4M|            sum_im_dir += self->w_dir[col][ts][qs].im *
 1038|  91.4M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1039|  91.4M|          }
 1040|  45.7M|          self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1041|  45.7M|          self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1042|  45.7M|        }
 1043|  22.8M|      }
 1044|  24.4M|      for (; qs < self->hyb_band_count[1]; qs++) {
  ------------------
  |  Branch (1044:14): [True: 23.0M, False: 1.41M]
  ------------------
 1045|  23.0M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1046|  69.2M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1046:23): [True: 46.1M, False: 23.0M]
  ------------------
 1047|  46.1M|          FLOAT32 sum_re_dir = 0;
 1048|  46.1M|          FLOAT32 sum_im_dir = 0;
 1049|   138M|          for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1049:25): [True: 92.3M, False: 46.1M]
  ------------------
 1050|  92.3M|            sum_re_dir += self->w_dir[col][ts][qs].re *
 1051|  92.3M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1052|  92.3M|            sum_im_dir += self->w_dir[col][ts][qs].im *
 1053|  92.3M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1054|  92.3M|          }
 1055|  46.1M|          self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1056|  46.1M|          self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1057|  46.1M|          self->hyb_diff_out[row][ts][qs].re =
 1058|  46.1M|              self->w_diff[1][ts][qs].re *
 1059|  46.1M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
 1060|  46.1M|          self->hyb_diff_out[row][ts][qs].im =
 1061|  46.1M|              self->w_diff[1][ts][qs].im *
 1062|  46.1M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
 1063|  46.1M|        }
 1064|  23.0M|      }
 1065|  17.2M|      for (; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (1065:14): [True: 15.8M, False: 1.41M]
  ------------------
 1066|  15.8M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1067|  47.4M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1067:23): [True: 31.6M, False: 15.8M]
  ------------------
 1068|  31.6M|          self->hyb_dir_out[row][ts][qs].re =
 1069|  31.6M|              self->w_dir[0][ts][qs].re *
 1070|  31.6M|              self->r_out_re_in_m2[ts][indx][row][0];
 1071|  31.6M|          self->hyb_dir_out[row][ts][qs].im =
 1072|  31.6M|              self->w_dir[0][ts][qs].im *
 1073|  31.6M|              self->r_out_re_in_m2[ts][indx][row][0];
 1074|  31.6M|          self->hyb_diff_out[row][ts][qs].re =
 1075|  31.6M|              self->w_diff[1][ts][qs].re *
 1076|  31.6M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
 1077|  31.6M|          self->hyb_diff_out[row][ts][qs].im =
 1078|  31.6M|              self->w_diff[1][ts][qs].im *
 1079|  31.6M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
 1080|  31.6M|        }
 1081|  15.8M|      }
 1082|  1.41M|    }
 1083|  32.8k|  }
 1084|       |
 1085|  63.6k|  if (complex_m2) {
  ------------------
  |  Branch (1085:7): [True: 57.9k, False: 5.78k]
  ------------------
 1086|  57.9k|    if (phase_interpolation) {
  ------------------
  |  Branch (1086:9): [True: 11.4k, False: 46.5k]
  ------------------
 1087|   376k|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (1087:20): [True: 365k, False: 11.4k]
  ------------------
 1088|  1.09M|        for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (1088:22): [True: 730k, False: 365k]
  ------------------
 1089|   730k|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1090|  2.19M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1090:25): [True: 1.46M, False: 730k]
  ------------------
 1091|  1.46M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
 1092|  1.46M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
 1093|  2.92M|            for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1093:27): [True: 1.46M, False: 1.46M]
  ------------------
 1094|  1.46M|              sum_re_dir += self->w_dir[col][ts][qs].im *
 1095|  1.46M|                            self->r_out_im_in_m2[ts][indx][row][col];
 1096|  1.46M|              sum_im_dir -= self->w_dir[col][ts][qs].re *
 1097|  1.46M|                            self->r_out_im_in_m2[ts][indx][row][col];
 1098|  1.46M|            }
 1099|  1.46M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1100|  1.46M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1101|  1.46M|            self->hyb_diff_out[row][ts][qs].re +=
 1102|  1.46M|                self->w_diff[1][ts][qs].im *
 1103|  1.46M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
 1104|  1.46M|            self->hyb_diff_out[row][ts][qs].im -=
 1105|  1.46M|                self->w_diff[1][ts][qs].re *
 1106|  1.46M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
 1107|  1.46M|          }
 1108|   730k|        }
 1109|  22.6M|        for (qs = 2; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (1109:22): [True: 22.2M, False: 365k]
  ------------------
 1110|  22.2M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1111|  66.8M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1111:25): [True: 44.5M, False: 22.2M]
  ------------------
 1112|  44.5M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
 1113|  44.5M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
 1114|  89.0M|            for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1114:27): [True: 44.5M, False: 44.5M]
  ------------------
 1115|  44.5M|              sum_re_dir -= self->w_dir[col][ts][qs].im *
 1116|  44.5M|                            self->r_out_im_in_m2[ts][indx][row][col];
 1117|  44.5M|              sum_im_dir += self->w_dir[col][ts][qs].re *
 1118|  44.5M|                            self->r_out_im_in_m2[ts][indx][row][col];
 1119|  44.5M|            }
 1120|  44.5M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1121|  44.5M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1122|  44.5M|            self->hyb_diff_out[row][ts][qs].re -=
 1123|  44.5M|                self->w_diff[1][ts][qs].im *
 1124|  44.5M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
 1125|  44.5M|            self->hyb_diff_out[row][ts][qs].im +=
 1126|  44.5M|                self->w_diff[1][ts][qs].re *
 1127|  44.5M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
 1128|  44.5M|          }
 1129|  22.2M|        }
 1130|   365k|      }
 1131|  46.5k|    } else {
 1132|  46.5k|      WORD32 num_cols = (self->dir_sig_count + self->decor_sig_count) > 1
  ------------------
  |  Branch (1132:25): [True: 46.5k, False: 0]
  ------------------
 1133|  46.5k|                         ? 1
 1134|  46.5k|                         : (self->dir_sig_count + self->decor_sig_count);
 1135|  1.86M|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (1135:20): [True: 1.81M, False: 46.5k]
  ------------------
 1136|  5.45M|        for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (1136:22): [True: 3.63M, False: 1.81M]
  ------------------
 1137|  3.63M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1138|  10.9M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1138:25): [True: 7.26M, False: 3.63M]
  ------------------
 1139|  7.26M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
 1140|  7.26M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
 1141|  7.26M|            if (num_cols > 0) {
  ------------------
  |  Branch (1141:17): [True: 7.26M, False: 0]
  ------------------
 1142|  7.26M|              sum_re_dir += self->w_dir[0][ts][qs].im *
 1143|  7.26M|                            self->r_out_im_in_m2[ts][indx][row][0];
 1144|  7.26M|              sum_im_dir -= self->w_dir[0][ts][qs].re *
 1145|  7.26M|                            self->r_out_im_in_m2[ts][indx][row][0];
 1146|  7.26M|            }
 1147|  7.26M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1148|  7.26M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1149|  7.26M|          }
 1150|  3.63M|        }
 1151|  71.1M|        for (qs = 2; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (1151:22): [True: 69.3M, False: 1.81M]
  ------------------
 1152|  69.3M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1153|   208M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1153:25): [True: 138M, False: 69.3M]
  ------------------
 1154|   138M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
 1155|   138M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
 1156|   138M|            if (num_cols > 0) {
  ------------------
  |  Branch (1156:17): [True: 138M, False: 0]
  ------------------
 1157|   138M|              sum_re_dir -= self->w_dir[0][ts][qs].im *
 1158|   138M|                            self->r_out_im_in_m2[ts][indx][row][0];
 1159|   138M|              sum_im_dir += self->w_dir[0][ts][qs].re *
 1160|   138M|                            self->r_out_im_in_m2[ts][indx][row][0];
 1161|   138M|            }
 1162|   138M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1163|   138M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1164|   138M|          }
 1165|  69.3M|        }
 1166|  1.81M|      }
 1167|  46.5k|    }
 1168|  57.9k|  }
 1169|  63.6k|  return;
 1170|  63.6k|}
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|   954k|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1227:16): [True: 889k, False: 65.0k]
  ------------------
 1228|  2.66M|    for (row = 0; row < num_rows; row++) {
  ------------------
  |  Branch (1228:19): [True: 1.77M, False: 889k]
  ------------------
 1229|  5.18M|      for (col = 0; col < num_cols; col++) {
  ------------------
  |  Branch (1229:21): [True: 3.40M, False: 1.77M]
  ------------------
 1230|  3.40M|        ts = 0;
 1231|  3.40M|        ps = 0;
 1232|  3.40M|        ks = self->inv_param_slot_diff[ps];
 1233|  3.40M|        ms = m_matrix[ps][pb][row][col];
 1234|  3.40M|        ls = m_matrix_prev[pb][row][col];
 1235|  3.40M|        fl_step = ks * (ms - ls);
 1236|  3.40M|        fl_base = ls + fl_step;
 1237|       |
 1238|   100M|        for (i = 1; i <= (WORD32)self->param_slot_diff[0]; i++) {
  ------------------
  |  Branch (1238:21): [True: 96.8M, False: 3.40M]
  ------------------
 1239|  96.8M|          r_matrix_float[ts][pb][row][col] = fl_base;
 1240|  96.8M|          fl_base += fl_step;
 1241|  96.8M|          ts++;
 1242|  96.8M|        }
 1243|  3.40M|        if (bs_high_rate_mode) {
  ------------------
  |  Branch (1243:13): [True: 3.38M, False: 18.0k]
  ------------------
 1244|  5.17M|          for (ps = 1; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (1244:24): [True: 1.78M, False: 3.38M]
  ------------------
 1245|  1.78M|            ks = self->inv_param_slot_diff[ps];
 1246|  1.78M|            ms = m_matrix[ps][pb][row][col];
 1247|  1.78M|            ls = m_matrix[ps - 1][pb][row][col];
 1248|  1.78M|            fl_step = ks * (ms - ls);
 1249|  1.78M|            fl_base = ls + fl_step;
 1250|       |
 1251|  30.3M|            for (i = 1; i <= self->param_slot_diff[ps]; i++) {
  ------------------
  |  Branch (1251:25): [True: 28.5M, False: 1.78M]
  ------------------
 1252|  28.5M|              r_matrix_float[ts][pb][row][col] = fl_base;
 1253|  28.5M|              fl_base += fl_step;
 1254|  28.5M|              ts++;
 1255|  28.5M|            }
 1256|  1.78M|          }
 1257|  3.38M|        }
 1258|  3.40M|      }
 1259|  1.77M|    }
 1260|   889k|  }
 1261|  65.0k|  return;
 1262|  65.0k|}
ixheaacd_mps_upmix_interp_type2:
 1268|   146k|    ia_mps_dec_state_struct *self, WORD32 col) {
 1269|   146k|  WORD32 ts, ps, pb, row, i;
 1270|   146k|  FLOAT32 ks, ms, ls;
 1271|   146k|  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: 146k]
  ------------------
 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.05M|      for (ps = 1; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (1288:20): [True: 378k, False: 3.67M]
  ------------------
 1289|   378k|        ks = self->inv_param_slot_diff[ps];
 1290|   378k|        ms = m_matrix[ps][pb][row][col];
 1291|   378k|        ls = m_matrix[ps - 1][pb][row][col];
 1292|   378k|        fl_step = ks * (ms - ls);
 1293|   378k|        fl_base = ls + fl_step;
 1294|       |
 1295|  6.17M|        for (i = 1; i <= (WORD32)self->param_slot_diff[ps]; i++) {
  ------------------
  |  Branch (1295:21): [True: 5.79M, False: 378k]
  ------------------
 1296|  5.79M|          r_matrix_float[ts][pb][row][col] = fl_base;
 1297|  5.79M|          fl_base += fl_step;
 1298|  5.79M|          ts++;
 1299|  5.79M|        }
 1300|   378k|      }
 1301|  3.67M|    }
 1302|  1.83M|  }
 1303|   146k|  return;
 1304|   146k|}
ixheaacd_mps_phase_interpolation:
 1324|  13.6k|    ia_mps_dec_state_struct *self) {
 1325|  13.6k|  WORD32 i, ts, ps, pb;
 1326|  13.6k|  FLOAT32 step_l, step_r, alpha, tl, tr;
 1327|   164k|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1327:16): [True: 150k, False: 13.6k]
  ------------------
 1328|   150k|    ps = 0;
 1329|   150k|    ts = 0;
 1330|   150k|    alpha = (FLOAT32)self->inv_param_slot_diff[ps];
 1331|   150k|    tl = ixheaacd_mps_angle_interpolation(pl_prev[pb], pl[ps][pb], alpha,
 1332|   150k|                                          &step_l);
 1333|   150k|    tr = ixheaacd_mps_angle_interpolation(pr_prev[pb], pr[ps][pb], alpha,
 1334|   150k|                                          &step_r);
 1335|   150k|    step_l *= alpha;
 1336|   150k|    step_r *= alpha;
 1337|       |
 1338|  3.82M|    for (i = 1; i <= self->param_slot_diff[ps]; i++) {
  ------------------
  |  Branch (1338:17): [True: 3.67M, False: 150k]
  ------------------
 1339|  3.67M|      r_re[ts][pb][0] = (FLOAT32)cos(tl);
 1340|  3.67M|      r_im[ts][pb][0] = (FLOAT32)sin(tl);
 1341|  3.67M|      tl += step_l;
 1342|       |
 1343|  3.67M|      r_re[ts][pb][1] = (FLOAT32)cos(tr);
 1344|  3.67M|      r_im[ts][pb][1] = (FLOAT32)sin(tr);
 1345|  3.67M|      tr += step_r;
 1346|  3.67M|      ts++;
 1347|  3.67M|    }
 1348|       |
 1349|   254k|    for (ps = 1; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (1349:18): [True: 103k, False: 150k]
  ------------------
 1350|   103k|      FLOAT32 alpha = self->inv_param_slot_diff[ps];
 1351|   103k|      tl = ixheaacd_mps_angle_interpolation(pl[ps - 1][pb], pl[ps][pb], alpha,
 1352|   103k|                                            &step_l);
 1353|   103k|      tr = ixheaacd_mps_angle_interpolation(pr[ps - 1][pb], pr[ps][pb], alpha,
 1354|   103k|                                            &step_r);
 1355|   103k|      step_l *= alpha;
 1356|   103k|      step_r *= alpha;
 1357|  1.24M|      for (i = 1; i <= self->param_slot_diff[ps]; i++) {
  ------------------
  |  Branch (1357:19): [True: 1.14M, False: 103k]
  ------------------
 1358|  1.14M|        if (ts < 72 && pb < 28) {
  ------------------
  |  Branch (1358:13): [True: 1.14M, False: 0]
  |  Branch (1358:24): [True: 1.14M, False: 0]
  ------------------
 1359|  1.14M|          r_re[ts][pb][0] = (FLOAT32)cos(tl);
 1360|  1.14M|          r_im[ts][pb][0] = (FLOAT32)sin(tl);
 1361|  1.14M|          tl += step_l;
 1362|       |
 1363|  1.14M|          r_re[ts][pb][1] = (FLOAT32)cos(tr);
 1364|  1.14M|          r_im[ts][pb][1] = (FLOAT32)sin(tr);
 1365|  1.14M|          tr += step_r;
 1366|  1.14M|        }
 1367|  1.14M|        ts++;
 1368|       |
 1369|  1.14M|        if (ts > 71) {
  ------------------
  |  Branch (1369:13): [True: 0, False: 1.14M]
  ------------------
 1370|      0|          ts = 0;
 1371|      0|          break;
 1372|      0|        }
 1373|  1.14M|        if (pb > 27) {
  ------------------
  |  Branch (1373:13): [True: 0, False: 1.14M]
  ------------------
 1374|      0|          pb = 0;
 1375|      0|          break;
 1376|      0|        }
 1377|  1.14M|      }
 1378|   103k|    }
 1379|   150k|  }
 1380|  13.6k|}
ixheaacd_mps_init_pre_and_post_matrix:
 1382|  2.26k|VOID ixheaacd_mps_init_pre_and_post_matrix(ia_mps_dec_state_struct *self) {
 1383|  2.26k|  memset(self->m1_param_re_prev, 0,
 1384|  2.26k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  2.26k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  2.26k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  2.26k|#define MAX_M_INPUT (2)
  ------------------
 1385|  2.26k|  memset(self->m1_param_im_prev, 0,
 1386|  2.26k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  2.26k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  2.26k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  2.26k|#define MAX_M_INPUT (2)
  ------------------
 1387|  2.26k|  memset(self->m1_param_re_prev, 0,
 1388|  2.26k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  2.26k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  2.26k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  2.26k|#define MAX_M_INPUT (2)
  ------------------
 1389|  2.26k|  memset(self->m2_decor_re_prev, 0,
 1390|  2.26k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  2.26k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  2.26k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  2.26k|#define MAX_M_INPUT (2)
  ------------------
 1391|  2.26k|  memset(self->m2_resid_re_prev, 0,
 1392|  2.26k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  2.26k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  2.26k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  2.26k|#define MAX_M_INPUT (2)
  ------------------
 1393|  2.26k|  memset(self->m2_resid_im_prev, 0,
 1394|  2.26k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  2.26k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  2.26k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  2.26k|#define MAX_M_INPUT (2)
  ------------------
 1395|  2.26k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_buffer_pre_and_mix_matrix:
   74|  79.5k|    ia_mps_dec_state_struct *self) {
   75|  79.5k|  WORD32 pb, row, col;
   76|       |
   77|  1.08M|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (77:16): [True: 1.00M, False: 79.5k]
  ------------------
   78|  3.02M|    for (row = 0; row < MAX_M_INPUT; row++) {
  ------------------
  |  |   62|  3.02M|#define MAX_M_INPUT (2)
  ------------------
  |  Branch (78:19): [True: 2.01M, False: 1.00M]
  ------------------
   79|  6.05M|      for (col = 0; col < MAX_M_OUTPUT; col++) {
  ------------------
  |  |   63|  6.05M|#define MAX_M_OUTPUT (2)
  ------------------
  |  Branch (79:21): [True: 4.03M, False: 2.01M]
  ------------------
   80|  4.03M|        self->m1_param_re_prev[pb][row][col] =
   81|  4.03M|            self->m1_param_re[self->num_parameter_sets_prev - 1][pb][row][col];
   82|  4.03M|        self->m1_param_im_prev[pb][row][col] =
   83|  4.03M|            self->m1_param_im[self->num_parameter_sets_prev - 1][pb][row][col];
   84|  4.03M|        self->m2_decor_re_prev[pb][row][col] =
   85|  4.03M|            self->m2_decor_re[self->num_parameter_sets_prev - 1][pb][row][col];
   86|  4.03M|        self->m2_decor_im_prev[pb][row][col] =
   87|  4.03M|            self->m2_decor_im[self->num_parameter_sets_prev - 1][pb][row][col];
   88|  4.03M|        self->m2_resid_re_prev[pb][row][col] =
   89|  4.03M|            self->m2_resid_re[self->num_parameter_sets_prev - 1][pb][row][col];
   90|  4.03M|        self->m2_resid_im_prev[pb][row][col] =
   91|  4.03M|            self->m2_resid_im[self->num_parameter_sets_prev - 1][pb][row][col];
   92|  4.03M|      }
   93|  2.01M|    }
   94|  1.00M|  }
   95|       |
   96|  1.08M|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (96:16): [True: 1.00M, False: 79.5k]
  ------------------
   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|  79.5k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_par2umx_ps_core:
  173|  24.1k|                                         FLOAT32 *h_real) {
  174|  24.1k|  WORD32 band;
  175|  24.1k|  FLOAT32 c_l_temp, c_r_temp, temp;
  176|  24.1k|  WORD32 cld_idx, icc_idx;
  177|       |
  178|   312k|  for (band = 0; band < ott_band_count; band++) {
  ------------------
  |  Branch (178:18): [True: 288k, False: 24.1k]
  ------------------
  179|   288k|    cld_idx = *cld++ + 15;
  180|   288k|    icc_idx = *icc++;
  181|       |
  182|   288k|    icc_idx = icc_idx & 7;
  183|       |
  184|   288k|    c_l_temp = (ixheaacd_c_l_table[cld_idx]);
  185|   288k|    c_r_temp = (ixheaacd_c_l_table[30 - cld_idx]);
  186|       |
  187|   288k|    temp = ixheaacd_cos_table[icc_idx][cld_idx];
  188|   288k|    *h_real++ = MULT(temp, c_l_temp);
  ------------------
  |  |   46|   288k|#define MULT(a, b) (a * b)
  ------------------
  189|       |
  190|   288k|    temp = ixheaacd_cos_table[icc_idx][30 - cld_idx];
  191|   288k|    *h_real++ = MULT(temp, c_r_temp);
  ------------------
  |  |   46|   288k|#define MULT(a, b) (a * b)
  ------------------
  192|       |
  193|   288k|    temp = ixheaacd_sin_table[icc_idx][cld_idx];
  194|   288k|    *h_real++ = MULT(temp, c_l_temp);
  ------------------
  |  |   46|   288k|#define MULT(a, b) (a * b)
  ------------------
  195|       |
  196|   288k|    temp = -ixheaacd_sin_table[icc_idx][30 - cld_idx];
  197|   288k|    *h_real++ = MULT(temp, c_r_temp);
  ------------------
  |  |   46|   288k|#define MULT(a, b) (a * b)
  ------------------
  198|       |
  199|   288k|    h_real += 2;
  200|   288k|  }
  201|  24.1k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_opd_calc:
  214|  2.78k|                                  WORD32 opd[MAX_PARAMETER_BANDS]) {
  215|  2.78k|  WORD32 band;
  216|       |
  217|  24.6k|  for (band = 0; band < self->num_bands_ipd; band++) {
  ------------------
  |  Branch (217:18): [True: 21.8k, False: 2.78k]
  ------------------
  218|  21.8k|    WORD32 cld_idx = curr_bit_stream->cld_idx[param_set_idx][band] + 15;
  219|  21.8k|    WORD32 ipd_idx = (curr_bit_stream->ipd_idx[param_set_idx][band]) & 15;
  220|  21.8k|    WORD32 icc_idx = curr_bit_stream->icc_idx[param_set_idx][band];
  221|       |
  222|  21.8k|    if ((cld_idx == 15) && (ipd_idx == 8))
  ------------------
  |  Branch (222:9): [True: 17.6k, False: 4.19k]
  |  Branch (222:28): [True: 516, False: 17.1k]
  ------------------
  223|    516|      opd[band] = 0;
  224|  21.3k|    else
  225|  21.3k|      opd[band] = ixheaacd_atan_table_Q28[ipd_idx][icc_idx][cld_idx];
  226|  21.8k|  }
  227|  2.78k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_phase_wraping:
   63|  43.6k|static WORD32 ixheaacd_mps_phase_wraping(WORD32 phase) {
   64|  43.6k|  const WORD32 pi_2 = 2 * PI_IN_Q28;
  ------------------
  |  |   45|  43.6k|#define PI_IN_Q28 843314880
  ------------------
   65|       |
   66|  62.4k|  while (phase < 0) phase += pi_2;
  ------------------
  |  Branch (66:10): [True: 18.7k, False: 43.6k]
  ------------------
   67|  43.6k|  while (phase >= pi_2) phase -= pi_2;
  ------------------
  |  Branch (67:10): [True: 0, False: 43.6k]
  ------------------
   68|  43.6k|  assert((phase >= 0) && (phase < pi_2));
  ------------------
  |  Branch (68:3): [True: 0, False: 43.6k]
  |  Branch (68:3): [True: 0, False: 0]
  |  Branch (68:3): [True: 43.6k, False: 0]
  |  Branch (68:3): [True: 43.6k, False: 0]
  ------------------
   69|       |
   70|  43.6k|  return phase;
   71|  43.6k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_angle_interpolation:
 1307|   508k|                                                FLOAT32 alpha, FLOAT32 *step) {
 1308|   513k|  while (angle2 - angle1 > (FLOAT32)P_PI) {
  ------------------
  |  |   44|   513k|#define P_PI 3.1415926535897932
  ------------------
  |  Branch (1308:10): [True: 5.16k, False: 508k]
  ------------------
 1309|  5.16k|    angle1 = angle1 + 2.0f * (FLOAT32)P_PI;
  ------------------
  |  |   44|  5.16k|#define P_PI 3.1415926535897932
  ------------------
 1310|  5.16k|  }
 1311|   513k|  while (angle1 - angle2 > (FLOAT32)P_PI) {
  ------------------
  |  |   44|   513k|#define P_PI 3.1415926535897932
  ------------------
  |  Branch (1311:10): [True: 4.61k, False: 508k]
  ------------------
 1312|  4.61k|    angle2 = angle2 + 2.0f * (FLOAT32)P_PI;
  ------------------
  |  |   44|  4.61k|#define P_PI 3.1415926535897932
  ------------------
 1313|  4.61k|  }
 1314|   508k|  *step = angle2 - angle1;
 1315|   508k|  return (1 - alpha) * angle1 + alpha * angle2;
 1316|   508k|}

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

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

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

ixheaacd_res_get_sfb_offsets:
   30|  1.22k|    ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
   31|  1.22k|  if (p_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  1.22k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (31:7): [True: 747, False: 481]
  ------------------
   32|    747|    return aac_tables_ptr->sfb_index_long;
   33|    747|  } else {
   34|    481|    return aac_tables_ptr->sfb_index_short;
   35|    481|  }
   36|  1.22k|}
ixheaacd_res_get_sfb_width:
   39|    992|                                        ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
   40|    992|  if (p_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|    992|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (40:7): [True: 662, False: 330]
  ------------------
   41|    662|    return aac_tables_ptr->sfb_index_long_width;
   42|    662|  } else {
   43|    330|    return aac_tables_ptr->sfb_index_short_width;
   44|    330|  }
   45|    992|}
ixheaacd_res_ics_read:
   49|  1.08k|                             WORD8 tot_sf_bands_ls[2]) {
   50|  1.08k|  WORD i;
   51|  1.08k|  WORD mask;
   52|  1.08k|  WORD tmp = 0;
   53|       |
   54|  1.08k|  tmp = ixheaacd_read_bits_buf(it_bif_buf, 4);
   55|  1.08k|  p_ics_info->window_sequence = (WORD16)((tmp & 0x6) >> 1);
   56|       |
   57|  1.08k|  if (p_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  1.08k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (57:7): [True: 710, False: 370]
  ------------------
   58|    710|    p_ics_info->total_sf_bands = tot_sf_bands_ls[0];
   59|       |
   60|    710|    p_ics_info->window_groups = 1;
   61|    710|    p_ics_info->window_group_length[0] = 1;
   62|       |
   63|    710|    tmp = ixheaacd_read_bits_buf(it_bif_buf, 7);
   64|    710|    p_ics_info->max_sf_bands = (tmp & 0x7E) >> 1;
   65|       |
   66|    710|    if (tmp & 1) {
  ------------------
  |  Branch (66:9): [True: 9, False: 701]
  ------------------
   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|    710|  } else {
   70|    370|    WORD32 win_grp = 0, tmp2;
   71|    370|    p_ics_info->total_sf_bands = tot_sf_bands_ls[1];
   72|       |
   73|    370|    tmp = ixheaacd_read_bits_buf(it_bif_buf, 11);
   74|    370|    p_ics_info->max_sf_bands = (tmp & 0x780) >> 7;
   75|       |
   76|    370|    tmp2 = (tmp & 0x7F);
   77|       |
   78|  2.94k|    for (i = 0; i < 7; i++) {
  ------------------
  |  Branch (78:17): [True: 2.57k, False: 370]
  ------------------
   79|  2.57k|      mask = (1 << sub_d(6, i));
  ------------------
  |  |   24|  2.57k|#define sub_d(a, b) ((a) - (b))
  ------------------
   80|  2.57k|      p_ics_info->window_group_length[i] = 1;
   81|  2.57k|      if (tmp2 & mask) {
  ------------------
  |  Branch (81:11): [True: 1.95k, False: 625]
  ------------------
   82|  1.95k|        p_ics_info->window_group_length[win_grp] =
   83|  1.95k|            add_d(p_ics_info->window_group_length[win_grp], 1);
  ------------------
  |  |   23|  1.95k|#define add_d(a, b) ((a) + (b))
  ------------------
   84|  1.95k|      } else {
   85|    625|        win_grp = add_d(win_grp, 1);
  ------------------
  |  |   23|    625|#define add_d(a, b) ((a) + (b))
  ------------------
   86|    625|      }
   87|  2.57k|    }
   88|       |
   89|    370|    p_ics_info->window_group_length[7] = 1;
   90|    370|    p_ics_info->window_groups = add_d(win_grp, 1);
  ------------------
  |  |   23|    370|#define add_d(a, b) ((a) + (b))
  ------------------
   91|    370|  }
   92|       |
   93|  1.07k|  if (p_ics_info->max_sf_bands > p_ics_info->total_sf_bands)
  ------------------
  |  Branch (93:7): [True: 3, False: 1.06k]
  ------------------
   94|      3|    return (WORD16)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED;
  ------------------
  |  |  103|      3|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED 0x00001808
  ------------------
   95|       |
   96|  1.06k|  return AAC_DEC_OK;
  ------------------
  |  |   25|  1.06k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  1.06k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
   97|  1.07k|}

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

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

ixheaacd_res_c_pulse_data_read:
   28|  1.04k|                                      ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
   29|  1.04k|  WORD32 i, k;
   30|  1.04k|  WORD32 error = 0;
   31|  1.04k|  pulse_data->pulse_data_present = (FLAG)ixheaacd_read_bits_buf(it_bit_buf, 1);
   32|  1.04k|  if (pulse_data->pulse_data_present) {
  ------------------
  |  Branch (32:7): [True: 132, False: 911]
  ------------------
   33|    132|    WORD32 tmp = ixheaacd_read_bits_buf(it_bit_buf, 8);
   34|    132|    pulse_data->number_pulse = tmp >> 6;
   35|    132|    pulse_data->pulse_start_band = tmp & 0x3F;
   36|       |
   37|    132|    if (pulse_data->pulse_start_band >= 52) {
  ------------------
  |  Branch (37:9): [True: 1, False: 131]
  ------------------
   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|    131|    k = aac_tables_ptr->sfb_index_long[pulse_data->pulse_start_band];
   42|       |
   43|    411|    for (i = 0; i <= pulse_data->number_pulse; i++) {
  ------------------
  |  Branch (43:17): [True: 280, False: 131]
  ------------------
   44|    280|      WORD32 tmp = ixheaacd_read_bits_buf(it_bit_buf, 9);
   45|    280|      pulse_data->pulse_offset[i] = tmp >> 4;
   46|    280|      pulse_data->pulse_amp[i] = tmp & 0xF;
   47|       |
   48|    280|      k += pulse_data->pulse_offset[i];
   49|    280|      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: 270]
  ------------------
   50|    280|    }
   51|    131|  }
   52|       |
   53|  1.04k|  return error;
   54|  1.04k|}

ixheaacd_res_tns_parcor_2_lpc_32x16:
   30|    286|{
   31|    286|  WORD i, j, status;
   32|    286|  WORD32 z1;
   33|    286|  WORD16 z[MAX_ORDER + 1];
   34|    286|  WORD16 w[MAX_ORDER + 1];
   35|    286|  WORD32 accu1, accu2;
   36|       |
   37|    286|  status = 1;
   38|    286|  *scale = 0;
   39|    954|  while (status) {
  ------------------
  |  Branch (39:10): [True: 668, False: 286]
  ------------------
   40|    668|    status = 0;
   41|       |
   42|  22.0k|    for (i = MAX_ORDER; i >= 0; i--) {
  ------------------
  |  |   24|    668|#define MAX_ORDER 31
  ------------------
  |  Branch (42:25): [True: 21.3k, False: 668]
  ------------------
   43|  21.3k|      z[i] = 0;
   44|  21.3k|      w[i] = 0;
   45|  21.3k|    }
   46|       |
   47|    668|    accu1 = (0x7fffffff >> *scale);
   48|       |
   49|  4.77k|    for (i = 0; i <= order; i++) {
  ------------------
  |  Branch (49:17): [True: 4.10k, False: 668]
  ------------------
   50|  4.10k|      z1 = accu1;
   51|       |
   52|  31.2k|      for (j = 0; j < order; j++) {
  ------------------
  |  Branch (52:19): [True: 27.1k, False: 4.10k]
  ------------------
   53|  27.1k|        w[j] = ixheaac_round16(accu1);
   54|       |
   55|  27.1k|        accu1 = ixheaac_mac16x16in32_shl_sat(accu1, parcor[j], z[j]);
   56|  27.1k|        if (ixheaac_abs32_sat(accu1) == 0x7fffffff) status = 1;
  ------------------
  |  Branch (56:13): [True: 3.20k, False: 23.9k]
  ------------------
   57|  27.1k|      }
   58|  31.2k|      for (j = (order - 1); j >= 0; j--) {
  ------------------
  |  Branch (58:29): [True: 27.1k, False: 4.10k]
  ------------------
   59|  27.1k|        accu2 = ixheaac_deposit16h_in32(z[j]);
   60|  27.1k|        accu2 = ixheaac_mac16x16in32_shl_sat(accu2, parcor[j], w[j]);
   61|  27.1k|        z[j + 1] = ixheaac_round16(accu2);
   62|  27.1k|        if (ixheaac_abs32_sat(accu2) == 0x7fffffff) status = 1;
  ------------------
  |  Branch (62:13): [True: 1.59k, False: 25.5k]
  ------------------
   63|  27.1k|      }
   64|       |
   65|  4.10k|      z[0] = ixheaac_round16(z1);
   66|  4.10k|      lpc[i] = ixheaac_round16(accu1);
   67|  4.10k|      accu1 = 0;
   68|  4.10k|    }
   69|    668|    accu1 = (status - 1);
   70|    668|    if (accu1 == 0) {
  ------------------
  |  Branch (70:9): [True: 382, False: 286]
  ------------------
   71|    382|      *scale = *scale + 1;
   72|    382|    }
   73|    668|  }
   74|    286|}
ixheaacd_res_tns_ar_filter_fixed_32x16:
   78|    286|                                            WORD scale_spec) {
   79|    286|  WORD32 i, j;
   80|    286|  WORD32 y, state[MAX_ORDER + 1];
   81|       |
   82|    286|  if ((order & 3) != 0) {
  ------------------
  |  Branch (82:7): [True: 242, False: 44]
  ------------------
   83|    487|    for (i = order + 1; i < ((WORD32)(order & 0xfffffffc) + 4); i++) {
  ------------------
  |  Branch (83:25): [True: 245, False: 242]
  ------------------
   84|    245|      lpc[i] = 0;
   85|    245|    }
   86|    242|    lpc[i] = 0;
   87|    242|    order = ((order & 0xfffffffc) + 4);
   88|    242|    order = order & 31;
   89|    242|  }
   90|       |
   91|  2.11k|  for (i = 0; i < order; i++) {
  ------------------
  |  Branch (91:15): [True: 1.82k, False: 286]
  ------------------
   92|  1.82k|    y = (*spectrum) << scale_spec;
   93|  7.53k|    for (j = i; j > 0; j--) {
  ------------------
  |  Branch (93:17): [True: 5.70k, False: 1.82k]
  ------------------
   94|  5.70k|      y = ixheaac_sub32_sat(y, ixheaac_mult32x16in32_shl_sat(state[j - 1], lpc[j]));
   95|  5.70k|      state[j] = state[j - 1];
   96|  5.70k|    }
   97|       |
   98|  1.82k|    state[0] = ixheaac_shl32_dir_sat_limit(y, shift_value);
   99|  1.82k|    *spectrum = y >> scale_spec;
  100|  1.82k|    spectrum += inc;
  101|  1.82k|  }
  102|       |
  103|  21.3k|  for (i = order; i < size; i++) {
  ------------------
  |  Branch (103:19): [True: 21.0k, False: 286]
  ------------------
  104|  21.0k|    y = (*spectrum) << scale_spec;
  105|       |
  106|   168k|    for (j = order; j > 0; j--) {
  ------------------
  |  Branch (106:21): [True: 147k, False: 21.0k]
  ------------------
  107|   147k|      y = ixheaac_sub32_sat(y, ixheaac_mult32x16in32_shl_sat(state[j - 1], lpc[j]));
  108|   147k|      state[j] = state[j - 1];
  109|   147k|    }
  110|       |
  111|  21.0k|    state[0] = ixheaac_shl32_dir_sat_limit(y, shift_value);
  112|  21.0k|    *spectrum = y >> scale_spec;
  113|  21.0k|    spectrum += inc;
  114|  21.0k|  }
  115|    286|}
ixheaacd_res_calc_max_spectral_line:
  117|    286|WORD32 ixheaacd_res_calc_max_spectral_line(WORD32 *p_tmp, WORD32 size) {
  118|    286|  WORD32 max_spectral_line = 0, i;
  119|    286|  WORD count, remaining, temp_1, temp_2, temp3, temp4;
  120|       |
  121|    286|  count = size >> 3;
  122|  3.05k|  for (i = count; i--;) {
  ------------------
  |  Branch (122:19): [True: 2.76k, False: 286]
  ------------------
  123|  2.76k|    temp_1 = *p_tmp++;
  124|  2.76k|    temp_2 = *p_tmp++;
  125|  2.76k|    temp3 = *p_tmp++;
  126|  2.76k|    temp4 = *p_tmp++;
  127|       |
  128|  2.76k|    max_spectral_line = ixheaac_abs32_nrm(temp_1) | max_spectral_line;
  129|  2.76k|    max_spectral_line = ixheaac_abs32_nrm(temp_2) | max_spectral_line;
  130|  2.76k|    max_spectral_line = ixheaac_abs32_nrm(temp3) | max_spectral_line;
  131|  2.76k|    max_spectral_line = ixheaac_abs32_nrm(temp4) | max_spectral_line;
  132|  2.76k|    temp_1 = *p_tmp++;
  133|  2.76k|    temp_2 = *p_tmp++;
  134|  2.76k|    temp3 = *p_tmp++;
  135|  2.76k|    temp4 = *p_tmp++;
  136|       |
  137|  2.76k|    max_spectral_line = ixheaac_abs32_nrm(temp_1) | max_spectral_line;
  138|  2.76k|    max_spectral_line = ixheaac_abs32_nrm(temp_2) | max_spectral_line;
  139|  2.76k|    max_spectral_line = ixheaac_abs32_nrm(temp3) | max_spectral_line;
  140|  2.76k|    max_spectral_line = ixheaac_abs32_nrm(temp4) | max_spectral_line;
  141|  2.76k|  }
  142|       |
  143|    286|  remaining = size - (count << 3);
  144|    286|  if (remaining) {
  ------------------
  |  Branch (144:7): [True: 182, False: 104]
  ------------------
  145|    910|    for (i = remaining; i--;) {
  ------------------
  |  Branch (145:25): [True: 728, False: 182]
  ------------------
  146|    728|      max_spectral_line = ixheaac_abs32_nrm(*p_tmp) | max_spectral_line;
  147|    728|      p_tmp++;
  148|    728|    }
  149|    182|  }
  150|       |
  151|    286|  return ixheaac_norm32(max_spectral_line);
  152|    286|}

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

ixheaacd_mps_pre_matrix_mix_matrix_smoothing:
   57|  79.5k|    ia_mps_dec_state_struct *self) {
   58|  79.5k|  WORD32 smooth_band;
   59|  79.5k|  FLOAT32 delta, one_minus_delta;
   60|  79.5k|  WORD32 ps = 0, pb, row, col;
   61|  79.5k|  WORD32 res_bands = 0;
   62|  79.5k|  WORD32 *p_smoothing_data;
   63|       |
   64|  79.5k|  if (self->residual_coding) res_bands = self->max_res_bands;
  ------------------
  |  Branch (64:7): [True: 61.1k, False: 18.4k]
  ------------------
   65|       |
   66|  79.5k|  p_smoothing_data = &self->smoothing_data[ps][res_bands];
   67|       |
   68|  79.5k|  delta = self->param_slot_diff[ps] * self->inv_smoothing_time[ps];
   69|  79.5k|  one_minus_delta = 1.0f - delta;
   70|       |
   71|   721k|  for (pb = res_bands; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (71:24): [True: 642k, False: 79.5k]
  ------------------
   72|   642k|    smooth_band = *p_smoothing_data++;
   73|   642k|    if (smooth_band) {
  ------------------
  |  Branch (73:9): [True: 44.1k, False: 597k]
  ------------------
   74|   132k|      for (row = 0; row < MAX_M_OUTPUT; row++) {
  ------------------
  |  |   63|   132k|#define MAX_M_OUTPUT (2)
  ------------------
  |  Branch (74:21): [True: 88.2k, False: 44.1k]
  ------------------
   75|   264k|        for (col = 0; col < MAX_M_INPUT; col++) {
  ------------------
  |  |   62|   264k|#define MAX_M_INPUT (2)
  ------------------
  |  Branch (75:23): [True: 176k, False: 88.2k]
  ------------------
   76|   176k|          self->m1_param_re[ps][pb][row][col] =
   77|   176k|              (MULT(delta, self->m1_param_re[ps][pb][row][col]) +
  ------------------
  |  |   45|   176k|#define MULT(a, b) (a * b)
  ------------------
   78|   176k|               MULT(one_minus_delta, self->m1_param_re_prev[pb][row][col]));
  ------------------
  |  |   45|   176k|#define MULT(a, b) (a * b)
  ------------------
   79|   176k|          self->m1_param_im[ps][pb][row][col] =
   80|   176k|              (MULT(delta, self->m1_param_im[ps][pb][row][col]) +
  ------------------
  |  |   45|   176k|#define MULT(a, b) (a * b)
  ------------------
   81|   176k|               MULT(one_minus_delta, self->m1_param_im_prev[pb][row][col]));
  ------------------
  |  |   45|   176k|#define MULT(a, b) (a * b)
  ------------------
   82|   176k|          self->m2_decor_re[ps][pb][row][col] =
   83|   176k|              (MULT(delta, self->m2_decor_re[ps][pb][row][col]) +
  ------------------
  |  |   45|   176k|#define MULT(a, b) (a * b)
  ------------------
   84|   176k|               MULT(one_minus_delta, self->m2_decor_re_prev[pb][row][col]));
  ------------------
  |  |   45|   176k|#define MULT(a, b) (a * b)
  ------------------
   85|   176k|          self->m2_decor_im[ps][pb][row][col] =
   86|   176k|              (MULT(delta, self->m2_decor_im[ps][pb][row][col]) +
  ------------------
  |  |   45|   176k|#define MULT(a, b) (a * b)
  ------------------
   87|   176k|               MULT(one_minus_delta, self->m2_decor_im_prev[pb][row][col]));
  ------------------
  |  |   45|   176k|#define MULT(a, b) (a * b)
  ------------------
   88|   176k|          self->m2_resid_re[ps][pb][row][col] =
   89|   176k|              (MULT(delta, self->m2_resid_re[ps][pb][row][col]) +
  ------------------
  |  |   45|   176k|#define MULT(a, b) (a * b)
  ------------------
   90|   176k|               MULT(one_minus_delta, self->m2_resid_re_prev[pb][row][col]));
  ------------------
  |  |   45|   176k|#define MULT(a, b) (a * b)
  ------------------
   91|   176k|          self->m2_resid_im[ps][pb][row][col] =
   92|   176k|              (MULT(delta, self->m2_resid_im[ps][pb][row][col]) +
  ------------------
  |  |   45|   176k|#define MULT(a, b) (a * b)
  ------------------
   93|   176k|               MULT(one_minus_delta, self->m2_resid_im_prev[pb][row][col]));
  ------------------
  |  |   45|   176k|#define MULT(a, b) (a * b)
  ------------------
   94|   176k|        }
   95|  88.2k|      }
   96|  44.1k|      self->pre_mix_req++;
   97|  44.1k|    }
   98|   642k|  }
   99|       |
  100|  94.7k|  for (ps = 1; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (100:16): [True: 15.1k, False: 79.5k]
  ------------------
  101|  15.1k|    delta = self->param_slot_diff[ps] * self->inv_smoothing_time[ps];
  102|  15.1k|    one_minus_delta = 1.0f - delta;
  103|       |
  104|  15.1k|    p_smoothing_data = &self->smoothing_data[ps][res_bands];
  105|       |
  106|   146k|    for (pb = res_bands; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (106:26): [True: 131k, False: 15.1k]
  ------------------
  107|   131k|      smooth_band = *p_smoothing_data++;
  108|   131k|      if (smooth_band) {
  ------------------
  |  Branch (108:11): [True: 16.8k, False: 114k]
  ------------------
  109|  50.5k|        for (row = 0; row < MAX_M_OUTPUT; row++) {
  ------------------
  |  |   63|  50.5k|#define MAX_M_OUTPUT (2)
  ------------------
  |  Branch (109:23): [True: 33.6k, False: 16.8k]
  ------------------
  110|   101k|          for (col = 0; col < MAX_M_INPUT; col++) {
  ------------------
  |  |   62|   101k|#define MAX_M_INPUT (2)
  ------------------
  |  Branch (110:25): [True: 67.3k, False: 33.6k]
  ------------------
  111|  67.3k|            self->m1_param_re[ps][pb][row][col] =
  112|  67.3k|                (MULT(delta, self->m1_param_re[ps][pb][row][col]) +
  ------------------
  |  |   45|  67.3k|#define MULT(a, b) (a * b)
  ------------------
  113|  67.3k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|  67.3k|#define MULT(a, b) (a * b)
  ------------------
  114|  67.3k|                      self->m1_param_re[ps - 1][pb][row][col]));
  115|  67.3k|            self->m1_param_im[ps][pb][row][col] =
  116|  67.3k|                (MULT(delta, self->m1_param_im[ps][pb][row][col]) +
  ------------------
  |  |   45|  67.3k|#define MULT(a, b) (a * b)
  ------------------
  117|  67.3k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|  67.3k|#define MULT(a, b) (a * b)
  ------------------
  118|  67.3k|                      self->m1_param_im[ps - 1][pb][row][col]));
  119|  67.3k|            self->m2_resid_re[ps][pb][row][col] =
  120|  67.3k|                (MULT(delta, self->m2_resid_re[ps][pb][row][col]) +
  ------------------
  |  |   45|  67.3k|#define MULT(a, b) (a * b)
  ------------------
  121|  67.3k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|  67.3k|#define MULT(a, b) (a * b)
  ------------------
  122|  67.3k|                      self->m2_resid_re[ps - 1][pb][row][col]));
  123|  67.3k|            self->m2_decor_re[ps][pb][row][col] =
  124|  67.3k|                (MULT(delta, self->m2_decor_re[ps][pb][row][col]) +
  ------------------
  |  |   45|  67.3k|#define MULT(a, b) (a * b)
  ------------------
  125|  67.3k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|  67.3k|#define MULT(a, b) (a * b)
  ------------------
  126|  67.3k|                      self->m2_decor_re[ps - 1][pb][row][col]));
  127|  67.3k|            self->m2_decor_im[ps][pb][row][col] =
  128|  67.3k|                (MULT(delta, self->m2_decor_im[ps][pb][row][col]) +
  ------------------
  |  |   45|  67.3k|#define MULT(a, b) (a * b)
  ------------------
  129|  67.3k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|  67.3k|#define MULT(a, b) (a * b)
  ------------------
  130|  67.3k|                      self->m2_decor_im[ps - 1][pb][row][col]));
  131|  67.3k|            self->m2_resid_im[ps][pb][row][col] =
  132|  67.3k|                (MULT(delta, self->m2_resid_im[ps][pb][row][col]) +
  ------------------
  |  |   45|  67.3k|#define MULT(a, b) (a * b)
  ------------------
  133|  67.3k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|  67.3k|#define MULT(a, b) (a * b)
  ------------------
  134|  67.3k|                      self->m2_resid_im[ps - 1][pb][row][col]));
  135|  67.3k|          }
  136|  33.6k|        }
  137|  16.8k|        self->pre_mix_req++;
  138|  16.8k|      }
  139|   131k|    }
  140|  15.1k|  }
  141|  79.5k|}
ixheaacd_mps_smoothing_opd:
  143|  79.5k|VOID ixheaacd_mps_smoothing_opd(ia_mps_dec_state_struct *self) {
  144|  79.5k|  WORD32 ps, pb;
  145|  79.5k|  WORD32 delta, one_minus_delta;
  146|       |
  147|  79.5k|  if (self->opd_smoothing_mode == 0) {
  ------------------
  |  Branch (147:7): [True: 77.2k, False: 2.34k]
  ------------------
  148|  1.05M|    for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (148:18): [True: 979k, False: 77.2k]
  ------------------
  149|   979k|      self->opd_smooth.smooth_l_phase[pb] =
  150|   979k|          ((WORD32)(self->phase_l[self->num_parameter_sets - 1][pb] *
  151|   979k|                    Q28_VALUE)) >>
  ------------------
  |  |   52|   979k|#define Q28_VALUE (1 << 28)
  ------------------
  152|   979k|          1;
  153|   979k|      self->opd_smooth.smooth_r_phase[pb] =
  154|   979k|          ((WORD32)(self->phase_r[self->num_parameter_sets - 1][pb] *
  155|   979k|                    Q28_VALUE)) >>
  ------------------
  |  |   52|   979k|#define Q28_VALUE (1 << 28)
  ------------------
  156|   979k|          1;
  157|   979k|    }
  158|  77.2k|    return;
  159|  77.2k|  }
  160|  7.44k|  for (ps = 0; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (160:16): [True: 5.09k, False: 2.34k]
  ------------------
  161|  5.09k|    WORD32 thr = self->bs_frame.ipd_data.bs_quant_coarse_xxx[ps]
  ------------------
  |  Branch (161:18): [True: 1.76k, False: 3.33k]
  ------------------
  162|  5.09k|                  ? FIFTY_X_PI_BY_180_Q27
  ------------------
  |  |   50|  1.76k|#define FIFTY_X_PI_BY_180_Q27 (117127067)
  ------------------
  163|  5.09k|                  : TWENTY_FIVE_X_PI_BY_180_Q27;
  ------------------
  |  |   51|  3.33k|#define TWENTY_FIVE_X_PI_BY_180_Q27 (58563533)
  ------------------
  164|       |
  165|  5.09k|    delta = self->param_slot_diff[ps] * ONE_BY_128_IN_Q30;
  ------------------
  |  |   47|  5.09k|#define ONE_BY_128_IN_Q30 (8388608)
  ------------------
  166|  5.09k|    one_minus_delta = ONE_IN_Q30 - delta;
  ------------------
  |  |   48|  5.09k|#define ONE_IN_Q30 (1073741824)
  ------------------
  167|       |
  168|  82.0k|    for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (168:18): [True: 76.9k, False: 5.09k]
  ------------------
  169|  76.9k|      WORD32 ltemp, rtemp, tmp;
  170|  76.9k|      ltemp = ((WORD32)(self->phase_l[ps][pb] * Q28_FLOAT_VAL)) >> 1;
  ------------------
  |  |   53|  76.9k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  ------------------
  171|  76.9k|      rtemp = ((WORD32)(self->phase_r[ps][pb] * Q28_FLOAT_VAL)) >> 1;
  ------------------
  |  |   53|  76.9k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  ------------------
  172|       |
  173|  79.7k|      while (ltemp > self->opd_smooth.smooth_l_phase[pb] + PI_IN_Q27)
  ------------------
  |  |   49|  79.7k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (173:14): [True: 2.87k, False: 76.9k]
  ------------------
  174|  2.87k|        ltemp -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|  2.87k|#define PI_IN_Q27 (421657440)
  ------------------
  175|  79.8k|      while (ltemp < self->opd_smooth.smooth_l_phase[pb] - PI_IN_Q27)
  ------------------
  |  |   49|  79.8k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (175:14): [True: 2.92k, False: 76.9k]
  ------------------
  176|  2.92k|        ltemp += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  2.92k|#define PI_IN_Q27 (421657440)
  ------------------
  177|  78.9k|      while (rtemp > self->opd_smooth.smooth_r_phase[pb] + PI_IN_Q27)
  ------------------
  |  |   49|  78.9k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (177:14): [True: 2.06k, False: 76.9k]
  ------------------
  178|  2.06k|        rtemp -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|  2.06k|#define PI_IN_Q27 (421657440)
  ------------------
  179|  79.1k|      while (rtemp < self->opd_smooth.smooth_r_phase[pb] - PI_IN_Q27)
  ------------------
  |  |   49|  79.1k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (179:14): [True: 2.20k, False: 76.9k]
  ------------------
  180|  2.20k|        rtemp += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  2.20k|#define PI_IN_Q27 (421657440)
  ------------------
  181|       |
  182|  76.9k|      self->opd_smooth.smooth_l_phase[pb] =
  183|  76.9k|          (ixheaac_mult32_shl(delta, ltemp) +
  184|  76.9k|           ixheaac_mult32_shl(one_minus_delta,
  185|  76.9k|                               self->opd_smooth.smooth_l_phase[pb]))
  186|  76.9k|          << 1;
  187|  76.9k|      self->opd_smooth.smooth_r_phase[pb] =
  188|  76.9k|          (ixheaac_mult32_shl(delta, rtemp) +
  189|  76.9k|           ixheaac_mult32_shl(one_minus_delta,
  190|  76.9k|                               self->opd_smooth.smooth_r_phase[pb]))
  191|  76.9k|          << 1;
  192|       |
  193|  76.9k|      tmp = (ltemp - rtemp) - (self->opd_smooth.smooth_l_phase[pb] -
  194|  76.9k|                               self->opd_smooth.smooth_r_phase[pb]);
  195|  76.9k|      while (tmp > PI_IN_Q27) tmp -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|  76.9k|#define PI_IN_Q27 (421657440)
  ------------------
                    while (tmp > PI_IN_Q27) tmp -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|     37|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (195:14): [True: 37, False: 76.9k]
  ------------------
  196|  77.2k|      while (tmp < -PI_IN_Q27) tmp += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  77.2k|#define PI_IN_Q27 (421657440)
  ------------------
                    while (tmp < -PI_IN_Q27) tmp += 2 * PI_IN_Q27;
  ------------------
  |  |   49|    297|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (196:14): [True: 297, False: 76.9k]
  ------------------
  197|       |
  198|  76.9k|      if (ixheaac_abs32(tmp) > thr) {
  ------------------
  |  Branch (198:11): [True: 5.74k, False: 71.1k]
  ------------------
  199|  5.74k|        self->opd_smooth.smooth_l_phase[pb] = ltemp;
  200|  5.74k|        self->opd_smooth.smooth_r_phase[pb] = rtemp;
  201|  5.74k|      }
  202|       |
  203|  77.5k|      while (self->opd_smooth.smooth_l_phase[pb] > 2 * PI_IN_Q27)
  ------------------
  |  |   49|  77.5k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (203:14): [True: 651, False: 76.9k]
  ------------------
  204|    651|        self->opd_smooth.smooth_l_phase[pb] -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|    651|#define PI_IN_Q27 (421657440)
  ------------------
  205|  79.7k|      while (self->opd_smooth.smooth_l_phase[pb] < 0)
  ------------------
  |  Branch (205:14): [True: 2.79k, False: 76.9k]
  ------------------
  206|  2.79k|        self->opd_smooth.smooth_l_phase[pb] += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  2.79k|#define PI_IN_Q27 (421657440)
  ------------------
  207|  77.8k|      while (self->opd_smooth.smooth_r_phase[pb] > 2 * PI_IN_Q27)
  ------------------
  |  |   49|  77.8k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (207:14): [True: 921, False: 76.9k]
  ------------------
  208|    921|        self->opd_smooth.smooth_r_phase[pb] -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|    921|#define PI_IN_Q27 (421657440)
  ------------------
  209|  78.7k|      while (self->opd_smooth.smooth_r_phase[pb] < 0)
  ------------------
  |  Branch (209:14): [True: 1.81k, False: 76.9k]
  ------------------
  210|  1.81k|        self->opd_smooth.smooth_r_phase[pb] += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  1.81k|#define PI_IN_Q27 (421657440)
  ------------------
  211|       |
  212|  76.9k|      self->phase_l[ps][pb] =
  213|  76.9k|          (self->opd_smooth.smooth_l_phase[pb] << 1) * ONE_BY_Q28_FLOAT_VAL;
  ------------------
  |  |   54|  76.9k|#define ONE_BY_Q28_FLOAT_VAL (1.0f / Q28_FLOAT_VAL)
  |  |  ------------------
  |  |  |  |   53|  76.9k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  |  |  ------------------
  ------------------
  214|  76.9k|      self->phase_r[ps][pb] =
  215|  76.9k|          (self->opd_smooth.smooth_r_phase[pb] << 1) * ONE_BY_Q28_FLOAT_VAL;
  ------------------
  |  |   54|  76.9k|#define ONE_BY_Q28_FLOAT_VAL (1.0f / Q28_FLOAT_VAL)
  |  |  ------------------
  |  |  |  |   53|  76.9k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  |  |  ------------------
  ------------------
  216|  76.9k|    }
  217|  5.09k|  }
  218|  2.34k|}
ixheaacd_smooth_m1m2:
  255|  13.7k|VOID ixheaacd_smooth_m1m2(ia_heaac_mps_state_struct *pstr_mps_state) {
  256|  13.7k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
  257|  13.7k|  ia_mps_persistent_mem *persistent_mem = &curr_state->mps_persistent_mem;
  258|  13.7k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  259|  13.7k|  ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
  260|  13.7k|  ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
  261|  13.7k|  WORD32 *m1_param_real_prev = persistent_mem->m1_param_real_prev;
  262|  13.7k|  WORD32 *m2_decor_real_prev = persistent_mem->m2_decor_real_prev;
  263|  13.7k|  WORD32 *m2_resid_real_prev = persistent_mem->m2_resid_real_prev;
  264|       |
  265|  13.7k|  WORD32 num_parameter_bands = curr_state->num_parameter_bands;
  266|  13.7k|  WORD32 num_direct_signals = curr_state->num_direct_signals;
  267|  13.7k|  WORD32 num_decor_signals = curr_state->num_decor_signals;
  268|  13.7k|  WORD32 m1_param_imag_present = curr_state->m1_param_imag_present;
  269|  13.7k|  WORD32 m2_param_imag_present = curr_state->m2_param_imag_present;
  270|  13.7k|  WORD32 col_counter = num_direct_signals + num_decor_signals;
  271|  13.7k|  WORD32 num_parameter_sets = curr_state->num_parameter_sets;
  272|  13.7k|  WORD32 num_output_channels = curr_state->num_output_channels;
  273|  13.7k|  WORD32 num_v_channels = curr_state->num_v_channels;
  274|  13.7k|  WORD32 num_x_channels = curr_state->num_x_channels;
  275|  13.7k|  WORD32 smooth_control = curr_state->smooth_control;
  276|  13.7k|  WORD32 smooth_config = curr_state->smooth_config;
  277|  13.7k|  WORD32 resid_col_counter;
  278|  13.7k|  WORD32 smooth_band_arr[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
  279|       |
  280|  13.7k|  WORD32 *delta, *one_minus_delta, *delta_ptr, *one_minus_delta_ptr;
  281|  13.7k|  WORD32 *param_r, *param_i, *param_prev_r, *param_prev_i;
  282|       |
  283|  13.7k|  WORD32 *ton;
  284|  13.7k|  WORD32 i, ps, pb, row, col;
  285|  13.7k|  WORD32 res_bands = 0;
  286|  13.7k|  WORD32 idx = 0;
  287|       |
  288|  13.7k|  WORD32 *m2_decor_imag_prev = persistent_mem->m2_decor_imag_prev;
  289|  13.7k|  WORD32 *m2_resid_imag_prev = persistent_mem->m2_resid_imag_prev;
  290|  13.7k|  WORD32 *m1_param_imag_prev = persistent_mem->m1_param_imag_prev;
  291|       |
  292|  13.7k|  ton = pstr_mps_state->mps_scratch_mem_v;
  293|  13.7k|  delta = delta_ptr =
  294|  13.7k|      ton + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*delta), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.7k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  295|  13.7k|  one_minus_delta = one_minus_delta_ptr =
  296|  13.7k|      delta +
  297|  13.7k|      IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_SETS, sizeof(*one_minus_delta), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.7k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  298|       |
  299|  13.7k|  param_r = curr_state->res_bands;
  300|  13.7k|  if (curr_state->residual_coding) {
  ------------------
  |  Branch (300:7): [True: 362, False: 13.4k]
  ------------------
  301|  3.98k|    for (i = 0; i < MAX_RESIDUAL_CHANNELS_MPS; i++) {
  ------------------
  |  |   68|  3.98k|#define MAX_RESIDUAL_CHANNELS_MPS (10)
  ------------------
  |  Branch (301:17): [True: 3.62k, False: 362]
  ------------------
  302|  3.62k|      if (param_r[i] > res_bands) {
  ------------------
  |  Branch (302:11): [True: 407, False: 3.21k]
  ------------------
  303|    407|        res_bands = param_r[i];
  304|    407|      }
  305|  3.62k|    }
  306|    362|  }
  307|       |
  308|  13.7k|  if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (308:7): [True: 147, False: 13.6k]
  ------------------
  309|    147|    if (res_bands < curr_state->arbdmx_residual_bands) {
  ------------------
  |  Branch (309:9): [True: 131, False: 16]
  ------------------
  310|    131|      res_bands = curr_state->arbdmx_residual_bands;
  311|    131|    }
  312|    147|  }
  313|       |
  314|  13.7k|  if (smooth_config) {
  ------------------
  |  Branch (314:7): [True: 0, False: 13.7k]
  ------------------
  315|      0|    ixheaacd_measure_tonality(pstr_mps_state, ton);
  316|      0|  }
  317|       |
  318|  38.9k|  for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (318:16): [True: 25.1k, False: 13.7k]
  ------------------
  319|  25.1k|    ixheaacd_calc_filter_coeff(pstr_mps_state, ps, delta);
  320|  25.1k|    *one_minus_delta++ = (1 << 15) - *delta++;
  321|  25.1k|  }
  322|       |
  323|  13.7k|  if (smooth_control) {
  ------------------
  |  Branch (323:7): [True: 13.7k, False: 0]
  ------------------
  324|  38.9k|    for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (324:18): [True: 25.1k, False: 13.7k]
  ------------------
  325|  25.1k|      if (ps < 8) {
  ------------------
  |  Branch (325:11): [True: 25.1k, False: 0]
  ------------------
  326|   465k|        for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (326:22): [True: 440k, False: 25.1k]
  ------------------
  327|   440k|          smooth_band_arr[ps][pb] = pstr_mps_state->aux_struct->smg_data[ps][pb];
  328|   440k|        }
  329|  25.1k|      }
  330|  25.1k|    }
  331|  13.7k|  } 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.7k|  if (!(smooth_control == 0 && smooth_config == 0)) {
  ------------------
  |  Branch (339:9): [True: 0, False: 13.7k]
  |  Branch (339:32): [True: 0, False: 0]
  ------------------
  340|  13.7k|    if (m1_param_imag_present) {
  ------------------
  |  Branch (340:9): [True: 10.4k, False: 3.34k]
  ------------------
  341|  10.4k|      WORD32 *ptr_r1 = &m1_param->m1_param_real[0][0][0][0];
  342|  10.4k|      WORD32 *ptr_i1 = &m1_param->m1_param_imag[0][0][0][0];
  343|  92.9k|      for (row = 0; row < num_v_channels; row++) {
  ------------------
  |  Branch (343:21): [True: 82.4k, False: 10.4k]
  ------------------
  344|  82.4k|        WORD32 *ptr_r2 = ptr_r1;
  345|  82.4k|        WORD32 *ptr_i2 = ptr_i1;
  346|   556k|        for (col = 0; col < num_x_channels; col++) {
  ------------------
  |  Branch (346:23): [True: 473k, False: 82.4k]
  ------------------
  347|   473k|          param_r = ptr_r2;
  348|   473k|          param_i = ptr_i2;
  349|   473k|          m1_param_real_prev += res_bands;
  350|   473k|          m1_param_imag_prev += res_bands;
  351|       |
  352|  9.76M|          for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (352:32): [True: 9.29M, False: 473k]
  ------------------
  353|  9.29M|            if (smooth_band_arr[0][pb]) {
  ------------------
  |  Branch (353:17): [True: 3.68M, False: 5.61M]
  ------------------
  354|  3.68M|              WORD64 acc;
  355|       |
  356|  3.68M|              acc = (WORD64)((WORD64)param_r[pb] * (WORD64)(*delta_ptr) +
  357|  3.68M|                             (WORD64)(*m1_param_real_prev) *
  358|  3.68M|                                 (WORD64)(*one_minus_delta_ptr));
  359|       |
  360|  3.68M|              acc >>= 15;
  361|       |
  362|  3.68M|              param_r[pb] = (WORD32)acc;
  363|       |
  364|  3.68M|              acc = (WORD64)((WORD64)param_i[pb] * (WORD64)(*delta_ptr) +
  365|  3.68M|                             (WORD64)(*m1_param_imag_prev) *
  366|  3.68M|                                 (WORD64)(*one_minus_delta_ptr));
  367|       |
  368|  3.68M|              acc >>= 15;
  369|       |
  370|  3.68M|              param_i[pb] = (WORD32)acc;
  371|  3.68M|            }
  372|  9.29M|            m1_param_real_prev++;
  373|  9.29M|            m1_param_imag_prev++;
  374|  9.29M|          }
  375|   473k|          param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   473k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  376|   473k|          param_i += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   473k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  377|       |
  378|   774k|          for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (378:24): [True: 300k, False: 473k]
  ------------------
  379|   300k|            WORD32 del = delta_ptr[ps];
  380|   300k|            WORD32 one_minus_del = one_minus_delta_ptr[ps];
  381|       |
  382|   300k|            param_prev_r = param_r - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   300k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  383|   300k|            param_prev_i = param_i - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   300k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  384|       |
  385|  6.09M|            for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (385:34): [True: 5.79M, False: 300k]
  ------------------
  386|  5.79M|              if (smooth_band_arr[ps][pb]) {
  ------------------
  |  Branch (386:19): [True: 2.17M, False: 3.61M]
  ------------------
  387|  2.17M|                WORD64 acc;
  388|       |
  389|  2.17M|                acc = (WORD64)((WORD64)param_r[pb] * (WORD64)(del) +
  390|  2.17M|                               (WORD64)param_prev_r[pb] *
  391|  2.17M|                                   (WORD64)(one_minus_del));
  392|       |
  393|  2.17M|                acc >>= 15;
  394|       |
  395|  2.17M|                param_r[pb] = (WORD32)acc;
  396|       |
  397|  2.17M|                acc = (WORD64)((WORD64)param_i[pb] * (WORD64)(del) +
  398|  2.17M|                               (WORD64)param_prev_i[pb] *
  399|  2.17M|                                   (WORD64)(one_minus_del));
  400|       |
  401|  2.17M|                acc >>= 15;
  402|       |
  403|  2.17M|                param_i[pb] = (WORD32)acc;
  404|  2.17M|              }
  405|  5.79M|            }
  406|   300k|            param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   300k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  407|   300k|            param_i += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   300k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  408|   300k|          }
  409|   473k|          ptr_r2 += PBXPS;
  ------------------
  |  |  168|   473k|#define PBXPS (224)
  ------------------
  410|   473k|          ptr_i2 += PBXPS;
  ------------------
  |  |  168|   473k|#define PBXPS (224)
  ------------------
  411|   473k|        }
  412|  82.4k|        ptr_r1 += INCHXPBXPS;
  ------------------
  |  |  202|  82.4k|#define INCHXPBXPS (1344)
  ------------------
  413|  82.4k|        ptr_i1 += INCHXPBXPS;
  ------------------
  |  |  202|  82.4k|#define INCHXPBXPS (1344)
  ------------------
  414|  82.4k|      }
  415|  10.4k|    } else {
  416|  3.34k|      WORD32 *ptr1 = (WORD32 *)m1_param;
  417|       |
  418|  24.0k|      for (row = 0; row < num_v_channels; row++) {
  ------------------
  |  Branch (418:21): [True: 20.7k, False: 3.34k]
  ------------------
  419|  20.7k|        WORD32 *ptr2 = ptr1;
  420|       |
  421|  98.5k|        for (col = 0; col < num_x_channels; col++) {
  ------------------
  |  Branch (421:23): [True: 77.8k, False: 20.7k]
  ------------------
  422|  77.8k|          WORD32 *param_r = ptr2;
  423|       |
  424|  77.8k|          WORD32 del = delta_ptr[0];
  425|  77.8k|          WORD32 one_minus_del = one_minus_delta_ptr[0];
  426|       |
  427|  77.8k|          m1_param_real_prev += res_bands;
  428|       |
  429|  1.37M|          for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (429:32): [True: 1.29M, False: 77.8k]
  ------------------
  430|  1.29M|            if (smooth_band_arr[0][pb]) {
  ------------------
  |  Branch (430:17): [True: 692k, False: 602k]
  ------------------
  431|   692k|              WORD64 acc;
  432|       |
  433|   692k|              acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)(del)) +
  434|   692k|                    (WORD64)((WORD64)(*m1_param_real_prev) *
  435|   692k|                             (WORD64)(one_minus_del));
  436|       |
  437|   692k|              param_r[pb] = (WORD32)(acc >> 15);
  438|   692k|            }
  439|  1.29M|            m1_param_real_prev++;
  440|  1.29M|          }
  441|  77.8k|          param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  77.8k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  442|       |
  443|   134k|          for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (443:24): [True: 56.6k, False: 77.8k]
  ------------------
  444|  56.6k|            WORD32 del = delta_ptr[ps];
  445|  56.6k|            WORD32 one_minus_del = one_minus_delta_ptr[ps];
  446|       |
  447|  56.6k|            param_prev_r = param_r - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  56.6k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  448|       |
  449|   834k|            for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (449:34): [True: 778k, False: 56.6k]
  ------------------
  450|   778k|              if (smooth_band_arr[ps][pb]) {
  ------------------
  |  Branch (450:19): [True: 384k, False: 393k]
  ------------------
  451|   384k|                WORD64 acc;
  452|       |
  453|   384k|                acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)del) +
  454|   384k|                      (WORD64)((WORD64)(param_prev_r[pb]) *
  455|   384k|                               (WORD64)one_minus_del);
  456|       |
  457|   384k|                param_r[pb] = (WORD32)(acc >> 15);
  458|   384k|              }
  459|   778k|            }
  460|  56.6k|            param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  56.6k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  461|  56.6k|          }
  462|  77.8k|          ptr2 += PBXPS;
  ------------------
  |  |  168|  77.8k|#define PBXPS (224)
  ------------------
  463|  77.8k|        }
  464|  20.7k|        ptr1 += INCHXPBXPS;
  ------------------
  |  |  202|  20.7k|#define INCHXPBXPS (1344)
  ------------------
  465|  20.7k|      }
  466|  3.34k|    }
  467|       |
  468|  13.7k|    if (curr_state->residual_coding)
  ------------------
  |  Branch (468:9): [True: 362, False: 13.4k]
  ------------------
  469|    362|      resid_col_counter = col_counter;
  470|  13.4k|    else
  471|  13.4k|      resid_col_counter = num_direct_signals;
  472|       |
  473|  13.7k|    idx = 0;
  474|  13.7k|    if (m2_param_imag_present) {
  ------------------
  |  Branch (474:9): [True: 0, False: 13.7k]
  ------------------
  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.7k|    } else {
  618|  13.7k|      WORD32 *ptr1 = &m2_param->m2_resid_real[0][0][0];
  619|       |
  620|   121k|      for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (620:21): [True: 107k, False: 13.7k]
  ------------------
  621|   687k|        for (col = 0; col < resid_col_counter; col++) {
  ------------------
  |  Branch (621:23): [True: 579k, False: 107k]
  ------------------
  622|   579k|          if (curr_state->m2_param_present[row][col] & 2) {
  ------------------
  |  Branch (622:15): [True: 109k, False: 470k]
  ------------------
  623|   109k|            WORD32 *ptr2 = ptr1;
  624|   109k|            WORD32 del = *delta_ptr;
  625|   109k|            WORD32 one_minus_del = *one_minus_delta_ptr;
  626|   109k|            m2_resid_real_prev += res_bands;
  627|       |
  628|  2.05M|            for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (628:34): [True: 1.94M, False: 109k]
  ------------------
  629|  1.94M|              if (smooth_band_arr[0][pb]) {
  ------------------
  |  Branch (629:19): [True: 751k, False: 1.19M]
  ------------------
  630|   751k|                WORD64 acc;
  631|       |
  632|   751k|                acc = (WORD64)((WORD64)(ptr2[pb]) * (WORD64)(del) +
  633|   751k|                               (WORD64)(*m2_resid_real_prev) *
  634|   751k|                                   (WORD64)(one_minus_del));
  635|       |
  636|   751k|                acc >>= 15;
  637|   751k|                ptr2[pb] = (WORD32)acc;
  638|   751k|              }
  639|       |
  640|  1.94M|              m2_resid_real_prev++;
  641|  1.94M|            }
  642|       |
  643|   109k|            ptr2 += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   109k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  644|       |
  645|   196k|            for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (645:26): [True: 86.4k, False: 109k]
  ------------------
  646|  86.4k|              WORD32 del = delta_ptr[ps];
  647|  86.4k|              WORD32 one_minus_del = one_minus_delta_ptr[ps];
  648|       |
  649|  86.4k|              param_prev_r = ptr2 - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  86.4k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  650|       |
  651|  1.48M|              for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (651:36): [True: 1.40M, False: 86.4k]
  ------------------
  652|  1.40M|                if (smooth_band_arr[ps][pb]) {
  ------------------
  |  Branch (652:21): [True: 525k, False: 878k]
  ------------------
  653|   525k|                  WORD64 acc;
  654|       |
  655|   525k|                  acc = (WORD64)((WORD64)(ptr2[pb]) * (WORD64)(del) +
  656|   525k|                                 (WORD64)(*param_prev_r) *
  657|   525k|                                     (WORD64)(one_minus_del));
  658|       |
  659|   525k|                  acc >>= 15;
  660|   525k|                  ptr2[pb] = (WORD32)acc;
  661|   525k|                }
  662|       |
  663|  1.40M|                param_prev_r++;
  664|  1.40M|              }
  665|  86.4k|              ptr2 += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  86.4k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  666|  86.4k|            }
  667|   109k|            idx++;
  668|   109k|            ptr1 += PBXPS;
  ------------------
  |  |  168|   109k|#define PBXPS (224)
  ------------------
  669|   109k|          }
  670|   579k|        }
  671|   107k|      }
  672|  13.7k|      idx = 0;
  673|  13.7k|      ptr1 = &m2_param->m2_decor_real[0][0][0];
  674|       |
  675|   121k|      for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (675:21): [True: 107k, False: 13.7k]
  ------------------
  676|   346k|        for (col = num_direct_signals; col < col_counter; col++) {
  ------------------
  |  Branch (676:40): [True: 238k, False: 107k]
  ------------------
  677|   238k|          if (curr_state->m2_param_present[row][col] & 1) {
  ------------------
  |  Branch (677:15): [True: 66.4k, False: 172k]
  ------------------
  678|  66.4k|            WORD32 *ptr2 = ptr1;
  679|  66.4k|            m2_decor_real_prev += res_bands;
  680|       |
  681|  66.4k|            param_r = &m2_param->m2_decor_real[idx][0][res_bands];
  682|  1.17M|            for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (682:34): [True: 1.10M, False: 66.4k]
  ------------------
  683|  1.10M|              if (smooth_band_arr[0][pb]) {
  ------------------
  |  Branch (683:19): [True: 397k, False: 706k]
  ------------------
  684|   397k|                WORD64 acc;
  685|   397k|                acc = (WORD64)((WORD64)(ptr2[pb]) * (WORD64)*delta_ptr +
  686|   397k|                               (WORD64)(*m2_decor_real_prev) *
  687|   397k|                                   (WORD64)*one_minus_delta_ptr);
  688|   397k|                acc >>= 15;
  689|   397k|                ptr2[pb] = (WORD32)acc;
  690|   397k|              }
  691|  1.10M|              m2_decor_real_prev++;
  692|  1.10M|            }
  693|  66.4k|            ptr2 += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  66.4k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  694|       |
  695|   133k|            for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (695:26): [True: 66.6k, False: 66.4k]
  ------------------
  696|  66.6k|              WORD32 del = delta_ptr[ps];
  697|  66.6k|              WORD32 one_minus_del = one_minus_delta_ptr[ps];
  698|       |
  699|  66.6k|              param_prev_r = ptr2 - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  66.6k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  700|  1.05M|              for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (700:36): [True: 984k, False: 66.6k]
  ------------------
  701|   984k|                if (smooth_band_arr[ps][pb]) {
  ------------------
  |  Branch (701:21): [True: 366k, False: 618k]
  ------------------
  702|   366k|                  WORD64 acc;
  703|       |
  704|   366k|                  acc =
  705|   366k|                      (WORD64)((WORD64)(ptr2[pb]) * (WORD64)del +
  706|   366k|                               (WORD64)(*param_prev_r) * (WORD64)one_minus_del);
  707|   366k|                  acc >>= 15;
  708|   366k|                  ptr2[pb] = (WORD32)acc;
  709|   366k|                }
  710|       |
  711|   984k|                param_prev_r++;
  712|   984k|              }
  713|       |
  714|  66.6k|              ptr2 += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  66.6k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  715|  66.6k|            }
  716|       |
  717|  66.4k|            idx++;
  718|       |
  719|  66.4k|            ptr1 += PBXPS;
  ------------------
  |  |  168|  66.4k|#define PBXPS (224)
  ------------------
  720|  66.4k|          }
  721|   238k|        }
  722|   107k|      }
  723|  13.7k|    }
  724|  13.7k|  }
  725|  13.7k|  return;
  726|  13.7k|}
ixheaacd_mps_smoothing.c:ixheaacd_calc_filter_coeff:
  221|  25.1k|    ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps, WORD32 *delta) {
  222|  25.1k|  WORD32 d_slots;
  223|  25.1k|  WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
  224|  25.1k|  WORD32 *smg_time = pstr_mps_state->aux_struct->smg_time;
  225|       |
  226|  25.1k|  if (ps == 0)
  ------------------
  |  Branch (226:7): [True: 13.7k, False: 11.3k]
  ------------------
  227|  13.7k|    d_slots = param_slot[ps] + 1;
  228|  11.3k|  else
  229|  11.3k|    d_slots = param_slot[ps] - param_slot[ps - 1];
  230|       |
  231|  25.1k|  if (pstr_mps_state->smooth_control) {
  ------------------
  |  Branch (231:7): [True: 25.1k, False: 0]
  ------------------
  232|  25.1k|    switch (smg_time[ps]) {
  233|  1.36k|      case SMG_TIME_64:
  ------------------
  |  |   23|  1.36k|#define SMG_TIME_64 (64)
  ------------------
  |  Branch (233:7): [True: 1.36k, False: 23.7k]
  ------------------
  234|  1.36k|        *delta = d_slots << 9;
  235|  1.36k|        break;
  236|    496|      case SMG_TIME_128:
  ------------------
  |  |   24|    496|#define SMG_TIME_128 (128)
  ------------------
  |  Branch (236:7): [True: 496, False: 24.6k]
  ------------------
  237|    496|        *delta = d_slots << 8;
  238|    496|        break;
  239|  19.6k|      case SMG_TIME_256:
  ------------------
  |  |   25|  19.6k|#define SMG_TIME_256 (256)
  ------------------
  |  Branch (239:7): [True: 19.6k, False: 5.51k]
  ------------------
  240|  19.6k|        *delta = d_slots << 7;
  241|  19.6k|        break;
  242|  1.63k|      case SMG_TIME_512:
  ------------------
  |  |   26|  1.63k|#define SMG_TIME_512 (512)
  ------------------
  |  Branch (242:7): [True: 1.63k, False: 23.5k]
  ------------------
  243|  1.63k|        *delta = d_slots << 6;
  244|  1.63k|        break;
  245|  2.02k|      default:
  ------------------
  |  Branch (245:7): [True: 2.02k, False: 23.1k]
  ------------------
  246|  2.02k|        break;
  247|  25.1k|    }
  248|  25.1k|  } else {
  249|      0|    *delta = d_slots << 7;
  250|      0|  }
  251|       |
  252|  25.1k|  return;
  253|  25.1k|}

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

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

ixheaacd_dec_coupling_channel_element:
  149|    922|    ia_eld_specific_config_struct eld_specific_config, WORD32 ele_type) {
  150|    922|  WORD32 element_instance_tag;
  151|    922|  LOOPIDX c;
  152|       |
  153|    922|  WORD ind_sw_cce_flag, num_coupled_elements;
  154|       |
  155|    922|  WORD num_gain_element_lists = 0;
  156|    922|  WORD gain_element_scale;
  157|       |
  158|    922|  const UWORD16 *hcod_sf =
  159|    922|      ptr_aac_tables->pstr_huffmann_tables->huffman_code_book_scl;
  160|    922|  const UWORD32 *table_idx =
  161|    922|      ptr_aac_tables->pstr_huffmann_tables->huffman_code_book_scl_index;
  162|    922|  WORD16 index, length;
  163|       |
  164|    922|  IA_ERRORCODE error_status = IA_NO_ERROR;
  ------------------
  |  |   23|    922|#define IA_NO_ERROR 0x00000000
  ------------------
  165|       |
  166|    922|  element_instance_tag = ixheaacd_read_bits_buf(it_bit_buf, 4);
  167|    922|  element_index_order[0] = element_instance_tag;
  168|       |
  169|    922|  ind_sw_cce_flag = ixheaacd_read_bits_buf(it_bit_buf, 1);
  170|    922|  num_coupled_elements = ixheaacd_read_bits_buf(it_bit_buf, 3);
  171|       |
  172|  10.0k|  for (c = 0; c < MAX_BS_ELEMENT; c++)
  ------------------
  |  |   24|  10.0k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  10.0k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (172:15): [True: 9.12k, False: 922]
  ------------------
  173|  9.12k|    ind_channel_info->elements_coupled[c] = -1;
  174|       |
  175|    922|  ind_channel_info->num_coupled_elements = num_coupled_elements;
  176|       |
  177|  4.26k|  for (c = 0; c < (num_coupled_elements + 1); c++) {
  ------------------
  |  Branch (177:15): [True: 3.34k, False: 922]
  ------------------
  178|  3.34k|    num_gain_element_lists++;
  179|       |
  180|  3.34k|    ind_channel_info->cc_target_is_cpe[c] = ixheaacd_read_bits_buf(it_bit_buf, 1);
  181|  3.34k|    ind_channel_info->cc_target_tag_select[c] = ixheaacd_read_bits_buf(it_bit_buf, 4);
  182|  3.34k|    if (ind_channel_info->cc_target_is_cpe[c]) {
  ------------------
  |  Branch (182:9): [True: 1.27k, False: 2.06k]
  ------------------
  183|  1.27k|      ind_channel_info->cc_l[c] = ixheaacd_read_bits_buf(it_bit_buf, 1);
  184|  1.27k|      ind_channel_info->cc_r[c] = ixheaacd_read_bits_buf(it_bit_buf, 1);
  185|  1.27k|      if (ind_channel_info->cc_l[c] && ind_channel_info->cc_r[c])
  ------------------
  |  Branch (185:11): [True: 702, False: 577]
  |  Branch (185:40): [True: 494, False: 208]
  ------------------
  186|    494|        num_gain_element_lists++;
  187|  1.27k|      ind_channel_info->elements_coupled[c] = 1;
  188|  1.27k|    } else
  189|  2.06k|      ind_channel_info->elements_coupled[c] = 0;
  190|  3.34k|  }
  191|    922|  if ((ind_sw_cce_flag == 0) && (num_gain_element_lists > MAX_BS_ELEMENT)) {
  ------------------
  |  |   24|    311|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|    311|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (191:7): [True: 311, False: 611]
  |  Branch (191:33): [True: 1, False: 310]
  ------------------
  192|      1|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  193|      1|  }
  194|    921|  ixheaacd_read_bits_buf(it_bit_buf, 1);/*cc_domain*/
  195|    921|  ixheaacd_read_bits_buf(it_bit_buf, 1);/*gain_element_sign*/
  196|    921|  gain_element_scale = ixheaacd_read_bits_buf(it_bit_buf, 2);
  197|       |
  198|    921|  aac_handle->pstr_aac_dec_ch_info[0]->str_ics_info.num_swb_window = 0;
  199|    921|  aac_handle->pstr_aac_dec_ch_info[0]->str_ics_info.sampling_rate_index =
  200|    921|      samp_rate_idx;
  201|       |
  202|    921|  aac_handle->pstr_aac_dec_ch_info[0]->common_window = 0;
  203|       |
  204|    921|  error_status = ixheaacd_individual_ch_stream(
  205|    921|      it_bit_buf, aac_handle, 1, frame_size, total_channels, audio_object_type,
  206|    921|      eld_specific_config, ele_type);
  207|       |
  208|    921|  if (error_status) return error_status;
  ------------------
  |  Branch (208:7): [True: 24, False: 897]
  ------------------
  209|       |
  210|    897|  ind_channel_info->cc_gain[0] = 1 << 29;
  211|  3.67k|  for (c = 1; c < num_gain_element_lists; c++) {
  ------------------
  |  Branch (211:15): [True: 2.78k, False: 891]
  ------------------
  212|  2.78k|    WORD cge;
  213|  2.78k|    WORD common_gain_element_present[MAX_BS_ELEMENT];
  214|  2.78k|    WORD16 norm_value;
  215|       |
  216|  2.78k|    if (ind_sw_cce_flag)
  ------------------
  |  Branch (216:9): [True: 2.77k, False: 6]
  ------------------
  217|  2.77k|      cge = 1;
  218|      6|    else {
  219|      6|      common_gain_element_present[c] = ixheaacd_read_bits_buf(it_bit_buf, 1);
  220|      6|      cge = common_gain_element_present[c];
  221|      6|      return IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE;
  ------------------
  |  |  119|      6|#define IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE 0xFFFF9800
  ------------------
  222|      6|    }
  223|  2.77k|    if (cge) {
  ------------------
  |  Branch (223:9): [True: 2.77k, False: 0]
  ------------------
  224|  2.77k|      UWORD8 *ptr_read_next = it_bit_buf->ptr_read_next;
  225|  2.77k|      WORD32 bit_pos = 7 - it_bit_buf->bit_pos;
  226|  2.77k|      WORD32 read_word =
  227|  2.77k|          ixheaacd_aac_showbits_32(it_bit_buf->ptr_read_next, it_bit_buf->cnt_bits, NULL);
  228|  2.77k|      UWORD32 read_word1;
  229|       |
  230|  2.77k|      read_word1 = read_word << bit_pos;
  231|  2.77k|      ixheaacd_huffman_decode(read_word1, &index, &length, hcod_sf, table_idx);
  232|       |
  233|  2.77k|      bit_pos += length;
  234|       |
  235|  2.77k|      ixheaacd_aac_read_byte(&ptr_read_next, &bit_pos, &read_word);
  236|  2.91k|      while (bit_pos > 8)
  ------------------
  |  Branch (236:14): [True: 143, False: 2.77k]
  ------------------
  237|    143|        ixheaacd_aac_read_byte(&ptr_read_next, &bit_pos, &read_word);
  238|       |
  239|  2.77k|      it_bit_buf->ptr_read_next = ptr_read_next;
  240|  2.77k|      it_bit_buf->bit_pos = 7 - bit_pos;
  241|  2.77k|      it_bit_buf->cnt_bits -= length;
  242|       |
  243|  2.77k|      norm_value = index - 60;
  244|  2.77k|      if (norm_value == -1)
  ------------------
  |  Branch (244:11): [True: 40, False: 2.73k]
  ------------------
  245|     40|        ind_channel_info->cc_gain[c] =
  246|     40|            common_tables_ptr->cc_gain_scale[gain_element_scale];
  247|  2.73k|      else {
  248|  2.73k|        int i;
  249|  2.73k|        ind_channel_info->cc_gain[c] =
  250|  2.73k|            common_tables_ptr->cc_gain_scale[gain_element_scale];
  251|  7.81k|        for (i = 0; i < (-norm_value) - 1; i++) {
  ------------------
  |  Branch (251:21): [True: 5.08k, False: 2.73k]
  ------------------
  252|  5.08k|          ind_channel_info->cc_gain[c] = ixheaac_mul32_sh(
  253|  5.08k|              ind_channel_info->cc_gain[c],
  254|  5.08k|              common_tables_ptr->cc_gain_scale[gain_element_scale], 29);
  255|  5.08k|        }
  256|  2.73k|      }
  257|  2.77k|    } 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.77k|  }
  261|    891|  if (it_bit_buf->cnt_bits < 0) {
  ------------------
  |  Branch (261:7): [True: 17, False: 874]
  ------------------
  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|    874|  return error_status;
  265|    891|}
ixheaacd_dec_couple_channel:
  271|    272|{
  272|    272|  WORD i;
  273|    272|  WORD32 out_cc;
  274|    272|  WORD32 *ptr_out_samp = &out_samp_cc[0];
  275|   244k|  for (i = frame_size - 1; i >= 0; i--) {
  ------------------
  |  Branch (275:28): [True: 244k, False: 272]
  ------------------
  276|   244k|    out_cc = (ixheaac_shl32_sat(
  277|   244k|        ixheaac_mult32x16in32(*ptr_out_samp++, gain_cc), 3));
  278|   244k|    *p_time_data = ixheaac_add32_sat(out_cc, *p_time_data);
  279|   244k|    p_time_data += total_channels;
  280|   244k|  }
  281|    272|}
ixheaacd_dec_ind_coupling:
  287|    310|{
  288|    310|  WORD c, j, k;
  289|    310|  WORD l;
  290|    310|  WORD32 *out_samp_cc, err = 0;
  291|       |
  292|    310|  ia_enhaacplus_dec_ind_cc *ind_channel_info;
  293|       |
  294|    310|  WORD32 *ptr_time_data = (WORD32 *)ptr_time_data_tmp;
  295|       |
  296|    310|  {
  297|    310|    ind_channel_info = &p_obj_exhaacplus_dec->p_state_aac->ind_cc_info;
  298|       |
  299|    310|    out_samp_cc = coup_ch_output;
  300|       |
  301|    310|    if (ind_channel_info->num_coupled_elements > 0 && coup_ch_output == NULL) {
  ------------------
  |  Branch (301:9): [True: 99, False: 211]
  |  Branch (301:55): [True: 11, False: 88]
  ------------------
  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|    299|    j = 0;
  311|  1.13k|    for (c = 0; c < ind_channel_info->num_coupled_elements + 1; c++) {
  ------------------
  |  Branch (311:17): [True: 831, False: 299]
  ------------------
  312|  7.33k|      for (l = 0; l < MAX_BS_ELEMENT; l++) {
  ------------------
  |  |   24|  7.33k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  7.33k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (312:19): [True: 6.75k, False: 576]
  ------------------
  313|  6.75k|        if (p_obj_exhaacplus_dec->aac_config.element_type[l] ==
  ------------------
  |  Branch (313:13): [True: 1.76k, False: 4.99k]
  ------------------
  314|  6.75k|                ind_channel_info->elements_coupled[c] &&
  315|  1.76k|            p_obj_exhaacplus_dec->aac_config.element_instance_order[l] ==
  ------------------
  |  Branch (315:13): [True: 255, False: 1.51k]
  ------------------
  316|  1.76k|                ind_channel_info->cc_target_tag_select[c]) {
  317|    255|          break;
  318|    255|        }
  319|  6.75k|      }
  320|    831|      if (l == MAX_BS_ELEMENT) {
  ------------------
  |  |   24|    831|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|    831|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (320:11): [True: 576, False: 255]
  ------------------
  321|    576|        continue;
  322|    576|      }
  323|       |
  324|    255|      k = p_obj_exhaacplus_dec->aac_config.slot_element[l];
  325|       |
  326|    255|      if (ind_channel_info->cc_target_is_cpe[c] == 0) {
  ------------------
  |  Branch (326:11): [True: 202, False: 53]
  ------------------
  327|    202|        WORD32 *p_time_data = &ptr_time_data[k];
  328|       |
  329|    202|        WORD16 gain_cc = ixheaac_round16(ind_channel_info->cc_gain[j]);
  330|       |
  331|    202|        ixheaacd_dec_couple_channel(p_time_data, out_samp_cc, frame_size,
  332|    202|                                    total_channels, gain_cc);
  333|    202|      }
  334|    255|      if (ind_channel_info->cc_target_is_cpe[c] == 1) {
  ------------------
  |  Branch (334:11): [True: 53, False: 202]
  ------------------
  335|     53|        if (ind_channel_info->cc_l[c] == 1) {
  ------------------
  |  Branch (335:13): [True: 42, False: 11]
  ------------------
  336|     42|          WORD32 *p_time_data = &ptr_time_data[k];
  337|       |
  338|     42|          WORD16 gain_cc = ixheaac_round16(ind_channel_info->cc_gain[j]);
  339|       |
  340|     42|          ixheaacd_dec_couple_channel(p_time_data, out_samp_cc, frame_size,
  341|     42|                                      total_channels, gain_cc);
  342|     42|        }
  343|       |
  344|     53|        k = p_obj_exhaacplus_dec->aac_config.slot_element[l];
  345|       |
  346|     53|        if (ind_channel_info->cc_r[c] == 1) {
  ------------------
  |  Branch (346:13): [True: 28, False: 25]
  ------------------
  347|     28|          WORD32 *p_time_data = &ptr_time_data[k + 1];
  348|     28|          WORD16 gain_cc = ixheaac_round16(ind_channel_info->cc_gain[j + 1]);
  349|       |
  350|     28|          ixheaacd_dec_couple_channel(p_time_data, out_samp_cc, frame_size,
  351|     28|                                      total_channels, gain_cc);
  352|     28|        }
  353|     53|      }
  354|    255|      if (ind_channel_info->cc_target_is_cpe[c] == 1) {
  ------------------
  |  Branch (354:11): [True: 53, False: 202]
  ------------------
  355|     53|        j += 2;
  356|    202|      } else {
  357|    202|        j += 1;
  358|    202|      }
  359|    255|    }
  360|    299|  }
  361|      0|  return err;
  362|    310|}

ixheaacd_peak_limiter_init:
   47|  6.66k|                                  FLOAT32 *buffer, UWORD32 *delay_in_samples) {
   48|  6.66k|  UWORD32 attack;
   49|       |
   50|  6.66k|  attack = (UWORD32)(DEFAULT_ATTACK_TIME_MS * sample_rate / 1000);
  ------------------
  |  |   24|  6.66k|#define DEFAULT_ATTACK_TIME_MS (5.0f)
  ------------------
   51|  6.66k|  *delay_in_samples = attack;
   52|       |
   53|  6.66k|  if (attack < 1) return 0;
  ------------------
  |  Branch (53:7): [True: 84, False: 6.58k]
  ------------------
   54|       |
   55|  6.58k|  peak_limiter->max_buf = buffer;
   56|  6.58k|  peak_limiter->max_idx = 0;
   57|  6.58k|  peak_limiter->cir_buf_pnt = 0;
   58|  6.58k|  peak_limiter->delayed_input = buffer + attack * 4 + 32;
   59|       |
   60|  6.58k|  peak_limiter->delayed_input_index = 0;
   61|  6.58k|  peak_limiter->attack_time = DEFAULT_ATTACK_TIME_MS;
  ------------------
  |  |   24|  6.58k|#define DEFAULT_ATTACK_TIME_MS (5.0f)
  ------------------
   62|  6.58k|  peak_limiter->release_time = DEFAULT_RELEASE_TIME_MS;
  ------------------
  |  |   25|  6.58k|#define DEFAULT_RELEASE_TIME_MS (50.0f)
  ------------------
   63|  6.58k|  peak_limiter->attack_time_samples = attack;
   64|  6.58k|  peak_limiter->attack_constant = (FLOAT32)pow(0.1, 1.0 / (attack + 1));
   65|  6.58k|  peak_limiter->release_constant = (FLOAT32)pow(
   66|  6.58k|      0.1, 1.0 / (DEFAULT_RELEASE_TIME_MS * sample_rate / 1000 + 1));
  ------------------
  |  |   25|  6.58k|#define DEFAULT_RELEASE_TIME_MS (50.0f)
  ------------------
   67|  6.58k|  peak_limiter->num_channels = num_channels;
   68|  6.58k|  peak_limiter->sample_rate = sample_rate;
   69|  6.58k|  peak_limiter->min_gain = 1.0f;
   70|  6.58k|  peak_limiter->limiter_on = 1;
   71|  6.58k|  peak_limiter->pre_smoothed_gain = 1.0f;
   72|  6.58k|  peak_limiter->gain_modified = 1.0f;
   73|       |
   74|  6.58k|  return 0;
   75|  6.66k|}
ixheaacd_peak_limiter_process:
  194|  88.5k|                                   UWORD8 *qshift_adj) {
  195|  88.5k|  UWORD32 i, j;
  196|  88.5k|  FLOAT32 tmp, gain;
  197|  88.5k|  FLOAT32 min_gain = 1.0f;
  198|  88.5k|  FLOAT32 maximum;
  199|  88.5k|  UWORD32 num_channels = peak_limiter->num_channels;
  200|  88.5k|  UWORD32 attack_time_samples = peak_limiter->attack_time_samples;
  201|  88.5k|  FLOAT32 attack_constant = peak_limiter->attack_constant;
  202|  88.5k|  FLOAT32 release_constant = peak_limiter->release_constant;
  203|  88.5k|  FLOAT32 *max_buf = peak_limiter->max_buf;
  204|  88.5k|  FLOAT32 gain_modified = peak_limiter->gain_modified;
  205|  88.5k|  FLOAT32 *delayed_input = peak_limiter->delayed_input;
  206|  88.5k|  UWORD32 delayed_input_index = peak_limiter->delayed_input_index;
  207|  88.5k|  FLOAT64 pre_smoothed_gain = peak_limiter->pre_smoothed_gain;
  208|  88.5k|  WORD32 limit_threshold = PEAK_LIM_THR_FIX;
  ------------------
  |  |   27|  88.5k|#define PEAK_LIM_THR_FIX (2147483647)
  ------------------
  209|       |
  210|  88.5k|  WORD32 *samples = (WORD32 *)samples_t;
  211|       |
  212|  88.5k|  if (peak_limiter->limiter_on || (FLOAT32)pre_smoothed_gain) {
  ------------------
  |  Branch (212:7): [True: 88.5k, False: 0]
  |  Branch (212:35): [True: 0, False: 0]
  ------------------
  213|  76.2M|    for (i = 0; i < frame_len; i++) {
  ------------------
  |  Branch (213:17): [True: 76.1M, False: 88.5k]
  ------------------
  214|  76.1M|      tmp = 0.0f;
  215|   174M|      for (j = 0; j < num_channels; j++) {
  ------------------
  |  Branch (215:19): [True: 98.0M, False: 76.1M]
  ------------------
  216|  98.0M|        FLOAT32 gain_t = (FLOAT32)(1 << *(qshift_adj + j));
  217|  98.0M|        tmp = (FLOAT32)MAX(tmp, fabs((samples[i * num_channels + j] * gain_t)));
  ------------------
  |  |   29|  98.0M|#define MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (29:20): [True: 2.75M, False: 95.2M]
  |  |  ------------------
  ------------------
  218|  98.0M|      }
  219|  76.1M|      max_buf[peak_limiter->cir_buf_pnt] = tmp;
  220|       |
  221|  76.1M|      if (peak_limiter->max_idx == peak_limiter->cir_buf_pnt) {
  ------------------
  |  Branch (221:11): [True: 5.58M, False: 70.5M]
  ------------------
  222|  5.58M|        peak_limiter->max_idx = 0;
  223|   556M|        for (j = 1; j < (attack_time_samples); j++) {
  ------------------
  |  Branch (223:21): [True: 550M, False: 5.58M]
  ------------------
  224|   550M|          if (max_buf[j] > max_buf[peak_limiter->max_idx])
  ------------------
  |  Branch (224:15): [True: 14.8M, False: 535M]
  ------------------
  225|  14.8M|            peak_limiter->max_idx = j;
  226|   550M|        }
  227|  70.5M|      } else if (tmp >= max_buf[peak_limiter->max_idx]) {
  ------------------
  |  Branch (227:18): [True: 34.2M, False: 36.3M]
  ------------------
  228|  34.2M|        peak_limiter->max_idx = peak_limiter->cir_buf_pnt;
  229|  34.2M|      }
  230|  76.1M|      peak_limiter->cir_buf_pnt++;
  231|       |
  232|  76.1M|      if (peak_limiter->cir_buf_pnt == (WORD32)(attack_time_samples))
  ------------------
  |  Branch (232:11): [True: 677k, False: 75.4M]
  ------------------
  233|   677k|        peak_limiter->cir_buf_pnt = 0;
  234|  76.1M|      maximum = max_buf[peak_limiter->max_idx];
  235|       |
  236|  76.1M|      if (maximum > limit_threshold) {
  ------------------
  |  Branch (236:11): [True: 33.0M, False: 43.0M]
  ------------------
  237|  33.0M|        gain = limit_threshold / maximum;
  238|  43.0M|      } else {
  239|  43.0M|        gain = 1;
  240|  43.0M|      }
  241|       |
  242|  76.1M|      if (gain < pre_smoothed_gain) {
  ------------------
  |  Branch (242:11): [True: 5.99M, False: 70.1M]
  ------------------
  243|  5.99M|        gain_modified =
  244|  5.99M|            MIN(gain_modified,
  ------------------
  |  |   30|  5.99M|#define MIN(x, y) ((x) > (y) ? (y) : (x))
  |  |  ------------------
  |  |  |  Branch (30:20): [True: 179k, False: 5.81M]
  |  |  ------------------
  ------------------
  245|  5.99M|                (gain - 0.1f * (FLOAT32)pre_smoothed_gain) * 1.11111111f);
  246|       |
  247|  70.1M|      } else {
  248|  70.1M|        gain_modified = gain;
  249|  70.1M|      }
  250|       |
  251|  76.1M|      if (gain_modified < pre_smoothed_gain) {
  ------------------
  |  Branch (251:11): [True: 5.99M, False: 70.1M]
  ------------------
  252|  5.99M|        pre_smoothed_gain =
  253|  5.99M|            attack_constant * (pre_smoothed_gain - gain_modified) +
  254|  5.99M|            gain_modified;
  255|  5.99M|        pre_smoothed_gain = MAX(pre_smoothed_gain, gain);
  ------------------
  |  |   29|  5.99M|#define MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (29:20): [True: 5.97M, False: 27.6k]
  |  |  ------------------
  ------------------
  256|  70.1M|      } else {
  257|  70.1M|        pre_smoothed_gain =
  258|  70.1M|            release_constant * (pre_smoothed_gain - gain_modified) +
  259|  70.1M|            gain_modified;
  260|  70.1M|      }
  261|       |
  262|  76.1M|      gain = (FLOAT32)pre_smoothed_gain;
  263|       |
  264|   174M|      for (j = 0; j < num_channels; j++) {
  ------------------
  |  Branch (264:19): [True: 98.0M, False: 76.1M]
  ------------------
  265|  98.0M|        WORD64 tmp_fix;
  266|  98.0M|        tmp = delayed_input[delayed_input_index * num_channels + j];
  267|  98.0M|        FLOAT32 gain_t = (FLOAT32)(1 << *(qshift_adj + j));
  268|  98.0M|        delayed_input[delayed_input_index * num_channels + j] =
  269|  98.0M|            samples[i * num_channels + j] * gain_t;
  270|       |
  271|  98.0M|        tmp *= gain;
  272|       |
  273|  98.0M|        tmp_fix = (WORD64)tmp;
  274|       |
  275|  98.0M|        if (tmp_fix > limit_threshold)
  ------------------
  |  Branch (275:13): [True: 7.27M, False: 90.7M]
  ------------------
  276|  7.27M|          tmp_fix = limit_threshold;
  277|  90.7M|        else if (tmp_fix < -limit_threshold)
  ------------------
  |  Branch (277:18): [True: 7.50M, False: 83.2M]
  ------------------
  278|  7.50M|          tmp_fix = -limit_threshold;
  279|       |
  280|  98.0M|        samples[i * num_channels + j] = (WORD32)tmp_fix;
  281|  98.0M|      }
  282|       |
  283|  76.1M|      delayed_input_index++;
  284|  76.1M|      if (delayed_input_index >= attack_time_samples) delayed_input_index = 0;
  ------------------
  |  Branch (284:11): [True: 677k, False: 75.4M]
  ------------------
  285|       |
  286|  76.1M|      if (gain < min_gain) min_gain = gain;
  ------------------
  |  Branch (286:11): [True: 3.19M, False: 72.9M]
  ------------------
  287|  76.1M|    }
  288|  88.5k|  } 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|  88.5k|  peak_limiter->gain_modified = gain_modified;
  304|  88.5k|  peak_limiter->delayed_input_index = delayed_input_index;
  305|  88.5k|  peak_limiter->pre_smoothed_gain = pre_smoothed_gain;
  306|  88.5k|  peak_limiter->min_gain = min_gain;
  307|       |
  308|  88.5k|  return;
  309|  88.5k|}

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.77M|  for (sfb = 0; sfb <= sfb_width; sfb++) {
  ------------------
  |  Branch (81:17): [True: 6.22M, False: 544k]
  ------------------
   82|  6.22M|    *seed = (WORD32)(((WORD64)1664525 * (WORD64)(*seed)) + (WORD64)1013904223);
   83|       |
   84|  6.22M|    *spec = (*seed >> 3);
   85|       |
   86|  6.22M|    nrg = ixheaac_add32_sat(nrg, ixheaac_mult32_shl_sat(*spec, *spec));
   87|       |
   88|  6.22M|    spec++;
   89|  6.22M|  }
   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: 21.5k, False: 522k]
  ------------------
  105|  21.5k|    shift = -31;
  106|  21.5k|  }
  107|  6.77M|  for (sfb = 0; sfb <= sfb_width; sfb++) {
  ------------------
  |  Branch (107:17): [True: 6.22M, False: 544k]
  ------------------
  108|  6.22M|    *spec = ixheaac_shr32_dir_sat_limit(ixheaac_mult32_shl_sat(*spec, scale),
  109|  6.22M|                                         shift);
  110|  6.22M|    spec++;
  111|  6.22M|  }
  112|   544k|}
ixheaacd_pns_process:
  115|   226k|                          WORD32 channel, ia_aac_dec_tables_struct *ptr_aac_tables) {
  116|   226k|  ia_pns_info_struct *ptr_pns_info =
  117|   226k|      &ptr_aac_dec_channel_info[channel]->str_pns_info;
  118|   226k|  ia_ics_info_struct *ptr_ics_info =
  119|   226k|      &ptr_aac_dec_channel_info[channel]->str_ics_info;
  120|   226k|  WORD16 maximum_bins_short = ptr_ics_info->frame_length >> 3;
  121|   226k|  WORD32 *ptr_scale_mant_tab =
  122|   226k|      ptr_aac_tables->pstr_block_tables->scale_mant_tab;
  123|       |
  124|   226k|  if (ptr_pns_info->pns_active) {
  ------------------
  |  Branch (124:7): [True: 37.4k, False: 189k]
  ------------------
  125|  37.4k|    const WORD16 *swb_offset =
  126|  37.4k|        ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence]
  127|  37.4k|            .sfb_index;
  128|       |
  129|  37.4k|    WORD num_win_group, grp_len, sfb;
  130|  37.4k|    WORD32 *spec = &ptr_aac_dec_channel_info[channel]->ptr_spec_coeff[0];
  131|       |
  132|  79.5k|    for (num_win_group = 0; num_win_group < ptr_ics_info->num_window_groups;
  ------------------
  |  Branch (132:29): [True: 42.1k, False: 37.4k]
  ------------------
  133|  42.1k|         num_win_group++) {
  134|  42.1k|      grp_len = ptr_ics_info->window_group_length[num_win_group];
  135|       |
  136|  42.1k|      for (grp_len = 0;
  137|   117k|           grp_len < ptr_ics_info->window_group_length[num_win_group];
  ------------------
  |  Branch (137:12): [True: 75.3k, False: 42.1k]
  ------------------
  138|  75.3k|           grp_len++) {
  139|  1.37M|        for (sfb = 0; sfb < ptr_ics_info->max_sfb; sfb++) {
  ------------------
  |  Branch (139:23): [True: 1.29M, False: 75.3k]
  ------------------
  140|  1.29M|          WORD16 pns_band = ((num_win_group << 4) + sfb);
  141|       |
  142|  1.29M|          if (ptr_aac_dec_channel_info[channel]
  ------------------
  |  Branch (142:15): [True: 544k, False: 750k]
  ------------------
  143|  1.29M|                  ->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: 55.3k, False: 489k]
  ------------------
  158|   544k|                                        pns_band)) {
  159|  55.3k|              if (channel == 0) {
  ------------------
  |  Branch (159:19): [True: 34.4k, False: 20.9k]
  ------------------
  160|  34.4k|                ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  34.4k|#define LEFT 0
  ------------------
  161|  34.4k|                    ->pstr_pns_corr_info->random_vector[pns_band] =
  162|  34.4k|                    ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  34.4k|#define LEFT 0
  ------------------
  163|  34.4k|                        ->pstr_pns_rand_vec_data->current_seed;
  164|       |
  165|  34.4k|                ixheaacd_gen_rand_vec(
  166|  34.4k|                    scale_mant, scale_exp, ptr_spec, sfb_width,
  167|  34.4k|                    &(ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  34.4k|#define LEFT 0
  ------------------
  168|  34.4k|                          ->pstr_pns_rand_vec_data->current_seed));
  169|  34.4k|              }
  170|       |
  171|  20.9k|              else {
  172|  20.9k|                ixheaacd_gen_rand_vec(
  173|  20.9k|                    scale_mant, scale_exp, ptr_spec, sfb_width,
  174|  20.9k|                    &(ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  20.9k|#define LEFT 0
  ------------------
  175|  20.9k|                          ->pstr_pns_corr_info->random_vector[pns_band]));
  176|  20.9k|              }
  177|       |
  178|  55.3k|            }
  179|       |
  180|   489k|            else {
  181|   489k|              ixheaacd_gen_rand_vec(
  182|   489k|                  scale_mant, scale_exp, ptr_spec, sfb_width,
  183|   489k|                  &(ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|   489k|#define LEFT 0
  ------------------
  184|   489k|                        ->pstr_pns_rand_vec_data->current_seed));
  185|   489k|            }
  186|   544k|          }
  187|  1.29M|        }
  188|       |
  189|  75.3k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (189:13): [True: 18.7k, False: 56.6k]
  ------------------
  190|  18.7k|          spec += maximum_bins_short;
  191|  56.6k|        else
  192|  56.6k|          spec += 128;
  193|  75.3k|      }
  194|  42.1k|    }
  195|  37.4k|  }
  196|       |
  197|   226k|  if (channel == 0) {
  ------------------
  |  Branch (197:7): [True: 206k, False: 20.3k]
  ------------------
  198|   206k|    ptr_aac_dec_channel_info[0]->pstr_pns_rand_vec_data->pns_frame_number++;
  199|   206k|  }
  200|   226k|}
ixheaacd_tns_decode_coef:
  204|  33.0k|                              ia_aac_dec_tables_struct *ptr_aac_tables) {
  205|  33.0k|  WORD order, resolution;
  206|  33.0k|  WORD16 *ptr_par_coef = parcor_coef;
  207|  33.0k|  WORD16 *tns_coeff_ptr;
  208|  33.0k|  WORD8 ixheaacd_drc_offset = 4;
  209|  33.0k|  WORD8 *ptr_coef = (WORD8 *)filter->coef;
  210|       |
  211|  33.0k|  resolution = filter->resolution;
  212|  33.0k|  tns_coeff_ptr = ptr_aac_tables->pstr_block_tables->tns_coeff3_16;
  213|       |
  214|  33.0k|  if (resolution) {
  ------------------
  |  Branch (214:7): [True: 21.5k, False: 11.5k]
  ------------------
  215|  21.5k|    tns_coeff_ptr = ptr_aac_tables->pstr_block_tables->tns_coeff4_16;
  216|  21.5k|    ixheaacd_drc_offset = ixheaacd_drc_offset << 1;
  217|  21.5k|  }
  218|       |
  219|   227k|  for (order = 0; order < filter->order; order++) {
  ------------------
  |  Branch (219:19): [True: 194k, False: 33.0k]
  ------------------
  220|   194k|    WORD8 temp = *ptr_coef++;
  221|   194k|    *ptr_par_coef++ = tns_coeff_ptr[temp + ixheaacd_drc_offset];
  222|   194k|  }
  223|  33.0k|}
ixheaacd_aac_tns_process:
  251|  64.9k|    WORD32 ar_flag, WORD32 *predicted_spectrum) {
  252|  64.9k|  WORD i;
  253|  64.9k|  WORD16 scale_lpc;
  254|       |
  255|  64.9k|  ia_tns_info_aac_struct *ptr_tns_info =
  256|  64.9k|      &ptr_aac_dec_channel_info->str_tns_info;
  257|  64.9k|  WORD32 *spec = ptr_aac_dec_channel_info->ptr_spec_coeff;
  258|  64.9k|  WORD32 *scratch_buf = ptr_aac_dec_channel_info->scratch_buf_ptr;
  259|       |
  260|  64.9k|  WORD win, filt, start, stop, size, scale_spec;
  261|  64.9k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
  262|  64.9k|  WORD num_window, tns_max_bands, win_seq;
  263|  64.9k|  WORD16 maximum_bins_short = ptr_ics_info->frame_length >> 3;
  264|  64.9k|  WORD position;
  265|       |
  266|  64.9k|  WORD32 parcor_coef[MAX_ORDER + 1];
  267|  64.9k|  WORD16 parcor_coef_16[MAX_ORDER + 1];
  268|       |
  269|  64.9k|  WORD32 lpc_coef[MAX_ORDER + 1];
  270|  64.9k|  WORD16 lpc_coef_16[MAX_ORDER + 1];
  271|       |
  272|  64.9k|  const WORD16 *ptr_sfb_table;
  273|       |
  274|  64.9k|  WORD16 max_bin_long = ptr_ics_info->frame_length;
  275|       |
  276|  64.9k|  win_seq = ptr_ics_info->window_sequence == 0
  ------------------
  |  Branch (276:13): [True: 32.5k, False: 32.3k]
  ------------------
  277|  64.9k|                ? 0
  278|  64.9k|                : (ptr_ics_info->window_sequence % 2 == 0);
  279|       |
  280|  64.9k|  if (ar_flag)
  ------------------
  |  Branch (280:7): [True: 55.7k, False: 9.21k]
  ------------------
  281|  55.7k|    spec = ptr_aac_dec_channel_info->ptr_spec_coeff;
  282|  9.21k|  else {
  283|  9.21k|    spec = predicted_spectrum;
  284|  9.21k|  }
  285|       |
  286|  64.9k|  if (object_type == AOT_ER_AAC_ELD || object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (286:7): [True: 4.45k, False: 60.4k]
  |  Branch (286:40): [True: 27.5k, False: 32.9k]
  ------------------
  287|  35.3k|      object_type == AOT_AAC_LTP) {
  ------------------
  |  Branch (287:7): [True: 3.37k, False: 29.5k]
  ------------------
  288|  35.3k|    if (512 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (288:9): [True: 25.1k, False: 10.1k]
  ------------------
  289|  25.1k|      tns_max_bands =
  290|  25.1k|          ptr_aac_tables->pstr_block_tables
  291|  25.1k|              ->tns_max_bands_tbl_ld[ptr_ics_info->sampling_rate_index];
  292|  25.1k|      win_seq = 1;
  293|  25.1k|      num_window = win_seq;
  294|  25.1k|    } else if (480 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (294:16): [True: 4.45k, False: 5.72k]
  ------------------
  295|  4.45k|      tns_max_bands =
  296|  4.45k|          ptr_aac_tables->pstr_block_tables
  297|  4.45k|              ->tns_max_bands_tbl_480[ptr_ics_info->sampling_rate_index];
  298|  4.45k|      win_seq = 1;
  299|  4.45k|      num_window = win_seq;
  300|  5.72k|    } else {
  301|  5.72k|      tns_max_bands =
  302|  5.72k|          ptr_aac_tables->pstr_block_tables
  303|  5.72k|              ->tns_max_bands_tbl[ptr_ics_info->sampling_rate_index][win_seq];
  304|       |
  305|  5.72k|      num_window = win_seq ? 8 : 1;
  ------------------
  |  Branch (305:20): [True: 638, False: 5.08k]
  ------------------
  306|  5.72k|    }
  307|  35.3k|  } else {
  308|  29.5k|    tns_max_bands =
  309|  29.5k|        ptr_aac_tables->pstr_block_tables
  310|  29.5k|            ->tns_max_bands_tbl[ptr_ics_info->sampling_rate_index][win_seq];
  311|       |
  312|  29.5k|    num_window = win_seq ? 8 : 1;
  ------------------
  |  Branch (312:18): [True: 7.96k, False: 21.5k]
  ------------------
  313|  29.5k|  }
  314|       |
  315|  64.9k|  ptr_sfb_table =
  316|  64.9k|      ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence].sfb_index;
  317|       |
  318|   190k|  for (win = 0; win < num_window; win++) {
  ------------------
  |  Branch (318:17): [True: 125k, False: 64.9k]
  ------------------
  319|   125k|    WORD n_filt = ptr_tns_info->n_filt[win];
  320|       |
  321|   192k|    for (filt = 0; filt < n_filt; filt++) {
  ------------------
  |  Branch (321:20): [True: 67.2k, False: 125k]
  ------------------
  322|  67.2k|      ia_filter_info_struct *filter = &ptr_tns_info->str_filter[win][filt];
  323|       |
  324|  67.2k|      if (filter->order <= 0) {
  ------------------
  |  Branch (324:11): [True: 9.41k, False: 57.8k]
  ------------------
  325|  9.41k|        continue;
  326|  9.41k|      }
  327|       |
  328|  57.8k|      if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP) ||
  ------------------
  |  Branch (328:11): [True: 24.2k, False: 33.5k]
  |  Branch (328:45): [True: 404, False: 33.1k]
  ------------------
  329|  33.1k|          (num_ch > 2)) {
  ------------------
  |  Branch (329:11): [True: 144, False: 33.0k]
  ------------------
  330|  24.7k|        ixheaacd_tns_decode_coefficients(filter, parcor_coef, ptr_aac_tables);
  331|       |
  332|  33.0k|      } else {
  333|  33.0k|        ixheaacd_tns_decode_coef(filter, parcor_coef_16, ptr_aac_tables);
  334|  33.0k|      }
  335|       |
  336|  57.8k|      start = ixheaac_min32(ixheaac_min32(filter->start_band, tns_max_bands),
  337|  57.8k|                             ptr_ics_info->max_sfb);
  338|       |
  339|  57.8k|      start = ptr_sfb_table[start];
  340|       |
  341|  57.8k|      stop = ixheaac_min32(ixheaac_min32(filter->stop_band, tns_max_bands),
  342|  57.8k|                            ptr_ics_info->max_sfb);
  343|       |
  344|  57.8k|      stop = ptr_sfb_table[stop];
  345|       |
  346|  57.8k|      size = (stop - start);
  347|       |
  348|  57.8k|      if (size <= 0) {
  ------------------
  |  Branch (348:11): [True: 11.7k, False: 46.0k]
  ------------------
  349|  11.7k|        continue;
  350|  11.7k|      }
  351|  46.0k|      if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP) ||
  ------------------
  |  Branch (351:11): [True: 19.0k, False: 26.9k]
  |  Branch (351:45): [True: 349, False: 26.6k]
  ------------------
  352|  26.6k|          (num_ch > 2)) {
  ------------------
  |  Branch (352:11): [True: 89, False: 26.5k]
  ------------------
  353|  19.5k|        ixheaacd_tns_parcor_to_lpc(parcor_coef, lpc_coef, &scale_lpc,
  354|  19.5k|                                   filter->order);
  355|       |
  356|  26.5k|      } else {
  357|  26.5k|        (*ixheaacd_tns_parcor_lpc_convert)(parcor_coef_16, lpc_coef_16,
  358|  26.5k|                                           &scale_lpc, filter->order);
  359|  26.5k|      }
  360|       |
  361|  46.0k|      {
  362|  46.0k|        WORD32 *ptr_tmp;
  363|       |
  364|  46.0k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (364:13): [True: 13.7k, False: 32.3k]
  ------------------
  365|  13.7k|          ptr_tmp = spec + (win * maximum_bins_short) + start;
  366|  32.3k|        else
  367|  32.3k|          ptr_tmp = spec + (win << 7) + start;
  368|       |
  369|  46.0k|        scale_spec = (*ixheaacd_calc_max_spectral_line)(ptr_tmp, size);
  370|  46.0k|      }
  371|       |
  372|  46.0k|      if (filter->direction == -1) {
  ------------------
  |  Branch (372:11): [True: 26.2k, False: 19.8k]
  ------------------
  373|  26.2k|        position = stop - 1;
  374|       |
  375|  26.2k|        if (maximum_bins_short == 120) {
  ------------------
  |  Branch (375:13): [True: 11.6k, False: 14.5k]
  ------------------
  376|  11.6k|          if (((win * maximum_bins_short) + position) < filter->order) continue;
  ------------------
  |  Branch (376:15): [True: 1.42k, False: 10.2k]
  ------------------
  377|  14.5k|        } else {
  378|  14.5k|          if (((win << 7) + position) < filter->order) continue;
  ------------------
  |  Branch (378:15): [True: 781, False: 13.7k]
  ------------------
  379|  14.5k|        }
  380|       |
  381|  26.2k|      } else {
  382|  19.8k|        position = start;
  383|  19.8k|        if (maximum_bins_short == 120) {
  ------------------
  |  Branch (383:13): [True: 2.08k, False: 17.7k]
  ------------------
  384|  2.08k|          if ((((win * maximum_bins_short) + position) + filter->order) > max_bin_long)
  ------------------
  |  Branch (384:15): [True: 0, False: 2.08k]
  ------------------
  385|      0|            continue;
  386|  17.7k|        } else {
  387|  17.7k|          if ((((win << 7) + position) + filter->order) > MAX_BINS_LONG) continue;
  ------------------
  |  |   28|  17.7k|#define MAX_BINS_LONG 1024
  ------------------
  |  Branch (387:15): [True: 0, False: 17.7k]
  ------------------
  388|  17.7k|        }
  389|  19.8k|      }
  390|       |
  391|  43.8k|      if ((num_ch <= 2) &&
  ------------------
  |  Branch (391:11): [True: 43.7k, False: 130]
  ------------------
  392|  43.7k|          ((object_type != AOT_ER_AAC_LD) && (object_type != AOT_AAC_LTP)))
  ------------------
  |  Branch (392:12): [True: 24.6k, False: 19.0k]
  |  Branch (392:46): [True: 24.3k, False: 308]
  ------------------
  393|  24.3k|        scale_spec = ((scale_spec - 4) - scale_lpc);
  394|  19.5k|      else {
  395|  19.5k|        if (scale_spec > 17)
  ------------------
  |  Branch (395:13): [True: 1.37k, False: 18.1k]
  ------------------
  396|  1.37k|          scale_spec = ((scale_spec - 6) - scale_lpc);
  397|  18.1k|        else if (scale_spec > 11)
  ------------------
  |  Branch (397:18): [True: 289, False: 17.8k]
  ------------------
  398|    289|          scale_spec = ((scale_spec - 5) - scale_lpc);
  399|  17.8k|        else
  400|  17.8k|          scale_spec = ((scale_spec - 4) - scale_lpc);
  401|  19.5k|      }
  402|       |
  403|  43.8k|      if (scale_spec > 0) {
  ------------------
  |  Branch (403:11): [True: 15.6k, False: 28.2k]
  ------------------
  404|  15.6k|        scale_spec = ixheaac_min32(scale_spec, 31);
  405|       |
  406|  15.6k|        if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP) ||
  ------------------
  |  Branch (406:13): [True: 3.97k, False: 11.6k]
  |  Branch (406:47): [True: 257, False: 11.3k]
  ------------------
  407|  11.3k|            (num_ch > 2)) {
  ------------------
  |  Branch (407:13): [True: 38, False: 11.3k]
  ------------------
  408|  4.26k|          if (ar_flag)
  ------------------
  |  Branch (408:15): [True: 3.33k, False: 933]
  ------------------
  409|  3.33k|          {
  410|  3.33k|            if (maximum_bins_short == 120) {
  ------------------
  |  Branch (410:17): [True: 197, False: 3.13k]
  ------------------
  411|    197|              (*ixheaacd_tns_ar_filter_fixed)(&spec[(win * maximum_bins_short) + position],
  412|    197|                                              size, filter->direction,
  413|    197|                                              (WORD32 *)lpc_coef, filter->order,
  414|    197|                                              (WORD32)scale_lpc, scale_spec);
  415|  3.13k|            } else {
  416|  3.13k|              (*ixheaacd_tns_ar_filter_fixed)(&spec[(win << 7) + position], size,
  417|  3.13k|                                              filter->direction,
  418|  3.13k|                                              (WORD32 *)lpc_coef, filter->order,
  419|  3.13k|                                              (WORD32)scale_lpc, scale_spec);
  420|  3.13k|            }
  421|  3.33k|          } else {
  422|    933|            if (maximum_bins_short == 120) {
  ------------------
  |  Branch (422:17): [True: 43, False: 890]
  ------------------
  423|     43|              ixheaacd_tns_ma_filter_fixed_ld(&spec[(win * maximum_bins_short) + position],
  424|     43|                                              size, filter->direction, lpc_coef,
  425|     43|                                              filter->order, scale_lpc);
  426|    890|            } else {
  427|    890|              ixheaacd_tns_ma_filter_fixed_ld(&spec[(win << 7) + position], size,
  428|    890|                                              filter->direction, lpc_coef,
  429|    890|                                              filter->order, scale_lpc);
  430|    890|            }
  431|    933|          }
  432|  11.3k|        } else {
  433|  11.3k|          if (object_type == AOT_ER_AAC_ELD) scale_spec = scale_spec - 1;
  ------------------
  |  Branch (433:15): [True: 841, False: 10.5k]
  ------------------
  434|  11.3k|          if (maximum_bins_short == 120) {
  ------------------
  |  Branch (434:15): [True: 8.60k, False: 2.74k]
  ------------------
  435|  8.60k|            (*ixheaacd_tns_ar_filter)(&spec[(win * maximum_bins_short) + position], size,
  436|  8.60k|                                      filter->direction, lpc_coef_16,
  437|  8.60k|                                      filter->order, (WORD32)scale_lpc,
  438|  8.60k|                                      scale_spec, scratch_buf);
  439|  8.60k|          } else {
  440|  2.74k|            (*ixheaacd_tns_ar_filter)(&spec[(win << 7) + position], size,
  441|  2.74k|                                      filter->direction, lpc_coef_16,
  442|  2.74k|                                      filter->order, (WORD32)scale_lpc,
  443|  2.74k|                                      scale_spec, scratch_buf);
  444|  2.74k|          }
  445|  11.3k|        }
  446|  15.6k|      }
  447|       |
  448|  28.2k|      else {
  449|  28.2k|        WORD32 *ptr_tmp;
  450|       |
  451|  28.2k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (451:13): [True: 3.47k, False: 24.7k]
  ------------------
  452|  3.47k|          ptr_tmp = spec + (win * maximum_bins_short) + start;
  453|  24.7k|        else
  454|  24.7k|          ptr_tmp = spec + (win >> 7) + start;
  455|       |
  456|  28.2k|        scale_spec = -scale_spec;
  457|  28.2k|        scale_spec = ixheaac_min32(scale_spec, 31);
  458|       |
  459|  4.17M|        for (i = size; i != 0; i--) {
  ------------------
  |  Branch (459:24): [True: 4.14M, False: 28.2k]
  ------------------
  460|  4.14M|          *ptr_tmp = (*ptr_tmp >> scale_spec);
  461|  4.14M|          ptr_tmp++;
  462|  4.14M|        }
  463|       |
  464|  28.2k|        if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP) ||
  ------------------
  |  Branch (464:13): [True: 15.1k, False: 13.1k]
  |  Branch (464:47): [True: 92, False: 13.0k]
  ------------------
  465|  15.2k|            num_ch > 2) {
  ------------------
  |  Branch (465:13): [True: 51, False: 12.9k]
  ------------------
  466|  15.2k|          if (ar_flag) {
  ------------------
  |  Branch (466:15): [True: 6.58k, False: 8.67k]
  ------------------
  467|  6.58k|            if (maximum_bins_short == 120) {
  ------------------
  |  Branch (467:17): [True: 65, False: 6.51k]
  ------------------
  468|     65|              (*ixheaacd_tns_ar_filter_fixed)(
  469|     65|                  &spec[(win * maximum_bins_short) + position], size, filter->direction,
  470|     65|                  (WORD32 *)lpc_coef, filter->order, scale_lpc, 0);
  471|  6.51k|            } else {
  472|  6.51k|              (*ixheaacd_tns_ar_filter_fixed)(
  473|  6.51k|                  &spec[(win << 7) + position], size, filter->direction,
  474|  6.51k|                  (WORD32 *)lpc_coef, filter->order, scale_lpc, 0);
  475|  6.51k|            }
  476|  8.67k|          } else {
  477|  8.67k|            if (maximum_bins_short == 120) {
  ------------------
  |  Branch (477:17): [True: 27, False: 8.64k]
  ------------------
  478|     27|              ixheaacd_tns_ma_filter_fixed_ld(&spec[(win * maximum_bins_short) + position],
  479|     27|                                              size, filter->direction, lpc_coef,
  480|     27|                                              filter->order, scale_lpc);
  481|  8.64k|            } else {
  482|  8.64k|              ixheaacd_tns_ma_filter_fixed_ld(&spec[(win << 7) + position], size,
  483|  8.64k|                                              filter->direction, lpc_coef,
  484|  8.64k|                                              filter->order, scale_lpc);
  485|  8.64k|            }
  486|  8.67k|          }
  487|  15.2k|        } else {
  488|  12.9k|          if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (488:15): [True: 2.67k, False: 10.3k]
  ------------------
  489|  2.67k|            scale_lpc = scale_lpc - 1;
  490|  2.67k|          }
  491|       |
  492|  12.9k|          if (maximum_bins_short == 120) {
  ------------------
  |  Branch (492:15): [True: 3.38k, False: 9.61k]
  ------------------
  493|  3.38k|            (*ixheaacd_tns_ar_filter)(&spec[(win * maximum_bins_short) + position], size,
  494|  3.38k|                                      filter->direction, lpc_coef_16,
  495|  3.38k|                                      filter->order, scale_lpc, 0, scratch_buf);
  496|  9.61k|          } else {
  497|  9.61k|            (*ixheaacd_tns_ar_filter)(&spec[(win << 7) + position], size,
  498|  9.61k|                                      filter->direction, lpc_coef_16,
  499|  9.61k|                                      filter->order, scale_lpc, 0, scratch_buf);
  500|  9.61k|          }
  501|  12.9k|        }
  502|       |
  503|  28.2k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (503:13): [True: 3.47k, False: 24.7k]
  ------------------
  504|  3.47k|          ptr_tmp = spec + (win * maximum_bins_short) + start;
  505|  24.7k|        else
  506|  24.7k|          ptr_tmp = spec + (win << 7) + start;
  507|       |
  508|  4.17M|        for (i = size; i != 0; i--) {
  ------------------
  |  Branch (508:24): [True: 4.14M, False: 28.2k]
  ------------------
  509|  4.14M|          *ptr_tmp = (*ptr_tmp << scale_spec);
  510|  4.14M|          ptr_tmp++;
  511|  4.14M|        }
  512|  28.2k|      }
  513|  43.8k|    }
  514|   125k|  }
  515|  64.9k|}
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.8k|                            FLOAT32 *p_qmf_ener, FLOAT32 *p_qmfh) {
  179|  63.8k|  switch (ptr_pvc_data->pvc_mode) {
  180|  3.46k|    case 1:
  ------------------
  |  Branch (180:5): [True: 3.46k, False: 60.3k]
  ------------------
  181|  3.46k|      ptr_pvc_data->nb_high = PVC_NB_HIGH_MODE1;
  ------------------
  |  |  187|  3.46k|#define PVC_NB_HIGH_MODE1 8
  ------------------
  182|  3.46k|      ptr_pvc_data->nb_high_per_grp = 8 / ptr_pvc_data->pvc_rate;
  183|  3.46k|      ptr_pvc_data->p_pred_coeff_tab_1 =
  184|  3.46k|          (WORD8 *)ixheaacd_pred_coeff_table_1_mode_1;
  185|  3.46k|      ptr_pvc_data->p_pred_coeff_tab_2 =
  186|  3.46k|          (WORD8 *)ixheaacd_pred_coeff_table_2_mode_1;
  187|  3.46k|      ptr_pvc_data->p_pvc_id_boundary =
  188|  3.46k|          (UWORD8 *)ixheaacd_pred_coeff_pvc_id_boundaries_1;
  189|  3.46k|      ptr_pvc_data->p_q_fac = (FLOAT32 *)ixheaacd_q_factor_table_mode_1;
  190|  3.46k|      if (ptr_pvc_data->ns_mode) {
  ------------------
  |  Branch (190:11): [True: 180, False: 3.28k]
  ------------------
  191|    180|        ptr_pvc_data->num_time_slots = 4;
  192|    180|        ptr_pvc_data->p_smth_wind_coeff =
  193|    180|            (FLOAT32 *)ixheaacd_pvc_smoothing_wind_tab_ns4;
  194|  3.28k|      } else {
  195|  3.28k|        ptr_pvc_data->num_time_slots = 16;
  196|  3.28k|        ptr_pvc_data->p_smth_wind_coeff =
  197|  3.28k|            (FLOAT32 *)ixheaacd_pvc_smoothing_wind_tab_ns16;
  198|  3.28k|      }
  199|  3.46k|      break;
  200|  60.3k|    case 2:
  ------------------
  |  Branch (200:5): [True: 60.3k, False: 3.49k]
  ------------------
  201|  60.3k|      ptr_pvc_data->nb_high = PVC_NB_HIGH_MODE2;
  ------------------
  |  |  188|  60.3k|#define PVC_NB_HIGH_MODE2 6
  ------------------
  202|  60.3k|      ptr_pvc_data->nb_high_per_grp = 12 / ptr_pvc_data->pvc_rate;
  203|  60.3k|      ptr_pvc_data->p_pred_coeff_tab_1 =
  204|  60.3k|          (WORD8 *)ixheaacd_pred_coeff_table_1_mode_2;
  205|  60.3k|      ptr_pvc_data->p_pred_coeff_tab_2 =
  206|  60.3k|          (WORD8 *)ixheaacd_pred_coeff_table_2_mode_2;
  207|  60.3k|      ptr_pvc_data->p_pvc_id_boundary =
  208|  60.3k|          (UWORD8 *)ixheaacd_pred_coeff_pvc_id_boundaries_2;
  209|  60.3k|      ptr_pvc_data->p_q_fac = (FLOAT32 *)ixheaacd_q_factor_table_mode_2;
  210|  60.3k|      if (ptr_pvc_data->ns_mode) {
  ------------------
  |  Branch (210:11): [True: 11.6k, False: 48.6k]
  ------------------
  211|  11.6k|        ptr_pvc_data->num_time_slots = 3;
  212|  11.6k|        ptr_pvc_data->p_smth_wind_coeff =
  213|  11.6k|            (FLOAT32 *)ixheaacd_pvc_smoothing_wind_tab_ns3;
  214|  48.6k|      } else {
  215|  48.6k|        ptr_pvc_data->num_time_slots = 12;
  216|  48.6k|        ptr_pvc_data->p_smth_wind_coeff =
  217|  48.6k|            (FLOAT32 *)ixheaacd_pvc_smoothing_wind_tab_ns12;
  218|  48.6k|      }
  219|  60.3k|      break;
  220|     36|    default:
  ------------------
  |  Branch (220:5): [True: 36, False: 63.7k]
  ------------------
  221|     36|      return -1;
  222|  63.8k|  }
  223|  63.7k|  ptr_pvc_data->prev_pvc_id = ptr_pvc_data->pvc_id[PVC_NUM_TIME_SLOTS - 1];
  ------------------
  |  |  177|  63.7k|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  224|       |
  225|  63.7k|  ixheaacd_pvc_qmf_grouping(ptr_pvc_data, first_bnd_idx, p_qmf_ener,
  226|  63.7k|                            first_pvc_timeslot);
  227|       |
  228|  63.7k|  ixheaacd_pvc_time_smoothing(ptr_pvc_data);
  229|       |
  230|  63.7k|  ixheaacd_pvc_pred_env_sf(ptr_pvc_data);
  231|       |
  232|  63.7k|  ixheaacd_pvc_sb_parsing(ptr_pvc_data, first_bnd_idx, p_qmfh);
  233|       |
  234|  63.7k|  memcpy((FLOAT32 *)(&ptr_pvc_data->esg[0][0]),
  235|  63.7k|         (FLOAT32 *)(&ptr_pvc_data->esg[PVC_NUM_TIME_SLOTS][0]),
  ------------------
  |  |  177|  63.7k|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  236|  63.7k|         sizeof(FLOAT32) * (PVC_NUM_TIME_SLOTS - 1) * 3);
  ------------------
  |  |  177|  63.7k|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  237|       |
  238|  63.7k|  return 0;
  239|  63.8k|}
ixheaacd_pred_vec_block.c:ixheaacd_pvc_qmf_grouping:
   64|  63.7k|                                      WORD32 first_pvc_timeslot) {
   65|  63.7k|  WORD32 ksg, time_slot, ib;
   66|  63.7k|  WORD32 lbw, start_band, end_band;
   67|  63.7k|  FLOAT32 esg;
   68|  63.7k|  FLOAT32 *p_esg = (FLOAT32 *)ptr_pvc_data->esg;
   69|       |
   70|  63.7k|  lbw = 8 / ptr_pvc_data->pvc_rate;
   71|       |
   72|  1.08M|  for (time_slot = 0; time_slot < PVC_NUM_TIME_SLOTS; time_slot++) {
  ------------------
  |  |  177|  1.08M|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  |  Branch (72:23): [True: 1.02M, False: 63.7k]
  ------------------
   73|  4.08M|    for (ksg = 0; ksg < PVC_NB_LOW; ksg++) {
  ------------------
  |  |  190|  4.08M|#define PVC_NB_LOW 3
  ------------------
  |  Branch (73:19): [True: 3.06M, False: 1.02M]
  ------------------
   74|  3.06M|      start_band = first_bnd_idx - lbw * PVC_NB_LOW + lbw * ksg;
  ------------------
  |  |  190|  3.06M|#define PVC_NB_LOW 3
  ------------------
   75|  3.06M|      end_band = start_band + lbw - 1;
   76|  3.06M|      if (start_band >= 0) {
  ------------------
  |  Branch (76:11): [True: 2.38M, False: 673k]
  ------------------
   77|  2.38M|        esg = 0.0f;
   78|  11.3M|        for (ib = start_band; ib <= end_band; ib++) {
  ------------------
  |  Branch (78:31): [True: 8.93M, False: 2.38M]
  ------------------
   79|  8.93M|          esg += p_qmf_ener[ib];
   80|  8.93M|        }
   81|  2.38M|        esg = esg / lbw;
   82|  2.38M|      } else {
   83|   673k|        esg = PVC_ESG_MIN_VAL;
  ------------------
  |  |  178|   673k|#define PVC_ESG_MIN_VAL 0.1f
  ------------------
   84|   673k|      }
   85|       |
   86|  3.06M|      if (esg > PVC_ESG_MIN_VAL) {
  ------------------
  |  |  178|  3.06M|#define PVC_ESG_MIN_VAL 0.1f
  ------------------
  |  Branch (86:11): [True: 1.01M, False: 2.04M]
  ------------------
   87|  1.01M|        p_esg[(time_slot + 16 - 1) * 3 + ksg] = 10 * ((FLOAT32)log10(esg));
   88|  2.04M|      } else {
   89|  2.04M|        p_esg[(time_slot + 16 - 1) * 3 + ksg] = PVC_10LOG10_ESG_MIN_VAL;
  ------------------
  |  |  180|  2.04M|#define PVC_10LOG10_ESG_MIN_VAL -10.0f
  ------------------
   90|  2.04M|      }
   91|  3.06M|    }
   92|  1.02M|    p_qmf_ener = p_qmf_ener + SBR_NUM_QMF_BANDS_2;
  ------------------
  |  |  175|  1.02M|#define SBR_NUM_QMF_BANDS_2 32
  ------------------
   93|  1.02M|  }
   94|       |
   95|  63.7k|  if ((ptr_pvc_data->prev_pvc_flg == 0) ||
  ------------------
  |  Branch (95:7): [True: 1.37k, False: 62.4k]
  ------------------
   96|  62.4k|      ((first_bnd_idx * ptr_pvc_data->pvc_rate) !=
  ------------------
  |  Branch (96:7): [True: 6.04k, False: 56.3k]
  ------------------
   97|  62.4k|       (ptr_pvc_data->prev_first_bnd_idx * ptr_pvc_data->prev_pvc_rate))) {
   98|   118k|    for (time_slot = 0; time_slot < 16 - 1 + first_pvc_timeslot; time_slot++) {
  ------------------
  |  Branch (98:25): [True: 111k, False: 7.41k]
  ------------------
   99|   446k|      for (ksg = 0; ksg < PVC_NB_LOW; ksg++) {
  ------------------
  |  |  190|   446k|#define PVC_NB_LOW 3
  ------------------
  |  Branch (99:21): [True: 334k, False: 111k]
  ------------------
  100|   334k|        p_esg[time_slot * 3 + ksg] =
  101|   334k|            p_esg[(16 - 1 + first_pvc_timeslot) * 3 + ksg];
  102|   334k|      }
  103|   111k|    }
  104|  7.41k|  }
  105|       |
  106|  63.7k|  return;
  107|  63.7k|}
ixheaacd_pred_vec_block.c:ixheaacd_pvc_time_smoothing:
  109|  63.7k|static VOID ixheaacd_pvc_time_smoothing(ia_pvc_data_struct *ptr_pvc_data) {
  110|  63.7k|  WORD32 time_slot;
  111|  63.7k|  FLOAT32 *p_smooth_esg = (FLOAT32 *)&ptr_pvc_data->smooth_esg_arr[0];
  112|  1.08M|  for (time_slot = 0; time_slot < PVC_NUM_TIME_SLOTS; time_slot++) {
  ------------------
  |  |  177|  1.08M|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  |  Branch (112:23): [True: 1.02M, False: 63.7k]
  ------------------
  113|  1.02M|    WORD32 ksg, time_slot_idx;
  114|  1.02M|    FLOAT32 *p_esg = (FLOAT32 *)&ptr_pvc_data->esg[time_slot + 16 - 1][2];
  115|  1.02M|    FLOAT32 *p_smth_wind_coeff = (FLOAT32 *)&ptr_pvc_data->p_smth_wind_coeff[0];
  116|  1.02M|    memset(p_smooth_esg, (WORD32)0.f, sizeof(FLOAT32) * PVC_NB_LOW);
  ------------------
  |  |  190|  1.02M|#define PVC_NB_LOW 3
  ------------------
  117|  11.7M|    for (time_slot_idx = 0; time_slot_idx < ptr_pvc_data->num_time_slots;
  ------------------
  |  Branch (117:29): [True: 10.7M, False: 1.02M]
  ------------------
  118|  10.7M|         time_slot_idx++) {
  119|  10.7M|      ksg = PVC_NB_LOW - 1;
  ------------------
  |  |  190|  10.7M|#define PVC_NB_LOW 3
  ------------------
  120|  43.0M|      for (; ksg >= 0; ksg--) {
  ------------------
  |  Branch (120:14): [True: 32.2M, False: 10.7M]
  ------------------
  121|  32.2M|        p_smooth_esg[ksg] += (*p_esg) * (*p_smth_wind_coeff);
  122|  32.2M|        p_esg--;
  123|  32.2M|      }
  124|  10.7M|      p_smth_wind_coeff++;
  125|  10.7M|    }
  126|  1.02M|    p_smooth_esg = p_smooth_esg + 3;
  127|  1.02M|  }
  128|  63.7k|  return;
  129|  63.7k|}
ixheaacd_pred_vec_block.c:ixheaacd_pvc_pred_env_sf:
  131|  63.7k|static VOID ixheaacd_pvc_pred_env_sf(ia_pvc_data_struct *ptr_pvc_data) {
  132|  63.7k|  WORD32 ksg, kb;
  133|  63.7k|  WORD32 tab_1_index, tab_2_index;
  134|  63.7k|  WORD32 time_slot;
  135|  63.7k|  WORD8 *pred_tab_1, *pred_tab_2;
  136|       |
  137|  63.7k|  FLOAT32 temp;
  138|  63.7k|  FLOAT32 *p_smooth_esg = &ptr_pvc_data->smooth_esg_arr[0];
  139|  63.7k|  FLOAT32 *p_sbr_range_esg = &ptr_pvc_data->sbr_range_esg_arr[0];
  140|       |
  141|  1.08M|  for (time_slot = 0; time_slot < PVC_NUM_TIME_SLOTS; time_slot++) {
  ------------------
  |  |  177|  1.08M|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  |  Branch (141:23): [True: 1.02M, False: 63.7k]
  ------------------
  142|  1.02M|    tab_2_index = ptr_pvc_data->pvc_id[time_slot];
  143|       |
  144|  1.02M|    if (tab_2_index < ptr_pvc_data->p_pvc_id_boundary[0]) {
  ------------------
  |  Branch (144:9): [True: 379k, False: 641k]
  ------------------
  145|   379k|      tab_1_index = 0;
  146|   641k|    } else if (tab_2_index < ptr_pvc_data->p_pvc_id_boundary[1]) {
  ------------------
  |  Branch (146:16): [True: 441k, False: 199k]
  ------------------
  147|   441k|      tab_1_index = 1;
  148|   441k|    } else {
  149|   199k|      tab_1_index = 2;
  150|   199k|    }
  151|       |
  152|  1.02M|    pred_tab_1 =
  153|  1.02M|        (WORD8 *)(&(ptr_pvc_data->p_pred_coeff_tab_1[tab_1_index * PVC_NB_LOW *
  ------------------
  |  |  190|  1.02M|#define PVC_NB_LOW 3
  ------------------
  154|  1.02M|                                                     ptr_pvc_data->nb_high]));
  155|  1.02M|    pred_tab_2 = (WORD8 *)(&(
  156|  1.02M|        ptr_pvc_data->p_pred_coeff_tab_2[tab_2_index * ptr_pvc_data->nb_high]));
  157|       |
  158|  7.25M|    for (ksg = 0; ksg < ptr_pvc_data->nb_high; ksg++) {
  ------------------
  |  Branch (158:19): [True: 6.23M, False: 1.02M]
  ------------------
  159|  6.23M|      temp =
  160|  6.23M|          (FLOAT32)(WORD8)(*(pred_tab_2++)) * ptr_pvc_data->p_q_fac[PVC_NB_LOW];
  ------------------
  |  |  190|  6.23M|#define PVC_NB_LOW 3
  ------------------
  161|  6.23M|      p_sbr_range_esg[ksg] = temp;
  162|  6.23M|    }
  163|  4.08M|    for (kb = 0; kb < PVC_NB_LOW; kb++) {
  ------------------
  |  |  190|  4.08M|#define PVC_NB_LOW 3
  ------------------
  |  Branch (163:18): [True: 3.06M, False: 1.02M]
  ------------------
  164|  21.7M|      for (ksg = 0; ksg < ptr_pvc_data->nb_high; ksg++) {
  ------------------
  |  Branch (164:21): [True: 18.7M, False: 3.06M]
  ------------------
  165|  18.7M|        temp = (FLOAT32)(WORD8)(*(pred_tab_1++)) * ptr_pvc_data->p_q_fac[kb];
  166|  18.7M|        p_sbr_range_esg[ksg] += temp * p_smooth_esg[kb];
  167|  18.7M|      }
  168|  3.06M|    }
  169|  1.02M|    p_smooth_esg = p_smooth_esg + 3;
  170|  1.02M|    p_sbr_range_esg = p_sbr_range_esg + 8;
  171|  1.02M|  }
  172|       |
  173|  63.7k|  return;
  174|  63.7k|}
ixheaacd_pred_vec_block.c:ixheaacd_pvc_sb_parsing:
   31|  63.7k|                                    WORD16 first_bnd_idx, FLOAT32 *p_qmfh) {
   32|  63.7k|  WORD32 ksg, k;
   33|  63.7k|  WORD32 start_band, end_band;
   34|  63.7k|  WORD32 time_slot;
   35|       |
   36|  63.7k|  FLOAT32 *p_sbr_range_esg = &ptr_pvc_data->sbr_range_esg_arr[0];
   37|       |
   38|  1.08M|  for (time_slot = 0; time_slot < PVC_NUM_TIME_SLOTS; time_slot++) {
  ------------------
  |  |  177|  1.08M|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  |  Branch (38:23): [True: 1.02M, False: 63.7k]
  ------------------
   39|  1.02M|    start_band = first_bnd_idx;
   40|  1.02M|    end_band = start_band + ptr_pvc_data->nb_high_per_grp - 1;
   41|       |
   42|  7.25M|    for (ksg = 0; ksg < ptr_pvc_data->nb_high; ksg++) {
  ------------------
  |  Branch (42:19): [True: 6.23M, False: 1.02M]
  ------------------
   43|  57.6M|      for (k = start_band; k <= end_band; k++) {
  ------------------
  |  Branch (43:28): [True: 51.4M, False: 6.23M]
  ------------------
   44|  51.4M|        p_qmfh[k] = (FLOAT32)pow(10.0f, (p_sbr_range_esg[ksg] / 10.0));
   45|  51.4M|      }
   46|  6.23M|      start_band += ptr_pvc_data->nb_high_per_grp;
   47|  6.23M|      if (ksg >= ptr_pvc_data->nb_high - 2) {
  ------------------
  |  Branch (47:11): [True: 2.04M, False: 4.19M]
  ------------------
   48|  2.04M|        end_band = SBR_NUM_QMF_BANDS - 1;
  ------------------
  |  |  174|  2.04M|#define SBR_NUM_QMF_BANDS 64
  ------------------
   49|  4.19M|      } else {
   50|  4.19M|        end_band = start_band + ptr_pvc_data->nb_high_per_grp - 1;
   51|  4.19M|        if (end_band >= SBR_NUM_QMF_BANDS - 1) {
  ------------------
  |  |  174|  4.19M|#define SBR_NUM_QMF_BANDS 64
  ------------------
  |  Branch (51:13): [True: 0, False: 4.19M]
  ------------------
   52|      0|          end_band = SBR_NUM_QMF_BANDS - 1;
  ------------------
  |  |  174|      0|#define SBR_NUM_QMF_BANDS 64
  ------------------
   53|      0|        }
   54|  4.19M|      }
   55|  6.23M|    }
   56|  1.02M|    p_sbr_range_esg = p_sbr_range_esg + 8;
   57|  1.02M|    p_qmfh = p_qmfh + SBR_NUM_QMF_BANDS;
  ------------------
  |  |  174|  1.02M|#define SBR_NUM_QMF_BANDS 64
  ------------------
   58|  1.02M|  }
   59|  63.7k|  return;
   60|  63.7k|}

ixheaacd_esbr_process:
  115|   171k|                                   WORD32 heaac_mps_present) {
  116|   171k|  WORD32 ch;
  117|   171k|  WORD32 err_code = 0;
  118|   171k|  ia_aac_dec_sbr_bitstream_struct *esbr_bit_str = &usac_data->esbr_bit_str[0];
  119|   171k|  ia_handle_sbr_dec_inst_struct self = usac_data->pstr_esbr_dec;
  120|       |
  121|   171k|  ia_sbr_scr_struct sbr_scratch_struct;
  122|   171k|  ixheaacd_allocate_sbr_scr(&sbr_scratch_struct, usac_data->sbr_scratch_mem_base, NULL, 0, NULL,
  123|   171k|                            0, 0);
  124|       |
  125|   171k|  self->usac_independency_flag = usac_data->usac_independency_flg;
  126|       |
  127|   171k|  self->time_sample_buf[0] = usac_data->time_sample_vector[0];
  128|   171k|  self->time_sample_buf[1] = usac_data->time_sample_vector[1];
  129|   171k|  self->stereo_config_idx = stereo_config_idx;
  130|       |
  131|   171k|  self->sbr_mode = usac_data->sbr_mode;
  132|   171k|  self->aot_usac_flag = usac_data->usac_flag;
  133|   171k|  self->esbr_hq = usac_data->esbr_hq;
  134|   171k|  self->enh_sbr = usac_data->enh_sbr;
  135|   171k|  self->enh_sbr_ps = usac_data->enh_sbr_ps;
  136|   171k|  self->ec_flag = usac_data->ec_flag;
  137|   171k|  self->first_frame = usac_data->first_frame;
  138|   171k|  self->frame_ok = usac_data->frame_ok;
  139|   171k|  self->sbr_parse_complete = usac_data->sbr_parse_complete;
  140|       |
  141|   414k|  for (ch = 0; ch < num_channels; ch++) {
  ------------------
  |  Branch (141:16): [True: 243k, False: 171k]
  ------------------
  142|   243k|    if ((self->pstr_sbr_channel[ch]
  ------------------
  |  Branch (142:9): [True: 0, False: 243k]
  ------------------
  143|   243k|             ->str_sbr_dec.str_synthesis_qmf_bank.qmf_filter_state_size) <
  144|   243k|        QMF_FILTER_STATE_SYN_SIZE)
  ------------------
  |  |   32|   243k|#define QMF_FILTER_STATE_SYN_SIZE 1280
  ------------------
  145|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  146|   243k|  }
  147|       |
  148|   171k|  err_code = ixheaacd_applysbr(self, esbr_bit_str, NULL, &num_channels, 1, 0, 0,
  149|   171k|                               &sbr_scratch_struct, 0, 1, 0, it_bit_buff, NULL,
  150|   171k|                               0, audio_object_type, 0, 0, 1024,
  151|   171k|                               heaac_mps_present, self->ec_flag, self->first_frame);
  152|       |
  153|   171k|  usac_data->sbr_mode = self->sbr_mode;
  154|       |
  155|   171k|  return err_code;
  156|   171k|}
ixheaacd_ms_processing:
  339|  39.6k|VOID ixheaacd_ms_processing(ia_usac_data_struct *pstr_usac_data) {
  340|  39.6k|  WORD32 i;
  341|       |
  342|  39.6k|  FLOAT32 tmp, tmp1;
  343|  39.6k|  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.6k]
  ------------------
  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.6k|}
ixheaacd_usac_process:
  357|   193k|                             WORD32 *num_out_channels, VOID *codec_handle) {
  358|   193k|  WORD32 ele_id = 0;
  359|   193k|  WORD32 err_code = 0;
  360|       |
  361|   193k|  ia_aac_dec_state_struct *p_state_aac_dec =
  362|   193k|      (ia_aac_dec_state_struct *)codec_handle;
  363|       |
  364|   193k|  ia_usac_data_struct *pstr_usac_data = &(pstr_dec_data->str_usac_data);
  365|   193k|  ia_bit_buf_struct *it_bit_buff = &pstr_dec_data->dec_bit_buf;
  366|       |
  367|   193k|  ia_frame_data_struct *fd = &(pstr_dec_data->str_frame_data);
  368|       |
  369|   193k|  ia_usac_config_struct *pstr_usac_config =
  370|   193k|      &(fd->str_audio_specific_config.str_usac_config);
  371|   193k|  ia_usac_decoder_config_struct *pstr_usac_dec_config =
  372|   193k|      &(fd->str_audio_specific_config.str_usac_config.str_usac_dec_config);
  373|       |
  374|   193k|  WORD32 err = 0;
  375|   193k|  WORD16 nr_core_coder_channels = 0;
  376|   193k|  WORD32 ch_offset = 0;
  377|       |
  378|   193k|  WORD32 elem_idx = 0;
  379|   193k|  WORD32 num_ch_out = 0;
  380|   193k|  WORD32 num_elements = pstr_usac_dec_config->num_elements;
  381|   193k|  UWORD32 ec_flag = p_state_aac_dec->p_config->ui_err_conceal;
  382|       |
  383|   193k|  if (ec_flag) {
  ------------------
  |  Branch (383:7): [True: 0, False: 193k]
  ------------------
  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|   193k|  } else {
  391|   193k|    pstr_usac_data->usac_independency_flg = ixheaacd_read_bits_buf(it_bit_buff, 1);
  392|   193k|  }
  393|       |
  394|   193k|  if (pstr_usac_data->ec_flag && pstr_dec_data->str_usac_data.frame_ok == 1) {
  ------------------
  |  Branch (394:7): [True: 0, False: 193k]
  |  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|   732k|  for (elem_idx = 0; elem_idx < num_elements; elem_idx++) {
  ------------------
  |  Branch (402:22): [True: 542k, False: 190k]
  ------------------
  403|   542k|    WORD32 stereo_config_index =
  404|   542k|        pstr_usac_config->str_usac_dec_config.str_usac_element_config[elem_idx]
  405|   542k|            .stereo_config_index;
  406|   542k|    jmp_buf local;
  407|   542k|    if (ec_flag) {
  ------------------
  |  Branch (407:9): [True: 0, False: 542k]
  ------------------
  408|      0|      err = setjmp(local);
  409|      0|    }
  410|       |
  411|   542k|    pstr_usac_data->esbr_bit_str[0].no_elements = 0;
  412|   542k|    pstr_usac_data->esbr_bit_str[1].no_elements = 0;
  413|       |
  414|   542k|    if (!err) {
  ------------------
  |  Branch (414:9): [True: 542k, False: 0]
  ------------------
  415|   542k|      if (ec_flag) {
  ------------------
  |  Branch (415:11): [True: 0, False: 542k]
  ------------------
  416|      0|        it_bit_buff->xaac_jmp_buf = &local;
  417|      0|      }
  418|   542k|      switch (ele_id = pstr_usac_dec_config->usac_element_type[elem_idx]) {
  419|  82.1k|        case ID_USAC_SCE:
  ------------------
  |  |   27|  82.1k|#define ID_USAC_SCE 0
  ------------------
  |  Branch (419:9): [True: 82.1k, False: 459k]
  ------------------
  420|  82.1k|          nr_core_coder_channels = 1;
  421|  82.1k|          num_ch_out += 1;
  422|  82.1k|          goto core_data_extracting;
  423|       |
  424|   126k|        case ID_USAC_CPE:
  ------------------
  |  |   28|   126k|#define ID_USAC_CPE 1
  ------------------
  |  Branch (424:9): [True: 126k, False: 415k]
  ------------------
  425|   126k|          nr_core_coder_channels = (stereo_config_index == 1) ? 1 : 2;
  ------------------
  |  Branch (425:36): [True: 18.6k, False: 107k]
  ------------------
  426|   126k|          if (((stereo_config_index > 1) || (stereo_config_index == 0)) &&
  ------------------
  |  Branch (426:16): [True: 61.7k, False: 64.4k]
  |  Branch (426:45): [True: 45.8k, False: 18.6k]
  ------------------
  427|   107k|              (p_state_aac_dec->num_of_output_ch < 2))
  ------------------
  |  Branch (427:15): [True: 2, False: 107k]
  ------------------
  428|      2|            return -1;
  429|   126k|          num_ch_out += 2;
  430|   126k|          goto core_data_extracting;
  431|  1.60k|        case ID_USAC_LFE:
  ------------------
  |  |   29|  1.60k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (431:9): [True: 1.60k, False: 540k]
  ------------------
  432|  1.60k|          nr_core_coder_channels = 1;
  433|  1.60k|          num_ch_out += 1;
  434|       |
  435|   210k|        core_data_extracting:
  436|   210k|          if (!ec_flag) {
  ------------------
  |  Branch (436:15): [True: 210k, False: 0]
  ------------------
  437|   210k|            if (ch_offset >= MAX_NUM_CHANNELS_USAC_LVL2) return -1;
  ------------------
  |  |  112|   210k|#define MAX_NUM_CHANNELS_USAC_LVL2 2
  ------------------
  |  Branch (437:17): [True: 0, False: 210k]
  ------------------
  438|   210k|            if (num_ch_out > MAX_NUM_CHANNELS_USAC_LVL2) return -1;
  ------------------
  |  |  112|   210k|#define MAX_NUM_CHANNELS_USAC_LVL2 2
  ------------------
  |  Branch (438:17): [True: 0, False: 210k]
  ------------------
  439|   210k|          } 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|   210k|          err = ixheaacd_core_coder_data(ele_id, pstr_usac_data, elem_idx, ch_offset, it_bit_buff,
  447|   210k|                                         nr_core_coder_channels);
  448|   210k|          if (!ec_flag) {
  ------------------
  |  Branch (448:15): [True: 208k, False: 1.33k]
  ------------------
  449|   208k|            if (err != 0) return -1;
  ------------------
  |  Branch (449:17): [True: 388, False: 208k]
  ------------------
  450|   208k|          } else {
  451|  1.33k|            if (err != 0) pstr_usac_data->frame_ok = 0;
  ------------------
  |  Branch (451:17): [True: 0, False: 1.33k]
  ------------------
  452|  1.33k|          }
  453|       |
  454|   209k|          ixheaacd_sbr_ele_type_set(&pstr_usac_data->esbr_bit_str[0],
  455|   209k|                                    &pstr_usac_data->esbr_bit_str[1], ele_id,
  456|   209k|                                    stereo_config_index);
  457|       |
  458|   209k|          if (pstr_usac_data->mps_pseudo_lr[elem_idx]) ixheaacd_ms_processing(pstr_usac_data);
  ------------------
  |  Branch (458:15): [True: 39.6k, False: 169k]
  ------------------
  459|       |
  460|   209k|          if (ele_id != ID_USAC_LFE) {
  ------------------
  |  |   29|   209k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (460:15): [True: 206k, False: 2.90k]
  ------------------
  461|   206k|            if (pstr_usac_data->sbr_ratio_idx > 0)
  ------------------
  |  Branch (461:17): [True: 170k, False: 36.5k]
  ------------------
  462|   170k|              ixheaacd_sbr_ext_data_read(it_bit_buff, &pstr_usac_data->esbr_bit_str[0]);
  463|   206k|          }
  464|       |
  465|   209k|          if ((pstr_usac_data->sbr_ratio_idx > 0) &&
  ------------------
  |  Branch (465:15): [True: 171k, False: 38.2k]
  ------------------
  466|   171k|              (pstr_usac_data->esbr_bit_str[0].no_elements != 0)) {
  ------------------
  |  Branch (466:15): [True: 171k, False: 31]
  ------------------
  467|   171k|            if (ec_flag) {
  ------------------
  |  Branch (467:17): [True: 0, False: 171k]
  ------------------
  468|      0|              pstr_usac_data->first_frame = p_state_aac_dec->first_frame;
  469|      0|            }
  470|   171k|            err_code = ixheaacd_esbr_process(
  471|   171k|                pstr_usac_data, it_bit_buff, stereo_config_index, nr_core_coder_channels,
  472|   171k|                pstr_dec_data->str_frame_data.str_audio_specific_config.audio_object_type,
  473|   171k|                p_state_aac_dec->heaac_mps_handle.heaac_mps_present);
  474|   171k|            if (!ec_flag) {
  ------------------
  |  Branch (474:17): [True: 171k, False: 184]
  ------------------
  475|   171k|              if (err_code < 0) return err_code;
  ------------------
  |  Branch (475:19): [True: 352, False: 170k]
  ------------------
  476|   171k|            } else {
  477|    184|              if (err_code < 0) pstr_usac_data->frame_ok = 0;
  ------------------
  |  Branch (477:19): [True: 0, False: 184]
  ------------------
  478|    184|            }
  479|   171k|          }
  480|       |
  481|   209k|          if (stereo_config_index > 0 && pstr_usac_data->sbr_ratio_idx > 0) {
  ------------------
  |  Branch (481:15): [True: 79.6k, False: 129k]
  |  Branch (481:42): [True: 79.6k, False: 0]
  ------------------
  482|  79.6k|            FLOAT32 **ptr_inp[2 * 2];
  483|  79.6k|            WORD32 ch;
  484|       |
  485|  79.6k|            *num_out_channels = p_state_aac_dec->mps_dec_handle.out_ch_count;
  486|       |
  487|  79.6k|            if (!ec_flag && pstr_usac_data->frame_ok == 1) {
  ------------------
  |  Branch (487:17): [True: 79.6k, False: 0]
  |  Branch (487:29): [True: 79.6k, False: 0]
  ------------------
  488|  79.6k|              if (ec_flag) {
  ------------------
  |  Branch (488:19): [True: 0, False: 79.6k]
  ------------------
  489|      0|                it_bit_buff->xaac_jmp_buf = &local;
  490|      0|              }
  491|  79.6k|              err =
  492|  79.6k|                  ixheaacd_mps_frame_parsing(&p_state_aac_dec->mps_dec_handle,
  493|  79.6k|                                             pstr_usac_data->usac_independency_flg, it_bit_buff);
  494|  79.6k|              if (err) return err;
  ------------------
  |  Branch (494:19): [True: 40, False: 79.6k]
  ------------------
  495|  79.6k|            }
  496|       |
  497|  79.6k|            p_state_aac_dec->mps_dec_handle.band_count[0] =
  498|  79.6k|                pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[0]->str_sbr_dec.band_count;
  499|  79.6k|            p_state_aac_dec->mps_dec_handle.band_count[1] =
  500|  79.6k|                pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[1]->str_sbr_dec.band_count;
  501|       |
  502|   220k|            for (ch = 0; ch < nr_core_coder_channels; ch++) {
  ------------------
  |  Branch (502:26): [True: 140k, False: 79.6k]
  ------------------
  503|   140k|              ptr_inp[2 * ch] = pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[ch]
  504|   140k|                                    ->str_sbr_dec.pp_qmf_buf_real;
  505|   140k|              ptr_inp[2 * ch + 1] = pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[ch]
  506|   140k|                                        ->str_sbr_dec.pp_qmf_buf_imag;
  507|   140k|              p_state_aac_dec->mps_dec_handle.p_sbr_dec[ch] =
  508|   140k|                  (VOID *)(&pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[ch]->str_sbr_dec);
  509|   140k|              p_state_aac_dec->mps_dec_handle.p_sbr_header[ch] =
  510|   140k|                  (VOID *)(pstr_usac_data->pstr_esbr_dec->pstr_sbr_header[ch]);
  511|   140k|              p_state_aac_dec->mps_dec_handle.p_sbr_frame[ch] =
  512|   140k|                  (VOID *)(pstr_usac_data->pstr_esbr_dec->frame_buffer[ch]);
  513|   140k|            }
  514|  79.6k|            if (nr_core_coder_channels == 1) {
  ------------------
  |  Branch (514:17): [True: 18.3k, False: 61.2k]
  ------------------
  515|  18.3k|              if (p_state_aac_dec->mps_dec_handle.res_ch_count != 0) {
  ------------------
  |  Branch (515:19): [True: 0, False: 18.3k]
  ------------------
  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|  18.3k|              p_state_aac_dec->mps_dec_handle.p_sbr_dec[1] =
  522|  18.3k|                  (VOID *)(&pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[1]->str_sbr_dec);
  523|  18.3k|              p_state_aac_dec->mps_dec_handle.p_sbr_header[1] =
  524|  18.3k|                  (VOID *)(pstr_usac_data->pstr_esbr_dec->pstr_sbr_header[1]);
  525|  18.3k|              p_state_aac_dec->mps_dec_handle.p_sbr_frame[1] =
  526|  18.3k|                  (VOID *)(pstr_usac_data->pstr_esbr_dec->frame_buffer[1]);
  527|  18.3k|            }
  528|  79.6k|            if ((!ec_flag || !p_state_aac_dec->first_frame) &&
  ------------------
  |  Branch (528:18): [True: 79.6k, False: 0]
  |  Branch (528:30): [True: 0, False: 0]
  ------------------
  529|  79.5k|                p_state_aac_dec->mps_dec_handle.mps_init_done == 1) {
  ------------------
  |  Branch (529:17): [True: 79.5k, False: 0]
  ------------------
  530|  79.5k|              err = ixheaacd_mps_apply(&p_state_aac_dec->mps_dec_handle, ptr_inp,
  531|  79.5k|                                       pstr_usac_data->time_sample_vector);
  532|  79.5k|              if (!ec_flag) {
  ------------------
  |  Branch (532:19): [True: 79.5k, False: 0]
  ------------------
  533|  79.5k|                if (err) return err;
  ------------------
  |  Branch (533:21): [True: 64, False: 79.4k]
  ------------------
  534|  79.5k|              } else {
  535|      0|                if (err) pstr_usac_data->frame_ok = 0;
  ------------------
  |  Branch (535:21): [True: 0, False: 0]
  ------------------
  536|      0|              }
  537|  79.5k|            }
  538|  79.5k|            if (ec_flag) {
  ------------------
  |  Branch (538:17): [True: 0, False: 79.5k]
  ------------------
  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|   129k|          } else if ((pstr_usac_data->sbr_ratio_idx > 0) &&
  ------------------
  |  Branch (563:22): [True: 91.2k, False: 38.3k]
  ------------------
  564|  91.2k|                     (pstr_usac_data->esbr_bit_str[0].no_elements != 0) && ec_flag) {
  ------------------
  |  Branch (564:22): [True: 91.1k, False: 25]
  |  Branch (564:76): [True: 0, False: 91.1k]
  ------------------
  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|   209k|          if (ec_flag) {
  ------------------
  |  Branch (571:15): [True: 0, False: 209k]
  ------------------
  572|      0|            p_state_aac_dec->first_frame = 0;
  573|      0|          }
  574|       |
  575|   209k|          ch_offset += nr_core_coder_channels;
  576|   209k|          break;
  577|       |
  578|   332k|        case ID_USAC_EXT: {
  ------------------
  |  |   30|   332k|#define ID_USAC_EXT 3
  ------------------
  |  Branch (578:9): [True: 332k, False: 210k]
  ------------------
  579|   332k|          ia_usac_dec_element_config_struct *pusac_element_config =
  580|   332k|              &pstr_usac_dec_config->str_usac_element_config[elem_idx];
  581|   332k|          if (pstr_usac_data->frame_ok) {
  ------------------
  |  Branch (581:15): [True: 332k, False: 0]
  ------------------
  582|   332k|            err = ixheaacd_read_ext_element(pusac_element_config->usac_ext_eleme_def_len,
  583|   332k|                                            pusac_element_config->usac_ext_elem_pld_frag,
  584|   332k|                                            it_bit_buff, pstr_usac_dec_config, elem_idx,
  585|   332k|                                            &pstr_usac_data->frame_ok);
  586|   332k|            if (!ec_flag) {
  ------------------
  |  Branch (586:17): [True: 331k, False: 203]
  ------------------
  587|   331k|              if (err != 0) return err;
  ------------------
  |  Branch (587:19): [True: 0, False: 331k]
  ------------------
  588|   331k|            } else {
  589|    203|              if (err) pstr_usac_data->frame_ok = 0;
  ------------------
  |  Branch (589:19): [True: 0, False: 203]
  ------------------
  590|    203|            }
  591|   332k|          }
  592|   332k|          break;
  593|   332k|        }
  594|       |
  595|   332k|        default:
  ------------------
  |  Branch (595:9): [True: 0, False: 542k]
  ------------------
  596|       |
  597|      0|          return -1;
  598|       |
  599|      0|          break;
  600|   542k|      }
  601|   542k|    }
  602|   542k|  }
  603|   190k|  pstr_usac_data->last_frame_ok = pstr_usac_data->frame_ok;
  604|       |
  605|   190k|  return 0;
  606|   193k|}
ixheaacd_process.c:ixheaacd_sbr_ele_type_set:
  308|   208k|    WORD32 st_config_idx) {
  309|   208k|  if (ele_id == ID_USAC_SCE) {
  ------------------
  |  |   27|   208k|#define ID_USAC_SCE 0
  ------------------
  |  Branch (309:7): [True: 81.6k, False: 126k]
  ------------------
  310|  81.6k|    esbr_bit_str0->str_sbr_ele[esbr_bit_str0->no_elements].sbr_ele_id =
  311|  81.6k|        SBR_ID_SCE;
  312|  81.6k|    esbr_bit_str1->str_sbr_ele[esbr_bit_str1->no_elements].sbr_ele_id =
  313|  81.6k|        SBR_ID_SCE;
  314|  81.6k|  }
  315|   208k|  if (ele_id == ID_USAC_CPE) {
  ------------------
  |  |   28|   208k|#define ID_USAC_CPE 1
  ------------------
  |  Branch (315:7): [True: 125k, False: 83.2k]
  ------------------
  316|   125k|    if ((st_config_idx == 0) || (st_config_idx == 3)) {
  ------------------
  |  Branch (316:9): [True: 45.1k, False: 79.9k]
  |  Branch (316:33): [True: 39.3k, False: 40.5k]
  ------------------
  317|  84.5k|      esbr_bit_str0->str_sbr_ele[esbr_bit_str0->no_elements].sbr_ele_id =
  318|  84.5k|          SBR_ID_CPE;
  319|  84.5k|      esbr_bit_str1->str_sbr_ele[esbr_bit_str1->no_elements].sbr_ele_id =
  320|  84.5k|          SBR_ID_CPE;
  321|  84.5k|    } else {
  322|  40.5k|      esbr_bit_str0->str_sbr_ele[esbr_bit_str0->no_elements].sbr_ele_id =
  323|  40.5k|          SBR_ID_SCE;
  324|  40.5k|      esbr_bit_str1->str_sbr_ele[esbr_bit_str1->no_elements].sbr_ele_id =
  325|  40.5k|          SBR_ID_SCE;
  326|  40.5k|    }
  327|   125k|  }
  328|   208k|  if (ele_id == ID_USAC_LFE) {
  ------------------
  |  |   29|   208k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (328:7): [True: 1.57k, False: 206k]
  ------------------
  329|  1.57k|    esbr_bit_str0->str_sbr_ele[esbr_bit_str0->no_elements].sbr_ele_id =
  330|  1.57k|        SBR_ID_SCE;
  331|  1.57k|    esbr_bit_str1->str_sbr_ele[esbr_bit_str1->no_elements].sbr_ele_id =
  332|  1.57k|        SBR_ID_SCE;
  333|       |
  334|  1.57k|    esbr_bit_str0->no_elements++;
  335|  1.57k|    esbr_bit_str0->str_sbr_ele[0].size_payload = 0;
  336|  1.57k|  }
  337|   208k|}
ixheaacd_process.c:ixheaacd_sbr_ext_data_read:
  211|   170k|    ia_aac_dec_sbr_bitstream_struct *esbr_bit_str) {
  212|   170k|  WORD32 count = 0;
  213|   170k|  WORD32 read_bits = 0;
  214|   170k|  WORD32 unaligned_bits = 0;
  215|   170k|  WORD32 cnt_bits_in;
  216|       |
  217|   170k|  cnt_bits_in = it_bit_buff->cnt_bits;
  218|   170k|  count = (it_bit_buff->cnt_bits) >> 3;
  219|   170k|  if (count > 0) {
  ------------------
  |  Branch (219:7): [True: 170k, False: 31]
  ------------------
  220|   170k|    if ((esbr_bit_str->no_elements < MAXNRSBRELEMENTS)) {
  ------------------
  |  |  104|   170k|#define MAXNRSBRELEMENTS 6
  ------------------
  |  Branch (220:9): [True: 170k, False: 0]
  ------------------
  221|   170k|      esbr_bit_str->str_sbr_ele[esbr_bit_str->no_elements].extension_type =
  222|   170k|          EXT_SBR_DATA;
  ------------------
  |  |   23|   170k|#define EXT_SBR_DATA 13
  ------------------
  223|   170k|      esbr_bit_str->str_sbr_ele[esbr_bit_str->no_elements].size_payload = count;
  224|       |
  225|   170k|      read_bits = count << 3;
  226|       |
  227|   170k|      unaligned_bits = (cnt_bits_in - read_bits);
  228|   170k|      if (unaligned_bits > 0 && unaligned_bits < 8) {
  ------------------
  |  Branch (228:11): [True: 154k, False: 16.0k]
  |  Branch (228:33): [True: 154k, False: 0]
  ------------------
  229|   154k|        count++;
  230|   154k|        esbr_bit_str->str_sbr_ele[esbr_bit_str->no_elements].size_payload =
  231|   154k|            count;
  232|   154k|      }
  233|   170k|      esbr_bit_str->no_elements += 1;
  234|   170k|    }
  235|   170k|  }
  236|   170k|}
ixheaacd_process.c:ixheaacd_read_ext_element:
  244|   332k|                                        WORD32 *frame_ok) {
  245|   332k|  UWORD32 usac_ext_element_present;
  246|   332k|  UWORD32 usac_ext_element_use_dft_length;
  247|   332k|  UWORD32 pay_load_length;
  248|   332k|  WORD32 i;
  249|   332k|  usac_ext_element_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  250|       |
  251|   332k|  if (usac_ext_element_present) {
  ------------------
  |  Branch (251:7): [True: 18.7k, False: 313k]
  ------------------
  252|  18.7k|    usac_ext_element_use_dft_length = ixheaacd_read_bits_buf(it_bit_buff, 1);
  253|       |
  254|  18.7k|    if (usac_ext_element_use_dft_length) {
  ------------------
  |  Branch (254:9): [True: 8.56k, False: 10.1k]
  ------------------
  255|  8.56k|      pay_load_length = usac_ext_element_default_length;
  256|  10.1k|    } else {
  257|  10.1k|      pay_load_length = ixheaacd_read_bits_buf(it_bit_buff, 8);
  258|       |
  259|  10.1k|      if (pay_load_length == 255) {
  ------------------
  |  Branch (259:11): [True: 28, False: 10.1k]
  ------------------
  260|     28|        WORD32 val_add = 0;
  261|     28|        val_add = ixheaacd_read_bits_buf(it_bit_buff, 16);
  262|     28|        pay_load_length = (UWORD32)((WORD32)pay_load_length + val_add - 2);
  263|     28|      }
  264|  10.1k|    }
  265|  18.7k|    if ((it_bit_buff->cnt_bits >> 3) < (WORD32)pay_load_length) {
  ------------------
  |  Branch (265:9): [True: 163, False: 18.5k]
  ------------------
  266|    163|      *frame_ok = 0;
  267|    163|      longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    163|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  268|    163|    }
  269|  18.5k|    if (pay_load_length > 0) {
  ------------------
  |  Branch (269:9): [True: 10.7k, False: 7.86k]
  ------------------
  270|  10.7k|      if (usac_ext_element_payload_frag)
  ------------------
  |  Branch (270:11): [True: 4.45k, False: 6.26k]
  ------------------
  271|  4.45k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  272|       |
  273|  10.7k|      if (pstr_usac_dec_config->usac_ext_ele_payload_present[elem_idx]) {
  ------------------
  |  Branch (273:11): [True: 1.50k, False: 9.21k]
  ------------------
  274|  1.50k|        WORD32 preroll_counter = pstr_usac_dec_config->preroll_counter;
  275|  1.50k|        int payload_buffer_offeset = 0;
  276|  1.50k|        for (i = 0; i < preroll_counter; i++)
  ------------------
  |  Branch (276:21): [True: 0, False: 1.50k]
  ------------------
  277|      0|          payload_buffer_offeset +=
  278|      0|              pstr_usac_dec_config->usac_ext_gain_payload_len[i] *
  279|      0|              sizeof(WORD8);
  280|  1.50k|        if ((pay_load_length + payload_buffer_offeset) >
  ------------------
  |  Branch (280:13): [True: 0, False: 1.50k]
  ------------------
  281|  1.50k|            (MAX_AUDIO_PREROLLS * 768))
  ------------------
  |  |  249|  1.50k|#define MAX_AUDIO_PREROLLS 3
  ------------------
  282|      0|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  283|  78.0k|        for (i = 0; i < ((WORD32)pay_load_length); i++) {
  ------------------
  |  Branch (283:21): [True: 76.5k, False: 1.50k]
  ------------------
  284|  76.5k|          pstr_usac_dec_config
  285|  76.5k|              ->usac_ext_gain_payload_buf[i + payload_buffer_offeset] =
  286|  76.5k|              ixheaacd_read_bits_buf(it_bit_buff, 8);
  287|  76.5k|        }
  288|  1.50k|        pstr_usac_dec_config->usac_ext_gain_payload_len[preroll_counter] +=
  289|  1.50k|            pay_load_length;
  290|  9.21k|      } else {
  291|  9.21k|        if (it_bit_buff->cnt_bits < (WORD32)(pay_load_length << 3)) {
  ------------------
  |  Branch (291:13): [True: 4, False: 9.21k]
  ------------------
  292|      4|          longjmp(*(it_bit_buff->xaac_jmp_buf),
  293|      4|                  IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      4|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  294|      4|        }
  295|  9.21k|        it_bit_buff->ptr_read_next =
  296|  9.21k|            it_bit_buff->ptr_read_next + pay_load_length;
  297|  9.21k|        it_bit_buff->cnt_bits =
  298|  9.21k|            it_bit_buff->cnt_bits - (WORD32)(pay_load_length << 3);
  299|  9.21k|      }
  300|  10.7k|    }
  301|  18.5k|  }
  302|   331k|  return 0;
  303|   332k|}

ixheaacd_divideby2:
   61|  18.6k|WORD16 ixheaacd_divideby2(WORD op) {
   62|  18.6k|  FLAG sign = (op < 0);
   63|       |
   64|  18.6k|  if (sign) {
  ------------------
  |  Branch (64:7): [True: 50, False: 18.5k]
  ------------------
   65|     50|    op = -(op);
   66|     50|  }
   67|       |
   68|  18.6k|  op = (op >> 1);
   69|       |
   70|  18.6k|  if (sign) {
  ------------------
  |  Branch (70:7): [True: 50, False: 18.5k]
  ------------------
   71|     50|    op = -op;
   72|     50|  }
   73|       |
   74|  18.6k|  return (WORD16)op;
   75|  18.6k|}
ixheaacd_divideby3:
   77|  6.77k|WORD16 ixheaacd_divideby3(WORD op) {
   78|  6.77k|  WORD16 temp, ret;
   79|  6.77k|  FLAG sign = (op < 0);
   80|       |
   81|  6.77k|  if (sign) {
  ------------------
  |  Branch (81:7): [True: 55, False: 6.72k]
  ------------------
   82|     55|    op = -(op);
   83|     55|  }
   84|       |
   85|  6.77k|  temp = (WORD16)(op << 2);
   86|       |
   87|  6.77k|  temp = ixheaac_mult16_shl(temp, 0x2aab);
   88|       |
   89|  6.77k|  ret = (temp >> 2);
   90|       |
   91|  6.77k|  if (sign) {
  ------------------
  |  Branch (91:7): [True: 55, False: 6.72k]
  ------------------
   92|     55|    ret = -(ret);
   93|     55|  }
   94|       |
   95|  6.77k|  return (WORD16)ret;
   96|  6.77k|}
ixheaacd_decode_ps_data:
   98|  9.88k|VOID ixheaacd_decode_ps_data(ia_ps_dec_struct *ptr_ps_dec, WORD32 frame_size) {
   99|  9.88k|  WORD e, i, temp;
  100|  9.88k|  WORD16 iid_mode = (WORD16)((ptr_ps_dec->iid_mode) ? 1 : 2);
  ------------------
  |  Branch (100:30): [True: 1.99k, False: 7.88k]
  ------------------
  101|  9.88k|  WORD16 icc_mode = (WORD16)((ptr_ps_dec->icc_mode) ? 1 : 2);
  ------------------
  |  Branch (101:30): [True: 1.95k, False: 7.93k]
  ------------------
  102|  9.88k|  WORD16 num_iid_levels =
  103|  9.88k|      (WORD16)(ptr_ps_dec->iid_quant ? NUM_IID_LEVELS_FINE : NUM_IID_LEVELS);
  ------------------
  |  |   30|    713|#define NUM_IID_LEVELS_FINE (15)
  ------------------
                    (WORD16)(ptr_ps_dec->iid_quant ? NUM_IID_LEVELS_FINE : NUM_IID_LEVELS);
  ------------------
  |  |   29|  9.17k|#define NUM_IID_LEVELS (7)
  ------------------
  |  Branch (103:16): [True: 713, False: 9.17k]
  ------------------
  104|  9.88k|  WORD32 max_num_columns;
  105|       |
  106|  9.88k|  if (frame_size == 960)
  ------------------
  |  Branch (106:7): [True: 0, False: 9.88k]
  ------------------
  107|      0|    max_num_columns = MAX_NUM_COLUMNS_960;
  ------------------
  |  |   25|      0|#define MAX_NUM_COLUMNS_960 30
  ------------------
  108|  9.88k|  else
  109|  9.88k|    max_num_columns = MAX_NUM_COLUMNS;
  ------------------
  |  |   23|  9.88k|#define MAX_NUM_COLUMNS 32
  ------------------
  110|       |
  111|  9.88k|  if (!ptr_ps_dec->ps_data_present) {
  ------------------
  |  Branch (111:7): [True: 8.18k, False: 1.70k]
  ------------------
  112|  8.18k|    ptr_ps_dec->num_env = 0;
  113|  8.18k|  }
  114|       |
  115|  11.6k|  for (e = 0; e < ptr_ps_dec->num_env; e++) {
  ------------------
  |  Branch (115:15): [True: 1.76k, False: 9.88k]
  ------------------
  116|  1.76k|    WORD16 *p_iid_par_prev;
  117|  1.76k|    WORD16 *p_icc_par_prev;
  118|       |
  119|  1.76k|    if (e == 0) {
  ------------------
  |  Branch (119:9): [True: 1.64k, False: 120]
  ------------------
  120|  1.64k|      p_iid_par_prev = ptr_ps_dec->iid_par_prev;
  121|  1.64k|      p_icc_par_prev = ptr_ps_dec->icc_par_prev;
  122|  1.64k|    } else {
  123|    120|      p_iid_par_prev = ptr_ps_dec->iid_par_table[e - 1];
  124|    120|      p_icc_par_prev = ptr_ps_dec->icc_par_table[e - 1];
  125|    120|    }
  126|       |
  127|  1.76k|    if (ptr_ps_dec->enable_iid) {
  ------------------
  |  Branch (127:9): [True: 250, False: 1.51k]
  ------------------
  128|    250|      if (ptr_ps_dec->iid_dt[e]) {
  ------------------
  |  Branch (128:11): [True: 215, False: 35]
  ------------------
  129|  2.90k|        for (i = 0; i < ixheaacd_num_bands[ptr_ps_dec->iid_mode]; i++) {
  ------------------
  |  Branch (129:21): [True: 2.69k, False: 215]
  ------------------
  130|  2.69k|          temp =
  131|  2.69k|              ixheaac_add16(*p_iid_par_prev, ptr_ps_dec->iid_par_table[e][i]);
  132|  2.69k|          ptr_ps_dec->iid_par_table[e][i] = ixheaacd_clamp(
  133|  2.69k|              temp, ixheaac_negate16(num_iid_levels), num_iid_levels);
  134|  2.69k|          p_iid_par_prev += iid_mode;
  135|  2.69k|        }
  136|    215|      } else {
  137|     35|        ptr_ps_dec->iid_par_table[e][0] =
  138|     35|            ixheaacd_clamp(ptr_ps_dec->iid_par_table[e][0],
  139|     35|                           ixheaac_negate16(num_iid_levels), num_iid_levels);
  140|    350|        for (i = 1; i < ixheaacd_num_bands[ptr_ps_dec->iid_mode]; i++) {
  ------------------
  |  Branch (140:21): [True: 315, False: 35]
  ------------------
  141|    315|          temp = ixheaac_add16(ptr_ps_dec->iid_par_table[e][i - 1],
  142|    315|                                ptr_ps_dec->iid_par_table[e][i]);
  143|    315|          ptr_ps_dec->iid_par_table[e][i] = ixheaacd_clamp(
  144|    315|              temp, ixheaac_negate16(num_iid_levels), num_iid_levels);
  145|    315|        }
  146|     35|      }
  147|  1.51k|    } else {
  148|  1.51k|      memset(ptr_ps_dec->iid_par_table[e], 0,
  149|  1.51k|             sizeof(WORD16) * ixheaacd_num_bands[ptr_ps_dec->iid_mode]);
  150|  1.51k|    }
  151|       |
  152|  1.76k|    if (iid_mode == 2) {
  ------------------
  |  Branch (152:9): [True: 1.66k, False: 96]
  ------------------
  153|  1.66k|      for (i = (ixheaacd_num_bands[ptr_ps_dec->iid_mode] * iid_mode - 1);
  154|  33.3k|           i != 0; i--) {
  ------------------
  |  Branch (154:12): [True: 31.6k, False: 1.66k]
  ------------------
  155|  31.6k|        ptr_ps_dec->iid_par_table[e][i] =
  156|  31.6k|            ptr_ps_dec->iid_par_table[e][ixheaac_shr32(i, 1)];
  157|  31.6k|      }
  158|  1.66k|    }
  159|       |
  160|  1.76k|    if (ptr_ps_dec->enable_icc) {
  ------------------
  |  Branch (160:9): [True: 75, False: 1.68k]
  ------------------
  161|     75|      if (ptr_ps_dec->icc_dt[e]) {
  ------------------
  |  Branch (161:11): [True: 71, False: 4]
  ------------------
  162|  1.47k|        for (i = 0; i < ixheaacd_num_bands[ptr_ps_dec->icc_mode]; i++) {
  ------------------
  |  Branch (162:21): [True: 1.40k, False: 71]
  ------------------
  163|  1.40k|          temp =
  164|  1.40k|              ixheaac_add16(*p_icc_par_prev, ptr_ps_dec->icc_par_table[e][i]);
  165|  1.40k|          ptr_ps_dec->icc_par_table[e][i] =
  166|  1.40k|              ixheaacd_clamp(temp, 0, (WORD16)(NUM_ICC_LEVELS - 1));
  ------------------
  |  |   31|  1.40k|#define NUM_ICC_LEVELS (8)
  ------------------
  167|  1.40k|          p_icc_par_prev += icc_mode;
  168|  1.40k|        }
  169|     71|      } else {
  170|      4|        ptr_ps_dec->icc_par_table[e][0] = ixheaacd_clamp(
  171|      4|            ptr_ps_dec->icc_par_table[e][0], 0, (WORD16)(NUM_ICC_LEVELS - 1));
  ------------------
  |  |   31|      4|#define NUM_ICC_LEVELS (8)
  ------------------
  172|     40|        for (i = 1; i < ixheaacd_num_bands[ptr_ps_dec->icc_mode]; i++) {
  ------------------
  |  Branch (172:21): [True: 36, False: 4]
  ------------------
  173|     36|          temp = ixheaac_add16(ptr_ps_dec->icc_par_table[e][i - 1],
  174|     36|                                ptr_ps_dec->icc_par_table[e][i]);
  175|     36|          ptr_ps_dec->icc_par_table[e][i] =
  176|     36|              ixheaacd_clamp(temp, 0, (WORD16)(NUM_ICC_LEVELS - 1));
  ------------------
  |  |   31|     36|#define NUM_ICC_LEVELS (8)
  ------------------
  177|     36|        }
  178|      4|      }
  179|  1.68k|    } else {
  180|  1.68k|      memset(ptr_ps_dec->icc_par_table[e], 0,
  181|  1.68k|             sizeof(WORD16) * ixheaacd_num_bands[ptr_ps_dec->icc_mode]);
  182|  1.68k|    }
  183|       |
  184|  1.76k|    if (icc_mode == 2) {
  ------------------
  |  Branch (184:9): [True: 1.67k, False: 87]
  ------------------
  185|  1.67k|      for (i = (ixheaacd_num_bands[ptr_ps_dec->icc_mode] * icc_mode - 1);
  186|  33.5k|           i != 0; i--) {
  ------------------
  |  Branch (186:12): [True: 31.8k, False: 1.67k]
  ------------------
  187|  31.8k|        ptr_ps_dec->icc_par_table[e][i] =
  188|  31.8k|            ptr_ps_dec->icc_par_table[e][ixheaac_shr32(i, 1)];
  189|  31.8k|      }
  190|  1.67k|    }
  191|  1.76k|  }
  192|       |
  193|  9.88k|  if (ptr_ps_dec->num_env == 0) {
  ------------------
  |  Branch (193:7): [True: 8.24k, False: 1.64k]
  ------------------
  194|  8.24k|    ptr_ps_dec->num_env = 1;
  195|       |
  196|  8.24k|    if (ptr_ps_dec->enable_iid) {
  ------------------
  |  Branch (196:9): [True: 2.60k, False: 5.64k]
  ------------------
  197|  2.60k|      memcpy(ptr_ps_dec->iid_par_table[0], ptr_ps_dec->iid_par_prev,
  198|  2.60k|             sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  2.60k|#define NUM_BANDS_FINE (34)
  ------------------
  199|  5.64k|    } else {
  200|  5.64k|      memset(ptr_ps_dec->iid_par_table[0], 0, sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  5.64k|#define NUM_BANDS_FINE (34)
  ------------------
  201|  5.64k|    }
  202|       |
  203|  8.24k|    if (ptr_ps_dec->enable_icc) {
  ------------------
  |  Branch (203:9): [True: 1.73k, False: 6.50k]
  ------------------
  204|  1.73k|      memcpy(ptr_ps_dec->icc_par_table[0], ptr_ps_dec->icc_par_prev,
  205|  1.73k|             sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  1.73k|#define NUM_BANDS_FINE (34)
  ------------------
  206|  6.50k|    } else {
  207|  6.50k|      memset(ptr_ps_dec->icc_par_table[0], 0, sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  6.50k|#define NUM_BANDS_FINE (34)
  ------------------
  208|  6.50k|    }
  209|  8.24k|  }
  210|       |
  211|  9.88k|  memcpy(ptr_ps_dec->iid_par_prev,
  212|  9.88k|         ptr_ps_dec->iid_par_table[ptr_ps_dec->num_env - 1],
  213|  9.88k|         sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  9.88k|#define NUM_BANDS_FINE (34)
  ------------------
  214|       |
  215|  9.88k|  memcpy(ptr_ps_dec->icc_par_prev,
  216|  9.88k|         ptr_ps_dec->icc_par_table[ptr_ps_dec->num_env - 1],
  217|  9.88k|         sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  9.88k|#define NUM_BANDS_FINE (34)
  ------------------
  218|       |
  219|  9.88k|  ptr_ps_dec->ps_data_present = 0;
  220|       |
  221|  9.88k|  if (ptr_ps_dec->frame_class == 0) {
  ------------------
  |  Branch (221:7): [True: 9.53k, False: 349]
  ------------------
  222|  9.53k|    WORD env_count;
  223|  9.53k|    WORD16 shift = 0;
  224|       |
  225|  9.53k|    switch (ptr_ps_dec->num_env) {
  ------------------
  |  Branch (225:13): [True: 9.53k, False: 0]
  ------------------
  226|  9.50k|      case 1:
  ------------------
  |  Branch (226:7): [True: 9.50k, False: 27]
  ------------------
  227|  9.50k|        shift = 0;
  228|  9.50k|        break;
  229|     25|      case 2:
  ------------------
  |  Branch (229:7): [True: 25, False: 9.51k]
  ------------------
  230|     25|        shift = 1;
  231|     25|        break;
  232|      2|      case 4:
  ------------------
  |  Branch (232:7): [True: 2, False: 9.53k]
  ------------------
  233|      2|        shift = 2;
  234|      2|        break;
  235|  9.53k|    }
  236|  9.53k|    ptr_ps_dec->border_position[0] = 0;
  237|  9.53k|    env_count = 0;
  238|       |
  239|  9.56k|    for (e = 1; e < ptr_ps_dec->num_env; e++) {
  ------------------
  |  Branch (239:17): [True: 31, False: 9.53k]
  ------------------
  240|     31|      env_count = add_d(env_count, max_num_columns);
  ------------------
  |  |   23|     31|#define add_d(a, b) ((a) + (b))
  ------------------
  241|     31|      ptr_ps_dec->border_position[e] = (WORD16)(env_count >> shift);
  242|     31|    }
  243|  9.53k|    ptr_ps_dec->border_position[ptr_ps_dec->num_env] = max_num_columns;
  244|  9.53k|  } else {
  245|    349|    ptr_ps_dec->border_position[0] = 0;
  246|       |
  247|    349|    if (ptr_ps_dec->border_position[ptr_ps_dec->num_env] < max_num_columns) {
  ------------------
  |  Branch (247:9): [True: 330, False: 19]
  ------------------
  248|    330|      ptr_ps_dec->num_env++;
  249|    330|      ptr_ps_dec->border_position[ptr_ps_dec->num_env] = max_num_columns;
  250|       |
  251|    330|      memcpy(ptr_ps_dec->iid_par_table[ptr_ps_dec->num_env - 1],
  252|    330|             ptr_ps_dec->iid_par_table[ptr_ps_dec->num_env - 2],
  253|    330|             sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|    330|#define NUM_BANDS_FINE (34)
  ------------------
  254|       |
  255|    330|      memcpy(ptr_ps_dec->icc_par_table[ptr_ps_dec->num_env - 1],
  256|    330|             ptr_ps_dec->icc_par_table[ptr_ps_dec->num_env - 2],
  257|    330|             sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|    330|#define NUM_BANDS_FINE (34)
  ------------------
  258|    330|    }
  259|       |
  260|    768|    for (e = 1; e < ptr_ps_dec->num_env; e++) {
  ------------------
  |  Branch (260:17): [True: 419, False: 349]
  ------------------
  261|    419|      WORD threshold;
  262|    419|      threshold = sub_d(max_num_columns, sub_d(ptr_ps_dec->num_env, e));
  ------------------
  |  |   24|    419|#define sub_d(a, b) ((a) - (b))
  ------------------
  263|       |
  264|    419|      if (ptr_ps_dec->border_position[e] > threshold) {
  ------------------
  |  Branch (264:11): [True: 1, False: 418]
  ------------------
  265|      1|        ptr_ps_dec->border_position[e] = threshold;
  266|    418|      } else {
  267|    418|        threshold = add_d(ptr_ps_dec->border_position[e - 1], 1);
  ------------------
  |  |   23|    418|#define add_d(a, b) ((a) + (b))
  ------------------
  268|       |
  269|    418|        if (ptr_ps_dec->border_position[e] < threshold) {
  ------------------
  |  Branch (269:13): [True: 89, False: 329]
  ------------------
  270|     89|          ptr_ps_dec->border_position[e] = threshold;
  271|     89|        }
  272|    418|      }
  273|    419|    }
  274|    349|  }
  275|       |
  276|  20.2k|  for (e = 0; e < ptr_ps_dec->num_env; e++) {
  ------------------
  |  Branch (276:15): [True: 10.3k, False: 9.88k]
  ------------------
  277|  10.3k|    if (ptr_ps_dec->iid_mode == 2)
  ------------------
  |  Branch (277:9): [True: 1.64k, False: 8.68k]
  ------------------
  278|  1.64k|      ixheaacd_map_34_params_to_20(ptr_ps_dec->iid_par_table[e]);
  279|       |
  280|  10.3k|    if (ptr_ps_dec->icc_mode == 2)
  ------------------
  |  Branch (280:9): [True: 47, False: 10.2k]
  ------------------
  281|     47|      ixheaacd_map_34_params_to_20(ptr_ps_dec->icc_par_table[e]);
  282|  10.3k|  }
  283|  9.88k|}
ixheaacd_ps_bitdec.c:ixheaacd_clamp:
   47|  4.48k|static WORD32 ixheaacd_clamp(WORD32 i, WORD16 min, WORD16 max) {
   48|  4.48k|  WORD32 result = i;
   49|       |
   50|  4.48k|  if (i < min) {
  ------------------
  |  Branch (50:7): [True: 128, False: 4.35k]
  ------------------
   51|    128|    result = min;
   52|  4.35k|  } else {
   53|  4.35k|    if (i > max) {
  ------------------
  |  Branch (53:9): [True: 46, False: 4.30k]
  ------------------
   54|     46|      result = max;
   55|     46|    }
   56|  4.35k|  }
   57|       |
   58|  4.48k|  return result;
   59|  4.48k|}

ixheaacd_k_chan_filt:
   79|  29.6k|                          FLOAT32 *cos_sin_mod_tbl) {
   80|  29.6k|  WORD32 i, n, q;
   81|  29.6k|  FLOAT32 real, imag;
   82|  29.6k|  FLOAT32 cos_val, sin_val;
   83|  29.6k|  FLOAT32 *p_real_imag = cos_sin_mod_tbl;
   84|       |
   85|  29.6k|  if (bCplx) {
  ------------------
  |  Branch (85:7): [True: 9.88k, False: 19.7k]
  ------------------
   86|   326k|    for (i = 0; i < nSamples; i++) {
  ------------------
  |  Branch (86:17): [True: 316k, False: 9.88k]
  ------------------
   87|  2.84M|      for (q = 0; q < k; q++) {
  ------------------
  |  Branch (87:19): [True: 2.53M, False: 316k]
  ------------------
   88|  2.53M|        real = 0;
   89|  2.53M|        imag = 0;
   90|  35.4M|        for (n = 0; n < 13; n++) {
  ------------------
  |  Branch (90:21): [True: 32.9M, False: 2.53M]
  ------------------
   91|  32.9M|          cos_val = *p_real_imag++;
   92|  32.9M|          sin_val = *p_real_imag++;
   93|  32.9M|          real += p[n] * (ptr_qmf_re[n + i] * cos_val - ptr_qmf_im[n + i] * sin_val);
   94|  32.9M|          imag += p[n] * (ptr_qmf_im[n + i] * cos_val + ptr_qmf_re[n + i] * sin_val);
   95|  32.9M|        }
   96|  2.53M|        ptr_tmp_hyb_re[i][q] = real;
   97|  2.53M|        ptr_tmp_hyb_im[i][q] = imag;
   98|  2.53M|      }
   99|   316k|      p_real_imag -= (13 * k * 2);
  100|   316k|    }
  101|  19.7k|  } else {
  102|   652k|    for (i = 0; i < nSamples; i++) {
  ------------------
  |  Branch (102:17): [True: 632k, False: 19.7k]
  ------------------
  103|  1.89M|      for (q = 0; q < k; q++) {
  ------------------
  |  Branch (103:19): [True: 1.26M, False: 632k]
  ------------------
  104|  1.26M|        real = 0;
  105|  1.26M|        imag = 0;
  106|  17.7M|        for (n = 0; n < 13; n++) {
  ------------------
  |  Branch (106:21): [True: 16.4M, False: 1.26M]
  ------------------
  107|  16.4M|          cos_val = *p_real_imag++;
  108|  16.4M|          real += p[n] * (ptr_qmf_re[n + i] * cos_val);
  109|  16.4M|          imag += p[n] * (ptr_qmf_im[n + i] * cos_val);
  110|  16.4M|        }
  111|  1.26M|        ptr_tmp_hyb_re[i][q] = real;
  112|  1.26M|        ptr_tmp_hyb_im[i][q] = imag;
  113|  1.26M|      }
  114|   632k|      p_real_imag -= (13 * k);
  115|   632k|    }
  116|  19.7k|  }
  117|  29.6k|}
ixheaacd_hyb_anal:
  121|  19.7k|                       WORD32 use_34_st_bands) {
  122|  19.7k|  WORD32 k, n, band;
  123|  19.7k|  WORD32 band_res;
  124|  19.7k|  WORD32 frame_size;
  125|  19.7k|  WORD32 ch_offset = 0;
  126|  19.7k|  FLOAT32(*ptr_tmp_hyb_re)[MAX_NUM_COLUMNS];
  127|  19.7k|  FLOAT32(*ptr_tmp_hyb_im)[MAX_NUM_COLUMNS];
  128|  19.7k|  ia_hybrid_flt_struct *ptr_hybrid;
  129|  19.7k|  if (!use_34_st_bands) {
  ------------------
  |  Branch (129:7): [True: 9.88k, False: 9.88k]
  ------------------
  130|  9.88k|    ptr_tmp_hyb_re = ptr_ps_dec->hyb_left_re;
  131|  9.88k|    ptr_tmp_hyb_im = ptr_ps_dec->hyb_left_im;
  132|  9.88k|    ptr_hybrid = &ptr_ps_dec->str_flt_hybrid20;
  133|  9.88k|  } else {
  134|  9.88k|    ptr_tmp_hyb_re = NULL;
  135|  9.88k|    ptr_tmp_hyb_im = ptr_ps_dec->hyb_left_im;
  136|  9.88k|    ptr_hybrid = &ptr_ps_dec->str_flt_hybrid34;
  137|  9.88k|  }
  138|  19.7k|  frame_size = ptr_hybrid->frame_size;
  139|  98.8k|  for (band = 0; band < ptr_hybrid->num_qmf_bands; band++) {
  ------------------
  |  Branch (139:18): [True: 79.0k, False: 19.7k]
  ------------------
  140|  79.0k|    band_res = ptr_hybrid->ptr_resol[band];
  141|       |
  142|  79.0k|    memcpy(ptr_hybrid->ptr_work_re, ptr_hybrid->ptr_qmf_buf_re[band],
  143|  79.0k|           (HYBRID_FILTER_LENGTH - 1) * sizeof(ptr_hybrid->ptr_work_re[0]));
  ------------------
  |  |   23|  79.0k|#define HYBRID_FILTER_LENGTH 13
  ------------------
  144|  79.0k|    memcpy(ptr_hybrid->ptr_work_im, ptr_hybrid->ptr_qmf_buf_im[band],
  145|  79.0k|           (HYBRID_FILTER_LENGTH - 1) * sizeof(ptr_hybrid->ptr_work_im[0]));
  ------------------
  |  |   23|  79.0k|#define HYBRID_FILTER_LENGTH 13
  ------------------
  146|       |
  147|  2.61M|    for (n = 0; n < frame_size; n++) {
  ------------------
  |  Branch (147:17): [True: 2.53M, False: 79.0k]
  ------------------
  148|  2.53M|      ptr_hybrid->ptr_work_re[(HYBRID_FILTER_LENGTH - 1) + n] =
  ------------------
  |  |   23|  2.53M|#define HYBRID_FILTER_LENGTH 13
  ------------------
  149|  2.53M|          ptr_qmf_re[n + HYBRID_FILTER_DELAY][band];
  ------------------
  |  |   24|  2.53M|#define HYBRID_FILTER_DELAY 6
  ------------------
  150|  2.53M|      ptr_hybrid->ptr_work_im[(HYBRID_FILTER_LENGTH - 1) + n] =
  ------------------
  |  |   23|  2.53M|#define HYBRID_FILTER_LENGTH 13
  ------------------
  151|  2.53M|          ptr_qmf_im[n + HYBRID_FILTER_DELAY][band];
  ------------------
  |  |   24|  2.53M|#define HYBRID_FILTER_DELAY 6
  ------------------
  152|  2.53M|    }
  153|       |
  154|  79.0k|    memcpy(ptr_hybrid->ptr_qmf_buf_re[band], ptr_hybrid->ptr_work_re + frame_size,
  155|  79.0k|           (HYBRID_FILTER_LENGTH - 1) * sizeof(ptr_hybrid->ptr_qmf_buf_re[band][0]));
  ------------------
  |  |   23|  79.0k|#define HYBRID_FILTER_LENGTH 13
  ------------------
  156|  79.0k|    memcpy(ptr_hybrid->ptr_qmf_buf_im[band], ptr_hybrid->ptr_work_im + frame_size,
  157|  79.0k|           (HYBRID_FILTER_LENGTH - 1) * sizeof(ptr_hybrid->ptr_qmf_buf_im[band][0]));
  ------------------
  |  |   23|  79.0k|#define HYBRID_FILTER_LENGTH 13
  ------------------
  158|       |
  159|  79.0k|    if (ptr_tmp_hyb_re) {
  ------------------
  |  Branch (159:9): [True: 29.6k, False: 49.4k]
  ------------------
  160|  29.6k|      switch (band_res) {
  161|  19.7k|        case NO_HYBRID_CHANNELS_2:
  ------------------
  |  |   29|  19.7k|#define NO_HYBRID_CHANNELS_2 2
  ------------------
  |  Branch (161:9): [True: 19.7k, False: 9.88k]
  ------------------
  162|  19.7k|          ixheaacd_k_chan_filt(
  163|  19.7k|              ptr_hybrid->ptr_work_re, ptr_hybrid->ptr_work_im, ptr_hybrid->ptr_temp_re,
  164|  19.7k|              ptr_hybrid->ptr_temp_im, frame_size, NO_HYBRID_CHANNELS_2, REAL,
  ------------------
  |  |   29|  19.7k|#define NO_HYBRID_CHANNELS_2 2
  ------------------
                            ptr_hybrid->ptr_temp_im, frame_size, NO_HYBRID_CHANNELS_2, REAL,
  ------------------
  |  |   35|  19.7k|#define REAL 0
  ------------------
  165|  19.7k|              ptr_ps_tables->p2_13_20,
  166|  19.7k|              &ptr_ps_tables->cos_mod_2channel[0][0]);
  167|  19.7k|          break;
  168|      0|        case NO_HYBRID_CHANNELS_4:
  ------------------
  |  |   30|      0|#define NO_HYBRID_CHANNELS_4 4
  ------------------
  |  Branch (168:9): [True: 0, False: 29.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|  9.88k|        case NO_HYBRID_CHANNELS_8:
  ------------------
  |  |   31|  9.88k|#define NO_HYBRID_CHANNELS_8 8
  ------------------
  |  Branch (175:9): [True: 9.88k, False: 19.7k]
  ------------------
  176|  9.88k|          ixheaacd_k_chan_filt(
  177|  9.88k|              ptr_hybrid->ptr_work_re, ptr_hybrid->ptr_work_im, ptr_hybrid->ptr_temp_re,
  178|  9.88k|              ptr_hybrid->ptr_temp_im, frame_size, NO_HYBRID_CHANNELS_8, CPLX,
  ------------------
  |  |   31|  9.88k|#define NO_HYBRID_CHANNELS_8 8
  ------------------
                            ptr_hybrid->ptr_temp_im, frame_size, NO_HYBRID_CHANNELS_8, CPLX,
  ------------------
  |  |   36|  9.88k|#define CPLX 1
  ------------------
  179|  9.88k|              use_34_st_bands ? ptr_ps_tables->p8_13_34 : ptr_ps_tables->p8_13_20,
  ------------------
  |  Branch (179:15): [True: 0, False: 9.88k]
  ------------------
  180|  9.88k|              &ptr_ps_tables->cos_sin_mod_8channel[0][0]);
  181|  9.88k|          break;
  182|      0|        case NO_HYBRID_CHANNELS_12:
  ------------------
  |  |   32|      0|#define NO_HYBRID_CHANNELS_12 12
  ------------------
  |  Branch (182:9): [True: 0, False: 29.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: 29.6k]
  ------------------
  189|      0|          break;
  190|  29.6k|      }
  191|       |
  192|   978k|      for (n = 0; n < frame_size; n++) {
  ------------------
  |  Branch (192:19): [True: 949k, False: 29.6k]
  ------------------
  193|  4.74M|        for (k = 0; k < (WORD32)band_res; k++) {
  ------------------
  |  Branch (193:21): [True: 3.79M, False: 949k]
  ------------------
  194|  3.79M|          ptr_tmp_hyb_re[n][ch_offset + k] = ptr_hybrid->ptr_temp_re[n][k];
  195|  3.79M|          ptr_tmp_hyb_im[n][ch_offset + k] = ptr_hybrid->ptr_temp_im[n][k];
  196|  3.79M|        }
  197|   949k|      }
  198|  29.6k|      ch_offset += band_res;
  199|  29.6k|    }
  200|  79.0k|  }
  201|  19.7k|}
ixheaacd_hyb_synth:
  208|  19.7k|    ia_hybrid_flt_struct *ptr_hybrid) {
  209|  19.7k|  WORD32 k, n, band;
  210|  19.7k|  WORD16 band_res;
  211|  19.7k|  WORD32 frame_size = ptr_hybrid->frame_size;
  212|  19.7k|  WORD32 ch_offset = 0;
  213|       |
  214|  79.0k|  for (band = 0; band < ptr_hybrid->num_qmf_bands; band++) {
  ------------------
  |  Branch (214:18): [True: 59.3k, False: 19.7k]
  ------------------
  215|  59.3k|    band_res = ptr_hybrid->ptr_resol[band];
  216|       |
  217|  1.95M|    for (n = 0; n < frame_size; n++) {
  ------------------
  |  Branch (217:17): [True: 1.89M, False: 59.3k]
  ------------------
  218|  1.89M|      ptr_qmf_re[n][band] = ptr_qmf_im[n][band] = 0;
  219|       |
  220|  9.49M|      for (k = 0; k < (WORD32)band_res; k++) {
  ------------------
  |  Branch (220:19): [True: 7.59M, False: 1.89M]
  ------------------
  221|  7.59M|        ptr_qmf_re[n][band] += ptr_tmp_hyb_re[n][ch_offset + k];
  222|  7.59M|        ptr_qmf_im[n][band] += ptr_tmp_hyb_im[n][ch_offset + k];
  223|  7.59M|      }
  224|  1.89M|    }
  225|  59.3k|    ch_offset += band_res;
  226|  59.3k|  }
  227|  19.7k|}
ixheaacd_create_ps_esbr_dec:
  298|  10.6k|                                   UWORD32 num_sub_samples, WORD32 ps_mode) {
  299|  10.6k|  UWORD32 i;
  300|  10.6k|  ia_ps_dec_struct *ptr_ps_dec = ptr_ps_dec_struct;
  301|       |
  302|  10.6k|  ptr_ps_dec = ptr_ps_dec_struct;
  303|       |
  304|  10.6k|  ptr_ps_dec->num_sub_samples = num_sub_samples;
  305|  10.6k|  ptr_ps_dec->num_chans = noQmfChans;
  306|  10.6k|  ptr_ps_dec->ps_mode = ps_mode;
  307|       |
  308|  10.6k|  ptr_ps_dec->ps_data_present = 0;
  309|  10.6k|  ptr_ps_dec->enable_iid = 0;
  310|  10.6k|  ptr_ps_dec->iid_mode = 0;
  311|  10.6k|  ptr_ps_dec->enable_icc = 0;
  312|  10.6k|  ptr_ps_dec->icc_mode = 0;
  313|  10.6k|  ptr_ps_dec->enable_ext = 0;
  314|       |
  315|  10.6k|  ptr_ps_dec->use_pca_rot_flg = 0;
  316|  10.6k|  ptr_ps_dec->freq_res_ipd = 0;
  317|  10.6k|  ptr_ps_dec->use_34_st_bands = 0;
  318|  10.6k|  ptr_ps_dec->use_34_st_bands_prev = 0;
  319|       |
  320|  10.6k|  ptr_ps_dec->str_flt_hybrid20.frame_size = ptr_ps_dec->num_sub_samples;
  321|  10.6k|  ptr_ps_dec->str_flt_hybrid20.num_qmf_bands = NUM_QMF_BANDS_IN_HYBRID20;
  ------------------
  |  |   86|  10.6k|#define NUM_QMF_BANDS_IN_HYBRID20 3
  ------------------
  322|  10.6k|  ptr_ps_dec->str_flt_hybrid20.ptr_resol = (WORD16 *)&ptr_ps_tables->band_res_hyb20[0];
  323|  10.6k|  ptr_ps_dec->str_flt_hybrid20.ptr_work_re = &ptr_ps_dec->hyb_work_re_20[0];
  324|  10.6k|  ptr_ps_dec->str_flt_hybrid20.ptr_work_im = &ptr_ps_dec->hyb_work_im_20[0];
  325|  10.6k|  ptr_ps_dec->str_flt_hybrid20.ptr_qmf_buf_re = ptr_ps_dec->hyb_qmf_buf_re_20;
  326|  10.6k|  ptr_ps_dec->str_flt_hybrid20.ptr_qmf_buf_im = ptr_ps_dec->hyb_qmf_buf_im_20;
  327|  10.6k|  ptr_ps_dec->str_flt_hybrid20.ptr_temp_re = ptr_ps_dec->hyb_temp_re_20;
  328|  10.6k|  ptr_ps_dec->str_flt_hybrid20.ptr_temp_im = ptr_ps_dec->hyb_temp_im_20;
  329|       |
  330|  10.6k|  ptr_ps_dec->str_flt_hybrid34.frame_size = ptr_ps_dec->num_sub_samples;
  331|  10.6k|  ptr_ps_dec->str_flt_hybrid34.num_qmf_bands = NUM_QMF_BANDS_IN_HYBRID34;
  ------------------
  |  |   87|  10.6k|#define NUM_QMF_BANDS_IN_HYBRID34 5
  ------------------
  332|  10.6k|  ptr_ps_dec->str_flt_hybrid34.ptr_resol = (WORD16 *)&ptr_ps_tables->band_res_hyb34[0];
  333|  10.6k|  ptr_ps_dec->str_flt_hybrid34.ptr_work_re = &ptr_ps_dec->hyb_work_re_34[0];
  334|  10.6k|  ptr_ps_dec->str_flt_hybrid34.ptr_work_im = &ptr_ps_dec->hyb_work_im_34[0];
  335|  10.6k|  ptr_ps_dec->str_flt_hybrid34.ptr_qmf_buf_re = ptr_ps_dec->hyb_qmf_buf_re_34;
  336|  10.6k|  ptr_ps_dec->str_flt_hybrid34.ptr_qmf_buf_im = ptr_ps_dec->hyb_qmf_buf_im_34;
  337|  10.6k|  ptr_ps_dec->str_flt_hybrid34.ptr_temp_re = ptr_ps_dec->hyb_temp_re_34;
  338|  10.6k|  ptr_ps_dec->str_flt_hybrid34.ptr_temp_im = ptr_ps_dec->hyb_temp_im_34;
  339|       |
  340|  10.6k|  ptr_ps_dec->delay_buf_idx = 0;
  341|       |
  342|   689k|  for (i = 0; i < NUM_OF_QUAD_MIRROR_FILTER_CHNLS; i++) {
  ------------------
  |  |   26|   689k|#define NUM_OF_QUAD_MIRROR_FILTER_CHNLS 64
  ------------------
  |  Branch (342:15): [True: 678k, False: 10.6k]
  ------------------
  343|   678k|    ptr_ps_dec->delay_qmf_delay_buf_idx[i] = 0;
  344|   678k|    ptr_ps_dec->delay_qmf_delay_num_samp[i] = ptr_ps_tables->qmf_delay_idx_tbl[i];
  345|   678k|  }
  346|       |
  347|   371k|  for (i = 0; i < NUM_HI_RES_BINS; i++) {
  ------------------
  |  |   57|   371k|#define NUM_HI_RES_BINS (34)
  ------------------
  |  Branch (347:15): [True: 360k, False: 10.6k]
  ------------------
  348|   360k|    ptr_ps_dec->h11_re_prev[i] = 1.0f;
  349|   360k|    ptr_ps_dec->h12_re_prev[i] = 1.0f;
  350|   360k|  }
  351|       |
  352|  10.6k|  memset(ptr_ps_dec->h11_im_prev, 0, sizeof(ptr_ps_dec->h11_im_prev));
  353|  10.6k|  memset(ptr_ps_dec->h12_im_prev, 0, sizeof(ptr_ps_dec->h12_im_prev));
  354|  10.6k|  memset(ptr_ps_dec->h21_re_prev, 0, sizeof(ptr_ps_dec->h21_re_prev));
  355|  10.6k|  memset(ptr_ps_dec->h22_re_prev, 0, sizeof(ptr_ps_dec->h22_re_prev));
  356|  10.6k|  memset(ptr_ps_dec->h21_im_prev, 0, sizeof(ptr_ps_dec->h21_im_prev));
  357|  10.6k|  memset(ptr_ps_dec->h22_im_prev, 0, sizeof(ptr_ps_dec->h22_im_prev));
  358|       |
  359|  10.6k|  memset(ptr_ps_dec->ipd_idx_map_1, 0, sizeof(ptr_ps_dec->ipd_idx_map_1));
  360|  10.6k|  memset(ptr_ps_dec->opd_idx_map_1, 0, sizeof(ptr_ps_dec->opd_idx_map_1));
  361|  10.6k|  memset(ptr_ps_dec->ipd_idx_map_2, 0, sizeof(ptr_ps_dec->ipd_idx_map_2));
  362|  10.6k|  memset(ptr_ps_dec->opd_idx_map_2, 0, sizeof(ptr_ps_dec->opd_idx_map_2));
  363|       |
  364|   371k|  for (i = 0; i < NUM_HI_RES_BINS; i++) {
  ------------------
  |  |   57|   371k|#define NUM_HI_RES_BINS (34)
  ------------------
  |  Branch (364:15): [True: 360k, False: 10.6k]
  ------------------
  365|   360k|    ptr_ps_dec->peak_decay_fast_bin[i] = 0.0f;
  366|   360k|    ptr_ps_dec->prev_nrg_bin[i] = 0.0f;
  367|   360k|    ptr_ps_dec->prev_peak_diff_bin[i] = 0.0f;
  368|   360k|  }
  369|       |
  370|  10.6k|  memset(ptr_ps_dec->qmf_delay_buf_re, 0, sizeof(ptr_ps_dec->qmf_delay_buf_re));
  371|  10.6k|  memset(ptr_ps_dec->qmf_delay_buf_im, 0, sizeof(ptr_ps_dec->qmf_delay_buf_im));
  372|  10.6k|  memset(ptr_ps_dec->sub_qmf_delay_buf_re, 0, sizeof(ptr_ps_dec->sub_qmf_delay_buf_re));
  373|  10.6k|  memset(ptr_ps_dec->sub_qmf_delay_buf_im, 0, sizeof(ptr_ps_dec->sub_qmf_delay_buf_im));
  374|       |
  375|  42.4k|  for (i = 0; i < NUM_SER_AP_LINKS; i++) {
  ------------------
  |  |   25|  42.4k|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (375:15): [True: 31.8k, False: 10.6k]
  ------------------
  376|  31.8k|    memset(&ptr_ps_dec->ser_qmf_delay_buf_re[i][0][0], 0,
  377|  31.8k|           sizeof(ptr_ps_dec->ser_qmf_delay_buf_re[i]));
  378|  31.8k|    memset(&ptr_ps_dec->ser_qmf_delay_buf_im[i][0][0], 0,
  379|  31.8k|           sizeof(ptr_ps_dec->ser_qmf_delay_buf_im[i]));
  380|  31.8k|    memset(&ptr_ps_dec->ser_sub_qmf_dealy_buf_re[i][0][0], 0,
  381|  31.8k|           sizeof(ptr_ps_dec->ser_sub_qmf_dealy_buf_re[i]));
  382|  31.8k|    memset(&ptr_ps_dec->ser_sub_qmf_dealy_buf_im[i][0][0], 0,
  383|  31.8k|           sizeof(ptr_ps_dec->ser_sub_qmf_dealy_buf_im[i]));
  384|  31.8k|  }
  385|       |
  386|  10.6k|  return 0;
  387|  10.6k|}
ixheaacd_esbr_apply_ps:
  395|  9.88k|                            WORD32 num_time_slot) {
  396|  9.88k|  WORD32 sb;
  397|  9.88k|  WORD32 i, k;
  398|       |
  399|  9.88k|  WORD32 max_num_column;
  400|       |
  401|  9.88k|  if (num_time_slot == 15)
  ------------------
  |  Branch (401:7): [True: 0, False: 9.88k]
  ------------------
  402|      0|    max_num_column = MAX_NUM_COLUMNS_960;
  ------------------
  |  |   25|      0|#define MAX_NUM_COLUMNS_960 30
  ------------------
  403|  9.88k|  else
  404|  9.88k|    max_num_column = MAX_NUM_COLUMNS;
  ------------------
  |  |   23|  9.88k|#define MAX_NUM_COLUMNS 32
  ------------------
  405|       |
  406|  9.88k|  if (ptr_ps_dec->use_34_st_bands) {
  ------------------
  |  Branch (406:7): [True: 0, False: 9.88k]
  ------------------
  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|  9.88k|  } else {
  415|  9.88k|    ptr_ps_dec->ptr_group_borders = (WORD32 *)&ptr_ps_tables->group_borders_20_tbl[0];
  416|  9.88k|    ptr_ps_dec->ptr_bins_group_map = (WORD32 *)&ptr_ps_tables->bin_group_map_20[0];
  417|  9.88k|    ptr_ps_dec->ptr_hybrid = &ptr_ps_dec->str_flt_hybrid20;
  418|  9.88k|    ptr_ps_dec->num_groups = NUM_IID_GROUPS;
  ------------------
  |  |   42|  9.88k|#define NUM_IID_GROUPS (SUBQMF_GROUPS + QMF_GROUPS)
  |  |  ------------------
  |  |  |  |   26|  9.88k|#define SUBQMF_GROUPS (10)
  |  |  ------------------
  |  |               #define NUM_IID_GROUPS (SUBQMF_GROUPS + QMF_GROUPS)
  |  |  ------------------
  |  |  |  |   27|  9.88k|#define QMF_GROUPS (12)
  |  |  ------------------
  ------------------
  419|  9.88k|    ptr_ps_dec->num_sub_qmf_groups = SUBQMF_GROUPS;
  ------------------
  |  |   26|  9.88k|#define SUBQMF_GROUPS (10)
  ------------------
  420|  9.88k|    ptr_ps_dec->num_bins = NUM_MID_RES_BINS;
  ------------------
  |  |   58|  9.88k|#define NUM_MID_RES_BINS (20)
  ------------------
  421|  9.88k|    ptr_ps_dec->first_delay_gr = SUBQMF_GROUPS;
  ------------------
  |  |   26|  9.88k|#define SUBQMF_GROUPS (10)
  ------------------
  422|  9.88k|  }
  423|       |
  424|   405k|  for (sb = usb; sb < ptr_ps_dec->num_chans; sb++) {
  ------------------
  |  Branch (424:18): [True: 395k, False: 9.88k]
  ------------------
  425|  1.58M|    for (i = 0; i < NUM_SER_AP_LINKS; i++) {
  ------------------
  |  |   25|  1.58M|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (425:17): [True: 1.18M, False: 395k]
  ------------------
  426|  5.92M|      for (k = 0; k < ptr_ps_dec->delay_sample_ser[i]; k++) {
  ------------------
  |  Branch (426:19): [True: 4.74M, False: 1.18M]
  ------------------
  427|  4.74M|        ptr_ps_dec->ser_qmf_delay_buf_re[i][k][sb] = 0;
  428|  4.74M|        ptr_ps_dec->ser_qmf_delay_buf_im[i][k][sb] = 0;
  429|  4.74M|      }
  430|  1.18M|    }
  431|  5.92M|    for (k = 0; k < HIGH_DEL; k++) {
  ------------------
  |  |   33|  5.92M|#define HIGH_DEL 14
  ------------------
  |  Branch (431:17): [True: 5.53M, False: 395k]
  ------------------
  432|  5.53M|      ptr_ps_dec->qmf_delay_buf_re[k][sb] = 0;
  433|  5.53M|      ptr_ps_dec->qmf_delay_buf_im[k][sb] = 0;
  434|  5.53M|    }
  435|   395k|  }
  436|  9.88k|  ixheaacd_hyb_anal((const FLOAT32 **)pp_qmf_buf_re_left,
  437|  9.88k|                    (const FLOAT32 **)pp_qmf_buf_im_left,
  438|  9.88k|                    ptr_ps_dec, ptr_ps_tables, 0);
  439|  9.88k|  ixheaacd_hyb_anal((const FLOAT32 **)pp_qmf_buf_re_left,
  440|  9.88k|                    (const FLOAT32 **)pp_qmf_buf_im_left,
  441|  9.88k|                    ptr_ps_dec, ptr_ps_tables, 1);
  442|       |
  443|  9.88k|  if (!ptr_ps_dec->use_34_st_bands) {
  ------------------
  |  Branch (443:7): [True: 9.88k, False: 0]
  ------------------
  444|  9.88k|    WORD32 k;
  445|   326k|    for (k = 0; k < (WORD32)ptr_ps_dec->num_sub_samples; k++) {
  ------------------
  |  Branch (445:17): [True: 316k, False: 9.88k]
  ------------------
  446|   316k|      ptr_ps_dec->hyb_left_re[k][3] += ptr_ps_dec->hyb_left_re[k][4];
  447|   316k|      ptr_ps_dec->hyb_left_im[k][3] += ptr_ps_dec->hyb_left_im[k][4];
  448|   316k|      ptr_ps_dec->hyb_left_re[k][4] = 0.;
  449|   316k|      ptr_ps_dec->hyb_left_im[k][4] = 0.;
  450|       |
  451|   316k|      ptr_ps_dec->hyb_left_re[k][2] += ptr_ps_dec->hyb_left_re[k][5];
  452|   316k|      ptr_ps_dec->hyb_left_im[k][2] += ptr_ps_dec->hyb_left_im[k][5];
  453|   316k|      ptr_ps_dec->hyb_left_re[k][5] = 0.;
  454|   316k|      ptr_ps_dec->hyb_left_im[k][5] = 0.;
  455|   316k|    }
  456|  9.88k|  }
  457|       |
  458|  9.88k|  if (ptr_ps_dec->ps_mode & 0x0080) {
  ------------------
  |  Branch (458:7): [True: 0, False: 9.88k]
  ------------------
  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|  9.88k|  } else {
  473|  9.88k|    if (ptr_ps_dec->ps_mode & 0x0002) {
  ------------------
  |  Branch (473:9): [True: 0, False: 9.88k]
  ------------------
  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|  9.88k|    } else {
  488|  9.88k|      ixheaacd_esbr_ps_de_correlate(ptr_ps_dec, pp_qmf_buf_re_left, pp_qmf_buf_im_left,
  489|  9.88k|                                    pp_qmf_buf_re_right, pp_qmf_buf_im_right,
  490|  9.88k|                                    ptr_ps_tables);
  491|  9.88k|    }
  492|       |
  493|  9.88k|    if (!(ptr_ps_dec->ps_mode & 0x0040)) {
  ------------------
  |  Branch (493:9): [True: 9.88k, False: 0]
  ------------------
  494|  9.88k|      ixheaacd_esbr_ps_apply_rotation(ptr_ps_dec, pp_qmf_buf_re_left, pp_qmf_buf_im_left,
  495|  9.88k|                                      pp_qmf_buf_re_right, pp_qmf_buf_im_right,
  496|  9.88k|                                      ptr_ps_tables);
  497|  9.88k|    }
  498|  9.88k|  }
  499|       |
  500|  9.88k|  ixheaacd_hyb_synth(ptr_ps_dec->hyb_left_re, ptr_ps_dec->hyb_left_im,
  501|  9.88k|                     pp_qmf_buf_re_left, pp_qmf_buf_im_left, ptr_ps_dec->ptr_hybrid);
  502|       |
  503|  9.88k|  ixheaacd_hyb_synth(ptr_ps_dec->hyb_right_re, ptr_ps_dec->hyb_right_im,
  504|  9.88k|                     pp_qmf_buf_re_right, pp_qmf_buf_im_right, ptr_ps_dec->ptr_hybrid);
  505|       |
  506|  9.88k|  ptr_ps_dec->use_34_st_bands_prev = ptr_ps_dec->use_34_st_bands;
  507|       |
  508|  9.88k|}
ixheaacd_esbr_ps_de_correlate:
  516|  9.88k|    ia_ps_tables_struct *ptr_ps_tables) {
  517|  9.88k|  WORD32 sb, maxsb, gr, k;
  518|  9.88k|  WORD32 m;
  519|  9.88k|  WORD32 l_delay = 0;
  520|  9.88k|  WORD32 l_ser_delay_arr[NUM_SER_AP_LINKS] = {0};
  521|  9.88k|  FLOAT32 re_left;
  522|  9.88k|  FLOAT32 im_left;
  523|  9.88k|  FLOAT32 peak_diff, nrg, trans_ratio;
  524|       |
  525|  9.88k|  FLOAT32(*pp_hyb_left_re)[MAX_NUM_COLUMNS];
  526|  9.88k|  FLOAT32(*pp_hyb_left_im)[MAX_NUM_COLUMNS];
  527|  9.88k|  FLOAT32(*pp_hyb_right_re)[MAX_NUM_COLUMNS];
  528|  9.88k|  FLOAT32(*pp_hyb_right_im)[MAX_NUM_COLUMNS];
  529|       |
  530|  9.88k|  FLOAT32(*ppp_ser_sub_qmf_dealy_buf_re)[5][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
  531|  9.88k|  FLOAT32(*ppp_ser_sub_qmf_dealy_buf_im)[5][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
  532|  9.88k|  FLOAT32(*pp_sub_qmf_delay_buf_re)[NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
  533|  9.88k|  FLOAT32(*pp_sub_qmf_delay_buf_im)[NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
  534|       |
  535|  9.88k|  FLOAT32 *pp_frac_delay_phase_fac_re;
  536|  9.88k|  FLOAT32 *pp_frac_delay_phase_fac_im;
  537|  9.88k|  FLOAT32(*pp_frac_delay_phase_fac_ser_re)[NUM_SER_AP_LINKS];
  538|  9.88k|  FLOAT32(*pp_frac_delay_phase_fac_ser_im)[NUM_SER_AP_LINKS];
  539|       |
  540|  9.88k|  WORD32 *p_delay_qmf_delay_num_samp = NULL;
  541|  9.88k|  WORD32 *p_delay_qmf_delay_buf_idx = NULL;
  542|       |
  543|  9.88k|  FLOAT32 pow_arr[32][NUM_HI_RES_BINS];
  544|  9.88k|  FLOAT32 trans_ratio_arr[32][NUM_HI_RES_BINS];
  545|  9.88k|  WORD32 bin;
  546|  9.88k|  FLOAT32 decay_cutoff;
  547|       |
  548|  9.88k|  pp_hyb_left_re = ptr_ps_dec->hyb_left_re;
  549|  9.88k|  pp_hyb_left_im = ptr_ps_dec->hyb_left_im;
  550|  9.88k|  pp_hyb_right_re = ptr_ps_dec->hyb_right_re;
  551|  9.88k|  pp_hyb_right_im = ptr_ps_dec->hyb_right_im;
  552|       |
  553|  9.88k|  ppp_ser_sub_qmf_dealy_buf_re = ptr_ps_dec->ser_sub_qmf_dealy_buf_re;
  554|  9.88k|  ppp_ser_sub_qmf_dealy_buf_im = ptr_ps_dec->ser_sub_qmf_dealy_buf_im;
  555|       |
  556|  9.88k|  pp_sub_qmf_delay_buf_re = ptr_ps_dec->sub_qmf_delay_buf_re;
  557|  9.88k|  pp_sub_qmf_delay_buf_im = ptr_ps_dec->sub_qmf_delay_buf_im;
  558|       |
  559|  9.88k|  if (ptr_ps_dec->use_34_st_bands != ptr_ps_dec->use_34_st_bands_prev) {
  ------------------
  |  Branch (559:7): [True: 0, False: 9.88k]
  ------------------
  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|  9.88k|  if (ptr_ps_dec->use_34_st_bands) {
  ------------------
  |  Branch (590:7): [True: 0, False: 9.88k]
  ------------------
  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|  9.88k|  } else {
  596|  9.88k|    pp_frac_delay_phase_fac_re = ptr_ps_tables->frac_delay_phase_fac_qmf_sub_re_20;
  597|  9.88k|    pp_frac_delay_phase_fac_im = ptr_ps_tables->frac_delay_phase_fac_qmf_sub_im_20;
  598|  9.88k|    pp_frac_delay_phase_fac_ser_re = ptr_ps_tables->frac_delay_phase_fac_ser_qmf_sub_re_20;
  599|  9.88k|    pp_frac_delay_phase_fac_ser_im = ptr_ps_tables->frac_delay_phase_fac_ser_qmf_sub_im_20;
  600|  9.88k|  }
  601|       |
  602|   326k|  for (k = 0; k < 32; k++) {
  ------------------
  |  Branch (602:15): [True: 316k, False: 9.88k]
  ------------------
  603|  11.0M|    for (bin = 0; bin < NUM_HI_RES_BINS; bin++) {
  ------------------
  |  |   57|  11.0M|#define NUM_HI_RES_BINS (34)
  ------------------
  |  Branch (603:19): [True: 10.7M, False: 316k]
  ------------------
  604|  10.7M|      pow_arr[k][bin] = 0;
  605|  10.7M|    }
  606|   316k|  }
  607|       |
  608|   108k|  for (gr = 0; gr < ptr_ps_dec->num_sub_qmf_groups; gr++) {
  ------------------
  |  Branch (608:16): [True: 98.8k, False: 9.88k]
  ------------------
  609|  98.8k|    bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[gr];
  ------------------
  |  |   77|  98.8k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  610|  98.8k|    maxsb = ptr_ps_dec->ptr_group_borders[gr] + 1;
  611|   197k|    for (sb = ptr_ps_dec->ptr_group_borders[gr]; sb < maxsb; sb++) {
  ------------------
  |  Branch (611:50): [True: 98.8k, False: 98.8k]
  ------------------
  612|  98.8k|      for (k = ptr_ps_dec->border_position[0];
  613|  3.26M|           k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
  ------------------
  |  Branch (613:12): [True: 3.16M, False: 98.8k]
  ------------------
  614|  3.16M|        im_left = pp_hyb_left_re[k][sb];
  615|  3.16M|        re_left = pp_hyb_left_im[k][sb];
  616|  3.16M|        pow_arr[k][bin] += im_left * im_left + re_left * re_left;
  617|  3.16M|      }
  618|  98.8k|    }
  619|  98.8k|  }
  620|   128k|  for (; gr < ptr_ps_dec->num_groups; gr++) {
  ------------------
  |  Branch (620:10): [True: 118k, False: 9.88k]
  ------------------
  621|   118k|    bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[gr];
  ------------------
  |  |   77|   118k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  622|   118k|    maxsb = ptr_ps_dec->ptr_group_borders[gr + 1];
  623|   721k|    for (sb = ptr_ps_dec->ptr_group_borders[gr]; sb < maxsb; sb++) {
  ------------------
  |  Branch (623:50): [True: 603k, False: 118k]
  ------------------
  624|   603k|      for (k = ptr_ps_dec->border_position[0];
  625|  19.9M|           k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
  ------------------
  |  Branch (625:12): [True: 19.2M, False: 603k]
  ------------------
  626|  19.2M|        im_left = pp_qmf_buf_re_left[k][sb];
  627|  19.2M|        re_left = pp_qmf_buf_im_left[k][sb];
  628|  19.2M|        pow_arr[k][bin] += im_left * im_left + re_left * re_left;
  629|  19.2M|      }
  630|   603k|    }
  631|   118k|  }
  632|       |
  633|   207k|  for (bin = 0; bin < ptr_ps_dec->num_bins; bin++) {
  ------------------
  |  Branch (633:17): [True: 197k, False: 9.88k]
  ------------------
  634|   197k|    for (k = ptr_ps_dec->border_position[0];
  635|  6.52M|         k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
  ------------------
  |  Branch (635:10): [True: 6.32M, False: 197k]
  ------------------
  636|  6.32M|      FLOAT32 q = 1.5f;
  637|       |
  638|  6.32M|      ptr_ps_dec->peak_decay_fast_bin[bin] *= PEAK_DECAY_FACTOR_FAST;
  ------------------
  |  |   91|  6.32M|#define PEAK_DECAY_FACTOR_FAST (0.765928338364649f)
  ------------------
  639|  6.32M|      if (ptr_ps_dec->peak_decay_fast_bin[bin] < pow_arr[k][bin])
  ------------------
  |  Branch (639:11): [True: 196k, False: 6.13M]
  ------------------
  640|   196k|        ptr_ps_dec->peak_decay_fast_bin[bin] = pow_arr[k][bin];
  641|       |
  642|  6.32M|      peak_diff = ptr_ps_dec->prev_peak_diff_bin[bin];
  643|  6.32M|      peak_diff += INIT_FILT_COEFF * (ptr_ps_dec->peak_decay_fast_bin[bin] -
  ------------------
  |  |   50|  6.32M|#define INIT_FILT_COEFF (1.0f - NRG_INT_COEFF)
  |  |  ------------------
  |  |  |  |   49|  6.32M|#define NRG_INT_COEFF 0.75f
  |  |  ------------------
  ------------------
  644|  6.32M|                                      pow_arr[k][bin] -
  645|  6.32M|                                      ptr_ps_dec->prev_peak_diff_bin[bin]);
  646|  6.32M|      ptr_ps_dec->prev_peak_diff_bin[bin] = peak_diff;
  647|       |
  648|  6.32M|      nrg = ptr_ps_dec->prev_nrg_bin[bin];
  649|  6.32M|      nrg += INIT_FILT_COEFF * (pow_arr[k][bin] - ptr_ps_dec->prev_nrg_bin[bin]);
  ------------------
  |  |   50|  6.32M|#define INIT_FILT_COEFF (1.0f - NRG_INT_COEFF)
  |  |  ------------------
  |  |  |  |   49|  6.32M|#define NRG_INT_COEFF 0.75f
  |  |  ------------------
  ------------------
  650|  6.32M|      ptr_ps_dec->prev_nrg_bin[bin] = nrg;
  651|  6.32M|      if (q * peak_diff <= nrg) {
  ------------------
  |  Branch (651:11): [True: 5.77M, False: 556k]
  ------------------
  652|  5.77M|        trans_ratio_arr[k][bin] = 1.0f;
  653|  5.77M|      } else {
  654|   556k|        trans_ratio_arr[k][bin] = nrg / (q * peak_diff);
  655|   556k|      }
  656|  6.32M|    }
  657|   197k|  }
  658|       |
  659|  9.88k|  if (ptr_ps_dec->use_34_st_bands) {
  ------------------
  |  Branch (659:7): [True: 0, False: 9.88k]
  ------------------
  660|      0|    decay_cutoff = DECAY_CUTOFF_HI_RES;
  ------------------
  |  |   80|      0|#define DECAY_CUTOFF_HI_RES 5
  ------------------
  661|  9.88k|  } else {
  662|  9.88k|    decay_cutoff = DECAY_CUTOFF;
  ------------------
  |  |   79|  9.88k|#define DECAY_CUTOFF 3
  ------------------
  663|  9.88k|  }
  664|       |
  665|   108k|  for (gr = 0; gr < ptr_ps_dec->num_sub_qmf_groups; gr++) {
  ------------------
  |  Branch (665:16): [True: 98.8k, False: 9.88k]
  ------------------
  666|  98.8k|    maxsb = ptr_ps_dec->ptr_group_borders[gr] + 1;
  667|       |
  668|   197k|    for (sb = ptr_ps_dec->ptr_group_borders[gr]; sb < maxsb; sb++) {
  ------------------
  |  Branch (668:50): [True: 98.8k, False: 98.8k]
  ------------------
  669|  98.8k|      FLOAT32 decay_scale_factor;
  670|       |
  671|  98.8k|      decay_scale_factor = 1.0f;
  672|       |
  673|  98.8k|      decay_scale_factor = max(decay_scale_factor, 0.0f);
  ------------------
  |  |   74|  98.8k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 98.8k, False: 0]
  |  |  ------------------
  ------------------
  674|       |
  675|  98.8k|      l_delay = ptr_ps_dec->delay_buf_idx;
  676|   395k|      for (k = 0; k < NUM_SER_AP_LINKS; k++)
  ------------------
  |  |   25|   395k|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (676:19): [True: 296k, False: 98.8k]
  ------------------
  677|   296k|        l_ser_delay_arr[k] = ptr_ps_dec->delay_buf_idx_ser[k];
  678|       |
  679|  98.8k|      for (k = ptr_ps_dec->border_position[0];
  680|  3.26M|           k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
  ------------------
  |  Branch (680:12): [True: 3.16M, False: 98.8k]
  ------------------
  681|  3.16M|        FLOAT32 real, imag, real0, imag0, r_r0, i_r0;
  682|       |
  683|  3.16M|        im_left = pp_hyb_left_re[k][sb];
  684|  3.16M|        re_left = pp_hyb_left_im[k][sb];
  685|       |
  686|  3.16M|        {
  687|  3.16M|          real0 = pp_sub_qmf_delay_buf_re[l_delay][sb];
  688|  3.16M|          imag0 = pp_sub_qmf_delay_buf_im[l_delay][sb];
  689|  3.16M|          pp_sub_qmf_delay_buf_re[l_delay][sb] = im_left;
  690|  3.16M|          pp_sub_qmf_delay_buf_im[l_delay][sb] = re_left;
  691|       |
  692|  3.16M|          real = real0 * pp_frac_delay_phase_fac_re[sb] - imag0 *
  693|  3.16M|                 pp_frac_delay_phase_fac_im[sb];
  694|  3.16M|          imag = real0 * pp_frac_delay_phase_fac_im[sb] + imag0 *
  695|  3.16M|                 pp_frac_delay_phase_fac_re[sb];
  696|       |
  697|  3.16M|          r_r0 = real;
  698|  3.16M|          i_r0 = imag;
  699|  12.6M|          for (m = 0; m < NUM_SER_AP_LINKS; m++) {
  ------------------
  |  |   25|  12.6M|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (699:23): [True: 9.49M, False: 3.16M]
  ------------------
  700|  9.49M|            real0 = ppp_ser_sub_qmf_dealy_buf_re[m][l_ser_delay_arr[m]][sb];
  701|  9.49M|            imag0 = ppp_ser_sub_qmf_dealy_buf_im[m][l_ser_delay_arr[m]][sb];
  702|  9.49M|            real = real0 * pp_frac_delay_phase_fac_ser_re[sb][m] -
  703|  9.49M|                   imag0 * pp_frac_delay_phase_fac_ser_im[sb][m];
  704|  9.49M|            imag = real0 * pp_frac_delay_phase_fac_ser_im[sb][m] +
  705|  9.49M|                   imag0 * pp_frac_delay_phase_fac_ser_re[sb][m];
  706|       |
  707|  9.49M|            real += -decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * r_r0;
  708|  9.49M|            imag += -decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * i_r0;
  709|  9.49M|            ppp_ser_sub_qmf_dealy_buf_re[m][l_ser_delay_arr[m]][sb] =
  710|  9.49M|                r_r0 + decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * real;
  711|  9.49M|            ppp_ser_sub_qmf_dealy_buf_im[m][l_ser_delay_arr[m]][sb] =
  712|  9.49M|                i_r0 + decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * imag;
  713|  9.49M|            r_r0 = real;
  714|  9.49M|            i_r0 = imag;
  715|  9.49M|          }
  716|  3.16M|        }
  717|       |
  718|  3.16M|        bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[gr];
  ------------------
  |  |   77|  3.16M|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  719|  3.16M|        trans_ratio = trans_ratio_arr[k][bin];
  720|       |
  721|  3.16M|        pp_hyb_right_re[k][sb] = trans_ratio * r_r0;
  722|  3.16M|        pp_hyb_right_im[k][sb] = trans_ratio * i_r0;
  723|       |
  724|  3.16M|        if (++l_delay >= DEL_ALL_PASS) l_delay = 0;
  ------------------
  |  |   30|  3.16M|#define DEL_ALL_PASS 2
  ------------------
  |  Branch (724:13): [True: 1.58M, False: 1.58M]
  ------------------
  725|       |
  726|  12.6M|        for (m = 0; m < NUM_SER_AP_LINKS; m++) {
  ------------------
  |  |   25|  12.6M|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (726:21): [True: 9.49M, False: 3.16M]
  ------------------
  727|  9.49M|          if (++l_ser_delay_arr[m] >= ptr_ps_dec->delay_sample_ser[m]) {
  ------------------
  |  Branch (727:15): [True: 2.47M, False: 7.01M]
  ------------------
  728|  2.47M|            l_ser_delay_arr[m] = 0;
  729|  2.47M|          }
  730|  9.49M|        }
  731|  3.16M|      }
  732|  98.8k|    }
  733|  98.8k|  }
  734|  9.88k|  {
  735|  9.88k|    ppp_ser_sub_qmf_dealy_buf_re = ptr_ps_dec->ser_qmf_delay_buf_re;
  736|  9.88k|    ppp_ser_sub_qmf_dealy_buf_im = ptr_ps_dec->ser_qmf_delay_buf_im;
  737|       |
  738|  9.88k|    pp_sub_qmf_delay_buf_re = ptr_ps_dec->qmf_delay_buf_re;
  739|  9.88k|    pp_sub_qmf_delay_buf_im = ptr_ps_dec->qmf_delay_buf_im;
  740|       |
  741|  9.88k|    pp_frac_delay_phase_fac_re = ptr_ps_tables->qmf_fract_delay_phase_factor_re;
  742|  9.88k|    pp_frac_delay_phase_fac_im = ptr_ps_tables->qmf_fract_delay_phase_factor_im;
  743|       |
  744|  9.88k|    pp_frac_delay_phase_fac_ser_re = ptr_ps_tables->qmf_ser_fract_delay_phase_factor_re;
  745|  9.88k|    pp_frac_delay_phase_fac_ser_im = ptr_ps_tables->qmf_ser_fract_delay_phase_factor_im;
  746|       |
  747|  9.88k|    p_delay_qmf_delay_buf_idx = ptr_ps_dec->delay_qmf_delay_buf_idx;
  748|  9.88k|    p_delay_qmf_delay_num_samp = ptr_ps_dec->delay_qmf_delay_num_samp;
  749|  9.88k|  }
  750|   128k|  for (; gr < ptr_ps_dec->num_groups; gr++) {
  ------------------
  |  Branch (750:10): [True: 118k, False: 9.88k]
  ------------------
  751|   118k|    maxsb = ptr_ps_dec->ptr_group_borders[gr + 1];
  752|       |
  753|   721k|    for (sb = ptr_ps_dec->ptr_group_borders[gr]; sb < maxsb; sb++) {
  ------------------
  |  Branch (753:50): [True: 603k, False: 118k]
  ------------------
  754|   603k|      FLOAT32 decay_scale_factor;
  755|   603k|      if (sb <= decay_cutoff)
  ------------------
  |  Branch (755:11): [True: 9.88k, False: 593k]
  ------------------
  756|  9.88k|        decay_scale_factor = 1.0f;
  757|   593k|      else
  758|   593k|        decay_scale_factor = 1.0f + decay_cutoff * DECAY_SLOPE - DECAY_SLOPE * sb;
  ------------------
  |  |   81|   593k|#define DECAY_SLOPE 0.05f
  ------------------
                      decay_scale_factor = 1.0f + decay_cutoff * DECAY_SLOPE - DECAY_SLOPE * sb;
  ------------------
  |  |   81|   593k|#define DECAY_SLOPE 0.05f
  ------------------
  759|       |
  760|   603k|      decay_scale_factor = max(decay_scale_factor, 0.0f);
  ------------------
  |  |   74|   603k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 197k, False: 405k]
  |  |  ------------------
  ------------------
  761|       |
  762|   603k|      l_delay = ptr_ps_dec->delay_buf_idx;
  763|  2.41M|      for (k = 0; k < NUM_SER_AP_LINKS; k++)
  ------------------
  |  |   25|  2.41M|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (763:19): [True: 1.80M, False: 603k]
  ------------------
  764|  1.80M|        l_ser_delay_arr[k] = ptr_ps_dec->delay_buf_idx_ser[k];
  765|       |
  766|   603k|      for (k = ptr_ps_dec->border_position[0];
  767|  19.9M|           k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
  ------------------
  |  Branch (767:12): [True: 19.2M, False: 603k]
  ------------------
  768|  19.2M|        FLOAT32 real, imag, real0, imag0, r_r0, i_r0;
  769|       |
  770|  19.2M|        im_left = pp_qmf_buf_re_left[k][sb];
  771|  19.2M|        re_left = pp_qmf_buf_im_left[k][sb];
  772|       |
  773|  19.2M|        if (gr >= ptr_ps_dec->first_delay_gr && sb >= NUM_OF_ALL_PASS_CHNLS) {
  ------------------
  |  |   27|  19.2M|#define NUM_OF_ALL_PASS_CHNLS 23
  ------------------
  |  Branch (773:13): [True: 19.2M, False: 0]
  |  Branch (773:49): [True: 12.9M, False: 6.32M]
  ------------------
  774|  12.9M|          real = pp_sub_qmf_delay_buf_re[p_delay_qmf_delay_buf_idx[sb]][sb];
  775|  12.9M|          imag = pp_sub_qmf_delay_buf_im[p_delay_qmf_delay_buf_idx[sb]][sb];
  776|  12.9M|          r_r0 = real;
  777|  12.9M|          i_r0 = imag;
  778|  12.9M|          pp_sub_qmf_delay_buf_re[p_delay_qmf_delay_buf_idx[sb]][sb] = im_left;
  779|  12.9M|          pp_sub_qmf_delay_buf_im[p_delay_qmf_delay_buf_idx[sb]][sb] = re_left;
  780|  12.9M|        } else {
  781|  6.32M|          real0 = pp_sub_qmf_delay_buf_re[l_delay][sb];
  782|  6.32M|          imag0 = pp_sub_qmf_delay_buf_im[l_delay][sb];
  783|  6.32M|          pp_sub_qmf_delay_buf_re[l_delay][sb] = im_left;
  784|  6.32M|          pp_sub_qmf_delay_buf_im[l_delay][sb] = re_left;
  785|       |
  786|  6.32M|          real = real0 * pp_frac_delay_phase_fac_re[sb] - imag0 *
  787|  6.32M|                 pp_frac_delay_phase_fac_im[sb];
  788|  6.32M|          imag = real0 * pp_frac_delay_phase_fac_im[sb] + imag0 *
  789|  6.32M|                 pp_frac_delay_phase_fac_re[sb];
  790|       |
  791|  6.32M|          r_r0 = real;
  792|  6.32M|          i_r0 = imag;
  793|  25.3M|          for (m = 0; m < NUM_SER_AP_LINKS; m++) {
  ------------------
  |  |   25|  25.3M|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (793:23): [True: 18.9M, False: 6.32M]
  ------------------
  794|  18.9M|            real0 = ppp_ser_sub_qmf_dealy_buf_re[m][l_ser_delay_arr[m]][sb];
  795|  18.9M|            imag0 = ppp_ser_sub_qmf_dealy_buf_im[m][l_ser_delay_arr[m]][sb];
  796|  18.9M|            real = real0 * pp_frac_delay_phase_fac_ser_re[sb][m] -
  797|  18.9M|                   imag0 * pp_frac_delay_phase_fac_ser_im[sb][m];
  798|  18.9M|            imag = real0 * pp_frac_delay_phase_fac_ser_im[sb][m] +
  799|  18.9M|                   imag0 * pp_frac_delay_phase_fac_ser_re[sb][m];
  800|       |
  801|  18.9M|            real += -decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * r_r0;
  802|  18.9M|            imag += -decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * i_r0;
  803|  18.9M|            ppp_ser_sub_qmf_dealy_buf_re[m][l_ser_delay_arr[m]][sb] =
  804|  18.9M|                r_r0 + decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * real;
  805|  18.9M|            ppp_ser_sub_qmf_dealy_buf_im[m][l_ser_delay_arr[m]][sb] =
  806|  18.9M|                i_r0 + decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * imag;
  807|  18.9M|            r_r0 = real;
  808|  18.9M|            i_r0 = imag;
  809|  18.9M|          }
  810|  6.32M|        }
  811|       |
  812|  19.2M|        bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[gr];
  ------------------
  |  |   77|  19.2M|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  813|  19.2M|        trans_ratio = trans_ratio_arr[k][bin];
  814|       |
  815|  19.2M|        pp_qmf_buf_re_right[k][sb] = trans_ratio * r_r0;
  816|  19.2M|        pp_qmf_buf_im_right[k][sb] = trans_ratio * i_r0;
  817|       |
  818|  19.2M|        if (++l_delay >= DEL_ALL_PASS) l_delay = 0;
  ------------------
  |  |   30|  19.2M|#define DEL_ALL_PASS 2
  ------------------
  |  Branch (818:13): [True: 9.64M, False: 9.64M]
  ------------------
  819|       |
  820|  19.2M|        if (gr >= ptr_ps_dec->first_delay_gr && sb >= NUM_OF_ALL_PASS_CHNLS) {
  ------------------
  |  |   27|  19.2M|#define NUM_OF_ALL_PASS_CHNLS 23
  ------------------
  |  Branch (820:13): [True: 19.2M, False: 0]
  |  Branch (820:49): [True: 12.9M, False: 6.32M]
  ------------------
  821|  12.9M|          if (++p_delay_qmf_delay_buf_idx[sb] >= p_delay_qmf_delay_num_samp[sb]) {
  ------------------
  |  Branch (821:15): [True: 9.44M, False: 3.52M]
  ------------------
  822|  9.44M|            p_delay_qmf_delay_buf_idx[sb] = 0;
  823|  9.44M|          }
  824|  12.9M|        }
  825|       |
  826|  77.1M|        for (m = 0; m < NUM_SER_AP_LINKS; m++) {
  ------------------
  |  |   25|  77.1M|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (826:21): [True: 57.8M, False: 19.2M]
  ------------------
  827|  57.8M|          if (++l_ser_delay_arr[m] >= ptr_ps_dec->delay_sample_ser[m]) {
  ------------------
  |  Branch (827:15): [True: 15.1M, False: 42.7M]
  ------------------
  828|  15.1M|            l_ser_delay_arr[m] = 0;
  829|  15.1M|          }
  830|  57.8M|        }
  831|  19.2M|      }
  832|   603k|    }
  833|   118k|  }
  834|       |
  835|  9.88k|  ptr_ps_dec->delay_buf_idx = l_delay;
  836|  39.5k|  for (m = 0; m < NUM_SER_AP_LINKS; m++) {
  ------------------
  |  |   25|  39.5k|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (836:15): [True: 29.6k, False: 9.88k]
  ------------------
  837|  29.6k|    ptr_ps_dec->delay_buf_idx_ser[m] = l_ser_delay_arr[m];
  838|  29.6k|  }
  839|  9.88k|}
ixheaacd_esbr_ps_apply_rotation:
  847|  9.88k|    ia_ps_tables_struct *ptr_ps_tables) {
  848|  9.88k|  WORD32 i;
  849|  9.88k|  WORD32 group;
  850|  9.88k|  WORD32 bin = 0;
  851|  9.88k|  WORD32 subband, max_subband;
  852|  9.88k|  WORD32 env;
  853|  9.88k|  FLOAT32(*p_hyb_left_re)[MAX_NUM_COLUMNS];
  854|  9.88k|  FLOAT32(*p_hyb_left_im)[MAX_NUM_COLUMNS];
  855|  9.88k|  FLOAT32(*p_hyb_rigth_re)[MAX_NUM_COLUMNS];
  856|  9.88k|  FLOAT32(*p_hyb_rigth_im)[MAX_NUM_COLUMNS];
  857|  9.88k|  FLOAT32 scale_fac_l, scale_fac_r;
  858|  9.88k|  FLOAT32 alpha, beta;
  859|  9.88k|  FLOAT32 ipd, opd;
  860|  9.88k|  FLOAT32 ipd1, opd1;
  861|  9.88k|  FLOAT32 ipd2, opd2;
  862|       |
  863|  9.88k|  FLOAT32 h11r, h12r, h21r, h22r;
  864|  9.88k|  FLOAT32 h11i, h12i, h21i, h22i;
  865|  9.88k|  FLOAT32 H11r, H12r, H21r, H22r;
  866|  9.88k|  FLOAT32 H11i, H12i, H21i, H22i;
  867|  9.88k|  FLOAT32 deltaH11r, deltaH12r, deltaH21r, deltaH22r;
  868|  9.88k|  FLOAT32 deltaH11i, deltaH12i, deltaH21i, deltaH22i;
  869|  9.88k|  FLOAT32 l_left_re, l_left_im;
  870|  9.88k|  FLOAT32 l_right_re, l_right_im;
  871|       |
  872|  9.88k|  WORD32 L;
  873|  9.88k|  FLOAT32 *ptr_scale_factors;
  874|  9.88k|  const WORD32 *ptr_quantized_iids;
  875|  9.88k|  WORD32 num_iid_steps;
  876|       |
  877|  9.88k|  if (ptr_ps_dec->iid_quant) {
  ------------------
  |  Branch (877:7): [True: 714, False: 9.17k]
  ------------------
  878|    714|    num_iid_steps = NUM_IID_STEPS_FINE;
  ------------------
  |  |   54|    714|#define NUM_IID_STEPS_FINE (15)
  ------------------
  879|    714|    ptr_scale_factors = ptr_ps_tables->scale_factors_fine_flt;
  880|    714|    ptr_quantized_iids = ptr_ps_tables->quantized_iids_fine;
  881|  9.17k|  } else {
  882|  9.17k|    num_iid_steps = NUM_IID_STEPS;
  ------------------
  |  |   53|  9.17k|#define NUM_IID_STEPS (7)
  ------------------
  883|  9.17k|    ptr_scale_factors = ptr_ps_tables->scale_factors_flt;
  884|  9.17k|    ptr_quantized_iids = ptr_ps_tables->quantized_iids;
  885|  9.17k|  }
  886|       |
  887|  9.88k|  if (ptr_ps_dec->use_34_st_bands != ptr_ps_dec->use_34_st_bands_prev) {
  ------------------
  |  Branch (887:7): [True: 0, False: 9.88k]
  ------------------
  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|  20.2k|  for (env = 0; env < ptr_ps_dec->num_env; env++) {
  ------------------
  |  Branch (921:17): [True: 10.3k, False: 9.88k]
  ------------------
  922|   217k|    for (bin = 0; bin < ptr_ps_dec->num_bins; bin++) {
  ------------------
  |  Branch (922:19): [True: 206k, False: 10.3k]
  ------------------
  923|   206k|      if (!ptr_ps_dec->use_pca_rot_flg) {
  ------------------
  |  Branch (923:11): [True: 206k, False: 0]
  ------------------
  924|   206k|        scale_fac_r = ptr_scale_factors[num_iid_steps +
  925|   206k|                      ptr_ps_dec->iid_par_table[env][bin]];
  926|   206k|        scale_fac_l = ptr_scale_factors[num_iid_steps -
  927|   206k|                      ptr_ps_dec->iid_par_table[env][bin]];
  928|       |
  929|   206k|        alpha = ptr_ps_tables->alphas[ptr_ps_dec->icc_par_table[env][bin]];
  930|       |
  931|   206k|        beta = alpha * (scale_fac_r - scale_fac_l) / PSC_SQRT2F;
  ------------------
  |  |   71|   206k|#define PSC_SQRT2F ((FLOAT32)PSC_SQRT2)
  |  |  ------------------
  |  |  |  |   69|   206k|#define PSC_SQRT2  (1.41421356237309504880)
  |  |  ------------------
  ------------------
  932|       |
  933|   206k|        h11r = (FLOAT32)(scale_fac_l * cos(beta + alpha));
  934|   206k|        h12r = (FLOAT32)(scale_fac_r * cos(beta - alpha));
  935|   206k|        h21r = (FLOAT32)(scale_fac_l * sin(beta + alpha));
  936|   206k|        h22r = (FLOAT32)(scale_fac_r * sin(beta - alpha));
  937|   206k|      } 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|   206k|      if (bin >= ptr_ps_tables->ipd_bins_tbl[ptr_ps_dec->freq_res_ipd]) {
  ------------------
  |  Branch (971:11): [True: 133k, False: 73.6k]
  ------------------
  972|   133k|        h11i = h12i = h21i = h22i = 0.0f;
  973|   133k|      } else {
  974|  73.6k|        ipd = (IPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->ipd_idx_map[env][bin];
  ------------------
  |  |   74|  73.6k|#define IPD_SCALE_FACTOR (IPD_HALF_RANGE / NUM_IPD_STEPS)
  |  |  ------------------
  |  |  |  |   73|  73.6k|#define IPD_HALF_RANGE (PSC_PIF)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|  73.6k|#define PSC_PIF ((FLOAT32)_M_PI_)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|  73.6k|#define _M_PI_ (3.141592653589793238462643383279)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IPD_SCALE_FACTOR (IPD_HALF_RANGE / NUM_IPD_STEPS)
  |  |  ------------------
  |  |  |  |   54|  73.6k|#define NUM_IPD_STEPS (8)
  |  |  ------------------
  ------------------
  975|  73.6k|        opd = (OPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->opd_idx_map[env][bin];
  ------------------
  |  |   76|  73.6k|#define OPD_SCALE_FACTOR (OPD_HALF_RANGE / NUM_OPD_STEPS)
  |  |  ------------------
  |  |  |  |   75|  73.6k|#define OPD_HALF_RANGE (PSC_PIF)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|  73.6k|#define PSC_PIF ((FLOAT32)_M_PI_)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|  73.6k|#define _M_PI_ (3.141592653589793238462643383279)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define OPD_SCALE_FACTOR (OPD_HALF_RANGE / NUM_OPD_STEPS)
  |  |  ------------------
  |  |  |  |   55|  73.6k|#define NUM_OPD_STEPS (8)
  |  |  ------------------
  ------------------
  976|  73.6k|        ipd1 = (IPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->ipd_idx_map_1[bin];
  ------------------
  |  |   74|  73.6k|#define IPD_SCALE_FACTOR (IPD_HALF_RANGE / NUM_IPD_STEPS)
  |  |  ------------------
  |  |  |  |   73|  73.6k|#define IPD_HALF_RANGE (PSC_PIF)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|  73.6k|#define PSC_PIF ((FLOAT32)_M_PI_)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|  73.6k|#define _M_PI_ (3.141592653589793238462643383279)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IPD_SCALE_FACTOR (IPD_HALF_RANGE / NUM_IPD_STEPS)
  |  |  ------------------
  |  |  |  |   54|  73.6k|#define NUM_IPD_STEPS (8)
  |  |  ------------------
  ------------------
  977|  73.6k|        opd1 = (OPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->opd_idx_map_1[bin];
  ------------------
  |  |   76|  73.6k|#define OPD_SCALE_FACTOR (OPD_HALF_RANGE / NUM_OPD_STEPS)
  |  |  ------------------
  |  |  |  |   75|  73.6k|#define OPD_HALF_RANGE (PSC_PIF)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|  73.6k|#define PSC_PIF ((FLOAT32)_M_PI_)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|  73.6k|#define _M_PI_ (3.141592653589793238462643383279)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define OPD_SCALE_FACTOR (OPD_HALF_RANGE / NUM_OPD_STEPS)
  |  |  ------------------
  |  |  |  |   55|  73.6k|#define NUM_OPD_STEPS (8)
  |  |  ------------------
  ------------------
  978|  73.6k|        ipd2 = (IPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->ipd_idx_map_2[bin];
  ------------------
  |  |   74|  73.6k|#define IPD_SCALE_FACTOR (IPD_HALF_RANGE / NUM_IPD_STEPS)
  |  |  ------------------
  |  |  |  |   73|  73.6k|#define IPD_HALF_RANGE (PSC_PIF)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|  73.6k|#define PSC_PIF ((FLOAT32)_M_PI_)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|  73.6k|#define _M_PI_ (3.141592653589793238462643383279)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IPD_SCALE_FACTOR (IPD_HALF_RANGE / NUM_IPD_STEPS)
  |  |  ------------------
  |  |  |  |   54|  73.6k|#define NUM_IPD_STEPS (8)
  |  |  ------------------
  ------------------
  979|  73.6k|        opd2 = (OPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->opd_idx_map_2[bin];
  ------------------
  |  |   76|  73.6k|#define OPD_SCALE_FACTOR (OPD_HALF_RANGE / NUM_OPD_STEPS)
  |  |  ------------------
  |  |  |  |   75|  73.6k|#define OPD_HALF_RANGE (PSC_PIF)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|  73.6k|#define PSC_PIF ((FLOAT32)_M_PI_)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|  73.6k|#define _M_PI_ (3.141592653589793238462643383279)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define OPD_SCALE_FACTOR (OPD_HALF_RANGE / NUM_OPD_STEPS)
  |  |  ------------------
  |  |  |  |   55|  73.6k|#define NUM_OPD_STEPS (8)
  |  |  ------------------
  ------------------
  980|       |
  981|  73.6k|        l_left_re = (FLOAT32)cos(ipd);
  982|  73.6k|        l_left_im = (FLOAT32)sin(ipd);
  983|  73.6k|        l_right_re = (FLOAT32)cos(opd);
  984|  73.6k|        l_right_im = (FLOAT32)sin(opd);
  985|       |
  986|  73.6k|        l_left_re += PHASE_SMOOTH_HIST1 * (FLOAT32)cos(ipd1);
  ------------------
  |  |   83|  73.6k|#define PHASE_SMOOTH_HIST1 (0.5f)
  ------------------
  987|  73.6k|        l_left_im += PHASE_SMOOTH_HIST1 * (FLOAT32)sin(ipd1);
  ------------------
  |  |   83|  73.6k|#define PHASE_SMOOTH_HIST1 (0.5f)
  ------------------
  988|  73.6k|        l_right_re += PHASE_SMOOTH_HIST1 * (FLOAT32)cos(opd1);
  ------------------
  |  |   83|  73.6k|#define PHASE_SMOOTH_HIST1 (0.5f)
  ------------------
  989|  73.6k|        l_right_im += PHASE_SMOOTH_HIST1 * (FLOAT32)sin(opd1);
  ------------------
  |  |   83|  73.6k|#define PHASE_SMOOTH_HIST1 (0.5f)
  ------------------
  990|       |
  991|  73.6k|        l_left_re += PHASE_SMOOTH_HIST2 * (FLOAT32)cos(ipd2);
  ------------------
  |  |   84|  73.6k|#define PHASE_SMOOTH_HIST2 (0.25f)
  ------------------
  992|  73.6k|        l_left_im += PHASE_SMOOTH_HIST2 * (FLOAT32)sin(ipd2);
  ------------------
  |  |   84|  73.6k|#define PHASE_SMOOTH_HIST2 (0.25f)
  ------------------
  993|  73.6k|        l_right_re += PHASE_SMOOTH_HIST2 * (FLOAT32)cos(opd2);
  ------------------
  |  |   84|  73.6k|#define PHASE_SMOOTH_HIST2 (0.25f)
  ------------------
  994|  73.6k|        l_right_im += PHASE_SMOOTH_HIST2 * (FLOAT32)sin(opd2);
  ------------------
  |  |   84|  73.6k|#define PHASE_SMOOTH_HIST2 (0.25f)
  ------------------
  995|       |
  996|  73.6k|        ipd = (FLOAT32)atan2(l_left_im, l_left_re);
  997|  73.6k|        opd = (FLOAT32)atan2(l_right_im, l_right_re);
  998|       |
  999|  73.6k|        l_left_re = (FLOAT32)cos(opd);
 1000|  73.6k|        l_left_im = (FLOAT32)sin(opd);
 1001|  73.6k|        opd -= ipd;
 1002|  73.6k|        l_right_re = (FLOAT32)cos(opd);
 1003|  73.6k|        l_right_im = (FLOAT32)sin(opd);
 1004|       |
 1005|  73.6k|        h11i = h11r * l_left_im;
 1006|  73.6k|        h12i = h12r * l_right_im;
 1007|  73.6k|        h21i = h21r * l_left_im;
 1008|  73.6k|        h22i = h22r * l_right_im;
 1009|       |
 1010|  73.6k|        h11r *= l_left_re;
 1011|  73.6k|        h12r *= l_right_re;
 1012|  73.6k|        h21r *= l_left_re;
 1013|  73.6k|        h22r *= l_right_re;
 1014|  73.6k|      }
 1015|       |
 1016|   206k|      ptr_ps_dec->h11_re_vec[bin] = h11r;
 1017|   206k|      ptr_ps_dec->h12_re_vec[bin] = h12r;
 1018|   206k|      ptr_ps_dec->h21_re_vec[bin] = h21r;
 1019|   206k|      ptr_ps_dec->h22_re_vec[bin] = h22r;
 1020|   206k|      ptr_ps_dec->h11_im_vec[bin] = h11i;
 1021|   206k|      ptr_ps_dec->h12_im_vec[bin] = h12i;
 1022|   206k|      ptr_ps_dec->h21_im_vec[bin] = h21i;
 1023|   206k|      ptr_ps_dec->h22_im_vec[bin] = h22i;
 1024|       |
 1025|   206k|    }
 1026|       |
 1027|  10.3k|    p_hyb_left_re = ptr_ps_dec->hyb_left_re;
 1028|  10.3k|    p_hyb_left_im = ptr_ps_dec->hyb_left_im;
 1029|  10.3k|    p_hyb_rigth_re = ptr_ps_dec->hyb_right_re;
 1030|  10.3k|    p_hyb_rigth_im = ptr_ps_dec->hyb_right_im;
 1031|       |
 1032|   113k|    for (group = 0; group < ptr_ps_dec->num_sub_qmf_groups; group++) {
  ------------------
  |  Branch (1032:21): [True: 103k, False: 10.3k]
  ------------------
 1033|   103k|      bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[group];
  ------------------
  |  |   77|   103k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
 1034|       |
 1035|   103k|      max_subband = ptr_ps_dec->ptr_group_borders[group] + 1;
 1036|       |
 1037|   103k|      L = ptr_ps_dec->border_position[env + 1] - ptr_ps_dec->border_position[env];
 1038|       |
 1039|   103k|      H11r = ptr_ps_dec->h11_re_prev[bin];
 1040|   103k|      H12r = ptr_ps_dec->h12_re_prev[bin];
 1041|   103k|      H21r = ptr_ps_dec->h21_re_prev[bin];
 1042|   103k|      H22r = ptr_ps_dec->h22_re_prev[bin];
 1043|   103k|      if ((NEGATE_IPD_MASK & ptr_ps_dec->ptr_bins_group_map[group]) != 0) {
  ------------------
  |  |   77|   103k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  |  Branch (1043:11): [True: 20.6k, False: 82.6k]
  ------------------
 1044|  20.6k|        H11i = -ptr_ps_dec->h11_im_prev[bin];
 1045|  20.6k|        H12i = -ptr_ps_dec->h12_im_prev[bin];
 1046|  20.6k|        H21i = -ptr_ps_dec->h21_im_prev[bin];
 1047|  20.6k|        H22i = -ptr_ps_dec->h22_im_prev[bin];
 1048|  82.6k|      } else {
 1049|  82.6k|        H11i = ptr_ps_dec->h11_im_prev[bin];
 1050|  82.6k|        H12i = ptr_ps_dec->h12_im_prev[bin];
 1051|  82.6k|        H21i = ptr_ps_dec->h21_im_prev[bin];
 1052|  82.6k|        H22i = ptr_ps_dec->h22_im_prev[bin];
 1053|  82.6k|      }
 1054|       |
 1055|   103k|      h11r = ptr_ps_dec->h11_re_vec[bin];
 1056|   103k|      h12r = ptr_ps_dec->h12_re_vec[bin];
 1057|   103k|      h21r = ptr_ps_dec->h21_re_vec[bin];
 1058|   103k|      h22r = ptr_ps_dec->h22_re_vec[bin];
 1059|   103k|      if ((NEGATE_IPD_MASK & ptr_ps_dec->ptr_bins_group_map[group]) != 0) {
  ------------------
  |  |   77|   103k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  |  Branch (1059:11): [True: 20.6k, False: 82.6k]
  ------------------
 1060|  20.6k|        h11i = -ptr_ps_dec->h11_im_vec[bin];
 1061|  20.6k|        h12i = -ptr_ps_dec->h12_im_vec[bin];
 1062|  20.6k|        h21i = -ptr_ps_dec->h21_im_vec[bin];
 1063|  20.6k|        h22i = -ptr_ps_dec->h22_im_vec[bin];
 1064|  82.6k|      } else {
 1065|  82.6k|        h11i = ptr_ps_dec->h11_im_vec[bin];
 1066|  82.6k|        h12i = ptr_ps_dec->h12_im_vec[bin];
 1067|  82.6k|        h21i = ptr_ps_dec->h21_im_vec[bin];
 1068|  82.6k|        h22i = ptr_ps_dec->h22_im_vec[bin];
 1069|  82.6k|      }
 1070|       |
 1071|   103k|      deltaH11r = (h11r - H11r) / L;
 1072|   103k|      deltaH12r = (h12r - H12r) / L;
 1073|   103k|      deltaH21r = (h21r - H21r) / L;
 1074|   103k|      deltaH22r = (h22r - H22r) / L;
 1075|       |
 1076|   103k|      deltaH11i = (h11i - H11i) / L;
 1077|   103k|      deltaH12i = (h12i - H12i) / L;
 1078|   103k|      deltaH21i = (h21i - H21i) / L;
 1079|   103k|      deltaH22i = (h22i - H22i) / L;
 1080|       |
 1081|  3.26M|      for (i = ptr_ps_dec->border_position[env]; i < ptr_ps_dec->border_position[env + 1];
  ------------------
  |  Branch (1081:50): [True: 3.16M, False: 103k]
  ------------------
 1082|  3.16M|           i++) {
 1083|  3.16M|        H11r += deltaH11r;
 1084|  3.16M|        H12r += deltaH12r;
 1085|  3.16M|        H21r += deltaH21r;
 1086|  3.16M|        H22r += deltaH22r;
 1087|       |
 1088|  3.16M|        H11i += deltaH11i;
 1089|  3.16M|        H12i += deltaH12i;
 1090|  3.16M|        H21i += deltaH21i;
 1091|  3.16M|        H22i += deltaH22i;
 1092|       |
 1093|  6.32M|        for (subband = ptr_ps_dec->ptr_group_borders[group]; subband < max_subband;
  ------------------
  |  Branch (1093:62): [True: 3.16M, False: 3.16M]
  ------------------
 1094|  3.16M|             subband++) {
 1095|  3.16M|          l_left_re = H11r * p_hyb_left_re[i][subband] - H11i * p_hyb_left_im[i][subband] +
 1096|  3.16M|                      H21r * p_hyb_rigth_re[i][subband] - H21i * p_hyb_rigth_im[i][subband];
 1097|       |
 1098|  3.16M|          l_left_im = H11i * p_hyb_left_re[i][subband] + H11r * p_hyb_left_im[i][subband] +
 1099|  3.16M|                      H21i * p_hyb_rigth_re[i][subband] + H21r * p_hyb_rigth_im[i][subband];
 1100|       |
 1101|  3.16M|          l_right_re = H12r * p_hyb_left_re[i][subband] - H12i * p_hyb_left_im[i][subband] +
 1102|  3.16M|                       H22r * p_hyb_rigth_re[i][subband] - H22i * p_hyb_rigth_im[i][subband];
 1103|       |
 1104|  3.16M|          l_right_im = H12i * p_hyb_left_re[i][subband] + H12r * p_hyb_left_im[i][subband] +
 1105|  3.16M|                       H22i * p_hyb_rigth_re[i][subband] + H22r * p_hyb_rigth_im[i][subband];
 1106|       |
 1107|  3.16M|          p_hyb_left_re[i][subband] = l_left_re;
 1108|  3.16M|          p_hyb_left_im[i][subband] = l_left_im;
 1109|  3.16M|          p_hyb_rigth_re[i][subband] = l_right_re;
 1110|  3.16M|          p_hyb_rigth_im[i][subband] = l_right_im;
 1111|  3.16M|        }
 1112|  3.16M|      }
 1113|   103k|    }
 1114|       |
 1115|   134k|    for (; group < ptr_ps_dec->num_groups; group++) {
  ------------------
  |  Branch (1115:12): [True: 124k, False: 10.3k]
  ------------------
 1116|   124k|      bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[group];
  ------------------
  |  |   77|   124k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
 1117|       |
 1118|   124k|      max_subband = ptr_ps_dec->ptr_group_borders[group + 1];
 1119|       |
 1120|   124k|      L = ptr_ps_dec->border_position[env + 1] - ptr_ps_dec->border_position[env];
 1121|       |
 1122|   124k|      H11r = ptr_ps_dec->h11_re_prev[bin];
 1123|   124k|      H12r = ptr_ps_dec->h12_re_prev[bin];
 1124|   124k|      H21r = ptr_ps_dec->h21_re_prev[bin];
 1125|   124k|      H22r = ptr_ps_dec->h22_re_prev[bin];
 1126|   124k|      if ((NEGATE_IPD_MASK & ptr_ps_dec->ptr_bins_group_map[group]) != 0) {
  ------------------
  |  |   77|   124k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  |  Branch (1126:11): [True: 0, False: 124k]
  ------------------
 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|   124k|      } else {
 1132|   124k|        H11i = ptr_ps_dec->h11_im_prev[bin];
 1133|   124k|        H12i = ptr_ps_dec->h12_im_prev[bin];
 1134|   124k|        H21i = ptr_ps_dec->h21_im_prev[bin];
 1135|   124k|        H22i = ptr_ps_dec->h22_im_prev[bin];
 1136|   124k|      }
 1137|       |
 1138|   124k|      h11r = ptr_ps_dec->h11_re_vec[bin];
 1139|   124k|      h12r = ptr_ps_dec->h12_re_vec[bin];
 1140|   124k|      h21r = ptr_ps_dec->h21_re_vec[bin];
 1141|   124k|      h22r = ptr_ps_dec->h22_re_vec[bin];
 1142|   124k|      if ((NEGATE_IPD_MASK & ptr_ps_dec->ptr_bins_group_map[group]) != 0) {
  ------------------
  |  |   77|   124k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  |  Branch (1142:11): [True: 0, False: 124k]
  ------------------
 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|   124k|      } else {
 1148|   124k|        h11i = ptr_ps_dec->h11_im_vec[bin];
 1149|   124k|        h12i = ptr_ps_dec->h12_im_vec[bin];
 1150|   124k|        h21i = ptr_ps_dec->h21_im_vec[bin];
 1151|   124k|        h22i = ptr_ps_dec->h22_im_vec[bin];
 1152|   124k|      }
 1153|       |
 1154|   124k|      deltaH11r = (h11r - H11r) / L;
 1155|   124k|      deltaH12r = (h12r - H12r) / L;
 1156|   124k|      deltaH21r = (h21r - H21r) / L;
 1157|   124k|      deltaH22r = (h22r - H22r) / L;
 1158|       |
 1159|   124k|      deltaH11i = (h11i - H11i) / L;
 1160|   124k|      deltaH12i = (h12i - H12i) / L;
 1161|   124k|      deltaH21i = (h21i - H21i) / L;
 1162|   124k|      deltaH22i = (h22i - H22i) / L;
 1163|       |
 1164|  3.92M|      for (i = ptr_ps_dec->border_position[env]; i < ptr_ps_dec->border_position[env + 1];
  ------------------
  |  Branch (1164:50): [True: 3.79M, False: 124k]
  ------------------
 1165|  3.79M|           i++) {
 1166|  3.79M|        H11r += deltaH11r;
 1167|  3.79M|        H12r += deltaH12r;
 1168|  3.79M|        H21r += deltaH21r;
 1169|  3.79M|        H22r += deltaH22r;
 1170|       |
 1171|  3.79M|        H11i += deltaH11i;
 1172|  3.79M|        H12i += deltaH12i;
 1173|  3.79M|        H21i += deltaH21i;
 1174|  3.79M|        H22i += deltaH22i;
 1175|       |
 1176|  23.0M|        for (subband = ptr_ps_dec->ptr_group_borders[group]; subband < max_subband;
  ------------------
  |  Branch (1176:62): [True: 19.2M, False: 3.79M]
  ------------------
 1177|  19.2M|             subband++) {
 1178|  19.2M|          l_left_re = H11r * pp_qmf_buf_re_left[i][subband] - H11i *
 1179|  19.2M|                      pp_qmf_buf_im_left[i][subband] +
 1180|  19.2M|                      H21r * pp_qmf_buf_re_right[i][subband] - H21i *
 1181|  19.2M|                      pp_qmf_buf_im_right[i][subband];
 1182|       |
 1183|  19.2M|          l_left_im = H11i * pp_qmf_buf_re_left[i][subband] + H11r *
 1184|  19.2M|                      pp_qmf_buf_im_left[i][subband] +
 1185|  19.2M|                      H21i * pp_qmf_buf_re_right[i][subband] + H21r *
 1186|  19.2M|                      pp_qmf_buf_im_right[i][subband];
 1187|       |
 1188|  19.2M|          l_right_re = H12r * pp_qmf_buf_re_left[i][subband] - H12i *
 1189|  19.2M|                       pp_qmf_buf_im_left[i][subband] +
 1190|  19.2M|                       H22r * pp_qmf_buf_re_right[i][subband] - H22i *
 1191|  19.2M|                       pp_qmf_buf_im_right[i][subband];
 1192|       |
 1193|  19.2M|          l_right_im = H12i * pp_qmf_buf_re_left[i][subband] + H12r *
 1194|  19.2M|                       pp_qmf_buf_im_left[i][subband] +
 1195|  19.2M|                       H22i * pp_qmf_buf_re_right[i][subband] + H22r *
 1196|  19.2M|                       pp_qmf_buf_im_right[i][subband];
 1197|       |
 1198|  19.2M|          pp_qmf_buf_re_left[i][subband] = l_left_re;
 1199|  19.2M|          pp_qmf_buf_im_left[i][subband] = l_left_im;
 1200|  19.2M|          pp_qmf_buf_re_right[i][subband] = l_right_re;
 1201|  19.2M|          pp_qmf_buf_im_right[i][subband] = l_right_im;
 1202|  19.2M|        }
 1203|  3.79M|      }
 1204|   124k|    }
 1205|   217k|    for (bin = 0; bin < ptr_ps_dec->num_bins; bin++) {
  ------------------
  |  Branch (1205:19): [True: 206k, False: 10.3k]
  ------------------
 1206|   206k|      ptr_ps_dec->h11_re_prev[bin] = ptr_ps_dec->h11_re_vec[bin];
 1207|   206k|      ptr_ps_dec->h12_re_prev[bin] = ptr_ps_dec->h12_re_vec[bin];
 1208|   206k|      ptr_ps_dec->h21_re_prev[bin] = ptr_ps_dec->h21_re_vec[bin];
 1209|   206k|      ptr_ps_dec->h22_re_prev[bin] = ptr_ps_dec->h22_re_vec[bin];
 1210|       |
 1211|   206k|      ptr_ps_dec->h11_im_prev[bin] = ptr_ps_dec->h11_im_vec[bin];
 1212|   206k|      ptr_ps_dec->h12_im_prev[bin] = ptr_ps_dec->h12_im_vec[bin];
 1213|   206k|      ptr_ps_dec->h21_im_prev[bin] = ptr_ps_dec->h21_im_vec[bin];
 1214|   206k|      ptr_ps_dec->h22_im_prev[bin] = ptr_ps_dec->h22_im_vec[bin];
 1215|   206k|    }
 1216|       |
 1217|  84.0k|    for (bin = 0; bin < ptr_ps_tables->ipd_bins_tbl[ptr_ps_dec->freq_res_ipd]; bin++) {
  ------------------
  |  Branch (1217:19): [True: 73.6k, False: 10.3k]
  ------------------
 1218|  73.6k|      ptr_ps_dec->ipd_idx_map_2[bin] = ptr_ps_dec->ipd_idx_map_1[bin];
 1219|  73.6k|      ptr_ps_dec->opd_idx_map_2[bin] = ptr_ps_dec->opd_idx_map_1[bin];
 1220|  73.6k|      ptr_ps_dec->ipd_idx_map_1[bin] = ptr_ps_dec->ipd_idx_map[env][bin];
 1221|  73.6k|      ptr_ps_dec->opd_idx_map_1[bin] = ptr_ps_dec->opd_idx_map[env][bin];
 1222|  73.6k|    }
 1223|  10.3k|  }
 1224|  9.88k|}

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

ixheaacd_rvlc_read_bits:
  408|  5.86M|                               UWORD16 *ptr_position, UWORD8 read_direction) {
  409|  5.86M|  UWORD32 bit;
  410|  5.86M|  WORD32 read_bit_offset =
  411|  5.86M|      *ptr_position - (it_bit_buff->size - it_bit_buff->cnt_bits);
  412|       |
  413|  5.86M|  if (read_bit_offset) it_bit_buff->cnt_bits -= read_bit_offset;
  ------------------
  |  Branch (413:7): [True: 100k, False: 5.76M]
  ------------------
  414|       |
  415|  5.86M|  it_bit_buff->ptr_read_next =
  416|  5.86M|      it_bit_buff->ptr_bit_buf_base +
  417|  5.86M|      ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
  418|  5.86M|  it_bit_buff->bit_pos = ((it_bit_buff->size - it_bit_buff->cnt_bits) & 7);
  419|       |
  420|  5.86M|  if (read_direction == 0) {
  ------------------
  |  Branch (420:7): [True: 4.65M, False: 1.21M]
  ------------------
  421|  4.65M|    bit = ixheaacd_aac_read_bit_rev(it_bit_buff);
  422|       |
  423|  4.65M|    *ptr_position += 1;
  424|  4.65M|  } else {
  425|  1.21M|    bit = ixheaacd_aac_read_bit(it_bit_buff);
  426|       |
  427|  1.21M|    *ptr_position -= 1;
  428|  1.21M|  }
  429|       |
  430|  5.86M|  return (bit);
  431|  5.86M|}
ixheaacd_decode_rvlc_code_word:
  494|  1.06M|                                     ia_rvlc_info_struct *ptr_rvlc) {
  495|  1.06M|  WORD32 i;
  496|       |
  497|  1.06M|  UWORD8 carry_bit;
  498|       |
  499|  1.06M|  UWORD8 direction = ptr_rvlc->direction;
  500|  1.06M|  UWORD16 *ptr_bit_str_idx_rvl = ptr_rvlc->ptr_rvl_bit_str_idx;
  501|       |
  502|  1.06M|  int len = 0;
  503|  1.06M|  short codeword = 0;
  504|  1.06M|  int found = 0;
  505|  1.06M|  int indx;
  506|       |
  507|  2.61M|  for (i = MAX_LEN_RVLC_CODE_WORD - 1; i >= 0; i--) {
  ------------------
  |  |   89|  1.06M|#define MAX_LEN_RVLC_CODE_WORD 9
  ------------------
  |  Branch (507:40): [True: 2.58M, False: 33.3k]
  ------------------
  508|  2.58M|    carry_bit =
  509|  2.58M|        ixheaacd_rvlc_read_bits(it_bit_buff, ptr_bit_str_idx_rvl, direction);
  510|       |
  511|  2.58M|    len++;
  512|  2.58M|    codeword = codeword << 1 | carry_bit;
  513|  2.58M|    indx = ixheaacd_rvlc_decode(codeword, len, &found);
  514|  2.58M|    if (found) {
  ------------------
  |  Branch (514:9): [True: 1.03M, False: 1.55M]
  ------------------
  515|  1.03M|      indx = indx + 7;
  516|  1.03M|      *ptr_rvlc->ptr_rvl_bit_cnt -= (MAX_LEN_RVLC_CODE_WORD - i);
  ------------------
  |  |   89|  1.03M|#define MAX_LEN_RVLC_CODE_WORD 9
  ------------------
  517|  1.03M|      return indx;
  518|  1.03M|    }
  519|  2.58M|  }
  520|       |
  521|  33.3k|  return -1;
  522|  1.06M|}
ixheaacd_rvlc_read:
  861|  56.4k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
  862|  56.4k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
  863|       |
  864|  56.4k|  WORD32 group, band;
  865|       |
  866|  56.4k|  ptr_rvlc->num_wind_grps =
  867|  56.4k|      ptr_aac_dec_channel_info->str_ics_info.num_window_groups;
  868|  56.4k|  ptr_rvlc->max_sfb_transmitted =
  869|  56.4k|      ptr_aac_dec_channel_info->str_ics_info.max_sfb;
  870|  56.4k|  ptr_rvlc->noise_used = 0;
  871|  56.4k|  ptr_rvlc->dpcm_noise_nrg = 0;
  872|  56.4k|  ptr_rvlc->dpcm_noise_last_pos = 0;
  873|  56.4k|  ptr_rvlc->rvlc_esc_len = -1;
  874|  56.4k|  ptr_rvlc->dpcm_is_last_pos = 0;
  875|       |
  876|  56.4k|  ptr_rvlc->sf_concealment = ixheaacd_read_bits_buf(it_bit_buff, 1);
  877|  56.4k|  ptr_rvlc->rev_global_gain = ixheaacd_read_bits_buf(it_bit_buff, 8);
  878|       |
  879|  56.4k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (879:7): [True: 3.25k, False: 53.2k]
  ------------------
  880|  56.4k|      EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  56.4k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  881|  3.25k|    ptr_rvlc->rvlc_sf_len = ixheaacd_read_bits_buf(it_bit_buff, 11);
  882|  53.2k|  } else {
  883|  53.2k|    ptr_rvlc->rvlc_sf_len = ixheaacd_read_bits_buf(it_bit_buff, 9);
  884|  53.2k|  }
  885|       |
  886|   127k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (886:19): [True: 70.6k, False: 56.4k]
  ------------------
  887|   553k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (887:20): [True: 509k, False: 43.4k]
  ------------------
  888|   509k|      if (ptr_aac_dec_channel_info->ptr_code_book[16 * group + band] ==
  ------------------
  |  Branch (888:11): [True: 27.1k, False: 482k]
  ------------------
  889|   509k|          NOISE_HCB) {
  ------------------
  |  |   38|   509k|#define NOISE_HCB 13
  ------------------
  890|  27.1k|        ptr_rvlc->noise_used = 1;
  891|  27.1k|        break;
  892|  27.1k|      }
  893|   509k|    }
  894|  70.6k|  }
  895|       |
  896|  56.4k|  if (ptr_rvlc->noise_used)
  ------------------
  |  Branch (896:7): [True: 27.1k, False: 29.2k]
  ------------------
  897|  27.1k|    ptr_rvlc->dpcm_noise_nrg = ixheaacd_read_bits_buf(it_bit_buff, 9);
  898|       |
  899|  56.4k|  ptr_rvlc->sf_esc_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  900|       |
  901|  56.4k|  if (ptr_rvlc->sf_esc_present) {
  ------------------
  |  Branch (901:7): [True: 26.5k, False: 29.8k]
  ------------------
  902|  26.5k|    ptr_rvlc->rvlc_esc_len = ixheaacd_read_bits_buf(it_bit_buff, 8);
  903|  26.5k|  }
  904|       |
  905|  56.4k|  if (ptr_rvlc->noise_used) {
  ------------------
  |  Branch (905:7): [True: 27.1k, False: 29.2k]
  ------------------
  906|  27.1k|    ptr_rvlc->dpcm_noise_last_pos = ixheaacd_read_bits_buf(it_bit_buff, 9);
  907|  27.1k|    ptr_rvlc->rvlc_sf_len -= 9;
  908|  27.1k|  }
  909|       |
  910|  56.4k|  ptr_rvlc->rvlc_sf_fwd_len = ptr_rvlc->rvlc_sf_len;
  911|  56.4k|  ptr_rvlc->rvlc_sf_bwd_len = ptr_rvlc->rvlc_sf_len;
  912|  56.4k|}
ixheaacd_hcr_read:
  916|  45.8k|                       WORD32 ele_type) {
  917|  45.8k|  WORD16 len_reordered_spec_data;
  918|  45.8k|  WORD8 len_longest_code_word;
  919|       |
  920|  45.8k|  ptr_aac_dec_channel_info->reorder_spect_data_len = 0;
  921|  45.8k|  ptr_aac_dec_channel_info->longest_cw_len = 0;
  922|       |
  923|  45.8k|  len_reordered_spec_data = ixheaacd_read_bits_buf(it_bit_buff, 14);
  924|  45.8k|  if (ele_type == ID_CPE) {
  ------------------
  |  Branch (924:7): [True: 161, False: 45.7k]
  ------------------
  925|    161|    if ((len_reordered_spec_data >= 0) && (len_reordered_spec_data <= 12288)) {
  ------------------
  |  Branch (925:9): [True: 161, False: 0]
  |  Branch (925:43): [True: 146, False: 15]
  ------------------
  926|    146|      ptr_aac_dec_channel_info->reorder_spect_data_len =
  927|    146|          len_reordered_spec_data;
  928|    146|    } 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|  45.7k|  } else if (ele_type == ID_SCE || ele_type == ID_LFE || ele_type == ID_CCE) {
  ------------------
  |  Branch (933:14): [True: 45.7k, False: 0]
  |  Branch (933:36): [True: 0, False: 0]
  |  Branch (933:58): [True: 0, False: 0]
  ------------------
  934|  45.7k|    if ((len_reordered_spec_data >= 0) && (len_reordered_spec_data <= 6144)) {
  ------------------
  |  Branch (934:9): [True: 45.7k, False: 0]
  |  Branch (934:43): [True: 41.3k, False: 4.34k]
  ------------------
  935|  41.3k|      ptr_aac_dec_channel_info->reorder_spect_data_len =
  936|  41.3k|          len_reordered_spec_data;
  937|  41.3k|    } else {
  938|  4.34k|      if (len_reordered_spec_data > 6144) {
  ------------------
  |  Branch (938:11): [True: 4.34k, False: 0]
  ------------------
  939|  4.34k|        ptr_aac_dec_channel_info->reorder_spect_data_len = 6144;
  940|  4.34k|      }
  941|  4.34k|    }
  942|  45.7k|  }
  943|       |
  944|  45.8k|  len_longest_code_word = ixheaacd_read_bits_buf(it_bit_buff, 6);
  945|  45.8k|  if ((len_longest_code_word >= 0) && (len_longest_code_word <= 49)) {
  ------------------
  |  Branch (945:7): [True: 45.8k, False: 3]
  |  Branch (945:39): [True: 37.1k, False: 8.75k]
  ------------------
  946|  37.1k|    ptr_aac_dec_channel_info->longest_cw_len = len_longest_code_word;
  947|  37.1k|  } else {
  948|  8.75k|    if (len_longest_code_word > 49) {
  ------------------
  |  Branch (948:9): [True: 8.75k, False: 3]
  ------------------
  949|  8.75k|      ptr_aac_dec_channel_info->longest_cw_len = 49;
  950|  8.75k|    }
  951|  8.75k|  }
  952|  45.8k|}
ixheaacd_bi_dir_est_lower_scf_cur_frame:
 1258|  14.7k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
 1259|  14.7k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
 1260|  14.7k|  WORD32 band, bnds, start_band, end_band, group;
 1261|  14.7k|  WORD32 conceal_min, conceal_max;
 1262|  14.7k|  WORD32 conceal_group_min, conceal_group_max;
 1263|  14.7k|  WORD32 max_scf_bands;
 1264|       |
 1265|  14.7k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (1265:7): [True: 54, False: 14.7k]
  ------------------
 1266|  14.7k|      EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  14.7k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
 1267|     54|    max_scf_bands = 16;
 1268|  14.7k|  } else {
 1269|  14.7k|    max_scf_bands = 64;
 1270|  14.7k|  }
 1271|       |
 1272|  14.7k|  if (ptr_rvlc->conceal_min == CONCEAL_MIN_INIT) ptr_rvlc->conceal_min = 0;
  ------------------
  |  |   93|  14.7k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1272:7): [True: 9.48k, False: 5.29k]
  ------------------
 1273|       |
 1274|  14.7k|  if (ptr_rvlc->conceal_max == CONCEAL_MAX_INIT)
  ------------------
  |  |   92|  14.7k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1274:7): [True: 2.27k, False: 12.5k]
  ------------------
 1275|  2.27k|    ptr_rvlc->conceal_max =
 1276|  2.27k|        (ptr_rvlc->num_wind_grps - 1) * 16 + ptr_rvlc->max_sfb_transmitted - 1;
 1277|       |
 1278|  14.7k|  conceal_min = ptr_rvlc->conceal_min % max_scf_bands;
 1279|  14.7k|  conceal_group_min = ptr_rvlc->conceal_min / max_scf_bands;
 1280|  14.7k|  conceal_max = ptr_rvlc->conceal_max % max_scf_bands;
 1281|  14.7k|  conceal_group_max = ptr_rvlc->conceal_max / max_scf_bands;
 1282|       |
 1283|  14.7k|  if (ptr_rvlc->conceal_min == ptr_rvlc->conceal_max) {
  ------------------
  |  Branch (1283:7): [True: 9.17k, False: 5.60k]
  ------------------
 1284|  9.17k|    WORD32 ref_fwd = 0, ref_nrg_fwd = 0, ref_scf_fwd = 0;
 1285|  9.17k|    WORD32 ref_bwd = 0, ref_nrg_bwd = 0, ref_scf_bwd = 0;
 1286|       |
 1287|  9.17k|    bnds = ptr_rvlc->conceal_min;
 1288|  9.17k|    ixheaacd_calc_ref_val_fwd(ptr_rvlc, ptr_aac_dec_channel_info, &ref_fwd,
 1289|  9.17k|                              &ref_nrg_fwd, &ref_scf_fwd);
 1290|  9.17k|    ixheaacd_calc_ref_val_bwd(ptr_rvlc, ptr_aac_dec_channel_info, &ref_bwd,
 1291|  9.17k|                              &ref_nrg_bwd, &ref_scf_bwd);
 1292|       |
 1293|  9.17k|    switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1294|  1.76k|      case ZERO_HCB:
  ------------------
  |  |   33|  1.76k|#define ZERO_HCB 0
  ------------------
  |  Branch (1294:7): [True: 1.76k, False: 7.41k]
  ------------------
 1295|  1.76k|        break;
 1296|    388|      case INTENSITY_HCB:
  ------------------
  |  |   40|    388|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1296:7): [True: 388, False: 8.78k]
  ------------------
 1297|  3.04k|      case INTENSITY_HCB2:
  ------------------
  |  |   39|  3.04k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1297:7): [True: 2.66k, False: 6.51k]
  ------------------
 1298|  3.04k|        if (ref_fwd < ref_bwd)
  ------------------
  |  Branch (1298:13): [True: 1.20k, False: 1.84k]
  ------------------
 1299|  1.20k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_fwd;
 1300|  1.84k|        else
 1301|  1.84k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_bwd;
 1302|  3.04k|        break;
 1303|  2.19k|      case NOISE_HCB:
  ------------------
  |  |   38|  2.19k|#define NOISE_HCB 13
  ------------------
  |  Branch (1303:7): [True: 2.19k, False: 6.98k]
  ------------------
 1304|  2.19k|        if (ref_nrg_fwd < ref_nrg_bwd)
  ------------------
  |  Branch (1304:13): [True: 870, False: 1.32k]
  ------------------
 1305|    870|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_nrg_fwd;
 1306|  1.32k|        else
 1307|  1.32k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_nrg_bwd;
 1308|  2.19k|        break;
 1309|  2.17k|      default:
  ------------------
  |  Branch (1309:7): [True: 2.17k, False: 7.00k]
  ------------------
 1310|  2.17k|        if (ref_scf_fwd < ref_scf_bwd)
  ------------------
  |  Branch (1310:13): [True: 1.32k, False: 851]
  ------------------
 1311|  1.32k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_scf_fwd;
 1312|    851|        else
 1313|    851|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_scf_bwd;
 1314|  2.17k|        break;
 1315|  9.17k|    }
 1316|  9.17k|  } else {
 1317|  5.60k|    ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[ptr_rvlc->conceal_max] =
 1318|  5.60k|        ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[ptr_rvlc->conceal_max];
 1319|  5.60k|    ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[ptr_rvlc->conceal_min] =
 1320|  5.60k|        ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[ptr_rvlc->conceal_min];
 1321|       |
 1322|  5.60k|    start_band = conceal_min;
 1323|  5.60k|    if (conceal_group_min == conceal_group_max)
  ------------------
  |  Branch (1323:9): [True: 5.60k, False: 0]
  ------------------
 1324|  5.60k|      end_band = conceal_max;
 1325|      0|    else
 1326|      0|      end_band = ptr_rvlc->max_sfb_transmitted - 1;
 1327|       |
 1328|  11.2k|    for (group = conceal_group_min; group <= conceal_group_max; group++) {
  ------------------
  |  Branch (1328:37): [True: 5.60k, False: 5.60k]
  ------------------
 1329|   102k|      for (band = start_band; band <= end_band; band++) {
  ------------------
  |  Branch (1329:31): [True: 96.4k, False: 5.60k]
  ------------------
 1330|  96.4k|        bnds = 16 * group + band;
 1331|  96.4k|        if (ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds] <
  ------------------
  |  Branch (1331:13): [True: 25.8k, False: 70.5k]
  ------------------
 1332|  96.4k|            ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds])
 1333|  25.8k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1334|  25.8k|              ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1335|  70.5k|        else
 1336|  70.5k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1337|  70.5k|              ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1338|  96.4k|      }
 1339|  5.60k|      start_band = 0;
 1340|  5.60k|      if ((group + 1) == conceal_group_max) end_band = conceal_max;
  ------------------
  |  Branch (1340:11): [True: 0, False: 5.60k]
  ------------------
 1341|  5.60k|    }
 1342|  5.60k|  }
 1343|       |
 1344|  14.7k|  if (conceal_group_min == 0)
  ------------------
  |  Branch (1344:7): [True: 14.7k, False: 0]
  ------------------
 1345|  14.7k|    end_band = conceal_min;
 1346|      0|  else
 1347|      0|    end_band = ptr_rvlc->max_sfb_transmitted;
 1348|  29.5k|  for (group = 0; group <= conceal_group_min; group++) {
  ------------------
  |  Branch (1348:19): [True: 14.7k, False: 14.7k]
  ------------------
 1349|  77.1k|    for (band = 0; band < end_band; band++) {
  ------------------
  |  Branch (1349:20): [True: 62.3k, False: 14.7k]
  ------------------
 1350|  62.3k|      bnds = 16 * group + band;
 1351|  62.3k|      ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1352|  62.3k|          ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1353|  62.3k|    }
 1354|  14.7k|    if ((group + 1) == conceal_group_min) end_band = conceal_min;
  ------------------
  |  Branch (1354:9): [True: 0, False: 14.7k]
  ------------------
 1355|  14.7k|  }
 1356|       |
 1357|  14.7k|  start_band = conceal_max + 1;
 1358|  29.5k|  for (group = conceal_group_max; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1358:35): [True: 14.7k, False: 14.7k]
  ------------------
 1359|   147k|    for (band = start_band; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1359:29): [True: 132k, False: 14.7k]
  ------------------
 1360|   132k|      bnds = 16 * group + band;
 1361|   132k|      ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1362|   132k|          ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1363|   132k|    }
 1364|  14.7k|    start_band = 0;
 1365|  14.7k|  }
 1366|  14.7k|}
ixheaacd_statistical_estimation:
 1369|  5.73k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
 1370|  5.73k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
 1371|  5.73k|  WORD32 band, bnds, group;
 1372|  5.73k|  WORD32 sum_fwd, sum_bwd;
 1373|  5.73k|  WORD32 sum_nrg_fwd, sum_nrg_bwd;
 1374|  5.73k|  WORD32 sum_scf_fwd, sum_scf_bwd;
 1375|  5.73k|  WORD32 use_fwd, use_nrg_fwd, use_scf_fwd;
 1376|       |
 1377|  5.73k|  sum_fwd = sum_bwd = sum_nrg_fwd = sum_nrg_bwd = sum_scf_fwd = sum_scf_bwd = 0;
 1378|  5.73k|  use_fwd = use_nrg_fwd = use_scf_fwd = 0;
 1379|       |
 1380|  11.4k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1380:19): [True: 5.73k, False: 5.73k]
  ------------------
 1381|   153k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1381:20): [True: 147k, False: 5.73k]
  ------------------
 1382|   147k|      bnds = 16 * group + band;
 1383|   147k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1384|  21.6k|        case ZERO_HCB:
  ------------------
  |  |   33|  21.6k|#define ZERO_HCB 0
  ------------------
  |  Branch (1384:9): [True: 21.6k, False: 125k]
  ------------------
 1385|  21.6k|          break;
 1386|       |
 1387|  51.5k|        case INTENSITY_HCB:
  ------------------
  |  |   40|  51.5k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1387:9): [True: 51.5k, False: 95.7k]
  ------------------
 1388|  54.9k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  54.9k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1388:9): [True: 3.37k, False: 143k]
  ------------------
 1389|  54.9k|          sum_fwd += ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1390|  54.9k|          sum_bwd += ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1391|  54.9k|          break;
 1392|       |
 1393|  59.9k|        case NOISE_HCB:
  ------------------
  |  |   38|  59.9k|#define NOISE_HCB 13
  ------------------
  |  Branch (1393:9): [True: 59.9k, False: 87.4k]
  ------------------
 1394|  59.9k|          sum_nrg_fwd += ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1395|  59.9k|          sum_nrg_bwd += ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1396|  59.9k|          break;
 1397|       |
 1398|  10.7k|        default:
  ------------------
  |  Branch (1398:9): [True: 10.7k, False: 136k]
  ------------------
 1399|  10.7k|          sum_scf_fwd += ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1400|  10.7k|          sum_scf_bwd += ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1401|  10.7k|          break;
 1402|   147k|      }
 1403|   147k|    }
 1404|  5.73k|  }
 1405|       |
 1406|  5.73k|  if (sum_fwd < sum_bwd) use_fwd = 1;
  ------------------
  |  Branch (1406:7): [True: 1.79k, False: 3.93k]
  ------------------
 1407|       |
 1408|  5.73k|  if (sum_nrg_fwd < sum_nrg_bwd) use_nrg_fwd = 1;
  ------------------
  |  Branch (1408:7): [True: 2.51k, False: 3.21k]
  ------------------
 1409|       |
 1410|  5.73k|  if (sum_scf_fwd < sum_scf_bwd) use_scf_fwd = 1;
  ------------------
  |  Branch (1410:7): [True: 281, False: 5.45k]
  ------------------
 1411|       |
 1412|  11.4k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1412:19): [True: 5.73k, False: 5.73k]
  ------------------
 1413|   153k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1413:20): [True: 147k, False: 5.73k]
  ------------------
 1414|   147k|      bnds = 16 * group + band;
 1415|   147k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1416|  21.6k|        case ZERO_HCB:
  ------------------
  |  |   33|  21.6k|#define ZERO_HCB 0
  ------------------
  |  Branch (1416:9): [True: 21.6k, False: 125k]
  ------------------
 1417|  21.6k|          break;
 1418|       |
 1419|  51.5k|        case INTENSITY_HCB:
  ------------------
  |  |   40|  51.5k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1419:9): [True: 51.5k, False: 95.7k]
  ------------------
 1420|  54.9k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  54.9k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1420:9): [True: 3.37k, False: 143k]
  ------------------
 1421|  54.9k|          if (use_fwd)
  ------------------
  |  Branch (1421:15): [True: 25.9k, False: 29.0k]
  ------------------
 1422|  25.9k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1423|  25.9k|                ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1424|  29.0k|          else
 1425|  29.0k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1426|  29.0k|                ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1427|  54.9k|          break;
 1428|       |
 1429|  59.9k|        case NOISE_HCB:
  ------------------
  |  |   38|  59.9k|#define NOISE_HCB 13
  ------------------
  |  Branch (1429:9): [True: 59.9k, False: 87.4k]
  ------------------
 1430|  59.9k|          if (use_nrg_fwd)
  ------------------
  |  Branch (1430:15): [True: 16.3k, False: 43.5k]
  ------------------
 1431|  16.3k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1432|  16.3k|                ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1433|  43.5k|          else
 1434|  43.5k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1435|  43.5k|                ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1436|  59.9k|          break;
 1437|       |
 1438|  10.7k|        default:
  ------------------
  |  Branch (1438:9): [True: 10.7k, False: 136k]
  ------------------
 1439|  10.7k|          if (use_scf_fwd)
  ------------------
  |  Branch (1439:15): [True: 776, False: 10.0k]
  ------------------
 1440|    776|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1441|    776|                ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1442|  10.0k|          else
 1443|  10.0k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1444|  10.0k|                ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1445|  10.7k|          break;
 1446|   147k|      }
 1447|   147k|    }
 1448|  5.73k|  }
 1449|  5.73k|}
ixheaacd_rvlc_dec:
 1731|  56.3k|    ia_bit_buf_struct *it_bit_buff) {
 1732|  56.3k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
 1733|  56.3k|  ia_bit_buf_struct saved_it_bit_buff;
 1734|  56.3k|  IA_ERRORCODE error_code = 0;
 1735|  56.3k|  error_code =
 1736|  56.3k|      ixheaacd_rvlc_init(ptr_rvlc, ptr_aac_dec_channel_info, it_bit_buff);
 1737|  56.3k|  if (error_code) return error_code;
  ------------------
  |  Branch (1737:7): [True: 78, False: 56.2k]
  ------------------
 1738|       |
 1739|  56.2k|  ixheaacd_bitbuf_checkpoint(*it_bit_buff, saved_it_bit_buff);
  ------------------
  |  |  103|  56.2k|  (saved_bit_buf) = (it_bit_buf)
  ------------------
 1740|  56.2k|  if (ptr_rvlc->sf_esc_present)
  ------------------
  |  Branch (1740:7): [True: 26.4k, False: 29.8k]
  ------------------
 1741|  26.4k|    ixheaacd_rvlc_decode_escape(
 1742|  26.4k|        ptr_rvlc, ptr_aac_dec_channel_info->rvlc_scf_esc_arr, it_bit_buff);
 1743|       |
 1744|  56.2k|  ixheaacd_rvlc_decode_forward(ptr_rvlc, ptr_aac_dec_channel_info, it_bit_buff);
 1745|  56.2k|  ixheaacd_rvlc_decode_backward(ptr_rvlc, ptr_aac_dec_channel_info,
 1746|  56.2k|                                it_bit_buff);
 1747|  56.2k|  ixheaacd_rvlc_final_error_detection(ptr_aac_dec_channel_info,
 1748|  56.2k|                                      ptr_aac_dec_static_channel_info);
 1749|       |
 1750|  56.2k|  ptr_aac_dec_channel_info->rvlc_intensity_used = ptr_rvlc->intensity_used;
 1751|  56.2k|  ptr_aac_dec_channel_info->str_pns_info.pns_active = ptr_rvlc->noise_used;
 1752|       |
 1753|  56.2k|  ixheaacd_bitbuf_restore(*it_bit_buff, saved_it_bit_buff);
  ------------------
  |  |  105|  56.2k|  (it_bit_buf) = (saved_bit_buf)
  ------------------
 1754|  56.2k|  return error_code;
 1755|  56.3k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode:
  107|  2.58M|static WORD32 ixheaacd_rvlc_decode(WORD16 cw, WORD32 len, WORD32 *found) {
  108|  2.58M|  WORD16 indx = 0;
  109|  2.58M|  *found = 0;
  110|  2.58M|  switch (len) {
  111|  1.06M|    case 1:
  ------------------
  |  Branch (111:5): [True: 1.06M, False: 1.52M]
  ------------------
  112|  1.06M|      if (cw == 0)
  ------------------
  |  Branch (112:11): [True: 649k, False: 414k]
  ------------------
  113|   649k|        indx = 0;
  114|   414k|      else
  115|   414k|        return 3;
  116|   649k|      break;
  117|   649k|    case 3:
  ------------------
  |  Branch (117:5): [True: 414k, False: 2.17M]
  ------------------
  118|   414k|      switch (cw) {
  119|  78.4k|        case 5:
  ------------------
  |  Branch (119:9): [True: 78.4k, False: 335k]
  ------------------
  120|  78.4k|          indx = -1;
  121|  78.4k|          break;
  122|   156k|        case 7:
  ------------------
  |  Branch (122:9): [True: 156k, False: 257k]
  ------------------
  123|   156k|          indx = 1;
  124|   156k|          break;
  125|   179k|        default:
  ------------------
  |  Branch (125:9): [True: 179k, False: 234k]
  ------------------
  126|   179k|          return 4;
  127|   414k|      }
  128|   234k|      break;
  129|   234k|    case 4:
  ------------------
  |  Branch (129:5): [True: 179k, False: 2.40M]
  ------------------
  130|   179k|      if (cw == 9)
  ------------------
  |  Branch (130:11): [True: 16.4k, False: 162k]
  ------------------
  131|  16.4k|        indx = -2;
  132|   162k|      else
  133|   162k|        return 5;
  134|  16.4k|      break;
  135|   162k|    case 5:
  ------------------
  |  Branch (135:5): [True: 162k, False: 2.42M]
  ------------------
  136|   162k|      switch (cw) {
  137|  24.9k|        case 17:
  ------------------
  |  Branch (137:9): [True: 24.9k, False: 137k]
  ------------------
  138|  24.9k|          indx = -3;
  139|  24.9k|          break;
  140|  18.6k|        case 27:
  ------------------
  |  Branch (140:9): [True: 18.6k, False: 144k]
  ------------------
  141|  18.6k|          indx = 2;
  142|  18.6k|          break;
  143|   119k|        default:
  ------------------
  |  Branch (143:9): [True: 119k, False: 43.6k]
  ------------------
  144|   119k|          return 6;
  145|   162k|      }
  146|  43.6k|      break;
  147|   119k|    case 6:
  ------------------
  |  Branch (147:5): [True: 119k, False: 2.46M]
  ------------------
  148|   119k|      switch (cw) {
  149|  5.92k|        case 33:
  ------------------
  |  Branch (149:9): [True: 5.92k, False: 113k]
  ------------------
  150|  5.92k|          indx = -4;
  151|  5.92k|          break;
  152|  2.72k|        case 51:
  ------------------
  |  Branch (152:9): [True: 2.72k, False: 116k]
  ------------------
  153|  2.72k|          indx = 3;
  154|  2.72k|          break;
  155|   110k|        default:
  ------------------
  |  Branch (155:9): [True: 110k, False: 8.65k]
  ------------------
  156|   110k|          return 7;
  157|   119k|      }
  158|  8.65k|      break;
  159|   110k|    case 7:
  ------------------
  |  Branch (159:5): [True: 110k, False: 2.47M]
  ------------------
  160|   110k|      switch (cw) {
  161|  14.5k|        case 65:
  ------------------
  |  Branch (161:9): [True: 14.5k, False: 96.1k]
  ------------------
  162|  14.5k|          indx = -7;
  163|  14.5k|          break;
  164|  19.5k|        case 107:
  ------------------
  |  Branch (164:9): [True: 19.5k, False: 91.0k]
  ------------------
  165|  19.5k|          indx = 4;
  166|  19.5k|          break;
  167|  15.0k|        case 99:
  ------------------
  |  Branch (167:9): [True: 15.0k, False: 95.6k]
  ------------------
  168|  15.0k|          indx = 7;
  169|  15.0k|          break;
  170|  61.5k|        default:
  ------------------
  |  Branch (170:9): [True: 61.5k, False: 49.1k]
  ------------------
  171|  61.5k|          return 8;
  172|   110k|      }
  173|  49.1k|      break;
  174|  61.5k|    case 8:
  ------------------
  |  Branch (174:5): [True: 61.5k, False: 2.52M]
  ------------------
  175|  61.5k|      switch (cw) {
  176|  1.37k|        case 129:
  ------------------
  |  Branch (176:9): [True: 1.37k, False: 60.1k]
  ------------------
  177|  1.37k|          indx = -5;
  178|  1.37k|          break;
  179|  1.33k|        case 195:
  ------------------
  |  Branch (179:9): [True: 1.33k, False: 60.2k]
  ------------------
  180|  1.33k|          indx = 5;
  181|  1.33k|          break;
  182|  58.8k|        default:
  ------------------
  |  Branch (182:9): [True: 58.8k, False: 2.71k]
  ------------------
  183|  58.8k|          return 9;
  184|  61.5k|      }
  185|  2.71k|      break;
  186|  58.8k|    case 9:
  ------------------
  |  Branch (186:5): [True: 58.8k, False: 2.52M]
  ------------------
  187|  58.8k|      switch (cw) {
  188|  9.53k|        case 257:
  ------------------
  |  Branch (188:9): [True: 9.53k, False: 49.3k]
  ------------------
  189|  9.53k|          indx = -6;
  190|  9.53k|          break;
  191|  15.9k|        case 427:
  ------------------
  |  Branch (191:9): [True: 15.9k, False: 42.9k]
  ------------------
  192|  15.9k|          indx = 6;
  193|  15.9k|          break;
  194|  33.3k|        default:
  ------------------
  |  Branch (194:9): [True: 33.3k, False: 25.4k]
  ------------------
  195|  33.3k|          return -1;
  196|  58.8k|      }
  197|  25.4k|      break;
  198|   414k|    default:
  ------------------
  |  Branch (198:5): [True: 414k, False: 2.17M]
  ------------------
  199|   414k|      return -1;
  200|  2.58M|  }
  201|  1.03M|  *found = 1;
  202|  1.03M|  return indx;
  203|  2.58M|}
ixheaacd_rev_vlc.c:ixheaacd_calc_ref_val_fwd:
 1147|  9.17k|    WORD32 *ref_nrg_fwd, WORD32 *ref_scf_fwd) {
 1148|  9.17k|  WORD32 band, bnds, group, start_band;
 1149|  9.17k|  WORD32 id_is, id_nrg, id_scf;
 1150|  9.17k|  WORD32 conceal_min, conceal_group_min;
 1151|  9.17k|  WORD32 max_scf_bands;
 1152|       |
 1153|  9.17k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (1153:7): [True: 54, False: 9.12k]
  ------------------
 1154|  9.17k|      EIGHT_SHORT_SEQUENCE)
  ------------------
  |  |  102|  9.17k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
 1155|     54|    max_scf_bands = 16;
 1156|  9.12k|  else
 1157|  9.12k|    max_scf_bands = 64;
 1158|       |
 1159|  9.17k|  conceal_min = ptr_rvlc->conceal_min % max_scf_bands;
 1160|  9.17k|  conceal_group_min = ptr_rvlc->conceal_min / max_scf_bands;
 1161|       |
 1162|  9.17k|  id_is = id_nrg = id_scf = 1;
 1163|       |
 1164|  9.17k|  *ref_nrg_fwd = ptr_aac_dec_channel_info->global_gain - 90 - 256;
 1165|  9.17k|  *ref_scf_fwd = ptr_aac_dec_channel_info->global_gain;
 1166|       |
 1167|  9.17k|  start_band = conceal_min - 1;
 1168|  18.3k|  for (group = conceal_group_min; group >= 0; group--) {
  ------------------
  |  Branch (1168:35): [True: 9.17k, False: 9.17k]
  ------------------
 1169|  71.5k|    for (band = start_band; band >= 0; band--) {
  ------------------
  |  Branch (1169:29): [True: 62.3k, False: 9.17k]
  ------------------
 1170|  62.3k|      bnds = 16 * group + band;
 1171|  62.3k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1172|  2.11k|        case ZERO_HCB:
  ------------------
  |  |   33|  2.11k|#define ZERO_HCB 0
  ------------------
  |  Branch (1172:9): [True: 2.11k, False: 60.2k]
  ------------------
 1173|  2.11k|          break;
 1174|  17.6k|        case INTENSITY_HCB:
  ------------------
  |  |   40|  17.6k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1174:9): [True: 17.6k, False: 44.7k]
  ------------------
 1175|  36.2k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  36.2k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1175:9): [True: 18.6k, False: 43.7k]
  ------------------
 1176|  36.2k|          if (id_is) {
  ------------------
  |  Branch (1176:15): [True: 2.84k, False: 33.3k]
  ------------------
 1177|  2.84k|            *ref_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1178|  2.84k|            id_is = 0;
 1179|  2.84k|          }
 1180|  36.2k|          break;
 1181|  20.6k|        case NOISE_HCB:
  ------------------
  |  |   38|  20.6k|#define NOISE_HCB 13
  ------------------
  |  Branch (1181:9): [True: 20.6k, False: 41.6k]
  ------------------
 1182|  20.6k|          if (id_nrg) {
  ------------------
  |  Branch (1182:15): [True: 2.56k, False: 18.1k]
  ------------------
 1183|  2.56k|            *ref_nrg_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1184|  2.56k|            id_nrg = 0;
 1185|  2.56k|          }
 1186|  20.6k|          break;
 1187|  3.33k|        default:
  ------------------
  |  Branch (1187:9): [True: 3.33k, False: 59.0k]
  ------------------
 1188|  3.33k|          if (id_scf) {
  ------------------
  |  Branch (1188:15): [True: 1.20k, False: 2.13k]
  ------------------
 1189|  1.20k|            *ref_scf_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1190|  1.20k|            id_scf = 0;
 1191|  1.20k|          }
 1192|  3.33k|          break;
 1193|  62.3k|      }
 1194|  62.3k|    }
 1195|  9.17k|    start_band = ptr_rvlc->max_sfb_transmitted - 1;
 1196|  9.17k|  }
 1197|  9.17k|}
ixheaacd_rev_vlc.c:ixheaacd_calc_ref_val_bwd:
 1202|  9.17k|    WORD32 *ref_nrg_bwd, WORD32 *ref_scf_bwd) {
 1203|  9.17k|  WORD32 band, bnds, group, start_band;
 1204|  9.17k|  WORD32 id_is, id_nrg, id_scf;
 1205|  9.17k|  WORD32 conceal_max, conceal_group_max;
 1206|  9.17k|  WORD32 max_scf_bands;
 1207|       |
 1208|  9.17k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (1208:7): [True: 54, False: 9.12k]
  ------------------
 1209|  9.17k|      EIGHT_SHORT_SEQUENCE)
  ------------------
  |  |  102|  9.17k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
 1210|     54|    max_scf_bands = 16;
 1211|  9.12k|  else
 1212|  9.12k|    max_scf_bands = 64;
 1213|       |
 1214|  9.17k|  conceal_max = ptr_rvlc->conceal_max % max_scf_bands;
 1215|  9.17k|  conceal_group_max = ptr_rvlc->conceal_max / max_scf_bands;
 1216|       |
 1217|  9.17k|  id_is = id_nrg = id_scf = 1;
 1218|       |
 1219|  9.17k|  *ref_bwd = ptr_rvlc->dpcm_is_last_pos;
 1220|  9.17k|  *ref_nrg_bwd = ptr_rvlc->rev_global_gain + ptr_rvlc->dpcm_noise_last_pos -
 1221|  9.17k|                 90 - 256 + ptr_rvlc->dpcm_noise_nrg;
 1222|  9.17k|  *ref_scf_bwd = ptr_rvlc->rev_global_gain;
 1223|       |
 1224|  9.17k|  start_band = conceal_max + 1;
 1225|       |
 1226|  18.3k|  for (group = conceal_group_max; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1226:35): [True: 9.17k, False: 9.17k]
  ------------------
 1227|  81.0k|    for (band = start_band; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1227:29): [True: 71.8k, False: 9.17k]
  ------------------
 1228|  71.8k|      bnds = 16 * group + band;
 1229|  71.8k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1230|    333|        case ZERO_HCB:
  ------------------
  |  |   33|    333|#define ZERO_HCB 0
  ------------------
  |  Branch (1230:9): [True: 333, False: 71.5k]
  ------------------
 1231|    333|          break;
 1232|  7.91k|        case INTENSITY_HCB:
  ------------------
  |  |   40|  7.91k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1232:9): [True: 7.91k, False: 63.9k]
  ------------------
 1233|  57.4k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  57.4k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1233:9): [True: 49.5k, False: 22.2k]
  ------------------
 1234|  57.4k|          if (id_is) {
  ------------------
  |  Branch (1234:15): [True: 3.87k, False: 53.5k]
  ------------------
 1235|  3.87k|            *ref_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1236|  3.87k|            id_is = 0;
 1237|  3.87k|          }
 1238|  57.4k|          break;
 1239|  12.9k|        case NOISE_HCB:
  ------------------
  |  |   38|  12.9k|#define NOISE_HCB 13
  ------------------
  |  Branch (1239:9): [True: 12.9k, False: 58.8k]
  ------------------
 1240|  12.9k|          if (id_nrg) {
  ------------------
  |  Branch (1240:15): [True: 1.11k, False: 11.8k]
  ------------------
 1241|  1.11k|            *ref_nrg_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1242|  1.11k|            id_nrg = 0;
 1243|  1.11k|          }
 1244|  12.9k|          break;
 1245|  1.09k|        default:
  ------------------
  |  Branch (1245:9): [True: 1.09k, False: 70.7k]
  ------------------
 1246|  1.09k|          if (id_scf) {
  ------------------
  |  Branch (1246:15): [True: 306, False: 784]
  ------------------
 1247|    306|            *ref_scf_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1248|    306|            id_scf = 0;
 1249|    306|          }
 1250|  1.09k|          break;
 1251|  71.8k|      }
 1252|  71.8k|    }
 1253|  9.17k|    start_band = 0;
 1254|  9.17k|  }
 1255|  9.17k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_init:
  957|  56.3k|    ia_bit_buf_struct *it_bit_buff) {
  958|  56.3k|  WORD16 *ptr_scf_esc = ptr_aac_dec_channel_info->rvlc_scf_esc_arr;
  959|  56.3k|  WORD16 *ptr_scf_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr;
  960|  56.3k|  WORD16 *ptr_scf_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr;
  961|  56.3k|  WORD16 *ptr_scale_factor = ptr_aac_dec_channel_info->ptr_scale_factor;
  962|  56.3k|  WORD32 bnds;
  963|       |
  964|  56.3k|  ptr_aac_dec_channel_info->rvlc_intensity_used = 0;
  965|       |
  966|  56.3k|  ptr_rvlc->num_esc_words_decoded = 0;
  967|  56.3k|  ptr_rvlc->num_fwd_esc_words_decoded = 0;
  968|  56.3k|  ptr_rvlc->num_bwd_esc_words_decoded = 0;
  969|       |
  970|  56.3k|  ptr_rvlc->intensity_used = 0;
  971|  56.3k|  ptr_rvlc->rvlc_err_log = 0;
  972|       |
  973|  56.3k|  ptr_rvlc->conceal_max = CONCEAL_MAX_INIT;
  ------------------
  |  |   92|  56.3k|#define CONCEAL_MAX_INIT 1311
  ------------------
  974|  56.3k|  ptr_rvlc->conceal_min = CONCEAL_MIN_INIT;
  ------------------
  |  |   93|  56.3k|#define CONCEAL_MIN_INIT -1311
  ------------------
  975|       |
  976|  56.3k|  ptr_rvlc->conceal_max_esc = CONCEAL_MAX_INIT;
  ------------------
  |  |   92|  56.3k|#define CONCEAL_MAX_INIT 1311
  ------------------
  977|  56.3k|  ptr_rvlc->conceal_min_esc = CONCEAL_MIN_INIT;
  ------------------
  |  |   93|  56.3k|#define CONCEAL_MIN_INIT -1311
  ------------------
  978|       |
  979|  7.27M|  for (bnds = 0; bnds < RVLC_MAX_SFB; bnds++) {
  ------------------
  |  |   95|  7.27M|#define RVLC_MAX_SFB ((8) * (16))
  ------------------
  |  Branch (979:18): [True: 7.21M, False: 56.3k]
  ------------------
  980|  7.21M|    ptr_scf_fwd[bnds] = 0;
  981|  7.21M|    ptr_scf_bwd[bnds] = 0;
  982|  7.21M|    ptr_scf_esc[bnds] = 0;
  983|  7.21M|    ptr_scale_factor[bnds] = 0;
  984|  7.21M|  }
  985|       |
  986|  56.3k|  ptr_rvlc->rvl_fwd_bit_str_idx = it_bit_buff->size - it_bit_buff->cnt_bits;
  987|  56.3k|  ptr_rvlc->rvl_bwd_bit_str_idx =
  988|  56.3k|      it_bit_buff->size - it_bit_buff->cnt_bits + ptr_rvlc->rvlc_sf_len - 1;
  989|       |
  990|  56.3k|  it_bit_buff->cnt_bits -= ptr_rvlc->rvlc_sf_len;
  991|  56.3k|  it_bit_buff->ptr_read_next =
  992|  56.3k|      it_bit_buff->ptr_bit_buf_base +
  993|  56.3k|      ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
  994|  56.3k|  it_bit_buff->bit_pos = ((it_bit_buff->size - it_bit_buff->cnt_bits) & 7);
  995|       |
  996|  56.3k|  if (ptr_rvlc->sf_esc_present != 0) {
  ------------------
  |  Branch (996:7): [True: 26.5k, False: 29.8k]
  ------------------
  997|  26.5k|    ptr_rvlc->esc_bit_str_idx = it_bit_buff->size - it_bit_buff->cnt_bits;
  998|       |
  999|  26.5k|    it_bit_buff->cnt_bits -= ptr_rvlc->rvlc_esc_len;
 1000|  26.5k|    it_bit_buff->ptr_read_next =
 1001|  26.5k|        it_bit_buff->ptr_bit_buf_base +
 1002|  26.5k|        ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
 1003|  26.5k|    it_bit_buff->bit_pos = ((it_bit_buff->size - it_bit_buff->cnt_bits) & 7);
 1004|  26.5k|  }
 1005|  56.3k|  if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (1005:7): [True: 78, False: 56.2k]
  ------------------
 1006|     78|    return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|     78|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1007|     78|  } else
 1008|  56.2k|    return IA_NO_ERROR;
  ------------------
  |  |   23|  56.2k|#define IA_NO_ERROR 0x00000000
  ------------------
 1009|  56.3k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_escape:
  469|  26.4k|                                        ia_bit_buf_struct *it_bit_buff) {
  470|  26.4k|  WORD8 esc_word;
  471|  26.4k|  WORD8 esc_cnt = 0;
  472|  26.4k|  WORD16 *ptr_esc_bit_cnt_sum;
  473|       |
  474|  26.4k|  ptr_esc_bit_cnt_sum = &(ptr_rvlc->rvlc_esc_len);
  475|       |
  476|  1.09M|  while (*ptr_esc_bit_cnt_sum > 0) {
  ------------------
  |  Branch (476:10): [True: 1.07M, False: 26.4k]
  ------------------
  477|  1.07M|    esc_word = ixheaacd_rvlc_decode_escape_word(ptr_rvlc, it_bit_buff);
  478|       |
  479|  1.07M|    if (esc_word >= 0) {
  ------------------
  |  Branch (479:9): [True: 1.07M, False: 0]
  ------------------
  480|  1.07M|      ptr_escape[esc_cnt] = esc_word;
  481|  1.07M|      esc_cnt++;
  482|  1.07M|    } 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.07M|  }
  489|       |
  490|  26.4k|  ptr_rvlc->num_esc_words_decoded = esc_cnt;
  491|  26.4k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_escape_word:
  434|  1.07M|                                              ia_bit_buf_struct *it_bit_buff) {
  435|  1.07M|  WORD32 i;
  436|       |
  437|  1.07M|  UWORD8 carry_bit;
  438|       |
  439|  1.07M|  UWORD16 *ptr_bitstream_index_esc;
  440|       |
  441|  1.07M|  int len = 0;
  442|  1.07M|  int codeword = 0;
  443|  1.07M|  int found = 0;
  444|  1.07M|  int indx;
  445|       |
  446|  1.07M|  ptr_bitstream_index_esc = &(ptr_rvlc->esc_bit_str_idx);
  447|       |
  448|  3.28M|  for (i = MAX_LEN_RVLC_ESCAPE_WORD - 1; i >= 0; i--) {
  ------------------
  |  |   90|  1.07M|#define MAX_LEN_RVLC_ESCAPE_WORD 20
  ------------------
  |  Branch (448:42): [True: 3.28M, False: 0]
  ------------------
  449|  3.28M|    carry_bit =
  450|  3.28M|        ixheaacd_rvlc_read_bits(it_bit_buff, ptr_bitstream_index_esc, FWD);
  ------------------
  |  |   86|  3.28M|#define FWD 0
  ------------------
  451|       |
  452|  3.28M|    len++;
  453|  3.28M|    codeword = codeword << 1 | carry_bit;
  454|  3.28M|    indx = ixheaacd_rvlc_decode_esc(codeword, len, &found);
  455|       |
  456|  3.28M|    if (found) {
  ------------------
  |  Branch (456:9): [True: 1.07M, False: 2.21M]
  ------------------
  457|  1.07M|      ptr_rvlc->rvlc_esc_len -= (MAX_LEN_RVLC_ESCAPE_WORD - i);
  ------------------
  |  |   90|  1.07M|#define MAX_LEN_RVLC_ESCAPE_WORD 20
  ------------------
  458|  1.07M|      return indx;
  459|  1.07M|    }
  460|  3.28M|  }
  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.07M|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_esc:
  205|  3.28M|static WORD32 ixheaacd_rvlc_decode_esc(WORD32 cw, WORD32 len, WORD32 *found) {
  206|  3.28M|  WORD16 indx = 0;
  207|  3.28M|  *found = 0;
  208|  3.28M|  switch (len) {
  209|  1.07M|    case 2:
  ------------------
  |  Branch (209:5): [True: 1.07M, False: 2.21M]
  ------------------
  210|  1.07M|      switch (cw) {
  211|   175k|        case 2:
  ------------------
  |  Branch (211:9): [True: 175k, False: 895k]
  ------------------
  212|   175k|          indx = 0;
  213|   175k|          break;
  214|   421k|        case 0:
  ------------------
  |  Branch (214:9): [True: 421k, False: 650k]
  ------------------
  215|   421k|          indx = 1;
  216|   421k|          break;
  217|   474k|        default:
  ------------------
  |  Branch (217:9): [True: 474k, False: 597k]
  ------------------
  218|   474k|          return 3;
  219|  1.07M|      }
  220|   597k|      break;
  221|   597k|    case 3:
  ------------------
  |  Branch (221:5): [True: 474k, False: 2.80M]
  ------------------
  222|   474k|      switch (cw) {
  223|   108k|        case 6:
  ------------------
  |  Branch (223:9): [True: 108k, False: 366k]
  ------------------
  224|   108k|          indx = 2;
  225|   108k|          break;
  226|  62.4k|        case 2:
  ------------------
  |  Branch (226:9): [True: 62.4k, False: 412k]
  ------------------
  227|  62.4k|          indx = 3;
  228|  62.4k|          break;
  229|   303k|        default:
  ------------------
  |  Branch (229:9): [True: 303k, False: 170k]
  ------------------
  230|   303k|          return 4;
  231|   474k|      }
  232|   170k|      break;
  233|   303k|    case 4:
  ------------------
  |  Branch (233:5): [True: 303k, False: 2.97M]
  ------------------
  234|   303k|      if (cw == 14)
  ------------------
  |  Branch (234:11): [True: 48.5k, False: 255k]
  ------------------
  235|  48.5k|        indx = 4;
  236|   255k|      else
  237|   255k|        return 5;
  238|  48.5k|      break;
  239|   255k|    case 5:
  ------------------
  |  Branch (239:5): [True: 255k, False: 3.02M]
  ------------------
  240|   255k|      switch (cw) {
  241|   167k|        case 31:
  ------------------
  |  Branch (241:9): [True: 167k, False: 87.9k]
  ------------------
  242|   167k|          indx = 5;
  243|   167k|          break;
  244|  22.8k|        case 15:
  ------------------
  |  Branch (244:9): [True: 22.8k, False: 232k]
  ------------------
  245|  22.8k|          indx = 6;
  246|  22.8k|          break;
  247|  11.7k|        case 13:
  ------------------
  |  Branch (247:9): [True: 11.7k, False: 243k]
  ------------------
  248|  11.7k|          indx = 7;
  249|  11.7k|          break;
  250|  53.3k|        default:
  ------------------
  |  Branch (250:9): [True: 53.3k, False: 201k]
  ------------------
  251|  53.3k|          return 6;
  252|   255k|      }
  253|   201k|      break;
  254|   201k|    case 6:
  ------------------
  |  Branch (254:5): [True: 53.3k, False: 3.22M]
  ------------------
  255|  53.3k|      switch (cw) {
  256|  8.75k|        case 61:
  ------------------
  |  Branch (256:9): [True: 8.75k, False: 44.5k]
  ------------------
  257|  8.75k|          indx = 8;
  258|  8.75k|          break;
  259|  7.18k|        case 29:
  ------------------
  |  Branch (259:9): [True: 7.18k, False: 46.1k]
  ------------------
  260|  7.18k|          indx = 9;
  261|  7.18k|          break;
  262|  8.71k|        case 25:
  ------------------
  |  Branch (262:9): [True: 8.71k, False: 44.6k]
  ------------------
  263|  8.71k|          indx = 10;
  264|  8.71k|          break;
  265|  5.08k|        case 24:
  ------------------
  |  Branch (265:9): [True: 5.08k, False: 48.2k]
  ------------------
  266|  5.08k|          indx = 11;
  267|  5.08k|          break;
  268|  23.6k|        default:
  ------------------
  |  Branch (268:9): [True: 23.6k, False: 29.7k]
  ------------------
  269|  23.6k|          return 7;
  270|  53.3k|      }
  271|  29.7k|      break;
  272|  29.7k|    case 7:
  ------------------
  |  Branch (272:5): [True: 23.6k, False: 3.25M]
  ------------------
  273|  23.6k|      switch (cw) {
  274|  9.71k|        case 120:
  ------------------
  |  Branch (274:9): [True: 9.71k, False: 13.8k]
  ------------------
  275|  9.71k|          indx = 12;
  276|  9.71k|          break;
  277|  5.09k|        case 56:
  ------------------
  |  Branch (277:9): [True: 5.09k, False: 18.5k]
  ------------------
  278|  5.09k|          indx = 13;
  279|  5.09k|          break;
  280|  8.80k|        default:
  ------------------
  |  Branch (280:9): [True: 8.80k, False: 14.8k]
  ------------------
  281|  8.80k|          return 8;
  282|  23.6k|      }
  283|  14.8k|      break;
  284|  14.8k|    case 8:
  ------------------
  |  Branch (284:5): [True: 8.80k, False: 3.27M]
  ------------------
  285|  8.80k|      switch (cw) {
  286|  2.65k|        case 242:
  ------------------
  |  Branch (286:9): [True: 2.65k, False: 6.15k]
  ------------------
  287|  2.65k|          indx = 14;
  288|  2.65k|          break;
  289|  1.11k|        case 114:
  ------------------
  |  Branch (289:9): [True: 1.11k, False: 7.68k]
  ------------------
  290|  1.11k|          indx = 15;
  291|  1.11k|          break;
  292|  5.03k|        default:
  ------------------
  |  Branch (292:9): [True: 5.03k, False: 3.76k]
  ------------------
  293|  5.03k|          return 9;
  294|  8.80k|      }
  295|  3.76k|      break;
  296|  5.03k|    case 9:
  ------------------
  |  Branch (296:5): [True: 5.03k, False: 3.27M]
  ------------------
  297|  5.03k|      switch (cw) {
  298|    195|        case 486:
  ------------------
  |  Branch (298:9): [True: 195, False: 4.84k]
  ------------------
  299|    195|          indx = 16;
  300|    195|          break;
  301|  1.44k|        case 230:
  ------------------
  |  Branch (301:9): [True: 1.44k, False: 3.59k]
  ------------------
  302|  1.44k|          indx = 17;
  303|  1.44k|          break;
  304|  3.39k|        default:
  ------------------
  |  Branch (304:9): [True: 3.39k, False: 1.63k]
  ------------------
  305|  3.39k|          return 10;
  306|  5.03k|      }
  307|  1.63k|      break;
  308|  3.39k|    case 10:
  ------------------
  |  Branch (308:5): [True: 3.39k, False: 3.27M]
  ------------------
  309|  3.39k|      switch (cw) {
  310|    317|        case 974:
  ------------------
  |  Branch (310:9): [True: 317, False: 3.08k]
  ------------------
  311|    317|          indx = 18;
  312|    317|          break;
  313|    154|        case 463:
  ------------------
  |  Branch (313:9): [True: 154, False: 3.24k]
  ------------------
  314|    154|          indx = 19;
  315|    154|          break;
  316|  2.92k|        default:
  ------------------
  |  Branch (316:9): [True: 2.92k, False: 471]
  ------------------
  317|  2.92k|          return 11;
  318|  3.39k|      }
  319|    471|      break;
  320|  2.92k|    case 11:
  ------------------
  |  Branch (320:5): [True: 2.92k, False: 3.28M]
  ------------------
  321|  2.92k|      switch (cw) {
  322|    164|        case 1950:
  ------------------
  |  Branch (322:9): [True: 164, False: 2.76k]
  ------------------
  323|    164|          indx = 20;
  324|    164|          break;
  325|    223|        case 1951:
  ------------------
  |  Branch (325:9): [True: 223, False: 2.70k]
  ------------------
  326|    223|          indx = 21;
  327|    223|          break;
  328|    931|        case 925:
  ------------------
  |  Branch (328:9): [True: 931, False: 1.99k]
  ------------------
  329|    931|          indx = 22;
  330|    931|          break;
  331|  1.61k|        default:
  ------------------
  |  Branch (331:9): [True: 1.61k, False: 1.31k]
  ------------------
  332|  1.61k|          return 12;
  333|  2.92k|      }
  334|  1.31k|      break;
  335|  1.61k|    case 12:
  ------------------
  |  Branch (335:5): [True: 1.61k, False: 3.28M]
  ------------------
  336|  1.61k|      if (cw == 1848)
  ------------------
  |  Branch (336:11): [True: 235, False: 1.37k]
  ------------------
  337|    235|        indx = 23;
  338|  1.37k|      else
  339|  1.37k|        return 13;
  340|    235|      break;
  341|  1.37k|    case 13:
  ------------------
  |  Branch (341:5): [True: 1.37k, False: 3.28M]
  ------------------
  342|  1.37k|      if (cw == 3698)
  ------------------
  |  Branch (342:11): [True: 306, False: 1.06k]
  ------------------
  343|    306|        indx = 25;
  344|  1.06k|      else
  345|  1.06k|        return 14;
  346|    306|      break;
  347|  1.06k|    case 14:
  ------------------
  |  Branch (347:5): [True: 1.06k, False: 3.28M]
  ------------------
  348|  1.06k|      if (cw == 7399)
  ------------------
  |  Branch (348:11): [True: 85, False: 984]
  ------------------
  349|     85|        indx = 24;
  350|    984|      else
  351|    984|        return 15;
  352|     85|      break;
  353|    984|    case 15:
  ------------------
  |  Branch (353:5): [True: 984, False: 3.28M]
  ------------------
  354|    984|      if (cw == 14797)
  ------------------
  |  Branch (354:11): [True: 105, False: 879]
  ------------------
  355|    105|        indx = 26;
  356|    879|      else
  357|    879|        return 19;
  358|    105|      break;
  359|    879|    case 19:
  ------------------
  |  Branch (359:5): [True: 879, False: 3.28M]
  ------------------
  360|    879|      if ((cw >= 236736) && (cw <= 236740))
  ------------------
  |  Branch (360:11): [True: 879, False: 0]
  |  Branch (360:29): [True: 323, False: 556]
  ------------------
  361|    323|        indx = 53 - (236740 - cw);
  362|    556|      else
  363|    556|        return 20;
  364|    323|      break;
  365|    556|    case 20:
  ------------------
  |  Branch (365:5): [True: 556, False: 3.28M]
  ------------------
  366|    556|      if ((cw >= 473482) && (cw <= 473503))
  ------------------
  |  Branch (366:11): [True: 556, False: 0]
  |  Branch (366:29): [True: 556, False: 0]
  ------------------
  367|    556|        indx = 48 - (473503 - cw);
  368|      0|      else
  369|      0|        return -1;
  370|    556|      break;
  371|  1.07M|    default:
  ------------------
  |  Branch (371:5): [True: 1.07M, False: 2.20M]
  ------------------
  372|  1.07M|      return -1;
  373|  3.28M|  }
  374|  1.07M|  *found = 1;
  375|  1.07M|  return indx;
  376|  3.28M|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_forward:
  527|  56.2k|    ia_bit_buf_struct *it_bit_buff) {
  528|  56.2k|  WORD32 band = 0;
  529|  56.2k|  WORD32 group = 0;
  530|  56.2k|  WORD32 bnds = 0;
  531|       |
  532|  56.2k|  WORD16 dpcm;
  533|       |
  534|  56.2k|  ia_bit_buf_struct temp_buf = {0};
  535|       |
  536|  56.2k|  WORD16 factor = ptr_aac_dec_channel_info->global_gain;
  537|  56.2k|  WORD16 position = 0;
  538|  56.2k|  WORD16 noise_energy = ptr_aac_dec_channel_info->global_gain - 90 - 256;
  539|       |
  540|  56.2k|  WORD16 *ptr_scf_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr;
  541|  56.2k|  WORD16 *ptr_scf_esc = ptr_aac_dec_channel_info->rvlc_scf_esc_arr;
  542|  56.2k|  UWORD8 *ptr_esc_fwd_cnt = &(ptr_rvlc->num_fwd_esc_words_decoded);
  543|       |
  544|  56.2k|  ptr_rvlc->ptr_rvl_bit_cnt = &(ptr_rvlc->rvlc_sf_fwd_len);
  545|  56.2k|  ptr_rvlc->ptr_rvl_bit_str_idx = &(ptr_rvlc->rvl_fwd_bit_str_idx);
  546|       |
  547|  56.2k|  *ptr_esc_fwd_cnt = 0;
  548|  56.2k|  ptr_rvlc->direction = 0;
  549|  56.2k|  ptr_rvlc->noise_used = 0;
  550|  56.2k|  ptr_rvlc->sf_used = 0;
  551|  56.2k|  ptr_rvlc->last_scale_fac = 0;
  552|  56.2k|  ptr_rvlc->last_nrg = 0;
  553|  56.2k|  ptr_rvlc->is_last = 0;
  554|       |
  555|  56.2k|  ixheaacd_rvlc_check_intensity_cb(ptr_rvlc, ptr_aac_dec_channel_info);
  556|       |
  557|   109k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (557:19): [True: 70.4k, False: 39.3k]
  ------------------
  558|   739k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (558:20): [True: 686k, False: 53.4k]
  ------------------
  559|   686k|      bnds = 16 * group + band;
  560|       |
  561|   686k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
  562|  79.1k|        case ZERO_HCB:
  ------------------
  |  |   33|  79.1k|#define ZERO_HCB 0
  ------------------
  |  Branch (562:9): [True: 79.1k, False: 607k]
  ------------------
  563|  79.1k|          ptr_scf_fwd[bnds] = 0;
  564|  79.1k|          break;
  565|       |
  566|  58.8k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  58.8k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (566:9): [True: 58.8k, False: 627k]
  ------------------
  567|   212k|        case INTENSITY_HCB:
  ------------------
  |  |   40|   212k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (567:9): [True: 153k, False: 532k]
  ------------------
  568|       |
  569|   212k|        {
  570|   212k|          dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  571|   212k|          if (dpcm < 0) {
  ------------------
  |  Branch (571:15): [True: 5.37k, False: 207k]
  ------------------
  572|  5.37k|            ptr_rvlc->conceal_max = bnds;
  573|  5.37k|            return;
  574|  5.37k|          }
  575|   207k|          dpcm -= 7;
  576|   207k|        }
  577|   207k|          if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (577:15): [True: 2.20k, False: 204k]
  |  Branch (577:31): [True: 3.51k, False: 201k]
  ------------------
  578|  5.72k|            if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (578:17): [True: 1.41k, False: 4.30k]
  ------------------
  579|  1.41k|              ptr_rvlc->conceal_max = bnds;
  580|  1.41k|              return;
  581|  4.30k|            } else {
  582|  4.30k|              if (dpcm == -7) {
  ------------------
  |  Branch (582:19): [True: 2.10k, False: 2.20k]
  ------------------
  583|  2.10k|                dpcm -= *ptr_scf_esc++;
  584|  2.20k|              } else {
  585|  2.20k|                dpcm += *ptr_scf_esc++;
  586|  2.20k|              }
  587|  4.30k|              (*ptr_esc_fwd_cnt)++;
  588|  4.30k|              if (ptr_rvlc->conceal_max_esc == 1311) {
  ------------------
  |  Branch (588:19): [True: 679, False: 3.62k]
  ------------------
  589|    679|                ptr_rvlc->conceal_max_esc = bnds;
  590|    679|              }
  591|  4.30k|            }
  592|  5.72k|          }
  593|   205k|          position += dpcm;
  594|   205k|          ptr_scf_fwd[bnds] = position;
  595|   205k|          ptr_rvlc->is_last = position;
  596|   205k|          break;
  597|       |
  598|   301k|        case NOISE_HCB:
  ------------------
  |  |   38|   301k|#define NOISE_HCB 13
  ------------------
  |  Branch (598:9): [True: 301k, False: 384k]
  ------------------
  599|   301k|          if (ptr_rvlc->noise_used == 0) {
  ------------------
  |  Branch (599:15): [True: 23.5k, False: 277k]
  ------------------
  600|  23.5k|            ptr_rvlc->noise_used = 1;
  601|  23.5k|            ptr_rvlc->first_noise_band = bnds;
  602|  23.5k|            noise_energy += ptr_rvlc->dpcm_noise_nrg;
  603|  23.5k|            ptr_scf_fwd[bnds] = noise_energy;
  604|  23.5k|            ptr_rvlc->last_nrg = noise_energy;
  605|   277k|          } else {
  606|   277k|            dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  607|   277k|            if (dpcm < 0) {
  ------------------
  |  Branch (607:17): [True: 4.56k, False: 273k]
  ------------------
  608|  4.56k|              ptr_rvlc->conceal_max = bnds;
  609|  4.56k|              return;
  610|  4.56k|            }
  611|   273k|            dpcm -= 7;
  612|   273k|            if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (612:17): [True: 3.70k, False: 269k]
  |  Branch (612:33): [True: 1.68k, False: 267k]
  ------------------
  613|  5.39k|              if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (613:19): [True: 1.96k, False: 3.42k]
  ------------------
  614|  1.96k|                ptr_rvlc->conceal_max = bnds;
  615|  1.96k|                return;
  616|  3.42k|              } else {
  617|  3.42k|                if (dpcm == -7) {
  ------------------
  |  Branch (617:21): [True: 1.74k, False: 1.68k]
  ------------------
  618|  1.74k|                  dpcm -= *ptr_scf_esc++;
  619|  1.74k|                } else {
  620|  1.68k|                  dpcm += *ptr_scf_esc++;
  621|  1.68k|                }
  622|  3.42k|                (*ptr_esc_fwd_cnt)++;
  623|  3.42k|                if (ptr_rvlc->conceal_max_esc == 1311) {
  ------------------
  |  Branch (623:21): [True: 1.74k, False: 1.68k]
  ------------------
  624|  1.74k|                  ptr_rvlc->conceal_max_esc = bnds;
  625|  1.74k|                }
  626|  3.42k|              }
  627|  5.39k|            }
  628|   271k|            noise_energy += dpcm;
  629|   271k|            ptr_scf_fwd[bnds] = noise_energy;
  630|   271k|            ptr_rvlc->last_nrg = noise_energy;
  631|   271k|          }
  632|   294k|          ptr_aac_dec_channel_info->str_pns_info.pns_used[bnds] = 1;
  633|   294k|          break;
  634|       |
  635|  93.0k|        default:
  ------------------
  |  Branch (635:9): [True: 93.0k, False: 593k]
  ------------------
  636|  93.0k|          ptr_rvlc->sf_used = 1;
  637|  93.0k|          {
  638|  93.0k|            memcpy(&temp_buf, it_bit_buff, sizeof(ia_bit_buf_struct));
  639|       |
  640|  93.0k|            dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  641|  93.0k|            if (dpcm < 0) {
  ------------------
  |  Branch (641:17): [True: 2.54k, False: 90.5k]
  ------------------
  642|  2.54k|              ptr_rvlc->conceal_max = bnds;
  643|  2.54k|              return;
  644|  2.54k|            }
  645|  90.5k|            dpcm -= 7;
  646|  90.5k|          }
  647|  90.5k|          if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (647:15): [True: 1.92k, False: 88.5k]
  |  Branch (647:31): [True: 772, False: 87.8k]
  ------------------
  648|  2.70k|            if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (648:17): [True: 1.12k, False: 1.57k]
  ------------------
  649|  1.12k|              ptr_rvlc->conceal_max = bnds;
  650|  1.12k|              return;
  651|  1.57k|            } else {
  652|  1.57k|              if (dpcm == -7) {
  ------------------
  |  Branch (652:19): [True: 1.03k, False: 544]
  ------------------
  653|  1.03k|                dpcm -= *ptr_scf_esc++;
  654|  1.03k|              } else {
  655|    544|                dpcm += *ptr_scf_esc++;
  656|    544|              }
  657|  1.57k|              (*ptr_esc_fwd_cnt)++;
  658|  1.57k|              if (ptr_rvlc->conceal_max_esc == 1311) {
  ------------------
  |  Branch (658:19): [True: 1.42k, False: 153]
  ------------------
  659|  1.42k|                ptr_rvlc->conceal_max_esc = bnds;
  660|  1.42k|              }
  661|  1.57k|            }
  662|  2.70k|          }
  663|  89.3k|          factor += dpcm;
  664|  89.3k|          ptr_scf_fwd[bnds] = factor;
  665|  89.3k|          ptr_rvlc->last_scale_fac = factor;
  666|  89.3k|          break;
  667|   686k|      }
  668|   686k|    }
  669|  70.4k|  }
  670|       |
  671|  39.3k|  if (ptr_rvlc->intensity_used) {
  ------------------
  |  Branch (671:7): [True: 11.0k, False: 28.2k]
  ------------------
  672|  11.0k|    dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  673|  11.0k|    if (dpcm < 0) {
  ------------------
  |  Branch (673:9): [True: 749, False: 10.2k]
  ------------------
  674|    749|      ptr_rvlc->conceal_max = bnds;
  675|    749|      return;
  676|    749|    }
  677|  10.2k|    dpcm -= 7;
  678|  10.2k|    if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (678:9): [True: 251, False: 10.0k]
  |  Branch (678:25): [True: 507, False: 9.52k]
  ------------------
  679|    758|      if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (679:11): [True: 95, False: 663]
  ------------------
  680|     95|        ptr_rvlc->conceal_max = bnds;
  681|     95|        return;
  682|    663|      } else {
  683|    663|        if (dpcm == -7) {
  ------------------
  |  Branch (683:13): [True: 250, False: 413]
  ------------------
  684|    250|          dpcm -= *ptr_scf_esc++;
  685|    413|        } else {
  686|    413|          dpcm += *ptr_scf_esc++;
  687|    413|        }
  688|    663|        (*ptr_esc_fwd_cnt)++;
  689|    663|        if (ptr_rvlc->conceal_max_esc == 1311) {
  ------------------
  |  Branch (689:13): [True: 416, False: 247]
  ------------------
  690|    416|          ptr_rvlc->conceal_max_esc = bnds;
  691|    416|        }
  692|    663|      }
  693|    758|    }
  694|  10.1k|    ptr_rvlc->dpcm_is_last_pos = dpcm;
  695|  10.1k|  }
  696|  39.3k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_check_intensity_cb:
  379|  56.2k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
  380|  56.2k|  WORD32 group, band, bnds;
  381|       |
  382|  56.2k|  ptr_rvlc->intensity_used = 0;
  383|       |
  384|   126k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (384:19): [True: 70.4k, False: 56.2k]
  ------------------
  385|   486k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (385:20): [True: 437k, False: 48.8k]
  ------------------
  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: 10.8k, 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: 10.7k, False: 416k]
  ------------------
  389|  21.6k|        ptr_rvlc->intensity_used = 1;
  390|  21.6k|        break;
  391|  21.6k|      }
  392|   437k|    }
  393|  70.4k|  }
  394|  56.2k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_backward:
  701|  56.2k|    ia_bit_buf_struct *it_bit_buff) {
  702|  56.2k|  WORD16 band, group, dpcm;
  703|  56.2k|  WORD16 bnds = ptr_rvlc->max_sfb_transmitted - 1;
  704|       |
  705|  56.2k|  WORD16 factor = ptr_rvlc->rev_global_gain;
  706|  56.2k|  WORD16 position = ptr_rvlc->dpcm_is_last_pos;
  707|  56.2k|  WORD16 noise_energy =
  708|  56.2k|      ptr_rvlc->rev_global_gain + ptr_rvlc->dpcm_noise_last_pos - 90 - 256;
  709|       |
  710|  56.2k|  WORD16 *ptr_scf_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr;
  711|  56.2k|  WORD16 *ptr_scf_esc = ptr_aac_dec_channel_info->rvlc_scf_esc_arr;
  712|  56.2k|  UWORD8 *ptr_esc_cnt = &(ptr_rvlc->num_esc_words_decoded);
  713|  56.2k|  UWORD8 *ptr_esc_bwd_cnt = &(ptr_rvlc->num_bwd_esc_words_decoded);
  714|       |
  715|  56.2k|  ptr_rvlc->ptr_rvl_bit_cnt = &(ptr_rvlc->rvlc_sf_bwd_len);
  716|  56.2k|  ptr_rvlc->ptr_rvl_bit_str_idx = &(ptr_rvlc->rvl_bwd_bit_str_idx);
  717|       |
  718|  56.2k|  *ptr_esc_bwd_cnt = 0;
  719|  56.2k|  ptr_rvlc->direction = 1;
  720|  56.2k|  ptr_scf_esc += *ptr_esc_cnt - 1;
  721|  56.2k|  ptr_rvlc->firt_scale_fac = 0;
  722|  56.2k|  ptr_rvlc->first_nrg = 0;
  723|  56.2k|  ptr_rvlc->is_first = 0;
  724|       |
  725|  56.2k|  if (ptr_rvlc->intensity_used) {
  ------------------
  |  Branch (725:7): [True: 21.6k, False: 34.6k]
  ------------------
  726|  21.6k|    dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  727|  21.6k|    if (dpcm < 0) {
  ------------------
  |  Branch (727:9): [True: 3.28k, False: 18.3k]
  ------------------
  728|  3.28k|      ptr_rvlc->dpcm_is_last_pos = 0;
  729|  3.28k|      ptr_rvlc->conceal_min = bnds;
  730|  3.28k|      return;
  731|  3.28k|    }
  732|  18.3k|    dpcm -= 7;
  733|  18.3k|    if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (733:9): [True: 548, False: 17.7k]
  |  Branch (733:25): [True: 847, False: 16.9k]
  ------------------
  734|  1.39k|      if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (734:11): [True: 1.15k, False: 237]
  ------------------
  735|  1.15k|        ptr_rvlc->conceal_min = bnds;
  736|  1.15k|        return;
  737|  1.15k|      } else {
  738|    237|        if (dpcm == -7) {
  ------------------
  |  Branch (738:13): [True: 158, False: 79]
  ------------------
  739|    158|          dpcm -= *ptr_scf_esc--;
  740|    158|        } else {
  741|     79|          dpcm += *ptr_scf_esc--;
  742|     79|        }
  743|    237|        (*ptr_esc_bwd_cnt)++;
  744|    237|        if (ptr_rvlc->conceal_min_esc == -1311) {
  ------------------
  |  Branch (744:13): [True: 237, False: 0]
  ------------------
  745|    237|          ptr_rvlc->conceal_min_esc = bnds;
  746|    237|        }
  747|    237|      }
  748|  1.39k|    }
  749|  17.1k|    ptr_rvlc->dpcm_is_last_pos = dpcm;
  750|  17.1k|  }
  751|       |
  752|  96.9k|  for (group = ptr_rvlc->num_wind_grps - 1; group >= 0; group--) {
  ------------------
  |  Branch (752:45): [True: 65.9k, False: 30.9k]
  ------------------
  753|   534k|    for (band = ptr_rvlc->max_sfb_transmitted - 1; band >= 0; band--) {
  ------------------
  |  Branch (753:52): [True: 489k, False: 45.0k]
  ------------------
  754|   489k|      bnds = 16 * group + band;
  755|       |
  756|   489k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
  757|  29.3k|        case ZERO_HCB:
  ------------------
  |  |   33|  29.3k|#define ZERO_HCB 0
  ------------------
  |  Branch (757:9): [True: 29.3k, False: 459k]
  ------------------
  758|  29.3k|          ptr_scf_bwd[bnds] = 0;
  759|  29.3k|          break;
  760|       |
  761|  71.1k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  71.1k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (761:9): [True: 71.1k, False: 417k]
  ------------------
  762|   170k|        case INTENSITY_HCB:
  ------------------
  |  |   40|   170k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (762:9): [True: 98.9k, False: 390k]
  ------------------
  763|       |
  764|   170k|          dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  765|   170k|          if (dpcm < 0) {
  ------------------
  |  Branch (765:15): [True: 4.71k, False: 165k]
  ------------------
  766|  4.71k|            ptr_scf_bwd[bnds] = position;
  767|       |
  768|  4.71k|            return;
  769|  4.71k|          }
  770|   165k|          dpcm -= 7;
  771|   165k|          if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (771:15): [True: 738, False: 164k]
  |  Branch (771:31): [True: 3.59k, False: 161k]
  ------------------
  772|  4.33k|            if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (772:17): [True: 1.65k, False: 2.67k]
  ------------------
  773|  1.65k|              ptr_scf_bwd[bnds] = position;
  774|       |
  775|  1.65k|              return;
  776|  2.67k|            } else {
  777|  2.67k|              if (dpcm == -7) {
  ------------------
  |  Branch (777:19): [True: 133, False: 2.54k]
  ------------------
  778|    133|                dpcm -= *ptr_scf_esc--;
  779|  2.54k|              } else {
  780|  2.54k|                dpcm += *ptr_scf_esc--;
  781|  2.54k|              }
  782|  2.67k|              (*ptr_esc_bwd_cnt)++;
  783|  2.67k|              if (ptr_rvlc->conceal_min_esc == -1311) {
  ------------------
  |  Branch (783:19): [True: 2.13k, False: 546]
  ------------------
  784|  2.13k|              }
  785|  2.67k|            }
  786|  4.33k|          }
  787|   163k|          ptr_scf_bwd[bnds] = position;
  788|   163k|          position -= dpcm;
  789|   163k|          ptr_rvlc->is_first = position;
  790|   163k|          break;
  791|       |
  792|   229k|        case NOISE_HCB:
  ------------------
  |  |   38|   229k|#define NOISE_HCB 13
  ------------------
  |  Branch (792:9): [True: 229k, False: 259k]
  ------------------
  793|   229k|          if (bnds == ptr_rvlc->first_noise_band) {
  ------------------
  |  Branch (793:15): [True: 11.9k, False: 217k]
  ------------------
  794|  11.9k|            ptr_scf_bwd[bnds] = ptr_rvlc->dpcm_noise_nrg +
  795|  11.9k|                                ptr_aac_dec_channel_info->global_gain - 90 -
  796|  11.9k|                                256;
  797|  11.9k|            ptr_rvlc->first_nrg = ptr_scf_bwd[bnds];
  798|   217k|          } else {
  799|   217k|            dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  800|   217k|            if (dpcm < 0) {
  ------------------
  |  Branch (800:17): [True: 10.1k, False: 207k]
  ------------------
  801|  10.1k|              ptr_scf_bwd[bnds] = noise_energy;
  802|  10.1k|              return;
  803|  10.1k|            }
  804|   207k|            dpcm -= 7;
  805|   207k|            if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (805:17): [True: 4.13k, False: 202k]
  |  Branch (805:33): [True: 2.10k, False: 200k]
  ------------------
  806|  6.24k|              if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (806:19): [True: 563, False: 5.68k]
  ------------------
  807|    563|                ptr_scf_bwd[bnds] = noise_energy;
  808|    563|                return;
  809|  5.68k|              } else {
  810|  5.68k|                if (dpcm == -7) {
  ------------------
  |  Branch (810:21): [True: 3.89k, False: 1.78k]
  ------------------
  811|  3.89k|                  dpcm -= *ptr_scf_esc--;
  812|  3.89k|                } else {
  813|  1.78k|                  dpcm += *ptr_scf_esc--;
  814|  1.78k|                }
  815|  5.68k|                (*ptr_esc_bwd_cnt)++;
  816|  5.68k|                if (ptr_rvlc->conceal_min_esc == -1311) {
  ------------------
  |  Branch (816:21): [True: 5.68k, False: 0]
  ------------------
  817|  5.68k|                }
  818|  5.68k|              }
  819|  6.24k|            }
  820|   206k|            ptr_scf_bwd[bnds] = noise_energy;
  821|   206k|            noise_energy -= dpcm;
  822|   206k|            ptr_rvlc->first_nrg = noise_energy;
  823|   206k|          }
  824|   218k|          break;
  825|       |
  826|   218k|        default:
  ------------------
  |  Branch (826:9): [True: 60.4k, False: 428k]
  ------------------
  827|  60.4k|          dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  828|  60.4k|          if (dpcm < 0) {
  ------------------
  |  Branch (828:15): [True: 2.00k, False: 58.4k]
  ------------------
  829|  2.00k|            ptr_scf_bwd[bnds] = factor;
  830|       |
  831|  2.00k|            return;
  832|  2.00k|          }
  833|  58.4k|          dpcm -= 7;
  834|  58.4k|          if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (834:15): [True: 999, False: 57.4k]
  |  Branch (834:31): [True: 1.97k, False: 55.4k]
  ------------------
  835|  2.97k|            if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (835:17): [True: 1.85k, False: 1.11k]
  ------------------
  836|  1.85k|              ptr_scf_bwd[bnds] = factor;
  837|       |
  838|  1.85k|              return;
  839|  1.85k|            } else {
  840|  1.11k|              if (dpcm == -7) {
  ------------------
  |  Branch (840:19): [True: 556, False: 561]
  ------------------
  841|    556|                dpcm -= *ptr_scf_esc--;
  842|    561|              } else {
  843|    561|                dpcm += *ptr_scf_esc--;
  844|    561|              }
  845|  1.11k|              (*ptr_esc_bwd_cnt)++;
  846|  1.11k|              if (ptr_rvlc->conceal_min_esc == -1311) {
  ------------------
  |  Branch (846:19): [True: 1.11k, False: 0]
  ------------------
  847|  1.11k|              }
  848|  1.11k|            }
  849|  2.97k|          }
  850|  56.5k|          ptr_scf_bwd[bnds] = factor;
  851|  56.5k|          factor -= dpcm;
  852|  56.5k|          ptr_rvlc->firt_scale_fac = factor;
  853|  56.5k|          break;
  854|   489k|      }
  855|   489k|    }
  856|  65.9k|  }
  857|  51.8k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_final_error_detection:
 1522|  56.2k|    ia_aac_dec_overlap_info *ptr_aac_dec_static_channel_info) {
 1523|  56.2k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
 1524|  56.2k|  UWORD8 err_status_complete = 0;
 1525|  56.2k|  UWORD8 err_status_length_fwd = 0;
 1526|  56.2k|  UWORD8 err_status_length_bwd = 0;
 1527|  56.2k|  UWORD8 err_status_length_escape = 0;
 1528|  56.2k|  UWORD8 err_status_first_scf = 0;
 1529|  56.2k|  UWORD8 err_status_last_scf = 0;
 1530|  56.2k|  UWORD8 err_status_first_nrg = 0;
 1531|  56.2k|  UWORD8 err_status_last_nrg = 0;
 1532|  56.2k|  UWORD8 err_status_first_is = 0;
 1533|  56.2k|  UWORD8 err_status_last_is = 0;
 1534|  56.2k|  UWORD8 err_status_forbidden_cw_fwd = 0;
 1535|  56.2k|  UWORD8 err_status_forbidden_cw_bwd = 0;
 1536|  56.2k|  UWORD8 err_status_num_escapes_fwd = 0;
 1537|  56.2k|  UWORD8 err_status_num_escapes_bwd = 0;
 1538|  56.2k|  UWORD8 conceal_status = 1;
 1539|  56.2k|  UWORD8 current_block_type;
 1540|       |
 1541|  56.2k|  ptr_aac_dec_channel_info->rvlc_curr_sf_flag = 1;
 1542|       |
 1543|  56.2k|  if (ptr_rvlc->rvlc_err_log & RVLC_ERROR_FORBIDDEN_CW_DETECTED_FWD)
  ------------------
  |  |   83|  56.2k|#define RVLC_ERROR_FORBIDDEN_CW_DETECTED_FWD 0x08000000
  ------------------
  |  Branch (1543:7): [True: 0, False: 56.2k]
  ------------------
 1544|      0|    err_status_forbidden_cw_fwd = 1;
 1545|       |
 1546|  56.2k|  if (ptr_rvlc->rvlc_err_log & RVLC_ERROR_FORBIDDEN_CW_DETECTED_BWD)
  ------------------
  |  |   84|  56.2k|#define RVLC_ERROR_FORBIDDEN_CW_DETECTED_BWD 0x04000000
  ------------------
  |  Branch (1546:7): [True: 0, False: 56.2k]
  ------------------
 1547|      0|    err_status_forbidden_cw_bwd = 1;
 1548|       |
 1549|  56.2k|  if (ptr_rvlc->rvlc_sf_fwd_len) err_status_length_fwd = 1;
  ------------------
  |  Branch (1549:7): [True: 50.4k, False: 5.87k]
  ------------------
 1550|       |
 1551|  56.2k|  if (ptr_rvlc->rvlc_sf_bwd_len) err_status_length_bwd = 1;
  ------------------
  |  Branch (1551:7): [True: 50.5k, False: 5.75k]
  ------------------
 1552|       |
 1553|  56.2k|  if (ptr_rvlc->sf_esc_present)
  ------------------
  |  Branch (1553:7): [True: 26.4k, False: 29.8k]
  ------------------
 1554|  26.4k|    if (ptr_rvlc->rvlc_esc_len) err_status_length_escape = 1;
  ------------------
  |  Branch (1554:9): [True: 13.1k, False: 13.2k]
  ------------------
 1555|       |
 1556|  56.2k|  if (ptr_rvlc->sf_used) {
  ------------------
  |  Branch (1556:7): [True: 19.1k, False: 37.1k]
  ------------------
 1557|  19.1k|    if (ptr_rvlc->firt_scale_fac != (ptr_aac_dec_channel_info->global_gain))
  ------------------
  |  Branch (1557:9): [True: 19.0k, False: 91]
  ------------------
 1558|  19.0k|      err_status_first_scf = 1;
 1559|       |
 1560|  19.1k|    if (ptr_rvlc->last_scale_fac != (ptr_rvlc->rev_global_gain))
  ------------------
  |  Branch (1560:9): [True: 18.9k, False: 211]
  ------------------
 1561|  18.9k|      err_status_last_scf = 1;
 1562|  19.1k|  }
 1563|       |
 1564|  56.2k|  if (ptr_rvlc->noise_used) {
  ------------------
  |  Branch (1564:7): [True: 23.5k, False: 32.7k]
  ------------------
 1565|  23.5k|    if (ptr_rvlc->first_nrg != (ptr_aac_dec_channel_info->global_gain +
  ------------------
  |  Branch (1565:9): [True: 13.2k, False: 10.2k]
  ------------------
 1566|  23.5k|                                ptr_rvlc->dpcm_noise_nrg - 90 - 256))
 1567|  13.2k|      err_status_first_nrg = 1;
 1568|       |
 1569|  23.5k|    if (ptr_rvlc->last_nrg !=
  ------------------
  |  Branch (1569:9): [True: 22.7k, False: 764]
  ------------------
 1570|  23.5k|        (ptr_rvlc->rev_global_gain + ptr_rvlc->dpcm_noise_last_pos - 90 - 256))
 1571|  22.7k|      err_status_last_nrg = 1;
 1572|  23.5k|  }
 1573|       |
 1574|  56.2k|  if (ptr_rvlc->intensity_used) {
  ------------------
  |  Branch (1574:7): [True: 21.6k, False: 34.6k]
  ------------------
 1575|  21.6k|    if (ptr_rvlc->is_first != 0) err_status_first_is = 1;
  ------------------
  |  Branch (1575:9): [True: 10.8k, False: 10.7k]
  ------------------
 1576|       |
 1577|  21.6k|    if (ptr_rvlc->is_last != (ptr_rvlc->dpcm_is_last_pos))
  ------------------
  |  Branch (1577:9): [True: 13.6k, False: 7.99k]
  ------------------
 1578|  13.6k|      err_status_last_is = 1;
 1579|  21.6k|  }
 1580|       |
 1581|  56.2k|  if ((ptr_rvlc->num_fwd_esc_words_decoded !=
  ------------------
  |  Branch (1581:7): [True: 24.3k, False: 31.8k]
  ------------------
 1582|  56.2k|       ptr_rvlc->num_esc_words_decoded) &&
 1583|  24.3k|      (ptr_rvlc->conceal_max == CONCEAL_MAX_INIT)) {
  ------------------
  |  |   92|  24.3k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1583:7): [True: 17.5k, False: 6.88k]
  ------------------
 1584|  17.5k|    err_status_num_escapes_fwd = 1;
 1585|  17.5k|  }
 1586|       |
 1587|  56.2k|  if ((ptr_rvlc->num_bwd_esc_words_decoded !=
  ------------------
  |  Branch (1587:7): [True: 23.7k, False: 32.5k]
  ------------------
 1588|  56.2k|       ptr_rvlc->num_esc_words_decoded) &&
 1589|  23.7k|      (ptr_rvlc->conceal_min == CONCEAL_MIN_INIT)) {
  ------------------
  |  |   93|  23.7k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1589:7): [True: 20.8k, False: 2.88k]
  ------------------
 1590|  20.8k|    err_status_num_escapes_bwd = 1;
 1591|  20.8k|  }
 1592|       |
 1593|  56.2k|  if (err_status_length_escape ||
  ------------------
  |  Branch (1593:7): [True: 13.1k, False: 43.1k]
  ------------------
 1594|  43.1k|      (((ptr_rvlc->conceal_max == CONCEAL_MAX_INIT) &&
  ------------------
  |  |   92|  43.1k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1594:9): [True: 30.9k, False: 12.1k]
  ------------------
 1595|  30.9k|        (ptr_rvlc->num_fwd_esc_words_decoded !=
  ------------------
  |  Branch (1595:9): [True: 10.0k, False: 20.9k]
  ------------------
 1596|  30.9k|         ptr_rvlc->num_esc_words_decoded) &&
 1597|  10.0k|        (err_status_last_scf || err_status_last_nrg || err_status_last_is))
  ------------------
  |  Branch (1597:10): [True: 3.15k, False: 6.84k]
  |  Branch (1597:33): [True: 3.71k, False: 3.13k]
  |  Branch (1597:56): [True: 471, False: 2.66k]
  ------------------
 1598|       |
 1599|  7.33k|       &&
 1600|       |
 1601|  7.33k|       ((ptr_rvlc->conceal_min == CONCEAL_MIN_INIT) &&
  ------------------
  |  |   93|  7.33k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1601:9): [True: 5.98k, False: 1.35k]
  ------------------
 1602|  5.98k|        (ptr_rvlc->num_bwd_esc_words_decoded !=
  ------------------
  |  Branch (1602:9): [True: 5.41k, False: 569]
  ------------------
 1603|  5.98k|         ptr_rvlc->num_esc_words_decoded) &&
 1604|  5.41k|        (err_status_first_scf || err_status_first_nrg ||
  ------------------
  |  Branch (1604:10): [True: 2.58k, False: 2.83k]
  |  Branch (1604:34): [True: 1.79k, False: 1.03k]
  ------------------
 1605|  1.03k|         err_status_first_is))) ||
  ------------------
  |  Branch (1605:10): [True: 609, False: 428]
  ------------------
 1606|  38.1k|      ((ptr_rvlc->conceal_max == CONCEAL_MAX_INIT) &&
  ------------------
  |  |   92|  38.1k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1606:8): [True: 25.9k, False: 12.1k]
  ------------------
 1607|  25.9k|       ((ptr_rvlc->rev_global_gain - ptr_rvlc->last_scale_fac) < -15)) ||
  ------------------
  |  Branch (1607:8): [True: 590, False: 25.3k]
  ------------------
 1608|  37.5k|      ((ptr_rvlc->conceal_min == CONCEAL_MIN_INIT) &&
  ------------------
  |  |   93|  37.5k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1608:8): [True: 34.4k, False: 3.03k]
  ------------------
 1609|  34.4k|       ((ptr_aac_dec_channel_info->global_gain - ptr_rvlc->firt_scale_fac) <
  ------------------
  |  Branch (1609:8): [True: 4.81k, False: 29.6k]
  ------------------
 1610|  34.4k|        -15))) {
 1611|  23.5k|    if ((ptr_rvlc->conceal_max == CONCEAL_MAX_INIT) ||
  ------------------
  |  |   92|  23.5k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1611:9): [True: 15.9k, False: 7.58k]
  ------------------
 1612|  22.5k|        (ptr_rvlc->conceal_min == CONCEAL_MIN_INIT)) {
  ------------------
  |  |   93|  7.58k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1612:9): [True: 6.51k, False: 1.07k]
  ------------------
 1613|  22.5k|      ptr_rvlc->conceal_max = 0;
 1614|  22.5k|      ptr_rvlc->conceal_min =
 1615|  22.5k|          ixheaac_max32(0, (ptr_rvlc->num_wind_grps - 1) * 16 +
 1616|  22.5k|                                ptr_rvlc->max_sfb_transmitted - 1);
 1617|  22.5k|    } else {
 1618|  1.07k|      ptr_rvlc->conceal_max =
 1619|  1.07k|          ixheaac_min32(ptr_rvlc->conceal_max, ptr_rvlc->conceal_max_esc);
 1620|  1.07k|      ptr_rvlc->conceal_min =
 1621|  1.07k|          ixheaac_max32(ptr_rvlc->conceal_min, ptr_rvlc->conceal_min_esc);
 1622|  1.07k|    }
 1623|  23.5k|  }
 1624|       |
 1625|  56.2k|  err_status_complete =
 1626|  56.2k|      err_status_last_scf || err_status_first_scf || err_status_last_nrg ||
  ------------------
  |  Branch (1626:7): [True: 18.9k, False: 37.3k]
  |  Branch (1626:30): [True: 153, False: 37.1k]
  |  Branch (1626:54): [True: 12.1k, False: 25.0k]
  ------------------
 1627|  25.0k|      err_status_first_nrg || err_status_last_is || err_status_first_is ||
  ------------------
  |  Branch (1627:7): [True: 761, False: 24.3k]
  |  Branch (1627:31): [True: 3.97k, False: 20.3k]
  |  Branch (1627:53): [True: 2.11k, False: 18.2k]
  ------------------
 1628|  18.2k|      err_status_forbidden_cw_fwd || err_status_forbidden_cw_bwd ||
  ------------------
  |  Branch (1628:7): [True: 0, False: 18.2k]
  |  Branch (1628:38): [True: 0, False: 18.2k]
  ------------------
 1629|  18.2k|      err_status_length_fwd || err_status_length_bwd ||
  ------------------
  |  Branch (1629:7): [True: 12.5k, False: 5.67k]
  |  Branch (1629:32): [True: 115, False: 5.56k]
  ------------------
 1630|  5.56k|      err_status_length_escape || err_status_num_escapes_fwd ||
  ------------------
  |  Branch (1630:7): [True: 24, False: 5.53k]
  |  Branch (1630:35): [True: 95, False: 5.44k]
  ------------------
 1631|  5.44k|      err_status_num_escapes_bwd;
  ------------------
  |  Branch (1631:7): [True: 0, False: 5.44k]
  ------------------
 1632|       |
 1633|  56.2k|  current_block_type =
 1634|  56.2k|      (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (1634:7): [True: 3.22k, False: 53.0k]
  ------------------
 1635|  56.2k|       EIGHT_SHORT_SEQUENCE)
  ------------------
  |  |  102|  56.2k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
 1636|  56.2k|          ? 0
 1637|  56.2k|          : 1;
 1638|       |
 1639|  56.2k|  if (!err_status_complete) {
  ------------------
  |  Branch (1639:7): [True: 5.44k, False: 50.8k]
  ------------------
 1640|  5.44k|    WORD32 band;
 1641|  5.44k|    WORD32 group;
 1642|  5.44k|    WORD32 bnds;
 1643|  5.44k|    WORD32 last_sfb_idx;
 1644|       |
 1645|  5.44k|    last_sfb_idx = (ptr_rvlc->num_wind_grps > 1) ? 16 : 64;
  ------------------
  |  Branch (1645:20): [True: 153, False: 5.28k]
  ------------------
 1646|       |
 1647|  11.6k|    for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1647:21): [True: 6.24k, False: 5.44k]
  ------------------
 1648|  11.3k|      for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1648:22): [True: 5.06k, False: 6.24k]
  ------------------
 1649|  5.06k|        bnds = 16 * group + band;
 1650|  5.06k|        ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1651|  5.06k|            ptr_aac_dec_static_channel_info->rvlc_prev_sf[bnds] =
 1652|  5.06k|                ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1653|  5.06k|      }
 1654|  6.24k|    }
 1655|       |
 1656|  11.6k|    for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1656:21): [True: 6.24k, False: 5.44k]
  ------------------
 1657|  11.3k|      for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1657:22): [True: 5.06k, False: 6.24k]
  ------------------
 1658|  5.06k|        bnds = 16 * group + band;
 1659|  5.06k|        ptr_aac_dec_static_channel_info->rvlc_prev_cb[bnds] =
 1660|  5.06k|            ptr_aac_dec_channel_info->ptr_code_book[bnds];
 1661|  5.06k|      }
 1662|   354k|      for (; band < last_sfb_idx; band++) {
  ------------------
  |  Branch (1662:14): [True: 348k, False: 6.24k]
  ------------------
 1663|   348k|        bnds = 16 * group + band;
 1664|   348k|        ptr_aac_dec_static_channel_info->rvlc_prev_cb[bnds] = ZERO_HCB;
  ------------------
  |  |   33|   348k|#define ZERO_HCB 0
  ------------------
 1665|   348k|      }
 1666|  6.24k|    }
 1667|  50.8k|  } else {
 1668|  50.8k|    WORD32 band;
 1669|  50.8k|    WORD32 group;
 1670|       |
 1671|  50.8k|    if (((ptr_rvlc->conceal_min != CONCEAL_MIN_INIT) ||
  ------------------
  |  |   93|  50.8k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1671:10): [True: 26.6k, False: 24.2k]
  ------------------
 1672|  24.2k|         (ptr_rvlc->conceal_max != CONCEAL_MAX_INIT)) &&
  ------------------
  |  |   92|  24.2k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1672:10): [True: 9.48k, False: 14.7k]
  ------------------
 1673|  36.0k|        (ptr_rvlc->conceal_min <= ptr_rvlc->conceal_max) &&
  ------------------
  |  Branch (1673:9): [True: 14.7k, False: 21.3k]
  ------------------
 1674|  14.7k|        (ptr_aac_dec_static_channel_info->rvlc_prev_blk_type ==
  ------------------
  |  Branch (1674:9): [True: 54, False: 14.7k]
  ------------------
 1675|  14.7k|         current_block_type) &&
 1676|     54|        ptr_aac_dec_static_channel_info->rvlc_prev_sf_ok &&
  ------------------
  |  Branch (1676:9): [True: 0, False: 54]
  ------------------
 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.8k|    if ((ptr_rvlc->conceal_min <= ptr_rvlc->conceal_max) &&
  ------------------
  |  Branch (1683:9): [True: 29.5k, False: 21.3k]
  ------------------
 1684|  29.5k|        ((ptr_rvlc->conceal_min != CONCEAL_MIN_INIT) ||
  ------------------
  |  |   93|  29.5k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1684:10): [True: 5.29k, False: 24.2k]
  ------------------
 1685|  24.2k|         (ptr_rvlc->conceal_max != CONCEAL_MAX_INIT)) &&
  ------------------
  |  |   92|  24.2k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1685:10): [True: 9.48k, False: 14.7k]
  ------------------
 1686|  14.7k|        !(ptr_aac_dec_static_channel_info->rvlc_prev_sf_ok &&
  ------------------
  |  Branch (1686:11): [True: 0, False: 14.7k]
  ------------------
 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.7k|        conceal_status) {
  ------------------
  |  Branch (1690:9): [True: 14.7k, False: 0]
  ------------------
 1691|  14.7k|      ixheaacd_bi_dir_est_lower_scf_cur_frame(ptr_aac_dec_channel_info);
 1692|  14.7k|      conceal_status = 0;
 1693|  14.7k|    }
 1694|       |
 1695|  50.8k|    if ((ptr_rvlc->conceal_min <= ptr_rvlc->conceal_max) &&
  ------------------
  |  Branch (1695:9): [True: 29.5k, False: 21.3k]
  ------------------
 1696|  29.5k|        ((err_status_last_scf && err_status_first_scf) ||
  ------------------
  |  Branch (1696:11): [True: 6.95k, False: 22.5k]
  |  Branch (1696:34): [True: 6.91k, False: 33]
  ------------------
 1697|  22.6k|         (err_status_last_nrg && err_status_first_nrg) ||
  ------------------
  |  Branch (1697:11): [True: 6.84k, False: 15.7k]
  |  Branch (1697:34): [True: 3.34k, False: 3.50k]
  ------------------
 1698|  19.2k|         (err_status_last_is && err_status_first_is)) &&
  ------------------
  |  Branch (1698:11): [True: 5.19k, False: 14.0k]
  |  Branch (1698:33): [True: 3.78k, False: 1.41k]
  ------------------
 1699|  14.0k|        !(err_status_forbidden_cw_fwd || err_status_forbidden_cw_bwd ||
  ------------------
  |  Branch (1699:11): [True: 0, False: 14.0k]
  |  Branch (1699:42): [True: 0, False: 14.0k]
  ------------------
 1700|  14.0k|          err_status_length_escape) &&
  ------------------
  |  Branch (1700:11): [True: 41, False: 14.0k]
  ------------------
 1701|  14.0k|        conceal_status) {
  ------------------
  |  Branch (1701:9): [True: 5.73k, False: 8.27k]
  ------------------
 1702|  5.73k|      ixheaacd_statistical_estimation(ptr_aac_dec_channel_info);
 1703|  5.73k|      conceal_status = 0;
 1704|  5.73k|    }
 1705|       |
 1706|  50.8k|    if ((ptr_rvlc->conceal_min <= ptr_rvlc->conceal_max) &&
  ------------------
  |  Branch (1706:9): [True: 29.5k, False: 21.3k]
  ------------------
 1707|  29.5k|        ptr_aac_dec_static_channel_info->rvlc_prev_sf_ok &&
  ------------------
  |  Branch (1707:9): [True: 0, False: 29.5k]
  ------------------
 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.8k|    if (conceal_status) {
  ------------------
  |  Branch (1717:9): [True: 30.3k, False: 20.5k]
  ------------------
 1718|  74.0k|      for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1718:23): [True: 43.6k, False: 30.3k]
  ------------------
 1719|   492k|        for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1719:24): [True: 448k, False: 43.6k]
  ------------------
 1720|   448k|          ptr_aac_dec_channel_info->ptr_scale_factor[16 * group + band] = 0;
 1721|   448k|        }
 1722|  43.6k|      }
 1723|  30.3k|      ptr_aac_dec_channel_info->rvlc_curr_sf_flag = 0;
 1724|  30.3k|    }
 1725|  50.8k|  }
 1726|  56.2k|}

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

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

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

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

ixheaacd_prepare_upsamp:
  256|  3.51k|                             WORD32 num_channels) {
  257|  3.51k|  WORD32 lr;
  258|  3.51k|  ia_sbr_qmf_filter_bank_struct *sbr_qmf_bank;
  259|       |
  260|  10.3k|  for (lr = 0; lr < num_channels; lr++) {
  ------------------
  |  Branch (260:16): [True: 6.87k, False: 3.51k]
  ------------------
  261|  6.87k|    ptr_header_data[lr]->pstr_freq_band_data->sub_band_start =
  262|  6.87k|        NO_ANALYSIS_CHANNELS;
  ------------------
  |  |   35|  6.87k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   34|  6.87k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   23|  6.87k|#define SBR_UPSAMPLE_FAC 2
  |  |  ------------------
  ------------------
  263|  6.87k|    ptr_header_data[lr]->pstr_freq_band_data->sub_band_end =
  264|  6.87k|        NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|  6.87k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  265|       |
  266|  6.87k|    sbr_qmf_bank = &pstr_sbr_channel[lr]->str_sbr_dec.str_synthesis_qmf_bank;
  267|  6.87k|    sbr_qmf_bank->lsb = NO_ANALYSIS_CHANNELS;
  ------------------
  |  |   35|  6.87k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   34|  6.87k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   23|  6.87k|#define SBR_UPSAMPLE_FAC 2
  |  |  ------------------
  ------------------
  268|  6.87k|    sbr_qmf_bank->usb = NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|  6.87k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  269|       |
  270|  6.87k|    sbr_qmf_bank = &pstr_sbr_channel[lr]->str_sbr_dec.str_codec_qmf_bank;
  271|  6.87k|    sbr_qmf_bank->lsb = 0;
  272|  6.87k|    sbr_qmf_bank->usb = NO_ANALYSIS_CHANNELS;
  ------------------
  |  |   35|  6.87k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   34|  6.87k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   23|  6.87k|#define SBR_UPSAMPLE_FAC 2
  |  |  ------------------
  ------------------
  273|  6.87k|    ptr_header_data[lr]->sync_state = UPSAMPLING;
  ------------------
  |  |   24|  6.87k|#define UPSAMPLING 1
  ------------------
  274|  6.87k|  }
  275|  3.51k|  return;
  276|  3.51k|}
ixheaacd_applysbr:
  319|   215k|    WORD32 frame_size, WORD32 heaac_mps_present, WORD32 ec_flag, FLAG first_frame) {
  320|   215k|  WORD32 k;
  321|   215k|  FLAG prev_ps_flag = 0;
  322|   215k|  FLAG ps_flag = 0;
  323|   215k|  FLAG stereo = 0;
  324|   215k|  FLAG low_pow_flag = 0;
  325|   215k|  FLAG header_flag = 1;
  326|   215k|  FLAG dual_mono = 0;
  327|   215k|  WORD32 err = 0;
  328|   215k|  WORD32 num_channels = *codec_num_channels;
  329|   215k|  FLAG prev_stereo;
  330|   215k|  WORD32 ele_channels = 0;
  331|   215k|  WORD32 num_elements = p_sbr_bit_stream->no_elements;
  332|   215k|  WORD32 usac_flag = self->aot_usac_flag;
  333|   215k|  WORD32 total_bits_left = 0;
  334|       |
  335|   215k|  ia_sbr_channel_struct *pstr_sbr_channel[2];
  336|   215k|  ia_sbr_header_data_struct *ptr_header_data[MAXNRSBRCHANNELS];
  337|       |
  338|   215k|  WORD32 initial_sync_state;
  339|       |
  340|   215k|  ia_sbr_header_data_struct *ptr_sbr_dflt_header =
  341|   215k|      (ia_sbr_header_data_struct *)(&self->str_sbr_dflt_header);
  342|       |
  343|   215k|  ia_sbr_frame_info_data_struct *ptr_frame_data[2];
  344|   215k|  self->num_delay_frames = 1;
  345|   215k|  self->ptr_mps_data = NULL;
  346|       |
  347|   215k|  if (!ec_flag || !usac_flag) {
  ------------------
  |  Branch (347:7): [True: 215k, False: 0]
  |  Branch (347:19): [True: 0, False: 0]
  ------------------
  348|   647k|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (348:17): [True: 431k, False: 215k]
  ------------------
  349|   431k|      ptr_frame_data[k] = (ia_sbr_frame_info_data_struct *)self->frame_buffer[k];
  350|       |
  351|   431k|      pstr_sbr_channel[k] = self->pstr_sbr_channel[k];
  352|       |
  353|   431k|      ptr_header_data[k] = self->pstr_sbr_header[k];
  354|       |
  355|   431k|      if (audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (355:11): [True: 56.6k, False: 374k]
  ------------------
  356|  56.6k|        ptr_frame_data[k]->eld_sbr_flag = eld_sbr_flag;
  357|  56.6k|        ptr_frame_data[k]->num_time_slots = ptr_header_data[0]->num_time_slots;
  358|  56.6k|      }
  359|       |
  360|   431k|      ptr_frame_data[k]->usac_independency_flag = self->usac_independency_flag;
  361|   431k|      ptr_frame_data[k]->mps_sbr_flag = (self->stereo_config_idx == 3) ? 1 : 0;
  ------------------
  |  Branch (361:41): [True: 78.7k, False: 352k]
  ------------------
  362|   431k|      ptr_frame_data[k]->stereo_config_idx = self->stereo_config_idx;
  363|   431k|      ptr_frame_data[k]->inter_tes_flag = self->inter_tes_flag;
  364|   431k|      ptr_frame_data[k]->sbr_mode = self->sbr_mode;
  365|       |
  366|   431k|      if (!usac_flag) {
  ------------------
  |  Branch (366:11): [True: 88.5k, False: 342k]
  ------------------
  367|  88.5k|        ptr_frame_data[k]->usac_independency_flag = 0;
  368|  88.5k|        ptr_frame_data[k]->mps_sbr_flag = 0;
  369|  88.5k|        ptr_frame_data[k]->stereo_config_idx = -1;
  370|  88.5k|        ptr_frame_data[k]->inter_tes_flag = 0;
  371|  88.5k|        ptr_frame_data[k]->sbr_mode = ORIG_SBR;
  372|  88.5k|      }
  373|   431k|    }
  374|       |
  375|   215k|    if (init_flag) {
  ------------------
  |  Branch (375:9): [True: 1.76k, False: 213k]
  ------------------
  376|  1.76k|      ptr_frame_data[1]->reset_flag = 1;
  377|  1.76k|      ptr_frame_data[0]->reset_flag = 1;
  378|  1.76k|    }
  379|       |
  380|   525k|    for (k = 0; k < *codec_num_channels; k++) {
  ------------------
  |  Branch (380:17): [True: 309k, False: 215k]
  ------------------
  381|   309k|      ptr_header_data[k]->usac_flag = self->aot_usac_flag;
  382|   309k|      ptr_header_data[k]->enh_sbr = self->enh_sbr;
  383|   309k|      ptr_header_data[k]->enh_sbr_ps =
  384|   309k|          ((self->enh_sbr_ps) | (ptr_header_data[k]->channel_mode == PS_STEREO));
  ------------------
  |  |   29|   309k|#define PS_STEREO 3
  ------------------
  385|       |
  386|   309k|      ptr_header_data[k]->usac_independency_flag = self->usac_independency_flag;
  387|   309k|      ptr_header_data[k]->hbe_flag = self->hbe_flag;
  388|   309k|      ptr_header_data[k]->pvc_flag = self->pvc_flag;
  389|       |
  390|   309k|      if (!usac_flag) {
  ------------------
  |  Branch (390:11): [True: 66.7k, False: 243k]
  ------------------
  391|  66.7k|        ptr_header_data[k]->usac_independency_flag = 0;
  392|  66.7k|        ptr_header_data[k]->hbe_flag = 0;
  393|  66.7k|        ptr_header_data[k]->pvc_flag = 0;
  394|  66.7k|      }
  395|   309k|      if (self->enh_sbr)
  ------------------
  |  Branch (395:11): [True: 309k, False: 0]
  ------------------
  396|   309k|      {
  397|   309k|        ptr_header_data[k]->esbr_hq = self->esbr_hq;
  398|   309k|      }
  399|       |
  400|   309k|      if (!usac_flag && (!(audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (400:11): [True: 66.7k, False: 243k]
  |  Branch (400:28): [True: 50.6k, False: 16.1k]
  ------------------
  401|  16.1k|          audio_object_type == AOT_ER_AAC_LD)) && self->enh_sbr) {
  ------------------
  |  Branch (401:11): [True: 0, False: 16.1k]
  |  Branch (401:51): [True: 16.1k, False: 0]
  ------------------
  402|  16.1k|        ptr_header_data[k]->hbe_flag = 1;
  403|  16.1k|      }
  404|   309k|    }
  405|       |
  406|   215k|    initial_sync_state = ptr_header_data[0]->sync_state;
  407|       |
  408|   215k|    low_pow_flag = !usac_flag;
  409|   215k|    self->pstr_sbr_tables->sbr_rand_ph = self->pstr_sbr_tables->env_calc_tables_ptr->sbr_rand_ph;
  410|       |
  411|   215k|    if (ps_enable) {
  ------------------
  |  Branch (411:9): [True: 44.1k, False: 171k]
  ------------------
  412|  44.1k|      if (num_channels == 1) {
  ------------------
  |  Branch (412:11): [True: 21.6k, False: 22.4k]
  ------------------
  413|  21.6k|        low_pow_flag = 0;
  414|  21.6k|      }
  415|  44.1k|    }
  416|       |
  417|   215k|    if (audio_object_type == AOT_ER_AAC_ELD || (ps_enable && heaac_mps_present)) {
  ------------------
  |  Branch (417:9): [True: 28.3k, False: 187k]
  |  Branch (417:49): [True: 15.7k, False: 171k]
  |  Branch (417:62): [True: 1.04k, False: 14.7k]
  ------------------
  418|  29.3k|      low_pow_flag = 0;
  419|  29.3k|    }
  420|       |
  421|   215k|    prev_stereo = (ptr_header_data[0]->channel_mode == SBR_STEREO);
  ------------------
  |  |   28|   215k|#define SBR_STEREO 2
  ------------------
  422|       |
  423|   215k|    if (ps_enable) prev_ps_flag = (ptr_header_data[0]->channel_mode == PS_STEREO);
  ------------------
  |  |   29|  44.1k|#define PS_STEREO 3
  ------------------
  |  Branch (423:9): [True: 44.1k, False: 171k]
  ------------------
  424|       |
  425|   215k|    ptr_header_data[0]->err_flag_prev = ptr_header_data[0]->err_flag;
  426|       |
  427|   215k|    if (p_sbr_bit_stream->no_elements == 0) {
  ------------------
  |  Branch (427:9): [True: 76, False: 215k]
  ------------------
  428|     76|      frame_status = 0;
  429|     76|      ptr_header_data[0]->sync_state = UPSAMPLING;
  ------------------
  |  |   24|     76|#define UPSAMPLING 1
  ------------------
  430|     76|      if (num_channels == 2) ptr_header_data[1]->sync_state = UPSAMPLING;
  ------------------
  |  |   24|     17|#define UPSAMPLING 1
  ------------------
  |  Branch (430:11): [True: 17, False: 59]
  ------------------
  431|     76|    }
  432|       |
  433|   215k|    if ((usac_flag)) {
  ------------------
  |  Branch (433:9): [True: 171k, False: 44.2k]
  ------------------
  434|   171k|      if ((p_sbr_bit_stream->no_elements) && (p_sbr_bit_stream->str_sbr_ele->size_payload > 0)) {
  ------------------
  |  Branch (434:11): [True: 171k, False: 0]
  |  Branch (434:46): [True: 170k, False: 1.26k]
  ------------------
  435|   170k|        num_elements = p_sbr_bit_stream->no_elements;
  436|   170k|      } else {
  437|  1.26k|        num_elements = 0;
  438|  1.26k|      }
  439|   171k|    }
  440|       |
  441|   429k|    for (k = 0; k < num_elements; k++) {
  ------------------
  |  Branch (441:17): [True: 214k, False: 215k]
  ------------------
  442|   214k|      struct ia_bit_buf_struct local_bit_buf = {0};
  443|   214k|      ia_sbr_element_stream_struct *ptr_bit_str_ele = &p_sbr_bit_stream->str_sbr_ele[k];
  444|   214k|      ele_channels = (p_sbr_bit_stream->str_sbr_ele[0].sbr_ele_id == SBR_ID_CPE) ? 2 : 1;
  ------------------
  |  Branch (444:22): [True: 72.2k, False: 142k]
  ------------------
  445|   214k|      if (!frame_status && ptr_header_data[k]->sync_state == SBR_ACTIVE && ec_flag) {
  ------------------
  |  |   25|   214k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (445:11): [True: 0, False: 214k]
  |  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|   214k|      switch (ptr_bit_str_ele->sbr_ele_id) {
  450|   136k|        case SBR_ID_SCE:
  ------------------
  |  Branch (450:9): [True: 136k, False: 78.2k]
  ------------------
  451|   142k|        case SBR_ID_CCE:
  ------------------
  |  Branch (451:9): [True: 5.97k, False: 208k]
  ------------------
  452|   142k|          if (num_channels == 2) {
  ------------------
  |  Branch (452:15): [True: 21.9k, False: 120k]
  ------------------
  453|  21.9k|            dual_mono = 1;
  454|  21.9k|          }
  455|   142k|          stereo = 0;
  456|   142k|          break;
  457|  72.2k|        case SBR_ID_CPE:
  ------------------
  |  Branch (457:9): [True: 72.2k, False: 142k]
  ------------------
  458|  72.2k|          stereo = 1;
  459|  72.2k|          ptr_header_data[1] = ptr_header_data[0];
  460|       |
  461|  72.2k|          memcpy(self->pstr_sbr_header[1], self->pstr_sbr_header[0],
  462|  72.2k|                 sizeof(ia_sbr_header_data_struct));
  463|  72.2k|          break;
  464|      0|        default:
  ------------------
  |  Branch (464:9): [True: 0, False: 214k]
  ------------------
  465|      0|          frame_status = 0;
  466|   214k|      }
  467|       |
  468|   214k|      if (frame_status) {
  ------------------
  |  Branch (468:11): [True: 214k, False: 0]
  ------------------
  469|   214k|        if (!usac_flag) {
  ------------------
  |  Branch (469:13): [True: 44.2k, False: 170k]
  ------------------
  470|  44.2k|          if (!(audio_object_type == AOT_ER_AAC_LD || audio_object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (470:17): [True: 0, False: 44.2k]
  |  Branch (470:55): [True: 28.3k, False: 15.8k]
  ------------------
  471|  15.8k|              && self->enh_sbr) {
  ------------------
  |  Branch (471:18): [True: 15.8k, False: 0]
  ------------------
  472|  15.8k|            WORD8 tmp[1024];
  473|  15.8k|            WORD32 tmp_payload;
  474|  15.8k|            memcpy(&tmp[0], ptr_bit_str_ele->ptr_sbr_data, ptr_bit_str_ele->size_payload);
  475|  15.8k|            memcpy(ptr_bit_str_ele->ptr_sbr_data, ptr_bit_str_ele->ptr_prev_sbr_data,
  476|  15.8k|                   ptr_bit_str_ele->prev_size_payload);
  477|  15.8k|            memcpy(ptr_bit_str_ele->ptr_prev_sbr_data, &tmp[0], ptr_bit_str_ele->size_payload);
  478|  15.8k|            tmp_payload = ptr_bit_str_ele->size_payload;
  479|  15.8k|            ptr_bit_str_ele->size_payload = ptr_bit_str_ele->prev_size_payload;
  480|  15.8k|            ptr_bit_str_ele->prev_size_payload = tmp_payload;
  481|  15.8k|          }
  482|  44.2k|          if (!ptr_bit_str_ele->size_payload) {
  ------------------
  |  Branch (482:15): [True: 923, False: 43.2k]
  ------------------
  483|    923|            continue;
  484|    923|          }
  485|       |
  486|  43.2k|          ixheaacd_create_init_bit_buf(&local_bit_buf, (UWORD8 *)ptr_bit_str_ele->ptr_sbr_data,
  487|  43.2k|                                       ptr_bit_str_ele->size_payload);
  488|  43.2k|          it_bit_buff = &local_bit_buf;
  489|  43.2k|          it_bit_buff->xaac_jmp_buf = self->xaac_jmp_buf;
  490|  43.2k|          total_bits_left = it_bit_buff->cnt_bits;
  491|       |
  492|  43.2k|          if (audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (492:15): [True: 28.3k, False: 14.9k]
  ------------------
  493|  28.3k|            if (eld_sbr_flag != 1) {
  ------------------
  |  Branch (493:17): [True: 0, False: 28.3k]
  ------------------
  494|      0|              ixheaacd_read_bits_buf(&local_bit_buf, LEN_NIBBLE);
  ------------------
  |  |  230|      0|#define LEN_NIBBLE (4)
  ------------------
  495|      0|            }
  496|  28.3k|          } else {
  497|  14.9k|            ixheaacd_read_bits_buf(&local_bit_buf, LEN_NIBBLE);
  ------------------
  |  |  230|  14.9k|#define LEN_NIBBLE (4)
  ------------------
  498|  14.9k|          }
  499|  43.2k|        }
  500|   213k|        if (ptr_bit_str_ele->extension_type == SBR_EXTENSION_CRC) {
  ------------------
  |  |   27|   213k|#define SBR_EXTENSION_CRC 14
  ------------------
  |  Branch (500:13): [True: 9.59k, False: 203k]
  ------------------
  501|  9.59k|          WORD32 crc_bits = 0;
  502|  9.59k|          WORD32 crc_check_flag = 0;
  503|  9.59k|          crc_check_flag = 1;
  504|  9.59k|          crc_bits = (((ptr_bit_str_ele->size_payload - 1) << 3) + (4 - SBR_CYC_REDCY_CHK_BITS));
  ------------------
  |  |   33|  9.59k|#define SBR_CYC_REDCY_CHK_BITS 10
  ------------------
  505|       |
  506|  9.59k|          if (crc_bits < 0) {
  ------------------
  |  Branch (506:15): [True: 15, False: 9.58k]
  ------------------
  507|     15|            crc_check_flag = 0;
  508|     15|            frame_status = 0;
  509|     15|          }
  510|  9.59k|          if (crc_check_flag) frame_status = ixheaacd_sbr_crccheck(it_bit_buff, crc_bits);
  ------------------
  |  Branch (510:15): [True: 9.58k, False: 15]
  ------------------
  511|  9.59k|        }
  512|       |
  513|   213k|        if (!usac_flag) header_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  ------------------
  |  Branch (513:13): [True: 43.2k, False: 170k]
  ------------------
  514|       |
  515|   213k|        if (audio_object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (515:13): [True: 185k, False: 28.3k]
  ------------------
  516|   185k|          if (header_flag) {
  ------------------
  |  Branch (516:15): [True: 170k, False: 14.1k]
  ------------------
  517|   170k|            header_flag = ixheaacd_sbr_read_header_data(ptr_header_data[k], it_bit_buff, stereo,
  518|   170k|                                                        ptr_sbr_dflt_header);
  519|   170k|            if (usac_flag) {
  ------------------
  |  Branch (519:17): [True: 170k, False: 799]
  ------------------
  520|   170k|              if ((self->ptr_pvc_data_str->prev_pvc_mode == 0) &&
  ------------------
  |  Branch (520:19): [True: 87.9k, False: 82.1k]
  ------------------
  521|  87.9k|                  (ptr_header_data[k]->pvc_mode != 0)) {
  ------------------
  |  Branch (521:19): [True: 2.19k, False: 85.7k]
  ------------------
  522|  2.19k|                self->ptr_pvc_data_str->prev_pvc_id = 0;
  523|  2.19k|              }
  524|   170k|              self->ptr_pvc_data_str->prev_pvc_mode = ptr_header_data[k]->pvc_mode;
  525|   170k|              if (ptr_header_data[k]->pvc_mode == 0) {
  ------------------
  |  Branch (525:19): [True: 86.8k, False: 83.2k]
  ------------------
  526|  86.8k|                ptr_frame_data[k]->sbr_mode = ORIG_SBR;
  527|  86.8k|              } else {
  528|  83.2k|                ptr_frame_data[k]->sbr_mode = PVC_SBR;
  529|  83.2k|              }
  530|   170k|            }
  531|   170k|            if (header_flag == SBR_RESET) {
  ------------------
  |  |   31|   170k|#define SBR_RESET 1
  ------------------
  |  Branch (531:17): [True: 35.8k, False: 135k]
  ------------------
  532|  35.8k|              err = ixheaacd_calc_frq_bnd_tbls(ptr_header_data[k],
  533|       |
  534|  35.8k|                                               self->pstr_common_tables);
  535|  35.8k|              if (!err) {
  ------------------
  |  Branch (535:19): [True: 35.6k, False: 148]
  ------------------
  536|  35.6k|                WORD32 lr;
  537|  35.6k|                WORD32 lr1 = ps_enable ? 2 : num_channels;
  ------------------
  |  Branch (537:30): [True: 278, False: 35.4k]
  ------------------
  538|  84.6k|                for (lr = 0; lr < lr1; lr++) {
  ------------------
  |  Branch (538:30): [True: 48.9k, False: 35.6k]
  ------------------
  539|  48.9k|                  if (ldmps_present != 1) ptr_frame_data[lr]->reset_flag = 1;
  ------------------
  |  Branch (539:23): [True: 48.9k, False: 0]
  ------------------
  540|  48.9k|                  if ((SBR_NOT_INITIALIZED == ptr_header_data[lr]->sync_state) && !usac_flag) {
  ------------------
  |  |   23|  48.9k|#define SBR_NOT_INITIALIZED 0
  ------------------
  |  Branch (540:23): [True: 15.7k, False: 33.2k]
  |  Branch (540:83): [True: 270, False: 15.4k]
  ------------------
  541|    270|                    ptr_frame_data[lr]->sbr_patching_mode = 1;
  542|    270|                    ptr_frame_data[lr]->over_sampling_flag = 0;
  543|    270|                    ptr_frame_data[lr]->pitch_in_bins = 0;
  544|    270|                    ptr_header_data[lr]->pre_proc_flag = 0;
  545|    270|                  }
  546|  48.9k|                  err |= ixheaacd_sbr_dec_reset(
  547|  48.9k|                      &(pstr_sbr_channel[lr]->str_sbr_dec), ptr_header_data[k], low_pow_flag,
  548|  48.9k|                      self->pstr_common_tables, ptr_frame_data[k]->pitch_in_bins,
  549|  48.9k|                      audio_object_type, sbr_scratch_struct->ptr_work_buf_core);
  550|  48.9k|                  if (err < 0) return err;
  ------------------
  |  Branch (550:23): [True: 3, False: 48.9k]
  ------------------
  551|  48.9k|                }
  552|  35.6k|              }
  553|       |
  554|  35.8k|              if (err == 0) {
  ------------------
  |  Branch (554:19): [True: 35.6k, False: 148]
  ------------------
  555|  35.6k|                ptr_header_data[k]->sync_state = SBR_ACTIVE;
  ------------------
  |  |   25|  35.6k|#define SBR_ACTIVE 2
  ------------------
  556|  35.6k|              }
  557|  35.8k|            }
  558|   170k|          }
  559|   185k|        } else {
  560|  28.3k|          if (header_flag) {
  ------------------
  |  Branch (560:15): [True: 8.08k, False: 20.2k]
  ------------------
  561|  8.08k|            header_flag = ixheaacd_sbr_read_header_data(ptr_header_data[k], it_bit_buff, stereo,
  562|  8.08k|                                                        ptr_sbr_dflt_header);
  563|  8.08k|            if (usac_flag) {
  ------------------
  |  Branch (563:17): [True: 0, False: 8.08k]
  ------------------
  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|  8.08k|            if (header_flag == SBR_RESET) {
  ------------------
  |  |   31|  8.08k|#define SBR_RESET 1
  ------------------
  |  Branch (576:17): [True: 6.69k, False: 1.39k]
  ------------------
  577|  6.69k|              err = ixheaacd_calc_frq_bnd_tbls(ptr_header_data[k],
  578|       |
  579|  6.69k|                                               self->pstr_common_tables);
  580|  6.69k|              if (err) {
  ------------------
  |  Branch (580:19): [True: 103, False: 6.58k]
  ------------------
  581|    103|                return err;
  582|    103|              }
  583|  6.69k|            }
  584|  8.08k|          }
  585|       |
  586|  28.2k|          {
  587|  28.2k|            WORD32 lr;
  588|  28.2k|            WORD32 lr1 = ps_enable ? 2 : num_channels;
  ------------------
  |  Branch (588:26): [True: 28.2k, False: 4]
  ------------------
  589|  84.6k|            for (lr = 0; lr < lr1; lr++) {
  ------------------
  |  Branch (589:26): [True: 56.4k, False: 28.2k]
  ------------------
  590|  56.4k|              if (ldmps_present != 1) ptr_frame_data[lr]->reset_flag = 1;
  ------------------
  |  Branch (590:19): [True: 51.4k, False: 4.94k]
  ------------------
  591|  56.4k|              if (ptr_header_data[k]->status) {
  ------------------
  |  Branch (591:19): [True: 16.8k, False: 39.5k]
  ------------------
  592|  16.8k|                err |= ixheaacd_sbr_dec_reset(
  593|  16.8k|                    &(pstr_sbr_channel[lr]->str_sbr_dec), ptr_header_data[k], low_pow_flag,
  594|  16.8k|                    self->pstr_common_tables, ptr_frame_data[k]->pitch_in_bins, audio_object_type,
  595|  16.8k|                    sbr_scratch_struct->ptr_work_buf_core);
  596|  16.8k|                if (err < 0) return err;
  ------------------
  |  Branch (596:21): [True: 13, False: 16.8k]
  ------------------
  597|  16.8k|              }
  598|  56.4k|            }
  599|  28.2k|            ptr_header_data[k]->status = 0;
  600|  28.2k|          }
  601|       |
  602|  28.2k|          if (err == 0) {
  ------------------
  |  Branch (602:15): [True: 28.1k, False: 4]
  ------------------
  603|  28.1k|            ptr_header_data[k]->sync_state = SBR_ACTIVE;
  ------------------
  |  |   25|  28.1k|#define SBR_ACTIVE 2
  ------------------
  604|  28.1k|          }
  605|  28.2k|        }
  606|   213k|      }
  607|       |
  608|   213k|      if (err || (ptr_header_data[k]->sync_state == SBR_NOT_INITIALIZED)) {
  ------------------
  |  |   23|   213k|#define SBR_NOT_INITIALIZED 0
  ------------------
  |  Branch (608:11): [True: 160, False: 213k]
  |  Branch (608:18): [True: 2.44k, False: 210k]
  ------------------
  609|  2.59k|        WORD32 lr1 = ps_enable ? 2 : num_channels;
  ------------------
  |  Branch (609:22): [True: 2.43k, False: 158]
  ------------------
  610|  2.59k|        ixheaacd_prepare_upsamp(ptr_header_data, pstr_sbr_channel, lr1);
  611|  2.59k|        if (err) return err;
  ------------------
  |  Branch (611:13): [True: 148, False: 2.44k]
  ------------------
  612|  2.59k|      }
  613|       |
  614|   213k|      if (frame_status && (ptr_header_data[k]->sync_state == SBR_ACTIVE)) {
  ------------------
  |  |   25|   203k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (614:11): [True: 203k, False: 9.54k]
  |  Branch (614:27): [True: 202k, False: 1.49k]
  ------------------
  615|   202k|        if (stereo) {
  ------------------
  |  Branch (615:13): [True: 70.4k, False: 131k]
  ------------------
  616|  70.4k|          frame_status = ixheaacd_sbr_read_cpe(ptr_header_data[0], ptr_frame_data, it_bit_buff,
  617|  70.4k|                                               self->pstr_sbr_tables, audio_object_type);
  618|  70.4k|          if (usac_flag && (frame_status == 0)) return -1;
  ------------------
  |  Branch (618:15): [True: 49.6k, False: 20.7k]
  |  Branch (618:28): [True: 47, False: 49.6k]
  ------------------
  619|  70.4k|          if (frame_status < 0) return frame_status;
  ------------------
  |  Branch (619:15): [True: 7, False: 70.4k]
  ------------------
  620|   131k|        } else {
  621|   131k|          if (ps_enable) {
  ------------------
  |  Branch (621:15): [True: 11.4k, False: 120k]
  ------------------
  622|  11.4k|            if (down_mix_flag) {
  ------------------
  |  Branch (622:17): [True: 0, False: 11.4k]
  ------------------
  623|      0|              self->pstr_ps_stereo_dec->force_mono = 1;
  624|  11.4k|            } else {
  625|  11.4k|              self->pstr_ps_stereo_dec->force_mono = 0;
  626|  11.4k|            }
  627|   120k|          } else {
  628|   120k|            self->pstr_ps_stereo_dec = 0;
  629|   120k|          }
  630|   131k|          if (ptr_frame_data[k]->sbr_mode == ORIG_SBR) {
  ------------------
  |  Branch (630:15): [True: 65.0k, False: 66.6k]
  ------------------
  631|  65.0k|            frame_status = ixheaacd_sbr_read_sce(
  632|  65.0k|                ptr_header_data[k], ptr_frame_data[k], self->pstr_ps_stereo_dec, it_bit_buff,
  633|  65.0k|                self->pstr_sbr_tables, audio_object_type, ec_flag);
  634|  65.0k|            if (usac_flag && (frame_status == 0)) return -1;
  ------------------
  |  Branch (634:17): [True: 53.5k, False: 11.4k]
  |  Branch (634:30): [True: 53, False: 53.4k]
  ------------------
  635|  64.9k|            if (frame_status < 0) return frame_status;
  ------------------
  |  Branch (635:17): [True: 7, False: 64.9k]
  ------------------
  636|  64.9k|            if (ec_flag && self->pstr_ps_stereo_dec != NULL) {
  ------------------
  |  Branch (636:17): [True: 0, False: 64.9k]
  |  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|  66.6k|          } else if (ptr_frame_data[k]->sbr_mode == PVC_SBR) {
  ------------------
  |  Branch (640:22): [True: 66.6k, False: 0]
  ------------------
  641|  66.6k|            frame_status = ixheaacd_sbr_read_pvc_sce(
  642|  66.6k|                ptr_frame_data[k], it_bit_buff, ptr_header_data[k]->hbe_flag,
  643|  66.6k|                self->ptr_pvc_data_str, self->pstr_sbr_tables, ptr_header_data[k]);
  644|  66.6k|            if (frame_status < 0) return frame_status;
  ------------------
  |  Branch (644:17): [True: 51, False: 66.5k]
  ------------------
  645|  66.6k|          }
  646|   131k|        }
  647|   201k|        ptr_header_data[k]->enh_sbr_ps =
  648|   201k|            ((self->enh_sbr_ps) | (ptr_header_data[0]->channel_mode == PS_STEREO));
  ------------------
  |  |   29|   201k|#define PS_STEREO 3
  ------------------
  649|   201k|        if ((audio_object_type != AOT_ER_AAC_ELD) && (audio_object_type != AOT_USAC)) {
  ------------------
  |  Branch (649:13): [True: 176k, False: 25.4k]
  |  Branch (649:54): [True: 6.83k, False: 169k]
  ------------------
  650|  6.83k|          WORD32 total_bits_read;
  651|  6.83k|          total_bits_read = ixheaacd_no_bits_read(it_bit_buff);
  ------------------
  |  |  128|  6.83k|  ((it_bit_buff)->size - (it_bit_buff)->cnt_bits)
  ------------------
  652|  6.83k|          if (total_bits_read > (ptr_bit_str_ele->size_payload << 3) ||
  ------------------
  |  Branch (652:15): [True: 0, False: 6.83k]
  ------------------
  653|  6.83k|              total_bits_read < ((ptr_bit_str_ele->size_payload << 3) - 8)) {
  ------------------
  |  Branch (653:15): [True: 5.37k, False: 1.46k]
  ------------------
  654|  5.37k|            frame_status = 0;
  655|  5.37k|          }
  656|  6.83k|          if (ec_flag) {
  ------------------
  |  Branch (656:15): [True: 0, False: 6.83k]
  ------------------
  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|  6.83k|        }
  664|   201k|      }
  665|   212k|      if ((ldmps_present == 1) && (it_bit_buff)) {
  ------------------
  |  Branch (665:11): [True: 2.45k, False: 210k]
  |  Branch (665:35): [True: 2.45k, False: 0]
  ------------------
  666|  2.45k|        WORD32 bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
  667|  2.45k|        self->ptr_mps_data = (WORD8 *)it_bit_buff->ptr_read_next;
  668|  2.45k|        self->left_mps_bits = (total_bits_left - bits_decoded);
  669|  2.45k|        self->mps_bits_pos = it_bit_buff->bit_pos;
  670|  2.45k|      }
  671|   212k|      if (ec_flag) {
  ------------------
  |  Branch (671:11): [True: 0, False: 212k]
  ------------------
  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|   212k|    }
  682|       |
  683|   215k|    if (!usac_flag) {
  ------------------
  |  Branch (683:9): [True: 43.8k, False: 171k]
  ------------------
  684|  43.8k|      if (!frame_status || (ptr_header_data[0]->sync_state != SBR_ACTIVE) ||
  ------------------
  |  |   25|  28.8k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (684:11): [True: 14.9k, False: 28.8k]
  |  Branch (684:28): [True: 2.42k, False: 26.3k]
  ------------------
  685|  26.6k|          ptr_header_data[0]->err_flag) {
  ------------------
  |  Branch (685:11): [True: 9.25k, False: 17.1k]
  ------------------
  686|  26.6k|        ptr_header_data[0]->err_flag = 1;
  687|  26.6k|        stereo = (num_channels == 2) ? 1 : 0;
  ------------------
  |  Branch (687:18): [True: 10.7k, False: 15.9k]
  ------------------
  688|  26.6k|        if (ptr_header_data[0]->channel_mode == 0) {
  ------------------
  |  Branch (688:13): [True: 1.48k, False: 25.1k]
  ------------------
  689|  1.48k|          ptr_header_data[0]->channel_mode = stereo ? SBR_STEREO : SBR_MONO;
  ------------------
  |  |   28|    405|#define SBR_STEREO 2
  ------------------
                        ptr_header_data[0]->channel_mode = stereo ? SBR_STEREO : SBR_MONO;
  ------------------
  |  |   27|  2.56k|#define SBR_MONO 1
  ------------------
  |  Branch (689:46): [True: 405, False: 1.08k]
  ------------------
  690|  1.48k|        }
  691|  26.6k|      }
  692|       |
  693|  43.8k|      if (!(stereo || dual_mono)) {
  ------------------
  |  Branch (693:13): [True: 22.1k, False: 21.6k]
  |  Branch (693:23): [True: 0, False: 21.6k]
  ------------------
  694|  21.6k|        ptr_frame_data[0]->coupling_mode = COUPLING_OFF;
  ------------------
  |  |   38|  21.6k|#define COUPLING_OFF 0
  ------------------
  695|  21.6k|        ptr_frame_data[1]->coupling_mode = COUPLING_OFF;
  ------------------
  |  |   38|  21.6k|#define COUPLING_OFF 0
  ------------------
  696|  21.6k|      }
  697|       |
  698|  43.8k|      if (ptr_header_data[0]->sync_state == SBR_NOT_INITIALIZED && (!ec_flag || init_flag)) {
  ------------------
  |  |   23|  87.6k|#define SBR_NOT_INITIALIZED 0
  ------------------
  |  Branch (698:11): [True: 923, False: 42.8k]
  |  Branch (698:69): [True: 923, False: 0]
  |  Branch (698:81): [True: 0, False: 0]
  ------------------
  699|    923|        WORD32 lr1 = ps_enable ? 2 : num_channels;
  ------------------
  |  Branch (699:22): [True: 844, False: 79]
  ------------------
  700|    923|        ixheaacd_prepare_upsamp(ptr_header_data, pstr_sbr_channel, lr1);
  701|    923|      }
  702|  43.8k|    }
  703|       |
  704|   215k|    if (ptr_header_data[0]->sync_state == SBR_ACTIVE) {
  ------------------
  |  |   25|   215k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (704:9): [True: 210k, False: 4.36k]
  ------------------
  705|   210k|      if (ptr_frame_data[0]->sbr_mode == PVC_SBR) {
  ------------------
  |  Branch (705:11): [True: 83.7k, False: 127k]
  ------------------
  706|  83.7k|        err = ixheaacd_dec_sbrdata_for_pvc(ptr_header_data[0], ptr_frame_data[0],
  707|  83.7k|                                           pstr_sbr_channel[0]->pstr_prev_frame_data,
  708|  83.7k|                                           audio_object_type);
  709|  83.7k|        if (err) return err;
  ------------------
  |  Branch (709:13): [True: 0, False: 83.7k]
  ------------------
  710|   127k|      } else if (ptr_frame_data[0]->sbr_mode == ORIG_SBR) {
  ------------------
  |  Branch (710:18): [True: 127k, False: 0]
  ------------------
  711|   127k|        err = ixheaacd_dec_sbrdata(
  712|   127k|            ptr_header_data[0], ptr_header_data[1], ptr_frame_data[0],
  713|   127k|            pstr_sbr_channel[0]->pstr_prev_frame_data,
  714|   127k|            (stereo || dual_mono) ? ptr_frame_data[1] : NULL,
  ------------------
  |  Branch (714:14): [True: 55.1k, False: 71.9k]
  |  Branch (714:24): [True: 3.53k, False: 68.4k]
  ------------------
  715|   127k|            (stereo || dual_mono) ? pstr_sbr_channel[1]->pstr_prev_frame_data : NULL,
  ------------------
  |  Branch (715:14): [True: 55.1k, False: 71.9k]
  |  Branch (715:24): [True: 3.53k, False: 68.4k]
  ------------------
  716|   127k|            self->pstr_common_tables, ldmps_present, audio_object_type, ec_flag);
  717|       |
  718|   127k|        if (err) return err;
  ------------------
  |  Branch (718:13): [True: 17, False: 127k]
  ------------------
  719|   127k|      }
  720|       |
  721|   210k|      if (ptr_header_data[0]->channel_mode == PS_STEREO &&
  ------------------
  |  |   29|   421k|#define PS_STEREO 3
  ------------------
  |  Branch (721:11): [True: 11.2k, False: 199k]
  ------------------
  722|  11.2k|          (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD)) {
  ------------------
  |  Branch (722:12): [True: 9.88k, False: 1.33k]
  |  Branch (722:51): [True: 9.88k, False: 0]
  ------------------
  723|  9.88k|        ixheaacd_decode_ps_data(self->pstr_ps_stereo_dec, frame_size);
  724|  9.88k|        ps_flag = 1;
  725|  9.88k|        self->ps_present = ps_flag;
  726|  9.88k|      }
  727|   210k|      if (ptr_header_data[0]->enh_sbr_ps && self->enh_sbr) {
  ------------------
  |  Branch (727:11): [True: 11.2k, False: 199k]
  |  Branch (727:45): [True: 11.2k, False: 0]
  ------------------
  728|  11.2k|        ps_flag = 1;
  729|  11.2k|        self->ps_present = ps_flag;
  730|  11.2k|      }
  731|   210k|      ptr_frame_data[0]->max_qmf_subband_aac =
  732|   210k|          ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
  733|   210k|      if (stereo) {
  ------------------
  |  Branch (733:11): [True: 71.6k, False: 139k]
  ------------------
  734|  71.6k|        ptr_frame_data[1]->max_qmf_subband_aac =
  735|  71.6k|            ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
  736|  71.6k|      }
  737|   210k|      if (ldmps_present == 1) {
  ------------------
  |  Branch (737:11): [True: 2.45k, False: 208k]
  ------------------
  738|  2.45k|        ptr_frame_data[0]->rate = 1;
  739|  2.45k|        if (stereo) {
  ------------------
  |  Branch (739:13): [True: 1.82k, False: 631]
  ------------------
  740|  1.82k|          ptr_frame_data[1]->rate = 1;
  741|  1.82k|        }
  742|  2.45k|      }
  743|   210k|    }
  744|   215k|    if (audio_object_type == AOT_ER_AAC_ELD && ec_flag) {
  ------------------
  |  Branch (744:9): [True: 27.8k, False: 187k]
  |  Branch (744:48): [True: 0, False: 27.8k]
  ------------------
  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|   215k|    } else {
  749|   215k|      if (audio_object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (749:11): [True: 186k, False: 28.3k]
  ------------------
  750|   186k|        if ((initial_sync_state == SBR_NOT_INITIALIZED) && ptr_header_data[0]->err_flag) {
  ------------------
  |  |   23|   186k|#define SBR_NOT_INITIALIZED 0
  ------------------
  |  Branch (750:13): [True: 12.4k, False: 174k]
  |  Branch (750:60): [True: 9.59k, False: 2.80k]
  ------------------
  751|  9.59k|          ptr_header_data[0]->sync_state = SBR_NOT_INITIALIZED;
  ------------------
  |  |   23|  9.59k|#define SBR_NOT_INITIALIZED 0
  ------------------
  752|  9.59k|        }
  753|   186k|      } else {
  754|  28.3k|        ptr_header_data[0]->sync_state = SBR_ACTIVE;
  ------------------
  |  |   25|  28.3k|#define SBR_ACTIVE 2
  ------------------
  755|  28.3k|      }
  756|   215k|    }
  757|       |
  758|   215k|    if ((num_channels == 2) && !(stereo || dual_mono)) {
  ------------------
  |  Branch (758:9): [True: 93.7k, False: 121k]
  |  Branch (758:34): [True: 71.7k, False: 21.9k]
  |  Branch (758:44): [True: 21.9k, False: 0]
  ------------------
  759|      0|      ixheaacd_downmix_to_monosbr(&core_sample_buf[slot_element], ch_fac);
  760|      0|    }
  761|       |
  762|   215k|    if ((!prev_stereo && !prev_ps_flag) && (ps_flag)) {
  ------------------
  |  Branch (762:10): [True: 195k, False: 19.4k]
  |  Branch (762:26): [True: 184k, False: 10.9k]
  |  Branch (762:44): [True: 952, False: 183k]
  ------------------
  763|    952|      WORD32 copy_size;
  764|    952|      if (down_samp_flag)
  ------------------
  |  Branch (764:11): [True: 205, False: 747]
  ------------------
  765|    205|        copy_size = QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED;
  ------------------
  |  |   39|    205|#define QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED (QMF_FILTER_STATE_SYN_SIZE / 2)
  |  |  ------------------
  |  |  |  |   32|    205|#define QMF_FILTER_STATE_SYN_SIZE 1280
  |  |  ------------------
  ------------------
  766|    747|      else
  767|    747|        copy_size = QMF_FILTER_STATE_SYN_SIZE;
  ------------------
  |  |   32|    747|#define QMF_FILTER_STATE_SYN_SIZE 1280
  ------------------
  768|       |
  769|    952|      memcpy(pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
  770|    952|             pstr_sbr_channel[0]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
  771|    952|             copy_size * sizeof(WORD16));
  772|       |
  773|    952|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale =
  774|    952|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale;
  775|    952|    }
  776|       |
  777|   215k|    if ((!prev_stereo && stereo && (num_channels == 2)) &&
  ------------------
  |  Branch (777:10): [True: 195k, False: 19.4k]
  |  Branch (777:26): [True: 52.9k, False: 142k]
  |  Branch (777:36): [True: 52.9k, False: 0]
  ------------------
  778|  52.9k|        (audio_object_type != AOT_ER_AAC_ELD)) {
  ------------------
  |  Branch (778:9): [True: 49.7k, False: 3.15k]
  ------------------
  779|  49.7k|      WORD32 copy_size;
  780|  49.7k|      if (down_samp_flag)
  ------------------
  |  Branch (780:11): [True: 30, False: 49.7k]
  ------------------
  781|     30|        copy_size = QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED;
  ------------------
  |  |   39|     30|#define QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED (QMF_FILTER_STATE_SYN_SIZE / 2)
  |  |  ------------------
  |  |  |  |   32|     30|#define QMF_FILTER_STATE_SYN_SIZE 1280
  |  |  ------------------
  ------------------
  782|  49.7k|      else
  783|  49.7k|        copy_size = QMF_FILTER_STATE_SYN_SIZE;
  ------------------
  |  |   32|  49.7k|#define QMF_FILTER_STATE_SYN_SIZE 1280
  ------------------
  784|       |
  785|  49.7k|      memcpy(pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
  786|  49.7k|             pstr_sbr_channel[0]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
  787|  49.7k|             copy_size * sizeof(WORD16));
  788|       |
  789|  49.7k|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale =
  790|  49.7k|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale;
  791|       |
  792|  49.7k|      memcpy(pstr_sbr_channel[1]->str_sbr_dec.str_codec_qmf_bank.anal_filter_states,
  793|  49.7k|             pstr_sbr_channel[0]->str_sbr_dec.str_codec_qmf_bank.anal_filter_states,
  794|  49.7k|             QMF_FILTER_STATE_ANA_SIZE * sizeof(WORD16));
  ------------------
  |  |   33|  49.7k|#define QMF_FILTER_STATE_ANA_SIZE 320
  ------------------
  795|       |
  796|  49.7k|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_lb_scale =
  797|  49.7k|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_lb_scale;
  798|       |
  799|  49.7k|      memcpy(pstr_sbr_channel[1]->str_sbr_dec.ptr_sbr_overlap_buf,
  800|  49.7k|             pstr_sbr_channel[0]->str_sbr_dec.ptr_sbr_overlap_buf,
  801|  49.7k|             MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32));
  ------------------
  |  |   70|  49.7k|#define MAX_OV_COLS 6
  ------------------
                           MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32));
  ------------------
  |  |   34|  49.7k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  802|       |
  803|  49.7k|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.ov_lb_scale =
  804|  49.7k|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.ov_lb_scale;
  805|  49.7k|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.ov_hb_scale =
  806|  49.7k|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.ov_hb_scale;
  807|  49.7k|    }
  808|   215k|    pstr_sbr_channel[0]->str_sbr_dec.time_sample_buf = self->time_sample_buf[0];
  809|   215k|    if (self->pstr_ps_stereo_dec != NULL &&
  ------------------
  |  Branch (809:9): [True: 93.6k, False: 121k]
  ------------------
  810|  93.6k|        (ps_enable || self->enh_sbr_ps) && self->enh_sbr) {
  ------------------
  |  Branch (810:10): [True: 43.6k, False: 50.0k]
  |  Branch (810:23): [True: 0, False: 50.0k]
  |  Branch (810:44): [True: 43.6k, False: 0]
  ------------------
  811|  43.6k|      self->pstr_ps_stereo_dec->pp_qmf_buf_real[0] =
  812|  43.6k|          pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_real;
  813|  43.6k|      self->pstr_ps_stereo_dec->pp_qmf_buf_imag[0] =
  814|  43.6k|          pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_imag;
  815|  43.6k|      self->pstr_ps_stereo_dec->pp_qmf_buf_real[1] =
  816|  43.6k|          pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_real;
  817|  43.6k|      self->pstr_ps_stereo_dec->pp_qmf_buf_imag[1] =
  818|  43.6k|          pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_imag;
  819|  43.6k|      self->pstr_ps_stereo_dec->time_sample_buf[0] = self->time_sample_buf[0];
  820|  43.6k|      self->pstr_ps_stereo_dec->time_sample_buf[1] = self->time_sample_buf[1];
  821|  43.6k|    }
  822|   215k|  } 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|   215k|  if (ec_flag) {
  ------------------
  |  Branch (863:7): [True: 0, False: 215k]
  ------------------
  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|   215k|  if (ec_flag && usac_flag && !first_frame && !self->sbr_parse_complete) {
  ------------------
  |  Branch (871:7): [True: 0, False: 215k]
  |  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|   215k|  if (!ec_flag || !first_frame || init_flag) {
  ------------------
  |  Branch (874:7): [True: 215k, False: 0]
  |  Branch (874:19): [True: 0, False: 0]
  |  Branch (874:35): [True: 0, False: 0]
  ------------------
  875|   214k|    if (pstr_drc_dec == NULL) {
  ------------------
  |  Branch (875:9): [True: 172k, False: 42.0k]
  ------------------
  876|   172k|      WORD32 err_code = 0;
  877|   172k|      err_code = ixheaacd_sbr_dec(
  878|   172k|          &pstr_sbr_channel[0]->str_sbr_dec, core_sample_buf + slot_element, ptr_header_data[0],
  879|   172k|          ptr_frame_data[0], pstr_sbr_channel[0]->pstr_prev_frame_data, self->pstr_ps_stereo_dec,
  880|   172k|          &pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank,
  881|   172k|          &pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact,
  882|   172k|          (ptr_header_data[0]->sync_state == SBR_ACTIVE), low_pow_flag,
  ------------------
  |  |   25|   172k|#define SBR_ACTIVE 2
  ------------------
  883|   172k|          sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables, self->pstr_common_tables,
  884|   172k|          ch_fac, self->ptr_pvc_data_str, 0, NULL, audio_object_type, ldmps_present, self,
  885|   172k|          heaac_mps_present, ec_flag);
  886|   172k|      if (err_code) return err_code;
  ------------------
  |  Branch (886:11): [True: 56, False: 172k]
  ------------------
  887|   172k|      if (self->enh_sbr)
  ------------------
  |  Branch (887:11): [True: 172k, False: 0]
  ------------------
  888|   172k|      {
  889|   172k|        if (!self->enh_sbr_ps) {
  ------------------
  |  Branch (889:13): [True: 172k, False: 0]
  ------------------
  890|   172k|          if ((ptr_header_data[0]->sync_state == SBR_ACTIVE) && !ptr_frame_data[0]->mps_sbr_flag
  ------------------
  |  |   25|   172k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (890:15): [True: 165k, False: 6.92k]
  |  Branch (890:65): [True: 129k, False: 36.6k]
  ------------------
  891|   129k|              && ch_fac != 2) {
  ------------------
  |  Branch (891:18): [True: 129k, False: 0]
  ------------------
  892|   129k|            ptr_header_data[0]->pstr_freq_band_data[0].qmf_sb_prev =
  893|   129k|                ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
  894|   129k|          }
  895|   172k|        } 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|   172k|      }
  902|   172k|    } else {
  903|  42.0k|      WORD32 err_code = 0;
  904|  42.0k|      err_code = ixheaacd_sbr_dec(
  905|  42.0k|          &pstr_sbr_channel[0]->str_sbr_dec, core_sample_buf + slot_element, ptr_header_data[0],
  906|  42.0k|          ptr_frame_data[0], pstr_sbr_channel[0]->pstr_prev_frame_data, self->pstr_ps_stereo_dec,
  907|  42.0k|          &pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank,
  908|  42.0k|          &pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact,
  909|  42.0k|          (ptr_header_data[0]->sync_state == SBR_ACTIVE), low_pow_flag,
  ------------------
  |  |   25|  42.0k|#define SBR_ACTIVE 2
  ------------------
  910|  42.0k|          sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables, self->pstr_common_tables,
  911|  42.0k|          ch_fac, self->ptr_pvc_data_str, pstr_drc_dec->drc_on,
  912|  42.0k|          pstr_drc_dec->str_drc_channel_data[0].drc_factors_sbr, audio_object_type, ldmps_present,
  913|  42.0k|          self, heaac_mps_present, ec_flag);
  914|  42.0k|      if (err_code) return err_code;
  ------------------
  |  Branch (914:11): [True: 48, False: 42.0k]
  ------------------
  915|  42.0k|      if (self->enh_sbr)
  ------------------
  |  Branch (915:11): [True: 42.0k, False: 0]
  ------------------
  916|  42.0k|      {
  917|  42.0k|        if (!self->enh_sbr_ps) {
  ------------------
  |  Branch (917:13): [True: 42.0k, False: 0]
  ------------------
  918|  42.0k|          if ((ptr_header_data[0]->sync_state == SBR_ACTIVE) && !ptr_frame_data[0]->mps_sbr_flag
  ------------------
  |  |   25|  42.0k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (918:15): [True: 38.9k, False: 3.06k]
  |  Branch (918:65): [True: 38.9k, False: 0]
  ------------------
  919|  38.9k|              && num_channels != 2) {
  ------------------
  |  Branch (919:18): [True: 17.9k, False: 21.0k]
  ------------------
  920|  17.9k|            ptr_header_data[0]->pstr_freq_band_data[0].qmf_sb_prev =
  921|  17.9k|                ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
  922|  17.9k|          }
  923|  42.0k|        } 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|  42.0k|      }
  930|  42.0k|    }
  931|       |
  932|   214k|    if (!down_mix_flag && (stereo || dual_mono) && (num_channels == 2)) {
  ------------------
  |  Branch (932:9): [True: 214k, False: 0]
  |  Branch (932:28): [True: 71.7k, False: 142k]
  |  Branch (932:38): [True: 21.9k, False: 120k]
  |  Branch (932:52): [True: 93.6k, False: 0]
  ------------------
  933|  93.6k|      pstr_sbr_channel[1]->str_sbr_dec.time_sample_buf = self->time_sample_buf[1];
  934|       |
  935|  93.6k|      if (ele_channels == 1 && usac_flag) {
  ------------------
  |  Branch (935:11): [True: 21.9k, False: 71.7k]
  |  Branch (935:32): [True: 21.9k, False: 0]
  ------------------
  936|  21.9k|        WORD32 err_code =
  937|  21.9k|            ixheaacd_esbr_dec(&pstr_sbr_channel[1]->str_sbr_dec, ptr_header_data[1],
  938|  21.9k|                              ptr_frame_data[1], (ptr_header_data[1]->sync_state == SBR_ACTIVE),
  ------------------
  |  |   25|  21.9k|#define SBR_ACTIVE 2
  ------------------
  939|  21.9k|                              low_pow_flag, self->pstr_sbr_tables, ch_fac);
  940|  21.9k|        if (err_code) return err_code;
  ------------------
  |  Branch (940:13): [True: 0, False: 21.9k]
  ------------------
  941|  71.7k|      } else {
  942|  71.7k|        if (pstr_drc_dec == NULL) {
  ------------------
  |  Branch (942:13): [True: 50.6k, False: 21.1k]
  ------------------
  943|  50.6k|          WORD32 err_code = ixheaacd_sbr_dec(
  944|  50.6k|              &pstr_sbr_channel[1]->str_sbr_dec, core_sample_buf + slot_element + 1,
  945|  50.6k|              ptr_header_data[1], ptr_frame_data[1], pstr_sbr_channel[1]->pstr_prev_frame_data,
  946|  50.6k|              NULL, NULL, NULL, (ptr_header_data[1]->sync_state == SBR_ACTIVE), low_pow_flag,
  ------------------
  |  |   25|  50.6k|#define SBR_ACTIVE 2
  ------------------
  947|  50.6k|              sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables,
  948|  50.6k|              self->pstr_common_tables, ch_fac, self->ptr_pvc_data_str, 0, NULL,
  949|  50.6k|              audio_object_type, ldmps_present, self, heaac_mps_present, ec_flag);
  950|  50.6k|          if (err_code) return err_code;
  ------------------
  |  Branch (950:15): [True: 1, False: 50.6k]
  ------------------
  951|  50.6k|          if (self->enh_sbr)
  ------------------
  |  Branch (951:15): [True: 50.6k, False: 0]
  ------------------
  952|  50.6k|          {
  953|  50.6k|            if (!self->enh_sbr_ps) {
  ------------------
  |  Branch (953:17): [True: 50.6k, False: 0]
  ------------------
  954|  50.6k|              if ((ptr_header_data[1]->sync_state == SBR_ACTIVE) &&
  ------------------
  |  |   25|  50.6k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (954:19): [True: 47.9k, False: 2.68k]
  ------------------
  955|  47.9k|                  !ptr_frame_data[0]->mps_sbr_flag) {
  ------------------
  |  Branch (955:19): [True: 11.3k, False: 36.6k]
  ------------------
  956|  11.3k|                ptr_header_data[1]->pstr_freq_band_data[0].qmf_sb_prev =
  957|  11.3k|                    ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
  958|  11.3k|              }
  959|  50.6k|            } 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.6k|          }
  966|  50.6k|        } else {
  967|  21.1k|          WORD32 err_code = ixheaacd_sbr_dec(
  968|  21.1k|              &pstr_sbr_channel[1]->str_sbr_dec, core_sample_buf + slot_element + 1,
  969|  21.1k|              ptr_header_data[1], ptr_frame_data[1], pstr_sbr_channel[1]->pstr_prev_frame_data,
  970|  21.1k|              NULL, NULL, NULL, (ptr_header_data[1]->sync_state == SBR_ACTIVE), low_pow_flag,
  ------------------
  |  |   25|  21.1k|#define SBR_ACTIVE 2
  ------------------
  971|  21.1k|              sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables,
  972|  21.1k|              self->pstr_common_tables, ch_fac, self->ptr_pvc_data_str, pstr_drc_dec->drc_on,
  973|  21.1k|              pstr_drc_dec->str_drc_channel_data[1].drc_factors_sbr, audio_object_type,
  974|  21.1k|              ldmps_present, self, heaac_mps_present, ec_flag);
  975|  21.1k|          if (err_code) return err_code;
  ------------------
  |  Branch (975:15): [True: 2, False: 21.1k]
  ------------------
  976|  21.1k|          if (self->enh_sbr)
  ------------------
  |  Branch (976:15): [True: 21.1k, False: 0]
  ------------------
  977|  21.1k|          {
  978|  21.1k|            if (!self->enh_sbr_ps) {
  ------------------
  |  Branch (978:17): [True: 21.1k, False: 0]
  ------------------
  979|  21.1k|              if ((ptr_header_data[1]->sync_state == SBR_ACTIVE) &&
  ------------------
  |  |   25|  21.1k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (979:19): [True: 21.0k, False: 76]
  ------------------
  980|  21.0k|                  !ptr_frame_data[0]->mps_sbr_flag) {
  ------------------
  |  Branch (980:19): [True: 21.0k, False: 0]
  ------------------
  981|  21.0k|                ptr_header_data[1]->pstr_freq_band_data[0].qmf_sb_prev =
  982|  21.0k|                    ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
  983|  21.0k|              }
  984|  21.1k|            } 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.1k|          }
  991|  21.1k|        }
  992|  71.7k|      }
  993|       |
  994|   120k|    } else {
  995|   120k|      if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD)
  ------------------
  |  Branch (995:11): [True: 115k, False: 5.83k]
  |  Branch (995:50): [True: 115k, False: 0]
  ------------------
  996|       |
  997|   115k|      {
  998|   115k|        if (sub_d((WORD16)ptr_header_data[0]->channel_mode, PS_STEREO) == 0) {
  ------------------
  |  |   24|   115k|#define sub_d(a, b) ((a) - (b))
  ------------------
  |  Branch (998:13): [True: 9.89k, False: 105k]
  ------------------
  999|  9.89k|          num_channels = 2;
 1000|  9.89k|        }
 1001|   115k|        if (ptr_header_data[0]->enh_sbr_ps && self->enh_sbr) {
  ------------------
  |  Branch (1001:13): [True: 9.90k, False: 105k]
  |  Branch (1001:47): [True: 9.90k, False: 0]
  ------------------
 1002|  9.90k|          num_channels = 2;
 1003|  9.90k|        }
 1004|   115k|      }
 1005|   120k|    }
 1006|   214k|    *codec_num_channels = num_channels;
 1007|   214k|    self->sbr_mode = ptr_frame_data[0]->sbr_mode;
 1008|       |
 1009|   214k|    if ((audio_object_type == AOT_ER_AAC_ELD) || (audio_object_type == AOT_ER_AAC_LD) ||
  ------------------
  |  Branch (1009:9): [True: 27.8k, False: 186k]
  |  Branch (1009:50): [True: 0, False: 186k]
  ------------------
 1010|   186k|        !self->enh_sbr) {
  ------------------
  |  Branch (1010:9): [True: 0, False: 186k]
  ------------------
 1011|  27.8k|      if (pstr_drc_dec != NULL) {
  ------------------
  |  Branch (1011:11): [True: 26.4k, False: 1.32k]
  ------------------
 1012|  26.4k|        WORD32 i, j;
 1013|  74.0k|        for (i = 0; i < *codec_num_channels; i++) {
  ------------------
  |  Branch (1013:21): [True: 47.5k, False: 26.4k]
  ------------------
 1014|  1.56M|          for (j = 0; j < 32; j++) {
  ------------------
  |  Branch (1014:23): [True: 1.52M, False: 47.5k]
  ------------------
 1015|  1.52M|            memcpy(pstr_drc_dec->str_drc_channel_data[i].drc_factors_sbr[j],
 1016|  1.52M|                   pstr_drc_dec->str_drc_channel_data[i].drc_factors_sbr[j + 32],
 1017|  1.52M|                   64 * sizeof(WORD32));
 1018|  1.52M|          }
 1019|  47.5k|        }
 1020|  26.4k|      }
 1021|  27.8k|    }
 1022|   214k|    if (ec_flag) {
  ------------------
  |  Branch (1022:9): [True: 0, False: 214k]
  ------------------
 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|   214k|  }
 1027|       |
 1028|   215k|  return SBRDEC_OK;
  ------------------
  |  |   33|   215k|#define SBRDEC_OK 0
  ------------------
 1029|   215k|}
ixheaacd_sbrdecoder.c:ixheaacd_sbr_dec_reset:
  109|  65.8k|                                     WORD32 *ptr_work_buf_core) {
  110|  65.8k|  WORD32 old_lsb, new_lsb;
  111|  65.8k|  WORD32 l;
  112|  65.8k|  WORD32 err = 0;
  113|  65.8k|  WORD32 num_time_slots = ptr_sbr_dec->str_codec_qmf_bank.num_time_slots;
  114|  65.8k|  WORD32 upsample_ratio_idx = ptr_header_data->sbr_ratio_idx;
  115|  65.8k|  WORD32 op_delay = 6 + SBR_HF_ADJ_OFFSET;
  ------------------
  |  |   99|  65.8k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  116|  65.8k|  WORD32 hbe_flag = ptr_header_data->hbe_flag;
  117|  65.8k|  WORD32 usac_flag = ptr_header_data->usac_flag;
  118|       |
  119|  65.8k|  if (ptr_header_data->is_usf_4) {
  ------------------
  |  Branch (119:7): [True: 3.98k, False: 61.8k]
  ------------------
  120|  3.98k|    op_delay = op_delay + 6;
  121|  3.98k|  }
  122|       |
  123|  65.8k|  ixheaacd_reset_sbrenvelope_calc(&ptr_sbr_dec->str_sbr_calc_env);
  124|       |
  125|  65.8k|  new_lsb = ptr_header_data->pstr_freq_band_data->sub_band_start;
  126|  65.8k|  ptr_sbr_dec->str_synthesis_qmf_bank.lsb = new_lsb;
  127|  65.8k|  ptr_sbr_dec->str_synthesis_qmf_bank.usb =
  128|  65.8k|      ptr_header_data->pstr_freq_band_data->sub_band_end;
  129|       |
  130|  65.8k|  old_lsb = ptr_sbr_dec->str_synthesis_qmf_bank.lsb;
  131|  65.8k|  ptr_sbr_dec->str_codec_qmf_bank.lsb = 0;
  132|  65.8k|  ptr_sbr_dec->str_codec_qmf_bank.usb = old_lsb;
  133|       |
  134|  65.8k|  {
  135|  65.8k|    WORD32 *plpc_filt_states_real =
  136|  65.8k|        &ptr_sbr_dec->str_hf_generator.lpc_filt_states_real[0][old_lsb];
  137|  65.8k|    WORD32 *plpc_filt_states_real_1 =
  138|  65.8k|        &ptr_sbr_dec->str_hf_generator.lpc_filt_states_real[1][old_lsb];
  139|       |
  140|  65.8k|    WORD32 *plpc_filt_states_imag =
  141|  65.8k|        &ptr_sbr_dec->str_hf_generator.lpc_filt_states_imag[0][old_lsb];
  142|  65.8k|    WORD32 *plpc_filt_states_imag_1 =
  143|  65.8k|        &ptr_sbr_dec->str_hf_generator.lpc_filt_states_imag[1][old_lsb];
  144|       |
  145|  65.8k|    for (l = new_lsb - old_lsb - 1; l >= 0; l--) {
  ------------------
  |  Branch (145:37): [True: 0, False: 65.8k]
  ------------------
  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|  65.8k|  }
  153|  65.8k|  if (1) {
  ------------------
  |  Branch (153:7): [True: 65.8k, Folded]
  ------------------
  154|  65.8k|    WORD32 start_band;
  155|  65.8k|    WORD32 stop_band;
  156|  65.8k|    WORD32 start_slot = SBR_HF_ADJ_OFFSET;
  ------------------
  |  |   99|  65.8k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  157|  65.8k|    WORD32 k;
  158|       |
  159|  65.8k|    start_band = ptr_header_data->pstr_freq_band_data->qmf_sb_prev;
  160|  65.8k|    stop_band = ptr_header_data->pstr_freq_band_data->sub_band_start;
  161|  65.8k|    if (usac_flag && !hbe_flag) {
  ------------------
  |  Branch (161:9): [True: 48.4k, False: 17.4k]
  |  Branch (161:22): [True: 19.7k, False: 28.6k]
  ------------------
  162|  59.2k|      for (l = 0; l < SBR_HF_ADJ_OFFSET; l++) {
  ------------------
  |  |   99|  59.2k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  |  Branch (162:19): [True: 39.5k, False: 19.7k]
  ------------------
  163|   107k|        for (k = start_band; k < stop_band; k++) {
  ------------------
  |  Branch (163:30): [True: 68.0k, False: 39.5k]
  ------------------
  164|  68.0k|          ptr_sbr_dec->qmf_buf_real[l][k] = 0.0;
  165|  68.0k|          ptr_sbr_dec->qmf_buf_imag[l][k] = 0.0;
  166|  68.0k|        }
  167|  39.5k|      }
  168|   138k|      for (l = start_slot; l < op_delay; l++) {
  ------------------
  |  Branch (168:28): [True: 119k, False: 19.7k]
  ------------------
  169|   324k|        for (k = start_band; k < stop_band; k++) {
  ------------------
  |  Branch (169:30): [True: 205k, False: 119k]
  ------------------
  170|   205k|          ptr_sbr_dec->qmf_buf_real[l][k] = 0.0;
  171|   205k|          ptr_sbr_dec->qmf_buf_imag[l][k] = 0.0;
  172|   205k|        }
  173|   119k|      }
  174|  19.7k|    }
  175|  65.8k|    if (ptr_sbr_dec->p_hbe_txposer != NULL && (usac_flag || hbe_flag)) {
  ------------------
  |  Branch (175:9): [True: 65.8k, False: 0]
  |  Branch (175:48): [True: 48.4k, False: 17.4k]
  |  Branch (175:61): [True: 568, False: 16.8k]
  ------------------
  176|  48.9k|      WORD32 k, i;
  177|  48.9k|      WORD32 dft_hbe_flag = ptr_header_data->esbr_hq;
  178|  48.9k|      if (dft_hbe_flag == 1) {
  ------------------
  |  Branch (178:11): [True: 0, False: 48.9k]
  ------------------
  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|  48.9k|      } else {
  184|  48.9k|        err = ixheaacd_qmf_hbe_data_reinit(
  185|  48.9k|            ptr_sbr_dec->p_hbe_txposer,
  186|  48.9k|            ptr_header_data->pstr_freq_band_data->freq_band_table,
  187|  48.9k|            ptr_header_data->pstr_freq_band_data->num_sf_bands,
  188|  48.9k|            ptr_header_data->is_usf_4);
  189|  48.9k|      }
  190|  48.9k|      if (err) return err;
  ------------------
  |  Branch (190:11): [True: 0, False: 48.9k]
  ------------------
  191|       |
  192|   146k|      for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (192:19): [True: 97.9k, False: 48.9k]
  ------------------
  193|  97.9k|        if (!((upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) && (k == 0))) {
  ------------------
  |  |   28|  97.9k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (193:15): [True: 7.96k, False: 89.9k]
  |  Branch (193:63): [True: 3.98k, False: 3.98k]
  ------------------
  194|  93.9k|          WORD32 xpos_delay = num_time_slots * k;
  195|  93.9k|          if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
  ------------------
  |  |   28|  93.9k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (195:15): [True: 3.98k, False: 89.9k]
  ------------------
  196|  3.98k|            xpos_delay = num_time_slots * k - 32;
  197|  3.98k|          }
  198|       |
  199|   845k|          for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (199:23): [True: 751k, False: 93.9k]
  ------------------
  200|   751k|            memmove(ptr_sbr_dec->ph_vocod_qmf_real[i],
  201|   751k|                    ptr_sbr_dec->ph_vocod_qmf_real[num_time_slots + i],
  202|   751k|                    64 * sizeof(FLOAT32));
  203|   751k|            memmove(ptr_sbr_dec->ph_vocod_qmf_imag[i],
  204|   751k|                    ptr_sbr_dec->ph_vocod_qmf_imag[num_time_slots + i],
  205|   751k|                    64 * sizeof(FLOAT32));
  206|   751k|          }
  207|  93.9k|          if (dft_hbe_flag == 1) {
  ------------------
  |  Branch (207:15): [True: 0, False: 93.9k]
  ------------------
  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|  93.9k|          } else {
  218|  93.9k|            err = ixheaacd_qmf_hbe_apply(
  219|  93.9k|                ptr_sbr_dec->p_hbe_txposer,
  220|  93.9k|                ptr_sbr_dec->qmf_buf_real + op_delay + xpos_delay,
  221|  93.9k|                ptr_sbr_dec->qmf_buf_imag + op_delay + xpos_delay, num_time_slots,
  222|  93.9k|                ptr_sbr_dec->ph_vocod_qmf_real + op_delay,
  223|  93.9k|                ptr_sbr_dec->ph_vocod_qmf_imag + op_delay, pitch_in_bins,
  224|  93.9k|                ptr_header_data);
  225|  93.9k|          if (err) return err;
  ------------------
  |  Branch (225:15): [True: 0, False: 93.9k]
  ------------------
  226|  93.9k|          }
  227|       |
  228|  93.9k|          if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
  ------------------
  |  |   28|  93.9k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (228:15): [True: 3.98k, False: 89.9k]
  ------------------
  229|  3.98k|            ixheaacd_hbe_repl_spec(&ptr_sbr_dec->p_hbe_txposer->x_over_qmf[0],
  230|  3.98k|                                   ptr_sbr_dec->ph_vocod_qmf_real + op_delay,
  231|  3.98k|                                   ptr_sbr_dec->ph_vocod_qmf_imag + op_delay,
  232|  3.98k|                                   num_time_slots,
  233|  3.98k|                                   ptr_sbr_dec->p_hbe_txposer->max_stretch);
  234|  3.98k|          }
  235|  93.9k|        }
  236|  97.9k|      }
  237|  48.9k|    }
  238|  65.8k|  }
  239|       |
  240|  65.8k|  if (!usac_flag) {
  ------------------
  |  Branch (240:7): [True: 17.4k, False: 48.4k]
  ------------------
  241|  17.4k|    err |= ixheaacd_reset_hf_generator(&ptr_sbr_dec->str_hf_generator,
  242|  17.4k|                                       ptr_header_data, audio_object_type);
  243|       |
  244|  17.4k|    ixheaacd_derive_lim_band_tbl(
  245|  17.4k|        ptr_header_data,
  246|  17.4k|        ptr_sbr_dec->str_hf_generator.pstr_settings->str_patch_param,
  247|  17.4k|        ptr_sbr_dec->str_hf_generator.pstr_settings->num_patches,
  248|  17.4k|        pstr_common_tables);
  249|  17.4k|  }
  250|       |
  251|  65.8k|  return err;
  252|  65.8k|}

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

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

ixheaacd_lpc_coeff_wt_apply:
   60|   293k|VOID ixheaacd_lpc_coeff_wt_apply(FLOAT32 *a, FLOAT32 *ap) {
   61|   293k|  FLOAT32 f;
   62|   293k|  WORD32 i;
   63|   293k|  ap[0] = a[0];
   64|   293k|  f = 0.92f;
   65|  4.99M|  for (i = 1; i <= 16; i++) {
  ------------------
  |  Branch (65:15): [True: 4.69M, False: 293k]
  ------------------
   66|  4.69M|    ap[i] = f * a[i];
   67|  4.69M|    f *= 0.92f;
   68|  4.69M|  }
   69|   293k|  return;
   70|   293k|}
ixheaacd_float2fix:
   72|   230k|WORD8 ixheaacd_float2fix(FLOAT32 *x, WORD32 *int_x, WORD32 length) {
   73|   230k|  WORD32 k, itemp;
   74|   230k|  FLOAT32 ftemp = 0.0;
   75|   230k|  WORD8 shiftp;
   76|  47.2M|  for (k = 0; k < length; k++) {
  ------------------
  |  Branch (76:15): [True: 47.0M, False: 230k]
  ------------------
   77|  47.0M|    if (ABS(x[k]) > ftemp) ftemp = ABS(x[k]);
  ------------------
  |  |   58|  47.0M|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (58:17): [True: 18.0M, False: 28.9M]
  |  |  ------------------
  ------------------
                  if (ABS(x[k]) > ftemp) ftemp = ABS(x[k]);
  ------------------
  |  |   58|   830k|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (58:17): [True: 422k, False: 407k]
  |  |  ------------------
  ------------------
  |  Branch (77:9): [True: 830k, False: 46.1M]
  ------------------
   78|  47.0M|  }
   79|       |
   80|   230k|  itemp = (WORD32)(ftemp);
   81|   230k|  shiftp = ixheaac_norm32(itemp);
   82|       |
   83|  47.2M|  for (k = 0; k < length; k++) {
  ------------------
  |  Branch (83:15): [True: 47.0M, False: 230k]
  ------------------
   84|  47.0M|    int_x[k] = (WORD32)(x[k] * (FLOAT32)((WORD64)1 << shiftp));
   85|  47.0M|  }
   86|       |
   87|   230k|  return (shiftp);
   88|   230k|}
ixheaacd_fix2float:
   91|   230k|                        WORD8 *shiftp, WORD32 *preshift) {
   92|   230k|  WORD32 k;
   93|   230k|  FLOAT32 qfac;
   94|   230k|  if ((*shiftp - *preshift) > 0) {
  ------------------
  |  Branch (94:7): [True: 229k, False: 663]
  ------------------
   95|   229k|    qfac = 1.0f / (FLOAT32)((WORD64)1 << (*shiftp - *preshift));
   96|  72.8M|    for (k = 0; k < length; k++) {
  ------------------
  |  Branch (96:17): [True: 72.6M, False: 229k]
  ------------------
   97|  72.6M|      xn1[k] = (FLOAT32)((FLOAT32)int_xn1[k] * qfac);
   98|  72.6M|    }
   99|   229k|  } else {
  100|   114k|    for (k = 0; k < length; k++) {
  ------------------
  |  Branch (100:17): [True: 114k, False: 663]
  ------------------
  101|   114k|      xn1[k] = (FLOAT32)((FLOAT32)int_xn1[k] *
  102|   114k|                         (FLOAT32)((WORD64)1 << (*preshift - *shiftp)));
  103|   114k|    }
  104|    663|  }
  105|   230k|}
ixheaacd_tcx_mdct:
  173|   109k|                         ia_usac_lpd_decoder_handle st) {
  174|   109k|  WORD32 i, mode;
  175|   109k|  WORD32 *ptr_tcx_quant;
  176|   109k|  FLOAT32 tmp, gain_tcx = 0.0f, noise_level, energy, temp;
  177|   109k|  FLOAT32 *ptr_a, i_ap[ORDER + 1];
  178|   109k|  const FLOAT32 *sine_window_prev, *sine_window;
  179|   109k|  WORD32 fac_length_prev;
  180|   109k|  FLOAT32 alfd_gains[LEN_SUPERFRAME / (4 * 8)] = {0};
  181|   109k|  FLOAT32 x[LEN_SUPERFRAME], buf[ORDER + LEN_SUPERFRAME];
  182|   109k|  WORD32 int_x[LEN_SUPERFRAME + (2 * FAC_LENGTH)];
  183|   109k|  WORD32 int_xn1[LEN_SUPERFRAME + (2 * FAC_LENGTH)];
  184|   109k|  FLOAT32 gain1[LEN_SUPERFRAME], gain2[LEN_SUPERFRAME];
  185|   109k|  FLOAT32 xn_buf[LEN_SUPERFRAME + (2 * FAC_LENGTH)];
  186|   109k|  FLOAT32 *xn;
  187|   109k|  FLOAT32 xn1[2 * FAC_LENGTH], facwindow[2 * FAC_LENGTH];
  188|   109k|  WORD32 TTT;
  189|   109k|  WORD8 shiftp = 0;
  190|   109k|  WORD32 preshift = 0;
  191|   109k|  WORD32 loop_count = 0;
  192|   109k|  FLOAT32 *exc = &usac_data->exc_buf[usac_data->len_subfrm * frame_index +
  193|   109k|                                     MAX_PITCH + INTER_LP_FIL_ORDER + 1];
  ------------------
  |  |   55|   109k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|   109k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   109k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|   109k|   (6 *           \
  |  |   57|   109k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|   109k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   109k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   109k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   109k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   109k|#define TMIN 34
  |  |  ------------------
  ------------------
                                                   MAX_PITCH + INTER_LP_FIL_ORDER + 1];
  ------------------
  |  |   51|   109k|#define INTER_LP_FIL_ORDER 16
  ------------------
  194|   109k|  FLOAT32 *synth =
  195|   109k|      &usac_data->synth_buf[usac_data->len_subfrm * frame_index + MAX_PITCH +
  ------------------
  |  |   55|   109k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|   109k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   109k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|   109k|   (6 *           \
  |  |   57|   109k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|   109k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   109k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   109k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   109k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   109k|#define TMIN 34
  |  |  ------------------
  ------------------
  196|   109k|                            (((NUM_FRAMES * usac_data->num_subfrm) / 2) - 1) *
  ------------------
  |  |   27|   109k|#define NUM_FRAMES 4
  ------------------
  197|   109k|                                LEN_SUBFR];
  ------------------
  |  |  118|   109k|#define LEN_SUBFR 64
  ------------------
  198|       |
  199|   109k|  WORD32 *ptr_scratch = &usac_data->scratch_buffer[0];
  200|       |
  201|   109k|  WORD32 fac_length = (usac_data->len_subfrm) / 2;
  202|   109k|  WORD32 err = 0;
  203|       |
  204|   109k|  mode = lg / (usac_data->len_subfrm);
  205|   109k|  if (mode > 2) mode = 3;
  ------------------
  |  Branch (205:7): [True: 307, False: 109k]
  ------------------
  206|       |
  207|   109k|  if (st->mode_prev == -2)
  ------------------
  |  Branch (207:7): [True: 4.15k, False: 105k]
  ------------------
  208|  4.15k|    fac_length_prev = (usac_data->ccfl) / 16;
  209|       |
  210|   105k|  else
  211|   105k|    fac_length_prev = fac_length;
  212|       |
  213|   109k|  if (fac_length == 96)
  ------------------
  |  Branch (213:7): [True: 36.7k, False: 72.9k]
  ------------------
  214|  36.7k|    sine_window = ixheaacd_sine_window192;
  215|  72.9k|  else
  216|  72.9k|    sine_window = ixheaacd__sine_window256;
  217|       |
  218|   109k|  if (fac_length_prev == 48)
  ------------------
  |  Branch (218:7): [True: 693, False: 109k]
  ------------------
  219|    693|    sine_window_prev = ixheaacd_sine_window96;
  220|       |
  221|   109k|  else if (fac_length_prev == 64)
  ------------------
  |  Branch (221:12): [True: 3.46k, False: 105k]
  ------------------
  222|  3.46k|    sine_window_prev = ixheaacd_sine_window128;
  223|       |
  224|   105k|  else if (fac_length_prev == 96)
  ------------------
  |  Branch (224:12): [True: 36.0k, False: 69.4k]
  ------------------
  225|  36.0k|    sine_window_prev = ixheaacd_sine_window192;
  226|       |
  227|  69.4k|  else
  228|  69.4k|    sine_window_prev = ixheaacd__sine_window256;
  229|       |
  230|   109k|  xn = xn_buf + fac_length;
  231|       |
  232|   109k|  if (st->mode_prev != 0) {
  ------------------
  |  Branch (232:7): [True: 51.9k, False: 57.7k]
  ------------------
  233|  51.9k|    if (st->mode_prev > 0) {
  ------------------
  |  Branch (233:9): [True: 42.3k, False: 9.60k]
  ------------------
  234|  9.93M|      for (i = 0; i < (2 * fac_length_prev); i++) {
  ------------------
  |  Branch (234:19): [True: 9.88M, False: 42.3k]
  ------------------
  235|  9.88M|        st->exc_prev[i + fac_length - fac_length_prev + 1] *=
  236|  9.88M|            sine_window_prev[(2 * fac_length_prev) - 1 - i];
  237|  9.88M|      }
  238|  42.3k|    }
  239|   306k|    for (i = 0; i < fac_length - fac_length_prev; i++) {
  ------------------
  |  Branch (239:17): [True: 254k, False: 51.9k]
  ------------------
  240|   254k|      st->exc_prev[i + fac_length + fac_length_prev + 1] = 0.0f;
  241|   254k|    }
  242|  51.9k|  }
  243|   109k|  if (usac_data->frame_ok == 1) {
  ------------------
  |  Branch (243:7): [True: 109k, False: 0]
  ------------------
  244|   109k|    noise_level = 0.0625f * (8.0f - ((FLOAT32)pstr_td_frame_data->noise_factor[frame_index]));
  245|       |
  246|   109k|  ptr_tcx_quant = pstr_td_frame_data->x_tcx_invquant;
  247|   236k|  for (i = 0; i < frame_index; i++)
  ------------------
  |  Branch (247:15): [True: 126k, False: 109k]
  ------------------
  248|   126k|    ptr_tcx_quant += pstr_td_frame_data->tcx_lg[i];
  249|       |
  250|  32.9M|  for (i = 0; i < lg; i++) x[i] = (FLOAT32)ptr_tcx_quant[i];
  ------------------
  |  Branch (250:15): [True: 32.8M, False: 109k]
  ------------------
  251|       |
  252|   109k|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (252:9): [True: 0, False: 109k]
  ------------------
  253|      0|      st->last_tcx_pitch = ixheaacd_calc_max_pitch(x, (lg >> 5));
  254|      0|    }
  255|       |
  256|  3.56M|  for (i = lg / 6; i < lg; i += 8) {
  ------------------
  |  Branch (256:20): [True: 3.45M, False: 109k]
  ------------------
  257|  3.45M|    WORD32 k, max_k = min(lg, i + 8);
  ------------------
  |  |   75|  3.45M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 72.9k, False: 3.38M]
  |  |  ------------------
  ------------------
  258|  3.45M|    FLOAT32 tmp = 0.0f;
  259|  30.9M|    for (k = i; k < max_k; k++) tmp += ptr_tcx_quant[k] * ptr_tcx_quant[k];
  ------------------
  |  Branch (259:17): [True: 27.4M, False: 3.45M]
  ------------------
  260|       |
  261|  3.45M|    if (tmp == 0.0f) {
  ------------------
  |  Branch (261:9): [True: 1.59M, False: 1.85M]
  ------------------
  262|  14.2M|      for (k = i; k < max_k; k++)
  ------------------
  |  Branch (262:19): [True: 12.6M, False: 1.59M]
  ------------------
  263|  12.6M|        x[k] = noise_level *
  264|  12.6M|               ixheaacd_randomsign(
  265|  12.6M|                   &(usac_data->seed_value[usac_data->present_chan]));
  266|  1.59M|    }
  267|  3.45M|  }
  268|       |
  269|   109k|  ixheaacd_low_fq_deemphasis(x, lg, alfd_gains);
  270|       |
  271|   109k|  ixheaacd_lpc_coeff_wt_apply(lp_flt_coff_a + (ORDER + 1), i_ap);
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
  272|   109k|  ixheaacd_lpc_to_td(i_ap, ORDER, gain1, usac_data->len_subfrm / 4);
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
  273|       |
  274|   109k|  ixheaacd_lpc_coeff_wt_apply(lp_flt_coff_a + (2 * (ORDER + 1)), i_ap);
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
  275|   109k|  ixheaacd_lpc_to_td(i_ap, ORDER, gain2, usac_data->len_subfrm / 4);
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
  276|       |
  277|   109k|  energy = 0.01f;
  278|  32.9M|  for (i = 0; i < lg; i++) energy += x[i] * x[i];
  ------------------
  |  Branch (278:15): [True: 32.8M, False: 109k]
  ------------------
  279|       |
  280|   109k|  temp = (FLOAT32)sqrt(energy) / lg;
  281|       |
  282|   109k|  gain_tcx =
  283|   109k|      (FLOAT32)pow(
  284|   109k|          10.0f,
  285|   109k|          ((FLOAT32)pstr_td_frame_data->global_gain[frame_index]) / 28.0f) /
  286|   109k|      (temp * 2.0f);
  287|   109k|  }
  288|   109k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (288:7): [True: 0, False: 109k]
  ------------------
  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|   109k|  if (usac_data->frame_ok == 1) {
  ------------------
  |  Branch (295:7): [True: 109k, False: 0]
  ------------------
  296|   109k|  ixheaacd_noise_shaping(x, lg, (usac_data->len_subfrm) / 4, gain1, gain2);
  297|   109k|  shiftp = ixheaacd_float2fix(x, int_x, lg);
  298|   109k|  }
  299|   109k|  if (usac_data->ec_flag == 1) {
  ------------------
  |  Branch (299:7): [True: 0, False: 109k]
  ------------------
  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|   109k|  } else {
  310|   109k|    if (lg & (lg - 1)) {
  ------------------
  |  Branch (310:9): [True: 36.7k, False: 72.9k]
  ------------------
  311|  36.7k|      if ((lg != 48) && (lg != 96) && (lg != 192) && (lg != 384) && (lg != 768)) {
  ------------------
  |  Branch (311:11): [True: 36.7k, False: 0]
  |  Branch (311:25): [True: 36.7k, False: 0]
  |  Branch (311:39): [True: 12.2k, False: 24.4k]
  |  Branch (311:54): [True: 127, False: 12.1k]
  |  Branch (311:69): [True: 0, False: 127]
  ------------------
  312|      0|        return -1;
  313|      0|      }
  314|  36.7k|    }
  315|   109k|  }
  316|       |
  317|   109k|  ixheaacd_acelp_mdct_main(usac_data, int_x, int_xn1, (2 * fac_length), lg - (2 * fac_length),
  318|   109k|                           &preshift);
  319|       |
  320|   109k|  ixheaacd_fix2float(int_xn1, xn_buf, (lg + (2 * fac_length)), &shiftp,
  321|   109k|                     &preshift);
  322|       |
  323|   109k|  ixheaacd_vec_cnst_mul((2.0f / lg), xn_buf, xn_buf, lg + (2 * fac_length));
  324|       |
  325|   109k|  st->fac_gain =
  326|   109k|      gain_tcx * 0.5f * (FLOAT32)sqrt(((FLOAT32)fac_length) / (FLOAT32)lg);
  327|       |
  328|  3.32M|  for (i = 0; i < fac_length / 4; i++)
  ------------------
  |  Branch (328:15): [True: 3.21M, False: 109k]
  ------------------
  329|  3.21M|    st->fac_fd_data[i] = alfd_gains[i * lg / (8 * fac_length)];
  330|       |
  331|   109k|  if (st->mode_prev == 0) {
  ------------------
  |  Branch (331:7): [True: 57.7k, False: 51.9k]
  ------------------
  332|  6.79M|    for (i = 0; i < fac_length_prev; i++) {
  ------------------
  |  Branch (332:17): [True: 6.74M, False: 57.7k]
  ------------------
  333|  6.74M|      facwindow[i] =
  334|  6.74M|          sine_window_prev[i] * sine_window_prev[(2 * fac_length_prev) - 1 - i];
  335|  6.74M|      facwindow[fac_length_prev + i] =
  336|  6.74M|          1.0f - (sine_window_prev[fac_length_prev + i] *
  337|  6.74M|                  sine_window_prev[fac_length_prev + i]);
  338|  6.74M|    }
  339|       |
  340|  3.42M|    for (i = 0; i < fac_length / 2; i++) {
  ------------------
  |  Branch (340:17): [True: 3.37M, False: 57.7k]
  ------------------
  341|  3.37M|      x[i] = st->fac_gain *
  342|  3.37M|             (FLOAT32)pstr_td_frame_data->fac[frame_index * FAC_LENGTH + 2 * i];
  ------------------
  |  |   33|  3.37M|#define FAC_LENGTH 128
  ------------------
  343|  3.37M|      x[fac_length / 2 + i] =
  344|  3.37M|          st->fac_gain *
  345|  3.37M|          (FLOAT32)pstr_td_frame_data
  346|  3.37M|              ->fac[frame_index * FAC_LENGTH + fac_length - 2 * i - 1];
  ------------------
  |  |   33|  3.37M|#define FAC_LENGTH 128
  ------------------
  347|  3.37M|    }
  348|       |
  349|   900k|    for (i = 0; i < fac_length / 8; i++) {
  ------------------
  |  Branch (349:17): [True: 842k, False: 57.7k]
  ------------------
  350|   842k|      x[i] *= st->fac_fd_data[2 * i];
  351|   842k|      x[fac_length - i - 1] *= st->fac_fd_data[2 * i + 1];
  352|   842k|    }
  353|       |
  354|  57.7k|    preshift = 0;
  355|  57.7k|    shiftp = ixheaacd_float2fix(x, int_x, fac_length);
  356|       |
  357|  57.7k|    if (usac_data->ec_flag == 0) {
  ------------------
  |  Branch (357:9): [True: 57.7k, False: 0]
  ------------------
  358|  57.7k|      if (fac_length & (fac_length - 1)) {
  ------------------
  |  Branch (358:11): [True: 20.4k, False: 37.2k]
  ------------------
  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|  57.7k|    }
  365|       |
  366|  57.7k|    ixheaacd_acelp_mdct(int_x, int_xn1, &preshift, fac_length, ptr_scratch);
  367|       |
  368|  57.7k|    ixheaacd_fix2float(int_xn1, xn1, fac_length, &shiftp, &preshift);
  369|       |
  370|  57.7k|    ixheaacd_vec_cnst_mul((2.0f / (FLOAT32)fac_length), xn1, xn1, fac_length);
  371|       |
  372|  57.7k|    memset(xn1 + fac_length, 0, fac_length * sizeof(FLOAT32));
  373|       |
  374|  57.7k|    ixheaacd_lpc_coeff_wt_apply(lp_flt_coff_a + (ORDER + 1), i_ap);
  ------------------
  |  |   30|  57.7k|#define ORDER 16
  ------------------
  375|  57.7k|    ixheaacd_synthesis_tool_float(i_ap, xn1, xn1, 2 * fac_length,
  376|  57.7k|                                  xn1 + fac_length);
  377|       |
  378|  6.79M|    for (i = 0; i < fac_length; i++) {
  ------------------
  |  Branch (378:17): [True: 6.74M, False: 57.7k]
  ------------------
  379|  6.74M|      temp = st->exc_prev[1 + fac_length + i] * facwindow[fac_length + i] +
  380|  6.74M|             st->exc_prev[fac_length - i] * facwindow[fac_length - 1 - i];
  381|  6.74M|      xn1[i] += temp;
  382|  6.74M|    }
  383|  57.7k|  }
  384|       |
  385|  58.7M|  for (i = 0; i < lg + (2 * fac_length); i++) xn_buf[i] *= gain_tcx;
  ------------------
  |  Branch (385:15): [True: 58.6M, False: 109k]
  ------------------
  386|       |
  387|  25.3M|  for (i = 0; i < (2 * fac_length_prev); i++)
  ------------------
  |  Branch (387:15): [True: 25.2M, False: 109k]
  ------------------
  388|  25.2M|    xn_buf[i + fac_length - fac_length_prev] *= sine_window_prev[i];
  389|       |
  390|   364k|  for (i = 0; i < fac_length - fac_length_prev; i++) xn_buf[i] = 0.0f;
  ------------------
  |  Branch (390:15): [True: 254k, False: 109k]
  ------------------
  391|       |
  392|   109k|  if (st->mode_prev != 0) {
  ------------------
  |  Branch (392:7): [True: 51.9k, False: 57.7k]
  ------------------
  393|  11.7M|    for (i = fac_length - fac_length_prev; i < (fac_length + fac_length_prev);
  ------------------
  |  Branch (393:44): [True: 11.7M, False: 51.9k]
  ------------------
  394|  11.7M|         i++)
  395|  11.7M|      xn_buf[i] += st->exc_prev[1 + i];
  396|  57.7k|  } else {
  397|  13.5M|    for (i = fac_length - fac_length_prev; i < (fac_length + fac_length_prev);
  ------------------
  |  Branch (397:44): [True: 13.4M, False: 57.7k]
  ------------------
  398|  13.4M|         i++)
  399|  13.4M|      xn_buf[i + fac_length] += xn1[i];
  400|  57.7k|  }
  401|       |
  402|   109k|  ixheaacd_mem_cpy(xn_buf + lg - 1, st->exc_prev, 1 + (2 * fac_length));
  403|       |
  404|  25.8M|  for (i = 0; i < (2 * fac_length); i++) {
  ------------------
  |  Branch (404:15): [True: 25.7M, False: 109k]
  ------------------
  405|  25.7M|    xn_buf[i + lg] *= sine_window[(2 * fac_length) - 1 - i];
  406|  25.7M|  }
  407|       |
  408|   109k|  if (st->mode_prev != 0) {
  ------------------
  |  Branch (408:7): [True: 51.9k, False: 57.7k]
  ------------------
  409|  51.9k|    ixheaacd_mem_cpy(xn_buf + fac_length - fac_length_prev,
  410|  51.9k|                     synth - fac_length_prev, fac_length_prev);
  411|       |
  412|  7.00M|    for (i = 0; i < ORDER + fac_length; i++)
  ------------------
  |  |   30|  7.00M|#define ORDER 16
  ------------------
  |  Branch (412:17): [True: 6.95M, False: 51.9k]
  ------------------
  413|  6.95M|      buf[i] = synth[i - ORDER - fac_length] -
  ------------------
  |  |   30|  6.95M|#define ORDER 16
  ------------------
  414|  6.95M|               (PREEMPH_FILT_FAC * synth[i - ORDER - fac_length - 1]);
  ------------------
  |  |   61|  6.95M|#define PREEMPH_FILT_FAC 0.68f
  ------------------
                             (PREEMPH_FILT_FAC * synth[i - ORDER - fac_length - 1]);
  ------------------
  |  |   30|  6.95M|#define ORDER 16
  ------------------
  415|       |
  416|  51.9k|    ptr_a = st->lp_flt_coeff_a_prev;
  417|  51.9k|    TTT = fac_length % LEN_SUBFR;
  ------------------
  |  |  118|  51.9k|#define LEN_SUBFR 64
  ------------------
  418|  51.9k|    if (TTT != 0)
  ------------------
  |  Branch (418:9): [True: 16.2k, False: 35.6k]
  ------------------
  419|  16.2k|      ixheaacd_residual_tool_float(ptr_a, &buf[ORDER], &exc[-fac_length], TTT,
  ------------------
  |  |   30|  16.2k|#define ORDER 16
  ------------------
  420|  16.2k|                                   1);
  421|       |
  422|  51.9k|    loop_count = (fac_length - TTT) / LEN_SUBFR;
  ------------------
  |  |  118|  51.9k|#define LEN_SUBFR 64
  ------------------
  423|  51.9k|    ixheaacd_residual_tool_float(ptr_a, &buf[ORDER + TTT],
  ------------------
  |  |   30|  51.9k|#define ORDER 16
  ------------------
  424|  51.9k|                                 &exc[TTT - fac_length], LEN_SUBFR, loop_count);
  ------------------
  |  |  118|  51.9k|#define LEN_SUBFR 64
  ------------------
  425|  51.9k|  }
  426|       |
  427|   109k|  ixheaacd_mem_cpy(xn, synth, lg);
  428|       |
  429|   109k|  ixheaacd_mem_cpy(synth - ORDER - 1, xn - ORDER - 1, ORDER + 1);
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
                ixheaacd_mem_cpy(synth - ORDER - 1, xn - ORDER - 1, ORDER + 1);
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
                ixheaacd_mem_cpy(synth - ORDER - 1, xn - ORDER - 1, ORDER + 1);
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
  430|   109k|  tmp = xn[-ORDER - 1];
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
  431|   109k|  ixheaacd_preemphsis_tool_float(xn - ORDER, PREEMPH_FILT_FAC, ORDER + lg, tmp);
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
                ixheaacd_preemphsis_tool_float(xn - ORDER, PREEMPH_FILT_FAC, ORDER + lg, tmp);
  ------------------
  |  |   61|   109k|#define PREEMPH_FILT_FAC 0.68f
  ------------------
                ixheaacd_preemphsis_tool_float(xn - ORDER, PREEMPH_FILT_FAC, ORDER + lg, tmp);
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
  432|       |
  433|   109k|  ptr_a = lp_flt_coff_a + (2 * (ORDER + 1));
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
  434|       |
  435|   109k|  ixheaacd_residual_tool_float(ptr_a, xn, exc, lg, 1);
  436|       |
  437|   109k|  ixheaacd_mem_cpy(ptr_a, st->lp_flt_coeff_a_prev, ORDER + 1);
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
  438|   109k|  ixheaacd_mem_cpy(ptr_a, st->lp_flt_coeff_a_prev + ORDER + 1, ORDER + 1);
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
                ixheaacd_mem_cpy(ptr_a, st->lp_flt_coeff_a_prev + ORDER + 1, ORDER + 1);
  ------------------
  |  |   30|   109k|#define ORDER 16
  ------------------
  439|       |
  440|   109k|  return err;
  441|   109k|}
ixheaacd_randomsign:
  443|  12.6M|FLOAT32 ixheaacd_randomsign(UWORD32 *seed) {
  444|  12.6M|  FLOAT32 sign = 0.0f;
  445|  12.6M|  *seed = (UWORD32)(((UWORD64)(*seed) * (UWORD64)69069) + 5);
  446|       |
  447|  12.6M|  if (((*seed) & 0x10000) > 0)
  ------------------
  |  Branch (447:7): [True: 6.38M, False: 6.24M]
  ------------------
  448|  6.38M|    sign = -1.f;
  449|  6.24M|  else
  450|  6.24M|    sign = +1.f;
  451|       |
  452|  12.6M|  return sign;
  453|  12.6M|}
ixheaacd_tcx_fwd_alcnx.c:ixheaacd_low_fq_deemphasis:
  108|   109k|                                       FLOAT32 gains[]) {
  109|   109k|  WORD32 i, j, k, i_max;
  110|   109k|  FLOAT32 max, factor, rm;
  111|       |
  112|   109k|  k = 8;
  113|   109k|  i_max = lg / 4;
  114|       |
  115|   109k|  max = 0.01f;
  116|  1.13M|  for (i = 0; i < i_max; i += k) {
  ------------------
  |  Branch (116:15): [True: 1.02M, False: 109k]
  ------------------
  117|  1.02M|    rm = 0.01f;
  118|  9.24M|    for (j = i; j < i + k; j++) rm += x[j] * x[j];
  ------------------
  |  Branch (118:17): [True: 8.22M, False: 1.02M]
  ------------------
  119|       |
  120|  1.02M|    if (rm > max) max = rm;
  ------------------
  |  Branch (120:9): [True: 248k, False: 779k]
  ------------------
  121|  1.02M|  }
  122|       |
  123|   109k|  factor = 0.1f;
  124|  1.13M|  for (i = 0; i < i_max; i += k) {
  ------------------
  |  Branch (124:15): [True: 1.02M, False: 109k]
  ------------------
  125|  1.02M|    rm = 0.01f;
  126|  9.24M|    for (j = i; j < i + k; j++) rm += x[j] * x[j];
  ------------------
  |  Branch (126:17): [True: 8.22M, False: 1.02M]
  ------------------
  127|       |
  128|  1.02M|    rm = (FLOAT32)sqrt(rm / max);
  129|  1.02M|    if (rm > factor) factor = rm;
  ------------------
  |  Branch (129:9): [True: 240k, False: 786k]
  ------------------
  130|       |
  131|  9.24M|    for (j = i; j < i + k; j++) x[j] *= factor;
  ------------------
  |  Branch (131:17): [True: 8.22M, False: 1.02M]
  ------------------
  132|       |
  133|  1.02M|    gains[i / k] = factor;
  134|  1.02M|  }
  135|       |
  136|   109k|  return;
  137|   109k|}

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

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

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

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

