ixheaacd_huff_code_reorder.c:ixheaac_extu:
   54|  1.20M|static PLATFORM_INLINE UWORD32 ixheaac_extu(UWORD32 a, WORD32 shift_left, WORD32 shift_right) {
   55|  1.20M|  UWORD32 x;
   56|  1.20M|  x = (UWORD32)a << shift_left;
   57|  1.20M|  x = (UWORD32)x >> shift_right;
   58|       |
   59|  1.20M|  return x;
   60|  1.20M|}
ixheaacd_mps_res_tns.c:ixheaac_deposit16h_in32:
   40|  36.3k|static PLATFORM_INLINE WORD32 ixheaac_deposit16h_in32(WORD16 var) {
   41|  36.3k|  WORD32 var_out;
   42|       |
   43|  36.3k|  var_out = (WORD32)var << 16;
   44|  36.3k|  return (var_out);
   45|  36.3k|}
ixheaacd_mps_res_tns.c:ixheaac_shl32_dir_sat_limit:
  114|  33.3k|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
  115|  33.3k|  WORD32 out_val;
  116|       |
  117|  33.3k|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 0, False: 33.3k]
  ------------------
  118|      0|    b = -b;
  119|      0|    b = ixheaac_min32(b, 31);
  120|      0|    out_val = ixheaac_shr32(a, b);
  121|  33.3k|  } else {
  122|  33.3k|    out_val = ixheaac_shl32_sat(a, b);
  123|  33.3k|  }
  124|       |
  125|  33.3k|  return out_val;
  126|  33.3k|}
ixheaacd_pns_js_thumb.c:ixheaac_div32_pos_normb:
   74|   586k|static PLATFORM_INLINE WORD32 ixheaac_div32_pos_normb(WORD32 a, WORD32 b) {
   75|   586k|  WORD32 quotient;
   76|   586k|  UWORD32 mantissa_nr = a;
   77|   586k|  UWORD32 mantissa_dr = b;
   78|       |
   79|   586k|  LOOPINDEX i;
   80|       |
   81|   586k|  if (a == b) {
  ------------------
  |  Branch (81:7): [True: 0, False: 586k]
  ------------------
   82|      0|    quotient = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   83|   586k|  } else {
   84|   586k|    quotient = 0;
   85|       |
   86|  19.3M|    for (i = 0; i < 32; i++) {
  ------------------
  |  Branch (86:17): [True: 18.7M, False: 586k]
  ------------------
   87|  18.7M|      quotient = quotient << 1;
   88|       |
   89|  18.7M|      if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (89:11): [True: 8.48M, False: 10.2M]
  ------------------
   90|  8.48M|        mantissa_nr = mantissa_nr - mantissa_dr;
   91|  8.48M|        quotient += 1;
   92|  8.48M|      }
   93|       |
   94|  18.7M|      mantissa_nr = (UWORD32)mantissa_nr << 1;
   95|  18.7M|    }
   96|   586k|  }
   97|       |
   98|   586k|  return quotient;
   99|   586k|}
ixheaacd_pns_js_thumb.c:ixheaac_shr32_dir_sat_limit:
  101|  6.42M|static PLATFORM_INLINE WORD32 ixheaac_shr32_dir_sat_limit(WORD32 a, WORD b) {
  102|  6.42M|  WORD32 out_val;
  103|       |
  104|  6.42M|  if (b < 0) {
  ------------------
  |  Branch (104:7): [True: 1.29M, False: 5.12M]
  ------------------
  105|  1.29M|    out_val = ixheaac_shl32_sat(a, -b);
  106|  5.12M|  } else {
  107|  5.12M|    b = ixheaac_min32(b, 31);
  108|  5.12M|    out_val = ixheaac_shr32(a, b);
  109|  5.12M|  }
  110|       |
  111|  6.42M|  return out_val;
  112|  6.42M|}
ixheaacd_sbrdec_initfuncs.c:ixheaac_extract16l:
   33|  30.3k|static PLATFORM_INLINE WORD16 ixheaac_extract16l(WORD32 var) {
   34|  30.3k|  WORD16 var_out;
   35|       |
   36|  30.3k|  var_out = (WORD16)var;
   37|  30.3k|  return (var_out);
   38|  30.3k|}
ixheaacd_aac_tns.c:ixheaac_deposit16h_in32:
   40|  3.49M|static PLATFORM_INLINE WORD32 ixheaac_deposit16h_in32(WORD16 var) {
   41|  3.49M|  WORD32 var_out;
   42|       |
   43|  3.49M|  var_out = (WORD32)var << 16;
   44|  3.49M|  return (var_out);
   45|  3.49M|}
ixheaacd_basic_funcs.c:ixheaac_shl32_dir_sat_limit:
  114|  2.93M|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
  115|  2.93M|  WORD32 out_val;
  116|       |
  117|  2.93M|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 0, False: 2.93M]
  ------------------
  118|      0|    b = -b;
  119|      0|    b = ixheaac_min32(b, 31);
  120|      0|    out_val = ixheaac_shr32(a, b);
  121|  2.93M|  } else {
  122|  2.93M|    out_val = ixheaac_shl32_sat(a, b);
  123|  2.93M|  }
  124|       |
  125|  2.93M|  return out_val;
  126|  2.93M|}
ixheaacd_basic_funcs.c:ixheaac_shr32_dir_sat_limit:
  101|  1.17M|static PLATFORM_INLINE WORD32 ixheaac_shr32_dir_sat_limit(WORD32 a, WORD b) {
  102|  1.17M|  WORD32 out_val;
  103|       |
  104|  1.17M|  if (b < 0) {
  ------------------
  |  Branch (104:7): [True: 586k, False: 586k]
  ------------------
  105|   586k|    out_val = ixheaac_shl32_sat(a, -b);
  106|   586k|  } else {
  107|   586k|    b = ixheaac_min32(b, 31);
  108|   586k|    out_val = ixheaac_shr32(a, b);
  109|   586k|  }
  110|       |
  111|  1.17M|  return out_val;
  112|  1.17M|}
ixheaacd_basic_funcs.c:ixheaac_mult32x16h_in32_shl_sat:
   62|   586k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16h_in32_shl_sat(WORD32 a, WORD32 b) {
   63|   586k|  WORD32 result;
   64|       |
   65|   586k|  if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
  ------------------
  |  Branch (65:7): [True: 0, False: 586k]
  |  Branch (65:34): [True: 0, False: 0]
  ------------------
   66|      0|    result = (WORD32)0x7fffffff;
   67|   586k|  } else {
   68|   586k|    result = ixheaac_mult32x16in32_shl(a, ixheaac_extract16h(b));
   69|   586k|  }
   70|       |
   71|   586k|  return (result);
   72|   586k|}
ixheaacd_basic_funcs.c:ixheaac_extract16h:
   26|   586k|static PLATFORM_INLINE WORD16 ixheaac_extract16h(WORD32 var) {
   27|   586k|  WORD16 var_out;
   28|       |
   29|   586k|  var_out = (WORD16)(var >> 16);
   30|   586k|  return (var_out);
   31|   586k|}
ixheaacd_block.c:ixheaac_extu:
   54|   417k|static PLATFORM_INLINE UWORD32 ixheaac_extu(UWORD32 a, WORD32 shift_left, WORD32 shift_right) {
   55|   417k|  UWORD32 x;
   56|   417k|  x = (UWORD32)a << shift_left;
   57|   417k|  x = (UWORD32)x >> shift_right;
   58|       |
   59|   417k|  return x;
   60|   417k|}
ixheaacd_block.c:ixheaac_shl32_dir_sat_limit:
  114|  73.7M|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
  115|  73.7M|  WORD32 out_val;
  116|       |
  117|  73.7M|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 61.0M, False: 12.6M]
  ------------------
  118|  61.0M|    b = -b;
  119|  61.0M|    b = ixheaac_min32(b, 31);
  120|  61.0M|    out_val = ixheaac_shr32(a, b);
  121|  61.0M|  } else {
  122|  12.6M|    out_val = ixheaac_shl32_sat(a, b);
  123|  12.6M|  }
  124|       |
  125|  73.7M|  return out_val;
  126|  73.7M|}
ixheaacd_env_calc.c:ixheaac_extract16h:
   26|  20.1M|static PLATFORM_INLINE WORD16 ixheaac_extract16h(WORD32 var) {
   27|  20.1M|  WORD16 var_out;
   28|       |
   29|  20.1M|  var_out = (WORD16)(var >> 16);
   30|  20.1M|  return (var_out);
   31|  20.1M|}
ixheaacd_env_calc.c:ixheaac_shl32_dir_sat_limit:
  114|   289k|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
  115|   289k|  WORD32 out_val;
  116|       |
  117|   289k|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 179k, False: 110k]
  ------------------
  118|   179k|    b = -b;
  119|   179k|    b = ixheaac_min32(b, 31);
  120|   179k|    out_val = ixheaac_shr32(a, b);
  121|   179k|  } else {
  122|   110k|    out_val = ixheaac_shl32_sat(a, b);
  123|   110k|  }
  124|       |
  125|   289k|  return out_val;
  126|   289k|}
ixheaacd_env_calc.c:ixheaac_shr32_dir_sat_limit:
  101|  1.12M|static PLATFORM_INLINE WORD32 ixheaac_shr32_dir_sat_limit(WORD32 a, WORD b) {
  102|  1.12M|  WORD32 out_val;
  103|       |
  104|  1.12M|  if (b < 0) {
  ------------------
  |  Branch (104:7): [True: 296k, False: 832k]
  ------------------
  105|   296k|    out_val = ixheaac_shl32_sat(a, -b);
  106|   832k|  } else {
  107|   832k|    b = ixheaac_min32(b, 31);
  108|   832k|    out_val = ixheaac_shr32(a, b);
  109|   832k|  }
  110|       |
  111|  1.12M|  return out_val;
  112|  1.12M|}
ixheaacd_env_calc.c:ixheaac_extract16l:
   33|  34.3M|static PLATFORM_INLINE WORD16 ixheaac_extract16l(WORD32 var) {
   34|  34.3M|  WORD16 var_out;
   35|       |
   36|  34.3M|  var_out = (WORD16)var;
   37|  34.3M|  return (var_out);
   38|  34.3M|}
ixheaacd_freq_sca.c:ixheaac_deposit16l_in32:
   47|   257k|static PLATFORM_INLINE WORD32 ixheaac_deposit16l_in32(WORD16 var) {
   48|   257k|  WORD32 var_out;
   49|       |
   50|   257k|  var_out = (WORD32)var;
   51|   257k|  return (var_out);
   52|   257k|}
ixheaacd_freq_sca.c:ixheaac_extract16h:
   26|  61.4M|static PLATFORM_INLINE WORD16 ixheaac_extract16h(WORD32 var) {
   27|  61.4M|  WORD16 var_out;
   28|       |
   29|  61.4M|  var_out = (WORD16)(var >> 16);
   30|  61.4M|  return (var_out);
   31|  61.4M|}
ixheaacd_freq_sca.c:ixheaac_extract16l:
   33|   662k|static PLATFORM_INLINE WORD16 ixheaac_extract16l(WORD32 var) {
   34|   662k|  WORD16 var_out;
   35|       |
   36|   662k|  var_out = (WORD16)var;
   37|   662k|  return (var_out);
   38|   662k|}
ixheaacd_lpfuncs.c:ixheaac_shl32_dir_sat_limit:
  114|  53.9M|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
  115|  53.9M|  WORD32 out_val;
  116|       |
  117|  53.9M|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 28.8M, False: 25.0M]
  ------------------
  118|  28.8M|    b = -b;
  119|  28.8M|    b = ixheaac_min32(b, 31);
  120|  28.8M|    out_val = ixheaac_shr32(a, b);
  121|  28.8M|  } else {
  122|  25.0M|    out_val = ixheaac_shl32_sat(a, b);
  123|  25.0M|  }
  124|       |
  125|  53.9M|  return out_val;
  126|  53.9M|}
ixheaacd_lpp_tran.c:ixheaac_extract16h:
   26|  1.22M|static PLATFORM_INLINE WORD16 ixheaac_extract16h(WORD32 var) {
   27|  1.22M|  WORD16 var_out;
   28|       |
   29|  1.22M|  var_out = (WORD16)(var >> 16);
   30|  1.22M|  return (var_out);
   31|  1.22M|}
ixheaacd_mps_res_block.c:ixheaac_extu:
   54|   172k|static PLATFORM_INLINE UWORD32 ixheaac_extu(UWORD32 a, WORD32 shift_left, WORD32 shift_right) {
   55|   172k|  UWORD32 x;
   56|   172k|  x = (UWORD32)a << shift_left;
   57|   172k|  x = (UWORD32)x >> shift_right;
   58|       |
   59|   172k|  return x;
   60|   172k|}

ixheaacd_api.c:ixheaac_round16:
  231|   357M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|   357M|  WORD16 var_out;
  233|       |
  234|   357M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|   357M|  return (var_out);
  236|   357M|}
ixheaacd_longblock.c:ixheaac_add16_sat:
   43|   107k|static PLATFORM_INLINE WORD16 ixheaac_add16_sat(WORD16 op1, WORD16 op2) {
   44|   107k|  WORD16 var_out;
   45|   107k|  WORD32 sum;
   46|       |
   47|   107k|  sum = (WORD32)op1 + (WORD32)op2;
   48|   107k|  var_out = ixheaac_sat16(sum);
   49|   107k|  return (var_out);
   50|   107k|}
ixheaacd_longblock.c:ixheaac_sat16:
   23|   107k|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|   107k|  WORD16 var_out;
   25|       |
   26|   107k|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 107k]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|   107k|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 107k]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|   107k|  } else {
   31|   107k|    var_out = (WORD16)(op1);
   32|   107k|  }
   33|   107k|  return (var_out);
   34|   107k|}
ixheaacd_lt_predict.c:ixheaac_round16:
  231|   100M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|   100M|  WORD16 var_out;
  233|       |
  234|   100M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|   100M|  return (var_out);
  236|   100M|}
ixheaacd_lt_predict.c:ixheaac_shl16:
   91|  52.6M|static PLATFORM_INLINE WORD16 ixheaac_shl16(WORD16 op1, WORD16 shift) {
   92|  52.6M|  WORD16 var_out;
   93|       |
   94|  52.6M|  var_out = (WORD16)(op1 << shift);
   95|  52.6M|  return (var_out);
   96|  52.6M|}
ixheaacd_lt_predict.c:ixheaac_sat16:
   23|  86.4M|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  86.4M|  WORD16 var_out;
   25|       |
   26|  86.4M|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 5.90M, False: 80.5M]
  ------------------
   27|  5.90M|    var_out = MAX_16;
  ------------------
  |  |   63|  5.90M|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  80.5M|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 6.05M, False: 74.5M]
  ------------------
   29|  6.05M|    var_out = (WORD16)(-32768);
   30|  74.5M|  } else {
   31|  74.5M|    var_out = (WORD16)(op1);
   32|  74.5M|  }
   33|  86.4M|  return (var_out);
   34|  86.4M|}
ixheaacd_mps_res_channel.c:ixheaac_shr16_dir_sat:
  148|  1.53k|static PLATFORM_INLINE WORD16 ixheaac_shr16_dir_sat(WORD16 op1, WORD16 shift) {
  149|  1.53k|  WORD16 var_out;
  150|       |
  151|  1.53k|  if (shift < 0) {
  ------------------
  |  Branch (151:7): [True: 0, False: 1.53k]
  ------------------
  152|      0|    var_out = ixheaac_shl16_sat(op1, (WORD16)(-shift));
  153|  1.53k|  } else {
  154|  1.53k|    var_out = ixheaac_shr16(op1, shift);
  155|  1.53k|  }
  156|  1.53k|  return (var_out);
  157|  1.53k|}
ixheaacd_mps_res_channel.c:ixheaac_shr16:
  110|  1.53k|static PLATFORM_INLINE WORD16 ixheaac_shr16(WORD16 op1, WORD16 shift) {
  111|  1.53k|  WORD16 var_out;
  112|       |
  113|  1.53k|  var_out = ((WORD16)(op1 >> shift));
  114|  1.53k|  return (var_out);
  115|  1.53k|}
ixheaacd_mps_res_longblock.c:ixheaac_add16_sat:
   43|    252|static PLATFORM_INLINE WORD16 ixheaac_add16_sat(WORD16 op1, WORD16 op2) {
   44|    252|  WORD16 var_out;
   45|    252|  WORD32 sum;
   46|       |
   47|    252|  sum = (WORD32)op1 + (WORD32)op2;
   48|    252|  var_out = ixheaac_sat16(sum);
   49|    252|  return (var_out);
   50|    252|}
ixheaacd_mps_res_longblock.c:ixheaac_sat16:
   23|    252|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|    252|  WORD16 var_out;
   25|       |
   26|    252|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 252]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|    252|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 252]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|    252|  } else {
   31|    252|    var_out = (WORD16)(op1);
   32|    252|  }
   33|    252|  return (var_out);
   34|    252|}
ixheaacd_mps_res_pns_js_thumb.c:ixheaac_shr16_dir_sat:
  148|    291|static PLATFORM_INLINE WORD16 ixheaac_shr16_dir_sat(WORD16 op1, WORD16 shift) {
  149|    291|  WORD16 var_out;
  150|       |
  151|    291|  if (shift < 0) {
  ------------------
  |  Branch (151:7): [True: 0, False: 291]
  ------------------
  152|      0|    var_out = ixheaac_shl16_sat(op1, (WORD16)(-shift));
  153|    291|  } else {
  154|    291|    var_out = ixheaac_shr16(op1, shift);
  155|    291|  }
  156|    291|  return (var_out);
  157|    291|}
ixheaacd_mps_res_pns_js_thumb.c:ixheaac_shr16:
  110|    291|static PLATFORM_INLINE WORD16 ixheaac_shr16(WORD16 op1, WORD16 shift) {
  111|    291|  WORD16 var_out;
  112|       |
  113|    291|  var_out = ((WORD16)(op1 >> shift));
  114|    291|  return (var_out);
  115|    291|}
ixheaacd_mps_res_tns.c:ixheaac_round16:
  231|  84.0k|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|  84.0k|  WORD16 var_out;
  233|       |
  234|  84.0k|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|  84.0k|  return (var_out);
  236|  84.0k|}
ixheaacd_multichannel.c:ixheaac_round16:
  231|    700|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|    700|  WORD16 var_out;
  233|       |
  234|    700|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|    700|  return (var_out);
  236|    700|}
ixheaacd_sbrdec_lpfuncs.c:ixheaac_abs16_sat:
  191|  67.1k|static PLATFORM_INLINE WORD16 ixheaac_abs16_sat(WORD16 op1) {
  192|  67.1k|  WORD16 var_out;
  193|       |
  194|  67.1k|  if (-32768 == op1) {
  ------------------
  |  Branch (194:7): [True: 0, False: 67.1k]
  ------------------
  195|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
  196|  67.1k|  } else {
  197|  67.1k|    if (op1 < 0) {
  ------------------
  |  Branch (197:9): [True: 41.4k, False: 25.6k]
  ------------------
  198|  41.4k|      var_out = (WORD16)(-op1);
  199|  41.4k|    } else {
  200|  25.6k|      var_out = op1;
  201|  25.6k|    }
  202|  67.1k|  }
  203|  67.1k|  return (var_out);
  204|  67.1k|}
ixheaacd_sbr_dec.c:ixheaac_sub16_sat:
   59|  65.2k|static PLATFORM_INLINE WORD16 ixheaac_sub16_sat(WORD16 op1, WORD16 op2) {
   60|  65.2k|  WORD16 var_out;
   61|  65.2k|  WORD32 diff;
   62|       |
   63|  65.2k|  diff = (WORD32)op1 - op2;
   64|  65.2k|  var_out = ixheaac_sat16(diff);
   65|  65.2k|  return (var_out);
   66|  65.2k|}
ixheaacd_sbr_dec.c:ixheaac_sat16:
   23|  65.2k|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  65.2k|  WORD16 var_out;
   25|       |
   26|  65.2k|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 65.2k]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  65.2k|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 65.2k]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|  65.2k|  } else {
   31|  65.2k|    var_out = (WORD16)(op1);
   32|  65.2k|  }
   33|  65.2k|  return (var_out);
   34|  65.2k|}
ixheaacd_qmf_dec_generic.c:ixheaac_round16:
  231|   103M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|   103M|  WORD16 var_out;
  233|       |
  234|   103M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|   103M|  return (var_out);
  236|   103M|}
ixheaacd_aac_tns.c:ixheaac_round16:
  231|  7.99M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|  7.99M|  WORD16 var_out;
  233|       |
  234|  7.99M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|  7.99M|  return (var_out);
  236|  7.99M|}
ixheaacd_basic_funcs.c:ixheaac_sat16:
   23|   586k|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|   586k|  WORD16 var_out;
   25|       |
   26|   586k|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 586k]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|   586k|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 586k]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|   586k|  } else {
   31|   586k|    var_out = (WORD16)(op1);
   32|   586k|  }
   33|   586k|  return (var_out);
   34|   586k|}
ixheaacd_block.c:ixheaac_shl16_sat:
   98|  2.22M|static PLATFORM_INLINE WORD16 ixheaac_shl16_sat(WORD16 op1, WORD16 shift) {
   99|  2.22M|  WORD16 var_out;
  100|  2.22M|  WORD32 temp;
  101|       |
  102|  2.22M|  if (shift > 15) {
  ------------------
  |  Branch (102:7): [True: 0, False: 2.22M]
  ------------------
  103|      0|    shift = 15;
  104|      0|  }
  105|  2.22M|  temp = (WORD32)(op1 << shift);
  106|  2.22M|  var_out = ixheaac_sat16(temp);
  107|  2.22M|  return (var_out);
  108|  2.22M|}
ixheaacd_block.c:ixheaac_sat16:
   23|  2.22M|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  2.22M|  WORD16 var_out;
   25|       |
   26|  2.22M|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 48.2k, False: 2.17M]
  ------------------
   27|  48.2k|    var_out = MAX_16;
  ------------------
  |  |   63|  48.2k|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  2.17M|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 50.4k, False: 2.12M]
  ------------------
   29|  50.4k|    var_out = (WORD16)(-32768);
   30|  2.12M|  } else {
   31|  2.12M|    var_out = (WORD16)(op1);
   32|  2.12M|  }
   33|  2.22M|  return (var_out);
   34|  2.22M|}
ixheaacd_env_calc.c:ixheaac_mult16_shl:
   75|  5.63M|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl(WORD16 op1, WORD16 op2) {
   76|  5.63M|  WORD16 var_out;
   77|       |
   78|  5.63M|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 15));
   79|  5.63M|  return (var_out);
   80|  5.63M|}
ixheaacd_env_calc.c:ixheaac_sat16:
   23|  4.88M|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  4.88M|  WORD16 var_out;
   25|       |
   26|  4.88M|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 4.88M]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  4.88M|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 4.88M]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|  4.88M|  } else {
   31|  4.88M|    var_out = (WORD16)(op1);
   32|  4.88M|  }
   33|  4.88M|  return (var_out);
   34|  4.88M|}
ixheaacd_env_calc.c:ixheaac_sub16:
   52|  21.4M|static PLATFORM_INLINE WORD16 ixheaac_sub16(WORD16 op1, WORD16 op2) {
   53|  21.4M|  WORD16 var_out;
   54|       |
   55|  21.4M|  var_out = ((WORD16)(op1 - op2));
   56|  21.4M|  return (var_out);
   57|  21.4M|}
ixheaacd_env_calc.c:ixheaac_mult16_shl_sat:
   82|  4.88M|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl_sat(WORD16 op1, WORD16 op2) {
   83|  4.88M|  WORD16 var_out;
   84|  4.88M|  WORD32 temp;
   85|       |
   86|  4.88M|  temp = ((WORD32)(((WORD32)op1 * (WORD32)op2) >> 15));
   87|  4.88M|  var_out = ixheaac_sat16(temp);
   88|  4.88M|  return (var_out);
   89|  4.88M|}
ixheaacd_env_dec.c:ixheaac_mult16_shl:
   75|   711k|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl(WORD16 op1, WORD16 op2) {
   76|   711k|  WORD16 var_out;
   77|       |
   78|   711k|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 15));
   79|   711k|  return (var_out);
   80|   711k|}
ixheaacd_env_dec.c:ixheaac_add16:
   36|   104k|static PLATFORM_INLINE WORD16 ixheaac_add16(WORD16 op1, WORD16 op2) {
   37|   104k|  WORD16 var_out;
   38|       |
   39|   104k|  var_out = ((WORD16)(op1 + op2));
   40|   104k|  return (var_out);
   41|   104k|}
ixheaacd_env_dec.c:ixheaac_shr16:
  110|  16.3k|static PLATFORM_INLINE WORD16 ixheaac_shr16(WORD16 op1, WORD16 shift) {
  111|  16.3k|  WORD16 var_out;
  112|       |
  113|  16.3k|  var_out = ((WORD16)(op1 >> shift));
  114|  16.3k|  return (var_out);
  115|  16.3k|}
ixheaacd_env_dec.c:ixheaac_sub16_sat:
   59|  1.01M|static PLATFORM_INLINE WORD16 ixheaac_sub16_sat(WORD16 op1, WORD16 op2) {
   60|  1.01M|  WORD16 var_out;
   61|  1.01M|  WORD32 diff;
   62|       |
   63|  1.01M|  diff = (WORD32)op1 - op2;
   64|  1.01M|  var_out = ixheaac_sat16(diff);
   65|  1.01M|  return (var_out);
   66|  1.01M|}
ixheaacd_env_dec.c:ixheaac_sat16:
   23|  1.01M|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  1.01M|  WORD16 var_out;
   25|       |
   26|  1.01M|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 1.01M]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  1.01M|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 1.01M]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|  1.01M|  } else {
   31|  1.01M|    var_out = (WORD16)(op1);
   32|  1.01M|  }
   33|  1.01M|  return (var_out);
   34|  1.01M|}
ixheaacd_env_dec.c:ixheaac_mult16:
   68|  9.52M|static PLATFORM_INLINE WORD16 ixheaac_mult16(WORD16 op1, WORD16 op2) {
   69|  9.52M|  WORD16 var_out;
   70|       |
   71|  9.52M|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 16));
   72|  9.52M|  return (var_out);
   73|  9.52M|}
ixheaacd_env_extr.c:ixheaac_add16:
   36|   537k|static PLATFORM_INLINE WORD16 ixheaac_add16(WORD16 op1, WORD16 op2) {
   37|   537k|  WORD16 var_out;
   38|       |
   39|   537k|  var_out = ((WORD16)(op1 + op2));
   40|   537k|  return (var_out);
   41|   537k|}
ixheaacd_freq_sca.c:ixheaac_shr16:
  110|  57.6k|static PLATFORM_INLINE WORD16 ixheaac_shr16(WORD16 op1, WORD16 shift) {
  111|  57.6k|  WORD16 var_out;
  112|       |
  113|  57.6k|  var_out = ((WORD16)(op1 >> shift));
  114|  57.6k|  return (var_out);
  115|  57.6k|}
ixheaacd_lpfuncs.c:ixheaac_negate16:
  206|  20.2M|static PLATFORM_INLINE WORD16 ixheaac_negate16(WORD16 op1) {
  207|  20.2M|  WORD16 var_out;
  208|       |
  209|  20.2M|  if (-32768 == op1) {
  ------------------
  |  Branch (209:7): [True: 0, False: 20.2M]
  ------------------
  210|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
  211|  20.2M|  } else {
  212|  20.2M|    var_out = (WORD16)(-op1);
  213|  20.2M|  }
  214|  20.2M|  return (var_out);
  215|  20.2M|}
ixheaacd_lpfuncs.c:ixheaac_round16:
  231|  24.4M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|  24.4M|  WORD16 var_out;
  233|       |
  234|  24.4M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|  24.4M|  return (var_out);
  236|  24.4M|}
ixheaacd_lpp_tran.c:ixheaac_shl16:
   91|   691k|static PLATFORM_INLINE WORD16 ixheaac_shl16(WORD16 op1, WORD16 shift) {
   92|   691k|  WORD16 var_out;
   93|       |
   94|   691k|  var_out = (WORD16)(op1 << shift);
   95|   691k|  return (var_out);
   96|   691k|}
ixheaacd_lpp_tran.c:ixheaac_sat16:
   23|  6.14M|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  6.14M|  WORD16 var_out;
   25|       |
   26|  6.14M|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 6.14M]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  6.14M|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 6.14M]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|  6.14M|  } else {
   31|  6.14M|    var_out = (WORD16)(op1);
   32|  6.14M|  }
   33|  6.14M|  return (var_out);
   34|  6.14M|}
ixheaacd_lpp_tran.c:ixheaac_mult16_shl_sat:
   82|  6.14M|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl_sat(WORD16 op1, WORD16 op2) {
   83|  6.14M|  WORD16 var_out;
   84|  6.14M|  WORD32 temp;
   85|       |
   86|  6.14M|  temp = ((WORD32)(((WORD32)op1 * (WORD32)op2) >> 15));
   87|  6.14M|  var_out = ixheaac_sat16(temp);
   88|  6.14M|  return (var_out);
   89|  6.14M|}
ixheaacd_lpp_tran.c:ixheaac_add16:
   36|  65.2k|static PLATFORM_INLINE WORD16 ixheaac_add16(WORD16 op1, WORD16 op2) {
   37|  65.2k|  WORD16 var_out;
   38|       |
   39|  65.2k|  var_out = ((WORD16)(op1 + op2));
   40|  65.2k|  return (var_out);
   41|  65.2k|}
ixheaacd_mps_calc_m1m2_tree_515x.c:ixheaac_mult16_shl:
   75|  72.8k|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl(WORD16 op1, WORD16 op2) {
   76|  72.8k|  WORD16 var_out;
   77|       |
   78|  72.8k|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 15));
   79|  72.8k|  return (var_out);
   80|  72.8k|}
ixheaacd_ps_bitdec.c:ixheaac_mult16_shl:
   75|  5.83k|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl(WORD16 op1, WORD16 op2) {
   76|  5.83k|  WORD16 var_out;
   77|       |
   78|  5.83k|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 15));
   79|  5.83k|  return (var_out);
   80|  5.83k|}
ixheaacd_ps_bitdec.c:ixheaac_add16:
   36|  11.9k|static PLATFORM_INLINE WORD16 ixheaac_add16(WORD16 op1, WORD16 op2) {
   37|  11.9k|  WORD16 var_out;
   38|       |
   39|  11.9k|  var_out = ((WORD16)(op1 + op2));
   40|  11.9k|  return (var_out);
   41|  11.9k|}
ixheaacd_ps_bitdec.c:ixheaac_negate16:
  206|  10.6k|static PLATFORM_INLINE WORD16 ixheaac_negate16(WORD16 op1) {
  207|  10.6k|  WORD16 var_out;
  208|       |
  209|  10.6k|  if (-32768 == op1) {
  ------------------
  |  Branch (209:7): [True: 0, False: 10.6k]
  ------------------
  210|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
  211|  10.6k|  } else {
  212|  10.6k|    var_out = (WORD16)(-op1);
  213|  10.6k|  }
  214|  10.6k|  return (var_out);
  215|  10.6k|}

ixheaacd_api.c:ixheaac_add32_sat:
  197|   357M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   357M|  WORD64 sum;
  199|       |
  200|   357M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   357M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   357M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  13.2M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 13.2M, False: 344M]
  ------------------
  203|   344M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   344M|#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: 344M]
  ------------------
  204|       |
  205|   344M|  return (WORD32)sum;
  206|   344M|}
ixheaacd_api.c:ixheaac_shl32_sat:
   67|  77.9M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  77.9M|  WORD32 out_val;
   69|  77.9M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  77.9M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 158k, False: 77.7M]
  ------------------
   70|   158k|    out_val = MAX_32;
  ------------------
  |  |   60|   158k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  77.7M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  77.7M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 186k, False: 77.5M]
  ------------------
   72|   186k|    out_val = MIN_32;
  ------------------
  |  |   61|   186k|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  77.5M|  else
   74|  77.5M|    out_val = a << b;
   75|  77.9M|  return (out_val);
   76|  77.9M|}
ixheaacd_huff_code_reorder.c:ixheaac_norm32:
  236|   600k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   600k|  WORD norm_val;
  238|       |
  239|   600k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 600k]
  ------------------
  240|      0|    norm_val = 31;
  241|   600k|  } else {
  242|   600k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 39.4k, False: 561k]
  ------------------
  243|  39.4k|      norm_val = 31;
  244|   561k|    } else {
  245|   561k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 561k, False: 0]
  ------------------
  246|   561k|        a = ~a;
  247|   561k|      }
  248|  13.2M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 12.7M, False: 561k]
  ------------------
  249|  12.7M|        a <<= 1;
  250|  12.7M|      }
  251|   561k|    }
  252|   600k|  }
  253|       |
  254|   600k|  return norm_val;
  255|   600k|}
ixheaacd_huff_code_reorder.c:ixheaac_abs32:
  271|  24.5M|static PLATFORM_INLINE WORD32 ixheaac_abs32(WORD32 a) {
  272|  24.5M|  WORD32 abs_val;
  273|       |
  274|  24.5M|  abs_val = a;
  275|       |
  276|  24.5M|  if (a < 0) {
  ------------------
  |  Branch (276:7): [True: 8.54M, False: 15.9M]
  ------------------
  277|  8.54M|    abs_val = -a;
  278|  8.54M|  }
  279|       |
  280|  24.5M|  return abs_val;
  281|  24.5M|}
ixheaacd_latmdemux.c:ixheaac_add32_sat:
  197|    166|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|    166|  WORD64 sum;
  199|       |
  200|    166|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|    166|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    166|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    139|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 139, False: 27]
  ------------------
  203|     27|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|     27|#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: 27]
  ------------------
  204|       |
  205|     27|  return (WORD32)sum;
  206|     27|}
ixheaacd_latmdemux.c:ixheaac_shl32_sat:
   67|    167|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|    167|  WORD32 out_val;
   69|    167|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|    167|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 139, False: 28]
  ------------------
   70|    139|    out_val = MAX_32;
  ------------------
  |  |   60|    139|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|     28|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|     28|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 0, False: 28]
  ------------------
   72|      0|    out_val = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|     28|  else
   74|     28|    out_val = a << b;
   75|    167|  return (out_val);
   76|    167|}
ixheaacd_lt_predict.c:ixheaac_shr32:
   51|   109M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   109M|  WORD32 out_val;
   53|       |
   54|   109M|  b = ((UWORD32)(b << 24) >> 24);
   55|   109M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 109M]
  ------------------
   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|   109M|  } else {
   61|   109M|    out_val = (WORD32)a >> b;
   62|   109M|  }
   63|       |
   64|   109M|  return out_val;
   65|   109M|}
ixheaacd_lt_predict.c:ixheaac_add32_sat:
  197|   104M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   104M|  WORD64 sum;
  199|       |
  200|   104M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   104M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   104M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   865k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 865k, False: 103M]
  ------------------
  203|   103M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   103M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  9.97k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 9.97k, False: 103M]
  ------------------
  204|       |
  205|   103M|  return (WORD32)sum;
  206|   103M|}
ixheaacd_lt_predict.c:ixheaac_sub32:
  189|  16.4M|static PLATFORM_INLINE WORD32 ixheaac_sub32(WORD32 a, WORD32 b) {
  190|  16.4M|  WORD32 diff;
  191|       |
  192|  16.4M|  diff = (WORD32)a - (WORD32)b;
  193|       |
  194|  16.4M|  return diff;
  195|  16.4M|}
ixheaacd_lt_predict.c:ixheaac_add32:
  181|  16.4M|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|  16.4M|  WORD32 sum;
  183|       |
  184|  16.4M|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|  16.4M|  return sum;
  187|  16.4M|}
ixheaacd_lt_predict.c:ixheaac_shl32:
   39|  82.6M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  82.6M|  WORD32 out_val;
   41|       |
   42|  82.6M|  b = ((UWORD32)(b << 24) >> 24);
   43|  82.6M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 82.6M]
  ------------------
   44|      0|    out_val = 0;
   45|  82.6M|  else
   46|  82.6M|    out_val = (WORD32)a << b;
   47|       |
   48|  82.6M|  return out_val;
   49|  82.6M|}
ixheaacd_lt_predict.c:ixheaac_shl32_dir:
   78|  17.2M|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir(WORD32 a, WORD b) {
   79|  17.2M|  WORD32 out_val;
   80|       |
   81|  17.2M|  if (b < 0) {
  ------------------
  |  Branch (81:7): [True: 3.47M, False: 13.7M]
  ------------------
   82|  3.47M|    out_val = ixheaac_shr32(a, -b);
   83|  13.7M|  } else {
   84|  13.7M|    out_val = ixheaac_shl32(a, b);
   85|  13.7M|  }
   86|       |
   87|  17.2M|  return out_val;
   88|  17.2M|}
ixheaacd_lt_predict.c:ixheaac_shl32_sat:
   67|  69.1M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  69.1M|  WORD32 out_val;
   69|  69.1M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  69.1M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 857k, False: 68.3M]
  ------------------
   70|   857k|    out_val = MAX_32;
  ------------------
  |  |   60|   857k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  68.3M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  68.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 1.35M, False: 66.9M]
  ------------------
   72|  1.35M|    out_val = MIN_32;
  ------------------
  |  |   61|  1.35M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  66.9M|  else
   74|  66.9M|    out_val = a << b;
   75|  69.1M|  return (out_val);
   76|  69.1M|}
ixheaacd_lt_predict.c:ixheaac_mult16x16in32_shl:
  162|  64.8M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl(WORD16 a, WORD16 b) {
  163|  64.8M|  WORD32 product;
  164|       |
  165|  64.8M|  product = ixheaac_shl32(ixheaac_mult16x16in32(a, b), 1);
  166|       |
  167|  64.8M|  return product;
  168|  64.8M|}
ixheaacd_lt_predict.c:ixheaac_mult16x16in32:
  126|  64.8M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|  64.8M|  WORD32 product;
  128|       |
  129|  64.8M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|  64.8M|  return product;
  132|  64.8M|}
ixheaacd_mps_bitdec.c:ixheaac_negate32_sat:
  317|   119k|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   119k|  WORD32 neg_val;
  319|       |
  320|   119k|  if (a == MIN_32) {
  ------------------
  |  |   61|   119k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 124, False: 119k]
  ------------------
  321|    124|    neg_val = MAX_32;
  ------------------
  |  |   60|    124|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   119k|  } else {
  323|   119k|    neg_val = -a;
  324|   119k|  }
  325|   119k|  return neg_val;
  326|   119k|}
ixheaacd_mps_bitdec.c:ixheaac_sub32_sat:
  225|  19.7k|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  19.7k|  WORD64 diff;
  227|       |
  228|  19.7k|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  19.7k|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  19.7k|#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: 19.7k]
  ------------------
  231|  19.7k|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  19.7k|#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: 19.7k]
  ------------------
  232|       |
  233|  19.7k|  return (WORD32)diff;
  234|  19.7k|}
ixheaacd_mps_bitdec.c:ixheaac_shr32:
   51|   119k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   119k|  WORD32 out_val;
   53|       |
   54|   119k|  b = ((UWORD32)(b << 24) >> 24);
   55|   119k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 119k]
  ------------------
   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|   119k|  } else {
   61|   119k|    out_val = (WORD32)a >> b;
   62|   119k|  }
   63|       |
   64|   119k|  return out_val;
   65|   119k|}
ixheaacd_mps_bitdec.c:ixheaac_add32:
  181|   119k|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|   119k|  WORD32 sum;
  183|       |
  184|   119k|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|   119k|  return sum;
  187|   119k|}
ixheaacd_mps_bitdec.c:ixheaac_add32_sat:
  197|   259k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   259k|  WORD64 sum;
  199|       |
  200|   259k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   259k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   259k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    190|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 190, False: 258k]
  ------------------
  203|   258k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   258k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    248|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 248, False: 258k]
  ------------------
  204|       |
  205|   258k|  return (WORD32)sum;
  206|   258k|}
ixheaacd_mps_decorr.c:ixheaac_norm32:
  236|   125M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   125M|  WORD norm_val;
  238|       |
  239|   125M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 17.6M, False: 108M]
  ------------------
  240|  17.6M|    norm_val = 31;
  241|   108M|  } else {
  242|   108M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 108M]
  ------------------
  243|      0|      norm_val = 31;
  244|   108M|    } else {
  245|   108M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 108M]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|   583M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 475M, False: 108M]
  ------------------
  249|   475M|        a <<= 1;
  250|   475M|      }
  251|   108M|    }
  252|   108M|  }
  253|       |
  254|   125M|  return norm_val;
  255|   125M|}
ixheaacd_mps_decorr.c:ixheaac_shr32:
   51|  15.8M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  15.8M|  WORD32 out_val;
   53|       |
   54|  15.8M|  b = ((UWORD32)(b << 24) >> 24);
   55|  15.8M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 15.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|  15.8M|  } else {
   61|  15.8M|    out_val = (WORD32)a >> b;
   62|  15.8M|  }
   63|       |
   64|  15.8M|  return out_val;
   65|  15.8M|}
ixheaacd_mps_decorr.c:ixheaac_shl32:
   39|  15.8M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  15.8M|  WORD32 out_val;
   41|       |
   42|  15.8M|  b = ((UWORD32)(b << 24) >> 24);
   43|  15.8M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 15.8M]
  ------------------
   44|      0|    out_val = 0;
   45|  15.8M|  else
   46|  15.8M|    out_val = (WORD32)a << b;
   47|       |
   48|  15.8M|  return out_val;
   49|  15.8M|}
ixheaacd_mps_decorr.c:ixheaac_add32_sat:
  197|  1.61G|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  1.61G|  WORD64 sum;
  199|       |
  200|  1.61G|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  1.61G|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.61G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  39.5M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 39.5M, False: 1.57G]
  ------------------
  203|  1.57G|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.57G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  39.5M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 39.5M, False: 1.53G]
  ------------------
  204|       |
  205|  1.53G|  return (WORD32)sum;
  206|  1.57G|}
ixheaacd_mps_hybrid_filt.c:ixheaac_shl32:
   39|  80.4M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  80.4M|  WORD32 out_val;
   41|       |
   42|  80.4M|  b = ((UWORD32)(b << 24) >> 24);
   43|  80.4M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 80.4M]
  ------------------
   44|      0|    out_val = 0;
   45|  80.4M|  else
   46|  80.4M|    out_val = (WORD32)a << b;
   47|       |
   48|  80.4M|  return out_val;
   49|  80.4M|}
ixheaacd_mps_hybrid_filt.c:ixheaac_sub32_sat:
  225|  74.2M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  74.2M|  WORD64 diff;
  227|       |
  228|  74.2M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  74.2M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  74.2M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.98k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 2.98k, False: 74.2M]
  ------------------
  231|  74.2M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  74.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.87k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 2.87k, False: 74.2M]
  ------------------
  232|       |
  233|  74.2M|  return (WORD32)diff;
  234|  74.2M|}
ixheaacd_mps_hybrid_filt.c:ixheaac_add32_sat:
  197|  86.5M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  86.5M|  WORD64 sum;
  199|       |
  200|  86.5M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  86.5M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  86.5M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.67k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 3.67k, False: 86.5M]
  ------------------
  203|  86.5M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  86.5M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.69k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 3.69k, False: 86.5M]
  ------------------
  204|       |
  205|  86.5M|  return (WORD32)sum;
  206|  86.5M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaac_add32_sat:
  197|   122M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   122M|  WORD64 sum;
  199|       |
  200|   122M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   122M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   122M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   203k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 203k, False: 122M]
  ------------------
  203|   122M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   122M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   223k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 223k, False: 122M]
  ------------------
  204|       |
  205|   122M|  return (WORD32)sum;
  206|   122M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaac_sub32_sat:
  225|  1.74M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  1.74M|  WORD64 diff;
  227|       |
  228|  1.74M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  1.74M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.74M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.48k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 1.48k, False: 1.74M]
  ------------------
  231|  1.74M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.74M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.50k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 1.50k, False: 1.74M]
  ------------------
  232|       |
  233|  1.74M|  return (WORD32)diff;
  234|  1.74M|}
ixheaacd_mps_polyphase.c:ixheaac_sub32_sat:
  225|  4.50G|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  4.50G|  WORD64 diff;
  227|       |
  228|  4.50G|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  4.50G|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  4.50G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   222M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 222M, False: 4.28G]
  ------------------
  231|  4.28G|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  4.28G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   215M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 215M, False: 4.06G]
  ------------------
  232|       |
  233|  4.06G|  return (WORD32)diff;
  234|  4.28G|}
ixheaacd_mps_polyphase.c:ixheaac_negate32_sat:
  317|   258M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   258M|  WORD32 neg_val;
  319|       |
  320|   258M|  if (a == MIN_32) {
  ------------------
  |  |   61|   258M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 2.19M, False: 255M]
  ------------------
  321|  2.19M|    neg_val = MAX_32;
  ------------------
  |  |   60|  2.19M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   255M|  } else {
  323|   255M|    neg_val = -a;
  324|   255M|  }
  325|   258M|  return neg_val;
  326|   258M|}
ixheaacd_mps_polyphase.c:ixheaac_shl32:
   39|   121M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   121M|  WORD32 out_val;
   41|       |
   42|   121M|  b = ((UWORD32)(b << 24) >> 24);
   43|   121M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 121M]
  ------------------
   44|      0|    out_val = 0;
   45|   121M|  else
   46|   121M|    out_val = (WORD32)a << b;
   47|       |
   48|   121M|  return out_val;
   49|   121M|}
ixheaacd_mps_polyphase.c:ixheaac_add32_sat:
  197|  6.37G|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  6.37G|  WORD64 sum;
  199|       |
  200|  6.37G|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  6.37G|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  6.37G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   251M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 251M, False: 6.12G]
  ------------------
  203|  6.12G|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  6.12G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   255M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 255M, False: 5.86G]
  ------------------
  204|       |
  205|  5.86G|  return (WORD32)sum;
  206|  6.12G|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_add32_sat:
  197|  69.6M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  69.6M|  WORD64 sum;
  199|       |
  200|  69.6M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  69.6M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  69.6M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  16.5k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 16.5k, False: 69.6M]
  ------------------
  203|  69.6M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  69.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  11.0k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 11.0k, False: 69.6M]
  ------------------
  204|       |
  205|  69.6M|  return (WORD32)sum;
  206|  69.6M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_norm32:
  236|  41.7M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  41.7M|  WORD norm_val;
  238|       |
  239|  41.7M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 5.56M, False: 36.2M]
  ------------------
  240|  5.56M|    norm_val = 31;
  241|  36.2M|  } else {
  242|  36.2M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 15, False: 36.2M]
  ------------------
  243|     15|      norm_val = 31;
  244|  36.2M|    } else {
  245|  36.2M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 380k, False: 35.8M]
  ------------------
  246|   380k|        a = ~a;
  247|   380k|      }
  248|   150M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 114M, False: 36.2M]
  ------------------
  249|   114M|        a <<= 1;
  250|   114M|      }
  251|  36.2M|    }
  252|  36.2M|  }
  253|       |
  254|  41.7M|  return norm_val;
  255|  41.7M|}
ixheaacd_mps_reshape_bb_env.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_mps_reshape_bb_env.c:ixheaac_shl32:
   39|   544k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   544k|  WORD32 out_val;
   41|       |
   42|   544k|  b = ((UWORD32)(b << 24) >> 24);
   43|   544k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 544k]
  ------------------
   44|      0|    out_val = 0;
   45|   544k|  else
   46|   544k|    out_val = (WORD32)a << b;
   47|       |
   48|   544k|  return out_val;
   49|   544k|}
ixheaacd_mps_res_pns_js_thumb.c:ixheaac_min32:
   23|  2.58k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  2.58k|  WORD32 min_val;
   25|       |
   26|  2.58k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 1.50k, False: 1.07k]
  ------------------
   27|       |
   28|  2.58k|  return min_val;
   29|  2.58k|}
ixheaacd_mps_res_tns.c:ixheaac_add32_sat:
  197|   156k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   156k|  WORD64 sum;
  199|       |
  200|   156k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   156k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   156k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  10.4k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 10.4k, False: 146k]
  ------------------
  203|   146k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   146k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.41k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 1.41k, False: 144k]
  ------------------
  204|       |
  205|   144k|  return (WORD32)sum;
  206|   146k|}
ixheaacd_mps_res_tns.c:ixheaac_mac16x16in32_shl_sat:
  416|  72.6k|static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_shl_sat(WORD32 a, WORD16 b, WORD16 c) {
  417|  72.6k|  WORD32 acc;
  418|       |
  419|  72.6k|  acc = ixheaac_mult16x16in32_shl_sat(b, c);
  420|       |
  421|  72.6k|  acc = ixheaac_add32_sat(a, acc);
  422|       |
  423|  72.6k|  return acc;
  424|  72.6k|}
ixheaacd_mps_res_tns.c:ixheaac_mult16x16in32_shl_sat:
  170|  72.6k|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl_sat(WORD16 a, WORD16 b) {
  171|  72.6k|  WORD32 product;
  172|  72.6k|  product = (WORD32)a * (WORD32)b;
  173|  72.6k|  if (product != (WORD32)0x40000000L) {
  ------------------
  |  Branch (173:7): [True: 72.6k, False: 0]
  ------------------
  174|  72.6k|    product = ixheaac_shl32(product, 1);
  175|  72.6k|  } else {
  176|      0|    product = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  177|      0|  }
  178|  72.6k|  return product;
  179|  72.6k|}
ixheaacd_mps_res_tns.c:ixheaac_shl32:
   39|  72.6k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  72.6k|  WORD32 out_val;
   41|       |
   42|  72.6k|  b = ((UWORD32)(b << 24) >> 24);
   43|  72.6k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 72.6k]
  ------------------
   44|      0|    out_val = 0;
   45|  72.6k|  else
   46|  72.6k|    out_val = (WORD32)a << b;
   47|       |
   48|  72.6k|  return out_val;
   49|  72.6k|}
ixheaacd_mps_res_tns.c:ixheaac_abs32_sat:
  295|  72.6k|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|  72.6k|  WORD32 abs_val;
  297|       |
  298|  72.6k|  abs_val = a;
  299|       |
  300|  72.6k|  if (a == MIN_32) {
  ------------------
  |  |   61|  72.6k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 1.41k, False: 71.2k]
  ------------------
  301|  1.41k|    abs_val = MAX_32;
  ------------------
  |  |   60|  1.41k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|  71.2k|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 14.4k, False: 56.8k]
  ------------------
  303|  14.4k|    abs_val = -a;
  304|  14.4k|  }
  305|       |
  306|  72.6k|  return abs_val;
  307|  72.6k|}
ixheaacd_mps_res_tns.c:ixheaac_sub32_sat:
  225|   220k|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   220k|  WORD64 diff;
  227|       |
  228|   220k|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   220k|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   220k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  4.95k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 4.95k, False: 215k]
  ------------------
  231|   215k|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   215k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  4.94k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 4.94k, False: 210k]
  ------------------
  232|       |
  233|   210k|  return (WORD32)diff;
  234|   215k|}
ixheaacd_mps_res_tns.c:ixheaac_shl32_sat:
   67|  33.3k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  33.3k|  WORD32 out_val;
   69|  33.3k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  33.3k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 2.47k, False: 30.9k]
  ------------------
   70|  2.47k|    out_val = MAX_32;
  ------------------
  |  |   60|  2.47k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  30.9k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  30.9k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 2.63k, False: 28.2k]
  ------------------
   72|  2.63k|    out_val = MIN_32;
  ------------------
  |  |   61|  2.63k|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  28.2k|  else
   74|  28.2k|    out_val = a << b;
   75|  33.3k|  return (out_val);
   76|  33.3k|}
ixheaacd_mps_res_tns.c:ixheaac_abs32_nrm:
  283|  33.3k|static PLATFORM_INLINE WORD32 ixheaac_abs32_nrm(WORD32 a) {
  284|  33.3k|  WORD32 abs_val;
  285|       |
  286|  33.3k|  abs_val = a;
  287|       |
  288|  33.3k|  if (a < 0) {
  ------------------
  |  Branch (288:7): [True: 6.66k, False: 26.7k]
  ------------------
  289|  6.66k|    abs_val = ~a;
  290|  6.66k|  }
  291|       |
  292|  33.3k|  return abs_val;
  293|  33.3k|}
ixheaacd_mps_res_tns.c:ixheaac_norm32:
  236|    408|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|    408|  WORD norm_val;
  238|       |
  239|    408|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 91, False: 317]
  ------------------
  240|     91|    norm_val = 31;
  241|    317|  } else {
  242|    317|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 317]
  ------------------
  243|      0|      norm_val = 31;
  244|    317|    } else {
  245|    317|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 317]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  1.90k|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 1.58k, False: 317]
  ------------------
  249|  1.58k|        a <<= 1;
  250|  1.58k|      }
  251|    317|    }
  252|    317|  }
  253|       |
  254|    408|  return norm_val;
  255|    408|}
ixheaacd_mps_smoothing.c:ixheaac_abs32:
  271|  68.3k|static PLATFORM_INLINE WORD32 ixheaac_abs32(WORD32 a) {
  272|  68.3k|  WORD32 abs_val;
  273|       |
  274|  68.3k|  abs_val = a;
  275|       |
  276|  68.3k|  if (a < 0) {
  ------------------
  |  Branch (276:7): [True: 6.59k, False: 61.7k]
  ------------------
  277|  6.59k|    abs_val = -a;
  278|  6.59k|  }
  279|       |
  280|  68.3k|  return abs_val;
  281|  68.3k|}
ixheaacd_mps_temp_process.c:ixheaac_add32_sat:
  197|   600M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   600M|  WORD64 sum;
  199|       |
  200|   600M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   600M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   600M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  24.6M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 24.6M, False: 575M]
  ------------------
  203|   575M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   575M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  25.1M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 25.1M, False: 550M]
  ------------------
  204|       |
  205|   550M|  return (WORD32)sum;
  206|   575M|}
ixheaacd_mps_temp_process.c:ixheaac_norm32:
  236|  25.8M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  25.8M|  WORD norm_val;
  238|       |
  239|  25.8M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 15.2M, False: 10.5M]
  ------------------
  240|  15.2M|    norm_val = 31;
  241|  15.2M|  } else {
  242|  10.5M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 10.5M]
  ------------------
  243|      0|      norm_val = 31;
  244|  10.5M|    } else {
  245|  10.5M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 10.5M]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|   149M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 138M, False: 10.5M]
  ------------------
  249|   138M|        a <<= 1;
  250|   138M|      }
  251|  10.5M|    }
  252|  10.5M|  }
  253|       |
  254|  25.8M|  return norm_val;
  255|  25.8M|}
ixheaacd_mps_temp_process.c:ixheaac_shr32:
   51|   975k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   975k|  WORD32 out_val;
   53|       |
   54|   975k|  b = ((UWORD32)(b << 24) >> 24);
   55|   975k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 975k]
  ------------------
   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|   975k|  } else {
   61|   975k|    out_val = (WORD32)a >> b;
   62|   975k|  }
   63|       |
   64|   975k|  return out_val;
   65|   975k|}
ixheaacd_mps_temp_process.c:ixheaac_shl32:
   39|   975k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   975k|  WORD32 out_val;
   41|       |
   42|   975k|  b = ((UWORD32)(b << 24) >> 24);
   43|   975k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 975k]
  ------------------
   44|      0|    out_val = 0;
   45|   975k|  else
   46|   975k|    out_val = (WORD32)a << b;
   47|       |
   48|   975k|  return out_val;
   49|   975k|}
ixheaacd_multichannel.c:ixheaac_shl32_sat:
   67|   662k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|   662k|  WORD32 out_val;
   69|   662k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|   662k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 25.1k, False: 637k]
  ------------------
   70|  25.1k|    out_val = MAX_32;
  ------------------
  |  |   60|  25.1k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|   637k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|   637k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 26.8k, False: 610k]
  ------------------
   72|  26.8k|    out_val = MIN_32;
  ------------------
  |  |   61|  26.8k|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   610k|  else
   74|   610k|    out_val = a << b;
   75|   662k|  return (out_val);
   76|   662k|}
ixheaacd_multichannel.c:ixheaac_add32_sat:
  197|   663k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   663k|  WORD64 sum;
  199|       |
  200|   663k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   663k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   663k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  74.0k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 74.0k, False: 589k]
  ------------------
  203|   589k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   589k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  83.0k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 83.0k, False: 506k]
  ------------------
  204|       |
  205|   506k|  return (WORD32)sum;
  206|   589k|}
ixheaacd_pns_js_thumb.c:ixheaac_add32_sat:
  197|  6.42M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  6.42M|  WORD64 sum;
  199|       |
  200|  6.42M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  6.42M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  6.42M|#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.42M]
  ------------------
  203|  6.42M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  6.42M|#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.42M]
  ------------------
  204|       |
  205|  6.42M|  return (WORD32)sum;
  206|  6.42M|}
ixheaacd_pns_js_thumb.c:ixheaac_norm32:
  236|   586k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   586k|  WORD norm_val;
  238|       |
  239|   586k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 586k]
  ------------------
  240|      0|    norm_val = 31;
  241|   586k|  } else {
  242|   586k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 586k]
  ------------------
  243|      0|      norm_val = 31;
  244|   586k|    } else {
  245|   586k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 586k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  2.93M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 2.34M, False: 586k]
  ------------------
  249|  2.34M|        a <<= 1;
  250|  2.34M|      }
  251|   586k|    }
  252|   586k|  }
  253|       |
  254|   586k|  return norm_val;
  255|   586k|}
ixheaacd_pns_js_thumb.c:ixheaac_shl32_sat:
   67|  1.88M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  1.88M|  WORD32 out_val;
   69|  1.88M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  1.88M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 631k, False: 1.25M]
  ------------------
   70|   631k|    out_val = MAX_32;
  ------------------
  |  |   60|   631k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  1.25M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  1.25M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 633k, False: 620k]
  ------------------
   72|   633k|    out_val = MIN_32;
  ------------------
  |  |   61|   633k|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   620k|  else
   74|   620k|    out_val = a << b;
   75|  1.88M|  return (out_val);
   76|  1.88M|}
ixheaacd_pns_js_thumb.c:ixheaac_shr32:
   51|  5.12M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  5.12M|  WORD32 out_val;
   53|       |
   54|  5.12M|  b = ((UWORD32)(b << 24) >> 24);
   55|  5.12M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 2.59M, False: 2.53M]
  ------------------
   56|  2.59M|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 1.30M, False: 1.28M]
  ------------------
   57|  1.30M|      out_val = -1;
   58|  1.28M|    else
   59|  1.28M|      out_val = 0;
   60|  2.59M|  } else {
   61|  2.53M|    out_val = (WORD32)a >> b;
   62|  2.53M|  }
   63|       |
   64|  5.12M|  return out_val;
   65|  5.12M|}
ixheaacd_pns_js_thumb.c:ixheaac_min32:
   23|  5.51M|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  5.51M|  WORD32 min_val;
   25|       |
   26|  5.51M|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 2.79M, False: 2.71M]
  ------------------
   27|       |
   28|  5.51M|  return min_val;
   29|  5.51M|}
ixheaacd_rev_vlc.c:ixheaac_min32:
   23|  2.10k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  2.10k|  WORD32 min_val;
   25|       |
   26|  2.10k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 2.10k, False: 0]
  ------------------
   27|       |
   28|  2.10k|  return min_val;
   29|  2.10k|}
ixheaacd_rev_vlc.c:ixheaac_max32:
   31|  30.8k|static PLATFORM_INLINE WORD32 ixheaac_max32(WORD32 a, WORD32 b) {
   32|  30.8k|  WORD32 max_val;
   33|       |
   34|  30.8k|  max_val = (a > b) ? a : b;
  ------------------
  |  Branch (34:13): [True: 5.64k, False: 25.2k]
  ------------------
   35|       |
   36|  30.8k|  return max_val;
   37|  30.8k|}
ixheaacd_sbrdec_lpfuncs.c:ixheaac_min32:
   23|   136k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|   136k|  WORD32 min_val;
   25|       |
   26|   136k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 30.5k, False: 105k]
  ------------------
   27|       |
   28|   136k|  return min_val;
   29|   136k|}
ixheaacd_sbrdec_lpfuncs.c:ixheaac_max32:
   31|   136k|static PLATFORM_INLINE WORD32 ixheaac_max32(WORD32 a, WORD32 b) {
   32|   136k|  WORD32 max_val;
   33|       |
   34|   136k|  max_val = (a > b) ? a : b;
  ------------------
  |  Branch (34:13): [True: 15.5k, False: 120k]
  ------------------
   35|       |
   36|   136k|  return max_val;
   37|   136k|}
ixheaacd_sbrdec_lpfuncs.c:ixheaac_add32:
  181|   151k|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|   151k|  WORD32 sum;
  183|       |
  184|   151k|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|   151k|  return sum;
  187|   151k|}
ixheaacd_sbr_dec.c:ixheaac_min32:
   23|   220k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|   220k|  WORD32 min_val;
   25|       |
   26|   220k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 86.5k, False: 134k]
  ------------------
   27|       |
   28|   220k|  return min_val;
   29|   220k|}
ixheaacd_stereo.c:ixheaac_add32_sat:
  197|   693k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   693k|  WORD64 sum;
  199|       |
  200|   693k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   693k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   693k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    278|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 278, False: 693k]
  ------------------
  203|   693k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   693k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.62k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 1.62k, False: 691k]
  ------------------
  204|       |
  205|   691k|  return (WORD32)sum;
  206|   693k|}
ixheaacd_stereo.c:ixheaac_sub32_sat:
  225|   693k|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   693k|  WORD64 diff;
  227|       |
  228|   693k|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   693k|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   693k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    228|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 228, False: 693k]
  ------------------
  231|   693k|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   693k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.79k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 1.79k, False: 691k]
  ------------------
  232|       |
  233|   691k|  return (WORD32)diff;
  234|   693k|}
ixheaacd_stereo.c:ixheaac_negate32:
  309|  2.31k|static PLATFORM_INLINE WORD32 ixheaac_negate32(WORD32 a) {
  310|  2.31k|  WORD32 neg_val;
  311|       |
  312|  2.31k|  neg_val = -a;
  313|       |
  314|  2.31k|  return neg_val;
  315|  2.31k|}
ixheaacd_stereo.c:ixheaac_norm32:
  236|   220k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   220k|  WORD norm_val;
  238|       |
  239|   220k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 217k, False: 3.61k]
  ------------------
  240|   217k|    norm_val = 31;
  241|   217k|  } else {
  242|  3.61k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 419, False: 3.19k]
  ------------------
  243|    419|      norm_val = 31;
  244|  3.19k|    } else {
  245|  3.19k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 1.69k, False: 1.50k]
  ------------------
  246|  1.69k|        a = ~a;
  247|  1.69k|      }
  248|  37.3k|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 34.1k, False: 3.19k]
  ------------------
  249|  34.1k|        a <<= 1;
  250|  34.1k|      }
  251|  3.19k|    }
  252|  3.61k|  }
  253|       |
  254|   220k|  return norm_val;
  255|   220k|}
ixheaacd_stereo.c:ixheaac_shl32:
   39|   220k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   220k|  WORD32 out_val;
   41|       |
   42|   220k|  b = ((UWORD32)(b << 24) >> 24);
   43|   220k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 220k]
  ------------------
   44|      0|    out_val = 0;
   45|   220k|  else
   46|   220k|    out_val = (WORD32)a << b;
   47|       |
   48|   220k|  return out_val;
   49|   220k|}
ixheaacd_stereo.c:ixheaac_shl32_sat:
   67|  4.23k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  4.23k|  WORD32 out_val;
   69|  4.23k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  4.23k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 673, False: 3.56k]
  ------------------
   70|    673|    out_val = MAX_32;
  ------------------
  |  |   60|    673|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  3.56k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  3.56k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 238, False: 3.32k]
  ------------------
   72|    238|    out_val = MIN_32;
  ------------------
  |  |   61|    238|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  3.32k|  else
   74|  3.32k|    out_val = a << b;
   75|  4.23k|  return (out_val);
   76|  4.23k|}
ixheaacd_stereo.c:ixheaac_shr32:
   51|   216k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   216k|  WORD32 out_val;
   53|       |
   54|   216k|  b = ((UWORD32)(b << 24) >> 24);
   55|   216k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 11.2k, False: 205k]
  ------------------
   56|  11.2k|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 98, False: 11.1k]
  ------------------
   57|     98|      out_val = -1;
   58|  11.1k|    else
   59|  11.1k|      out_val = 0;
   60|   205k|  } else {
   61|   205k|    out_val = (WORD32)a >> b;
   62|   205k|  }
   63|       |
   64|   216k|  return out_val;
   65|   216k|}
ixheaacd_qmf_dec_generic.c:ixheaac_add32_sat:
  197|  4.59G|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  4.59G|  WORD64 sum;
  199|       |
  200|  4.59G|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  4.59G|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  4.59G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  19.6M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 19.6M, False: 4.57G]
  ------------------
  203|  4.57G|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  4.57G|#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: 4.54G]
  ------------------
  204|       |
  205|  4.54G|  return (WORD32)sum;
  206|  4.57G|}
ixheaacd_qmf_dec_generic.c:ixheaac_shr32:
   51|   815M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   815M|  WORD32 out_val;
   53|       |
   54|   815M|  b = ((UWORD32)(b << 24) >> 24);
   55|   815M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 815M]
  ------------------
   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|   815M|  } else {
   61|   815M|    out_val = (WORD32)a >> b;
   62|   815M|  }
   63|       |
   64|   815M|  return out_val;
   65|   815M|}
ixheaacd_qmf_dec_generic.c:ixheaac_sub32_sat:
  225|  4.18G|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  4.18G|  WORD64 diff;
  227|       |
  228|  4.18G|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  4.18G|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  4.18G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  10.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 10.8M, False: 4.17G]
  ------------------
  231|  4.17G|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  4.17G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  10.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 10.2M, False: 4.16G]
  ------------------
  232|       |
  233|  4.16G|  return (WORD32)diff;
  234|  4.17G|}
ixheaacd_qmf_dec_generic.c:ixheaac_negate32_sat:
  317|   461M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   461M|  WORD32 neg_val;
  319|       |
  320|   461M|  if (a == MIN_32) {
  ------------------
  |  |   61|   461M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 2.29k, False: 461M]
  ------------------
  321|  2.29k|    neg_val = MAX_32;
  ------------------
  |  |   60|  2.29k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   461M|  } else {
  323|   461M|    neg_val = -a;
  324|   461M|  }
  325|   461M|  return neg_val;
  326|   461M|}
ixheaacd_qmf_dec_generic.c:ixheaac_mult16x16in32:
  126|   305M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|   305M|  WORD32 product;
  128|       |
  129|   305M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|   305M|  return product;
  132|   305M|}
ixheaacd_qmf_dec_generic.c:ixheaac_shl32_sat:
   67|   811M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|   811M|  WORD32 out_val;
   69|   811M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|   811M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 78.9M, False: 732M]
  ------------------
   70|  78.9M|    out_val = MAX_32;
  ------------------
  |  |   60|  78.9M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|   732M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|   732M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 90.4M, False: 641M]
  ------------------
   72|  90.4M|    out_val = MIN_32;
  ------------------
  |  |   61|  90.4M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   641M|  else
   74|   641M|    out_val = a << b;
   75|   811M|  return (out_val);
   76|   811M|}
ixheaacd_aacdecoder.c:ixheaac_add32:
  181|   284k|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|   284k|  WORD32 sum;
  183|       |
  184|   284k|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|   284k|  return sum;
  187|   284k|}
ixheaacd_aac_imdct.c:ixheaac_shl32:
   39|   104M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   104M|  WORD32 out_val;
   41|       |
   42|   104M|  b = ((UWORD32)(b << 24) >> 24);
   43|   104M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 104M]
  ------------------
   44|      0|    out_val = 0;
   45|   104M|  else
   46|   104M|    out_val = (WORD32)a << b;
   47|       |
   48|   104M|  return out_val;
   49|   104M|}
ixheaacd_aac_imdct.c:ixheaac_sub32:
  189|   242M|static PLATFORM_INLINE WORD32 ixheaac_sub32(WORD32 a, WORD32 b) {
  190|   242M|  WORD32 diff;
  191|       |
  192|   242M|  diff = (WORD32)a - (WORD32)b;
  193|       |
  194|   242M|  return diff;
  195|   242M|}
ixheaacd_aac_imdct.c:ixheaac_shr32:
   51|   139M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   139M|  WORD32 out_val;
   53|       |
   54|   139M|  b = ((UWORD32)(b << 24) >> 24);
   55|   139M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 139M]
  ------------------
   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|   139M|  } else {
   61|   139M|    out_val = (WORD32)a >> b;
   62|   139M|  }
   63|       |
   64|   139M|  return out_val;
   65|   139M|}
ixheaacd_aac_imdct.c:ixheaac_add32:
  181|   154M|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|   154M|  WORD32 sum;
  183|       |
  184|   154M|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|   154M|  return sum;
  187|   154M|}
ixheaacd_aac_imdct.c:ixheaac_shr32_sat:
  377|  32.1M|static PLATFORM_INLINE WORD32 ixheaac_shr32_sat(WORD32 a, WORD32 b) {
  378|  32.1M|  WORD32 out_val;
  379|       |
  380|  32.1M|  b = ((UWORD32)(b << 24) >> 24);
  381|  32.1M|  if (b >= 31) {
  ------------------
  |  Branch (381:7): [True: 15.7M, False: 16.4M]
  ------------------
  382|  15.7M|    if (a < 0)
  ------------------
  |  Branch (382:9): [True: 0, False: 15.7M]
  ------------------
  383|      0|      out_val = -1;
  384|  15.7M|    else
  385|  15.7M|      out_val = 0;
  386|  16.4M|  } else if (b <= 0) {
  ------------------
  |  Branch (386:14): [True: 12.9M, False: 3.41M]
  ------------------
  387|  12.9M|    return a;
  388|  12.9M|  } else {
  389|  3.41M|    a = ixheaac_add32_sat(a, (1 << (b - 1)));
  390|  3.41M|    out_val = (WORD32)a >> b;
  391|  3.41M|  }
  392|       |
  393|  19.1M|  return out_val;
  394|  32.1M|}
ixheaacd_aac_imdct.c:ixheaac_sub32_sat:
  225|   870M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   870M|  WORD64 diff;
  227|       |
  228|   870M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   870M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   870M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  8.47M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 8.47M, False: 862M]
  ------------------
  231|   862M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   862M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  8.98M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 8.98M, False: 853M]
  ------------------
  232|       |
  233|   853M|  return (WORD32)diff;
  234|   862M|}
ixheaacd_aac_imdct.c:ixheaac_shl32_sat:
   67|   139M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|   139M|  WORD32 out_val;
   69|   139M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|   139M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 11.8M, False: 127M]
  ------------------
   70|  11.8M|    out_val = MAX_32;
  ------------------
  |  |   60|  11.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|   127M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|   127M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 11.9M, False: 116M]
  ------------------
   72|  11.9M|    out_val = MIN_32;
  ------------------
  |  |   61|  11.9M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   116M|  else
   74|   116M|    out_val = a << b;
   75|   139M|  return (out_val);
   76|   139M|}
ixheaacd_aac_imdct.c:ixheaac_mult32x16hin32:
  134|   217M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16hin32(WORD32 a, WORD32 b) {
  135|   217M|  WORD32 result;
  136|   217M|  WORD64 temp_result;
  137|       |
  138|   217M|  temp_result = (WORD64)(a) * (WORD64)(b >> 16);
  139|   217M|  result = (WORD32)(temp_result >> 16);
  140|       |
  141|   217M|  return (result);
  142|   217M|}
ixheaacd_aac_imdct.c:ixheaac_negate32_sat:
  317|  32.1M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|  32.1M|  WORD32 neg_val;
  319|       |
  320|  32.1M|  if (a == MIN_32) {
  ------------------
  |  |   61|  32.1M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 0, False: 32.1M]
  ------------------
  321|      0|    neg_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|  32.1M|  } else {
  323|  32.1M|    neg_val = -a;
  324|  32.1M|  }
  325|  32.1M|  return neg_val;
  326|  32.1M|}
ixheaacd_aac_imdct.c:ixheaac_norm32:
  236|   215k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   215k|  WORD norm_val;
  238|       |
  239|   215k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 215k]
  ------------------
  240|      0|    norm_val = 31;
  241|   215k|  } else {
  242|   215k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 215k]
  ------------------
  243|      0|      norm_val = 31;
  244|   215k|    } else {
  245|   215k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 215k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  5.06M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 4.85M, False: 215k]
  ------------------
  249|  4.85M|        a <<= 1;
  250|  4.85M|      }
  251|   215k|    }
  252|   215k|  }
  253|       |
  254|   215k|  return norm_val;
  255|   215k|}
ixheaacd_aac_imdct.c:ixheaac_add32_sat:
  197|   956M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   956M|  WORD64 sum;
  199|       |
  200|   956M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   956M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   956M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   981k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 981k, False: 955M]
  ------------------
  203|   955M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   955M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.14M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 1.14M, False: 954M]
  ------------------
  204|       |
  205|   954M|  return (WORD32)sum;
  206|   955M|}
ixheaacd_aac_imdct.c:ixheaac_shr32_dir_sat:
  114|  97.2M|static PLATFORM_INLINE WORD32 ixheaac_shr32_dir_sat(WORD32 a, WORD b) {
  115|  97.2M|  WORD32 out_val;
  116|       |
  117|  97.2M|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 83.0M, False: 14.1M]
  ------------------
  118|  83.0M|    out_val = ixheaac_shl32_sat(a, -b);
  119|  83.0M|  } else {
  120|  14.1M|    out_val = ixheaac_shr32(a, b);
  121|  14.1M|  }
  122|       |
  123|  97.2M|  return out_val;
  124|  97.2M|}
ixheaacd_aac_tns.c:ixheaac_add32_sat:
  197|  82.1M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  82.1M|  WORD64 sum;
  199|       |
  200|  82.1M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  82.1M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  82.1M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.03M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 1.03M, False: 81.1M]
  ------------------
  203|  81.1M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  81.1M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   490k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 490k, False: 80.6M]
  ------------------
  204|       |
  205|  80.6M|  return (WORD32)sum;
  206|  81.1M|}
ixheaacd_aac_tns.c:ixheaac_abs32_sat:
  295|  22.5M|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|  22.5M|  WORD32 abs_val;
  297|       |
  298|  22.5M|  abs_val = a;
  299|       |
  300|  22.5M|  if (a == MIN_32) {
  ------------------
  |  |   61|  22.5M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 395k, False: 22.1M]
  ------------------
  301|   395k|    abs_val = MAX_32;
  ------------------
  |  |   60|   395k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|  22.1M|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 5.56M, False: 16.6M]
  ------------------
  303|  5.56M|    abs_val = -a;
  304|  5.56M|  }
  305|       |
  306|  22.5M|  return abs_val;
  307|  22.5M|}
ixheaacd_aac_tns.c:ixheaac_mac16x16in32_shl_sat:
  416|  6.99M|static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_shl_sat(WORD32 a, WORD16 b, WORD16 c) {
  417|  6.99M|  WORD32 acc;
  418|       |
  419|  6.99M|  acc = ixheaac_mult16x16in32_shl_sat(b, c);
  420|       |
  421|  6.99M|  acc = ixheaac_add32_sat(a, acc);
  422|       |
  423|  6.99M|  return acc;
  424|  6.99M|}
ixheaacd_aac_tns.c:ixheaac_mult16x16in32_shl_sat:
  170|  6.99M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl_sat(WORD16 a, WORD16 b) {
  171|  6.99M|  WORD32 product;
  172|  6.99M|  product = (WORD32)a * (WORD32)b;
  173|  6.99M|  if (product != (WORD32)0x40000000L) {
  ------------------
  |  Branch (173:7): [True: 6.99M, False: 0]
  ------------------
  174|  6.99M|    product = ixheaac_shl32(product, 1);
  175|  6.99M|  } else {
  176|      0|    product = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  177|      0|  }
  178|  6.99M|  return product;
  179|  6.99M|}
ixheaacd_aac_tns.c:ixheaac_shl32:
   39|  6.99M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  6.99M|  WORD32 out_val;
   41|       |
   42|  6.99M|  b = ((UWORD32)(b << 24) >> 24);
   43|  6.99M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 6.99M]
  ------------------
   44|      0|    out_val = 0;
   45|  6.99M|  else
   46|  6.99M|    out_val = (WORD32)a << b;
   47|       |
   48|  6.99M|  return out_val;
   49|  6.99M|}
ixheaacd_aac_tns.c:ixheaac_shl32_sat:
   67|  20.2M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  20.2M|  WORD32 out_val;
   69|  20.2M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  20.2M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 1.43M, False: 18.7M]
  ------------------
   70|  1.43M|    out_val = MAX_32;
  ------------------
  |  |   60|  1.43M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  18.7M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  18.7M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 1.42M, False: 17.3M]
  ------------------
   72|  1.42M|    out_val = MIN_32;
  ------------------
  |  |   61|  1.42M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  17.3M|  else
   74|  17.3M|    out_val = a << b;
   75|  20.2M|  return (out_val);
   76|  20.2M|}
ixheaacd_aac_tns.c:ixheaac_sub32_sat:
  225|  5.68M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  5.68M|  WORD64 diff;
  227|       |
  228|  5.68M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  5.68M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  5.68M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   314k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 314k, False: 5.36M]
  ------------------
  231|  5.36M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  5.36M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   209k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 209k, False: 5.15M]
  ------------------
  232|       |
  233|  5.15M|  return (WORD32)diff;
  234|  5.36M|}
ixheaacd_aac_tns.c:ixheaac_shl32_dir_sat:
   90|  3.18M|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat(WORD32 a, WORD b) {
   91|  3.18M|  WORD32 out_val;
   92|       |
   93|  3.18M|  if (b < 0) {
  ------------------
  |  Branch (93:7): [True: 0, False: 3.18M]
  ------------------
   94|      0|    out_val = ixheaac_shr32(a, -b);
   95|  3.18M|  } else {
   96|  3.18M|    out_val = ixheaac_shl32_sat(a, b);
   97|  3.18M|  }
   98|       |
   99|  3.18M|  return out_val;
  100|  3.18M|}
ixheaacd_aac_tns.c:ixheaac_abs32_nrm:
  283|   305M|static PLATFORM_INLINE WORD32 ixheaac_abs32_nrm(WORD32 a) {
  284|   305M|  WORD32 abs_val;
  285|       |
  286|   305M|  abs_val = a;
  287|       |
  288|   305M|  if (a < 0) {
  ------------------
  |  Branch (288:7): [True: 32.1M, False: 273M]
  ------------------
  289|  32.1M|    abs_val = ~a;
  290|  32.1M|  }
  291|       |
  292|   305M|  return abs_val;
  293|   305M|}
ixheaacd_aac_tns.c:ixheaac_norm32:
  236|   490k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   490k|  WORD norm_val;
  238|       |
  239|   490k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 230k, False: 260k]
  ------------------
  240|   230k|    norm_val = 31;
  241|   260k|  } else {
  242|   260k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 260k]
  ------------------
  243|      0|      norm_val = 31;
  244|   260k|    } else {
  245|   260k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 260k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  1.48M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 1.22M, False: 260k]
  ------------------
  249|  1.22M|        a <<= 1;
  250|  1.22M|      }
  251|   260k|    }
  252|   260k|  }
  253|       |
  254|   490k|  return norm_val;
  255|   490k|}
ixheaacd_basic_funcs.c:ixheaac_abs32:
  271|  2.94M|static PLATFORM_INLINE WORD32 ixheaac_abs32(WORD32 a) {
  272|  2.94M|  WORD32 abs_val;
  273|       |
  274|  2.94M|  abs_val = a;
  275|       |
  276|  2.94M|  if (a < 0) {
  ------------------
  |  Branch (276:7): [True: 28.2k, False: 2.91M]
  ------------------
  277|  28.2k|    abs_val = -a;
  278|  28.2k|  }
  279|       |
  280|  2.94M|  return abs_val;
  281|  2.94M|}
ixheaacd_basic_funcs.c:ixheaac_norm32:
  236|  15.5M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  15.5M|  WORD norm_val;
  238|       |
  239|  15.5M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 586k, False: 14.9M]
  ------------------
  240|   586k|    norm_val = 31;
  241|  14.9M|  } else {
  242|  14.9M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 14.9M]
  ------------------
  243|      0|      norm_val = 31;
  244|  14.9M|    } else {
  245|  14.9M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 65.0k, False: 14.9M]
  ------------------
  246|  65.0k|        a = ~a;
  247|  65.0k|      }
  248|   206M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 191M, False: 14.9M]
  ------------------
  249|   191M|        a <<= 1;
  250|   191M|      }
  251|  14.9M|    }
  252|  14.9M|  }
  253|       |
  254|  15.5M|  return norm_val;
  255|  15.5M|}
ixheaacd_basic_funcs.c:ixheaac_mult16x16in32:
  126|  3.79M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|  3.79M|  WORD32 product;
  128|       |
  129|  3.79M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|  3.79M|  return product;
  132|  3.79M|}
ixheaacd_basic_funcs.c:ixheaac_min32:
   23|   586k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|   586k|  WORD32 min_val;
   25|       |
   26|   586k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 586k, False: 0]
  ------------------
   27|       |
   28|   586k|  return min_val;
   29|   586k|}
ixheaacd_basic_funcs.c:ixheaac_shr32:
   51|   586k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   586k|  WORD32 out_val;
   53|       |
   54|   586k|  b = ((UWORD32)(b << 24) >> 24);
   55|   586k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 586k]
  ------------------
   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|   586k|  } else {
   61|   586k|    out_val = (WORD32)a >> b;
   62|   586k|  }
   63|       |
   64|   586k|  return out_val;
   65|   586k|}
ixheaacd_basic_funcs.c:ixheaac_shl32_sat:
   67|  3.51M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  3.51M|  WORD32 out_val;
   69|  3.51M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  3.51M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 0, False: 3.51M]
  ------------------
   70|      0|    out_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  3.51M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  3.51M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 0, False: 3.51M]
  ------------------
   72|      0|    out_val = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  3.51M|  else
   74|  3.51M|    out_val = a << b;
   75|  3.51M|  return (out_val);
   76|  3.51M|}
ixheaacd_basic_funcs.c:ixheaac_add32_sat:
  197|  2.93M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  2.93M|  WORD64 sum;
  199|       |
  200|  2.93M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  2.93M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.93M|#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.93M]
  ------------------
  203|  2.93M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.93M|#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.93M]
  ------------------
  204|       |
  205|  2.93M|  return (WORD32)sum;
  206|  2.93M|}
ixheaacd_basic_funcs.c:ixheaac_sub32_sat:
  225|  1.75M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  1.75M|  WORD64 diff;
  227|       |
  228|  1.75M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  1.75M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.75M|#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.75M]
  ------------------
  231|  1.75M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.75M|#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.75M]
  ------------------
  232|       |
  233|  1.75M|  return (WORD32)diff;
  234|  1.75M|}
ixheaacd_block.c:ixheaac_norm32:
  236|   208k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   208k|  WORD norm_val;
  238|       |
  239|   208k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 208k]
  ------------------
  240|      0|    norm_val = 31;
  241|   208k|  } else {
  242|   208k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 524, False: 208k]
  ------------------
  243|    524|      norm_val = 31;
  244|   208k|    } else {
  245|   208k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 208k, False: 0]
  ------------------
  246|   208k|        a = ~a;
  247|   208k|      }
  248|  4.94M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 4.73M, False: 208k]
  ------------------
  249|  4.73M|        a <<= 1;
  250|  4.73M|      }
  251|   208k|    }
  252|   208k|  }
  253|       |
  254|   208k|  return norm_val;
  255|   208k|}
ixheaacd_block.c:ixheaac_sub32_sat:
  225|  99.6M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  99.6M|  WORD64 diff;
  227|       |
  228|  99.6M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  99.6M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  99.6M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.22M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 3.22M, False: 96.4M]
  ------------------
  231|  96.4M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  96.4M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.51M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 2.51M, False: 93.9M]
  ------------------
  232|       |
  233|  93.9M|  return (WORD32)diff;
  234|  96.4M|}
ixheaacd_block.c:ixheaac_min32:
   23|  61.0M|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  61.0M|  WORD32 min_val;
   25|       |
   26|  61.0M|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 61.0M, False: 0]
  ------------------
   27|       |
   28|  61.0M|  return min_val;
   29|  61.0M|}
ixheaacd_block.c:ixheaac_shl32_sat:
   67|  12.6M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  12.6M|  WORD32 out_val;
   69|  12.6M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  12.6M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 2.99M, False: 9.67M]
  ------------------
   70|  2.99M|    out_val = MAX_32;
  ------------------
  |  |   60|  2.99M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  9.67M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  9.67M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 3.04M, False: 6.62M]
  ------------------
   72|  3.04M|    out_val = MIN_32;
  ------------------
  |  |   61|  3.04M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  6.62M|  else
   74|  6.62M|    out_val = a << b;
   75|  12.6M|  return (out_val);
   76|  12.6M|}
ixheaacd_block.c:ixheaac_add32_sat:
  197|   106M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   106M|  WORD64 sum;
  199|       |
  200|   106M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   106M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   106M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  4.52M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 4.52M, False: 102M]
  ------------------
  203|   102M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   102M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  4.61M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 4.61M, False: 97.8M]
  ------------------
  204|       |
  205|  97.8M|  return (WORD32)sum;
  206|   102M|}
ixheaacd_block.c:ixheaac_shr32:
   51|  91.7M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  91.7M|  WORD32 out_val;
   53|       |
   54|  91.7M|  b = ((UWORD32)(b << 24) >> 24);
   55|  91.7M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 414k, False: 91.3M]
  ------------------
   56|   414k|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 222k, False: 192k]
  ------------------
   57|   222k|      out_val = -1;
   58|   192k|    else
   59|   192k|      out_val = 0;
   60|  91.3M|  } else {
   61|  91.3M|    out_val = (WORD32)a >> b;
   62|  91.3M|  }
   63|       |
   64|  91.7M|  return out_val;
   65|  91.7M|}
ixheaacd_block.c:ixheaac_negate32_sat:
  317|  49.8M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|  49.8M|  WORD32 neg_val;
  319|       |
  320|  49.8M|  if (a == MIN_32) {
  ------------------
  |  |   61|  49.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 9.36k, False: 49.8M]
  ------------------
  321|  9.36k|    neg_val = MAX_32;
  ------------------
  |  |   60|  9.36k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|  49.8M|  } else {
  323|  49.8M|    neg_val = -a;
  324|  49.8M|  }
  325|  49.8M|  return neg_val;
  326|  49.8M|}
ixheaacd_block.c:ixheaac_mult32x16in32_sat:
  144|  60.2M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_sat(WORD32 a, WORD16 b) {
  145|  60.2M|  WORD32 result;
  146|  60.2M|  WORD64 temp_result;
  147|       |
  148|  60.2M|  temp_result = (WORD64)a * (WORD64)b;
  149|       |
  150|  60.2M|  if (temp_result < (WORD64)MIN_32)
  ------------------
  |  |   61|  60.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (150:7): [True: 3.51M, False: 56.7M]
  ------------------
  151|  3.51M|    result = MIN_32;
  ------------------
  |  |   61|  3.51M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  152|       |
  153|  56.7M|  else if (temp_result > (WORD64)MAX_32)
  ------------------
  |  |   60|  56.7M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (153:12): [True: 3.41M, False: 53.3M]
  ------------------
  154|  3.41M|    result = MAX_32;
  ------------------
  |  |   60|  3.41M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  155|       |
  156|  53.3M|  else
  157|  53.3M|    result = (WORD32)(temp_result);
  158|       |
  159|  60.2M|  return (result);
  160|  60.2M|}
ixheaacd_block.c:ixheaac_shr32_sat:
  377|  25.9M|static PLATFORM_INLINE WORD32 ixheaac_shr32_sat(WORD32 a, WORD32 b) {
  378|  25.9M|  WORD32 out_val;
  379|       |
  380|  25.9M|  b = ((UWORD32)(b << 24) >> 24);
  381|  25.9M|  if (b >= 31) {
  ------------------
  |  Branch (381:7): [True: 5.47M, False: 20.4M]
  ------------------
  382|  5.47M|    if (a < 0)
  ------------------
  |  Branch (382:9): [True: 2.53M, False: 2.93M]
  ------------------
  383|  2.53M|      out_val = -1;
  384|  2.93M|    else
  385|  2.93M|      out_val = 0;
  386|  20.4M|  } else if (b <= 0) {
  ------------------
  |  Branch (386:14): [True: 655k, False: 19.8M]
  ------------------
  387|   655k|    return a;
  388|  19.8M|  } else {
  389|  19.8M|    a = ixheaac_add32_sat(a, (1 << (b - 1)));
  390|  19.8M|    out_val = (WORD32)a >> b;
  391|  19.8M|  }
  392|       |
  393|  25.2M|  return out_val;
  394|  25.9M|}
ixheaacd_block.c:ixheaac_shl32:
   39|  38.4M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  38.4M|  WORD32 out_val;
   41|       |
   42|  38.4M|  b = ((UWORD32)(b << 24) >> 24);
   43|  38.4M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 1.69M, False: 36.7M]
  ------------------
   44|  1.69M|    out_val = 0;
   45|  36.7M|  else
   46|  36.7M|    out_val = (WORD32)a << b;
   47|       |
   48|  38.4M|  return out_val;
   49|  38.4M|}
ixheaacd_env_calc.c:ixheaac_mult16x16in32_shl:
  162|   563k|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl(WORD16 a, WORD16 b) {
  163|   563k|  WORD32 product;
  164|       |
  165|   563k|  product = ixheaac_shl32(ixheaac_mult16x16in32(a, b), 1);
  166|       |
  167|   563k|  return product;
  168|   563k|}
ixheaacd_env_calc.c:ixheaac_mult16x16in32:
  126|  14.6M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|  14.6M|  WORD32 product;
  128|       |
  129|  14.6M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|  14.6M|  return product;
  132|  14.6M|}
ixheaacd_env_calc.c:ixheaac_norm32:
  236|  1.35M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  1.35M|  WORD norm_val;
  238|       |
  239|  1.35M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 81.0k, False: 1.27M]
  ------------------
  240|  81.0k|    norm_val = 31;
  241|  1.27M|  } else {
  242|  1.27M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 1.27M]
  ------------------
  243|      0|      norm_val = 31;
  244|  1.27M|    } else {
  245|  1.27M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 1.27M]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  19.3M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 18.0M, False: 1.27M]
  ------------------
  249|  18.0M|        a <<= 1;
  250|  18.0M|      }
  251|  1.27M|    }
  252|  1.27M|  }
  253|       |
  254|  1.35M|  return norm_val;
  255|  1.35M|}
ixheaacd_env_calc.c:ixheaac_shl32_sat:
   67|   407k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|   407k|  WORD32 out_val;
   69|   407k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|   407k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 0, False: 407k]
  ------------------
   70|      0|    out_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|   407k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|   407k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 0, False: 407k]
  ------------------
   72|      0|    out_val = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   407k|  else
   74|   407k|    out_val = a << b;
   75|   407k|  return (out_val);
   76|   407k|}
ixheaacd_env_calc.c:ixheaac_shr32:
   51|  51.4M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  51.4M|  WORD32 out_val;
   53|       |
   54|  51.4M|  b = ((UWORD32)(b << 24) >> 24);
   55|  51.4M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 460k, False: 50.9M]
  ------------------
   56|   460k|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 10.2k, False: 450k]
  ------------------
   57|  10.2k|      out_val = -1;
   58|   450k|    else
   59|   450k|      out_val = 0;
   60|  50.9M|  } else {
   61|  50.9M|    out_val = (WORD32)a >> b;
   62|  50.9M|  }
   63|       |
   64|  51.4M|  return out_val;
   65|  51.4M|}
ixheaacd_env_calc.c:ixheaac_min32:
   23|  1.39M|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  1.39M|  WORD32 min_val;
   25|       |
   26|  1.39M|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 1.39M, False: 1.55k]
  ------------------
   27|       |
   28|  1.39M|  return min_val;
   29|  1.39M|}
ixheaacd_env_calc.c:ixheaac_max32:
   31|  28.1M|static PLATFORM_INLINE WORD32 ixheaac_max32(WORD32 a, WORD32 b) {
   32|  28.1M|  WORD32 max_val;
   33|       |
   34|  28.1M|  max_val = (a > b) ? a : b;
  ------------------
  |  Branch (34:13): [True: 3.06M, False: 25.0M]
  ------------------
   35|       |
   36|  28.1M|  return max_val;
   37|  28.1M|}
ixheaacd_env_calc.c:ixheaac_abs32_nrm:
  283|  91.1M|static PLATFORM_INLINE WORD32 ixheaac_abs32_nrm(WORD32 a) {
  284|  91.1M|  WORD32 abs_val;
  285|       |
  286|  91.1M|  abs_val = a;
  287|       |
  288|  91.1M|  if (a < 0) {
  ------------------
  |  Branch (288:7): [True: 27.8M, False: 63.3M]
  ------------------
  289|  27.8M|    abs_val = ~a;
  290|  27.8M|  }
  291|       |
  292|  91.1M|  return abs_val;
  293|  91.1M|}
ixheaacd_env_calc.c:ixheaac_pnorm32:
  257|  3.43M|static PLATFORM_INLINE WORD ixheaac_pnorm32(WORD32 a) {
  258|  3.43M|  WORD norm_val;
  259|       |
  260|  3.43M|  if (a == 0) {
  ------------------
  |  Branch (260:7): [True: 269k, False: 3.16M]
  ------------------
  261|   269k|    norm_val = 31;
  262|  3.16M|  } else {
  263|  46.5M|    for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (263:24): [True: 43.3M, False: 3.16M]
  ------------------
  264|  43.3M|      a <<= 1;
  265|  43.3M|    }
  266|  3.16M|  }
  267|       |
  268|  3.43M|  return norm_val;
  269|  3.43M|}
ixheaacd_env_calc.c:ixheaac_shr32_dir:
  102|  14.1M|static PLATFORM_INLINE WORD32 ixheaac_shr32_dir(WORD32 a, WORD b) {
  103|  14.1M|  WORD32 out_val;
  104|       |
  105|  14.1M|  if (b < 0) {
  ------------------
  |  Branch (105:7): [True: 4.66M, False: 9.43M]
  ------------------
  106|  4.66M|    out_val = ixheaac_shl32(a, -b);
  107|  9.43M|  } else {
  108|  9.43M|    out_val = ixheaac_shr32(a, b);
  109|  9.43M|  }
  110|       |
  111|  14.1M|  return out_val;
  112|  14.1M|}
ixheaacd_env_calc.c:ixheaac_mac16x16in32_sat:
  396|  14.1M|static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_sat(WORD32 a, WORD16 b, WORD16 c) {
  397|  14.1M|  WORD32 acc;
  398|       |
  399|  14.1M|  acc = ixheaac_mult16x16in32(b, c);
  400|       |
  401|  14.1M|  acc = ixheaac_add32_sat(a, acc);
  402|       |
  403|  14.1M|  return acc;
  404|  14.1M|}
ixheaacd_env_calc.c:ixheaac_add32_sat:
  197|  54.7M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  54.7M|  WORD64 sum;
  199|       |
  200|  54.7M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  54.7M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  54.7M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    213|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 213, False: 54.7M]
  ------------------
  203|  54.7M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  54.7M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  4.56k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 4.56k, False: 54.7M]
  ------------------
  204|       |
  205|  54.7M|  return (WORD32)sum;
  206|  54.7M|}
ixheaacd_env_calc.c:ixheaac_abs32:
  271|  1.92M|static PLATFORM_INLINE WORD32 ixheaac_abs32(WORD32 a) {
  272|  1.92M|  WORD32 abs_val;
  273|       |
  274|  1.92M|  abs_val = a;
  275|       |
  276|  1.92M|  if (a < 0) {
  ------------------
  |  Branch (276:7): [True: 0, False: 1.92M]
  ------------------
  277|      0|    abs_val = -a;
  278|      0|  }
  279|       |
  280|  1.92M|  return abs_val;
  281|  1.92M|}
ixheaacd_env_calc.c:ixheaac_mac16x16in32_shl_sat:
  416|  39.7M|static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_shl_sat(WORD32 a, WORD16 b, WORD16 c) {
  417|  39.7M|  WORD32 acc;
  418|       |
  419|  39.7M|  acc = ixheaac_mult16x16in32_shl_sat(b, c);
  420|       |
  421|  39.7M|  acc = ixheaac_add32_sat(a, acc);
  422|       |
  423|  39.7M|  return acc;
  424|  39.7M|}
ixheaacd_env_calc.c:ixheaac_mult16x16in32_shl_sat:
  170|  39.7M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl_sat(WORD16 a, WORD16 b) {
  171|  39.7M|  WORD32 product;
  172|  39.7M|  product = (WORD32)a * (WORD32)b;
  173|  39.7M|  if (product != (WORD32)0x40000000L) {
  ------------------
  |  Branch (173:7): [True: 39.7M, False: 0]
  ------------------
  174|  39.7M|    product = ixheaac_shl32(product, 1);
  175|  39.7M|  } else {
  176|      0|    product = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  177|      0|  }
  178|  39.7M|  return product;
  179|  39.7M|}
ixheaacd_env_calc.c:ixheaac_sub32_sat:
  225|   213k|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   213k|  WORD64 diff;
  227|       |
  228|   213k|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   213k|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   213k|#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: 213k]
  ------------------
  231|   213k|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   213k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    182|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 182, False: 213k]
  ------------------
  232|       |
  233|   213k|  return (WORD32)diff;
  234|   213k|}
ixheaacd_env_calc.c:ixheaac_shl32:
   39|  56.2M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  56.2M|  WORD32 out_val;
   41|       |
   42|  56.2M|  b = ((UWORD32)(b << 24) >> 24);
   43|  56.2M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 12.5k, False: 56.2M]
  ------------------
   44|  12.5k|    out_val = 0;
   45|  56.2M|  else
   46|  56.2M|    out_val = (WORD32)a << b;
   47|       |
   48|  56.2M|  return out_val;
   49|  56.2M|}
ixheaacd_env_dec.c:ixheaac_min32:
   23|  63.7k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  63.7k|  WORD32 min_val;
   25|       |
   26|  63.7k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 61.8k, False: 1.93k]
  ------------------
   27|       |
   28|  63.7k|  return min_val;
   29|  63.7k|}
ixheaacd_ext_ch_ele.c:ixheaac_add32_sat:
  197|  33.2M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  33.2M|  WORD64 sum;
  199|       |
  200|  33.2M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  33.2M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  33.2M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   586k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 586k, False: 32.6M]
  ------------------
  203|  32.6M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  32.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   602k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 602k, False: 32.0M]
  ------------------
  204|       |
  205|  32.0M|  return (WORD32)sum;
  206|  32.6M|}
ixheaacd_ext_ch_ele.c:ixheaac_sub32_sat:
  225|  30.8M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  30.8M|  WORD64 diff;
  227|       |
  228|  30.8M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  30.8M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  30.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.17M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 1.17M, False: 29.6M]
  ------------------
  231|  29.6M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  29.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.15M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 1.15M, False: 28.5M]
  ------------------
  232|       |
  233|  28.5M|  return (WORD32)diff;
  234|  29.6M|}
ixheaacd_fft.c:ixheaac_norm32:
  236|  27.8M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  27.8M|  WORD norm_val;
  238|       |
  239|  27.8M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 27.8M]
  ------------------
  240|      0|    norm_val = 31;
  241|  27.8M|  } else {
  242|  27.8M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 27.8M]
  ------------------
  243|      0|      norm_val = 31;
  244|  27.8M|    } else {
  245|  27.8M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 27.8M]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|   777M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 750M, False: 27.8M]
  ------------------
  249|   750M|        a <<= 1;
  250|   750M|      }
  251|  27.8M|    }
  252|  27.8M|  }
  253|       |
  254|  27.8M|  return norm_val;
  255|  27.8M|}
ixheaacd_fft.c:ixheaac_add32_sat:
  197|  2.68G|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  2.68G|  WORD64 sum;
  199|       |
  200|  2.68G|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  2.68G|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.68G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    815|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 815, False: 2.68G]
  ------------------
  203|  2.68G|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.68G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    530|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 530, False: 2.68G]
  ------------------
  204|       |
  205|  2.68G|  return (WORD32)sum;
  206|  2.68G|}
ixheaacd_fft.c:ixheaac_sub32_sat:
  225|  2.13G|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  2.13G|  WORD64 diff;
  227|       |
  228|  2.13G|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  2.13G|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.13G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    234|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 234, False: 2.13G]
  ------------------
  231|  2.13G|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.13G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    241|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 241, False: 2.13G]
  ------------------
  232|       |
  233|  2.13G|  return (WORD32)diff;
  234|  2.13G|}
ixheaacd_fft.c:ixheaac_shl32_sat:
   67|  1.78G|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  1.78G|  WORD32 out_val;
   69|  1.78G|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  1.78G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 991, False: 1.78G]
  ------------------
   70|    991|    out_val = MAX_32;
  ------------------
  |  |   60|    991|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  1.78G|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  1.78G|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 718, False: 1.78G]
  ------------------
   72|    718|    out_val = MIN_32;
  ------------------
  |  |   61|    718|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  1.78G|  else
   74|  1.78G|    out_val = a << b;
   75|  1.78G|  return (out_val);
   76|  1.78G|}
ixheaacd_fft.c:ixheaac_sub32:
  189|  15.3M|static PLATFORM_INLINE WORD32 ixheaac_sub32(WORD32 a, WORD32 b) {
  190|  15.3M|  WORD32 diff;
  191|       |
  192|  15.3M|  diff = (WORD32)a - (WORD32)b;
  193|       |
  194|  15.3M|  return diff;
  195|  15.3M|}
ixheaacd_freq_sca.c:ixheaac_add32_sat:
  197|  3.22M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  3.22M|  WORD64 sum;
  199|       |
  200|  3.22M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  3.22M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.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: 3.22M]
  ------------------
  203|  3.22M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.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: 3.22M]
  ------------------
  204|       |
  205|  3.22M|  return (WORD32)sum;
  206|  3.22M|}
ixheaacd_freq_sca.c:ixheaac_shl32:
   39|  30.5M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  30.5M|  WORD32 out_val;
   41|       |
   42|  30.5M|  b = ((UWORD32)(b << 24) >> 24);
   43|  30.5M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 30.5M]
  ------------------
   44|      0|    out_val = 0;
   45|  30.5M|  else
   46|  30.5M|    out_val = (WORD32)a << b;
   47|       |
   48|  30.5M|  return out_val;
   49|  30.5M|}
ixheaacd_freq_sca.c:ixheaac_mult16x16in32_shl:
  162|  30.3M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl(WORD16 a, WORD16 b) {
  163|  30.3M|  WORD32 product;
  164|       |
  165|  30.3M|  product = ixheaac_shl32(ixheaac_mult16x16in32(a, b), 1);
  166|       |
  167|  30.3M|  return product;
  168|  30.3M|}
ixheaacd_freq_sca.c:ixheaac_sub32_sat:
  225|  1.56M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  1.56M|  WORD64 diff;
  227|       |
  228|  1.56M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  1.56M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.56M|#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.56M]
  ------------------
  231|  1.56M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.56M|#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.56M]
  ------------------
  232|       |
  233|  1.56M|  return (WORD32)diff;
  234|  1.56M|}
ixheaacd_freq_sca.c:ixheaac_shl32_sat:
   67|  85.8k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  85.8k|  WORD32 out_val;
   69|  85.8k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  85.8k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 0, False: 85.8k]
  ------------------
   70|      0|    out_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  85.8k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  85.8k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 0, False: 85.8k]
  ------------------
   72|      0|    out_val = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  85.8k|  else
   74|  85.8k|    out_val = a << b;
   75|  85.8k|  return (out_val);
   76|  85.8k|}
ixheaacd_freq_sca.c:ixheaac_mult16x16in32:
  126|  31.0M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|  31.0M|  WORD32 product;
  128|       |
  129|  31.0M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|  31.0M|  return product;
  132|  31.0M|}
ixheaacd_freq_sca.c:ixheaac_shr32:
   51|  3.23M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  3.23M|  WORD32 out_val;
   53|       |
   54|  3.23M|  b = ((UWORD32)(b << 24) >> 24);
   55|  3.23M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 3.23M]
  ------------------
   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|  3.23M|  } else {
   61|  3.23M|    out_val = (WORD32)a >> b;
   62|  3.23M|  }
   63|       |
   64|  3.23M|  return out_val;
   65|  3.23M|}
ixheaacd_imdct.c:ixheaac_negate32_sat:
  317|   422M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   422M|  WORD32 neg_val;
  319|       |
  320|   422M|  if (a == MIN_32) {
  ------------------
  |  |   61|   422M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 641k, False: 422M]
  ------------------
  321|   641k|    neg_val = MAX_32;
  ------------------
  |  |   60|   641k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   422M|  } else {
  323|   422M|    neg_val = -a;
  324|   422M|  }
  325|   422M|  return neg_val;
  326|   422M|}
ixheaacd_imdct.c:ixheaac_norm32:
  236|  1.12M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  1.12M|  WORD norm_val;
  238|       |
  239|  1.12M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 618k, False: 508k]
  ------------------
  240|   618k|    norm_val = 31;
  241|   618k|  } else {
  242|   508k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 508k]
  ------------------
  243|      0|      norm_val = 31;
  244|   508k|    } else {
  245|   508k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 4.19k, False: 503k]
  ------------------
  246|  4.19k|        a = ~a;
  247|  4.19k|      }
  248|  9.27M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 8.76M, False: 508k]
  ------------------
  249|  8.76M|        a <<= 1;
  250|  8.76M|      }
  251|   508k|    }
  252|   508k|  }
  253|       |
  254|  1.12M|  return norm_val;
  255|  1.12M|}
ixheaacd_imdct.c:ixheaac_abs32_sat:
  295|   703M|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|   703M|  WORD32 abs_val;
  297|       |
  298|   703M|  abs_val = a;
  299|       |
  300|   703M|  if (a == MIN_32) {
  ------------------
  |  |   61|   703M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 970k, False: 702M]
  ------------------
  301|   970k|    abs_val = MAX_32;
  ------------------
  |  |   60|   970k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|   702M|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 63.5M, False: 639M]
  ------------------
  303|  63.5M|    abs_val = -a;
  304|  63.5M|  }
  305|       |
  306|   703M|  return abs_val;
  307|   703M|}
ixheaacd_lpfuncs.c:ixheaac_min32:
   23|  28.8M|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  28.8M|  WORD32 min_val;
   25|       |
   26|  28.8M|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 28.8M, False: 0]
  ------------------
   27|       |
   28|  28.8M|  return min_val;
   29|  28.8M|}
ixheaacd_lpfuncs.c:ixheaac_add32_sat:
  197|   148M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   148M|  WORD64 sum;
  199|       |
  200|   148M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   148M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   148M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.65M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 2.65M, False: 146M]
  ------------------
  203|   146M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   146M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.11M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 1.11M, False: 145M]
  ------------------
  204|       |
  205|   145M|  return (WORD32)sum;
  206|   146M|}
ixheaacd_lpfuncs.c:ixheaac_mult32x16in32_sat:
  144|  48.7M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_sat(WORD32 a, WORD16 b) {
  145|  48.7M|  WORD32 result;
  146|  48.7M|  WORD64 temp_result;
  147|       |
  148|  48.7M|  temp_result = (WORD64)a * (WORD64)b;
  149|       |
  150|  48.7M|  if (temp_result < (WORD64)MIN_32)
  ------------------
  |  |   61|  48.7M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (150:7): [True: 3.57M, False: 45.1M]
  ------------------
  151|  3.57M|    result = MIN_32;
  ------------------
  |  |   61|  3.57M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  152|       |
  153|  45.1M|  else if (temp_result > (WORD64)MAX_32)
  ------------------
  |  |   60|  45.1M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (153:12): [True: 3.53M, False: 41.6M]
  ------------------
  154|  3.53M|    result = MAX_32;
  ------------------
  |  |   60|  3.53M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  155|       |
  156|  41.6M|  else
  157|  41.6M|    result = (WORD32)(temp_result);
  158|       |
  159|  48.7M|  return (result);
  160|  48.7M|}
ixheaacd_lpfuncs.c:ixheaac_sub32_sat:
  225|  28.5M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  28.5M|  WORD64 diff;
  227|       |
  228|  28.5M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  28.5M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  28.5M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.21M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 3.21M, False: 25.3M]
  ------------------
  231|  25.3M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  25.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.86M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 1.86M, False: 23.4M]
  ------------------
  232|       |
  233|  23.4M|  return (WORD32)diff;
  234|  25.3M|}
ixheaacd_lpfuncs.c:ixheaac_negate32_sat:
  317|  24.4M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|  24.4M|  WORD32 neg_val;
  319|       |
  320|  24.4M|  if (a == MIN_32) {
  ------------------
  |  |   61|  24.4M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 11.4k, False: 24.4M]
  ------------------
  321|  11.4k|    neg_val = MAX_32;
  ------------------
  |  |   60|  11.4k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|  24.4M|  } else {
  323|  24.4M|    neg_val = -a;
  324|  24.4M|  }
  325|  24.4M|  return neg_val;
  326|  24.4M|}
ixheaacd_lpfuncs.c:ixheaac_shr32_sat:
  377|  66.7M|static PLATFORM_INLINE WORD32 ixheaac_shr32_sat(WORD32 a, WORD32 b) {
  378|  66.7M|  WORD32 out_val;
  379|       |
  380|  66.7M|  b = ((UWORD32)(b << 24) >> 24);
  381|  66.7M|  if (b >= 31) {
  ------------------
  |  Branch (381:7): [True: 39.4M, False: 27.2M]
  ------------------
  382|  39.4M|    if (a < 0)
  ------------------
  |  Branch (382:9): [True: 6.53M, False: 32.9M]
  ------------------
  383|  6.53M|      out_val = -1;
  384|  32.9M|    else
  385|  32.9M|      out_val = 0;
  386|  39.4M|  } else if (b <= 0) {
  ------------------
  |  Branch (386:14): [True: 10.2M, False: 17.0M]
  ------------------
  387|  10.2M|    return a;
  388|  17.0M|  } else {
  389|  17.0M|    a = ixheaac_add32_sat(a, (1 << (b - 1)));
  390|  17.0M|    out_val = (WORD32)a >> b;
  391|  17.0M|  }
  392|       |
  393|  56.5M|  return out_val;
  394|  66.7M|}
ixheaacd_lpfuncs.c:ixheaac_shl32_sat:
   67|  51.2M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  51.2M|  WORD32 out_val;
   69|  51.2M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  51.2M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 4.78M, False: 46.4M]
  ------------------
   70|  4.78M|    out_val = MAX_32;
  ------------------
  |  |   60|  4.78M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  46.4M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  46.4M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 4.83M, False: 41.6M]
  ------------------
   72|  4.83M|    out_val = MIN_32;
  ------------------
  |  |   61|  4.83M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  41.6M|  else
   74|  41.6M|    out_val = a << b;
   75|  51.2M|  return (out_val);
   76|  51.2M|}
ixheaacd_lpfuncs.c:ixheaac_shl32:
   39|  51.2M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  51.2M|  WORD32 out_val;
   41|       |
   42|  51.2M|  b = ((UWORD32)(b << 24) >> 24);
   43|  51.2M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 51.2M]
  ------------------
   44|      0|    out_val = 0;
   45|  51.2M|  else
   46|  51.2M|    out_val = (WORD32)a << b;
   47|       |
   48|  51.2M|  return out_val;
   49|  51.2M|}
ixheaacd_lpfuncs.c:ixheaac_shr32:
   51|   117M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   117M|  WORD32 out_val;
   53|       |
   54|   117M|  b = ((UWORD32)(b << 24) >> 24);
   55|   117M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 117M]
  ------------------
   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|   117M|  } else {
   61|   117M|    out_val = (WORD32)a >> b;
   62|   117M|  }
   63|       |
   64|   117M|  return out_val;
   65|   117M|}
ixheaacd_lpp_tran.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_lpp_tran.c:ixheaac_add32:
  181|  25.2M|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|  25.2M|  WORD32 sum;
  183|       |
  184|  25.2M|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|  25.2M|  return sum;
  187|  25.2M|}
ixheaacd_lpp_tran.c:ixheaac_add32_sat:
  197|  15.2M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  15.2M|  WORD64 sum;
  199|       |
  200|  15.2M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  15.2M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  15.2M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    276|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 276, False: 15.2M]
  ------------------
  203|  15.2M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  15.2M|#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: 15.2M]
  ------------------
  204|       |
  205|  15.2M|  return (WORD32)sum;
  206|  15.2M|}
ixheaacd_lpp_tran.c:ixheaac_mult32x16hin32:
  134|   110M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16hin32(WORD32 a, WORD32 b) {
  135|   110M|  WORD32 result;
  136|   110M|  WORD64 temp_result;
  137|       |
  138|   110M|  temp_result = (WORD64)(a) * (WORD64)(b >> 16);
  139|   110M|  result = (WORD32)(temp_result >> 16);
  140|       |
  141|   110M|  return (result);
  142|   110M|}
ixheaacd_lpp_tran.c:ixheaac_abs32_nrm:
  283|  4.14M|static PLATFORM_INLINE WORD32 ixheaac_abs32_nrm(WORD32 a) {
  284|  4.14M|  WORD32 abs_val;
  285|       |
  286|  4.14M|  abs_val = a;
  287|       |
  288|  4.14M|  if (a < 0) {
  ------------------
  |  Branch (288:7): [True: 1.49M, False: 2.65M]
  ------------------
  289|  1.49M|    abs_val = ~a;
  290|  1.49M|  }
  291|       |
  292|  4.14M|  return abs_val;
  293|  4.14M|}
ixheaacd_lpp_tran.c:ixheaac_pnorm32:
  257|   691k|static PLATFORM_INLINE WORD ixheaac_pnorm32(WORD32 a) {
  258|   691k|  WORD norm_val;
  259|       |
  260|   691k|  if (a == 0) {
  ------------------
  |  Branch (260:7): [True: 152k, False: 538k]
  ------------------
  261|   152k|    norm_val = 31;
  262|   538k|  } else {
  263|  6.16M|    for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (263:24): [True: 5.62M, False: 538k]
  ------------------
  264|  5.62M|      a <<= 1;
  265|  5.62M|    }
  266|   538k|  }
  267|       |
  268|   691k|  return norm_val;
  269|   691k|}
ixheaacd_lpp_tran.c:ixheaac_sub32_sat:
  225|  3.88M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  3.88M|  WORD64 diff;
  227|       |
  228|  3.88M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  3.88M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.88M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    149|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 149, False: 3.88M]
  ------------------
  231|  3.88M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.88M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|     11|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 11, False: 3.88M]
  ------------------
  232|       |
  233|  3.88M|  return (WORD32)diff;
  234|  3.88M|}
ixheaacd_lpp_tran.c:ixheaac_shr32:
   51|  66.4M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  66.4M|  WORD32 out_val;
   53|       |
   54|  66.4M|  b = ((UWORD32)(b << 24) >> 24);
   55|  66.4M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 66.4M]
  ------------------
   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|  66.4M|  } else {
   61|  66.4M|    out_val = (WORD32)a >> b;
   62|  66.4M|  }
   63|       |
   64|  66.4M|  return out_val;
   65|  66.4M|}
ixheaacd_lpp_tran.c:ixheaac_norm32:
  236|  1.06M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  1.06M|  WORD norm_val;
  238|       |
  239|  1.06M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 1.06M]
  ------------------
  240|      0|    norm_val = 31;
  241|  1.06M|  } else {
  242|  1.06M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 1.06M]
  ------------------
  243|      0|      norm_val = 31;
  244|  1.06M|    } else {
  245|  1.06M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 23.6k, False: 1.04M]
  ------------------
  246|  23.6k|        a = ~a;
  247|  23.6k|      }
  248|  1.76M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 697k, False: 1.06M]
  ------------------
  249|   697k|        a <<= 1;
  250|   697k|      }
  251|  1.06M|    }
  252|  1.06M|  }
  253|       |
  254|  1.06M|  return norm_val;
  255|  1.06M|}
ixheaacd_lpp_tran.c:ixheaac_abs32_sat:
  295|  2.66M|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|  2.66M|  WORD32 abs_val;
  297|       |
  298|  2.66M|  abs_val = a;
  299|       |
  300|  2.66M|  if (a == MIN_32) {
  ------------------
  |  |   61|  2.66M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 444, False: 2.66M]
  ------------------
  301|    444|    abs_val = MAX_32;
  ------------------
  |  |   60|    444|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|  2.66M|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 1.20M, False: 1.46M]
  ------------------
  303|  1.20M|    abs_val = -a;
  304|  1.20M|  }
  305|       |
  306|  2.66M|  return abs_val;
  307|  2.66M|}
ixheaacd_lpp_tran.c:ixheaac_min32:
   23|  65.2k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  65.2k|  WORD32 min_val;
   25|       |
   26|  65.2k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 0, False: 65.2k]
  ------------------
   27|       |
   28|  65.2k|  return min_val;
   29|  65.2k|}
ixheaacd_mps_apply_m1.c:ixheaac_add32_sat:
  197|   757M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   757M|  WORD64 sum;
  199|       |
  200|   757M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   757M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   757M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  51.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 51.8M, False: 705M]
  ------------------
  203|   705M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   705M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  52.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 52.2M, False: 653M]
  ------------------
  204|       |
  205|   653M|  return (WORD32)sum;
  206|   705M|}
ixheaacd_mps_apply_m1.c:ixheaac_sub32_sat:
  225|   221M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   221M|  WORD64 diff;
  227|       |
  228|   221M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   221M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   221M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  16.9M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 16.9M, False: 204M]
  ------------------
  231|   204M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   204M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  16.9M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 16.9M, False: 187M]
  ------------------
  232|       |
  233|   187M|  return (WORD32)diff;
  234|   204M|}
ixheaacd_mps_apply_m2.c:ixheaac_add32_sat:
  197|   818M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   818M|  WORD64 sum;
  199|       |
  200|   818M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   818M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   818M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  19.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 19.8M, False: 798M]
  ------------------
  203|   798M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   798M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  19.9M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 19.9M, False: 778M]
  ------------------
  204|       |
  205|   778M|  return (WORD32)sum;
  206|   798M|}
ixheaacd_mps_res_block.c:ixheaac_norm32:
  236|  1.73k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  1.73k|  WORD norm_val;
  238|       |
  239|  1.73k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 1.73k]
  ------------------
  240|      0|    norm_val = 31;
  241|  1.73k|  } else {
  242|  1.73k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 98, False: 1.63k]
  ------------------
  243|     98|      norm_val = 31;
  244|  1.63k|    } else {
  245|  1.63k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 1.63k, False: 0]
  ------------------
  246|  1.63k|        a = ~a;
  247|  1.63k|      }
  248|  39.2k|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 37.5k, False: 1.63k]
  ------------------
  249|  37.5k|        a <<= 1;
  250|  37.5k|      }
  251|  1.63k|    }
  252|  1.73k|  }
  253|       |
  254|  1.73k|  return norm_val;
  255|  1.73k|}
ixheaacd_mps_res_block.c:ixheaac_shr32:
   51|  48.1k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  48.1k|  WORD32 out_val;
   53|       |
   54|  48.1k|  b = ((UWORD32)(b << 24) >> 24);
   55|  48.1k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 2.69k, False: 45.4k]
  ------------------
   56|  2.69k|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 1.09k, False: 1.60k]
  ------------------
   57|  1.09k|      out_val = -1;
   58|  1.60k|    else
   59|  1.60k|      out_val = 0;
   60|  45.4k|  } else {
   61|  45.4k|    out_val = (WORD32)a >> b;
   62|  45.4k|  }
   63|       |
   64|  48.1k|  return out_val;
   65|  48.1k|}
ixheaacd_mps_res_block.c:ixheaac_shl32:
   39|   516k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   516k|  WORD32 out_val;
   41|       |
   42|   516k|  b = ((UWORD32)(b << 24) >> 24);
   43|   516k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 3.01k, False: 513k]
  ------------------
   44|  3.01k|    out_val = 0;
   45|   513k|  else
   46|   513k|    out_val = (WORD32)a << b;
   47|       |
   48|   516k|  return out_val;
   49|   516k|}
ixheaacd_ps_bitdec.c:ixheaac_shr32:
   51|   106k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   106k|  WORD32 out_val;
   53|       |
   54|   106k|  b = ((UWORD32)(b << 24) >> 24);
   55|   106k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 106k]
  ------------------
   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|   106k|  } else {
   61|   106k|    out_val = (WORD32)a >> b;
   62|   106k|  }
   63|       |
   64|   106k|  return out_val;
   65|   106k|}
ixheaacd_qmf_dec.c:ixheaac_sub32_sat:
  225|  72.0M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  72.0M|  WORD64 diff;
  227|       |
  228|  72.0M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  72.0M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  72.0M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  4.10k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 4.10k, False: 72.0M]
  ------------------
  231|  72.0M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  72.0M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  4.41k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 4.41k, False: 72.0M]
  ------------------
  232|       |
  233|  72.0M|  return (WORD32)diff;
  234|  72.0M|}
ixheaacd_qmf_dec.c:ixheaac_add32_sat:
  197|   408M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   408M|  WORD64 sum;
  199|       |
  200|   408M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   408M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   408M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   162k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 162k, False: 407M]
  ------------------
  203|   407M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   407M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   163k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 163k, False: 407M]
  ------------------
  204|       |
  205|   407M|  return (WORD32)sum;
  206|   407M|}
ixheaacd_qmf_dec.c:ixheaac_mult16x16in32:
  126|   537M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|   537M|  WORD32 product;
  128|       |
  129|   537M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|   537M|  return product;
  132|   537M|}
ixheaacd_qmf_dec.c:ixheaac_add32:
  181|   213M|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|   213M|  WORD32 sum;
  183|       |
  184|   213M|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|   213M|  return sum;
  187|   213M|}
ixheaacd_qmf_dec.c:ixheaac_min32:
   23|  73.5k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  73.5k|  WORD32 min_val;
   25|       |
   26|  73.5k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 0, False: 73.5k]
  ------------------
   27|       |
   28|  73.5k|  return min_val;
   29|  73.5k|}
ixheaacd_tcx_fwd_alcnx.c:ixheaac_norm32:
  236|   273k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   273k|  WORD norm_val;
  238|       |
  239|   273k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 51.4k, False: 221k]
  ------------------
  240|  51.4k|    norm_val = 31;
  241|   221k|  } else {
  242|   221k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 221k]
  ------------------
  243|      0|      norm_val = 31;
  244|   221k|    } else {
  245|   221k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 125, False: 221k]
  ------------------
  246|    125|        a = ~a;
  247|    125|      }
  248|  5.61M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 5.39M, False: 221k]
  ------------------
  249|  5.39M|        a <<= 1;
  250|  5.39M|      }
  251|   221k|    }
  252|   221k|  }
  253|       |
  254|   273k|  return norm_val;
  255|   273k|}
ixheaacd_tcx_fwd_mdct.c:ixheaac_norm32:
  236|   250k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   250k|  WORD norm_val;
  238|       |
  239|   250k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 250k]
  ------------------
  240|      0|    norm_val = 31;
  241|   250k|  } else {
  242|   250k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 250k]
  ------------------
  243|      0|      norm_val = 31;
  244|   250k|    } else {
  245|   250k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 250k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  7.66M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 7.41M, False: 250k]
  ------------------
  249|  7.41M|        a <<= 1;
  250|  7.41M|      }
  251|   250k|    }
  252|   250k|  }
  253|       |
  254|   250k|  return norm_val;
  255|   250k|}
ixheaacd_tns.c:ixheaac_add32_sat:
  197|  12.3M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  12.3M|  WORD64 sum;
  199|       |
  200|  12.3M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  12.3M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  12.3M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   608k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 608k, False: 11.7M]
  ------------------
  203|  11.7M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  11.7M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   111k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 111k, False: 11.6M]
  ------------------
  204|       |
  205|  11.6M|  return (WORD32)sum;
  206|  11.7M|}
ixheaacd_tns.c:ixheaac_abs32_sat:
  295|  12.3M|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|  12.3M|  WORD32 abs_val;
  297|       |
  298|  12.3M|  abs_val = a;
  299|       |
  300|  12.3M|  if (a == MIN_32) {
  ------------------
  |  |   61|  12.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 111k, False: 12.2M]
  ------------------
  301|   111k|    abs_val = MAX_32;
  ------------------
  |  |   60|   111k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|  12.2M|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 2.25M, False: 9.97M]
  ------------------
  303|  2.25M|    abs_val = -a;
  304|  2.25M|  }
  305|       |
  306|  12.3M|  return abs_val;
  307|  12.3M|}
ixheaacd_tns.c:ixheaac_min32:
   23|   490k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|   490k|  WORD32 min_val;
   25|       |
   26|   490k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 215k, False: 275k]
  ------------------
   27|       |
   28|   490k|  return min_val;
   29|   490k|}
ixheaacd_tns.c:ixheaac_norm32:
  236|   114k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   114k|  WORD norm_val;
  238|       |
  239|   114k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 114k]
  ------------------
  240|      0|    norm_val = 31;
  241|   114k|  } else {
  242|   114k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 114k]
  ------------------
  243|      0|      norm_val = 31;
  244|   114k|    } else {
  245|   114k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 114k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  3.37M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 3.26M, False: 114k]
  ------------------
  249|  3.26M|        a <<= 1;
  250|  3.26M|      }
  251|   114k|    }
  252|   114k|  }
  253|       |
  254|   114k|  return norm_val;
  255|   114k|}
ixheaacd_tns.c:ixheaac_sub32_sat:
  225|  5.85M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  5.85M|  WORD64 diff;
  227|       |
  228|  5.85M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  5.85M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  5.85M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    414|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 414, False: 5.85M]
  ------------------
  231|  5.85M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  5.85M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.25k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 1.25k, False: 5.85M]
  ------------------
  232|       |
  233|  5.85M|  return (WORD32)diff;
  234|  5.85M|}
ixheaacd_tns.c:ixheaac_shl32:
   39|  5.85M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  5.85M|  WORD32 out_val;
   41|       |
   42|  5.85M|  b = ((UWORD32)(b << 24) >> 24);
   43|  5.85M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 5.85M]
  ------------------
   44|      0|    out_val = 0;
   45|  5.85M|  else
   46|  5.85M|    out_val = (WORD32)a << b;
   47|       |
   48|  5.85M|  return out_val;
   49|  5.85M|}
ixheaac_esbr_fft.c:ixheaac_norm32:
  236|  57.8M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  57.8M|  WORD norm_val;
  238|       |
  239|  57.8M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 57.8M]
  ------------------
  240|      0|    norm_val = 31;
  241|  57.8M|  } else {
  242|  57.8M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 57.8M]
  ------------------
  243|      0|      norm_val = 31;
  244|  57.8M|    } else {
  245|  57.8M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 57.8M]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  1.57G|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 1.51G, False: 57.8M]
  ------------------
  249|  1.51G|        a <<= 1;
  250|  1.51G|      }
  251|  57.8M|    }
  252|  57.8M|  }
  253|       |
  254|  57.8M|  return norm_val;
  255|  57.8M|}
ixheaacd_acelp_bitparse.c:ixheaac_add32_sat:
  197|  92.1M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  92.1M|  WORD64 sum;
  199|       |
  200|  92.1M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  92.1M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  92.1M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  23.5k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 23.5k, False: 92.1M]
  ------------------
  203|  92.1M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  92.1M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.29M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 3.29M, False: 88.8M]
  ------------------
  204|       |
  205|  88.8M|  return (WORD32)sum;
  206|  92.1M|}
ixheaacd_avq_dec.c:ixheaac_negate32_sat:
  317|   606k|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   606k|  WORD32 neg_val;
  319|       |
  320|   606k|  if (a == MIN_32) {
  ------------------
  |  |   61|   606k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 0, False: 606k]
  ------------------
  321|      0|    neg_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   606k|  } else {
  323|   606k|    neg_val = -a;
  324|   606k|  }
  325|   606k|  return neg_val;
  326|   606k|}
ixheaacd_avq_dec.c:ixheaac_sub32_sat:
  225|  3.85M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  3.85M|  WORD64 diff;
  227|       |
  228|  3.85M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  3.85M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.85M|#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: 3.85M]
  ------------------
  231|  3.85M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.85M|#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: 3.85M]
  ------------------
  232|       |
  233|  3.85M|  return (WORD32)diff;
  234|  3.85M|}
ixheaacd_avq_dec.c:ixheaac_add32_sat:
  197|  12.2M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  12.2M|  WORD64 sum;
  199|       |
  200|  12.2M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  12.2M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  12.2M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  16.8k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 16.8k, False: 12.2M]
  ------------------
  203|  12.2M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  12.2M|#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: 12.2M]
  ------------------
  204|       |
  205|  12.2M|  return (WORD32)sum;
  206|  12.2M|}
ixheaacd_avq_dec.c:ixheaac_shl32_sat:
   67|  3.50M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  3.50M|  WORD32 out_val;
   69|  3.50M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  3.50M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 0, False: 3.50M]
  ------------------
   70|      0|    out_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  3.50M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  3.50M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 0, False: 3.50M]
  ------------------
   72|      0|    out_val = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  3.50M|  else
   74|  3.50M|    out_val = a << b;
   75|  3.50M|  return (out_val);
   76|  3.50M|}
ixheaacd_basic_ops.c:ixheaac_add32_sat:
  197|   639M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   639M|  WORD64 sum;
  199|       |
  200|   639M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   639M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   639M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  4.22M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 4.22M, False: 635M]
  ------------------
  203|   635M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   635M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   878k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 878k, False: 634M]
  ------------------
  204|       |
  205|   634M|  return (WORD32)sum;
  206|   635M|}
ixheaacd_basic_ops.c:ixheaac_shl32_sat:
   67|   467M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|   467M|  WORD32 out_val;
   69|   467M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|   467M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 22.3M, False: 445M]
  ------------------
   70|  22.3M|    out_val = MAX_32;
  ------------------
  |  |   60|  22.3M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|   445M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|   445M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 22.1M, False: 423M]
  ------------------
   72|  22.1M|    out_val = MIN_32;
  ------------------
  |  |   61|  22.1M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   423M|  else
   74|   423M|    out_val = a << b;
   75|   467M|  return (out_val);
   76|   467M|}
ixheaacd_basic_ops.c:ixheaac_negate32_sat:
  317|   260M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   260M|  WORD32 neg_val;
  319|       |
  320|   260M|  if (a == MIN_32) {
  ------------------
  |  |   61|   260M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 104k, False: 260M]
  ------------------
  321|   104k|    neg_val = MAX_32;
  ------------------
  |  |   60|   104k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   260M|  } else {
  323|   260M|    neg_val = -a;
  324|   260M|  }
  325|   260M|  return neg_val;
  326|   260M|}
ixheaacd_fwd_alias_cnx.c:ixheaac_add32_sat:
  197|  2.44M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  2.44M|  WORD64 sum;
  199|       |
  200|  2.44M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  2.44M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.44M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.14k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 2.14k, False: 2.43M]
  ------------------
  203|  2.43M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.43M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.32k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 2.32k, False: 2.43M]
  ------------------
  204|       |
  205|  2.43M|  return (WORD32)sum;
  206|  2.43M|}
ixheaacd_fwd_alias_cnx.c:ixheaac_sub32_sat:
  225|   443M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   443M|  WORD64 diff;
  227|       |
  228|   443M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   443M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   443M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  5.50M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 5.50M, False: 438M]
  ------------------
  231|   438M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   438M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  5.77M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 5.77M, False: 432M]
  ------------------
  232|       |
  233|   432M|  return (WORD32)diff;
  234|   438M|}
ixheaacd_fwd_alias_cnx.c:ixheaac_add32_sat3:
  208|  13.8M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat3(WORD32 a, WORD32 b, WORD32 c) {
  209|  13.8M|  WORD64 sum;
  210|       |
  211|  13.8M|  sum = (WORD64)a + (WORD64)b;
  212|       |
  213|  13.8M|  sum = (WORD64)sum + (WORD64)c;
  214|       |
  215|  13.8M|  if (sum > MAX_32) {
  ------------------
  |  |   60|  13.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (215:7): [True: 168k, False: 13.6M]
  ------------------
  216|   168k|    sum = MAX_32;
  ------------------
  |  |   60|   168k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  217|   168k|  }
  218|  13.8M|  if (sum < MIN_32) {
  ------------------
  |  |   61|  13.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (218:7): [True: 193k, False: 13.6M]
  ------------------
  219|   193k|    sum = MIN_32;
  ------------------
  |  |   61|   193k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  220|   193k|  }
  221|       |
  222|  13.8M|  return (WORD32)sum;
  223|  13.8M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_shr32:
   51|   531k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   531k|  WORD32 out_val;
   53|       |
   54|   531k|  b = ((UWORD32)(b << 24) >> 24);
   55|   531k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 531k]
  ------------------
   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|   531k|  } else {
   61|   531k|    out_val = (WORD32)a >> b;
   62|   531k|  }
   63|       |
   64|   531k|  return out_val;
   65|   531k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_shl32:
   39|   531k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   531k|  WORD32 out_val;
   41|       |
   42|   531k|  b = ((UWORD32)(b << 24) >> 24);
   43|   531k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 531k]
  ------------------
   44|      0|    out_val = 0;
   45|   531k|  else
   46|   531k|    out_val = (WORD32)a << b;
   47|       |
   48|   531k|  return out_val;
   49|   531k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_add32_sat:
  197|   688k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   688k|  WORD64 sum;
  199|       |
  200|   688k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   688k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   688k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  45.1k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 45.1k, False: 643k]
  ------------------
  203|   643k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   643k|#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: 643k]
  ------------------
  204|       |
  205|   643k|  return (WORD32)sum;
  206|   643k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_norm32:
  236|  2.54M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  2.54M|  WORD norm_val;
  238|       |
  239|  2.54M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 122k, False: 2.42M]
  ------------------
  240|   122k|    norm_val = 31;
  241|  2.42M|  } else {
  242|  2.42M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 2.42M]
  ------------------
  243|      0|      norm_val = 31;
  244|  2.42M|    } else {
  245|  2.42M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 6.03k, False: 2.41M]
  ------------------
  246|  6.03k|        a = ~a;
  247|  6.03k|      }
  248|  20.7M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 18.2M, False: 2.42M]
  ------------------
  249|  18.2M|        a <<= 1;
  250|  18.2M|      }
  251|  2.42M|    }
  252|  2.42M|  }
  253|       |
  254|  2.54M|  return norm_val;
  255|  2.54M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_negate32_sat:
  317|   143k|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   143k|  WORD32 neg_val;
  319|       |
  320|   143k|  if (a == MIN_32) {
  ------------------
  |  |   61|   143k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 0, False: 143k]
  ------------------
  321|      0|    neg_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   143k|  } else {
  323|   143k|    neg_val = -a;
  324|   143k|  }
  325|   143k|  return neg_val;
  326|   143k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_add32_sat3:
  208|   262k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat3(WORD32 a, WORD32 b, WORD32 c) {
  209|   262k|  WORD64 sum;
  210|       |
  211|   262k|  sum = (WORD64)a + (WORD64)b;
  212|       |
  213|   262k|  sum = (WORD64)sum + (WORD64)c;
  214|       |
  215|   262k|  if (sum > MAX_32) {
  ------------------
  |  |   60|   262k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (215:7): [True: 108k, False: 154k]
  ------------------
  216|   108k|    sum = MAX_32;
  ------------------
  |  |   60|   108k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  217|   108k|  }
  218|   262k|  if (sum < MIN_32) {
  ------------------
  |  |   61|   262k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (218:7): [True: 0, False: 262k]
  ------------------
  219|      0|    sum = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  220|      0|  }
  221|       |
  222|   262k|  return (WORD32)sum;
  223|   262k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_div32:
  328|   219k|static PLATFORM_INLINE WORD32 ixheaac_div32(WORD32 a, WORD32 b, WORD *q_format) {
  329|   219k|  WORD32 quotient;
  330|   219k|  UWORD32 mantissa_nr, mantissa_dr;
  331|   219k|  WORD16 sign = 0;
  332|       |
  333|   219k|  LOOPINDEX i;
  334|   219k|  WORD q_nr, q_dr;
  335|       |
  336|   219k|  if ((a < 0) && (0 != b)) {
  ------------------
  |  Branch (336:7): [True: 0, False: 219k]
  |  Branch (336:18): [True: 0, False: 0]
  ------------------
  337|      0|    a = -a;
  338|      0|    sign = (WORD16)(sign ^ -1);
  339|      0|  }
  340|       |
  341|   219k|  if (b < 0) {
  ------------------
  |  Branch (341:7): [True: 5.30k, False: 214k]
  ------------------
  342|  5.30k|    b = -b;
  343|  5.30k|    sign = (WORD16)(sign ^ -1);
  344|  5.30k|  }
  345|       |
  346|   219k|  if (0 == b) {
  ------------------
  |  Branch (346:7): [True: 29.4k, False: 190k]
  ------------------
  347|  29.4k|    *q_format = 0;
  348|  29.4k|    return (a);
  349|  29.4k|  }
  350|       |
  351|   190k|  quotient = 0;
  352|       |
  353|   190k|  q_nr = ixheaac_norm32(a);
  354|   190k|  mantissa_nr = (UWORD32)a << (q_nr);
  355|   190k|  q_dr = ixheaac_norm32(b);
  356|   190k|  mantissa_dr = (UWORD32)b << (q_dr);
  357|   190k|  *q_format = (WORD)(30 + q_nr - q_dr);
  358|       |
  359|  6.08M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (359:15): [True: 5.89M, False: 190k]
  ------------------
  360|  5.89M|    quotient = quotient << 1;
  361|       |
  362|  5.89M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (362:9): [True: 2.27M, False: 3.61M]
  ------------------
  363|  2.27M|      mantissa_nr = mantissa_nr - mantissa_dr;
  364|  2.27M|      quotient += 1;
  365|  2.27M|    }
  366|       |
  367|  5.89M|    mantissa_nr = (UWORD32)mantissa_nr << 1;
  368|  5.89M|  }
  369|       |
  370|   190k|  if (sign < 0) {
  ------------------
  |  Branch (370:7): [True: 5.30k, False: 184k]
  ------------------
  371|  5.30k|    quotient = -quotient;
  372|  5.30k|  }
  373|       |
  374|   190k|  return quotient;
  375|   219k|}

ixheaacd_headerdecode.c:ixheaac_mult32:
   78|   235k|static PLATFORM_INLINE WORD32 ixheaac_mult32(WORD32 a, WORD32 b) {
   79|   235k|  WORD32 result;
   80|   235k|  WORD64 temp_result;
   81|       |
   82|   235k|  temp_result = (WORD64)a * (WORD64)b;
   83|   235k|  result = (WORD32)(temp_result >> 32);
   84|       |
   85|   235k|  return (result);
   86|   235k|}
ixheaacd_lt_predict.c:ixheaac_mult32x16in32_shl_sat:
   56|  65.9M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl_sat(WORD32 a, WORD16 b) {
   57|  65.9M|  WORD32 result;
   58|       |
   59|  65.9M|  if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
  ------------------
  |  Branch (59:7): [True: 0, False: 65.9M]
  |  Branch (59:34): [True: 0, False: 0]
  ------------------
   60|      0|    result = (WORD32)0x7fffffff;
   61|  65.9M|  } else {
   62|  65.9M|    result = ixheaac_mult32x16in32_shl(a, b);
   63|  65.9M|  }
   64|       |
   65|  65.9M|  return (result);
   66|  65.9M|}
ixheaacd_lt_predict.c:ixheaac_mult32x16in32_shl:
   23|  99.6M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  99.6M|  WORD32 result;
   25|  99.6M|  WORD64 temp_result;
   26|       |
   27|  99.6M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  99.6M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  99.6M|  return (result << 1);
   32|  99.6M|}
ixheaacd_lt_predict.c:ixheaac_mult32_shl:
   68|  16.6M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  16.6M|  WORD32 result;
   70|  16.6M|  WORD64 temp_result;
   71|       |
   72|  16.6M|  temp_result = (WORD64)a * (WORD64)b;
   73|  16.6M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  16.6M|  return (result << 1);
   76|  16.6M|}
ixheaacd_mps_bitdec.c:ixheaac_sat64_32:
  195|  19.7k|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  19.7k|  WORD32 result;
  197|  19.7k|  if (a >= MAX_32) {
  ------------------
  |  |   60|  19.7k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 189, False: 19.5k]
  ------------------
  198|    189|    result = MAX_32;
  ------------------
  |  |   60|    189|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  19.5k|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  19.5k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 19.5k]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  19.5k|  } else {
  202|  19.5k|    result = (WORD32)a;
  203|  19.5k|  }
  204|  19.7k|  return (result);
  205|  19.7k|}
ixheaacd_mps_bitdec.c:ixheaac_mult64:
  168|  19.7k|static PLATFORM_INLINE WORD64 ixheaac_mult64(WORD32 a, WORD32 b) {
  169|  19.7k|  WORD64 result;
  170|  19.7k|  result = (WORD64)a * (WORD64)b;
  171|  19.7k|  return (result);
  172|  19.7k|}
ixheaacd_mps_bitdec.c:ixheaac_mul32_sh:
  235|   119k|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|   119k|  WORD32 result;
  237|   119k|  WORD64 temp_result;
  238|       |
  239|   119k|  temp_result = (WORD64)a * (WORD64)b;
  240|   119k|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|   119k|  return (result);
  243|   119k|}
ixheaacd_mps_dec.c:ixheaac_sat64_32:
  195|   135M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   135M|  WORD32 result;
  197|   135M|  if (a >= MAX_32) {
  ------------------
  |  |   60|   135M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 18.7M, False: 116M]
  ------------------
  198|  18.7M|    result = MAX_32;
  ------------------
  |  |   60|  18.7M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   116M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   116M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 19.1M, False: 97.5M]
  ------------------
  200|  19.1M|    result = MIN_32;
  ------------------
  |  |   61|  19.1M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  97.5M|  } else {
  202|  97.5M|    result = (WORD32)a;
  203|  97.5M|  }
  204|   135M|  return (result);
  205|   135M|}
ixheaacd_mps_decorr.c:ixheaac_add64_sat:
  186|   285M|static PLATFORM_INLINE WORD64 ixheaac_add64_sat(WORD64 a, WORD64 b) {
  187|   285M|  WORD64 result, comp;
  188|   285M|  result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   58|      0|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
                result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   57|   571M|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
  |  Branch (188:12): [True: 0, False: 285M]
  ------------------
  189|   285M|  comp = result - a;
  190|   285M|  if ((a < 0) == (b > comp)) result = a + b;
  ------------------
  |  Branch (190:7): [True: 254M, False: 31.2M]
  ------------------
  191|       |
  192|   285M|  return (result);
  193|   285M|}
ixheaacd_mps_decorr.c:ixheaac_mult32x32in64:
  132|   285M|static PLATFORM_INLINE WORD64 ixheaac_mult32x32in64(WORD32 a, WORD32 b) {
  133|   285M|  WORD64 result;
  134|       |
  135|   285M|  result = (WORD64)a * (WORD64)b;
  136|       |
  137|   285M|  return (result);
  138|   285M|}
ixheaacd_mps_decorr.c:ixheaac_mult32_shl:
   68|  6.60M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  6.60M|  WORD32 result;
   70|  6.60M|  WORD64 temp_result;
   71|       |
   72|  6.60M|  temp_result = (WORD64)a * (WORD64)b;
   73|  6.60M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  6.60M|  return (result << 1);
   76|  6.60M|}
ixheaacd_mps_hybrid_filt.c:ixheaac_mult32x16in32:
   34|   117M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   117M|  WORD32 result;
   36|   117M|  WORD64 temp_result;
   37|       |
   38|   117M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   117M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   117M|  return (result);
   43|   117M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaac_mac32x32in64:
  140|  13.9M|static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64(WORD64 sum, WORD32 a, WORD32 b) {
  141|  13.9M|  sum += (WORD64)a * (WORD64)b;
  142|       |
  143|  13.9M|  return (sum);
  144|  13.9M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaac_sat64_32:
  195|   142M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   142M|  WORD32 result;
  197|   142M|  if (a >= MAX_32) {
  ------------------
  |  |   60|   142M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 298k, False: 141M]
  ------------------
  198|   298k|    result = MAX_32;
  ------------------
  |  |   60|   298k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   141M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   141M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 302k, False: 141M]
  ------------------
  200|   302k|    result = MIN_32;
  ------------------
  |  |   61|   302k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   141M|  } else {
  202|   141M|    result = (WORD32)a;
  203|   141M|  }
  204|   142M|  return (result);
  205|   142M|}
ixheaacd_mps_polyphase.c:ixheaac_mult32x16in32_shl:
   23|  5.39G|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  5.39G|  WORD32 result;
   25|  5.39G|  WORD64 temp_result;
   26|       |
   27|  5.39G|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  5.39G|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  5.39G|  return (result << 1);
   32|  5.39G|}
ixheaacd_mps_polyphase.c:ixheaac_sat64_32:
  195|   160M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   160M|  WORD32 result;
  197|   160M|  if (a >= MAX_32) {
  ------------------
  |  |   60|   160M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 0, False: 160M]
  ------------------
  198|      0|    result = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   160M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   160M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 160M]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   160M|  } else {
  202|   160M|    result = (WORD32)a;
  203|   160M|  }
  204|   160M|  return (result);
  205|   160M|}
ixheaacd_mps_polyphase.c:ixheaac_mult32x16in32:
   34|   762M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   762M|  WORD32 result;
   36|   762M|  WORD64 temp_result;
   37|       |
   38|   762M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   762M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   762M|  return (result);
   43|   762M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_mult32x16in32:
   34|  39.9M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  39.9M|  WORD32 result;
   36|  39.9M|  WORD64 temp_result;
   37|       |
   38|  39.9M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  39.9M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  39.9M|  return (result);
   43|  39.9M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_add64_sat:
  186|   106M|static PLATFORM_INLINE WORD64 ixheaac_add64_sat(WORD64 a, WORD64 b) {
  187|   106M|  WORD64 result, comp;
  188|   106M|  result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   58|      0|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
                result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   57|   212M|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
  |  Branch (188:12): [True: 0, False: 106M]
  ------------------
  189|   106M|  comp = result - a;
  190|   106M|  if ((a < 0) == (b > comp)) result = a + b;
  ------------------
  |  Branch (190:7): [True: 98.7M, False: 7.29M]
  ------------------
  191|       |
  192|   106M|  return (result);
  193|   106M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_mult32x32in64:
  132|   113M|static PLATFORM_INLINE WORD64 ixheaac_mult32x32in64(WORD32 a, WORD32 b) {
  133|   113M|  WORD64 result;
  134|       |
  135|   113M|  result = (WORD64)a * (WORD64)b;
  136|       |
  137|   113M|  return (result);
  138|   113M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_mult32_shl:
   68|   283k|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   283k|  WORD32 result;
   70|   283k|  WORD64 temp_result;
   71|       |
   72|   283k|  temp_result = (WORD64)a * (WORD64)b;
   73|   283k|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   283k|  return (result << 1);
   76|   283k|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_sat64_32:
  195|  4.82M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  4.82M|  WORD32 result;
  197|  4.82M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  4.82M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 109k, False: 4.71M]
  ------------------
  198|   109k|    result = MAX_32;
  ------------------
  |  |   60|   109k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  4.71M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  4.71M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 111k, False: 4.60M]
  ------------------
  200|   111k|    result = MIN_32;
  ------------------
  |  |   61|   111k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  4.60M|  } else {
  202|  4.60M|    result = (WORD32)a;
  203|  4.60M|  }
  204|  4.82M|  return (result);
  205|  4.82M|}
ixheaacd_mps_res_tns.c:ixheaac_mult32x16in32_shl_sat:
   56|   220k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl_sat(WORD32 a, WORD16 b) {
   57|   220k|  WORD32 result;
   58|       |
   59|   220k|  if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
  ------------------
  |  Branch (59:7): [True: 28.2k, False: 192k]
  |  Branch (59:34): [True: 0, False: 28.2k]
  ------------------
   60|      0|    result = (WORD32)0x7fffffff;
   61|   220k|  } else {
   62|   220k|    result = ixheaac_mult32x16in32_shl(a, b);
   63|   220k|  }
   64|       |
   65|   220k|  return (result);
   66|   220k|}
ixheaacd_mps_res_tns.c:ixheaac_mult32x16in32_shl:
   23|   220k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|   220k|  WORD32 result;
   25|   220k|  WORD64 temp_result;
   26|       |
   27|   220k|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|   220k|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|   220k|  return (result << 1);
   32|   220k|}
ixheaacd_mps_smoothing.c:ixheaac_mult32_shl:
   68|   273k|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   273k|  WORD32 result;
   70|   273k|  WORD64 temp_result;
   71|       |
   72|   273k|  temp_result = (WORD64)a * (WORD64)b;
   73|   273k|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   273k|  return (result << 1);
   76|   273k|}
ixheaacd_mps_temp_process.c:ixheaac_mult32x32in64:
  132|  25.1M|static PLATFORM_INLINE WORD64 ixheaac_mult32x32in64(WORD32 a, WORD32 b) {
  133|  25.1M|  WORD64 result;
  134|       |
  135|  25.1M|  result = (WORD64)a * (WORD64)b;
  136|       |
  137|  25.1M|  return (result);
  138|  25.1M|}
ixheaacd_mps_temp_process.c:ixheaac_mac32x32in64:
  140|  30.7M|static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64(WORD64 sum, WORD32 a, WORD32 b) {
  141|  30.7M|  sum += (WORD64)a * (WORD64)b;
  142|       |
  143|  30.7M|  return (sum);
  144|  30.7M|}
ixheaacd_mps_temp_process.c:ixheaac_sat64_32:
  195|  13.9M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  13.9M|  WORD32 result;
  197|  13.9M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  13.9M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 80.0k, False: 13.9M]
  ------------------
  198|  80.0k|    result = MAX_32;
  ------------------
  |  |   60|  80.0k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  13.9M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  13.9M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 83.1k, False: 13.8M]
  ------------------
  200|  83.1k|    result = MIN_32;
  ------------------
  |  |   61|  83.1k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  13.8M|  } else {
  202|  13.8M|    result = (WORD32)a;
  203|  13.8M|  }
  204|  13.9M|  return (result);
  205|  13.9M|}
ixheaacd_mps_temp_process.c:ixheaac_mult32_shl:
   68|   493k|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   493k|  WORD32 result;
   70|   493k|  WORD64 temp_result;
   71|       |
   72|   493k|  temp_result = (WORD64)a * (WORD64)b;
   73|   493k|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   493k|  return (result << 1);
   76|   493k|}
ixheaacd_multichannel.c:ixheaac_mul32_sh:
  235|  5.26k|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|  5.26k|  WORD32 result;
  237|  5.26k|  WORD64 temp_result;
  238|       |
  239|  5.26k|  temp_result = (WORD64)a * (WORD64)b;
  240|  5.26k|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|  5.26k|  return (result);
  243|  5.26k|}
ixheaacd_multichannel.c:ixheaac_mult32x16in32:
   34|   662k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   662k|  WORD32 result;
   36|   662k|  WORD64 temp_result;
   37|       |
   38|   662k|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   662k|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   662k|  return (result);
   43|   662k|}
ixheaacd_pns_js_thumb.c:ixheaac_mult32_shl_sat:
   88|  12.8M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl_sat(WORD32 a, WORD32 b) {
   89|  12.8M|  WORD32 result;
   90|       |
   91|  12.8M|  if (a == (WORD32)0x80000000 && b == (WORD32)0x80000000) {
  ------------------
  |  Branch (91:7): [True: 0, False: 12.8M]
  |  Branch (91:34): [True: 0, False: 0]
  ------------------
   92|      0|    result = 0x7fffffff;
   93|  12.8M|  } else {
   94|  12.8M|    result = ixheaac_mult32_shl(a, b);
   95|  12.8M|  }
   96|       |
   97|  12.8M|  return (result);
   98|  12.8M|}
ixheaacd_pns_js_thumb.c:ixheaac_mult32_shl:
   68|  12.8M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  12.8M|  WORD32 result;
   70|  12.8M|  WORD64 temp_result;
   71|       |
   72|  12.8M|  temp_result = (WORD64)a * (WORD64)b;
   73|  12.8M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  12.8M|  return (result << 1);
   76|  12.8M|}
ixheaacd_sbrdec_lpfuncs.c:ixheaac_mult32x16in32_shl:
   23|   302k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|   302k|  WORD32 result;
   25|   302k|  WORD64 temp_result;
   26|       |
   27|   302k|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|   302k|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|   302k|  return (result << 1);
   32|   302k|}
ixheaacd_qmf_dec_generic.c:ixheaac_mult32x16in32:
   34|  1.15G|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  1.15G|  WORD32 result;
   36|  1.15G|  WORD64 temp_result;
   37|       |
   38|  1.15G|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  1.15G|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  1.15G|  return (result);
   43|  1.15G|}
ixheaacd_qmf_dec_generic.c:ixheaac_mult32x16in32_shl:
   23|  74.7M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  74.7M|  WORD32 result;
   25|  74.7M|  WORD64 temp_result;
   26|       |
   27|  74.7M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  74.7M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  74.7M|  return (result << 1);
   32|  74.7M|}
ixheaacd_qmf_dec_generic.c:ixheaac_mult64:
  168|  12.9G|static PLATFORM_INLINE WORD64 ixheaac_mult64(WORD32 a, WORD32 b) {
  169|  12.9G|  WORD64 result;
  170|  12.9G|  result = (WORD64)a * (WORD64)b;
  171|  12.9G|  return (result);
  172|  12.9G|}
ixheaacd_qmf_dec_generic.c:ixheaac_add64:
  207|  5.05G|static PLATFORM_INLINE WORD64 ixheaac_add64(WORD64 a, WORD64 b) {
  208|  5.05G|  WORD64 result;
  209|  5.05G|  result = a + b;
  210|  5.05G|  return (result);
  211|  5.05G|}
ixheaacd_qmf_dec_generic.c:ixheaac_sub64_sat:
  221|  1.67G|static PLATFORM_INLINE WORD64 ixheaac_sub64_sat(WORD64 a, WORD64 b) {
  222|  1.67G|  WORD64 diff;
  223|       |
  224|  1.67G|  diff = ixheaac_sub64(a, b);
  225|       |
  226|  1.67G|  if ((((WORD64)a ^ (WORD64)b) & (WORD64)MIN_64) != 0) {
  ------------------
  |  |   58|  1.67G|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
  |  Branch (226:7): [True: 471M, False: 1.20G]
  ------------------
  227|   471M|    if (((WORD64)diff ^ (WORD64)a) & (WORD64)MIN_64) {
  ------------------
  |  |   58|   471M|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
  |  Branch (227:9): [True: 0, False: 471M]
  ------------------
  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|   471M|  }
  231|       |
  232|  1.67G|  return (diff);
  233|  1.67G|}
ixheaacd_qmf_dec_generic.c:ixheaac_sub64:
  213|  1.67G|static PLATFORM_INLINE WORD64 ixheaac_sub64(WORD64 a, WORD64 b) {
  214|  1.67G|  WORD64 diff;
  215|       |
  216|  1.67G|  diff = (WORD64)a - (WORD64)b;
  217|       |
  218|  1.67G|  return diff;
  219|  1.67G|}
ixheaacd_aac_imdct.c:ixheaac_mac32x16in32:
  100|  87.7M|static PLATFORM_INLINE WORD32 ixheaac_mac32x16in32(WORD32 a, WORD32 b, WORD16 c) {
  101|  87.7M|  WORD32 result;
  102|       |
  103|  87.7M|  result = a + ixheaac_mult32x16in32(b, c);
  104|       |
  105|  87.7M|  return (result);
  106|  87.7M|}
ixheaacd_aac_imdct.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_aac_imdct.c:ixheaac_mult32x16in32_shl:
   23|  97.2M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  97.2M|  WORD32 result;
   25|  97.2M|  WORD64 temp_result;
   26|       |
   27|  97.2M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  97.2M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  97.2M|  return (result << 1);
   32|  97.2M|}
ixheaacd_aac_imdct.c:ixheaac_mult32_shl:
   68|   210M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   210M|  WORD32 result;
   70|   210M|  WORD64 temp_result;
   71|       |
   72|   210M|  temp_result = (WORD64)a * (WORD64)b;
   73|   210M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   210M|  return (result << 1);
   76|   210M|}
ixheaacd_aac_imdct.c:ixheaac_mult32x32in32:
   45|   220M|static PLATFORM_INLINE WORD32 ixheaac_mult32x32in32(WORD32 a, WORD32 b) {
   46|   220M|  WORD32 result;
   47|   220M|  WORD64 temp_result;
   48|       |
   49|   220M|  temp_result = (WORD64)a * (WORD64)b;
   50|       |
   51|   220M|  result = (WORD32)(temp_result >> 16);
   52|       |
   53|   220M|  return (result);
   54|   220M|}
ixheaacd_aac_imdct.c:ixheaac_mult32:
   78|   296M|static PLATFORM_INLINE WORD32 ixheaac_mult32(WORD32 a, WORD32 b) {
   79|   296M|  WORD32 result;
   80|   296M|  WORD64 temp_result;
   81|       |
   82|   296M|  temp_result = (WORD64)a * (WORD64)b;
   83|   296M|  result = (WORD32)(temp_result >> 32);
   84|       |
   85|   296M|  return (result);
   86|   296M|}
ixheaacd_aac_tns.c:ixheaac_mult32_shl_sat:
   88|  15.5M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl_sat(WORD32 a, WORD32 b) {
   89|  15.5M|  WORD32 result;
   90|       |
   91|  15.5M|  if (a == (WORD32)0x80000000 && b == (WORD32)0x80000000) {
  ------------------
  |  Branch (91:7): [True: 0, False: 15.5M]
  |  Branch (91:34): [True: 0, False: 0]
  ------------------
   92|      0|    result = 0x7fffffff;
   93|  15.5M|  } else {
   94|  15.5M|    result = ixheaac_mult32_shl(a, b);
   95|  15.5M|  }
   96|       |
   97|  15.5M|  return (result);
   98|  15.5M|}
ixheaacd_aac_tns.c:ixheaac_mult32_shl:
   68|  47.8M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  47.8M|  WORD32 result;
   70|  47.8M|  WORD64 temp_result;
   71|       |
   72|  47.8M|  temp_result = (WORD64)a * (WORD64)b;
   73|  47.8M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  47.8M|  return (result << 1);
   76|  47.8M|}
ixheaacd_aac_tns.c:ixheaac_mult32x16in32:
   34|  17.0M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  17.0M|  WORD32 result;
   36|  17.0M|  WORD64 temp_result;
   37|       |
   38|  17.0M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  17.0M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  17.0M|  return (result);
   43|  17.0M|}
ixheaacd_basic_funcs.c:ixheaac_mult32_shl_sat:
   88|  5.86M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl_sat(WORD32 a, WORD32 b) {
   89|  5.86M|  WORD32 result;
   90|       |
   91|  5.86M|  if (a == (WORD32)0x80000000 && b == (WORD32)0x80000000) {
  ------------------
  |  Branch (91:7): [True: 0, False: 5.86M]
  |  Branch (91:34): [True: 0, False: 0]
  ------------------
   92|      0|    result = 0x7fffffff;
   93|  5.86M|  } else {
   94|  5.86M|    result = ixheaac_mult32_shl(a, b);
   95|  5.86M|  }
   96|       |
   97|  5.86M|  return (result);
   98|  5.86M|}
ixheaacd_basic_funcs.c:ixheaac_mult32_shl:
   68|  5.86M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  5.86M|  WORD32 result;
   70|  5.86M|  WORD64 temp_result;
   71|       |
   72|  5.86M|  temp_result = (WORD64)a * (WORD64)b;
   73|  5.86M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  5.86M|  return (result << 1);
   76|  5.86M|}
ixheaacd_basic_funcs.c:ixheaac_mult32x16in32_shl_sat:
   56|   586k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl_sat(WORD32 a, WORD16 b) {
   57|   586k|  WORD32 result;
   58|       |
   59|   586k|  if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
  ------------------
  |  Branch (59:7): [True: 0, False: 586k]
  |  Branch (59:34): [True: 0, False: 0]
  ------------------
   60|      0|    result = (WORD32)0x7fffffff;
   61|   586k|  } else {
   62|   586k|    result = ixheaac_mult32x16in32_shl(a, b);
   63|   586k|  }
   64|       |
   65|   586k|  return (result);
   66|   586k|}
ixheaacd_basic_funcs.c:ixheaac_mult32x16in32_shl:
   23|  1.17M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  1.17M|  WORD32 result;
   25|  1.17M|  WORD64 temp_result;
   26|       |
   27|  1.17M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  1.17M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  1.17M|  return (result << 1);
   32|  1.17M|}
ixheaacd_block.c:ixheaac_mult32_shl:
   68|  13.4M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  13.4M|  WORD32 result;
   70|  13.4M|  WORD64 temp_result;
   71|       |
   72|  13.4M|  temp_result = (WORD64)a * (WORD64)b;
   73|  13.4M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  13.4M|  return (result << 1);
   76|  13.4M|}
ixheaacd_block.c:ixheaac_mac32x16in32_shl:
  108|  13.4M|static PLATFORM_INLINE WORD32 ixheaac_mac32x16in32_shl(WORD32 a, WORD32 b, WORD16 c) {
  109|  13.4M|  WORD32 result;
  110|       |
  111|  13.4M|  result = a + ixheaac_mult32x16in32_shl(b, c);
  112|       |
  113|  13.4M|  return (result);
  114|  13.4M|}
ixheaacd_block.c:ixheaac_mult32x16in32:
   34|   112M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   112M|  WORD32 result;
   36|   112M|  WORD64 temp_result;
   37|       |
   38|   112M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   112M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   112M|  return (result);
   43|   112M|}
ixheaacd_block.c:ixheaac_mult32x16in32_shl:
   23|  49.9M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  49.9M|  WORD32 result;
   25|  49.9M|  WORD64 temp_result;
   26|       |
   27|  49.9M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  49.9M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  49.9M|  return (result << 1);
   32|  49.9M|}
ixheaacd_env_calc.c:ixheaac_mult32x16in32:
   34|  41.8M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  41.8M|  WORD32 result;
   36|  41.8M|  WORD64 temp_result;
   37|       |
   38|  41.8M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  41.8M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  41.8M|  return (result);
   43|  41.8M|}
ixheaacd_ext_ch_ele.c:ixheaac_mac32x32in64:
  140|  1.52M|static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64(WORD64 sum, WORD32 a, WORD32 b) {
  141|  1.52M|  sum += (WORD64)a * (WORD64)b;
  142|       |
  143|  1.52M|  return (sum);
  144|  1.52M|}
ixheaacd_ext_ch_ele.c:ixheaac_mac32x32in64_n:
  160|  1.01M|                                                     WORD32 n) {
  161|  1.01M|  WORD32 k;
  162|       |
  163|  1.01M|  sum += (WORD64)a[0] * (WORD64)b[0];
  164|  5.06M|  for (k = 1; k < n; k++) sum += (WORD64)a[k] * (WORD64)b[k];
  ------------------
  |  Branch (164:15): [True: 4.05M, False: 1.01M]
  ------------------
  165|  1.01M|  return (sum);
  166|  1.01M|}
ixheaacd_ext_ch_ele.c:ixheaac_mac32x32in64_7:
  146|  21.0M|static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64_7(const WORD32 *a, const WORD16 *b) {
  147|  21.0M|  WORD64 sum;
  148|  21.0M|  sum = (WORD64)a[0] * (WORD64)b[0];
  149|  21.0M|  sum += (WORD64)a[1] * (WORD64)b[1];
  150|  21.0M|  sum += (WORD64)a[2] * (WORD64)b[2];
  151|  21.0M|  sum += (WORD64)a[3] * (WORD64)b[3];
  152|  21.0M|  sum += (WORD64)a[4] * (WORD64)b[4];
  153|  21.0M|  sum += (WORD64)a[5] * (WORD64)b[5];
  154|  21.0M|  sum += (WORD64)a[6] * (WORD64)b[6];
  155|       |
  156|  21.0M|  return (sum);
  157|  21.0M|}
ixheaacd_ext_ch_ele.c:ixheaac_sat64_32:
  195|  35.9M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  35.9M|  WORD32 result;
  197|  35.9M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  35.9M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 204k, False: 35.7M]
  ------------------
  198|   204k|    result = MAX_32;
  ------------------
  |  |   60|   204k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  35.7M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  35.7M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 204k, False: 35.5M]
  ------------------
  200|   204k|    result = MIN_32;
  ------------------
  |  |   61|   204k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  35.5M|  } else {
  202|  35.5M|    result = (WORD32)a;
  203|  35.5M|  }
  204|  35.9M|  return (result);
  205|  35.9M|}
ixheaacd_ext_ch_ele.c:ixheaac_mult32x32in64:
  132|  23.7M|static PLATFORM_INLINE WORD64 ixheaac_mult32x32in64(WORD32 a, WORD32 b) {
  133|  23.7M|  WORD64 result;
  134|       |
  135|  23.7M|  result = (WORD64)a * (WORD64)b;
  136|       |
  137|  23.7M|  return (result);
  138|  23.7M|}
ixheaacd_fft.c:ixheaac_sat64_32:
  195|  2.07G|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  2.07G|  WORD32 result;
  197|  2.07G|  if (a >= MAX_32) {
  ------------------
  |  |   60|  2.07G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 0, False: 2.07G]
  ------------------
  198|      0|    result = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  2.07G|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  2.07G|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 2.07G]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  2.07G|  } else {
  202|  2.07G|    result = (WORD32)a;
  203|  2.07G|  }
  204|  2.07G|  return (result);
  205|  2.07G|}
ixheaacd_fft.c:ixheaac_mult32_shl:
   68|  30.6M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  30.6M|  WORD32 result;
   70|  30.6M|  WORD64 temp_result;
   71|       |
   72|  30.6M|  temp_result = (WORD64)a * (WORD64)b;
   73|  30.6M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  30.6M|  return (result << 1);
   76|  30.6M|}
ixheaacd_imdct.c:ixheaac_mult32:
   78|  1.37G|static PLATFORM_INLINE WORD32 ixheaac_mult32(WORD32 a, WORD32 b) {
   79|  1.37G|  WORD32 result;
   80|  1.37G|  WORD64 temp_result;
   81|       |
   82|  1.37G|  temp_result = (WORD64)a * (WORD64)b;
   83|  1.37G|  result = (WORD32)(temp_result >> 32);
   84|       |
   85|  1.37G|  return (result);
   86|  1.37G|}
ixheaacd_imdct.c:ixheaac_mul32_sh:
  235|  27.7M|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|  27.7M|  WORD32 result;
  237|  27.7M|  WORD64 temp_result;
  238|       |
  239|  27.7M|  temp_result = (WORD64)a * (WORD64)b;
  240|  27.7M|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|  27.7M|  return (result);
  243|  27.7M|}
ixheaacd_lpfuncs.c:ixheaac_mult32x16in32:
   34|   174M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   174M|  WORD32 result;
   36|   174M|  WORD64 temp_result;
   37|       |
   38|   174M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   174M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   174M|  return (result);
   43|   174M|}
ixheaacd_lpp_tran.c:ixheaac_mult32x16in32:
   34|  52.6M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  52.6M|  WORD32 result;
   36|  52.6M|  WORD64 temp_result;
   37|       |
   38|  52.6M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  52.6M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  52.6M|  return (result);
   43|  52.6M|}
ixheaacd_lpp_tran.c:ixheaac_mult32:
   78|  5.28M|static PLATFORM_INLINE WORD32 ixheaac_mult32(WORD32 a, WORD32 b) {
   79|  5.28M|  WORD32 result;
   80|  5.28M|  WORD64 temp_result;
   81|       |
   82|  5.28M|  temp_result = (WORD64)a * (WORD64)b;
   83|  5.28M|  result = (WORD32)(temp_result >> 32);
   84|       |
   85|  5.28M|  return (result);
   86|  5.28M|}
ixheaacd_mps_apply_m1.c:ixheaac_sat64_32:
  195|   978M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   978M|  WORD32 result;
  197|   978M|  if (a >= MAX_32) {
  ------------------
  |  |   60|   978M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 68.3M, False: 909M]
  ------------------
  198|  68.3M|    result = MAX_32;
  ------------------
  |  |   60|  68.3M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   909M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   909M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 68.3M, False: 841M]
  ------------------
  200|  68.3M|    result = MIN_32;
  ------------------
  |  |   61|  68.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   841M|  } else {
  202|   841M|    result = (WORD32)a;
  203|   841M|  }
  204|   978M|  return (result);
  205|   978M|}
ixheaacd_mps_apply_m2.c:ixheaac_sat64_32:
  195|   818M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   818M|  WORD32 result;
  197|   818M|  if (a >= MAX_32) {
  ------------------
  |  |   60|   818M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 19.8M, False: 798M]
  ------------------
  198|  19.8M|    result = MAX_32;
  ------------------
  |  |   60|  19.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   798M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   798M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 19.9M, False: 778M]
  ------------------
  200|  19.9M|    result = MIN_32;
  ------------------
  |  |   61|  19.9M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   778M|  } else {
  202|   778M|    result = (WORD32)a;
  203|   778M|  }
  204|   818M|  return (result);
  205|   818M|}
ixheaacd_mps_calc_m1m2_tree_515x.c:ixheaac_sat64_32:
  195|  1.23M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  1.23M|  WORD32 result;
  197|  1.23M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  1.23M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 8.97k, False: 1.22M]
  ------------------
  198|  8.97k|    result = MAX_32;
  ------------------
  |  |   60|  8.97k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  1.22M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  1.22M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 1.22M]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  1.22M|  } else {
  202|  1.22M|    result = (WORD32)a;
  203|  1.22M|  }
  204|  1.23M|  return (result);
  205|  1.23M|}
ixheaacd_mps_calc_m1m2_tree_52xx.c:ixheaac_sat64_32:
  195|   200k|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   200k|  WORD32 result;
  197|   200k|  if (a >= MAX_32) {
  ------------------
  |  |   60|   200k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 3.18k, False: 196k]
  ------------------
  198|  3.18k|    result = MAX_32;
  ------------------
  |  |   60|  3.18k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   196k|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   196k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 2.28k, False: 194k]
  ------------------
  200|  2.28k|    result = MIN_32;
  ------------------
  |  |   61|  2.28k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   194k|  } else {
  202|   194k|    result = (WORD32)a;
  203|   194k|  }
  204|   200k|  return (result);
  205|   200k|}
ixheaacd_mps_calc_m1m2_tree_727x.c:ixheaac_sat64_32:
  195|   937k|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   937k|  WORD32 result;
  197|   937k|  if (a >= MAX_32) {
  ------------------
  |  |   60|   937k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 1.42k, False: 935k]
  ------------------
  198|  1.42k|    result = MAX_32;
  ------------------
  |  |   60|  1.42k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   935k|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   935k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 2.80k, False: 933k]
  ------------------
  200|  2.80k|    result = MIN_32;
  ------------------
  |  |   61|  2.80k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   933k|  } else {
  202|   933k|    result = (WORD32)a;
  203|   933k|  }
  204|   937k|  return (result);
  205|   937k|}
ixheaacd_mps_res_block.c:ixheaac_mult32x16in32_shl:
   23|   311k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|   311k|  WORD32 result;
   25|   311k|  WORD64 temp_result;
   26|       |
   27|   311k|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|   311k|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|   311k|  return (result << 1);
   32|   311k|}
ixheaacd_qmf_dec.c:ixheaac_add64:
  207|  2.75G|static PLATFORM_INLINE WORD64 ixheaac_add64(WORD64 a, WORD64 b) {
  208|  2.75G|  WORD64 result;
  209|  2.75G|  result = a + b;
  210|  2.75G|  return (result);
  211|  2.75G|}
ixheaacd_qmf_dec.c:ixheaac_mul32_sh:
  235|  42.4M|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|  42.4M|  WORD32 result;
  237|  42.4M|  WORD64 temp_result;
  238|       |
  239|  42.4M|  temp_result = (WORD64)a * (WORD64)b;
  240|  42.4M|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|  42.4M|  return (result);
  243|  42.4M|}
ixheaacd_qmf_dec.c:ixheaac_mult64:
  168|  3.44G|static PLATFORM_INLINE WORD64 ixheaac_mult64(WORD32 a, WORD32 b) {
  169|  3.44G|  WORD64 result;
  170|  3.44G|  result = (WORD64)a * (WORD64)b;
  171|  3.44G|  return (result);
  172|  3.44G|}
ixheaacd_qmf_dec.c:ixheaac_mac32x16in32_shl_sat:
  116|  72.0M|static PLATFORM_INLINE WORD32 ixheaac_mac32x16in32_shl_sat(WORD32 a, WORD32 b, WORD16 c) {
  117|  72.0M|  WORD32 result;
  118|       |
  119|  72.0M|  result = ixheaac_add32_sat(a, ixheaac_mult32x16in32_shl_sat(b, c));
  120|       |
  121|  72.0M|  return (result);
  122|  72.0M|}
ixheaacd_qmf_dec.c:ixheaac_mult32x16in32_shl_sat:
   56|  72.0M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl_sat(WORD32 a, WORD16 b) {
   57|  72.0M|  WORD32 result;
   58|       |
   59|  72.0M|  if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
  ------------------
  |  Branch (59:7): [True: 25, False: 72.0M]
  |  Branch (59:34): [True: 0, False: 25]
  ------------------
   60|      0|    result = (WORD32)0x7fffffff;
   61|  72.0M|  } else {
   62|  72.0M|    result = ixheaac_mult32x16in32_shl(a, b);
   63|  72.0M|  }
   64|       |
   65|  72.0M|  return (result);
   66|  72.0M|}
ixheaacd_qmf_dec.c:ixheaac_mult32x16in32_shl:
   23|   288M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|   288M|  WORD32 result;
   25|   288M|  WORD64 temp_result;
   26|       |
   27|   288M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|   288M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|   288M|  return (result << 1);
   32|   288M|}
ixheaacd_tns.c:ixheaac_mult32_shl_sat:
   88|  12.3M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl_sat(WORD32 a, WORD32 b) {
   89|  12.3M|  WORD32 result;
   90|       |
   91|  12.3M|  if (a == (WORD32)0x80000000 && b == (WORD32)0x80000000) {
  ------------------
  |  Branch (91:7): [True: 0, False: 12.3M]
  |  Branch (91:34): [True: 0, False: 0]
  ------------------
   92|      0|    result = 0x7fffffff;
   93|  12.3M|  } else {
   94|  12.3M|    result = ixheaac_mult32_shl(a, b);
   95|  12.3M|  }
   96|       |
   97|  12.3M|  return (result);
   98|  12.3M|}
ixheaacd_tns.c:ixheaac_mult32_shl:
   68|  12.3M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  12.3M|  WORD32 result;
   70|  12.3M|  WORD64 temp_result;
   71|       |
   72|  12.3M|  temp_result = (WORD64)a * (WORD64)b;
   73|  12.3M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  12.3M|  return (result << 1);
   76|  12.3M|}
ixheaacd_tns.c:ixheaac_add64_sat:
  186|  40.0M|static PLATFORM_INLINE WORD64 ixheaac_add64_sat(WORD64 a, WORD64 b) {
  187|  40.0M|  WORD64 result, comp;
  188|  40.0M|  result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   58|  8.26M|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
                result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   57|  71.8M|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
  |  Branch (188:12): [True: 8.26M, False: 31.7M]
  ------------------
  189|  40.0M|  comp = result - a;
  190|  40.0M|  if ((a < 0) == (b > comp)) result = a + b;
  ------------------
  |  Branch (190:7): [True: 40.0M, False: 5.76k]
  ------------------
  191|       |
  192|  40.0M|  return (result);
  193|  40.0M|}
ixheaacd_tns.c:ixheaac_mult64:
  168|  40.0M|static PLATFORM_INLINE WORD64 ixheaac_mult64(WORD32 a, WORD32 b) {
  169|  40.0M|  WORD64 result;
  170|  40.0M|  result = (WORD64)a * (WORD64)b;
  171|  40.0M|  return (result);
  172|  40.0M|}
ixheaacd_arith_dec.c:ixheaac_mult64_sat:
  174|  28.3M|static PLATFORM_INLINE WORD64 ixheaac_mult64_sat(WORD64 a, WORD64 b) {
  175|  28.3M|  WORD64 result;
  176|       |
  177|  28.3M|  if (a > 0 && b > 0 && a > MAX_64 / b) return MAX_64;
  ------------------
  |  |   57|  3.46M|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
                if (a > 0 && b > 0 && a > MAX_64 / b) return MAX_64;
  ------------------
  |  |   57|  56.4k|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
  |  Branch (177:7): [True: 14.0M, False: 14.3M]
  |  Branch (177:16): [True: 3.46M, False: 10.5M]
  |  Branch (177:25): [True: 56.4k, False: 3.40M]
  ------------------
  178|  28.2M|  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: 28.2M]
  |  Branch (178:16): [True: 0, False: 0]
  |  Branch (178:25): [True: 0, False: 0]
  ------------------
  179|  28.2M|  if (a > 0 && b < 0 && b < MIN_64 / a) return MIN_64;
  ------------------
  |  |   58|  4.61M|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
                if (a > 0 && b < 0 && b < MIN_64 / a) return MIN_64;
  ------------------
  |  |   58|  31.3k|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
  |  Branch (179:7): [True: 13.9M, False: 14.3M]
  |  Branch (179:16): [True: 4.61M, False: 9.35M]
  |  Branch (179:25): [True: 31.3k, False: 4.58M]
  ------------------
  180|  28.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: 28.2M]
  |  Branch (180:16): [True: 0, False: 0]
  |  Branch (180:25): [True: 0, False: 0]
  ------------------
  181|       |
  182|  28.2M|  result = a * b;
  183|  28.2M|  return (result);
  184|  28.2M|}
ixheaacd_avq_dec.c:ixheaac_sat64_32:
  195|  5.26M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  5.26M|  WORD32 result;
  197|  5.26M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  5.26M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 10.9k, False: 5.24M]
  ------------------
  198|  10.9k|    result = MAX_32;
  ------------------
  |  |   60|  10.9k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  5.24M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  5.24M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 5.24M]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  5.24M|  } else {
  202|  5.24M|    result = (WORD32)a;
  203|  5.24M|  }
  204|  5.26M|  return (result);
  205|  5.26M|}
ixheaacd_fwd_alias_cnx.c:ixheaac_mul32_sh:
  235|   473M|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|   473M|  WORD32 result;
  237|   473M|  WORD64 temp_result;
  238|       |
  239|   473M|  temp_result = (WORD64)a * (WORD64)b;
  240|   473M|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|   473M|  return (result);
  243|   473M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_mult32_shl:
   68|   224k|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   224k|  WORD32 result;
   70|   224k|  WORD64 temp_result;
   71|       |
   72|   224k|  temp_result = (WORD64)a * (WORD64)b;
   73|   224k|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   224k|  return (result << 1);
   76|   224k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_sat64_32:
  195|  7.46M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  7.46M|  WORD32 result;
  197|  7.46M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  7.46M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 3.43k, False: 7.46M]
  ------------------
  198|  3.43k|    result = MAX_32;
  ------------------
  |  |   60|  3.43k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  7.46M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  7.46M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 7.46M]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  7.46M|  } else {
  202|  7.46M|    result = (WORD32)a;
  203|  7.46M|  }
  204|  7.46M|  return (result);
  205|  7.46M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_mult32x16in32:
   34|   229k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   229k|  WORD32 result;
   36|   229k|  WORD64 temp_result;
   37|       |
   38|   229k|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   229k|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   229k|  return (result);
   43|   229k|}

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

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

impd_read_bits_buf:
   33|  1.08M|WORD32 impd_read_bits_buf(ia_bit_buf_struct* it_bit_buff, WORD no_of_bits) {
   34|  1.08M|  UWORD32 ret_val;
   35|  1.08M|  UWORD8* ptr_read_next = it_bit_buff->ptr_read_next;
   36|  1.08M|  WORD bit_pos = it_bit_buff->bit_pos;
   37|       |
   38|  1.08M|  if (it_bit_buff->cnt_bits <= 0) {
  ------------------
  |  Branch (38:7): [True: 9.06k, False: 1.07M]
  ------------------
   39|  9.06k|    it_bit_buff->error = 1;
   40|  9.06k|    return -1;
   41|  9.06k|  }
   42|       |
   43|  1.07M|  if (no_of_bits == 0) {
  ------------------
  |  Branch (43:7): [True: 19.1k, False: 1.05M]
  ------------------
   44|  19.1k|    return 0;
   45|  19.1k|  }
   46|       |
   47|  1.05M|  it_bit_buff->cnt_bits -= no_of_bits;
   48|  1.05M|  ret_val = (UWORD32)*ptr_read_next;
   49|       |
   50|  1.05M|  bit_pos -= no_of_bits;
   51|  1.34M|  while (bit_pos < 0) {
  ------------------
  |  Branch (51:10): [True: 287k, False: 1.05M]
  ------------------
   52|   287k|    bit_pos += 8;
   53|   287k|    ptr_read_next++;
   54|       |
   55|   287k|    if (ptr_read_next > it_bit_buff->ptr_bit_buf_end) {
  ------------------
  |  Branch (55:9): [True: 6.91k, False: 281k]
  ------------------
   56|  6.91k|      ptr_read_next = it_bit_buff->ptr_bit_buf_base;
   57|  6.91k|    }
   58|       |
   59|   287k|    ret_val <<= 8;
   60|       |
   61|   287k|    ret_val |= (UWORD32)*ptr_read_next;
   62|   287k|  }
   63|       |
   64|  1.05M|  ret_val = ret_val << ((31 - no_of_bits) - bit_pos) >> (32 - no_of_bits);
   65|  1.05M|  it_bit_buff->ptr_read_next = ptr_read_next;
   66|  1.05M|  it_bit_buff->bit_pos = (WORD16)bit_pos;
   67|  1.05M|  return ret_val;
   68|  1.07M|}
impd_skip_bits_buf:
   70|  33.8k|WORD32 impd_skip_bits_buf(ia_bit_buf_struct* it_bit_buff, WORD no_of_bits) {
   71|  33.8k|  UWORD8* ptr_read_next = it_bit_buff->ptr_read_next;
   72|  33.8k|  WORD bit_pos = it_bit_buff->bit_pos;
   73|       |
   74|  33.8k|  if (it_bit_buff->cnt_bits < no_of_bits) {
  ------------------
  |  Branch (74:7): [True: 3.03k, False: 30.7k]
  ------------------
   75|  3.03k|    it_bit_buff->error = 1;
   76|  3.03k|    return -1;
   77|  3.03k|  }
   78|       |
   79|  30.7k|  it_bit_buff->cnt_bits -= no_of_bits;
   80|       |
   81|  30.7k|  bit_pos -= no_of_bits;
   82|   183k|  while (bit_pos < 0) {
  ------------------
  |  Branch (82:10): [True: 152k, False: 30.7k]
  ------------------
   83|   152k|    bit_pos += 8;
   84|   152k|    ptr_read_next++;
   85|   152k|  }
   86|  30.7k|  it_bit_buff->ptr_read_next = ptr_read_next;
   87|  30.7k|  it_bit_buff->bit_pos = (WORD16)bit_pos;
   88|  30.7k|  return no_of_bits;
   89|  33.8k|}
impd_create_bit_buf:
   91|  26.1k|                         UWORD8* ptr_bit_buf_base, WORD32 bit_buf_size) {
   92|  26.1k|  it_bit_buff->ptr_bit_buf_base = ptr_bit_buf_base;
   93|  26.1k|  it_bit_buff->ptr_bit_buf_end = ptr_bit_buf_base + bit_buf_size - 1;
   94|       |
   95|  26.1k|  it_bit_buff->ptr_read_next = ptr_bit_buf_base;
   96|  26.1k|  it_bit_buff->bit_pos = 7;
   97|       |
   98|  26.1k|  it_bit_buff->cnt_bits = 0;
   99|  26.1k|  it_bit_buff->size = bit_buf_size << 3;
  100|  26.1k|  it_bit_buff->error = 0;
  101|       |
  102|  26.1k|  return;
  103|  26.1k|}
impd_create_init_bit_buf:
  106|  26.1k|                              UWORD8* ptr_bit_buf_base, WORD32 bit_buf_size) {
  107|  26.1k|  impd_create_bit_buf(it_bit_buff, ptr_bit_buf_base, bit_buf_size);
  108|  26.1k|  it_bit_buff->cnt_bits = (bit_buf_size << 3);
  109|  26.1k|  return;
  110|  26.1k|}
impd_init_drc_bitstream_dec:
  116|  2.10k|                                   WORD32* lfe_channel_map) {
  117|  2.10k|  WORD32 i, err_code = 0;
  118|       |
  119|  2.10k|  ia_drc_params_bs_dec_struct* ia_drc_params_struct =
  120|  2.10k|      &p_drc_bs_dec_struct->ia_drc_params_struct;
  121|  2.10k|  ia_drc_params_struct->drc_frame_size = frame_size;
  122|  2.10k|  if (sample_rate < MIN_DRC_SAMP_FREQ) {
  ------------------
  |  |  218|  2.10k|#define MIN_DRC_SAMP_FREQ 1000
  ------------------
  |  Branch (122:7): [True: 4, False: 2.10k]
  ------------------
  123|      4|    return -1;
  124|      4|  }
  125|  2.10k|  ia_drc_params_struct->delta_tmin_default = impd_get_delta_tmin(sample_rate);
  126|  2.10k|  ia_drc_params_struct->num_gain_values_max_default =
  127|  2.10k|      ia_drc_params_struct->drc_frame_size /
  128|  2.10k|      ia_drc_params_struct->delta_tmin_default;
  129|       |
  130|  2.10k|  if (ia_drc_params_struct->num_gain_values_max_default >
  ------------------
  |  Branch (130:7): [True: 20, False: 2.08k]
  ------------------
  131|  2.10k|    (N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX / 2 - 1))
  ------------------
  |  |   27|  2.10k|#define N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX (512 + 14)
  ------------------
  132|     20|    ia_drc_params_struct->num_gain_values_max_default =
  133|     20|    (N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX / 2 - 1);
  ------------------
  |  |   27|     20|#define N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX (512 + 14)
  ------------------
  134|       |
  135|  2.10k|  ia_drc_params_struct->delay_mode = delay_mode;
  136|       |
  137|  2.10k|  if ((frame_size < 1) || (frame_size > AUDIO_CODEC_FRAME_SIZE_MAX) ||
  ------------------
  |  |   45|  2.10k|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  ------------------
  |  Branch (137:7): [True: 0, False: 2.10k]
  |  Branch (137:27): [True: 0, False: 2.10k]
  ------------------
  138|  2.10k|      (ia_drc_params_struct->drc_frame_size < 0.001f * sample_rate)) {
  ------------------
  |  Branch (138:7): [True: 0, False: 2.10k]
  ------------------
  139|      0|    return -1;
  140|      0|  }
  141|       |
  142|  2.10k|  if (ia_drc_params_struct->delta_tmin_default >
  ------------------
  |  Branch (142:7): [True: 0, False: 2.10k]
  ------------------
  143|  2.10k|      ia_drc_params_struct->drc_frame_size) {
  144|      0|    return -1;
  145|      0|  }
  146|       |
  147|  2.10k|  if (lfe_channel_map_count >= 0) {
  ------------------
  |  Branch (147:7): [True: 0, False: 2.10k]
  ------------------
  148|      0|    if ((lfe_channel_map == NULL) ||
  ------------------
  |  Branch (148:9): [True: 0, False: 0]
  ------------------
  149|      0|        (lfe_channel_map_count > MAX_CHANNEL_COUNT)) {
  ------------------
  |  |   35|      0|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  |  Branch (149:9): [True: 0, False: 0]
  ------------------
  150|      0|      return (-1);
  151|      0|    }
  152|       |
  153|      0|    ia_drc_params_struct->lfe_channel_map_count = lfe_channel_map_count;
  154|       |
  155|      0|    for (i = 0; i < lfe_channel_map_count; i++) {
  ------------------
  |  Branch (155:17): [True: 0, False: 0]
  ------------------
  156|      0|      ia_drc_params_struct->lfe_channel_map[i] = lfe_channel_map[i];
  157|      0|    }
  158|  2.10k|  } else {
  159|  2.10k|    ia_drc_params_struct->lfe_channel_map_count = -1;
  160|       |
  161|  18.9k|    for (i = 0; i < MAX_CHANNEL_COUNT; i++) {
  ------------------
  |  |   35|  18.9k|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  |  Branch (161:17): [True: 16.8k, False: 2.10k]
  ------------------
  162|  16.8k|      ia_drc_params_struct->lfe_channel_map[i] = 0;
  163|  16.8k|    }
  164|  2.10k|  }
  165|       |
  166|  2.10k|  impd_init_tbls(ia_drc_params_struct->num_gain_values_max_default,
  167|  2.10k|                 &p_drc_bs_dec_struct->tables_default);
  168|       |
  169|  2.10k|  return err_code;
  170|  2.10k|}
impd_process_drc_bitstream_dec_config:
  175|  2.10k|    WORD32 num_bytes) {
  176|  2.10k|  WORD32 err_code = 0;
  177|       |
  178|  2.10k|  impd_create_init_bit_buf(it_bit_buff, bitstream_config, num_bytes);
  179|       |
  180|  2.10k|  err_code = impd_parse_drc_config(
  181|  2.10k|      it_bit_buff, &p_drc_bs_dec_struct->ia_drc_params_struct, pstr_drc_config);
  182|  2.10k|  if (err_code) return (err_code);
  ------------------
  |  Branch (182:7): [True: 1.95k, False: 146]
  ------------------
  183|       |
  184|    146|  return err_code;
  185|  2.10k|}
impd_process_drc_bitstream_dec_gain:
  191|  20.1k|    WORD32* num_bits_read) {
  192|  20.1k|  WORD32 err_code = 0;
  193|       |
  194|  20.1k|  impd_create_init_bit_buf(it_bit_buff, bitstream_gain, num_bytes);
  195|       |
  196|  20.1k|  impd_read_bits_buf(it_bit_buff, num_bits_offset);
  197|  20.1k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (197:7): [True: 1.15k, False: 19.0k]
  ------------------
  198|       |
  199|  19.0k|  err_code = impd_drc_uni_gain_read(it_bit_buff, p_drc_bs_dec_struct,
  200|  19.0k|                                    pstr_drc_config, pstr_drc_gain);
  201|       |
  202|  19.0k|  if (err_code > PROC_COMPLETE) return (err_code);
  ------------------
  |  |  127|  19.0k|#define PROC_COMPLETE 1
  ------------------
  |  Branch (202:7): [True: 1.79k, False: 17.2k]
  ------------------
  203|       |
  204|  17.2k|  *num_bits_read = (it_bit_buff->size) - it_bit_buff->cnt_bits;
  205|       |
  206|  17.2k|  if (err_code == PROC_COMPLETE) {
  ------------------
  |  |  127|  17.2k|#define PROC_COMPLETE 1
  ------------------
  |  Branch (206:7): [True: 8.07k, False: 9.13k]
  ------------------
  207|  8.07k|    return err_code;
  208|  8.07k|  }
  209|       |
  210|  9.13k|  return 0;
  211|  17.2k|}
impd_process_drc_bitstream_dec_loudness_info_set:
  216|  1.73k|    UWORD8* bit_stream_loudness, WORD32 num_bytes_loudness) {
  217|  1.73k|  WORD32 err_code = 0;
  218|       |
  219|  1.73k|  impd_create_init_bit_buf(it_bit_buff, bit_stream_loudness,
  220|  1.73k|                           num_bytes_loudness);
  221|       |
  222|  1.73k|  err_code = impd_parse_loudness_info_set(it_bit_buff, pstr_loudness_info);
  223|  1.73k|  return err_code;
  224|  1.73k|}

impd_init_drc_params:
   33|  4.20k|                            ia_drc_params_struct* ia_drc_params_struct) {
   34|  4.20k|  WORD32 k;
   35|  4.20k|  if (frame_size < 1 || frame_size > AUDIO_CODEC_FRAME_SIZE_MAX) {
  ------------------
  |  |   45|  4.20k|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  ------------------
  |  Branch (35:7): [True: 0, False: 4.20k]
  |  Branch (35:25): [True: 0, False: 4.20k]
  ------------------
   36|      0|    return -1;
   37|      0|  }
   38|       |
   39|  4.20k|  if (sample_rate < 1000) {
  ------------------
  |  Branch (39:7): [True: 0, False: 4.20k]
  ------------------
   40|      0|    return -1;
   41|      0|  }
   42|       |
   43|  4.20k|  ia_drc_params_struct->drc_frame_size = frame_size;
   44|       |
   45|  4.20k|  if (ia_drc_params_struct->drc_frame_size < 0.001f * sample_rate) {
  ------------------
  |  Branch (45:7): [True: 0, False: 4.20k]
  ------------------
   46|      0|    return -1;
   47|      0|  }
   48|       |
   49|  4.20k|  ia_drc_params_struct->sample_rate = sample_rate;
   50|       |
   51|  4.20k|  ia_drc_params_struct->delta_tmin_default = impd_get_delta_tmin(sample_rate);
   52|       |
   53|  4.20k|  if (ia_drc_params_struct->delta_tmin_default >
  ------------------
  |  Branch (53:7): [True: 0, False: 4.20k]
  ------------------
   54|  4.20k|      ia_drc_params_struct->drc_frame_size) {
   55|      0|    return -1;
   56|      0|  }
   57|       |
   58|  4.20k|  if ((delay_mode != DELAY_MODE_REGULAR_DELAY) &&
  ------------------
  |  |  116|  4.20k|#define DELAY_MODE_REGULAR_DELAY 0
  ------------------
  |  Branch (58:7): [True: 0, False: 4.20k]
  ------------------
   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|  4.20k|  ia_drc_params_struct->delay_mode = delay_mode;
   64|       |
   65|  4.20k|  ia_drc_params_struct->drc_set_counter = 0;
   66|  4.20k|  ia_drc_params_struct->multiband_sel_drc_idx = -1;
   67|       |
   68|  16.8k|  for (k = 0; k < SEL_DRC_COUNT; k++) {
  ------------------
  |  |   50|  16.8k|#define SEL_DRC_COUNT 3
  ------------------
  |  Branch (68:15): [True: 12.6k, False: 4.20k]
  ------------------
   69|  12.6k|    ia_drc_params_struct->sel_drc_array[k].drc_instructions_index = -1;
   70|  12.6k|    ia_drc_params_struct->sel_drc_array[k].dwnmix_instructions_index = -1;
   71|  12.6k|    ia_drc_params_struct->sel_drc_array[k].drc_coeff_idx = -1;
   72|  12.6k|  }
   73|       |
   74|  4.20k|  if ((gain_delay_samples > MAX_SIGNAL_DELAY) || (gain_delay_samples < 0)) {
  ------------------
  |  |   52|  4.20k|#define MAX_SIGNAL_DELAY 4500
  ------------------
  |  Branch (74:7): [True: 0, False: 4.20k]
  |  Branch (74:50): [True: 0, False: 4.20k]
  ------------------
   75|      0|    return -1;
   76|  4.20k|  } else {
   77|  4.20k|    ia_drc_params_struct->gain_delay_samples = gain_delay_samples;
   78|  4.20k|  }
   79|       |
   80|  4.20k|  switch (sub_band_domain_mode) {
   81|  4.20k|    case SUBBAND_DOMAIN_MODE_OFF:
  ------------------
  |  |  148|  4.20k|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (81:5): [True: 4.20k, False: 0]
  ------------------
   82|  4.20k|    case SUBBAND_DOMAIN_MODE_QMF64:
  ------------------
  |  |  149|  4.20k|#define SUBBAND_DOMAIN_MODE_QMF64 1
  ------------------
  |  Branch (82:5): [True: 0, False: 4.20k]
  ------------------
   83|  4.20k|    case SUBBAND_DOMAIN_MODE_QMF71:
  ------------------
  |  |  150|  4.20k|#define SUBBAND_DOMAIN_MODE_QMF71 2
  ------------------
  |  Branch (83:5): [True: 0, False: 4.20k]
  ------------------
   84|  4.20k|    case SUBBAND_DOMAIN_MODE_STFT256:
  ------------------
  |  |  151|  4.20k|#define SUBBAND_DOMAIN_MODE_STFT256 3
  ------------------
  |  Branch (84:5): [True: 0, False: 4.20k]
  ------------------
   85|  4.20k|      ia_drc_params_struct->sub_band_domain_mode = sub_band_domain_mode;
   86|  4.20k|      break;
   87|      0|    default:
  ------------------
  |  Branch (87:5): [True: 0, False: 4.20k]
  ------------------
   88|      0|      return -1;
   89|      0|      break;
   90|  4.20k|  }
   91|       |
   92|  4.20k|  ia_drc_params_struct->parametric_drc_delay = 0;
   93|  4.20k|  ia_drc_params_struct->eq_delay = 0;
   94|       |
   95|  4.20k|  return 0;
   96|  4.20k|}
impd_select_drc_coefficients:
  100|    265|    WORD32* drc_coefficients_selected) {
  101|    265|  WORD32 i;
  102|    265|  WORD32 cof1 = -1;
  103|    265|  WORD32 cof0 = -1;
  104|    530|  for (i = 0; i < drc_config->drc_coefficients_drc_count; i++) {
  ------------------
  |  Branch (104:15): [True: 265, False: 265]
  ------------------
  105|    265|    if (drc_config->str_p_loc_drc_coefficients_uni_drc[i].drc_location == 1) {
  ------------------
  |  Branch (105:9): [True: 265, False: 0]
  ------------------
  106|    265|      if (drc_config->str_p_loc_drc_coefficients_uni_drc[i].version == 0) {
  ------------------
  |  Branch (106:11): [True: 0, False: 265]
  ------------------
  107|      0|        cof0 = i;
  108|      0|        *drc_coefficients_selected = cof0;
  109|    265|      } else {
  110|    265|        cof1 = i;
  111|    265|        *drc_coefficients_selected = cof1;
  112|    265|      }
  113|    265|    }
  114|    265|  }
  115|       |
  116|    265|  if (cof1 >= 0) {
  ------------------
  |  Branch (116:7): [True: 265, False: 0]
  ------------------
  117|    265|    *drc_coefficients_drc =
  118|    265|        &(drc_config->str_p_loc_drc_coefficients_uni_drc[cof1]);
  119|    265|  } 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|    265|  return 0;
  127|    265|}
impd_init_selected_drc_set:
  137|    265|    shape_filter_block* shape_filter_block) {
  138|    265|  WORD32 g, n, c, err = 0;
  139|    265|  WORD32 channel_count = 0;
  140|    265|  WORD32 i;
  141|       |
  142|    265|  ia_drc_instructions_struct* drc_instructions_uni_drc = NULL;
  143|    265|  ia_uni_drc_coeffs_struct* drc_coefficients_uni_drc = NULL;
  144|    265|  WORD32 selected_drc_is_multiband = 0;
  145|    265|  WORD32 drc_instructions_selected = -1;
  146|    265|  WORD32 downmix_instructions_selected = -1;
  147|    265|  WORD32 drc_coefficients_selected = -1;
  148|    265|  p_parametric_drc_params->parametric_drc_instance_count = 0;
  149|       |
  150|    265|  if (drc_config->drc_coefficients_drc_count &&
  ------------------
  |  Branch (150:7): [True: 265, False: 0]
  ------------------
  151|    265|      drc_config->str_p_loc_drc_coefficients_uni_drc->drc_frame_size_present) {
  ------------------
  |  Branch (151:7): [True: 0, False: 265]
  ------------------
  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|    623|  for (n = 0; n < drc_config->drc_instructions_count_plus; n++) {
  ------------------
  |  Branch (158:15): [True: 623, False: 0]
  ------------------
  159|    623|    if (drc_config->str_drc_instruction_str[n].drc_set_id ==
  ------------------
  |  Branch (159:9): [True: 265, False: 358]
  ------------------
  160|    623|        drc_set_id_selected)
  161|    265|      break;
  162|    623|  }
  163|    265|  if (n == drc_config->drc_instructions_count_plus) {
  ------------------
  |  Branch (163:7): [True: 0, False: 265]
  ------------------
  164|      0|    return -1;
  165|      0|  }
  166|    265|  drc_instructions_selected = n;
  167|    265|  drc_instructions_uni_drc =
  168|    265|      &(drc_config->str_drc_instruction_str[drc_instructions_selected]);
  169|       |
  170|    265|  if (downmix_id_selected == ID_FOR_BASE_LAYOUT) {
  ------------------
  |  |  135|    265|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  |  Branch (170:7): [True: 265, False: 0]
  ------------------
  171|    265|    channel_count = drc_config->channel_layout.base_channel_count;
  172|    265|  } 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|    265|  drc_instructions_uni_drc->audio_num_chan = channel_count;
  187|       |
  188|    265|  if (drc_instructions_uni_drc->drc_set_id <= 0) {
  ------------------
  |  Branch (188:7): [True: 0, False: 265]
  ------------------
  189|      0|    drc_coefficients_selected = 0;
  190|    265|  } else {
  191|    265|    err = impd_select_drc_coefficients(drc_config, &drc_coefficients_uni_drc,
  192|    265|                                       &drc_coefficients_selected);
  193|    265|    if (err) return err;
  ------------------
  |  Branch (193:9): [True: 0, False: 265]
  ------------------
  194|    265|  }
  195|       |
  196|    265|  ia_drc_params_struct->sel_drc_array[ia_drc_params_struct->drc_set_counter]
  197|    265|      .drc_instructions_index = drc_instructions_selected;
  198|    265|  ia_drc_params_struct->sel_drc_array[ia_drc_params_struct->drc_set_counter]
  199|    265|      .dwnmix_instructions_index = downmix_instructions_selected;
  200|    265|  ia_drc_params_struct->sel_drc_array[ia_drc_params_struct->drc_set_counter]
  201|    265|      .drc_coeff_idx = drc_coefficients_selected;
  202|       |
  203|    265|  if ((drc_instructions_uni_drc->downmix_id[0] == ID_FOR_ANY_DOWNMIX) ||
  ------------------
  |  |  136|    265|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (203:7): [True: 0, False: 265]
  ------------------
  204|    265|      (drc_instructions_uni_drc->dwnmix_id_count > 1)) {
  ------------------
  |  Branch (204:7): [True: 0, False: 265]
  ------------------
  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|    795|  for (g = 0; g < drc_instructions_uni_drc->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (211:15): [True: 530, False: 265]
  ------------------
  212|    530|    drc_instructions_uni_drc->num_chan_per_ch_group[g] = 0;
  213|  1.28k|    for (c = 0; c < drc_instructions_uni_drc->audio_num_chan; c++) {
  ------------------
  |  Branch (213:17): [True: 758, False: 530]
  ------------------
  214|    758|      if (drc_instructions_uni_drc->channel_group_of_ch[c] == g) {
  ------------------
  |  Branch (214:11): [True: 379, False: 379]
  ------------------
  215|    379|        drc_instructions_uni_drc->num_chan_per_ch_group[g]++;
  216|    379|      }
  217|    758|    }
  218|    530|  }
  219|       |
  220|    265|  if (drc_instructions_uni_drc->drc_set_effect &
  ------------------
  |  Branch (220:7): [True: 0, False: 265]
  ------------------
  221|    265|      (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   72|    265|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                    (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   73|    265|#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|    265|  } else {
  225|    265|    drc_instructions_uni_drc->multiband_audio_sig_count = 0;
  226|    644|    for (c = 0; c < drc_instructions_uni_drc->audio_num_chan; c++) {
  ------------------
  |  Branch (226:17): [True: 379, False: 265]
  ------------------
  227|    379|      g = drc_instructions_uni_drc->channel_group_of_ch[c];
  228|    379|      if (g < 0) {
  ------------------
  |  Branch (228:11): [True: 0, False: 379]
  ------------------
  229|      0|        drc_instructions_uni_drc->multiband_audio_sig_count++;
  230|    379|      } else {
  231|    379|        drc_instructions_uni_drc->multiband_audio_sig_count +=
  232|    379|            drc_instructions_uni_drc->band_count_of_ch_group[g];
  233|    379|      }
  234|    379|    }
  235|    265|  }
  236|       |
  237|    795|  for (g = 0; g < drc_instructions_uni_drc->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (237:15): [True: 530, False: 265]
  ------------------
  238|    530|    if (g == 0) {
  ------------------
  |  Branch (238:9): [True: 265, False: 265]
  ------------------
  239|    265|      drc_instructions_uni_drc->parametric_drc_look_ahead_samples_max = 0;
  240|    265|    }
  241|    530|    if (drc_instructions_uni_drc->ch_group_parametric_drc_flag[g] == 0) {
  ------------------
  |  Branch (241:9): [True: 530, False: 0]
  ------------------
  242|    530|      if (drc_instructions_uni_drc->band_count_of_ch_group[g] > 1) {
  ------------------
  |  Branch (242:11): [True: 0, False: 530]
  ------------------
  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|    530|    } 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|        if (parametric_drc_look_ahead_samples > MAX_SIGNAL_DELAY) {
  ------------------
  |  |   52|      0|#define MAX_SIGNAL_DELAY 4500
  ------------------
  |  Branch (309:13): [True: 0, False: 0]
  ------------------
  310|      0|          parametric_drc_look_ahead_samples = MAX_SIGNAL_DELAY;
  ------------------
  |  |   52|      0|#define MAX_SIGNAL_DELAY 4500
  ------------------
  311|      0|        }
  312|      0|      } else {
  313|      0|        if (str_parametric_drc_instructions->parametric_drc_type ==
  ------------------
  |  Branch (313:13): [True: 0, False: 0]
  ------------------
  314|      0|            PARAM_DRC_TYPE_FF) {
  ------------------
  |  |  181|      0|#define PARAM_DRC_TYPE_FF 0x0
  ------------------
  315|      0|          parametric_drc_look_ahead_samples = (WORD32)(
  316|      0|              10.0f * (FLOAT32)p_parametric_drc_params->sampling_rate * 0.001f);
  317|      0|        } else if (str_parametric_drc_instructions->parametric_drc_type ==
  ------------------
  |  Branch (317:20): [True: 0, False: 0]
  ------------------
  318|      0|                   PARAM_DRC_TYPE_LIM) {
  ------------------
  |  |  185|      0|#define PARAM_DRC_TYPE_LIM 0x1
  ------------------
  319|      0|          parametric_drc_look_ahead_samples = (WORD32)(
  320|      0|              5.0f * (FLOAT32)p_parametric_drc_params->sampling_rate * 0.001f);
  321|      0|        } else {
  322|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  323|      0|        }
  324|      0|      }
  325|      0|      drc_instructions_uni_drc->parametric_drc_look_ahead_samples[g] =
  326|      0|          parametric_drc_look_ahead_samples;
  327|      0|      if (drc_instructions_uni_drc->parametric_drc_look_ahead_samples_max <
  ------------------
  |  Branch (327:11): [True: 0, False: 0]
  ------------------
  328|      0|          drc_instructions_uni_drc->parametric_drc_look_ahead_samples[g]) {
  329|      0|        drc_instructions_uni_drc->parametric_drc_look_ahead_samples_max =
  330|      0|            drc_instructions_uni_drc->parametric_drc_look_ahead_samples[g];
  331|      0|      }
  332|      0|      p_parametric_drc_params->parametric_drc_instance_count += 1;
  333|      0|      selected_drc_is_multiband = 0;
  334|      0|    }
  335|    530|  }
  336|    265|  ia_drc_params_struct->parametric_drc_delay +=
  337|    265|      drc_instructions_uni_drc->parametric_drc_look_ahead_samples_max;
  338|       |
  339|    265|  if (selected_drc_is_multiband == 1) {
  ------------------
  |  Branch (339:7): [True: 0, False: 265]
  ------------------
  340|      0|    ia_drc_params_struct->multiband_sel_drc_idx =
  341|      0|        ia_drc_params_struct->drc_set_counter;
  342|      0|    err = impd_init_all_filter_banks(
  343|      0|        drc_coefficients_uni_drc,
  344|      0|        &(drc_config->str_drc_instruction_str[drc_instructions_selected]),
  345|      0|        ia_filter_banks_struct);
  346|      0|    if (err) return (err);
  ------------------
  |  Branch (346:9): [True: 0, False: 0]
  ------------------
  347|       |
  348|      0|    impd_init_overlap_weight(
  349|      0|        drc_coefficients_uni_drc,
  350|      0|        &(drc_config->str_drc_instruction_str[drc_instructions_selected]),
  351|      0|        ia_drc_params_struct->sub_band_domain_mode, pstr_overlap_params);
  352|       |
  353|    265|  } else {
  354|    265|    ia_gain_modifiers_struct* gain_modifiers =
  355|    265|        drc_config->str_drc_instruction_str->str_gain_modifiers_of_ch_group;
  356|    795|    for (g = 0; g < drc_instructions_uni_drc->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (356:17): [True: 530, False: 265]
  ------------------
  357|    530|      if (gain_modifiers[g].shape_filter_flag == 1) {
  ------------------
  |  Branch (357:11): [True: 0, False: 530]
  ------------------
  358|      0|        if (drc_instructions_uni_drc->band_count_of_ch_group[g] > 1) {
  ------------------
  |  Branch (358:13): [True: 0, False: 0]
  ------------------
  359|      0|          return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  360|      0|        }
  361|      0|        impd_shape_filt_block_init(
  362|      0|            &drc_coefficients_uni_drc->str_shape_filter_block_params
  363|      0|                 [gain_modifiers[g].shape_filter_idx],
  364|      0|            &shape_filter_block[g]);
  365|    530|      } else {
  366|    530|        shape_filter_block[g].shape_flter_block_flag = 0;
  367|    530|      }
  368|    530|    }
  369|    265|  }
  370|       |
  371|    265|  ia_drc_params_struct->drc_set_counter++;
  372|       |
  373|    265|  return (0);
  374|    265|}

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

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

impd_conv_to_linear_domain:
  299|  27.0k|                           FLOAT32* out_param_lin_slope) {
  300|  27.0k|  WORD32 err = 0;
  301|  27.0k|  FLOAT32 loc_db_gain = in_param_db_gain;
  302|  27.0k|  FLOAT32 gain_ratio = 1.0;
  303|  27.0k|  FLOAT32 mapped_db_gain;
  304|  27.0k|  ia_gain_modifiers_struct* pstr_gain_modifiers =
  305|  27.0k|      interp_params_str->pstr_gain_modifiers;
  306|  27.0k|  if (interp_params_str->gain_modification_flag) {
  ------------------
  |  Branch (306:7): [True: 27.0k, False: 0]
  ------------------
  307|  27.0k|    ia_split_drc_characteristic_struct* split_drc_characteristic_source;
  308|       |
  309|  27.0k|    WORD32 slopeIsNegative;
  310|       |
  311|  27.0k|    if (interp_params_str->drc_characteristic_present) {
  ------------------
  |  Branch (311:9): [True: 0, False: 27.0k]
  ------------------
  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|  27.0k|    if (loc_db_gain < 0.0f) {
  ------------------
  |  Branch (367:9): [True: 5.85k, False: 21.1k]
  ------------------
  368|  5.85k|      gain_ratio *= interp_params_str->compress;
  369|  21.1k|    } else {
  370|  21.1k|      gain_ratio *= interp_params_str->boost;
  371|  21.1k|    }
  372|  27.0k|  }
  373|  27.0k|  if (pstr_gain_modifiers->gain_scaling_flag[drc_band] == 1) {
  ------------------
  |  Branch (373:7): [True: 0, False: 27.0k]
  ------------------
  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|  27.0k|  if ((interp_params_str->pstr_ducking_modifiers->ducking_scaling_flag == 1) &&
  ------------------
  |  Branch (380:7): [True: 0, False: 27.0k]
  ------------------
  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|  27.0k|  if (interp_params_str->interpolation_loud_eq == 1) {
  ------------------
  |  Branch (385:7): [True: 0, False: 27.0k]
  ------------------
  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|  27.0k|  } else {
  390|  27.0k|    *out_param_lin_gain =
  391|  27.0k|        (FLOAT32)pow(2.0, (FLOAT64)(gain_ratio * loc_db_gain / 6.0f));
  392|  27.0k|    *out_param_lin_slope = SLOPE_FACTOR_DB_TO_LINEAR * gain_ratio *
  ------------------
  |  |  216|  27.0k|#define SLOPE_FACTOR_DB_TO_LINEAR 0.1151f
  ------------------
  393|  27.0k|                           *out_param_lin_gain * in_param_db_slope;
  394|       |
  395|  27.0k|    if (pstr_gain_modifiers->gain_offset_flag[drc_band] == 1) {
  ------------------
  |  Branch (395:9): [True: 0, False: 27.0k]
  ------------------
  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|  27.0k|    if ((interp_params_str->limiter_peak_target_present == 1) &&
  ------------------
  |  Branch (399:9): [True: 0, False: 27.0k]
  ------------------
  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|  27.0k|  }
  411|  27.0k|  return (0);
  412|  27.0k|}
impd_interpolate_drc_gain:
  417|  13.7k|                                 FLOAT32 slope1, FLOAT32* result) {
  418|  13.7k|  WORD32 err = 0;
  419|  13.7k|  WORD32 n;
  420|  13.7k|  FLOAT32 k1, k2, a, b, c, d;
  421|  13.7k|  FLOAT32 slope_t1;
  422|  13.7k|  FLOAT32 slope_t2;
  423|  13.7k|  FLOAT32 gain_t1;
  424|  13.7k|  FLOAT32 gain_t2;
  425|       |
  426|  13.7k|  WORD32 cubic_interpolation = 1;
  427|  13.7k|  WORD32 node_inser;
  428|  13.7k|  FLOAT32 node_inser_float;
  429|       |
  430|  13.7k|  if (gain_step_tdomain <= 0) {
  ------------------
  |  Branch (430:7): [True: 222, False: 13.5k]
  ------------------
  431|    222|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|    222|#define UNEXPECTED_ERROR 2
  ------------------
  432|    222|  }
  433|       |
  434|  13.5k|  err = impd_conv_to_linear_domain(interp_params_str, drc_band, gain0, slope0,
  435|  13.5k|                                   &gain_t1, &slope_t1);
  436|  13.5k|  if (err) return (err);
  ------------------
  |  Branch (436:7): [True: 0, False: 13.5k]
  ------------------
  437|  13.5k|  err = impd_conv_to_linear_domain(interp_params_str, drc_band, gain1, slope1,
  438|  13.5k|                                   &gain_t2, &slope_t2);
  439|  13.5k|  if (err) return (err);
  ------------------
  |  Branch (439:7): [True: 0, False: 13.5k]
  ------------------
  440|       |
  441|  13.5k|  if (interp_params_str->gain_interpolation_type ==
  ------------------
  |  Branch (441:7): [True: 0, False: 13.5k]
  ------------------
  442|  13.5k|      GAIN_INTERPOLATION_TYPE_SPLINE) {
  ------------------
  |  |   81|  13.5k|#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|  13.5k|  } else {
  523|  13.5k|    a = (gain_t2 - gain_t1) / (FLOAT32)gain_step_tdomain;
  524|  13.5k|    b = gain_t1;
  525|  13.5k|    result[0] = gain_t1;
  526|  13.5k|    result[gain_step_tdomain] = gain_t2;
  527|  23.4M|    for (n = 1; n < gain_step_tdomain; n++) {
  ------------------
  |  Branch (527:17): [True: 23.4M, False: 13.5k]
  ------------------
  528|  23.4M|      FLOAT32 t = (FLOAT32)n;
  529|  23.4M|      result[n] = a * t + b;
  530|  23.4M|    }
  531|  13.5k|  }
  532|  13.5k|  return 0;
  533|  13.5k|}
impd_advance_buf:
  536|  5.04k|                      ia_gain_buffer_struct* pstr_gain_buf) {
  537|  5.04k|  WORD32 n;
  538|  5.04k|  ia_interp_buf_struct* buf_interpolation;
  539|       |
  540|  15.1k|  for (n = 0; n < pstr_gain_buf->buf_interpolation_count; n++) {
  ------------------
  |  Branch (540:15): [True: 10.0k, False: 5.04k]
  ------------------
  541|  10.0k|    buf_interpolation = &(pstr_gain_buf->buf_interpolation[n]);
  542|  10.0k|    buf_interpolation->prev_node = buf_interpolation->str_node;
  543|  10.0k|    buf_interpolation->prev_node.time -= drc_frame_size;
  544|  10.0k|    memmove(buf_interpolation->lpcm_gains,
  545|  10.0k|            buf_interpolation->lpcm_gains + drc_frame_size,
  546|  10.0k|            sizeof(FLOAT32) * (drc_frame_size + MAX_SIGNAL_DELAY));
  ------------------
  |  |   52|  10.0k|#define MAX_SIGNAL_DELAY 4500
  ------------------
  547|  10.0k|  }
  548|  5.04k|  return;
  549|  5.04k|}
impd_concatenate_segments:
  556|  9.87k|                          WORD32 loudness_changed) {
  557|  9.87k|  WORD32 time_prev, duration, n, err = 0;
  558|  9.87k|  FLOAT32 loc_db_gain = 0.0f, prev_db_gain, slope = 0.0f, slope_prev;
  559|       |
  560|  9.87k|  time_prev = buf_interpolation->prev_node.time;
  561|  9.87k|  prev_db_gain = buf_interpolation->prev_node.loc_db_gain;
  562|  9.87k|  slope_prev = buf_interpolation->prev_node.slope;
  563|  23.3k|  for (n = 0; n < str_spline_nodes->num_nodes; n++) {
  ------------------
  |  Branch (563:15): [True: 13.7k, False: 9.65k]
  ------------------
  564|  13.7k|    duration = str_spline_nodes->str_node[n].time - time_prev;
  565|  13.7k|    loc_db_gain = str_spline_nodes->str_node[n].loc_db_gain;
  566|  13.7k|    if (loudness_changed) {
  ------------------
  |  Branch (566:9): [True: 2.22k, False: 11.5k]
  ------------------
  567|  2.22k|      if (sel_drc_index == 0 && is_config_changed == 1) {
  ------------------
  |  Branch (567:11): [True: 2.22k, False: 0]
  |  Branch (567:33): [True: 0, False: 2.22k]
  ------------------
  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.22k|    }
  576|  13.7k|    slope = str_spline_nodes->str_node[n].slope;
  577|       |
  578|  13.7k|    err = impd_interpolate_drc_gain(
  579|  13.7k|        interp_params_str, drc_band, duration, prev_db_gain, loc_db_gain,
  580|  13.7k|        slope_prev, slope, buf_interpolation->lpcm_gains + MAX_SIGNAL_DELAY +
  ------------------
  |  |   52|  13.7k|#define MAX_SIGNAL_DELAY 4500
  ------------------
  581|  13.7k|                              drc_frame_size + time_prev);
  582|  13.7k|    if (err) return (err);
  ------------------
  |  Branch (582:9): [True: 222, False: 13.5k]
  ------------------
  583|       |
  584|  13.5k|    time_prev = str_spline_nodes->str_node[n].time;
  585|  13.5k|    prev_db_gain = loc_db_gain;
  586|  13.5k|    slope_prev = slope;
  587|  13.5k|  }
  588|       |
  589|  9.65k|  buf_interpolation->str_node.loc_db_gain = loc_db_gain;
  590|  9.65k|  buf_interpolation->str_node.slope = slope;
  591|  9.65k|  buf_interpolation->str_node.time = time_prev;
  592|       |
  593|  9.65k|  return (0);
  594|  9.87k|}
impd_get_drc_gain:
  602|  5.04k|                  ia_drc_gain_buffers_struct* drc_gain_buffers) {
  603|  5.04k|  ia_drc_params_struct* ia_drc_params_struct =
  604|  5.04k|      &(p_drc_gain_dec_structs->ia_drc_params_struct);
  605|  5.04k|  WORD32 drc_instructions_index =
  606|  5.04k|      ia_drc_params_struct->sel_drc_array[sel_drc_index].drc_instructions_index;
  607|  5.04k|  if (drc_instructions_index >= 0) {
  ------------------
  |  Branch (607:7): [True: 5.04k, False: 0]
  ------------------
  608|  5.04k|    WORD32 b, g, gain_element_index, err = 0;
  609|  5.04k|    WORD32 parametric_drc_instance_index = 0;
  610|  5.04k|    ia_interp_params_struct interp_params_str = {0};
  611|       |
  612|  5.04k|    ia_drc_instructions_struct* str_drc_instruction_str =
  613|  5.04k|        &(pstr_drc_config->str_drc_instruction_str[drc_instructions_index]);
  614|  5.04k|    WORD32 drc_set_effect = str_drc_instruction_str->drc_set_effect;
  615|  5.04k|    WORD32 num_drc_ch_groups = str_drc_instruction_str->num_drc_ch_groups;
  616|  5.04k|    ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc = NULL;
  617|  5.04k|    WORD32 drc_coeff_idx =
  618|  5.04k|        ia_drc_params_struct->sel_drc_array[sel_drc_index].drc_coeff_idx;
  619|  5.04k|    if (drc_coeff_idx >= 0) {
  ------------------
  |  Branch (619:9): [True: 5.04k, False: 0]
  ------------------
  620|  5.04k|      str_p_loc_drc_coefficients_uni_drc =
  621|  5.04k|          &(pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[drc_coeff_idx]);
  622|  5.04k|      interp_params_str.interpolation_loud_eq = 0;
  623|  5.04k|    } else {
  624|      0|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  625|      0|    }
  626|       |
  627|  5.04k|    interp_params_str.loudness_normalization_gain_db =
  628|  5.04k|        loudness_normalization_gain_db;
  629|  5.04k|    interp_params_str.characteristic_index = characteristic_index;
  630|  5.04k|    interp_params_str.compress = compress;
  631|  5.04k|    interp_params_str.boost = boost;
  632|  5.04k|    interp_params_str.limiter_peak_target_present =
  633|  5.04k|        str_drc_instruction_str->limiter_peak_target_present;
  634|  5.04k|    interp_params_str.limiter_peak_target =
  635|  5.04k|        str_drc_instruction_str->limiter_peak_target;
  636|       |
  637|  5.04k|    if (((drc_set_effect & (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) ==
  ------------------
  |  |   72|  5.04k|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                  if (((drc_set_effect & (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) ==
  ------------------
  |  |   73|  5.04k|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
  |  Branch (637:9): [True: 5.04k, False: 0]
  ------------------
  638|  5.04k|         0) &&
  639|  5.04k|        (drc_set_effect != EFFECT_BIT_FADE) &&
  ------------------
  |  |   71|  5.04k|#define EFFECT_BIT_FADE 0x0200
  ------------------
  |  Branch (639:9): [True: 5.04k, False: 0]
  ------------------
  640|  5.04k|        (drc_set_effect != EFFECT_BIT_CLIPPING)) {
  ------------------
  |  |   70|  5.04k|#define EFFECT_BIT_CLIPPING 0x0100
  ------------------
  |  Branch (640:9): [True: 5.04k, False: 0]
  ------------------
  641|  5.04k|      interp_params_str.gain_modification_flag = 1;
  642|  5.04k|    } else {
  643|      0|      interp_params_str.gain_modification_flag = 0;
  644|      0|    }
  645|  5.04k|    if (drc_set_effect & (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   72|  5.04k|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                  if (drc_set_effect & (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   73|  5.04k|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
  |  Branch (645:9): [True: 0, False: 5.04k]
  ------------------
  646|      0|      interp_params_str.ducking_flag = 1;
  647|  5.04k|    } else {
  648|  5.04k|      interp_params_str.ducking_flag = 0;
  649|  5.04k|    }
  650|  5.04k|    if (drc_set_effect == EFFECT_BIT_CLIPPING) {
  ------------------
  |  |   70|  5.04k|#define EFFECT_BIT_CLIPPING 0x0100
  ------------------
  |  Branch (650:9): [True: 0, False: 5.04k]
  ------------------
  651|      0|      interp_params_str.clipping_flag = 1;
  652|  5.04k|    } else {
  653|  5.04k|      interp_params_str.clipping_flag = 0;
  654|  5.04k|    }
  655|       |
  656|  5.04k|    impd_advance_buf(ia_drc_params_struct->drc_frame_size,
  657|  5.04k|                     &(drc_gain_buffers->pstr_gain_buf[sel_drc_index]));
  658|       |
  659|  5.04k|    gain_element_index = 0;
  660|  14.7k|    for (g = 0; g < num_drc_ch_groups; g++) {
  ------------------
  |  Branch (660:17): [True: 9.87k, False: 4.82k]
  ------------------
  661|  9.87k|      WORD32 gainSet = 0;
  662|  9.87k|      WORD32 num_drc_bands = 0;
  663|  9.87k|      interp_params_str.gain_interpolation_type =
  664|  9.87k|          str_drc_instruction_str->gain_interpolation_type_for_channel_group[g];
  665|  9.87k|      interp_params_str.delta_tmin =
  666|  9.87k|          str_drc_instruction_str->time_delta_min_for_channel_group[g];
  667|  9.87k|      interp_params_str.pstr_ducking_modifiers = &(
  668|  9.87k|          str_drc_instruction_str->str_ducking_modifiers_for_channel_group[g]);
  669|  9.87k|      interp_params_str.pstr_gain_modifiers =
  670|  9.87k|          &(str_drc_instruction_str->str_gain_modifiers_of_ch_group[g]);
  671|  9.87k|      if (str_drc_instruction_str->ch_group_parametric_drc_flag[g] == 0) {
  ------------------
  |  Branch (671:11): [True: 9.87k, False: 0]
  ------------------
  672|  9.87k|        gainSet = str_drc_instruction_str->gain_set_index_for_channel_group[g];
  673|  9.87k|        num_drc_bands = str_drc_instruction_str->band_count_of_ch_group[g];
  674|  19.5k|        for (b = 0; b < num_drc_bands; b++) {
  ------------------
  |  Branch (674:21): [True: 9.87k, False: 9.65k]
  ------------------
  675|  9.87k|          ia_gain_params_struct* gain_params =
  676|  9.87k|              &(str_p_loc_drc_coefficients_uni_drc->gain_set_params[gainSet]
  677|  9.87k|                    .gain_params[b]);
  678|  9.87k|          WORD32 seq = gain_params->gain_seq_idx;
  679|  9.87k|          interp_params_str.drc_characteristic_present =
  680|  9.87k|              gain_params->drc_characteristic_present;
  681|  9.87k|          interp_params_str.drc_source_characteristic_cicp_format =
  682|  9.87k|              gain_params->drc_characteristic_format_is_cicp;
  683|  9.87k|          interp_params_str.source_drc_characteristic =
  684|  9.87k|              gain_params->drc_characteristic;
  685|  9.87k|          interp_params_str.split_source_characteristic_left = &(
  686|  9.87k|              str_p_loc_drc_coefficients_uni_drc->str_split_characteristic_left
  687|  9.87k|                  [gain_params->drc_characteristic_left_index]);
  688|  9.87k|          interp_params_str.split_source_characteristic_right = &(
  689|  9.87k|              str_p_loc_drc_coefficients_uni_drc->str_split_characteristic_right
  690|  9.87k|                  [gain_params->drc_characteristic_right_index]);
  691|  9.87k|          interp_params_str.split_target_characteristic_left = &(
  692|  9.87k|              str_p_loc_drc_coefficients_uni_drc->str_split_characteristic_left
  693|  9.87k|                  [interp_params_str.pstr_gain_modifiers
  694|  9.87k|                       ->target_characteristic_left_index[b]]);
  695|  9.87k|          interp_params_str.split_target_characteristic_right = &(
  696|  9.87k|              str_p_loc_drc_coefficients_uni_drc->str_split_characteristic_right
  697|  9.87k|                  [interp_params_str.pstr_gain_modifiers
  698|  9.87k|                       ->target_characteristic_right_index[b]]);
  699|  9.87k|          err = impd_concatenate_segments(
  700|  9.87k|              ia_drc_params_struct->drc_frame_size, b, &interp_params_str,
  701|  9.87k|              &(pstr_drc_gain->drc_gain_sequence[seq].str_spline_nodes[0]),
  702|  9.87k|              &(drc_gain_buffers->pstr_gain_buf[sel_drc_index]
  703|  9.87k|                    .buf_interpolation[gain_element_index]),
  704|  9.87k|              sel_drc_index, pstr_drc_config->is_config_changed,
  705|  9.87k|              pstr_drc_config->ln_gain_changed);
  706|  9.87k|          if (err) return (err);
  ------------------
  |  Branch (706:15): [True: 222, False: 9.65k]
  ------------------
  707|  9.65k|          gain_element_index++;
  708|  9.65k|        }
  709|  9.87k|      } else {
  710|      0|        if (ia_drc_params_struct->sub_band_domain_mode ==
  ------------------
  |  Branch (710:13): [True: 0, False: 0]
  ------------------
  711|      0|                SUBBAND_DOMAIN_MODE_OFF &&
  ------------------
  |  |  148|      0|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  712|      0|            !(p_drc_gain_dec_structs->parametricdrc_params
  ------------------
  |  Branch (712:13): [True: 0, False: 0]
  ------------------
  713|      0|                  .str_parametric_drc_instance_params
  714|      0|                      [parametric_drc_instance_index]
  715|      0|                  .parametric_drc_type == PARAM_DRC_TYPE_LIM)) {
  ------------------
  |  |  185|      0|#define PARAM_DRC_TYPE_LIM 0x1
  ------------------
  716|      0|          err = impd_parametric_drc_instance_process(
  717|      0|              p_drc_gain_dec_structs->audio_in_out_buf.audio_in_out_buf, NULL,
  718|      0|              NULL, &p_drc_gain_dec_structs->parametricdrc_params,
  719|      0|              &p_drc_gain_dec_structs->parametricdrc_params
  720|      0|                   .str_parametric_drc_instance_params
  721|      0|                       [parametric_drc_instance_index]);
  722|      0|          if (err) return (err);
  ------------------
  |  Branch (722:15): [True: 0, False: 0]
  ------------------
  723|       |
  724|      0|          err = impd_concatenate_segments(
  725|      0|              ia_drc_params_struct->drc_frame_size, 0, &interp_params_str,
  726|      0|              &p_drc_gain_dec_structs->parametricdrc_params
  727|      0|                   .str_parametric_drc_instance_params
  728|      0|                       [parametric_drc_instance_index]
  729|      0|                   .str_spline_nodes,
  730|      0|              &(drc_gain_buffers->pstr_gain_buf[sel_drc_index]
  731|      0|                    .buf_interpolation[gain_element_index]),
  732|      0|              sel_drc_index, pstr_drc_config->is_config_changed,
  733|      0|              pstr_drc_config->ln_gain_changed);
  734|      0|          if (err) return (err);
  ------------------
  |  Branch (734:15): [True: 0, False: 0]
  ------------------
  735|      0|        } else if (ia_drc_params_struct->sub_band_domain_mode ==
  ------------------
  |  Branch (735:20): [True: 0, False: 0]
  ------------------
  736|      0|                       SUBBAND_DOMAIN_MODE_OFF &&
  ------------------
  |  |  148|      0|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  737|      0|                   p_drc_gain_dec_structs->parametricdrc_params
  ------------------
  |  Branch (737:20): [True: 0, False: 0]
  ------------------
  738|      0|                           .str_parametric_drc_instance_params
  739|      0|                               [parametric_drc_instance_index]
  740|      0|                           .parametric_drc_type == PARAM_DRC_TYPE_LIM) {
  ------------------
  |  |  185|      0|#define PARAM_DRC_TYPE_LIM 0x1
  ------------------
  741|      0|          FLOAT32* lpcm_gains = (drc_gain_buffers->pstr_gain_buf[sel_drc_index]
  742|      0|                                     .buf_interpolation[gain_element_index])
  743|      0|                                    .lpcm_gains +
  744|      0|                                MAX_SIGNAL_DELAY;
  ------------------
  |  |   52|      0|#define MAX_SIGNAL_DELAY 4500
  ------------------
  745|      0|          impd_parametric_lim_type_drc_process(
  746|      0|              p_drc_gain_dec_structs->audio_in_out_buf.audio_in_out_buf,
  747|      0|              loudness_normalization_gain_db,
  748|      0|              &p_drc_gain_dec_structs->parametricdrc_params
  749|      0|                   .str_parametric_drc_instance_params
  750|      0|                       [parametric_drc_instance_index]
  751|      0|                   .str_parametric_drc_type_lim_params,
  752|      0|              lpcm_gains);
  753|       |
  754|      0|        } else if (ia_drc_params_struct->sub_band_domain_mode !=
  ------------------
  |  Branch (754:20): [True: 0, False: 0]
  ------------------
  755|      0|                       SUBBAND_DOMAIN_MODE_OFF &&
  ------------------
  |  |  148|      0|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  756|      0|                   !(p_drc_gain_dec_structs->parametricdrc_params
  ------------------
  |  Branch (756:20): [True: 0, False: 0]
  ------------------
  757|      0|                         .str_parametric_drc_instance_params
  758|      0|                             [parametric_drc_instance_index]
  759|      0|                         .parametric_drc_type == PARAM_DRC_TYPE_LIM)) {
  ------------------
  |  |  185|      0|#define PARAM_DRC_TYPE_LIM 0x1
  ------------------
  760|      0|          err = impd_parametric_drc_instance_process(
  761|      0|              NULL, p_drc_gain_dec_structs->audio_in_out_buf.audio_real_buff,
  762|      0|              p_drc_gain_dec_structs->audio_in_out_buf.audio_imag_buff,
  763|      0|              &p_drc_gain_dec_structs->parametricdrc_params,
  764|      0|              &p_drc_gain_dec_structs->parametricdrc_params
  765|      0|                   .str_parametric_drc_instance_params
  766|      0|                       [parametric_drc_instance_index]);
  767|      0|          if (err) return (err);
  ------------------
  |  Branch (767:15): [True: 0, False: 0]
  ------------------
  768|       |
  769|      0|          err = impd_concatenate_segments(
  770|      0|              ia_drc_params_struct->drc_frame_size, 0, &interp_params_str,
  771|      0|              &p_drc_gain_dec_structs->parametricdrc_params
  772|      0|                   .str_parametric_drc_instance_params
  773|      0|                       [parametric_drc_instance_index]
  774|      0|                   .str_spline_nodes,
  775|      0|              &(drc_gain_buffers->pstr_gain_buf[sel_drc_index]
  776|      0|                    .buf_interpolation[gain_element_index]),
  777|      0|                    sel_drc_index, pstr_drc_config->is_config_changed,
  778|      0|                    pstr_drc_config->ln_gain_changed);
  779|      0|          if (err) return (err);
  ------------------
  |  Branch (779:15): [True: 0, False: 0]
  ------------------
  780|       |
  781|      0|        } else {
  782|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  783|      0|        }
  784|      0|        gain_element_index++;
  785|      0|        parametric_drc_instance_index++;
  786|      0|      }
  787|  9.87k|    }
  788|  5.04k|  }
  789|  4.82k|  return (0);
  790|  5.04k|}

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

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

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

impd_signal_peak_level_info:
   38|  2.99k|    WORD32 explicit_peak_information_present[]) {
   39|  2.99k|  WORD32 c, d, i, k, n, base_channel_count, mode;
   40|  2.99k|  WORD32 pre_lim_count;
   41|  2.99k|  WORD32 peak_count = 0;
   42|  2.99k|  WORD32 loudness_info_count = 0;
   43|  2.99k|  ia_loudness_info_struct* loudness_info;
   44|  2.99k|  FLOAT32 sum, max_sum;
   45|  2.99k|  WORD32 drc_set_id_requested = str_drc_instruction_str->drc_set_id;
   46|  2.99k|  WORD32 loudness_drc_set_id_requested;
   47|  2.99k|  WORD32 match_found_flag = 0;
   48|       |
   49|  2.99k|  FLOAT32 signal_peak_level_tmp;
   50|  2.99k|  eq_set_id[0] = 0;
   51|  2.99k|  signal_peak_level[0] = 0.0f;
   52|  2.99k|  explicit_peak_information_present[0] = 0;
   53|       |
   54|  2.99k|  k = 0;
   55|  2.99k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (55:7): [True: 856, False: 2.13k]
  ------------------
   56|    856|    for (k = 0; k < num_compression_eq_count; k++) {
  ------------------
  |  Branch (56:17): [True: 0, False: 856]
  ------------------
   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|    856|  }
   62|  2.99k|  eq_set_id[k] = 0;
   63|  2.99k|  signal_peak_level[k] = 0.0f;
   64|  2.99k|  explicit_peak_information_present[k] = 0;
   65|  2.99k|  k++;
   66|       |
   67|  2.99k|  pre_lim_count = k;
   68|       |
   69|  2.99k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (69:7): [True: 856, False: 2.13k]
  ------------------
   70|    856|    loudness_drc_set_id_requested = 0;
   71|  2.13k|  } else {
   72|  2.13k|    loudness_drc_set_id_requested = drc_set_id_requested;
   73|  2.13k|  }
   74|       |
   75|  2.99k|  if (album_mode == 1) {
  ------------------
  |  Branch (75:7): [True: 0, False: 2.99k]
  ------------------
   76|      0|    mode = 1;
   77|      0|    loudness_info_count = pstr_loudness_info->loudness_info_album_count;
   78|  2.99k|  } else {
   79|  2.99k|    mode = 0;
   80|  2.99k|    loudness_info_count = pstr_loudness_info->loudness_info_count;
   81|  2.99k|  }
   82|       |
   83|  24.3k|  for (n = 0; n < loudness_info_count; n++) {
  ------------------
  |  Branch (83:15): [True: 21.3k, False: 2.99k]
  ------------------
   84|  21.3k|    if (mode == 1) {
  ------------------
  |  Branch (84:9): [True: 0, False: 21.3k]
  ------------------
   85|      0|      loudness_info = &(pstr_loudness_info->str_loudness_info_album[n]);
   86|  21.3k|    } else {
   87|  21.3k|      loudness_info = &(pstr_loudness_info->loudness_info[n]);
   88|  21.3k|    }
   89|  21.3k|    if (loudness_drc_set_id_requested == loudness_info->drc_set_id &&
  ------------------
  |  Branch (89:9): [True: 3.61k, False: 17.7k]
  ------------------
   90|  3.61k|        requested_dwnmix_id == loudness_info->downmix_id) {
  ------------------
  |  Branch (90:9): [True: 2.75k, False: 857]
  ------------------
   91|  2.75k|      if (loudness_info->true_peak_level_present) {
  ------------------
  |  Branch (91:11): [True: 114, False: 2.64k]
  ------------------
   92|    114|        eq_set_id[peak_count] = loudness_info->eq_set_id;
   93|       |
   94|    114|        signal_peak_level[peak_count] = loudness_info->true_peak_level;
   95|    114|        explicit_peak_information_present[peak_count] = 1;
   96|       |
   97|    114|        match_found_flag = 1;
   98|    114|        peak_count++;
   99|    114|      }
  100|  2.75k|      if (match_found_flag == 0) {
  ------------------
  |  Branch (100:11): [True: 1.93k, False: 824]
  ------------------
  101|  1.93k|        if (loudness_info->sample_peak_level_present) {
  ------------------
  |  Branch (101:13): [True: 117, False: 1.81k]
  ------------------
  102|    117|          eq_set_id[peak_count] = loudness_info->eq_set_id;
  103|       |
  104|    117|          signal_peak_level[peak_count] = loudness_info->sample_peak_level;
  105|    117|          explicit_peak_information_present[peak_count] = 1;
  106|       |
  107|    117|          match_found_flag = 1;
  108|    117|          peak_count++;
  109|    117|        }
  110|  1.93k|      }
  111|  2.75k|    }
  112|  21.3k|  }
  113|  2.99k|  if (match_found_flag == 0) {
  ------------------
  |  Branch (113:7): [True: 2.80k, False: 190]
  ------------------
  114|  18.7k|    for (n = 0; n < loudness_info_count; n++) {
  ------------------
  |  Branch (114:17): [True: 15.9k, False: 2.80k]
  ------------------
  115|  15.9k|      if (mode == 1) {
  ------------------
  |  Branch (115:11): [True: 0, False: 15.9k]
  ------------------
  116|      0|        loudness_info = &(pstr_loudness_info->str_loudness_info_album[n]);
  117|  15.9k|      } else {
  118|  15.9k|        loudness_info = &(pstr_loudness_info->loudness_info[n]);
  119|  15.9k|      }
  120|  15.9k|      if (ID_FOR_ANY_DRC == loudness_info->drc_set_id &&
  ------------------
  |  |  138|  15.9k|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  |  Branch (120:11): [True: 557, False: 15.3k]
  ------------------
  121|    557|          requested_dwnmix_id == loudness_info->downmix_id) {
  ------------------
  |  Branch (121:11): [True: 420, False: 137]
  ------------------
  122|    420|        if (loudness_info->true_peak_level_present) {
  ------------------
  |  Branch (122:13): [True: 112, False: 308]
  ------------------
  123|    112|          eq_set_id[peak_count] = loudness_info->eq_set_id;
  124|       |
  125|    112|          signal_peak_level[peak_count] = loudness_info->true_peak_level;
  126|    112|          explicit_peak_information_present[peak_count] = 1;
  127|       |
  128|    112|          match_found_flag = 1;
  129|    112|          peak_count++;
  130|    112|        }
  131|    420|        if (match_found_flag == 0) {
  ------------------
  |  Branch (131:13): [True: 248, False: 172]
  ------------------
  132|    248|          if (loudness_info->sample_peak_level_present) {
  ------------------
  |  Branch (132:15): [True: 42, False: 206]
  ------------------
  133|     42|            eq_set_id[peak_count] = loudness_info->eq_set_id;
  134|       |
  135|     42|            signal_peak_level[peak_count] = loudness_info->sample_peak_level;
  136|     42|            explicit_peak_information_present[peak_count] = 1;
  137|       |
  138|     42|            match_found_flag = 1;
  139|     42|            peak_count++;
  140|     42|          }
  141|    248|        }
  142|    420|      }
  143|  15.9k|    }
  144|  2.80k|  }
  145|  2.99k|  if (match_found_flag == 0) {
  ------------------
  |  Branch (145:7): [True: 2.69k, False: 298]
  ------------------
  146|  5.73k|    for (i = 0; i < str_drc_instruction_str->dwnmix_id_count; i++) {
  ------------------
  |  Branch (146:17): [True: 3.04k, False: 2.69k]
  ------------------
  147|  3.04k|      if (requested_dwnmix_id == str_drc_instruction_str->downmix_id[0] ||
  ------------------
  |  Branch (147:11): [True: 2.63k, False: 413]
  ------------------
  148|  2.67k|          ID_FOR_ANY_DOWNMIX == str_drc_instruction_str->downmix_id[0]) {
  ------------------
  |  |  136|    413|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (148:11): [True: 48, False: 365]
  ------------------
  149|  2.67k|        if (str_drc_instruction_str->limiter_peak_target_present) {
  ------------------
  |  Branch (149:13): [True: 20, False: 2.65k]
  ------------------
  150|     20|          if (str_drc_instruction_str->requires_eq == 1) {
  ------------------
  |  Branch (150:15): [True: 0, False: 20]
  ------------------
  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|     20|          {
  179|     20|            eq_set_id[peak_count] = 0;
  180|     20|            signal_peak_level[peak_count] =
  181|     20|                str_drc_instruction_str->limiter_peak_target;
  182|     20|            explicit_peak_information_present[peak_count] = 1;
  183|     20|            match_found_flag = 1;
  184|     20|            peak_count++;
  185|     20|          }
  186|     20|        }
  187|  2.67k|      }
  188|  3.04k|    }
  189|  2.69k|  }
  190|  2.99k|  if (match_found_flag == 0) {
  ------------------
  |  Branch (190:7): [True: 2.68k, False: 311]
  ------------------
  191|  3.02k|    for (i = 1; i < str_drc_instruction_str->dwnmix_id_count; i++) {
  ------------------
  |  Branch (191:17): [True: 344, False: 2.68k]
  ------------------
  192|    344|      if (requested_dwnmix_id == str_drc_instruction_str->downmix_id[i]) {
  ------------------
  |  Branch (192:11): [True: 145, False: 199]
  ------------------
  193|    145|        if (str_drc_instruction_str->limiter_peak_target_present) {
  ------------------
  |  Branch (193:13): [True: 22, False: 123]
  ------------------
  194|     22|          {
  195|     22|            eq_set_id[peak_count] = 0;
  196|     22|            signal_peak_level[peak_count] =
  197|     22|                str_drc_instruction_str->limiter_peak_target;
  198|     22|            explicit_peak_information_present[peak_count] = 1;
  199|     22|            match_found_flag = 1;
  200|     22|            peak_count++;
  201|     22|          }
  202|     22|        }
  203|    145|      }
  204|    344|    }
  205|  2.68k|  }
  206|  2.99k|  if (match_found_flag == 0) {
  ------------------
  |  Branch (206:7): [True: 2.67k, False: 319]
  ------------------
  207|  2.67k|    if (requested_dwnmix_id != ID_FOR_BASE_LAYOUT) {
  ------------------
  |  |  135|  2.67k|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  |  Branch (207:9): [True: 0, False: 2.67k]
  ------------------
  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|  2.67k|  }
  323|  2.99k|  if (peak_count > 0) {
  ------------------
  |  Branch (323:7): [True: 319, False: 2.67k]
  ------------------
  324|    319|    *peak_info_count = peak_count;
  325|  2.67k|  } else {
  326|  2.67k|    *peak_info_count = pre_lim_count;
  327|  2.67k|  }
  328|  2.99k|  return;
  329|  2.99k|}
impd_extract_loudness_peak_to_average_info:
  335|  2.53k|    FLOAT32* loudness_peak_2_avg_value) {
  336|  2.53k|  WORD32 k;
  337|  2.53k|  WORD32 program_loudness_present = 0;
  338|  2.53k|  WORD32 peak_loudness_present = 0;
  339|  2.53k|  WORD32 match_measure_program_loudness = 0;
  340|  2.53k|  WORD32 match_measure_peak_loudness = 0;
  341|  2.53k|  FLOAT32 program_loudness = 0.0f;
  342|  2.53k|  FLOAT32 peak_loudness = 0.0f;
  343|  2.53k|  ia_loudness_measure_struct* loudness_measure = NULL;
  344|       |
  345|  5.01k|  for (k = 0; k < loudness_info->measurement_count; k++) {
  ------------------
  |  Branch (345:15): [True: 2.47k, False: 2.53k]
  ------------------
  346|  2.47k|    loudness_measure = &(loudness_info->loudness_measure[k]);
  347|  2.47k|    if (loudness_measure->method_def == METHOD_DEFINITION_PROGRAM_LOUDNESS) {
  ------------------
  |  |   28|  2.47k|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  |  Branch (347:9): [True: 531, False: 1.94k]
  ------------------
  348|    531|      if (match_measure_program_loudness <
  ------------------
  |  Branch (348:11): [True: 102, False: 429]
  ------------------
  349|    531|          measurement_method_prog_loudness_tbl[loudness_measure
  350|    531|                                                   ->measurement_system]) {
  351|    102|        program_loudness = loudness_measure->method_val;
  352|    102|        program_loudness_present = 1;
  353|    102|        match_measure_program_loudness =
  354|    102|            measurement_method_prog_loudness_tbl[loudness_measure
  355|    102|                                                     ->measurement_system];
  356|    102|      }
  357|    531|    }
  358|  2.47k|    switch (dyn_range_measurement_type) {
  359|  2.47k|      case SHORT_TERM_LOUDNESS_TO_AVG:
  ------------------
  |  |  106|  2.47k|#define SHORT_TERM_LOUDNESS_TO_AVG 0
  ------------------
  |  Branch (359:7): [True: 2.47k, False: 0]
  ------------------
  360|  2.47k|        if (loudness_measure->method_def ==
  ------------------
  |  Branch (360:13): [True: 168, False: 2.30k]
  ------------------
  361|  2.47k|            METHOD_DEFINITION_SHORT_TERM_LOUDNESS_MAX) {
  ------------------
  |  |   32|  2.47k|#define METHOD_DEFINITION_SHORT_TERM_LOUDNESS_MAX 5
  ------------------
  362|    168|          if (match_measure_peak_loudness <
  ------------------
  |  Branch (362:15): [True: 63, False: 105]
  ------------------
  363|    168|              measurement_method_peak_loudness_tbl[loudness_measure
  364|    168|                                                       ->measurement_system]) {
  365|     63|            peak_loudness = loudness_measure->method_val;
  366|     63|            peak_loudness_present = 1;
  367|     63|            match_measure_peak_loudness =
  368|     63|                measurement_method_peak_loudness_tbl[loudness_measure
  369|     63|                                                         ->measurement_system];
  370|     63|          }
  371|    168|        }
  372|  2.47k|        break;
  373|       |
  374|      0|      case MOMENTARY_LOUDNESS_TO_AVG:
  ------------------
  |  |  107|      0|#define MOMENTARY_LOUDNESS_TO_AVG 1
  ------------------
  |  Branch (374:7): [True: 0, False: 2.47k]
  ------------------
  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: 2.47k]
  ------------------
  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: 2.47k]
  ------------------
  405|      0|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  406|       |
  407|      0|        break;
  408|  2.47k|    }
  409|  2.47k|  }
  410|  2.53k|  if ((program_loudness_present == 1) && (peak_loudness_present == 1)) {
  ------------------
  |  Branch (410:7): [True: 102, False: 2.43k]
  |  Branch (410:42): [True: 43, False: 59]
  ------------------
  411|     43|    *loudness_peak_2_avg_value = peak_loudness - program_loudness;
  412|     43|    *loudness_peak_2_avg_value_present = 1;
  413|     43|  }
  414|  2.53k|  return (0);
  415|  2.53k|}
impd_loudness_peak_to_average_info:
  422|  1.15k|    FLOAT32* loudness_peak_2_avg_value) {
  423|  1.15k|  WORD32 n, err;
  424|  1.15k|  WORD32 drc_set_id = max(0, str_drc_instruction_str->drc_set_id);
  ------------------
  |  |  224|  1.15k|#define max(a, b) ((a) > (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (224:20): [True: 186, False: 969]
  |  |  ------------------
  ------------------
  425|       |
  426|  1.15k|  *loudness_peak_2_avg_value_present = 0;
  427|       |
  428|  1.15k|  if (album_mode == 1) {
  ------------------
  |  Branch (428:7): [True: 0, False: 1.15k]
  ------------------
  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|  1.15k|  if (*loudness_peak_2_avg_value_present == 0) {
  ------------------
  |  Branch (442:7): [True: 1.15k, False: 0]
  ------------------
  443|  21.6k|    for (n = 0; n < pstr_loudness_info->loudness_info_count; n++) {
  ------------------
  |  Branch (443:17): [True: 20.5k, False: 1.15k]
  ------------------
  444|  20.5k|      ia_loudness_info_struct* loudness_info =
  445|  20.5k|          &(pstr_loudness_info->loudness_info[n]);
  446|  20.5k|      if (drc_set_id == loudness_info->drc_set_id) {
  ------------------
  |  Branch (446:11): [True: 3.17k, False: 17.3k]
  ------------------
  447|  3.17k|        if (requested_dwnmix_id == loudness_info->downmix_id) {
  ------------------
  |  Branch (447:13): [True: 2.53k, False: 639]
  ------------------
  448|  2.53k|          err = impd_extract_loudness_peak_to_average_info(
  449|  2.53k|              loudness_info, dyn_range_measurement_type,
  450|  2.53k|              loudness_peak_2_avg_value_present, loudness_peak_2_avg_value);
  451|  2.53k|          if (err) return (err);
  ------------------
  |  Branch (451:15): [True: 0, False: 2.53k]
  ------------------
  452|  2.53k|        }
  453|  3.17k|      }
  454|  20.5k|    }
  455|  1.15k|  }
  456|  1.15k|  return (0);
  457|  1.15k|}
impd_overall_loudness_present:
  460|  11.8k|                                   WORD32* loudness_info_present) {
  461|  11.8k|  WORD32 m;
  462|       |
  463|  11.8k|  *loudness_info_present = 0;
  464|  20.2k|  for (m = 0; m < loudness_info->measurement_count; m++) {
  ------------------
  |  Branch (464:15): [True: 8.40k, False: 11.8k]
  ------------------
  465|  8.40k|    if ((loudness_info->loudness_measure[m].method_def ==
  ------------------
  |  Branch (465:9): [True: 1.15k, False: 7.25k]
  ------------------
  466|  8.40k|         METHOD_DEFINITION_PROGRAM_LOUDNESS) ||
  ------------------
  |  |   28|  8.40k|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  467|  7.25k|        (loudness_info->loudness_measure[m].method_def ==
  ------------------
  |  Branch (467:9): [True: 747, False: 6.50k]
  ------------------
  468|  7.25k|         METHOD_DEFINITION_ANCHOR_LOUDNESS)) {
  ------------------
  |  |   29|  7.25k|#define METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
  469|  1.90k|      *loudness_info_present = 1;
  470|  1.90k|    }
  471|  8.40k|  }
  472|  11.8k|  return;
  473|  11.8k|}
impd_check_loud_info:
  479|  23.2k|                            ia_loudness_info_struct* loudness_info_matching[]) {
  480|  23.2k|  WORD32 n;
  481|  23.2k|  WORD32 loudness_info_present;
  482|   117k|  for (n = 0; n < loudness_info_count; n++) {
  ------------------
  |  Branch (482:15): [True: 94.4k, False: 23.2k]
  ------------------
  483|  94.4k|    if (requested_dwnmix_id == loudness_info[n].downmix_id) {
  ------------------
  |  Branch (483:9): [True: 41.9k, False: 52.4k]
  ------------------
  484|  41.9k|      if (drc_set_id_requested == loudness_info[n].drc_set_id) {
  ------------------
  |  Branch (484:11): [True: 11.8k, False: 30.1k]
  ------------------
  485|  11.8k|        impd_overall_loudness_present(&(loudness_info[n]),
  486|  11.8k|                                      &loudness_info_present);
  487|       |
  488|  11.8k|        if (loudness_info_present) {
  ------------------
  |  Branch (488:13): [True: 1.18k, False: 10.6k]
  ------------------
  489|  1.18k|          loudness_info_matching[*info_count] = &(loudness_info[n]);
  490|  1.18k|          (*info_count)++;
  491|  1.18k|        }
  492|  11.8k|      }
  493|  41.9k|    }
  494|  94.4k|  }
  495|       |
  496|  23.2k|  return (0);
  497|  23.2k|}
impd_check_loud_payload:
  502|  2.99k|    ia_loudness_info_struct* loudness_info_matching[]) {
  503|  2.99k|  WORD32 err = 0;
  504|       |
  505|  2.99k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  506|  2.99k|                             requested_dwnmix_id, drc_set_id_requested,
  507|  2.99k|                             info_count, loudness_info_matching);
  508|  2.99k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (508:7): [True: 0, False: 2.99k]
  |  Branch (508:14): [True: 201, False: 2.79k]
  ------------------
  509|  2.79k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  510|  2.79k|                             ID_FOR_ANY_DOWNMIX, drc_set_id_requested,
  ------------------
  |  |  136|  2.79k|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  511|  2.79k|                             info_count, loudness_info_matching);
  512|  2.79k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (512:7): [True: 0, False: 2.79k]
  |  Branch (512:14): [True: 14, False: 2.77k]
  ------------------
  513|  2.77k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  514|  2.77k|                             requested_dwnmix_id, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  138|  2.77k|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  515|  2.77k|                             loudness_info_matching);
  516|  2.77k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (516:7): [True: 0, False: 2.77k]
  |  Branch (516:14): [True: 118, False: 2.65k]
  ------------------
  517|  2.65k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  518|  2.65k|                             requested_dwnmix_id, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  137|  2.65k|#define ID_FOR_NO_DRC 0x0
  ------------------
  519|  2.65k|                             loudness_info_matching);
  520|  2.65k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (520:7): [True: 0, False: 2.65k]
  |  Branch (520:14): [True: 206, False: 2.45k]
  ------------------
  521|  2.45k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  522|  2.45k|                             ID_FOR_ANY_DOWNMIX, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  136|  2.45k|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
                                           ID_FOR_ANY_DOWNMIX, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  138|  2.45k|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  523|  2.45k|                             loudness_info_matching);
  524|  2.45k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (524:7): [True: 0, False: 2.45k]
  |  Branch (524:14): [True: 43, False: 2.40k]
  ------------------
  525|  2.40k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  526|  2.40k|                             ID_FOR_ANY_DOWNMIX, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  136|  2.40k|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
                                           ID_FOR_ANY_DOWNMIX, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  137|  2.40k|#define ID_FOR_NO_DRC 0x0
  ------------------
  527|  2.40k|                             loudness_info_matching);
  528|  2.40k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (528:7): [True: 0, False: 2.40k]
  |  Branch (528:14): [True: 16, False: 2.39k]
  ------------------
  529|  2.39k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  530|  2.39k|                             ID_FOR_BASE_LAYOUT, drc_set_id_requested,
  ------------------
  |  |  135|  2.39k|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  531|  2.39k|                             info_count, loudness_info_matching);
  532|  2.39k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (532:7): [True: 0, False: 2.39k]
  |  Branch (532:14): [True: 0, False: 2.39k]
  ------------------
  533|  2.39k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  534|  2.39k|                             ID_FOR_BASE_LAYOUT, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  135|  2.39k|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
                                           ID_FOR_BASE_LAYOUT, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  138|  2.39k|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  535|  2.39k|                             loudness_info_matching);
  536|  2.39k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (536:7): [True: 0, False: 2.39k]
  |  Branch (536:14): [True: 0, False: 2.39k]
  ------------------
  537|  2.39k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  538|  2.39k|                             ID_FOR_BASE_LAYOUT, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  135|  2.39k|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
                                           ID_FOR_BASE_LAYOUT, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  137|  2.39k|#define ID_FOR_NO_DRC 0x0
  ------------------
  539|  2.39k|                             loudness_info_matching);
  540|  2.39k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (540:7): [True: 0, False: 2.39k]
  |  Branch (540:14): [True: 0, False: 2.39k]
  ------------------
  541|  2.99k|matchEnd:
  542|  2.99k|  return (err);
  543|  2.39k|}
impd_find_overall_loudness_info:
  550|  2.99k|    ia_loudness_info_struct* loudness_info_matching[]) {
  551|  2.99k|  WORD32 err;
  552|  2.99k|  WORD32 loudness_drc_set_id_requested;
  553|       |
  554|  2.99k|  *info_count = 0;
  555|  2.99k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (555:7): [True: 856, False: 2.13k]
  ------------------
  556|    856|    loudness_drc_set_id_requested = ID_FOR_NO_DRC;
  ------------------
  |  |  137|    856|#define ID_FOR_NO_DRC 0x0
  ------------------
  557|  2.13k|  } else {
  558|  2.13k|    loudness_drc_set_id_requested = drc_set_id_requested;
  559|  2.13k|  }
  560|  2.99k|  if (pstr_drc_sel_proc_params_struct->album_mode == 1) {
  ------------------
  |  Branch (560:7): [True: 0, False: 2.99k]
  ------------------
  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|  2.99k|  if (*info_count == 0) {
  ------------------
  |  Branch (567:7): [True: 2.99k, False: 0]
  ------------------
  568|  2.99k|    err = impd_check_loud_payload(pstr_loudness_info->loudness_info_count,
  569|  2.99k|                                  pstr_loudness_info->loudness_info,
  570|  2.99k|                                  requested_dwnmix_id,
  571|  2.99k|                                  loudness_drc_set_id_requested,
  572|       |
  573|  2.99k|                                  info_count, loudness_info_matching);
  574|  2.99k|    if (err) return (err);
  ------------------
  |  Branch (574:9): [True: 0, False: 2.99k]
  ------------------
  575|  2.99k|  }
  576|  2.99k|  *overall_loudness_info_present = (*info_count > 0);
  577|  2.99k|  return (0);
  578|  2.99k|}
impd_init_loudness_control:
  701|  2.99k|    FLOAT32 loudness_normalization_gain_db[], FLOAT32 loudness[]) {
  702|  2.99k|  WORD32 err, k, info_count = 0, pre_lim_count;
  703|  2.99k|  WORD32 loudness_hp_adjust_present;
  704|  2.99k|  WORD32 overall_loudness_info_present;
  705|  2.99k|  FLOAT32 pre_proc_adjust;
  706|       |
  707|  2.99k|  k = 0;
  708|  2.99k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (708:7): [True: 856, False: 2.13k]
  ------------------
  709|    856|    for (k = 0; k < num_compression_eq_count; k++) {
  ------------------
  |  Branch (709:17): [True: 0, False: 856]
  ------------------
  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|    856|  }
  715|  2.99k|  if (k >= MAX_NUM_COMPRESSION_EQ) return UNEXPECTED_ERROR;
  ------------------
  |  |  125|  2.99k|#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: 2.99k]
  ------------------
  716|  2.99k|  eq_set_id[k] = 0;
  717|       |
  718|  2.99k|  loudness[k] = UNDEFINED_LOUDNESS_VALUE;
  ------------------
  |  |  134|  2.99k|#define UNDEFINED_LOUDNESS_VALUE 1000.0f
  ------------------
  719|       |
  720|  2.99k|  loudness_normalization_gain_db[k] = 0.0f;
  721|  2.99k|  k++;
  722|       |
  723|  2.99k|  pre_lim_count = k;
  724|       |
  725|  2.99k|  if (pstr_drc_sel_proc_params_struct->loudness_normalization_on == 1) {
  ------------------
  |  Branch (725:7): [True: 2.99k, False: 0]
  ------------------
  726|  2.99k|    WORD32 n;
  727|  2.99k|    ia_loudness_info_struct* loudness_info[36];
  728|  2.99k|    err = impd_find_overall_loudness_info(
  729|  2.99k|        pstr_drc_sel_proc_params_struct, pstr_loudness_info,
  730|  2.99k|        requested_dwnmix_id, drc_set_id_requested,
  731|  2.99k|        &overall_loudness_info_present, &info_count, loudness_info);
  732|  2.99k|    if (err) return (err);
  ------------------
  |  Branch (732:9): [True: 0, False: 2.99k]
  ------------------
  733|       |
  734|  2.99k|    if (overall_loudness_info_present == 1) {
  ------------------
  |  Branch (734:9): [True: 598, False: 2.39k]
  ------------------
  735|    598|      WORD32 requested_method_definition = METHOD_DEFINITION_PROGRAM_LOUDNESS;
  ------------------
  |  |   28|    598|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  736|    598|      WORD32 other_method_definition = METHOD_DEFINITION_PROGRAM_LOUDNESS;
  ------------------
  |  |   28|    598|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  737|    598|      WORD32 requested_preprocessing = 0;
  738|       |
  739|    598|      const WORD32* system_bonus = measurement_system_default_tbl;
  740|       |
  741|    598|      WORD32 match_measure;
  742|    598|      FLOAT32 method_val = 0;
  743|       |
  744|    598|      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: 598]
  ------------------
  746|    485|        case USER_METHOD_DEFINITION_PROGRAM_LOUDNESS:
  ------------------
  |  |   85|    485|#define USER_METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  |  Branch (746:9): [True: 485, False: 113]
  ------------------
  747|    485|          requested_method_definition = METHOD_DEFINITION_PROGRAM_LOUDNESS;
  ------------------
  |  |   28|    485|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  748|    485|          other_method_definition = METHOD_DEFINITION_ANCHOR_LOUDNESS;
  ------------------
  |  |   29|    485|#define METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
  749|    485|          break;
  750|    113|        case USER_METHOD_DEFINITION_ANCHOR_LOUDNESS:
  ------------------
  |  |   86|    113|#define USER_METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
  |  Branch (750:9): [True: 113, False: 485]
  ------------------
  751|    113|          requested_method_definition = METHOD_DEFINITION_ANCHOR_LOUDNESS;
  ------------------
  |  |   29|    113|#define METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
  752|    113|          other_method_definition = METHOD_DEFINITION_PROGRAM_LOUDNESS;
  ------------------
  |  |   28|    113|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  753|    113|          break;
  754|       |
  755|      0|        default:
  ------------------
  |  Branch (755:9): [True: 0, False: 598]
  ------------------
  756|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  757|      0|          break;
  758|    598|      }
  759|       |
  760|    598|      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: 598]
  ------------------
  762|    560|        case USER_MEASUREMENT_SYSTEM_BS_1770_4:
  ------------------
  |  |   89|    560|#define USER_MEASUREMENT_SYSTEM_BS_1770_4 1
  ------------------
  |  Branch (762:9): [True: 560, False: 38]
  ------------------
  763|    560|          system_bonus = measurement_system_bs1770_3_tbl;
  764|    560|          break;
  765|      0|        case USER_MEASUREMENT_SYSTEM_USER:
  ------------------
  |  |   91|      0|#define USER_MEASUREMENT_SYSTEM_USER 2
  ------------------
  |  Branch (765:9): [True: 0, False: 598]
  ------------------
  766|      0|          system_bonus = measurement_system_user_tbl;
  767|      0|          break;
  768|     38|        case USER_MEASUREMENT_SYSTEM_EXPERT_PANEL:
  ------------------
  |  |   92|     38|#define USER_MEASUREMENT_SYSTEM_EXPERT_PANEL 3
  ------------------
  |  Branch (768:9): [True: 38, False: 560]
  ------------------
  769|     38|          system_bonus = measurement_system_expert_tbl;
  770|     38|          break;
  771|      0|        case USER_MEASUREMENT_SYSTEM_RESERVED_A:
  ------------------
  |  |   93|      0|#define USER_MEASUREMENT_SYSTEM_RESERVED_A 4
  ------------------
  |  Branch (771:9): [True: 0, False: 598]
  ------------------
  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: 598]
  ------------------
  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: 598]
  ------------------
  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: 598]
  ------------------
  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: 598]
  ------------------
  784|      0|          system_bonus = measurement_system_rms_e_tbl;
  785|      0|          break;
  786|       |
  787|      0|        default:
  ------------------
  |  Branch (787:9): [True: 0, False: 598]
  ------------------
  788|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  789|      0|          break;
  790|    598|      }
  791|       |
  792|    598|      switch (pstr_drc_sel_proc_params_struct->loudness_measurement_pre_proc) {
  793|    598|        case USER_LOUDNESS_PREPROCESSING_DEFAULT:
  ------------------
  |  |   99|    598|#define USER_LOUDNESS_PREPROCESSING_DEFAULT 0
  ------------------
  |  Branch (793:9): [True: 598, False: 0]
  ------------------
  794|    598|        case USER_LOUDNESS_PREPROCESSING_OFF:
  ------------------
  |  |  100|    598|#define USER_LOUDNESS_PREPROCESSING_OFF 1
  ------------------
  |  Branch (794:9): [True: 0, False: 598]
  ------------------
  795|    598|          requested_preprocessing = 0;
  796|    598|          break;
  797|      0|        case USER_LOUDNESS_PREPROCESSING_HIGHPASS:
  ------------------
  |  |  101|      0|#define USER_LOUDNESS_PREPROCESSING_HIGHPASS 2
  ------------------
  |  Branch (797:9): [True: 0, False: 598]
  ------------------
  798|      0|          requested_preprocessing = 1;
  799|      0|          break;
  800|       |
  801|      0|        default:
  ------------------
  |  Branch (801:9): [True: 0, False: 598]
  ------------------
  802|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  803|      0|          break;
  804|    598|      }
  805|       |
  806|  1.78k|      for (k = 0; k < info_count; k++) {
  ------------------
  |  Branch (806:19): [True: 1.18k, False: 598]
  ------------------
  807|  1.18k|        match_measure = -1;
  808|  7.30k|        for (n = 0; n < loudness_info[k]->measurement_count; n++) {
  ------------------
  |  Branch (808:21): [True: 6.11k, False: 1.18k]
  ------------------
  809|  6.11k|          ia_loudness_measure_struct* loudness_measure =
  810|  6.11k|              &(loudness_info[k]->loudness_measure[n]);
  811|  6.11k|          if (match_measure <
  ------------------
  |  Branch (811:15): [True: 4.26k, False: 1.84k]
  ------------------
  812|  6.11k|                  system_bonus[loudness_measure->measurement_system] &&
  813|  4.26k|              requested_method_definition == loudness_measure->method_def) {
  ------------------
  |  Branch (813:15): [True: 846, False: 3.42k]
  ------------------
  814|    846|            method_val = loudness_measure->method_val;
  815|    846|            match_measure = system_bonus[loudness_measure->measurement_system];
  816|    846|          }
  817|  6.11k|        }
  818|  1.18k|        if (match_measure == -1) {
  ------------------
  |  Branch (818:13): [True: 447, False: 738]
  ------------------
  819|  2.50k|          for (n = 0; n < loudness_info[k]->measurement_count; n++) {
  ------------------
  |  Branch (819:23): [True: 2.06k, False: 447]
  ------------------
  820|  2.06k|            ia_loudness_measure_struct* loudness_measure =
  821|  2.06k|                &(loudness_info[k]->loudness_measure[n]);
  822|  2.06k|            if (match_measure <
  ------------------
  |  Branch (822:17): [True: 1.49k, False: 566]
  ------------------
  823|  2.06k|                    system_bonus[loudness_measure->measurement_system] &&
  824|  1.49k|                other_method_definition == loudness_measure->method_def) {
  ------------------
  |  Branch (824:17): [True: 467, False: 1.02k]
  ------------------
  825|    467|              method_val = loudness_measure->method_val;
  826|    467|              match_measure =
  827|    467|                  system_bonus[loudness_measure->measurement_system];
  828|    467|            }
  829|  2.06k|          }
  830|    447|        }
  831|       |
  832|  1.18k|        if (requested_preprocessing == 1) {
  ------------------
  |  Branch (832:13): [True: 0, False: 1.18k]
  ------------------
  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.18k|        eq_set_id[k] = 0;
  848|       |
  849|  1.18k|        loudness_normalization_gain_db[k] =
  850|  1.18k|            pstr_drc_sel_proc_params_struct->target_loudness - method_val;
  851|  1.18k|        loudness[k] = method_val;
  852|  1.18k|      }
  853|    598|    }
  854|  2.99k|  }
  855|  2.99k|  if (info_count > 0) {
  ------------------
  |  Branch (855:7): [True: 598, False: 2.39k]
  ------------------
  856|    598|    *loudness_info_count = info_count;
  857|  2.39k|  } else {
  858|  2.39k|    *loudness_info_count = pre_lim_count;
  859|  2.39k|  }
  860|       |
  861|  2.99k|  return (0);
  862|  2.99k|}
impd_mixing_level_info:
  870|  3.56k|    WORD32 eq_set_id_requested, FLOAT32* mixing_level) {
  871|  3.56k|  WORD32 n, k, info_count;
  872|  3.56k|  WORD32 album_mode = pstr_drc_sel_proc_params_struct->album_mode;
  873|  3.56k|  WORD32 loudness_drc_set_id_requested;
  874|  3.56k|  ia_loudness_info_struct* loudness_info;
  875|       |
  876|  3.56k|  *mixing_level = MIXING_LEVEL_DEFAULT;
  ------------------
  |  |  864|  3.56k|#define MIXING_LEVEL_DEFAULT 85.0f
  ------------------
  877|  3.56k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (877:7): [True: 982, False: 2.58k]
  ------------------
  878|    982|    loudness_drc_set_id_requested = 0;
  879|  2.58k|  } else {
  880|  2.58k|    loudness_drc_set_id_requested = drc_set_id_requested;
  881|  2.58k|  }
  882|  3.56k|  if (album_mode == 1) {
  ------------------
  |  Branch (882:7): [True: 0, False: 3.56k]
  ------------------
  883|      0|    info_count = pstr_loudness_info->loudness_info_album_count;
  884|      0|    loudness_info = pstr_loudness_info->str_loudness_info_album;
  885|  3.56k|  } else {
  886|  3.56k|    info_count = pstr_loudness_info->loudness_info_count;
  887|  3.56k|    loudness_info = pstr_loudness_info->loudness_info;
  888|  3.56k|  }
  889|  42.9k|  for (n = 0; n < info_count; n++) {
  ------------------
  |  Branch (889:15): [True: 39.4k, False: 3.56k]
  ------------------
  890|  39.4k|    if ((requested_dwnmix_id == loudness_info[n].downmix_id) ||
  ------------------
  |  Branch (890:9): [True: 25.7k, False: 13.7k]
  ------------------
  891|  26.3k|        (ID_FOR_ANY_DOWNMIX == loudness_info[n].downmix_id)) {
  ------------------
  |  |  136|  13.7k|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (891:9): [True: 651, False: 13.0k]
  ------------------
  892|  26.3k|      if (loudness_drc_set_id_requested == loudness_info[n].drc_set_id) {
  ------------------
  |  Branch (892:11): [True: 5.47k, False: 20.8k]
  ------------------
  893|  5.47k|        if (eq_set_id_requested == loudness_info[n].eq_set_id) {
  ------------------
  |  Branch (893:13): [True: 5.44k, False: 34]
  ------------------
  894|  11.0k|          for (k = 0; k < loudness_info[n].measurement_count; k++) {
  ------------------
  |  Branch (894:23): [True: 5.65k, False: 5.36k]
  ------------------
  895|  5.65k|            if (loudness_info[n].loudness_measure[k].method_def ==
  ------------------
  |  Branch (895:17): [True: 77, False: 5.57k]
  ------------------
  896|  5.65k|                METHOD_DEFINITION_MIXING_LEVEL) {
  ------------------
  |  |   34|  5.65k|#define METHOD_DEFINITION_MIXING_LEVEL 7
  ------------------
  897|     77|              *mixing_level = loudness_info[n].loudness_measure[k].method_val;
  898|     77|              break;
  899|     77|            }
  900|  5.65k|          }
  901|  5.44k|        }
  902|  5.47k|      }
  903|  26.3k|    }
  904|  39.4k|  }
  905|  3.56k|  return (0);
  906|  3.56k|}

impd_process_time_domain:
   77|  20.6k|IA_ERRORCODE impd_process_time_domain(ia_drc_api_struct *p_obj_drc) {
   78|  20.6k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   36|  20.6k|#define IA_NO_ERROR 0x00000000
  ------------------
   79|  20.6k|  WORD32 i, j;
   80|  20.6k|  FLOAT32 *audio_buff[10];
   81|  20.6k|  WORD32 last_frame = 0;
   82|  20.6k|  WORD32 num_sample_to_process;
   83|       |
   84|  20.6k|  if (p_obj_drc->p_state->ui_in_bytes <= 0) {
  ------------------
  |  Branch (84:7): [True: 486, False: 20.1k]
  ------------------
   85|    486|    p_obj_drc->p_state->ui_out_bytes = 0;
   86|    486|    return IA_NO_ERROR;
  ------------------
  |  |   36|    486|#define IA_NO_ERROR 0x00000000
  ------------------
   87|    486|  }
   88|       |
   89|  20.1k|  p_obj_drc->str_payload.pstr_loudness_info->loudness_info_album_count = 0;
   90|  20.1k|  p_obj_drc->str_payload.pstr_loudness_info->loudness_info_count = 0;
   91|  20.1k|  p_obj_drc->str_payload.pstr_loudness_info->loudness_info_set_ext_present = 0;
   92|  20.1k|  p_obj_drc->str_payload.pstr_drc_config->is_config_changed =
   93|  20.1k|      p_obj_drc->str_config.is_config_changed;
   94|       |
   95|  20.1k|  if (p_obj_drc->str_config.is_config_changed == 1) {
  ------------------
  |  Branch (95:7): [True: 0, False: 20.1k]
  ------------------
   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.1k|  if (p_obj_drc->frame_count == 0) {
  ------------------
  |  Branch (125:7): [True: 1.07k, False: 19.0k]
  ------------------
  126|  1.07k|    p_obj_drc->str_config.ln_dbgain_prev =
  127|  1.07k|        (WORD32)p_obj_drc->str_payload.pstr_drc_sel_proc_output
  128|  1.07k|            ->loudness_normalization_gain_db;
  129|  1.07k|  }
  130|       |
  131|  20.1k|  if (!p_obj_drc->str_payload.pstr_drc_config->ln_gain_changed) {
  ------------------
  |  Branch (131:7): [True: 18.8k, False: 1.30k]
  ------------------
  132|  18.8k|    if (p_obj_drc->str_payload.pstr_drc_sel_proc_output
  ------------------
  |  Branch (132:9): [True: 35, False: 18.8k]
  ------------------
  133|  18.8k|            ->loudness_normalization_gain_db !=
  134|  18.8k|        p_obj_drc->str_config.ln_dbgain_prev) {
  135|     35|      p_obj_drc->str_payload.pstr_drc_config->ln_gain_changed = 1;
  136|     35|    }
  137|  18.8k|  }
  138|       |
  139|  20.1k|  err_code = impd_process_drc_bitstream_dec_gain(
  140|  20.1k|      p_obj_drc->str_payload.pstr_bitstream_dec, p_obj_drc->pstr_bit_buf,
  141|  20.1k|      p_obj_drc->str_payload.pstr_drc_config,
  142|  20.1k|      p_obj_drc->str_payload.pstr_drc_gain,
  143|  20.1k|      p_obj_drc->str_bit_handler.it_bit_buf,
  144|  20.1k|      p_obj_drc->str_bit_handler.num_bytes_bs,
  145|  20.1k|      p_obj_drc->str_bit_handler.num_bits_offset_bs,
  146|  20.1k|      &p_obj_drc->str_bit_handler.num_bits_read_bs);
  147|       |
  148|  20.1k|  if (err_code > PROC_COMPLETE) return -1;
  ------------------
  |  |  127|  20.1k|#define PROC_COMPLETE 1
  ------------------
  |  Branch (148:7): [True: 1.79k, False: 18.3k]
  ------------------
  149|       |
  150|  18.3k|  p_obj_drc->str_bit_handler.num_bytes_read_bs =
  151|  18.3k|      (p_obj_drc->str_bit_handler.num_bits_read_bs >> 3);
  152|  18.3k|  p_obj_drc->str_bit_handler.num_bits_offset_bs =
  153|  18.3k|      (p_obj_drc->str_bit_handler.num_bits_read_bs & 7);
  154|  18.3k|  p_obj_drc->str_bit_handler.byte_index_bs +=
  155|  18.3k|      p_obj_drc->str_bit_handler.num_bytes_read_bs;
  156|       |
  157|  18.3k|  if (p_obj_drc->str_bit_handler.num_bits_offset_bs != 0) {
  ------------------
  |  Branch (157:7): [True: 12.7k, False: 5.57k]
  ------------------
  158|  12.7k|    p_obj_drc->str_bit_handler.num_bits_read_bs =
  159|  12.7k|        p_obj_drc->str_bit_handler.num_bits_read_bs + 8 -
  160|  12.7k|        p_obj_drc->str_bit_handler.num_bits_offset_bs;
  161|  12.7k|    p_obj_drc->str_bit_handler.num_bytes_read_bs =
  162|  12.7k|        p_obj_drc->str_bit_handler.num_bytes_read_bs + 1;
  163|  12.7k|    p_obj_drc->str_bit_handler.num_bits_offset_bs = 0;
  164|  12.7k|    p_obj_drc->str_bit_handler.byte_index_bs =
  165|  12.7k|        p_obj_drc->str_bit_handler.byte_index_bs + 1;
  166|  12.7k|  }
  167|       |
  168|  18.3k|  num_sample_to_process =
  169|  18.3k|      (p_obj_drc->p_state->ui_in_bytes / p_obj_drc->str_config.num_ch_in /
  170|  18.3k|       (p_obj_drc->str_config.pcm_size >> 3));
  171|       |
  172|  18.3k|  p_obj_drc->str_config.frame_size = num_sample_to_process;
  173|       |
  174|  18.3k|  if (num_sample_to_process < p_obj_drc->str_config.frame_size) last_frame = 1;
  ------------------
  |  Branch (174:7): [True: 0, False: 18.3k]
  ------------------
  175|       |
  176|  18.3k|  if (p_obj_drc->str_config.pcm_size == 16) {
  ------------------
  |  Branch (176:7): [True: 18.3k, False: 0]
  ------------------
  177|  18.3k|    FLOAT32 *scratch_buffer = (FLOAT32 *)p_obj_drc->pp_mem[1];
  178|  18.3k|    WORD16 *input_buffer16 = (WORD16 *)p_obj_drc->pp_mem[2];
  179|  50.5k|    for (i = 0; i < p_obj_drc->str_config.num_ch_in; i++) {
  ------------------
  |  Branch (179:17): [True: 32.1k, False: 18.3k]
  ------------------
  180|  32.1k|      audio_buff[i] =
  181|  32.1k|          scratch_buffer + i * (p_obj_drc->str_config.frame_size + 32);
  182|       |
  183|  62.8M|      for (j = 0; j < num_sample_to_process; j++) {
  ------------------
  |  Branch (183:19): [True: 62.7M, False: 32.1k]
  ------------------
  184|  62.7M|        audio_buff[i][j] =
  185|  62.7M|            ((FLOAT32)input_buffer16[j * p_obj_drc->str_config.num_ch_in + i]) /
  186|  62.7M|            32767.0f;
  187|  62.7M|      }
  188|  32.1k|    }
  189|  18.3k|  } 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.3k|  err_code = impd_drc_process_time_domain(
  224|  18.3k|      p_obj_drc->str_payload.pstr_gain_dec[0],
  225|  18.3k|      p_obj_drc->str_payload.pstr_drc_config,
  226|  18.3k|      p_obj_drc->str_payload.pstr_drc_gain, audio_buff,
  227|  18.3k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output
  228|  18.3k|          ->loudness_normalization_gain_db,
  229|  18.3k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output->boost,
  230|  18.3k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output->compress,
  231|  18.3k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output
  232|  18.3k|          ->drc_characteristic_target);
  233|       |
  234|  18.3k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  18.3k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (234:7): [True: 222, False: 18.1k]
  ------------------
  235|       |
  236|  18.1k|  if (p_obj_drc->str_payload.pstr_drc_sel_proc_output->downmix_matrix_present !=
  ------------------
  |  Branch (236:7): [True: 0, False: 18.1k]
  ------------------
  237|  18.1k|      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|  18.1k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  18.1k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (241:7): [True: 0, False: 18.1k]
  ------------------
  242|       |
  243|  18.1k|  err_code = impd_drc_process_time_domain(
  244|  18.1k|      p_obj_drc->str_payload.pstr_gain_dec[1],
  245|  18.1k|      p_obj_drc->str_payload.pstr_drc_config,
  246|  18.1k|      p_obj_drc->str_payload.pstr_drc_gain, audio_buff,
  247|  18.1k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output
  248|  18.1k|          ->loudness_normalization_gain_db,
  249|  18.1k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output->boost,
  250|  18.1k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output->compress,
  251|  18.1k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output
  252|  18.1k|          ->drc_characteristic_target);
  253|       |
  254|  18.1k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  18.1k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (254:7): [True: 0, False: 18.1k]
  ------------------
  255|       |
  256|  18.1k|  if (p_obj_drc->str_payload.pstr_drc_config->apply_drc == 0 ||
  ------------------
  |  Branch (256:7): [True: 9.07k, False: 9.06k]
  ------------------
  257|  9.06k|      p_obj_drc->str_payload.pstr_drc_config->is_config_changed == 0 ||
  ------------------
  |  Branch (257:7): [True: 9.06k, False: 0]
  ------------------
  258|  18.1k|      p_obj_drc->str_payload.pstr_drc_config->ln_gain_changed == 0) {
  ------------------
  |  Branch (258:7): [True: 0, False: 0]
  ------------------
  259|  18.1k|    if (p_obj_drc->str_payload.pstr_drc_sel_proc_output
  ------------------
  |  Branch (259:9): [True: 1.21k, False: 16.9k]
  ------------------
  260|  18.1k|          ->loudness_normalization_gain_db != 0.0f) {
  261|  1.21k|      FLOAT32 gain_value =
  262|  1.21k|          (FLOAT32)pow(10.0, p_obj_drc->str_payload.pstr_drc_sel_proc_output
  263|  1.21k|                                   ->loudness_normalization_gain_db /
  264|  1.21k|                               20.0);
  265|  3.64k|      for (i = 0; i < p_obj_drc->str_config.num_ch_out; i++) {
  ------------------
  |  Branch (265:19): [True: 2.42k, False: 1.21k]
  ------------------
  266|  2.49M|        for (j = 0; j < p_obj_drc->str_config.frame_size; j++) {
  ------------------
  |  Branch (266:21): [True: 2.49M, False: 2.42k]
  ------------------
  267|  2.49M|          audio_buff[i][j] *= gain_value;
  268|  2.49M|        }
  269|  2.42k|      }
  270|  1.21k|    }
  271|  18.1k|  }
  272|       |
  273|  18.1k|  if (p_obj_drc->str_config.peak_limiter) {
  ------------------
  |  Branch (273:7): [True: 0, False: 18.1k]
  ------------------
  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|  18.1k|  if (p_obj_drc->str_config.pcm_size == 16) {
  ------------------
  |  Branch (293:7): [True: 18.1k, False: 0]
  ------------------
  294|  18.1k|    WORD16 *output_buffer16 = (WORD16 *)p_obj_drc->pp_mem[3];
  295|  49.9k|    for (i = 0; i < p_obj_drc->str_config.num_ch_out; i++) {
  ------------------
  |  Branch (295:17): [True: 31.7k, False: 18.1k]
  ------------------
  296|  62.2M|      for (j = 0; j < p_obj_drc->str_config.frame_size; j++) {
  ------------------
  |  Branch (296:19): [True: 62.1M, False: 31.7k]
  ------------------
  297|  62.1M|        if (audio_buff[i][j] < -1.0f)
  ------------------
  |  Branch (297:13): [True: 12.9k, False: 62.1M]
  ------------------
  298|  12.9k|          output_buffer16[j * p_obj_drc->str_config.num_ch_out + i] = -32767;
  299|       |
  300|  62.1M|        else if (audio_buff[i][j] > 1.0f)
  ------------------
  |  Branch (300:18): [True: 12.6k, False: 62.1M]
  ------------------
  301|  12.6k|          output_buffer16[j * p_obj_drc->str_config.num_ch_out + i] = 32767;
  302|       |
  303|  62.1M|        else
  304|  62.1M|          output_buffer16[j * p_obj_drc->str_config.num_ch_out + i] =
  305|  62.1M|              (WORD16)(audio_buff[i][j] * 32767.0f);
  306|  62.1M|      }
  307|  31.7k|    }
  308|  18.1k|  } 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|  18.1k|  p_obj_drc->p_state->ui_out_bytes =
  341|  18.1k|      p_obj_drc->str_config.num_ch_out *
  342|  18.1k|      (p_obj_drc->p_state->ui_in_bytes / p_obj_drc->str_config.num_ch_in);
  343|       |
  344|  18.1k|  if (p_obj_drc->p_state->delay_in_output != 0 && p_obj_drc->p_state->delay_in_output <=
  ------------------
  |  Branch (344:7): [True: 0, False: 18.1k]
  |  Branch (344:51): [True: 0, False: 0]
  ------------------
  345|      0|    p_obj_drc->str_config.frame_size) {
  346|      0|    FLOAT32 *output_buffer = (FLOAT32 *)p_obj_drc->pp_mem[3];
  347|      0|    WORD16 *output_buffer16 = (WORD16 *)p_obj_drc->pp_mem[3];
  348|      0|    p_obj_drc->p_state->ui_out_bytes = p_obj_drc->str_config.num_ch_out *
  349|      0|                                       (p_obj_drc->str_config.frame_size -
  350|      0|                                        p_obj_drc->p_state->delay_in_output) *
  351|      0|                                       (p_obj_drc->str_config.pcm_size >> 3);
  352|      0|    if (p_obj_drc->str_config.pcm_size == 16)
  ------------------
  |  Branch (352:9): [True: 0, False: 0]
  ------------------
  353|      0|      memcpy(output_buffer16,
  354|      0|             (output_buffer16 + (p_obj_drc->p_state->delay_in_output *
  355|      0|                                 p_obj_drc->str_config.num_ch_out)),
  356|      0|             p_obj_drc->p_state->ui_out_bytes);
  357|      0|    else
  358|      0|      memcpy(output_buffer,
  359|      0|             (output_buffer + (p_obj_drc->p_state->delay_in_output *
  360|      0|                               p_obj_drc->str_config.num_ch_out)),
  361|      0|             p_obj_drc->p_state->ui_out_bytes);
  362|       |
  363|      0|    p_obj_drc->p_state->delay_adjust_samples =
  364|      0|        p_obj_drc->p_state->delay_in_output;
  365|      0|    p_obj_drc->p_state->delay_in_output = 0;
  366|      0|  }
  367|  18.1k|  if (last_frame == 1) {
  ------------------
  |  Branch (367:7): [True: 0, False: 18.1k]
  ------------------
  368|      0|    if ((num_sample_to_process + p_obj_drc->p_state->delay_adjust_samples) <=
  ------------------
  |  Branch (368:9): [True: 0, False: 0]
  ------------------
  369|      0|        p_obj_drc->str_config.frame_size)
  370|      0|      p_obj_drc->p_state->ui_out_bytes =
  371|      0|          (num_sample_to_process + p_obj_drc->p_state->delay_adjust_samples) *
  372|      0|          p_obj_drc->str_config.num_ch_out *
  373|      0|          (p_obj_drc->str_config.pcm_size >> 3);
  374|      0|    else
  375|      0|      p_obj_drc->p_state->ui_out_bytes = (p_obj_drc->str_config.frame_size) *
  376|      0|                                         p_obj_drc->str_config.num_ch_out *
  377|      0|                                         (p_obj_drc->str_config.pcm_size >> 3);
  378|      0|  }
  379|  18.1k|  p_obj_drc->frame_count++;
  380|  18.1k|  return err_code;
  381|  18.1k|}

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

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

impd_drc_uni_selction_proc_init:
   35|  2.10k|    ia_drc_interface_struct* pstr_drc_interface, WORD32 subband_domain_mode) {
   36|  2.10k|  WORD32 err = 0;
   37|       |
   38|  2.10k|  if (pstr_drc_uni_sel_proc == NULL) {
  ------------------
  |  Branch (38:7): [True: 0, False: 2.10k]
  ------------------
   39|      0|    return 1;
   40|      0|  }
   41|       |
   42|  2.10k|  if (pstr_drc_uni_sel_proc->first_frame == 1) {
  ------------------
  |  Branch (42:7): [True: 2.10k, False: 0]
  ------------------
   43|  2.10k|    err = impd_drc_sel_proc_init_dflt(pstr_drc_uni_sel_proc);
   44|  2.10k|    if (err) return (err);
  ------------------
  |  Branch (44:9): [True: 0, False: 2.10k]
  ------------------
   45|  2.10k|  }
   46|       |
   47|  2.10k|  err = impd_drc_sel_proc_init_sel_proc_params(pstr_drc_uni_sel_proc,
   48|  2.10k|                                               pstr_drc_sel_proc_params_struct);
   49|  2.10k|  if (err) return (err);
  ------------------
  |  Branch (49:7): [True: 0, False: 2.10k]
  ------------------
   50|  2.10k|  {
   51|  2.10k|    WORD32 i;
   52|  2.10k|    pstr_drc_uni_sel_proc->drc_set_id_valid_flag[0] = 1;
   53|  75.7k|    for (i = 1; i < DRC_INSTRUCTIONS_COUNT_MAX; i++) {
  ------------------
  |  |   43|  75.7k|#define DRC_INSTRUCTIONS_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|  75.7k|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
  |  Branch (53:17): [True: 73.6k, False: 2.10k]
  ------------------
   54|  73.6k|      pstr_drc_uni_sel_proc->drc_set_id_valid_flag[i] = 0;
   55|  73.6k|    }
   56|       |
   57|  2.10k|    pstr_drc_uni_sel_proc->eq_set_id_valid_flag[0] = 1;
   58|  16.8k|    for (i = 1; i < EQ_INSTRUCTIONS_COUNT_MAX; i++) {
  ------------------
  |  |  112|  16.8k|#define EQ_INSTRUCTIONS_COUNT_MAX 8
  ------------------
  |  Branch (58:17): [True: 14.7k, False: 2.10k]
  ------------------
   59|  14.7k|      pstr_drc_uni_sel_proc->eq_set_id_valid_flag[i] = 0;
   60|  14.7k|    }
   61|  2.10k|  }
   62|  2.10k|  impd_drc_sel_proc_init_interface_params(pstr_drc_uni_sel_proc,
   63|  2.10k|                                          pstr_drc_interface);
   64|       |
   65|  2.10k|  pstr_drc_uni_sel_proc->subband_domain_mode = subband_domain_mode;
   66|       |
   67|  2.10k|  return 0;
   68|  2.10k|}
impd_drc_uni_sel_proc_process:
   75|    863|    ia_drc_sel_proc_output_struct* hia_drc_sel_proc_output_struct) {
   76|    863|  WORD32 i, err, drc_set_id_selected, activeDrcSetIndex;
   77|    863|  WORD32 eq_set_id_selected;
   78|    863|  WORD32 loudEqSetIdSelected;
   79|       |
   80|    863|  if (pstr_drc_config != NULL) {
  ------------------
  |  Branch (80:7): [True: 863, False: 0]
  ------------------
   81|    863|    if (memcmp(&pstr_drc_uni_sel_proc->drc_config, pstr_drc_config,
  ------------------
  |  Branch (81:9): [True: 863, False: 0]
  ------------------
   82|    863|               sizeof(ia_drc_config))) {
   83|    863|      pstr_drc_uni_sel_proc->drc_config = *pstr_drc_config;
   84|    863|      pstr_drc_uni_sel_proc->drc_config_flag = 1;
   85|       |
   86|    863|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_channel_count !=
  ------------------
  |  Branch (86:11): [True: 863, False: 0]
  ------------------
   87|    863|          pstr_drc_uni_sel_proc->drc_config.channel_layout.base_channel_count) {
   88|    863|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_channel_count =
   89|    863|            pstr_drc_uni_sel_proc->drc_config.channel_layout.base_channel_count;
   90|    863|      }
   91|    863|      if (pstr_drc_uni_sel_proc->drc_config.channel_layout
  ------------------
  |  Branch (91:11): [True: 74, False: 789]
  ------------------
   92|    863|                  .layout_signaling_present == 1 &&
   93|     74|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_layout !=
  ------------------
  |  Branch (93:11): [True: 74, False: 0]
  ------------------
   94|     74|              pstr_drc_uni_sel_proc->drc_config.channel_layout.defined_layout) {
   95|     74|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_layout =
   96|     74|            pstr_drc_uni_sel_proc->drc_config.channel_layout.defined_layout;
   97|     74|      }
   98|    863|    } else {
   99|      0|      pstr_drc_uni_sel_proc->drc_config_flag = 0;
  100|      0|    }
  101|    863|  }
  102|    863|  if (pstr_loudness_info != NULL) {
  ------------------
  |  Branch (102:7): [True: 863, False: 0]
  ------------------
  103|    863|    if (memcmp(&pstr_drc_uni_sel_proc->loudness_info_set, pstr_loudness_info,
  ------------------
  |  Branch (103:9): [True: 323, False: 540]
  ------------------
  104|    863|               sizeof(ia_drc_loudness_info_set_struct))) {
  105|    323|      pstr_drc_uni_sel_proc->loudness_info_set = *pstr_loudness_info;
  106|    323|      pstr_drc_uni_sel_proc->loudness_info_set_flag = 1;
  107|    540|    } else {
  108|    540|      pstr_drc_uni_sel_proc->loudness_info_set_flag = 0;
  109|    540|    }
  110|    863|  }
  111|       |
  112|    863|  if ((pstr_drc_uni_sel_proc->drc_config_flag &&
  ------------------
  |  Branch (112:8): [True: 863, False: 0]
  ------------------
  113|    863|       pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (113:8): [True: 0, False: 863]
  ------------------
  114|    863|               .target_config_request_type != 0) ||
  115|    863|      (pstr_drc_uni_sel_proc->sel_proc_request_flag &&
  ------------------
  |  Branch (115:8): [True: 863, False: 0]
  ------------------
  116|    863|       pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (116:8): [True: 0, False: 863]
  ------------------
  117|    863|               .target_config_request_type != 0) ||
  118|    863|      (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (118:8): [True: 863, False: 0]
  ------------------
  119|    863|               .target_config_request_type == 0 &&
  120|    863|       pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_downmix_id_requests ==
  ------------------
  |  Branch (120:8): [True: 863, False: 0]
  ------------------
  121|    863|           0)) {
  122|    863|    err = impd_map_target_config_req_downmix_id(
  123|    863|        pstr_drc_uni_sel_proc, &pstr_drc_uni_sel_proc->drc_config);
  124|    863|    if (err) return (err);
  ------------------
  |  Branch (124:9): [True: 0, False: 863]
  ------------------
  125|    863|  }
  126|       |
  127|    863|  if (pstr_drc_uni_sel_proc->drc_config_flag ||
  ------------------
  |  Branch (127:7): [True: 863, False: 0]
  ------------------
  128|      0|      pstr_drc_uni_sel_proc->loudness_info_set_flag ||
  ------------------
  |  Branch (128:7): [True: 0, False: 0]
  ------------------
  129|    863|      pstr_drc_uni_sel_proc->sel_proc_request_flag) {
  ------------------
  |  Branch (129:7): [True: 0, False: 0]
  ------------------
  130|    863|    WORD32 repeat_selection = 1;
  131|       |
  132|    863|    err = impd_manage_drc_complexity(pstr_drc_uni_sel_proc, pstr_drc_config);
  133|    863|    if (err) return (err);
  ------------------
  |  Branch (133:9): [True: 7, False: 856]
  ------------------
  134|    856|    err = impd_manage_eq_complexity(pstr_drc_uni_sel_proc, pstr_drc_config);
  135|    856|    if (err) return (err);
  ------------------
  |  Branch (135:9): [True: 0, False: 856]
  ------------------
  136|  1.67k|    while (repeat_selection == 1) {
  ------------------
  |  Branch (136:12): [True: 856, False: 815]
  ------------------
  137|    856|      err = impd_select_drc_set(pstr_drc_uni_sel_proc, &drc_set_id_selected,
  138|    856|                                &eq_set_id_selected, &loudEqSetIdSelected);
  139|    856|      if (err) return (err);
  ------------------
  |  Branch (139:11): [True: 9, False: 847]
  ------------------
  140|       |
  141|    847|      err =
  142|    847|          impd_get_selected_drc_set(pstr_drc_uni_sel_proc, drc_set_id_selected);
  143|    847|      if (err) return (err);
  ------------------
  |  Branch (143:11): [True: 0, False: 847]
  ------------------
  144|       |
  145|    847|      err = impd_get_dependent_drc_set(pstr_drc_uni_sel_proc);
  146|    847|      if (err) return (err);
  ------------------
  |  Branch (146:11): [True: 0, False: 847]
  ------------------
  147|       |
  148|    847|      err = impd_get_fading_drc_set(pstr_drc_uni_sel_proc);
  149|    847|      if (err) return (err);
  ------------------
  |  Branch (149:11): [True: 32, False: 815]
  ------------------
  150|       |
  151|    815|      err = impd_get_ducking_drc_set(pstr_drc_uni_sel_proc);
  152|    815|      if (err) return (err);
  ------------------
  |  Branch (152:11): [True: 0, False: 815]
  ------------------
  153|       |
  154|    815|      pstr_drc_uni_sel_proc->eq_inst_index[0] = -1;
  155|    815|      pstr_drc_uni_sel_proc->eq_inst_index[1] = -1;
  156|       |
  157|    815|      err = impd_get_selected_eq_set(pstr_drc_uni_sel_proc, eq_set_id_selected);
  158|    815|      if (err) return (err);
  ------------------
  |  Branch (158:11): [True: 0, False: 815]
  ------------------
  159|       |
  160|    815|      err = impd_get_dependent_eq_set(pstr_drc_uni_sel_proc);
  161|    815|      if (err) return (err);
  ------------------
  |  Branch (161:11): [True: 0, False: 815]
  ------------------
  162|       |
  163|    815|      err = impd_get_selected_loud_eq_set(pstr_drc_uni_sel_proc,
  164|    815|                                          loudEqSetIdSelected);
  165|    815|      if (err) return (err);
  ------------------
  |  Branch (165:11): [True: 0, False: 815]
  ------------------
  166|       |
  167|    815|      activeDrcSetIndex = 0;
  168|  4.07k|      for (i = SUB_DRC_COUNT - 1; i >= 0; i--) {
  ------------------
  |  |   49|    815|#define SUB_DRC_COUNT 4
  ------------------
  |  Branch (168:35): [True: 3.26k, False: 815]
  ------------------
  169|  3.26k|        WORD32 drc_instructions_index =
  170|  3.26k|            pstr_drc_uni_sel_proc->drc_instructions_index[i];
  171|  3.26k|        ia_drc_instructions_struct* str_drc_instruction_str;
  172|  3.26k|        if (drc_instructions_index < 0) continue;
  ------------------
  |  Branch (172:13): [True: 2.43k, False: 829]
  ------------------
  173|       |
  174|    829|        str_drc_instruction_str =
  175|    829|            &(pstr_drc_uni_sel_proc->drc_config
  176|    829|                  .str_drc_instruction_str[drc_instructions_index]);
  177|       |
  178|    829|        if (str_drc_instruction_str->drc_set_id > 0) {
  ------------------
  |  Branch (178:13): [True: 273, False: 556]
  ------------------
  179|    273|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  180|    273|              .sel_drc_set_ids[activeDrcSetIndex] =
  181|    273|              str_drc_instruction_str->drc_set_id;
  182|       |
  183|    273|          if ((i == 3) && (str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (183:15): [True: 1, False: 272]
  |  Branch (183:27): [True: 1, False: 0]
  ------------------
  184|      1|                           (EFFECT_BIT_DUCK_SELF | EFFECT_BIT_DUCK_OTHER))) {
  ------------------
  |  |   73|      1|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
                                         (EFFECT_BIT_DUCK_SELF | EFFECT_BIT_DUCK_OTHER))) {
  ------------------
  |  |   72|      1|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
  185|      1|            pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  186|      1|                .sel_downmix_ids[activeDrcSetIndex] = 0;
  187|    272|          } else {
  188|    272|            if (str_drc_instruction_str->drc_apply_to_dwnmix == 1) {
  ------------------
  |  Branch (188:17): [True: 7, False: 265]
  ------------------
  189|      7|              pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  190|      7|                  .sel_downmix_ids[activeDrcSetIndex] =
  191|      7|                  str_drc_instruction_str->downmix_id[0];
  192|    265|            } else {
  193|    265|              pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  194|    265|                  .sel_downmix_ids[activeDrcSetIndex] = 0;
  195|    265|            }
  196|    272|          }
  197|       |
  198|    273|          activeDrcSetIndex++;
  199|    273|        }
  200|    829|      }
  201|    815|      if (activeDrcSetIndex <= 3) {
  ------------------
  |  Branch (201:11): [True: 815, False: 0]
  ------------------
  202|    815|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.num_sel_drc_sets =
  203|    815|            activeDrcSetIndex;
  204|    815|      } 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|    815|      impd_sel_downmix_matrix(pstr_drc_uni_sel_proc,
  210|    815|                              &pstr_drc_uni_sel_proc->drc_config);
  211|       |
  212|    815|      err = impd_manage_complexity(pstr_drc_uni_sel_proc, pstr_drc_config,
  213|    815|                                   &repeat_selection);
  214|    815|      if (err) return (err);
  ------------------
  |  Branch (214:11): [True: 0, False: 815]
  ------------------
  215|    815|    }
  216|       |
  217|    815|    pstr_drc_uni_sel_proc->sel_proc_request_flag = 0;
  218|    815|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.boost =
  219|    815|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.boost;
  220|    815|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.compress =
  221|    815|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.compress;
  222|    815|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.drc_characteristic_target =
  223|    815|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  224|    815|            .drc_characteristic_target;
  225|    815|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  226|    815|        .loudness_normalization_gain_db +=
  227|    815|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  228|    815|            .loudness_norm_gain_modification_db;
  229|    815|  }
  230|  2.44k|  for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (230:15): [True: 1.63k, False: 815]
  ------------------
  231|  1.63k|    if (pstr_drc_uni_sel_proc->eq_inst_index[i] >= 0) {
  ------------------
  |  Branch (231:9): [True: 0, False: 1.63k]
  ------------------
  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.63k|  }
  238|    815|  if (pstr_drc_uni_sel_proc->loud_eq_inst_index_sel >= 0) {
  ------------------
  |  Branch (238:7): [True: 0, False: 815]
  ------------------
  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|    815|  } else {
  244|    815|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_loud_eq_id = 0;
  245|    815|  }
  246|    815|  *hia_drc_sel_proc_output_struct =
  247|    815|      pstr_drc_uni_sel_proc->uni_drc_sel_proc_output;
  248|       |
  249|    815|  return 0;
  250|    863|}
impd_map_target_config_req_downmix_id:
  254|    863|    ia_drc_config* pstr_drc_config) {
  255|    863|  WORD32 i, dwnmix_instructions_count;
  256|    863|  WORD32 target_ch_count_prelim =
  257|    863|      pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_channel_count;
  258|       |
  259|    863|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_downmix_id_requests = 0;
  260|    863|  switch (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  261|    863|              .target_config_request_type) {
  262|    863|    case 0:
  ------------------
  |  Branch (262:5): [True: 863, False: 0]
  ------------------
  263|    863|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (263:11): [True: 863, False: 0]
  ------------------
  264|    863|              .num_downmix_id_requests == 0) {
  265|    863|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.requested_dwnmix_id[0] =
  266|    863|            0;
  267|    863|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_downmix_id_requests =
  268|    863|            1;
  269|    863|      }
  270|    863|      break;
  271|      0|    case 1:
  ------------------
  |  Branch (271:5): [True: 0, False: 863]
  ------------------
  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: 863]
  ------------------
  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: 863]
  ------------------
  348|      0|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  349|      0|      break;
  350|    863|  }
  351|    863|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.target_ch_count_prelim =
  352|    863|      target_ch_count_prelim;
  353|       |
  354|    863|  return 0;
  355|    863|}
impd_sel_downmix_matrix:
  358|    815|                             ia_drc_config* pstr_drc_config) {
  359|    815|  WORD32 i, j, n;
  360|       |
  361|    815|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.base_channel_count =
  362|    815|      pstr_drc_config->channel_layout.base_channel_count;
  363|    815|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.target_channel_count =
  364|    815|      pstr_drc_config->channel_layout.base_channel_count;
  365|    815|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.target_layout = -1;
  366|    815|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.downmix_matrix_present = 0;
  367|    815|  pstr_drc_uni_sel_proc->downmix_inst_index_sel = -1;
  368|       |
  369|    815|  if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.active_downmix_id != 0) {
  ------------------
  |  Branch (369:7): [True: 0, False: 815]
  ------------------
  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|    815|  return;
  405|    815|}
impd_get_selected_eq_set:
  408|    815|                                WORD32 eq_set_id_selected) {
  409|    815|  WORD32 n;
  410|       |
  411|    815|  pstr_drc_uni_sel_proc->eq_inst_index_sel = -1;
  412|       |
  413|    815|  if (eq_set_id_selected > 0) {
  ------------------
  |  Branch (413:7): [True: 0, False: 815]
  ------------------
  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|    815|  return (0);
  439|    815|}
impd_get_dependent_eq_set:
  441|    815|WORD32 impd_get_dependent_eq_set(ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc) {
  442|    815|  ia_eq_instructions_struct* str_eq_instructions = NULL;
  443|       |
  444|    815|  if (pstr_drc_uni_sel_proc->eq_inst_index_sel >= 0) {
  ------------------
  |  Branch (444:7): [True: 0, False: 815]
  ------------------
  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|    815|  return (0);
  476|    815|}
impd_get_selected_loud_eq_set:
  479|    815|    ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc, WORD32 loudEqSetIdSelected) {
  480|    815|  WORD32 n;
  481|       |
  482|    815|  pstr_drc_uni_sel_proc->loud_eq_inst_index_sel = -1;
  483|       |
  484|    815|  if (loudEqSetIdSelected > 0) {
  ------------------
  |  Branch (484:7): [True: 0, False: 815]
  ------------------
  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|    815|  return (0);
  501|    815|}
impd_select_loud_eq:
  506|    847|                           WORD32 eq_set_id_requested, WORD32* loud_eq_id_sel) {
  507|    847|  WORD32 i, c, d, e;
  508|       |
  509|    847|  *loud_eq_id_sel = 0;
  510|    847|  for (i = 0;
  511|    853|       i < pstr_drc_config->str_drc_config_ext.loud_eq_instructions_count;
  ------------------
  |  Branch (511:8): [True: 6, False: 847]
  ------------------
  512|    847|       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: 3, False: 3]
  ------------------
  516|      6|      for (d = 0; d < loud_eq_instructions->dwnmix_id_count; d++) {
  ------------------
  |  Branch (516:19): [True: 3, False: 3]
  ------------------
  517|      3|        if ((loud_eq_instructions->downmix_id[d] == requested_dwnmix_id) ||
  ------------------
  |  Branch (517:13): [True: 3, False: 0]
  ------------------
  518|      3|            (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|      6|          for (c = 0; c < loud_eq_instructions->drc_set_id_count; c++) {
  ------------------
  |  Branch (519:23): [True: 3, False: 3]
  ------------------
  520|      3|            if ((loud_eq_instructions->drc_set_id[c] == drc_set_id_requested) ||
  ------------------
  |  Branch (520:17): [True: 0, False: 3]
  ------------------
  521|      3|                (loud_eq_instructions->drc_set_id[c] == ID_FOR_ANY_DRC)) {
  ------------------
  |  |  138|      3|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  |  Branch (521:17): [True: 0, False: 3]
  ------------------
  522|      0|              for (e = 0; e < loud_eq_instructions->eq_set_id_count; e++) {
  ------------------
  |  Branch (522:27): [True: 0, False: 0]
  ------------------
  523|      0|                if ((loud_eq_instructions->eq_set_id[e] ==
  ------------------
  |  Branch (523:21): [True: 0, False: 0]
  ------------------
  524|      0|                     eq_set_id_requested) ||
  525|      0|                    (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|      0|                  *loud_eq_id_sel = loud_eq_instructions->loud_eq_set_id;
  527|      0|                }
  528|      0|              }
  529|      0|            }
  530|      3|          }
  531|      3|        }
  532|      3|      }
  533|      3|    }
  534|      6|  }
  535|    847|  return (0);
  536|    847|}
impd_find_eq_set_no_compression:
  624|    856|                                       WORD32* num_compression_eq_id) {
  625|    856|  WORD32 i, d, k, c;
  626|    856|  k = 0;
  627|    856|  for (i = 0; i < pstr_drc_config->str_drc_config_ext.eq_instructions_count;
  ------------------
  |  Branch (627:15): [True: 0, False: 856]
  ------------------
  628|    856|       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|    856|  *num_compression_eq_count = k;
  645|    856|  return (0);
  646|    856|}
impd_select_drc_coeff3:
  650|  2.53k|    ia_uni_drc_coeffs_struct** str_p_loc_drc_coefficients_uni_drc) {
  651|  2.53k|  WORD32 n;
  652|  2.53k|  WORD32 cV1 = -1;
  653|  2.53k|  WORD32 cV0 = -1;
  654|  5.33k|  for (n = 0; n < drc_config->drc_coefficients_drc_count; n++) {
  ------------------
  |  Branch (654:15): [True: 2.79k, False: 2.53k]
  ------------------
  655|  2.79k|    if (drc_config->str_p_loc_drc_coefficients_uni_drc[n].drc_location == 1) {
  ------------------
  |  Branch (655:9): [True: 2.53k, False: 265]
  ------------------
  656|  2.53k|      if (drc_config->str_p_loc_drc_coefficients_uni_drc[n].version == 0) {
  ------------------
  |  Branch (656:11): [True: 183, False: 2.35k]
  ------------------
  657|    183|        cV0 = n;
  658|  2.35k|      } else {
  659|  2.35k|        cV1 = n;
  660|  2.35k|      }
  661|  2.53k|    }
  662|  2.79k|  }
  663|  2.53k|  if (cV1 >= 0) {
  ------------------
  |  Branch (663:7): [True: 2.34k, False: 187]
  ------------------
  664|  2.34k|    *str_p_loc_drc_coefficients_uni_drc =
  665|  2.34k|        &(drc_config->str_p_loc_drc_coefficients_uni_drc[cV1]);
  666|  2.34k|  } else if (cV0 >= 0) {
  ------------------
  |  Branch (666:14): [True: 183, False: 4]
  ------------------
  667|    183|    *str_p_loc_drc_coefficients_uni_drc =
  668|    183|        &(drc_config->str_p_loc_drc_coefficients_uni_drc[cV0]);
  669|    183|  } else {
  670|       |    *str_p_loc_drc_coefficients_uni_drc = NULL;
  671|      4|  }
  672|  2.53k|  return;
  673|  2.53k|}
impd_manage_drc_complexity:
  676|    863|                                  ia_drc_config* pstr_drc_config) {
  677|    863|  WORD32 i, j, err, channel_count;
  678|    863|  WORD32 numBandsTooLarge = 0;
  679|    863|  FLOAT32 complexityDrcPrelim;
  680|    863|  ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc;
  681|    863|  FLOAT32 complexitySupportedTotal =
  682|    863|      (FLOAT32)(pow(2.0f, pstr_drc_uni_sel_proc->compl_level_supported_total));
  683|    863|  ia_drc_instructions_struct* str_drc_instruction_str;
  684|    863|  ia_drc_instructions_struct* drc_inst_uni_drc_dependent;
  685|    863|  ia_drc_sel_proc_output_struct* uni_drc_sel_proc_output =
  686|    863|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_output;
  687|    863|  ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct =
  688|    863|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_params;
  689|       |
  690|    863|  impd_select_drc_coeff3(pstr_drc_config, &str_p_loc_drc_coefficients_uni_drc);
  691|    863|  if (str_p_loc_drc_coefficients_uni_drc == NULL) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      4|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (691:7): [True: 4, False: 859]
  ------------------
  692|  4.93k|  for (i = 0; i < pstr_drc_config->drc_instructions_uni_drc_count; i++) {
  ------------------
  |  Branch (692:15): [True: 4.07k, False: 856]
  ------------------
  693|  4.07k|    str_drc_instruction_str = &pstr_drc_config->str_drc_instruction_str[i];
  694|  4.07k|    if (str_drc_instruction_str->no_independent_use) continue;
  ------------------
  |  Branch (694:9): [True: 7, False: 4.07k]
  ------------------
  695|       |
  696|  4.07k|    numBandsTooLarge = 0;
  697|  4.07k|    if (str_drc_instruction_str->drc_apply_to_dwnmix == 1) {
  ------------------
  |  Branch (697:9): [True: 110, False: 3.96k]
  ------------------
  698|    110|      channel_count = uni_drc_sel_proc_output->target_channel_count;
  699|  3.96k|    } else {
  700|  3.96k|      channel_count = uni_drc_sel_proc_output->base_channel_count;
  701|  3.96k|    }
  702|  4.07k|    if (pstr_drc_uni_sel_proc->subband_domain_mode == SUBBAND_DOMAIN_MODE_OFF) {
  ------------------
  |  |  148|  4.07k|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (702:9): [True: 4.07k, False: 0]
  ------------------
  703|  10.3k|      for (j = 0; j < str_drc_instruction_str->num_drc_ch_groups; j++) {
  ------------------
  |  Branch (703:19): [True: 6.23k, False: 4.07k]
  ------------------
  704|  6.23k|        ia_gain_set_params_struct* gain_set_params = &(
  705|  6.23k|            str_p_loc_drc_coefficients_uni_drc->gain_set_params
  706|  6.23k|                [str_drc_instruction_str->gain_set_index_for_channel_group[j]]);
  707|  6.23k|        if (gain_set_params->band_count >
  ------------------
  |  Branch (707:13): [True: 0, False: 6.23k]
  ------------------
  708|  6.23k|            pstr_drc_sel_proc_params_struct->num_bands_supported) {
  709|      0|          numBandsTooLarge = 1;
  710|  6.23k|        } else {
  711|  6.23k|          if (gain_set_params->band_count > 4) {
  ------------------
  |  Branch (711:15): [True: 0, False: 6.23k]
  ------------------
  712|       |            /* Add complexity for analysis and synthesis QMF bank here, if
  713|       |             * supported */
  714|      0|          }
  715|  6.23k|        }
  716|  6.23k|      }
  717|  4.07k|    }
  718|  4.07k|    complexityDrcPrelim =
  719|  4.07k|        (FLOAT32)(channel_count *
  720|  4.07k|                  (1 << str_drc_instruction_str->drc_set_complexity_level));
  721|       |
  722|  4.07k|    if (str_drc_instruction_str->depends_on_drc_set > 0) {
  ------------------
  |  Branch (722:9): [True: 3, False: 4.06k]
  ------------------
  723|      3|      err = impd_find_drc_instructions_uni_drc(
  724|      3|          pstr_drc_config, str_drc_instruction_str->depends_on_drc_set,
  725|      3|          &drc_inst_uni_drc_dependent);
  726|      3|      if (err) return (err);
  ------------------
  |  Branch (726:11): [True: 3, 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|  4.06k|    complexityDrcPrelim *= pstr_drc_config->sampling_rate / 48000.0f;
  756|       |
  757|  4.06k|    if ((complexityDrcPrelim <= complexitySupportedTotal) &&
  ------------------
  |  Branch (757:9): [True: 4.06k, False: 0]
  ------------------
  758|  4.06k|        (numBandsTooLarge == 0)) {
  ------------------
  |  Branch (758:9): [True: 4.06k, False: 0]
  ------------------
  759|  4.06k|      pstr_drc_uni_sel_proc
  760|  4.06k|          ->drc_set_id_valid_flag[str_drc_instruction_str->drc_set_id] = 1;
  761|  4.06k|    }
  762|  4.06k|  }
  763|    856|  return (0);
  764|    859|}
impd_manage_eq_complexity:
  767|    856|                                 ia_drc_config* pstr_drc_config) {
  768|    856|  WORD32 k, n, m, err;
  769|    856|  WORD32 eqComplexityPrimary = 0;
  770|    856|  WORD32 eqComplexityDependent = 0;
  771|    856|  WORD32 eqChannelCountPrimary = 0, eqChannelCountDependent = 0;
  772|    856|  FLOAT32 complexityTotalEq;
  773|    856|  ia_drc_config* drc_config = &pstr_drc_uni_sel_proc->drc_config;
  774|    856|  ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct =
  775|    856|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_params;
  776|    856|  FLOAT32 complexitySupportedTotal =
  777|    856|      (FLOAT32)(pow(2.0f, pstr_drc_uni_sel_proc->compl_level_supported_total));
  778|       |
  779|    856|  for (n = 0; n < drc_config->str_drc_config_ext.eq_instructions_count; n++) {
  ------------------
  |  Branch (779:15): [True: 0, False: 856]
  ------------------
  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|    856|  return 0;
  871|    856|}
impd_manage_complexity:
  875|    815|                              WORD32* repeat_selection) {
  876|    815|  WORD32 i, j, p, err;
  877|    815|  WORD32 channel_count;
  878|    815|  WORD32 numBandsTooLarge = 0;
  879|    815|  WORD32 drcRequiresEq;
  880|    815|  FLOAT32 complexityEq;
  881|    815|  FLOAT32 complexityDrcTotal = 0.0f;
  882|    815|  FLOAT32 complexityEqTotal = 0.0f;
  883|    815|  FLOAT32 freqNorm = pstr_drc_config->sampling_rate / 48000.0f;
  884|    815|  ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc;
  885|    815|  ia_drc_instructions_struct* str_drc_instruction_str =
  886|    815|      &pstr_drc_config->str_drc_instruction_str[0];
  887|    815|  ia_drc_sel_proc_output_struct* uni_drc_sel_proc_output =
  888|    815|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_output;
  889|    815|  ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct =
  890|    815|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_params;
  891|    815|  FLOAT32 complexitySupportedTotal =
  892|    815|      (FLOAT32)(pow(2.0f, pstr_drc_uni_sel_proc->compl_level_supported_total));
  893|       |
  894|    815|  impd_select_drc_coeff3(pstr_drc_config, &str_p_loc_drc_coefficients_uni_drc);
  895|       |
  896|    815|  if (str_p_loc_drc_coefficients_uni_drc == NULL) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (896:7): [True: 0, False: 815]
  ------------------
  897|       |
  898|  4.07k|  for (p = 0; p < 4; p++) {
  ------------------
  |  Branch (898:15): [True: 3.26k, False: 815]
  ------------------
  899|  3.26k|    if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[p] <= 0)
  ------------------
  |  Branch (899:9): [True: 2.98k, False: 273]
  ------------------
  900|  2.98k|      continue;
  901|    273|    err = impd_find_drc_instructions_uni_drc(
  902|    273|        pstr_drc_config,
  903|    273|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[p],
  904|    273|        &str_drc_instruction_str);
  905|    273|    if (err) return (err);
  ------------------
  |  Branch (905:9): [True: 0, False: 273]
  ------------------
  906|       |
  907|    273|    if (str_drc_instruction_str->drc_apply_to_dwnmix == 1) {
  ------------------
  |  Branch (907:9): [True: 8, False: 265]
  ------------------
  908|      8|      channel_count = uni_drc_sel_proc_output->target_channel_count;
  909|    265|    } else {
  910|    265|      channel_count = uni_drc_sel_proc_output->base_channel_count;
  911|    265|    }
  912|    273|    if (pstr_drc_uni_sel_proc->subband_domain_mode == SUBBAND_DOMAIN_MODE_OFF) {
  ------------------
  |  |  148|    273|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (912:9): [True: 273, False: 0]
  ------------------
  913|    803|      for (j = 0; j < str_drc_instruction_str->num_drc_ch_groups; j++) {
  ------------------
  |  Branch (913:19): [True: 530, False: 273]
  ------------------
  914|    530|        ia_gain_set_params_struct* gain_set_params = &(
  915|    530|            str_p_loc_drc_coefficients_uni_drc->gain_set_params
  916|    530|                [str_drc_instruction_str->gain_set_index_for_channel_group[j]]);
  917|    530|        if (gain_set_params->band_count >
  ------------------
  |  Branch (917:13): [True: 0, False: 530]
  ------------------
  918|    530|            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|    530|        } else {
  929|    530|          if (gain_set_params->band_count > 4) {
  ------------------
  |  Branch (929:15): [True: 0, False: 530]
  ------------------
  930|       |            /* Add complexity for analysis and synthesis QMF bank here, if
  931|       |             * supported */
  932|      0|          }
  933|    530|        }
  934|    530|      }
  935|    273|    }
  936|    273|    complexityDrcTotal +=
  937|    273|        channel_count *
  938|    273|        (1 << str_drc_instruction_str->drc_set_complexity_level);
  939|    273|  }
  940|       |
  941|    815|  if (uni_drc_sel_proc_output->active_downmix_id > 0) {
  ------------------
  |  Branch (941:7): [True: 0, False: 815]
  ------------------
  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|  2.44k|  for (p = 0; p < 2; p++) {
  ------------------
  |  Branch (967:15): [True: 1.63k, False: 815]
  ------------------
  968|  1.63k|    if (pstr_drc_uni_sel_proc->eq_inst_index[p] >= 0) {
  ------------------
  |  Branch (968:9): [True: 0, False: 1.63k]
  ------------------
  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.63k|  }
  994|       |
  995|    815|  complexityDrcTotal *= freqNorm;
  996|    815|  complexityEqTotal *= freqNorm;
  997|       |
  998|    815|  if ((complexityDrcTotal > complexitySupportedTotal) ||
  ------------------
  |  Branch (998:7): [True: 0, False: 815]
  ------------------
  999|    815|      (complexityEqTotal > complexitySupportedTotal))
  ------------------
  |  Branch (999:7): [True: 0, False: 815]
  ------------------
 1000|      0|    return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1001|       |
 1002|    815|  if (numBandsTooLarge == 1) {
  ------------------
  |  Branch (1002:7): [True: 0, False: 815]
  ------------------
 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|    815|  } else {
 1015|    815|    if (complexityDrcTotal + complexityEqTotal <= complexitySupportedTotal) {
  ------------------
  |  Branch (1015:9): [True: 815, False: 0]
  ------------------
 1016|    815|      *repeat_selection = 0;
 1017|    815|    } 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|    815|  }
 1062|       |
 1063|    815|  if (*repeat_selection == 1) {
  ------------------
  |  Branch (1063:7): [True: 0, False: 815]
  ------------------
 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|    815|  return (0);
 1068|    815|}

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

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

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

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

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

ixheaacd_calc_window:
   29|   432k|WORD32 ixheaacd_calc_window(WORD32 **win, WORD32 win_sz, WORD32 win_sel, WORD32 ec_flag) {
   30|   432k|  switch (win_sel) {
   31|   306k|    case WIN_SEL_0:
  ------------------
  |  |   91|   306k|#define WIN_SEL_0 0
  ------------------
  |  Branch (31:5): [True: 306k, False: 126k]
  ------------------
   32|   306k|      switch (win_sz) {
   33|   126k|        case WIN_LEN_128:
  ------------------
  |  |   77|   126k|#define WIN_LEN_128 128
  ------------------
  |  Branch (33:9): [True: 126k, False: 180k]
  ------------------
   34|   126k|          *win = (WORD32 *)ixheaacd_sine_win_128;
   35|   126k|          break;
   36|   142k|        case WIN_LEN_1024:
  ------------------
  |  |   73|   142k|#define WIN_LEN_1024 1024
  ------------------
  |  Branch (36:9): [True: 142k, False: 163k]
  ------------------
   37|   142k|          *win = (WORD32 *)ixheaacd_sine_win_1024;
   38|   142k|          break;
   39|      0|        case WIN_LEN_64:
  ------------------
  |  |   83|      0|#define WIN_LEN_64 64
  ------------------
  |  Branch (39:9): [True: 0, False: 306k]
  ------------------
   40|      0|          *win = (WORD32 *)ixheaacd_sine_win_64;
   41|      0|          break;
   42|  18.6k|        case WIN_LEN_768:
  ------------------
  |  |   74|  18.6k|#define WIN_LEN_768 768
  ------------------
  |  Branch (42:9): [True: 18.6k, False: 288k]
  ------------------
   43|  18.6k|          *win = (WORD32 *)ixheaacd_sine_win_768;
   44|  18.6k|          break;
   45|  1.83k|        case WIN_LEN_192:
  ------------------
  |  |   76|  1.83k|#define WIN_LEN_192 192
  ------------------
  |  Branch (45:9): [True: 1.83k, False: 304k]
  ------------------
   46|  1.83k|          *win = (WORD32 *)ixheaacd_sine_win_192;
   47|  1.83k|          break;
   48|  6.01k|        case WIN_LEN_96:
  ------------------
  |  |   82|  6.01k|#define WIN_LEN_96 96
  ------------------
  |  Branch (48:9): [True: 6.01k, False: 300k]
  ------------------
   49|  6.01k|          *win = (WORD32 *)ixheaacd_sine_win_96;
   50|  6.01k|          break;
   51|  10.6k|        case WIN_LEN_256:
  ------------------
  |  |   80|  10.6k|#define WIN_LEN_256 256
  ------------------
  |  Branch (51:9): [True: 10.6k, False: 296k]
  ------------------
   52|  10.6k|          *win = (WORD32 *)ixheaacd_sine_win_256;
   53|  10.6k|          break;
   54|      0|        default:
  ------------------
  |  Branch (54:9): [True: 0, False: 306k]
  ------------------
   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|   306k|      }
   61|   306k|      break;
   62|       |
   63|   306k|    case WIN_SEL_1:
  ------------------
  |  |   92|   126k|#define WIN_SEL_1 1
  ------------------
  |  Branch (63:5): [True: 126k, False: 306k]
  ------------------
   64|   126k|      switch (win_sz) {
   65|      0|        case WIN_LEN_120:
  ------------------
  |  |   81|      0|#define WIN_LEN_120 120
  ------------------
  |  Branch (65:9): [True: 0, False: 126k]
  ------------------
   66|      0|          *win = (WORD32 *)ixheaacd_kbd_win120;
   67|      0|          break;
   68|  99.0k|        case WIN_LEN_128:
  ------------------
  |  |   77|  99.0k|#define WIN_LEN_128 128
  ------------------
  |  Branch (68:9): [True: 99.0k, False: 27.1k]
  ------------------
   69|  99.0k|          *win = (WORD32 *)ixheaacd_kbd_win128;
   70|  99.0k|          break;
   71|      0|        case WIN_LEN_960:
  ------------------
  |  |   78|      0|#define WIN_LEN_960 960
  ------------------
  |  Branch (71:9): [True: 0, False: 126k]
  ------------------
   72|      0|          *win = (WORD32 *)ixheaacd_kbd_win960;
   73|      0|          break;
   74|  25.6k|        case WIN_LEN_1024:
  ------------------
  |  |   73|  25.6k|#define WIN_LEN_1024 1024
  ------------------
  |  Branch (74:9): [True: 25.6k, False: 100k]
  ------------------
   75|  25.6k|          *win = (WORD32 *)ixheaacd_kbd_win1024;
   76|  25.6k|          break;
   77|      0|        case WIN_LEN_4:
  ------------------
  |  |   86|      0|#define WIN_LEN_4 4
  ------------------
  |  Branch (77:9): [True: 0, False: 126k]
  ------------------
   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: 126k]
  ------------------
   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: 126k]
  ------------------
   84|      0|          *win = (WORD32 *)ixheaacd_kbd_win_64;
   85|      0|          break;
   86|    389|        case WIN_LEN_768:
  ------------------
  |  |   74|    389|#define WIN_LEN_768 768
  ------------------
  |  Branch (86:9): [True: 389, False: 125k]
  ------------------
   87|    389|          *win = (WORD32 *)ixheaacd_kbd_win768;
   88|    389|          break;
   89|      0|        case WIN_LEN_192:
  ------------------
  |  |   76|      0|#define WIN_LEN_192 192
  ------------------
  |  Branch (89:9): [True: 0, False: 126k]
  ------------------
   90|      0|          *win = (WORD32 *)ixheaacd_kbd_win192;
   91|      0|          break;
   92|  1.12k|        case WIN_LEN_96:
  ------------------
  |  |   82|  1.12k|#define WIN_LEN_96 96
  ------------------
  |  Branch (92:9): [True: 1.12k, False: 125k]
  ------------------
   93|  1.12k|          *win = (WORD32 *)ixheaacd_kbd_win96;
   94|  1.12k|          break;
   95|      0|        case WIN_LEN_48:
  ------------------
  |  |   84|      0|#define WIN_LEN_48 48
  ------------------
  |  Branch (95:9): [True: 0, False: 126k]
  ------------------
   96|      0|          *win = (WORD32 *)ixheaacd_kbd_win48;
   97|      0|          break;
   98|      0|        default:
  ------------------
  |  Branch (98:9): [True: 0, False: 126k]
  ------------------
   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|   126k|      }
  105|   126k|      break;
  106|       |
  107|   126k|    default:
  ------------------
  |  Branch (107:5): [True: 0, False: 432k]
  ------------------
  108|      0|      return -1;
  109|      0|      break;
  110|   432k|  }
  111|   432k|  return 0;
  112|   432k|}

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

ixheaacd_tns_decode_coefficients:
   71|  39.5k|    ia_aac_dec_tables_struct *ptr_aac_tables) {
   72|  39.5k|  WORD32 i;
   73|  39.5k|  WORD32 tmp;
   74|  39.5k|  WORD32 *aptr = a;
   75|  39.5k|  WORD32 *tns_coeff_ptr;
   76|  39.5k|  WORD8 ixheaacd_drc_offset;
   77|       |
   78|  39.5k|  tmp = filter->resolution;
   79|  39.5k|  if (tmp == 0) {
  ------------------
  |  Branch (79:7): [True: 35.1k, False: 4.38k]
  ------------------
   80|  35.1k|    tns_coeff_ptr = ptr_aac_tables->pstr_block_tables->tns_coeff3;
   81|  35.1k|    ixheaacd_drc_offset = 4;
   82|       |
   83|  35.1k|  } else {
   84|  4.38k|    tns_coeff_ptr = ptr_aac_tables->pstr_block_tables->tns_coeff4;
   85|  4.38k|    ixheaacd_drc_offset = 8;
   86|  4.38k|  }
   87|       |
   88|   388k|  for (i = 0; i < filter->order; i++) {
  ------------------
  |  Branch (88:15): [True: 348k, False: 39.5k]
  ------------------
   89|   348k|    *aptr++ = tns_coeff_ptr[filter->coef[i] + ixheaacd_drc_offset];
   90|   348k|  }
   91|  39.5k|}
ixheaacd_tns_parcor_to_lpc:
   96|  34.3k|{
   97|  34.3k|  WORD i, j, status;
   98|  34.3k|  WORD32 z1;
   99|  34.3k|  WORD32 z[MAX_ORDER + 1];
  100|  34.3k|  WORD32 w[MAX_ORDER + 1];
  101|  34.3k|  WORD32 accu1, accu2;
  102|       |
  103|  34.3k|  status = 1;
  104|  34.3k|  *scale = 1;
  105|       |
  106|  97.4k|  while (status) {
  ------------------
  |  Branch (106:10): [True: 63.1k, False: 34.3k]
  ------------------
  107|  63.1k|    status = 0;
  108|       |
  109|  2.08M|    for (i = MAX_ORDER; i >= 0; i--) {
  ------------------
  |  |   24|  63.1k|#define MAX_ORDER 31
  ------------------
  |  Branch (109:25): [True: 2.01M, False: 63.1k]
  ------------------
  110|  2.01M|      z[i] = 0;
  111|  2.01M|      w[i] = 0;
  112|  2.01M|    }
  113|       |
  114|  63.1k|    accu1 = (0x40000000 >> (*scale - 1));
  115|       |
  116|   774k|    for (i = 0; i <= order; i++) {
  ------------------
  |  Branch (116:17): [True: 711k, False: 63.1k]
  ------------------
  117|   711k|      z1 = accu1;
  118|       |
  119|  8.50M|      for (j = 0; j < order; j++) {
  ------------------
  |  Branch (119:19): [True: 7.79M, False: 711k]
  ------------------
  120|  7.79M|        w[j] = (accu1);
  121|       |
  122|  7.79M|        accu1 = ixheaac_add32_sat(accu1,
  123|  7.79M|                                   ixheaac_mult32_shl_sat(parcor[j], (z[j])));
  124|  7.79M|        if (ixheaac_abs32_sat(accu1) == 0x7fffffff) status = 1;
  ------------------
  |  Branch (124:13): [True: 361k, False: 7.43M]
  ------------------
  125|  7.79M|      }
  126|  8.50M|      for (j = (order - 1); j >= 0; j--) {
  ------------------
  |  Branch (126:29): [True: 7.79M, False: 711k]
  ------------------
  127|  7.79M|        accu2 = (z[j]);
  128|  7.79M|        accu2 = ixheaac_add32_sat(accu2,
  129|  7.79M|                                   ixheaac_mult32_shl_sat(parcor[j], (w[j])));
  130|  7.79M|        z[j + 1] = (accu2);
  131|  7.79M|        if (ixheaac_abs32_sat(accu2) == 0x7fffffff) status = 1;
  ------------------
  |  Branch (131:13): [True: 361k, False: 7.43M]
  ------------------
  132|  7.79M|      }
  133|       |
  134|   711k|      z[0] = (z1);
  135|   711k|      lpc[i] = (accu1);
  136|   711k|      accu1 = 0;
  137|   711k|    }
  138|       |
  139|  63.1k|    accu1 = (status - 1);
  140|       |
  141|  63.1k|    if (accu1 == 0) {
  ------------------
  |  Branch (141:9): [True: 28.7k, False: 34.3k]
  ------------------
  142|  28.7k|      *scale = *scale + 1;
  143|  28.7k|    }
  144|  63.1k|  }
  145|  34.3k|}
ixheaacd_tns_parcor_lpc_convert_dec:
  150|  32.6k|{
  151|  32.6k|  WORD i, j, status;
  152|  32.6k|  WORD32 accu;
  153|  32.6k|  WORD16 temp_buf1[MAX_ORDER + 1];
  154|  32.6k|  WORD16 temp_buf2[MAX_ORDER + 1];
  155|  32.6k|  WORD32 accu1, accu2;
  156|       |
  157|  32.6k|  status = 1;
  158|  32.6k|  *scale = 0;
  159|       |
  160|  99.7k|  while (status) {
  ------------------
  |  Branch (160:10): [True: 67.0k, False: 32.6k]
  ------------------
  161|  67.0k|    status = 0;
  162|       |
  163|  2.21M|    for (i = MAX_ORDER; i >= 0; i--) {
  ------------------
  |  |   24|  67.0k|#define MAX_ORDER 31
  ------------------
  |  Branch (163:25): [True: 2.14M, False: 67.0k]
  ------------------
  164|  2.14M|      temp_buf1[i] = 0;
  165|  2.14M|      temp_buf2[i] = 0;
  166|  2.14M|    }
  167|       |
  168|  67.0k|    accu1 = (0x7fffffff >> *scale);
  169|       |
  170|   563k|    for (i = 0; i <= order; i++) {
  ------------------
  |  Branch (170:17): [True: 495k, False: 67.0k]
  ------------------
  171|   495k|      accu = accu1;
  172|       |
  173|  3.99M|      for (j = 0; j < order; j++) {
  ------------------
  |  Branch (173:19): [True: 3.49M, False: 495k]
  ------------------
  174|  3.49M|        temp_buf2[j] = ixheaac_round16(accu1);
  175|  3.49M|        accu1 = ixheaac_mac16x16in32_shl_sat(accu1, parcor[j], temp_buf1[j]);
  176|       |
  177|  3.49M|        if (ixheaac_abs32_sat(accu1) == 0x7fffffff) {
  ------------------
  |  Branch (177:13): [True: 253k, False: 3.24M]
  ------------------
  178|   253k|          status = 1;
  179|   253k|        }
  180|  3.49M|      }
  181|       |
  182|  3.99M|      for (j = (order - 1); j >= 0; j--) {
  ------------------
  |  Branch (182:29): [True: 3.49M, False: 495k]
  ------------------
  183|  3.49M|        accu2 = ixheaac_deposit16h_in32(temp_buf1[j]);
  184|  3.49M|        accu2 = ixheaac_mac16x16in32_shl_sat(accu2, parcor[j], temp_buf2[j]);
  185|  3.49M|        temp_buf1[j + 1] = ixheaac_round16(accu2);
  186|  3.49M|        if (ixheaac_abs32_sat(accu2) == 0x7fffffff) {
  ------------------
  |  Branch (186:13): [True: 44.9k, False: 3.45M]
  ------------------
  187|  44.9k|          status = 1;
  188|  44.9k|        }
  189|  3.49M|      }
  190|       |
  191|   495k|      temp_buf1[0] = ixheaac_round16(accu);
  192|   495k|      lpc[i] = ixheaac_round16(accu1);
  193|   495k|      accu1 = 0;
  194|   495k|    }
  195|       |
  196|  67.0k|    accu1 = (status - 1);
  197|       |
  198|  67.0k|    if (accu1 == 0) {
  ------------------
  |  Branch (198:9): [True: 34.4k, False: 32.6k]
  ------------------
  199|  34.4k|      *scale = *scale + 1;
  200|  34.4k|    }
  201|  67.0k|  }
  202|  32.6k|}
ixheaacd_tns_ar_filter_fixed_dec:
  208|  17.8k|{
  209|  17.8k|  WORD32 i, j;
  210|  17.8k|  WORD32 y, state[MAX_ORDER + 1];
  211|  17.8k|  WORD32 acc;
  212|       |
  213|  17.8k|  if ((order & 3) != 0) {
  ------------------
  |  Branch (213:7): [True: 8.54k, False: 9.33k]
  ------------------
  214|  17.0k|    for (i = order + 1; i < ((WORD32)(order & 0xfffffffc) + 4); i++) {
  ------------------
  |  Branch (214:25): [True: 8.49k, False: 8.54k]
  ------------------
  215|  8.49k|      lpc[i] = 0;
  216|  8.49k|    }
  217|  8.54k|    lpc[i] = 0;
  218|  8.54k|    order = ((order & 0xfffffffc) + 4);
  219|  8.54k|    order = order & 31;
  220|  8.54k|  }
  221|  17.8k|  {
  222|   197k|    for (i = 0; i < order; i++) {
  ------------------
  |  Branch (222:17): [True: 179k, False: 17.8k]
  ------------------
  223|   179k|      y = ixheaac_shl32_sat((*spectrum), scale_spec);
  224|   179k|      acc = 0;
  225|       |
  226|  1.06M|      for (j = i; j > 0; j--) {
  ------------------
  |  Branch (226:19): [True: 881k, False: 179k]
  ------------------
  227|   881k|        acc = ixheaacd_mac32_tns_sat(state[j - 1], lpc[j], acc);
  228|   881k|        state[j] = state[j - 1];
  229|   881k|      }
  230|   179k|      y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
  231|   179k|      state[0] = ixheaac_shl32_sat(y, shift_value);
  232|       |
  233|   179k|      *spectrum = y >> scale_spec;
  234|   179k|      spectrum += inc;
  235|   179k|    }
  236|  3.17M|    for (i = order; i < size; i++) {
  ------------------
  |  Branch (236:21): [True: 3.15M, False: 17.8k]
  ------------------
  237|  3.15M|      y = ixheaac_shl32_sat((*spectrum), scale_spec);
  238|  3.15M|      acc = 0;
  239|  36.7M|      for (j = order; j > 0; j--) {
  ------------------
  |  Branch (239:23): [True: 33.6M, False: 3.15M]
  ------------------
  240|  33.6M|        acc = ixheaacd_mac32_tns_sat(state[j - 1], lpc[j], acc);
  241|  33.6M|        state[j] = state[j - 1];
  242|  33.6M|      }
  243|  3.15M|      y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
  244|  3.15M|      state[0] = ixheaac_shl32_sat(y, shift_value);
  245|       |
  246|  3.15M|      *spectrum = y >> scale_spec;
  247|  3.15M|      spectrum += inc;
  248|  3.15M|    }
  249|  17.8k|  }
  250|  17.8k|}
ixheaacd_tns_ma_filter_fixed_ld:
  352|  16.4k|                                     WORD16 shift_value) {
  353|  16.4k|  WORD32 i, j;
  354|  16.4k|  WORD32 y, state[MAX_ORDER];
  355|       |
  356|   169k|  for (i = 0; i < order; i++) state[i] = 0;
  ------------------
  |  Branch (356:15): [True: 153k, False: 16.4k]
  ------------------
  357|       |
  358|  3.19M|  for (i = 0; i < size; i++) {
  ------------------
  |  Branch (358:15): [True: 3.18M, False: 16.4k]
  ------------------
  359|  3.18M|    y = *spectrum;
  360|       |
  361|  35.4M|    for (j = 0; j < order; j++) y += ixheaac_mult32_shl(state[j], lpc[j + 1]);
  ------------------
  |  Branch (361:17): [True: 32.2M, False: 3.18M]
  ------------------
  362|       |
  363|  32.2M|    for (j = order - 1; j > 0; j--) state[j] = state[j - 1];
  ------------------
  |  Branch (363:25): [True: 29.0M, False: 3.18M]
  ------------------
  364|       |
  365|  3.18M|    state[0] = ixheaac_shl32_dir_sat(*spectrum, shift_value);
  366|  3.18M|    *spectrum = y;
  367|  3.18M|    spectrum += inc;
  368|  3.18M|  }
  369|  16.4k|}
ixheaacd_tns_ar_filter_dec:
  373|  30.0k|                                WORD scale_spec, WORD32 *ptr_filter_state) {
  374|  30.0k|  WORD32 i, j;
  375|  30.0k|  WORD32 y;
  376|  30.0k|  WORD32 acc;
  377|       |
  378|  30.0k|  if ((order & 3) != 0) {
  ------------------
  |  Branch (378:7): [True: 26.0k, False: 3.97k]
  ------------------
  379|  33.1k|    for (i = order + 1; i < ((WORD32)(order & (~3)) + 4); i++) {
  ------------------
  |  Branch (379:25): [True: 7.02k, False: 26.0k]
  ------------------
  380|  7.02k|      lpc[i] = 0;
  381|  7.02k|    }
  382|  26.0k|    if (i < (MAX_ORDER + 1)) {
  ------------------
  |  |   24|  26.0k|#define MAX_ORDER 31
  ------------------
  |  Branch (382:9): [True: 26.0k, False: 0]
  ------------------
  383|  26.0k|      lpc[i] = 0;
  384|  26.0k|      order = ((order & (~3)) + 4);
  385|  26.0k|    } else {
  386|      0|      order = MAX_ORDER;
  ------------------
  |  |   24|      0|#define MAX_ORDER 31
  ------------------
  387|      0|    }
  388|  26.0k|  }
  389|       |
  390|   250k|  for (i = 0; i < order; i++) {
  ------------------
  |  Branch (390:15): [True: 220k, False: 30.0k]
  ------------------
  391|   220k|    y = ixheaac_shl32_sat((*spectrum), scale_spec);
  392|   220k|    acc = 0;
  393|       |
  394|   980k|    for (j = i; j > 0; j--) {
  ------------------
  |  Branch (394:17): [True: 759k, False: 220k]
  ------------------
  395|   759k|      acc = ixheaac_add32_sat(
  396|   759k|          acc, ixheaac_mult32x16in32(ptr_filter_state[j - 1], lpc[j]));
  397|   759k|      ptr_filter_state[j] = ptr_filter_state[j - 1];
  398|   759k|    }
  399|       |
  400|   220k|    y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
  401|   220k|    ptr_filter_state[0] = ixheaac_shl32_sat(y, shift_value);
  402|   220k|    *spectrum = y >> scale_spec;
  403|   220k|    spectrum += inc;
  404|   220k|  }
  405|       |
  406|  2.16M|  for (i = order; i < size; i++) {
  ------------------
  |  Branch (406:19): [True: 2.13M, False: 30.0k]
  ------------------
  407|  2.13M|    y = ixheaac_shl32_sat((*spectrum), scale_spec);
  408|  2.13M|    acc = 0;
  409|  18.4M|    for (j = order; j > 0; j--) {
  ------------------
  |  Branch (409:21): [True: 16.3M, False: 2.13M]
  ------------------
  410|  16.3M|      acc = ixheaac_add32_sat(
  411|  16.3M|          acc, ixheaac_mult32x16in32(ptr_filter_state[j - 1], lpc[j]));
  412|  16.3M|      ptr_filter_state[j] = ptr_filter_state[j - 1];
  413|  16.3M|    }
  414|       |
  415|  2.13M|    y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
  416|  2.13M|    ptr_filter_state[0] = ixheaac_shl32_sat(y, shift_value);
  417|  2.13M|    *spectrum = y >> scale_spec;
  418|  2.13M|    spectrum += inc;
  419|  2.13M|  }
  420|  30.0k|}
ixheaacd_calc_max_spectral_line_dec:
  422|   490k|WORD32 ixheaacd_calc_max_spectral_line_dec(WORD32 *ptr_tmp, WORD32 size) {
  423|   490k|  WORD32 max_spec_line = 0, i;
  424|   490k|  WORD unroll_cnt, rem;
  425|       |
  426|   490k|  unroll_cnt = size >> 3;
  427|  38.6M|  for (i = unroll_cnt; i--;) {
  ------------------
  |  Branch (427:24): [True: 38.2M, False: 490k]
  ------------------
  428|  38.2M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  429|  38.2M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  430|  38.2M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  431|  38.2M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  432|       |
  433|  38.2M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  434|  38.2M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  435|  38.2M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  436|  38.2M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  437|  38.2M|  }
  438|       |
  439|   490k|  rem = size - (unroll_cnt << 3);
  440|       |
  441|   490k|  if (rem) {
  ------------------
  |  Branch (441:7): [True: 65.6k, False: 425k]
  ------------------
  442|   328k|    for (i = rem; i--;) {
  ------------------
  |  Branch (442:19): [True: 262k, False: 65.6k]
  ------------------
  443|   262k|      max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  444|   262k|    }
  445|  65.6k|  }
  446|       |
  447|   490k|  return ixheaac_norm32(max_spec_line);
  448|   490k|}
ixheaacd_aac_tns.c:ixheaacd_mac32_tns_sat:
   59|  34.5M|                                                     WORD32 c) {
   60|  34.5M|  WORD32 result;
   61|  34.5M|  WORD64 temp_result;
   62|       |
   63|  34.5M|  temp_result = (WORD64)a * (WORD64)b;
   64|  34.5M|  result = (WORD32)(temp_result >> 32);
   65|  34.5M|  result = ixheaac_add32_sat(c, result);
   66|  34.5M|  return (result);
   67|  34.5M|}

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

ixheaacd_check_for_sbr_payload:
   65|   128k|                                    WORD32 is_init, WORD32 *is_first, WORD32 ec_flag) {
   66|   128k|  FLAG ret = 0;
   67|   128k|  WORD32 count;
   68|       |
   69|   128k|  if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (69:7): [True: 79.0k, False: 48.9k]
  ------------------
   70|  79.0k|    count = it_bit_buff->cnt_bits >> 3;
   71|  79.0k|    if (adtsheader == 1) count = cnt_bits >> 3;
  ------------------
  |  Branch (71:9): [True: 0, False: 79.0k]
  ------------------
   72|  79.0k|  } else {
   73|  48.9k|    count = ixheaacd_read_bits_buf(it_bit_buff, 4);
   74|       |
   75|  48.9k|    if ((count - 15) == 0) {
  ------------------
  |  Branch (75:9): [True: 7.62k, False: 41.3k]
  ------------------
   76|  7.62k|      WORD32 esc_count;
   77|  7.62k|      esc_count = ixheaacd_read_bits_buf(it_bit_buff, 8);
   78|  7.62k|      count = (esc_count + 14);
   79|  7.62k|    }
   80|  48.9k|  }
   81|       |
   82|   128k|  if (count > 0) {
  ------------------
  |  Branch (82:7): [True: 120k, False: 7.92k]
  ------------------
   83|   120k|    WORD32 extension_type;
   84|       |
   85|   120k|    if (object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (85:9): [True: 78.7k, False: 41.3k]
  ------------------
   86|  78.7k|      extension_type = ld_sbr_crc_flag ? SBR_EXTENSION_CRC : SBR_EXTENSION;
  ------------------
  |  |   27|  12.7k|#define SBR_EXTENSION_CRC 14
  ------------------
                    extension_type = ld_sbr_crc_flag ? SBR_EXTENSION_CRC : SBR_EXTENSION;
  ------------------
  |  |   26|  66.0k|#define SBR_EXTENSION 13
  ------------------
  |  Branch (86:24): [True: 12.7k, False: 66.0k]
  ------------------
   87|  41.3k|    else
   88|  41.3k|      extension_type = ixheaacd_read_bits_buf(it_bit_buff, 4);
   89|       |
   90|   120k|    if (((count < MAXSBRBYTES)) &&
  ------------------
  |  |   31|   120k|#define MAXSBRBYTES 1024
  ------------------
  |  Branch (90:9): [True: 84.1k, False: 35.9k]
  ------------------
   91|  84.1k|        (((extension_type == SBR_EXTENSION)) || ((extension_type == SBR_EXTENSION_CRC))) &&
  ------------------
  |  |   26|  84.1k|#define SBR_EXTENSION 13
  ------------------
                      (((extension_type == SBR_EXTENSION)) || ((extension_type == SBR_EXTENSION_CRC))) &&
  ------------------
  |  |   27|  32.2k|#define SBR_EXTENSION_CRC 14
  ------------------
  |  Branch (91:10): [True: 51.9k, False: 32.2k]
  |  Branch (91:49): [True: 15.5k, False: 16.6k]
  ------------------
   92|  67.5k|        ((prev_element == SBR_ID_SCE) || (prev_element == SBR_ID_CPE) ||
  ------------------
  |  Branch (92:10): [True: 24.2k, False: 43.2k]
  |  Branch (92:42): [True: 32.5k, False: 10.7k]
  ------------------
   93|  10.7k|         sub_d(prev_element, SBR_ID_CCE) == 0)
  ------------------
  |  |   24|  10.7k|#define sub_d(a, b) ((a) - (b))
  ------------------
  |  Branch (93:10): [True: 10.0k, False: 624]
  ------------------
   94|       |
   95|   120k|            ) {
   96|  66.8k|      WORD32 no_elements = pstr_stream_sbr->no_elements;
   97|  66.8k|      WORD32 byte_count;
   98|  66.8k|      ia_sbr_element_stream_struct *ptr_stream_sbr;
   99|       |
  100|  66.8k|      ret = 1;
  101|       |
  102|  66.8k|      ptr_stream_sbr = &pstr_stream_sbr->str_sbr_ele[no_elements];
  103|       |
  104|  66.8k|      if (ec_flag) {
  ------------------
  |  Branch (104:11): [True: 0, False: 66.8k]
  ------------------
  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|  66.8k|      if (ec_flag) {
  ------------------
  |  Branch (111:11): [True: 0, False: 66.8k]
  ------------------
  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|  66.8k|      } else {
  117|  66.8k|        ptr_stream_sbr->size_payload = count;
  118|  66.8k|        byte_count = ptr_stream_sbr->size_payload;
  119|  66.8k|        ptr_stream_sbr->extension_type = extension_type;
  120|  66.8k|        ptr_stream_sbr->sbr_ele_id = prev_element;
  121|  66.8k|      }
  122|  66.8k|      pstr_stream_sbr->no_elements = no_elements + 1;
  123|       |
  124|  66.8k|      if (pstr_drc_dec) pstr_drc_dec->sbr_found = 1;
  ------------------
  |  Branch (124:11): [True: 66.8k, False: 0]
  ------------------
  125|       |
  126|  66.8k|      if (ec_flag) {
  ------------------
  |  Branch (126:11): [True: 0, False: 66.8k]
  ------------------
  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|  66.8k|      if (byte_count > 0 && sub_d(byte_count, MAXSBRBYTES) <= 0) {
  ------------------
  |  |   24|  66.8k|#define sub_d(a, b) ((a) - (b))
  ------------------
  |  Branch (131:11): [True: 66.8k, False: 0]
  |  Branch (131:29): [True: 66.8k, False: 0]
  ------------------
  132|  66.8k|        WORD32 i;
  133|  66.8k|        WORD8 *ptr_sbr_data;
  134|  66.8k|        if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (134:13): [True: 24.3k, False: 42.5k]
  ------------------
  135|  24.3k|          if (ec_flag) {
  ------------------
  |  Branch (135:15): [True: 0, False: 24.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|  24.3k|          } else {
  139|  24.3k|            ptr_sbr_data = &ptr_stream_sbr->ptr_sbr_data[1];
  140|  24.3k|            ptr_stream_sbr->ptr_sbr_data[0] = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, 4);
  141|  24.3k|          }
  142|  42.5k|        } else {
  143|  42.5k|          if (ec_flag) {
  ------------------
  |  Branch (143:15): [True: 0, False: 42.5k]
  ------------------
  144|      0|            ptr_sbr_data = ptr_stream_sbr->sbr_prev_data;
  145|  42.5k|          } else {
  146|  42.5k|            ptr_sbr_data = ptr_stream_sbr->ptr_sbr_data;
  147|  42.5k|          }
  148|  42.5k|        }
  149|  14.0M|        for (i = byte_count - 2; i >= 0; i--) {
  ------------------
  |  Branch (149:34): [True: 13.9M, False: 66.8k]
  ------------------
  150|  13.9M|          *ptr_sbr_data++ = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, 8);
  151|  13.9M|          if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (151:15): [True: 13.7M, False: 211k]
  ------------------
  152|  13.7M|            if (adtsheader == 1) {
  ------------------
  |  Branch (152:17): [True: 0, False: 13.7M]
  ------------------
  153|      0|              cnt_bits = cnt_bits - 8;
  154|      0|            }
  155|  13.7M|          }
  156|  13.9M|        }
  157|       |
  158|  66.8k|        if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (158:13): [True: 42.5k, False: 24.3k]
  ------------------
  159|  42.5k|          *ptr_sbr_data++ = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, 8);
  160|  42.5k|          if (adtsheader == 1) {
  ------------------
  |  Branch (160:15): [True: 0, False: 42.5k]
  ------------------
  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|  42.5k|          } else {
  172|  42.5k|            if (it_bit_buff->cnt_bits > 0) {
  ------------------
  |  Branch (172:17): [True: 36.6k, False: 5.84k]
  ------------------
  173|  36.6k|              WORD32 unaligned_bits = (8 - it_bit_buff->cnt_bits);
  174|  36.6k|              *ptr_sbr_data = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
  175|  36.6k|              *ptr_sbr_data = *ptr_sbr_data << unaligned_bits;
  176|  36.6k|              if (!ec_flag)
  ------------------
  |  Branch (176:19): [True: 36.6k, False: 0]
  ------------------
  177|  36.6k|                ptr_stream_sbr->size_payload++;
  178|      0|              else
  179|      0|                ptr_stream_sbr->size_payload_old++;
  180|  36.6k|            }
  181|  42.5k|          }
  182|  42.5k|        }
  183|  66.8k|      }
  184|       |
  185|  66.8k|    } else if (extension_type == EXT_DYNAMIC_RANGE) {
  ------------------
  |  |   23|  53.1k|#define EXT_DYNAMIC_RANGE 11
  ------------------
  |  Branch (185:16): [True: 542, False: 52.6k]
  ------------------
  186|    542|      pstr_drc_dec->drc_element_found = 1;
  187|    542|      count -= ixheaacd_dec_drc_read_element(pstr_drc_dec, drc_dummy, it_bit_buff);
  188|  52.6k|    } else if (extension_type == EXT_SAC_DATA) {
  ------------------
  |  |   25|  52.6k|#define EXT_SAC_DATA 12
  ------------------
  |  Branch (188:16): [True: 13.4k, False: 39.2k]
  ------------------
  189|  13.4k|      WORD32 anc_type, anc_start, i, len = 0;
  190|  13.4k|      anc_type = ixheaacd_read_bits_buf(it_bit_buff, 2);
  191|  13.4k|      *mps_header = anc_type;
  192|       |
  193|  13.4k|      anc_start = ixheaacd_read_bits_buf(it_bit_buff, 1);
  194|  13.4k|      if (anc_start == 1) {
  ------------------
  |  Branch (194:11): [True: 10.2k, False: 3.21k]
  ------------------
  195|  10.2k|        *mps_bytes = 0;
  196|  10.2k|      }
  197|  13.4k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  198|       |
  199|  13.4k|      if (anc_type == 1 && is_init == 0 && *is_first == 1) {
  ------------------
  |  Branch (199:11): [True: 2.80k, False: 10.6k]
  |  Branch (199:28): [True: 1.05k, False: 1.75k]
  |  Branch (199:44): [True: 667, False: 386]
  ------------------
  200|    667|        len = ixheaacd_read_bits_buf(it_bit_buff, 1);
  201|    667|        len = ixheaacd_read_bits_buf(it_bit_buff, 7) + 1;
  202|    667|        ixheaacd_read_bidirection(it_bit_buff, -8);
  203|    667|      }
  204|       |
  205|       |
  206|  13.4k|      if (*mps_bytes < 0 ||
  ------------------
  |  Branch (206:11): [True: 1, False: 13.4k]
  ------------------
  207|  13.4k|        (count - 1) >(IA_ENHAACPLUS_DEC_MPS_PAYLOAD_SIZE - *mps_bytes)) {
  ------------------
  |  |  124|  13.4k|#define IA_ENHAACPLUS_DEC_MPS_PAYLOAD_SIZE (1024)
  ------------------
  |  Branch (207:9): [True: 0, False: 13.4k]
  ------------------
  208|      0|        *mps_bytes = 0;
  209|      0|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  210|      0|          IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  211|      0|      }
  212|       |
  213|   491k|      for (i = 0; i < count - 1; i++) {
  ------------------
  |  Branch (213:19): [True: 478k, False: 13.4k]
  ------------------
  214|   478k|        mps_buffer[i + *mps_bytes] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  215|   478k|      }
  216|       |
  217|  13.4k|      *mps_bytes += (count - 1);
  218|  13.4k|      if (anc_type == 1 && is_init == 0 && *is_first == 1) {
  ------------------
  |  Branch (218:11): [True: 2.80k, False: 10.6k]
  |  Branch (218:28): [True: 1.05k, False: 1.75k]
  |  Branch (218:44): [True: 667, False: 386]
  ------------------
  219|    667|        if (*mps_bytes < len) {
  ------------------
  |  Branch (219:13): [True: 6, False: 661]
  ------------------
  220|      6|          if (ec_flag) {
  ------------------
  |  Branch (220:15): [True: 0, False: 6]
  ------------------
  221|      0|            *mps_bytes = 0;
  222|      0|          }
  223|      6|          longjmp(*(it_bit_buff->xaac_jmp_buf),
  224|      6|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      6|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  225|      6|        }
  226|  17.8k|        for (i = 0; i < count - 1; i++) {
  ------------------
  |  Branch (226:21): [True: 17.2k, False: 661]
  ------------------
  227|  17.2k|          mps_buffer[i] = mps_buffer[i + len];
  228|  17.2k|        }
  229|    661|        *mps_bytes = *mps_bytes - len;
  230|    661|      }
  231|  13.4k|      *is_first = 1;
  232|  39.2k|    } else {
  233|  39.2k|      ixheaacd_read_bits_buf(it_bit_buff, 4);
  234|       |
  235|  39.2k|      if (it_bit_buff->cnt_bits < ((count - 1) << 3)) {
  ------------------
  |  Branch (235:11): [True: 13, False: 39.1k]
  ------------------
  236|     13|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  237|     13|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     13|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  238|     13|      }
  239|  39.1k|      it_bit_buff->ptr_read_next += count - 1;
  240|  39.1k|      it_bit_buff->cnt_bits -= ((count - 1) << 3);
  241|  39.1k|    }
  242|   120k|  }
  243|   127k|  return (ret);
  244|   128k|}

ixheaacd_get_mode_lpc:
   53|   387k|WORD32 ixheaacd_get_mode_lpc(WORD32 lpc_set, ia_bit_buf_struct *it_bit_buff, WORD32 *nk_mode) {
   54|   387k|  WORD32 mode_lpc = 0;
   55|   387k|  switch (lpc_set) {
  ------------------
  |  Branch (55:11): [True: 387k, False: 0]
  ------------------
   56|  89.7k|    case 4:
  ------------------
  |  Branch (56:5): [True: 89.7k, False: 298k]
  ------------------
   57|  89.7k|      mode_lpc = 0;
   58|  89.7k|      break;
   59|  60.7k|    case 0:
  ------------------
  |  Branch (59:5): [True: 60.7k, False: 327k]
  ------------------
   60|   149k|    case 2:
  ------------------
  |  Branch (60:5): [True: 89.1k, False: 298k]
  ------------------
   61|   149k|      mode_lpc = ixheaacd_read_bits_buf(it_bit_buff, 1);
   62|   149k|      if (mode_lpc == 1) *nk_mode = 3;
  ------------------
  |  Branch (62:11): [True: 48.0k, False: 101k]
  ------------------
   63|   149k|      break;
   64|  64.8k|    case 1:
  ------------------
  |  Branch (64:5): [True: 64.8k, False: 323k]
  ------------------
   65|  64.8k|      if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (65:11): [True: 44.2k, False: 20.5k]
  ------------------
   66|  44.2k|        mode_lpc = *nk_mode = 2;
   67|  20.5k|      else {
   68|  20.5k|        if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (68:13): [True: 15.5k, False: 4.95k]
  ------------------
   69|  15.5k|          mode_lpc = *nk_mode = 0;
   70|  4.95k|        else
   71|  4.95k|          mode_lpc = *nk_mode = 1;
   72|  20.5k|      }
   73|  64.8k|      break;
   74|  83.5k|    case 3:
  ------------------
  |  Branch (74:5): [True: 83.5k, False: 304k]
  ------------------
   75|  83.5k|      if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (75:11): [True: 53.2k, False: 30.2k]
  ------------------
   76|  53.2k|        mode_lpc = *nk_mode = 1;
   77|  30.2k|      else {
   78|  30.2k|        if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (78:13): [True: 19.3k, False: 10.9k]
  ------------------
   79|  19.3k|          mode_lpc = *nk_mode = 0;
   80|  10.9k|        else {
   81|  10.9k|          if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (81:15): [True: 3.06k, False: 7.89k]
  ------------------
   82|  3.06k|            mode_lpc = 2;
   83|  7.89k|          else
   84|  7.89k|            mode_lpc = 3;
   85|  10.9k|          *nk_mode = 2;
   86|  10.9k|        }
   87|  30.2k|      }
   88|  83.5k|      break;
   89|   387k|  }
   90|   387k|  return mode_lpc;
   91|   387k|}
ixheaacd_qn_data:
   93|   382k|VOID ixheaacd_qn_data(WORD32 nk_mode, WORD32 *qn, ia_bit_buf_struct *it_bit_buff) {
   94|   382k|  WORD32 k;
   95|   382k|  switch (nk_mode) {
  ------------------
  |  Branch (95:11): [True: 382k, False: 0]
  ------------------
   96|  53.2k|    case 1:
  ------------------
  |  Branch (96:5): [True: 53.2k, False: 329k]
  ------------------
   97|   159k|      for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (97:19): [True: 106k, False: 53.2k]
  ------------------
   98|   147k|        while (ixheaacd_read_bits_buf(it_bit_buff, 1) == 1) {
  ------------------
  |  Branch (98:16): [True: 41.4k, False: 106k]
  ------------------
   99|  41.4k|          qn[k] += 1;
  100|  41.4k|        }
  101|   106k|        if (qn[k] > 0) qn[k] += 1;
  ------------------
  |  Branch (101:13): [True: 27.3k, False: 79.0k]
  ------------------
  102|   106k|      }
  103|  53.2k|      break;
  104|   212k|    case 0:
  ------------------
  |  Branch (104:5): [True: 212k, False: 170k]
  ------------------
  105|   267k|    case 2:
  ------------------
  |  Branch (105:5): [True: 55.2k, False: 327k]
  ------------------
  106|   329k|    case 3:
  ------------------
  |  Branch (106:5): [True: 61.7k, False: 321k]
  ------------------
  107|   989k|      for (k = 0; k < 2; k++) qn[k] = 2 + ixheaacd_read_bits_buf(it_bit_buff, 2);
  ------------------
  |  Branch (107:19): [True: 659k, False: 329k]
  ------------------
  108|       |
  109|   329k|      if (nk_mode == 2) {
  ------------------
  |  Branch (109:11): [True: 55.2k, False: 274k]
  ------------------
  110|   165k|        for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (110:21): [True: 110k, False: 55.2k]
  ------------------
  111|   110k|          if (qn[k] > 4) {
  ------------------
  |  Branch (111:15): [True: 17.3k, False: 93.1k]
  ------------------
  112|  17.3k|            qn[k] = 0;
  113|       |
  114|  47.9k|            while (ixheaacd_read_bits_buf(it_bit_buff, 1) == 1) qn[k] += 1;
  ------------------
  |  Branch (114:20): [True: 30.5k, False: 17.3k]
  ------------------
  115|       |
  116|  17.3k|            if (qn[k] > 0) qn[k] += 4;
  ------------------
  |  Branch (116:17): [True: 7.09k, False: 10.2k]
  ------------------
  117|  17.3k|          }
  118|   110k|        }
  119|   274k|      } else {
  120|   823k|        for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (120:21): [True: 548k, False: 274k]
  ------------------
  121|   548k|          if (qn[k] > 4) {
  ------------------
  |  Branch (121:15): [True: 90.2k, False: 458k]
  ------------------
  122|  90.2k|            WORD32 qn_ext = 0;
  123|   278k|            while (ixheaacd_read_bits_buf(it_bit_buff, 1) == 1) qn_ext += 1;
  ------------------
  |  Branch (123:20): [True: 188k, False: 90.2k]
  ------------------
  124|       |
  125|  90.2k|            switch (qn_ext) {
  126|  47.4k|              case 0:
  ------------------
  |  Branch (126:15): [True: 47.4k, False: 42.8k]
  ------------------
  127|  47.4k|                qn[k] = 5;
  128|  47.4k|                break;
  129|  19.3k|              case 1:
  ------------------
  |  Branch (129:15): [True: 19.3k, False: 70.9k]
  ------------------
  130|  19.3k|                qn[k] = 6;
  131|  19.3k|                break;
  132|  6.63k|              case 2:
  ------------------
  |  Branch (132:15): [True: 6.63k, False: 83.6k]
  ------------------
  133|  6.63k|                qn[k] = 0;
  134|  6.63k|                break;
  135|  16.7k|              default:
  ------------------
  |  Branch (135:15): [True: 16.7k, False: 73.4k]
  ------------------
  136|  16.7k|                qn[k] = qn_ext + 4;
  137|  16.7k|                break;
  138|  90.2k|            }
  139|  90.2k|          }
  140|   548k|        }
  141|   274k|      }
  142|   329k|      break;
  143|   382k|  }
  144|   382k|  return;
  145|   382k|}
ixheaacd_code_book_indices:
  148|   382k|                                WORD32 *pos, ia_bit_buf_struct *it_bit_buff) {
  149|   382k|  WORD32 k, qn[2] = {0, 0}, nk, n, i;
  150|       |
  151|   382k|  ixheaacd_qn_data(nk_mode, &qn[0], it_bit_buff);
  152|       |
  153|   382k|  pstr_td_frame_data->lpc_first_approx_idx[(*pos)++] = qn[0];
  154|   382k|  pstr_td_frame_data->lpc_first_approx_idx[(*pos)++] = qn[1];
  155|       |
  156|  1.14M|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (156:15): [True: 765k, False: 382k]
  ------------------
  157|   765k|    if (qn[k] > 0) {
  ------------------
  |  Branch (157:9): [True: 669k, False: 95.9k]
  ------------------
  158|   669k|      if (qn[k] > 4) {
  ------------------
  |  Branch (158:11): [True: 92.3k, False: 577k]
  ------------------
  159|  92.3k|        nk = (qn[k] - 3) / 2;
  160|  92.3k|        n = qn[k] - nk * 2;
  161|   577k|      } else {
  162|   577k|        nk = 0;
  163|   577k|        n = qn[k];
  164|   577k|      }
  165|   669k|      pstr_td_frame_data->lpc_first_approx_idx[(*pos)++] =
  166|   669k|          ixheaacd_read_bits_buf(it_bit_buff, 4 * n);
  167|       |
  168|  6.02M|      for (i = 0; i < 8; i++)
  ------------------
  |  Branch (168:19): [True: 5.35M, False: 669k]
  ------------------
  169|  5.35M|        pstr_td_frame_data->lpc_first_approx_idx[(*pos)++] =
  170|  5.35M|            ixheaacd_read_bits_buf(it_bit_buff, nk);
  171|   669k|    }
  172|   765k|  }
  173|   382k|  return;
  174|   382k|}
ixheaacd_lpc_data:
  178|  89.7k|                       ia_bit_buf_struct *it_bit_buff) {
  179|  89.7k|  WORD32 mode_lpc, nk_mode = 0, j = 0;
  180|       |
  181|  89.7k|  mode_lpc = ixheaacd_get_mode_lpc(4, it_bit_buff, &nk_mode);
  182|       |
  183|  89.7k|  pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  184|       |
  185|  89.7k|  ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  186|  89.7k|  if (first_lpd_flag) {
  ------------------
  |  Branch (186:7): [True: 60.7k, False: 28.9k]
  ------------------
  187|  60.7k|    mode_lpc = ixheaacd_get_mode_lpc(0, it_bit_buff, &nk_mode);
  188|  60.7k|    pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
  189|       |
  190|  60.7k|    if (mode_lpc == 0)
  ------------------
  |  Branch (190:9): [True: 41.1k, False: 19.6k]
  ------------------
  191|  41.1k|      pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  192|       |
  193|  60.7k|    ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  194|  60.7k|  }
  195|  89.7k|  if (mod[0] < 3) {
  ------------------
  |  Branch (195:7): [True: 89.1k, False: 649]
  ------------------
  196|  89.1k|    mode_lpc = ixheaacd_get_mode_lpc(2, it_bit_buff, &nk_mode);
  197|  89.1k|    pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
  198|       |
  199|  89.1k|    if (mode_lpc == 0)
  ------------------
  |  Branch (199:9): [True: 60.7k, False: 28.3k]
  ------------------
  200|  60.7k|      pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  201|       |
  202|  89.1k|    ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  203|  89.1k|  }
  204|  89.7k|  if (mod[0] < 2) {
  ------------------
  |  Branch (204:7): [True: 64.8k, False: 24.9k]
  ------------------
  205|  64.8k|    mode_lpc = ixheaacd_get_mode_lpc(1, it_bit_buff, &nk_mode);
  206|  64.8k|    pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
  207|       |
  208|  64.8k|    if (mode_lpc == 0)
  ------------------
  |  Branch (208:9): [True: 15.5k, False: 49.2k]
  ------------------
  209|  15.5k|      pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  210|       |
  211|  64.8k|    if (mode_lpc != 1) ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  ------------------
  |  Branch (211:9): [True: 59.8k, False: 4.95k]
  ------------------
  212|  64.8k|  }
  213|  89.7k|  if (mod[2] < 2) {
  ------------------
  |  Branch (213:7): [True: 83.5k, False: 6.24k]
  ------------------
  214|  83.5k|    mode_lpc = ixheaacd_get_mode_lpc(3, it_bit_buff, &nk_mode);
  215|  83.5k|    pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
  216|       |
  217|  83.5k|    if (mode_lpc == 0)
  ------------------
  |  Branch (217:9): [True: 19.3k, False: 64.1k]
  ------------------
  218|  19.3k|      pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  219|       |
  220|  83.5k|    ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  221|  83.5k|  }
  222|  89.7k|  return;
  223|  89.7k|}
ixheaacd_fac_decoding:
  226|   229k|                           ia_bit_buf_struct *it_bit_buff) {
  227|   229k|  WORD32 i, j, n, qn, nk, kv[8];
  228|   229k|  long code_book_index;
  229|       |
  230|  3.49M|  for (i = 0; i < fac_length; i += 8) {
  ------------------
  |  Branch (230:15): [True: 3.26M, False: 229k]
  ------------------
  231|  3.26M|    qn = 0;
  232|  5.52M|    while (ixheaacd_read_bits_buf(it_bit_buff, 1) == 1) {
  ------------------
  |  Branch (232:12): [True: 2.26M, False: 3.26M]
  ------------------
  233|  2.26M|      qn += 1;
  234|  2.26M|    }
  235|  3.26M|    if (qn != 0) qn += 1;
  ------------------
  |  Branch (235:9): [True: 1.12M, False: 2.14M]
  ------------------
  236|       |
  237|  3.26M|    nk = 0;
  238|  3.26M|    n = qn;
  239|  3.26M|    if (qn > 4) {
  ------------------
  |  Branch (239:9): [True: 67.4k, False: 3.19M]
  ------------------
  240|  67.4k|      nk = (qn - 3) >> 1;
  241|  67.4k|      n = qn - nk * 2;
  242|  67.4k|    }
  243|       |
  244|  3.26M|    code_book_index = ixheaacd_read_bits_buf(it_bit_buff, 4 * n);
  245|       |
  246|  29.3M|    for (j = 0; j < 8; j++) {
  ------------------
  |  Branch (246:17): [True: 26.1M, False: 3.26M]
  ------------------
  247|  26.1M|      kv[j] = ixheaacd_read_bits_buf(it_bit_buff, nk);
  248|  26.1M|    }
  249|       |
  250|  3.26M|    ixheaacd_rotated_gosset_mtx_dec(qn, code_book_index, kv, &fac_prm[k * FAC_LENGTH + i]);
  ------------------
  |  |   33|  3.26M|#define FAC_LENGTH 128
  ------------------
  251|  3.26M|  }
  252|   229k|}
ixheaacd_acelp_decoding:
  260|   203k|                             ia_bit_buf_struct *it_bit_buff, WORD32 chan) {
  261|   203k|  WORD32 sfr, kk;
  262|   203k|  WORD32 nb_subfr = usac_data->num_subfrm;
  263|   203k|  const UWORD8 *ptr_num_bits =
  264|   203k|      &ixheaacd_num_bites_celp_coding[pstr_td_frame_data->acelp_core_mode][0];
  265|       |
  266|   203k|  chan = 0;
  267|   203k|  pstr_td_frame_data->mean_energy[k] = ixheaacd_read_bits_buf(it_bit_buff, 2);
  268|       |
  269|   962k|  for (sfr = 0; sfr < nb_subfr; sfr++) {
  ------------------
  |  Branch (269:17): [True: 758k, False: 203k]
  ------------------
  270|   758k|    kk = k * 4 + sfr;
  271|       |
  272|   758k|    if ((sfr == 0) || ((nb_subfr == 4) && (sfr == 2)))
  ------------------
  |  Branch (272:9): [True: 203k, False: 555k]
  |  Branch (272:24): [True: 450k, False: 105k]
  |  Branch (272:43): [True: 150k, False: 300k]
  ------------------
  273|   353k|      pstr_td_frame_data->acb_index[kk] = ixheaacd_read_bits_buf(it_bit_buff, 9);
  274|       |
  275|   405k|    else
  276|   405k|      pstr_td_frame_data->acb_index[kk] = ixheaacd_read_bits_buf(it_bit_buff, 6);
  277|       |
  278|   758k|    pstr_td_frame_data->ltp_filtering_flag[kk] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  279|       |
  280|   758k|    if (pstr_td_frame_data->acelp_core_mode == 5) {
  ------------------
  |  Branch (280:9): [True: 62.1k, False: 696k]
  ------------------
  281|  62.1k|      pstr_td_frame_data->icb_index[kk][0] =
  282|  62.1k|          ixheaacd_read_bits_buf(it_bit_buff, 2);
  283|  62.1k|      pstr_td_frame_data->icb_index[kk][1] =
  284|  62.1k|          ixheaacd_read_bits_buf(it_bit_buff, 2);
  285|  62.1k|      pstr_td_frame_data->icb_index[kk][2] =
  286|  62.1k|          ixheaacd_read_bits_buf(it_bit_buff, 2);
  287|  62.1k|      pstr_td_frame_data->icb_index[kk][3] =
  288|  62.1k|          ixheaacd_read_bits_buf(it_bit_buff, 2);
  289|  62.1k|      pstr_td_frame_data->icb_index[kk][4] =
  290|  62.1k|          ixheaacd_read_bits_buf(it_bit_buff, 14);
  291|  62.1k|      pstr_td_frame_data->icb_index[kk][5] =
  292|  62.1k|          ixheaacd_read_bits_buf(it_bit_buff, 14);
  293|  62.1k|      pstr_td_frame_data->icb_index[kk][6] =
  294|  62.1k|          ixheaacd_read_bits_buf(it_bit_buff, 14);
  295|  62.1k|      pstr_td_frame_data->icb_index[kk][7] =
  296|  62.1k|          ixheaacd_read_bits_buf(it_bit_buff, 14);
  297|   696k|    } else {
  298|   696k|      pstr_td_frame_data->icb_index[kk][0] =
  299|   696k|          ixheaacd_read_bits_buf(it_bit_buff, ptr_num_bits[0]);
  300|   696k|      pstr_td_frame_data->icb_index[kk][1] =
  301|   696k|          ixheaacd_read_bits_buf(it_bit_buff, ptr_num_bits[1]);
  302|   696k|      pstr_td_frame_data->icb_index[kk][2] =
  303|   696k|          ixheaacd_read_bits_buf(it_bit_buff, ptr_num_bits[2]);
  304|   696k|      pstr_td_frame_data->icb_index[kk][3] =
  305|   696k|          ixheaacd_read_bits_buf(it_bit_buff, ptr_num_bits[3]);
  306|   696k|    }
  307|       |
  308|   758k|    pstr_td_frame_data->gains[kk] = ixheaacd_read_bits_buf(it_bit_buff, 7);
  309|   758k|  }
  310|   203k|}
ixheaacd_tcx_coding:
  314|   126k|                         ia_bit_buf_struct *it_bit_buff) {
  315|   126k|  pstr_td_frame_data->noise_factor[k] = ixheaacd_read_bits_buf(it_bit_buff, 3);
  316|       |
  317|   126k|  pstr_td_frame_data->global_gain[k] = ixheaacd_read_bits_buf(it_bit_buff, 7);
  318|       |
  319|   126k|  switch (pstr_td_frame_data->mod[k]) {
  ------------------
  |  Branch (319:11): [True: 126k, False: 6]
  ------------------
  320|  95.6k|    case 1:
  ------------------
  |  Branch (320:5): [True: 95.6k, False: 30.5k]
  ------------------
  321|  95.6k|      pstr_td_frame_data->tcx_lg[k] = usac_data->len_subfrm;
  322|  95.6k|      break;
  323|  29.9k|    case 2:
  ------------------
  |  Branch (323:5): [True: 29.9k, False: 96.2k]
  ------------------
  324|  29.9k|      pstr_td_frame_data->tcx_lg[k] = 2 * (usac_data->len_subfrm);
  325|  29.9k|      break;
  326|    560|    case 3:
  ------------------
  |  Branch (326:5): [True: 560, False: 125k]
  ------------------
  327|    560|      pstr_td_frame_data->tcx_lg[k] = 4 * (usac_data->len_subfrm);
  328|    560|      break;
  329|   126k|  }
  330|       |
  331|   126k|  if (first_tcx_flag) {
  ------------------
  |  Branch (331:7): [True: 80.3k, False: 45.8k]
  ------------------
  332|  80.3k|    if (usac_data->usac_independency_flg) {
  ------------------
  |  Branch (332:9): [True: 32.8k, False: 47.4k]
  ------------------
  333|  32.8k|      pstr_td_frame_data->arith_reset_flag = 1;
  334|  47.4k|    } else {
  335|  47.4k|      pstr_td_frame_data->arith_reset_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  336|  47.4k|    }
  337|  80.3k|  }
  338|       |
  339|   126k|  ixheaacd_arith_data(pstr_td_frame_data, quant, usac_data, it_bit_buff, (first_tcx_flag), k);
  340|       |
  341|   126k|  return;
  342|   126k|}
ixheaacd_lpd_channel_stream:
  346|  98.3k|                                   ia_bit_buf_struct *it_bit_buff, FLOAT32 *synth) {
  347|  98.3k|  WORD32 lpd_mode, k, cnt, ii;
  348|  98.3k|  WORD32 first_tcx_flag;
  349|  98.3k|  WORD32 *quant;
  350|  98.3k|  WORD32 core_mode_last = 0, fac_data_present;
  351|  98.3k|  WORD32 *fac_data;
  352|  98.3k|  WORD32 first_lpd_flag = 0;
  353|  98.3k|  WORD32 short_fac_flag;
  354|  98.3k|  WORD32 bpf_control_info = 0;
  355|  98.3k|  WORD32 chan = usac_data->present_chan;
  356|  98.3k|  WORD32 last_lpd_mode = usac_data->str_tddec[chan]->mode_prev;
  357|  98.3k|  WORD32 err = 0;
  358|  98.3k|  short_fac_flag = 0;
  359|       |
  360|  98.3k|  jmp_buf local;
  361|       |
  362|  98.3k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (362:7): [True: 0, False: 98.3k]
  ------------------
  363|      0|    err = setjmp(local);
  364|      0|  }
  365|       |
  366|  98.3k|  if (usac_data->sampling_rate_idx <= 5 && usac_data->ec_flag) {
  ------------------
  |  Branch (366:7): [True: 7.00k, False: 91.3k]
  |  Branch (366:44): [True: 0, False: 7.00k]
  ------------------
  367|      0|    usac_data->frame_ok = 0;
  368|      0|  }
  369|       |
  370|  98.3k|  if (err == 0 && usac_data->frame_ok == 1) {
  ------------------
  |  Branch (370:7): [True: 98.3k, False: 0]
  |  Branch (370:19): [True: 98.3k, False: 0]
  ------------------
  371|  98.3k|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (371:9): [True: 0, False: 98.3k]
  ------------------
  372|      0|      it_bit_buff->xaac_jmp_buf = &local;
  373|      0|    }
  374|  98.3k|    pstr_td_frame_data->acelp_core_mode = ixheaacd_read_bits_buf(it_bit_buff, 3);
  375|       |
  376|  98.3k|    lpd_mode = ixheaacd_read_bits_buf(it_bit_buff, 5);
  377|       |
  378|  98.3k|    if ((lpd_mode > 25 || lpd_mode < 0)) {
  ------------------
  |  Branch (378:10): [True: 7.89k, False: 90.5k]
  |  Branch (378:27): [True: 0, False: 90.5k]
  ------------------
  379|  7.88k|      if (usac_data->ec_flag) {
  ------------------
  |  Branch (379:11): [True: 0, False: 7.88k]
  ------------------
  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|  7.88k|      } else {
  383|  7.88k|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|  7.88k|#define IA_FATAL_ERROR 0x80000000
  ------------------
  384|  7.88k|      }
  385|  7.88k|    }
  386|       |
  387|  90.5k|    if (lpd_mode == 25) {
  ------------------
  |  Branch (387:9): [True: 560, False: 89.9k]
  ------------------
  388|    560|      pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] = pstr_td_frame_data->mod[2] =
  389|    560|          pstr_td_frame_data->mod[3] = 3;
  390|  89.9k|    } else if (lpd_mode == 24) {
  ------------------
  |  Branch (390:16): [True: 894, False: 89.0k]
  ------------------
  391|    894|      pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] = pstr_td_frame_data->mod[2] =
  392|    894|          pstr_td_frame_data->mod[3] = 2;
  393|  89.0k|    } else {
  394|  89.0k|      if (lpd_mode >= 20) {
  ------------------
  |  Branch (394:11): [True: 4.75k, False: 84.3k]
  ------------------
  395|  4.75k|        pstr_td_frame_data->mod[0] = lpd_mode & 1;
  396|  4.75k|        pstr_td_frame_data->mod[1] = (lpd_mode >> 1) & 1;
  397|  4.75k|        pstr_td_frame_data->mod[2] = pstr_td_frame_data->mod[3] = 2;
  398|  84.3k|      } else if (lpd_mode >= 16) {
  ------------------
  |  Branch (398:18): [True: 23.4k, False: 60.8k]
  ------------------
  399|  23.4k|        pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] = 2;
  400|  23.4k|        pstr_td_frame_data->mod[2] = lpd_mode & 1;
  401|  23.4k|        pstr_td_frame_data->mod[3] = (lpd_mode >> 1) & 1;
  402|  60.8k|      } else {
  403|  60.8k|        pstr_td_frame_data->mod[0] = lpd_mode & 1;
  404|  60.8k|        pstr_td_frame_data->mod[1] = (lpd_mode >> 1) & 1;
  405|  60.8k|        pstr_td_frame_data->mod[2] = (lpd_mode >> 2) & 1;
  406|  60.8k|        pstr_td_frame_data->mod[3] = (lpd_mode >> 3) & 1;
  407|  60.8k|      }
  408|  89.0k|    }
  409|       |
  410|  90.5k|    bpf_control_info = ixheaacd_read_bits_buf(it_bit_buff, 1);
  411|       |
  412|  90.5k|    core_mode_last = ixheaacd_read_bits_buf(it_bit_buff, 1);
  413|       |
  414|  90.5k|    fac_data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  415|       |
  416|  90.5k|    first_lpd_flag = (core_mode_last == 0) ? 1 : 0;
  ------------------
  |  Branch (416:22): [True: 61.2k, False: 29.2k]
  ------------------
  417|       |
  418|  90.5k|    quant = pstr_td_frame_data->x_tcx_invquant;
  419|  90.5k|    first_tcx_flag = 1;
  420|  90.5k|    k = 0;
  421|   419k|    while (k < 4) {
  ------------------
  |  Branch (421:12): [True: 329k, False: 90.5k]
  ------------------
  422|   329k|      if (k == 0) {
  ------------------
  |  Branch (422:11): [True: 90.5k, False: 238k]
  ------------------
  423|  90.5k|        if ((core_mode_last == 1) && (fac_data_present == 1))
  ------------------
  |  Branch (423:13): [True: 29.2k, False: 61.2k]
  |  Branch (423:38): [True: 13.0k, False: 16.2k]
  ------------------
  424|  13.0k|          ixheaacd_fac_decoding((usac_data->len_subfrm) / 2, k, pstr_td_frame_data->fac,
  425|  13.0k|                                it_bit_buff);
  426|   238k|      } else {
  427|   238k|        if (((last_lpd_mode == 0) && (pstr_td_frame_data->mod[k] > 0)) ||
  ------------------
  |  Branch (427:14): [True: 136k, False: 102k]
  |  Branch (427:38): [True: 32.5k, False: 103k]
  ------------------
  428|   206k|            ((last_lpd_mode > 0) && (pstr_td_frame_data->mod[k] == 0)))
  ------------------
  |  Branch (428:14): [True: 102k, False: 103k]
  |  Branch (428:37): [True: 68.4k, False: 33.8k]
  ------------------
  429|   101k|          ixheaacd_fac_decoding((usac_data->len_subfrm) / 2, k, pstr_td_frame_data->fac,
  430|   101k|                                it_bit_buff);
  431|   238k|      }
  432|       |
  433|   329k|      if (pstr_td_frame_data->mod[k] == 0) {
  ------------------
  |  Branch (433:11): [True: 203k, False: 126k]
  ------------------
  434|   203k|        ixheaacd_acelp_decoding(k, usac_data, pstr_td_frame_data, it_bit_buff, chan);
  435|   203k|        last_lpd_mode = 0;
  436|   203k|        pstr_td_frame_data->tcx_lg[k] = 0;
  437|   203k|        k += 1;
  438|   203k|      } else {
  439|   126k|        ixheaacd_tcx_coding(usac_data, quant, k, first_tcx_flag, pstr_td_frame_data, it_bit_buff);
  440|   126k|        last_lpd_mode = pstr_td_frame_data->mod[k];
  441|   126k|        quant += pstr_td_frame_data->tcx_lg[k];
  442|       |
  443|   126k|        cnt = 1 << (pstr_td_frame_data->mod[k] - 1);
  444|       |
  445|   157k|        for (ii = 0; ii < cnt - 1; ii++) pstr_td_frame_data->tcx_lg[k + 1 + ii] = 0;
  ------------------
  |  Branch (445:22): [True: 31.4k, False: 126k]
  ------------------
  446|       |
  447|   126k|        k += cnt;
  448|   126k|        first_tcx_flag = 0;
  449|   126k|      }
  450|   329k|    }
  451|       |
  452|  90.5k|    ixheaacd_lpc_data(first_lpd_flag, pstr_td_frame_data->mod, pstr_td_frame_data, it_bit_buff);
  453|       |
  454|  90.5k|    if ((core_mode_last == 0) && (fac_data_present == 1)) {
  ------------------
  |  Branch (454:9): [True: 60.6k, False: 29.8k]
  |  Branch (454:34): [True: 13.8k, False: 46.8k]
  ------------------
  455|  13.8k|      WORD32 fac_length;
  456|  13.8k|      short_fac_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  457|       |
  458|  13.8k|      fac_length = (short_fac_flag) ? ((usac_data->ccfl) / 16) : ((usac_data->ccfl) / 8);
  ------------------
  |  Branch (458:20): [True: 5.91k, False: 7.94k]
  ------------------
  459|       |
  460|  13.8k|      fac_data = pstr_td_frame_data->fac_data;
  461|  13.8k|      fac_data[0] = ixheaacd_read_bits_buf(it_bit_buff, 7);
  462|  13.8k|      if ((pstr_td_frame_data->fac_data[0] < 0) || (pstr_td_frame_data->fac_data[0] > 128)) {
  ------------------
  |  Branch (462:11): [True: 1, False: 13.8k]
  |  Branch (462:52): [True: 0, False: 13.8k]
  ------------------
  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|  13.8k|      ixheaacd_fac_decoding(fac_length, 0, &fac_data[1], it_bit_buff);
  471|  13.8k|    }
  472|  90.5k|    if (fac_data_present == 0) {
  ------------------
  |  Branch (472:9): [True: 62.8k, False: 27.6k]
  ------------------
  473|  62.8k|      memset(&pstr_td_frame_data->fac_data[0], 0, sizeof(pstr_td_frame_data->fac_data));
  474|  62.8k|    }
  475|  90.5k|    if (usac_data->ec_flag && usac_data->frame_ok) {
  ------------------
  |  Branch (475:9): [True: 0, False: 90.5k]
  |  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|  90.5k|  } else {
  481|      0|    usac_data->frame_ok = 0;
  482|      0|  }
  483|       |
  484|  90.5k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (484:7): [True: 0, False: 90.5k]
  ------------------
  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|  90.5k|  if (usac_data->frame_ok) {
  ------------------
  |  Branch (496:7): [True: 89.5k, False: 991]
  ------------------
  497|  89.5k|    err = ixheaacd_lpd_dec(usac_data, usac_data->str_tddec[chan], pstr_td_frame_data, synth,
  498|  89.5k|                           first_lpd_flag, short_fac_flag, bpf_control_info);
  499|  89.5k|  } else {
  500|    991|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (500:9): [True: 0, False: 991]
  ------------------
  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|    991|  }
  507|       |
  508|  90.5k|  return (err);
  509|  98.3k|}
ixheaacd_tw_buff_update:
  512|  98.3k|                               ia_usac_lpd_decoder_handle st) {
  513|  98.3k|  WORD32 *p_ioverlap = usac_data->overlap_data_ptr[i];
  514|  98.3k|  WORD32 td_frame_prev = usac_data->td_frame_prev[i];
  515|  98.3k|  WORD32 window_sequence_last = usac_data->window_sequence_last[i];
  516|  98.3k|  WORD32 tw_mdct = usac_data->tw_mdct[0];
  517|       |
  518|  98.3k|  if (!td_frame_prev) {
  ------------------
  |  Branch (518:7): [True: 21.3k, False: 77.0k]
  ------------------
  519|  21.3k|    if (tw_mdct) {
  ------------------
  |  Branch (519:9): [True: 0, False: 21.3k]
  ------------------
  520|      0|      if (usac_data->ec_flag == 0) {
  ------------------
  |  Branch (520:11): [True: 0, False: 0]
  ------------------
  521|      0|        return -1;
  522|      0|      } else {
  523|      0|        tw_mdct = 0;
  524|      0|      }
  525|  21.3k|    } else {
  526|  21.3k|      ixheaacd_reset_acelp_data_fix(usac_data, st, p_ioverlap,
  527|  21.3k|                                    (window_sequence_last == EIGHT_SHORT_SEQUENCE), 0);
  ------------------
  |  |  102|  21.3k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  528|  21.3k|    }
  529|  21.3k|  }
  530|  98.3k|  return 0;
  531|  98.3k|}
ixheaacd_td_frm_dec:
  533|  97.3k|VOID ixheaacd_td_frm_dec(ia_usac_data_struct *usac_data, WORD32 k, WORD32 mod0) {
  534|  97.3k|  WORD32 i;
  535|  97.3k|  WORD32 lfac = 0;
  536|       |
  537|  97.3k|  WORD32 *p_out_idata = usac_data->output_data_ptr[k];
  538|  97.3k|  WORD32 *p_ioverlap = usac_data->overlap_data_ptr[k];
  539|  97.3k|  WORD32 nlong = usac_data->ccfl;
  540|  97.3k|  WORD32 window_sequence_last = usac_data->window_sequence_last[k];
  541|  97.3k|  WORD32 td_frame_prev = usac_data->td_frame_prev[k];
  542|  97.3k|  WORD32 tw_mdct = usac_data->tw_mdct[0];
  543|  97.3k|  WORD32 nshort = nlong / 8;
  544|  97.3k|  WORD32 *p_in_idata = p_out_idata;
  545|       |
  546|  97.3k|  if (!td_frame_prev) {
  ------------------
  |  Branch (546:7): [True: 20.8k, False: 76.5k]
  ------------------
  547|  20.8k|    if (window_sequence_last == EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  20.8k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (547:9): [True: 7.87k, False: 12.9k]
  ------------------
  548|  7.87k|      lfac = nshort / 2;
  549|  12.9k|    } else {
  550|  12.9k|      lfac = nshort;
  551|  12.9k|    }
  552|  20.8k|  }
  553|       |
  554|  97.3k|  if (!td_frame_prev && (mod0 == 0)) {
  ------------------
  |  Branch (554:7): [True: 20.8k, False: 76.5k]
  |  Branch (554:25): [True: 8.77k, False: 12.0k]
  ------------------
  555|  2.86M|    for (i = 0; i < (nlong / 2) - lfac - (LEN_SUBFR); i++) {
  ------------------
  |  |  118|  2.86M|#define LEN_SUBFR 64
  ------------------
  |  Branch (555:17): [True: 2.85M, False: 8.77k]
  ------------------
  556|  2.85M|      p_in_idata[i] = 0;
  557|  2.85M|    }
  558|  88.5k|  } else if (!td_frame_prev && (mod0 > 0)) {
  ------------------
  |  Branch (558:14): [True: 12.0k, False: 76.5k]
  |  Branch (558:32): [True: 12.0k, False: 0]
  ------------------
  559|  4.72M|    for (i = 0; i < (nlong / 2) - lfac; i++) {
  ------------------
  |  Branch (559:17): [True: 4.71M, False: 12.0k]
  ------------------
  560|  4.71M|      p_in_idata[i] = 0;
  561|  4.71M|    }
  562|  12.0k|  }
  563|       |
  564|  97.3k|  if (tw_mdct) {
  ------------------
  |  Branch (564:7): [True: 0, False: 97.3k]
  ------------------
  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|  97.3k|  } else {
  580|  97.3k|    if (!td_frame_prev && (mod0 == 0)) {
  ------------------
  |  Branch (580:9): [True: 20.8k, False: 76.5k]
  |  Branch (580:27): [True: 8.77k, False: 12.0k]
  ------------------
  581|  1.45M|      for (i = (nlong / 2) - lfac - (LEN_SUBFR); i < nlong / 2; i++) {
  ------------------
  |  |  118|  8.77k|#define LEN_SUBFR 64
  ------------------
  |  Branch (581:50): [True: 1.44M, False: 8.77k]
  ------------------
  582|  1.44M|        p_ioverlap[i] = 0;
  583|  1.44M|      }
  584|  88.5k|    } else if (!td_frame_prev) {
  ------------------
  |  Branch (584:16): [True: 12.0k, False: 76.5k]
  ------------------
  585|  7.09M|      for (i = (nlong / 2) - lfac; i < nlong; i++) {
  ------------------
  |  Branch (585:36): [True: 7.07M, False: 12.0k]
  ------------------
  586|  7.07M|        p_ioverlap[i] = 0;
  587|  7.07M|      }
  588|  12.0k|    }
  589|  92.2M|    for (i = 0; i < nlong; i++) {
  ------------------
  |  Branch (589:17): [True: 92.1M, False: 97.3k]
  ------------------
  590|  92.1M|      p_out_idata[i] = ixheaac_add32_sat(p_ioverlap[i] << 1, p_in_idata[i]);
  591|  92.1M|      p_ioverlap[i] = 0;
  592|  92.1M|    }
  593|  97.3k|  }
  594|  97.3k|}

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

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

ixheaacd_preemphsis_tool_float:
   50|   997k|                                    FLOAT32 mem) {
   51|   997k|  WORD32 i;
   52|   125M|  for (i = len - 1; i > 0; i--) {
  ------------------
  |  Branch (52:21): [True: 124M, False: 997k]
  ------------------
   53|   124M|    signal[i] = signal[i] - mu * signal[i - 1];
   54|   124M|  }
   55|   997k|  signal[0] -= mu * mem;
   56|   997k|  return;
   57|   997k|}
ixheaacd_deemphsis_tool:
   59|   403k|VOID ixheaacd_deemphsis_tool(FLOAT32 *signal, WORD32 len, FLOAT32 mem) {
   60|   403k|  WORD32 i;
   61|   403k|  signal[0] = signal[0] + PREEMPH_FILT_FAC * mem;
  ------------------
  |  |   61|   403k|#define PREEMPH_FILT_FAC 0.68f
  ------------------
   62|  72.3M|  for (i = 1; i < len; i++) {
  ------------------
  |  Branch (62:15): [True: 71.9M, False: 403k]
  ------------------
   63|  71.9M|    signal[i] = signal[i] + PREEMPH_FILT_FAC * signal[i - 1];
  ------------------
  |  |   61|  71.9M|#define PREEMPH_FILT_FAC 0.68f
  ------------------
   64|  71.9M|  }
   65|   403k|  return;
   66|   403k|}
ixheaacd_lpc_wt_synthesis_tool:
   68|  77.7k|VOID ixheaacd_lpc_wt_synthesis_tool(FLOAT32 a[], FLOAT32 x[], WORD32 l) {
   69|  77.7k|  FLOAT32 s;
   70|  77.7k|  WORD32 i, j;
   71|       |
   72|  9.32M|  for (i = 0; i < l; i++) {
  ------------------
  |  Branch (72:15): [True: 9.25M, False: 77.7k]
  ------------------
   73|  9.25M|    s = x[i];
   74|  46.2M|    for (j = 1; j <= ORDER; j += 4) {
  ------------------
  |  |   30|  46.2M|#define ORDER 16
  ------------------
  |  Branch (74:17): [True: 37.0M, False: 9.25M]
  ------------------
   75|  37.0M|      s -= (a[j] * ixheaacd_gamma_table[j]) * x[i - j];
   76|  37.0M|      s -= (a[j + 1] * ixheaacd_gamma_table[j + 1]) * x[i - (j + 1)];
   77|  37.0M|      s -= (a[j + 2] * ixheaacd_gamma_table[j + 2]) * x[i - (j + 2)];
   78|  37.0M|      s -= (a[j + 3] * ixheaacd_gamma_table[j + 3]) * x[i - (j + 3)];
   79|  37.0M|    }
   80|  9.25M|    x[i] = s;
   81|  9.25M|  }
   82|       |
   83|  77.7k|  return;
   84|  77.7k|}
ixheaacd_synthesis_tool_float:
   87|   823k|                                   WORD32 l, FLOAT32 mem[]) {
   88|   823k|  FLOAT32 buf[LEN_FRAME * 2];
   89|   823k|  FLOAT32 s;
   90|   823k|  FLOAT32 *yy;
   91|   823k|  WORD32 i, j;
   92|   823k|  memcpy(buf, mem, ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|   823k|#define ORDER 16
  ------------------
   93|   823k|  yy = &buf[ORDER];
  ------------------
  |  |   30|   823k|#define ORDER 16
  ------------------
   94|  65.7M|  for (i = 0; i < l; i++) {
  ------------------
  |  Branch (94:15): [True: 64.9M, False: 823k]
  ------------------
   95|  64.9M|    s = x[i];
   96|   324M|    for (j = 1; j <= ORDER; j += 4) {
  ------------------
  |  |   30|   324M|#define ORDER 16
  ------------------
  |  Branch (96:17): [True: 259M, False: 64.9M]
  ------------------
   97|   259M|      s -= a[j] * yy[i - j];
   98|   259M|      s -= a[j + 1] * yy[i - (j + 1)];
   99|   259M|      s -= a[j + 2] * yy[i - (j + 2)];
  100|   259M|      s -= a[j + 3] * yy[i - (j + 3)];
  101|   259M|    }
  102|  64.9M|    yy[i] = s;
  103|  64.9M|    y[i] = s;
  104|  64.9M|  }
  105|       |
  106|   823k|  return;
  107|   823k|}
ixheaacd_synthesis_tool_float1:
  109|   223k|VOID ixheaacd_synthesis_tool_float1(FLOAT32 a[], FLOAT32 x[], WORD32 l) {
  110|   223k|  FLOAT32 s;
  111|   223k|  WORD32 i, j;
  112|  28.4M|  for (i = 0; i < l; i++) {
  ------------------
  |  Branch (112:15): [True: 28.2M, False: 223k]
  ------------------
  113|  28.2M|    s = x[i];
  114|   141M|    for (j = 1; j <= ORDER; j += 4) {
  ------------------
  |  |   30|   141M|#define ORDER 16
  ------------------
  |  Branch (114:17): [True: 112M, False: 28.2M]
  ------------------
  115|   112M|      s -= a[j] * x[i - j];
  116|   112M|      s -= a[j + 1] * x[i - (j + 1)];
  117|   112M|      s -= a[j + 2] * x[i - (j + 2)];
  118|   112M|      s -= a[j + 3] * x[i - (j + 3)];
  119|   112M|    }
  120|  28.2M|    x[i] = s;
  121|  28.2M|  }
  122|       |
  123|   223k|  return;
  124|   223k|}
ixheaacd_residual_tool_float:
  143|   298k|                                  WORD32 loop_count) {
  144|   298k|  FLOAT32 s;
  145|   298k|  WORD32 i, j;
  146|   710k|  for (j = 0; j < loop_count; j++) {
  ------------------
  |  Branch (146:15): [True: 412k, False: 298k]
  ------------------
  147|  54.1M|    for (i = 0; i < l; i++) {
  ------------------
  |  Branch (147:17): [True: 53.7M, False: 412k]
  ------------------
  148|  53.7M|      s = x[i];
  149|  53.7M|      s += a[1] * x[i - 1];
  150|  53.7M|      s += a[2] * x[i - 2];
  151|  53.7M|      s += a[3] * x[i - 3];
  152|  53.7M|      s += a[4] * x[i - 4];
  153|  53.7M|      s += a[5] * x[i - 5];
  154|  53.7M|      s += a[6] * x[i - 6];
  155|  53.7M|      s += a[7] * x[i - 7];
  156|  53.7M|      s += a[8] * x[i - 8];
  157|  53.7M|      s += a[9] * x[i - 9];
  158|  53.7M|      s += a[10] * x[i - 10];
  159|  53.7M|      s += a[11] * x[i - 11];
  160|  53.7M|      s += a[12] * x[i - 12];
  161|  53.7M|      s += a[13] * x[i - 13];
  162|  53.7M|      s += a[14] * x[i - 14];
  163|  53.7M|      s += a[15] * x[i - 15];
  164|  53.7M|      s += a[16] * x[i - 16];
  165|  53.7M|      y[i] = s;
  166|  53.7M|    }
  167|   412k|    a += 17;
  168|   412k|    x += l;
  169|   412k|    y += l;
  170|   412k|  }
  171|   298k|  return;
  172|   298k|}
ixheaacd_residual_tool_float1:
  175|  41.3k|                                   WORD32 loop_count) {
  176|  41.3k|  FLOAT32 s;
  177|  41.3k|  WORD32 i, j;
  178|   351k|  for (j = 0; j < loop_count; j++) {
  ------------------
  |  Branch (178:15): [True: 310k, False: 41.3k]
  ------------------
  179|  20.1M|    for (i = 0; i < l; i++) {
  ------------------
  |  Branch (179:17): [True: 19.8M, False: 310k]
  ------------------
  180|  19.8M|      s = x[i];
  181|  19.8M|      s += a[1] * x[i - 1];
  182|  19.8M|      s += a[2] * x[i - 2];
  183|  19.8M|      s += a[3] * x[i - 3];
  184|  19.8M|      s += a[4] * x[i - 4];
  185|  19.8M|      s += a[5] * x[i - 5];
  186|  19.8M|      s += a[6] * x[i - 6];
  187|  19.8M|      s += a[7] * x[i - 7];
  188|  19.8M|      s += a[8] * x[i - 8];
  189|  19.8M|      s += a[9] * x[i - 9];
  190|  19.8M|      s += a[10] * x[i - 10];
  191|  19.8M|      s += a[11] * x[i - 11];
  192|  19.8M|      s += a[12] * x[i - 12];
  193|  19.8M|      s += a[13] * x[i - 13];
  194|  19.8M|      s += a[14] * x[i - 14];
  195|  19.8M|      s += a[15] * x[i - 15];
  196|  19.8M|      s += a[16] * x[i - 16];
  197|  19.8M|      y[i] = s;
  198|  19.8M|    }
  199|   310k|    x += l;
  200|   310k|    y += l;
  201|   310k|  }
  202|  41.3k|  return;
  203|  41.3k|}

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

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

ixheaacd_copy_to_bitbuff:
 1666|   704k|                              ia_bit_buf_struct *it_bit_buff_dst) {
 1667|   704k|  *it_bit_buff_dst = *it_bit_buff_src;
 1668|   704k|}
ixheaacd_arth_decoding_level2:
 1802|   704k|                                   WORD32 n, WORD32 pres_n, WORD32 *quant) {
 1803|   704k|  state_arith as;
 1804|   704k|  WORD32 a, b;
 1805|   704k|  WORD32 i, j, lev, pki, esc_nb;
 1806|   704k|  WORD32 m;
 1807|   704k|  WORD32 c = 0;
 1808|   704k|  struct ia_bit_buf_struct it_bit_buff_temp = {0};
 1809|   704k|  WORD32 bit_count = 0;
 1810|   704k|  WORD32 s1;
 1811|   704k|  WORD32 temp;
 1812|   704k|  WORD32 bit_count_5;
 1813|   704k|  ixheaacd_copy_to_bitbuff(it_bit_buff, &it_bit_buff_temp);
 1814|       |
 1815|   104M|  for (i = 0; i < pres_n; i++) {
  ------------------
  |  Branch (1815:15): [True: 103M, False: 704k]
  ------------------
 1816|   103M|    c_prev[i] = c_pres[i];
 1817|   103M|    c_pres[i] = 1;
 1818|   103M|  }
 1819|       |
 1820|   704k|  bit_count = ixheaacd_arith_first_symbol(&it_bit_buff_temp, &as);
 1821|       |
 1822|   704k|  c = (WORD32)c_prev[0] << 12;
 1823|   704k|  lev = 0;
 1824|       |
 1825|  35.0M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1825:15): [True: 34.4M, False: 613k]
  ------------------
 1826|  34.4M|    s1 = ixheaacd_arith_get_context(c_prev + i, c_pres + i, &c, i);
 1827|       |
 1828|  37.2M|    for (lev = esc_nb = 0;;) {
 1829|  37.2M|      pki = ixheaacd_arith_get_pk(s1 + ixheaacd_esc_nb_offset[esc_nb]);
 1830|  37.2M|      bit_count = ixheaacd_arith_decode(&it_bit_buff_temp, bit_count, &m, &as,
 1831|  37.2M|                                        ixheaacd_ari_cf_m[pki], 17);
 1832|  37.2M|      if (bit_count == -1) {
  ------------------
  |  Branch (1832:11): [True: 0, False: 37.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|  37.2M|      if (m < ARITH_ESCAPE) {
  ------------------
  |  |   52|  37.2M|#define ARITH_ESCAPE 16
  ------------------
  |  Branch (1837:11): [True: 34.4M, False: 2.81M]
  ------------------
 1838|  34.4M|        break;
 1839|  34.4M|      }
 1840|       |
 1841|  2.81M|      lev += 1;
 1842|  2.81M|      esc_nb = lev;
 1843|       |
 1844|  2.81M|      if (esc_nb > 7) {
  ------------------
  |  Branch (1844:11): [True: 109k, False: 2.70M]
  ------------------
 1845|   109k|        esc_nb = 7;
 1846|   109k|      }
 1847|  2.81M|    }
 1848|       |
 1849|  34.4M|    if (m == 0) {
  ------------------
  |  Branch (1849:9): [True: 19.2M, False: 15.2M]
  ------------------
 1850|  19.2M|      if (esc_nb > 0) break;
  ------------------
  |  Branch (1850:11): [True: 90.7k, False: 19.1M]
  ------------------
 1851|       |
 1852|  19.1M|      quant[2 * i + 0] = 0;
 1853|  19.1M|      quant[2 * i + 1] = 0;
 1854|  19.1M|      c_pres[i] = 1;
 1855|  19.1M|    } else {
 1856|  15.2M|      b = m >> 2;
 1857|  15.2M|      a = m & 0x3;
 1858|       |
 1859|  17.8M|      for (j = 0; j < lev; j++) {
  ------------------
  |  Branch (1859:19): [True: 2.65M, False: 15.2M]
  ------------------
 1860|  2.65M|        WORD32 lsbidx = (a == 0) ? 1 : ((b == 0) ? 0 : 2);
  ------------------
  |  Branch (1860:25): [True: 388k, False: 2.26M]
  |  Branch (1860:41): [True: 418k, False: 1.84M]
  ------------------
 1861|  2.65M|        bit_count = ixheaacd_arith_decode(&it_bit_buff_temp, bit_count, &m, &as,
 1862|  2.65M|                                          ixheaacd_ari_cf_r[lsbidx], 4);
 1863|  2.65M|        if (bit_count == -1) {
  ------------------
  |  Branch (1863:13): [True: 0, False: 2.65M]
  ------------------
 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.65M|        a = (a << 1) | (m & 1);
 1868|  2.65M|        b = (b << 1) | ((m >> 1) & 1);
 1869|  2.65M|      }
 1870|  15.2M|      if ((a > (8183)) || (b > (8183))) {
  ------------------
  |  Branch (1870:11): [True: 396, False: 15.2M]
  |  Branch (1870:27): [True: 113, False: 15.2M]
  ------------------
 1871|    367|        longjmp(*(it_bit_buff->xaac_jmp_buf),
 1872|    367|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    367|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1873|    367|      }
 1874|  15.2M|      if ((a < (-8183)) || (b < (-8183))) {
  ------------------
  |  Branch (1874:11): [True: 186, False: 15.2M]
  |  Branch (1874:28): [True: 1, False: 15.2M]
  ------------------
 1875|     45|        longjmp(*(it_bit_buff->xaac_jmp_buf),
 1876|     45|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     45|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1877|     45|      }
 1878|  15.2M|      quant[2 * i + 0] = a;
 1879|  15.2M|      quant[2 * i + 1] = b;
 1880|  15.2M|      temp = a + b + 1;
 1881|  15.2M|      c_pres[i] = (WORD8)temp;
 1882|  15.2M|      if (temp > 0xF) {
  ------------------
  |  Branch (1882:11): [True: 379k, False: 14.8M]
  ------------------
 1883|   379k|        c_pres[i] = 0xF;
 1884|   379k|      }
 1885|  15.2M|    }
 1886|  34.4M|  }
 1887|       |
 1888|   703k|  bit_count -= 16 - 2;
 1889|   703k|  if (bit_count > it_bit_buff->cnt_bits) {
  ------------------
  |  Branch (1889:7): [True: 557, False: 703k]
  ------------------
 1890|    557|    longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    557|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1891|    557|  }
 1892|       |
 1893|   703k|  if (bit_count > 0) {
  ------------------
  |  Branch (1893:7): [True: 703k, False: 145]
  ------------------
 1894|   703k|    bit_count_5 = bit_count >> 5;
 1895|   703k|    bit_count_5 = (bit_count_5 * 32) + (bit_count & 31);
 1896|   703k|    ixheaacd_skip_bits_buf(it_bit_buff, bit_count_5);
 1897|   703k|  }
 1898|       |
 1899|   103M|  for (i = 0; i < pres_n; i++) {
  ------------------
  |  Branch (1899:15): [True: 103M, False: 703k]
  ------------------
 1900|   103M|    WORD32 temp0 = quant[0];
 1901|   103M|    WORD32 temp1 = quant[1];
 1902|   103M|    if (temp0) {
  ------------------
  |  Branch (1902:9): [True: 10.9M, False: 92.2M]
  ------------------
 1903|  10.9M|      m = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1904|  10.9M|      bit_count++;
 1905|       |
 1906|  10.9M|      m = (m << 1) * temp0;
 1907|  10.9M|      temp0 = m - (temp0);
 1908|  10.9M|    }
 1909|       |
 1910|   103M|    if (temp1) {
  ------------------
  |  Branch (1910:9): [True: 11.0M, False: 92.1M]
  ------------------
 1911|  11.0M|      m = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1912|  11.0M|      bit_count++;
 1913|       |
 1914|  11.0M|      m = (m << 1) * temp1;
 1915|  11.0M|      temp1 = m - (temp1);
 1916|  11.0M|    }
 1917|   103M|    if ((temp0 > (8183)) || (temp1 > (8183))) {
  ------------------
  |  Branch (1917:9): [True: 197, False: 103M]
  |  Branch (1917:29): [True: 0, False: 103M]
  ------------------
 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|   103M|    if ((temp0 < (-8183)) || (temp1 < (-8183))) {
  ------------------
  |  Branch (1920:9): [True: 197, False: 103M]
  |  Branch (1920:30): [True: 0, False: 103M]
  ------------------
 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|   103M|    *quant++ = temp0;
 1924|   103M|    *quant++ = temp1;
 1925|   103M|  }
 1926|   703k|  return;
 1927|   703k|}
ixheaacd_ac_spectral_data:
 2088|   320k|                                 WORD32 ch) {
 2089|   320k|  WORD32 i;
 2090|       |
 2091|   320k|  WORD32 *x_ac_dec = usac_data->x_ac_dec;
 2092|   320k|  WORD32 sbk;
 2093|       |
 2094|   320k|  const WORD32 max_win_len = usac_data->pstr_sfb_info[ch]->max_win_len;
 2095|   320k|  WORD8 *c_prev = &usac_data->c_prev[ch][0];
 2096|   320k|  WORD8 *c_pres = &usac_data->c[ch][0];
 2097|       |
 2098|   320k|  WORD8 *ptr_scratch_buf = (WORD8 *)&usac_data->scratch_buffer[0];
 2099|       |
 2100|   320k|  memset(x_ac_dec, 0, 1024 * sizeof(WORD32));
 2101|       |
 2102|   320k|  ixheaacd_arith_map_context(arith_pres_n, usac_data->arith_prev_n[ch], c_prev,
 2103|   320k|                             c_pres, arith_reset_flag, ptr_scratch_buf);
 2104|       |
 2105|   320k|  usac_data->arith_prev_n[ch] = arith_pres_n;
 2106|       |
 2107|   320k|  if (max_spec_coefficients > 0) {
  ------------------
  |  Branch (2107:7): [True: 167k, False: 152k]
  ------------------
 2108|   745k|    for (sbk = 0; sbk < max_win_len; sbk++) {
  ------------------
  |  Branch (2108:19): [True: 577k, False: 167k]
  ------------------
 2109|   577k|      ixheaacd_arth_decoding_level2(it_bit_buff, c_prev + 2, c_pres + 2,
 2110|   577k|                                    max_spec_coefficients / 2, arith_pres_n / 2,
 2111|   577k|                                    &x_ac_dec[sbk * arith_pres_n]);
 2112|       |
 2113|  62.4M|      for (i = max_spec_coefficients / 2; i < arith_pres_n / 2; i++) {
  ------------------
  |  Branch (2113:43): [True: 61.8M, False: 577k]
  ------------------
 2114|  61.8M|        x_ac_dec[sbk * arith_pres_n + 2 * i + 0] = 0;
 2115|  61.8M|        x_ac_dec[sbk * arith_pres_n + 2 * i + 1] = 0;
 2116|  61.8M|      }
 2117|   577k|    }
 2118|   167k|  } else {
 2119|  64.6M|    for (i = 0; i < (arith_pres_n / 2); i++) {
  ------------------
  |  Branch (2119:17): [True: 64.4M, False: 152k]
  ------------------
 2120|  64.4M|      c_pres[i + 2] = 1;
 2121|  64.4M|    }
 2122|   152k|  }
 2123|       |
 2124|   320k|  ixheaacd_apply_scfs_and_nf(noise_filling, usac_data, x_ac_dec, noise_level,
 2125|   320k|                             noise_offset, max_sfb, ch);
 2126|       |
 2127|   320k|  return 0;
 2128|   320k|}
ixheaacd_arith_data:
 2133|   126k|                           WORD32 first_tcx_flag, WORD32 k) {
 2134|   126k|  WORD32 *arith_prev_n = &usac_data->arith_prev_n[usac_data->present_chan];
 2135|   126k|  WORD32 arith_reset_flag =
 2136|   126k|      first_tcx_flag && pstr_td_frame_data->arith_reset_flag;
  ------------------
  |  Branch (2136:7): [True: 80.3k, False: 45.8k]
  |  Branch (2136:25): [True: 41.7k, False: 38.5k]
  ------------------
 2137|   126k|  WORD32 tcx_size = pstr_td_frame_data->tcx_lg[k];
 2138|   126k|  WORD8 *c_prev = usac_data->c_prev[usac_data->present_chan];
 2139|   126k|  WORD8 *c_pres = usac_data->c[usac_data->present_chan];
 2140|       |
 2141|   126k|  WORD8 *ptr_scratch_buf = (WORD8 *)&usac_data->scratch_buffer[0];
 2142|       |
 2143|   126k|  memset(x_ac_dec, 0, tcx_size * sizeof(WORD32));
 2144|       |
 2145|   126k|  ixheaacd_arith_map_context(tcx_size, *arith_prev_n, c_prev, c_pres,
 2146|   126k|                             arith_reset_flag, ptr_scratch_buf);
 2147|       |
 2148|   126k|  *arith_prev_n = tcx_size;
 2149|       |
 2150|   126k|  ixheaacd_arth_decoding_level2(it_bit_buff, c_prev + 2, c_pres + 2, tcx_size / 2, tcx_size / 2,
 2151|   126k|                                x_ac_dec);
 2152|       |
 2153|   126k|  return;
 2154|   126k|}
ixheaacd_arith_dec.c:ixheaacd_arith_first_symbol:
 1688|   704k|                                          state_arith *s) {
 1689|   704k|  register WORD32 val;
 1690|       |
 1691|   704k|  WORD32 bit_count = 16;
 1692|       |
 1693|   704k|  val = 0;
 1694|   704k|  if (it_bit_buff->cnt_bits < 16) {
  ------------------
  |  Branch (1694:7): [True: 152, False: 704k]
  ------------------
 1695|    152|    WORD32 shift_value = 16 - it_bit_buff->cnt_bits;
 1696|    152|    val = ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
 1697|    152|    val <<= shift_value;
 1698|   704k|  } else {
 1699|   704k|    val = ixheaacd_read_bits_buf(it_bit_buff, 16);
 1700|   704k|  }
 1701|       |
 1702|   704k|  s->low = 0;
 1703|   704k|  s->high = 65535;
 1704|   704k|  s->value = val;
 1705|       |
 1706|   704k|  return bit_count;
 1707|   704k|}
ixheaacd_arith_dec.c:ixheaacd_arith_get_context:
 1671|  34.4M|                                         WORD32 *c, WORD32 i) {
 1672|  34.4M|  WORD32 tmp = (WORD32)c_prev[1] << 12;
 1673|       |
 1674|  34.4M|  *c = *c >> 4;
 1675|  34.4M|  *c = *c + tmp;
 1676|  34.4M|  *c = (*c & 0xFFF0) + c_pres[-1];
 1677|       |
 1678|  34.4M|  if (i > 3) {
  ------------------
  |  Branch (1678:7): [True: 31.9M, False: 2.51M]
  ------------------
 1679|  31.9M|    if ((c_pres[-1] + c_pres[-2] + c_pres[-3]) < 5) {
  ------------------
  |  Branch (1679:9): [True: 17.0M, False: 14.8M]
  ------------------
 1680|  17.0M|      return (*c + 0x10000);
 1681|  17.0M|    }
 1682|  31.9M|  }
 1683|       |
 1684|  17.3M|  return (*c);
 1685|  34.4M|}
ixheaacd_arith_dec.c:ixheaacd_arith_get_pk:
 1709|  37.2M|static UWORD32 ixheaacd_arith_get_pk(UWORD32 c) {
 1710|  37.2M|  UWORD32 j;
 1711|  37.2M|  WORD32 i, i_min, i_max;
 1712|       |
 1713|  37.2M|  i_min = -1;
 1714|  37.2M|  i = i_min;
 1715|  37.2M|  i_max = 742 - 1;
 1716|   358M|  while ((i_max - i_min) > 1) {
  ------------------
  |  Branch (1716:10): [True: 339M, False: 18.2M]
  ------------------
 1717|   339M|    i = i_min + ((i_max - i_min) >> 1);
 1718|   339M|    j = ixheaacd_ari_hash_m[i];
 1719|   339M|    if (c < j)
  ------------------
  |  Branch (1719:9): [True: 179M, False: 160M]
  ------------------
 1720|   179M|      i_max = i;
 1721|   160M|    else if (c > j)
  ------------------
  |  Branch (1721:14): [True: 141M, False: 19.0M]
  ------------------
 1722|   141M|      i_min = i;
 1723|  19.0M|    else
 1724|  19.0M|      return (UWORD32)ixheaacd_ari_hash_m_1[i];
 1725|   339M|  }
 1726|       |
 1727|  18.2M|  return (ixheaacd_ari_lookup_m[i_max]);
 1728|  37.2M|}
ixheaacd_arith_dec.c:ixheaacd_arith_decode:
 1732|  39.9M|                                    UWORD16 const *cum_freq, WORD32 cfl) {
 1733|  39.9M|  register WORD32 symbol;
 1734|  39.9M|  register WORD32 low, high, range, value;
 1735|  39.9M|  register WORD32 cumulative;
 1736|  39.9M|  register UWORD16 const *p;
 1737|  39.9M|  register UWORD16 const *q;
 1738|       |
 1739|  39.9M|  low = s->low;
 1740|  39.9M|  high = s->high;
 1741|  39.9M|  value = s->value;
 1742|       |
 1743|  39.9M|  range = high - low + 1;
 1744|  39.9M|  cumulative = ((((WORD32)(value - low + 1)) << 14) - ((WORD32)1)) / ((WORD32)range);
 1745|       |
 1746|  39.9M|  if (it_bit_buff->cnt_bits == 0)
  ------------------
  |  Branch (1746:7): [True: 49.3k, False: 39.8M]
  ------------------
 1747|  49.3k|    if (cumulative <= 0) {
  ------------------
  |  Branch (1747:9): [True: 142, False: 49.2k]
  ------------------
 1748|    142|       longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    142|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1749|    142|    }
 1750|  39.9M|  p = cum_freq - 1;
 1751|       |
 1752|   157M|  do {
 1753|   157M|    q = p + (cfl >> 1);
 1754|       |
 1755|   157M|    if (*q > cumulative) {
  ------------------
  |  Branch (1755:9): [True: 39.5M, False: 117M]
  ------------------
 1756|  39.5M|      p = q;
 1757|  39.5M|      cfl++;
 1758|  39.5M|    }
 1759|   157M|    cfl >>= 1;
 1760|   157M|  } while (cfl > 1);
  ------------------
  |  Branch (1760:12): [True: 117M, False: 39.9M]
  ------------------
 1761|       |
 1762|  39.9M|  symbol = (WORD32)(p - cum_freq + 1);
 1763|       |
 1764|  39.9M|  if (symbol) high = low + ((range * cum_freq[symbol - 1]) >> 14) - 1;
  ------------------
  |  Branch (1764:7): [True: 19.9M, False: 20.0M]
  ------------------
 1765|       |
 1766|  39.9M|  low += ((range * cum_freq[symbol]) >> 14);
 1767|       |
 1768|   115M|  for (;;) {
 1769|   115M|    if (high < 32768) {
  ------------------
  |  Branch (1769:9): [True: 25.6M, False: 90.0M]
  ------------------
 1770|  90.0M|    } else if (low >= 32768) {
  ------------------
  |  Branch (1770:16): [True: 20.0M, False: 69.9M]
  ------------------
 1771|  20.0M|      value -= 32768;
 1772|  20.0M|      low -= 32768;
 1773|  20.0M|      high -= 32768;
 1774|  69.9M|    } else if (low >= 16384 && high < 49152) {
  ------------------
  |  Branch (1774:16): [True: 45.4M, False: 24.5M]
  |  Branch (1774:32): [True: 30.0M, False: 15.3M]
  ------------------
 1775|  30.0M|      value -= 16384;
 1776|  30.0M|      low -= 16384;
 1777|  30.0M|      high -= 16384;
 1778|  30.0M|    } else
 1779|  39.9M|      break;
 1780|       |
 1781|  75.7M|    low += low;
 1782|  75.7M|    high += high + 1;
 1783|       |
 1784|  75.7M|    if (it_bit_buff->cnt_bits > 0)
  ------------------
  |  Branch (1784:9): [True: 75.6M, False: 96.7k]
  ------------------
 1785|  75.6M|      value = (value << 1) | ixheaacd_read_bits_buf(it_bit_buff, 1);
 1786|  96.7k|    else
 1787|  96.7k|      value = (value << 1);
 1788|       |
 1789|  75.7M|    bit_count++;
 1790|  75.7M|  }
 1791|       |
 1792|  39.9M|  s->low = low;
 1793|  39.9M|  s->high = high;
 1794|  39.9M|  s->value = value;
 1795|       |
 1796|  39.9M|  *m = symbol;
 1797|       |
 1798|  39.9M|  return bit_count;
 1799|  39.9M|}
ixheaacd_arith_dec.c:ixheaacd_arith_map_context:
 1636|   446k|                                       WORD8 *ptr_scratch) {
 1637|   446k|  WORD32 i, k;
 1638|   446k|  FLOAT32 ratio;
 1639|   446k|  WORD8 *c_prev_tmp = ptr_scratch;
 1640|   446k|  WORD8 *c_tmp = ptr_scratch + 516;
 1641|       |
 1642|   446k|  if (arith_reset_flag) {
  ------------------
  |  Branch (1642:7): [True: 131k, False: 315k]
  ------------------
 1643|  67.9M|    for (i = 0; i < (1024 / 2) + 4; i++) {
  ------------------
  |  Branch (1643:17): [True: 67.8M, False: 131k]
  ------------------
 1644|  67.8M|      c_prev[i] = 0;
 1645|  67.8M|      c[i] = 0;
 1646|  67.8M|    }
 1647|       |
 1648|   315k|  } else {
 1649|   107M|    for (i = 2; i < (prev_n / 2 + 4); i++) {
  ------------------
  |  Branch (1649:17): [True: 107M, False: 315k]
  ------------------
 1650|   107M|      c_prev_tmp[i] = c_prev[i];
 1651|   107M|      c_tmp[i] = c[i];
 1652|   107M|    }
 1653|       |
 1654|   315k|    ratio = (FLOAT32)(prev_n) / (FLOAT32)(pres_n);
 1655|   107M|    for (i = 0; i < (pres_n / 2); i++) {
  ------------------
  |  Branch (1655:17): [True: 107M, False: 315k]
  ------------------
 1656|   107M|      k = (WORD32)((FLOAT32)(i)*ratio);
 1657|   107M|      c_prev[2 + i] = c_prev_tmp[2 + k];
 1658|   107M|      c[2 + i] = c_tmp[2 + k];
 1659|   107M|    }
 1660|   315k|    c_prev[(pres_n / 2) + 2] = c_prev_tmp[(prev_n / 2) + 2];
 1661|   315k|    c[(pres_n / 2) + 3] = c_tmp[(prev_n / 2) + 3];
 1662|   315k|  }
 1663|   446k|}
ixheaacd_arith_dec.c:ixheaacd_apply_scfs_and_nf:
 1997|   319k|                                       WORD32 ch) {
 1998|   319k|  WORD32 grp = 0, win_tot = 0, sfb = 0;
 1999|   319k|  WORD32 noise_filling_start_offset = 0;
 2000|   319k|  WORD32 fac = 0, length = 0;
 2001|   319k|  WORD64 fac_fix;
 2002|   319k|  WORD32 noise_level_fix = 0;
 2003|   319k|  ia_sfb_info_struct *pstr_sfb_info = usac_data->pstr_sfb_info[ch];
 2004|   319k|  WORD32 *coef = &usac_data->coef_fix[ch][0];
 2005|   319k|  WORD16 *factors = usac_data->factors[ch];
 2006|   319k|  UWORD32 *seed_value = &usac_data->seed_value[ch];
 2007|       |
 2008|   319k|  if (noise_filling) {
  ------------------
  |  Branch (2008:7): [True: 209k, False: 109k]
  ------------------
 2009|   209k|    noise_level_fix = ixheaacd_pow_14_3[noise_level];
 2010|   209k|    noise_filling_start_offset = (usac_data->ccfl == 768)
  ------------------
  |  Branch (2010:34): [True: 13.5k, False: 196k]
  ------------------
 2011|   209k|                                     ? (pstr_sfb_info->islong ? 120 : 15)
  ------------------
  |  Branch (2011:41): [True: 12.0k, False: 1.49k]
  ------------------
 2012|   209k|                                     : (pstr_sfb_info->islong ? 160 : 20);
  ------------------
  |  Branch (2012:41): [True: 129k, False: 67.0k]
  ------------------
 2013|   209k|  }
 2014|       |
 2015|   972k|  for (grp = 0; grp < pstr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (2015:17): [True: 652k, False: 319k]
  ------------------
 2016|   652k|    WORD32 grp_win = 0;
 2017|  3.49M|    for (sfb = 0; sfb < (WORD32)max_sfb; sfb++) {
  ------------------
  |  Branch (2017:19): [True: 2.84M, False: 652k]
  ------------------
 2018|  2.84M|      WORD32 noise_filling_present = 0;
 2019|  2.84M|      WORD32 band_quantized_to_zero = 1;
 2020|       |
 2021|  2.84M|      WORD32 sfb_offset = win_tot * pstr_sfb_info->sfb_per_sbk;
 2022|  2.84M|      fac = (WORD32)(factors[sfb_offset + sfb] - SF_OFFSET);
 2023|       |
 2024|  2.84M|      if (noise_filling) {
  ------------------
  |  Branch (2024:11): [True: 1.69M, False: 1.15M]
  ------------------
 2025|  5.42M|        for (grp_win = 0; grp_win < pstr_sfb_info->group_len[grp]; grp_win++) {
  ------------------
  |  Branch (2025:27): [True: 3.73M, False: 1.69M]
  ------------------
 2026|  3.73M|          WORD32 win = grp_win + win_tot;
 2027|  3.73M|          WORD32 ixheaacd_drc_offset = win * pstr_sfb_info->bins_per_sbk;
 2028|  3.73M|          WORD32 start = (sfb == 0) ? 0 : pstr_sfb_info->ptr_sfb_tbl[sfb - 1];
  ------------------
  |  Branch (2028:26): [True: 423k, False: 3.31M]
  ------------------
 2029|  3.73M|          WORD32 idx = 0;
 2030|  12.8M|          for (idx = start; idx < pstr_sfb_info->ptr_sfb_tbl[sfb]; idx++) {
  ------------------
  |  Branch (2030:29): [True: 12.1M, False: 686k]
  ------------------
 2031|  12.1M|            if (quant[ixheaacd_drc_offset + idx] != 0) {
  ------------------
  |  Branch (2031:17): [True: 1.95M, False: 10.1M]
  ------------------
 2032|  1.95M|              band_quantized_to_zero = 0;
 2033|  1.95M|              break;
 2034|  1.95M|            }
 2035|  10.1M|            if (!band_quantized_to_zero) break;
  ------------------
  |  Branch (2035:17): [True: 1.09M, False: 9.08M]
  ------------------
 2036|  10.1M|          }
 2037|  3.73M|        }
 2038|  1.69M|      }
 2039|       |
 2040|  2.84M|      if (band_quantized_to_zero && noise_filling) fac += (noise_offset - 16);
  ------------------
  |  Branch (2040:11): [True: 1.57M, False: 1.27M]
  |  Branch (2040:37): [True: 414k, False: 1.15M]
  ------------------
 2041|  2.84M|      {
 2042|  2.84M|        WORD16 exp, frac;
 2043|       |
 2044|  2.84M|        exp = fac >> 2;
 2045|  2.84M|        frac = fac & 3;
 2046|       |
 2047|  2.84M|        if (exp > 31) exp = 31;
  ------------------
  |  Branch (2047:13): [True: 230k, False: 2.61M]
  ------------------
 2048|       |
 2049|  2.84M|        if (fac < 0)
  ------------------
  |  Branch (2049:13): [True: 1.26M, False: 1.58M]
  ------------------
 2050|  1.26M|          fac_fix = 0;
 2051|  1.58M|        else {
 2052|  1.58M|          fac_fix = (WORD64)((WORD64)ixheaacd_table_frac[3 + frac] *
 2053|  1.58M|                             (WORD64)ixheaacd_table_exp[exp]);
 2054|  1.58M|          fac_fix >>= 15;
 2055|  1.58M|        }
 2056|  2.84M|      }
 2057|       |
 2058|  7.88M|      for (grp_win = 0; grp_win < pstr_sfb_info->group_len[grp]; grp_win++) {
  ------------------
  |  Branch (2058:25): [True: 5.03M, False: 2.84M]
  ------------------
 2059|  5.03M|        WORD32 win = win_tot + grp_win;
 2060|  5.03M|        WORD32 start = (sfb == 0) ? 0 : pstr_sfb_info->ptr_sfb_tbl[sfb - 1];
  ------------------
  |  Branch (2060:24): [True: 575k, False: 4.46M]
  ------------------
 2061|  5.03M|        WORD32 ixheaacd_drc_offset = win * pstr_sfb_info->bins_per_sbk;
 2062|       |
 2063|  5.03M|        if (noise_filling) {
  ------------------
  |  Branch (2063:13): [True: 3.73M, False: 1.30M]
  ------------------
 2064|  3.73M|          noise_filling_present =
 2065|  3.73M|              (start >= noise_filling_start_offset) & noise_filling;
 2066|  3.73M|        }
 2067|       |
 2068|  5.03M|        length = pstr_sfb_info->ptr_sfb_tbl[sfb] - start;
 2069|       |
 2070|  5.03M|        ixheaacd_esc_iquant(&quant[ixheaacd_drc_offset + start],
 2071|  5.03M|                            &coef[ixheaacd_drc_offset + start], noise_level_fix,
 2072|  5.03M|                            noise_filling_present, seed_value, length, fac_fix);
 2073|  5.03M|      }
 2074|  2.84M|    }
 2075|       |
 2076|   652k|    win_tot += pstr_sfb_info->group_len[grp];
 2077|   652k|  }
 2078|       |
 2079|   319k|  return;
 2080|   319k|}
ixheaacd_arith_dec.c:ixheaacd_esc_iquant:
 1942|  5.03M|                                WORD32 length, WORD64 fac_fix) {
 1943|  5.03M|  WORD32 q1 = 0;
 1944|  5.03M|  WORD64 temp;
 1945|  5.03M|  WORD16 interp;
 1946|  5.03M|  WORD32 i;
 1947|  5.03M|  WORD16 flag;
 1948|       |
 1949|  50.5M|  for (i = 0; i < length; i++) {
  ------------------
  |  Branch (1949:15): [True: 45.5M, False: 5.03M]
  ------------------
 1950|  45.5M|    flag = 1;
 1951|       |
 1952|  45.5M|    if (with_noise) {
  ------------------
  |  Branch (1952:9): [True: 22.1M, False: 23.3M]
  ------------------
 1953|  22.1M|      if (q[i] == 0) {
  ------------------
  |  Branch (1953:11): [True: 17.1M, False: 4.97M]
  ------------------
 1954|  17.1M|        coef[i] = (ixheaacd_randomsign_fix(seed_value) * noise_level);
 1955|  17.1M|        temp = (fac_fix * coef[i]);
 1956|  17.1M|        coef[i] = (WORD32)(temp >> 25);
 1957|  17.1M|        continue;
 1958|  17.1M|      }
 1959|  22.1M|    }
 1960|       |
 1961|  28.3M|    if (q[i] < 0) {
  ------------------
  |  Branch (1961:9): [True: 7.90M, False: 20.4M]
  ------------------
 1962|  7.90M|      flag = -1;
 1963|  7.90M|      q[i] = -q[i];
 1964|  7.90M|    }
 1965|       |
 1966|  28.3M|    if (q[i] >= 8192) {
  ------------------
  |  Branch (1966:9): [True: 0, False: 28.3M]
  ------------------
 1967|      0|      q[i] = 8191;
 1968|      0|    }
 1969|       |
 1970|  28.3M|    if (q[i] < 1024) {
  ------------------
  |  Branch (1970:9): [True: 28.3M, False: 1.19k]
  ------------------
 1971|  28.3M|      coef[i] = flag * ixheaacd_pow_table_Q13[q[i]];
 1972|  28.3M|    } else {
 1973|  1.19k|      q1 = (q[i]) >> 3;
 1974|       |
 1975|  1.19k|      interp = q[i] - (q1 << 3);
 1976|       |
 1977|  1.19k|      coef[i] = ixheaacd_pow_table_Q13[q1 + 1] - ixheaacd_pow_table_Q13[q1];
 1978|       |
 1979|  1.19k|      coef[i] = (WORD32)(coef[i] * (WORD32)interp);
 1980|       |
 1981|  1.19k|      coef[i] = coef[i] + (ixheaacd_pow_table_Q13[q1] << 3);
 1982|       |
 1983|  1.19k|      coef[i] = flag * (coef[i] << 1);
 1984|  1.19k|    }
 1985|  28.3M|    temp = ixheaac_mult64_sat(fac_fix, (WORD64)coef[i]);
 1986|       |
 1987|  28.3M|    coef[i] = (WORD32)(temp >> 22);
 1988|  28.3M|  }
 1989|       |
 1990|  5.03M|  return;
 1991|  5.03M|}
ixheaacd_arith_dec.c:ixheaacd_randomsign_fix:
 1929|  17.1M|static WORD32 ixheaacd_randomsign_fix(UWORD32 *seed) {
 1930|  17.1M|  WORD32 sign = 0;
 1931|  17.1M|  *seed = (UWORD32)(((UWORD64)(*seed) * (UWORD64)69069) + 5);
 1932|  17.1M|  if (((*seed) & 0x10000) > 0) {
  ------------------
  |  Branch (1932:7): [True: 8.65M, False: 8.52M]
  ------------------
 1933|  8.65M|    sign = -1;
 1934|  8.65M|  } else {
 1935|  8.52M|    sign = +1;
 1936|  8.52M|  }
 1937|  17.1M|  return sign;
 1938|  17.1M|}

ixheaacd_voronoi_search:
  103|   159k|                             WORD32 *rem2) {
  104|   159k|  WORD32 i, y0[8], y1[8];
  105|   159k|  WORD32 x1[8], tmp;
  106|   159k|  WORD32 e0, e1;
  107|       |
  108|   159k|  ixheaacd_nearest_neighbor_2d(x, y0, count, rem1);
  109|  1.43M|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (109:15): [True: 1.27M, False: 159k]
  ------------------
  110|  1.27M|    if (x[i] == 0) {
  ------------------
  |  Branch (110:9): [True: 665k, False: 609k]
  ------------------
  111|   665k|      if (rem2[i] == 0) {
  ------------------
  |  Branch (111:11): [True: 292k, False: 373k]
  ------------------
  112|   292k|        x1[i] = x[i] - 1;
  113|   373k|      } else {
  114|   373k|        x1[i] = 0;
  115|   373k|        rem2[i] = ixheaac_sub32_sat(rem2[i], (1 << count));
  116|   373k|      }
  117|   665k|    } else {
  118|   609k|      x1[i] = ixheaac_sub32_sat(x[i], 1);
  119|   609k|    }
  120|  1.27M|  }
  121|       |
  122|   159k|  ixheaacd_nearest_neighbor_2d(x1, y1, count, rem2);
  123|       |
  124|  1.43M|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (124:15): [True: 1.27M, False: 159k]
  ------------------
  125|  1.27M|    y1[i] = ixheaac_add32_sat(y1[i], 1);
  126|  1.27M|  }
  127|       |
  128|   159k|  e0 = e1 = 0;
  129|  1.43M|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (129:15): [True: 1.27M, False: 159k]
  ------------------
  130|  1.27M|    tmp = rem1[i];
  131|  1.27M|    e0 = ixheaac_add32_sat(ixheaac_sat64_32((WORD64)tmp * (WORD64)tmp), e0);
  132|  1.27M|    tmp = rem2[i];
  133|  1.27M|    e1 = ixheaac_add32_sat(ixheaac_sat64_32((WORD64)tmp * (WORD64)tmp), e1);
  134|  1.27M|  }
  135|       |
  136|   159k|  if (e0 < e1) {
  ------------------
  |  Branch (136:7): [True: 113k, False: 45.8k]
  ------------------
  137|  1.02M|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (137:17): [True: 908k, False: 113k]
  ------------------
  138|   908k|      y[i] = y0[i];
  139|   908k|    }
  140|   113k|  } else {
  141|   412k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (141:17): [True: 366k, False: 45.8k]
  ------------------
  142|   366k|      y[i] = y1[i];
  143|   366k|    }
  144|  45.8k|  }
  145|   159k|  return;
  146|   159k|}
ixheaacd_voronoi_idx_dec:
  148|   159k|VOID ixheaacd_voronoi_idx_dec(WORD32 *kv, WORD32 m, WORD32 *y, WORD32 count) {
  149|   159k|  WORD32 i, v[8], tmp, sum, *ptr1, *ptr2;
  150|   159k|  WORD32 z[8];
  151|   159k|  WORD32 rem1[8], rem2[8];
  152|       |
  153|  1.43M|  for (i = 0; i < 8; i++) y[i] = kv[7];
  ------------------
  |  Branch (153:15): [True: 1.27M, False: 159k]
  ------------------
  154|       |
  155|   159k|  z[7] = y[7] >> count;
  156|   159k|  rem1[7] = y[7] & (m - 1);
  157|   159k|  sum = 0;
  158|  1.11M|  for (i = 6; i >= 1; i--) {
  ------------------
  |  Branch (158:15): [True: 956k, False: 159k]
  ------------------
  159|   956k|    tmp = ixheaac_shl32_sat(kv[i], 1);
  160|   956k|    sum = ixheaac_add32_sat(sum, tmp);
  161|   956k|    y[i] = ixheaac_add32_sat(y[i], tmp);
  162|   956k|    z[i] = y[i] >> count;
  163|   956k|    rem1[i] = y[i] & (m - 1);
  164|   956k|  }
  165|   159k|  y[0] = ixheaac_add32_sat(
  166|   159k|      y[0],
  167|   159k|      ixheaac_add32_sat(ixheaac_sat64_32((WORD64)4 * (WORD64)kv[0]), sum));
  168|   159k|  z[0] = (ixheaac_sub32_sat(y[0], 2)) >> count;
  169|   159k|  if (m != 0)
  ------------------
  |  Branch (169:7): [True: 159k, False: 0]
  ------------------
  170|   159k|    rem1[0] = (ixheaac_sub32_sat(y[0], 2)) % m;
  171|      0|  else
  172|      0|    rem1[0] = ixheaac_sub32_sat(y[0], 2);
  173|       |
  174|   159k|  memcpy(rem2, rem1, 8 * sizeof(WORD32));
  175|       |
  176|   159k|  ixheaacd_voronoi_search(z, v, count, rem1, rem2);
  177|       |
  178|   159k|  ptr1 = y;
  179|   159k|  ptr2 = v;
  180|  1.43M|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (180:15): [True: 1.27M, False: 159k]
  ------------------
  181|  1.27M|    *ptr1 = ixheaac_sub32_sat(*ptr1,
  182|  1.27M|                               ixheaac_sat64_32((WORD64)m * (WORD64)*ptr2++));
  183|  1.27M|    ptr1++;
  184|  1.27M|  }
  185|   159k|}
ixheaacd_rotated_gosset_mtx_dec:
  286|  4.02M|                                     WORD32 *kv, WORD32 *b) {
  287|  4.02M|  if (qn <= 4) {
  ------------------
  |  Branch (287:7): [True: 3.86M, False: 159k]
  ------------------
  288|  3.86M|    ixheaacd_gosset_decode_base_index(qn, code_book_idx, b);
  289|  3.86M|  } else {
  290|   159k|    WORD32 i, m, c[8];
  291|   159k|    WORD32 count = 0;
  292|   522k|    while (qn > 4) {
  ------------------
  |  Branch (292:12): [True: 363k, False: 159k]
  ------------------
  293|   363k|      count++;
  294|   363k|      qn -= 2;
  295|   363k|    }
  296|       |
  297|   159k|    if (count >= 31)
  ------------------
  |  Branch (297:9): [True: 0, False: 159k]
  ------------------
  298|      0|      m = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  299|   159k|    else
  300|   159k|      m = 1 << count;
  301|       |
  302|   159k|    ixheaacd_gosset_decode_base_index(qn, code_book_idx, b);
  303|       |
  304|   159k|    ixheaacd_voronoi_idx_dec(kv, m, c, count);
  305|       |
  306|  1.43M|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (306:17): [True: 1.27M, False: 159k]
  ------------------
  307|  1.27M|      b[i] =
  308|  1.27M|          ixheaac_add32_sat(ixheaac_sat64_32((WORD64)m * (WORD64)b[i]), c[i]);
  309|  1.27M|    }
  310|   159k|  }
  311|  4.02M|  return;
  312|  4.02M|}
ixheaacd_avq_dec.c:ixheaacd_nearest_neighbor_2d:
   43|   318k|                                         WORD32 *rem) {
   44|   318k|  WORD32 i, j, sum;
   45|   318k|  WORD32 s, e[8], em;
   46|   318k|  WORD32 rem_temp[8];
   47|       |
   48|   318k|  memcpy(rem_temp, rem, 8 * sizeof(WORD32));
   49|       |
   50|   318k|  sum = 0;
   51|  2.86M|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (51:15): [True: 2.55M, False: 318k]
  ------------------
   52|  2.55M|    if (x[i] < 0) {
  ------------------
  |  Branch (52:9): [True: 307k, False: 2.24M]
  ------------------
   53|   307k|      y[i] = ixheaac_negate32_sat(
   54|   307k|          ixheaac_shl32_sat((ixheaac_sub32_sat(1, x[i]) >> 1), 1));
   55|  2.24M|    } else {
   56|  2.24M|      y[i] = ixheaac_shl32_sat((ixheaac_add32_sat(1, x[i]) >> 1), 1);
   57|  2.24M|    }
   58|  2.55M|    sum = ixheaac_add32_sat(sum, y[i]);
   59|       |
   60|  2.55M|    if (x[i] % 2 != 0) {
  ------------------
  |  Branch (60:9): [True: 902k, False: 1.64M]
  ------------------
   61|   902k|      if (x[i] < 0) {
  ------------------
  |  Branch (61:11): [True: 299k, False: 602k]
  ------------------
   62|   299k|        rem_temp[i] = ixheaac_negate32_sat(
   63|   299k|            ixheaac_sub32_sat(rem_temp[i], (1 << count)));
   64|   602k|      } else {
   65|   602k|        rem_temp[i] = ixheaac_sub32_sat(rem_temp[i], (1 << count));
   66|   602k|      }
   67|   902k|    }
   68|  2.55M|  }
   69|       |
   70|   318k|  if (sum % 4) {
  ------------------
  |  Branch (70:7): [True: 158k, False: 160k]
  ------------------
   71|   158k|    em = 0;
   72|   158k|    j = 0;
   73|  1.42M|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (73:17): [True: 1.26M, False: 158k]
  ------------------
   74|  1.26M|      e[i] = rem_temp[i];
   75|  1.26M|    }
   76|  1.42M|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (76:17): [True: 1.26M, False: 158k]
  ------------------
   77|  1.26M|      if (e[i] < 0) {
  ------------------
  |  Branch (77:11): [True: 518k, False: 751k]
  ------------------
   78|   518k|        s = -e[i];
   79|   751k|      } else {
   80|   751k|        s = e[i];
   81|   751k|      }
   82|       |
   83|  1.26M|      if (em < s) {
  ------------------
  |  Branch (83:11): [True: 220k, False: 1.04M]
  ------------------
   84|   220k|        em = s;
   85|   220k|        j = i;
   86|   220k|      }
   87|  1.26M|    }
   88|       |
   89|   158k|    if (e[j] < 0) {
  ------------------
  |  Branch (89:9): [True: 86.2k, False: 72.4k]
  ------------------
   90|  86.2k|      y[j] -= 2;
   91|  86.2k|      rem_temp[j] = ixheaac_add32_sat(rem_temp[j], (2 << count));
   92|  86.2k|    } else {
   93|  72.4k|      y[j] = ixheaac_add32_sat(y[j], 2);
   94|  72.4k|      rem_temp[j] = ixheaac_sub32_sat(rem_temp[j], (2 << count));
   95|  72.4k|    }
   96|   158k|  }
   97|       |
   98|   318k|  memcpy(rem, rem_temp, 8 * sizeof(WORD32));
   99|   318k|  return;
  100|   318k|}
ixheaacd_avq_dec.c:ixheaacd_gosset_decode_base_index:
  245|  4.02M|                                              WORD32 *ya) {
  246|  4.02M|  WORD32 i, im, t, sign_code, idx = 0, ks, rank;
  247|       |
  248|  4.02M|  if (n < 2) {
  ------------------
  |  Branch (248:7): [True: 2.23M, False: 1.78M]
  ------------------
  249|  20.1M|    for (i = 0; i < 8; i++) ya[i] = 0;
  ------------------
  |  Branch (249:17): [True: 17.9M, False: 2.23M]
  ------------------
  250|  2.23M|  } else {
  251|  1.78M|    switch (n) {
  ------------------
  |  Branch (251:13): [True: 1.78M, False: 0]
  ------------------
  252|   821k|      case 2:
  ------------------
  |  Branch (252:7): [True: 821k, False: 968k]
  ------------------
  253|  1.50M|      case 3:
  ------------------
  |  Branch (253:7): [True: 684k, False: 1.10M]
  ------------------
  254|  1.50M|        i = ixheaacd_get_abs_leader_tbl(ixheaacd_cardinality_offset_table_i3,
  255|  1.50M|                                        code_book_ind, LEN_I3);
  ------------------
  |  |   25|  1.50M|#define LEN_I3 9
  ------------------
  256|  1.50M|        idx = ixheaacd_pos_abs_leaders_a3[i];
  257|  1.50M|        break;
  258|   283k|      case 4:
  ------------------
  |  Branch (258:7): [True: 283k, False: 1.50M]
  ------------------
  259|   283k|        i = ixheaacd_get_abs_leader_tbl(ixheaacd_cardinality_offset_tab_i4,
  260|   283k|                                        code_book_ind, LEN_I4);
  ------------------
  |  |   26|   283k|#define LEN_I4 28
  ------------------
  261|   283k|        idx = ixheaacd_pos_abs_leaders_a4[i];
  262|   283k|        break;
  263|  1.78M|    }
  264|       |
  265|  16.1M|    for (i = 0; i < 8; i++) ya[i] = ixheaacd_absolute_leader_tab_da[idx][i];
  ------------------
  |  Branch (265:17): [True: 14.3M, False: 1.78M]
  ------------------
  266|       |
  267|  1.78M|    t = ixheaacd_iso_code_index_table[idx];
  268|  1.78M|    im = ixheaacd_iso_code_num_table[idx];
  269|  1.78M|    ks = ixheaacd_get_abs_leader_tbl(ixheaacd_signed_leader_is + t,
  270|  1.78M|                                     code_book_ind, im);
  271|       |
  272|  1.78M|    sign_code = 2 * ixheaacd_iso_code_data_table[t + ks];
  273|  16.1M|    for (i = 7; i >= 0; i--) {
  ------------------
  |  Branch (273:17): [True: 14.3M, False: 1.78M]
  ------------------
  274|  14.3M|      ya[i] *= (1 - (sign_code & 2));
  275|  14.3M|      sign_code >>= 1;
  276|  14.3M|    }
  277|       |
  278|  1.78M|    rank = code_book_ind - ixheaacd_signed_leader_is[t + ks];
  279|       |
  280|  1.78M|    ixheaacd_gosset_rank_of_permutation(rank, ya);
  281|  1.78M|  }
  282|  4.02M|  return;
  283|  4.02M|}
ixheaacd_avq_dec.c:ixheaacd_get_abs_leader_tbl:
  229|  3.57M|                                          UWORD32 code_book_ind, WORD32 size) {
  230|  3.57M|  WORD32 i;
  231|       |
  232|  4.55M|  for (i = 4; i < size; i += 4) {
  ------------------
  |  Branch (232:15): [True: 4.09M, False: 463k]
  ------------------
  233|  4.09M|    if (code_book_ind < table[i]) break;
  ------------------
  |  Branch (233:9): [True: 3.11M, False: 975k]
  ------------------
  234|  4.09M|  }
  235|  3.57M|  if (i > size) i = size;
  ------------------
  |  Branch (235:7): [True: 376k, False: 3.20M]
  ------------------
  236|       |
  237|  3.57M|  if (code_book_ind < table[i - 2]) i -= 2;
  ------------------
  |  Branch (237:7): [True: 2.42M, False: 1.15M]
  ------------------
  238|  3.57M|  if (code_book_ind < table[i - 1]) i--;
  ------------------
  |  Branch (238:7): [True: 1.67M, False: 1.90M]
  ------------------
  239|  3.57M|  i--;
  240|       |
  241|  3.57M|  return (i);
  242|  3.57M|}
ixheaacd_avq_dec.c:ixheaacd_gosset_rank_of_permutation:
  187|  1.78M|static VOID ixheaacd_gosset_rank_of_permutation(WORD32 rank, WORD32 *xs) {
  188|  1.78M|  WORD32 i, j, a[8], w[8], base, fac, fac_b, target;
  189|       |
  190|  1.78M|  j = 0;
  191|  1.78M|  w[j] = 1;
  192|  1.78M|  a[j] = xs[0];
  193|  1.78M|  base = 1;
  194|  14.3M|  for (i = 1; i < 8; i++) {
  ------------------
  |  Branch (194:15): [True: 12.5M, False: 1.78M]
  ------------------
  195|  12.5M|    if (xs[i] != xs[i - 1]) {
  ------------------
  |  Branch (195:9): [True: 2.93M, False: 9.59M]
  ------------------
  196|  2.93M|      j++;
  197|  2.93M|      w[j] = 1;
  198|  2.93M|      a[j] = xs[i];
  199|  9.59M|    } else {
  200|  9.59M|      w[j]++;
  201|  9.59M|      base *= w[j];
  202|  9.59M|    }
  203|  12.5M|  }
  204|       |
  205|  1.78M|  if (w[0] == 8) {
  ------------------
  |  Branch (205:7): [True: 70.7k, False: 1.71M]
  ------------------
  206|   636k|    for (i = 0; i < 8; i++) xs[i] = a[0];
  ------------------
  |  Branch (206:17): [True: 565k, False: 70.7k]
  ------------------
  207|  1.71M|  } else {
  208|  1.71M|    target = rank * base;
  209|  1.71M|    fac_b = 1;
  210|       |
  211|  15.4M|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (211:17): [True: 13.7M, False: 1.71M]
  ------------------
  212|  13.7M|      fac = fac_b * ixheaacd_factorial_7[i];
  213|  13.7M|      j = -1;
  214|  28.1M|      do {
  215|  28.1M|        target -= w[++j] * fac;
  216|  28.1M|      } while (target >= 0);
  ------------------
  |  Branch (216:16): [True: 14.3M, False: 13.7M]
  ------------------
  217|  13.7M|      xs[i] = a[j];
  218|       |
  219|  13.7M|      target += w[j] * fac;
  220|  13.7M|      fac_b *= w[j];
  221|  13.7M|      w[j]--;
  222|  13.7M|    }
  223|  1.71M|  }
  224|       |
  225|  1.78M|  return;
  226|  1.78M|}

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

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

ixheaacd_byte_align:
   39|   197k|                         WORD32 *align_bits_cnt) {
   40|   197k|  WORD alignment;
   41|   197k|  alignment = (WORD)((*align_bits_cnt - it_bit_buff->cnt_bits) & 0x07);
   42|       |
   43|   197k|  if (alignment) {
  ------------------
  |  Branch (43:7): [True: 74.8k, False: 122k]
  ------------------
   44|  74.8k|    ixheaacd_read_bits_buf(it_bit_buff, (8 - alignment));
   45|  74.8k|  }
   46|       |
   47|   197k|  *align_bits_cnt = it_bit_buff->cnt_bits;
   48|   197k|}
ixheaacd_skip_bits_buf:
   50|  5.86G|WORD32 ixheaacd_skip_bits_buf(ia_bit_buf_struct *it_bit_buff, WORD no_of_bits) {
   51|  5.86G|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
   52|  5.86G|  WORD bit_pos = it_bit_buff->bit_pos;
   53|       |
   54|  5.86G|  if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0)
  ------------------
  |  Branch (54:7): [True: 230, False: 5.86G]
  |  Branch (54:45): [True: 0, False: 5.86G]
  ------------------
   55|    230|    longjmp(*(it_bit_buff->xaac_jmp_buf),
   56|    230|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    230|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
   57|  5.86G|  it_bit_buff->cnt_bits -= no_of_bits;
   58|       |
   59|  5.86G|  ptr_read_next += no_of_bits / 8;
   60|  5.86G|  bit_pos -= (no_of_bits % 8);
   61|  5.86G|  if (bit_pos < 0) {
  ------------------
  |  Branch (61:7): [True: 733M, False: 5.12G]
  ------------------
   62|   733M|    bit_pos += 8;
   63|   733M|    ptr_read_next++;
   64|   733M|  }
   65|  5.86G|  assert(bit_pos >= 0 && bit_pos <= 7);
  ------------------
  |  Branch (65:3): [True: 0, False: 5.86G]
  |  Branch (65:3): [True: 0, False: 0]
  |  Branch (65:3): [True: 5.86G, False: 0]
  |  Branch (65:3): [True: 5.86G, False: 0]
  ------------------
   66|       |
   67|  5.86G|  it_bit_buff->ptr_read_next = ptr_read_next;
   68|  5.86G|  it_bit_buff->bit_pos = (WORD16)bit_pos;
   69|  5.86G|  return no_of_bits;
   70|  5.86G|}
ixheaacd_show_bits_buf:
   72|  5.51M|WORD32 ixheaacd_show_bits_buf(ia_bit_buf_struct *it_bit_buff, WORD no_of_bits) {
   73|  5.51M|  UWORD32 ret_val;
   74|  5.51M|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
   75|  5.51M|  WORD bit_pos = it_bit_buff->bit_pos;
   76|       |
   77|  5.51M|  if (no_of_bits == 0) {
  ------------------
  |  Branch (77:7): [True: 193, False: 5.51M]
  ------------------
   78|    193|    return 0;
   79|    193|  }
   80|       |
   81|  5.51M|  if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0 ||
  ------------------
  |  Branch (81:7): [True: 3, False: 5.51M]
  |  Branch (81:45): [True: 0, False: 5.51M]
  ------------------
   82|  5.51M|      no_of_bits > 25) {
  ------------------
  |  Branch (82:7): [True: 0, False: 5.51M]
  ------------------
   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|  5.51M|  ret_val = (UWORD32)*ptr_read_next;
   88|       |
   89|  5.51M|  bit_pos -= no_of_bits;
   90|  18.8M|  while (bit_pos < -1) {
  ------------------
  |  Branch (90:10): [True: 13.3M, False: 5.51M]
  ------------------
   91|  13.3M|    bit_pos += 8;
   92|  13.3M|    ptr_read_next++;
   93|       |
   94|  13.3M|    ret_val <<= 8;
   95|       |
   96|  13.3M|    ret_val |= (UWORD32)*ptr_read_next;
   97|  13.3M|  }
   98|       |
   99|  5.51M|  if (bit_pos == -1) {
  ------------------
  |  Branch (99:7): [True: 644k, False: 4.86M]
  ------------------
  100|   644k|    bit_pos += 8;
  101|   644k|    ret_val <<= 8;
  102|   644k|    ptr_read_next++;
  103|   644k|  }
  104|       |
  105|  5.51M|  ret_val = ret_val << ((31 - no_of_bits) - bit_pos) >> (32 - no_of_bits);
  106|       |
  107|  5.51M|  return ret_val;
  108|  5.51M|}
ixheaacd_read_bits_buf:
  110|   403M|WORD32 ixheaacd_read_bits_buf(ia_bit_buf_struct *it_bit_buff, WORD no_of_bits) {
  111|   403M|  UWORD32 ret_val;
  112|   403M|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  113|   403M|  WORD bit_pos = it_bit_buff->bit_pos;
  114|       |
  115|   403M|  if (no_of_bits == 0) {
  ------------------
  |  Branch (115:7): [True: 34.6M, False: 368M]
  ------------------
  116|  34.6M|    return 0;
  117|  34.6M|  }
  118|       |
  119|   368M|  if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0 ||
  ------------------
  |  Branch (119:7): [True: 4.94k, False: 368M]
  |  Branch (119:45): [True: 3, False: 368M]
  ------------------
  120|   368M|      no_of_bits > 25) {
  ------------------
  |  Branch (120:7): [True: 160, False: 368M]
  ------------------
  121|  5.10k|    longjmp(*(it_bit_buff->xaac_jmp_buf),
  122|  5.10k|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|  5.10k|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  123|  5.10k|  }
  124|       |
  125|   368M|  it_bit_buff->cnt_bits -= no_of_bits;
  126|   368M|  ret_val = (UWORD32)*ptr_read_next;
  127|       |
  128|   368M|  bit_pos -= no_of_bits;
  129|   429M|  while (bit_pos < -1) {
  ------------------
  |  Branch (129:10): [True: 61.4M, False: 368M]
  ------------------
  130|  61.4M|    bit_pos += 8;
  131|  61.4M|    ptr_read_next++;
  132|       |
  133|  61.4M|    ret_val <<= 8;
  134|       |
  135|  61.4M|    ret_val |= (UWORD32)*ptr_read_next;
  136|  61.4M|  }
  137|       |
  138|   368M|  if (bit_pos == -1) {
  ------------------
  |  Branch (138:7): [True: 48.0M, False: 320M]
  ------------------
  139|  48.0M|    bit_pos += 8;
  140|  48.0M|    ret_val <<= 8;
  141|  48.0M|    ptr_read_next++;
  142|  48.0M|  }
  143|       |
  144|   368M|  ret_val = ret_val << ((31 - no_of_bits) - bit_pos) >> (32 - no_of_bits);
  145|   368M|  it_bit_buff->ptr_read_next = ptr_read_next;
  146|   368M|  it_bit_buff->bit_pos = (WORD16)bit_pos;
  147|   368M|  return ret_val;
  148|   368M|}
ixheaacd_aac_read_byte:
  151|  3.60k|                            WORD32 *readword) {
  152|  3.60k|  UWORD8 *v = *ptr_read_next;
  153|  3.60k|  WORD32 bits_consumed = *bit_pos;
  154|       |
  155|  3.60k|  if ((bits_consumed -= 8) >= 0) {
  ------------------
  |  Branch (155:7): [True: 814, False: 2.79k]
  ------------------
  156|    814|    *readword = (*readword << 8) | *v;
  157|    814|    v++;
  158|  2.79k|  } else {
  159|  2.79k|    bits_consumed += 8;
  160|  2.79k|  }
  161|  3.60k|  *bit_pos = bits_consumed;
  162|  3.60k|  *ptr_read_next = v;
  163|  3.60k|  return;
  164|  3.60k|}
ixheaacd_aac_read_byte_corr1:
  167|  9.96M|                                  WORD32 *readword, UWORD8 *p_bit_buf_end) {
  168|  9.96M|  UWORD8 *v = *ptr_read_next;
  169|  9.96M|  WORD32 bits_consumed = *ptr_bit_pos;
  170|  9.96M|  WORD32 temp_bit_count = 0;
  171|       |
  172|  13.8M|  while (bits_consumed >= 8) {
  ------------------
  |  Branch (172:10): [True: 3.90M, False: 9.96M]
  ------------------
  173|  3.90M|    bits_consumed -= 8;
  174|  3.90M|    if ((p_bit_buf_end < v) && (p_bit_buf_end != 0))
  ------------------
  |  Branch (174:9): [True: 957k, False: 2.94M]
  |  Branch (174:32): [True: 80.0k, False: 877k]
  ------------------
  175|  80.0k|      temp_bit_count += 8;
  176|  3.82M|    else {
  177|  3.82M|      *readword = (*readword << 8) | *v;
  178|  3.82M|      v++;
  179|  3.82M|    }
  180|  3.90M|  }
  181|       |
  182|  9.96M|  if (bits_consumed > (31 - temp_bit_count)) {
  ------------------
  |  Branch (182:7): [True: 12.1k, False: 9.95M]
  ------------------
  183|  12.1k|    if ((p_bit_buf_end != NULL) && (p_bit_buf_end < v)) {
  ------------------
  |  Branch (183:9): [True: 12.1k, False: 0]
  |  Branch (183:36): [True: 12.1k, False: 0]
  ------------------
  184|  12.1k|      bits_consumed = 31 - temp_bit_count;
  185|  12.1k|    }
  186|  12.1k|  }
  187|       |
  188|  9.96M|  *ptr_bit_pos = bits_consumed + temp_bit_count;
  189|  9.96M|  *ptr_read_next = v;
  190|  9.96M|  return;
  191|  9.96M|}
ixheaacd_aac_read_byte_corr:
  194|  36.0M|                                 WORD32 *readword, UWORD8 *p_bit_buf_end) {
  195|  36.0M|  UWORD8 *v = *ptr_read_next;
  196|  36.0M|  WORD32 bits_consumed = *ptr_bit_pos;
  197|       |
  198|  36.0M|  if ((bits_consumed -= 8) >= 0) {
  ------------------
  |  Branch (198:7): [True: 8.97M, False: 27.0M]
  ------------------
  199|  8.97M|    if (p_bit_buf_end < v)
  ------------------
  |  Branch (199:9): [True: 491k, False: 8.48M]
  ------------------
  200|   491k|      bits_consumed += 8;
  201|  8.48M|    else {
  202|  8.48M|      *readword = (*readword << 8) | *v;
  203|  8.48M|      v++;
  204|  8.48M|    }
  205|  27.0M|  } else {
  206|  27.0M|    bits_consumed += 8;
  207|  27.0M|  }
  208|       |
  209|  36.0M|  if (bits_consumed > 31) {
  ------------------
  |  Branch (209:7): [True: 308k, False: 35.7M]
  ------------------
  210|   308k|    if (p_bit_buf_end < v) {
  ------------------
  |  Branch (210:9): [True: 308k, False: 319]
  ------------------
  211|   308k|      bits_consumed = 31;
  212|   308k|    }
  213|   308k|  }
  214|       |
  215|  36.0M|  *ptr_bit_pos = bits_consumed;
  216|  36.0M|  *ptr_read_next = v;
  217|  36.0M|  return;
  218|  36.0M|}
ixheaacd_aac_read_bit:
  220|  17.0M|WORD32 ixheaacd_aac_read_bit(ia_bit_buf_struct *it_bit_buff) {
  221|  17.0M|  UWORD8 ret_val;
  222|  17.0M|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  223|  17.0M|  WORD bit_pos = it_bit_buff->bit_pos;
  224|  17.0M|  UWORD32 temp;
  225|  17.0M|  WORD no_of_bits = 1;
  226|       |
  227|  17.0M|  if (bit_pos < 0) {
  ------------------
  |  Branch (227:7): [True: 1.78M, False: 15.2M]
  ------------------
  228|  1.78M|    bit_pos = 7;
  229|  1.78M|    ptr_read_next--;
  230|  1.78M|  }
  231|       |
  232|  17.0M|  if (ptr_read_next < it_bit_buff->ptr_bit_buf_base) {
  ------------------
  |  Branch (232:7): [True: 68, False: 17.0M]
  ------------------
  233|     68|    longjmp(*(it_bit_buff->xaac_jmp_buf),
  234|     68|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     68|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  235|     68|  }
  236|       |
  237|  17.0M|  it_bit_buff->cnt_bits += no_of_bits;
  238|  17.0M|  ret_val = *ptr_read_next;
  239|  17.0M|  bit_pos -= no_of_bits;
  240|       |
  241|  17.0M|  temp = (ret_val << 24) << (bit_pos + no_of_bits);
  242|  17.0M|  it_bit_buff->ptr_read_next = ptr_read_next;
  243|  17.0M|  it_bit_buff->bit_pos = (WORD16)bit_pos;
  244|       |
  245|  17.0M|  return temp >> (32 - no_of_bits);
  246|  17.0M|}
ixheaacd_aac_read_bit_rev:
  248|  12.8M|WORD32 ixheaacd_aac_read_bit_rev(ia_bit_buf_struct *it_bit_buff) {
  249|  12.8M|  UWORD8 ret_val;
  250|  12.8M|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  251|  12.8M|  WORD bit_pos = it_bit_buff->bit_pos;
  252|  12.8M|  UWORD32 temp;
  253|  12.8M|  WORD no_of_bits = 1;
  254|       |
  255|  12.8M|  if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (255:7): [True: 111, False: 12.8M]
  |  Branch (255:45): [True: 0, False: 12.8M]
  ------------------
  256|    111|    longjmp(*(it_bit_buff->xaac_jmp_buf),
  257|    111|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    111|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  258|    111|  }
  259|       |
  260|  12.8M|  if (bit_pos >= 8) {
  ------------------
  |  Branch (260:7): [True: 741k, False: 12.1M]
  ------------------
  261|   741k|    bit_pos -= 8;
  262|   741k|    ptr_read_next++;
  263|   741k|  }
  264|       |
  265|  12.8M|  it_bit_buff->cnt_bits -= no_of_bits;
  266|  12.8M|  ret_val = *ptr_read_next;
  267|  12.8M|  bit_pos += no_of_bits;
  268|       |
  269|  12.8M|  temp = (ret_val << 24) << (bit_pos - no_of_bits);
  270|  12.8M|  it_bit_buff->ptr_read_next = ptr_read_next;
  271|  12.8M|  it_bit_buff->bit_pos = (WORD16)bit_pos;
  272|       |
  273|  12.8M|  return temp >> (32 - no_of_bits);
  274|  12.8M|}
ixheaacd_write_bit:
  279|  24.2M|{
  280|  24.2M|  WORD32 mask;
  281|       |
  282|  24.2M|  if (no_of_bits == 0) return;
  ------------------
  |  Branch (282:7): [True: 336k, False: 23.9M]
  ------------------
  283|       |
  284|  23.9M|  mask = 0x1;
  285|  23.9M|  mask <<= no_of_bits - 1;
  286|       |
  287|  23.9M|  it_bit_buff->bit_count += no_of_bits;
  288|       |
  289|  51.0M|  while (no_of_bits > 0) {
  ------------------
  |  Branch (289:10): [True: 27.0M, False: 23.9M]
  ------------------
  290|  82.6M|    while (no_of_bits > 0 && it_bit_buff->valid_bits < 8) {
  ------------------
  |  Branch (290:12): [True: 58.7M, False: 23.9M]
  |  Branch (290:30): [True: 55.5M, False: 3.14M]
  ------------------
  291|  55.5M|      it_bit_buff->byte <<= 1;
  292|  55.5M|      if (value & mask) it_bit_buff->byte |= 0x1;
  ------------------
  |  Branch (292:11): [True: 10.7M, False: 44.8M]
  ------------------
  293|  55.5M|      value <<= 1;
  294|  55.5M|      no_of_bits--;
  295|  55.5M|      it_bit_buff->valid_bits++;
  296|  55.5M|    }
  297|  27.0M|    if (it_bit_buff->valid_bits == 8) {
  ------------------
  |  Branch (297:9): [True: 6.94M, False: 20.1M]
  ------------------
  298|  6.94M|      *it_bit_buff->byte_ptr++ = it_bit_buff->byte;
  299|  6.94M|      it_bit_buff->byte = 0;
  300|  6.94M|      it_bit_buff->valid_bits = 0;
  301|  6.94M|    }
  302|  27.0M|  }
  303|  23.9M|}
ixheaacd_read_bit:
  305|   755k|WORD32 ixheaacd_read_bit(ia_bit_buf_struct *it_bit_buff, WORD32 no_of_bits) {
  306|   755k|  UWORD32 ret_val;
  307|   755k|  UWORD8 *ptr_read_next = it_bit_buff->byte_ptr;
  308|       |
  309|   755k|  if (no_of_bits == 0) {
  ------------------
  |  Branch (309:7): [True: 363k, False: 392k]
  ------------------
  310|   363k|    return 0;
  311|   363k|  }
  312|       |
  313|   392k|  ret_val =
  314|   392k|      ixheaacd_aac_showbits_32(ptr_read_next, it_bit_buff->bit_count, NULL);
  315|   392k|  it_bit_buff->byte_ptr += (no_of_bits >> 3);
  316|       |
  317|   392k|  if (it_bit_buff->valid_bits != 8) {
  ------------------
  |  Branch (317:7): [True: 14.1k, False: 378k]
  ------------------
  318|  14.1k|    UWORD8 *v = it_bit_buff->byte_ptr;
  319|  14.1k|    ret_val = (ret_val << (8 - it_bit_buff->valid_bits)) |
  320|  14.1k|              (*v >> it_bit_buff->valid_bits);
  321|  14.1k|  }
  322|       |
  323|   392k|  it_bit_buff->valid_bits -= (no_of_bits % 8);
  324|       |
  325|   392k|  ret_val = ret_val >> (32 - no_of_bits);
  326|       |
  327|   392k|  return ret_val;
  328|   755k|}

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

ixheaacd_aac_showbits_32:
   94|  2.79M|                                 WORD32 *increment) {
   95|  2.79M|  UWORD8 *v = ptr_read_next;
   96|  2.79M|  UWORD32 b = 0;
   97|  2.79M|  WORD32 i;
   98|  2.79M|  WORD32 bumped = 0;
   99|       |
  100|  13.9M|  for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (100:15): [True: 11.1M, False: 2.79M]
  ------------------
  101|  11.1M|    b = b << 8;
  102|  11.1M|    if (cnt_bits > 0) {
  ------------------
  |  Branch (102:9): [True: 11.1M, False: 5.17k]
  ------------------
  103|  11.1M|      b = b | *v;
  104|  11.1M|      v++;
  105|  11.1M|      bumped++;
  106|  11.1M|    }
  107|  11.1M|    cnt_bits -= 8;
  108|  11.1M|  }
  109|  2.79M|  if (increment != NULL) {
  ------------------
  |  Branch (109:7): [True: 1.90M, False: 885k]
  ------------------
  110|  1.90M|    *increment = bumped;
  111|  1.90M|  }
  112|  2.79M|  return b;
  113|  2.79M|}
ixheaacd_getscalefactorbandoffsets:
  117|   403k|    ia_aac_dec_tables_struct *ptr_aac_tables) {
  118|   403k|  if (ptr_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   403k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (118:7): [True: 303k, False: 99.1k]
  ------------------
  119|   303k|    return ptr_aac_tables->sfb_long_table;
  120|   303k|  } else {
  121|  99.1k|    return ptr_aac_tables->sfb_short_table;
  122|  99.1k|  }
  123|   403k|}
ixheaacd_getscalefactorbandwidth:
  127|  59.8k|    ia_aac_dec_tables_struct *ptr_aac_tables) {
  128|  59.8k|  if (ptr_ics_info->frame_length == 512) {
  ------------------
  |  Branch (128:7): [True: 13.9k, False: 45.9k]
  ------------------
  129|  13.9k|    return (
  130|  13.9k|        WORD8 *)(&ptr_aac_tables
  131|  13.9k|                      ->scale_fac_bands_512[ptr_ics_info->sampling_rate_index]
  132|  13.9k|                                           [0]);
  133|  45.9k|  } else if (ptr_ics_info->frame_length == 1024) {
  ------------------
  |  Branch (133:14): [True: 7.81k, False: 38.1k]
  ------------------
  134|  7.81k|    return (
  135|  7.81k|        WORD8 *)(&ptr_aac_tables
  136|  7.81k|                      ->scale_factor_bands_long[ptr_ics_info->sampling_rate_index]
  137|  7.81k|                                               [0]);
  138|  38.1k|  } else {
  139|  38.1k|    return (
  140|  38.1k|        WORD8 *)(&ptr_aac_tables
  141|  38.1k|                      ->scale_fac_bands_480[ptr_ics_info->sampling_rate_index]
  142|  38.1k|                                           [0]);
  143|  38.1k|  }
  144|  59.8k|}
ixheaacd_cblock_scale_spect_data:
  153|  59.8k|    WORD32 object_type, WORD32 aac_sf_data_resil_flag) {
  154|  59.8k|  WORD32 *ptr_spect_coeff = ptr_aac_dec_channel_info->ptr_spec_coeff;
  155|  59.8k|  WORD8 *ptr_sfb_width = (WORD8 *)(ixheaacd_getscalefactorbandwidth(
  156|  59.8k|      &(ptr_aac_dec_channel_info->str_ics_info), ptr_aac_tables));
  157|  59.8k|  WORD16 *ptr_scale_fac = ptr_aac_dec_channel_info->ptr_scale_factor;
  158|  59.8k|  WORD tot_bands = ptr_aac_dec_channel_info->str_ics_info.max_sfb;
  159|       |
  160|  59.8k|  WORD num_win_grp, group_len;
  161|  59.8k|  WORD32 *ptr_scale_table = ptr_aac_tables->pstr_block_tables->scale_table;
  162|  59.8k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
  163|       |
  164|  59.8k|  if (object_type == AOT_ER_AAC_LC)
  ------------------
  |  Branch (164:7): [True: 33.6k, False: 26.2k]
  ------------------
  165|  33.6k|    ptr_sfb_width = ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence]
  166|  33.6k|      .sfb_width;
  167|   146k|  for (num_win_grp = 0; num_win_grp < ptr_ics_info->num_window_groups;
  ------------------
  |  Branch (167:25): [True: 86.2k, False: 59.8k]
  ------------------
  168|  86.2k|      num_win_grp++) {
  169|  86.2k|    for (group_len = 0;
  170|   290k|        group_len < ptr_ics_info->window_group_length[num_win_grp];
  ------------------
  |  Branch (170:9): [True: 204k, False: 86.2k]
  ------------------
  171|   204k|        group_len++) {
  172|   204k|      (*ixheaacd_scale_factor_process)(
  173|   204k|          &ptr_spect_coeff[0], &ptr_scale_fac[0], tot_bands,
  174|   204k|          (WORD8 *)ptr_sfb_width, ptr_scale_table, total_channels,
  175|   204k|          object_type, aac_sf_data_resil_flag);
  176|       |
  177|   204k|      ptr_spect_coeff += MAX_BINS_SHORT;
  ------------------
  |  |   29|   204k|#define MAX_BINS_SHORT 128
  ------------------
  178|   204k|    }
  179|  86.2k|    ptr_scale_fac += MAX_SCALE_FACTOR_BANDS_SHORT;
  ------------------
  |  |   30|  86.2k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  180|  86.2k|  }
  181|  59.8k|}
ixheaacd_read_pulse_data:
  185|  49.5k|                                ia_aac_dec_tables_struct *ptr_aac_tables) {
  186|  49.5k|  WORD32 i, total_offset;
  187|  49.5k|  WORD32 error_code = 0;
  188|       |
  189|  49.5k|  WORD32 value = ixheaacd_read_bits_buf(it_bit_buff, 8);
  190|  49.5k|  ptr_pulse_info->number_pulse = value >> 6;
  191|  49.5k|  ptr_pulse_info->pulse_start_band = value & 0x3F;
  192|       |
  193|  49.5k|  if (ptr_pulse_info->pulse_start_band >= 52) {
  ------------------
  |  Branch (193:7): [True: 212, False: 49.3k]
  ------------------
  194|    212|    return (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
  ------------------
  |  |  108|    212|#define IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR 0x0000180D
  ------------------
  195|    212|  }
  196|       |
  197|  49.3k|  total_offset = ptr_aac_tables->str_aac_sfb_info[0]
  198|  49.3k|                     .sfb_index[ptr_pulse_info->pulse_start_band];
  199|       |
  200|   158k|  for (i = 0; i < ptr_pulse_info->number_pulse + 1; i++) {
  ------------------
  |  Branch (200:15): [True: 109k, False: 49.3k]
  ------------------
  201|   109k|    WORD32 value = ixheaacd_read_bits_buf(it_bit_buff, 9);
  202|   109k|    ptr_pulse_info->pulse_offset[i] = value >> 4;
  203|   109k|    ptr_pulse_info->pulse_amp[i] = value & 0xF;
  204|   109k|    total_offset += ptr_pulse_info->pulse_offset[i];
  205|       |
  206|   109k|    if (total_offset >= 1024) {
  ------------------
  |  Branch (206:9): [True: 31, False: 109k]
  ------------------
  207|     31|      error_code = (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
  ------------------
  |  |  108|     31|#define IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR 0x0000180D
  ------------------
  208|     31|    }
  209|   109k|  }
  210|       |
  211|  49.3k|  return error_code;
  212|  49.5k|}
ixheaacd_ltp_decode:
  328|  20.6k|                                 WORD32 ch) {
  329|  20.6k|  IA_ERRORCODE retval = AAC_DEC_OK;
  ------------------
  |  |   23|  20.6k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  20.6k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  330|       |
  331|  20.6k|  if (ptr_ics_info->predictor_data_present) {
  ------------------
  |  Branch (331:7): [True: 4.09k, False: 16.5k]
  ------------------
  332|  4.09k|    if (ch == 0) {
  ------------------
  |  Branch (332:9): [True: 2.05k, False: 2.03k]
  ------------------
  333|  2.05k|      ixheaacd_init_ltp_object(&(ptr_ics_info->ltp));
  334|  2.05k|      ptr_ics_info->ltp.data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  335|  2.05k|      if (ptr_ics_info->ltp.data_present) {
  ------------------
  |  Branch (335:11): [True: 866, False: 1.19k]
  ------------------
  336|    866|        if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (336:13): [True: 0, False: 866]
  ------------------
  337|    866|                                        &(ptr_ics_info->ltp), it_bit_buff,
  338|    866|                                        frame_size)) > 0) {
  339|      0|          return retval;
  340|      0|        }
  341|    866|      }
  342|  2.05k|    } else {
  343|  2.03k|      ixheaacd_init_ltp_object(&(ptr_ics_info->ltp2));
  344|  2.03k|      ptr_ics_info->ltp2.data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  345|  2.03k|      if (ptr_ics_info->ltp2.data_present) {
  ------------------
  |  Branch (345:11): [True: 1.22k, False: 812]
  ------------------
  346|  1.22k|        if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (346:13): [True: 0, False: 1.22k]
  ------------------
  347|  1.22k|                                        &(ptr_ics_info->ltp2), it_bit_buff,
  348|  1.22k|                                        frame_size)) > 0) {
  349|      0|          return retval;
  350|      0|        }
  351|  1.22k|      }
  352|  2.03k|    }
  353|  4.09k|  }
  354|  20.6k|  return retval;
  355|  20.6k|}
ixheaacd_ics_read:
  359|   327k|                         WORD32 common_window, WORD32 frame_size) {
  360|   327k|  WORD i;
  361|   327k|  WORD mask;
  362|   327k|  WORD value = 0;
  363|       |
  364|   327k|  if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (364:7): [True: 85.1k, False: 242k]
  ------------------
  365|  85.1k|    ptr_ics_info->window_sequence = 0;
  366|  85.1k|    ptr_ics_info->window_shape = 1;
  367|   242k|  } else {
  368|   242k|    if (object_type != AOT_ER_AAC_LD)
  ------------------
  |  Branch (368:9): [True: 149k, False: 92.4k]
  ------------------
  369|   149k|    {
  370|   149k|      if (frame_size == 960)
  ------------------
  |  Branch (370:11): [True: 74.0k, False: 75.8k]
  ------------------
  371|  74.0k|        ptr_ics_info->frame_length = 960;
  372|  75.8k|      else
  373|  75.8k|        ptr_ics_info->frame_length = 1024;
  374|   149k|    }
  375|   242k|    value = ixheaacd_read_bits_buf(it_bit_buff, 4);
  376|   242k|    ptr_ics_info->window_sequence = (WORD16)((value & 0x6) >> 1);
  377|   242k|    ptr_ics_info->window_shape = (WORD16)((value & 0x1));
  378|   242k|  }
  379|       |
  380|   327k|  if (ptr_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   327k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (380:7): [True: 276k, False: 50.7k]
  ------------------
  381|   276k|    ptr_ics_info->num_swb_window = num_swb_window[0];
  382|       |
  383|   276k|    ptr_ics_info->num_window_groups = 1;
  384|   276k|    ptr_ics_info->window_group_length[0] = 1;
  385|       |
  386|   276k|    if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (386:9): [True: 85.1k, False: 191k]
  ------------------
  387|  85.1k|      ptr_ics_info->max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 6);
  388|  85.1k|      if (ptr_ics_info->max_sfb == 0) ptr_ics_info->num_swb_window = 0;
  ------------------
  |  Branch (388:11): [True: 27.0k, False: 58.1k]
  ------------------
  389|   191k|    } else {
  390|   191k|      value = ixheaacd_read_bits_buf(it_bit_buff, 7);
  391|   191k|      ptr_ics_info->max_sfb = (value & 0x7E) >> 1;
  392|   191k|    }
  393|       |
  394|   276k|    if ((object_type != AOT_ER_AAC_LD) && (object_type != AOT_AAC_LTP)) {
  ------------------
  |  Branch (394:9): [True: 203k, False: 72.8k]
  |  Branch (394:43): [True: 170k, False: 33.3k]
  ------------------
  395|   170k|      if (value & 1) {
  ------------------
  |  Branch (395:11): [True: 420, False: 170k]
  ------------------
  396|    420|        return (WORD16)(
  397|    420|            (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PREDICTION_DATA_PRESENT);
  ------------------
  |  |  106|    420|#define IA_XHEAAC_DEC_EXE_NONFATAL_PREDICTION_DATA_PRESENT 0x0000180B
  ------------------
  398|    420|      }
  399|       |
  400|   170k|    } else {
  401|   106k|      ptr_ics_info->predictor_data_present = value & 1;
  402|       |
  403|   106k|      if (ptr_ics_info->predictor_data_present) {
  ------------------
  |  Branch (403:11): [True: 64.4k, False: 41.7k]
  ------------------
  404|  64.4k|        WORD32 retval = AAC_DEC_OK;
  ------------------
  |  |   23|  64.4k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  64.4k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  405|       |
  406|  64.4k|        ixheaacd_init_ltp_object(&(ptr_ics_info->ltp));
  407|  64.4k|        if (object_type < ER_OBJECT_START) {
  ------------------
  |  |   64|  64.4k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (407:13): [True: 10.9k, False: 53.4k]
  ------------------
  408|  10.9k|          if ((ptr_ics_info->ltp.data_present =
  ------------------
  |  Branch (408:15): [True: 10.8k, False: 88]
  ------------------
  409|  10.9k|                   ixheaacd_read_bits_buf(it_bit_buff, 1)) &
  410|  10.9k|              1) {
  411|  10.8k|            if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (411:17): [True: 0, False: 10.8k]
  ------------------
  412|  10.8k|                                            &(ptr_ics_info->ltp), it_bit_buff,
  413|  10.8k|                                            frame_size)) > 0) {
  414|      0|              return retval;
  415|      0|            }
  416|  10.8k|          }
  417|  10.9k|          if (common_window) {
  ------------------
  |  Branch (417:15): [True: 277, False: 10.6k]
  ------------------
  418|    277|            ixheaacd_init_ltp_object(&(ptr_ics_info->ltp2));
  419|    277|            if ((ptr_ics_info->ltp2.data_present =
  ------------------
  |  Branch (419:17): [True: 16, False: 261]
  ------------------
  420|    277|                     ixheaacd_read_bits_buf(it_bit_buff, 1)) &
  421|    277|                1) {
  422|     16|              if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (422:19): [True: 0, False: 16]
  ------------------
  423|     16|                                              &(ptr_ics_info->ltp2),
  424|     16|                                              it_bit_buff, frame_size)) > 0) {
  425|      0|                return retval;
  426|      0|              }
  427|     16|            }
  428|    277|          }
  429|  10.9k|        }
  430|  64.4k|        if ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)) {
  ------------------
  |  Branch (430:13): [True: 16, False: 64.4k]
  |  Branch (430:48): [True: 53.4k, False: 10.9k]
  ------------------
  431|  53.4k|          if (!common_window && (object_type >= ER_OBJECT_START)) {
  ------------------
  |  |   64|  51.1k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (431:15): [True: 51.1k, False: 2.33k]
  |  Branch (431:33): [True: 51.1k, False: 0]
  ------------------
  432|  51.1k|            if ((ptr_ics_info->ltp.data_present =
  ------------------
  |  Branch (432:17): [True: 44.3k, False: 6.74k]
  ------------------
  433|  51.1k|                     ixheaacd_read_bits_buf(it_bit_buff, 1)) &
  434|  51.1k|                1) {
  435|  44.3k|              if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (435:19): [True: 3, False: 44.3k]
  ------------------
  436|  44.3k|                                              &(ptr_ics_info->ltp), it_bit_buff,
  437|  44.3k|                                              frame_size)) < 0) {
  438|      3|                return retval;
  439|      3|              }
  440|  44.3k|            }
  441|  51.1k|          }
  442|  53.4k|        }
  443|  64.4k|      }
  444|   106k|    }
  445|       |
  446|   276k|  } else {
  447|  50.7k|    WORD32 num_groups = 0, scale_factor_grouping;
  448|  50.7k|    ptr_ics_info->num_swb_window = num_swb_window[1];
  449|       |
  450|  50.7k|    value = ixheaacd_read_bits_buf(it_bit_buff, 11);
  451|  50.7k|    ptr_ics_info->max_sfb = (value & 0x780) >> 7;
  452|       |
  453|  50.7k|    scale_factor_grouping = (value & 0x7F);
  454|       |
  455|  50.7k|    mask = 0x40;
  456|   405k|    for (i = 0; i < 7; i++) {
  ------------------
  |  Branch (456:17): [True: 355k, False: 50.7k]
  ------------------
  457|   355k|      ptr_ics_info->window_group_length[i] = 1;
  458|       |
  459|   355k|      if (scale_factor_grouping & mask) {
  ------------------
  |  Branch (459:11): [True: 212k, False: 142k]
  ------------------
  460|   212k|        ptr_ics_info->window_group_length[num_groups] =
  461|   212k|            ptr_ics_info->window_group_length[num_groups] + 1;
  462|       |
  463|   212k|      } else {
  464|   142k|        num_groups = num_groups + 1;
  465|   142k|      }
  466|       |
  467|   355k|      mask = mask >> 1;
  468|   355k|    }
  469|       |
  470|  50.7k|    ptr_ics_info->window_group_length[7] = 1;
  471|  50.7k|    ptr_ics_info->num_window_groups = num_groups + 1;
  472|  50.7k|  }
  473|       |
  474|   327k|  if (ptr_ics_info->max_sfb > ptr_ics_info->num_swb_window) {
  ------------------
  |  Branch (474:7): [True: 32.9k, False: 294k]
  ------------------
  475|  32.9k|    return (WORD16)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED;
  ------------------
  |  |  103|  32.9k|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED 0x00001808
  ------------------
  476|  32.9k|  }
  477|       |
  478|   294k|  return AAC_DEC_OK;
  ------------------
  |  |   23|   294k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   294k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  479|   327k|}
ixheaacd_individual_ch_stream:
  484|   290k|    ia_eld_specific_config_struct eld_specific_config, WORD32 ele_type) {
  485|   290k|  WORD16 error_code = AAC_DEC_OK;
  ------------------
  |  |   23|   290k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   290k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  486|   290k|  WORD32 ch;
  487|   290k|  WORD32 crc_reg = 0;
  488|       |
  489|   611k|  for (ch = 0; ch < num_ch; ch++) {
  ------------------
  |  Branch (489:16): [True: 325k, False: 286k]
  ------------------
  490|   325k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_ch_info =
  491|   325k|        aac_dec_handle->pstr_aac_dec_ch_info[ch];
  492|   325k|    ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_ch_info->str_ics_info;
  493|       |
  494|   325k|    if (ch == 1) {
  ------------------
  |  Branch (494:9): [True: 35.0k, False: 290k]
  ------------------
  495|  35.0k|      if (it_bit_buff->pstr_adts_crc_info->crc_active == 1 &&
  ------------------
  |  Branch (495:11): [True: 41, False: 35.0k]
  ------------------
  496|     41|          (it_bit_buff->pstr_adts_crc_info->no_reg < 7)) {
  ------------------
  |  Branch (496:11): [True: 30, False: 11]
  ------------------
  497|     30|        crc_reg =
  498|     30|            ixheaacd_adts_crc_start_reg(it_bit_buff->pstr_adts_crc_info,
  499|     30|                                        it_bit_buff, CRC_ADTS_RAW_IIND_ICS);
  ------------------
  |  |   27|     30|#define CRC_ADTS_RAW_IIND_ICS 128
  ------------------
  500|     30|      }
  501|  35.0k|    }
  502|   325k|    ptr_aac_dec_ch_info->global_gain =
  503|   325k|        (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 8);
  504|       |
  505|   325k|    if (!(aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->common_window)) {
  ------------------
  |  |   40|   325k|#define LEFT 0
  ------------------
  |  Branch (505:9): [True: 264k, False: 61.1k]
  ------------------
  506|   264k|      error_code = ixheaacd_ics_read(
  507|   264k|          it_bit_buff, ptr_ics_info, aac_dec_handle->num_swb_window,
  508|   264k|          object_type,
  509|   264k|          aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->common_window,
  ------------------
  |  |   40|   264k|#define LEFT 0
  ------------------
  510|   264k|          aac_dec_handle->samples_per_frame);
  511|   264k|      if (ch == 1)
  ------------------
  |  Branch (511:11): [True: 4.81k, False: 259k]
  ------------------
  512|  4.81k|        aac_dec_handle->pstr_aac_dec_ch_info[ch - 1]->str_ics_info.ltp2.lag =
  513|  4.81k|            ptr_ics_info->ltp.lag;
  514|       |
  515|   264k|      if (error_code) {
  ------------------
  |  Branch (515:11): [True: 747, False: 263k]
  ------------------
  516|    747|        if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (516:13): [True: 0, False: 747]
  ------------------
  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|    747|        return error_code;
  521|    747|      }
  522|   264k|    }
  523|       |
  524|   324k|    error_code = ixheaacd_read_block_data(
  525|   324k|        it_bit_buff, ptr_aac_dec_ch_info, aac_dec_handle->pstr_aac_tables,
  526|   324k|        total_channels, frame_size, object_type,
  527|   324k|        eld_specific_config.aac_spect_data_resil_flag,
  528|   324k|        eld_specific_config.aac_sect_data_resil_flag,
  529|   324k|        eld_specific_config.aac_sf_data_resil_flag, ele_type,
  530|   324k|        aac_dec_handle->pstr_aac_dec_overlap_info[ch]);
  531|   324k|    if (error_code) {
  ------------------
  |  Branch (531:9): [True: 3.40k, False: 321k]
  ------------------
  532|  3.40k|      if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (532:11): [True: 103, False: 3.29k]
  ------------------
  533|    103|        error_code = (WORD16)(
  534|    103|            (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    103|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  535|    103|      }
  536|       |
  537|  3.40k|      return error_code;
  538|  3.40k|    }
  539|       |
  540|   321k|    if (ch == 0) {
  ------------------
  |  Branch (540:9): [True: 285k, False: 35.7k]
  ------------------
  541|   285k|      if ((object_type == AOT_ER_AAC_LD) &&
  ------------------
  |  Branch (541:11): [True: 87.6k, False: 197k]
  ------------------
  542|  87.6k|          (aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->common_window) &&
  ------------------
  |  |   40|  87.6k|#define LEFT 0
  ------------------
  |  Branch (542:11): [True: 10.3k, False: 77.3k]
  ------------------
  543|  10.3k|          (ele_type == ID_CPE)) {
  ------------------
  |  Branch (543:11): [True: 10.3k, False: 0]
  ------------------
  544|  10.3k|        IA_ERRORCODE temp =
  545|  10.3k|            ixheaacd_ltp_decode(it_bit_buff, ptr_ics_info, object_type,
  546|  10.3k|                                aac_dec_handle->samples_per_frame, 1);
  547|       |
  548|  10.3k|        if (temp != 0) {
  ------------------
  |  Branch (548:13): [True: 1, False: 10.3k]
  ------------------
  549|      1|          return temp;
  550|      1|        }
  551|  10.3k|        aac_dec_handle->pstr_aac_dec_ch_info[ch + 1]->str_ics_info.ltp.lag =
  552|  10.3k|            ptr_ics_info->ltp2.lag;
  553|  10.3k|      }
  554|   285k|    }
  555|   321k|    if (ch == 1) {
  ------------------
  |  Branch (555:9): [True: 34.5k, False: 286k]
  ------------------
  556|  34.5k|      if (it_bit_buff->pstr_adts_crc_info->crc_active == 1) {
  ------------------
  |  Branch (556:11): [True: 33, False: 34.5k]
  ------------------
  557|     33|        ixheaacd_adts_crc_end_reg(it_bit_buff->pstr_adts_crc_info, it_bit_buff,
  558|     33|                                  crc_reg);
  559|     33|      }
  560|  34.5k|    }
  561|   321k|  }
  562|       |
  563|   286k|  return error_code;
  564|   290k|}
ixheaacd_read_ms_data:
  568|  30.7k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_ch_info) {
  569|  30.7k|  WORD32 num_win_group, sfb;
  570|  30.7k|  WORD32 ms_mask_present;
  571|  30.7k|  UWORD8 *ptr_ms_used = &ptr_aac_dec_ch_info->pstr_stereo_info->ms_used[0][0];
  572|  30.7k|  WORD32 num_window_groups =
  573|  30.7k|      ptr_aac_dec_ch_info->str_ics_info.num_window_groups;
  574|  30.7k|  WORD16 max_sfb = ptr_aac_dec_ch_info->str_ics_info.max_sfb;
  575|       |
  576|  30.7k|  ms_mask_present = ixheaacd_read_bits_buf(it_bit_buff, 2);
  577|       |
  578|  30.7k|  if (ms_mask_present < 1) {
  ------------------
  |  Branch (578:7): [True: 18.6k, False: 12.1k]
  ------------------
  579|  18.6k|    memset(ptr_ms_used, 0,
  580|  18.6k|           sizeof(UWORD8) * JOINT_STEREO_MAX_BANDS * JOINT_STEREO_MAX_GROUPS);
  ------------------
  |  |   31|  18.6k|#define JOINT_STEREO_MAX_BANDS 64
  ------------------
                         sizeof(UWORD8) * JOINT_STEREO_MAX_BANDS * JOINT_STEREO_MAX_GROUPS);
  ------------------
  |  |   30|  18.6k|#define JOINT_STEREO_MAX_GROUPS 8
  ------------------
  581|  18.6k|  }
  582|       |
  583|  12.1k|  else if (ms_mask_present == 1) {
  ------------------
  |  Branch (583:12): [True: 3.35k, False: 8.77k]
  ------------------
  584|  7.13k|    for (num_win_group = 0; num_win_group < num_window_groups;
  ------------------
  |  Branch (584:29): [True: 3.77k, False: 3.35k]
  ------------------
  585|  3.77k|         num_win_group++) {
  586|  10.0k|      for (sfb = 0; sfb < max_sfb; sfb++) {
  ------------------
  |  Branch (586:21): [True: 6.28k, False: 3.77k]
  ------------------
  587|  6.28k|        ptr_aac_dec_ch_info->pstr_stereo_info->ms_used[num_win_group][sfb] =
  588|  6.28k|            (UWORD8)ixheaacd_read_bits_buf(it_bit_buff, 1);
  589|  6.28k|      }
  590|  3.77k|    }
  591|       |
  592|  8.77k|  } else {
  593|  27.5k|    for (num_win_group = 0; num_win_group < num_window_groups;
  ------------------
  |  Branch (593:29): [True: 18.7k, False: 8.77k]
  ------------------
  594|  18.7k|         num_win_group++) {
  595|  18.7k|      ptr_ms_used =
  596|  18.7k|          &ptr_aac_dec_ch_info->pstr_stereo_info->ms_used[num_win_group][0];
  597|  18.7k|      memset(ptr_ms_used, 1, (max_sfb) * sizeof(UWORD8));
  598|  18.7k|    }
  599|  8.77k|  }
  600|  30.7k|}
ixheaacd_channel_pair_process:
  606|   284k|    WORD32 *out_data, void *self_ptr) {
  607|   284k|  WORD32 channel;
  608|   284k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|   284k|#define IA_NO_ERROR 0x00000000
  ------------------
  609|   284k|  ia_aac_decoder_struct *self = self_ptr;
  610|   284k|  if (aac_spect_data_resil_flag &&
  ------------------
  |  Branch (610:7): [True: 59.6k, False: 225k]
  ------------------
  611|  59.6k|      ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_ER_AAC_ELD) ||
  ------------------
  |  Branch (611:8): [True: 22.9k, False: 36.6k]
  |  Branch (611:42): [True: 3.08k, False: 33.6k]
  ------------------
  612|  59.6k|      (object_type == AOT_ER_AAC_LC))) {
  ------------------
  |  Branch (612:7): [True: 33.6k, False: 0]
  ------------------
  613|   119k|    for (channel = 0; channel < num_ch; channel++) {
  ------------------
  |  Branch (613:23): [True: 59.8k, False: 59.6k]
  ------------------
  614|  59.8k|      err = ixheaacd_cblock_inv_quant_spect_data(
  615|  59.8k|          ptr_aac_dec_channel_info[channel], ptr_aac_tables);
  616|  59.8k|      if (err) return err;
  ------------------
  |  Branch (616:11): [True: 0, False: 59.8k]
  ------------------
  617|  59.8k|      ixheaacd_cblock_scale_spect_data(ptr_aac_dec_channel_info[channel],
  618|  59.8k|                                       ptr_aac_tables, num_ch, object_type,
  619|  59.8k|                                       aac_sf_data_resil_flag);
  620|  59.8k|    }
  621|  59.6k|  }
  622|       |
  623|   284k|  if (num_ch > 1) {
  ------------------
  |  Branch (623:7): [True: 34.5k, False: 250k]
  ------------------
  624|  34.5k|    if (ptr_aac_dec_channel_info[LEFT]->common_window) {
  ------------------
  |  |   40|  34.5k|#define LEFT 0
  ------------------
  |  Branch (624:9): [True: 29.7k, False: 4.79k]
  ------------------
  625|  29.7k|      if (ptr_aac_dec_channel_info[LEFT]->str_pns_info.pns_active ||
  ------------------
  |  |   40|  29.7k|#define LEFT 0
  ------------------
  |  Branch (625:11): [True: 4.43k, False: 25.3k]
  ------------------
  626|  25.3k|          ptr_aac_dec_channel_info[RIGHT]->str_pns_info.pns_active) {
  ------------------
  |  |   41|  25.3k|#define RIGHT 1
  ------------------
  |  Branch (626:11): [True: 391, False: 24.9k]
  ------------------
  627|  4.82k|        ixheaacd_map_ms_mask_pns(ptr_aac_dec_channel_info);
  628|  4.82k|      }
  629|       |
  630|  29.7k|      ixheaacd_ms_stereo_process(ptr_aac_dec_channel_info, ptr_aac_tables);
  631|  29.7k|    }
  632|       |
  633|  34.5k|    ixheaacd_intensity_stereo_process(
  634|  34.5k|        ptr_aac_dec_channel_info, ptr_aac_tables, object_type,
  635|  34.5k|        aac_sf_data_resil_flag,
  636|  34.5k|        ptr_aac_dec_channel_info[LEFT]->str_ics_info.frame_length);
  ------------------
  |  |   40|  34.5k|#define LEFT 0
  ------------------
  637|  34.5k|  }
  638|       |
  639|   604k|  for (channel = 0; channel < num_ch; channel++) {
  ------------------
  |  Branch (639:21): [True: 319k, False: 284k]
  ------------------
  640|   319k|    WORD32 *p_spectrum = ptr_aac_dec_channel_info[channel]->ptr_spec_coeff;
  641|       |
  642|   319k|    if (total_channels > 2) {
  ------------------
  |  Branch (642:9): [True: 15.4k, False: 303k]
  ------------------
  643|  15.4k|      if (ptr_aac_dec_channel_info[channel]->str_ics_info.window_sequence !=
  ------------------
  |  Branch (643:11): [True: 11.5k, False: 3.89k]
  ------------------
  644|  15.4k|          EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  15.4k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  645|  11.5k|        WORD16 *band_offsets = ptr_aac_tables->sfb_long_table;
  646|  11.5k|        WORD32 no_spec_coeff = band_offsets[ptr_aac_dec_channel_info[channel]
  647|  11.5k|                                                ->str_ics_info.max_sfb];
  648|  11.5k|        ixheaacd_right_shift_block(p_spectrum, no_spec_coeff, 3);
  649|  11.5k|      } else {
  650|  3.89k|        ixheaacd_right_shift_block(p_spectrum, 1024, 3);
  651|  3.89k|      }
  652|  15.4k|    }
  653|       |
  654|   319k|    ixheaacd_pns_process(ptr_aac_dec_channel_info, channel, ptr_aac_tables);
  655|       |
  656|   319k|    if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP)) {
  ------------------
  |  Branch (656:9): [True: 100k, False: 218k]
  |  Branch (656:43): [True: 36.3k, False: 182k]
  ------------------
  657|   137k|      {
  658|   137k|        if (channel == 0) {
  ------------------
  |  Branch (658:13): [True: 122k, False: 14.5k]
  ------------------
  659|   122k|          ltp_info *ltp1 =
  660|   122k|              &(ptr_aac_dec_channel_info[channel]->str_ics_info.ltp);
  661|   122k|          ixheaacd_lt_prediction(ptr_aac_dec_channel_info[channel], ltp1,
  662|   122k|                                 p_spectrum, ptr_aac_tables,
  663|   122k|                                 self->ptr_aac_dec_static_channel_info[LEFT]
  ------------------
  |  |   40|   122k|#define LEFT 0
  ------------------
  664|   122k|                                     ->overlap_add_data.win_shape,
  665|   122k|                                 self->sampling_rate_index, object_type,
  666|   122k|                                 self->samples_per_frame, in_data, out_data);
  667|       |
  668|   122k|        } else {
  669|  14.5k|          ltp_info *ltp2 =
  670|  14.5k|              (self->pstr_aac_dec_ch_info[0]->common_window)
  ------------------
  |  Branch (670:15): [True: 10.2k, False: 4.30k]
  ------------------
  671|  14.5k|                  ? &(ptr_aac_dec_channel_info[0]->str_ics_info.ltp2)
  672|  14.5k|                  :
  673|       |
  674|  14.5k|                  &(ptr_aac_dec_channel_info[1]->str_ics_info.ltp);
  675|  14.5k|          ixheaacd_lt_prediction(ptr_aac_dec_channel_info[channel], ltp2,
  676|  14.5k|                                 p_spectrum, ptr_aac_tables,
  677|  14.5k|                                 self->ptr_aac_dec_static_channel_info[RIGHT]
  ------------------
  |  |   41|  14.5k|#define RIGHT 1
  ------------------
  678|  14.5k|                                     ->overlap_add_data.win_shape,
  679|  14.5k|                                 self->sampling_rate_index, object_type,
  680|  14.5k|                                 self->samples_per_frame, in_data, out_data);
  681|  14.5k|        }
  682|   137k|      }
  683|   137k|    }
  684|       |
  685|   319k|    if (ptr_aac_dec_channel_info[channel]->str_tns_info.tns_data_present) {
  ------------------
  |  Branch (685:9): [True: 78.0k, False: 241k]
  ------------------
  686|  78.0k|      ixheaacd_aac_tns_process(ptr_aac_dec_channel_info[channel],
  687|  78.0k|                               total_channels, ptr_aac_tables, object_type, 1,
  688|       |                               NULL);
  689|  78.0k|    }
  690|   319k|  }
  691|   284k|  return err;
  692|   284k|}
ixheaacd_set_corr_info:
  695|  74.8k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info, WORD16 pns_band) {
  696|  74.8k|  ia_pns_correlation_info_struct *ptr_corr_info =
  697|  74.8k|      ptr_aac_dec_channel_info->pstr_pns_corr_info;
  698|  74.8k|  ptr_corr_info->correlated[(pns_band >> PNS_BAND_FLAGS_SHIFT)] |=
  ------------------
  |  |   26|  74.8k|#define PNS_BAND_FLAGS_SHIFT 3
  ------------------
  699|  74.8k|      (1 << (pns_band & PNS_BAND_FLAGS_MASK));
  ------------------
  |  |   25|  74.8k|  ((WORD16)((((WORD16)1) << PNS_BAND_FLAGS_SHIFT) - 1))
  |  |  ------------------
  |  |  |  |   26|  74.8k|#define PNS_BAND_FLAGS_SHIFT 3
  |  |  ------------------
  ------------------
  700|  74.8k|}
ixheaacd_map_ms_mask_pns:
  703|  4.82k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info[CHANNELS]) {
  704|  4.82k|  WORD32 num_win_group, sfb;
  705|       |
  706|  4.82k|  for (num_win_group = 0;
  707|  9.72k|       num_win_group <
  ------------------
  |  Branch (707:8): [True: 4.89k, False: 4.82k]
  ------------------
  708|  9.72k|       ptr_aac_dec_channel_info[LEFT]->str_ics_info.num_window_groups;
  ------------------
  |  |   40|  9.72k|#define LEFT 0
  ------------------
  709|  4.89k|       num_win_group++) {
  710|   104k|    for (sfb = 0; sfb < ptr_aac_dec_channel_info[LEFT]->str_ics_info.max_sfb;
  ------------------
  |  |   40|   104k|#define LEFT 0
  ------------------
  |  Branch (710:19): [True: 99.6k, False: 4.89k]
  ------------------
  711|  99.6k|         sfb++) {
  712|  99.6k|      if (ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  99.6k|#define LEFT 0
  ------------------
  |  Branch (712:11): [True: 74.8k, False: 24.8k]
  ------------------
  713|  99.6k|              ->pstr_stereo_info->ms_used[num_win_group][sfb]) {
  714|  74.8k|        WORD16 pns_band = (num_win_group << 4) + sfb;
  715|  74.8k|        ixheaacd_set_corr_info(ptr_aac_dec_channel_info[LEFT], pns_band);
  ------------------
  |  |   40|  74.8k|#define LEFT 0
  ------------------
  716|       |
  717|  74.8k|        if (ptr_aac_dec_channel_info[LEFT]->str_pns_info.pns_used[pns_band] &&
  ------------------
  |  |   40|  74.8k|#define LEFT 0
  ------------------
  |  Branch (717:13): [True: 36.4k, False: 38.4k]
  ------------------
  718|  36.4k|            ptr_aac_dec_channel_info[RIGHT]->str_pns_info.pns_used[pns_band]) {
  ------------------
  |  |   41|  36.4k|#define RIGHT 1
  ------------------
  |  Branch (718:13): [True: 9.83k, False: 26.5k]
  ------------------
  719|  9.83k|          ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  9.83k|#define LEFT 0
  ------------------
  720|  9.83k|              ->pstr_stereo_info->ms_used[num_win_group][sfb] ^= 1;
  721|  9.83k|        }
  722|  74.8k|      }
  723|  99.6k|    }
  724|  4.89k|  }
  725|  4.82k|}
ixheaacd_pulse_data_apply:
  729|   222k|                               const WORD16 *ptr_swb_offset, WORD object_type) {
  730|   222k|  WORD i;
  731|   222k|  WORD32 k;
  732|       |
  733|   222k|  memset(pulse_scratch, 0, sizeof(WORD32) * 256);
  734|       |
  735|   222k|  if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (735:7): [True: 158k, False: 63.5k]
  ------------------
  736|   158k|    if (ptr_pulse_info->pulse_data_present) {
  ------------------
  |  Branch (736:9): [True: 31.9k, False: 126k]
  ------------------
  737|  31.9k|      k = ptr_swb_offset[ptr_pulse_info->pulse_start_band];
  738|       |
  739|   102k|      for (i = 0; i <= ptr_pulse_info->number_pulse; i++) {
  ------------------
  |  Branch (739:19): [True: 70.1k, False: 31.9k]
  ------------------
  740|  70.1k|        k = k + ptr_pulse_info->pulse_offset[i];
  741|  70.1k|        pulse_scratch[k] = ptr_pulse_info->pulse_amp[i];
  742|  70.1k|      }
  743|  31.9k|    }
  744|   158k|  } else {
  745|  63.5k|    ptr_pulse_info->pulse_data_present = 0;
  746|  63.5k|  }
  747|   222k|}
ixheaacd_read_spectral_data:
  754|   321k|    WORD32 aac_sf_data_resil_flag) {
  755|   321k|  WORD sfb, max_sfb;
  756|   321k|  WORD num_win_grp, group_len, grp_offset;
  757|       |
  758|   321k|  WORD index;
  759|   321k|  WORD8 *ptr_code_book;
  760|   321k|  WORD16 *ptr_scale_factor;
  761|   321k|  WORD32 *ptr_spec_coef;
  762|   321k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
  763|   321k|  WORD16 *swb_offset;
  764|       |
  765|   321k|  WORD32 maximum_bins_short = ptr_ics_info->frame_length >> 3;
  766|       |
  767|   321k|  WORD32 *ptr_spec_coef_out;
  768|       |
  769|   321k|  ptr_code_book = ptr_aac_dec_channel_info->ptr_code_book;
  770|   321k|  ptr_scale_factor = ptr_aac_dec_channel_info->ptr_scale_factor;
  771|   321k|  ptr_spec_coef = ptr_aac_dec_channel_info->ptr_spec_coeff;
  772|   321k|  max_sfb = ptr_ics_info->max_sfb;
  773|       |
  774|   321k|  swb_offset =
  775|   321k|      ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence].sfb_index;
  776|       |
  777|   321k|  if (!aac_spect_data_resil_flag) {
  ------------------
  |  Branch (777:7): [True: 260k, False: 60.8k]
  ------------------
  778|   260k|    if (ptr_aac_dec_channel_info->str_ics_info.window_sequence !=
  ------------------
  |  Branch (778:9): [True: 222k, False: 37.8k]
  ------------------
  779|   260k|        EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   260k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  780|   222k|      WORD8 *ptr_scratch;
  781|       |
  782|   222k|      if (object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (782:11): [True: 63.5k, False: 158k]
  ------------------
  783|  63.5k|        ptr_scratch = (WORD8 *)ptr_aac_dec_channel_info->pulse_scratch;
  784|   158k|      else
  785|   158k|        ptr_scratch = (WORD8 *)ptr_aac_dec_channel_info->scratch_buf_ptr;
  786|       |
  787|   222k|      memset(ptr_spec_coef, 0, sizeof(WORD32) * 1024);
  788|       |
  789|   222k|      ixheaacd_pulse_data_apply(&ptr_aac_dec_channel_info->str_pulse_info,
  790|   222k|                                ptr_scratch, swb_offset, object_type);
  791|       |
  792|   222k|      ptr_spec_coef_out = &ptr_spec_coef[0];
  793|   499k|      for (sfb = 0; sfb < max_sfb;) {
  ------------------
  |  Branch (793:21): [True: 276k, False: 222k]
  ------------------
  794|   276k|        WORD ret_val;
  795|   276k|        WORD32 sfb_width;
  796|   276k|        WORD32 sect_cb = ptr_code_book[sfb];
  797|   276k|        WORD start = sfb;
  798|   276k|        if ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (798:13): [True: 75.4k, False: 201k]
  |  Branch (798:48): [True: 69.5k, False: 131k]
  ------------------
  799|   177k|            || (object_type == AOT_ER_AAC_LC)) {
  ------------------
  |  Branch (799:16): [True: 32.4k, False: 99.4k]
  ------------------
  800|   177k|          if ((sect_cb >= 16) && (sect_cb <= 31)) {
  ------------------
  |  Branch (800:15): [True: 61.9k, False: 115k]
  |  Branch (800:34): [True: 61.9k, False: 0]
  ------------------
  801|  61.9k|            ptr_code_book[sfb] = sect_cb = 11;
  802|  61.9k|          }
  803|   177k|        }
  804|  2.78M|        for (; sfb < max_sfb && (ptr_code_book[sfb] == sect_cb); sfb++)
  ------------------
  |  Branch (804:16): [True: 2.67M, False: 110k]
  |  Branch (804:33): [True: 2.51M, False: 166k]
  ------------------
  805|  2.51M|          ;
  806|       |
  807|   276k|        sfb_width = swb_offset[sfb] - swb_offset[start];
  808|       |
  809|   276k|        if (sect_cb > ZERO_HCB && (sect_cb < NOISE_HCB)) {
  ------------------
  |  |   33|   553k|#define ZERO_HCB 0
  ------------------
                      if (sect_cb > ZERO_HCB && (sect_cb < NOISE_HCB)) {
  ------------------
  |  |   38|   226k|#define NOISE_HCB 13
  ------------------
  |  Branch (809:13): [True: 226k, False: 49.8k]
  |  Branch (809:35): [True: 193k, False: 33.4k]
  ------------------
  810|   193k|          ret_val = ixheaacd_huffman_dec_word2(it_bit_buff, sect_cb, sfb_width,
  811|   193k|                                               ptr_aac_tables,
  812|   193k|                                               ptr_spec_coef_out, ptr_scratch);
  813|       |
  814|   193k|          if (ret_val != 0) {
  ------------------
  |  Branch (814:15): [True: 208, False: 193k]
  ------------------
  815|    208|            return (WORD16)(
  816|    208|                (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL);
  ------------------
  |  |  101|    208|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL 0x00001806
  ------------------
  817|    208|          }
  818|   193k|        }
  819|       |
  820|  83.3k|        else {
  821|  83.3k|          if (ptr_aac_dec_channel_info->str_pulse_info.pulse_data_present) {
  ------------------
  |  Branch (821:15): [True: 25.7k, False: 57.5k]
  ------------------
  822|  25.7k|            ixheaacd_inverse_quantize(
  823|  25.7k|                ptr_spec_coef_out, sfb_width,
  824|  25.7k|                (WORD32 *)
  825|  25.7k|                    ptr_aac_tables->pstr_block_tables->ixheaacd_pow_table_Q13,
  826|  25.7k|                ptr_scratch);
  827|  25.7k|          }
  828|  83.3k|        }
  829|   276k|        ptr_scratch += sfb_width;
  830|   276k|        ptr_spec_coef_out += sfb_width;
  831|   276k|      }
  832|       |
  833|   222k|      if ((object_type != AOT_ER_AAC_ELD) && (object_type != AOT_ER_AAC_LD))
  ------------------
  |  Branch (833:11): [True: 158k, False: 63.4k]
  |  Branch (833:46): [True: 102k, False: 55.8k]
  ------------------
  834|   102k|        index = 1024 - swb_offset[max_sfb];
  835|   119k|      else
  836|   119k|        index = frame_size - swb_offset[max_sfb];
  837|       |
  838|   222k|      if (index < 0) return -1;
  ------------------
  |  Branch (838:11): [True: 1, False: 222k]
  ------------------
  839|       |
  840|   222k|    } else {
  841|  37.8k|      memset(ptr_spec_coef, 0, sizeof(WORD32) * 1024);
  842|       |
  843|  37.8k|      grp_offset = 0;
  844|       |
  845|   242k|      for (num_win_grp = 0; num_win_grp < ptr_ics_info->num_window_groups;
  ------------------
  |  Branch (845:29): [True: 204k, False: 37.7k]
  ------------------
  846|   204k|           num_win_grp++) {
  847|   204k|        WORD grp_len = ptr_ics_info->window_group_length[num_win_grp];
  848|       |
  849|   204k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (849:13): [True: 52.7k, False: 151k]
  ------------------
  850|  52.7k|          ptr_spec_coef_out = &ptr_spec_coef[grp_offset * maximum_bins_short];
  851|   151k|        else
  852|   151k|          ptr_spec_coef_out = &ptr_spec_coef[grp_offset * MAX_BINS_SHORT];
  ------------------
  |  |   29|   151k|#define MAX_BINS_SHORT 128
  ------------------
  853|       |
  854|   204k|        WORD bands = num_win_grp * MAX_SCALE_FACTOR_BANDS_SHORT;
  ------------------
  |  |   30|   204k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  855|   268k|        for (sfb = 0; sfb < max_sfb;) {
  ------------------
  |  Branch (855:23): [True: 63.9k, False: 204k]
  ------------------
  856|  63.9k|          WORD sect_cb = ptr_code_book[bands];
  857|  63.9k|          WORD start = sfb;
  858|  63.9k|          WORD ret_val;
  859|       |
  860|  63.9k|          if ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (860:15): [True: 0, False: 63.9k]
  |  Branch (860:50): [True: 0, False: 63.9k]
  ------------------
  861|  63.9k|              || (object_type == AOT_ER_AAC_LC)) {
  ------------------
  |  Branch (861:18): [True: 49.3k, False: 14.6k]
  ------------------
  862|  49.3k|            if ((sect_cb >= 16) && (sect_cb <= 31)) {
  ------------------
  |  Branch (862:17): [True: 36.7k, False: 12.6k]
  |  Branch (862:36): [True: 36.7k, False: 0]
  ------------------
  863|  36.7k|              ptr_code_book[bands] = sect_cb = 11;
  864|  36.7k|            }
  865|  49.3k|          }
  866|       |
  867|   215k|          for (; sfb < max_sfb && (ptr_code_book[bands] == sect_cb);
  ------------------
  |  Branch (867:18): [True: 202k, False: 12.7k]
  |  Branch (867:35): [True: 151k, False: 51.2k]
  ------------------
  868|   151k|               sfb++, bands++)
  869|   151k|            ;
  870|       |
  871|  63.9k|          if (sect_cb > ZERO_HCB && (sect_cb < NOISE_HCB)) {
  ------------------
  |  |   33|   127k|#define ZERO_HCB 0
  ------------------
                        if (sect_cb > ZERO_HCB && (sect_cb < NOISE_HCB)) {
  ------------------
  |  |   38|  59.7k|#define NOISE_HCB 13
  ------------------
  |  Branch (871:15): [True: 59.7k, False: 4.19k]
  |  Branch (871:37): [True: 48.6k, False: 11.1k]
  ------------------
  872|  48.6k|            ret_val = ixheaacd_decode_huffman(
  873|  48.6k|                it_bit_buff, sect_cb, ptr_spec_coef_out, (WORD16 *)swb_offset,
  874|  48.6k|                start, sfb, grp_len, ptr_aac_tables, maximum_bins_short);
  875|       |
  876|  48.6k|            if (ret_val != 0) {
  ------------------
  |  Branch (876:17): [True: 94, False: 48.5k]
  ------------------
  877|     94|              return (WORD16)(
  878|     94|                  (WORD32)
  879|     94|                      IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL);
  ------------------
  |  |  101|     94|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL 0x00001806
  ------------------
  880|     94|            }
  881|  48.6k|          }
  882|  63.9k|        }
  883|   204k|        grp_offset = (grp_offset + grp_len);
  884|   204k|      }
  885|  37.8k|    }
  886|   259k|    {
  887|   259k|      WORD32 *ptr_scale_table;
  888|       |
  889|   259k|      if (maximum_bins_short != 120)
  ------------------
  |  Branch (889:11): [True: 208k, False: 51.3k]
  ------------------
  890|   208k|        ptr_scale_table = ptr_aac_tables->pstr_block_tables->scale_table;
  891|  51.3k|      else
  892|  51.3k|        ptr_scale_table = ptr_aac_tables->pstr_block_tables->scale_table_960;
  893|       |
  894|   259k|      WORD8 *ptr_sfb_width =
  895|   259k|          ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence]
  896|   259k|              .sfb_width;
  897|       |
  898|   686k|      for (num_win_grp = 0; num_win_grp < ptr_ics_info->num_window_groups;
  ------------------
  |  Branch (898:29): [True: 426k, False: 259k]
  ------------------
  899|   426k|           num_win_grp++) {
  900|   426k|        for (group_len = 0;
  901|   950k|             group_len < ptr_ics_info->window_group_length[num_win_grp];
  ------------------
  |  Branch (901:14): [True: 524k, False: 426k]
  ------------------
  902|   524k|             group_len++) {
  903|   524k|          (*ixheaacd_scale_factor_process)(
  904|   524k|              &ptr_spec_coef[0], &ptr_scale_factor[0], max_sfb,
  905|   524k|              (WORD8 *)ptr_sfb_width, ptr_scale_table, total_channels,
  906|   524k|              object_type, aac_sf_data_resil_flag);
  907|       |
  908|   524k|          if (maximum_bins_short == 120)
  ------------------
  |  Branch (908:15): [True: 114k, False: 409k]
  ------------------
  909|   114k|            ptr_spec_coef += maximum_bins_short;
  910|   409k|          else
  911|   409k|            ptr_spec_coef += MAX_BINS_SHORT;
  ------------------
  |  |   29|   409k|#define MAX_BINS_SHORT 128
  ------------------
  912|   524k|        }
  913|       |
  914|   426k|        ptr_scale_factor += MAX_SCALE_FACTOR_BANDS_SHORT;
  ------------------
  |  |   30|   426k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  915|   426k|      }
  916|   259k|    }
  917|   259k|  } else {
  918|  60.8k|    ia_hcr_info_struct *pstr_hcr_info = &ptr_aac_dec_channel_info->str_hcr_info;
  919|  60.8k|    WORD32 error = 0;
  920|       |
  921|  60.8k|    memset(ptr_spec_coef, 0, sizeof(WORD32) * 1024);
  922|       |
  923|  60.8k|    if (ptr_aac_dec_channel_info->reorder_spect_data_len != 0) {
  ------------------
  |  Branch (923:9): [True: 47.0k, False: 13.7k]
  ------------------
  924|  47.0k|      error = ixheaacd_huff_code_reorder_init(
  925|  47.0k|          pstr_hcr_info, ptr_aac_dec_channel_info, ptr_aac_tables, it_bit_buff);
  926|       |
  927|  47.0k|      if (error != 0) {
  ------------------
  |  Branch (927:11): [True: 303, False: 46.7k]
  ------------------
  928|    303|        return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |  102|    303|#define IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
  ------------------
  929|    303|      }
  930|  46.7k|      error = ixheaacd_hcr_decoder(pstr_hcr_info, ptr_aac_dec_channel_info,
  931|  46.7k|                                   ptr_aac_tables, it_bit_buff);
  932|       |
  933|  46.7k|      if (error != 0) {
  ------------------
  |  Branch (933:11): [True: 39.5k, False: 7.19k]
  ------------------
  934|  39.5k|        ixheaacd_huff_mute_erroneous_lines(pstr_hcr_info);
  935|  39.5k|      }
  936|       |
  937|  46.7k|      if (it_bit_buff->cnt_bits <
  ------------------
  |  Branch (937:11): [True: 420, False: 46.3k]
  ------------------
  938|  46.7k|          ptr_aac_dec_channel_info->reorder_spect_data_len) {
  939|    420|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  940|    420|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    420|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  941|    420|      }
  942|       |
  943|  46.3k|      it_bit_buff->cnt_bits +=
  944|  46.3k|          -ptr_aac_dec_channel_info->reorder_spect_data_len;
  945|  46.3k|      it_bit_buff->ptr_read_next =
  946|  46.3k|          it_bit_buff->ptr_bit_buf_base +
  947|  46.3k|          ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
  948|  46.3k|      it_bit_buff->bit_pos = (it_bit_buff->size - it_bit_buff->cnt_bits) & 7;
  949|       |
  950|  46.3k|    } else {
  951|  13.7k|      it_bit_buff->ptr_read_next =
  952|  13.7k|          it_bit_buff->ptr_bit_buf_base +
  953|  13.7k|          ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
  954|  13.7k|      it_bit_buff->bit_pos = (it_bit_buff->size - it_bit_buff->cnt_bits) & 7;
  955|  13.7k|    }
  956|  60.8k|  }
  957|       |
  958|   320k|  return AAC_DEC_OK;
  ------------------
  |  |   23|   320k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   320k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  959|   321k|}
ixheaacd_read_tns_data:
  963|  78.8k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
  964|  78.8k|  WORD win_size, window_per_frame;
  965|  78.8k|  WORD n_filt_bits, start_band_bits, order_bits;
  966|  78.8k|  WORD32 bottom;
  967|       |
  968|  78.8k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
  969|  78.8k|  ia_tns_info_aac_struct *ptr_tns_info =
  970|  78.8k|      &ptr_aac_dec_channel_info->str_tns_info;
  971|       |
  972|  78.8k|  if (ptr_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  78.8k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (972:7): [True: 56.3k, False: 22.5k]
  ------------------
  973|  56.3k|    n_filt_bits = 2;
  974|  56.3k|    start_band_bits = 6;
  975|  56.3k|    order_bits = 5;
  976|  56.3k|    window_per_frame = 1;
  977|       |
  978|  56.3k|  } else {
  979|  22.5k|    n_filt_bits = 1;
  980|  22.5k|    start_band_bits = 4;
  981|  22.5k|    order_bits = 3;
  982|  22.5k|    window_per_frame = 8;
  983|  22.5k|  }
  984|       |
  985|  78.8k|  bottom = ptr_ics_info->num_swb_window;
  986|       |
  987|   315k|  for (win_size = 0; win_size < window_per_frame; win_size++) {
  ------------------
  |  Branch (987:22): [True: 236k, False: 78.5k]
  ------------------
  988|   236k|    WORD n_filt;
  989|   236k|    WORD start_band, coef_res;
  990|   236k|    ptr_tns_info->n_filt[win_size] = n_filt =
  991|   236k|        (WORD16)ixheaacd_read_bits_buf(it_bit_buff, n_filt_bits);
  992|       |
  993|   236k|    if (n_filt) {
  ------------------
  |  Branch (993:9): [True: 89.1k, False: 147k]
  ------------------
  994|  89.1k|      WORD filt;
  995|  89.1k|      WORD top;
  996|       |
  997|  89.1k|      coef_res = ixheaacd_read_bits_buf(it_bit_buff, 1);
  998|       |
  999|  89.1k|      top = bottom;
 1000|   194k|      for (filt = 0; filt < n_filt; filt++) {
  ------------------
  |  Branch (1000:22): [True: 105k, False: 88.9k]
  ------------------
 1001|   105k|        WORD order;
 1002|   105k|        ia_filter_info_struct *filter =
 1003|   105k|            &ptr_tns_info->str_filter[win_size][filt];
 1004|       |
 1005|   105k|        start_band = ixheaacd_read_bits_buf(it_bit_buff, start_band_bits);
 1006|       |
 1007|   105k|        if (top < start_band) {
  ------------------
  |  Branch (1007:13): [True: 79.7k, False: 25.4k]
  ------------------
 1008|  79.7k|          top = start_band;
 1009|  79.7k|        }
 1010|   105k|        filter->start_band = top - start_band;
 1011|   105k|        filter->stop_band = top;
 1012|       |
 1013|   105k|        top = filter->start_band;
 1014|       |
 1015|   105k|        if (filter->start_band < 0) {
  ------------------
  |  Branch (1015:13): [True: 0, False: 105k]
  ------------------
 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|   105k|        filter->order = order = ixheaacd_read_bits_buf(it_bit_buff, order_bits);
 1021|       |
 1022|   105k|        if ((order - MAX_ORDER_LONG) > 0) {
  ------------------
  |  |   25|   105k|#define MAX_ORDER_LONG 12
  ------------------
  |  Branch (1022:13): [True: 290, False: 104k]
  ------------------
 1023|    290|          return (WORD16)(
 1024|    290|              (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_TNS_ORDER_ERROR);
  ------------------
  |  |  105|    290|#define IA_XHEAAC_DEC_EXE_NONFATAL_TNS_ORDER_ERROR 0x0000180A
  ------------------
 1025|    290|        }
 1026|       |
 1027|   104k|        if (order) {
  ------------------
  |  Branch (1027:13): [True: 89.4k, False: 15.3k]
  ------------------
 1028|  89.4k|          WORD i;
 1029|  89.4k|          WORD32 coef, coef_compress;
 1030|  89.4k|          WORD resolution, shift;
 1031|       |
 1032|  89.4k|          filter->direction =
 1033|  89.4k|              (WORD8)(ixheaacd_read_bits_buf(it_bit_buff, 1) ? -1 : 1);
  ------------------
  |  Branch (1033:23): [True: 50.9k, False: 38.4k]
  ------------------
 1034|       |
 1035|  89.4k|          coef_compress = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1036|       |
 1037|  89.4k|          filter->resolution = coef_res;
 1038|       |
 1039|  89.4k|          resolution = coef_res + 3 - coef_compress;
 1040|       |
 1041|  89.4k|          shift = 32 - resolution;
 1042|       |
 1043|   633k|          for (i = 0; i < order; i++) {
  ------------------
  |  Branch (1043:23): [True: 544k, False: 89.4k]
  ------------------
 1044|   544k|            coef = ixheaacd_read_bits_buf(it_bit_buff, resolution);
 1045|   544k|            coef = coef << shift;
 1046|   544k|            filter->coef[i] = (WORD8)(coef >> shift);
 1047|   544k|          }
 1048|  89.4k|        }
 1049|   104k|      }
 1050|  89.1k|    }
 1051|   236k|  }
 1052|  78.5k|  return AAC_DEC_OK;
  ------------------
  |  |   23|  78.5k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  78.5k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
 1053|  78.8k|}
ixheaacd_inv_quant:
 1057|  25.9k|{
 1058|  25.9k|  WORD32 q1;
 1059|  25.9k|  WORD32 temp;
 1060|  25.9k|  WORD32 q_abs;
 1061|  25.9k|  WORD16 interp;
 1062|  25.9k|  WORD32 shift;
 1063|       |
 1064|  25.9k|  q_abs = *px_quant;
 1065|       |
 1066|  25.9k|  if (q_abs > (8191 + 32))
  ------------------
  |  Branch (1066:7): [True: 214, False: 25.7k]
  ------------------
 1067|    214|    return IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL;
  ------------------
  |  |  101|    214|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL 0x00001806
  ------------------
 1068|       |
 1069|  25.7k|  if (q_abs < 1024) {
  ------------------
  |  Branch (1069:7): [True: 19.3k, False: 6.36k]
  ------------------
 1070|  19.3k|    shift = 3;
 1071|  19.3k|  } else {
 1072|  6.36k|    shift = 6;
 1073|  6.36k|  }
 1074|       |
 1075|  25.7k|  q1 = (q_abs) >> shift;
 1076|       |
 1077|  25.7k|  interp = q_abs - (q1 << shift);
 1078|       |
 1079|  25.7k|  temp = ixheaacd_pow_table_Q13[q1 + 1] - ixheaacd_pow_table_Q13[q1];
 1080|       |
 1081|  25.7k|  temp = (WORD32)(temp * (WORD32)interp);
 1082|       |
 1083|  25.7k|  temp = temp + (ixheaacd_pow_table_Q13[q1] << shift);
 1084|       |
 1085|  25.7k|  if (shift == 3)
  ------------------
  |  Branch (1085:7): [True: 19.3k, False: 6.36k]
  ------------------
 1086|  19.3k|    temp = temp << 1;
 1087|  6.36k|  else
 1088|  6.36k|    temp = temp << 2;
 1089|       |
 1090|  25.7k|  *px_quant = temp;
 1091|       |
 1092|  25.7k|  return 0;
 1093|  25.9k|}
ixheaacd_cblock_inv_quant_spect_data:
 1107|  59.8k|    ia_aac_dec_tables_struct *ptr_aac_tables) {
 1108|  59.8k|  int window, group, grp_win, band;
 1109|  59.8k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|  59.8k|#define IA_NO_ERROR 0x00000000
  ------------------
 1110|  59.8k|  int sf_bands_transmitted = ptr_aac_dec_channel_info->str_ics_info.max_sfb;
 1111|  59.8k|  WORD8 *ptr_code_book = ptr_aac_dec_channel_info->ptr_code_book;
 1112|  59.8k|  const WORD16 *band_offsets = (WORD16 *)ixheaacd_getscalefactorbandoffsets(
 1113|  59.8k|      &(ptr_aac_dec_channel_info->str_ics_info), ptr_aac_tables);
 1114|  59.8k|  WORD32 *ptr_pow_table_Q13 =
 1115|  59.8k|      (WORD32 *)ptr_aac_tables->pstr_block_tables->ixheaacd_pow_table_Q13;
 1116|       |
 1117|  59.8k|  for (window = 0, group = 0;
 1118|   146k|       group < ptr_aac_dec_channel_info->str_ics_info.num_window_groups;
  ------------------
  |  Branch (1118:8): [True: 86.2k, False: 59.8k]
  ------------------
 1119|  86.2k|       group++) {
 1120|  86.2k|    for (grp_win = 0;
 1121|   290k|         grp_win <
  ------------------
  |  Branch (1121:10): [True: 204k, False: 86.2k]
  ------------------
 1122|   290k|         ptr_aac_dec_channel_info->str_ics_info.window_group_length[group];
 1123|   204k|         grp_win++, window++) {
 1124|  2.71M|      for (band = 0; band < sf_bands_transmitted; band++) {
  ------------------
  |  Branch (1124:22): [True: 2.50M, False: 204k]
  ------------------
 1125|  2.50M|        WORD32 *ptr_spec_coef =
 1126|  2.50M|            SPEC(ptr_aac_dec_channel_info->ptr_spec_coeff, window,
  ------------------
  |  |   91|  2.50M|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
 1127|  2.50M|                 ptr_aac_dec_channel_info->granule_len) +
 1128|  2.50M|            band_offsets[band];
 1129|  2.50M|        int num_lines = band_offsets[band + 1] - band_offsets[band];
 1130|  2.50M|        int bnds = group * 16 + band;
 1131|  2.50M|        int i;
 1132|       |
 1133|  2.50M|        if ((ptr_code_book[bnds] == ZERO_HCB) ||
  ------------------
  |  |   33|  2.50M|#define ZERO_HCB 0
  ------------------
  |  Branch (1133:13): [True: 51.4k, False: 2.45M]
  ------------------
 1134|  2.45M|            (ptr_code_book[bnds] == INTENSITY_HCB) ||
  ------------------
  |  |   40|  2.45M|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1134:13): [True: 286k, False: 2.17M]
  ------------------
 1135|  2.17M|            (ptr_code_book[bnds] == INTENSITY_HCB2))
  ------------------
  |  |   39|  2.17M|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1135:13): [True: 326k, False: 1.84M]
  ------------------
 1136|   664k|          continue;
 1137|       |
 1138|  1.84M|        if (ptr_code_book[bnds] == NOISE_HCB) {
  ------------------
  |  |   38|  1.84M|#define NOISE_HCB 13
  ------------------
  |  Branch (1138:13): [True: 179k, False: 1.66M]
  ------------------
 1139|   179k|          continue;
 1140|   179k|        }
 1141|       |
 1142|  22.5M|        for (i = 0; i < num_lines; i++) {
  ------------------
  |  Branch (1142:21): [True: 20.9M, False: 1.66M]
  ------------------
 1143|  20.9M|          WORD8 temp = 0;
 1144|  20.9M|          WORD32 out1 = ptr_spec_coef[i];
 1145|  20.9M|          if (out1 <= 0) {
  ------------------
  |  Branch (1145:15): [True: 17.0M, False: 3.90M]
  ------------------
 1146|  17.0M|            out1 = sub_d(temp, out1);
  ------------------
  |  |   24|  17.0M|#define sub_d(a, b) ((a) - (b))
  ------------------
 1147|  17.0M|            if (out1 > 127) {
  ------------------
  |  Branch (1147:17): [True: 5.48k, False: 17.0M]
  ------------------
 1148|  5.48k|              err = ixheaacd_inv_quant(&out1, ptr_pow_table_Q13);
 1149|  5.48k|              if (err) return err;
  ------------------
  |  Branch (1149:19): [True: 0, False: 5.48k]
  ------------------
 1150|  5.48k|            } else
 1151|  17.0M|              out1 = ptr_pow_table_Q13[out1];
 1152|  17.0M|            ptr_spec_coef[i] = -out1;
 1153|       |
 1154|  17.0M|          } else {
 1155|  3.90M|            if (out1 > 127) {
  ------------------
  |  Branch (1155:17): [True: 4.55k, False: 3.90M]
  ------------------
 1156|  4.55k|              err = ixheaacd_inv_quant(&out1, ptr_pow_table_Q13);
 1157|  4.55k|              if (err) return err;
  ------------------
  |  Branch (1157:19): [True: 0, False: 4.55k]
  ------------------
 1158|  4.55k|            } else
 1159|  3.90M|              out1 = ptr_pow_table_Q13[out1];
 1160|       |
 1161|  3.90M|            ptr_spec_coef[i] = out1;
 1162|  3.90M|          }
 1163|  20.9M|        }
 1164|  1.66M|      }
 1165|   204k|    }
 1166|  86.2k|  }
 1167|       |
 1168|  59.8k|  return AAC_DEC_OK;
  ------------------
  |  |   23|  59.8k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  59.8k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
 1169|  59.8k|}
ixheaacd_init_ltp_object:
 1171|  68.7k|void ixheaacd_init_ltp_object(ltp_info *ltp) {
 1172|  68.7k|  ltp->data_present = 0;
 1173|  68.7k|  ltp->last_band = 0;
 1174|       |
 1175|  68.7k|  ltp->lag_update = 0;
 1176|  68.7k|  ltp->coef = 0;
 1177|  68.7k|}
ixheaacd_ltp_data:
 1181|  57.3k|                         WORD32 frame_len) {
 1182|  57.3k|  UWORD8 sfb, w;
 1183|       |
 1184|  57.3k|  if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1184:7): [True: 46.4k, False: 10.9k]
  ------------------
 1185|  46.4k|    ltp->lag_update = ixheaacd_read_bits_buf(it_bit_buf, 1);
 1186|       |
 1187|  46.4k|    if (ltp->lag_update) {
  ------------------
  |  Branch (1187:9): [True: 18.0k, False: 28.4k]
  ------------------
 1188|  18.0k|      ltp->lag = (UWORD16)ixheaacd_read_bits_buf(it_bit_buf, 10);
 1189|  18.0k|    }
 1190|  46.4k|  } else {
 1191|  10.9k|    ltp->lag = (UWORD16)ixheaacd_read_bits_buf(it_bit_buf, 11);
 1192|  10.9k|  }
 1193|       |
 1194|  57.3k|  if (ltp->lag > (frame_len << 1)) return -1;
  ------------------
  |  Branch (1194:7): [True: 7.87k, False: 49.4k]
  ------------------
 1195|       |
 1196|  49.4k|  ltp->coef = (UWORD8)ixheaacd_read_bits_buf(it_bit_buf, 3);
 1197|       |
 1198|  49.4k|  if (ics->window_sequence == EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  49.4k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (1198:7): [True: 0, False: 49.4k]
  ------------------
 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|  49.4k|  } else {
 1208|  49.4k|    ltp->last_band = (ics->max_sfb < MAX_LTP_SFB ? ics->max_sfb : MAX_LTP_SFB);
  ------------------
  |  |   24|  49.4k|#define MAX_LTP_SFB 40
  ------------------
                  ltp->last_band = (ics->max_sfb < MAX_LTP_SFB ? ics->max_sfb : MAX_LTP_SFB);
  ------------------
  |  |   24|    288|#define MAX_LTP_SFB 40
  ------------------
  |  Branch (1208:23): [True: 49.2k, False: 288]
  ------------------
 1209|       |
 1210|  1.11M|    for (sfb = 0; sfb < ltp->last_band; sfb++) {
  ------------------
  |  Branch (1210:19): [True: 1.06M, False: 49.4k]
  ------------------
 1211|  1.06M|      ltp->long_used[sfb] = ixheaacd_read_bits_buf(it_bit_buf, 1);
 1212|  1.06M|    }
 1213|  49.4k|  }
 1214|  49.4k|  if (ics->frame_length == 480) {
  ------------------
  |  Branch (1214:7): [True: 5.14k, False: 44.3k]
  ------------------
 1215|  5.14k|    if ((ics->sampling_rate_index > 5) &&
  ------------------
  |  Branch (1215:9): [True: 518, False: 4.62k]
  ------------------
 1216|    518|        (ltp->last_band > MAX_LTP_SFB_SR_FIVE_PLUS_480))
  ------------------
  |  |   25|    518|#define MAX_LTP_SFB_SR_FIVE_PLUS_480 31
  ------------------
  |  Branch (1216:9): [True: 70, False: 448]
  ------------------
 1217|     70|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_PLUS_480;
  ------------------
  |  |   25|     70|#define MAX_LTP_SFB_SR_FIVE_PLUS_480 31
  ------------------
 1218|  5.07k|    else if ((ics->sampling_rate_index == 5) &&
  ------------------
  |  Branch (1218:14): [True: 1.64k, False: 3.43k]
  ------------------
 1219|  1.64k|             (ltp->last_band > MAX_LTP_SFB_SR_FIVE_480))
  ------------------
  |  |   26|  1.64k|#define MAX_LTP_SFB_SR_FIVE_480 38
  ------------------
  |  Branch (1219:14): [True: 80, False: 1.56k]
  ------------------
 1220|     80|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_480;
  ------------------
  |  |   26|     80|#define MAX_LTP_SFB_SR_FIVE_480 38
  ------------------
 1221|  4.99k|    else if ((ics->sampling_rate_index < 5) &&
  ------------------
  |  Branch (1221:14): [True: 2.98k, False: 2.00k]
  ------------------
 1222|  2.98k|             (ltp->last_band > MAX_LTP_SFB_SR_FIVE_LESS_480))
  ------------------
  |  |   27|  2.98k|#define MAX_LTP_SFB_SR_FIVE_LESS_480 36
  ------------------
  |  Branch (1222:14): [True: 51, False: 2.93k]
  ------------------
 1223|     51|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_LESS_480;
  ------------------
  |  |   27|     51|#define MAX_LTP_SFB_SR_FIVE_LESS_480 36
  ------------------
 1224|  44.3k|  } else if (ics->frame_length == 512) {
  ------------------
  |  Branch (1224:14): [True: 30.3k, False: 13.9k]
  ------------------
 1225|  30.3k|    if ((ics->sampling_rate_index > 5) &&
  ------------------
  |  Branch (1225:9): [True: 298, False: 30.0k]
  ------------------
 1226|    298|        (ltp->last_band > MAX_LTP_SFB_SR_FIVE_PLUS_512))
  ------------------
  |  |   28|    298|#define MAX_LTP_SFB_SR_FIVE_PLUS_512 32
  ------------------
  |  Branch (1226:9): [True: 42, False: 256]
  ------------------
 1227|     42|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_PLUS_512;
  ------------------
  |  |   28|     42|#define MAX_LTP_SFB_SR_FIVE_PLUS_512 32
  ------------------
 1228|  30.3k|    else if ((ics->sampling_rate_index == 5) &&
  ------------------
  |  Branch (1228:14): [True: 29.3k, False: 993]
  ------------------
 1229|  29.3k|             (ltp->last_band > MAX_LTP_SFB_SR_FIVE_512))
  ------------------
  |  |   29|  29.3k|#define MAX_LTP_SFB_SR_FIVE_512 38
  ------------------
  |  Branch (1229:14): [True: 61, False: 29.2k]
  ------------------
 1230|     61|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_512;
  ------------------
  |  |   29|     61|#define MAX_LTP_SFB_SR_FIVE_512 38
  ------------------
 1231|  30.2k|    else if ((ics->sampling_rate_index < 5) &&
  ------------------
  |  Branch (1231:14): [True: 737, False: 29.5k]
  ------------------
 1232|    737|             (ltp->last_band > MAX_LTP_SFB_SR_FIVE_LESS_512))
  ------------------
  |  |   30|    737|#define MAX_LTP_SFB_SR_FIVE_LESS_512 37
  ------------------
  |  Branch (1232:14): [True: 24, False: 713]
  ------------------
 1233|     24|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_LESS_512;
  ------------------
  |  |   30|     24|#define MAX_LTP_SFB_SR_FIVE_LESS_512 37
  ------------------
 1234|  30.3k|  }
 1235|  49.4k|  return 0;
 1236|  57.3k|}
ixheaacd_channel.c:ixheaacd_read_block_data:
  222|   324k|{
  223|   324k|  FLAG gain_control_data_present;
  224|   324k|  WORD16 error_code = AAC_DEC_OK;
  ------------------
  |  |   23|   324k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   324k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  225|       |
  226|   324k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (226:7): [True: 59.3k, False: 264k]
  ------------------
  227|   324k|      EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   324k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  228|  59.3k|    memset(ptr_aac_dec_channel_info->ptr_scale_factor, 0,
  229|  59.3k|           MAX_WINDOWS * MAX_SCALE_FACTOR_BANDS_SHORT * 3);
  ------------------
  |  |   26|  59.3k|#define MAX_WINDOWS 8
  ------------------
                         MAX_WINDOWS * MAX_SCALE_FACTOR_BANDS_SHORT * 3);
  ------------------
  |  |   30|  59.3k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  230|  59.3k|  }
  231|       |
  232|   324k|  error_code = ixheaacd_read_section_data(
  233|   324k|      it_bit_buff, ptr_aac_dec_channel_info, aac_spect_data_resil_flag,
  234|   324k|      aac_sect_data_resil_flag, ptr_aac_tables);
  235|       |
  236|   324k|  if (error_code) {
  ------------------
  |  Branch (236:7): [True: 1.65k, False: 322k]
  ------------------
  237|  1.65k|    return error_code;
  238|  1.65k|  }
  239|   322k|  if (aac_sf_data_resil_flag &&
  ------------------
  |  Branch (239:7): [True: 109k, False: 213k]
  ------------------
  240|   109k|      ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)))
  ------------------
  |  Branch (240:8): [True: 36.5k, False: 72.6k]
  |  Branch (240:43): [True: 36.6k, False: 36.0k]
  ------------------
  241|  73.1k|    ixheaacd_rvlc_read(it_bit_buff, ptr_aac_dec_channel_info);
  242|   249k|  else
  243|   249k|    ixheaacd_read_scale_factor_data(it_bit_buff, ptr_aac_dec_channel_info,
  244|   249k|                                    ptr_aac_tables, object_type);
  245|       |
  246|   322k|  error_code = 0;
  247|   322k|  if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (247:7): [True: 255k, False: 67.0k]
  ------------------
  248|   255k|    ptr_aac_dec_channel_info->str_pulse_info.pulse_data_present =
  249|   255k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  250|   255k|    if (ptr_aac_dec_channel_info->str_pulse_info.pulse_data_present) {
  ------------------
  |  Branch (250:9): [True: 49.5k, False: 205k]
  ------------------
  251|  49.5k|      error_code = ixheaacd_read_pulse_data(
  252|  49.5k|          it_bit_buff, &ptr_aac_dec_channel_info->str_pulse_info,
  253|  49.5k|          ptr_aac_tables);
  254|  49.5k|    }
  255|       |
  256|   255k|    if (error_code) {
  ------------------
  |  Branch (256:9): [True: 226, False: 255k]
  ------------------
  257|    226|      return error_code;
  258|    226|    }
  259|   255k|  }
  260|       |
  261|   322k|  ptr_aac_dec_channel_info->str_tns_info.tns_data_present =
  262|   322k|      (FLAG)ixheaacd_read_bits_buf(it_bit_buff, 1);
  263|       |
  264|   322k|  if (object_type < ER_OBJECT_START) {
  ------------------
  |  |   64|   322k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (264:7): [True: 93.7k, False: 228k]
  ------------------
  265|  93.7k|    error_code = 0;
  266|  93.7k|    if (ptr_aac_dec_channel_info->str_tns_info.tns_data_present) {
  ------------------
  |  Branch (266:9): [True: 29.2k, False: 64.5k]
  ------------------
  267|  29.2k|      error_code =
  268|  29.2k|          ixheaacd_read_tns_data(it_bit_buff, ptr_aac_dec_channel_info);
  269|  29.2k|    }
  270|       |
  271|  93.7k|    if (error_code) {
  ------------------
  |  Branch (271:9): [True: 117, False: 93.6k]
  ------------------
  272|    117|      return error_code;
  273|    117|    }
  274|  93.7k|  }
  275|       |
  276|   322k|  if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (276:7): [True: 255k, False: 67.0k]
  ------------------
  277|   255k|    gain_control_data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  278|       |
  279|   255k|    if (gain_control_data_present) {
  ------------------
  |  Branch (279:9): [True: 525, False: 254k]
  ------------------
  280|    525|      return (WORD16)(
  281|    525|          (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_GAIN_CONTROL_DATA_PRESENT);
  ------------------
  |  |  104|    525|#define IA_XHEAAC_DEC_EXE_NONFATAL_GAIN_CONTROL_DATA_PRESENT 0x00001809
  ------------------
  282|    525|    }
  283|   255k|  }
  284|       |
  285|   321k|  if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (285:7): [True: 66.8k, False: 254k]
  ------------------
  286|  66.8k|    if (ptr_aac_dec_channel_info->str_tns_info.tns_data_present)
  ------------------
  |  Branch (286:9): [True: 5.73k, False: 61.1k]
  ------------------
  287|  5.73k|      error_code =
  288|  5.73k|          ixheaacd_read_tns_data(it_bit_buff, ptr_aac_dec_channel_info);
  289|  66.8k|    if (error_code) return error_code;
  ------------------
  |  Branch (289:9): [True: 98, False: 66.7k]
  ------------------
  290|  66.8k|  }
  291|       |
  292|   321k|  if (aac_spect_data_resil_flag &&
  ------------------
  |  Branch (292:7): [True: 60.8k, False: 260k]
  ------------------
  293|  60.8k|      ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (293:8): [True: 3.18k, False: 57.7k]
  |  Branch (293:43): [True: 23.4k, False: 34.2k]
  ------------------
  294|  34.2k|      || (object_type == AOT_ER_AAC_LC)))
  ------------------
  |  Branch (294:10): [True: 34.2k, False: 0]
  ------------------
  295|  60.8k|    ixheaacd_hcr_read(it_bit_buff, ptr_aac_dec_channel_info, ele_type);
  296|       |
  297|   321k|  if (aac_sf_data_resil_flag &&
  ------------------
  |  Branch (297:7): [True: 108k, False: 212k]
  ------------------
  298|   108k|      ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD))) {
  ------------------
  |  Branch (298:8): [True: 36.4k, False: 72.4k]
  |  Branch (298:43): [True: 36.6k, False: 35.8k]
  ------------------
  299|  73.0k|    error_code = ixheaacd_rvlc_dec(
  300|  73.0k|        ptr_aac_dec_channel_info, ptr_aac_dec_static_channel_info, it_bit_buff);
  301|  73.0k|    if (error_code) return error_code;
  ------------------
  |  Branch (301:9): [True: 103, False: 72.9k]
  ------------------
  302|       |
  303|  72.9k|    it_bit_buff->bit_pos = 7 - it_bit_buff->bit_pos;
  304|  72.9k|  }
  305|       |
  306|   321k|  if (object_type == AOT_ER_AAC_LD || object_type == AOT_ER_AAC_LC) {
  ------------------
  |  Branch (306:7): [True: 101k, False: 219k]
  |  Branch (306:39): [True: 59.5k, False: 160k]
  ------------------
  307|   160k|    if (ptr_aac_dec_channel_info->str_tns_info.tns_data_present)
  ------------------
  |  Branch (307:9): [True: 43.9k, False: 117k]
  ------------------
  308|  43.9k|      error_code =
  309|  43.9k|          ixheaacd_read_tns_data(it_bit_buff, ptr_aac_dec_channel_info);
  310|   160k|    if (error_code) return error_code;
  ------------------
  |  Branch (310:9): [True: 75, False: 160k]
  ------------------
  311|   160k|  }
  312|       |
  313|   321k|  { it_bit_buff->bit_pos = 7 - it_bit_buff->bit_pos; }
  314|       |
  315|   321k|  error_code = ixheaacd_read_spectral_data(
  316|   321k|      it_bit_buff, ptr_aac_dec_channel_info, ptr_aac_tables, total_channels,
  317|   321k|      frame_size, object_type, aac_spect_data_resil_flag,
  318|   321k|      aac_sf_data_resil_flag);
  319|       |
  320|   321k|  it_bit_buff->bit_pos = (7 - it_bit_buff->bit_pos);
  321|       |
  322|   321k|  return error_code;
  323|   321k|}

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

ixheaacd_get_channel_mask:
  108|  12.0k|    ia_exhaacplus_dec_api_struct *p_obj_enhaacplus_dec) {
  109|  12.0k|  WORD ixheaacd_drc_offset = 0, channel_mask = 0;
  110|  12.0k|  WORD flag1 = 0, flag2 = 0;
  111|  12.0k|  WORD ch_idx;
  112|  12.0k|  WORD *ptr_slot_element = p_obj_enhaacplus_dec->aac_config.slot_element;
  113|  12.0k|  WORD *ptr_element_type = p_obj_enhaacplus_dec->aac_config.element_type;
  114|       |
  115|  12.0k|  memset(ptr_slot_element, 0, sizeof(WORD) * MAX_BS_ELEMENT);
  ------------------
  |  |   24|  12.0k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  12.0k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  116|       |
  117|   108k|  for (ch_idx = 0; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|   108k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|   108k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (117:20): [True: 99.1k, False: 9.65k]
  ------------------
  118|  99.1k|    if (ptr_element_type[ch_idx] == 1) {
  ------------------
  |  Branch (118:9): [True: 2.41k, False: 96.6k]
  ------------------
  119|  2.41k|      channel_mask += 0x3;
  120|  2.41k|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  121|  2.41k|      ixheaacd_drc_offset += 2;
  122|  2.41k|      flag1 = ch_idx + 1;
  123|  2.41k|      break;
  124|  2.41k|    }
  125|  99.1k|  }
  126|       |
  127|  54.9k|  for (ch_idx = 0; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  54.9k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  54.9k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (127:20): [True: 50.7k, False: 4.26k]
  ------------------
  128|  50.7k|    if (ptr_element_type[ch_idx] == 0) {
  ------------------
  |  Branch (128:9): [True: 7.80k, False: 42.9k]
  ------------------
  129|  7.80k|      channel_mask += 0x4;
  130|  7.80k|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  131|  7.80k|      ixheaacd_drc_offset += 1;
  132|  7.80k|      flag2 = ch_idx + 1;
  133|  7.80k|      break;
  134|  7.80k|    }
  135|  50.7k|  }
  136|   112k|  for (ch_idx = 0; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|   112k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|   112k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (136:20): [True: 102k, False: 10.0k]
  ------------------
  137|   102k|    if (ptr_element_type[ch_idx] == 3) {
  ------------------
  |  Branch (137:9): [True: 2.06k, False: 100k]
  ------------------
  138|  2.06k|      channel_mask += 0x8;
  139|  2.06k|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  140|  2.06k|      ixheaacd_drc_offset += 1;
  141|  2.06k|      break;
  142|  2.06k|    }
  143|   102k|  }
  144|   129k|  for (ch_idx = flag1; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|   129k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|   129k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (144:24): [True: 117k, False: 12.0k]
  ------------------
  145|   117k|    if (ptr_element_type[ch_idx] == 1) {
  ------------------
  |  Branch (145:9): [True: 57, False: 117k]
  ------------------
  146|     57|      channel_mask += 0x30;
  147|     57|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  148|     57|      ixheaacd_drc_offset += 2;
  149|     57|      flag1 = ch_idx + 1;
  150|     57|      break;
  151|     57|    }
  152|   117k|  }
  153|   120k|  for (ch_idx = flag2; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|   120k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|   120k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (153:24): [True: 108k, False: 11.5k]
  ------------------
  154|   108k|    if (ptr_element_type[ch_idx] == 0) {
  ------------------
  |  Branch (154:9): [True: 514, False: 108k]
  ------------------
  155|    514|      channel_mask += 0x100;
  156|    514|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  157|    514|      ixheaacd_drc_offset += 1;
  158|    514|      break;
  159|    514|    }
  160|   108k|  }
  161|   129k|  for (ch_idx = flag1; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|   129k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|   129k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (161:24): [True: 117k, False: 12.0k]
  ------------------
  162|   117k|    if (ptr_element_type[ch_idx] == 1) {
  ------------------
  |  Branch (162:9): [True: 23, False: 117k]
  ------------------
  163|     23|      {
  164|     23|        channel_mask += (0x40 + 0x80);
  165|     23|        ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  166|     23|        ixheaacd_drc_offset += 2;
  167|     23|        break;
  168|     23|      }
  169|     23|    }
  170|   117k|  }
  171|       |
  172|  12.0k|  return channel_mask;
  173|  12.0k|}
ixheaacd_read_data_stream_element:
  177|  25.1k|                                       ia_drc_dec_struct *drc_handle) {
  178|  25.1k|  ia_bit_buf_struct temp_bs = {0};
  179|  25.1k|  WORD32 count = ixheaacd_read_bits_buf(it_bit_buff, 13);
  180|  25.1k|  WORD32 cnt = (count & 0xff);
  181|  25.1k|  WORD32 start_pos = 0;
  182|       |
  183|  25.1k|  if (cnt == 255) {
  ------------------
  |  Branch (183:7): [True: 342, False: 24.8k]
  ------------------
  184|    342|    cnt += ixheaacd_read_bits_buf(it_bit_buff, 8);
  185|    342|  }
  186|       |
  187|  25.1k|  if ((count & 0x0100) >> 8) {
  ------------------
  |  Branch (187:7): [True: 19.7k, False: 5.43k]
  ------------------
  188|  19.7k|    ixheaacd_byte_align(it_bit_buff, byte_align_bits);
  189|  19.7k|  }
  190|       |
  191|  25.1k|  {
  192|  25.1k|    memcpy(&temp_bs, it_bit_buff, sizeof(ia_bit_buf_struct));
  193|  25.1k|    start_pos = temp_bs.cnt_bits;
  194|       |
  195|  25.1k|    if (ixheaacd_read_bits_buf(&temp_bs, 8) == DVB_ANC_DATA_SYNC_BYTE) {
  ------------------
  |  |   38|  25.1k|#define DVB_ANC_DATA_SYNC_BYTE (0xBC)
  ------------------
  |  Branch (195:9): [True: 171, False: 25.0k]
  ------------------
  196|    171|      int dmx_level_present, compression_present;
  197|    171|      int coarse_gain_present, fine_grain_present;
  198|       |
  199|    171|      ixheaacd_read_bits_buf(&temp_bs, 8);
  200|       |
  201|    171|      ixheaacd_read_bits_buf(&temp_bs, 3);
  202|    171|      dmx_level_present = ixheaacd_read_bits_buf(&temp_bs, 1);
  203|    171|      ixheaacd_read_bits_buf(&temp_bs, 1);
  204|    171|      compression_present = ixheaacd_read_bits_buf(&temp_bs, 1);
  205|    171|      coarse_gain_present = ixheaacd_read_bits_buf(&temp_bs, 1);
  206|    171|      fine_grain_present = ixheaacd_read_bits_buf(&temp_bs, 1);
  207|       |
  208|    171|      if (dmx_level_present) ixheaacd_read_bits_buf(&temp_bs, 8);
  ------------------
  |  Branch (208:11): [True: 110, False: 61]
  ------------------
  209|       |
  210|    171|      if (compression_present) ixheaacd_read_bits_buf(&temp_bs, 16);
  ------------------
  |  Branch (210:11): [True: 115, False: 56]
  ------------------
  211|       |
  212|    171|      if (coarse_gain_present) ixheaacd_read_bits_buf(&temp_bs, 16);
  ------------------
  |  Branch (212:11): [True: 72, False: 99]
  ------------------
  213|       |
  214|    171|      if (fine_grain_present) ixheaacd_read_bits_buf(&temp_bs, 16);
  ------------------
  |  Branch (214:11): [True: 92, False: 79]
  ------------------
  215|       |
  216|    171|      if (!drc_handle->dvb_anc_data_present && temp_bs.cnt_bits >= 0) {
  ------------------
  |  Branch (216:11): [True: 94, False: 77]
  |  Branch (216:48): [True: 94, False: 0]
  ------------------
  217|     94|        drc_handle->dvb_anc_data_pos = start_pos;
  218|     94|        drc_handle->dvb_anc_data_present = 1;
  219|     94|      }
  220|    171|    }
  221|  25.1k|  }
  222|       |
  223|  25.1k|  if (it_bit_buff->cnt_bits < (cnt << 3)) {
  ------------------
  |  Branch (223:7): [True: 256, False: 24.9k]
  ------------------
  224|    256|    longjmp(*(it_bit_buff->xaac_jmp_buf),
  225|    256|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    256|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  226|    256|  }
  227|  24.9k|  it_bit_buff->ptr_read_next += cnt;
  228|  24.9k|  it_bit_buff->cnt_bits -= ((cnt) << 3);
  229|  24.9k|}
ixheaacd_read_fill_element:
  234|  18.4k|    WORD32 *mps_bytes) {
  235|  18.4k|  WORD32 count;
  236|  18.4k|  count = ixheaacd_read_bits_buf(it_bit_buff, 4);
  237|       |
  238|  18.4k|  if ((count - 15) == 0) {
  ------------------
  |  Branch (238:7): [True: 55, False: 18.4k]
  ------------------
  239|     55|    count = ixheaacd_read_bits_buf(it_bit_buff, 8);
  240|     55|    count = (count + 14);
  241|     55|  }
  242|       |
  243|  18.4k|  if (count > 0) {
  ------------------
  |  Branch (243:7): [True: 18.4k, False: 21]
  ------------------
  244|  18.4k|    WORD32 extension_type;
  245|       |
  246|  18.4k|    extension_type = ixheaacd_read_bits_buf(it_bit_buff, 4);
  247|       |
  248|  18.4k|    if (extension_type == EXT_DYNAMIC_RANGE) {
  ------------------
  |  |   23|  18.4k|#define EXT_DYNAMIC_RANGE 11
  ------------------
  |  Branch (248:9): [True: 15, False: 18.4k]
  ------------------
  249|     15|      ptr_drc_dec->drc_element_found = 1;
  250|     15|      count -=
  251|     15|          ixheaacd_dec_drc_read_element(ptr_drc_dec, drc_dummy, it_bit_buff);
  252|     15|    }
  253|  18.4k|    if (EXT_SAC_DATA == extension_type) {
  ------------------
  |  |   25|  18.4k|#define EXT_SAC_DATA 12
  ------------------
  |  Branch (253:9): [True: 17.6k, False: 801]
  ------------------
  254|  17.6k|      WORD32 anc_type, i;
  255|  17.6k|      anc_type = ixheaacd_read_bits_buf(it_bit_buff, 2);
  256|  17.6k|      *mps_header = anc_type;
  257|       |
  258|  17.6k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  259|       |
  260|  17.6k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  261|       |
  262|   176k|      for (i = 0; i < count - 1; i++) {
  ------------------
  |  Branch (262:19): [True: 158k, False: 17.6k]
  ------------------
  263|   158k|        mps_buffer[i] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  264|   158k|      }
  265|       |
  266|  17.6k|      *mps_bytes = count - 1;
  267|  17.6k|    }
  268|    801|    else {
  269|    801|      ixheaacd_read_bits_buf(it_bit_buff, 4);
  270|       |
  271|    801|      if (it_bit_buff->cnt_bits < ((count - 1) << 3)) {
  ------------------
  |  Branch (271:11): [True: 17, False: 784]
  ------------------
  272|     17|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  273|     17|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     17|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  274|     17|      }
  275|    784|      it_bit_buff->ptr_read_next += count - 1;
  276|    784|      it_bit_buff->cnt_bits -= ((count - 1) << 3);
  277|    784|    }
  278|  18.4k|  }
  279|  18.4k|}
ixheaacd_get_element_index_tag:
  288|  86.3k|) {
  289|  86.3k|  WORD element_tag, j;
  290|  86.3k|  ia_aac_dec_state_struct *p_state_enhaacplus_dec =
  291|  86.3k|      p_obj_enhaacplus_dec->p_state_aac;
  292|       |
  293|  86.3k|  ia_bit_buf_struct *it_bit_buff = p_state_enhaacplus_dec->ptr_bit_stream;
  294|  86.3k|  WORD element_idx;
  295|  86.3k|  WORD element_type;
  296|       |
  297|  86.3k|  ia_aac_decoder_struct *aac_dec_handle =
  298|  86.3k|      p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx1];
  299|       |
  300|  86.3k|  *ch_idx = ch_idx1;
  301|       |
  302|  86.3k|  if (p_state_enhaacplus_dec->bs_format != LOAS_BSFORMAT) {
  ------------------
  |  |   29|  86.3k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (302:7): [True: 50.9k, False: 35.3k]
  ------------------
  303|  50.9k|    if (ch_idx1 == 0) {
  ------------------
  |  Branch (303:9): [True: 49.3k, False: 1.66k]
  ------------------
  304|  49.3k|      ixheaacd_byte_align(it_bit_buff, &aac_dec_handle->byte_align_bits);
  305|  49.3k|    }
  306|  50.9k|  }
  307|  86.3k|  {
  308|  86.3k|    if (ch_idx1 == 0) {
  ------------------
  |  Branch (308:9): [True: 64.8k, False: 21.5k]
  ------------------
  309|  64.8k|      aac_dec_handle->byte_align_bits = it_bit_buff->cnt_bits;
  310|  64.8k|    }
  311|  86.3k|  }
  312|       |
  313|  86.3k|  if (it_bit_buff->cnt_bits < 3) {
  ------------------
  |  Branch (313:7): [True: 5, False: 86.3k]
  ------------------
  314|      5|    it_bit_buff->cnt_bits = -1;
  315|      5|    return (WORD16)(
  316|      5|        (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      5|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  317|      5|  }
  318|       |
  319|  86.3k|  element_tag = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 7);
  320|  86.3k|  ixheaacd_read_bidirection(it_bit_buff, -7);
  321|       |
  322|  86.3k|  element_idx = (element_tag & 0xF);
  323|  86.3k|  element_type = (element_tag >> 4) & 0x7;
  324|       |
  325|  86.3k|  p_obj_enhaacplus_dec->aac_config.str_prog_config.alignment_bits =
  326|  86.3k|      it_bit_buff->bit_pos;
  327|       |
  328|   123k|  while (element_type == 4 || element_type == 5 || element_type == 6) {
  ------------------
  |  Branch (328:10): [True: 18.6k, False: 104k]
  |  Branch (328:31): [True: 271, False: 104k]
  |  Branch (328:52): [True: 18.4k, False: 85.7k]
  ------------------
  329|  37.0k|    WORD type = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 3);
  330|       |
  331|  37.0k|    if (it_bit_buff->cnt_bits < 3) {
  ------------------
  |  Branch (331:9): [True: 0, False: 37.0k]
  ------------------
  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|  37.0k|    if (type == 4) {
  ------------------
  |  Branch (337:9): [True: 18.2k, False: 18.7k]
  ------------------
  338|  18.2k|      ixheaacd_read_data_stream_element(
  339|  18.2k|          it_bit_buff, &aac_dec_handle->byte_align_bits, pstr_drc_dec);
  340|  18.2k|    }
  341|  37.0k|    if (type == 5) {
  ------------------
  |  Branch (341:9): [True: 271, False: 36.7k]
  ------------------
  342|    271|      WORD32 error_code = 0;
  343|    271|      error_code = ixheaacd_decode_pce(
  344|    271|          it_bit_buff, &p_obj_enhaacplus_dec->aac_config.ui_pce_found_in_hdr,
  345|    271|          &p_obj_enhaacplus_dec->aac_config.str_prog_config);
  346|    271|      if (error_code != 0) {
  ------------------
  |  Branch (346:11): [True: 174, False: 97]
  ------------------
  347|    174|        if (error_code < 0) return error_code;
  ------------------
  |  Branch (347:13): [True: 25, False: 149]
  ------------------
  348|    149|        return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |  102|    149|#define IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
  ------------------
  349|    174|      }
  350|    271|    }
  351|  36.8k|    if (type == 6) {
  ------------------
  |  Branch (351:9): [True: 18.4k, False: 18.3k]
  ------------------
  352|  18.4k|      ixheaacd_read_fill_element(it_bit_buff, drc_dummy, pstr_drc_dec,
  353|  18.4k|                                 mps_buffer, mps_header, mps_bytes);
  354|  18.4k|    }
  355|       |
  356|  36.8k|    if (it_bit_buff->cnt_bits < 7) {
  ------------------
  |  Branch (356:9): [True: 11, False: 36.8k]
  ------------------
  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|  36.8k|    element_tag = (WORD)ixheaacd_aac_showbits_7(it_bit_buff);
  363|  36.8k|    element_idx = (element_tag & 0xF);
  364|  36.8k|    element_type = (element_tag >> 4) & 0x7;
  365|  36.8k|  }
  366|       |
  367|  86.1k|  if (total_elements == 2 && total_channels == 2 &&
  ------------------
  |  Branch (367:7): [True: 22.0k, False: 64.0k]
  |  Branch (367:30): [True: 21.7k, False: 301]
  ------------------
  368|  21.7k|      p_state_enhaacplus_dec->p_config->ui_pce_found_in_hdr == 2 &&
  ------------------
  |  Branch (368:7): [True: 668, False: 21.1k]
  ------------------
  369|    668|      ch_idx1 == 0) {
  ------------------
  |  Branch (369:7): [True: 357, False: 311]
  ------------------
  370|    357|    ixheaacd_fill_prog_config_slots(p_state_enhaacplus_dec);
  371|    357|  }
  372|       |
  373|  86.1k|  *channel = 1;
  374|  86.1k|  if (element_type == 1) {
  ------------------
  |  Branch (374:7): [True: 1.80k, False: 84.3k]
  ------------------
  375|  1.80k|    *channel = 2;
  376|  1.80k|  }
  377|       |
  378|   130k|  for (j = 0; j < total_elements; j++) {
  ------------------
  |  Branch (378:15): [True: 126k, False: 3.66k]
  ------------------
  379|   126k|    if (p_obj_enhaacplus_dec->aac_config.element_type[j] == element_type &&
  ------------------
  |  Branch (379:9): [True: 112k, False: 14.1k]
  ------------------
  380|   112k|        (element_idx == ele_idx_order[j]) && (element_used[j] == 0)) {
  ------------------
  |  Branch (380:9): [True: 101k, False: 11.2k]
  |  Branch (380:46): [True: 82.4k, False: 18.7k]
  ------------------
  381|  82.4k|      *ch_idx = j;
  382|  82.4k|      element_used[j] = 1;
  383|  82.4k|      break;
  384|  82.4k|    }
  385|   126k|  }
  386|       |
  387|  86.1k|  if (j == total_elements) {
  ------------------
  |  Branch (387:7): [True: 3.29k, False: 82.8k]
  ------------------
  388|  3.29k|    if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (388:9): [True: 0, False: 3.29k]
  ------------------
  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|  3.29k|    ixheaacd_read_bidirection(
  394|  3.29k|        it_bit_buff, (WORD16)(it_bit_buff->cnt_bits - it_bit_buff->size));
  395|  3.29k|    return IA_XHEAAC_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND;
  ------------------
  |  |  100|  3.29k|#define IA_XHEAAC_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND 0x00001805
  ------------------
  396|  3.29k|  } else
  397|  82.8k|    return 0;
  398|  86.1k|}
ixheaacd_common_lpfuncs.c:ixheaacd_aac_showbits_7:
   93|  36.5k|ixheaacd_aac_showbits_7(ia_bit_buf_struct *it_bit_buff) {
   94|  36.5k|  UWORD8 *v = it_bit_buff->ptr_read_next;
   95|  36.5k|  UWORD32 b = 0;
   96|  36.5k|  UWORD32 x;
   97|  36.5k|  b = ((WORD32)v[0] << 8);
   98|  36.5k|  if (it_bit_buff->bit_pos < 6) {
  ------------------
  |  Branch (98:7): [True: 18.0k, False: 18.4k]
  ------------------
   99|  18.0k|    b |= (WORD32)(v[1]);
  100|  18.0k|  }
  101|  36.5k|  x = (UWORD32)b << (15 + 8 - it_bit_buff->bit_pos);
  102|  36.5k|  x = (UWORD32)x >> (25);
  103|       |
  104|  36.5k|  return x;
  105|  36.5k|}

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

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

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

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

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

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

ixheaacd_shellsort:
   48|  1.65M|VOID ixheaacd_shellsort(WORD32 *in, WORD32 n) {
   49|  1.65M|  WORD32 i, j, v;
   50|  1.65M|  WORD32 inc = 1;
   51|       |
   52|  1.65M|  do
   53|  3.57M|    inc = 3 * inc + 1;
   54|  3.57M|  while (inc <= n);
  ------------------
  |  Branch (54:10): [True: 1.91M, False: 1.65M]
  ------------------
   55|       |
   56|  3.57M|  do {
   57|  3.57M|    inc = inc / 3;
   58|  28.1M|    for (i = inc + 1; i <= n; i++) {
  ------------------
  |  Branch (58:23): [True: 24.6M, False: 3.57M]
  ------------------
   59|  24.6M|      v = in[i - 1];
   60|  24.6M|      j = i;
   61|  32.8M|      while (in[j - inc - 1] > v) {
  ------------------
  |  Branch (61:14): [True: 9.04M, False: 23.7M]
  ------------------
   62|  9.04M|        in[j - 1] = in[j - inc - 1];
   63|  9.04M|        j -= inc;
   64|  9.04M|        if (j <= inc) break;
  ------------------
  |  Branch (64:13): [True: 828k, False: 8.21M]
  ------------------
   65|  9.04M|      }
   66|  24.6M|      in[j - 1] = v;
   67|  24.6M|    }
   68|  3.57M|  } while (inc > 1);
  ------------------
  |  Branch (68:12): [True: 1.91M, False: 1.65M]
  ------------------
   69|  1.65M|}
ixheaacd_sbr_env_calc:
   75|   308k|                             WORD32 ec_flag) {
   76|   308k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|   308k|#define IA_NO_ERROR 0x00000000
  ------------------
   77|   308k|  WORD8 harmonics[64];
   78|   308k|  FLOAT32(*env_tmp)[48];
   79|   308k|  FLOAT32(*noise_level_pvc)[48];
   80|   308k|  FLOAT32(*nrg_est_pvc)[48];
   81|   308k|  FLOAT32(*nrg_ref_pvc)[48];
   82|   308k|  FLOAT32(*nrg_gain_pvc)[48];
   83|   308k|  FLOAT32(*nrg_tone_pvc)[48];
   84|       |
   85|   308k|  WORD32 n, c, li, ui, i, j, k = 0, l, m = 0, kk = 0, o, next = -1, ui2, flag,
   86|   308k|                             tmp, noise_absc_flag, smooth_length;
   87|   308k|  WORD32 upsamp_4_flag = frame_data->pstr_sbr_header->is_usf_4;
   88|       |
   89|   308k|  FLOAT32 *ptr_real_buf, *ptr_imag_buf, nrg = 0, p_ref, p_est, avg_gain, g_max,
   90|   308k|                                        p_adj, boost_gain, sb_gain, sb_noise,
   91|   308k|                                        temp[64];
   92|       |
   93|   308k|  WORD32 t;
   94|   308k|  WORD32 start_pos = 0;
   95|   308k|  WORD32 end_pos = 0;
   96|       |
   97|   308k|  WORD32 slot_idx;
   98|       |
   99|   308k|  FLOAT32 *prev_env_noise_level = frame_data->prev_noise_level;
  100|   308k|  FLOAT32 *nrg_tone = scratch_buff;
  101|   308k|  FLOAT32 *noise_level = scratch_buff + 64;
  102|   308k|  FLOAT32 *nrg_est = scratch_buff + 128;
  103|   308k|  FLOAT32 *nrg_ref = scratch_buff + 192;
  104|   308k|  FLOAT32 *nrg_gain = scratch_buff + 256;
  105|       |
  106|   308k|  const FLOAT32 *smooth_filt;
  107|       |
  108|   308k|  FLOAT32 *sfb_nrg = frame_data->flt_env_sf_arr;
  109|   308k|  FLOAT32 *noise_floor = frame_data->flt_noise_floor;
  110|   308k|  ia_frame_info_struct *p_frame_info = &frame_data->str_frame_info_details;
  111|       |
  112|   308k|  ia_frame_info_struct *pvc_frame_info = &frame_data->str_pvc_frame_info;
  113|   308k|  WORD32 smoothing_length = frame_data->pstr_sbr_header->smoothing_mode ? 0 : 4;
  ------------------
  |  Branch (113:29): [True: 276k, False: 32.4k]
  ------------------
  114|   308k|  WORD32 int_mode = frame_data->pstr_sbr_header->interpol_freq;
  115|   308k|  WORD32 limiter_band = frame_data->pstr_sbr_header->limiter_bands;
  116|   308k|  WORD32 limiter_gains = frame_data->pstr_sbr_header->limiter_gains;
  117|   308k|  WORD32 *add_harmonics = frame_data->add_harmonics;
  118|   308k|  WORD32 sub_band_start =
  119|   308k|      frame_data->pstr_sbr_header->pstr_freq_band_data->sub_band_start;
  120|   308k|  WORD32 sub_band_end =
  121|   308k|      frame_data->pstr_sbr_header->pstr_freq_band_data->sub_band_end;
  122|   308k|  WORD32 reset = frame_data->reset_flag;
  123|   308k|  WORD32 num_subbands = sub_band_end - sub_band_start;
  124|   308k|  WORD32 bs_num_env = p_frame_info->num_env;
  125|   308k|  WORD32 trans_env = p_frame_info->transient_env;
  126|   308k|  WORD32 sbr_mode = frame_data->sbr_mode;
  127|   308k|  WORD32 prev_sbr_mode = frame_data->prev_sbr_mode;
  128|       |
  129|   308k|  WORD16 *freq_band_table[2];
  130|   308k|  const WORD16 *num_sf_bands =
  131|   308k|      frame_data->pstr_sbr_header->pstr_freq_band_data->num_sf_bands;
  132|   308k|  WORD16 *freq_band_table_noise =
  133|   308k|      frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_noise;
  134|   308k|  WORD32 num_nf_bands =
  135|   308k|      frame_data->pstr_sbr_header->pstr_freq_band_data->num_nf_bands;
  136|       |
  137|   308k|  WORD32 harm_index = frame_data->harm_index;
  138|   308k|  WORD32 phase_index = frame_data->phase_index;
  139|   308k|  WORD32 esbr_start_up = frame_data->pstr_sbr_header->esbr_start_up;
  140|   308k|  WORD32 esbr_start_up_pvc = frame_data->pstr_sbr_header->esbr_start_up_pvc;
  141|   308k|  WORD8(*harm_flag_prev)[64] = &frame_data->harm_flag_prev;
  142|   308k|  FLOAT32(*e_gain)[5][64] = &frame_data->e_gain;
  143|   308k|  FLOAT32(*noise_buf)[5][64] = &frame_data->noise_buf;
  144|   308k|  WORD32(*lim_table)[4][12 + 1] = &frame_data->lim_table;
  145|   308k|  WORD32(*gate_mode)[4] = &frame_data->gate_mode;
  146|   308k|  WORD32 freq_inv = 1;
  147|       |
  148|   308k|  WORD8(*harm_flag_varlen_prev)[64] = &frame_data->harm_flag_varlen_prev;
  149|   308k|  WORD8(*harm_flag_varlen)[64] = &frame_data->harm_flag_varlen;
  150|   308k|  WORD32 band_loop_end;
  151|       |
  152|   308k|  WORD32 rate = upsamp_4_flag ? 4 : 2;
  ------------------
  |  Branch (152:17): [True: 35.6k, False: 273k]
  ------------------
  153|   308k|  FLOAT64 guard = 1e-17;
  154|       |
  155|   308k|  if (ldmps_present == 1) rate = 1;
  ------------------
  |  Branch (155:7): [True: 8.29k, False: 300k]
  ------------------
  156|       |
  157|   308k|  env_tmp = frame_data->env_tmp;
  158|   308k|  noise_level_pvc = frame_data->noise_level_pvc;
  159|   308k|  nrg_est_pvc = frame_data->nrg_est_pvc;
  160|   308k|  nrg_ref_pvc = frame_data->nrg_ref_pvc;
  161|   308k|  nrg_gain_pvc = frame_data->nrg_gain_pvc;
  162|   308k|  nrg_tone_pvc = frame_data->nrg_tone_pvc;
  163|       |
  164|   308k|  freq_band_table[0] =
  165|   308k|      frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_table[0];
  166|   308k|  freq_band_table[1] =
  167|   308k|      frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_table[1];
  168|       |
  169|   308k|  if (reset || (ldmps_present == 1)) {
  ------------------
  |  Branch (169:7): [True: 44.1k, False: 264k]
  |  Branch (169:16): [True: 7.35k, False: 257k]
  ------------------
  170|  51.4k|    esbr_start_up = 1;
  171|  51.4k|    esbr_start_up_pvc = 1;
  172|  51.4k|    if (reset) phase_index = 0;
  ------------------
  |  Branch (172:9): [True: 44.1k, False: 7.35k]
  ------------------
  173|  51.4k|    if (ixheaacd_createlimiterbands(
  ------------------
  |  Branch (173:9): [True: 1, False: 51.4k]
  ------------------
  174|  51.4k|            (*lim_table), (*gate_mode),
  175|  51.4k|            frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_lo, num_sf_bands[LOW],
  ------------------
  |  |   27|  51.4k|#define LOW 0
  ------------------
  176|  51.4k|            x_over_qmf, frame_data->sbr_patching_mode, upsamp_4_flag, &frame_data->patch_param,
  177|  51.4k|            ec_flag))
  178|      1|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  179|  51.4k|  }
  180|       |
  181|   308k|  if (frame_data->sbr_patching_mode != frame_data->prev_sbr_patching_mode) {
  ------------------
  |  Branch (181:7): [True: 43.9k, False: 264k]
  ------------------
  182|  43.9k|    if (ixheaacd_createlimiterbands(
  ------------------
  |  Branch (182:9): [True: 0, False: 43.9k]
  ------------------
  183|  43.9k|            (*lim_table), (*gate_mode),
  184|  43.9k|            frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_lo, num_sf_bands[LOW],
  ------------------
  |  |   27|  43.9k|#define LOW 0
  ------------------
  185|  43.9k|            x_over_qmf, frame_data->sbr_patching_mode, upsamp_4_flag, &frame_data->patch_param,
  186|  43.9k|            ec_flag))
  187|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  188|       |
  189|  43.9k|    frame_data->prev_sbr_patching_mode = frame_data->sbr_patching_mode;
  190|  43.9k|  }
  191|       |
  192|   308k|  memset(harmonics, 0, 64 * sizeof(WORD8));
  193|       |
  194|   308k|  if (sbr_mode == PVC_SBR) {
  ------------------
  |  Branch (194:7): [True: 87.3k, False: 221k]
  ------------------
  195|  1.35M|    for (i = 0; i < num_sf_bands[HIGH]; i++) {
  ------------------
  |  |   28|  1.35M|#define HIGH 1
  ------------------
  |  Branch (195:17): [True: 1.27M, False: 87.3k]
  ------------------
  196|  1.27M|      li =
  197|  1.27M|          frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_hi[i];
  198|  1.27M|      ui = frame_data->pstr_sbr_header->pstr_freq_band_data
  199|  1.27M|               ->freq_band_tbl_hi[i + 1];
  200|  1.27M|      tmp = ((ui + li) - (sub_band_start << 1)) >> 1;
  201|       |
  202|  1.27M|      if ((tmp >= 64) || (tmp < 0)) {
  ------------------
  |  Branch (202:11): [True: 0, False: 1.27M]
  |  Branch (202:26): [True: 0, False: 1.27M]
  ------------------
  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|  1.27M|      harmonics[tmp] = add_harmonics[i];
  210|  1.27M|    }
  211|       |
  212|   105k|    for (t = 0; t < p_frame_info->border_vec[0]; t++) {
  ------------------
  |  Branch (212:17): [True: 18.5k, False: 87.3k]
  ------------------
  213|  1.20M|      for (c = 0; c < 64; c++) {
  ------------------
  |  Branch (213:19): [True: 1.18M, False: 18.5k]
  ------------------
  214|  1.18M|        frame_data->qmapped_pvc[c][t] = frame_data->qmapped_pvc[c][t + 16];
  215|  1.18M|      }
  216|  18.5k|    }
  217|       |
  218|   227k|    for (i = 0; i < bs_num_env; i++) {
  ------------------
  |  Branch (218:17): [True: 139k, False: 87.3k]
  ------------------
  219|   139k|      if (kk > MAX_NOISE_ENVELOPES) {
  ------------------
  |  |   44|   139k|#define MAX_NOISE_ENVELOPES 2
  ------------------
  |  Branch (219:11): [True: 0, False: 139k]
  ------------------
  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|   139k|      if (p_frame_info->border_vec[i] == p_frame_info->noise_border_vec[kk]) kk++, next++;
  ------------------
  |  Branch (225:11): [True: 139k, False: 0]
  ------------------
  226|       |
  227|   139k|      start_pos = p_frame_info->border_vec[i];
  228|   139k|      end_pos = p_frame_info->border_vec[i + 1];
  229|   139k|      if ((start_pos < 0) || (end_pos > MAX_FREQ_COEFFS_SBR)) {
  ------------------
  |  |   55|   139k|#define MAX_FREQ_COEFFS_SBR 48
  ------------------
  |  Branch (229:11): [True: 0, False: 139k]
  |  Branch (229:30): [True: 0, False: 139k]
  ------------------
  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.54M|      for (t = start_pos; t < end_pos; t++) {
  ------------------
  |  Branch (237:27): [True: 1.40M, False: 139k]
  ------------------
  238|  1.40M|        band_loop_end = num_sf_bands[p_frame_info->freq_res[i]];
  239|       |
  240|  11.6M|        for (c = 0, o = 0, j = 0; j < band_loop_end; j++) {
  ------------------
  |  Branch (240:35): [True: 10.2M, False: 1.40M]
  ------------------
  241|  10.2M|          li = freq_band_table[p_frame_info->freq_res[i]][j];
  242|  10.2M|          ui = freq_band_table[p_frame_info->freq_res[i]][j + 1];
  243|  10.2M|          ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  244|  10.2M|                    ->freq_band_tbl_noise[o + 1];
  245|       |
  246|  56.5M|          for (k = 0; k < ui - li; k++) {
  ------------------
  |  Branch (246:23): [True: 46.2M, False: 10.2M]
  ------------------
  247|  46.2M|            o = (k + li >= ui2) ? o + 1 : o;
  ------------------
  |  Branch (247:17): [True: 3.28M, False: 42.9M]
  ------------------
  248|  46.2M|            if (o >= MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|  46.2M|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (248:17): [True: 0, False: 46.2M]
  ------------------
  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|  46.2M|            ui2 = freq_band_table_noise[o + 1];
  255|       |
  256|  46.2M|            frame_data->qmapped_pvc[c][t] =
  257|  46.2M|                noise_floor[next * num_nf_bands + o];
  258|  46.2M|            c++;
  259|  46.2M|          }
  260|  10.2M|        }
  261|  1.40M|      }
  262|   139k|    }
  263|       |
  264|  87.3k|    kk = 0;
  265|  87.3k|    next = -1;
  266|       |
  267|   227k|    for (i = 0; i < bs_num_env; i++) {
  ------------------
  |  Branch (267:17): [True: 139k, False: 87.3k]
  ------------------
  268|   139k|      if (kk > MAX_NOISE_ENVELOPES) {
  ------------------
  |  |   44|   139k|#define MAX_NOISE_ENVELOPES 2
  ------------------
  |  Branch (268:11): [True: 0, False: 139k]
  ------------------
  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|   139k|      if (p_frame_info->border_vec[i] == p_frame_info->noise_border_vec[kk]) kk++, next++;
  ------------------
  |  Branch (274:11): [True: 139k, False: 0]
  ------------------
  275|       |
  276|   139k|      start_pos = pvc_frame_info->border_vec[i];
  277|   139k|      end_pos = pvc_frame_info->border_vec[i + 1];
  278|   139k|      if ((start_pos < 0) || (end_pos > MAX_FREQ_COEFFS_SBR)) {
  ------------------
  |  |   55|   139k|#define MAX_FREQ_COEFFS_SBR 48
  ------------------
  |  Branch (278:11): [True: 0, False: 139k]
  |  Branch (278:30): [True: 0, False: 139k]
  ------------------
  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.53M|      for (t = start_pos; t < end_pos; t++) {
  ------------------
  |  Branch (285:27): [True: 1.39M, False: 139k]
  ------------------
  286|  90.8M|        for (c = 0; c < 64; c++) {
  ------------------
  |  Branch (286:21): [True: 89.4M, False: 1.39M]
  ------------------
  287|  89.4M|          env_tmp[c][t] = env_out[64 * t + c];
  288|  89.4M|        }
  289|  1.39M|      }
  290|       |
  291|   139k|      noise_absc_flag =
  292|   139k|          (i == trans_env || i == frame_data->env_short_flag_prev) ? 1 : 0;
  ------------------
  |  Branch (292:12): [True: 0, False: 139k]
  |  Branch (292:30): [True: 568, False: 139k]
  ------------------
  293|       |
  294|   139k|      if (prev_sbr_mode == ORIG_SBR) noise_absc_flag = 0;
  ------------------
  |  Branch (294:11): [True: 2.76k, False: 137k]
  ------------------
  295|       |
  296|   139k|      smooth_length = (noise_absc_flag ? 0 : smoothing_length);
  ------------------
  |  Branch (296:24): [True: 483, False: 139k]
  ------------------
  297|   139k|      smooth_filt = *ixheaac_fir_table[smooth_length];
  298|       |
  299|   150k|      for (t = start_pos; t < frame_data->sin_len_for_cur_top; t++) {
  ------------------
  |  Branch (299:27): [True: 11.1k, False: 139k]
  ------------------
  300|  11.1k|        band_loop_end =
  301|  11.1k|            num_sf_bands[frame_data->str_frame_info_prev
  302|  11.1k|                             .freq_res[frame_data->var_len_id_prev]];
  303|       |
  304|  98.0k|        for (c = 0, o = 0, j = 0; j < band_loop_end; j++) {
  ------------------
  |  Branch (304:35): [True: 86.9k, False: 11.1k]
  ------------------
  305|  86.9k|          double tmp;
  306|       |
  307|  86.9k|          li = freq_band_table[frame_data->str_frame_info_prev
  308|  86.9k|                                   .freq_res[frame_data->var_len_id_prev]][j];
  309|  86.9k|          ui = freq_band_table[frame_data->str_frame_info_prev
  310|  86.9k|                                   .freq_res[frame_data->var_len_id_prev]]
  311|  86.9k|                              [j + 1];
  312|  86.9k|          ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  313|  86.9k|                    ->freq_band_tbl_noise[o + 1];
  314|       |
  315|   428k|          for (flag = 0, k = li; k < ui; k++) {
  ------------------
  |  Branch (315:34): [True: 341k, False: 86.9k]
  ------------------
  316|   341k|            flag = ((*harm_flag_varlen)[c] &&
  ------------------
  |  Branch (316:21): [True: 57.2k, False: 283k]
  ------------------
  317|  57.2k|                    (t >= frame_data->sin_start_for_cur_top ||
  ------------------
  |  Branch (317:22): [True: 54.8k, False: 2.40k]
  ------------------
  318|  2.40k|                     (*harm_flag_varlen_prev)[c + sub_band_start]))
  ------------------
  |  Branch (318:22): [True: 1.04k, False: 1.36k]
  ------------------
  319|   341k|                       ? 1
  320|   341k|                       : flag;
  321|       |
  322|   341k|            nrg_ref_pvc[c][t] = env_tmp[k][t];
  323|  1.03M|            for (nrg = 0, l = 0; l < rate; l++) {
  ------------------
  |  Branch (323:34): [True: 693k, False: 341k]
  ------------------
  324|   693k|              nrg +=
  325|   693k|                  (input_real[rate * t + l][k] * input_real[rate * t + l][k]) +
  326|   693k|                  (input_imag[rate * t + l][k] * input_imag[rate * t + l][k]);
  327|   693k|            }
  328|   341k|            nrg_est_pvc[c][t] = nrg / rate;
  329|   341k|            c++;
  330|   341k|          }
  331|       |
  332|  86.9k|          if (!int_mode && ui != li) {
  ------------------
  |  Branch (332:15): [True: 29.5k, False: 57.3k]
  |  Branch (332:28): [True: 27.6k, False: 1.92k]
  ------------------
  333|   101k|            for (nrg = 0, k = c - (ui - li); k < c; k++) {
  ------------------
  |  Branch (333:46): [True: 73.5k, False: 27.6k]
  ------------------
  334|  73.5k|              nrg += nrg_est_pvc[k][t];
  335|  73.5k|            }
  336|  27.6k|            nrg /= (ui - li);
  337|  59.3k|          } else {
  338|  59.3k|            nrg = 0;
  339|  59.3k|          }
  340|  86.9k|          c -= (ui - li);
  341|       |
  342|   428k|          for (k = 0; k < ui - li; k++) {
  ------------------
  |  Branch (342:23): [True: 341k, False: 86.9k]
  ------------------
  343|   341k|            o = (k + li >= ui2) ? o + 1 : o;
  ------------------
  |  Branch (343:17): [True: 17.1k, False: 324k]
  ------------------
  344|   341k|            if (o >= MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|   341k|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (344:17): [True: 0, False: 341k]
  ------------------
  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|   341k|            ui2 = freq_band_table_noise[o + 1];
  351|   341k|            nrg_est_pvc[c][t] = (!int_mode) ? nrg : nrg_est_pvc[c][t];
  ------------------
  |  Branch (351:33): [True: 73.5k, False: 267k]
  ------------------
  352|   341k|            nrg_tone_pvc[c][t] = 0.0f;
  353|       |
  354|   341k|            tmp = frame_data->qmapped_pvc[c][t] /
  355|   341k|                  (1 + frame_data->qmapped_pvc[c][t] + guard);
  356|       |
  357|   341k|            if (flag) {
  ------------------
  |  Branch (357:17): [True: 205k, False: 135k]
  ------------------
  358|   205k|              nrg_gain_pvc[c][t] = (FLOAT32)sqrt(nrg_ref_pvc[c][t] * tmp /
  359|   205k|                                                 (nrg_est_pvc[c][t] + 1));
  360|       |
  361|   205k|              nrg_tone_pvc[c][t] = (FLOAT32)(
  362|   205k|                  (harmonics[c] && (t >= frame_data->sine_position ||
  ------------------
  |  Branch (362:20): [True: 24.0k, False: 181k]
  |  Branch (362:37): [True: 300, False: 23.7k]
  ------------------
  363|  23.7k|                                    (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (363:37): [True: 22.1k, False: 1.60k]
  ------------------
  364|   205k|                      ? sqrt(nrg_ref_pvc[c][t] * tmp /
  365|  22.4k|                             (frame_data->qmapped_pvc[c][t] + guard))
  366|   205k|                      : nrg_tone_pvc[c][t]);
  367|       |
  368|   205k|              nrg_tone_pvc[c][t] =
  369|   205k|                  (FLOAT32)(((*harm_flag_varlen)[c] &&
  ------------------
  |  Branch (369:30): [True: 56.0k, False: 149k]
  ------------------
  370|  56.0k|                             (t >= frame_data->sin_start_for_cur_top ||
  ------------------
  |  Branch (370:31): [True: 54.8k, False: 1.18k]
  ------------------
  371|  1.18k|                              (*harm_flag_varlen_prev)[c + sub_band_start]))
  ------------------
  |  Branch (371:31): [True: 1.04k, False: 142]
  ------------------
  372|   205k|                                ? sqrt(nrg_ref_pvc[c][t] * tmp /
  373|  55.9k|                                       (prev_env_noise_level[o] + guard))
  374|   205k|                                : nrg_tone_pvc[c][t]);
  375|       |
  376|   205k|            } else {
  377|   135k|              if (noise_absc_flag) {
  ------------------
  |  Branch (377:19): [True: 0, False: 135k]
  ------------------
  378|      0|                nrg_gain_pvc[c][t] =
  379|      0|                    (FLOAT32)sqrt(nrg_ref_pvc[c][t] / (nrg_est_pvc[c][t] + 1));
  380|   135k|              } else {
  381|   135k|                nrg_gain_pvc[c][t] = (FLOAT32)sqrt(
  382|   135k|                    nrg_ref_pvc[c][t] * tmp /
  383|   135k|                    ((nrg_est_pvc[c][t] + 1) * (frame_data->qmapped_pvc[c][t] + guard)));
  384|   135k|              }
  385|   135k|            }
  386|       |
  387|   341k|            noise_level_pvc[c][t] = (FLOAT32)sqrt(nrg_ref_pvc[c][t] * tmp);
  388|   341k|            c++;
  389|   341k|          }
  390|  86.9k|        }
  391|       |
  392|  53.2k|        for (c = 0; c < (*gate_mode)[limiter_band]; c++) {
  ------------------
  |  Branch (392:21): [True: 42.1k, False: 11.1k]
  ------------------
  393|  42.1k|          p_ref = p_est = 0.0f;
  394|  42.1k|          p_adj = 0;
  395|  42.1k|          for (k = (*lim_table)[limiter_band][c];
  396|   381k|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (396:16): [True: 339k, False: 42.1k]
  ------------------
  397|   339k|            p_ref += nrg_ref_pvc[k][t];
  398|   339k|            p_est += nrg_est_pvc[k][t];
  399|   339k|          }
  400|  42.1k|          avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|  42.1k|#define EPS 1e-12f
  ------------------
                        avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|  42.1k|#define EPS 1e-12f
  ------------------
  401|  42.1k|          g_max = avg_gain * ixheaac_g_lim_gains[limiter_gains];
  402|  42.1k|          g_max > 1.0e5f ? g_max = 1.0e5f : 0;
  ------------------
  |  Branch (402:11): [True: 3.54k, False: 38.5k]
  ------------------
  403|  42.1k|          for (k = (*lim_table)[limiter_band][c];
  404|   381k|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (404:16): [True: 339k, False: 42.1k]
  ------------------
  405|   339k|            if (g_max <= nrg_gain_pvc[k][t]) {
  ------------------
  |  Branch (405:17): [True: 68.3k, False: 271k]
  ------------------
  406|  68.3k|              noise_level_pvc[k][t] =
  407|  68.3k|                  (FLOAT32)(noise_level_pvc[k][t] * (g_max / (nrg_gain_pvc[k][t] + guard)));
  408|  68.3k|              nrg_gain_pvc[k][t] = g_max;
  409|  68.3k|            }
  410|       |
  411|   339k|            p_adj +=
  412|   339k|                nrg_gain_pvc[k][t] * nrg_gain_pvc[k][t] * nrg_est_pvc[k][t];
  413|       |
  414|   339k|            if (nrg_tone_pvc[k][t]) {
  ------------------
  |  Branch (414:17): [True: 55.6k, False: 283k]
  ------------------
  415|  55.6k|              p_adj += nrg_tone_pvc[k][t] * nrg_tone_pvc[k][t];
  416|   283k|            } else if (!noise_absc_flag) {
  ------------------
  |  Branch (416:24): [True: 283k, False: 0]
  ------------------
  417|   283k|              p_adj += noise_level_pvc[k][t] * noise_level_pvc[k][t];
  418|   283k|            }
  419|   339k|          }
  420|  42.1k|          boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|  42.1k|#define EPS 1e-12f
  ------------------
                        boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|  42.1k|#define EPS 1e-12f
  ------------------
  421|  42.1k|          boost_gain = boost_gain > 1.584893192f ? 1.584893192f : boost_gain;
  ------------------
  |  Branch (421:24): [True: 12.5k, False: 29.5k]
  ------------------
  422|       |
  423|  42.1k|          for (k = (*lim_table)[limiter_band][c];
  424|   381k|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (424:16): [True: 339k, False: 42.1k]
  ------------------
  425|   339k|            nrg_gain_pvc[k][t] *= boost_gain;
  426|   339k|            noise_level_pvc[k][t] *= boost_gain;
  427|   339k|            nrg_tone_pvc[k][t] *= boost_gain;
  428|   339k|          }
  429|  42.1k|        }
  430|  11.1k|      }
  431|       |
  432|  1.52M|      for (; t < end_pos; t++) {
  ------------------
  |  Branch (432:14): [True: 1.38M, False: 139k]
  ------------------
  433|  1.38M|        band_loop_end = num_sf_bands[pvc_frame_info->freq_res[i]];
  434|       |
  435|  11.5M|        for (c = 0, o = 0, j = 0; j < band_loop_end; j++) {
  ------------------
  |  Branch (435:35): [True: 10.1M, False: 1.38M]
  ------------------
  436|  10.1M|          double tmp;
  437|       |
  438|  10.1M|          li = freq_band_table[pvc_frame_info->freq_res[i]][j];
  439|  10.1M|          ui = freq_band_table[pvc_frame_info->freq_res[i]][j + 1];
  440|  10.1M|          ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  441|  10.1M|                    ->freq_band_tbl_noise[o + 1];
  442|       |
  443|  56.0M|          for (flag = 0, k = li; k < ui; k++) {
  ------------------
  |  Branch (443:34): [True: 45.8M, False: 10.1M]
  ------------------
  444|  45.8M|            flag = (harmonics[c] && (t >= frame_data->sine_position ||
  ------------------
  |  Branch (444:21): [True: 1.04M, False: 44.8M]
  |  Branch (444:38): [True: 188k, False: 860k]
  ------------------
  445|   860k|                                     (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (445:38): [True: 334k, False: 526k]
  ------------------
  446|  45.8M|                       ? 1
  447|  45.8M|                       : flag;
  448|       |
  449|  45.8M|            nrg_ref_pvc[c][t] = env_tmp[k][t];
  450|   148M|            for (nrg = 0, l = 0; l < rate; l++) {
  ------------------
  |  Branch (450:34): [True: 102M, False: 45.8M]
  ------------------
  451|   102M|              nrg +=
  452|   102M|                  (input_real[rate * t + l][k] * input_real[rate * t + l][k]) +
  453|   102M|                  (input_imag[rate * t + l][k] * input_imag[rate * t + l][k]);
  454|   102M|            }
  455|  45.8M|            nrg_est_pvc[c][t] = nrg / rate;
  456|  45.8M|            c++;
  457|  45.8M|          }
  458|       |
  459|  10.1M|          if (!int_mode && ui != li) {
  ------------------
  |  Branch (459:15): [True: 989k, False: 9.19M]
  |  Branch (459:28): [True: 977k, False: 12.1k]
  ------------------
  460|  5.38M|            for (nrg = 0, k = c - (ui - li); k < c; k++) {
  ------------------
  |  Branch (460:46): [True: 4.40M, False: 977k]
  ------------------
  461|  4.40M|              nrg += nrg_est_pvc[k][t];
  462|  4.40M|            }
  463|   977k|            nrg /= (ui - li);
  464|  9.20M|          } else {
  465|  9.20M|            nrg = 0;
  466|  9.20M|          }
  467|  10.1M|          c -= (ui - li);
  468|       |
  469|  56.0M|          for (k = 0; k < ui - li; k++) {
  ------------------
  |  Branch (469:23): [True: 45.8M, False: 10.1M]
  ------------------
  470|  45.8M|            o = (k + li >= ui2) ? o + 1 : o;
  ------------------
  |  Branch (470:17): [True: 3.26M, False: 42.6M]
  ------------------
  471|  45.8M|            if (o >= MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|  45.8M|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (471:17): [True: 0, False: 45.8M]
  ------------------
  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|  45.8M|            ui2 = freq_band_table_noise[o + 1];
  478|  45.8M|            nrg_est_pvc[c][t] = (!int_mode) ? nrg : nrg_est_pvc[c][t];
  ------------------
  |  Branch (478:33): [True: 4.40M, False: 41.4M]
  ------------------
  479|  45.8M|            nrg_tone_pvc[c][t] = 0.0f;
  480|       |
  481|  45.8M|            tmp = frame_data->qmapped_pvc[c][t] /
  482|  45.8M|                  (1 + frame_data->qmapped_pvc[c][t] + guard);
  483|       |
  484|  45.8M|            if (flag) {
  ------------------
  |  Branch (484:17): [True: 1.82M, False: 44.0M]
  ------------------
  485|  1.82M|              nrg_gain_pvc[c][t] = (FLOAT32)sqrt(nrg_ref_pvc[c][t] * tmp /
  486|  1.82M|                                                 (nrg_est_pvc[c][t] + 1));
  487|       |
  488|  1.82M|              nrg_tone_pvc[c][t] = (FLOAT32)(
  489|  1.82M|                  (harmonics[c] && (t >= frame_data->sine_position ||
  ------------------
  |  Branch (489:20): [True: 526k, False: 1.30M]
  |  Branch (489:37): [True: 188k, False: 337k]
  ------------------
  490|   337k|                                    (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (490:37): [True: 334k, False: 2.97k]
  ------------------
  491|  1.82M|                      ? sqrt(nrg_ref_pvc[c][t] * tmp /
  492|   523k|                             (frame_data->qmapped_pvc[c][t] + guard))
  493|  1.82M|                      : nrg_tone_pvc[c][t]);
  494|  44.0M|            } else {
  495|  44.0M|              if (noise_absc_flag) {
  ------------------
  |  Branch (495:19): [True: 73.8k, False: 43.9M]
  ------------------
  496|  73.8k|                nrg_gain_pvc[c][t] =
  497|  73.8k|                    (FLOAT32)sqrt(nrg_ref_pvc[c][t] / (nrg_est_pvc[c][t] + 1));
  498|  43.9M|              } else {
  499|  43.9M|                nrg_gain_pvc[c][t] = (FLOAT32)sqrt(
  500|  43.9M|                    nrg_ref_pvc[c][t] * tmp /
  501|  43.9M|                    ((nrg_est_pvc[c][t] + 1) * (frame_data->qmapped_pvc[c][t] + guard)));
  502|  43.9M|              }
  503|  44.0M|            }
  504|       |
  505|  45.8M|            noise_level_pvc[c][t] = (FLOAT32)sqrt(nrg_ref_pvc[c][t] * tmp);
  506|  45.8M|            c++;
  507|  45.8M|          }
  508|  10.1M|        }
  509|       |
  510|  7.06M|        for (c = 0; c < (*gate_mode)[limiter_band]; c++) {
  ------------------
  |  Branch (510:21): [True: 5.68M, False: 1.38M]
  ------------------
  511|  5.68M|          p_ref = p_est = 0.0f;
  512|  5.68M|          p_adj = 0;
  513|  5.68M|          for (k = (*lim_table)[limiter_band][c];
  514|  51.1M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (514:16): [True: 45.5M, False: 5.68M]
  ------------------
  515|  45.5M|            p_ref += nrg_ref_pvc[k][t];
  516|  45.5M|            p_est += nrg_est_pvc[k][t];
  517|  45.5M|          }
  518|  5.68M|          avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|  5.68M|#define EPS 1e-12f
  ------------------
                        avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|  5.68M|#define EPS 1e-12f
  ------------------
  519|  5.68M|          g_max = avg_gain * ixheaac_g_lim_gains[limiter_gains];
  520|  5.68M|          g_max > 1.0e5f ? g_max = 1.0e5f : 0;
  ------------------
  |  Branch (520:11): [True: 2.59M, False: 3.08M]
  ------------------
  521|       |
  522|  5.68M|          for (k = (*lim_table)[limiter_band][c];
  523|  51.1M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (523:16): [True: 45.5M, False: 5.68M]
  ------------------
  524|  45.5M|            if (g_max <= nrg_gain_pvc[k][t]) {
  ------------------
  |  Branch (524:17): [True: 3.53M, False: 41.9M]
  ------------------
  525|  3.53M|              noise_level_pvc[k][t] =
  526|  3.53M|                  (FLOAT32)(noise_level_pvc[k][t] *
  527|  3.53M|                            (g_max / (nrg_gain_pvc[k][t] + guard)));
  528|  3.53M|              nrg_gain_pvc[k][t] = g_max;
  529|  3.53M|            }
  530|       |
  531|  45.5M|            p_adj +=
  532|  45.5M|                nrg_gain_pvc[k][t] * nrg_gain_pvc[k][t] * nrg_est_pvc[k][t];
  533|       |
  534|  45.5M|            if (nrg_tone_pvc[k][t]) {
  ------------------
  |  Branch (534:17): [True: 521k, False: 44.9M]
  ------------------
  535|   521k|              p_adj += nrg_tone_pvc[k][t] * nrg_tone_pvc[k][t];
  536|  44.9M|            } else if (!noise_absc_flag) {
  ------------------
  |  Branch (536:24): [True: 44.9M, False: 71.2k]
  ------------------
  537|  44.9M|              p_adj += noise_level_pvc[k][t] * noise_level_pvc[k][t];
  538|  44.9M|            }
  539|  45.5M|          }
  540|       |
  541|  5.68M|          boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|  5.68M|#define EPS 1e-12f
  ------------------
                        boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|  5.68M|#define EPS 1e-12f
  ------------------
  542|  5.68M|          boost_gain = boost_gain > 1.584893192f ? 1.584893192f : boost_gain;
  ------------------
  |  Branch (542:24): [True: 704k, False: 4.97M]
  ------------------
  543|       |
  544|  5.68M|          for (k = (*lim_table)[limiter_band][c];
  545|  51.1M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (545:16): [True: 45.5M, False: 5.68M]
  ------------------
  546|  45.5M|            nrg_gain_pvc[k][t] *= boost_gain;
  547|  45.5M|            noise_level_pvc[k][t] *= boost_gain;
  548|  45.5M|            nrg_tone_pvc[k][t] *= boost_gain;
  549|  45.5M|          }
  550|  5.68M|        }
  551|  1.38M|      }
  552|       |
  553|   139k|      if (esbr_start_up_pvc) {
  ------------------
  |  Branch (553:11): [True: 9.75k, False: 130k]
  ------------------
  554|  48.7k|        for (n = 0; n < 4; n++) {
  ------------------
  |  Branch (554:21): [True: 39.0k, False: 9.75k]
  ------------------
  555|  1.39M|          for (c = 0; c < num_subbands; c++) {
  ------------------
  |  Branch (555:23): [True: 1.35M, False: 39.0k]
  ------------------
  556|  1.35M|            (*e_gain)[n][c] = nrg_gain_pvc[c][start_pos];
  557|  1.35M|            (*noise_buf)[n][c] = noise_level_pvc[c][start_pos];
  558|  1.35M|          }
  559|  39.0k|        }
  560|  9.75k|        esbr_start_up_pvc = 0;
  561|  9.75k|        esbr_start_up = 0;
  562|  9.75k|      }
  563|   139k|      for (l = rate * pvc_frame_info->border_vec[i];
  564|  3.35M|           l < rate * pvc_frame_info->border_vec[1 + i]; l++) {
  ------------------
  |  Branch (564:12): [True: 3.21M, False: 139k]
  ------------------
  565|  3.21M|        ptr_real_buf = *(input_real + l) + sub_band_start;
  566|  3.21M|        ptr_imag_buf = *(input_imag + l) + sub_band_start;
  567|       |
  568|  3.21M|        slot_idx = (WORD32)l / rate;
  569|  3.21M|        if (sub_band_start & 1) {
  ------------------
  |  Branch (569:13): [True: 945k, False: 2.26M]
  ------------------
  570|   945k|          freq_inv = -1;
  571|  2.26M|        } else {
  572|  2.26M|          freq_inv = 1;
  573|  2.26M|        }
  574|       |
  575|   106M|        for (k = 0; k < num_subbands; k++) {
  ------------------
  |  Branch (575:21): [True: 103M, False: 3.21M]
  ------------------
  576|   103M|          (*e_gain)[4][k] = nrg_gain_pvc[k][slot_idx];
  577|   103M|          (*noise_buf)[4][k] = noise_level_pvc[k][slot_idx];
  578|   103M|          c = 0, sb_gain = 0, sb_noise = 0;
  579|   240M|          for (n = 4 - smooth_length; n <= 4; n++) {
  ------------------
  |  Branch (579:39): [True: 137M, False: 103M]
  ------------------
  580|   137M|            sb_gain += (*e_gain)[n][k] * smooth_filt[c];
  581|   137M|            sb_noise += (*noise_buf)[n][k] * smooth_filt[c++];
  582|   137M|          }
  583|   103M|          phase_index = (phase_index + 1) & 511;
  584|   103M|          sb_noise = (nrg_tone_pvc[k][slot_idx] != 0 || noise_absc_flag)
  ------------------
  |  Branch (584:23): [True: 1.54M, False: 101M]
  |  Branch (584:57): [True: 171k, False: 101M]
  ------------------
  585|   103M|                         ? 0
  586|   103M|                         : sb_noise;
  587|       |
  588|   103M|          *ptr_real_buf =
  589|   103M|              *ptr_real_buf * sb_gain +
  590|   103M|              sb_noise * ixheaac_random_phase[phase_index][0] +
  591|   103M|              nrg_tone_pvc[k][slot_idx] * ixheaac_hphase_tbl[0][harm_index];
  592|   103M|          *ptr_imag_buf = *ptr_imag_buf * sb_gain +
  593|   103M|                          sb_noise * ixheaac_random_phase[phase_index][1] +
  594|   103M|                          nrg_tone_pvc[k][slot_idx] * freq_inv *
  595|   103M|                              ixheaac_hphase_tbl[1][harm_index];
  596|       |
  597|   103M|          ptr_real_buf++;
  598|   103M|          ptr_imag_buf++;
  599|   103M|          freq_inv = -freq_inv;
  600|   103M|        }
  601|       |
  602|  3.21M|        harm_index = (harm_index + 1) & 3;
  603|       |
  604|  3.21M|        memcpy(temp, (*e_gain)[0], 64 * sizeof(FLOAT32));
  605|  16.0M|        for (n = 0; n < 4; n++) {
  ------------------
  |  Branch (605:21): [True: 12.8M, False: 3.21M]
  ------------------
  606|  12.8M|          memcpy((*e_gain)[n], (*e_gain)[n + 1], 64 * sizeof(FLOAT32));
  607|  12.8M|        }
  608|  3.21M|        memcpy((*e_gain)[4], temp, 64 * sizeof(FLOAT32));
  609|       |
  610|  3.21M|        memcpy(temp, (*noise_buf)[0], 64 * sizeof(FLOAT32));
  611|  16.0M|        for (n = 0; n < 4; n++) {
  ------------------
  |  Branch (611:21): [True: 12.8M, False: 3.21M]
  ------------------
  612|  12.8M|          memcpy((*noise_buf)[n], (*noise_buf)[n + 1], 64 * sizeof(FLOAT32));
  613|  12.8M|        }
  614|  3.21M|        memcpy((*noise_buf)[4], temp, 64 * sizeof(FLOAT32));
  615|  3.21M|      }
  616|   139k|    }
  617|   221k|  } else {
  618|  3.27M|    for (i = 0; i < num_sf_bands[HIGH]; i++) {
  ------------------
  |  |   28|  3.27M|#define HIGH 1
  ------------------
  |  Branch (618:17): [True: 3.05M, False: 221k]
  ------------------
  619|  3.05M|      li =
  620|  3.05M|          frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_hi[i];
  621|  3.05M|      ui = frame_data->pstr_sbr_header->pstr_freq_band_data
  622|  3.05M|               ->freq_band_tbl_hi[i + 1];
  623|  3.05M|      tmp = ((ui + li) - (sub_band_start << 1)) >> 1;
  624|  3.05M|      if ((tmp >= 64) || (tmp < 0)) return -1;
  ------------------
  |  Branch (624:11): [True: 0, False: 3.05M]
  |  Branch (624:26): [True: 0, False: 3.05M]
  ------------------
  625|       |
  626|  3.05M|      harmonics[tmp] = add_harmonics[i];
  627|  3.05M|    }
  628|       |
  629|   602k|    for (i = 0; i < bs_num_env; i++) {
  ------------------
  |  Branch (629:17): [True: 381k, False: 221k]
  ------------------
  630|   381k|      if (kk > MAX_NOISE_ENVELOPES) {
  ------------------
  |  |   44|   381k|#define MAX_NOISE_ENVELOPES 2
  ------------------
  |  Branch (630:11): [True: 19, False: 381k]
  ------------------
  631|     19|        if (ec_flag)
  ------------------
  |  Branch (631:13): [True: 0, False: 19]
  ------------------
  632|      0|          kk = MAX_NOISE_ENVELOPES;
  ------------------
  |  |   44|      0|#define MAX_NOISE_ENVELOPES 2
  ------------------
  633|     19|        else
  634|     19|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|     19|#define IA_FATAL_ERROR 0x80000000
  ------------------
  635|     19|      }
  636|       |
  637|   381k|      if (p_frame_info->border_vec[i] == p_frame_info->noise_border_vec[kk])
  ------------------
  |  Branch (637:11): [True: 294k, False: 86.3k]
  ------------------
  638|   294k|        kk++, next++;
  639|       |
  640|   381k|      noise_absc_flag =
  641|   381k|          (i == trans_env || i == frame_data->env_short_flag_prev) ? 1 : 0;
  ------------------
  |  Branch (641:12): [True: 27.1k, False: 354k]
  |  Branch (641:30): [True: 15.8k, False: 338k]
  ------------------
  642|       |
  643|   381k|      smooth_length = (noise_absc_flag ? 0 : smoothing_length);
  ------------------
  |  Branch (643:24): [True: 43.0k, False: 338k]
  ------------------
  644|   381k|      smooth_filt = *ixheaac_fir_table[smooth_length];
  645|       |
  646|   381k|      if (sbr_mode == ORIG_SBR) {
  ------------------
  |  Branch (646:11): [True: 380k, False: 252]
  ------------------
  647|  3.61M|        for (c = 0, o = 0, j = 0; j < num_sf_bands[p_frame_info->freq_res[i]];
  ------------------
  |  Branch (647:35): [True: 3.23M, False: 380k]
  ------------------
  648|  3.23M|             j++) {
  649|  3.23M|          double tmp;
  650|  3.23M|          li = freq_band_table[p_frame_info->freq_res[i]][j];
  651|  3.23M|          ui = freq_band_table[p_frame_info->freq_res[i]][j + 1];
  652|  3.23M|          ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  653|  3.23M|                    ->freq_band_tbl_noise[o + 1];
  654|       |
  655|  3.23M|          if (p_frame_info->border_vec[i] >= p_frame_info->border_vec[i + 1]) {
  ------------------
  |  Branch (655:15): [True: 32.1k, False: 3.20M]
  ------------------
  656|   116k|            for (flag = 0, k = li; k < ui; k++) {
  ------------------
  |  Branch (656:36): [True: 84.7k, False: 32.1k]
  ------------------
  657|  84.7k|              flag = (harmonics[c] &&
  ------------------
  |  Branch (657:23): [True: 2.48k, False: 82.2k]
  ------------------
  658|  2.48k|                (i >= trans_env || (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (658:18): [True: 2.17k, False: 313]
  |  Branch (658:36): [True: 114, False: 199]
  ------------------
  659|  84.7k|                ? 1
  660|  84.7k|                : flag;
  661|  84.7k|              nrg_est[c++] = 0;
  662|  84.7k|            }
  663|  3.20M|          } else {
  664|  11.4M|            for (flag = 0, k = li; k < ui; k++) {
  ------------------
  |  Branch (664:36): [True: 8.26M, False: 3.20M]
  ------------------
  665|  8.26M|              for (nrg = 0, l = rate * p_frame_info->border_vec[i];
  666|   190M|                l < rate * p_frame_info->border_vec[i + 1]; l++) {
  ------------------
  |  Branch (666:17): [True: 182M, False: 8.26M]
  ------------------
  667|   182M|                nrg += (input_real[l][k] * input_real[l][k]) +
  668|   182M|                  (input_imag[l][k] * input_imag[l][k]);
  669|   182M|              }
  670|  8.26M|              flag = (harmonics[c] &&
  ------------------
  |  Branch (670:23): [True: 424k, False: 7.83M]
  ------------------
  671|   424k|                (i >= trans_env || (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (671:18): [True: 303k, False: 120k]
  |  Branch (671:36): [True: 73.6k, False: 47.2k]
  ------------------
  672|  8.26M|                ? 1
  673|  8.26M|                : flag;
  674|  8.26M|              nrg_est[c++] = nrg / (rate * p_frame_info->border_vec[i + 1] -
  675|  8.26M|                rate * p_frame_info->border_vec[i]);
  676|  8.26M|            }
  677|  3.20M|          }
  678|  3.23M|          if (!int_mode && ui != li) {
  ------------------
  |  Branch (678:15): [True: 245k, False: 2.98M]
  |  Branch (678:28): [True: 244k, False: 907]
  ------------------
  679|  1.06M|            for (nrg = 0, k = c - (ui - li); k < c; k++) {
  ------------------
  |  Branch (679:46): [True: 817k, False: 244k]
  ------------------
  680|   817k|              nrg += nrg_est[k];
  681|   817k|            }
  682|   244k|            nrg /= (ui - li);
  683|  2.98M|          } else {
  684|  2.98M|            nrg = 0;
  685|  2.98M|          }
  686|  3.23M|          c -= (ui - li);
  687|       |
  688|  11.5M|          for (k = 0; k < ui - li; k++) {
  ------------------
  |  Branch (688:23): [True: 8.34M, False: 3.23M]
  ------------------
  689|  8.34M|            o = (k + li >= ui2) ? o + 1 : o;
  ------------------
  |  Branch (689:17): [True: 460k, False: 7.88M]
  ------------------
  690|  8.34M|            if (o >= MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|  8.34M|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (690:17): [True: 0, False: 8.34M]
  ------------------
  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|  8.34M|            ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  697|  8.34M|                      ->freq_band_tbl_noise[o + 1];
  698|  8.34M|            nrg_ref[c] = sfb_nrg[m];
  699|  8.34M|            nrg_est[c] = (!int_mode) ? nrg : nrg_est[c];
  ------------------
  |  Branch (699:26): [True: 817k, False: 7.53M]
  ------------------
  700|  8.34M|            nrg_tone[c] = 0;
  701|  8.34M|            tmp = noise_floor[next * num_nf_bands + o] /
  702|  8.34M|                  (1 + noise_floor[next * num_nf_bands + o] + guard);
  703|  8.34M|            if (flag) {
  ------------------
  |  Branch (703:17): [True: 716k, False: 7.63M]
  ------------------
  704|   716k|              nrg_gain[c] = (FLOAT32)sqrt(nrg_ref[c] * tmp / (nrg_est[c] + 1));
  705|   716k|              nrg_tone[c] = (FLOAT32)(
  706|   716k|                  (harmonics[c] &&
  ------------------
  |  Branch (706:20): [True: 380k, False: 335k]
  ------------------
  707|   380k|                   (i >= trans_env || (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (707:21): [True: 305k, False: 75.0k]
  |  Branch (707:39): [True: 73.7k, False: 1.22k]
  ------------------
  708|   716k|                      ? sqrt(nrg_ref[c] * tmp /
  709|   379k|                             ABS(noise_floor[next * num_nf_bands + o] + guard))
  ------------------
  |  |   46|   379k|#define ABS(A) fabs(A)
  ------------------
  710|   716k|                      : nrg_tone[c]);
  711|  7.63M|            } else {
  712|  7.63M|              if (noise_absc_flag)
  ------------------
  |  Branch (712:19): [True: 580k, False: 7.05M]
  ------------------
  713|   580k|                nrg_gain[c] = (FLOAT32)sqrt(nrg_ref[c] / (nrg_est[c] + 1));
  714|  7.05M|              else
  715|  7.05M|                nrg_gain[c] = (FLOAT32)sqrt(
  716|  7.05M|                    nrg_ref[c] * tmp /
  717|  7.05M|                    ((nrg_est[c] + 1) *
  718|  7.05M|                     ABS(noise_floor[next * num_nf_bands + o] + guard)));
  ------------------
  |  |   46|  7.05M|#define ABS(A) fabs(A)
  ------------------
  719|  7.63M|            }
  720|  8.34M|            noise_level[c] = (FLOAT32)sqrt(nrg_ref[c] * tmp);
  721|  8.34M|            c++;
  722|  8.34M|          }
  723|  3.23M|          m++;
  724|  3.23M|        }
  725|       |
  726|  1.51M|        for (c = 0; c < (*gate_mode)[limiter_band]; c++) {
  ------------------
  |  Branch (726:21): [True: 1.13M, False: 380k]
  ------------------
  727|  1.13M|          p_ref = p_est = 0;
  728|  1.13M|          for (k = (*lim_table)[limiter_band][c];
  729|  9.47M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (729:16): [True: 8.34M, False: 1.13M]
  ------------------
  730|  8.34M|            p_ref += nrg_ref[k];
  731|  8.34M|            p_est += nrg_est[k];
  732|  8.34M|          }
  733|  1.13M|          avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|  1.13M|#define EPS 1e-12f
  ------------------
                        avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|  1.13M|#define EPS 1e-12f
  ------------------
  734|  1.13M|          g_max = avg_gain * ixheaac_g_lim_gains[limiter_gains];
  735|  1.13M|          g_max > 1.0e5f ? g_max = 1.0e5f : 0;
  ------------------
  |  Branch (735:11): [True: 433k, False: 697k]
  ------------------
  736|  1.13M|          for (k = (*lim_table)[limiter_band][c];
  737|  9.47M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (737:16): [True: 8.34M, False: 1.13M]
  ------------------
  738|  8.34M|            if (g_max <= nrg_gain[k]) {
  ------------------
  |  Branch (738:17): [True: 882k, False: 7.45M]
  ------------------
  739|   882k|              noise_level[k] = (FLOAT32)(noise_level[k] * (g_max / (nrg_gain[k] + guard)));
  740|   882k|              nrg_gain[k] = g_max;
  741|   882k|            }
  742|  8.34M|          }
  743|  1.13M|          p_adj = 0;
  744|  1.13M|          for (k = (*lim_table)[limiter_band][c];
  745|  9.47M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (745:16): [True: 8.34M, False: 1.13M]
  ------------------
  746|  8.34M|            p_adj += nrg_gain[k] * nrg_gain[k] * nrg_est[k];
  747|  8.34M|            if (nrg_tone[k])
  ------------------
  |  Branch (747:17): [True: 347k, False: 7.99M]
  ------------------
  748|   347k|              p_adj += nrg_tone[k] * nrg_tone[k];
  749|  7.99M|            else if (!noise_absc_flag)
  ------------------
  |  Branch (749:22): [True: 7.33M, False: 655k]
  ------------------
  750|  7.33M|              p_adj += noise_level[k] * noise_level[k];
  751|  8.34M|          }
  752|  1.13M|          boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|  1.13M|#define EPS 1e-12f
  ------------------
                        boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|  1.13M|#define EPS 1e-12f
  ------------------
  753|  1.13M|          boost_gain = boost_gain > 1.584893192f ? 1.584893192f : boost_gain;
  ------------------
  |  Branch (753:24): [True: 198k, False: 931k]
  ------------------
  754|  1.13M|          for (k = (*lim_table)[limiter_band][c];
  755|  9.47M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (755:16): [True: 8.34M, False: 1.13M]
  ------------------
  756|  8.34M|            nrg_gain[k] *= boost_gain;
  757|  8.34M|            noise_level[k] *= boost_gain;
  758|  8.34M|            nrg_tone[k] *= boost_gain;
  759|  8.34M|          }
  760|  1.13M|        }
  761|       |
  762|   380k|        if (esbr_start_up && (ldmps_present != 1)) {
  ------------------
  |  Branch (762:13): [True: 43.2k, False: 337k]
  |  Branch (762:30): [True: 33.3k, False: 9.85k]
  ------------------
  763|   166k|          for (n = 0; n < 4; n++) {
  ------------------
  |  Branch (763:23): [True: 133k, False: 33.3k]
  ------------------
  764|   133k|            memcpy((*e_gain)[n], nrg_gain, num_subbands * sizeof(FLOAT32));
  765|   133k|            memcpy((*noise_buf)[n], noise_level,
  766|   133k|                   num_subbands * sizeof(FLOAT32));
  767|   133k|          }
  768|  33.3k|          esbr_start_up = 0;
  769|  33.3k|          esbr_start_up_pvc = 0;
  770|  33.3k|        }
  771|       |
  772|   380k|        for (l = rate * p_frame_info->border_vec[i];
  773|  8.02M|             l < rate * p_frame_info->border_vec[i + 1]; l++) {
  ------------------
  |  Branch (773:14): [True: 7.64M, False: 380k]
  ------------------
  774|  7.64M|          ptr_real_buf = *(input_real + l) + sub_band_start;
  775|  7.64M|          ptr_imag_buf = *(input_imag + l) + sub_band_start;
  776|       |
  777|  7.64M|          freq_inv = 1;
  778|  7.64M|          if ((ldmps_present == 1) && (sub_band_start & 1)) freq_inv = -1;
  ------------------
  |  Branch (778:15): [True: 131k, False: 7.51M]
  |  Branch (778:39): [True: 74.7k, False: 56.3k]
  ------------------
  779|       |
  780|   190M|          for (k = 0; k < num_subbands; k++) {
  ------------------
  |  Branch (780:23): [True: 182M, False: 7.64M]
  ------------------
  781|   182M|            (*e_gain)[4][k] = nrg_gain[k];
  782|   182M|            (*noise_buf)[4][k] = noise_level[k];
  783|   182M|            c = 0, sb_gain = 0, sb_noise = 0;
  784|   427M|            for (n = 4 - smooth_length; n <= 4; n++) {
  ------------------
  |  Branch (784:41): [True: 245M, False: 182M]
  ------------------
  785|   245M|              sb_gain += (*e_gain)[n][k] * smooth_filt[c];
  786|   245M|              sb_noise += (*noise_buf)[n][k] * smooth_filt[c++];
  787|   245M|            }
  788|       |
  789|   182M|            phase_index = (phase_index + 1) & 511;
  790|   182M|            sb_noise = (nrg_tone[k] != 0 || noise_absc_flag) ? 0 : sb_noise;
  ------------------
  |  Branch (790:25): [True: 39.5M, False: 142M]
  |  Branch (790:45): [True: 10.4M, False: 132M]
  ------------------
  791|       |
  792|   182M|            if (ldmps_present == 1) {
  ------------------
  |  Branch (792:17): [True: 3.59M, False: 178M]
  ------------------
  793|  3.59M|              *ptr_real_buf = *ptr_real_buf * sb_gain +
  794|  3.59M|                              sb_noise * ixheaac_random_phase[phase_index][0] +
  795|  3.59M|                              nrg_tone[k] * ixheaac_hphase_tbl[0][harm_index];
  796|  3.59M|              *ptr_imag_buf =
  797|  3.59M|                  *ptr_imag_buf * sb_gain +
  798|  3.59M|                  sb_noise * ixheaac_random_phase[phase_index][1] +
  799|  3.59M|                  nrg_tone[k] * freq_inv * ixheaac_hphase_tbl[1][harm_index];
  800|       |
  801|  3.59M|              freq_inv = -freq_inv;
  802|   178M|            } else {
  803|   178M|                *ptr_real_buf = *ptr_real_buf * sb_gain +
  804|   178M|                            sb_noise * ixheaac_random_phase[phase_index][0];
  805|   178M|                *ptr_imag_buf = *ptr_imag_buf * sb_gain +
  806|   178M|                            sb_noise * ixheaac_random_phase[phase_index][1];
  807|   178M|            }
  808|       |
  809|   182M|            ptr_real_buf++;
  810|   182M|            ptr_imag_buf++;
  811|   182M|          }
  812|  7.64M|          if (ldmps_present == 1) harm_index = (harm_index + 1) & 3;
  ------------------
  |  Branch (812:15): [True: 131k, False: 7.51M]
  ------------------
  813|       |
  814|  7.64M|          memcpy(temp, (*e_gain)[0], 64 * sizeof(FLOAT32));
  815|  38.2M|          for (n = 0; n < 4; n++)
  ------------------
  |  Branch (815:23): [True: 30.5M, False: 7.64M]
  ------------------
  816|  30.5M|            memcpy((*e_gain)[n], (*e_gain)[n + 1], 64 * sizeof(FLOAT32));
  817|  7.64M|          memcpy((*e_gain)[4], temp, 64 * sizeof(FLOAT32));
  818|  7.64M|          memcpy(temp, (*noise_buf)[0], 64 * sizeof(FLOAT32));
  819|  38.2M|          for (n = 0; n < 4; n++)
  ------------------
  |  Branch (819:23): [True: 30.5M, False: 7.64M]
  ------------------
  820|  30.5M|            memcpy((*noise_buf)[n], (*noise_buf)[n + 1], 64 * sizeof(FLOAT32));
  821|  7.64M|          memcpy((*noise_buf)[4], temp, 64 * sizeof(FLOAT32));
  822|  7.64M|        }
  823|       |
  824|   380k|        if (ldmps_present != 1) {
  ------------------
  |  Branch (824:13): [True: 371k, False: 9.85k]
  ------------------
  825|   371k|          err_code = ixheaacd_apply_inter_tes(
  826|   371k|              *(input_real1 + rate * p_frame_info->border_vec[i]),
  827|   371k|              *(input_imag1 + rate * p_frame_info->border_vec[i]),
  828|   371k|              *(input_real + rate * p_frame_info->border_vec[i]),
  829|   371k|              *(input_imag + rate * p_frame_info->border_vec[i]),
  830|   371k|              rate * p_frame_info->border_vec[i + 1] - rate * p_frame_info->border_vec[i],
  831|   371k|              sub_band_start, num_subbands, frame_data->inter_temp_shape_mode[i]);
  832|   371k|          if (err_code != 0) {
  ------------------
  |  Branch (832:15): [True: 0, False: 371k]
  ------------------
  833|      0|            return err_code;
  834|      0|          }
  835|       |
  836|   371k|        for (l = rate * p_frame_info->border_vec[i];
  837|  7.88M|             l < rate * p_frame_info->border_vec[i + 1]; l++) {
  ------------------
  |  Branch (837:14): [True: 7.51M, False: 371k]
  ------------------
  838|  7.51M|          ptr_real_buf = *(input_real + l) + sub_band_start;
  839|  7.51M|          ptr_imag_buf = *(input_imag + l) + sub_band_start;
  840|  7.51M|          if (sub_band_start & 1) {
  ------------------
  |  Branch (840:15): [True: 2.65M, False: 4.85M]
  ------------------
  841|  2.65M|            freq_inv = -1;
  842|  4.85M|          } else {
  843|  4.85M|            freq_inv = 1;
  844|  4.85M|          }
  845|   186M|          for (k = 0; k < num_subbands; k++) {
  ------------------
  |  Branch (845:23): [True: 178M, False: 7.51M]
  ------------------
  846|   178M|            *ptr_real_buf += nrg_tone[k] * ixheaac_hphase_tbl[0][harm_index];
  847|   178M|            *ptr_imag_buf +=
  848|   178M|                nrg_tone[k] * freq_inv * ixheaac_hphase_tbl[1][harm_index];
  849|       |
  850|   178M|            ptr_real_buf++;
  851|   178M|            ptr_imag_buf++;
  852|   178M|            freq_inv = -freq_inv;
  853|   178M|          }
  854|  7.51M|          harm_index = (harm_index + 1) & 3;
  855|  7.51M|        }
  856|   371k|      }
  857|   380k|    }
  858|   381k|  }
  859|   221k|}
  860|       |
  861|  20.0M|  for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (861:15): [True: 19.7M, False: 308k]
  ------------------
  862|  19.7M|    (*harm_flag_varlen_prev)[i] = (*harm_flag_prev)[i];
  863|  19.7M|    (*harm_flag_varlen)[i] = harmonics[i];
  864|  19.7M|  }
  865|       |
  866|   308k|  memcpy(&((*harm_flag_prev)[0]) + sub_band_start, harmonics,
  867|   308k|         (64 - sub_band_start) * sizeof(WORD8));
  868|       |
  869|   308k|  if (trans_env == bs_num_env) {
  ------------------
  |  Branch (869:7): [True: 10.0k, False: 298k]
  ------------------
  870|  10.0k|    frame_data->env_short_flag_prev = 0;
  871|   298k|  } else {
  872|   298k|    frame_data->env_short_flag_prev = -1;
  873|   298k|  }
  874|       |
  875|   308k|  if (ldmps_present != 1) {
  ------------------
  |  Branch (875:7): [True: 300k, False: 8.29k]
  ------------------
  876|   300k|  memcpy((VOID *)&frame_data->str_frame_info_prev,
  877|   300k|         (VOID *)&frame_data->str_frame_info_details,
  878|   300k|         sizeof(ia_frame_info_struct));
  879|       |
  880|   300k|  if (frame_data->str_frame_info_details.num_env == 1) {
  ------------------
  |  Branch (880:7): [True: 175k, False: 125k]
  ------------------
  881|   175k|    frame_data->var_len_id_prev = 0;
  882|   175k|  } else if (frame_data->str_frame_info_details.num_env == 2) {
  ------------------
  |  Branch (882:14): [True: 76.0k, False: 49.2k]
  ------------------
  883|  76.0k|    frame_data->var_len_id_prev = 1;
  884|  76.0k|  }
  885|       |
  886|   300k|  if ((frame_data->str_frame_info_details.num_noise_env < 1) ||
  ------------------
  |  Branch (886:7): [True: 0, False: 300k]
  ------------------
  887|   300k|        (frame_data->str_frame_info_details.num_noise_env > 2)) {
  ------------------
  |  Branch (887:9): [True: 0, False: 300k]
  ------------------
  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|  1.11M|  for (i = 0; i < num_nf_bands; i++) {
  ------------------
  |  Branch (894:15): [True: 812k, False: 300k]
  ------------------
  895|   812k|    prev_env_noise_level[i] =
  896|   812k|        frame_data->flt_noise_floor
  897|   812k|            [(frame_data->str_frame_info_details.num_noise_env - 1) *
  898|   812k|                 num_nf_bands +
  899|   812k|             i];
  900|   812k|  }
  901|   300k|}
  902|       |
  903|   308k|  frame_data->harm_index = harm_index;
  904|   308k|  frame_data->phase_index = phase_index;
  905|   308k|  frame_data->pstr_sbr_header->esbr_start_up = esbr_start_up;
  906|   308k|  frame_data->pstr_sbr_header->esbr_start_up_pvc = esbr_start_up_pvc;
  907|   308k|  return 0;
  908|   308k|}
ixheaacd_createlimiterbands:
  915|  95.4k|                                         WORD32 ec_flag) {
  916|  95.4k|  WORD32 i, j, k, is_patch_border[2];
  917|  95.4k|  WORD32 patch_borders[MAX_NUM_PATCHES + 1];
  918|  95.4k|  WORD32 temp_limiter_band_calc[32 + MAX_NUM_PATCHES + 1];
  919|       |
  920|  95.4k|  double num_octave;
  921|  95.4k|  WORD32 num_patches;
  922|       |
  923|  95.4k|  WORD32 sub_band_start = freq_band_tbl[0];
  924|  95.4k|  WORD32 sub_band_end = freq_band_tbl[ixheaacd_num_bands];
  925|       |
  926|  95.4k|  const double log2 = log(2.0);
  927|  95.4k|  const double limbnd_per_oct[4] = {0, 1.2, 2.0, 3.0};
  928|       |
  929|  95.4k|  if (!b_patching_mode && (x_over_qmf != NULL)) {
  ------------------
  |  Branch (929:7): [True: 59.5k, False: 35.9k]
  |  Branch (929:27): [True: 37.6k, False: 21.9k]
  ------------------
  930|  37.6k|    num_patches = 0;
  931|  37.6k|    if (upsamp_4_flag) {
  ------------------
  |  Branch (931:9): [True: 7.57k, False: 30.0k]
  ------------------
  932|  45.4k|      for (i = 1; i < MAX_NUM_PATCHES; i++)
  ------------------
  |  |   23|  45.4k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (932:19): [True: 37.8k, False: 7.57k]
  ------------------
  933|  37.8k|        if (x_over_qmf[i] != 0) num_patches++;
  ------------------
  |  Branch (933:13): [True: 14.4k, False: 23.4k]
  ------------------
  934|  30.0k|    } else {
  935|   120k|      for (i = 1; i < 4; i++)
  ------------------
  |  Branch (935:19): [True: 90.1k, False: 30.0k]
  ------------------
  936|  90.1k|        if (x_over_qmf[i] != 0) num_patches++;
  ------------------
  |  Branch (936:13): [True: 72.5k, False: 17.5k]
  ------------------
  937|  30.0k|    }
  938|   124k|    for (i = 0; i < num_patches; i++) {
  ------------------
  |  Branch (938:17): [True: 87.0k, False: 37.6k]
  ------------------
  939|  87.0k|      patch_borders[i] = x_over_qmf[i] - sub_band_start;
  940|  87.0k|    }
  941|  57.8k|  } else {
  942|  57.8k|    num_patches = patch_param->num_patches;
  943|   224k|    for (i = 0; i < num_patches; i++) {
  ------------------
  |  Branch (943:17): [True: 166k, False: 57.8k]
  ------------------
  944|   166k|      patch_borders[i] = patch_param->start_subband[i] - sub_band_start;
  945|   166k|    }
  946|  57.8k|  }
  947|  95.4k|  patch_borders[i] = sub_band_end - sub_band_start;
  948|       |
  949|  95.4k|  lim_table[0][0] = freq_band_tbl[0] - sub_band_start;
  950|  95.4k|  lim_table[0][1] = freq_band_tbl[ixheaacd_num_bands] - sub_band_start;
  951|  95.4k|  gate_mode[0] = 1;
  952|       |
  953|   381k|  for (i = 1; i < 4; i++) {
  ------------------
  |  Branch (953:15): [True: 286k, False: 95.4k]
  ------------------
  954|  2.62M|    for (k = 0; k <= ixheaacd_num_bands; k++) {
  ------------------
  |  Branch (954:17): [True: 2.33M, False: 286k]
  ------------------
  955|  2.33M|      temp_limiter_band_calc[k] = freq_band_tbl[k] - sub_band_start;
  956|  2.33M|    }
  957|       |
  958|   761k|    for (k = 1; k < num_patches; k++) {
  ------------------
  |  Branch (958:17): [True: 475k, False: 286k]
  ------------------
  959|   475k|      temp_limiter_band_calc[ixheaacd_num_bands + k] = patch_borders[k];
  960|   475k|    }
  961|       |
  962|   286k|    gate_mode[i] = ixheaacd_num_bands + num_patches - 1;
  963|   286k|    ixheaacd_shellsort(temp_limiter_band_calc, gate_mode[i] + 1);
  964|       |
  965|  2.80M|    for (j = 1; j <= gate_mode[i]; j++) {
  ------------------
  |  Branch (965:17): [True: 2.52M, False: 286k]
  ------------------
  966|  2.52M|      num_octave = log((double)(temp_limiter_band_calc[j] + sub_band_start) /
  967|  2.52M|                       (temp_limiter_band_calc[j - 1] + sub_band_start)) /
  968|  2.52M|                   log2;
  969|       |
  970|  2.52M|      if (num_octave * limbnd_per_oct[i] < 0.49) {
  ------------------
  |  Branch (970:11): [True: 1.51M, False: 1.00M]
  ------------------
  971|  1.51M|        if (temp_limiter_band_calc[j] == temp_limiter_band_calc[j - 1]) {
  ------------------
  |  Branch (971:13): [True: 276k, False: 1.23M]
  ------------------
  972|   276k|          temp_limiter_band_calc[j] = sub_band_end;
  973|   276k|          ixheaacd_shellsort(temp_limiter_band_calc, gate_mode[i] + 1);
  974|   276k|          gate_mode[i]--;
  975|   276k|          j--;
  976|   276k|          continue;
  977|   276k|        }
  978|       |
  979|  1.23M|        is_patch_border[0] = is_patch_border[1] = 0;
  980|       |
  981|  3.87M|        for (k = 0; k <= num_patches; k++) {
  ------------------
  |  Branch (981:21): [True: 3.35M, False: 518k]
  ------------------
  982|  3.35M|          if (temp_limiter_band_calc[j - 1] == patch_borders[k]) {
  ------------------
  |  Branch (982:15): [True: 720k, False: 2.63M]
  ------------------
  983|   720k|            is_patch_border[0] = 1;
  984|   720k|            break;
  985|   720k|          }
  986|  3.35M|        }
  987|       |
  988|  5.34M|        for (k = 0; k <= num_patches; k++) {
  ------------------
  |  Branch (988:21): [True: 4.46M, False: 880k]
  ------------------
  989|  4.46M|          if (temp_limiter_band_calc[j] == patch_borders[k]) {
  ------------------
  |  Branch (989:15): [True: 358k, False: 4.10M]
  ------------------
  990|   358k|            is_patch_border[1] = 1;
  991|   358k|            break;
  992|   358k|          }
  993|  4.46M|        }
  994|       |
  995|  1.23M|        if (!is_patch_border[1]) {
  ------------------
  |  Branch (995:13): [True: 880k, False: 358k]
  ------------------
  996|   880k|          temp_limiter_band_calc[j] = sub_band_end;
  997|   880k|          ixheaacd_shellsort(temp_limiter_band_calc, gate_mode[i] + 1);
  998|   880k|          gate_mode[i]--;
  999|   880k|          j--;
 1000|   880k|        } else if (!is_patch_border[0]) {
  ------------------
  |  Branch (1000:20): [True: 212k, False: 145k]
  ------------------
 1001|   212k|          temp_limiter_band_calc[j - 1] = sub_band_end;
 1002|   212k|          ixheaacd_shellsort(temp_limiter_band_calc, gate_mode[i] + 1);
 1003|   212k|          gate_mode[i]--;
 1004|   212k|          j--;
 1005|   212k|        }
 1006|  1.23M|      }
 1007|  2.52M|    }
 1008|   286k|    if (gate_mode[i] > 12) {
  ------------------
  |  Branch (1008:9): [True: 1, False: 286k]
  ------------------
 1009|      1|      if (ec_flag)
  ------------------
  |  Branch (1009:11): [True: 0, False: 1]
  ------------------
 1010|      0|        gate_mode[i] = 12;
 1011|      1|      else
 1012|      1|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1013|      1|    }
 1014|  1.72M|    for (k = 0; k <= gate_mode[i]; k++) {
  ------------------
  |  Branch (1014:17): [True: 1.44M, False: 286k]
  ------------------
 1015|  1.44M|      lim_table[i][k] = temp_limiter_band_calc[k];
 1016|  1.44M|    }
 1017|   286k|  }
 1018|  95.4k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  95.4k|#define IA_NO_ERROR 0x00000000
  ------------------
 1019|  95.4k|}
ixheaacd_apply_inter_tes:
 1024|   371k|                                WORD32 num_subband, WORD32 gamma_idx) {
 1025|   371k|  WORD32 sub_band_end = sub_band_start + num_subband;
 1026|   371k|  FLOAT32 subsample_power_high[TIMESLOT_BUFFER_SIZE],
 1027|   371k|      subsample_power_low[TIMESLOT_BUFFER_SIZE];
 1028|   371k|  FLOAT32 total_power_high = 0.0f;
 1029|   371k|  FLOAT32 total_power_low = 0.0f, total_power_high_after = 1.0e-6f;
 1030|   371k|  FLOAT32 gain[TIMESLOT_BUFFER_SIZE];
 1031|   371k|  FLOAT32 gain_adj, gain_adj_2;
 1032|   371k|  FLOAT32 gamma = ixheaac_q_gamma_table[gamma_idx];
 1033|   371k|  WORD32 i, j;
 1034|       |
 1035|   371k|  if (num_sample > TIMESLOT_BUFFER_SIZE)
  ------------------
  |  |   95|   371k|#define TIMESLOT_BUFFER_SIZE 78
  ------------------
  |  Branch (1035:7): [True: 0, False: 371k]
  ------------------
 1036|      0|  {
 1037|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1038|      0|  }
 1039|   371k|  if (gamma > 0) {
  ------------------
  |  Branch (1039:7): [True: 13.6k, False: 357k]
  ------------------
 1040|   241k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1040:17): [True: 227k, False: 13.6k]
  ------------------
 1041|   227k|      memcpy(&qmf_real[64 * i], &qmf_real1[64 * i],
 1042|   227k|             sub_band_start * sizeof(FLOAT32));
 1043|   227k|      memcpy(&qmf_imag[64 * i], &qmf_imag1[64 * i],
 1044|   227k|             sub_band_start * sizeof(FLOAT32));
 1045|   227k|    }
 1046|       |
 1047|   241k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1047:17): [True: 227k, False: 13.6k]
  ------------------
 1048|   227k|      subsample_power_low[i] = 0.0f;
 1049|  4.26M|      for (j = 0; j < sub_band_start; j++) {
  ------------------
  |  Branch (1049:19): [True: 4.03M, False: 227k]
  ------------------
 1050|  4.03M|        subsample_power_low[i] += qmf_real[64 * i + j] * qmf_real[64 * i + j];
 1051|  4.03M|        subsample_power_low[i] += qmf_imag[64 * i + j] * qmf_imag[64 * i + j];
 1052|  4.03M|      }
 1053|   227k|      subsample_power_high[i] = 0.0f;
 1054|  6.39M|      for (j = sub_band_start; j < sub_band_end; j++) {
  ------------------
  |  Branch (1054:32): [True: 6.17M, False: 227k]
  ------------------
 1055|  6.17M|        subsample_power_high[i] += qmf_real[64 * i + j] * qmf_real[64 * i + j];
 1056|  6.17M|        subsample_power_high[i] += qmf_imag[64 * i + j] * qmf_imag[64 * i + j];
 1057|  6.17M|      }
 1058|   227k|      total_power_low += subsample_power_low[i];
 1059|   227k|      total_power_high += subsample_power_high[i];
 1060|   227k|    }
 1061|       |
 1062|   241k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1062:17): [True: 227k, False: 13.6k]
  ------------------
 1063|   227k|      gain[i] = (FLOAT32)(sqrt(subsample_power_low[i] * num_sample /
 1064|   227k|                               (total_power_low + 1.0e-6f)));
 1065|   227k|    }
 1066|       |
 1067|   241k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1067:17): [True: 227k, False: 13.6k]
  ------------------
 1068|   227k|      gain[i] = (FLOAT32)(1.0f + gamma * (gain[i] - 1.0f));
 1069|   227k|    }
 1070|       |
 1071|   241k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1071:17): [True: 227k, False: 13.6k]
  ------------------
 1072|   227k|      if (gain[i] < 0.2f) {
  ------------------
  |  Branch (1072:11): [True: 170k, False: 56.8k]
  ------------------
 1073|   170k|        gain[i] = 0.2f;
 1074|   170k|      }
 1075|       |
 1076|   227k|      subsample_power_high[i] *= gain[i] * gain[i];
 1077|   227k|      total_power_high_after += subsample_power_high[i];
 1078|   227k|    }
 1079|       |
 1080|  13.6k|    gain_adj_2 = total_power_high / total_power_high_after;
 1081|  13.6k|    gain_adj = (FLOAT32)(sqrt(gain_adj_2));
 1082|       |
 1083|   241k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1083:17): [True: 227k, False: 13.6k]
  ------------------
 1084|   227k|      gain[i] *= gain_adj;
 1085|       |
 1086|  6.39M|      for (j = sub_band_start; j < sub_band_end; j++) {
  ------------------
  |  Branch (1086:32): [True: 6.17M, False: 227k]
  ------------------
 1087|  6.17M|        qmf_real[64 * i + j] *= gain[i];
 1088|  6.17M|        qmf_imag[64 * i + j] *= gain[i];
 1089|  6.17M|      }
 1090|   227k|    }
 1091|  13.6k|  }
 1092|   371k|  return 0;
 1093|   371k|}

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

ixheaacd_usac_cplx_save_prev:
  150|  97.1k|                                  WORD32 *r_spec_prev) {
  151|  97.1k|  WORD32 ixheaacd_drc_offset;
  152|       |
  153|  97.1k|  ixheaacd_drc_offset = info->samp_per_bk - info->bins_per_sbk;
  154|       |
  155|  97.1k|  memcpy(l_spec_prev + ixheaacd_drc_offset, l_spec + ixheaacd_drc_offset,
  156|  97.1k|         sizeof(WORD32) * info->bins_per_sbk);
  157|  97.1k|  memcpy(r_spec_prev + ixheaacd_drc_offset, r_spec + ixheaacd_drc_offset,
  158|  97.1k|         sizeof(WORD32) * info->bins_per_sbk);
  159|  97.1k|}
ixheaacd_ms_stereo:
  320|  13.0k|                        WORD32 *l_spec, WORD32 chn, WORD32 nband) {
  321|  13.0k|  WORD32 temp_r, temp_l;
  322|  13.0k|  WORD32 sfb, k, grp, grp_len;
  323|  13.0k|  ia_sfb_info_struct *ptr_sfb_info = usac_data->pstr_sfb_info[chn];
  324|  13.0k|  UWORD8 *ms_used = usac_data->ms_used[chn];
  325|  13.0k|  WORD32 ixheaacd_drc_offset = 0;
  326|       |
  327|  28.6k|  for (grp = 0; grp < ptr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (327:17): [True: 15.6k, False: 13.0k]
  ------------------
  328|  33.2k|    for (grp_len = 0; grp_len < ptr_sfb_info->group_len[grp]; grp_len++) {
  ------------------
  |  Branch (328:23): [True: 17.6k, False: 15.6k]
  ------------------
  329|  17.6k|      ixheaacd_drc_offset = 0;
  330|  97.8k|      for (sfb = 0; sfb < nband; sfb++) {
  ------------------
  |  Branch (330:21): [True: 80.2k, False: 17.6k]
  ------------------
  331|  80.2k|        ixheaacd_drc_offset += ptr_sfb_info->sfb_width[sfb];
  332|  80.2k|        if (ms_used[sfb]) {
  ------------------
  |  Branch (332:13): [True: 67.2k, False: 12.9k]
  ------------------
  333|   897k|          for (k = 0; k < ptr_sfb_info->sfb_width[sfb]; k++) {
  ------------------
  |  Branch (333:23): [True: 829k, False: 67.2k]
  ------------------
  334|   829k|            temp_r = *r_spec;
  335|   829k|            temp_l = *l_spec;
  336|   829k|            *l_spec = ixheaac_add32_sat(temp_r, temp_l);
  337|   829k|            *r_spec = ixheaac_sub32_sat(temp_l, temp_r);
  338|   829k|            r_spec++;
  339|   829k|            l_spec++;
  340|   829k|          }
  341|  67.2k|        } else {
  342|  12.9k|          r_spec += ptr_sfb_info->sfb_width[sfb];
  343|  12.9k|          l_spec += ptr_sfb_info->sfb_width[sfb];
  344|  12.9k|        }
  345|  80.2k|      }
  346|       |
  347|  17.6k|      l_spec = l_spec + ptr_sfb_info->bins_per_sbk - ixheaacd_drc_offset;
  348|  17.6k|      r_spec = r_spec + ptr_sfb_info->bins_per_sbk - ixheaacd_drc_offset;
  349|  17.6k|    }
  350|       |
  351|  15.6k|    ms_used += ptr_sfb_info->sfb_per_sbk;
  352|  15.6k|  }
  353|  13.0k|}
ixheaacd_ics_info:
  601|   279k|{
  602|   279k|  WORD32 win;
  603|   279k|  WORD32 mask = 0x40;
  604|       |
  605|   279k|  UWORD8 *scf_group_ptr = usac_data->group_dis[chn];
  606|       |
  607|   279k|  win = ixheaacd_read_bits_buf(it_bit_buff, 2);
  608|       |
  609|   279k|  win = usac_data->window_sequence[chn] =
  610|   279k|      ixheaacd_win_seq_select(win, window_sequence_last);
  611|   279k|  if (win == -1) return -1;
  ------------------
  |  Branch (611:7): [True: 0, False: 279k]
  ------------------
  612|       |
  613|   279k|  usac_data->pstr_sfb_info[chn] =
  614|   279k|      usac_data->pstr_usac_winmap[usac_data->window_sequence[chn]];
  615|       |
  616|   279k|  usac_data->window_shape[chn] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  617|       |
  618|   279k|  if (usac_data->pstr_usac_winmap[win]->islong) {
  ------------------
  |  Branch (618:7): [True: 219k, False: 59.8k]
  ------------------
  619|   219k|    *max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 6);
  620|   219k|    *scf_group_ptr = 1;
  621|   219k|  } else {
  622|  59.8k|    WORD32 i, scale_factor_grouping;
  623|       |
  624|  59.8k|    *max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 4);
  625|       |
  626|  59.8k|    scale_factor_grouping = ixheaacd_read_bits_buf(it_bit_buff, 7);
  627|       |
  628|   478k|    for (i = 1; i < 8; i++) {
  ------------------
  |  Branch (628:17): [True: 418k, False: 59.8k]
  ------------------
  629|   418k|      if (!(scale_factor_grouping & mask)) *scf_group_ptr++ = i;
  ------------------
  |  Branch (629:11): [True: 258k, False: 160k]
  ------------------
  630|       |
  631|   418k|      mask = mask >> 1;
  632|   418k|    }
  633|  59.8k|    *scf_group_ptr++ = i;
  634|       |
  635|  59.8k|    ixheaacd_calc_grp_offset(usac_data->pstr_usac_winmap[win],
  636|  59.8k|                             &usac_data->group_dis[chn][0]);
  637|  59.8k|  }
  638|       |
  639|   279k|  if (*max_sfb > usac_data->pstr_sfb_info[chn]->sfb_per_sbk) {
  ------------------
  |  Branch (639:7): [True: 426, False: 279k]
  ------------------
  640|    426|    *max_sfb = usac_data->pstr_sfb_info[chn]->sfb_per_sbk;
  641|    426|    return -1;
  642|    426|  }
  643|       |
  644|   279k|  return 0;
  645|   279k|}
ixheaacd_core_coder_data:
  650|   278k|                                WORD32 nr_core_coder_channels) {
  651|   278k|  WORD32 err_code = 0;
  652|   278k|  WORD32 k = 0, ch = 0, chn = 0, left = 0, right = 0;
  653|       |
  654|   278k|  ia_usac_tmp_core_coder_struct str_tmp_core_coder = {0};
  655|   278k|  ia_usac_tmp_core_coder_struct *pstr_core_coder = &str_tmp_core_coder;
  656|   278k|  ia_td_frame_data_struct td_frame;
  657|   278k|  jmp_buf local;
  658|       |
  659|   278k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (659:7): [True: 0, False: 278k]
  ------------------
  660|      0|    err_code = setjmp(local);
  661|      0|    it_bit_buff->xaac_jmp_buf = &local;
  662|      0|  }
  663|   278k|  if (err_code == 0 &&
  ------------------
  |  Branch (663:7): [True: 278k, False: 0]
  ------------------
  664|   278k|      ((usac_data->ec_flag == 0) || (usac_data->frame_ok == 1 && usac_data->ec_flag == 1))) {
  ------------------
  |  Branch (664:8): [True: 278k, False: 0]
  |  Branch (664:38): [True: 0, False: 0]
  |  Branch (664:66): [True: 0, False: 0]
  ------------------
  665|   278k|    memset(&td_frame, 0, sizeof(td_frame));
  666|   278k|    pstr_core_coder->tns_on_lr = 0;
  667|   278k|    pstr_core_coder->pred_dir = 0;
  668|   278k|    if (id != ID_USAC_LFE) {
  ------------------
  |  |   29|   278k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (668:9): [True: 276k, False: 2.02k]
  ------------------
  669|   695k|      for (ch = 0; ch < nr_core_coder_channels; ch++)
  ------------------
  |  Branch (669:20): [True: 418k, False: 276k]
  ------------------
  670|   418k|        pstr_core_coder->core_mode[ch] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  671|   276k|    } else {
  672|  4.04k|      for (ch = 0; ch < nr_core_coder_channels; ch++) pstr_core_coder->core_mode[ch] = 0;
  ------------------
  |  Branch (672:20): [True: 2.02k, False: 2.02k]
  ------------------
  673|  2.02k|    }
  674|       |
  675|   278k|    if (nr_core_coder_channels == 2 && pstr_core_coder->core_mode[0] == 0 &&
  ------------------
  |  Branch (675:9): [True: 141k, False: 137k]
  |  Branch (675:40): [True: 115k, False: 26.1k]
  ------------------
  676|   115k|        pstr_core_coder->core_mode[1] == 0) {
  ------------------
  |  Branch (676:9): [True: 98.0k, False: 17.1k]
  ------------------
  677|  98.0k|      pstr_core_coder->tns_active = ixheaacd_read_bits_buf(it_bit_buff, 1);
  678|  98.0k|      pstr_core_coder->common_window = ixheaacd_read_bits_buf(it_bit_buff, 1);
  679|       |
  680|  98.0k|      if (pstr_core_coder->common_window) {
  ------------------
  |  Branch (680:11): [True: 41.7k, False: 56.3k]
  ------------------
  681|  41.7k|        left = chan_offset;
  682|  41.7k|        right = chan_offset + 1;
  683|       |
  684|  41.7k|        err_code = ixheaacd_ics_info(usac_data, left, &pstr_core_coder->max_sfb[left],
  685|  41.7k|                                     it_bit_buff, usac_data->window_sequence_last[left]);
  686|       |
  687|  41.7k|        if (err_code == -1) {
  ------------------
  |  Branch (687:13): [True: 11, False: 41.6k]
  ------------------
  688|     11|          if (usac_data->ec_flag) {
  ------------------
  |  Branch (688:15): [True: 0, False: 11]
  ------------------
  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|     11|          } else {
  694|     11|            return err_code;
  695|     11|          }
  696|     11|        }
  697|       |
  698|  41.6k|        pstr_core_coder->common_max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 1);
  699|       |
  700|  41.6k|        if (pstr_core_coder->common_max_sfb == 0) {
  ------------------
  |  Branch (700:13): [True: 12.7k, False: 28.9k]
  ------------------
  701|  12.7k|          if (usac_data->window_sequence[left] == EIGHT_SHORT_SEQUENCE)
  ------------------
  |  |  102|  12.7k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (701:15): [True: 10.6k, False: 2.13k]
  ------------------
  702|  10.6k|            pstr_core_coder->max_sfb[right] = ixheaacd_read_bits_buf(it_bit_buff, 4);
  703|  2.13k|          else
  704|  2.13k|            pstr_core_coder->max_sfb[right] = ixheaacd_read_bits_buf(it_bit_buff, 6);
  705|  28.9k|        } else {
  706|  28.9k|          pstr_core_coder->max_sfb[right] = pstr_core_coder->max_sfb[left];
  707|  28.9k|        }
  708|       |
  709|  41.6k|        pstr_core_coder->max_sfb_ste =
  710|  41.6k|            max(pstr_core_coder->max_sfb[left], pstr_core_coder->max_sfb[right]);
  ------------------
  |  |   74|  41.6k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 4.51k, False: 37.1k]
  |  |  ------------------
  ------------------
  711|       |
  712|  41.6k|        usac_data->window_sequence[right] = usac_data->window_sequence[left];
  713|  41.6k|        usac_data->window_shape[right] = usac_data->window_shape[left];
  714|  41.6k|        memcpy(&usac_data->group_dis[right][0], &usac_data->group_dis[left][0], 8);
  715|  41.6k|        usac_data->pstr_sfb_info[right] = usac_data->pstr_sfb_info[left];
  716|  41.6k|        if (pstr_core_coder->max_sfb[right] > usac_data->pstr_sfb_info[right]->sfb_per_sbk)
  ------------------
  |  Branch (716:13): [True: 1.10k, False: 40.5k]
  ------------------
  717|  1.10k|          pstr_core_coder->max_sfb[right] = usac_data->pstr_sfb_info[right]->sfb_per_sbk;
  718|       |
  719|  41.6k|        pstr_core_coder->ms_mask_present[0] =
  720|  41.6k|            ixheaacd_read_ms_mask(usac_data, pstr_core_coder, it_bit_buff, left);
  721|  56.3k|      } else {
  722|  56.3k|        left = chan_offset;
  723|  56.3k|        right = chan_offset + 1;
  724|       |
  725|  56.3k|        pstr_core_coder->ms_mask_present[0] = 0;
  726|  56.3k|        pstr_core_coder->ms_mask_present[1] = 0;
  727|       |
  728|  7.71M|        for (k = 0; k < SFB_NUM_MAX; k++) {
  ------------------
  |  |  114|  7.71M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  7.71M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  7.71M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (728:21): [True: 7.66M, False: 56.3k]
  ------------------
  729|  7.66M|          usac_data->alpha_q_re_prev[k] = 0;
  730|  7.66M|          usac_data->alpha_q_im_prev[k] = 0;
  731|  7.66M|        }
  732|  56.3k|      }
  733|       |
  734|  98.0k|      if (usac_data->tw_mdct[elem_idx] == 1) {
  ------------------
  |  Branch (734:11): [True: 0, False: 98.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|  98.0k|      if (pstr_core_coder->tns_active) {
  ------------------
  |  Branch (749:11): [True: 22.6k, False: 75.3k]
  ------------------
  750|  22.6k|        if (pstr_core_coder->common_window) {
  ------------------
  |  Branch (750:13): [True: 21.5k, False: 1.12k]
  ------------------
  751|  21.5k|          pstr_core_coder->common_tns = ixheaacd_read_bits_buf(it_bit_buff, 1);
  752|       |
  753|  21.5k|        } else {
  754|  1.12k|          pstr_core_coder->common_tns = 0;
  755|  1.12k|        }
  756|       |
  757|  22.6k|        pstr_core_coder->tns_on_lr = ixheaacd_read_bits_buf(it_bit_buff, 1);
  758|       |
  759|  22.6k|        if (pstr_core_coder->common_tns) {
  ------------------
  |  Branch (759:13): [True: 5.29k, False: 17.3k]
  ------------------
  760|  5.29k|          ixheaacd_read_tns_u(usac_data->pstr_sfb_info[0], &usac_data->pstr_tns[left][0],
  761|  5.29k|                              it_bit_buff);
  762|  5.29k|          memcpy(&usac_data->pstr_tns[right][0], &usac_data->pstr_tns[left][0],
  763|  5.29k|                 sizeof(ia_tns_frame_info_struct));
  764|       |
  765|  5.29k|          pstr_core_coder->tns_data_present[0] = 2;
  766|  5.29k|          pstr_core_coder->tns_data_present[1] = 2;
  767|  17.3k|        } else {
  768|  17.3k|          pstr_core_coder->tns_present_both = ixheaacd_read_bits_buf(it_bit_buff, 1);
  769|       |
  770|  17.3k|          if (pstr_core_coder->tns_present_both) {
  ------------------
  |  Branch (770:15): [True: 11.1k, False: 6.18k]
  ------------------
  771|  11.1k|            pstr_core_coder->tns_data_present[0] = 1;
  772|  11.1k|            pstr_core_coder->tns_data_present[1] = 1;
  773|  11.1k|          } else {
  774|  6.18k|            pstr_core_coder->tns_data_present[1] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  775|  6.18k|            pstr_core_coder->tns_data_present[0] = 1 - pstr_core_coder->tns_data_present[1];
  776|  6.18k|          }
  777|  17.3k|        }
  778|  75.3k|      } else {
  779|  75.3k|        pstr_core_coder->common_tns = 0;
  780|  75.3k|        pstr_core_coder->tns_data_present[0] = 0;
  781|  75.3k|        pstr_core_coder->tns_data_present[1] = 0;
  782|  75.3k|      }
  783|       |
  784|   180k|    } else {
  785|   180k|      pstr_core_coder->common_window = 0;
  786|   180k|      pstr_core_coder->common_tw = 0;
  787|   180k|      left = chan_offset;
  788|   180k|      right = chan_offset;
  789|   180k|      if (nr_core_coder_channels == 2) right = chan_offset + 1;
  ------------------
  |  Branch (789:11): [True: 43.3k, False: 137k]
  ------------------
  790|   180k|    }
  791|       |
  792|   697k|    for (ch = 0, chn = chan_offset; ch < nr_core_coder_channels; ch++, chn++) {
  ------------------
  |  Branch (792:37): [True: 419k, False: 278k]
  ------------------
  793|   419k|      if (pstr_core_coder->core_mode[chn] == CORE_MODE_LPD &&
  ------------------
  |  |   98|   839k|#define CORE_MODE_LPD 1
  ------------------
  |  Branch (793:11): [True: 75.2k, False: 344k]
  ------------------
  794|  75.2k|          usac_data->td_frame_prev[chn] == CORE_MODE_FD && usac_data->ec_flag) {
  ------------------
  |  |   97|   494k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (794:11): [True: 16.2k, False: 59.0k]
  |  Branch (794:60): [True: 0, False: 16.2k]
  ------------------
  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|   419k|      if (pstr_core_coder->core_mode[ch] == 1) {
  ------------------
  |  Branch (813:11): [True: 98.3k, False: 321k]
  ------------------
  814|  98.3k|        err_code = ixheaacd_tw_buff_update(usac_data, chn, usac_data->str_tddec[chn]);
  815|  98.3k|        if (err_code == -1) return err_code;
  ------------------
  |  Branch (815:13): [True: 0, False: 98.3k]
  ------------------
  816|       |
  817|  98.3k|        if (!usac_data->td_frame_prev[chn]) {
  ------------------
  |  Branch (817:13): [True: 21.3k, False: 77.0k]
  ------------------
  818|  21.3k|          ixheaacd_fix2flt_data(usac_data, usac_data->str_tddec[chn], chn);
  819|  21.3k|        }
  820|       |
  821|  93.2M|        for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (821:21): [True: 93.1M, False: 98.3k]
  ------------------
  822|  93.1M|          usac_data->time_sample_vector[chn][k] = (FLOAT32)(
  823|  93.1M|              (FLOAT32)usac_data->output_data_ptr[chn][k] * (FLOAT32)(ONE_BY_TWO_POW_15));
  ------------------
  |  |  146|  93.1M|#define ONE_BY_TWO_POW_15 0.000030517578125
  ------------------
  824|  93.1M|        }
  825|  98.3k|        usac_data->present_chan = chn;
  826|  98.3k|        err_code = ixheaacd_lpd_channel_stream(usac_data, &td_frame, it_bit_buff,
  827|  98.3k|                                               usac_data->time_sample_vector[chn]);
  828|  98.3k|        if (err_code == -1) return err_code;
  ------------------
  |  Branch (828:13): [True: 37, False: 98.3k]
  ------------------
  829|  98.3k|        if (usac_data->ec_flag) {
  ------------------
  |  Branch (829:13): [True: 0, False: 98.3k]
  ------------------
  830|      0|          it_bit_buff->xaac_jmp_buf = &local;
  831|      0|        }
  832|  98.3k|        if (usac_data->ec_flag && usac_data->frame_ok) {
  ------------------
  |  Branch (832:13): [True: 0, False: 98.3k]
  |  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|  92.2M|        for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (836:21): [True: 92.1M, False: 98.3k]
  ------------------
  837|  92.1M|          usac_data->output_data_ptr[chn][k] =
  838|  92.1M|              (WORD32)(usac_data->time_sample_vector[chn][k] * (FLOAT32)((WORD64)1 << 15));
  839|  92.1M|        }
  840|       |
  841|  98.3k|        usac_data->window_shape[chn] = WIN_SEL_0;
  ------------------
  |  |   91|  98.3k|#define WIN_SEL_0 0
  ------------------
  842|       |
  843|  98.3k|        ixheaacd_td_frm_dec(usac_data, chn, td_frame.mod[0]);
  844|       |
  845|  98.3k|        usac_data->window_shape_prev[chn] = usac_data->window_shape[chn];
  846|  98.3k|        usac_data->window_sequence_last[chn] = EIGHT_SHORT_SEQUENCE;
  ------------------
  |  |  102|  98.3k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  847|       |
  848|   321k|      } else {
  849|   321k|        memset(usac_data->coef_fix[chn], 0, LN2 * sizeof(*usac_data->coef_fix[0]));
  850|       |
  851|   321k|        if (usac_data->str_tddec[chn] && usac_data->td_frame_prev[chn]) {
  ------------------
  |  Branch (851:13): [True: 321k, False: 0]
  |  Branch (851:42): [True: 18.1k, False: 303k]
  ------------------
  852|  18.1k|          if (usac_data->ec_flag) {
  ------------------
  |  Branch (852:15): [True: 0, False: 18.1k]
  ------------------
  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|  18.1k|          ixheaacd_lpd_dec_update(usac_data->str_tddec[chn], usac_data, chn);
  857|  18.1k|        }
  858|       |
  859|   321k|        if (id != ID_USAC_LFE) {
  ------------------
  |  |   29|   321k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (859:13): [True: 319k, False: 2.02k]
  ------------------
  860|   319k|          if ((nr_core_coder_channels == 1) ||
  ------------------
  |  Branch (860:15): [True: 103k, False: 215k]
  ------------------
  861|   215k|              (pstr_core_coder->core_mode[0] != pstr_core_coder->core_mode[1]))
  ------------------
  |  Branch (861:15): [True: 19.9k, False: 195k]
  ------------------
  862|   123k|            pstr_core_coder->tns_data_present[ch] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  863|   319k|        }
  864|       |
  865|   321k|        err_code = ixheaacd_fd_channel_stream(
  866|   321k|            usac_data, pstr_core_coder, &pstr_core_coder->max_sfb[ch],
  867|   321k|            usac_data->window_sequence_last[chn], chn, usac_data->noise_filling_config[elem_idx],
  868|   321k|            ch, it_bit_buff);
  869|   321k|        if (err_code == -1) return err_code;
  ------------------
  |  Branch (869:13): [True: 416, False: 320k]
  ------------------
  870|   321k|      }
  871|   419k|    }
  872|       |
  873|   278k|    if (pstr_core_coder->core_mode[0] == CORE_MODE_FD &&
  ------------------
  |  |   97|   556k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (873:9): [True: 219k, False: 59.3k]
  ------------------
  874|   219k|        pstr_core_coder->core_mode[1] == CORE_MODE_FD && nr_core_coder_channels == 2) {
  ------------------
  |  |   97|   497k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (874:9): [True: 202k, False: 17.0k]
  |  Branch (874:58): [True: 97.1k, False: 104k]
  ------------------
  875|  97.1k|      ixheaacd_cplx_prev_mdct_dmx(usac_data->pstr_sfb_info[left], usac_data->coef_save[left],
  876|  97.1k|                                  usac_data->coef_save[right], usac_data->dmx_re_prev,
  877|  97.1k|                                  pstr_core_coder->pred_dir);
  878|  97.1k|    }
  879|       |
  880|   278k|    if (pstr_core_coder->tns_on_lr == 0 && (id != ID_USAC_LFE)) {
  ------------------
  |  |   29|   260k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (880:9): [True: 260k, False: 18.1k]
  |  Branch (880:44): [True: 258k, False: 1.96k]
  ------------------
  881|   640k|      for (ch = 0, chn = left; chn <= right; ch++, chn++) {
  ------------------
  |  Branch (881:32): [True: 382k, False: 258k]
  ------------------
  882|   382k|        if (pstr_core_coder->core_mode[ch] == CORE_MODE_FD) {
  ------------------
  |  |   97|   382k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (882:13): [True: 285k, False: 96.9k]
  ------------------
  883|   285k|          err_code = ixheaacd_tns_apply(usac_data, usac_data->coef_fix[chn],
  884|   285k|                                        pstr_core_coder->max_sfb[ch],
  885|   285k|                                        usac_data->pstr_sfb_info[chn], usac_data->pstr_tns[chn]);
  886|   285k|          if (err_code) return err_code;
  ------------------
  |  Branch (886:15): [True: 0, False: 285k]
  ------------------
  887|   285k|        }
  888|   382k|      }
  889|   258k|    }
  890|       |
  891|   278k|    if (nr_core_coder_channels == 2 && pstr_core_coder->core_mode[0] == 0 &&
  ------------------
  |  Branch (891:9): [True: 139k, False: 138k]
  |  Branch (891:40): [True: 114k, False: 25.6k]
  ------------------
  892|   114k|        pstr_core_coder->core_mode[1] == 0) {
  ------------------
  |  Branch (892:9): [True: 97.1k, False: 17.0k]
  ------------------
  893|  97.1k|      if (pstr_core_coder->ms_mask_present[0] == 3) {
  ------------------
  |  Branch (893:11): [True: 18.7k, False: 78.3k]
  ------------------
  894|  18.7k|        ixheaacd_cplx_pred_upmixing(usac_data, usac_data->coef_fix[left],
  895|  18.7k|                                    usac_data->coef_fix[right], pstr_core_coder, left);
  896|       |
  897|  78.3k|      } else if (pstr_core_coder->ms_mask_present[0] > 0) {
  ------------------
  |  Branch (897:18): [True: 13.0k, False: 65.3k]
  ------------------
  898|  13.0k|        ixheaacd_ms_stereo(usac_data, usac_data->coef_fix[right], usac_data->coef_fix[left], left,
  899|  13.0k|                           pstr_core_coder->max_sfb[right] > pstr_core_coder->max_sfb[left]
  ------------------
  |  Branch (899:28): [True: 137, False: 12.8k]
  ------------------
  900|  13.0k|                               ? pstr_core_coder->max_sfb[right]
  901|  13.0k|                               : pstr_core_coder->max_sfb[left]);
  902|  13.0k|      }
  903|       |
  904|  97.1k|      if (pstr_core_coder->tns_on_lr) {
  ------------------
  |  Branch (904:11): [True: 15.8k, False: 81.2k]
  ------------------
  905|  47.6k|        for (ch = 0, chn = left; chn <= right; ch++, chn++) {
  ------------------
  |  Branch (905:34): [True: 31.7k, False: 15.8k]
  ------------------
  906|  31.7k|          if (pstr_core_coder->core_mode[ch] == CORE_MODE_FD) {
  ------------------
  |  |   97|  31.7k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (906:15): [True: 31.7k, False: 0]
  ------------------
  907|  31.7k|            err_code = ixheaacd_tns_apply(
  908|  31.7k|                usac_data, usac_data->coef_fix[chn], pstr_core_coder->max_sfb[ch],
  909|  31.7k|                usac_data->pstr_sfb_info[chn], usac_data->pstr_tns[chn]);
  910|  31.7k|            if (err_code) return err_code;
  ------------------
  |  Branch (910:17): [True: 0, False: 31.7k]
  ------------------
  911|  31.7k|          }
  912|  31.7k|        }
  913|  15.8k|      }
  914|       |
  915|  97.1k|      ixheaacd_usac_cplx_save_prev(usac_data->pstr_sfb_info[left], usac_data->coef_fix[left],
  916|  97.1k|                                   usac_data->coef_fix[right], usac_data->coef_save[left],
  917|  97.1k|                                   usac_data->coef_save[right]);
  918|  97.1k|    }
  919|   278k|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (919:9): [True: 0, False: 278k]
  ------------------
  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|   278k|  } 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|   694k|  for (ch = left; ch <= right; ch++) {
  ------------------
  |  Branch (977:19): [True: 415k, False: 278k]
  ------------------
  978|   415k|    FLOAT32 *ptr_scratch =
  979|   415k|        (FLOAT32 *)usac_data->str_error_concealment[ch].str_ec_scratch.spec_coeff;
  980|   415k|    if ((pstr_core_coder->core_mode[ch] != CORE_MODE_LPD &&
  ------------------
  |  |   98|   831k|#define CORE_MODE_LPD 1
  ------------------
  |  Branch (980:10): [True: 341k, False: 74.0k]
  ------------------
  981|   341k|         usac_data->td_frame_prev[ch] != CORE_MODE_LPD && usac_data->ec_flag) ||
  ------------------
  |  |   98|   757k|#define CORE_MODE_LPD 1
  ------------------
  |  Branch (981:10): [True: 306k, False: 35.7k]
  |  Branch (981:59): [True: 0, False: 306k]
  ------------------
  982|   415k|        (pstr_core_coder->core_mode[ch] == CORE_MODE_FD && usac_data->ec_flag == 0)) {
  ------------------
  |  |   97|   831k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (982:10): [True: 341k, False: 74.0k]
  |  Branch (982:60): [True: 341k, False: 0]
  ------------------
  983|   341k|      if (usac_data->tw_mdct[elem_idx]) {
  ------------------
  |  Branch (983:11): [True: 0, False: 341k]
  ------------------
  984|      0|        err_code = -1;
  985|      0|        return err_code;
  986|       |
  987|   341k|      } else {
  988|   341k|        if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (988:13): [True: 0, False: 341k]
  ------------------
  989|      0|          usac_data->fac_data_present[ch] = 0;
  990|      0|        }
  991|   341k|        err_code = ixheaacd_fd_frm_dec(usac_data, ch);
  992|   341k|        if (err_code == -1) return err_code;
  ------------------
  |  Branch (992:13): [True: 162, False: 341k]
  ------------------
  993|   341k|        if (usac_data->ec_flag) {
  ------------------
  |  Branch (993:13): [True: 0, False: 341k]
  ------------------
  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|   341k|        } else {
 1006|   343M|          for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (1006:23): [True: 343M, False: 341k]
  ------------------
 1007|   343M|            usac_data->time_sample_vector[ch][k] =
 1008|   343M|                (FLOAT32)((FLOAT32)usac_data->output_data_ptr[ch][k] *
 1009|   343M|                          (FLOAT32)(ONE_BY_TWO_POW_15));
  ------------------
  |  |  146|   343M|#define ONE_BY_TWO_POW_15 0.000030517578125
  ------------------
 1010|   343M|          }
 1011|   341k|        }
 1012|   341k|      }
 1013|   341k|      usac_data->window_shape_prev[ch] = usac_data->window_shape[ch];
 1014|   341k|      usac_data->window_sequence_last[ch] = usac_data->window_sequence[ch];
 1015|   341k|    } else {
 1016|  74.0k|      if (usac_data->ec_flag) {
  ------------------
  |  Branch (1016:11): [True: 0, False: 74.0k]
  ------------------
 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|  74.0k|      } else {
 1041|  69.1M|        for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (1041:21): [True: 69.0M, False: 74.0k]
  ------------------
 1042|  69.0M|          usac_data->time_sample_vector[ch][k] =
 1043|  69.0M|              (FLOAT32)((FLOAT32)usac_data->output_data_ptr[ch][k] *
 1044|  69.0M|                        (FLOAT32)(ONE_BY_TWO_POW_15));
  ------------------
  |  |  146|  69.0M|#define ONE_BY_TWO_POW_15 0.000030517578125
  ------------------
 1045|  69.0M|        }
 1046|  74.0k|      }
 1047|  74.0k|    }
 1048|   415k|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (1048:9): [True: 0, False: 415k]
  ------------------
 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|   415k|  }
 1057|   278k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (1057:7): [True: 0, False: 278k]
  ------------------
 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|   278k|  } else {
 1064|   693k|    for (ch = 0, chn = left; chn <= right; chn++, ch++)
  ------------------
  |  Branch (1064:30): [True: 415k, False: 278k]
  ------------------
 1065|   415k|      usac_data->td_frame_prev[chn] = pstr_core_coder->core_mode[ch];
 1066|   278k|  }
 1067|       |
 1068|   278k|  return 0;
 1069|   278k|}
ixheaacd_ext_ch_ele.c:ixheaacd_read_ms_mask:
  271|  41.6k|    ia_bit_buf_struct *it_bit_buff, WORD32 chn) {
  272|  41.6k|  WORD32 g, sfb;
  273|  41.6k|  WORD32 ms_mask_present;
  274|       |
  275|  41.6k|  UWORD8 *sfb_group = usac_data->group_dis[chn];
  276|  41.6k|  UWORD8 max_sfb = pstr_core_coder->max_sfb_ste;
  277|  41.6k|  UWORD8 *ms_used = usac_data->ms_used[chn];
  278|  41.6k|  ia_sfb_info_struct *info = usac_data->pstr_sfb_info[chn];
  279|       |
  280|  41.6k|  ms_mask_present = ixheaacd_read_bits_buf(it_bit_buff, 2);
  281|       |
  282|  41.6k|  switch (ms_mask_present) {
  ------------------
  |  Branch (282:11): [True: 41.6k, False: 1]
  ------------------
  283|  9.47k|    case 0:
  ------------------
  |  Branch (283:5): [True: 9.47k, False: 32.2k]
  ------------------
  284|       |
  285|  9.47k|      break;
  286|       |
  287|    428|    case 1:
  ------------------
  |  Branch (287:5): [True: 428, False: 41.2k]
  ------------------
  288|  2.23k|      for (g = 0; g < info->max_win_len; g = *sfb_group++) {
  ------------------
  |  Branch (288:19): [True: 1.80k, False: 428]
  ------------------
  289|  18.0k|        for (sfb = 0; sfb < max_sfb; sfb++) {
  ------------------
  |  Branch (289:23): [True: 16.2k, False: 1.80k]
  ------------------
  290|  16.2k|          *ms_used = ixheaacd_read_bits_buf(it_bit_buff, 1);
  291|  16.2k|          ms_used++;
  292|  16.2k|        }
  293|  14.3k|        for (; sfb < info->sfb_per_sbk; sfb++) {
  ------------------
  |  Branch (293:16): [True: 12.5k, False: 1.80k]
  ------------------
  294|  12.5k|          *ms_used = 0;
  295|  12.5k|          ms_used++;
  296|  12.5k|        }
  297|  1.80k|      }
  298|       |
  299|    428|      break;
  300|  12.6k|    case 2:
  ------------------
  |  Branch (300:5): [True: 12.6k, False: 29.0k]
  ------------------
  301|  26.6k|      for (g = 0; g < info->max_win_len; g = *sfb_group++)
  ------------------
  |  Branch (301:19): [True: 13.9k, False: 12.6k]
  ------------------
  302|   554k|        for (sfb = 0; sfb < info->sfb_per_sbk; sfb++) *ms_used++ = 1;
  ------------------
  |  Branch (302:23): [True: 540k, False: 13.9k]
  ------------------
  303|  12.6k|      break;
  304|       |
  305|  19.1k|    case 3:
  ------------------
  |  Branch (305:5): [True: 19.1k, False: 22.5k]
  ------------------
  306|       |
  307|  19.1k|      ixheaacd_cplx_pred_data(usac_data, pstr_core_coder, info->num_groups,
  308|  19.1k|                              it_bit_buff);
  309|  19.1k|      return 3;
  310|  41.6k|  }
  311|       |
  312|  3.09M|  for (sfb = 0; sfb < SFB_NUM_MAX; sfb++) {
  ------------------
  |  |  114|  3.09M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  3.09M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  3.09M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (312:17): [True: 3.06M, False: 22.5k]
  ------------------
  313|  3.06M|    usac_data->alpha_q_re_prev[sfb] = 0;
  314|  3.06M|    usac_data->alpha_q_im_prev[sfb] = 0;
  315|  3.06M|  }
  316|  22.5k|  return ms_mask_present;
  317|  41.6k|}
ixheaacd_ext_ch_ele.c:ixheaacd_cplx_pred_data:
  164|  19.1k|    ia_bit_buf_struct *it_bit_buff) {
  165|  19.1k|  ia_huff_code_book_struct *ptr_huff_code_book = &ixheaacd_book;
  166|  19.1k|  const ia_huff_code_word_struct *ptr_huff_code_word =
  167|  19.1k|      ptr_huff_code_book->pstr_huff_code_word;
  168|  19.1k|  WORD32 cplx_pred_all;
  169|  19.1k|  WORD32 delta_code_time;
  170|  19.1k|  WORD32 g, sfb;
  171|  19.1k|  WORD32 dpcm_alpha, last_alpha_q_re, last_alpha_q_im;
  172|  19.1k|  UWORD8 max_sfb_ste = pstr_core_coder->max_sfb_ste;
  173|       |
  174|  19.1k|  WORD32(*alpha_q_re)[SFB_NUM_MAX] = usac_data->alpha_q_re;
  175|  19.1k|  WORD32(*alpha_q_im)[SFB_NUM_MAX] = usac_data->alpha_q_im;
  176|  19.1k|  WORD32 *alpha_q_re_prev = usac_data->alpha_q_re_prev;
  177|  19.1k|  WORD32 *alpha_q_im_prev = usac_data->alpha_q_im_prev;
  178|  19.1k|  UWORD8(*cplx_pred_used)[SFB_NUM_MAX] = usac_data->cplx_pred_used;
  179|       |
  180|  19.1k|  cplx_pred_all = ixheaacd_read_bits_buf(it_bit_buff, 1);
  181|       |
  182|  19.1k|  if (cplx_pred_all == 0) {
  ------------------
  |  Branch (182:7): [True: 6.58k, False: 12.5k]
  ------------------
  183|  39.1k|    for (g = 0; g < num_window_groups; g++) {
  ------------------
  |  Branch (183:17): [True: 32.5k, False: 6.58k]
  ------------------
  184|   111k|      for (sfb = 0; sfb < max_sfb_ste; sfb += SFB_PER_PRED_BAND) {
  ------------------
  |  |  120|  78.8k|#define SFB_PER_PRED_BAND 2
  ------------------
  |  Branch (184:21): [True: 78.8k, False: 32.5k]
  ------------------
  185|  78.8k|        cplx_pred_used[g][sfb] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  186|       |
  187|  78.8k|        if (sfb + 1 < max_sfb_ste)
  ------------------
  |  Branch (187:13): [True: 47.2k, False: 31.6k]
  ------------------
  188|  47.2k|          cplx_pred_used[g][sfb + 1] = cplx_pred_used[g][sfb];
  189|  78.8k|      }
  190|  4.33M|      for (sfb = max_sfb_ste; sfb < SFB_NUM_MAX; sfb++)
  ------------------
  |  |  114|  4.33M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  4.33M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  4.33M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (190:31): [True: 4.29M, False: 32.5k]
  ------------------
  191|  4.29M|        cplx_pred_used[g][sfb] = 0;
  192|  32.5k|    }
  193|  12.5k|  } else {
  194|  39.0k|    for (g = 0; g < num_window_groups; g++) {
  ------------------
  |  Branch (194:17): [True: 26.4k, False: 12.5k]
  ------------------
  195|   244k|      for (sfb = 0; sfb < max_sfb_ste; sfb++) cplx_pred_used[g][sfb] = 1;
  ------------------
  |  Branch (195:21): [True: 218k, False: 26.4k]
  ------------------
  196|       |
  197|  3.40M|      for (sfb = max_sfb_ste; sfb < SFB_NUM_MAX; sfb++)
  ------------------
  |  |  114|  3.40M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  3.40M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  3.40M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (197:31): [True: 3.38M, False: 26.4k]
  ------------------
  198|  3.38M|        cplx_pred_used[g][sfb] = 0;
  199|  26.4k|    }
  200|  12.5k|  }
  201|       |
  202|  19.1k|  pstr_core_coder->pred_dir = ixheaacd_read_bits_buf(it_bit_buff, 1);
  203|       |
  204|  19.1k|  pstr_core_coder->complex_coef = ixheaacd_read_bits_buf(it_bit_buff, 1);
  205|       |
  206|  19.1k|  if (pstr_core_coder->complex_coef) {
  ------------------
  |  Branch (206:7): [True: 11.9k, False: 7.19k]
  ------------------
  207|  11.9k|    if (usac_data->usac_independency_flg)
  ------------------
  |  Branch (207:9): [True: 11.5k, False: 335]
  ------------------
  208|  11.5k|      pstr_core_coder->use_prev_frame = 0;
  209|    335|    else
  210|    335|      pstr_core_coder->use_prev_frame = ixheaacd_read_bits_buf(it_bit_buff, 1);
  211|  11.9k|  }
  212|       |
  213|  19.1k|  if (usac_data->usac_independency_flg)
  ------------------
  |  Branch (213:7): [True: 15.1k, False: 3.94k]
  ------------------
  214|  15.1k|    delta_code_time = 0;
  215|  3.94k|  else
  216|  3.94k|    delta_code_time = ixheaacd_read_bits_buf(it_bit_buff, 1);
  217|       |
  218|  78.1k|  for (g = 0; g < num_window_groups; g++) {
  ------------------
  |  Branch (218:15): [True: 59.0k, False: 19.1k]
  ------------------
  219|   259k|    for (sfb = 0; sfb < max_sfb_ste; sfb += SFB_PER_PRED_BAND) {
  ------------------
  |  |  120|   200k|#define SFB_PER_PRED_BAND 2
  ------------------
  |  Branch (219:19): [True: 200k, False: 59.0k]
  ------------------
  220|   200k|      if (delta_code_time == 1) {
  ------------------
  |  Branch (220:11): [True: 1.45k, False: 198k]
  ------------------
  221|  1.45k|        last_alpha_q_re = alpha_q_re_prev[sfb];
  222|  1.45k|        last_alpha_q_im = alpha_q_im_prev[sfb];
  223|   198k|      } else {
  224|   198k|        if (sfb > 0) {
  ------------------
  |  Branch (224:13): [True: 140k, False: 58.3k]
  ------------------
  225|   140k|          last_alpha_q_re = alpha_q_re[g][sfb - 1];
  226|   140k|          last_alpha_q_im = alpha_q_im[g][sfb - 1];
  227|   140k|        } else {
  228|  58.3k|          last_alpha_q_re = last_alpha_q_im = 0;
  229|  58.3k|        }
  230|   198k|      }
  231|       |
  232|   200k|      if (cplx_pred_used[g][sfb] == 1) {
  ------------------
  |  Branch (232:11): [True: 162k, False: 37.7k]
  ------------------
  233|   162k|        dpcm_alpha =
  234|   162k|            -ixheaacd_huff_codeword(ptr_huff_code_word, 0, it_bit_buff) + 60;
  235|   162k|        alpha_q_re[g][sfb] = dpcm_alpha + last_alpha_q_re;
  236|       |
  237|   162k|        if (pstr_core_coder->complex_coef) {
  ------------------
  |  Branch (237:13): [True: 105k, False: 56.4k]
  ------------------
  238|   105k|          dpcm_alpha =
  239|   105k|              -ixheaacd_huff_codeword(ptr_huff_code_word, 0, it_bit_buff) + 60;
  240|   105k|          alpha_q_im[g][sfb] = dpcm_alpha + last_alpha_q_im;
  241|   105k|        } else {
  242|  56.4k|          alpha_q_im[g][sfb] = 0;
  243|  56.4k|        }
  244|   162k|      } else {
  245|  37.7k|        alpha_q_re[g][sfb] = 0;
  246|  37.7k|        alpha_q_im[g][sfb] = 0;
  247|  37.7k|      }
  248|       |
  249|   200k|      if ((sfb + 1) < max_sfb_ste) {
  ------------------
  |  Branch (249:11): [True: 144k, False: 55.9k]
  ------------------
  250|   144k|        alpha_q_re[g][sfb + 1] = alpha_q_re[g][sfb];
  251|   144k|        alpha_q_im[g][sfb + 1] = alpha_q_im[g][sfb];
  252|   144k|      }
  253|       |
  254|   200k|      alpha_q_re_prev[sfb] = alpha_q_re[g][sfb];
  255|   200k|      alpha_q_im_prev[sfb] = alpha_q_im[g][sfb];
  256|   200k|    }
  257|  7.73M|    for (sfb = max_sfb_ste; sfb < SFB_NUM_MAX; sfb++) {
  ------------------
  |  |  114|  7.73M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  7.73M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  7.73M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (257:29): [True: 7.68M, False: 59.0k]
  ------------------
  258|  7.68M|      alpha_q_re[g][sfb] = 0;
  259|  7.68M|      alpha_q_im[g][sfb] = 0;
  260|  7.68M|      alpha_q_re_prev[sfb] = 0;
  261|  7.68M|      alpha_q_im_prev[sfb] = 0;
  262|  7.68M|    }
  263|  59.0k|  }
  264|       |
  265|  19.1k|  return;
  266|  19.1k|}
ixheaacd_ext_ch_ele.c:ixheaacd_cplx_prev_mdct_dmx:
  582|  97.1k|                                        WORD32 *dmx_re_prev, WORD32 pred_dir) {
  583|  97.1k|  WORD32 offs, i;
  584|  97.1k|  WORD32 factor = 1;
  585|  97.1k|  if (pred_dir) factor = -1;
  ------------------
  |  Branch (585:7): [True: 17.9k, False: 79.2k]
  ------------------
  586|       |
  587|  97.1k|  offs = pstr_sfb_info->samp_per_bk - pstr_sfb_info->bins_per_sbk;
  588|       |
  589|  69.0M|  for (i = 0; i < pstr_sfb_info->bins_per_sbk; i++)
  ------------------
  |  Branch (589:15): [True: 68.9M, False: 97.1k]
  ------------------
  590|  68.9M|    dmx_re_prev[i] = (WORD32)(((WORD64)l_spec[i + offs] +
  591|  68.9M|                               ((WORD64)factor * (WORD64)r_spec[i + offs])) >>
  592|  68.9M|                              1);
  593|  97.1k|}
ixheaacd_ext_ch_ele.c:ixheaacd_cplx_pred_upmixing:
  480|  18.7k|    ia_usac_tmp_core_coder_struct *pstr_core_coder, WORD32 chn) {
  481|  18.7k|  ia_sfb_info_struct *pstr_sfb_info = usac_data->pstr_sfb_info[chn];
  482|  18.7k|  WORD32 *dmx_re = &usac_data->scratch_buffer[0];
  483|  18.7k|  WORD32 *dmx_im = &usac_data->x_ac_dec[0];
  484|       |
  485|  18.7k|  WORD32 grp, sfb, grp_len, i = 0, k;
  486|  18.7k|  WORD32 *dmx_re_prev = usac_data->dmx_re_prev;
  487|  18.7k|  WORD32(*alpha_q_re)[SFB_NUM_MAX] = usac_data->alpha_q_re;
  488|  18.7k|  WORD32(*alpha_q_im)[SFB_NUM_MAX] = usac_data->alpha_q_im;
  489|       |
  490|  18.7k|  UWORD8(*cplx_pred_used)[SFB_NUM_MAX] = usac_data->cplx_pred_used;
  491|       |
  492|  18.7k|  WORD32 alpha_q_re_temp;
  493|  18.7k|  WORD32 alpha_q_im_temp;
  494|  18.7k|  WORD32 factor = 1;
  495|       |
  496|  18.7k|  if (pstr_core_coder->pred_dir) factor = -1;
  ------------------
  |  Branch (496:7): [True: 17.9k, False: 893]
  ------------------
  497|       |
  498|  77.0k|  for (grp = 0; grp < pstr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (498:17): [True: 58.2k, False: 18.7k]
  ------------------
  499|   204k|    for (grp_len = 0; grp_len < pstr_sfb_info->group_len[grp]; grp_len++) {
  ------------------
  |  Branch (499:23): [True: 146k, False: 58.2k]
  ------------------
  500|  2.35M|      for (sfb = 0; sfb < pstr_sfb_info->sfb_per_sbk; sfb++) {
  ------------------
  |  Branch (500:21): [True: 2.20M, False: 146k]
  ------------------
  501|  2.20M|        if (cplx_pred_used[grp][sfb] == 1) {
  ------------------
  |  Branch (501:13): [True: 1.30M, False: 898k]
  ------------------
  502|  1.30M|          memcpy(&dmx_re[i], &l_spec[i],
  503|  1.30M|                 pstr_sfb_info->sfb_width[sfb] * sizeof(WORD32));
  504|  1.30M|          i += pstr_sfb_info->sfb_width[sfb];
  505|  1.30M|        }
  506|       |
  507|   898k|        else {
  508|  9.78M|          for (k = 0; k < pstr_sfb_info->sfb_width[sfb]; k++, i++) {
  ------------------
  |  Branch (508:23): [True: 8.88M, False: 898k]
  ------------------
  509|  8.88M|            dmx_re[i] = (WORD32)(
  510|  8.88M|                ((WORD64)l_spec[i] + ((WORD64)factor * (WORD64)r_spec[i])) >>
  511|  8.88M|                1);
  512|  8.88M|          }
  513|   898k|        }
  514|  2.20M|      }
  515|   146k|    }
  516|  58.2k|  }
  517|       |
  518|  18.7k|  memset(dmx_im, 0, sizeof(WORD32) * BLOCK_LEN_LONG);
  ------------------
  |  |   68|  18.7k|#define BLOCK_LEN_LONG 1024
  ------------------
  519|       |
  520|  18.7k|  if (pstr_core_coder->complex_coef) {
  ------------------
  |  Branch (520:7): [True: 11.6k, False: 7.13k]
  ------------------
  521|  11.6k|    WORD32 *p_dmx_re_prev =
  522|  11.6k|        pstr_core_coder->use_prev_frame ? dmx_re_prev : NULL;
  ------------------
  |  Branch (522:9): [True: 233, False: 11.4k]
  ------------------
  523|  11.6k|    ixheaacd_estimate_dmx_im(dmx_re, p_dmx_re_prev, dmx_im, pstr_sfb_info,
  524|  11.6k|                             usac_data->window_sequence[chn],
  525|  11.6k|                             usac_data->window_shape[chn],
  526|  11.6k|                             usac_data->window_shape_prev[chn]);
  527|       |
  528|  32.6k|    for (grp = 0, i = 0; grp < pstr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (528:26): [True: 21.0k, False: 11.6k]
  ------------------
  529|   111k|      for (grp_len = 0; grp_len < pstr_sfb_info->group_len[grp]; grp_len++) {
  ------------------
  |  Branch (529:25): [True: 90.2k, False: 21.0k]
  ------------------
  530|  1.45M|        for (sfb = 0; sfb < pstr_sfb_info->sfb_per_sbk; sfb++) {
  ------------------
  |  Branch (530:23): [True: 1.36M, False: 90.2k]
  ------------------
  531|  1.36M|          alpha_q_re_temp = ixheaac_sat64_32(ixheaac_mult32x32in64(alpha_q_re[grp][sfb], 1677722));
  532|  1.36M|          alpha_q_im_temp = ixheaac_sat64_32(ixheaac_mult32x32in64(alpha_q_im[grp][sfb], 1677722));
  533|  1.36M|          if (cplx_pred_used[grp][sfb]) {
  ------------------
  |  Branch (533:15): [True: 1.12M, False: 237k]
  ------------------
  534|  10.4M|            for (k = 0; k < pstr_sfb_info->sfb_width[sfb]; k++, i++) {
  ------------------
  |  Branch (534:25): [True: 9.31M, False: 1.12M]
  ------------------
  535|  9.31M|              WORD32 mid_side = ixheaac_sub32_sat(
  536|  9.31M|                  ixheaac_sub32_sat(r_spec[i],
  537|  9.31M|                                     (WORD32)((WORD64)ixheaac_mult32x32in64(
  538|  9.31M|                                                  alpha_q_re_temp, l_spec[i]) >>
  539|  9.31M|                                              24)),
  540|  9.31M|                  (WORD32)((WORD64)ixheaac_mult32x32in64(alpha_q_im_temp,
  541|  9.31M|                                                          dmx_im[i]) >>
  542|  9.31M|                           24));
  543|  9.31M|              r_spec[i] = ixheaac_sat64_32((WORD64)factor) *
  544|  9.31M|                          (WORD64)(ixheaac_sub32_sat(l_spec[i], mid_side));
  545|  9.31M|              l_spec[i] = ixheaac_add32_sat(l_spec[i], mid_side);
  546|  9.31M|            }
  547|  1.12M|          } else {
  548|   237k|            i += pstr_sfb_info->sfb_width[sfb];
  549|   237k|          }
  550|  1.36M|        }
  551|  90.2k|      }
  552|  21.0k|    }
  553|  11.6k|  } else {
  554|  44.3k|    for (grp = 0, i = 0; grp < pstr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (554:26): [True: 37.2k, False: 7.13k]
  ------------------
  555|  93.3k|      for (grp_len = 0; grp_len < pstr_sfb_info->group_len[grp]; grp_len++) {
  ------------------
  |  Branch (555:25): [True: 56.0k, False: 37.2k]
  ------------------
  556|   899k|        for (sfb = 0; sfb < pstr_sfb_info->sfb_per_sbk; sfb++) {
  ------------------
  |  Branch (556:23): [True: 843k, False: 56.0k]
  ------------------
  557|   843k|          alpha_q_re_temp = ixheaac_sat64_32(ixheaac_mult32x32in64(alpha_q_re[grp][sfb], 1677722));
  558|   843k|          if (cplx_pred_used[grp][sfb]) {
  ------------------
  |  Branch (558:15): [True: 182k, False: 661k]
  ------------------
  559|  1.22M|            for (k = 0; k < pstr_sfb_info->sfb_width[sfb]; k++, i++) {
  ------------------
  |  Branch (559:25): [True: 1.04M, False: 182k]
  ------------------
  560|  1.04M|              WORD32 mid_side = ixheaac_sub32_sat(
  561|  1.04M|                  r_spec[i], (WORD32)((WORD64)ixheaac_mult32x32in64(
  562|  1.04M|                                          alpha_q_re_temp, l_spec[i]) >>
  563|  1.04M|                                      24));
  564|       |
  565|  1.04M|              r_spec[i] = ixheaac_sat64_32((WORD64)factor) *
  566|  1.04M|                          (WORD64)(ixheaac_sub32_sat(l_spec[i], mid_side));
  567|  1.04M|              l_spec[i] = ixheaac_add32_sat(l_spec[i], mid_side);
  568|  1.04M|            }
  569|   661k|          } else {
  570|   661k|            i += pstr_sfb_info->sfb_width[sfb];
  571|   661k|          }
  572|   843k|        }
  573|  56.0k|      }
  574|  37.2k|    }
  575|  7.13k|  }
  576|       |
  577|  18.7k|  return;
  578|  18.7k|}
ixheaacd_ext_ch_ele.c:ixheaacd_estimate_dmx_im:
  429|  11.6k|                                     const WORD32 prev_w_shape) {
  430|  11.6k|  WORD32 i;
  431|  11.6k|  const WORD16 *mdst_fcoeff_curr, *mdst_fcoeff_prev;
  432|       |
  433|  11.6k|  switch (window) {
  434|     66|    case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|     66|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (434:5): [True: 66, False: 11.5k]
  ------------------
  435|  11.2k|    case EIGHT_SHORT_SEQUENCE:
  ------------------
  |  |  102|  11.2k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (435:5): [True: 11.2k, False: 443]
  ------------------
  436|  11.2k|      mdst_fcoeff_curr =
  437|  11.2k|          ixheaacd_mdst_fcoeff_longshort_curr[prev_w_shape][w_shape];
  438|  11.2k|      mdst_fcoeff_prev = ixheaacd_mdst_fcoeff_l_s_start_left_prev[prev_w_shape];
  439|  11.2k|      break;
  440|     30|    case LONG_START_SEQUENCE:
  ------------------
  |  |  101|     30|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (440:5): [True: 30, False: 11.6k]
  ------------------
  441|     30|      mdst_fcoeff_curr = ixheaacd_mdst_fcoeff_start_curr[prev_w_shape][w_shape];
  442|     30|      mdst_fcoeff_prev = ixheaacd_mdst_fcoeff_l_s_start_left_prev[prev_w_shape];
  443|     30|      break;
  444|     44|    case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|     44|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (444:5): [True: 44, False: 11.6k]
  ------------------
  445|     44|      mdst_fcoeff_curr = ixheaacd_mdst_fcoeff_stop_cur[prev_w_shape][w_shape];
  446|     44|      mdst_fcoeff_prev =
  447|     44|          ixheaacd_mdst_fcoeff_stop_stopstart_left_prev[prev_w_shape];
  448|     44|      break;
  449|    303|    case STOP_START_SEQUENCE:
  ------------------
  |  |  104|    303|#define STOP_START_SEQUENCE 4
  ------------------
  |  Branch (449:5): [True: 303, False: 11.3k]
  ------------------
  450|    303|      mdst_fcoeff_curr =
  451|    303|          ixheaacd_mdst_fcoeff_stopstart_cur[prev_w_shape][w_shape];
  452|    303|      mdst_fcoeff_prev =
  453|    303|          ixheaacd_mdst_fcoeff_stop_stopstart_left_prev[prev_w_shape];
  454|    303|      break;
  455|      0|    default:
  ------------------
  |  Branch (455:5): [True: 0, False: 11.6k]
  ------------------
  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|  11.6k|  }
  462|       |
  463|   101k|  for (i = 0; i < pstr_sfb_info->max_win_len; i++) {
  ------------------
  |  Branch (463:15): [True: 90.2k, False: 11.6k]
  ------------------
  464|  90.2k|    ixheaacd_filter_and_add(dmx_re, pstr_sfb_info->bins_per_sbk,
  465|  90.2k|                            mdst_fcoeff_curr, dmx_im, 1, 1);
  466|       |
  467|  90.2k|    if (dmx_re_prev)
  ------------------
  |  Branch (467:9): [True: 78.7k, False: 11.4k]
  ------------------
  468|  78.7k|      ixheaacd_filter_and_add(dmx_re_prev, pstr_sfb_info->bins_per_sbk,
  469|  78.7k|                              mdst_fcoeff_prev, dmx_im, -1, 1);
  470|       |
  471|  90.2k|    dmx_re_prev = dmx_re;
  472|  90.2k|    dmx_re += pstr_sfb_info->bins_per_sbk;
  473|  90.2k|    dmx_im += pstr_sfb_info->bins_per_sbk;
  474|  90.2k|  }
  475|  11.6k|  return;
  476|  11.6k|}
ixheaacd_ext_ch_ele.c:ixheaacd_filter_and_add:
  358|   168k|                                    const WORD32 factor_odd) {
  359|   168k|  WORD32 i;
  360|   168k|  WORD64 sum;
  361|       |
  362|   168k|  sum = ixheaac_mult32x32in64(in[2], filter[0]);
  363|   168k|  sum = ixheaac_mac32x32in64(sum, in[1], filter[1]);
  364|   168k|  sum = ixheaac_mac32x32in64(sum, in[0], filter[2]);
  365|   168k|  sum = ixheaac_mac32x32in64_n(sum, &in[0], &filter[3], 4);
  366|   168k|  *out = ixheaac_add32_sat(
  367|   168k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
  368|   168k|  out++;
  369|       |
  370|   168k|  sum = ixheaac_mult32x32in64(in[1], filter[0]);
  371|   168k|  sum = ixheaac_mac32x32in64(sum, in[0], filter[1]);
  372|   168k|  sum = ixheaac_mac32x32in64_n(sum, &in[0], &filter[2], 5);
  373|   168k|  *out = ixheaac_add32_sat(
  374|   168k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
  375|   168k|  out++;
  376|       |
  377|   168k|  sum = ixheaac_mult32x32in64(in[0], filter[0]);
  378|   168k|  sum = ixheaac_mac32x32in64_n(sum, &in[0], &filter[1], 6);
  379|   168k|  *out = ixheaac_add32_sat(
  380|   168k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
  381|   168k|  out++;
  382|       |
  383|  10.6M|  for (i = 3; i < length - 4; i += 2) {
  ------------------
  |  Branch (383:15): [True: 10.5M, False: 168k]
  ------------------
  384|  10.5M|    sum = 0;
  385|  10.5M|    sum = ixheaac_mac32x32in64_7(&in[i - 3], filter);
  386|  10.5M|    *out = ixheaac_add32_sat(
  387|  10.5M|        *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
  388|  10.5M|    out++;
  389|       |
  390|  10.5M|    sum = 0;
  391|  10.5M|    sum = ixheaac_mac32x32in64_7(&in[i - 2], filter);
  392|  10.5M|    *out = ixheaac_add32_sat(
  393|  10.5M|        *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
  394|  10.5M|    out++;
  395|  10.5M|  }
  396|   168k|  i = length - 3;
  397|   168k|  sum = 0;
  398|   168k|  sum = ixheaac_mac32x32in64_n(sum, &in[i - 3], filter, 6);
  399|   168k|  sum = ixheaac_mac32x32in64(sum, in[i + 2], filter[6]);
  400|   168k|  *out = ixheaac_add32_sat(
  401|   168k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
  402|       |
  403|   168k|  out++;
  404|   168k|  i = length - 2;
  405|   168k|  sum = 0;
  406|   168k|  sum = ixheaac_mac32x32in64_n(sum, &in[i - 3], filter, 5);
  407|   168k|  sum = ixheaac_mac32x32in64(sum, in[i + 1], filter[5]);
  408|   168k|  sum = ixheaac_mac32x32in64(sum, in[i], filter[6]);
  409|       |
  410|   168k|  *out = ixheaac_add32_sat(
  411|   168k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
  412|   168k|  out++;
  413|       |
  414|   168k|  i = length - 1;
  415|   168k|  sum = 0;
  416|   168k|  sum = ixheaac_mac32x32in64_n(sum, &in[i - 3], filter, 4);
  417|   168k|  sum = ixheaac_mac32x32in64(sum, in[i], filter[4]);
  418|   168k|  sum = ixheaac_mac32x32in64(sum, in[i - 1], filter[5]);
  419|   168k|  sum = ixheaac_mac32x32in64(sum, in[i - 2], filter[6]);
  420|       |
  421|   168k|  *out = ixheaac_add32_sat(
  422|   168k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
  423|   168k|}

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

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

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

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

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

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

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

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

ixheaacd_sbr_ratio:
   81|  38.9k|UWORD32 ixheaacd_sbr_ratio(UWORD32 core_sbr_framelength_idx) {
   82|  38.9k|  UWORD32 sbr_ratio_index = 0x0FF;
   83|       |
   84|  38.9k|  switch (core_sbr_framelength_idx) {
  ------------------
  |  Branch (84:11): [True: 38.9k, False: 0]
  ------------------
   85|  2.32k|    case 0:
  ------------------
  |  Branch (85:5): [True: 2.32k, False: 36.6k]
  ------------------
   86|  29.0k|    case 1:
  ------------------
  |  Branch (86:5): [True: 26.7k, False: 12.2k]
  ------------------
   87|  29.0k|      sbr_ratio_index = USAC_SBR_RATIO_NO_SBR;
  ------------------
  |  |   33|  29.0k|#define USAC_SBR_RATIO_NO_SBR 0
  ------------------
   88|  29.0k|      break;
   89|  2.02k|    case 2:
  ------------------
  |  Branch (89:5): [True: 2.02k, False: 36.9k]
  ------------------
   90|  2.02k|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_8_3;
  ------------------
  |  |   35|  2.02k|#define USAC_SBR_RATIO_INDEX_8_3 2
  ------------------
   91|  2.02k|      break;
   92|  6.93k|    case 3:
  ------------------
  |  Branch (92:5): [True: 6.93k, False: 32.0k]
  ------------------
   93|  6.93k|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_2_1;
  ------------------
  |  |   34|  6.93k|#define USAC_SBR_RATIO_INDEX_2_1 1
  ------------------
   94|  6.93k|      break;
   95|    933|    case 4:
  ------------------
  |  Branch (95:5): [True: 933, False: 38.0k]
  ------------------
   96|    933|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_4_1;
  ------------------
  |  |   36|    933|#define USAC_SBR_RATIO_INDEX_4_1 3
  ------------------
   97|    933|      break;
   98|  38.9k|  }
   99|       |
  100|  38.9k|  return sbr_ratio_index;
  101|  38.9k|}
ixheaacd_sbr_params:
  115|  8.39k|                            UWORD32 *sample_freq_indx) {
  116|  8.39k|  UWORD32 sbr_ratio_index = 0x0FF;
  117|       |
  118|  8.39k|  *output_framelength = -1;
  119|       |
  120|  8.39k|  switch (core_sbr_framelength_idx) {
  ------------------
  |  Branch (120:11): [True: 8.39k, False: 0]
  ------------------
  121|  1.55k|    case 0:
  ------------------
  |  Branch (121:5): [True: 1.55k, False: 6.84k]
  ------------------
  122|  1.55k|      sbr_ratio_index = USAC_SBR_RATIO_NO_SBR;
  ------------------
  |  |   33|  1.55k|#define USAC_SBR_RATIO_NO_SBR 0
  ------------------
  123|  1.55k|      *output_framelength = USAC_OUT_FRAMELENGTH_768;
  ------------------
  |  |   38|  1.55k|#define USAC_OUT_FRAMELENGTH_768 768
  ------------------
  124|  1.55k|      *block_size = 768;
  125|  1.55k|      *output_samples = *block_size;
  126|  1.55k|      break;
  127|  2.02k|    case 1:
  ------------------
  |  Branch (127:5): [True: 2.02k, False: 6.37k]
  ------------------
  128|  2.02k|      sbr_ratio_index = USAC_SBR_RATIO_NO_SBR;
  ------------------
  |  |   33|  2.02k|#define USAC_SBR_RATIO_NO_SBR 0
  ------------------
  129|  2.02k|      *output_framelength = USAC_OUT_FRAMELENGTH_1024;
  ------------------
  |  |   39|  2.02k|#define USAC_OUT_FRAMELENGTH_1024 1024
  ------------------
  130|  2.02k|      *block_size = 1024;
  131|  2.02k|      *output_samples = *block_size;
  132|  2.02k|      break;
  133|  1.02k|    case 2:
  ------------------
  |  Branch (133:5): [True: 1.02k, False: 7.37k]
  ------------------
  134|  1.02k|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_8_3;
  ------------------
  |  |   35|  1.02k|#define USAC_SBR_RATIO_INDEX_8_3 2
  ------------------
  135|  1.02k|      *output_framelength = USAC_OUT_FRAMELENGTH_2048;
  ------------------
  |  |   40|  1.02k|#define USAC_OUT_FRAMELENGTH_2048 2048
  ------------------
  136|  1.02k|      *block_size = 768;
  137|  1.02k|      *output_samples = (*block_size * 8) / 3;
  138|  1.02k|      *sample_rate_layer = (*sample_rate_layer * 3) >> 3;
  139|  1.02k|      break;
  140|  3.32k|    case 3:
  ------------------
  |  Branch (140:5): [True: 3.32k, False: 5.07k]
  ------------------
  141|  3.32k|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_2_1;
  ------------------
  |  |   34|  3.32k|#define USAC_SBR_RATIO_INDEX_2_1 1
  ------------------
  142|  3.32k|      *output_framelength = USAC_OUT_FRAMELENGTH_2048;
  ------------------
  |  |   40|  3.32k|#define USAC_OUT_FRAMELENGTH_2048 2048
  ------------------
  143|  3.32k|      *block_size = 1024;
  144|  3.32k|      *output_samples = *block_size * 2;
  145|  3.32k|      *sample_rate_layer = *sample_rate_layer >> 1;
  146|  3.32k|      break;
  147|    472|    case 4:
  ------------------
  |  Branch (147:5): [True: 472, False: 7.92k]
  ------------------
  148|    472|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_4_1;
  ------------------
  |  |   36|    472|#define USAC_SBR_RATIO_INDEX_4_1 3
  ------------------
  149|    472|      *output_framelength = USAC_OUT_FRAMELENGTH_4096;
  ------------------
  |  |   41|    472|#define USAC_OUT_FRAMELENGTH_4096 4096
  ------------------
  150|    472|      *block_size = 1024;
  151|    472|      *output_samples = *block_size * 4;
  152|    472|      *sample_rate_layer = *sample_rate_layer >> 2;
  153|    472|      break;
  154|  8.39k|  }
  155|       |
  156|  8.39k|  *sample_freq_indx = ixheaacd_get_sample_freq_indx(*sample_rate_layer);
  157|       |
  158|  8.39k|  return sbr_ratio_index;
  159|  8.39k|}
ixheaacd_read_escape_value:
  163|   128k|                                UWORD32 no_bits2, UWORD32 no_bits3) {
  164|   128k|  UWORD32 value = 0;
  165|   128k|  UWORD32 val_add = 0;
  166|   128k|  UWORD32 max_val1 = (1 << no_bits1) - 1;
  167|   128k|  UWORD32 max_val2 = (1 << no_bits2) - 1;
  168|       |
  169|   128k|  value = ixheaacd_read_bits_buf(it_bit_buff, no_bits1);
  170|       |
  171|   128k|  if (value == max_val1) {
  ------------------
  |  Branch (171:7): [True: 6.64k, False: 121k]
  ------------------
  172|  6.64k|    val_add = ixheaacd_read_bits_buf(it_bit_buff, no_bits2);
  173|       |
  174|  6.64k|    value += val_add;
  175|       |
  176|  6.64k|    if (val_add == max_val2) {
  ------------------
  |  Branch (176:9): [True: 897, False: 5.74k]
  ------------------
  177|    897|      val_add = ixheaacd_read_bits_buf(it_bit_buff, no_bits3);
  178|       |
  179|    897|      value += val_add;
  180|    897|    }
  181|  6.64k|  }
  182|       |
  183|   128k|  *ext_ele_value = value;
  184|   128k|}
ixheaacd_sbr_config:
  217|  10.5k|                         ia_usac_dec_sbr_config_struct *pstr_usac_sbr_config) {
  218|  10.5k|  pstr_usac_sbr_config->harmonic_sbr = ixheaacd_read_bits_buf(it_bit_buff, 1);
  219|  10.5k|  pstr_usac_sbr_config->bs_inter_tes = ixheaacd_read_bits_buf(it_bit_buff, 1);
  220|  10.5k|  pstr_usac_sbr_config->bs_pvc = ixheaacd_read_bits_buf(it_bit_buff, 1);
  221|  10.5k|  pstr_usac_sbr_config->dflt_start_freq =
  222|  10.5k|      ixheaacd_read_bits_buf(it_bit_buff, 4);
  223|       |
  224|  10.5k|  pstr_usac_sbr_config->dflt_stop_freq = ixheaacd_read_bits_buf(it_bit_buff, 4);
  225|  10.5k|  pstr_usac_sbr_config->dflt_header_extra1 =
  226|  10.5k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  227|  10.5k|  pstr_usac_sbr_config->dflt_header_extra2 =
  228|  10.5k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  229|       |
  230|  10.5k|  if (pstr_usac_sbr_config->dflt_header_extra1) {
  ------------------
  |  Branch (230:7): [True: 4.27k, False: 6.31k]
  ------------------
  231|  4.27k|    pstr_usac_sbr_config->dflt_freq_scale =
  232|  4.27k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  233|  4.27k|    pstr_usac_sbr_config->dflt_alter_scale =
  234|  4.27k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  235|  4.27k|    pstr_usac_sbr_config->dflt_noise_bands =
  236|  4.27k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  237|  4.27k|  }
  238|       |
  239|  10.5k|  if (pstr_usac_sbr_config->dflt_header_extra2) {
  ------------------
  |  Branch (239:7): [True: 1.96k, False: 8.61k]
  ------------------
  240|  1.96k|    pstr_usac_sbr_config->dflt_limiter_bands =
  241|  1.96k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  242|  1.96k|    pstr_usac_sbr_config->dflt_limiter_gains =
  243|  1.96k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  244|  1.96k|    pstr_usac_sbr_config->dflt_interpol_freq =
  245|  1.96k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  246|  1.96k|    pstr_usac_sbr_config->dflt_smoothing_mode =
  247|  1.96k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  248|  1.96k|  }
  249|  10.5k|}
ixheaacd_ext_element_config:
  255|  19.1k|    WORD32 *preroll_flag) {
  256|  19.1k|  UWORD32 usac_ext_element_type, usac_ext_element_config_length, flag;
  257|       |
  258|  19.1k|  UWORD32 i;
  259|       |
  260|  19.1k|  ixheaacd_read_escape_value(it_bit_buff, &(usac_ext_element_type), 4, 8, 16);
  261|       |
  262|  19.1k|  ixheaacd_read_escape_value(it_bit_buff, &(usac_ext_element_config_length), 4,
  263|  19.1k|                             8, 16);
  264|  19.1k|  if (usac_ext_element_config_length >= 768) return -1;
  ------------------
  |  Branch (264:7): [True: 2, False: 19.1k]
  ------------------
  265|       |
  266|  19.1k|  flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  267|       |
  268|  19.1k|  *ptr_usac_ext_ele_payload_len = 0;
  269|       |
  270|  19.1k|  if (flag) {
  ------------------
  |  Branch (270:7): [True: 3.89k, False: 15.2k]
  ------------------
  271|  3.89k|    ixheaacd_read_escape_value(
  272|  3.89k|        it_bit_buff,
  273|  3.89k|        (UWORD32 *)(&(pstr_usac_element_config->usac_ext_eleme_def_len)), 8, 16,
  274|  3.89k|        0);
  275|  3.89k|    pstr_usac_element_config->usac_ext_eleme_def_len += 1;
  276|       |
  277|  15.2k|  } else {
  278|  15.2k|    pstr_usac_element_config->usac_ext_eleme_def_len = 0;
  279|  15.2k|  }
  280|       |
  281|  19.1k|  pstr_usac_element_config->usac_ext_elem_pld_frag =
  282|  19.1k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  283|       |
  284|  19.1k|  switch (usac_ext_element_type) {
  285|     27|    case ID_EXT_ELE_FILL:
  ------------------
  |  |   46|     27|#define ID_EXT_ELE_FILL 0
  ------------------
  |  Branch (285:5): [True: 27, False: 19.1k]
  ------------------
  286|     27|      break;
  287|  8.37k|    case ID_EXT_ELE_AUDIOPREROLL:
  ------------------
  |  |   49|  8.37k|#define ID_EXT_ELE_AUDIOPREROLL 3
  ------------------
  |  Branch (287:5): [True: 8.37k, False: 10.8k]
  ------------------
  288|  8.37k|      *preroll_flag = 1;
  289|  8.37k|      break;
  290|  2.46k|    case ID_EXT_ELE_UNI_DRC:
  ------------------
  |  |   50|  2.46k|#define ID_EXT_ELE_UNI_DRC 4
  ------------------
  |  Branch (290:5): [True: 2.46k, False: 16.7k]
  ------------------
  291|  69.2k|      for (i = 0; i < usac_ext_element_config_length; i++) {
  ------------------
  |  Branch (291:19): [True: 66.7k, False: 2.46k]
  ------------------
  292|  66.7k|        ptr_usac_ext_ele_payload[i] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  293|  66.7k|      }
  294|  2.46k|      *ptr_usac_ext_ele_payload_len = usac_ext_element_config_length;
  295|  2.46k|      break;
  296|       |
  297|  8.32k|    default:
  ------------------
  |  Branch (297:5): [True: 8.32k, False: 10.8k]
  ------------------
  298|  8.32k|      if ((it_bit_buff->cnt_bits >> 3) < (WORD32)usac_ext_element_config_length)
  ------------------
  |  Branch (298:11): [True: 14, False: 8.31k]
  ------------------
  299|     14|        return -1;
  300|  8.31k|      it_bit_buff->ptr_read_next += usac_ext_element_config_length;
  301|  8.31k|      it_bit_buff->cnt_bits -= (usac_ext_element_config_length << 3);
  302|       |
  303|  8.31k|      break;
  304|  19.1k|  }
  305|       |
  306|  19.1k|  return 0;
  307|  19.1k|}
ixheaacd_mps212_config:
  312|  4.52k|    WORD32 stereo_config_index) {
  313|  4.52k|  pstr_usac_mps212_config->bs_freq_res = ixheaacd_read_bits_buf(it_bit_buff, 3);
  314|       |
  315|  4.52k|  pstr_usac_mps212_config->bs_fixed_gain_dmx =
  316|  4.52k|      ixheaacd_read_bits_buf(it_bit_buff, 3);
  317|       |
  318|  4.52k|  pstr_usac_mps212_config->bs_temp_shape_config =
  319|  4.52k|      ixheaacd_read_bits_buf(it_bit_buff, 2);
  320|       |
  321|  4.52k|  pstr_usac_mps212_config->bs_decorr_config =
  322|  4.52k|      ixheaacd_read_bits_buf(it_bit_buff, 2);
  323|  4.52k|  if (pstr_usac_mps212_config->bs_decorr_config > MAX_DECOR_CONFIG_IDX)
  ------------------
  |  |   27|  4.52k|#define MAX_DECOR_CONFIG_IDX (2)
  ------------------
  |  Branch (323:7): [True: 1, False: 4.52k]
  ------------------
  324|      1|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  325|       |
  326|  4.52k|  pstr_usac_mps212_config->bs_high_rate_mode =
  327|  4.52k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  328|       |
  329|  4.52k|  pstr_usac_mps212_config->bs_phase_coding =
  330|  4.52k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  331|       |
  332|  4.52k|  pstr_usac_mps212_config->bs_ott_bands_phase_present =
  333|  4.52k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  334|       |
  335|  4.52k|  if (pstr_usac_mps212_config->bs_ott_bands_phase_present) {
  ------------------
  |  Branch (335:7): [True: 1.81k, False: 2.71k]
  ------------------
  336|  1.81k|    pstr_usac_mps212_config->bs_ott_bands_phase =
  337|  1.81k|        ixheaacd_read_bits_buf(it_bit_buff, 5);
  338|  1.81k|    if (pstr_usac_mps212_config->bs_ott_bands_phase > MAX_PARAMETER_BANDS)
  ------------------
  |  |   55|  1.81k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (338:9): [True: 1, False: 1.81k]
  ------------------
  339|      1|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  340|  1.81k|  }
  341|       |
  342|  4.52k|  if (stereo_config_index > 1) {
  ------------------
  |  Branch (342:7): [True: 2.48k, False: 2.04k]
  ------------------
  343|  2.48k|    pstr_usac_mps212_config->bs_residual_bands =
  344|  2.48k|        ixheaacd_read_bits_buf(it_bit_buff, 5);
  345|       |
  346|  2.48k|    if (pstr_usac_mps212_config->bs_residual_bands > MAX_PARAMETER_BANDS)
  ------------------
  |  |   55|  2.48k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (346:9): [True: 1, False: 2.47k]
  ------------------
  347|      1|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  348|       |
  349|  2.47k|    pstr_usac_mps212_config->bs_ott_bands_phase =
  350|  2.47k|        max(pstr_usac_mps212_config->bs_ott_bands_phase,
  ------------------
  |  |   74|  2.47k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 250, False: 2.22k]
  |  |  ------------------
  ------------------
  351|  2.47k|            pstr_usac_mps212_config->bs_residual_bands);
  352|       |
  353|  2.47k|    pstr_usac_mps212_config->bs_pseudo_lr =
  354|  2.47k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  355|  2.47k|  }
  356|       |
  357|  4.52k|  if (pstr_usac_mps212_config->bs_temp_shape_config == 2)
  ------------------
  |  Branch (357:7): [True: 1.34k, False: 3.18k]
  ------------------
  358|  1.34k|    pstr_usac_mps212_config->bs_env_quant_mode =
  359|  1.34k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  360|       |
  361|  4.52k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  4.52k|#define IA_NO_ERROR 0x00000000
  ------------------
  362|  4.52k|}
ixheaacd_cpe_config:
  367|  19.3k|    WORD32 sbr_ratio_index) {
  368|  19.3k|  pstr_usac_element_config->tw_mdct = ixheaacd_read_bits_buf(it_bit_buff, 1);
  369|  19.3k|  pstr_usac_element_config->noise_filling =
  370|  19.3k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  371|       |
  372|  19.3k|  if (sbr_ratio_index > 0) {
  ------------------
  |  Branch (372:7): [True: 4.78k, False: 14.5k]
  ------------------
  373|  4.78k|    ixheaacd_sbr_config(it_bit_buff,
  374|  4.78k|                        &(pstr_usac_element_config->str_usac_sbr_config));
  375|  4.78k|    pstr_usac_element_config->stereo_config_index =
  376|  4.78k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  377|       |
  378|  14.5k|  } else {
  379|  14.5k|    pstr_usac_element_config->stereo_config_index = 0;
  380|  14.5k|  }
  381|       |
  382|  19.3k|  if (pstr_usac_element_config->stereo_config_index > 0)
  ------------------
  |  Branch (382:7): [True: 4.52k, False: 14.7k]
  ------------------
  383|  4.52k|    return ixheaacd_mps212_config(
  384|  4.52k|        it_bit_buff, &(pstr_usac_element_config->str_usac_mps212_config),
  385|  4.52k|        pstr_usac_element_config->stereo_config_index);
  386|       |
  387|  14.7k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  14.7k|#define IA_NO_ERROR 0x00000000
  ------------------
  388|  19.3k|}
ixheaacd_decoder_config:
  393|  38.9k|    WORD32 sbr_ratio_index, UINT32 *chan, WORD32 ec_flag) {
  394|  38.9k|  UWORD32 elem_idx = 0;
  395|  38.9k|  UWORD32 err = 0;
  396|  38.9k|  WORD32 num_channels = 0;
  397|       |
  398|  38.9k|  ixheaacd_read_escape_value(
  399|  38.9k|      it_bit_buff, &(pstr_usac_decoder_config->num_elements), 4, 8, 16);
  400|  38.9k|  pstr_usac_decoder_config->num_elements += 1;
  401|  38.9k|  pstr_usac_decoder_config->preroll_flag = 0;
  402|       |
  403|  38.9k|  if (pstr_usac_decoder_config->num_elements > USAC_MAX_ELEMENTS) {
  ------------------
  |  |   23|  38.9k|#define USAC_MAX_ELEMENTS (16)
  ------------------
  |  Branch (403:7): [True: 13, False: 38.9k]
  ------------------
  404|     13|    if (ec_flag) {
  ------------------
  |  Branch (404:9): [True: 0, False: 13]
  ------------------
  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|     13|    } else {
  408|     13|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|     13|#define IA_FATAL_ERROR 0x80000000
  ------------------
  409|     13|    }
  410|     13|  }
  411|       |
  412|  97.1k|  for (elem_idx = 0; elem_idx < pstr_usac_decoder_config->num_elements;
  ------------------
  |  Branch (412:22): [True: 58.2k, False: 38.8k]
  ------------------
  413|  58.2k|       elem_idx++) {
  414|  58.2k|    ia_usac_dec_element_config_struct *pstr_usac_element_config =
  415|  58.2k|        &(pstr_usac_decoder_config->str_usac_element_config[elem_idx]);
  416|       |
  417|  58.2k|    pstr_usac_decoder_config->usac_element_type[elem_idx] =
  418|  58.2k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  419|       |
  420|  58.2k|    switch (pstr_usac_decoder_config->usac_element_type[elem_idx]) {
  421|  19.2k|      case ID_USAC_SCE:
  ------------------
  |  |   27|  19.2k|#define ID_USAC_SCE 0
  ------------------
  |  Branch (421:7): [True: 19.2k, False: 38.9k]
  ------------------
  422|  19.2k|        num_channels++;
  423|  19.2k|        pstr_usac_element_config->tw_mdct =
  424|  19.2k|            ixheaacd_read_bits_buf(it_bit_buff, 1);
  425|  19.2k|        pstr_usac_element_config->noise_filling =
  426|  19.2k|            ixheaacd_read_bits_buf(it_bit_buff, 1);
  427|  19.2k|        pstr_usac_element_config->stereo_config_index = 0;
  428|  19.2k|        if (sbr_ratio_index > 0)
  ------------------
  |  Branch (428:13): [True: 5.80k, False: 13.4k]
  ------------------
  429|  5.80k|          ixheaacd_sbr_config(it_bit_buff,
  430|  5.80k|                              &(pstr_usac_element_config->str_usac_sbr_config));
  431|       |
  432|  19.2k|        break;
  433|       |
  434|  19.3k|      case ID_USAC_CPE:
  ------------------
  |  |   28|  19.3k|#define ID_USAC_CPE 1
  ------------------
  |  Branch (434:7): [True: 19.3k, False: 38.9k]
  ------------------
  435|  19.3k|        num_channels += 2;
  436|  19.3k|        if (ixheaacd_cpe_config(it_bit_buff, pstr_usac_element_config, sbr_ratio_index) !=
  ------------------
  |  Branch (436:13): [True: 3, False: 19.3k]
  ------------------
  437|  19.3k|            IA_NO_ERROR) {
  ------------------
  |  |   23|  19.3k|#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|  19.3k|        if (pstr_usac_element_config->stereo_config_index > 1 && *chan < 2) {
  ------------------
  |  Branch (445:13): [True: 2.47k, False: 16.8k]
  |  Branch (445:66): [True: 3, False: 2.47k]
  ------------------
  446|      3|          if (ec_flag) {
  ------------------
  |  Branch (446:15): [True: 0, False: 3]
  ------------------
  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|      3|          } else {
  450|      3|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
  451|      3|          }
  452|      3|        }
  453|  19.3k|        break;
  454|       |
  455|  19.3k|      case ID_USAC_LFE:
  ------------------
  |  |   29|    474|#define ID_USAC_LFE 2
  ------------------
  |  Branch (455:7): [True: 474, False: 57.8k]
  ------------------
  456|    474|        num_channels++;
  457|    474|        pstr_usac_element_config->tw_mdct = 0;
  458|    474|        pstr_usac_element_config->noise_filling = 0;
  459|    474|        pstr_usac_element_config->stereo_config_index = 0;
  460|    474|        break;
  461|       |
  462|  19.1k|      case ID_USAC_EXT:
  ------------------
  |  |   30|  19.1k|#define ID_USAC_EXT 3
  ------------------
  |  Branch (462:7): [True: 19.1k, False: 39.0k]
  ------------------
  463|  19.1k|        err = ixheaacd_ext_element_config(
  464|  19.1k|            it_bit_buff, pstr_usac_element_config,
  465|  19.1k|            &pstr_usac_decoder_config->usac_ext_ele_payload_buf[elem_idx][0],
  466|  19.1k|            &pstr_usac_decoder_config->usac_ext_ele_payload_len[elem_idx],
  467|  19.1k|            &(pstr_usac_decoder_config->preroll_flag));
  468|       |
  469|  19.1k|        if (pstr_usac_decoder_config->usac_ext_ele_payload_len[elem_idx] > 0) {
  ------------------
  |  Branch (469:13): [True: 2.32k, False: 16.8k]
  ------------------
  470|  2.32k|          pstr_usac_decoder_config->usac_ext_ele_payload_present[elem_idx] = 1;
  471|  16.8k|        } else {
  472|  16.8k|          pstr_usac_decoder_config->usac_ext_ele_payload_present[elem_idx] = 0;
  473|  16.8k|        }
  474|  19.1k|        if (err != 0) {
  ------------------
  |  Branch (474:13): [True: 16, False: 19.1k]
  ------------------
  475|     16|          if (ec_flag) {
  ------------------
  |  Branch (475:15): [True: 0, False: 16]
  ------------------
  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|     16|          } else {
  479|     16|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|     16|#define IA_FATAL_ERROR 0x80000000
  ------------------
  480|     16|          }
  481|     16|        }
  482|  19.1k|        break;
  483|  19.1k|      default:
  ------------------
  |  Branch (483:7): [True: 0, False: 58.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|  58.2k|    }
  492|  58.2k|    if (num_channels > 2) {
  ------------------
  |  Branch (492:9): [True: 16, False: 58.2k]
  ------------------
  493|     16|      if (ec_flag) {
  ------------------
  |  Branch (493:11): [True: 0, False: 16]
  ------------------
  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|     16|      } else {
  497|     16|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|     16|#define IA_FATAL_ERROR 0x80000000
  ------------------
  498|     16|      }
  499|     16|    }
  500|  58.2k|  }
  501|  38.8k|  return err;
  502|  38.9k|}
ixheaacd_config_extension:
  505|  3.93k|    ia_usac_decoder_config_struct *pstr_usac_decoder_config, WORD32 ec_flag) {
  506|  3.93k|  UWORD32 i, j;
  507|  3.93k|  UWORD32 num_config_extensions;
  508|  3.93k|  UWORD32 usac_config_ext_type, usac_config_ext_len;
  509|       |
  510|  3.93k|  ixheaacd_read_escape_value(it_bit_buff, &(num_config_extensions), 2, 4, 8);
  511|  3.93k|  num_config_extensions += 1;
  512|  3.93k|  if (USAC_MAX_CONFIG_EXTENSIONS < num_config_extensions) {
  ------------------
  |  |   25|  3.93k|#define USAC_MAX_CONFIG_EXTENSIONS (16)
  ------------------
  |  Branch (512:7): [True: 7, False: 3.93k]
  ------------------
  513|      7|    if (ec_flag) {
  ------------------
  |  Branch (513:9): [True: 0, False: 7]
  ------------------
  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|      7|    } else {
  516|      7|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      7|#define IA_FATAL_ERROR 0x80000000
  ------------------
  517|      7|    }
  518|      7|  }
  519|       |
  520|  3.93k|  pstr_usac_decoder_config->num_config_extensions = num_config_extensions;
  521|  3.93k|  memset(pstr_usac_decoder_config->usac_cfg_ext_info_len, 0,
  522|  3.93k|         USAC_MAX_CONFIG_EXTENSIONS * sizeof(WORD32));
  ------------------
  |  |   25|  3.93k|#define USAC_MAX_CONFIG_EXTENSIONS (16)
  ------------------
  523|  3.93k|  memset(pstr_usac_decoder_config->usac_cfg_ext_info_present, 0,
  524|  3.93k|         USAC_MAX_CONFIG_EXTENSIONS * sizeof(WORD32));
  ------------------
  |  |   25|  3.93k|#define USAC_MAX_CONFIG_EXTENSIONS (16)
  ------------------
  525|       |
  526|  21.8k|  for (j = 0; j < num_config_extensions; j++) {
  ------------------
  |  Branch (526:15): [True: 17.9k, False: 3.88k]
  ------------------
  527|  17.9k|    UWORD32 fill_byte_val = 0xa5;
  528|       |
  529|  17.9k|    ixheaacd_read_escape_value(it_bit_buff, &(usac_config_ext_type), 4, 8, 16);
  530|  17.9k|    ixheaacd_read_escape_value(it_bit_buff, &(usac_config_ext_len), 4, 8, 16);
  531|       |
  532|  17.9k|    if (usac_config_ext_len > 768) {
  ------------------
  |  Branch (532:9): [True: 5, False: 17.9k]
  ------------------
  533|      5|      if (ec_flag) {
  ------------------
  |  Branch (533:11): [True: 0, False: 5]
  ------------------
  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|      5|      } else {
  537|      5|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      5|#define IA_FATAL_ERROR 0x80000000
  ------------------
  538|      5|      }
  539|      5|    }
  540|       |
  541|  17.9k|    switch (usac_config_ext_type) {
  542|  8.52k|      case ID_CONFIG_EXT_FILL:
  ------------------
  |  |   52|  8.52k|#define ID_CONFIG_EXT_FILL 0
  ------------------
  |  Branch (542:7): [True: 8.52k, False: 9.47k]
  ------------------
  543|  8.53k|        for (i = 0; i < usac_config_ext_len; i++) {
  ------------------
  |  Branch (543:21): [True: 22, False: 8.51k]
  ------------------
  544|     22|          fill_byte_val = ixheaacd_read_bits_buf(it_bit_buff, 8);
  545|     22|          if (fill_byte_val != 0xa5) {
  ------------------
  |  Branch (545:15): [True: 8, False: 14]
  ------------------
  546|      8|            if (ec_flag) {
  ------------------
  |  Branch (546:17): [True: 0, False: 8]
  ------------------
  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|      8|            } else {
  550|      8|              return IA_FATAL_ERROR;
  ------------------
  |  |   25|      8|#define IA_FATAL_ERROR 0x80000000
  ------------------
  551|      8|            }
  552|      8|          }
  553|     22|        }
  554|  8.51k|        break;
  555|  9.46k|      default:
  ------------------
  |  Branch (555:7): [True: 9.46k, False: 8.53k]
  ------------------
  556|  9.46k|        if ((WORD32)usac_config_ext_len > (it_bit_buff->cnt_bits >> 3)) {
  ------------------
  |  Branch (556:13): [True: 20, False: 9.44k]
  ------------------
  557|     20|          if (ec_flag) {
  ------------------
  |  Branch (557:15): [True: 0, False: 20]
  ------------------
  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|     20|          } else {
  561|     20|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|     20|#define IA_FATAL_ERROR 0x80000000
  ------------------
  562|     20|          }
  563|     20|        }
  564|  9.44k|        if (ID_CONFIG_EXT_LOUDNESS_INFO == usac_config_ext_type) {
  ------------------
  |  |   53|  9.44k|#define ID_CONFIG_EXT_LOUDNESS_INFO (2)
  ------------------
  |  Branch (564:13): [True: 1.85k, False: 7.59k]
  ------------------
  565|  52.7k|          for (i = 0; i < usac_config_ext_len; i++) {
  ------------------
  |  Branch (565:23): [True: 50.9k, False: 1.85k]
  ------------------
  566|  50.9k|            UWORD8 byte_val = ixheaacd_read_bits_buf(it_bit_buff, 8);
  567|  50.9k|            pstr_usac_decoder_config->usac_cfg_ext_info_buf[j][i] = byte_val;
  568|  50.9k|          }
  569|  1.85k|          pstr_usac_decoder_config->usac_cfg_ext_info_len[j] =
  570|  1.85k|              usac_config_ext_len;
  571|  1.85k|          pstr_usac_decoder_config->usac_cfg_ext_info_present[j] = 1;
  572|  7.59k|        } else {
  573|  25.9k|          for (i = 0; i < usac_config_ext_len; i++)
  ------------------
  |  Branch (573:23): [True: 18.3k, False: 7.59k]
  ------------------
  574|  18.3k|            ixheaacd_read_bits_buf(it_bit_buff, 8);
  575|  7.59k|        }
  576|  9.44k|        break;
  577|  17.9k|    }
  578|  17.9k|  }
  579|       |
  580|  3.88k|  return 0;
  581|  3.93k|}
ixheaacd_config:
  584|  39.0k|                       UINT32 *chan, WORD32 ec_flag) {
  585|  39.0k|  WORD32 tmp, err;
  586|  39.0k|  err = 0;
  587|       |
  588|  39.0k|  pstr_usac_conf->usac_sampling_frequency_index =
  589|  39.0k|      ixheaacd_read_bits_buf(it_bit_buff, 5);
  590|       |
  591|  39.0k|  if (pstr_usac_conf->usac_sampling_frequency_index == 0x1f) {
  ------------------
  |  Branch (591:7): [True: 38, False: 38.9k]
  ------------------
  592|     38|    pstr_usac_conf->usac_sampling_frequency =
  593|     38|        ixheaacd_read_bits_buf(it_bit_buff, 24);
  594|       |
  595|     38|    if (pstr_usac_conf->usac_sampling_frequency > USAC_MAX_SAMPLE_RATE) {
  ------------------
  |  |   50|     38|#define USAC_MAX_SAMPLE_RATE (96000)
  ------------------
  |  Branch (595:9): [True: 4, False: 34]
  ------------------
  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|  38.9k|  } else {
  605|  38.9k|    pstr_usac_conf->usac_sampling_frequency =
  606|  38.9k|        sampling_rate_tbl[pstr_usac_conf->usac_sampling_frequency_index];
  607|  38.9k|  }
  608|       |
  609|  39.0k|  if (pstr_usac_conf->usac_sampling_frequency == 0) {
  ------------------
  |  Branch (609:7): [True: 5, False: 39.0k]
  ------------------
  610|      5|    if (ec_flag) {
  ------------------
  |  Branch (610:9): [True: 0, False: 5]
  ------------------
  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|      5|    } else {
  613|      5|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      5|#define IA_FATAL_ERROR 0x80000000
  ------------------
  614|      5|    }
  615|      5|  }
  616|  39.0k|  pstr_usac_conf->core_sbr_framelength_index =
  617|  39.0k|      ixheaacd_read_bits_buf(it_bit_buff, 3);
  618|       |
  619|  39.0k|  if (pstr_usac_conf->core_sbr_framelength_index > MAX_CORE_SBR_FRAME_LEN_IDX) {
  ------------------
  |  |   43|  39.0k|#define MAX_CORE_SBR_FRAME_LEN_IDX (4)
  ------------------
  |  Branch (619:7): [True: 6, False: 39.0k]
  ------------------
  620|      6|    if (ec_flag) {
  ------------------
  |  Branch (620:9): [True: 0, False: 6]
  ------------------
  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|      6|    } else {
  623|      6|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      6|#define IA_FATAL_ERROR 0x80000000
  ------------------
  624|      6|    }
  625|      6|  }
  626|       |
  627|  39.0k|  pstr_usac_conf->channel_configuration_index =
  628|  39.0k|      ixheaacd_read_bits_buf(it_bit_buff, 5);
  629|  39.0k|  if ((pstr_usac_conf->channel_configuration_index >= 3) &&
  ------------------
  |  Branch (629:7): [True: 2.17k, False: 36.8k]
  ------------------
  630|  2.17k|      (pstr_usac_conf->channel_configuration_index != 8)) {
  ------------------
  |  Branch (630:7): [True: 9, False: 2.16k]
  ------------------
  631|      9|    if (ec_flag) {
  ------------------
  |  Branch (631:9): [True: 0, False: 9]
  ------------------
  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|      9|    } else {
  634|      9|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      9|#define IA_FATAL_ERROR 0x80000000
  ------------------
  635|      9|    }
  636|      9|  }
  637|       |
  638|  38.9k|  if (pstr_usac_conf->channel_configuration_index == 0) {
  ------------------
  |  Branch (638:7): [True: 7.35k, False: 31.6k]
  ------------------
  639|  7.35k|    UWORD32 i;
  640|       |
  641|  7.35k|    ixheaacd_read_escape_value(it_bit_buff,
  642|  7.35k|                               (UWORD32 *)(&(pstr_usac_conf->num_out_channels)),
  643|  7.35k|                               5, 8, 16);
  644|  7.35k|    if (BS_MAX_NUM_OUT_CHANNELS < pstr_usac_conf->num_out_channels) {
  ------------------
  |  |  209|  7.35k|#define BS_MAX_NUM_OUT_CHANNELS (255)
  ------------------
  |  Branch (644:9): [True: 4, False: 7.35k]
  ------------------
  645|      4|      return IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
  ------------------
  |  |   85|      4|#define IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX 0xFFFF9002
  ------------------
  646|      4|    }
  647|  7.35k|    if (pstr_usac_conf->num_out_channels < 1) {
  ------------------
  |  Branch (647:9): [True: 15, False: 7.33k]
  ------------------
  648|     15|      return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|     15|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  649|     15|    }
  650|   529k|    for (i = 0; i < pstr_usac_conf->num_out_channels; i++)
  ------------------
  |  Branch (650:17): [True: 522k, False: 7.33k]
  ------------------
  651|   522k|      pstr_usac_conf->output_channel_pos[i] =
  652|   522k|          ixheaacd_read_bits_buf(it_bit_buff, 5);
  653|       |
  654|  7.33k|    if (ec_flag) {
  ------------------
  |  Branch (654:9): [True: 0, False: 7.33k]
  ------------------
  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|  31.6k|  } else {
  658|  31.6k|    err = ixheaacd_get_usac_chan_conf(pstr_usac_conf, pstr_usac_conf->channel_configuration_index,
  659|  31.6k|                                      it_bit_buff, ec_flag);
  660|  31.6k|    if (err != 0)
  ------------------
  |  Branch (660:9): [True: 0, False: 31.6k]
  ------------------
  661|      0|      return err;
  662|  31.6k|  }
  663|       |
  664|  38.9k|  err = ixheaacd_decoder_config(
  665|  38.9k|      it_bit_buff, &(pstr_usac_conf->str_usac_dec_config),
  666|  38.9k|      ixheaacd_sbr_ratio(pstr_usac_conf->core_sbr_framelength_index), chan, ec_flag);
  667|  38.9k|  if (err != 0) return err;
  ------------------
  |  Branch (667:7): [True: 51, False: 38.9k]
  ------------------
  668|       |
  669|  38.9k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 1);
  670|       |
  671|  38.9k|  if (tmp) {
  ------------------
  |  Branch (671:7): [True: 3.93k, False: 34.9k]
  ------------------
  672|  3.93k|    err = ixheaacd_config_extension(it_bit_buff,
  673|  3.93k|                                    &pstr_usac_conf->str_usac_dec_config, ec_flag);
  674|  3.93k|    if (err != 0) return -1;
  ------------------
  |  Branch (674:9): [True: 40, False: 3.89k]
  ------------------
  675|  3.93k|  }
  676|       |
  677|  38.8k|  return err;
  678|  38.9k|}
ixheaacd_conf_default:
  680|  38.9k|VOID ixheaacd_conf_default(ia_usac_config_struct *pstr_usac_conf) {
  681|  38.9k|  WORD32 i;
  682|       |
  683|  38.9k|  pstr_usac_conf->num_out_channels = 0;
  684|       |
  685|  9.97M|  for (i = 0; i < BS_MAX_NUM_OUT_CHANNELS; i++)
  ------------------
  |  |  209|  9.97M|#define BS_MAX_NUM_OUT_CHANNELS (255)
  ------------------
  |  Branch (685:15): [True: 9.93M, False: 38.9k]
  ------------------
  686|  9.93M|    pstr_usac_conf->output_channel_pos[i] = BS_OUTPUT_CHANNEL_POS_NA;
  ------------------
  |  |  173|  9.93M|#define BS_OUTPUT_CHANNEL_POS_NA -1   /* n/a                                */
  ------------------
  687|       |
  688|  38.9k|  pstr_usac_conf->str_usac_dec_config.num_elements = 0;
  689|       |
  690|   662k|  for (i = 0; i < USAC_MAX_ELEMENTS; i++)
  ------------------
  |  |   23|   662k|#define USAC_MAX_ELEMENTS (16)
  ------------------
  |  Branch (690:15): [True: 623k, False: 38.9k]
  ------------------
  691|   623k|    pstr_usac_conf->str_usac_dec_config.usac_element_type[i] = ID_USAC_INVALID;
  ------------------
  |  |   31|   623k|#define ID_USAC_INVALID 0xFF
  ------------------
  692|       |
  693|  38.9k|  return;
  694|  38.9k|}
ixheaacd_init_config.c:ixheaacd_get_sample_freq_indx:
  103|  8.39k|static WORD32 ixheaacd_get_sample_freq_indx(WORD32 sampling_freq) {
  104|  8.39k|  WORD32 index;
  105|  8.39k|  const WORD32 tbl_size = sizeof(sampling_rate_tbl) / sizeof(WORD32) - 1;
  106|       |
  107|   160k|  for (index = 0; index < tbl_size; index++) {
  ------------------
  |  Branch (107:19): [True: 158k, False: 2.82k]
  ------------------
  108|   158k|    if (sampling_rate_tbl[index] == sampling_freq) break;
  ------------------
  |  Branch (108:9): [True: 5.57k, False: 152k]
  ------------------
  109|   158k|  }
  110|  8.39k|  return index;
  111|  8.39k|}
ixheaacd_init_config.c:ixheaacd_get_usac_chan_conf:
  188|  31.6k|{
  189|  31.6k|  switch (ch_config_index) {
  190|  1.09k|    case 1:
  ------------------
  |  Branch (190:5): [True: 1.09k, False: 30.5k]
  ------------------
  191|  1.09k|      pstr_usac_config->num_out_channels = 1;
  192|  1.09k|      pstr_usac_config->output_channel_pos[0] = BS_OUTPUT_CHANNEL_POS_C;
  ------------------
  |  |  176|  1.09k|#define BS_OUTPUT_CHANNEL_POS_C 2     /* Center Front                        */
  ------------------
  193|  1.09k|      break;
  194|  28.3k|    case 2:
  ------------------
  |  Branch (194:5): [True: 28.3k, False: 3.26k]
  ------------------
  195|  28.3k|      pstr_usac_config->num_out_channels = 2;
  196|  28.3k|      pstr_usac_config->output_channel_pos[0] = BS_OUTPUT_CHANNEL_POS_L;
  ------------------
  |  |  174|  28.3k|#define BS_OUTPUT_CHANNEL_POS_L 0     /* Left Front                          */
  ------------------
  197|  28.3k|      pstr_usac_config->output_channel_pos[1] = BS_OUTPUT_CHANNEL_POS_R;
  ------------------
  |  |  175|  28.3k|#define BS_OUTPUT_CHANNEL_POS_R 1     /* Right Front                         */
  ------------------
  198|  28.3k|      break;
  199|  2.16k|    case 8:
  ------------------
  |  Branch (199:5): [True: 2.16k, False: 29.4k]
  ------------------
  200|  2.16k|      pstr_usac_config->num_out_channels = 2;
  201|  2.16k|      pstr_usac_config->output_channel_pos[0] = BS_OUTPUT_CHANNEL_POS_NA;
  ------------------
  |  |  173|  2.16k|#define BS_OUTPUT_CHANNEL_POS_NA -1   /* n/a                                */
  ------------------
  202|  2.16k|      pstr_usac_config->output_channel_pos[1] = BS_OUTPUT_CHANNEL_POS_NA;
  ------------------
  |  |  173|  2.16k|#define BS_OUTPUT_CHANNEL_POS_NA -1   /* n/a                                */
  ------------------
  203|  2.16k|      break;
  204|       |
  205|      0|    default:
  ------------------
  |  Branch (205:5): [True: 0, False: 31.6k]
  ------------------
  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|  31.6k|  }
  213|  31.6k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  31.6k|#define IA_NO_ERROR 0x00000000
  ------------------
  214|  31.6k|}

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

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

ixheaacd_ld_spatial_specific_config:
  207|  2.16k|    ia_usac_dec_mps_config_struct *config, ia_bit_buf_struct *it_bit_buff) {
  208|  2.16k|  WORD32 i, num_header_bits;
  209|  2.16k|  UWORD32 hc, hb;
  210|  2.16k|  WORD32 sac_header_len;
  211|  2.16k|  WORD32 bits_available;
  212|  2.16k|  WORD32 tmp = it_bit_buff->cnt_bits;
  213|  2.16k|  WORD32 err = 0;
  214|       |
  215|  2.16k|  sac_header_len = tmp;
  216|       |
  217|  2.16k|  bits_available = sac_header_len;
  218|  2.16k|  config->bs_sampling_freq_index = ixheaacd_read_bits_buf(it_bit_buff, 4);
  219|  2.16k|  if (config->bs_sampling_freq_index == 15) {
  ------------------
  |  Branch (219:7): [True: 26, False: 2.13k]
  ------------------
  220|     26|    config->bs_fampling_frequency = ixheaacd_read_bits_buf(it_bit_buff, 24);
  221|     26|  }
  222|       |
  223|  2.16k|  config->bs_frame_length = ixheaacd_read_bits_buf(it_bit_buff, 5);
  224|  2.16k|  config->bs_freq_res = ixheaacd_read_bits_buf(it_bit_buff, 3);
  225|  2.16k|  config->bs_tree_config = ixheaacd_read_bits_buf(it_bit_buff, 4);
  226|       |
  227|  2.16k|  if (config->bs_tree_config > 7) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (227:7): [True: 3, False: 2.15k]
  ------------------
  228|       |
  229|  2.15k|  if (config->bs_tree_config != 15) {
  ------------------
  |  Branch (229:7): [True: 2.15k, False: 6]
  ------------------
  230|  2.15k|    config->num_ott_boxes =
  231|  2.15k|        ixheaacd_tree_property_table[config->bs_tree_config].num_ott_boxes;
  232|  2.15k|    config->num_ttt_boxes =
  233|  2.15k|        ixheaacd_tree_property_table[config->bs_tree_config].num_ttt_boxes;
  234|  2.15k|    config->num_input_channels =
  235|  2.15k|        ixheaacd_tree_property_table[config->bs_tree_config].num_input_chan;
  236|  2.15k|    config->num_output_channels =
  237|  2.15k|        ixheaacd_tree_property_table[config->bs_tree_config].num_output_chan;
  238|  12.9k|    for (i = 0; i < MAX_NUM_OTT; i++) {
  ------------------
  |  |   56|  12.9k|#define MAX_NUM_OTT (5)
  ------------------
  |  Branch (238:17): [True: 10.7k, False: 2.15k]
  ------------------
  239|  10.7k|      config->ott_mode_lfe[i] =
  240|  10.7k|          ixheaacd_tree_property_table[config->bs_tree_config].ott_mode_lfe[i];
  241|  10.7k|    }
  242|  2.15k|  }
  243|  2.15k|  config->bs_quant_mode = ixheaacd_read_bits_buf(it_bit_buff, 2);
  244|  2.15k|  if (config->bs_tree_config != 7) {
  ------------------
  |  Branch (244:7): [True: 1.78k, False: 376]
  ------------------
  245|  1.78k|    config->bs_one_icc = ixheaacd_read_bits_buf(it_bit_buff, 1);
  246|  1.78k|  }
  247|  2.15k|  config->bs_arbitrary_downmix = ixheaacd_read_bits_buf(it_bit_buff, 1);
  248|  2.15k|  if (config->bs_tree_config != 7) {
  ------------------
  |  Branch (248:7): [True: 1.78k, False: 376]
  ------------------
  249|  1.78k|    config->bs_fixed_gain_sur = ixheaacd_read_bits_buf(it_bit_buff, 3);
  250|  1.78k|    config->bs_fixed_gain_LFE = ixheaacd_read_bits_buf(it_bit_buff, 3);
  251|  1.78k|  }
  252|  2.15k|  config->bs_fixed_gain_dmx = ixheaacd_read_bits_buf(it_bit_buff, 3);
  253|  2.15k|  if (config->bs_tree_config != 7) {
  ------------------
  |  Branch (253:7): [True: 1.78k, False: 377]
  ------------------
  254|  1.78k|    config->bs_matrix_mode = ixheaacd_read_bits_buf(it_bit_buff, 1);
  255|  1.78k|  }
  256|  2.15k|  config->bs_temp_shape_config = ixheaacd_read_bits_buf(it_bit_buff, 2);
  257|  2.15k|  config->bs_decorr_config = ixheaacd_read_bits_buf(it_bit_buff, 2);
  258|  2.15k|  if (config->bs_tree_config != 7) {
  ------------------
  |  Branch (258:7): [True: 1.78k, False: 377]
  ------------------
  259|  1.78k|    config->bs_3D_audio_mode = ixheaacd_read_bits_buf(it_bit_buff, 1);
  260|  1.78k|  } else {
  261|    377|    config->bs_3D_audio_mode = 0;
  262|    377|  }
  263|       |
  264|       |  // ott_config
  265|  9.52k|  for (i = 0; i < config->num_ott_boxes; i++) {
  ------------------
  |  Branch (265:15): [True: 7.36k, False: 2.15k]
  ------------------
  266|  7.36k|    if (config->ott_mode_lfe[i]) {
  ------------------
  |  Branch (266:9): [True: 1.39k, False: 5.97k]
  ------------------
  267|  1.39k|      config->bs_ott_bands[i] = ixheaacd_read_bits_buf(it_bit_buff, 5);
  268|  5.97k|    } else {
  269|  5.97k|      config->bs_ott_bands[i] = ixheaacd_freq_res_table[config->bs_freq_res];
  270|  5.97k|    }
  271|  7.36k|  }
  272|       |
  273|       |  // ttt_config
  274|  2.57k|  for (i = 0; i < config->num_ttt_boxes; i++) {
  ------------------
  |  Branch (274:15): [True: 412, False: 2.15k]
  ------------------
  275|    412|    config->bs_ttt_dual_mode[i] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  276|    412|    config->bs_ttt_mode_low[i] = ixheaacd_read_bits_buf(it_bit_buff, 3);
  277|    412|    if (config->bs_ttt_dual_mode[i]) {
  ------------------
  |  Branch (277:9): [True: 17, False: 395]
  ------------------
  278|     17|      config->bs_ttt_mode_high[i] = ixheaacd_read_bits_buf(it_bit_buff, 3);
  279|     17|      config->bs_ttt_bands_low[i] = ixheaacd_read_bits_buf(it_bit_buff, 5);
  280|     17|      config->bs_ttt_bands_high[i] = ixheaacd_freq_res_table[config->bs_freq_res];
  281|    395|    } else {
  282|    395|      config->bs_ttt_bands_low[i] = ixheaacd_freq_res_table[config->bs_freq_res];
  283|    395|    }
  284|    412|  }
  285|       |
  286|  2.15k|  if (config->bs_temp_shape_config == 2) {
  ------------------
  |  Branch (286:7): [True: 534, False: 1.62k]
  ------------------
  287|    534|    config->bs_env_quant_mode = ixheaacd_read_bits_buf(it_bit_buff, 1);
  288|    534|  }
  289|       |
  290|  2.15k|  if (config->bs_3D_audio_mode) {
  ------------------
  |  Branch (290:7): [True: 296, False: 1.86k]
  ------------------
  291|    296|    config->bs_3D_audio_HRTF_set = ixheaacd_read_bits_buf(it_bit_buff, 2);
  292|       |    // param_HRTF_set
  293|    296|    if (config->bs_3D_audio_HRTF_set == 0) {
  ------------------
  |  Branch (293:9): [True: 95, False: 201]
  ------------------
  294|     95|      config->bs_HRTF_freq_res = ixheaacd_read_bits_buf(it_bit_buff, 3);
  295|     95|      config->bs_HRTF_num_chan = 5;
  296|     95|      config->bs_HRTF_asymmetric = ixheaacd_read_bits_buf(it_bit_buff, 1);
  297|       |
  298|     95|      config->HRTF_num_band = ixheaacd_hrtf_freq_res_table[0][config->bs_HRTF_freq_res];
  299|     95|      config->HRTF_num_phase = ixheaacd_hrtf_freq_res_table[1][config->bs_HRTF_freq_res];
  300|       |
  301|    432|      for (hc = 0; hc < config->bs_HRTF_num_chan; hc++) {
  ------------------
  |  Branch (301:20): [True: 337, False: 95]
  ------------------
  302|  2.60k|        for (hb = 0; hb < config->HRTF_num_band; hb++) {
  ------------------
  |  Branch (302:22): [True: 2.26k, False: 337]
  ------------------
  303|  2.26k|          config->bs_HRTF_level_left[hc][hb] =
  304|  2.26k|              ixheaacd_read_bits_buf(it_bit_buff, 6);
  305|  2.26k|        }
  306|  2.52k|        for (hb = 0; hb < config->HRTF_num_band; hb++) {
  ------------------
  |  Branch (306:22): [True: 2.19k, False: 337]
  ------------------
  307|  2.19k|          config->bs_HRTF_level_right[hc][hb] =
  308|  2.19k|              config->bs_HRTF_asymmetric
  ------------------
  |  Branch (308:15): [True: 397, False: 1.79k]
  ------------------
  309|  2.19k|                  ? ixheaacd_read_bits_buf(it_bit_buff, 6)
  310|  2.19k|                  : config->bs_HRTF_level_left[hc][hb];
  311|  2.19k|        }
  312|    337|        config->bs_HRTF_phase[hc] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  313|  1.60k|        for (hb = 0; hb < config->HRTF_num_phase; hb++) {
  ------------------
  |  Branch (313:22): [True: 1.26k, False: 337]
  ------------------
  314|  1.26k|          config->bs_HRTF_phase_LR[hc][hb] =
  315|  1.26k|              config->bs_HRTF_phase[hc] ? ixheaacd_read_bits_buf(it_bit_buff, 6)
  ------------------
  |  Branch (315:15): [True: 575, False: 694]
  ------------------
  316|  1.26k|                                        : 0;
  317|  1.26k|        }
  318|    337|        config->bs_HRTF_icc[hc] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  319|    337|        if (config->bs_HRTF_icc[hc]) {
  ------------------
  |  Branch (319:13): [True: 119, False: 218]
  ------------------
  320|    891|          for (hb = 0; hb < config->HRTF_num_band; hb++)
  ------------------
  |  Branch (320:24): [True: 772, False: 119]
  ------------------
  321|    772|            config->bs_HRTF_icc_LR[hc][hb] =
  322|    772|                ixheaacd_read_bits_buf(it_bit_buff, 3);
  323|    119|        }
  324|    337|      }
  325|     95|    }
  326|    296|  }
  327|       |
  328|       |  // byte_align
  329|  2.15k|  i = (it_bit_buff->cnt_bits & 0x7);
  330|  2.15k|  ixheaacd_read_bits_buf(it_bit_buff, i);
  331|       |
  332|  2.15k|  num_header_bits = tmp - (it_bit_buff->cnt_bits);
  333|  2.15k|  bits_available -= num_header_bits;
  334|       |
  335|  2.15k|  err =
  336|  2.15k|      ixheaacd_ld_spatial_extension_config(it_bit_buff, config, bits_available);
  337|  2.15k|  return err;
  338|  2.16k|}
ixheaacd_ld_mps_config.c:ixheaacd_ld_spatial_extension_config:
   53|  2.09k|    WORD32 bits_available) {
   54|  2.09k|  WORD32 j, ch, idx, tmp, tmp_open, sac_ext_len, bits_read, n_fill_bits;
   55|  2.09k|  UWORD32 i;
   56|  2.09k|  WORD32 ba = bits_available;
   57|       |
   58|  2.09k|  config->sac_ext_cnt = 0;
   59|       |
   60|  2.09k|  tmp = it_bit_buff->cnt_bits;
   61|       |
   62|  2.09k|  WORD32 num_slots = config->bs_frame_length + 1;
   63|       |
   64|  14.4k|  while (ba >= 8) {
  ------------------
  |  Branch (64:10): [True: 12.3k, False: 2.04k]
  ------------------
   65|  12.3k|    if (config->sac_ext_cnt >= MAX_NUM_EXT_TYPES) return IA_FATAL_ERROR;
  ------------------
  |  |   61|  12.3k|#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: 12.3k]
  ------------------
   66|       |
   67|  12.3k|    config->bs_sac_ext_type[config->sac_ext_cnt] =
   68|  12.3k|        ixheaacd_read_bits_buf(it_bit_buff, 4);
   69|  12.3k|    ba -= 4;
   70|       |
   71|  12.3k|    sac_ext_len = ixheaacd_read_bits_buf(it_bit_buff, 4);
   72|  12.3k|    ba -= 4;
   73|       |
   74|  12.3k|    if ((ba >= 6) && (sac_ext_len > 0)) {
  ------------------
  |  Branch (74:9): [True: 12.2k, False: 160]
  |  Branch (74:22): [True: 7.41k, False: 4.82k]
  ------------------
   75|  7.41k|      if (sac_ext_len == 15) {
  ------------------
  |  Branch (75:11): [True: 3.79k, False: 3.61k]
  ------------------
   76|  3.79k|        sac_ext_len += ixheaacd_read_bits_buf(it_bit_buff, 8);
   77|  3.79k|        ba -= 8;
   78|  3.79k|        if (sac_ext_len == 15 + 255) {
  ------------------
  |  Branch (78:13): [True: 1.35k, False: 2.44k]
  ------------------
   79|  1.35k|          sac_ext_len += ixheaacd_read_bits_buf(it_bit_buff, 16);
   80|  1.35k|          ba -= 16;
   81|  1.35k|        }
   82|  3.79k|      }
   83|       |
   84|  7.41k|      switch (config->bs_sac_ext_type[config->sac_ext_cnt]) {
   85|     71|        case 0:
  ------------------
  |  Branch (85:9): [True: 71, False: 7.34k]
  ------------------
   86|     71|          config->bs_residual_coding = 1;
   87|       |
   88|     71|          config->bs_residual_sampling_freq_index =
   89|     71|              ixheaacd_read_bits_buf(it_bit_buff, 4);
   90|     71|          if (config->bs_residual_sampling_freq_index > MAX_RES_SAMP_FREQ_IDX) {
  ------------------
  |  |   71|     71|#define MAX_RES_SAMP_FREQ_IDX 11
  ------------------
  |  Branch (90:15): [True: 3, False: 68]
  ------------------
   91|      3|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
   92|      3|          }
   93|     68|          config->bs_residual_frames_per_spatial_frame =
   94|     68|              ixheaacd_read_bits_buf(it_bit_buff, 2);
   95|       |
   96|     68|          if (!ixheaacd_validate_res_frames_per_spatial_frame(
  ------------------
  |  Branch (96:15): [True: 6, False: 62]
  ------------------
   97|     68|                  num_slots, config->bs_residual_frames_per_spatial_frame)) {
   98|      6|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      6|#define IA_FATAL_ERROR 0x80000000
  ------------------
   99|      6|          }
  100|       |
  101|     62|          if ((config->num_ott_boxes + config->num_ttt_boxes) >
  ------------------
  |  Branch (101:15): [True: 1, False: 61]
  ------------------
  102|     62|              MAX_RESIDUAL_CHANNELS)
  ------------------
  |  |   59|     62|#define MAX_RESIDUAL_CHANNELS (3)
  ------------------
  103|      1|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  104|    166|          for (j = 0; j < config->num_ott_boxes + config->num_ttt_boxes; j++) {
  ------------------
  |  Branch (104:23): [True: 107, False: 59]
  ------------------
  105|    107|            config->bs_residual_present[j] =
  106|    107|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  107|    107|            if (config->bs_residual_present[j]) {
  ------------------
  |  Branch (107:17): [True: 29, False: 78]
  ------------------
  108|     29|              config->bs_residual_bands_ld_mps[j] =
  109|     29|                  ixheaacd_read_bits_buf(it_bit_buff, 5);
  110|     29|              if (config->bs_residual_bands_ld_mps[j] > MAX_PARAMETER_BANDS)
  ------------------
  |  |   55|     29|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (110:19): [True: 2, False: 27]
  ------------------
  111|      2|              {
  112|      2|                return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
  113|      2|              }
  114|     29|            }
  115|    107|          }
  116|     59|          break;
  117|       |
  118|     59|        case 1:
  ------------------
  |  Branch (118:9): [True: 31, False: 7.38k]
  ------------------
  119|     31|          config->bs_arbitrary_downmix = 2;
  120|       |
  121|     31|          config->bs_arbitrary_downmix_residual_sampling_freq_index =
  122|     31|              ixheaacd_read_bits_buf(it_bit_buff, 4);
  123|     31|          if (config->bs_arbitrary_downmix_residual_sampling_freq_index > MAX_RES_SAMP_FREQ_IDX) {
  ------------------
  |  |   71|     31|#define MAX_RES_SAMP_FREQ_IDX 11
  ------------------
  |  Branch (123:15): [True: 2, False: 29]
  ------------------
  124|      2|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
  125|      2|          }
  126|     29|          config->bs_arbitrary_downmix_residual_frames_per_spatial_frame =
  127|     29|              ixheaacd_read_bits_buf(it_bit_buff, 2);
  128|       |
  129|     29|          if (!ixheaacd_validate_res_frames_per_spatial_frame(
  ------------------
  |  Branch (129:15): [True: 1, False: 28]
  ------------------
  130|     29|                  num_slots, config->bs_arbitrary_downmix_residual_frames_per_spatial_frame)) {
  131|      1|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  132|      1|          }
  133|       |
  134|     28|          config->bs_arbitrary_downmix_residual_bands =
  135|     28|              ixheaacd_read_bits_buf(it_bit_buff, 5);
  136|     28|          if (config->bs_arbitrary_downmix_residual_bands >=
  ------------------
  |  Branch (136:15): [True: 2, False: 26]
  ------------------
  137|     28|              ixheaacd_freq_res_table[config->bs_freq_res]) {
  138|      2|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
  139|      2|          }
  140|       |
  141|     26|          break;
  142|       |
  143|    362|        case 2:
  ------------------
  |  Branch (143:9): [True: 362, False: 7.05k]
  ------------------
  144|    362|          config->num_out_chan_AT = 0;
  145|    362|          config->num_ott_boxes_AT = 0;
  146|    362|          if (config->num_output_channels > MAX_OUTPUT_CHANNELS)
  ------------------
  |  |   60|    362|#define MAX_OUTPUT_CHANNELS (7)
  ------------------
  |  Branch (146:15): [True: 1, False: 361]
  ------------------
  147|      1|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  148|  2.39k|          for (ch = 0; ch < config->num_output_channels; ch++) {
  ------------------
  |  Branch (148:24): [True: 2.03k, False: 361]
  ------------------
  149|  2.03k|            tmp_open = 1;
  150|  2.03k|            idx = 0;
  151|  8.52k|            while ((tmp_open > 0) && (idx < MAX_ARBITRARY_TREE_INDEX)) {
  ------------------
  |  |   69|  7.12k|#define MAX_ARBITRARY_TREE_INDEX ((1 << (MAX_ARBITRARY_TREE_LEVELS + 1)) - 1)
  |  |  ------------------
  |  |  |  |   66|  7.12k|#define MAX_ARBITRARY_TREE_LEVELS (2)
  |  |  ------------------
  ------------------
  |  Branch (151:20): [True: 7.12k, False: 1.39k]
  |  Branch (151:38): [True: 6.49k, False: 635]
  ------------------
  152|  6.49k|              config->bs_ott_box_present_AT[ch][idx] =
  153|  6.49k|                  ixheaacd_read_bits_buf(it_bit_buff, 1);
  154|  6.49k|              if (config->bs_ott_box_present_AT[ch][idx]) {
  ------------------
  |  Branch (154:19): [True: 4.40k, False: 2.08k]
  ------------------
  155|  4.40k|                config->num_ott_boxes_AT++;
  156|  4.40k|                tmp_open++;
  157|  4.40k|              } else {
  158|  2.08k|                config->num_out_chan_AT++;
  159|  2.08k|                tmp_open--;
  160|  2.08k|              }
  161|  6.49k|              idx++;
  162|  6.49k|            }
  163|  2.03k|          }
  164|       |
  165|  4.68k|          for (i = 0; i < config->num_ott_boxes_AT; i++) {
  ------------------
  |  Branch (165:23): [True: 4.32k, False: 361]
  ------------------
  166|  4.32k|            config->bs_ott_default_cld_AT[i] =
  167|  4.32k|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  168|  4.32k|            config->bs_ott_mode_lfe_AT[i] =
  169|  4.32k|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  170|  4.32k|            if (config->bs_ott_mode_lfe_AT[i]) {
  ------------------
  |  Branch (170:17): [True: 1.69k, False: 2.62k]
  ------------------
  171|  1.69k|              config->bs_ott_bands_AT[i] =
  172|  1.69k|                  ixheaacd_read_bits_buf(it_bit_buff, 5);
  173|  2.62k|            } else {
  174|  2.62k|              config->bs_ott_bands_AT[i] = ixheaacd_freq_res_table[config->bs_freq_res];
  175|  2.62k|            }
  176|  4.32k|          }
  177|       |
  178|  2.36k|          for (i = 0; i < config->num_out_chan_AT; i++) {
  ------------------
  |  Branch (178:23): [True: 2.00k, False: 361]
  ------------------
  179|  2.00k|            config->bs_output_channel_pos_AT[i] =
  180|  2.00k|                ixheaacd_read_bits_buf(it_bit_buff, 5);
  181|  2.00k|          }
  182|       |
  183|    361|          break;
  184|       |
  185|  6.94k|        default:;
  ------------------
  |  Branch (185:9): [True: 6.94k, False: 465]
  ------------------
  186|  7.41k|      }
  187|  7.41k|    }
  188|       |
  189|  12.3k|    bits_read = tmp - it_bit_buff->cnt_bits;
  190|  12.3k|    n_fill_bits = 8 * sac_ext_len - bits_read;
  191|       |
  192|  2.76M|    while (n_fill_bits > 7) {
  ------------------
  |  Branch (192:12): [True: 2.75M, False: 12.3k]
  ------------------
  193|  2.75M|      ixheaacd_read_bits_buf(it_bit_buff, 8);
  194|  2.75M|      n_fill_bits -= 8;
  195|  2.75M|    }
  196|  12.3k|    if (n_fill_bits > 0) {
  ------------------
  |  Branch (196:9): [True: 328, False: 12.0k]
  ------------------
  197|    328|      ixheaacd_read_bits_buf(it_bit_buff, n_fill_bits);
  198|    328|    }
  199|       |
  200|  12.3k|    ba -= 8 * sac_ext_len;
  201|  12.3k|    config->sac_ext_cnt++;
  202|  12.3k|  }
  203|  2.04k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  2.04k|#define IA_NO_ERROR 0x00000000
  ------------------
  204|  2.09k|}

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

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

ixheaacd_reset_acelp_data_fix:
  104|  71.6k|                                   WORD32 was_last_short, WORD32 tw_mdct) {
  105|  71.6k|  WORD32 i;
  106|       |
  107|  71.6k|  if (was_last_short == 1) {
  ------------------
  |  Branch (107:7): [True: 8.04k, False: 63.6k]
  ------------------
  108|  8.04k|    st->mode_prev = -2;
  109|  63.6k|  } else {
  110|  63.6k|    st->mode_prev = -1;
  111|  63.6k|  }
  112|       |
  113|   573k|  for (i = 0; i < NUM_SUBFR_SUPERFRAME_BY2 - 1; i++) {
  ------------------
  |  |   36|   573k|#define NUM_SUBFR_SUPERFRAME_BY2 (NUM_SUBFR_SUPERFRAME / 2)
  |  |  ------------------
  |  |  |  |   35|   573k|#define NUM_SUBFR_SUPERFRAME 16
  |  |  ------------------
  ------------------
  |  Branch (113:15): [True: 501k, False: 71.6k]
  ------------------
  114|   501k|    st->pitch_prev[i] = 64;
  115|   501k|    st->gain_prev[i] = 0;
  116|   501k|  }
  117|       |
  118|  71.6k|  st->bpf_active_prev = 0;
  119|       |
  120|  71.6k|  if (ptr_overlap_buf != NULL && !tw_mdct) {
  ------------------
  |  Branch (120:7): [True: 21.3k, False: 50.3k]
  |  Branch (120:34): [True: 21.3k, False: 0]
  ------------------
  121|  21.3k|    const WORD32 *ptr_window_coeff;
  122|  21.3k|    WORD32 fac_length;
  123|  21.3k|    if (was_last_short) {
  ------------------
  |  Branch (123:9): [True: 8.04k, False: 13.2k]
  ------------------
  124|  8.04k|      fac_length = (usac_data->ccfl) / 16;
  125|  13.2k|    } else {
  126|  13.2k|      fac_length = (usac_data->len_subfrm) / 2;
  127|  13.2k|    }
  128|       |
  129|  21.3k|    if (fac_length == 48) {
  ------------------
  |  Branch (129:9): [True: 1.09k, False: 20.2k]
  ------------------
  130|  1.09k|      ptr_window_coeff = ixheaacd_sine_win_96;
  131|  20.2k|    } else if (fac_length == 64) {
  ------------------
  |  Branch (131:16): [True: 6.94k, False: 13.2k]
  ------------------
  132|  6.94k|      ptr_window_coeff = ixheaacd_sine_win_128;
  133|  13.2k|    } else if (fac_length == 96) {
  ------------------
  |  Branch (133:16): [True: 2.56k, False: 10.7k]
  ------------------
  134|  2.56k|      ptr_window_coeff = ixheaacd_sine_win_192;
  135|  10.7k|    } else {
  136|  10.7k|      ptr_window_coeff = ixheaacd_sine_win_256;
  137|  10.7k|    }
  138|       |
  139|  4.24M|    for (i = 0; i < 2 * fac_length; i++) {
  ------------------
  |  Branch (139:17): [True: 4.22M, False: 21.3k]
  ------------------
  140|  4.22M|      ptr_overlap_buf[(usac_data->ccfl) / 2 - fac_length + i] =
  141|  4.22M|          ixheaacd_mult32_m(
  142|  4.22M|              ptr_overlap_buf[(usac_data->ccfl) / 2 - fac_length + i],
  143|  4.22M|              ptr_window_coeff[2 * fac_length - 1 - i]);
  144|  4.22M|    }
  145|  8.35M|    for (i = 0; i < (usac_data->ccfl) / 2 - fac_length; i++) {
  ------------------
  |  Branch (145:17): [True: 8.33M, False: 21.3k]
  ------------------
  146|  8.33M|      ptr_overlap_buf[(usac_data->ccfl) / 2 + fac_length + i] = 0;
  147|  8.33M|    }
  148|       |
  149|  21.3k|    if (ptr_overlap_buf != NULL) {
  ------------------
  |  Branch (149:9): [True: 21.3k, False: 0]
  ------------------
  150|   518k|      for (i = 0; i < (usac_data->len_subfrm) / 2 - fac_length; i++) {
  ------------------
  |  Branch (150:19): [True: 497k, False: 21.3k]
  ------------------
  151|   497k|        st->exc_prev[i] = 0.0f;
  152|   497k|      }
  153|  4.27M|      for (i = 0; i < 2 * fac_length + 1; i++) {
  ------------------
  |  Branch (153:19): [True: 4.24M, False: 21.3k]
  ------------------
  154|  4.24M|        st->exc_prev[(usac_data->len_subfrm) / 2 - fac_length + i] =
  155|  4.24M|            ptr_overlap_buf[i + usac_data->ccfl / 2 - fac_length - 1] /
  156|  4.24M|            (float)(16384);
  157|  4.24M|      }
  158|  21.3k|    } else {
  159|      0|      ixheaacd_memset(st->exc_prev, 1 + (2 * FAC_LENGTH));
  ------------------
  |  |   33|      0|#define FAC_LENGTH 128
  ------------------
  160|      0|    }
  161|  21.3k|  }
  162|       |
  163|  71.6k|  return;
  164|  71.6k|}
ixheaacd_fix2flt_data:
  167|  21.3k|                           ia_usac_lpd_decoder_handle st, WORD32 k) {
  168|  21.3k|  WORD32 i;
  169|  21.3k|  WORD32 fac_length;
  170|  21.3k|  WORD32 window_sequence_last = usac_data->window_sequence_last[k];
  171|  21.3k|  WORD32 *p_ola_buffer = usac_data->overlap_data_ptr[k];
  172|  21.3k|  if (window_sequence_last == EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  21.3k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (172:7): [True: 8.04k, False: 13.2k]
  ------------------
  173|  8.04k|    fac_length = (usac_data->ccfl) / 16;
  174|  13.2k|  } else {
  175|  13.2k|    fac_length = (usac_data->len_subfrm) / 2;
  176|  13.2k|  }
  177|       |
  178|  21.3k|  ixheaacd_memset(st->lp_flt_coeff_a_prev, 2 * (ORDER + 1));
  ------------------
  |  |   30|  21.3k|#define ORDER 16
  ------------------
  179|  21.3k|  ixheaacd_memset(st->xcitation_prev, MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   55|  21.3k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  21.3k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  21.3k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  21.3k|   (6 *           \
  |  |   57|  21.3k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  21.3k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  21.3k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  21.3k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  21.3k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  21.3k|#define TMIN 34
  |  |  ------------------
  ------------------
                ixheaacd_memset(st->xcitation_prev, MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   51|  21.3k|#define INTER_LP_FIL_ORDER 16
  ------------------
  180|  21.3k|  ixheaacd_memset(st->synth_prev, MAX_PITCH + SYNTH_DELAY_LMAX);
  ------------------
  |  |   55|  21.3k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  21.3k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  21.3k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  21.3k|   (6 *           \
  |  |   57|  21.3k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  21.3k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  21.3k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  21.3k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  21.3k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  21.3k|#define TMIN 34
  |  |  ------------------
  ------------------
                ixheaacd_memset(st->synth_prev, MAX_PITCH + SYNTH_DELAY_LMAX);
  ------------------
  |  |   37|  21.3k|#define SYNTH_DELAY_LMAX ((NUM_SUBFR_SUPERFRAME_BY2 - 1) * LEN_SUBFR)
  |  |  ------------------
  |  |  |  |   36|  21.3k|#define NUM_SUBFR_SUPERFRAME_BY2 (NUM_SUBFR_SUPERFRAME / 2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  21.3k|#define NUM_SUBFR_SUPERFRAME 16
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SYNTH_DELAY_LMAX ((NUM_SUBFR_SUPERFRAME_BY2 - 1) * LEN_SUBFR)
  |  |  ------------------
  |  |  |  |  118|  21.3k|#define LEN_SUBFR 64
  |  |  ------------------
  ------------------
  181|  21.3k|  ixheaacd_memset(st->bpf_prev, FILTER_DELAY + LEN_SUBFR);
  ------------------
  |  |   43|  21.3k|#define FILTER_DELAY 12
  ------------------
                ixheaacd_memset(st->bpf_prev, FILTER_DELAY + LEN_SUBFR);
  ------------------
  |  |  118|  21.3k|#define LEN_SUBFR 64
  ------------------
  182|       |
  183|  21.3k|  st->gain_threshold = 0.0f;
  184|       |
  185|  21.3k|  if (p_ola_buffer != NULL) {
  ------------------
  |  Branch (185:7): [True: 21.3k, False: 0]
  ------------------
  186|   518k|    for (i = 0; i < (usac_data->len_subfrm) / 2 - fac_length; i++) {
  ------------------
  |  Branch (186:17): [True: 497k, False: 21.3k]
  ------------------
  187|   497k|      st->exc_prev[i] = 0;
  188|   497k|    }
  189|  4.27M|    for (i = 0; i < 2 * fac_length + 1; i++) {
  ------------------
  |  Branch (189:17): [True: 4.24M, False: 21.3k]
  ------------------
  190|  4.24M|      st->exc_prev[(usac_data->len_subfrm) / 2 - fac_length + i] = (FLOAT32)(
  191|  4.24M|          p_ola_buffer[i + usac_data->ccfl / 2 - fac_length - 1] / 16384.0);
  192|  4.24M|    }
  193|  21.3k|  } else {
  194|      0|    ixheaacd_memset(st->exc_prev, 1 + (2 * FAC_LENGTH));
  ------------------
  |  |   33|      0|#define FAC_LENGTH 128
  ------------------
  195|      0|  }
  196|       |
  197|  21.3k|  return;
  198|  21.3k|}
ixheaacd_init_acelp_data:
  201|  50.3k|                              ia_usac_lpd_decoder_handle st) {
  202|       |  ixheaacd_reset_acelp_data_fix(usac_data, st, NULL, 0, 0);
  203|  50.3k|}
ixheaacd_lsp_2_lsf_conversion:
  208|  28.8k|void ixheaacd_lsp_2_lsf_conversion(float lsp[], float lsf[], WORD32 m) {
  209|  28.8k|  short i;
  210|   490k|  for (i = 0; i < m; i++) {
  ------------------
  |  Branch (210:15): [True: 462k, False: 28.8k]
  ------------------
  211|   462k|    lsf[i] = (float)(acos(lsp[i]) * SCALE1);
  ------------------
  |  |  206|   462k|#define SCALE1 (6400.0 / PI)
  |  |  ------------------
  |  |  |  |  153|   462k|#define PI 3.14159265358979323846264338327950288
  |  |  ------------------
  ------------------
  212|   462k|  }
  213|  28.8k|  return;
  214|  28.8k|}
ixheaacd_lpd_dec:
  354|  89.5k|                        WORD32 short_fac_flag, WORD32 bpf_control_info) {
  355|  89.5k|  FLOAT32 *synth_buf = usac_data->synth_buf;
  356|  89.5k|  FLOAT32 *xcitation_buff = usac_data->exc_buf;
  357|  89.5k|  FLOAT32 lsp_curr[ORDER];
  358|  89.5k|  FLOAT32 lsf_curr[ORDER];
  359|  89.5k|  FLOAT32 *lp_flt_coff_a = usac_data->lp_flt_coff;
  360|  89.5k|  FLOAT32 *synth, *xcitation_curr;
  361|  89.5k|  WORD32 *pitch = usac_data->pitch;
  362|  89.5k|  FLOAT32 *pitch_gain = usac_data->pitch_gain;
  363|  89.5k|  FLOAT32 lsf_flt[(2 * NUM_FRAMES + 1) * ORDER];
  364|       |
  365|  89.5k|  WORD32 i, k, tp, mode;
  366|  89.5k|  WORD32 *mod;
  367|  89.5k|  FLOAT32 gain, stability_factor = 0.0f;
  368|  89.5k|  FLOAT32 tmp, synth_corr, synth_energy;
  369|       |
  370|  89.5k|  WORD32 len_fr;
  371|  89.5k|  WORD32 len_subfrm;
  372|  89.5k|  WORD32 num_subfr;
  373|  89.5k|  WORD32 num_subfr_in_superfr;
  374|  89.5k|  WORD32 num_subfr_by2;
  375|  89.5k|  WORD32 synth_delay;
  376|  89.5k|  WORD32 num_samples = 0;
  377|       |
  378|  89.5k|  WORD32 *ptr_scratch = &usac_data->scratch_buffer[0];
  379|       |
  380|  89.5k|  WORD32 subfr_len = 0, n_subfr = 0;
  381|  89.5k|  WORD32 err = 0;
  382|  89.5k|  WORD32 ch = usac_data->present_chan;
  383|       |
  384|  89.5k|  len_fr = usac_data->ccfl;
  385|  89.5k|  len_subfrm = usac_data->len_subfrm;
  386|  89.5k|  num_subfr = usac_data->num_subfrm;
  387|  89.5k|  num_subfr_in_superfr = NUM_FRAMES * num_subfr;
  ------------------
  |  |   27|  89.5k|#define NUM_FRAMES 4
  ------------------
  388|  89.5k|  num_subfr_by2 = (num_subfr_in_superfr / 2) - 1;
  389|  89.5k|  synth_delay = num_subfr_by2 * LEN_SUBFR;
  ------------------
  |  |  118|  89.5k|#define LEN_SUBFR 64
  ------------------
  390|       |
  391|  89.5k|  synth = synth_buf + MAX_PITCH + synth_delay;
  ------------------
  |  |   55|  89.5k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  89.5k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  89.5k|   (6 *           \
  |  |   57|  89.5k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  89.5k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  89.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  89.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  ------------------
  ------------------
  392|  89.5k|  ixheaacd_mem_cpy(st->synth_prev, synth_buf, MAX_PITCH + synth_delay);
  ------------------
  |  |   55|  89.5k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  89.5k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  89.5k|   (6 *           \
  |  |   57|  89.5k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  89.5k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  89.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  89.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  ------------------
  ------------------
  393|  89.5k|  ixheaacd_memset(synth, SYNTH_DELAY_LMAX + LEN_SUPERFRAME - synth_delay);
  ------------------
  |  |   37|  89.5k|#define SYNTH_DELAY_LMAX ((NUM_SUBFR_SUPERFRAME_BY2 - 1) * LEN_SUBFR)
  |  |  ------------------
  |  |  |  |   36|  89.5k|#define NUM_SUBFR_SUPERFRAME_BY2 (NUM_SUBFR_SUPERFRAME / 2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  89.5k|#define NUM_SUBFR_SUPERFRAME 16
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SYNTH_DELAY_LMAX ((NUM_SUBFR_SUPERFRAME_BY2 - 1) * LEN_SUBFR)
  |  |  ------------------
  |  |  |  |  118|  89.5k|#define LEN_SUBFR 64
  |  |  ------------------
  ------------------
                ixheaacd_memset(synth, SYNTH_DELAY_LMAX + LEN_SUPERFRAME - synth_delay);
  ------------------
  |  |   25|  89.5k|#define LEN_SUPERFRAME 1024
  ------------------
  394|       |
  395|  89.5k|  xcitation_curr = xcitation_buff + MAX_PITCH + INTER_LP_FIL_ORDER + 1;
  ------------------
  |  |   55|  89.5k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  89.5k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  89.5k|   (6 *           \
  |  |   57|  89.5k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  89.5k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  89.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  89.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  ------------------
  ------------------
                xcitation_curr = xcitation_buff + MAX_PITCH + INTER_LP_FIL_ORDER + 1;
  ------------------
  |  |   51|  89.5k|#define INTER_LP_FIL_ORDER 16
  ------------------
  396|  89.5k|  ixheaacd_mem_cpy(st->xcitation_prev, xcitation_buff,
  397|  89.5k|                   MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   55|  89.5k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  89.5k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  89.5k|   (6 *           \
  |  |   57|  89.5k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  89.5k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  89.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  89.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  ------------------
  ------------------
                                 MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   51|  89.5k|#define INTER_LP_FIL_ORDER 16
  ------------------
  398|  89.5k|  memset(xcitation_curr, 0, sizeof(FLOAT32) * (LEN_SUPERFRAME + 1));
  ------------------
  |  |   25|  89.5k|#define LEN_SUPERFRAME 1024
  ------------------
  399|       |
  400|  89.5k|  mod = pstr_td_frame_data->mod;
  401|  89.5k|  if (usac_data->frame_ok == 1) {
  ------------------
  |  Branch (401:7): [True: 89.5k, False: 0]
  ------------------
  402|  89.5k|    usac_data->num_lost_lpd_frames[usac_data->present_chan] = 0;
  403|  89.5k|  }
  404|       |
  405|  89.5k|  if (usac_data->ec_flag && usac_data->frame_ok == 0) {
  ------------------
  |  Branch (405:7): [True: 0, False: 89.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|   663k|  for (i = 0; i < num_subfr_by2; i++) {
  ------------------
  |  Branch (409:15): [True: 573k, False: 89.5k]
  ------------------
  410|   573k|    pitch[i] = st->pitch_prev[i];
  411|   573k|    pitch_gain[i] = st->gain_prev[i];
  412|   573k|  }
  413|  1.41M|  for (i = 0; i < num_subfr_in_superfr; i++) {
  ------------------
  |  Branch (413:15): [True: 1.32M, False: 89.5k]
  ------------------
  414|  1.32M|    pitch[i + num_subfr_by2] = 64;
  415|  1.32M|    pitch_gain[i + num_subfr_by2] = 0.0f;
  416|  1.32M|  }
  417|       |
  418|  89.5k|  if (usac_data->frame_ok) {
  ------------------
  |  Branch (418:7): [True: 89.5k, False: 0]
  ------------------
  419|  89.5k|    if (!first_lpd_flag) {
  ------------------
  |  Branch (419:9): [True: 28.8k, False: 60.6k]
  ------------------
  420|  28.8k|      ixheaacd_lsp_2_lsf_conversion(st->lspold, lsf_flt, ORDER);
  ------------------
  |  |   30|  28.8k|#define ORDER 16
  ------------------
  421|  28.8k|    }
  422|       |
  423|  89.5k|    ixheaacd_alg_vec_dequant(pstr_td_frame_data, first_lpd_flag, lsf_flt, pstr_td_frame_data->mod,
  424|  89.5k|                             usac_data->ec_flag);
  425|  89.5k|  }
  426|  89.5k|  if (usac_data->ec_flag && !(usac_data->frame_ok)) {
  ------------------
  |  Branch (426:7): [True: 0, False: 89.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|  89.5k|  if (first_lpd_flag) {
  ------------------
  |  Branch (431:7): [True: 60.6k, False: 28.8k]
  ------------------
  432|  60.6k|    ixheaacd_mem_cpy(&lsf_flt[0], st->lsf_prev, ORDER);
  ------------------
  |  |   30|  60.6k|#define ORDER 16
  ------------------
  433|  60.6k|    ixheaacd_lsf_2_lsp_conversion_float(st->lsf_prev, st->lspold, ORDER);
  ------------------
  |  |   30|  60.6k|#define ORDER 16
  ------------------
  434|  60.6k|  }
  435|       |
  436|  89.5k|  if ((first_lpd_flag && mod[0] == 0) || (first_lpd_flag && mod[1] == 0) ||
  ------------------
  |  Branch (436:8): [True: 60.6k, False: 28.8k]
  |  Branch (436:26): [True: 22.0k, False: 38.6k]
  |  Branch (436:43): [True: 38.6k, False: 28.8k]
  |  Branch (436:61): [True: 17.6k, False: 20.9k]
  ------------------
  437|  49.8k|      ((first_lpd_flag && mod[2] == 0 && len_subfrm != LEN_FRAME))) {
  ------------------
  |  |   26|  6.20k|#define LEN_FRAME 256
  ------------------
  |  Branch (437:9): [True: 20.9k, False: 28.8k]
  |  Branch (437:27): [True: 6.20k, False: 14.7k]
  |  Branch (437:42): [True: 1.67k, False: 4.52k]
  ------------------
  438|  41.3k|    FLOAT32 lp_flt_coeff_a[9 * (ORDER + 1)];
  439|  41.3k|    FLOAT32 tmp_buf[3 * LEN_FRAME + ORDER];
  440|  41.3k|    FLOAT32 tmp_res_buf[3 * LEN_FRAME];
  441|  41.3k|    FLOAT32 *tmp = &(tmp_buf[LEN_FRAME]);
  ------------------
  |  |   26|  41.3k|#define LEN_FRAME 256
  ------------------
  442|  41.3k|    FLOAT32 *ptr_tmp = &(tmp_res_buf[LEN_FRAME]);
  ------------------
  |  |   26|  41.3k|#define LEN_FRAME 256
  ------------------
  443|  41.3k|    WORD32 tmp_start;
  444|  41.3k|    FLOAT32 mem = 0;
  445|  41.3k|    WORD32 gain;
  446|  41.3k|    WORD32 length;
  447|       |
  448|  41.3k|    ixheaacd_interpolation_lsp_params(st->lspold, st->lspold, lp_flt_coeff_a,
  449|  41.3k|                                      8);
  450|       |
  451|  41.3k|    memcpy(st->lp_flt_coeff_a_prev, lp_flt_coeff_a,
  452|  41.3k|           (ORDER + 1) * sizeof(FLOAT32));
  ------------------
  |  |   30|  41.3k|#define ORDER 16
  ------------------
  453|  41.3k|    memcpy(st->lp_flt_coeff_a_prev + ORDER + 1, lp_flt_coeff_a,
  ------------------
  |  |   30|  41.3k|#define ORDER 16
  ------------------
  454|  41.3k|           (ORDER + 1) * sizeof(FLOAT32));
  ------------------
  |  |   30|  41.3k|#define ORDER 16
  ------------------
  455|       |
  456|  41.3k|    if (mod[0] == 0) {
  ------------------
  |  Branch (456:9): [True: 22.0k, False: 19.3k]
  ------------------
  457|  22.0k|      WORD32 fac_length;
  458|  22.0k|      if (short_fac_flag) {
  ------------------
  |  Branch (458:11): [True: 3.50k, False: 18.5k]
  ------------------
  459|  3.50k|        fac_length = (len_subfrm * NUM_FRAMES) / 16;
  ------------------
  |  |   27|  3.50k|#define NUM_FRAMES 4
  ------------------
  460|  18.5k|      } else {
  461|  18.5k|        fac_length = len_subfrm / 2;
  462|  18.5k|      }
  463|       |
  464|  22.0k|      if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (464:11): [True: 0, False: 22.0k]
  ------------------
  465|      0|        memset(&pstr_td_frame_data->fac_data[0], 0, sizeof(pstr_td_frame_data->fac_data));
  466|      0|      }
  467|  22.0k|      gain = ixheaacd_pow_10_i_by_128[pstr_td_frame_data->fac_data[0]];
  468|       |
  469|  22.0k|      memcpy(ptr_scratch, &pstr_td_frame_data->fac_data[0],
  470|  22.0k|             129 * sizeof(WORD32));
  471|       |
  472|  1.24M|      for (i = 0; i < fac_length / 2; i++) {
  ------------------
  |  Branch (472:19): [True: 1.22M, False: 22.0k]
  ------------------
  473|  1.22M|        pstr_td_frame_data->fac_data[i] = ptr_scratch[2 * i + 1] << 16;
  474|  1.22M|        pstr_td_frame_data->fac_data[fac_length / 2 + i] =
  475|  1.22M|            ptr_scratch[fac_length - 2 * i] << 16;
  476|  1.22M|      }
  477|       |
  478|  22.0k|      if (usac_data->ec_flag == 0) {
  ------------------
  |  Branch (478:11): [True: 22.0k, False: 0]
  ------------------
  479|  22.0k|        if (fac_length & (fac_length - 1)) {
  ------------------
  |  Branch (479:13): [True: 5.03k, False: 16.9k]
  ------------------
  480|  5.03k|          if ((fac_length != 48) && (fac_length != 96) && (fac_length != 192) &&
  ------------------
  |  Branch (480:15): [True: 4.57k, False: 456]
  |  Branch (480:37): [True: 0, False: 4.57k]
  |  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|  5.03k|        }
  485|  22.0k|      }
  486|       |
  487|  22.0k|      ixheaacd_fwd_alias_cancel_tool(usac_data, pstr_td_frame_data, fac_length, lp_flt_coeff_a,
  488|  22.0k|                                     gain);
  489|       |
  490|  22.0k|      memset(&usac_data->overlap_data_ptr[usac_data->present_chan][(len_fr / 2)], 0,
  491|  22.0k|             fac_length * sizeof(WORD32));
  492|  22.0k|    }
  493|       |
  494|  19.9M|    for (i = 0; i < 2 * len_subfrm; i++)
  ------------------
  |  Branch (494:17): [True: 19.8M, False: 41.3k]
  ------------------
  495|  19.8M|      st->fd_synth[ORDER + i] = (FLOAT32)(
  ------------------
  |  |   30|  19.8M|#define ORDER 16
  ------------------
  496|  19.8M|          (FLOAT32)usac_data->overlap_data_ptr[usac_data->present_chan][i] /
  497|  19.8M|          16384.0);
  498|  41.3k|    num_samples = min(2 * len_subfrm, MAX_PITCH + synth_delay);
  ------------------
  |  |   75|  41.3k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 41.3k, False: 0]
  |  |  ------------------
  ------------------
  499|       |
  500|  41.3k|    ixheaacd_mem_cpy(st->fd_synth + ORDER, synth - 2 * len_subfrm,
  ------------------
  |  |   30|  41.3k|#define ORDER 16
  ------------------
  501|  41.3k|                     2 * len_subfrm);
  502|       |
  503|  41.3k|    ixheaacd_preemphsis_tool_float(st->fd_synth + ORDER, PREEMPH_FILT_FAC,
  ------------------
  |  |   30|  41.3k|#define ORDER 16
  ------------------
                  ixheaacd_preemphsis_tool_float(st->fd_synth + ORDER, PREEMPH_FILT_FAC,
  ------------------
  |  |   61|  41.3k|#define PREEMPH_FILT_FAC 0.68f
  ------------------
  504|  41.3k|                                   2 * len_subfrm, mem);
  505|       |
  506|  41.3k|    ixheaacd_memset(tmp, ORDER);
  ------------------
  |  |   30|  41.3k|#define ORDER 16
  ------------------
  507|  41.3k|    ixheaacd_mem_cpy(st->fd_synth + ORDER, tmp + ORDER, 2 * len_subfrm);
  ------------------
  |  |   30|  41.3k|#define ORDER 16
  ------------------
                  ixheaacd_mem_cpy(st->fd_synth + ORDER, tmp + ORDER, 2 * len_subfrm);
  ------------------
  |  |   30|  41.3k|#define ORDER 16
  ------------------
  508|  41.3k|    tmp_start = 0;
  509|       |
  510|  41.3k|    ixheaacd_memset(ptr_tmp - len_subfrm, 3 * len_subfrm);
  511|  41.3k|    memset(st->fd_synth, 0, ORDER * sizeof(WORD32));
  ------------------
  |  |   30|  41.3k|#define ORDER 16
  ------------------
  512|  41.3k|    length = (2 * len_subfrm - tmp_start) / LEN_SUBFR;
  ------------------
  |  |  118|  41.3k|#define LEN_SUBFR 64
  ------------------
  513|       |
  514|  41.3k|    ixheaacd_residual_tool_float1(lp_flt_coeff_a,
  515|  41.3k|                                  &st->fd_synth[ORDER + tmp_start],
  ------------------
  |  |   30|  41.3k|#define ORDER 16
  ------------------
  516|  41.3k|                                  &ptr_tmp[tmp_start], LEN_SUBFR, length);
  ------------------
  |  |  118|  41.3k|#define LEN_SUBFR 64
  ------------------
  517|       |
  518|  41.3k|    if (mod[0] != 0 && (len_subfrm == LEN_FRAME || mod[1] != 0)) {
  ------------------
  |  |   26|  38.6k|#define LEN_FRAME 256
  ------------------
  |  Branch (518:9): [True: 19.3k, False: 22.0k]
  |  Branch (518:25): [True: 14.1k, False: 5.20k]
  |  Branch (518:52): [True: 1.67k, False: 3.52k]
  ------------------
  519|  15.8k|      num_samples = min(len_subfrm, MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   75|  15.8k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 15.8k, False: 0]
  |  |  ------------------
  ------------------
  520|  25.5k|    } else {
  521|  25.5k|      num_samples = min(2 * len_subfrm, MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   75|  25.5k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 8.56k, False: 16.9k]
  |  |  ------------------
  ------------------
  522|  25.5k|    }
  523|  41.3k|    ixheaacd_mem_cpy(ptr_tmp + 2 * len_subfrm - num_samples,
  524|  41.3k|                     xcitation_curr - num_samples, num_samples);
  525|  41.3k|  }
  526|       |
  527|  89.5k|  k = 0;
  528|       |
  529|   416k|  while (k < 4) {
  ------------------
  |  Branch (529:10): [True: 326k, False: 89.5k]
  ------------------
  530|   326k|    if (usac_data->ec_flag && usac_data->frame_ok == 0) {
  ------------------
  |  Branch (530:9): [True: 0, False: 326k]
  |  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|   326k|    mode = mod[k];
  539|   326k|    if ((st->mode_prev == 0) && (mode > 0) &&
  ------------------
  |  Branch (539:9): [True: 187k, False: 139k]
  |  Branch (539:33): [True: 70.2k, False: 117k]
  ------------------
  540|  70.2k|        (k != 0 || st->bpf_active_prev == 1)) {
  ------------------
  |  Branch (540:10): [True: 32.2k, False: 37.9k]
  |  Branch (540:20): [True: 6.92k, False: 31.0k]
  ------------------
  541|  39.2k|      i = (k * num_subfr) + num_subfr_by2;
  542|  39.2k|      pitch[i + 1] = pitch[i] = pitch[i - 1];
  543|  39.2k|      pitch_gain[i + 1] = pitch_gain[i] = pitch_gain[i - 1];
  544|  39.2k|    }
  545|   326k|    if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (545:9): [True: 0, False: 326k]
  ------------------
  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|   326k|    } else {
  548|   326k|      if ((mode == 0) || (mode == 1))
  ------------------
  |  Branch (548:11): [True: 201k, False: 125k]
  |  Branch (548:26): [True: 94.8k, False: 30.2k]
  ------------------
  549|   296k|        memcpy(lsf_curr, &lsf_flt[(k + 1) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|   296k|#define ORDER 16
  ------------------
                      memcpy(lsf_curr, &lsf_flt[(k + 1) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|   296k|#define ORDER 16
  ------------------
  550|  30.2k|      else if (mode == 2)
  ------------------
  |  Branch (550:16): [True: 29.7k, False: 546]
  ------------------
  551|  29.7k|        memcpy(lsf_curr, &lsf_flt[(k + 2) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|  29.7k|#define ORDER 16
  ------------------
                      memcpy(lsf_curr, &lsf_flt[(k + 2) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|  29.7k|#define ORDER 16
  ------------------
  552|    546|      else
  553|    546|        memcpy(lsf_curr, &lsf_flt[(k + 4) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|    546|#define ORDER 16
  ------------------
                      memcpy(lsf_curr, &lsf_flt[(k + 4) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|    546|#define ORDER 16
  ------------------
  554|   326k|    }
  555|       |
  556|   326k|    ixheaacd_lsf_2_lsp_conversion_float(lsf_curr, lsp_curr, ORDER);
  ------------------
  |  |   30|   326k|#define ORDER 16
  ------------------
  557|   326k|    if (usac_data->frame_ok) {
  ------------------
  |  Branch (557:9): [True: 326k, False: 0]
  ------------------
  558|   326k|      tmp = 0.0f;
  559|  5.55M|      for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  5.55M|#define ORDER 16
  ------------------
  |  Branch (559:19): [True: 5.22M, False: 326k]
  ------------------
  560|  5.22M|        tmp += (lsf_curr[i] - st->lsf_prev[i]) * (lsf_curr[i] - st->lsf_prev[i]);
  561|  5.22M|      }
  562|   326k|      stability_factor = (FLOAT32)(1.25f - (tmp / 400000.0f));
  563|   326k|      if (stability_factor > 1.0f) {
  ------------------
  |  Branch (563:11): [True: 71.0k, False: 255k]
  ------------------
  564|  71.0k|        stability_factor = 1.0f;
  565|  71.0k|      }
  566|   326k|      if (stability_factor < 0.0f) {
  ------------------
  |  Branch (566:11): [True: 157k, False: 169k]
  ------------------
  567|   157k|        stability_factor = 0.0f;
  568|   157k|      }
  569|   326k|      if (usac_data->ec_flag) {
  ------------------
  |  Branch (569:11): [True: 0, False: 326k]
  ------------------
  570|      0|        usac_data->stability_factor_old = stability_factor;
  571|      0|      }
  572|   326k|    }
  573|   326k|    if (usac_data->ec_flag && !(usac_data->frame_ok)) {
  ------------------
  |  Branch (573:9): [True: 0, False: 326k]
  |  Branch (573:31): [True: 0, False: 0]
  ------------------
  574|      0|      stability_factor = usac_data->stability_factor_old;
  575|      0|    }
  576|   326k|    if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (576:9): [True: 0, False: 326k]
  ------------------
  577|      0|      mode = st->mode_prev;
  578|      0|    }
  579|   326k|    if ((usac_data->frame_ok == 1 && mode == 0) ||
  ------------------
  |  Branch (579:10): [True: 326k, False: 0]
  |  Branch (579:38): [True: 201k, False: 125k]
  ------------------
  580|   201k|        (usac_data->frame_ok == 0 && (st->mode_prev == 0 || st->mode_prev == 1))) {
  ------------------
  |  Branch (580:10): [True: 0, False: 125k]
  |  Branch (580:39): [True: 0, False: 0]
  |  Branch (580:61): [True: 0, False: 0]
  ------------------
  581|   201k|      ixheaacd_interpolation_lsp_params(st->lspold, lsp_curr, lp_flt_coff_a, num_subfr);
  582|       |
  583|   201k|      if (usac_data->frame_ok == 1 || (usac_data->frame_ok == 0 && st->mode_prev == 0)) {
  ------------------
  |  Branch (583:11): [True: 201k, False: 0]
  |  Branch (583:40): [True: 0, False: 0]
  |  Branch (583:68): [True: 0, False: 0]
  ------------------
  584|   201k|        ixheaacd_acelp_alias_cnx(usac_data, pstr_td_frame_data, k, lp_flt_coff_a,
  585|   201k|                                 stability_factor, st);
  586|   201k|      }
  587|       |
  588|   201k|      if (usac_data->frame_ok == 0 && st->mode_prev == 1) {
  ------------------
  |  Branch (588:11): [True: 0, False: 201k]
  |  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|   201k|      if ((st->mode_prev != 0) && bpf_control_info) {
  ------------------
  |  Branch (592:11): [True: 84.4k, False: 117k]
  |  Branch (592:35): [True: 27.4k, False: 57.0k]
  ------------------
  593|  27.4k|        i = (k * num_subfr) + num_subfr_by2;
  594|  27.4k|        pitch[i - 1] = pitch[i];
  595|  27.4k|        pitch_gain[i - 1] = pitch_gain[i];
  596|  27.4k|        if (st->mode_prev != -2) {
  ------------------
  |  Branch (596:13): [True: 26.2k, False: 1.13k]
  ------------------
  597|  26.2k|          pitch[i - 2] = pitch[i];
  598|  26.2k|          pitch_gain[i - 2] = pitch_gain[i];
  599|  26.2k|        }
  600|  27.4k|      }
  601|   201k|      k++;
  602|   201k|    } else {
  603|   125k|      if (mode == 1) {
  ------------------
  |  Branch (603:11): [True: 94.8k, False: 30.2k]
  ------------------
  604|  94.8k|        subfr_len = len_subfrm;
  605|  94.8k|        n_subfr = num_subfr;
  606|  94.8k|      } else if (mode == 2) {
  ------------------
  |  Branch (606:18): [True: 29.7k, False: 546]
  ------------------
  607|  29.7k|        subfr_len = len_subfrm << 1;
  608|  29.7k|        n_subfr = num_subfr_in_superfr / 2;
  609|  29.7k|      } else if (mode == 3) {
  ------------------
  |  Branch (609:18): [True: 546, False: 0]
  ------------------
  610|    546|        subfr_len = len_subfrm << 2;
  611|    546|        n_subfr = num_subfr_in_superfr;
  612|    546|      } 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|   125k|      ixheaacd_lpc_coef_gen(st->lspold, lsp_curr, lp_flt_coff_a, n_subfr,
  621|   125k|                            ORDER);
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
  622|       |
  623|   125k|      err = ixheaacd_tcx_mdct(usac_data, pstr_td_frame_data, k, lp_flt_coff_a,
  624|   125k|                              subfr_len, st);
  625|   125k|      if (err) return err;
  ------------------
  |  Branch (625:11): [True: 0, False: 125k]
  ------------------
  626|   125k|      if (usac_data->frame_ok == 1 && k == 2) {
  ------------------
  |  Branch (626:11): [True: 125k, False: 0]
  |  Branch (626:39): [True: 32.7k, False: 92.3k]
  ------------------
  627|  32.7k|        memcpy(usac_data->lp_flt_coff_a_ec, &lp_flt_coff_a[k * (ORDER + 1)],
  ------------------
  |  |   30|  32.7k|#define ORDER 16
  ------------------
  628|  32.7k|               sizeof(usac_data->lp_flt_coff_a_ec));
  629|  32.7k|      }
  630|   125k|      k += (1 << (mode - 1));
  631|   125k|    }
  632|       |
  633|   326k|    st->mode_prev = mode;
  634|   326k|    if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (634:9): [True: 0, False: 326k]
  ------------------
  635|      0|      memcpy(usac_data->lspold_ec, st->lspold, sizeof(st->lspold));
  636|      0|    }
  637|   326k|    ixheaacd_mem_cpy(lsp_curr, st->lspold, ORDER);
  ------------------
  |  |   30|   326k|#define ORDER 16
  ------------------
  638|   326k|    ixheaacd_mem_cpy(lsf_curr, st->lsf_prev, ORDER);
  ------------------
  |  |   30|   326k|#define ORDER 16
  ------------------
  639|   326k|  }
  640|       |
  641|  89.5k|  ixheaacd_mem_cpy(xcitation_buff + len_fr, st->xcitation_prev,
  642|  89.5k|                   MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   55|  89.5k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  89.5k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  89.5k|   (6 *           \
  |  |   57|  89.5k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  89.5k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  89.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  89.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  ------------------
  ------------------
                                 MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   51|  89.5k|#define INTER_LP_FIL_ORDER 16
  ------------------
  643|       |
  644|  89.5k|  ixheaacd_mem_cpy(synth_buf + len_fr, st->synth_prev, MAX_PITCH + synth_delay);
  ------------------
  |  |   55|  89.5k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  89.5k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  89.5k|   (6 *           \
  |  |   57|  89.5k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  89.5k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  89.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  89.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  ------------------
  ------------------
  645|       |
  646|  89.5k|  if (!bpf_control_info) {
  ------------------
  |  Branch (646:7): [True: 59.7k, False: 29.8k]
  ------------------
  647|  59.7k|    if (mod[0] != 0 && st->bpf_active_prev) {
  ------------------
  |  Branch (647:9): [True: 44.8k, False: 14.8k]
  |  Branch (647:24): [True: 2.44k, False: 42.4k]
  ------------------
  648|  32.8k|      for (i = 2; i < num_subfr_in_superfr; i++)
  ------------------
  |  Branch (648:19): [True: 30.4k, False: 2.44k]
  ------------------
  649|  30.4k|        pitch_gain[num_subfr_by2 + i] = 0.0;
  650|  57.2k|    } else {
  651|   901k|      for (i = 0; i < num_subfr_in_superfr; i++)
  ------------------
  |  Branch (651:19): [True: 844k, False: 57.2k]
  ------------------
  652|   844k|        pitch_gain[num_subfr_by2 + i] = 0.0;
  653|  57.2k|    }
  654|  59.7k|  }
  655|  89.5k|  st->bpf_active_prev = bpf_control_info;
  656|       |
  657|   663k|  for (i = 0; i < num_subfr_by2; i++) {
  ------------------
  |  Branch (657:15): [True: 573k, False: 89.5k]
  ------------------
  658|   573k|    st->pitch_prev[i] = pitch[num_subfr_in_superfr + i];
  659|   573k|    st->gain_prev[i] = pitch_gain[num_subfr_in_superfr + i];
  660|   573k|  }
  661|       |
  662|  89.5k|  synth = synth_buf + MAX_PITCH;
  ------------------
  |  |   55|  89.5k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  89.5k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  89.5k|   (6 *           \
  |  |   57|  89.5k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  89.5k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  89.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  89.5k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  89.5k|#define TMIN 34
  |  |  ------------------
  ------------------
  663|       |
  664|  1.41M|  for (i = 0; i < num_subfr_in_superfr; i++) {
  ------------------
  |  Branch (664:15): [True: 1.32M, False: 89.5k]
  ------------------
  665|  1.32M|    tp = pitch[i];
  666|  1.32M|    gain = pitch_gain[i];
  667|  1.32M|    if (gain > 0.0f) {
  ------------------
  |  Branch (667:9): [True: 326k, False: 1.00M]
  ------------------
  668|   326k|      synth_corr = 0.0f, synth_energy = 1e-6f;
  669|   326k|      if ((((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |  118|   326k|#define LEN_SUBFR 64
  ------------------
                    if ((((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |  118|   326k|#define LEN_SUBFR 64
  ------------------
                    if ((((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |   25|   326k|#define LEN_SUPERFRAME 1024
  ------------------
  |  Branch (669:11): [True: 0, False: 326k]
  ------------------
  670|   326k|          ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |  118|   326k|#define LEN_SUBFR 64
  ------------------
                        ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |  118|   326k|#define LEN_SUBFR 64
  ------------------
                        ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |   25|   326k|#define LEN_SUPERFRAME 1024
  ------------------
  |  Branch (670:11): [True: 0, False: 326k]
  ------------------
  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|  21.2M|      for (k = 0; k < LEN_SUBFR; k++) {
  ------------------
  |  |  118|  21.2M|#define LEN_SUBFR 64
  ------------------
  |  Branch (676:19): [True: 20.9M, False: 326k]
  ------------------
  677|  20.9M|        synth_corr +=
  678|  20.9M|            synth[i * LEN_SUBFR + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  20.9M|#define LEN_SUBFR 64
  ------------------
                          synth[i * LEN_SUBFR + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  20.9M|#define LEN_SUBFR 64
  ------------------
  679|  20.9M|        synth_energy +=
  680|  20.9M|            synth[(i * LEN_SUBFR) - tp + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  20.9M|#define LEN_SUBFR 64
  ------------------
                          synth[(i * LEN_SUBFR) - tp + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  20.9M|#define LEN_SUBFR 64
  ------------------
  681|  20.9M|      }
  682|   326k|      pitch_gain[i] = synth_corr / synth_energy;
  683|   326k|    }
  684|  1.32M|  }
  685|       |
  686|  89.5k|  if (mod[3] == 0) {
  ------------------
  |  Branch (686:7): [True: 66.0k, False: 23.4k]
  ------------------
  687|  66.0k|    err = ixheaacd_bass_post_filter(synth, pitch, pitch_gain, fsynth, len_fr, synth_delay,
  688|  66.0k|                                    st->bpf_prev, usac_data->ec_flag);
  689|  66.0k|  } else {
  690|  23.4k|    err = ixheaacd_bass_post_filter(synth, pitch, pitch_gain, fsynth, len_fr,
  691|  23.4k|                                    synth_delay - (len_subfrm / 2), st->bpf_prev,
  692|  23.4k|                                    usac_data->ec_flag);
  693|  23.4k|  }
  694|  89.5k|  if (err) return err;
  ------------------
  |  Branch (694:7): [True: 37, False: 89.4k]
  ------------------
  695|  89.4k|  if (usac_data->ec_flag && usac_data->frame_ok) {
  ------------------
  |  Branch (695:7): [True: 0, False: 89.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|  89.4k|  return err;
  703|  89.5k|}
ixheaacd_lpd_dec_update:
  706|  18.1k|                             ia_usac_data_struct *usac_data, WORD32 i_ch) {
  707|  18.1k|  WORD32 i, k;
  708|       |
  709|  18.1k|  WORD32 *ptr_overlap = &usac_data->overlap_data_ptr[i_ch][0];
  710|  18.1k|  WORD32 len_fr, lpd_sbf_len, lpd_delay, num_subfr_by2, synth_delay, fac_length;
  711|       |
  712|  18.1k|  if (usac_data->tw_mdct[0])
  ------------------
  |  Branch (712:7): [True: 0, False: 18.1k]
  ------------------
  713|      0|    ptr_overlap = &usac_data->overlap_data_ptr[i_ch][usac_data->ccfl / 2];
  714|       |
  715|  18.1k|  len_fr = usac_data->ccfl;
  716|  18.1k|  lpd_sbf_len = (NUM_FRAMES * usac_data->num_subfrm) / 2;
  ------------------
  |  |   27|  18.1k|#define NUM_FRAMES 4
  ------------------
  717|  18.1k|  lpd_delay = lpd_sbf_len * LEN_SUBFR;
  ------------------
  |  |  118|  18.1k|#define LEN_SUBFR 64
  ------------------
  718|  18.1k|  num_subfr_by2 = lpd_sbf_len - 1;
  719|  18.1k|  synth_delay = num_subfr_by2 * LEN_SUBFR;
  ------------------
  |  |  118|  18.1k|#define LEN_SUBFR 64
  ------------------
  720|  18.1k|  fac_length = (usac_data->len_subfrm) / 2;
  721|       |
  722|  8.95M|  for (i = 0; i < LEN_SUBFR + synth_delay; i++)
  ------------------
  |  |  118|  8.95M|#define LEN_SUBFR 64
  ------------------
  |  Branch (722:15): [True: 8.93M, False: 18.1k]
  ------------------
  723|  8.93M|    ptr_overlap[i] = (WORD32)(
  724|  8.93M|        (FLOAT32)tddec->synth_prev[MAX_PITCH - (LEN_SUBFR) + i] * 16384.0);
  ------------------
  |  |   55|  8.93M|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  8.93M|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  8.93M|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  8.93M|   (6 *           \
  |  |   57|  8.93M|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  8.93M|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  8.93M|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  8.93M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  8.93M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  8.93M|#define TMIN 34
  |  |  ------------------
  ------------------
                      (FLOAT32)tddec->synth_prev[MAX_PITCH - (LEN_SUBFR) + i] * 16384.0);
  ------------------
  |  |  118|  8.93M|#define LEN_SUBFR 64
  ------------------
  725|       |
  726|  18.1k|  ptr_overlap += LEN_SUBFR + synth_delay - fac_length;
  ------------------
  |  |  118|  18.1k|#define LEN_SUBFR 64
  ------------------
  727|       |
  728|  4.48M|  for (k = 0; k < 2 * fac_length; k++)
  ------------------
  |  Branch (728:15): [True: 4.46M, False: 18.1k]
  ------------------
  729|  4.46M|    ptr_overlap[k] = (WORD32)((FLOAT32)tddec->exc_prev[k + 1] * 16384.0);
  730|       |
  731|  18.1k|  ptr_overlap = &usac_data->overlap_data_ptr[i_ch][lpd_delay + fac_length];
  732|       |
  733|  6.72M|  for (i = 0; i < len_fr - lpd_delay - fac_length; i++) ptr_overlap[i] = 0;
  ------------------
  |  Branch (733:15): [True: 6.70M, False: 18.1k]
  ------------------
  734|       |
  735|  18.1k|  usac_data->window_shape[i_ch] = WIN_SEL_0;
  ------------------
  |  |   91|  18.1k|#define WIN_SEL_0 0
  ------------------
  736|  18.1k|  usac_data->window_sequence_last[i_ch] = EIGHT_SHORT_SEQUENCE;
  ------------------
  |  |  102|  18.1k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  737|  18.1k|  usac_data->td_frame_prev[i_ch] = 1;
  738|       |
  739|  18.1k|  if (tddec->mode_prev == 0) {
  ------------------
  |  Branch (739:7): [True: 12.7k, False: 5.38k]
  ------------------
  740|  12.7k|    memmove(usac_data->lpc_prev[i_ch], &tddec->lp_flt_coeff_a_prev[ORDER + 1],
  ------------------
  |  |   30|  12.7k|#define ORDER 16
  ------------------
  741|  12.7k|            (ORDER + 1) * sizeof(FLOAT32));
  ------------------
  |  |   30|  12.7k|#define ORDER 16
  ------------------
  742|  12.7k|    memmove(usac_data->acelp_in[i_ch], tddec->exc_prev,
  743|  12.7k|            (1 + (2 * FAC_LENGTH)) * sizeof(FLOAT32));
  ------------------
  |  |   33|  12.7k|#define FAC_LENGTH 128
  ------------------
  744|  12.7k|  }
  745|       |
  746|  18.1k|  return;
  747|  18.1k|}
ixheaacd_lpd_bpf_fix:
  751|  35.7k|                            ia_usac_lpd_decoder_handle st) {
  752|  35.7k|  WORD32 i, tp, k;
  753|  35.7k|  float synth_buf[MAX_PITCH + SYNTH_DELAY_LMAX + LEN_SUPERFRAME];
  754|  35.7k|  float signal_out[LEN_SUPERFRAME];
  755|  35.7k|  float *synth, synth_corr, synth_energy;
  756|  35.7k|  WORD32 pitch[NUM_SUBFR_SUPERFRAME_BY2 + 3];
  757|  35.7k|  float pitch_gain[NUM_SUBFR_SUPERFRAME_BY2 + 3];
  758|  35.7k|  WORD32 len_fr, lpd_sbf_len, num_subfr_by2, synth_delay;
  759|  35.7k|  WORD32 err = 0;
  760|       |
  761|  35.7k|  len_fr = usac_data->ccfl;
  762|  35.7k|  lpd_sbf_len = (NUM_FRAMES * usac_data->num_subfrm) / 2;
  ------------------
  |  |   27|  35.7k|#define NUM_FRAMES 4
  ------------------
  763|  35.7k|  num_subfr_by2 = lpd_sbf_len - 1;
  764|  35.7k|  synth_delay = num_subfr_by2 * LEN_SUBFR;
  ------------------
  |  |  118|  35.7k|#define LEN_SUBFR 64
  ------------------
  765|       |
  766|  35.7k|  ixheaacd_memset(synth_buf, MAX_PITCH + synth_delay + len_fr);
  ------------------
  |  |   55|  35.7k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  35.7k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  35.7k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  35.7k|   (6 *           \
  |  |   57|  35.7k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  35.7k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  35.7k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  35.7k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  35.7k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  35.7k|#define TMIN 34
  |  |  ------------------
  ------------------
  767|  35.7k|  ixheaacd_mem_cpy(st->synth_prev, synth_buf, MAX_PITCH + synth_delay);
  ------------------
  |  |   55|  35.7k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  35.7k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  35.7k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  35.7k|   (6 *           \
  |  |   57|  35.7k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  35.7k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  35.7k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  35.7k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  35.7k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  35.7k|#define TMIN 34
  |  |  ------------------
  ------------------
  768|  35.7k|  ixheaacd_mem_cpy(out_buffer, synth_buf + MAX_PITCH - (LEN_SUBFR),
  ------------------
  |  |   55|  35.7k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  35.7k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  35.7k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  35.7k|   (6 *           \
  |  |   57|  35.7k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  35.7k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  35.7k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  35.7k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  35.7k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  35.7k|#define TMIN 34
  |  |  ------------------
  ------------------
                ixheaacd_mem_cpy(out_buffer, synth_buf + MAX_PITCH - (LEN_SUBFR),
  ------------------
  |  |  118|  35.7k|#define LEN_SUBFR 64
  ------------------
  769|  35.7k|                   synth_delay + len_fr + (LEN_SUBFR));
  ------------------
  |  |  118|  35.7k|#define LEN_SUBFR 64
  ------------------
  770|       |
  771|   275k|  for (i = 0; i < num_subfr_by2; i++) {
  ------------------
  |  Branch (771:15): [True: 239k, False: 35.7k]
  ------------------
  772|   239k|    pitch[i] = st->pitch_prev[i];
  773|   239k|    pitch_gain[i] = st->gain_prev[i];
  774|   239k|  }
  775|   178k|  for (i = num_subfr_by2; i < lpd_sbf_len + 3; i++) {
  ------------------
  |  Branch (775:27): [True: 143k, False: 35.7k]
  ------------------
  776|   143k|    pitch[i] = 64;
  777|   143k|    pitch_gain[i] = 0.0f;
  778|   143k|  }
  779|  35.7k|  if (st->mode_prev == 0) {
  ------------------
  |  Branch (779:7): [True: 27.6k, False: 8.13k]
  ------------------
  780|  27.6k|    pitch[num_subfr_by2] = pitch[num_subfr_by2 - 1];
  781|  27.6k|    pitch_gain[num_subfr_by2] = pitch_gain[num_subfr_by2 - 1];
  782|  27.6k|    if (!is_short_flag) {
  ------------------
  |  Branch (782:9): [True: 17.8k, False: 9.84k]
  ------------------
  783|  17.8k|      pitch[num_subfr_by2 + 1] = pitch[num_subfr_by2];
  784|  17.8k|      pitch_gain[num_subfr_by2 + 1] = pitch_gain[num_subfr_by2];
  785|  17.8k|    }
  786|  27.6k|  }
  787|       |
  788|  35.7k|  synth = synth_buf + MAX_PITCH;
  ------------------
  |  |   55|  35.7k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  35.7k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  35.7k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  35.7k|   (6 *           \
  |  |   57|  35.7k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  35.7k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  35.7k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  35.7k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  35.7k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  35.7k|#define TMIN 34
  |  |  ------------------
  ------------------
  789|       |
  790|   347k|  for (i = 0; i < num_subfr_by2 + 2; i++) {
  ------------------
  |  Branch (790:15): [True: 311k, False: 35.7k]
  ------------------
  791|   311k|    tp = pitch[i];
  792|   311k|    if ((i * LEN_SUBFR + MAX_PITCH) < tp) {
  ------------------
  |  |  118|   311k|#define LEN_SUBFR 64
  ------------------
                  if ((i * LEN_SUBFR + MAX_PITCH) < tp) {
  ------------------
  |  |   55|   311k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|   311k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   311k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|   311k|   (6 *           \
  |  |   57|   311k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|   311k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   311k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   311k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   311k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   311k|#define TMIN 34
  |  |  ------------------
  ------------------
  |  Branch (792:9): [True: 17, False: 311k]
  ------------------
  793|     17|      if (usac_data->ec_flag == 0)
  ------------------
  |  Branch (793:11): [True: 17, False: 0]
  ------------------
  794|     17|        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|   311k|    } else if (((i * LEN_SUBFR + MAX_PITCH - tp) >= 1883) ||
  ------------------
  |  |  118|   311k|#define LEN_SUBFR 64
  ------------------
                  } else if (((i * LEN_SUBFR + MAX_PITCH - tp) >= 1883) ||
  ------------------
  |  |   55|   311k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|   311k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   311k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|   311k|   (6 *           \
  |  |   57|   311k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|   311k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   311k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   311k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   311k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   311k|#define TMIN 34
  |  |  ------------------
  ------------------
  |  Branch (798:16): [True: 0, False: 311k]
  ------------------
  799|   311k|               (((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |  118|   311k|#define LEN_SUBFR 64
  ------------------
                             (((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |  118|   311k|#define LEN_SUBFR 64
  ------------------
                             (((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |   25|   311k|#define LEN_SUPERFRAME 1024
  ------------------
  |  Branch (799:16): [True: 0, False: 311k]
  ------------------
  800|   311k|               ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |  118|   311k|#define LEN_SUBFR 64
  ------------------
                             ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |  118|   311k|#define LEN_SUBFR 64
  ------------------
                             ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |   25|   311k|#define LEN_SUPERFRAME 1024
  ------------------
  |  Branch (800:16): [True: 0, False: 311k]
  ------------------
  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|   311k|    if (pitch_gain[i] > 0.0f) {
  ------------------
  |  Branch (808:9): [True: 33.9k, False: 277k]
  ------------------
  809|  33.9k|      synth_corr = 0.0f, synth_energy = 1e-6f;
  810|  2.20M|      for (k = 0; k < LEN_SUBFR; k++) {
  ------------------
  |  |  118|  2.20M|#define LEN_SUBFR 64
  ------------------
  |  Branch (810:19): [True: 2.17M, False: 33.9k]
  ------------------
  811|  2.17M|        synth_corr +=
  812|  2.17M|            synth[i * LEN_SUBFR + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  2.17M|#define LEN_SUBFR 64
  ------------------
                          synth[i * LEN_SUBFR + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  2.17M|#define LEN_SUBFR 64
  ------------------
  813|  2.17M|        synth_energy +=
  814|  2.17M|            synth[(i * LEN_SUBFR) - tp + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  2.17M|#define LEN_SUBFR 64
  ------------------
                          synth[(i * LEN_SUBFR) - tp + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  2.17M|#define LEN_SUBFR 64
  ------------------
  815|  2.17M|      }
  816|  33.9k|      pitch_gain[i] = synth_corr / synth_energy;
  817|  33.9k|    }
  818|   311k|  }
  819|       |
  820|  35.7k|  err = ixheaacd_bass_post_filter(
  821|  35.7k|      synth, pitch, pitch_gain, signal_out, (lpd_sbf_len + 2) * LEN_SUBFR + LEN_SUBFR,
  ------------------
  |  |  118|  35.7k|#define LEN_SUBFR 64
  ------------------
                    synth, pitch, pitch_gain, signal_out, (lpd_sbf_len + 2) * LEN_SUBFR + LEN_SUBFR,
  ------------------
  |  |  118|  35.7k|#define LEN_SUBFR 64
  ------------------
  822|  35.7k|      len_fr - (lpd_sbf_len + 4) * LEN_SUBFR, st->bpf_prev, usac_data->ec_flag);
  ------------------
  |  |  118|  35.7k|#define LEN_SUBFR 64
  ------------------
  823|  35.7k|  if (err != 0) return err;
  ------------------
  |  Branch (823:7): [True: 68, False: 35.7k]
  ------------------
  824|       |
  825|  35.7k|  ixheaacd_mem_cpy(signal_out, out_buffer,
  826|  35.7k|                   (lpd_sbf_len + 2) * LEN_SUBFR + LEN_SUBFR);
  ------------------
  |  |  118|  35.7k|#define LEN_SUBFR 64
  ------------------
                                 (lpd_sbf_len + 2) * LEN_SUBFR + LEN_SUBFR);
  ------------------
  |  |  118|  35.7k|#define LEN_SUBFR 64
  ------------------
  827|  35.7k|  return err;
  828|  35.7k|}
ixheaacd_lpc.c:ixheaacd_mult32_m:
   91|  4.22M|static PLATFORM_INLINE WORD32 ixheaacd_mult32_m(WORD32 a, WORD32 b) {
   92|  4.22M|  WORD32 result;
   93|  4.22M|  WORD64 temp_result;
   94|       |
   95|  4.22M|  temp_result = (WORD64)a * (WORD64)b;
   96|  4.22M|  result = (WORD32)(temp_result >> 31);
   97|       |
   98|  4.22M|  return (result);
   99|  4.22M|}
ixheaacd_lpc.c:ixheaacd_lsf_2_lsp_conversion_float:
  217|   387k|                                                WORD32 m) {
  218|   387k|  WORD32 i;
  219|  6.58M|  for (i = 0; i < m; i++)
  ------------------
  |  Branch (219:15): [True: 6.19M, False: 387k]
  ------------------
  220|  6.19M|    lsp[i] = (FLOAT32)cos((double)lsf[i] * (double)PI_BY_6400);
  ------------------
  |  |  205|  6.19M|#define PI_BY_6400 (PI / 6400.0)
  |  |  ------------------
  |  |  |  |  153|  6.19M|#define PI 3.14159265358979323846264338327950288
  |  |  ------------------
  ------------------
  221|       |
  222|   387k|  return;
  223|   387k|}
ixheaacd_lpc.c:ixheaacd_bass_post_filter:
  227|   125k|                                        FLOAT32 bpf_prev[], WORD32 ec_flag) {
  228|   125k|  WORD32 i, j, sf, num_subfr, pitch_lag, lg;
  229|   125k|  FLOAT32 x_energy, xy_corr, y_energy, norm_corr, energy, gain, tmp, alpha;
  230|   125k|  FLOAT32 noise_buf[FILTER_DELAY + (2 * LEN_SUBFR)], *noise_tmp1, *noise_tmp2,
  231|   125k|      *x, *y;
  232|       |
  233|   125k|  noise_tmp1 = noise_buf + FILTER_DELAY;
  ------------------
  |  |   43|   125k|#define FILTER_DELAY 12
  ------------------
  234|   125k|  noise_tmp2 = noise_buf + FILTER_DELAY + LEN_SUBFR;
  ------------------
  |  |   43|   125k|#define FILTER_DELAY 12
  ------------------
                noise_tmp2 = noise_buf + FILTER_DELAY + LEN_SUBFR;
  ------------------
  |  |  118|   125k|#define LEN_SUBFR 64
  ------------------
  235|       |
  236|   125k|  memcpy(synth_out, synth_sig - LEN_SUBFR, len_fr * sizeof(FLOAT32));
  ------------------
  |  |  118|   125k|#define LEN_SUBFR 64
  ------------------
  237|       |
  238|   125k|  if (len_fr % 64)
  ------------------
  |  Branch (238:7): [True: 0, False: 125k]
  ------------------
  239|      0|    memset(synth_out + len_fr, 0, (LEN_SUBFR - len_fr % 64) * sizeof(FLOAT32));
  ------------------
  |  |  118|      0|#define LEN_SUBFR 64
  ------------------
  240|       |
  241|   125k|  sf = 0;
  242|  1.83M|  for (num_subfr = 0; num_subfr < len_fr; num_subfr += LEN_SUBFR, sf++) {
  ------------------
  |  |  118|  1.70M|#define LEN_SUBFR 64
  ------------------
  |  Branch (242:23): [True: 1.70M, False: 125k]
  ------------------
  243|  1.70M|    pitch_lag = pitch[sf];
  244|  1.70M|    gain = pitch_gain[sf];
  245|  1.70M|    if (((pitch_lag >> 1) + 96 - num_subfr) > MAX_PITCH) {
  ------------------
  |  |   55|  1.70M|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  1.70M|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.70M|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  1.70M|   (6 *           \
  |  |   57|  1.70M|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  1.70M|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  1.70M|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  1.70M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  1.70M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  1.70M|#define TMIN 34
  |  |  ------------------
  ------------------
  |  Branch (245:9): [True: 1, False: 1.70M]
  ------------------
  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.70M|    if (gain > 1.0f) gain = 1.0f;
  ------------------
  |  Branch (252:9): [True: 32.2k, False: 1.67M]
  ------------------
  253|  1.70M|    if (gain < 0.0f) gain = 0.0f;
  ------------------
  |  Branch (253:9): [True: 79.5k, False: 1.62M]
  ------------------
  254|       |
  255|  1.70M|    x = &synth_sig[num_subfr - 96];
  256|  1.70M|    y = &synth_sig[num_subfr - pitch_lag / 2 - 96];
  257|       |
  258|  1.70M|    x_energy = 0.01f;
  259|  1.70M|    xy_corr = 0.01f;
  260|  1.70M|    y_energy = 0.01f;
  261|   275M|    for (i = 0; i < LEN_SUBFR + 96; i++) {
  ------------------
  |  |  118|   275M|#define LEN_SUBFR 64
  ------------------
  |  Branch (261:17): [True: 273M, False: 1.70M]
  ------------------
  262|   273M|      x_energy += x[i] * x[i];
  263|   273M|      xy_corr += x[i] * y[i];
  264|   273M|      y_energy += y[i] * y[i];
  265|   273M|    }
  266|       |
  267|  1.70M|    norm_corr = xy_corr / (FLOAT32)sqrt(x_energy * y_energy);
  268|       |
  269|  1.70M|    if (norm_corr > 0.95f) pitch_lag >>= 1;
  ------------------
  |  Branch (269:9): [True: 373k, False: 1.33M]
  ------------------
  270|       |
  271|  1.70M|    lg = len_fr + len2 - pitch_lag - num_subfr;
  272|  1.70M|    if (lg < 0) lg = 0;
  ------------------
  |  Branch (272:9): [True: 412, False: 1.70M]
  ------------------
  273|  1.70M|    if (lg > LEN_SUBFR) lg = LEN_SUBFR;
  ------------------
  |  |  118|  1.70M|#define LEN_SUBFR 64
  ------------------
                  if (lg > LEN_SUBFR) lg = LEN_SUBFR;
  ------------------
  |  |  118|  1.70M|#define LEN_SUBFR 64
  ------------------
  |  Branch (273:9): [True: 1.70M, False: 1.02k]
  ------------------
  274|       |
  275|  1.70M|    if (pitch_lag > MAX_PITCH) {
  ------------------
  |  |   55|  1.70M|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  1.70M|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.70M|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  1.70M|   (6 *           \
  |  |   57|  1.70M|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  1.70M|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  1.70M|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  1.70M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  1.70M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  1.70M|#define TMIN 34
  |  |  ------------------
  ------------------
  |  Branch (275:9): [True: 104, False: 1.70M]
  ------------------
  276|    104|      if (ec_flag) {
  ------------------
  |  Branch (276:11): [True: 0, False: 104]
  ------------------
  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|    104|      } else {
  279|    104|        return -1;
  280|    104|      }
  281|    104|    }
  282|       |
  283|  1.70M|    if (gain > 0) {
  ------------------
  |  Branch (283:9): [True: 208k, False: 1.50M]
  ------------------
  284|   208k|      if (lg > 0) {
  ------------------
  |  Branch (284:11): [True: 208k, False: 232]
  ------------------
  285|   208k|        tmp = 0.01f;
  286|  13.5M|        for (i = 0; i < lg; i++) {
  ------------------
  |  Branch (286:21): [True: 13.3M, False: 208k]
  ------------------
  287|  13.3M|          tmp += synth_sig[i + num_subfr] * synth_sig[i + num_subfr];
  288|  13.3M|        }
  289|   208k|        energy = 0.01f;
  290|  13.5M|        for (i = 0; i < lg; i++) {
  ------------------
  |  Branch (290:21): [True: 13.3M, False: 208k]
  ------------------
  291|  13.3M|          energy += synth_sig[i + num_subfr + pitch_lag] *
  292|  13.3M|                    synth_sig[i + num_subfr + pitch_lag];
  293|  13.3M|        }
  294|   208k|        tmp = (FLOAT32)sqrt(tmp / energy);
  295|   208k|        if (tmp < gain) gain = tmp;
  ------------------
  |  Branch (295:13): [True: 44.7k, False: 164k]
  ------------------
  296|   208k|      }
  297|       |
  298|   208k|      alpha = 0.5f * gain;
  299|  13.5M|      for (i = 0; i < lg; i++) {
  ------------------
  |  Branch (299:19): [True: 13.3M, False: 208k]
  ------------------
  300|  13.3M|        noise_tmp2[i] = alpha * (synth_sig[i + num_subfr] -
  301|  13.3M|                                 0.5f * synth_sig[i + num_subfr - pitch_lag] -
  302|  13.3M|                                 0.5f * synth_sig[i + num_subfr + pitch_lag]);
  303|  13.3M|      }
  304|   237k|      for (i = lg; i < LEN_SUBFR; i++) {
  ------------------
  |  |  118|   237k|#define LEN_SUBFR 64
  ------------------
  |  Branch (304:20): [True: 28.1k, False: 208k]
  ------------------
  305|  28.1k|        noise_tmp2[i] = alpha * (synth_sig[i + num_subfr] -
  306|  28.1k|                                 synth_sig[i + num_subfr - pitch_lag]);
  307|  28.1k|      }
  308|  1.50M|    } else {
  309|  1.50M|      memset(noise_tmp2, 0, LEN_SUBFR * sizeof(FLOAT32));
  ------------------
  |  |  118|  1.50M|#define LEN_SUBFR 64
  ------------------
  310|  1.50M|    }
  311|       |
  312|  1.70M|    memcpy(noise_buf, bpf_prev, (FILTER_DELAY + LEN_SUBFR) * sizeof(FLOAT32));
  ------------------
  |  |   43|  1.70M|#define FILTER_DELAY 12
  ------------------
                  memcpy(noise_buf, bpf_prev, (FILTER_DELAY + LEN_SUBFR) * sizeof(FLOAT32));
  ------------------
  |  |  118|  1.70M|#define LEN_SUBFR 64
  ------------------
  313|  1.70M|    memcpy(bpf_prev, noise_buf + LEN_SUBFR,
  ------------------
  |  |  118|  1.70M|#define LEN_SUBFR 64
  ------------------
  314|  1.70M|           (FILTER_DELAY + LEN_SUBFR) * sizeof(FLOAT32));
  ------------------
  |  |   43|  1.70M|#define FILTER_DELAY 12
  ------------------
                         (FILTER_DELAY + LEN_SUBFR) * sizeof(FLOAT32));
  ------------------
  |  |  118|  1.70M|#define LEN_SUBFR 64
  ------------------
  315|       |
  316|   111M|    for (i = 0; i < LEN_SUBFR; i++) {
  ------------------
  |  |  118|   111M|#define LEN_SUBFR 64
  ------------------
  |  Branch (316:17): [True: 109M, False: 1.70M]
  ------------------
  317|   109M|      tmp = ixheaacd_fir_lp_filt[0] * noise_tmp1[i];
  318|  1.42G|      for (j = 1; j <= FILTER_DELAY; j++) {
  ------------------
  |  |   43|  1.42G|#define FILTER_DELAY 12
  ------------------
  |  Branch (318:19): [True: 1.31G, False: 109M]
  ------------------
  319|  1.31G|        tmp +=
  320|  1.31G|            ixheaacd_fir_lp_filt[j] * (noise_tmp1[i - j] + noise_tmp1[i + j]);
  321|  1.31G|      }
  322|   109M|      synth_out[i + num_subfr] -= tmp;
  323|   109M|    }
  324|  1.70M|  }
  325|       |
  326|   125k|  return 0;
  327|   125k|}

ixheaacd_lsf_weight_2st_flt:
   52|   156k|VOID ixheaacd_lsf_weight_2st_flt(FLOAT32 *lsfq, FLOAT32 *w, WORD32 mode) {
   53|   156k|  WORD32 i;
   54|   156k|  FLOAT32 d[ORDER + 1];
   55|       |
   56|   156k|  d[0] = lsfq[0];
   57|   156k|  d[ORDER] = FREQ_MAX - lsfq[ORDER - 1];
  ------------------
  |  |   30|   156k|#define ORDER 16
  ------------------
                d[ORDER] = FREQ_MAX - lsfq[ORDER - 1];
  ------------------
  |  |   47|   156k|#define FREQ_MAX 6400.0f
  ------------------
                d[ORDER] = FREQ_MAX - lsfq[ORDER - 1];
  ------------------
  |  |   30|   156k|#define ORDER 16
  ------------------
   58|  2.50M|  for (i = 1; i < ORDER; i++) {
  ------------------
  |  |   30|  2.50M|#define ORDER 16
  ------------------
  |  Branch (58:15): [True: 2.34M, False: 156k]
  ------------------
   59|  2.34M|    d[i] = lsfq[i] - lsfq[i - 1];
   60|  2.34M|  }
   61|       |
   62|  2.65M|  for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  2.65M|#define ORDER 16
  ------------------
  |  Branch (62:15): [True: 2.50M, False: 156k]
  ------------------
   63|  2.50M|    w[i] = (FLOAT32)((factor_table[mode] * sqrt(d[i] * d[i + 1])) / FREQ_DIV);
  ------------------
  |  |   48|  2.50M|#define FREQ_DIV 400.0f
  ------------------
   64|  2.50M|  }
   65|       |
   66|   156k|  return;
   67|   156k|}
ixheaacd_avq_first_approx_rel:
  136|   156k|WORD32 ixheaacd_avq_first_approx_rel(FLOAT32 *lsf, WORD32 *indx, WORD32 mode) {
  137|   156k|  WORD32 i;
  138|   156k|  FLOAT32 w[ORDER];
  139|   156k|  WORD32 avq[ORDER];
  140|   156k|  WORD32 position = 0;
  141|   156k|  FLOAT32 lsf_min;
  142|       |
  143|   156k|  ixheaacd_lsf_weight_2st_flt(lsf, w, mode);
  144|       |
  145|   156k|  position = ixheaacd_decoding_avq_tool(indx, avq);
  146|       |
  147|   156k|  lsf_min = LSF_GAP;
  ------------------
  |  |   46|   156k|#define LSF_GAP 50.0f
  ------------------
  148|       |
  149|  2.65M|  for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  2.65M|#define ORDER 16
  ------------------
  |  Branch (149:15): [True: 2.50M, False: 156k]
  ------------------
  150|  2.50M|    lsf[i] += (w[i] * avq[i]);
  151|       |
  152|  2.50M|    if (lsf[i] < lsf_min) lsf[i] = lsf_min;
  ------------------
  |  Branch (152:9): [True: 191k, False: 2.30M]
  ------------------
  153|       |
  154|  2.50M|    lsf_min = lsf[i] + LSF_GAP;
  ------------------
  |  |   46|  2.50M|#define LSF_GAP 50.0f
  ------------------
  155|  2.50M|  }
  156|       |
  157|   156k|  return position;
  158|   156k|}
ixheaacd_alg_vec_dequant:
  161|  89.5k|                              FLOAT32 *lsf, WORD32 mod[], WORD32 ec_flag) {
  162|  89.5k|  WORD32 i;
  163|  89.5k|  WORD32 *lpc_index, mode_lpc, pos = 0;
  164|  89.5k|  WORD32 lpc_present[5] = {0, 0, 0, 0, 0};
  165|  89.5k|  lpc_index = pstr_td_frame_data->lpc_first_approx_idx;
  166|  89.5k|  lpc_present[4] = 1;
  167|  89.5k|  pos = ixheaacd_avq_first_approx_abs(&lsf[4 * ORDER], &lpc_index[0]);
  ------------------
  |  |   30|  89.5k|#define ORDER 16
  ------------------
  168|       |
  169|  89.5k|  lpc_index += pos;
  170|       |
  171|  89.5k|  if (first_lpd_flag) {
  ------------------
  |  Branch (171:7): [True: 60.6k, False: 28.8k]
  ------------------
  172|  60.6k|    mode_lpc = lpc_index[0];
  173|  60.6k|    lpc_index++;
  174|       |
  175|  60.6k|    if (mode_lpc == 0) {
  ------------------
  |  Branch (175:9): [True: 41.0k, False: 19.5k]
  ------------------
  176|  41.0k|      pos = ixheaacd_avq_first_approx_abs(&lsf[0], &lpc_index[0]);
  177|       |
  178|  41.0k|    } else if (mode_lpc == 1) {
  ------------------
  |  Branch (178:16): [True: 19.5k, False: 0]
  ------------------
  179|   332k|      for (i = 0; i < ORDER; i++) lsf[i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   332k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   313k|#define ORDER 16
  ------------------
  |  Branch (179:19): [True: 313k, False: 19.5k]
  ------------------
  180|  19.5k|      pos = ixheaacd_avq_first_approx_rel(&lsf[0], &lpc_index[0], 3);
  181|  19.5k|    }
  182|       |
  183|  60.6k|    lpc_index += pos;
  184|  60.6k|  }
  185|  89.5k|  lpc_present[0] = 1;
  186|       |
  187|  89.5k|  if (mod[0] < 3) {
  ------------------
  |  Branch (187:7): [True: 88.9k, False: 546]
  ------------------
  188|  88.9k|    mode_lpc = lpc_index[0];
  189|  88.9k|    lpc_index++;
  190|  88.9k|    lpc_present[2] = 1;
  191|       |
  192|  88.9k|    if (mode_lpc == 0) {
  ------------------
  |  Branch (192:9): [True: 60.6k, False: 28.3k]
  ------------------
  193|  60.6k|      pos = ixheaacd_avq_first_approx_abs(&lsf[2 * ORDER], &lpc_index[0]);
  ------------------
  |  |   30|  60.6k|#define ORDER 16
  ------------------
  194|  60.6k|    } else if (mode_lpc == 1) {
  ------------------
  |  Branch (194:16): [True: 28.3k, False: 0]
  ------------------
  195|   481k|      for (i = 0; i < ORDER; i++) lsf[2 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   481k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[2 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   453k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[2 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   453k|#define ORDER 16
  ------------------
  |  Branch (195:19): [True: 453k, False: 28.3k]
  ------------------
  196|  28.3k|      pos = ixheaacd_avq_first_approx_rel(&lsf[2 * ORDER], &lpc_index[0], 3);
  ------------------
  |  |   30|  28.3k|#define ORDER 16
  ------------------
  197|  28.3k|    }
  198|       |
  199|  88.9k|    lpc_index += pos;
  200|  88.9k|  }
  201|       |
  202|  89.5k|  if (mod[0] < 2) {
  ------------------
  |  Branch (202:7): [True: 64.7k, False: 24.7k]
  ------------------
  203|  64.7k|    mode_lpc = lpc_index[0];
  204|  64.7k|    lpc_index++;
  205|  64.7k|    lpc_present[1] = 1;
  206|       |
  207|  64.7k|    if (mode_lpc == 1) {
  ------------------
  |  Branch (207:9): [True: 4.94k, False: 59.8k]
  ------------------
  208|  84.0k|      for (i = 0; i < ORDER; i++)
  ------------------
  |  |   30|  84.0k|#define ORDER 16
  ------------------
  |  Branch (208:19): [True: 79.1k, False: 4.94k]
  ------------------
  209|  79.1k|        lsf[ORDER + i] = 0.5f * (lsf[i] + lsf[2 * ORDER + i]);
  ------------------
  |  |   30|  79.1k|#define ORDER 16
  ------------------
                      lsf[ORDER + i] = 0.5f * (lsf[i] + lsf[2 * ORDER + i]);
  ------------------
  |  |   30|  79.1k|#define ORDER 16
  ------------------
  210|  59.8k|    } else {
  211|  59.8k|      if (mode_lpc == 0) {
  ------------------
  |  Branch (211:11): [True: 15.5k, False: 44.2k]
  ------------------
  212|  15.5k|        pos = ixheaacd_avq_first_approx_abs(&lsf[ORDER], &lpc_index[0]);
  ------------------
  |  |   30|  15.5k|#define ORDER 16
  ------------------
  213|  44.2k|      } else if (mode_lpc == 2) {
  ------------------
  |  Branch (213:18): [True: 44.2k, False: 0]
  ------------------
  214|   752k|        for (i = 0; i < ORDER; i++) lsf[ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|   752k|#define ORDER 16
  ------------------
                      for (i = 0; i < ORDER; i++) lsf[ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|   708k|#define ORDER 16
  ------------------
                      for (i = 0; i < ORDER; i++) lsf[ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|   708k|#define ORDER 16
  ------------------
  |  Branch (214:21): [True: 708k, False: 44.2k]
  ------------------
  215|  44.2k|        pos = ixheaacd_avq_first_approx_rel(&lsf[ORDER], &lpc_index[0], 2);
  ------------------
  |  |   30|  44.2k|#define ORDER 16
  ------------------
  216|  44.2k|      }
  217|       |
  218|  59.8k|      lpc_index += pos;
  219|  59.8k|    }
  220|  64.7k|  }
  221|       |
  222|  89.5k|  if (mod[2] < 2) {
  ------------------
  |  Branch (222:7): [True: 83.4k, False: 6.06k]
  ------------------
  223|  83.4k|    mode_lpc = lpc_index[0];
  224|  83.4k|    lpc_index++;
  225|  83.4k|    lpc_present[3] = 1;
  226|       |
  227|  83.4k|    if (mode_lpc == 0) {
  ------------------
  |  Branch (227:9): [True: 19.3k, False: 64.1k]
  ------------------
  228|  19.3k|      pos = ixheaacd_avq_first_approx_abs(&lsf[3 * ORDER], &lpc_index[0]);
  ------------------
  |  |   30|  19.3k|#define ORDER 16
  ------------------
  229|  64.1k|    } else if (mode_lpc == 1) {
  ------------------
  |  Branch (229:16): [True: 53.2k, False: 10.9k]
  ------------------
  230|   904k|      for (i = 0; i < ORDER; i++)
  ------------------
  |  |   30|   904k|#define ORDER 16
  ------------------
  |  Branch (230:19): [True: 851k, False: 53.2k]
  ------------------
  231|   851k|        lsf[3 * ORDER + i] = 0.5f * (lsf[2 * ORDER + i] + lsf[4 * ORDER + i]);
  ------------------
  |  |   30|   851k|#define ORDER 16
  ------------------
                      lsf[3 * ORDER + i] = 0.5f * (lsf[2 * ORDER + i] + lsf[4 * ORDER + i]);
  ------------------
  |  |   30|   851k|#define ORDER 16
  ------------------
                      lsf[3 * ORDER + i] = 0.5f * (lsf[2 * ORDER + i] + lsf[4 * ORDER + i]);
  ------------------
  |  |   30|   851k|#define ORDER 16
  ------------------
  232|  53.2k|      pos = ixheaacd_avq_first_approx_rel(&lsf[3 * ORDER], &lpc_index[0], 1);
  ------------------
  |  |   30|  53.2k|#define ORDER 16
  ------------------
  233|  53.2k|    } else if (mode_lpc == 2) {
  ------------------
  |  Branch (233:16): [True: 3.06k, False: 7.88k]
  ------------------
  234|  52.1k|      for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|  52.1k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|  49.0k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|  49.0k|#define ORDER 16
  ------------------
  |  Branch (234:19): [True: 49.0k, False: 3.06k]
  ------------------
  235|  3.06k|      pos = ixheaacd_avq_first_approx_rel(&lsf[3 * ORDER], &lpc_index[0], 2);
  ------------------
  |  |   30|  3.06k|#define ORDER 16
  ------------------
  236|  7.88k|    } else if (mode_lpc == 3) {
  ------------------
  |  Branch (236:16): [True: 7.88k, False: 0]
  ------------------
  237|   133k|      for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   133k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   126k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   126k|#define ORDER 16
  ------------------
  |  Branch (237:19): [True: 126k, False: 7.88k]
  ------------------
  238|  7.88k|      pos = ixheaacd_avq_first_approx_rel(&lsf[3 * ORDER], &lpc_index[0], 2);
  ------------------
  |  |   30|  7.88k|#define ORDER 16
  ------------------
  239|  7.88k|    }
  240|       |
  241|  83.4k|    lpc_index += pos;
  242|  83.4k|  }
  243|  89.5k|  if (ec_flag) {
  ------------------
  |  Branch (243:7): [True: 0, False: 89.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|  89.5k|}
ixheaacd_lpc_dec.c:ixheaacd_decoding_avq_tool:
   69|   382k|static WORD32 ixheaacd_decoding_avq_tool(WORD32 *read_arr, WORD32 *nvecq) {
   70|   382k|  WORD32 i, k, qn, kv[8] = {0};
   71|   382k|  WORD32 code_book_idx;
   72|   382k|  WORD32 *ptr_kv = &kv[0];
   73|       |
   74|   382k|  WORD32 position = 2;
   75|       |
   76|  1.14M|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (76:15): [True: 764k, False: 382k]
  ------------------
   77|   764k|    qn = read_arr[k];
   78|       |
   79|   764k|    if (qn > 0) {
  ------------------
  |  Branch (79:9): [True: 668k, False: 95.9k]
  ------------------
   80|   668k|      code_book_idx = read_arr[position++];
   81|       |
   82|   668k|      ptr_kv = &read_arr[position];
   83|   668k|      position += 8;
   84|       |
   85|   668k|    } else {
   86|  95.9k|      code_book_idx = 0;
   87|   863k|      for (i = 0; i < 8; i++) ptr_kv = &kv[0];
  ------------------
  |  Branch (87:19): [True: 767k, False: 95.9k]
  ------------------
   88|  95.9k|    }
   89|       |
   90|   764k|    ixheaacd_rotated_gosset_mtx_dec(qn, code_book_idx, ptr_kv, &nvecq[k * 8]);
   91|   764k|  }
   92|       |
   93|   382k|  return position;
   94|   382k|}
ixheaacd_lpc_dec.c:ixheaacd_avq_first_approx_abs:
   96|   226k|static WORD32 ixheaacd_avq_first_approx_abs(FLOAT32 *lsf, WORD32 *indx) {
   97|   226k|  WORD32 i;
   98|   226k|  extern const FLOAT32 ixheaacd_dico_lsf_abs_8b_flt[];
   99|   226k|  extern const FLOAT32 ixheaacd_weight_table_avq[];
  100|   226k|  WORD32 position = 0;
  101|   226k|  WORD32 avq[ORDER];
  102|   226k|  FLOAT32 lsf_min;
  103|   226k|  const FLOAT32 *ptr_w;
  104|       |
  105|   226k|  ptr_w = &ixheaacd_weight_table_avq[(indx[0] * ORDER)];
  ------------------
  |  |   30|   226k|#define ORDER 16
  ------------------
  106|       |
  107|   226k|  position++;
  108|       |
  109|  3.84M|  for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  3.84M|#define ORDER 16
  ------------------
  |  Branch (109:15): [True: 3.61M, False: 226k]
  ------------------
  110|  3.61M|    lsf[i] = ixheaacd_dico_lsf_abs_8b_flt[indx[0] * ORDER + i];
  ------------------
  |  |   30|  3.61M|#define ORDER 16
  ------------------
  111|  3.61M|  }
  112|       |
  113|   226k|  position += ixheaacd_decoding_avq_tool(&indx[position], avq);
  114|       |
  115|   226k|  lsf_min = LSF_GAP;
  ------------------
  |  |   46|   226k|#define LSF_GAP 50.0f
  ------------------
  116|  3.84M|  for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  3.84M|#define ORDER 16
  ------------------
  |  Branch (116:15): [True: 3.61M, False: 226k]
  ------------------
  117|  3.61M|    lsf[i] += (ptr_w[i] * avq[i]);
  118|       |
  119|  3.61M|    if (lsf[i] < lsf_min) lsf[i] = lsf_min;
  ------------------
  |  Branch (119:9): [True: 191k, False: 3.42M]
  ------------------
  120|       |
  121|  3.61M|    lsf_min = lsf[i] + LSF_GAP;
  ------------------
  |  |   46|  3.61M|#define LSF_GAP 50.0f
  ------------------
  122|  3.61M|  }
  123|       |
  124|   226k|  lsf_min = FREQ_MAX - LSF_GAP;
  ------------------
  |  |   47|   226k|#define FREQ_MAX 6400.0f
  ------------------
                lsf_min = FREQ_MAX - LSF_GAP;
  ------------------
  |  |   46|   226k|#define LSF_GAP 50.0f
  ------------------
  125|  3.84M|  for (i = ORDER - 1; i >= 0; i--) {
  ------------------
  |  |   30|   226k|#define ORDER 16
  ------------------
  |  Branch (125:23): [True: 3.61M, False: 226k]
  ------------------
  126|  3.61M|    if (lsf[i] > lsf_min) {
  ------------------
  |  Branch (126:9): [True: 45.5k, False: 3.57M]
  ------------------
  127|  45.5k|      lsf[i] = lsf_min;
  128|  45.5k|    }
  129|       |
  130|  3.61M|    lsf_min = lsf[i] - LSF_GAP;
  ------------------
  |  |   46|  3.61M|#define LSF_GAP 50.0f
  ------------------
  131|  3.61M|  }
  132|       |
  133|   226k|  return position;
  134|   226k|}

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

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

ixheaacd_lt_prediction:
   57|   137k|    UWORD32 frame_len, WORD32 *in_data, WORD32 *out_data) {
   58|   137k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
   59|   137k|  WORD16 *lt_pred_stat = ptr_aac_dec_channel_info->ltp_buf;
   60|   137k|  UWORD16 win_shape = ptr_aac_dec_channel_info->str_ics_info.window_shape;
   61|   137k|  WORD16 sfb;
   62|   137k|  WORD16 bin, i, num_samples;
   63|   137k|  const WORD8 *swb_offset = aac_tables_ptr->scale_factor_bands_long[sr_index];
   64|   137k|  WORD32 *ptr_spec = &spec[0];
   65|   137k|  WORD32 *ptr_x_est = &out_data[0];
   66|       |
   67|   137k|  if (512 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (67:7): [True: 66.3k, False: 70.8k]
  ------------------
   68|  66.3k|    swb_offset = aac_tables_ptr->scale_fac_bands_512[sr_index];
   69|  70.8k|  } else if (480 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (69:14): [True: 23.5k, False: 47.3k]
  ------------------
   70|  23.5k|    swb_offset = aac_tables_ptr->scale_fac_bands_480[sr_index];
   71|  23.5k|  }
   72|       |
   73|   137k|  if (ptr_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   137k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (73:7): [True: 108k, False: 28.3k]
  ------------------
   74|   108k|    if (ltp->data_present) {
  ------------------
  |  Branch (74:9): [True: 56.0k, False: 52.8k]
  ------------------
   75|  56.0k|      num_samples = frame_len << 1;
   76|       |
   77|  66.0M|      for (i = 0; i < num_samples; i++) {
  ------------------
  |  Branch (77:19): [True: 65.9M, False: 56.0k]
  ------------------
   78|  65.9M|        in_data[i] =
   79|  65.9M|            ixheaac_shr32(ixheaac_mult32x16in32_shl_sat(
   80|  65.9M|                               ixheaacd_codebook_Q30[ltp->coef],
   81|  65.9M|                               lt_pred_stat[num_samples + i - ltp->lag]),
   82|  65.9M|                           SHIFT_VAL);
  ------------------
  |  |   50|  65.9M|#define SHIFT_VAL 8
  ------------------
   83|  65.9M|      }
   84|       |
   85|  56.0k|      ixheaacd_filter_bank_ltp(aac_tables_ptr, ptr_ics_info->window_sequence,
   86|  56.0k|                               win_shape, win_shape_prev, in_data, out_data,
   87|  56.0k|                               object_type, frame_len);
   88|       |
   89|  56.0k|      if (ptr_aac_dec_channel_info->str_tns_info.tns_data_present == 1)
  ------------------
  |  Branch (89:11): [True: 13.5k, False: 42.5k]
  ------------------
   90|  13.5k|        ixheaacd_aac_tns_process(ptr_aac_dec_channel_info, 1, aac_tables_ptr,
   91|  13.5k|                                 object_type, 0, out_data);
   92|       |
   93|  1.09M|      for (sfb = 0; sfb < ltp->last_band; sfb++) {
  ------------------
  |  Branch (93:21): [True: 1.04M, False: 56.0k]
  ------------------
   94|  1.04M|        WORD8 sfb_width = swb_offset[sfb];
   95|  1.04M|        if (ltp->long_used[sfb]) {
  ------------------
  |  Branch (95:13): [True: 478k, False: 562k]
  ------------------
   96|  5.03M|          for (bin = sfb_width - 1; bin >= 0; bin--) {
  ------------------
  |  Branch (96:37): [True: 4.55M, False: 478k]
  ------------------
   97|  4.55M|            WORD32 temp = *ptr_spec;
   98|  4.55M|            temp = ixheaac_add32_sat(temp,
   99|  4.55M|                                      ixheaac_shr32(*ptr_x_est++, SHIFT_VAL1));
  ------------------
  |  |   51|  4.55M|#define SHIFT_VAL1 (15 - SHIFT_VAL)
  |  |  ------------------
  |  |  |  |   50|  4.55M|#define SHIFT_VAL 8
  |  |  ------------------
  ------------------
  100|  4.55M|            *ptr_spec++ = temp;
  101|  4.55M|          }
  102|   562k|        } else {
  103|   562k|          ptr_spec += sfb_width;
  104|   562k|          ptr_x_est += sfb_width;
  105|   562k|        }
  106|  1.04M|      }
  107|  56.0k|    }
  108|   108k|  }
  109|   137k|}
ixheaacd_filter_bank_ltp:
  115|  56.0k|                              UWORD32 frame_len) {
  116|  56.0k|  WORD32 i;
  117|       |
  118|  56.0k|  const WORD16 *window_long = NULL;
  119|  56.0k|  const WORD16 *window_long_prev = NULL;
  120|  56.0k|  const WORD16 *window_short = NULL;
  121|  56.0k|  const WORD16 *window_short_prev = NULL;
  122|       |
  123|  56.0k|  UWORD16 nlong = frame_len;
  124|  56.0k|  UWORD16 nlong2 = frame_len << 1;
  125|  56.0k|  UWORD16 nshort = frame_len / 8;
  126|  56.0k|  UWORD16 nflat_ls = (nlong - nshort) / 2;
  127|  56.0k|  WORD32 imdct_scale = 0;
  128|  56.0k|  WORD32 expo = 0;
  129|       |
  130|  56.0k|  if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (130:7): [True: 45.8k, False: 10.2k]
  ------------------
  131|  45.8k|    if (!window_shape) {
  ------------------
  |  Branch (131:9): [True: 17.6k, False: 28.1k]
  ------------------
  132|  17.6k|      if (512 == frame_len) {
  ------------------
  |  Branch (132:11): [True: 12.2k, False: 5.34k]
  ------------------
  133|  12.2k|        window_long =
  134|  12.2k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->window_sine_512;
  135|  12.2k|      } else {
  136|  5.34k|        window_long =
  137|  5.34k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->window_sine_480;
  138|  5.34k|      }
  139|  28.1k|    } else {
  140|  28.1k|      if (512 == frame_len) {
  ------------------
  |  Branch (140:11): [True: 20.2k, False: 7.93k]
  ------------------
  141|  20.2k|        window_long =
  142|  20.2k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->low_overlap_win;
  143|  20.2k|      } else {
  144|  7.93k|        window_long =
  145|  7.93k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->low_overlap_win_480;
  146|  7.93k|      }
  147|  28.1k|    }
  148|       |
  149|  45.8k|    if (!window_shape_prev) {
  ------------------
  |  Branch (149:9): [True: 20.2k, False: 25.5k]
  ------------------
  150|  20.2k|      if (512 == frame_len) {
  ------------------
  |  Branch (150:11): [True: 14.2k, False: 6.05k]
  ------------------
  151|  14.2k|        window_long_prev =
  152|  14.2k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->window_sine_512;
  153|  14.2k|      } else {
  154|  6.05k|        window_long_prev =
  155|  6.05k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->window_sine_480;
  156|  6.05k|      }
  157|  25.5k|    } else {
  158|  25.5k|      if (512 == frame_len) {
  ------------------
  |  Branch (158:11): [True: 18.3k, False: 7.23k]
  ------------------
  159|  18.3k|        window_long_prev =
  160|  18.3k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->low_overlap_win;
  161|  18.3k|      } else {
  162|  7.23k|        window_long_prev =
  163|  7.23k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->low_overlap_win_480;
  164|  7.23k|      }
  165|  25.5k|    }
  166|       |
  167|  45.8k|    if (!window_shape)
  ------------------
  |  Branch (167:9): [True: 17.6k, False: 28.1k]
  ------------------
  168|  17.6k|      window_short = aac_tables_ptr->pstr_imdct_tables->only_short_window_sine;
  169|  28.1k|    else
  170|  28.1k|      window_short = aac_tables_ptr->pstr_imdct_tables->only_short_window_kbd;
  171|  45.8k|    if (!window_shape_prev)
  ------------------
  |  Branch (171:9): [True: 20.2k, False: 25.5k]
  ------------------
  172|  20.2k|      window_short_prev =
  173|  20.2k|          aac_tables_ptr->pstr_imdct_tables->only_short_window_sine;
  174|  25.5k|    else
  175|  25.5k|      window_short_prev =
  176|  25.5k|          aac_tables_ptr->pstr_imdct_tables->only_short_window_kbd;
  177|       |
  178|  45.8k|  } else {
  179|  10.2k|    if (!window_shape)
  ------------------
  |  Branch (179:9): [True: 7.48k, False: 2.77k]
  ------------------
  180|  7.48k|      window_long = aac_tables_ptr->pstr_imdct_tables->only_long_window_sine;
  181|  2.77k|    else
  182|  2.77k|      window_long = aac_tables_ptr->pstr_imdct_tables->only_long_window_kbd;
  183|  10.2k|    if (!window_shape_prev)
  ------------------
  |  Branch (183:9): [True: 7.94k, False: 2.31k]
  ------------------
  184|  7.94k|      window_long_prev =
  185|  7.94k|          aac_tables_ptr->pstr_imdct_tables->only_long_window_sine;
  186|  2.31k|    else
  187|  2.31k|      window_long_prev =
  188|  2.31k|          aac_tables_ptr->pstr_imdct_tables->only_long_window_kbd;
  189|       |
  190|  10.2k|    if (!window_shape)
  ------------------
  |  Branch (190:9): [True: 7.48k, False: 2.77k]
  ------------------
  191|  7.48k|      window_short = aac_tables_ptr->pstr_imdct_tables->only_short_window_sine;
  192|  2.77k|    else
  193|  2.77k|      window_short = aac_tables_ptr->pstr_imdct_tables->only_short_window_kbd;
  194|  10.2k|    if (!window_shape_prev)
  ------------------
  |  Branch (194:9): [True: 7.94k, False: 2.31k]
  ------------------
  195|  7.94k|      window_short_prev =
  196|  7.94k|          aac_tables_ptr->pstr_imdct_tables->only_short_window_sine;
  197|  2.31k|    else
  198|  2.31k|      window_short_prev =
  199|  2.31k|          aac_tables_ptr->pstr_imdct_tables->only_short_window_kbd;
  200|  10.2k|  }
  201|       |
  202|  56.0k|  switch (window_sequence) {
  ------------------
  |  Branch (202:11): [True: 56.0k, False: 0]
  ------------------
  203|  24.3k|    case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|  24.3k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (203:5): [True: 24.3k, False: 31.6k]
  ------------------
  204|       |
  205|  24.3k|      if ((512 != nlong) && (480 != nlong)) {
  ------------------
  |  Branch (205:11): [True: 13.3k, False: 11.0k]
  |  Branch (205:29): [True: 7.79k, False: 5.54k]
  ------------------
  206|  3.74M|        for (i = 0; i<nlong>> 1; i++) {
  ------------------
  |  Branch (206:21): [True: 3.74M, False: 7.79k]
  ------------------
  207|  3.74M|          in_data[i] =
  208|  3.74M|              ixheaac_mult32x16in32_shl(in_data[i], window_long_prev[2 * i]);
  209|       |
  210|  3.74M|          in_data[i + nlong] = ixheaac_mult32x16in32_shl(
  211|  3.74M|              in_data[i + nlong], window_long[2 * i + 1]);
  212|  3.74M|        }
  213|  3.74M|        for (i = 0; i<nlong>> 1; i++) {
  ------------------
  |  Branch (213:21): [True: 3.74M, False: 7.79k]
  ------------------
  214|  3.74M|          in_data[i + (nlong >> 1)] = ixheaac_mult32x16in32_shl(
  215|  3.74M|              in_data[i + (nlong >> 1)], window_long_prev[nlong - 1 - 2 * i]);
  216|       |
  217|  3.74M|          in_data[i + nlong + (nlong >> 1)] =
  218|  3.74M|              ixheaac_mult32x16in32_shl(in_data[i + nlong + (nlong >> 1)],
  219|  3.74M|                                         window_long[nlong - 1 - 2 * i - 1]);
  220|  3.74M|        }
  221|       |
  222|  16.6k|      } else {
  223|  16.6k|        WORD32 *win1, *win2;
  224|  16.6k|        WORD32 *ptr_in1, *ptr_in2;
  225|  16.6k|        win1 = (WORD32 *)window_long_prev;
  226|  16.6k|        win2 = (WORD32 *)window_long;
  227|  16.6k|        ptr_in1 = &in_data[0];
  228|  16.6k|        ptr_in2 = &in_data[nlong];
  229|       |
  230|  8.34M|        for (i = nlong - 1; i >= 0; i--) {
  ------------------
  |  Branch (230:29): [True: 8.32M, False: 16.6k]
  ------------------
  231|  8.32M|          WORD32 temp1 = ixheaac_mult32_shl(*ptr_in1, *win1++);
  232|  8.32M|          WORD32 temp2 = ixheaac_mult32_shl(*ptr_in2, win2[i]);
  233|       |
  234|  8.32M|          *ptr_in1++ = temp1;
  235|  8.32M|          *ptr_in2++ = temp2;
  236|  8.32M|        }
  237|  16.6k|      }
  238|       |
  239|  7.92M|      for (i = 0; i < nlong / 2; i++) {
  ------------------
  |  Branch (239:19): [True: 7.90M, False: 24.3k]
  ------------------
  240|  7.90M|        out_mdct[nlong / 2 + i] =
  241|  7.90M|            ixheaac_sub32(in_data[i], in_data[nlong - 1 - i]);
  242|  7.90M|        out_mdct[i] = (-ixheaac_add32(in_data[nlong + i + nlong / 2],
  243|  7.90M|                                       in_data[nlong2 - nlong / 2 - 1 - i]));
  244|  7.90M|      }
  245|       |
  246|  24.3k|      if (512 == nlong || (480 == nlong)) {
  ------------------
  |  Branch (246:11): [True: 11.0k, False: 13.3k]
  |  Branch (246:27): [True: 5.54k, False: 7.79k]
  ------------------
  247|  16.6k|        if (512 == nlong)
  ------------------
  |  Branch (247:13): [True: 11.0k, False: 5.54k]
  ------------------
  248|  11.0k|          ixheaacd_inverse_transform_512(
  249|  11.0k|              out_mdct, in_data, &imdct_scale,
  250|  11.0k|              aac_tables_ptr->pstr_imdct_tables->cosine_array_1024,
  251|  11.0k|              aac_tables_ptr->pstr_imdct_tables, object_type);
  252|       |
  253|  5.54k|        else
  254|  5.54k|          ixheaacd_mdct_480_ld(out_mdct, in_data, &imdct_scale, 1,
  255|  5.54k|                               aac_tables_ptr->pstr_imdct_tables, object_type);
  256|       |
  257|  16.6k|        imdct_scale += 1;
  258|       |
  259|  16.6k|        if (imdct_scale > 0) {
  ------------------
  |  Branch (259:13): [True: 8.15k, False: 8.45k]
  ------------------
  260|  8.15k|          WORD32 *ptr_out_mdct = &out_mdct[0];
  261|       |
  262|  1.02M|          for (i = nlong - 1; i >= 0; i -= 4) {
  ------------------
  |  Branch (262:31): [True: 1.01M, False: 8.15k]
  ------------------
  263|  1.01M|            *ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
  264|  1.01M|            ptr_out_mdct++;
  265|  1.01M|            *ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
  266|  1.01M|            ptr_out_mdct++;
  267|  1.01M|            *ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
  268|  1.01M|            ptr_out_mdct++;
  269|  1.01M|            *ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
  270|  1.01M|            ptr_out_mdct++;
  271|  1.01M|          }
  272|  8.45k|        } else if (imdct_scale < 0) {
  ------------------
  |  Branch (272:20): [True: 8.33k, False: 117]
  ------------------
  273|  8.33k|          WORD32 *ptr_out_mdct = &out_mdct[0];
  274|  8.33k|          imdct_scale = -imdct_scale;
  275|  1.05M|          for (i = nlong - 1; i >= 0; i -= 4) {
  ------------------
  |  Branch (275:31): [True: 1.04M, False: 8.33k]
  ------------------
  276|  1.04M|            *ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
  277|  1.04M|            ptr_out_mdct++;
  278|  1.04M|            *ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
  279|  1.04M|            ptr_out_mdct++;
  280|  1.04M|            *ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
  281|  1.04M|            ptr_out_mdct++;
  282|  1.04M|            *ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
  283|  1.04M|            ptr_out_mdct++;
  284|  1.04M|          }
  285|  8.33k|        }
  286|  16.6k|      }
  287|       |
  288|  7.79k|      else if (1024 == nlong) {
  ------------------
  |  Branch (288:16): [True: 46, False: 7.74k]
  ------------------
  289|     46|        expo = ixheaacd_calc_max_spectral_line_dec(out_mdct, 1024) - 1;
  290|       |
  291|     46|        expo = 8 - expo;
  292|       |
  293|     46|        imdct_scale = ixheaacd_inverse_transform(
  294|     46|            out_mdct, in_data, aac_tables_ptr->pstr_imdct_tables, expo, 1024);
  295|       |
  296|     46|        ixheaacd_post_twiddle_dec(in_data, out_mdct,
  297|     46|                                  aac_tables_ptr->pstr_imdct_tables, 1024);
  298|       |
  299|     46|        imdct_scale += 1;
  300|       |
  301|  47.1k|        for (i = 0; i < nlong; i++) {
  ------------------
  |  Branch (301:21): [True: 47.1k, False: 46]
  ------------------
  302|  47.1k|          out_mdct[i] = ixheaac_shl32_dir(in_data[i], imdct_scale);
  303|  47.1k|        }
  304|     46|      }
  305|       |
  306|  24.3k|      break;
  307|       |
  308|  16.5k|    case LONG_START_SEQUENCE:
  ------------------
  |  |  101|  16.5k|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (308:5): [True: 16.5k, False: 39.5k]
  ------------------
  309|       |
  310|  4.81M|      for (i = 0; i<nlong>> 1; i++)
  ------------------
  |  Branch (310:19): [True: 4.79M, False: 16.5k]
  ------------------
  311|  4.79M|        in_data[i] =
  312|  4.79M|            ixheaac_mult32x16in32_shl(in_data[i], window_long_prev[2 * i]);
  313|       |
  314|  4.81M|      for (i = 0; i<nlong>> 1; i++)
  ------------------
  |  Branch (314:19): [True: 4.79M, False: 16.5k]
  ------------------
  315|  4.79M|        in_data[i + (nlong >> 1)] = ixheaac_mult32x16in32_shl(
  316|  4.79M|            in_data[i + (nlong >> 1)], window_long_prev[nlong - 1 - 2 * i - 1]);
  317|       |
  318|   615k|      for (i = 0; i<nshort>> 1; i++)
  ------------------
  |  Branch (318:19): [True: 599k, False: 16.5k]
  ------------------
  319|   599k|        in_data[i + nlong + nflat_ls + (nshort >> 1)] =
  320|   599k|            ixheaac_mult32x16in32_shl(
  321|   599k|                in_data[i + nlong + nflat_ls + (nshort >> 1)],
  322|   599k|                window_short[nshort - 1 - 2 * i - 1]);
  323|       |
  324|  4.21M|      for (i = 0; i < nflat_ls; i++) in_data[i + nlong + nflat_ls + nshort] = 0;
  ------------------
  |  Branch (324:19): [True: 4.19M, False: 16.5k]
  ------------------
  325|       |
  326|  4.81M|      for (i = 0; i < nlong / 2; i++) {
  ------------------
  |  Branch (326:19): [True: 4.79M, False: 16.5k]
  ------------------
  327|  4.79M|        out_mdct[nlong / 2 + i] =
  328|  4.79M|            ixheaac_sub32(in_data[i], in_data[nlong - 1 - i]);
  329|  4.79M|        out_mdct[nlong / 2 - 1 - i] =
  330|  4.79M|            -ixheaac_add32(in_data[nlong + i], in_data[nlong2 - 1 - i]);
  331|  4.79M|      }
  332|       |
  333|  16.5k|      {
  334|  16.5k|        expo = ixheaacd_calc_max_spectral_line_dec(out_mdct, 1024) - 1;
  335|       |
  336|  16.5k|        expo = 8 - expo;
  337|  16.5k|        imdct_scale = ixheaacd_inverse_transform(
  338|  16.5k|            out_mdct, in_data, aac_tables_ptr->pstr_imdct_tables, expo, 1024);
  339|       |
  340|  16.5k|        ixheaacd_post_twiddle_dec(in_data, out_mdct,
  341|  16.5k|                                  aac_tables_ptr->pstr_imdct_tables, 1024);
  342|  16.5k|      }
  343|       |
  344|  16.5k|      imdct_scale += 1;
  345|       |
  346|  9.60M|      for (i = 0; i < nlong; i++) {
  ------------------
  |  Branch (346:19): [True: 9.58M, False: 16.5k]
  ------------------
  347|  9.58M|        out_mdct[i] = ixheaac_shl32_dir(in_data[i], imdct_scale);
  348|  9.58M|      }
  349|  16.5k|      break;
  350|       |
  351|  15.1k|    case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|  15.1k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (351:5): [True: 15.1k, False: 40.9k]
  ------------------
  352|  3.33M|      for (i = 0; i < nflat_ls; i++) in_data[i] = 0;
  ------------------
  |  Branch (352:19): [True: 3.31M, False: 15.1k]
  ------------------
  353|       |
  354|   489k|      for (i = 0; i<nshort>> 1; i++)
  ------------------
  |  Branch (354:19): [True: 474k, False: 15.1k]
  ------------------
  355|   474k|        in_data[i + nflat_ls] = ixheaac_mult32x16in32_shl(
  356|   474k|            in_data[i + nflat_ls], window_short_prev[2 * i]);
  357|       |
  358|   489k|      for (i = 0; i<nshort>> 1; i++)
  ------------------
  |  Branch (358:19): [True: 474k, False: 15.1k]
  ------------------
  359|   474k|        in_data[i + nflat_ls + (nshort >> 1)] =
  360|   474k|            ixheaac_mult32x16in32_shl(in_data[i + nflat_ls + (nshort >> 1)],
  361|   474k|                                       window_short_prev[127 - 2 * i]);
  362|       |
  363|  3.80M|      for (i = 0; i<nlong>> 1; i++)
  ------------------
  |  Branch (363:19): [True: 3.79M, False: 15.1k]
  ------------------
  364|  3.79M|        in_data[i + nlong] = ixheaac_mult32x16in32_shl(in_data[i + nlong],
  365|  3.79M|                                                        window_long[2 * i + 1]);
  366|       |
  367|  3.80M|      for (i = 0; i<nlong>> 1; i++)
  ------------------
  |  Branch (367:19): [True: 3.79M, False: 15.1k]
  ------------------
  368|  3.79M|        in_data[i + nlong + (nlong >> 1)] =
  369|  3.79M|            ixheaac_mult32x16in32_shl(in_data[i + nlong + (nlong >> 1)],
  370|  3.79M|                                       window_long[nlong - 1 - 2 * i - 1]);
  371|       |
  372|  3.80M|      for (i = 0; i < nlong / 2; i++) {
  ------------------
  |  Branch (372:19): [True: 3.79M, False: 15.1k]
  ------------------
  373|  3.79M|        out_mdct[nlong / 2 + i] =
  374|  3.79M|            ixheaac_sub32(in_data[i], in_data[nlong - 1 - i]);
  375|  3.79M|        out_mdct[nlong / 2 - 1 - i] =
  376|  3.79M|            -ixheaac_add32(in_data[nlong + i], in_data[nlong2 - 1 - i]);
  377|  3.79M|      }
  378|       |
  379|  15.1k|      {
  380|  15.1k|        expo = ixheaacd_calc_max_spectral_line_dec(out_mdct, 1024) - 1;
  381|       |
  382|  15.1k|        expo = 8 - expo;
  383|  15.1k|        imdct_scale = ixheaacd_inverse_transform(
  384|  15.1k|            out_mdct, in_data, aac_tables_ptr->pstr_imdct_tables, expo, 1024);
  385|       |
  386|  15.1k|        ixheaacd_post_twiddle_dec(in_data, out_mdct,
  387|  15.1k|                                  aac_tables_ptr->pstr_imdct_tables, 1024);
  388|  15.1k|      }
  389|       |
  390|  15.1k|      imdct_scale += 1;
  391|       |
  392|  7.60M|      for (i = 0; i < nlong; i++) {
  ------------------
  |  Branch (392:19): [True: 7.58M, False: 15.1k]
  ------------------
  393|  7.58M|        out_mdct[i] = ixheaac_shl32_dir(in_data[i], imdct_scale);
  394|  7.58M|      }
  395|       |
  396|  15.1k|      break;
  397|  56.0k|  }
  398|  56.0k|}
ixheaacd_lt_update_state:
  404|   137k|                              WORD slot_element) {
  405|   137k|  WORD32 i;
  406|       |
  407|   137k|  if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (407:7): [True: 100k, False: 36.2k]
  ------------------
  408|   100k|    WORD16 *ptr_ltp_state0 = &lt_pred_stat[0];
  409|   100k|    WORD16 *ptr_ltp_state_fl = &lt_pred_stat[frame_len + 0];
  410|   100k|    WORD16 *ptr_ltp_state_2fl = &lt_pred_stat[(frame_len * 2) + 0];
  411|   100k|    WORD16 *time = (WORD16 *)time_t - slot_element;
  412|   100k|    WORD16 *ptr_time_in = &time[0 * stride];
  413|       |
  414|  50.7M|    for (i = 0; i < frame_len; i++) {
  ------------------
  |  Branch (414:17): [True: 50.6M, False: 100k]
  ------------------
  415|  50.6M|      *ptr_ltp_state0++ = *ptr_ltp_state_fl;
  416|  50.6M|      *ptr_ltp_state_fl++ = *ptr_ltp_state_2fl;
  417|  50.6M|      *ptr_ltp_state_2fl++ = *ptr_time_in;
  418|  50.6M|      ptr_time_in += stride;
  419|  50.6M|    }
  420|       |
  421|   100k|  } else {
  422|  36.2k|    WORD16 *ptr_ltp_state0 = &lt_pred_stat[0];
  423|  36.2k|    WORD16 *ptr_ltp_state_fl = &lt_pred_stat[frame_len + 0];
  424|  36.2k|    WORD32 *time = (WORD32 *)time_t;
  425|  36.2k|    WORD32 *ptr_time_in = &time[0 * stride];
  426|       |
  427|  36.2k|    time = (WORD32 *)time_t;
  428|       |
  429|  35.3M|    for (i = 0; i < frame_len; i++) {
  ------------------
  |  Branch (429:17): [True: 35.3M, False: 36.2k]
  ------------------
  430|  35.3M|      *ptr_ltp_state0++ = *ptr_ltp_state_fl;
  431|  35.3M|      *ptr_ltp_state_fl++ =
  432|  35.3M|          ixheaac_round16(ixheaac_shl32_sat(*ptr_time_in, 2));
  433|  35.3M|      ptr_time_in += stride;
  434|  35.3M|    }
  435|  36.2k|  }
  436|       |
  437|   137k|  if ((window_sequence == ONLY_LONG_SEQUENCE) ||
  ------------------
  |  |  100|   137k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (437:7): [True: 65.1k, False: 71.9k]
  ------------------
  438|  88.7k|      (window_sequence == LONG_STOP_SEQUENCE)) {
  ------------------
  |  |  103|  71.9k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (438:7): [True: 23.6k, False: 48.3k]
  ------------------
  439|  88.7k|    if (512 == frame_len) {
  ------------------
  |  Branch (439:9): [True: 41.9k, False: 46.8k]
  ------------------
  440|  41.9k|      WORD32 *window = (WORD32 *)p_window_next;
  441|       |
  442|  10.7M|      for (i = 0; i < 256; i++) {
  ------------------
  |  Branch (442:19): [True: 10.7M, False: 41.9k]
  ------------------
  443|  10.7M|        lt_pred_stat[(frame_len * 3) + i] =
  444|  10.7M|            ixheaac_round16(ixheaac_mult16x16in32_shl(
  445|  10.7M|                (WORD16)ixheaac_shl16(
  446|  10.7M|                    (WORD16)-ixheaac_sat16(overlap[255 - i]), 1),
  447|  10.7M|                (WORD16)ixheaac_shr32(window[511 - i], 15)));
  448|       |
  449|  10.7M|        lt_pred_stat[(frame_len * 3) + 256 + i] =
  450|  10.7M|            ixheaac_round16(ixheaac_mult16x16in32_shl(
  451|  10.7M|                (WORD16)ixheaac_shl16((WORD16)-ixheaac_sat16(overlap[i]), 1),
  452|  10.7M|                (WORD16)ixheaac_shr32(window[255 - i], 15)));
  453|  10.7M|      }
  454|  46.8k|    } else if (480 == frame_len) {
  ------------------
  |  Branch (454:16): [True: 19.8k, False: 27.0k]
  ------------------
  455|  19.8k|      WORD32 *window = (WORD32 *)p_window_next;
  456|       |
  457|  4.77M|      for (i = 0; i < 240; i++) {
  ------------------
  |  Branch (457:19): [True: 4.75M, False: 19.8k]
  ------------------
  458|  4.75M|        lt_pred_stat[(frame_len * 3) + i] =
  459|  4.75M|            ixheaac_round16(ixheaac_mult16x16in32_shl(
  460|  4.75M|                (WORD16)ixheaac_shl16(
  461|  4.75M|                    (WORD16)-ixheaac_sat16(overlap[239 - i]), 1),
  462|  4.75M|                (WORD16)ixheaac_shr32(window[479 - i], 15)));
  463|       |
  464|  4.75M|        lt_pred_stat[(frame_len * 3) + 240 + i] =
  465|  4.75M|            ixheaac_round16(ixheaac_mult16x16in32_shl(
  466|  4.75M|                (WORD16)ixheaac_shl16((WORD16)-ixheaac_sat16(overlap[i]), 1),
  467|  4.75M|                (WORD16)ixheaac_shr32(window[239 - i], 15)));
  468|  4.75M|      }
  469|  27.0k|    } else {
  470|  13.8M|      for (i = 0; i < 512; i++) {
  ------------------
  |  Branch (470:19): [True: 13.8M, False: 27.0k]
  ------------------
  471|  13.8M|        lt_pred_stat[(frame_len * 2) + i] = ixheaac_round16(
  472|  13.8M|            ixheaac_shl32_sat(ixheaac_mult16x16in32_shl(
  473|  13.8M|                                   (WORD16)-ixheaac_sat16(overlap[511 - i]),
  474|  13.8M|                                   p_window_next[2 * i + 1]),
  475|  13.8M|                               1));
  476|       |
  477|  13.8M|        lt_pred_stat[(frame_len * 2) + 512 + i] =
  478|  13.8M|            ixheaac_round16(ixheaac_shl32_sat(
  479|  13.8M|                ixheaac_mult16x16in32_shl((WORD16)-ixheaac_sat16(overlap[i]),
  480|  13.8M|                                           p_window_next[1023 - 2 * i - 1]),
  481|  13.8M|                1));
  482|  13.8M|      }
  483|  27.0k|    }
  484|       |
  485|  88.7k|  } else if (window_sequence == LONG_START_SEQUENCE) {
  ------------------
  |  |  101|  48.3k|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (485:14): [True: 19.9k, False: 28.3k]
  ------------------
  486|  8.97M|    for (i = 0; i < 448; i++) {
  ------------------
  |  Branch (486:17): [True: 8.95M, False: 19.9k]
  ------------------
  487|  8.95M|      lt_pred_stat[(frame_len * 2) + i] =
  488|  8.95M|          ixheaac_shl16((WORD16)-ixheaac_sat16(overlap[511 - i]), 1);
  489|  8.95M|    }
  490|  1.29M|    for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (490:17): [True: 1.27M, False: 19.9k]
  ------------------
  491|  1.27M|      lt_pred_stat[(frame_len * 2) + 448 + i] =
  492|  1.27M|          ixheaac_round16(ixheaac_shl32_sat(
  493|  1.27M|              ixheaac_mult16x16in32_shl(
  494|  1.27M|                  (WORD16)-ixheaac_sat16(overlap[511 - 448 - i]),
  495|  1.27M|                  p_window_next[2 * i + 1]),
  496|  1.27M|              1));
  497|  1.27M|    }
  498|  1.29M|    for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (498:17): [True: 1.27M, False: 19.9k]
  ------------------
  499|  1.27M|      lt_pred_stat[(frame_len * 2) + 512 + i] =
  500|  1.27M|          ixheaac_round16(ixheaac_shl32_sat(
  501|  1.27M|              ixheaac_mult16x16in32_shl((WORD16)-ixheaac_sat16(overlap[i]),
  502|  1.27M|                                         p_window_next[127 - 2 * i - 1]),
  503|  1.27M|              1));
  504|  1.27M|    }
  505|  8.97M|    for (i = 576; i < 1024; i++) {
  ------------------
  |  Branch (505:19): [True: 8.95M, False: 19.9k]
  ------------------
  506|  8.95M|      lt_pred_stat[(frame_len * 2) + i] = 0;
  507|  8.95M|    }
  508|  28.3k|  } else {
  509|  12.7M|    for (i = 0; i < 448; i++) {
  ------------------
  |  Branch (509:17): [True: 12.6M, False: 28.3k]
  ------------------
  510|  12.6M|      lt_pred_stat[(frame_len * 2) + i] =
  511|  12.6M|          ixheaac_shl16(ixheaac_sat16(overlap[i]), 1);
  512|  12.6M|    }
  513|  1.84M|    for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (513:17): [True: 1.81M, False: 28.3k]
  ------------------
  514|  1.81M|      lt_pred_stat[(frame_len * 2) + 448 + i] = ixheaac_round16(
  515|  1.81M|          ixheaac_shl32_sat(ixheaac_mult16x16in32_shl(
  516|  1.81M|                                 (WORD16)-ixheaac_sat16(overlap[511 - i]),
  517|  1.81M|                                 p_window_next[2 * i + 1]),
  518|  1.81M|                             1));
  519|  1.81M|    }
  520|  1.84M|    for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (520:17): [True: 1.81M, False: 28.3k]
  ------------------
  521|  1.81M|      lt_pred_stat[(frame_len * 2) + 512 + i] = ixheaac_round16(
  522|  1.81M|          ixheaac_shl32_sat(ixheaac_mult16x16in32_shl(
  523|  1.81M|                                 (WORD16)-ixheaac_sat16(overlap[448 + i]),
  524|  1.81M|                                 p_window_next[127 - 2 * i - 1]),
  525|  1.81M|                             1));
  526|  1.81M|    }
  527|  12.7M|    for (i = 576; i < 1024; i++) {
  ------------------
  |  Branch (527:19): [True: 12.6M, False: 28.3k]
  ------------------
  528|  12.6M|      lt_pred_stat[(frame_len * 2) + i] = 0;
  529|  12.6M|    }
  530|  28.3k|  }
  531|   137k|}

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

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

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

ixheaacd_mps_dec.c:ixheaacd_mps_mult32_shr_15:
  222|   135M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   135M|  WORD32 result;
  224|   135M|  WORD64 temp_result;
  225|   135M|  temp_result = (WORD64)a * (WORD64)b;
  226|   135M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   135M|  return (result);
  229|   135M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_narrow:
   50|  72.3M|static PLATFORM_INLINE WORD32 ixheaacd_mps_narrow(WORD64 a, WORD16 *qfac) {
   51|  72.3M|  WORD32 x;
   52|  72.3M|  x = ixheaacd_mps_get_rshift_bits(a);
   53|  72.3M|  *qfac = 20 - x;
   54|  72.3M|  return (WORD32)((WORD64)a >> x);
   55|  72.3M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_get_rshift_bits:
   34|  72.3M|static PLATFORM_INLINE WORD32 ixheaacd_mps_get_rshift_bits(WORD64 a) {
   35|  72.3M|  WORD32 temp_1, temp_2;
   36|  72.3M|  temp_1 = (WORD32)(a >> 32);
   37|  72.3M|  temp_2 = ixheaac_norm32(temp_1);
   38|  72.3M|  if (temp_2 < 31) {
  ------------------
  |  Branch (38:7): [True: 54.7M, False: 17.5M]
  ------------------
   39|  54.7M|    return (32 - temp_2);
   40|  54.7M|  } else {
   41|  17.5M|    temp_2 = (WORD32)(a);
   42|  17.5M|    if ((temp_1 ^ temp_2) < 0) {
  ------------------
  |  Branch (42:9): [True: 137k, False: 17.4M]
  ------------------
   43|   137k|      return 1;
   44|  17.4M|    } else {
   45|  17.4M|      return 0;
   46|  17.4M|    }
   47|  17.5M|  }
   48|  72.3M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_add32:
  108|  72.3M|static PLATFORM_INLINE WORD32 ixheaacd_mps_add32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  109|  72.3M|  WORD64 temp_result;
  110|       |
  111|  72.3M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (111:7): [True: 15.4M, False: 56.8M]
  |  Branch (111:17): [True: 907k, False: 55.9M]
  ------------------
  112|  16.3M|    if (b == 0) {
  ------------------
  |  Branch (112:9): [True: 15.8M, False: 521k]
  ------------------
  113|  15.8M|      return a;
  114|  15.8M|    } else {
  115|   521k|      *q_a = q_b;
  116|   521k|      return b;
  117|   521k|    }
  118|  16.3M|  }
  119|  55.9M|  if (*q_a > q_b) {
  ------------------
  |  Branch (119:7): [True: 2.11M, False: 53.8M]
  ------------------
  120|  2.11M|    if (((*q_a) - q_b) > 31) {
  ------------------
  |  Branch (120:9): [True: 2.24k, False: 2.11M]
  ------------------
  121|  2.24k|      a = 0;
  122|  2.24k|      *q_a = q_b;
  123|  2.11M|    } else {
  124|  2.11M|      a = (a >> ((*q_a) - q_b));
  125|  2.11M|      *q_a = q_b;
  126|  2.11M|    }
  127|  53.8M|  } else {
  128|  53.8M|    if ((q_b - (*q_a)) > 31) {
  ------------------
  |  Branch (128:9): [True: 227k, False: 53.6M]
  ------------------
  129|   227k|      b = 0;
  130|  53.6M|    } else {
  131|  53.6M|      b = (b >> (q_b - (*q_a)));
  132|  53.6M|      q_b = *q_a;
  133|  53.6M|    }
  134|  53.8M|  }
  135|  55.9M|  temp_result = (WORD64)a + (WORD64)b;
  136|  55.9M|  if (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (136:7): [True: 1.80M, False: 54.1M]
  |  Branch (136:43): [True: 0, False: 54.1M]
  ------------------
  137|  1.80M|    temp_result = temp_result >> 1;
  138|  1.80M|    *q_a -= 1;
  139|  1.80M|  }
  140|       |
  141|  55.9M|  return (WORD32)temp_result;
  142|  72.3M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_mult32x16_shr_16:
  214|  3.00G|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32x16_shr_16(WORD32 a, WORD32 b) {
  215|  3.00G|  WORD32 result;
  216|  3.00G|  WORD64 temp_result;
  217|  3.00G|  temp_result = (WORD64)a * (WORD64)b;
  218|  3.00G|  result = (WORD32)(temp_result >> 16);
  219|  3.00G|  return (result);
  220|  3.00G|}
ixheaacd_mps_decorr.c:ixheaacd_mps_comp:
  366|  59.0M|static PLATFORM_INLINE WORD32 ixheaacd_mps_comp(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  367|  59.0M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (367:7): [True: 13.5M, False: 45.4M]
  |  Branch (367:17): [True: 1.47M, False: 44.0M]
  ------------------
  368|  15.0M|    if (a == 0) {
  ------------------
  |  Branch (368:9): [True: 13.5M, False: 1.47M]
  ------------------
  369|  13.5M|      if (b < 0)
  ------------------
  |  Branch (369:11): [True: 0, False: 13.5M]
  ------------------
  370|      0|        return 1;
  371|  13.5M|      else
  372|  13.5M|        return 0;
  373|  13.5M|    } else if (b == 0) {
  ------------------
  |  Branch (373:16): [True: 1.47M, False: 0]
  ------------------
  374|  1.47M|      if (a > 0)
  ------------------
  |  Branch (374:11): [True: 1.47M, False: 0]
  ------------------
  375|  1.47M|        return 1;
  376|      0|      else
  377|      0|        return 0;
  378|  1.47M|    }
  379|  15.0M|  }
  380|       |
  381|  44.0M|  if (*q_a > q_b) {
  ------------------
  |  Branch (381:7): [True: 27.8M, False: 16.1M]
  ------------------
  382|  27.8M|    a = (a >> ((*q_a) - q_b));
  383|  27.8M|  } else {
  384|  16.1M|    b = (b >> (q_b - (*q_a)));
  385|  16.1M|  }
  386|       |
  387|  44.0M|  if (a > b)
  ------------------
  |  Branch (387:7): [True: 18.7M, False: 25.2M]
  ------------------
  388|  18.7M|    return 1;
  389|  25.2M|  else
  390|  25.2M|    return 0;
  391|  44.0M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_div_32:
  242|  20.2M|static PLATFORM_INLINE WORD32 ixheaacd_mps_div_32(WORD32 a, WORD32 b, WORD16 *q_format) {
  243|  20.2M|  WORD32 quotient;
  244|  20.2M|  UWORD32 mantissa_nr, mantissa_dr;
  245|  20.2M|  LOOPINDEX i;
  246|  20.2M|  WORD q_nr, q_dr;
  247|       |
  248|  20.2M|  quotient = 0;
  249|       |
  250|  20.2M|  if (0 == b) {
  ------------------
  |  Branch (250:7): [True: 1.43M, False: 18.8M]
  ------------------
  251|  1.43M|    *q_format = 0;
  252|  1.43M|    return (a);
  253|  1.43M|  }
  254|       |
  255|  18.8M|  quotient = 0;
  256|       |
  257|  18.8M|  q_nr = ixheaac_norm32(a);
  258|  18.8M|  mantissa_nr = (UWORD32)a << (q_nr);
  259|  18.8M|  q_dr = ixheaac_norm32(b);
  260|  18.8M|  mantissa_dr = (UWORD32)b << (q_dr);
  261|  18.8M|  *q_format = (WORD)(30 + q_nr - q_dr);
  262|       |
  263|   601M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (263:15): [True: 583M, False: 18.8M]
  ------------------
  264|   583M|    quotient <<= 1;
  265|       |
  266|   583M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (266:9): [True: 292M, False: 290M]
  ------------------
  267|   292M|      mantissa_nr -= mantissa_dr;
  268|   292M|      quotient += 1;
  269|   292M|    }
  270|   583M|    mantissa_nr <<= 1;
  271|   583M|  }
  272|       |
  273|  18.8M|  if ((a ^ b) < 0) {
  ------------------
  |  Branch (273:7): [True: 0, False: 18.8M]
  ------------------
  274|      0|    return -(quotient);
  275|      0|  }
  276|       |
  277|  18.8M|  return quotient;
  278|  18.8M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_sqrt:
   57|  15.8M|static PLATFORM_INLINE WORD32 ixheaacd_mps_sqrt(WORD32 num, WORD16 *q, const WORD32 *sqrt_tab) {
   58|  15.8M|  WORD32 index, answer, temp;
   59|  15.8M|  WORD k;
   60|       |
   61|  15.8M|  if (num == 0) return 0;
  ------------------
  |  Branch (61:7): [True: 35.0k, False: 15.8M]
  ------------------
   62|       |
   63|  15.8M|  k = ixheaac_norm32(num);
   64|  15.8M|  temp = ixheaac_shr32(ixheaac_shl32(num, k), 21);
   65|  15.8M|  *q += k;
   66|  15.8M|  index = temp & 0x1FF;
   67|  15.8M|  answer = sqrt_tab[index];
   68|  15.8M|  if (*q & 1) {
  ------------------
  |  Branch (68:7): [True: 6.60M, False: 9.25M]
  ------------------
   69|  6.60M|    *q -= 1;
   70|  6.60M|    answer = ixheaac_mult32_shl(answer, INV_SQRT_2_Q31);
  ------------------
  |  |   24|  6.60M|#define INV_SQRT_2_Q31 (1518500250)
  ------------------
   71|  6.60M|  }
   72|  15.8M|  *q = *q >> 1;
   73|  15.8M|  *q += Q_SQRT_TAB;
  ------------------
  |  |   25|  15.8M|#define Q_SQRT_TAB (15)
  ------------------
   74|  15.8M|  return answer;
   75|  15.8M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_mult32_shr_n:
  185|  67.8M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_n(WORD32 a, WORD32 b, WORD16 n) {
  186|  67.8M|  WORD32 result;
  187|  67.8M|  WORD64 temp_result;
  188|       |
  189|  67.8M|  temp_result = (WORD64)a * (WORD64)b;
  190|  67.8M|  result = (WORD32)(temp_result >> n);
  191|       |
  192|  67.8M|  return (result);
  193|  67.8M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_mult32_shr_14:
  231|   142M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_14(WORD32 a, WORD32 b) {
  232|   142M|  WORD32 result;
  233|   142M|  WORD64 temp_result;
  234|       |
  235|   142M|  temp_result = (WORD64)a * (WORD64)b;
  236|   142M|  result = (WORD32)(temp_result >> 16);
  237|   142M|  result = result << 2;
  238|       |
  239|   142M|  return (result);
  240|   142M|}
ixheaacd_mps_hybrid_filt.c:ixheaacd_mps_mult32x16_shr_16:
  214|  61.9M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32x16_shr_16(WORD32 a, WORD32 b) {
  215|  61.9M|  WORD32 result;
  216|  61.9M|  WORD64 temp_result;
  217|  61.9M|  temp_result = (WORD64)a * (WORD64)b;
  218|  61.9M|  result = (WORD32)(temp_result >> 16);
  219|  61.9M|  return (result);
  220|  61.9M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_mps_mult32_shr_30:
  195|  3.49M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  3.49M|  WORD32 result;
  197|  3.49M|  WORD64 temp_result;
  198|       |
  199|  3.49M|  temp_result = (WORD64)a * (WORD64)b;
  200|  3.49M|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  3.49M|  return (result);
  203|  3.49M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_mps_mult32_shr_15:
  222|   135M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   135M|  WORD32 result;
  224|   135M|  WORD64 temp_result;
  225|   135M|  temp_result = (WORD64)a * (WORD64)b;
  226|   135M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   135M|  return (result);
  229|   135M|}
ixheaacd_mps_polyphase.c:ixheaacd_mps_mult32_shr_30:
  195|  2.26G|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  2.26G|  WORD32 result;
  197|  2.26G|  WORD64 temp_result;
  198|       |
  199|  2.26G|  temp_result = (WORD64)a * (WORD64)b;
  200|  2.26G|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  2.26G|  return (result);
  203|  2.26G|}
ixheaacd_mps_polyphase.c:ixheaacd_mps_mult32_shr_15:
  222|   160M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   160M|  WORD32 result;
  224|   160M|  WORD64 temp_result;
  225|   160M|  temp_result = (WORD64)a * (WORD64)b;
  226|   160M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   160M|  return (result);
  229|   160M|}
ixheaacd_mps_process.c:ixheaacd_mps_mult32_shr_30:
  195|  1.15M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  1.15M|  WORD32 result;
  197|  1.15M|  WORD64 temp_result;
  198|       |
  199|  1.15M|  temp_result = (WORD64)a * (WORD64)b;
  200|  1.15M|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  1.15M|  return (result);
  203|  1.15M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_reshape_add32:
   78|  50.4M|                                                         WORD16 qop2) {
   79|  50.4M|  WORD64 tempresult;
   80|  50.4M|  if (0 == op2) {
  ------------------
  |  Branch (80:7): [True: 13.5M, False: 36.9M]
  ------------------
   81|  13.5M|    return op1;
   82|  13.5M|  }
   83|  36.9M|  if (0 == op1) {
  ------------------
  |  Branch (83:7): [True: 2.67M, False: 34.2M]
  ------------------
   84|  2.67M|    *qop1 = qop2;
   85|  2.67M|    return op2;
   86|  2.67M|  }
   87|  34.2M|  if (*qop1 < qop2) {
  ------------------
  |  Branch (87:7): [True: 24.4M, False: 9.72M]
  ------------------
   88|  24.4M|    if ((qop2 - *qop1) > 31)
  ------------------
  |  Branch (88:9): [True: 88.1k, False: 24.4M]
  ------------------
   89|  88.1k|      op2 = 0;
   90|  24.4M|    else
   91|  24.4M|      op2 = op2 >> (qop2 - *qop1);
   92|  24.4M|    tempresult = (WORD64)op1 + (WORD64)op2;
   93|  24.4M|  } else {
   94|  9.72M|    if ((*qop1 - qop2) > 31)
  ------------------
  |  Branch (94:9): [True: 20.6k, False: 9.70M]
  ------------------
   95|  20.6k|      op1 = 0;
   96|  9.70M|    else
   97|  9.70M|      op1 = op1 >> (*qop1 - qop2);
   98|  9.72M|    *qop1 = qop2;
   99|  9.72M|    tempresult = (WORD64)op1 + (WORD64)op2;
  100|  9.72M|  }
  101|  34.2M|  if (tempresult > (WORD32)0x7fffffff || tempresult < (WORD32)0x80000000) {
  ------------------
  |  Branch (101:7): [True: 7.02M, False: 27.1M]
  |  Branch (101:42): [True: 576, False: 27.1M]
  ------------------
  102|  7.02M|    tempresult = tempresult >> 1;
  103|  7.02M|    *qop1 -= 1;
  104|  7.02M|  }
  105|  34.2M|  return (WORD32)tempresult;
  106|  36.9M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_mult32x32:
  167|  1.73M|                                                     WORD16 q_b) {
  168|  1.73M|  WORD64 temp_result;
  169|  1.73M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (169:7): [True: 464k, False: 1.27M]
  |  Branch (169:17): [True: 1.81k, False: 1.27M]
  ------------------
  170|   466k|    temp_result = 0;
  171|   466k|    *q_a = 15;
  172|   466k|    return (WORD32)temp_result;
  173|   466k|  }
  174|  1.27M|  *q_a = *q_a + q_b;
  175|       |
  176|  1.27M|  temp_result = (WORD64)a * (WORD64)b;
  177|  32.3M|  while (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (177:10): [True: 30.3M, False: 1.91M]
  |  Branch (177:46): [True: 646k, False: 1.27M]
  ------------------
  178|  31.0M|    temp_result = temp_result >> 1;
  179|  31.0M|    *q_a -= 1;
  180|  31.0M|  }
  181|       |
  182|  1.27M|  return (WORD32)temp_result;
  183|  1.73M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_narrow:
   50|  15.7M|static PLATFORM_INLINE WORD32 ixheaacd_mps_narrow(WORD64 a, WORD16 *qfac) {
   51|  15.7M|  WORD32 x;
   52|  15.7M|  x = ixheaacd_mps_get_rshift_bits(a);
   53|  15.7M|  *qfac = 20 - x;
   54|  15.7M|  return (WORD32)((WORD64)a >> x);
   55|  15.7M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_get_rshift_bits:
   34|  15.7M|static PLATFORM_INLINE WORD32 ixheaacd_mps_get_rshift_bits(WORD64 a) {
   35|  15.7M|  WORD32 temp_1, temp_2;
   36|  15.7M|  temp_1 = (WORD32)(a >> 32);
   37|  15.7M|  temp_2 = ixheaac_norm32(temp_1);
   38|  15.7M|  if (temp_2 < 31) {
  ------------------
  |  Branch (38:7): [True: 10.9M, False: 4.84M]
  ------------------
   39|  10.9M|    return (32 - temp_2);
   40|  10.9M|  } else {
   41|  4.84M|    temp_2 = (WORD32)(a);
   42|  4.84M|    if ((temp_1 ^ temp_2) < 0) {
  ------------------
  |  Branch (42:9): [True: 35.7k, False: 4.80M]
  ------------------
   43|  35.7k|      return 1;
   44|  4.80M|    } else {
   45|  4.80M|      return 0;
   46|  4.80M|    }
   47|  4.84M|  }
   48|  15.7M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_div_32:
  242|  16.3M|static PLATFORM_INLINE WORD32 ixheaacd_mps_div_32(WORD32 a, WORD32 b, WORD16 *q_format) {
  243|  16.3M|  WORD32 quotient;
  244|  16.3M|  UWORD32 mantissa_nr, mantissa_dr;
  245|  16.3M|  LOOPINDEX i;
  246|  16.3M|  WORD q_nr, q_dr;
  247|       |
  248|  16.3M|  quotient = 0;
  249|       |
  250|  16.3M|  if (0 == b) {
  ------------------
  |  Branch (250:7): [True: 3.61M, False: 12.7M]
  ------------------
  251|  3.61M|    *q_format = 0;
  252|  3.61M|    return (a);
  253|  3.61M|  }
  254|       |
  255|  12.7M|  quotient = 0;
  256|       |
  257|  12.7M|  q_nr = ixheaac_norm32(a);
  258|  12.7M|  mantissa_nr = (UWORD32)a << (q_nr);
  259|  12.7M|  q_dr = ixheaac_norm32(b);
  260|  12.7M|  mantissa_dr = (UWORD32)b << (q_dr);
  261|  12.7M|  *q_format = (WORD)(30 + q_nr - q_dr);
  262|       |
  263|   407M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (263:15): [True: 394M, False: 12.7M]
  ------------------
  264|   394M|    quotient <<= 1;
  265|       |
  266|   394M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (266:9): [True: 184M, False: 209M]
  ------------------
  267|   184M|      mantissa_nr -= mantissa_dr;
  268|   184M|      quotient += 1;
  269|   184M|    }
  270|   394M|    mantissa_nr <<= 1;
  271|   394M|  }
  272|       |
  273|  12.7M|  if ((a ^ b) < 0) {
  ------------------
  |  Branch (273:7): [True: 358k, False: 12.3M]
  ------------------
  274|   358k|    return -(quotient);
  275|   358k|  }
  276|       |
  277|  12.3M|  return quotient;
  278|  12.7M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_add32:
  108|  94.6k|static PLATFORM_INLINE WORD32 ixheaacd_mps_add32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  109|  94.6k|  WORD64 temp_result;
  110|       |
  111|  94.6k|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (111:7): [True: 57.7k, False: 36.9k]
  |  Branch (111:17): [True: 123, False: 36.8k]
  ------------------
  112|  57.8k|    if (b == 0) {
  ------------------
  |  Branch (112:9): [True: 200, False: 57.6k]
  ------------------
  113|    200|      return a;
  114|  57.6k|    } else {
  115|  57.6k|      *q_a = q_b;
  116|  57.6k|      return b;
  117|  57.6k|    }
  118|  57.8k|  }
  119|  36.8k|  if (*q_a > q_b) {
  ------------------
  |  Branch (119:7): [True: 8.50k, False: 28.3k]
  ------------------
  120|  8.50k|    if (((*q_a) - q_b) > 31) {
  ------------------
  |  Branch (120:9): [True: 243, False: 8.26k]
  ------------------
  121|    243|      a = 0;
  122|    243|      *q_a = q_b;
  123|  8.26k|    } else {
  124|  8.26k|      a = (a >> ((*q_a) - q_b));
  125|  8.26k|      *q_a = q_b;
  126|  8.26k|    }
  127|  28.3k|  } else {
  128|  28.3k|    if ((q_b - (*q_a)) > 31) {
  ------------------
  |  Branch (128:9): [True: 1, False: 28.3k]
  ------------------
  129|      1|      b = 0;
  130|  28.3k|    } else {
  131|  28.3k|      b = (b >> (q_b - (*q_a)));
  132|  28.3k|      q_b = *q_a;
  133|  28.3k|    }
  134|  28.3k|  }
  135|  36.8k|  temp_result = (WORD64)a + (WORD64)b;
  136|  36.8k|  if (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (136:7): [True: 48, False: 36.7k]
  |  Branch (136:43): [True: 0, False: 36.7k]
  ------------------
  137|     48|    temp_result = temp_result >> 1;
  138|     48|    *q_a -= 1;
  139|     48|  }
  140|       |
  141|  36.8k|  return (WORD32)temp_result;
  142|  94.6k|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_sqrt:
   57|   660k|static PLATFORM_INLINE WORD32 ixheaacd_mps_sqrt(WORD32 num, WORD16 *q, const WORD32 *sqrt_tab) {
   58|   660k|  WORD32 index, answer, temp;
   59|   660k|  WORD k;
   60|       |
   61|   660k|  if (num == 0) return 0;
  ------------------
  |  Branch (61:7): [True: 116k, False: 544k]
  ------------------
   62|       |
   63|   544k|  k = ixheaac_norm32(num);
   64|   544k|  temp = ixheaac_shr32(ixheaac_shl32(num, k), 21);
   65|   544k|  *q += k;
   66|   544k|  index = temp & 0x1FF;
   67|   544k|  answer = sqrt_tab[index];
   68|   544k|  if (*q & 1) {
  ------------------
  |  Branch (68:7): [True: 283k, False: 261k]
  ------------------
   69|   283k|    *q -= 1;
   70|   283k|    answer = ixheaac_mult32_shl(answer, INV_SQRT_2_Q31);
  ------------------
  |  |   24|   283k|#define INV_SQRT_2_Q31 (1518500250)
  ------------------
   71|   283k|  }
   72|   544k|  *q = *q >> 1;
   73|   544k|  *q += Q_SQRT_TAB;
  ------------------
  |  |   25|   544k|#define Q_SQRT_TAB (15)
  ------------------
   74|   544k|  return answer;
   75|   660k|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_convert_to_qn:
  280|   708k|static WORD32 ixheaacd_mps_convert_to_qn(WORD32 temp, WORD16 qtemp, WORD16 n) {
  281|   708k|  WORD64 result;
  282|   708k|  if (qtemp == n)
  ------------------
  |  Branch (282:7): [True: 66, False: 708k]
  ------------------
  283|     66|    return temp;
  284|   708k|  else if (qtemp > n)
  ------------------
  |  Branch (284:12): [True: 670k, False: 37.8k]
  ------------------
  285|   670k|    temp = (WORD32)((WORD64)temp >> (qtemp - n));
  286|  37.8k|  else {
  287|  37.8k|    result = (WORD32)((WORD64)temp << (n - qtemp));
  288|  37.8k|    if (result > (WORD32)0x7fffffff || result < (WORD32)0x80000000) {
  ------------------
  |  Branch (288:9): [True: 0, False: 37.8k]
  |  Branch (288:40): [True: 0, False: 37.8k]
  ------------------
  289|      0|      return 0;
  290|      0|    } else
  291|  37.8k|      temp = (WORD32)result;
  292|  37.8k|  }
  293|   708k|  return temp;
  294|   708k|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_mult32_shr_16:
  205|  47.3k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_16(WORD32 a, WORD32 b) {
  206|  47.3k|  WORD32 result;
  207|  47.3k|  WORD64 temp_result;
  208|       |
  209|  47.3k|  temp_result = (WORD64)a * (WORD64)b;
  210|  47.3k|  result = (WORD32)(temp_result >> 16);
  211|  47.3k|  return (result);
  212|  47.3k|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_mult32_shr_15:
  222|  4.82M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|  4.82M|  WORD32 result;
  224|  4.82M|  WORD64 temp_result;
  225|  4.82M|  temp_result = (WORD64)a * (WORD64)b;
  226|  4.82M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|  4.82M|  return (result);
  229|  4.82M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_mult32:
  144|  95.0M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  145|  95.0M|  WORD64 temp_result;
  146|  95.0M|  WORD32 temp;
  147|       |
  148|  95.0M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (148:7): [True: 74.6M, False: 20.3M]
  |  Branch (148:17): [True: 56.6k, False: 20.2M]
  ------------------
  149|  74.7M|    temp_result = 0;
  150|  74.7M|    *q_a = 15;
  151|  74.7M|    return (WORD32)temp_result;
  152|  74.7M|  }
  153|       |
  154|  20.2M|  *q_a = *q_a + q_b;
  155|       |
  156|  20.2M|  temp_result = (WORD64)a * (WORD64)b;
  157|  20.2M|  temp = ixheaacd_mps_get_rshift_bits(temp_result);
  158|  20.2M|  if (0 != temp) {
  ------------------
  |  Branch (158:7): [True: 7.10M, False: 13.1M]
  ------------------
  159|  7.10M|    *q_a -= temp;
  160|  7.10M|    temp_result = temp_result >> temp;
  161|  7.10M|  }
  162|       |
  163|  20.2M|  return (WORD32)temp_result;
  164|  95.0M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_get_rshift_bits:
   34|  20.2M|static PLATFORM_INLINE WORD32 ixheaacd_mps_get_rshift_bits(WORD64 a) {
   35|  20.2M|  WORD32 temp_1, temp_2;
   36|  20.2M|  temp_1 = (WORD32)(a >> 32);
   37|  20.2M|  temp_2 = ixheaac_norm32(temp_1);
   38|  20.2M|  if (temp_2 < 31) {
  ------------------
  |  Branch (38:7): [True: 6.36M, False: 13.9M]
  ------------------
   39|  6.36M|    return (32 - temp_2);
   40|  13.9M|  } else {
   41|  13.9M|    temp_2 = (WORD32)(a);
   42|  13.9M|    if ((temp_1 ^ temp_2) < 0) {
  ------------------
  |  Branch (42:9): [True: 735k, False: 13.1M]
  ------------------
   43|   735k|      return 1;
   44|  13.1M|    } else {
   45|  13.1M|      return 0;
   46|  13.1M|    }
   47|  13.9M|  }
   48|  20.2M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_add32:
  108|  76.2M|static PLATFORM_INLINE WORD32 ixheaacd_mps_add32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  109|  76.2M|  WORD64 temp_result;
  110|       |
  111|  76.2M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (111:7): [True: 54.9M, False: 21.3M]
  |  Branch (111:17): [True: 421k, False: 20.9M]
  ------------------
  112|  55.3M|    if (b == 0) {
  ------------------
  |  Branch (112:9): [True: 53.8M, False: 1.53M]
  ------------------
  113|  53.8M|      return a;
  114|  53.8M|    } else {
  115|  1.53M|      *q_a = q_b;
  116|  1.53M|      return b;
  117|  1.53M|    }
  118|  55.3M|  }
  119|  20.9M|  if (*q_a > q_b) {
  ------------------
  |  Branch (119:7): [True: 1.44M, False: 19.4M]
  ------------------
  120|  1.44M|    if (((*q_a) - q_b) > 31) {
  ------------------
  |  Branch (120:9): [True: 5.34k, False: 1.44M]
  ------------------
  121|  5.34k|      a = 0;
  122|  5.34k|      *q_a = q_b;
  123|  1.44M|    } else {
  124|  1.44M|      a = (a >> ((*q_a) - q_b));
  125|  1.44M|      *q_a = q_b;
  126|  1.44M|    }
  127|  19.4M|  } else {
  128|  19.4M|    if ((q_b - (*q_a)) > 31) {
  ------------------
  |  Branch (128:9): [True: 3.81k, False: 19.4M]
  ------------------
  129|  3.81k|      b = 0;
  130|  19.4M|    } else {
  131|  19.4M|      b = (b >> (q_b - (*q_a)));
  132|  19.4M|      q_b = *q_a;
  133|  19.4M|    }
  134|  19.4M|  }
  135|  20.9M|  temp_result = (WORD64)a + (WORD64)b;
  136|  20.9M|  if (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (136:7): [True: 2.40M, False: 18.5M]
  |  Branch (136:43): [True: 0, False: 18.5M]
  ------------------
  137|  2.40M|    temp_result = temp_result >> 1;
  138|  2.40M|    *q_a -= 1;
  139|  2.40M|  }
  140|       |
  141|  20.9M|  return (WORD32)temp_result;
  142|  76.2M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_mult32_shr_15:
  222|  13.9M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|  13.9M|  WORD32 result;
  224|  13.9M|  WORD64 temp_result;
  225|  13.9M|  temp_result = (WORD64)a * (WORD64)b;
  226|  13.9M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|  13.9M|  return (result);
  229|  13.9M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_div_32:
  242|  1.75M|static PLATFORM_INLINE WORD32 ixheaacd_mps_div_32(WORD32 a, WORD32 b, WORD16 *q_format) {
  243|  1.75M|  WORD32 quotient;
  244|  1.75M|  UWORD32 mantissa_nr, mantissa_dr;
  245|  1.75M|  LOOPINDEX i;
  246|  1.75M|  WORD q_nr, q_dr;
  247|       |
  248|  1.75M|  quotient = 0;
  249|       |
  250|  1.75M|  if (0 == b) {
  ------------------
  |  Branch (250:7): [True: 0, False: 1.75M]
  ------------------
  251|      0|    *q_format = 0;
  252|      0|    return (a);
  253|      0|  }
  254|       |
  255|  1.75M|  quotient = 0;
  256|       |
  257|  1.75M|  q_nr = ixheaac_norm32(a);
  258|  1.75M|  mantissa_nr = (UWORD32)a << (q_nr);
  259|  1.75M|  q_dr = ixheaac_norm32(b);
  260|  1.75M|  mantissa_dr = (UWORD32)b << (q_dr);
  261|  1.75M|  *q_format = (WORD)(30 + q_nr - q_dr);
  262|       |
  263|  56.3M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (263:15): [True: 54.5M, False: 1.75M]
  ------------------
  264|  54.5M|    quotient <<= 1;
  265|       |
  266|  54.5M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (266:9): [True: 9.39M, False: 45.1M]
  ------------------
  267|  9.39M|      mantissa_nr -= mantissa_dr;
  268|  9.39M|      quotient += 1;
  269|  9.39M|    }
  270|  54.5M|    mantissa_nr <<= 1;
  271|  54.5M|  }
  272|       |
  273|  1.75M|  if ((a ^ b) < 0) {
  ------------------
  |  Branch (273:7): [True: 0, False: 1.75M]
  ------------------
  274|      0|    return -(quotient);
  275|      0|  }
  276|       |
  277|  1.75M|  return quotient;
  278|  1.75M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_sqrt:
   57|  1.16M|static PLATFORM_INLINE WORD32 ixheaacd_mps_sqrt(WORD32 num, WORD16 *q, const WORD32 *sqrt_tab) {
   58|  1.16M|  WORD32 index, answer, temp;
   59|  1.16M|  WORD k;
   60|       |
   61|  1.16M|  if (num == 0) return 0;
  ------------------
  |  Branch (61:7): [True: 188k, False: 975k]
  ------------------
   62|       |
   63|   975k|  k = ixheaac_norm32(num);
   64|   975k|  temp = ixheaac_shr32(ixheaac_shl32(num, k), 21);
   65|   975k|  *q += k;
   66|   975k|  index = temp & 0x1FF;
   67|   975k|  answer = sqrt_tab[index];
   68|   975k|  if (*q & 1) {
  ------------------
  |  Branch (68:7): [True: 493k, False: 482k]
  ------------------
   69|   493k|    *q -= 1;
   70|   493k|    answer = ixheaac_mult32_shl(answer, INV_SQRT_2_Q31);
  ------------------
  |  |   24|   493k|#define INV_SQRT_2_Q31 (1518500250)
  ------------------
   71|   493k|  }
   72|   975k|  *q = *q >> 1;
   73|   975k|  *q += Q_SQRT_TAB;
  ------------------
  |  |   25|   975k|#define Q_SQRT_TAB (15)
  ------------------
   74|   975k|  return answer;
   75|  1.16M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_convert_to_qn:
  280|  1.17M|static WORD32 ixheaacd_mps_convert_to_qn(WORD32 temp, WORD16 qtemp, WORD16 n) {
  281|  1.17M|  WORD64 result;
  282|  1.17M|  if (qtemp == n)
  ------------------
  |  Branch (282:7): [True: 1.04M, False: 134k]
  ------------------
  283|  1.04M|    return temp;
  284|   134k|  else if (qtemp > n)
  ------------------
  |  Branch (284:12): [True: 0, False: 134k]
  ------------------
  285|      0|    temp = (WORD32)((WORD64)temp >> (qtemp - n));
  286|   134k|  else {
  287|   134k|    result = (WORD32)((WORD64)temp << (n - qtemp));
  288|   134k|    if (result > (WORD32)0x7fffffff || result < (WORD32)0x80000000) {
  ------------------
  |  Branch (288:9): [True: 0, False: 134k]
  |  Branch (288:40): [True: 0, False: 134k]
  ------------------
  289|      0|      return 0;
  290|      0|    } else
  291|   134k|      temp = (WORD32)result;
  292|   134k|  }
  293|   134k|  return temp;
  294|  1.17M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_mult32_shr_30:
  195|   329k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|   329k|  WORD32 result;
  197|   329k|  WORD64 temp_result;
  198|       |
  199|   329k|  temp_result = (WORD64)a * (WORD64)b;
  200|   329k|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|   329k|  return (result);
  203|   329k|}
ixheaacd_mps_apply_m1.c:ixheaacd_mps_mult32_shr_15:
  222|   978M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   978M|  WORD32 result;
  224|   978M|  WORD64 temp_result;
  225|   978M|  temp_result = (WORD64)a * (WORD64)b;
  226|   978M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   978M|  return (result);
  229|   978M|}
ixheaacd_mps_apply_m2.c:ixheaacd_mps_mult32_shr_15:
  222|   818M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   818M|  WORD32 result;
  224|   818M|  WORD64 temp_result;
  225|   818M|  temp_result = (WORD64)a * (WORD64)b;
  226|   818M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   818M|  return (result);
  229|   818M|}
ixheaacd_mps_calc_m1m2_tree_515x.c:ixheaacd_mps_mult32_shr_15:
  222|  1.23M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|  1.23M|  WORD32 result;
  224|  1.23M|  WORD64 temp_result;
  225|  1.23M|  temp_result = (WORD64)a * (WORD64)b;
  226|  1.23M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|  1.23M|  return (result);
  229|  1.23M|}
ixheaacd_mps_calc_m1m2_tree_52xx.c:ixheaacd_mps_mult32_shr_15:
  222|   200k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   200k|  WORD32 result;
  224|   200k|  WORD64 temp_result;
  225|   200k|  temp_result = (WORD64)a * (WORD64)b;
  226|   200k|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   200k|  return (result);
  229|   200k|}
ixheaacd_mps_calc_m1m2_tree_52xx.c:ixheaacd_mps_mult32_shr_30:
  195|  16.5k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  16.5k|  WORD32 result;
  197|  16.5k|  WORD64 temp_result;
  198|       |
  199|  16.5k|  temp_result = (WORD64)a * (WORD64)b;
  200|  16.5k|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  16.5k|  return (result);
  203|  16.5k|}
ixheaacd_mps_calc_m1m2_tree_727x.c:ixheaacd_mps_mult32_shr_15:
  222|   937k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   937k|  WORD32 result;
  224|   937k|  WORD64 temp_result;
  225|   937k|  temp_result = (WORD64)a * (WORD64)b;
  226|   937k|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   937k|  return (result);
  229|   937k|}
ixheaacd_mps_calc_m1m2_tree_727x.c:ixheaacd_mps_mult32_shr_30:
  195|  11.2k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  11.2k|  WORD32 result;
  197|  11.2k|  WORD64 temp_result;
  198|       |
  199|  11.2k|  temp_result = (WORD64)a * (WORD64)b;
  200|  11.2k|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  11.2k|  return (result);
  203|  11.2k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_mult32:
  144|  3.73k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  145|  3.73k|  WORD64 temp_result;
  146|  3.73k|  WORD32 temp;
  147|       |
  148|  3.73k|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (148:7): [True: 0, False: 3.73k]
  |  Branch (148:17): [True: 2.21k, False: 1.52k]
  ------------------
  149|  2.21k|    temp_result = 0;
  150|  2.21k|    *q_a = 15;
  151|  2.21k|    return (WORD32)temp_result;
  152|  2.21k|  }
  153|       |
  154|  1.52k|  *q_a = *q_a + q_b;
  155|       |
  156|  1.52k|  temp_result = (WORD64)a * (WORD64)b;
  157|  1.52k|  temp = ixheaacd_mps_get_rshift_bits(temp_result);
  158|  1.52k|  if (0 != temp) {
  ------------------
  |  Branch (158:7): [True: 0, False: 1.52k]
  ------------------
  159|      0|    *q_a -= temp;
  160|      0|    temp_result = temp_result >> temp;
  161|      0|  }
  162|       |
  163|  1.52k|  return (WORD32)temp_result;
  164|  3.73k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_get_rshift_bits:
   34|  1.52k|static PLATFORM_INLINE WORD32 ixheaacd_mps_get_rshift_bits(WORD64 a) {
   35|  1.52k|  WORD32 temp_1, temp_2;
   36|  1.52k|  temp_1 = (WORD32)(a >> 32);
   37|  1.52k|  temp_2 = ixheaac_norm32(temp_1);
   38|  1.52k|  if (temp_2 < 31) {
  ------------------
  |  Branch (38:7): [True: 0, False: 1.52k]
  ------------------
   39|      0|    return (32 - temp_2);
   40|  1.52k|  } else {
   41|  1.52k|    temp_2 = (WORD32)(a);
   42|  1.52k|    if ((temp_1 ^ temp_2) < 0) {
  ------------------
  |  Branch (42:9): [True: 0, False: 1.52k]
  ------------------
   43|      0|      return 1;
   44|  1.52k|    } else {
   45|  1.52k|      return 0;
   46|  1.52k|    }
   47|  1.52k|  }
   48|  1.52k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_convert_to_qn:
  280|   845k|static WORD32 ixheaacd_mps_convert_to_qn(WORD32 temp, WORD16 qtemp, WORD16 n) {
  281|   845k|  WORD64 result;
  282|   845k|  if (qtemp == n)
  ------------------
  |  Branch (282:7): [True: 4.06k, False: 840k]
  ------------------
  283|  4.06k|    return temp;
  284|   840k|  else if (qtemp > n)
  ------------------
  |  Branch (284:12): [True: 744k, False: 96.4k]
  ------------------
  285|   744k|    temp = (WORD32)((WORD64)temp >> (qtemp - n));
  286|  96.4k|  else {
  287|  96.4k|    result = (WORD32)((WORD64)temp << (n - qtemp));
  288|  96.4k|    if (result > (WORD32)0x7fffffff || result < (WORD32)0x80000000) {
  ------------------
  |  Branch (288:9): [True: 0, False: 96.4k]
  |  Branch (288:40): [True: 0, False: 96.4k]
  ------------------
  289|      0|      return 0;
  290|      0|    } else
  291|  96.4k|      temp = (WORD32)result;
  292|  96.4k|  }
  293|   840k|  return temp;
  294|   845k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_add32:
  108|  1.72k|static PLATFORM_INLINE WORD32 ixheaacd_mps_add32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  109|  1.72k|  WORD64 temp_result;
  110|       |
  111|  1.72k|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (111:7): [True: 875, False: 848]
  |  Branch (111:17): [True: 0, False: 848]
  ------------------
  112|    875|    if (b == 0) {
  ------------------
  |  Branch (112:9): [True: 0, False: 875]
  ------------------
  113|      0|      return a;
  114|    875|    } else {
  115|    875|      *q_a = q_b;
  116|    875|      return b;
  117|    875|    }
  118|    875|  }
  119|    848|  if (*q_a > q_b) {
  ------------------
  |  Branch (119:7): [True: 0, False: 848]
  ------------------
  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|    848|  } else {
  128|    848|    if ((q_b - (*q_a)) > 31) {
  ------------------
  |  Branch (128:9): [True: 0, False: 848]
  ------------------
  129|      0|      b = 0;
  130|    848|    } else {
  131|    848|      b = (b >> (q_b - (*q_a)));
  132|    848|      q_b = *q_a;
  133|    848|    }
  134|    848|  }
  135|    848|  temp_result = (WORD64)a + (WORD64)b;
  136|    848|  if (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (136:7): [True: 0, False: 848]
  |  Branch (136:43): [True: 0, False: 848]
  ------------------
  137|      0|    temp_result = temp_result >> 1;
  138|      0|    *q_a -= 1;
  139|      0|  }
  140|       |
  141|    848|  return (WORD32)temp_result;
  142|  1.72k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_div_32:
  242|   882k|static PLATFORM_INLINE WORD32 ixheaacd_mps_div_32(WORD32 a, WORD32 b, WORD16 *q_format) {
  243|   882k|  WORD32 quotient;
  244|   882k|  UWORD32 mantissa_nr, mantissa_dr;
  245|   882k|  LOOPINDEX i;
  246|   882k|  WORD q_nr, q_dr;
  247|       |
  248|   882k|  quotient = 0;
  249|       |
  250|   882k|  if (0 == b) {
  ------------------
  |  Branch (250:7): [True: 98.4k, False: 784k]
  ------------------
  251|  98.4k|    *q_format = 0;
  252|  98.4k|    return (a);
  253|  98.4k|  }
  254|       |
  255|   784k|  quotient = 0;
  256|       |
  257|   784k|  q_nr = ixheaac_norm32(a);
  258|   784k|  mantissa_nr = (UWORD32)a << (q_nr);
  259|   784k|  q_dr = ixheaac_norm32(b);
  260|   784k|  mantissa_dr = (UWORD32)b << (q_dr);
  261|   784k|  *q_format = (WORD)(30 + q_nr - q_dr);
  262|       |
  263|  25.0M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (263:15): [True: 24.3M, False: 784k]
  ------------------
  264|  24.3M|    quotient <<= 1;
  265|       |
  266|  24.3M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (266:9): [True: 8.15M, False: 16.1M]
  ------------------
  267|  8.15M|      mantissa_nr -= mantissa_dr;
  268|  8.15M|      quotient += 1;
  269|  8.15M|    }
  270|  24.3M|    mantissa_nr <<= 1;
  271|  24.3M|  }
  272|       |
  273|   784k|  if ((a ^ b) < 0) {
  ------------------
  |  Branch (273:7): [True: 261, False: 783k]
  ------------------
  274|    261|    return -(quotient);
  275|    261|  }
  276|       |
  277|   783k|  return quotient;
  278|   784k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_sqrt:
   57|   572k|static PLATFORM_INLINE WORD32 ixheaacd_mps_sqrt(WORD32 num, WORD16 *q, const WORD32 *sqrt_tab) {
   58|   572k|  WORD32 index, answer, temp;
   59|   572k|  WORD k;
   60|       |
   61|   572k|  if (num == 0) return 0;
  ------------------
  |  Branch (61:7): [True: 41.0k, False: 531k]
  ------------------
   62|       |
   63|   531k|  k = ixheaac_norm32(num);
   64|   531k|  temp = ixheaac_shr32(ixheaac_shl32(num, k), 21);
   65|   531k|  *q += k;
   66|   531k|  index = temp & 0x1FF;
   67|   531k|  answer = sqrt_tab[index];
   68|   531k|  if (*q & 1) {
  ------------------
  |  Branch (68:7): [True: 224k, False: 307k]
  ------------------
   69|   224k|    *q -= 1;
   70|   224k|    answer = ixheaac_mult32_shl(answer, INV_SQRT_2_Q31);
  ------------------
  |  |   24|   224k|#define INV_SQRT_2_Q31 (1518500250)
  ------------------
   71|   224k|  }
   72|   531k|  *q = *q >> 1;
   73|   531k|  *q += Q_SQRT_TAB;
  ------------------
  |  |   25|   531k|#define Q_SQRT_TAB (15)
  ------------------
   74|   531k|  return answer;
   75|   572k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_mult32_shr_15:
  222|  7.46M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|  7.46M|  WORD32 result;
  224|  7.46M|  WORD64 temp_result;
  225|  7.46M|  temp_result = (WORD64)a * (WORD64)b;
  226|  7.46M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|  7.46M|  return (result);
  229|  7.46M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_div32_in_q15:
  296|   266k|static PLATFORM_INLINE WORD32 ixheaacd_mps_div32_in_q15(WORD32 num, WORD32 den) {
  297|   266k|  WORD32 quotient;
  298|   266k|  WORD16 q_quotient;
  299|       |
  300|   266k|  quotient = ixheaacd_mps_div_32(num, den, &q_quotient);
  301|   266k|  quotient = ixheaacd_mps_convert_to_qn(quotient, q_quotient, 15);
  302|   266k|  return quotient;
  303|   266k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_mult32_shr_n:
  185|   286k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_n(WORD32 a, WORD32 b, WORD16 n) {
  186|   286k|  WORD32 result;
  187|   286k|  WORD64 temp_result;
  188|       |
  189|   286k|  temp_result = (WORD64)a * (WORD64)b;
  190|   286k|  result = (WORD32)(temp_result >> n);
  191|       |
  192|   286k|  return (result);
  193|   286k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_mult32_shr_30:
  195|   109k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|   109k|  WORD32 result;
  197|   109k|  WORD64 temp_result;
  198|       |
  199|   109k|  temp_result = (WORD64)a * (WORD64)b;
  200|   109k|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|   109k|  return (result);
  203|   109k|}

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

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

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

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

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

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

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

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

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

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

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

ixheaacd_buffer_m1:
   45|  21.0k|VOID ixheaacd_buffer_m1(ia_heaac_mps_state_struct *pstr_mps_state) {
   46|  21.0k|  ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
   47|  21.0k|  WORD32 pb, row, col;
   48|       |
   49|  21.0k|  ia_mps_persistent_mem *persistent_mem = &pstr_mps_state->mps_persistent_mem;
   50|  21.0k|  WORD32 *m1_param_real_prev = persistent_mem->m1_param_real_prev;
   51|  21.0k|  WORD32 *m1_param_imag_prev = persistent_mem->m1_param_imag_prev;
   52|       |
   53|  21.0k|  WORD32 *m1_param_real, *m1_param_imag;
   54|       |
   55|  21.0k|  WORD32 *p_m1_param_real, *p_m1_param_re;
   56|       |
   57|  21.0k|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
   58|  21.0k|  WORD32 num_v_channels = pstr_mps_state->num_v_channels;
   59|  21.0k|  WORD32 num_x_channels = pstr_mps_state->num_x_channels;
   60|  21.0k|  WORD32 m1_param_imag_present = pstr_mps_state->m1_param_imag_present;
   61|       |
   62|  21.0k|  WORD32 num_parameter_sets_prev;
   63|       |
   64|  21.0k|  pstr_mps_state->num_parameter_sets_prev = pstr_mps_state->num_parameter_sets;
   65|  21.0k|  num_parameter_sets_prev = pstr_mps_state->num_parameter_sets_prev;
   66|       |
   67|  21.0k|  if (m1_param_imag_present) {
  ------------------
  |  Branch (67:7): [True: 17.0k, False: 4.06k]
  ------------------
   68|  17.0k|    WORD32 *p_m1_param_imag = &m1_param->m1_param_imag[0][0][0][0];
   69|  17.0k|    p_m1_param_real = &m1_param->m1_param_real[0][0][0][0];
   70|   151k|    for (row = 0; row < num_v_channels; row++) {
  ------------------
  |  Branch (70:19): [True: 134k, False: 17.0k]
  ------------------
   71|   134k|      WORD32 *p_m1_param_im = p_m1_param_imag;
   72|   134k|      p_m1_param_re = p_m1_param_real;
   73|       |
   74|   912k|      for (col = 0; col < num_x_channels; col++) {
  ------------------
  |  Branch (74:21): [True: 778k, False: 134k]
  ------------------
   75|   778k|        m1_param_real = p_m1_param_re + (num_parameter_sets_prev - 1) * MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   778k|#define MAX_PARAMETER_BANDS (28)
  ------------------
   76|   778k|        m1_param_imag = p_m1_param_im + (num_parameter_sets_prev - 1) * MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   778k|#define MAX_PARAMETER_BANDS (28)
  ------------------
   77|       |
   78|  16.1M|        for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (78:22): [True: 15.3M, False: 778k]
  ------------------
   79|  15.3M|          *m1_param_real_prev++ = *m1_param_real++;
   80|  15.3M|          *m1_param_imag_prev++ = *m1_param_imag++;
   81|  15.3M|        }
   82|   778k|        p_m1_param_re += PBXPS;
  ------------------
  |  |  168|   778k|#define PBXPS (224)
  ------------------
   83|   778k|        p_m1_param_im += PBXPS;
  ------------------
  |  |  168|   778k|#define PBXPS (224)
  ------------------
   84|   778k|      }
   85|   134k|      p_m1_param_real += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |   66|   134k|#define MAX_INPUT_CHANNELS_MPS (6)
  ------------------
                    p_m1_param_real += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |  168|   134k|#define PBXPS (224)
  ------------------
   86|   134k|      p_m1_param_imag += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |   66|   134k|#define MAX_INPUT_CHANNELS_MPS (6)
  ------------------
                    p_m1_param_imag += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |  168|   134k|#define PBXPS (224)
  ------------------
   87|   134k|    }
   88|  17.0k|  } else {
   89|  4.06k|    p_m1_param_real = &m1_param->m1_param_real[0][0][0][0];
   90|  30.4k|    for (row = 0; row < num_v_channels; row++) {
  ------------------
  |  Branch (90:19): [True: 26.4k, False: 4.06k]
  ------------------
   91|  26.4k|      p_m1_param_re = p_m1_param_real;
   92|   125k|      for (col = 0; col < num_x_channels; col++) {
  ------------------
  |  Branch (92:21): [True: 99.2k, False: 26.4k]
  ------------------
   93|  99.2k|        m1_param_real = p_m1_param_re + (num_parameter_sets_prev - 1) * MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  99.2k|#define MAX_PARAMETER_BANDS (28)
  ------------------
   94|  1.82M|        for (pb = 0; pb < num_parameter_bands; pb++) *m1_param_real_prev++ = *m1_param_real++;
  ------------------
  |  Branch (94:22): [True: 1.72M, False: 99.2k]
  ------------------
   95|       |
   96|  99.2k|        p_m1_param_re += PBXPS;
  ------------------
  |  |  168|  99.2k|#define PBXPS (224)
  ------------------
   97|  99.2k|      }
   98|  26.4k|      p_m1_param_real += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |   66|  26.4k|#define MAX_INPUT_CHANNELS_MPS (6)
  ------------------
                    p_m1_param_real += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |  168|  26.4k|#define PBXPS (224)
  ------------------
   99|  26.4k|    }
  100|  4.06k|  }
  101|  21.0k|}
ixheaacd_buffer_m2:
  103|  21.0k|VOID ixheaacd_buffer_m2(ia_heaac_mps_state_struct *pstr_mps_state) {
  104|  21.0k|  WORD32 num_direct_signals = pstr_mps_state->num_direct_signals;
  105|  21.0k|  WORD32 pb, row, col, col_counter = num_direct_signals + pstr_mps_state->num_decor_signals;
  106|       |
  107|  21.0k|  ia_mps_persistent_mem *persistent_mem = &pstr_mps_state->mps_persistent_mem;
  108|  21.0k|  ia_mps_dec_m2_param_struct *m2_param = pstr_mps_state->aux_struct->m2_param;
  109|       |
  110|  21.0k|  WORD32 *m2_decor_real_prev = persistent_mem->m2_decor_real_prev;
  111|  21.0k|  WORD32 *m2_decor_imag_prev = persistent_mem->m2_decor_imag_prev;
  112|       |
  113|  21.0k|  WORD32 *m2_resid_real_prev = persistent_mem->m2_resid_real_prev;
  114|  21.0k|  WORD32 *m2_resid_imag_prev = persistent_mem->m2_resid_imag_prev;
  115|       |
  116|  21.0k|  WORD32 *m2_decor_real, *m2_decor_imag, *m2_resid_real, *m2_resid_imag;
  117|  21.0k|  WORD32 idx = -1;
  118|       |
  119|  21.0k|  WORD32 resid_col_counter;
  120|       |
  121|  21.0k|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
  122|  21.0k|  WORD32 num_output_channels = pstr_mps_state->num_output_channels;
  123|  21.0k|  WORD32 num_parameter_sets_prev = pstr_mps_state->num_parameter_sets_prev;
  124|       |
  125|  21.0k|  if (pstr_mps_state->residual_coding)
  ------------------
  |  Branch (125:7): [True: 548, False: 20.5k]
  ------------------
  126|    548|    resid_col_counter = col_counter;
  127|  20.5k|  else
  128|  20.5k|    resid_col_counter = num_direct_signals;
  129|       |
  130|  21.0k|  if (pstr_mps_state->m2_param_imag_present) {
  ------------------
  |  Branch (130:7): [True: 0, False: 21.0k]
  ------------------
  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|  21.0k|  } else {
  160|   185k|    for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (160:19): [True: 164k, False: 21.0k]
  ------------------
  161|   534k|      for (col = num_direct_signals; col < col_counter; col++) {
  ------------------
  |  Branch (161:38): [True: 370k, False: 164k]
  ------------------
  162|   370k|        if (pstr_mps_state->m2_param_present[row][col] & 1) {
  ------------------
  |  Branch (162:13): [True: 102k, False: 267k]
  ------------------
  163|   102k|          idx++;
  164|   102k|          m2_decor_real = &m2_param->m2_decor_real[idx][num_parameter_sets_prev - 1][0];
  165|       |
  166|  1.88M|          for (pb = 0; pb < num_parameter_bands; pb++) *m2_decor_real_prev++ = *m2_decor_real++;
  ------------------
  |  Branch (166:24): [True: 1.78M, False: 102k]
  ------------------
  167|   102k|        }
  168|   370k|      }
  169|   164k|    }
  170|       |
  171|  21.0k|    idx = -1;
  172|   185k|    for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (172:19): [True: 164k, False: 21.0k]
  ------------------
  173|  1.06M|      for (col = 0; col < resid_col_counter; col++) {
  ------------------
  |  Branch (173:21): [True: 905k, False: 164k]
  ------------------
  174|   905k|        if (pstr_mps_state->m2_param_present[row][col] & 2) {
  ------------------
  |  Branch (174:13): [True: 167k, False: 738k]
  ------------------
  175|   167k|          idx++;
  176|   167k|          m2_resid_real = &m2_param->m2_resid_real[idx][num_parameter_sets_prev - 1][0];
  177|       |
  178|  3.27M|          for (pb = 0; pb < num_parameter_bands; pb++) *m2_resid_real_prev++ = *m2_resid_real++;
  ------------------
  |  Branch (178:24): [True: 3.11M, False: 167k]
  ------------------
  179|   167k|        }
  180|   905k|      }
  181|   164k|    }
  182|  21.0k|  }
  183|  21.0k|}
ixheaacd_calc_m1m2:
  218|  21.0k|VOID ixheaacd_calc_m1m2(ia_heaac_mps_state_struct *pstr_mps_state) {
  219|  21.0k|  WORD32 up_mix_type = pstr_mps_state->up_mix_type;
  220|  21.0k|  WORD32 binaural_quality = pstr_mps_state->binaural_quality;
  221|       |
  222|  21.0k|  if (pstr_mps_state->arbitrary_downmix != 0) {
  ------------------
  |  Branch (222:7): [True: 1.56k, False: 19.5k]
  ------------------
  223|  1.56k|    ixheaacd_update_alpha(pstr_mps_state);
  224|  1.56k|  }
  225|       |
  226|  21.0k|  switch (pstr_mps_state->tree_config) {
  227|    528|    case TREE_5151: {
  ------------------
  |  Branch (227:5): [True: 528, False: 20.5k]
  ------------------
  228|    528|      if (up_mix_type == 3) {
  ------------------
  |  Branch (228:11): [True: 0, False: 528]
  ------------------
  229|      0|        ixheaacd_calc_m1m2_51s1(pstr_mps_state);
  230|    528|      } else {
  231|    528|        ixheaacd_calc_m1m2_5151(pstr_mps_state);
  232|    528|      }
  233|    528|    } break;
  234|    560|    case TREE_5152: {
  ------------------
  |  Branch (234:5): [True: 560, False: 20.5k]
  ------------------
  235|    560|      if (up_mix_type == 3) {
  ------------------
  |  Branch (235:11): [True: 0, False: 560]
  ------------------
  236|      0|        ixheaacd_calc_m1m2_51s2(pstr_mps_state);
  237|    560|      } else {
  238|    560|        ixheaacd_calc_m1m2_5152(pstr_mps_state);
  239|    560|      }
  240|    560|    } break;
  241|  1.19k|    case TREE_525:
  ------------------
  |  Branch (241:5): [True: 1.19k, False: 19.8k]
  ------------------
  242|  1.19k|      if (up_mix_type == 1) {
  ------------------
  |  Branch (242:11): [True: 0, False: 1.19k]
  ------------------
  243|      0|        ixheaacd_calc_m1m2_emm(pstr_mps_state);
  244|  1.19k|      } else if (up_mix_type == 2) {
  ------------------
  |  Branch (244:18): [True: 0, False: 1.19k]
  ------------------
  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|  1.19k|      } else {
  249|  1.19k|        ixheaacd_calc_m1m2_5251(pstr_mps_state);
  250|  1.19k|      }
  251|  1.19k|      break;
  252|  1.09k|    case TREE_7271:
  ------------------
  |  Branch (252:5): [True: 1.09k, False: 19.9k]
  ------------------
  253|  1.09k|      if (up_mix_type == 0) {
  ------------------
  |  Branch (253:11): [True: 1.09k, False: 0]
  ------------------
  254|  1.09k|        ixheaacd_calc_m1m2_7271(pstr_mps_state);
  255|  1.09k|      } 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.09k|      break;
  261|    317|    case TREE_7272:
  ------------------
  |  Branch (261:5): [True: 317, False: 20.7k]
  ------------------
  262|    317|      if (up_mix_type == 0) {
  ------------------
  |  Branch (262:11): [True: 317, False: 0]
  ------------------
  263|    317|        ixheaacd_calc_m1m2_7272(pstr_mps_state);
  264|    317|      } 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|    317|      break;
  270|  2.84k|    case TREE_7571:
  ------------------
  |  Branch (270:5): [True: 2.84k, False: 18.2k]
  ------------------
  271|  2.84k|      ixheaacd_calc_m1m2_7571(pstr_mps_state);
  272|  2.84k|      break;
  273|  14.5k|    case TREE_7572:
  ------------------
  |  Branch (273:5): [True: 14.5k, False: 6.54k]
  ------------------
  274|  14.5k|      ixheaacd_calc_m1m2_7572(pstr_mps_state);
  275|  14.5k|      break;
  276|      0|    default:
  ------------------
  |  Branch (276:5): [True: 0, False: 21.0k]
  ------------------
  277|      0|      break;
  278|  21.0k|  };
  279|       |
  280|  21.0k|  return;
  281|  21.0k|}
ixheaacd_mps_m1m2_common.c:ixheaacd_update_alpha:
  185|  1.56k|static VOID ixheaacd_update_alpha(ia_heaac_mps_state_struct *pstr_mps_state) {
  186|  1.56k|  WORD32 alpha;
  187|       |
  188|  1.56k|  WORD32 *arbdmx_alpha_prev = pstr_mps_state->mps_persistent_mem.arbdmx_alpha_prev;
  189|  1.56k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  190|  1.56k|  WORD32 *arbdmx_alpha = p_aux_struct->arbdmx_alpha;
  191|       |
  192|  1.56k|  WORD32 n_ch_in = pstr_mps_state->num_input_channels;
  193|  1.56k|  WORD32 ch;
  194|       |
  195|  3.87k|  for (ch = 0; ch < n_ch_in; ch++) {
  ------------------
  |  Branch (195:16): [True: 2.31k, False: 1.56k]
  ------------------
  196|  2.31k|    *arbdmx_alpha_prev++ = arbdmx_alpha[ch];
  197|       |
  198|  2.31k|    if (pstr_mps_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (198:9): [True: 360, False: 1.95k]
  ------------------
  199|    360|      alpha = arbdmx_alpha[ch];
  200|       |
  201|    360|      if (p_aux_struct->arbdmx_residual_abs[ch]) {
  ------------------
  |  Branch (201:11): [True: 218, False: 142]
  ------------------
  202|    218|        alpha -= POINT_THREE_THREE_Q15;
  ------------------
  |  |   60|    218|#define POINT_THREE_THREE_Q15 (10813)
  ------------------
  203|       |
  204|    218|        if (alpha < 0) alpha = 0;
  ------------------
  |  Branch (204:13): [True: 218, False: 0]
  ------------------
  205|    218|      } else {
  206|    142|        alpha += POINT_THREE_THREE_Q15;
  ------------------
  |  |   60|    142|#define POINT_THREE_THREE_Q15 (10813)
  ------------------
  207|       |
  208|    142|        if (alpha > ONE_IN_Q15) alpha = ONE_IN_Q15;
  ------------------
  |  |   41|    142|#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: 142]
  ------------------
  209|    142|      }
  210|  1.95k|    } else {
  211|  1.95k|      alpha = ONE_IN_Q15;
  ------------------
  |  |   41|  1.95k|#define ONE_IN_Q15 (32768)
  ------------------
  212|  1.95k|    }
  213|       |
  214|  2.31k|    arbdmx_alpha[ch] = alpha;
  215|  2.31k|  }
  216|  1.56k|}

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

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

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

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

ixheaacd_pre_and_mix_matrix_calculation:
  104|   111k|VOID ixheaacd_pre_and_mix_matrix_calculation(ia_mps_dec_state_struct *self) {
  105|   111k|  WORD32 ps, pb;
  106|   111k|  ia_mps_bs_frame *curr_bit_stream = &(self->bs_frame);
  107|   111k|  FLOAT32 h_imag[2 * MAX_PARAMETER_BANDS];
  108|   111k|  FLOAT32 h_real[6 * MAX_PARAMETER_BANDS];
  109|       |
  110|   111k|  ixheaacd_mps_buffer_pre_and_mix_matrix(self);
  111|       |
  112|   247k|  for (ps = 0; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (112:16): [True: 136k, False: 111k]
  ------------------
  113|   136k|    FLOAT32 *h_im = &h_imag[0];
  114|   136k|    FLOAT32 *h_re = &h_real[0];
  115|       |
  116|   136k|    memset(h_real, 0, 6 * MAX_PARAMETER_BANDS * sizeof(FLOAT32));
  ------------------
  |  |   55|   136k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  117|   136k|    memset(h_imag, 0, 2 * MAX_PARAMETER_BANDS * sizeof(FLOAT32));
  ------------------
  |  |   55|   136k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  118|       |
  119|   136k|    switch (self->config->bs_phase_coding) {
  ------------------
  |  Branch (119:13): [True: 136k, False: 0]
  ------------------
  120|  24.9k|      case 0:
  ------------------
  |  Branch (120:7): [True: 24.9k, False: 111k]
  ------------------
  121|  24.9k|        if (self->residual_coding) {
  ------------------
  |  Branch (121:13): [True: 21.8k, False: 3.15k]
  ------------------
  122|  21.8k|          ixheaacd_mps_par2umx_pred(self, curr_bit_stream, h_imag, h_real, ps,
  123|  21.8k|                                    self->res_bands);
  124|  21.8k|        } else {
  125|  3.15k|          ixheaacd_mps_par2umx_ps(self, curr_bit_stream, h_real, ps);
  126|  3.15k|        }
  127|       |
  128|  24.9k|        break;
  129|  34.5k|      case 1:
  ------------------
  |  Branch (129:7): [True: 34.5k, False: 101k]
  ------------------
  130|  34.5k|        ixheaacd_mps_par2umx_ps_ipd_opd(self, curr_bit_stream, h_real, ps);
  131|  34.5k|        break;
  132|  76.6k|      case 2:
  ------------------
  |  Branch (132:7): [True: 76.6k, False: 59.5k]
  ------------------
  133|  76.6k|        ixheaacd_mps_par2umx_pred(self, curr_bit_stream, h_imag, h_real, ps,
  134|  76.6k|                                  self->res_bands);
  135|  76.6k|        break;
  136|   136k|    }
  137|       |
  138|  1.79M|    for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (138:18): [True: 1.65M, False: 136k]
  ------------------
  139|  1.65M|      self->m1_param_re[ps][pb][0][0] = 1.0f;
  140|  1.65M|      self->m1_param_re[ps][pb][1][0] = 1.0f;
  141|       |
  142|  1.65M|      self->m1_param_im[ps][pb][0][0] = 0;
  143|  1.65M|      self->m1_param_im[ps][pb][1][0] = 0;
  144|       |
  145|  1.65M|      self->m2_resid_re[ps][pb][0][0] = *h_re++;
  146|  1.65M|      self->m2_resid_im[ps][pb][0][0] = *h_im++;
  147|  1.65M|      self->m2_resid_im[ps][pb][0][1] = 0;
  148|       |
  149|  1.65M|      self->m2_resid_re[ps][pb][1][0] = *h_re++;
  150|  1.65M|      self->m2_resid_im[ps][pb][1][0] = *h_im++;
  151|  1.65M|      self->m2_resid_im[ps][pb][1][1] = 0;
  152|       |
  153|  1.65M|      self->m2_decor_re[ps][pb][0][0] = 0;
  154|  1.65M|      self->m2_decor_im[ps][pb][0][0] = 0;
  155|  1.65M|      self->m2_decor_re[ps][pb][0][1] = *h_re++;
  156|  1.65M|      self->m2_decor_im[ps][pb][0][1] = 0;
  157|       |
  158|  1.65M|      self->m2_decor_re[ps][pb][1][0] = 0;
  159|  1.65M|      self->m2_decor_im[ps][pb][1][0] = 0;
  160|  1.65M|      self->m2_decor_re[ps][pb][1][1] = *h_re++;
  161|  1.65M|      self->m2_decor_im[ps][pb][1][1] = 0;
  162|       |
  163|  1.65M|      self->m2_resid_re[ps][pb][0][1] = *h_re++;
  164|  1.65M|      self->m2_resid_re[ps][pb][1][1] = *h_re++;
  165|  1.65M|    }
  166|   136k|  }
  167|   111k|  ixheaacd_mps_smoothing_opd(self);
  168|   111k|}
ixheaacd_mps_par2umx_ps:
  205|  3.15k|                             WORD32 param_set_idx) {
  206|  3.15k|  ixheaacd_mps_par2umx_ps_core(curr_bit_stream->cld_idx[param_set_idx],
  207|  3.15k|                               curr_bit_stream->icc_idx[param_set_idx],
  208|  3.15k|                               self->bs_param_bands, h_real);
  209|  3.15k|}
ixheaacd_mps_par2umx_ps_ipd_opd:
  231|  34.5k|                                     FLOAT32 *h_real, WORD32 param_set_idx) {
  232|  34.5k|  WORD32 opd[MAX_PARAMETER_BANDS];
  233|  34.5k|  WORD32 ott_band_count = self->bs_param_bands;
  234|  34.5k|  WORD32 num_bands_ipd = self->num_bands_ipd;
  235|  34.5k|  WORD32 band;
  236|       |
  237|  34.5k|  ixheaacd_mps_par2umx_ps_core(curr_bit_stream->cld_idx[param_set_idx],
  238|  34.5k|                               curr_bit_stream->icc_idx[param_set_idx],
  239|  34.5k|                               ott_band_count, h_real);
  240|       |
  241|  34.5k|  if (self->bs_phase_mode) {
  ------------------
  |  Branch (241:7): [True: 3.32k, False: 31.2k]
  ------------------
  242|  3.32k|    ixheaacd_mps_opd_calc(self, curr_bit_stream, param_set_idx, opd);
  243|       |
  244|  33.1k|    for (band = 0; band < num_bands_ipd; band++) {
  ------------------
  |  Branch (244:20): [True: 29.7k, False: 3.32k]
  ------------------
  245|  29.7k|      WORD32 ipd_idx = curr_bit_stream->ipd_idx[param_set_idx][band] & 15;
  246|  29.7k|      WORD32 ipd = ixheaacd_ipd_de_quant_table_q28[ipd_idx];
  247|       |
  248|  29.7k|      self->phase_l[param_set_idx][band] =
  249|  29.7k|          ixheaacd_mps_phase_wraping(opd[band]) * ONE_BY_Q28_FLOAT_VAL;
  ------------------
  |  |   48|  29.7k|#define ONE_BY_Q28_FLOAT_VAL (1.0f / Q28_FLOAT_VAL)
  |  |  ------------------
  |  |  |  |   47|  29.7k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  |  |  ------------------
  ------------------
  250|  29.7k|      self->phase_r[param_set_idx][band] =
  251|  29.7k|          ixheaacd_mps_phase_wraping(opd[band] - ipd) * ONE_BY_Q28_FLOAT_VAL;
  ------------------
  |  |   48|  29.7k|#define ONE_BY_Q28_FLOAT_VAL (1.0f / Q28_FLOAT_VAL)
  |  |  ------------------
  |  |  |  |   47|  29.7k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  |  |  ------------------
  ------------------
  252|  29.7k|    }
  253|  31.2k|  } else {
  254|  31.2k|    num_bands_ipd = 0;
  255|  31.2k|  }
  256|       |
  257|   330k|  for (band = num_bands_ipd; band < ott_band_count; band++) {
  ------------------
  |  Branch (257:30): [True: 296k, False: 34.5k]
  ------------------
  258|   296k|    self->phase_l[param_set_idx][band] = 0;
  259|   296k|    self->phase_r[param_set_idx][band] = 0;
  260|   296k|  }
  261|  34.5k|}
ixheaacd_mps_par2umx_pred:
  266|  98.4k|                               WORD32 param_set_idx, WORD32 res_bands) {
  267|  98.4k|  WORD32 band;
  268|       |
  269|  1.40M|  for (band = 0; band < self->bs_param_bands; band++) {
  ------------------
  |  Branch (269:18): [True: 1.31M, False: 98.4k]
  ------------------
  270|  1.31M|    WORD32 cld_idx = curr_bit_stream->cld_idx[param_set_idx][band] + 15;
  271|  1.31M|    WORD32 icc_idx = curr_bit_stream->icc_idx[param_set_idx][band];
  272|  1.31M|    WORD32 ipd_idx = curr_bit_stream->ipd_idx[param_set_idx][band] & 15;
  273|       |
  274|  1.31M|    if ((band < self->num_bands_ipd) && (cld_idx == 15) && (icc_idx == 0) &&
  ------------------
  |  Branch (274:9): [True: 852k, False: 458k]
  |  Branch (274:41): [True: 733k, False: 119k]
  |  Branch (274:60): [True: 675k, False: 57.3k]
  ------------------
  275|   675k|        (ipd_idx == 8)) {
  ------------------
  |  Branch (275:9): [True: 2.28k, False: 673k]
  ------------------
  276|  2.28k|      FLOAT32 gain = 0.416666667f;
  277|  2.28k|      *h_imag++ = 0;
  278|  2.28k|      *h_imag++ = 0;
  279|       |
  280|  2.28k|      if (band < res_bands) {
  ------------------
  |  Branch (280:11): [True: 638, False: 1.64k]
  ------------------
  281|    638|        *h_real++ = gain;
  282|    638|        *h_real++ = gain;
  283|    638|        h_real += 2;
  284|       |
  285|    638|        *h_real++ = gain;
  286|    638|        *h_real++ = -gain;
  287|  1.64k|      } else {
  288|  1.64k|        *h_real++ = gain;
  289|  1.64k|        *h_real++ = -gain;
  290|       |
  291|  1.64k|        h_real += 4;
  292|  1.64k|      }
  293|  1.30M|    } else {
  294|  1.30M|      FLOAT32 weight, re_weight, im_weight;
  295|       |
  296|  1.30M|      weight = ixheaacd_weight[ipd_idx][icc_idx][cld_idx];
  297|  1.30M|      re_weight = ixheaacd_re_weight[ipd_idx][icc_idx][cld_idx];
  298|  1.30M|      im_weight = ixheaacd_im_weight[ipd_idx][icc_idx][cld_idx];
  299|       |
  300|  1.30M|      if (band < self->num_bands_ipd) {
  ------------------
  |  Branch (300:11): [True: 850k, False: 458k]
  ------------------
  301|   850k|        weight = ixheaacd_weight[ipd_idx][icc_idx][cld_idx];
  302|   850k|        re_weight = ixheaacd_re_weight[ipd_idx][icc_idx][cld_idx];
  303|   850k|        im_weight = ixheaacd_im_weight[ipd_idx][icc_idx][cld_idx];
  304|   850k|      } else {
  305|   458k|        weight = ixheaacd_weight[0][icc_idx][cld_idx];
  306|   458k|        re_weight = ixheaacd_re_weight[0][icc_idx][cld_idx];
  307|   458k|        im_weight = ixheaacd_im_weight[0][icc_idx][cld_idx];
  308|   458k|      }
  309|       |
  310|  1.30M|      *h_real++ = weight - re_weight;
  311|  1.30M|      *h_imag++ = -im_weight;
  312|  1.30M|      *h_real++ = weight + re_weight;
  313|  1.30M|      *h_imag++ = im_weight;
  314|       |
  315|  1.30M|      if (band < res_bands) {
  ------------------
  |  Branch (315:11): [True: 721k, False: 588k]
  ------------------
  316|   721k|        h_real += 2;
  317|       |
  318|   721k|        *h_real++ = weight;
  319|   721k|        *h_real++ = -weight;
  320|   721k|      } else {
  321|   588k|        FLOAT32 beta = ixheaacd_beta[ipd_idx][icc_idx][cld_idx];
  322|       |
  323|   588k|        *h_real++ = beta;
  324|   588k|        *h_real++ = -beta;
  325|   588k|        h_real += 2;
  326|   588k|      }
  327|  1.30M|    }
  328|  1.31M|  }
  329|  98.4k|}
ixheaacd_mps_apply_pre_matrix:
  331|  21.2k|VOID ixheaacd_mps_apply_pre_matrix(ia_mps_dec_state_struct *self) {
  332|  21.2k|  WORD32 ts, qs, row;
  333|  21.2k|  if (self->pre_mix_req) {
  ------------------
  |  Branch (333:7): [True: 8.93k, False: 12.3k]
  ------------------
  334|  8.93k|    ixheaacd_mps_upmix_interp_type1(
  335|  8.93k|        self->m1_param_re, self->r_out_re_in_m1, self->m1_param_re_prev,
  336|  8.93k|        (self->dir_sig_count + self->decor_sig_count), 1, self, self->bs_high_rate_mode);
  337|       |
  338|   375k|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (338:18): [True: 366k, False: 8.93k]
  ------------------
  339|  1.09M|      for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (339:20): [True: 732k, False: 366k]
  ------------------
  340|   732k|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  341|       |
  342|   732k|        FLOAT32 real =
  343|   732k|            self->hyb_in[0][qs][ts].re * self->r_out_re_in_m1[ts][indx][0][0];
  344|   732k|        FLOAT32 imag =
  345|   732k|            self->hyb_in[0][qs][ts].im * self->r_out_re_in_m1[ts][indx][0][0];
  346|  2.19M|        for (row = 0; row < (self->dir_sig_count + self->decor_sig_count);
  ------------------
  |  Branch (346:23): [True: 1.46M, False: 732k]
  ------------------
  347|  1.46M|             row++) {
  348|  1.46M|          self->v[row][ts][qs].re = real;
  349|  1.46M|          self->v[row][ts][qs].im = imag;
  350|  1.46M|        }
  351|   732k|      }
  352|  15.1M|      for (qs = 2; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (352:20): [True: 14.8M, False: 366k]
  ------------------
  353|  14.8M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  354|  14.8M|        FLOAT32 real =
  355|  14.8M|            self->hyb_in[0][qs][ts].re * self->r_out_re_in_m1[ts][indx][0][0];
  356|  14.8M|        FLOAT32 imag =
  357|  14.8M|            self->hyb_in[0][qs][ts].im * self->r_out_re_in_m1[ts][indx][0][0];
  358|  44.5M|        for (row = 0; row < (self->dir_sig_count + self->decor_sig_count);
  ------------------
  |  Branch (358:23): [True: 29.6M, False: 14.8M]
  ------------------
  359|  29.6M|             row++) {
  360|  29.6M|          self->v[row][ts][qs].re = real;
  361|  29.6M|          self->v[row][ts][qs].im = imag;
  362|  29.6M|        }
  363|  14.8M|      }
  364|   366k|    }
  365|  12.3k|  } else {
  366|   520k|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (366:18): [True: 508k, False: 12.3k]
  ------------------
  367|  18.0M|      for (qs = 0; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (367:20): [True: 17.5M, False: 508k]
  ------------------
  368|  17.5M|        FLOAT32 real = self->hyb_in[0][qs][ts].re;
  369|  17.5M|        FLOAT32 imag = self->hyb_in[0][qs][ts].im;
  370|  52.6M|        for (row = 0; row < (self->dir_sig_count + self->decor_sig_count);
  ------------------
  |  Branch (370:23): [True: 35.1M, False: 17.5M]
  ------------------
  371|  35.1M|             row++) {
  372|  35.1M|          self->v[row][ts][qs].re = real;
  373|  35.1M|          self->v[row][ts][qs].im = imag;
  374|  35.1M|        }
  375|  17.5M|      }
  376|   508k|    }
  377|  12.3k|  }
  378|  21.2k|  return;
  379|  21.2k|}
ixheaacd_mps_apply_mix_matrix_type1:
  587|  15.1k|VOID ixheaacd_mps_apply_mix_matrix_type1(ia_mps_dec_state_struct *self) {
  588|  15.1k|  WORD32 ts, qs, row;
  589|       |
  590|  15.1k|  ixheaacd_mps_upmix_interp_type2(self->m2_decor_re, self->r_out_diff_re_in_m2,
  591|  15.1k|                                  self->m2_decor_re_prev, self->out_ch_count, self, 1);
  592|       |
  593|  15.1k|  ixheaacd_mps_upmix_interp_type2(self->m2_resid_re, self->r_out_re_in_m2, self->m2_resid_re_prev,
  594|  15.1k|                                  self->out_ch_count, self, 0);
  595|       |
  596|   669k|  for (qs = 0; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (596:16): [True: 654k, False: 15.1k]
  ------------------
  597|   654k|    WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  598|  20.1M|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (598:18): [True: 19.4M, False: 654k]
  ------------------
  599|  58.3M|      for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (599:21): [True: 38.9M, False: 19.4M]
  ------------------
  600|  38.9M|        self->hyb_dir_out[row][ts][qs].re =
  601|  38.9M|            self->w_dir[0][ts][qs].re * self->r_out_re_in_m2[ts][indx][row][0];
  602|  38.9M|        self->hyb_dir_out[row][ts][qs].im =
  603|  38.9M|            self->w_dir[0][ts][qs].im * self->r_out_re_in_m2[ts][indx][row][0];
  604|  38.9M|        self->hyb_diff_out[row][ts][qs].re =
  605|  38.9M|            self->w_diff[1][ts][qs].re *
  606|  38.9M|            self->r_out_diff_re_in_m2[ts][indx][row][1];
  607|  38.9M|        self->hyb_diff_out[row][ts][qs].im =
  608|  38.9M|            self->w_diff[1][ts][qs].im *
  609|  38.9M|            self->r_out_diff_re_in_m2[ts][indx][row][1];
  610|  38.9M|      }
  611|  19.4M|    }
  612|   654k|  }
  613|  15.1k|  return;
  614|  15.1k|}
ixheaacd_mps_apply_mix_matrix_type2:
  616|  8.93k|VOID ixheaacd_mps_apply_mix_matrix_type2(ia_mps_dec_state_struct *self) {
  617|  8.93k|  WORD32 ts, qs, row, col;
  618|  8.93k|  WORD32 complex_m2 = ((self->config->bs_phase_coding != 0));
  619|  8.93k|  WORD32 phase_interpolation = (self->config->bs_phase_coding == 1);
  620|  8.93k|  WORD32 num_col_iters = 0;
  621|       |
  622|  8.93k|  ixheaacd_mps_upmix_interp_type1(self->m2_decor_re, self->r_out_diff_re_in_m2,
  623|  8.93k|                                  self->m2_decor_re_prev, self->out_ch_count,
  624|  8.93k|                                  (self->dir_sig_count + self->decor_sig_count), self, 1);
  625|  8.93k|  ixheaacd_mps_upmix_interp_type1(self->m2_resid_re, self->r_out_re_in_m2, self->m2_resid_re_prev,
  626|  8.93k|                                  self->out_ch_count,
  627|  8.93k|                                  (self->dir_sig_count + self->decor_sig_count), self, 1);
  628|       |
  629|  8.93k|  if (complex_m2 && !phase_interpolation) {
  ------------------
  |  Branch (629:7): [True: 7.63k, False: 1.30k]
  |  Branch (629:21): [True: 3.56k, False: 4.07k]
  ------------------
  630|  3.56k|    ixheaacd_mps_upmix_interp_type1(self->m2_decor_im, self->r_out_diff_im_in_m2,
  631|  3.56k|                                    self->m2_decor_im_prev, self->out_ch_count,
  632|  3.56k|                                    (self->dir_sig_count + self->decor_sig_count), self, 1);
  633|  3.56k|    ixheaacd_mps_upmix_interp_type1(self->m2_resid_im, self->r_out_im_in_m2,
  634|  3.56k|                                    self->m2_resid_im_prev, self->out_ch_count,
  635|  3.56k|                                    (self->dir_sig_count + self->decor_sig_count), self, 1);
  636|  3.56k|  }
  637|       |
  638|  8.93k|  if (phase_interpolation) {
  ------------------
  |  Branch (638:7): [True: 4.07k, False: 4.86k]
  ------------------
  639|  4.07k|    ixheaacd_mps_phase_interpolation(
  640|  4.07k|        self->phase_l, self->phase_r, self->phase_l_prev, self->phase_r_prev,
  641|  4.07k|        self->r_out_ph_re_in_m2, self->r_out_ph_im_in_m2, self);
  642|       |
  643|   143k|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (643:18): [True: 139k, False: 4.07k]
  ------------------
  644|   139k|      WORD32 pb;
  645|  1.43M|      for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (645:20): [True: 1.29M, False: 139k]
  ------------------
  646|  1.29M|        self->r_out_im_in_m2[ts][pb][0][0] =
  647|  1.29M|            self->r_out_re_in_m2[ts][pb][0][0] *
  648|  1.29M|            self->r_out_ph_im_in_m2[ts][pb][0];
  649|       |
  650|  1.29M|        self->r_out_im_in_m2[ts][pb][0][1] =
  651|  1.29M|            self->r_out_re_in_m2[ts][pb][0][1] *
  652|  1.29M|            self->r_out_ph_im_in_m2[ts][pb][0];
  653|  1.29M|        self->r_out_im_in_m2[ts][pb][1][0] =
  654|  1.29M|            self->r_out_re_in_m2[ts][pb][1][0] *
  655|  1.29M|            self->r_out_ph_im_in_m2[ts][pb][1];
  656|       |
  657|  1.29M|        self->r_out_im_in_m2[ts][pb][1][1] =
  658|  1.29M|            self->r_out_re_in_m2[ts][pb][1][1] *
  659|  1.29M|            self->r_out_ph_im_in_m2[ts][pb][1];
  660|       |
  661|  1.29M|        self->r_out_re_in_m2[ts][pb][0][0] =
  662|  1.29M|            self->r_out_re_in_m2[ts][pb][0][0] *
  663|  1.29M|            self->r_out_ph_re_in_m2[ts][pb][0];
  664|       |
  665|  1.29M|        self->r_out_re_in_m2[ts][pb][0][1] =
  666|  1.29M|            self->r_out_re_in_m2[ts][pb][0][1] *
  667|  1.29M|            self->r_out_ph_re_in_m2[ts][pb][0];
  668|       |
  669|  1.29M|        self->r_out_re_in_m2[ts][pb][1][0] =
  670|  1.29M|            self->r_out_re_in_m2[ts][pb][1][0] *
  671|  1.29M|            self->r_out_ph_re_in_m2[ts][pb][1];
  672|       |
  673|  1.29M|        self->r_out_re_in_m2[ts][pb][1][1] =
  674|  1.29M|            self->r_out_re_in_m2[ts][pb][1][1] *
  675|  1.29M|            self->r_out_ph_re_in_m2[ts][pb][1];
  676|       |
  677|  1.29M|        self->r_out_diff_im_in_m2[ts][pb][0][0] = 0;
  678|  1.29M|        self->r_out_diff_im_in_m2[ts][pb][0][1] =
  679|  1.29M|            self->r_out_diff_re_in_m2[ts][pb][0][1] *
  680|  1.29M|            self->r_out_ph_im_in_m2[ts][pb][0];
  681|       |
  682|  1.29M|        self->r_out_diff_im_in_m2[ts][pb][1][0] = 0;
  683|  1.29M|        self->r_out_diff_im_in_m2[ts][pb][1][1] =
  684|  1.29M|            self->r_out_diff_re_in_m2[ts][pb][1][1] *
  685|  1.29M|            self->r_out_ph_im_in_m2[ts][pb][1];
  686|       |
  687|  1.29M|        self->r_out_diff_re_in_m2[ts][pb][0][0] = 0;
  688|  1.29M|        self->r_out_diff_re_in_m2[ts][pb][0][1] =
  689|  1.29M|            self->r_out_diff_re_in_m2[ts][pb][0][1] *
  690|  1.29M|            self->r_out_ph_re_in_m2[ts][pb][0];
  691|       |
  692|  1.29M|        self->r_out_diff_re_in_m2[ts][pb][1][0] = 0;
  693|  1.29M|        self->r_out_diff_re_in_m2[ts][pb][1][1] =
  694|  1.29M|            self->r_out_diff_re_in_m2[ts][pb][1][1] *
  695|  1.29M|            self->r_out_ph_re_in_m2[ts][pb][1];
  696|  1.29M|      }
  697|   139k|    }
  698|  4.07k|  }
  699|  8.93k|  if (self->res_bands == 0) {
  ------------------
  |  Branch (699:7): [True: 6.39k, False: 2.54k]
  ------------------
  700|  6.39k|    num_col_iters = self->dir_sig_count;
  701|  6.39k|  } else {
  702|  2.54k|    num_col_iters = (self->dir_sig_count + self->decor_sig_count);
  703|  2.54k|  }
  704|   375k|  for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (704:16): [True: 366k, False: 8.93k]
  ------------------
  705|  16.2M|    for (qs = 0; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (705:18): [True: 15.8M, False: 366k]
  ------------------
  706|  15.8M|      WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  707|       |
  708|  47.6M|      for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (708:21): [True: 31.7M, False: 15.8M]
  ------------------
  709|  31.7M|        FLOAT32 sum_re_dir = 0;
  710|  31.7M|        FLOAT32 sum_im_dir = 0;
  711|  71.5M|        for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (711:23): [True: 39.7M, False: 31.7M]
  ------------------
  712|  39.7M|          sum_re_dir += self->w_dir[col][ts][qs].re *
  713|  39.7M|                        self->r_out_re_in_m2[ts][indx][row][col];
  714|  39.7M|          sum_im_dir += self->w_dir[col][ts][qs].im *
  715|  39.7M|                        self->r_out_re_in_m2[ts][indx][row][col];
  716|  39.7M|        }
  717|  31.7M|        self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  718|  31.7M|        self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  719|       |
  720|  31.7M|        self->hyb_diff_out[row][ts][qs].re =
  721|  31.7M|            self->w_diff[1][ts][qs].re *
  722|  31.7M|            self->r_out_diff_re_in_m2[ts][indx][row][1];
  723|  31.7M|        self->hyb_diff_out[row][ts][qs].im =
  724|  31.7M|            self->w_diff[1][ts][qs].im *
  725|  31.7M|            self->r_out_diff_re_in_m2[ts][indx][row][1];
  726|  31.7M|      }
  727|  15.8M|    }
  728|   366k|  }
  729|       |
  730|  8.93k|  if (complex_m2) {
  ------------------
  |  Branch (730:7): [True: 7.63k, False: 1.30k]
  ------------------
  731|  7.63k|    if (phase_interpolation) {
  ------------------
  |  Branch (731:9): [True: 4.07k, False: 3.56k]
  ------------------
  732|   143k|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (732:20): [True: 139k, False: 4.07k]
  ------------------
  733|   417k|        for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (733:22): [True: 278k, False: 139k]
  ------------------
  734|   278k|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  735|   835k|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (735:25): [True: 556k, False: 278k]
  ------------------
  736|   556k|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
  737|   556k|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
  738|  1.11M|            for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (738:27): [True: 556k, False: 556k]
  ------------------
  739|   556k|              sum_re_dir += self->w_dir[col][ts][qs].im *
  740|   556k|                            self->r_out_im_in_m2[ts][indx][row][col];
  741|   556k|              sum_im_dir -= self->w_dir[col][ts][qs].re *
  742|   556k|                            self->r_out_im_in_m2[ts][indx][row][col];
  743|   556k|            }
  744|   556k|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  745|   556k|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  746|   556k|            self->hyb_diff_out[row][ts][qs].re +=
  747|   556k|                self->w_diff[1][ts][qs].im *
  748|   556k|                self->r_out_diff_im_in_m2[ts][indx][row][1];
  749|   556k|            self->hyb_diff_out[row][ts][qs].im -=
  750|   556k|                self->w_diff[1][ts][qs].re *
  751|   556k|                self->r_out_diff_im_in_m2[ts][indx][row][1];
  752|   556k|          }
  753|   278k|        }
  754|  8.35M|        for (qs = 2; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (754:22): [True: 8.21M, False: 139k]
  ------------------
  755|  8.21M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  756|  24.6M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (756:25): [True: 16.4M, False: 8.21M]
  ------------------
  757|  16.4M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
  758|  16.4M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
  759|  32.8M|            for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (759:27): [True: 16.4M, False: 16.4M]
  ------------------
  760|  16.4M|              sum_re_dir -= self->w_dir[col][ts][qs].im *
  761|  16.4M|                            self->r_out_im_in_m2[ts][indx][row][col];
  762|  16.4M|              sum_im_dir += self->w_dir[col][ts][qs].re *
  763|  16.4M|                            self->r_out_im_in_m2[ts][indx][row][col];
  764|  16.4M|            }
  765|  16.4M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  766|  16.4M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  767|  16.4M|            self->hyb_diff_out[row][ts][qs].re -=
  768|  16.4M|                self->w_diff[1][ts][qs].im *
  769|  16.4M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
  770|  16.4M|            self->hyb_diff_out[row][ts][qs].im +=
  771|  16.4M|                self->w_diff[1][ts][qs].re *
  772|  16.4M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
  773|  16.4M|          }
  774|  8.21M|        }
  775|   139k|      }
  776|  4.07k|    } else {
  777|  3.56k|      WORD32 num_cols = (self->dir_sig_count + self->decor_sig_count) > 1
  ------------------
  |  Branch (777:25): [True: 3.56k, False: 0]
  ------------------
  778|  3.56k|                         ? 1
  779|  3.56k|                         : (self->dir_sig_count + self->decor_sig_count);
  780|   194k|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (780:20): [True: 191k, False: 3.56k]
  ------------------
  781|   574k|        for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (781:22): [True: 382k, False: 191k]
  ------------------
  782|   382k|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  783|  1.14M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (783:25): [True: 765k, False: 382k]
  ------------------
  784|   765k|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
  785|   765k|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
  786|   765k|            if (num_cols > 0) {
  ------------------
  |  Branch (786:17): [True: 765k, False: 0]
  ------------------
  787|   765k|              sum_re_dir += self->w_dir[0][ts][qs].im *
  788|   765k|                            self->r_out_im_in_m2[ts][indx][row][0];
  789|   765k|              sum_im_dir -= self->w_dir[0][ts][qs].re *
  790|   765k|                            self->r_out_im_in_m2[ts][indx][row][0];
  791|   765k|            }
  792|   765k|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  793|   765k|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  794|   765k|          }
  795|   382k|        }
  796|  5.56M|        for (qs = 2; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (796:22): [True: 5.37M, False: 191k]
  ------------------
  797|  5.37M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  798|  16.1M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (798:25): [True: 10.7M, False: 5.37M]
  ------------------
  799|  10.7M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
  800|  10.7M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
  801|  10.7M|            if (num_cols > 0) {
  ------------------
  |  Branch (801:17): [True: 10.7M, False: 0]
  ------------------
  802|  10.7M|              sum_re_dir -= self->w_dir[0][ts][qs].im *
  803|  10.7M|                            self->r_out_im_in_m2[ts][indx][row][0];
  804|  10.7M|              sum_im_dir += self->w_dir[0][ts][qs].re *
  805|  10.7M|                            self->r_out_im_in_m2[ts][indx][row][0];
  806|  10.7M|            }
  807|  10.7M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  808|  10.7M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  809|  10.7M|          }
  810|  5.37M|        }
  811|   191k|      }
  812|  3.56k|    }
  813|  7.63k|  }
  814|  8.93k|  return;
  815|  8.93k|}
ixheaacd_mps_apply_mix_matrix_type3:
  817|  91.4k|VOID ixheaacd_mps_apply_mix_matrix_type3(ia_mps_dec_state_struct *self) {
  818|  91.4k|  WORD32 ts, qs, row, col;
  819|  91.4k|  WORD32 complex_m2 = ((self->config->bs_phase_coding != 0));
  820|  91.4k|  WORD32 phase_interpolation = (self->config->bs_phase_coding == 1);
  821|  91.4k|  WORD32 num_col_iters = 0;
  822|       |
  823|  91.4k|  if (self->res_bands != 28) {
  ------------------
  |  Branch (823:7): [True: 73.0k, False: 18.3k]
  ------------------
  824|  73.0k|    ixheaacd_mps_upmix_interp_type2(self->m2_decor_re, self->r_out_diff_re_in_m2,
  825|  73.0k|                                    self->m2_decor_re_prev, self->out_ch_count, self, 1);
  826|  73.0k|  }
  827|  91.4k|  if (self->res_bands == 0) {
  ------------------
  |  Branch (827:7): [True: 31.5k, False: 59.9k]
  ------------------
  828|  31.5k|    num_col_iters = self->dir_sig_count;
  829|  31.5k|    ixheaacd_mps_upmix_interp_type2(self->m2_resid_re, self->r_out_re_in_m2,
  830|  31.5k|                                    self->m2_resid_re_prev, self->out_ch_count, self, 0);
  831|  59.9k|  } else {
  832|  59.9k|    num_col_iters = (self->dir_sig_count + self->decor_sig_count);
  833|  59.9k|    ixheaacd_mps_upmix_interp_type1(self->m2_resid_re, self->r_out_re_in_m2,
  834|  59.9k|                                    self->m2_resid_re_prev, self->out_ch_count,
  835|  59.9k|                                    (self->dir_sig_count + self->decor_sig_count), self, 1);
  836|  59.9k|  }
  837|       |
  838|  91.4k|  if (complex_m2 && !phase_interpolation) {
  ------------------
  |  Branch (838:7): [True: 83.8k, False: 7.62k]
  |  Branch (838:21): [True: 63.2k, False: 20.6k]
  ------------------
  839|  63.2k|    ixheaacd_mps_upmix_interp_type2(self->m2_resid_im, self->r_out_im_in_m2,
  840|  63.2k|                                    self->m2_resid_im_prev, self->out_ch_count, self, 0);
  841|  63.2k|  }
  842|       |
  843|  91.4k|  if (phase_interpolation) {
  ------------------
  |  Branch (843:7): [True: 20.6k, False: 70.8k]
  ------------------
  844|  20.6k|    ixheaacd_mps_phase_interpolation(
  845|  20.6k|        self->phase_l, self->phase_r, self->phase_l_prev, self->phase_r_prev,
  846|  20.6k|        self->r_out_ph_re_in_m2, self->r_out_ph_im_in_m2, self);
  847|       |
  848|  20.6k|    if (self->res_bands == 0) {
  ------------------
  |  Branch (848:9): [True: 20.6k, False: 0]
  ------------------
  849|   767k|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (849:20): [True: 746k, False: 20.6k]
  ------------------
  850|   746k|        WORD32 pb;
  851|  7.10M|        for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (851:22): [True: 6.36M, False: 746k]
  ------------------
  852|  6.36M|          self->r_out_im_in_m2[ts][pb][0][0] =
  853|  6.36M|              self->r_out_re_in_m2[ts][pb][0][0] *
  854|  6.36M|              self->r_out_ph_im_in_m2[ts][pb][0];
  855|       |
  856|  6.36M|          self->r_out_im_in_m2[ts][pb][1][0] =
  857|  6.36M|              self->r_out_re_in_m2[ts][pb][1][0] *
  858|  6.36M|              self->r_out_ph_im_in_m2[ts][pb][1];
  859|       |
  860|  6.36M|          self->r_out_re_in_m2[ts][pb][0][0] =
  861|  6.36M|              self->r_out_re_in_m2[ts][pb][0][0] *
  862|  6.36M|              self->r_out_ph_re_in_m2[ts][pb][0];
  863|       |
  864|  6.36M|          self->r_out_re_in_m2[ts][pb][1][0] =
  865|  6.36M|              self->r_out_re_in_m2[ts][pb][1][0] *
  866|  6.36M|              self->r_out_ph_re_in_m2[ts][pb][1];
  867|       |
  868|  6.36M|          self->r_out_diff_im_in_m2[ts][pb][0][1] =
  869|  6.36M|              self->r_out_diff_re_in_m2[ts][pb][0][1] *
  870|  6.36M|              self->r_out_ph_im_in_m2[ts][pb][0];
  871|       |
  872|  6.36M|          self->r_out_diff_im_in_m2[ts][pb][1][1] =
  873|  6.36M|              self->r_out_diff_re_in_m2[ts][pb][1][1] *
  874|  6.36M|              self->r_out_ph_im_in_m2[ts][pb][1];
  875|       |
  876|  6.36M|          self->r_out_diff_re_in_m2[ts][pb][0][1] =
  877|  6.36M|              self->r_out_diff_re_in_m2[ts][pb][0][1] *
  878|  6.36M|              self->r_out_ph_re_in_m2[ts][pb][0];
  879|       |
  880|  6.36M|          self->r_out_diff_re_in_m2[ts][pb][1][1] =
  881|  6.36M|              self->r_out_diff_re_in_m2[ts][pb][1][1] *
  882|  6.36M|              self->r_out_ph_re_in_m2[ts][pb][1];
  883|  6.36M|        }
  884|   746k|      }
  885|  20.6k|    } 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|  20.6k|  }
  977|  91.4k|  if (self->res_bands == 0) {
  ------------------
  |  Branch (977:7): [True: 31.5k, False: 59.9k]
  ------------------
  978|  1.14M|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (978:18): [True: 1.11M, False: 31.5k]
  ------------------
  979|  48.2M|      for (qs = 0; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (979:20): [True: 47.1M, False: 1.11M]
  ------------------
  980|  47.1M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  981|   141M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (981:23): [True: 94.3M, False: 47.1M]
  ------------------
  982|  94.3M|          self->hyb_dir_out[row][ts][qs].re =
  983|  94.3M|              self->w_dir[0][ts][qs].re *
  984|  94.3M|              self->r_out_re_in_m2[ts][indx][row][0];
  985|  94.3M|          self->hyb_dir_out[row][ts][qs].im =
  986|  94.3M|              self->w_dir[0][ts][qs].im *
  987|  94.3M|              self->r_out_re_in_m2[ts][indx][row][0];
  988|  94.3M|          self->hyb_diff_out[row][ts][qs].re =
  989|  94.3M|              self->w_diff[1][ts][qs].re *
  990|  94.3M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
  991|  94.3M|          self->hyb_diff_out[row][ts][qs].im =
  992|  94.3M|              self->w_diff[1][ts][qs].im *
  993|  94.3M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
  994|  94.3M|        }
  995|  47.1M|      }
  996|  1.11M|    }
  997|  59.9k|  } else if (self->res_bands == 28) {
  ------------------
  |  Branch (997:14): [True: 18.3k, False: 41.5k]
  ------------------
  998|   606k|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (998:18): [True: 588k, False: 18.3k]
  ------------------
  999|  23.5M|      for (qs = 0; qs < self->hyb_band_count[1]; qs++) {
  ------------------
  |  Branch (999:20): [True: 22.9M, False: 588k]
  ------------------
 1000|  22.9M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1001|  68.8M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1001:23): [True: 45.8M, False: 22.9M]
  ------------------
 1002|  45.8M|          FLOAT32 sum_re_dir = 0;
 1003|  45.8M|          FLOAT32 sum_im_dir = 0;
 1004|   137M|          for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1004:25): [True: 91.7M, False: 45.8M]
  ------------------
 1005|  91.7M|            sum_re_dir += self->w_dir[col][ts][qs].re *
 1006|  91.7M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1007|  91.7M|            sum_im_dir += self->w_dir[col][ts][qs].im *
 1008|  91.7M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1009|  91.7M|          }
 1010|  45.8M|          self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1011|  45.8M|          self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1012|  45.8M|        }
 1013|  22.9M|      }
 1014|   645k|      for (; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (1014:14): [True: 56.8k, False: 588k]
  ------------------
 1015|  56.8k|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1016|   170k|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1016:23): [True: 113k, False: 56.8k]
  ------------------
 1017|   113k|          self->hyb_dir_out[row][ts][qs].re =
 1018|   113k|              self->w_dir[0][ts][qs].re *
 1019|   113k|              self->r_out_re_in_m2[ts][indx][row][0];
 1020|   113k|          self->hyb_dir_out[row][ts][qs].im =
 1021|   113k|              self->w_dir[0][ts][qs].im *
 1022|   113k|              self->r_out_re_in_m2[ts][indx][row][0];
 1023|   113k|        }
 1024|  56.8k|      }
 1025|   588k|    }
 1026|  41.5k|  } else {
 1027|  41.5k|    WORD32 dif_s = ixheaacd_mps_gain_set_indx[self->res_bands];
 1028|  2.00M|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (1028:18): [True: 1.96M, False: 41.5k]
  ------------------
 1029|  32.8M|      for (qs = 0; qs < dif_s; qs++) {
  ------------------
  |  Branch (1029:20): [True: 30.8M, False: 1.96M]
  ------------------
 1030|  30.8M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1031|  92.5M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1031:23): [True: 61.6M, False: 30.8M]
  ------------------
 1032|  61.6M|          FLOAT32 sum_re_dir = 0;
 1033|  61.6M|          FLOAT32 sum_im_dir = 0;
 1034|   185M|          for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1034:25): [True: 123M, False: 61.6M]
  ------------------
 1035|   123M|            sum_re_dir += self->w_dir[col][ts][qs].re *
 1036|   123M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1037|   123M|            sum_im_dir += self->w_dir[col][ts][qs].im *
 1038|   123M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1039|   123M|          }
 1040|  61.6M|          self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1041|  61.6M|          self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1042|  61.6M|        }
 1043|  30.8M|      }
 1044|  29.3M|      for (; qs < self->hyb_band_count[1]; qs++) {
  ------------------
  |  Branch (1044:14): [True: 27.3M, False: 1.96M]
  ------------------
 1045|  27.3M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1046|  82.0M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1046:23): [True: 54.7M, False: 27.3M]
  ------------------
 1047|  54.7M|          FLOAT32 sum_re_dir = 0;
 1048|  54.7M|          FLOAT32 sum_im_dir = 0;
 1049|   164M|          for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1049:25): [True: 109M, False: 54.7M]
  ------------------
 1050|   109M|            sum_re_dir += self->w_dir[col][ts][qs].re *
 1051|   109M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1052|   109M|            sum_im_dir += self->w_dir[col][ts][qs].im *
 1053|   109M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1054|   109M|          }
 1055|  54.7M|          self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1056|  54.7M|          self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1057|  54.7M|          self->hyb_diff_out[row][ts][qs].re =
 1058|  54.7M|              self->w_diff[1][ts][qs].re *
 1059|  54.7M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
 1060|  54.7M|          self->hyb_diff_out[row][ts][qs].im =
 1061|  54.7M|              self->w_diff[1][ts][qs].im *
 1062|  54.7M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
 1063|  54.7M|        }
 1064|  27.3M|      }
 1065|  28.7M|      for (; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (1065:14): [True: 26.7M, False: 1.96M]
  ------------------
 1066|  26.7M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1067|  80.3M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1067:23): [True: 53.5M, False: 26.7M]
  ------------------
 1068|  53.5M|          self->hyb_dir_out[row][ts][qs].re =
 1069|  53.5M|              self->w_dir[0][ts][qs].re *
 1070|  53.5M|              self->r_out_re_in_m2[ts][indx][row][0];
 1071|  53.5M|          self->hyb_dir_out[row][ts][qs].im =
 1072|  53.5M|              self->w_dir[0][ts][qs].im *
 1073|  53.5M|              self->r_out_re_in_m2[ts][indx][row][0];
 1074|  53.5M|          self->hyb_diff_out[row][ts][qs].re =
 1075|  53.5M|              self->w_diff[1][ts][qs].re *
 1076|  53.5M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
 1077|  53.5M|          self->hyb_diff_out[row][ts][qs].im =
 1078|  53.5M|              self->w_diff[1][ts][qs].im *
 1079|  53.5M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
 1080|  53.5M|        }
 1081|  26.7M|      }
 1082|  1.96M|    }
 1083|  41.5k|  }
 1084|       |
 1085|  91.4k|  if (complex_m2) {
  ------------------
  |  Branch (1085:7): [True: 83.8k, False: 7.62k]
  ------------------
 1086|  83.8k|    if (phase_interpolation) {
  ------------------
  |  Branch (1086:9): [True: 20.6k, False: 63.2k]
  ------------------
 1087|   767k|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (1087:20): [True: 746k, False: 20.6k]
  ------------------
 1088|  2.24M|        for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (1088:22): [True: 1.49M, False: 746k]
  ------------------
 1089|  1.49M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1090|  4.48M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1090:25): [True: 2.98M, False: 1.49M]
  ------------------
 1091|  2.98M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
 1092|  2.98M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
 1093|  5.97M|            for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1093:27): [True: 2.98M, False: 2.98M]
  ------------------
 1094|  2.98M|              sum_re_dir += self->w_dir[col][ts][qs].im *
 1095|  2.98M|                            self->r_out_im_in_m2[ts][indx][row][col];
 1096|  2.98M|              sum_im_dir -= self->w_dir[col][ts][qs].re *
 1097|  2.98M|                            self->r_out_im_in_m2[ts][indx][row][col];
 1098|  2.98M|            }
 1099|  2.98M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1100|  2.98M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1101|  2.98M|            self->hyb_diff_out[row][ts][qs].re +=
 1102|  2.98M|                self->w_diff[1][ts][qs].im *
 1103|  2.98M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
 1104|  2.98M|            self->hyb_diff_out[row][ts][qs].im -=
 1105|  2.98M|                self->w_diff[1][ts][qs].re *
 1106|  2.98M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
 1107|  2.98M|          }
 1108|  1.49M|        }
 1109|  39.5M|        for (qs = 2; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (1109:22): [True: 38.7M, False: 746k]
  ------------------
 1110|  38.7M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1111|   116M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1111:25): [True: 77.5M, False: 38.7M]
  ------------------
 1112|  77.5M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
 1113|  77.5M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
 1114|   155M|            for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1114:27): [True: 77.5M, False: 77.5M]
  ------------------
 1115|  77.5M|              sum_re_dir -= self->w_dir[col][ts][qs].im *
 1116|  77.5M|                            self->r_out_im_in_m2[ts][indx][row][col];
 1117|  77.5M|              sum_im_dir += self->w_dir[col][ts][qs].re *
 1118|  77.5M|                            self->r_out_im_in_m2[ts][indx][row][col];
 1119|  77.5M|            }
 1120|  77.5M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1121|  77.5M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1122|  77.5M|            self->hyb_diff_out[row][ts][qs].re -=
 1123|  77.5M|                self->w_diff[1][ts][qs].im *
 1124|  77.5M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
 1125|  77.5M|            self->hyb_diff_out[row][ts][qs].im +=
 1126|  77.5M|                self->w_diff[1][ts][qs].re *
 1127|  77.5M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
 1128|  77.5M|          }
 1129|  38.7M|        }
 1130|   746k|      }
 1131|  63.2k|    } else {
 1132|  63.2k|      WORD32 num_cols = (self->dir_sig_count + self->decor_sig_count) > 1
  ------------------
  |  Branch (1132:25): [True: 63.2k, False: 0]
  ------------------
 1133|  63.2k|                         ? 1
 1134|  63.2k|                         : (self->dir_sig_count + self->decor_sig_count);
 1135|  2.68M|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (1135:20): [True: 2.61M, False: 63.2k]
  ------------------
 1136|  7.85M|        for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (1136:22): [True: 5.23M, False: 2.61M]
  ------------------
 1137|  5.23M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1138|  15.7M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1138:25): [True: 10.4M, False: 5.23M]
  ------------------
 1139|  10.4M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
 1140|  10.4M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
 1141|  10.4M|            if (num_cols > 0) {
  ------------------
  |  Branch (1141:17): [True: 10.4M, False: 0]
  ------------------
 1142|  10.4M|              sum_re_dir += self->w_dir[0][ts][qs].im *
 1143|  10.4M|                            self->r_out_im_in_m2[ts][indx][row][0];
 1144|  10.4M|              sum_im_dir -= self->w_dir[0][ts][qs].re *
 1145|  10.4M|                            self->r_out_im_in_m2[ts][indx][row][0];
 1146|  10.4M|            }
 1147|  10.4M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1148|  10.4M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1149|  10.4M|          }
 1150|  5.23M|        }
 1151|   106M|        for (qs = 2; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (1151:22): [True: 103M, False: 2.61M]
  ------------------
 1152|   103M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1153|   311M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1153:25): [True: 207M, False: 103M]
  ------------------
 1154|   207M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
 1155|   207M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
 1156|   207M|            if (num_cols > 0) {
  ------------------
  |  Branch (1156:17): [True: 207M, False: 0]
  ------------------
 1157|   207M|              sum_re_dir -= self->w_dir[0][ts][qs].im *
 1158|   207M|                            self->r_out_im_in_m2[ts][indx][row][0];
 1159|   207M|              sum_im_dir += self->w_dir[0][ts][qs].re *
 1160|   207M|                            self->r_out_im_in_m2[ts][indx][row][0];
 1161|   207M|            }
 1162|   207M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1163|   207M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1164|   207M|          }
 1165|   103M|        }
 1166|  2.61M|      }
 1167|  63.2k|    }
 1168|  83.8k|  }
 1169|  91.4k|  return;
 1170|  91.4k|}
ixheaacd_mps_upmix_interp_type1:
 1222|  93.8k|    WORD32 num_cols, ia_mps_dec_state_struct *self, WORD32 bs_high_rate_mode) {
 1223|  93.8k|  WORD32 ts, ps, pb, row, col, i;
 1224|  93.8k|  FLOAT32 ks, ms, ls;
 1225|  93.8k|  FLOAT32 fl_step, fl_base;
 1226|       |
 1227|  1.34M|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1227:16): [True: 1.24M, False: 93.8k]
  ------------------
 1228|  3.74M|    for (row = 0; row < num_rows; row++) {
  ------------------
  |  Branch (1228:19): [True: 2.49M, False: 1.24M]
  ------------------
 1229|  7.32M|      for (col = 0; col < num_cols; col++) {
  ------------------
  |  Branch (1229:21): [True: 4.82M, False: 2.49M]
  ------------------
 1230|  4.82M|        ts = 0;
 1231|  4.82M|        ps = 0;
 1232|  4.82M|        ks = self->inv_param_slot_diff[ps];
 1233|  4.82M|        ms = m_matrix[ps][pb][row][col];
 1234|  4.82M|        ls = m_matrix_prev[pb][row][col];
 1235|  4.82M|        fl_step = ks * (ms - ls);
 1236|  4.82M|        fl_base = ls + fl_step;
 1237|       |
 1238|   151M|        for (i = 1; i <= (WORD32)self->param_slot_diff[0]; i++) {
  ------------------
  |  Branch (1238:21): [True: 147M, False: 4.82M]
  ------------------
 1239|   147M|          r_matrix_float[ts][pb][row][col] = fl_base;
 1240|   147M|          fl_base += fl_step;
 1241|   147M|          ts++;
 1242|   147M|        }
 1243|  4.82M|        if (bs_high_rate_mode) {
  ------------------
  |  Branch (1243:13): [True: 4.80M, False: 26.5k]
  ------------------
 1244|  6.83M|          for (ps = 1; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (1244:24): [True: 2.03M, False: 4.80M]
  ------------------
 1245|  2.03M|            ks = self->inv_param_slot_diff[ps];
 1246|  2.03M|            ms = m_matrix[ps][pb][row][col];
 1247|  2.03M|            ls = m_matrix[ps - 1][pb][row][col];
 1248|  2.03M|            fl_step = ks * (ms - ls);
 1249|  2.03M|            fl_base = ls + fl_step;
 1250|       |
 1251|  32.9M|            for (i = 1; i <= self->param_slot_diff[ps]; i++) {
  ------------------
  |  Branch (1251:25): [True: 30.8M, False: 2.03M]
  ------------------
 1252|  30.8M|              r_matrix_float[ts][pb][row][col] = fl_base;
 1253|  30.8M|              fl_base += fl_step;
 1254|  30.8M|              ts++;
 1255|  30.8M|            }
 1256|  2.03M|          }
 1257|  4.80M|        }
 1258|  4.82M|      }
 1259|  2.49M|    }
 1260|  1.24M|  }
 1261|  93.8k|  return;
 1262|  93.8k|}
ixheaacd_mps_upmix_interp_type2:
 1268|   198k|    ia_mps_dec_state_struct *self, WORD32 col) {
 1269|   198k|  WORD32 ts, ps, pb, row, i;
 1270|   198k|  FLOAT32 ks, ms, ls;
 1271|   198k|  FLOAT32 fl_step, fl_base;
 1272|       |
 1273|  2.66M|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1273:16): [True: 2.46M, False: 198k]
  ------------------
 1274|  7.38M|    for (row = 0; row < num_rows; row++) {
  ------------------
  |  Branch (1274:19): [True: 4.92M, False: 2.46M]
  ------------------
 1275|  4.92M|      ts = 0;
 1276|  4.92M|      ps = 0;
 1277|  4.92M|      ks = self->inv_param_slot_diff[ps];
 1278|  4.92M|      ms = m_matrix[ps][pb][row][col];
 1279|  4.92M|      ls = m_matrix_prev[pb][row][col];
 1280|  4.92M|      fl_step = ks * (ms - ls);
 1281|  4.92M|      fl_base = ls + fl_step;
 1282|       |
 1283|   168M|      for (i = 1; i <= (WORD32)self->param_slot_diff[0]; i++) {
  ------------------
  |  Branch (1283:19): [True: 163M, False: 4.92M]
  ------------------
 1284|   163M|        r_matrix_float[ts][pb][row][col] = fl_base;
 1285|   163M|        fl_base += fl_step;
 1286|   163M|        ts++;
 1287|   163M|      }
 1288|  5.49M|      for (ps = 1; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (1288:20): [True: 568k, False: 4.92M]
  ------------------
 1289|   568k|        ks = self->inv_param_slot_diff[ps];
 1290|   568k|        ms = m_matrix[ps][pb][row][col];
 1291|   568k|        ls = m_matrix[ps - 1][pb][row][col];
 1292|   568k|        fl_step = ks * (ms - ls);
 1293|   568k|        fl_base = ls + fl_step;
 1294|       |
 1295|  9.32M|        for (i = 1; i <= (WORD32)self->param_slot_diff[ps]; i++) {
  ------------------
  |  Branch (1295:21): [True: 8.75M, False: 568k]
  ------------------
 1296|  8.75M|          r_matrix_float[ts][pb][row][col] = fl_base;
 1297|  8.75M|          fl_base += fl_step;
 1298|  8.75M|          ts++;
 1299|  8.75M|        }
 1300|   568k|      }
 1301|  4.92M|    }
 1302|  2.46M|  }
 1303|   198k|  return;
 1304|   198k|}
ixheaacd_mps_phase_interpolation:
 1324|  24.7k|    ia_mps_dec_state_struct *self) {
 1325|  24.7k|  WORD32 i, ts, ps, pb;
 1326|  24.7k|  FLOAT32 step_l, step_r, alpha, tl, tr;
 1327|   234k|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1327:16): [True: 209k, False: 24.7k]
  ------------------
 1328|   209k|    ps = 0;
 1329|   209k|    ts = 0;
 1330|   209k|    alpha = (FLOAT32)self->inv_param_slot_diff[ps];
 1331|   209k|    tl = ixheaacd_mps_angle_interpolation(pl_prev[pb], pl[ps][pb], alpha,
 1332|   209k|                                          &step_l);
 1333|   209k|    tr = ixheaacd_mps_angle_interpolation(pr_prev[pb], pr[ps][pb], alpha,
 1334|   209k|                                          &step_r);
 1335|   209k|    step_l *= alpha;
 1336|   209k|    step_r *= alpha;
 1337|       |
 1338|  6.64M|    for (i = 1; i <= self->param_slot_diff[ps]; i++) {
  ------------------
  |  Branch (1338:17): [True: 6.43M, False: 209k]
  ------------------
 1339|  6.43M|      r_re[ts][pb][0] = (FLOAT32)cos(tl);
 1340|  6.43M|      r_im[ts][pb][0] = (FLOAT32)sin(tl);
 1341|  6.43M|      tl += step_l;
 1342|       |
 1343|  6.43M|      r_re[ts][pb][1] = (FLOAT32)cos(tr);
 1344|  6.43M|      r_im[ts][pb][1] = (FLOAT32)sin(tr);
 1345|  6.43M|      tr += step_r;
 1346|  6.43M|      ts++;
 1347|  6.43M|    }
 1348|       |
 1349|   317k|    for (ps = 1; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (1349:18): [True: 107k, False: 209k]
  ------------------
 1350|   107k|      FLOAT32 alpha = self->inv_param_slot_diff[ps];
 1351|   107k|      tl = ixheaacd_mps_angle_interpolation(pl[ps - 1][pb], pl[ps][pb], alpha,
 1352|   107k|                                            &step_l);
 1353|   107k|      tr = ixheaacd_mps_angle_interpolation(pr[ps - 1][pb], pr[ps][pb], alpha,
 1354|   107k|                                            &step_r);
 1355|   107k|      step_l *= alpha;
 1356|   107k|      step_r *= alpha;
 1357|  1.32M|      for (i = 1; i <= self->param_slot_diff[ps]; i++) {
  ------------------
  |  Branch (1357:19): [True: 1.21M, False: 107k]
  ------------------
 1358|  1.21M|        if (ts < 72 && pb < 28) {
  ------------------
  |  Branch (1358:13): [True: 1.21M, False: 0]
  |  Branch (1358:24): [True: 1.21M, False: 0]
  ------------------
 1359|  1.21M|          r_re[ts][pb][0] = (FLOAT32)cos(tl);
 1360|  1.21M|          r_im[ts][pb][0] = (FLOAT32)sin(tl);
 1361|  1.21M|          tl += step_l;
 1362|       |
 1363|  1.21M|          r_re[ts][pb][1] = (FLOAT32)cos(tr);
 1364|  1.21M|          r_im[ts][pb][1] = (FLOAT32)sin(tr);
 1365|  1.21M|          tr += step_r;
 1366|  1.21M|        }
 1367|  1.21M|        ts++;
 1368|       |
 1369|  1.21M|        if (ts > 71) {
  ------------------
  |  Branch (1369:13): [True: 0, False: 1.21M]
  ------------------
 1370|      0|          ts = 0;
 1371|      0|          break;
 1372|      0|        }
 1373|  1.21M|        if (pb > 27) {
  ------------------
  |  Branch (1373:13): [True: 0, False: 1.21M]
  ------------------
 1374|      0|          pb = 0;
 1375|      0|          break;
 1376|      0|        }
 1377|  1.21M|      }
 1378|   107k|    }
 1379|   209k|  }
 1380|  24.7k|}
ixheaacd_mps_init_pre_and_post_matrix:
 1382|  3.91k|VOID ixheaacd_mps_init_pre_and_post_matrix(ia_mps_dec_state_struct *self) {
 1383|  3.91k|  memset(self->m1_param_re_prev, 0,
 1384|  3.91k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  3.91k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  3.91k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  3.91k|#define MAX_M_INPUT (2)
  ------------------
 1385|  3.91k|  memset(self->m1_param_im_prev, 0,
 1386|  3.91k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  3.91k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  3.91k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  3.91k|#define MAX_M_INPUT (2)
  ------------------
 1387|  3.91k|  memset(self->m1_param_re_prev, 0,
 1388|  3.91k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  3.91k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  3.91k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  3.91k|#define MAX_M_INPUT (2)
  ------------------
 1389|  3.91k|  memset(self->m2_decor_re_prev, 0,
 1390|  3.91k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  3.91k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  3.91k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  3.91k|#define MAX_M_INPUT (2)
  ------------------
 1391|  3.91k|  memset(self->m2_resid_re_prev, 0,
 1392|  3.91k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  3.91k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  3.91k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  3.91k|#define MAX_M_INPUT (2)
  ------------------
 1393|  3.91k|  memset(self->m2_resid_im_prev, 0,
 1394|  3.91k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  3.91k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  3.91k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  3.91k|#define MAX_M_INPUT (2)
  ------------------
 1395|  3.91k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_buffer_pre_and_mix_matrix:
   74|   111k|    ia_mps_dec_state_struct *self) {
   75|   111k|  WORD32 pb, row, col;
   76|       |
   77|  1.54M|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (77:16): [True: 1.43M, False: 111k]
  ------------------
   78|  4.29M|    for (row = 0; row < MAX_M_INPUT; row++) {
  ------------------
  |  |   62|  4.29M|#define MAX_M_INPUT (2)
  ------------------
  |  Branch (78:19): [True: 2.86M, False: 1.43M]
  ------------------
   79|  8.59M|      for (col = 0; col < MAX_M_OUTPUT; col++) {
  ------------------
  |  |   63|  8.59M|#define MAX_M_OUTPUT (2)
  ------------------
  |  Branch (79:21): [True: 5.73M, False: 2.86M]
  ------------------
   80|  5.73M|        self->m1_param_re_prev[pb][row][col] =
   81|  5.73M|            self->m1_param_re[self->num_parameter_sets_prev - 1][pb][row][col];
   82|  5.73M|        self->m1_param_im_prev[pb][row][col] =
   83|  5.73M|            self->m1_param_im[self->num_parameter_sets_prev - 1][pb][row][col];
   84|  5.73M|        self->m2_decor_re_prev[pb][row][col] =
   85|  5.73M|            self->m2_decor_re[self->num_parameter_sets_prev - 1][pb][row][col];
   86|  5.73M|        self->m2_decor_im_prev[pb][row][col] =
   87|  5.73M|            self->m2_decor_im[self->num_parameter_sets_prev - 1][pb][row][col];
   88|  5.73M|        self->m2_resid_re_prev[pb][row][col] =
   89|  5.73M|            self->m2_resid_re[self->num_parameter_sets_prev - 1][pb][row][col];
   90|  5.73M|        self->m2_resid_im_prev[pb][row][col] =
   91|  5.73M|            self->m2_resid_im[self->num_parameter_sets_prev - 1][pb][row][col];
   92|  5.73M|      }
   93|  2.86M|    }
   94|  1.43M|  }
   95|       |
   96|  1.54M|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (96:16): [True: 1.43M, False: 111k]
  ------------------
   97|  1.43M|    self->phase_l_prev[pb] =
   98|  1.43M|        self->phase_l[self->num_parameter_sets_prev - 1][pb];
   99|  1.43M|    self->phase_r_prev[pb] =
  100|  1.43M|        self->phase_r[self->num_parameter_sets_prev - 1][pb];
  101|  1.43M|  }
  102|   111k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_par2umx_ps_core:
  173|  37.6k|                                         FLOAT32 *h_real) {
  174|  37.6k|  WORD32 band;
  175|  37.6k|  FLOAT32 c_l_temp, c_r_temp, temp;
  176|  37.6k|  WORD32 cld_idx, icc_idx;
  177|       |
  178|   384k|  for (band = 0; band < ott_band_count; band++) {
  ------------------
  |  Branch (178:18): [True: 347k, False: 37.6k]
  ------------------
  179|   347k|    cld_idx = *cld++ + 15;
  180|   347k|    icc_idx = *icc++;
  181|       |
  182|   347k|    icc_idx = icc_idx & 7;
  183|       |
  184|   347k|    c_l_temp = (ixheaacd_c_l_table[cld_idx]);
  185|   347k|    c_r_temp = (ixheaacd_c_l_table[30 - cld_idx]);
  186|       |
  187|   347k|    temp = ixheaacd_cos_table[icc_idx][cld_idx];
  188|   347k|    *h_real++ = MULT(temp, c_l_temp);
  ------------------
  |  |   46|   347k|#define MULT(a, b) (a * b)
  ------------------
  189|       |
  190|   347k|    temp = ixheaacd_cos_table[icc_idx][30 - cld_idx];
  191|   347k|    *h_real++ = MULT(temp, c_r_temp);
  ------------------
  |  |   46|   347k|#define MULT(a, b) (a * b)
  ------------------
  192|       |
  193|   347k|    temp = ixheaacd_sin_table[icc_idx][cld_idx];
  194|   347k|    *h_real++ = MULT(temp, c_l_temp);
  ------------------
  |  |   46|   347k|#define MULT(a, b) (a * b)
  ------------------
  195|       |
  196|   347k|    temp = -ixheaacd_sin_table[icc_idx][30 - cld_idx];
  197|   347k|    *h_real++ = MULT(temp, c_r_temp);
  ------------------
  |  |   46|   347k|#define MULT(a, b) (a * b)
  ------------------
  198|       |
  199|   347k|    h_real += 2;
  200|   347k|  }
  201|  37.6k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_opd_calc:
  214|  3.32k|                                  WORD32 opd[MAX_PARAMETER_BANDS]) {
  215|  3.32k|  WORD32 band;
  216|       |
  217|  33.1k|  for (band = 0; band < self->num_bands_ipd; band++) {
  ------------------
  |  Branch (217:18): [True: 29.7k, False: 3.32k]
  ------------------
  218|  29.7k|    WORD32 cld_idx = curr_bit_stream->cld_idx[param_set_idx][band] + 15;
  219|  29.7k|    WORD32 ipd_idx = (curr_bit_stream->ipd_idx[param_set_idx][band]) & 15;
  220|  29.7k|    WORD32 icc_idx = curr_bit_stream->icc_idx[param_set_idx][band];
  221|       |
  222|  29.7k|    if ((cld_idx == 15) && (ipd_idx == 8))
  ------------------
  |  Branch (222:9): [True: 21.7k, False: 8.00k]
  |  Branch (222:28): [True: 349, False: 21.4k]
  ------------------
  223|    349|      opd[band] = 0;
  224|  29.4k|    else
  225|  29.4k|      opd[band] = ixheaacd_atan_table_Q28[ipd_idx][icc_idx][cld_idx];
  226|  29.7k|  }
  227|  3.32k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_phase_wraping:
   63|  59.5k|static WORD32 ixheaacd_mps_phase_wraping(WORD32 phase) {
   64|  59.5k|  const WORD32 pi_2 = 2 * PI_IN_Q28;
  ------------------
  |  |   45|  59.5k|#define PI_IN_Q28 843314880
  ------------------
   65|       |
   66|  77.3k|  while (phase < 0) phase += pi_2;
  ------------------
  |  Branch (66:10): [True: 17.8k, False: 59.5k]
  ------------------
   67|  59.5k|  while (phase >= pi_2) phase -= pi_2;
  ------------------
  |  Branch (67:10): [True: 0, False: 59.5k]
  ------------------
   68|  59.5k|  assert((phase >= 0) && (phase < pi_2));
  ------------------
  |  Branch (68:3): [True: 0, False: 59.5k]
  |  Branch (68:3): [True: 0, False: 0]
  |  Branch (68:3): [True: 59.5k, False: 0]
  |  Branch (68:3): [True: 59.5k, False: 0]
  ------------------
   69|       |
   70|  59.5k|  return phase;
   71|  59.5k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_angle_interpolation:
 1307|   634k|                                                FLOAT32 alpha, FLOAT32 *step) {
 1308|   639k|  while (angle2 - angle1 > (FLOAT32)P_PI) {
  ------------------
  |  |   44|   639k|#define P_PI 3.1415926535897932
  ------------------
  |  Branch (1308:10): [True: 4.83k, False: 634k]
  ------------------
 1309|  4.83k|    angle1 = angle1 + 2.0f * (FLOAT32)P_PI;
  ------------------
  |  |   44|  4.83k|#define P_PI 3.1415926535897932
  ------------------
 1310|  4.83k|  }
 1311|   638k|  while (angle1 - angle2 > (FLOAT32)P_PI) {
  ------------------
  |  |   44|   638k|#define P_PI 3.1415926535897932
  ------------------
  |  Branch (1311:10): [True: 3.99k, False: 634k]
  ------------------
 1312|  3.99k|    angle2 = angle2 + 2.0f * (FLOAT32)P_PI;
  ------------------
  |  |   44|  3.99k|#define P_PI 3.1415926535897932
  ------------------
 1313|  3.99k|  }
 1314|   634k|  *step = angle2 - angle1;
 1315|   634k|  return (1 - alpha) * angle1 + alpha * angle2;
 1316|   634k|}

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

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

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

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

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

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

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

ixheaacd_res_c_pulse_data_read:
   28|  1.55k|                                      ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
   29|  1.55k|  WORD32 i, k;
   30|  1.55k|  WORD32 error = 0;
   31|  1.55k|  pulse_data->pulse_data_present = (FLAG)ixheaacd_read_bits_buf(it_bit_buf, 1);
   32|  1.55k|  if (pulse_data->pulse_data_present) {
  ------------------
  |  Branch (32:7): [True: 206, False: 1.35k]
  ------------------
   33|    206|    WORD32 tmp = ixheaacd_read_bits_buf(it_bit_buf, 8);
   34|    206|    pulse_data->number_pulse = tmp >> 6;
   35|    206|    pulse_data->pulse_start_band = tmp & 0x3F;
   36|       |
   37|    206|    if (pulse_data->pulse_start_band >= 52) {
  ------------------
  |  Branch (37:9): [True: 2, False: 204]
  ------------------
   38|      2|      return (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
  ------------------
  |  |  108|      2|#define IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR 0x0000180D
  ------------------
   39|      2|    }
   40|       |
   41|    204|    k = aac_tables_ptr->sfb_index_long[pulse_data->pulse_start_band];
   42|       |
   43|    629|    for (i = 0; i <= pulse_data->number_pulse; i++) {
  ------------------
  |  Branch (43:17): [True: 425, False: 204]
  ------------------
   44|    425|      WORD32 tmp = ixheaacd_read_bits_buf(it_bit_buf, 9);
   45|    425|      pulse_data->pulse_offset[i] = tmp >> 4;
   46|    425|      pulse_data->pulse_amp[i] = tmp & 0xF;
   47|       |
   48|    425|      k += pulse_data->pulse_offset[i];
   49|    425|      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: 415]
  ------------------
   50|    425|    }
   51|    204|  }
   52|       |
   53|  1.55k|  return error;
   54|  1.55k|}

ixheaacd_res_tns_parcor_2_lpc_32x16:
   30|    408|{
   31|    408|  WORD i, j, status;
   32|    408|  WORD32 z1;
   33|    408|  WORD16 z[MAX_ORDER + 1];
   34|    408|  WORD16 w[MAX_ORDER + 1];
   35|    408|  WORD32 accu1, accu2;
   36|       |
   37|    408|  status = 1;
   38|    408|  *scale = 0;
   39|  1.33k|  while (status) {
  ------------------
  |  Branch (39:10): [True: 929, False: 408]
  ------------------
   40|    929|    status = 0;
   41|       |
   42|  30.6k|    for (i = MAX_ORDER; i >= 0; i--) {
  ------------------
  |  |   24|    929|#define MAX_ORDER 31
  ------------------
  |  Branch (42:25): [True: 29.7k, False: 929]
  ------------------
   43|  29.7k|      z[i] = 0;
   44|  29.7k|      w[i] = 0;
   45|  29.7k|    }
   46|       |
   47|    929|    accu1 = (0x7fffffff >> *scale);
   48|       |
   49|  6.61k|    for (i = 0; i <= order; i++) {
  ------------------
  |  Branch (49:17): [True: 5.68k, False: 929]
  ------------------
   50|  5.68k|      z1 = accu1;
   51|       |
   52|  42.0k|      for (j = 0; j < order; j++) {
  ------------------
  |  Branch (52:19): [True: 36.3k, False: 5.68k]
  ------------------
   53|  36.3k|        w[j] = ixheaac_round16(accu1);
   54|       |
   55|  36.3k|        accu1 = ixheaac_mac16x16in32_shl_sat(accu1, parcor[j], z[j]);
   56|  36.3k|        if (ixheaac_abs32_sat(accu1) == 0x7fffffff) status = 1;
  ------------------
  |  Branch (56:13): [True: 4.25k, False: 32.0k]
  ------------------
   57|  36.3k|      }
   58|  42.0k|      for (j = (order - 1); j >= 0; j--) {
  ------------------
  |  Branch (58:29): [True: 36.3k, False: 5.68k]
  ------------------
   59|  36.3k|        accu2 = ixheaac_deposit16h_in32(z[j]);
   60|  36.3k|        accu2 = ixheaac_mac16x16in32_shl_sat(accu2, parcor[j], w[j]);
   61|  36.3k|        z[j + 1] = ixheaac_round16(accu2);
   62|  36.3k|        if (ixheaac_abs32_sat(accu2) == 0x7fffffff) status = 1;
  ------------------
  |  Branch (62:13): [True: 1.99k, False: 34.3k]
  ------------------
   63|  36.3k|      }
   64|       |
   65|  5.68k|      z[0] = ixheaac_round16(z1);
   66|  5.68k|      lpc[i] = ixheaac_round16(accu1);
   67|  5.68k|      accu1 = 0;
   68|  5.68k|    }
   69|    929|    accu1 = (status - 1);
   70|    929|    if (accu1 == 0) {
  ------------------
  |  Branch (70:9): [True: 521, False: 408]
  ------------------
   71|    521|      *scale = *scale + 1;
   72|    521|    }
   73|    929|  }
   74|    408|}
ixheaacd_res_tns_ar_filter_fixed_32x16:
   78|    408|                                            WORD scale_spec) {
   79|    408|  WORD32 i, j;
   80|    408|  WORD32 y, state[MAX_ORDER + 1];
   81|       |
   82|    408|  if ((order & 3) != 0) {
  ------------------
  |  Branch (82:7): [True: 349, False: 59]
  ------------------
   83|    659|    for (i = order + 1; i < ((WORD32)(order & 0xfffffffc) + 4); i++) {
  ------------------
  |  Branch (83:25): [True: 310, False: 349]
  ------------------
   84|    310|      lpc[i] = 0;
   85|    310|    }
   86|    349|    lpc[i] = 0;
   87|    349|    order = ((order & 0xfffffffc) + 4);
   88|    349|    order = order & 31;
   89|    349|  }
   90|       |
   91|  3.00k|  for (i = 0; i < order; i++) {
  ------------------
  |  Branch (91:15): [True: 2.60k, False: 408]
  ------------------
   92|  2.60k|    y = (*spectrum) << scale_spec;
   93|  10.6k|    for (j = i; j > 0; j--) {
  ------------------
  |  Branch (93:17): [True: 8.04k, False: 2.60k]
  ------------------
   94|  8.04k|      y = ixheaac_sub32_sat(y, ixheaac_mult32x16in32_shl_sat(state[j - 1], lpc[j]));
   95|  8.04k|      state[j] = state[j - 1];
   96|  8.04k|    }
   97|       |
   98|  2.60k|    state[0] = ixheaac_shl32_dir_sat_limit(y, shift_value);
   99|  2.60k|    *spectrum = y >> scale_spec;
  100|  2.60k|    spectrum += inc;
  101|  2.60k|  }
  102|       |
  103|  31.2k|  for (i = order; i < size; i++) {
  ------------------
  |  Branch (103:19): [True: 30.7k, False: 408]
  ------------------
  104|  30.7k|    y = (*spectrum) << scale_spec;
  105|       |
  106|   243k|    for (j = order; j > 0; j--) {
  ------------------
  |  Branch (106:21): [True: 212k, False: 30.7k]
  ------------------
  107|   212k|      y = ixheaac_sub32_sat(y, ixheaac_mult32x16in32_shl_sat(state[j - 1], lpc[j]));
  108|   212k|      state[j] = state[j - 1];
  109|   212k|    }
  110|       |
  111|  30.7k|    state[0] = ixheaac_shl32_dir_sat_limit(y, shift_value);
  112|  30.7k|    *spectrum = y >> scale_spec;
  113|  30.7k|    spectrum += inc;
  114|  30.7k|  }
  115|    408|}
ixheaacd_res_calc_max_spectral_line:
  117|    408|WORD32 ixheaacd_res_calc_max_spectral_line(WORD32 *p_tmp, WORD32 size) {
  118|    408|  WORD32 max_spectral_line = 0, i;
  119|    408|  WORD count, remaining, temp_1, temp_2, temp3, temp4;
  120|       |
  121|    408|  count = size >> 3;
  122|  4.46k|  for (i = count; i--;) {
  ------------------
  |  Branch (122:19): [True: 4.05k, False: 408]
  ------------------
  123|  4.05k|    temp_1 = *p_tmp++;
  124|  4.05k|    temp_2 = *p_tmp++;
  125|  4.05k|    temp3 = *p_tmp++;
  126|  4.05k|    temp4 = *p_tmp++;
  127|       |
  128|  4.05k|    max_spectral_line = ixheaac_abs32_nrm(temp_1) | max_spectral_line;
  129|  4.05k|    max_spectral_line = ixheaac_abs32_nrm(temp_2) | max_spectral_line;
  130|  4.05k|    max_spectral_line = ixheaac_abs32_nrm(temp3) | max_spectral_line;
  131|  4.05k|    max_spectral_line = ixheaac_abs32_nrm(temp4) | max_spectral_line;
  132|  4.05k|    temp_1 = *p_tmp++;
  133|  4.05k|    temp_2 = *p_tmp++;
  134|  4.05k|    temp3 = *p_tmp++;
  135|  4.05k|    temp4 = *p_tmp++;
  136|       |
  137|  4.05k|    max_spectral_line = ixheaac_abs32_nrm(temp_1) | max_spectral_line;
  138|  4.05k|    max_spectral_line = ixheaac_abs32_nrm(temp_2) | max_spectral_line;
  139|  4.05k|    max_spectral_line = ixheaac_abs32_nrm(temp3) | max_spectral_line;
  140|  4.05k|    max_spectral_line = ixheaac_abs32_nrm(temp4) | max_spectral_line;
  141|  4.05k|  }
  142|       |
  143|    408|  remaining = size - (count << 3);
  144|    408|  if (remaining) {
  ------------------
  |  Branch (144:7): [True: 229, False: 179]
  ------------------
  145|  1.14k|    for (i = remaining; i--;) {
  ------------------
  |  Branch (145:25): [True: 916, False: 229]
  ------------------
  146|    916|      max_spectral_line = ixheaac_abs32_nrm(*p_tmp) | max_spectral_line;
  147|    916|      p_tmp++;
  148|    916|    }
  149|    229|  }
  150|       |
  151|    408|  return ixheaac_norm32(max_spectral_line);
  152|    408|}

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

ixheaacd_mps_pre_matrix_mix_matrix_smoothing:
   57|   111k|    ia_mps_dec_state_struct *self) {
   58|   111k|  WORD32 smooth_band;
   59|   111k|  FLOAT32 delta, one_minus_delta;
   60|   111k|  WORD32 ps = 0, pb, row, col;
   61|   111k|  WORD32 res_bands = 0;
   62|   111k|  WORD32 *p_smoothing_data;
   63|       |
   64|   111k|  if (self->residual_coding) res_bands = self->max_res_bands;
  ------------------
  |  Branch (64:7): [True: 84.2k, False: 27.3k]
  ------------------
   65|       |
   66|   111k|  p_smoothing_data = &self->smoothing_data[ps][res_bands];
   67|       |
   68|   111k|  delta = self->param_slot_diff[ps] * self->inv_smoothing_time[ps];
   69|   111k|  one_minus_delta = 1.0f - delta;
   70|       |
   71|   896k|  for (pb = res_bands; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (71:24): [True: 784k, False: 111k]
  ------------------
   72|   784k|    smooth_band = *p_smoothing_data++;
   73|   784k|    if (smooth_band) {
  ------------------
  |  Branch (73:9): [True: 40.1k, False: 744k]
  ------------------
   74|   120k|      for (row = 0; row < MAX_M_OUTPUT; row++) {
  ------------------
  |  |   63|   120k|#define MAX_M_OUTPUT (2)
  ------------------
  |  Branch (74:21): [True: 80.3k, False: 40.1k]
  ------------------
   75|   240k|        for (col = 0; col < MAX_M_INPUT; col++) {
  ------------------
  |  |   62|   240k|#define MAX_M_INPUT (2)
  ------------------
  |  Branch (75:23): [True: 160k, False: 80.3k]
  ------------------
   76|   160k|          self->m1_param_re[ps][pb][row][col] =
   77|   160k|              (MULT(delta, self->m1_param_re[ps][pb][row][col]) +
  ------------------
  |  |   45|   160k|#define MULT(a, b) (a * b)
  ------------------
   78|   160k|               MULT(one_minus_delta, self->m1_param_re_prev[pb][row][col]));
  ------------------
  |  |   45|   160k|#define MULT(a, b) (a * b)
  ------------------
   79|   160k|          self->m1_param_im[ps][pb][row][col] =
   80|   160k|              (MULT(delta, self->m1_param_im[ps][pb][row][col]) +
  ------------------
  |  |   45|   160k|#define MULT(a, b) (a * b)
  ------------------
   81|   160k|               MULT(one_minus_delta, self->m1_param_im_prev[pb][row][col]));
  ------------------
  |  |   45|   160k|#define MULT(a, b) (a * b)
  ------------------
   82|   160k|          self->m2_decor_re[ps][pb][row][col] =
   83|   160k|              (MULT(delta, self->m2_decor_re[ps][pb][row][col]) +
  ------------------
  |  |   45|   160k|#define MULT(a, b) (a * b)
  ------------------
   84|   160k|               MULT(one_minus_delta, self->m2_decor_re_prev[pb][row][col]));
  ------------------
  |  |   45|   160k|#define MULT(a, b) (a * b)
  ------------------
   85|   160k|          self->m2_decor_im[ps][pb][row][col] =
   86|   160k|              (MULT(delta, self->m2_decor_im[ps][pb][row][col]) +
  ------------------
  |  |   45|   160k|#define MULT(a, b) (a * b)
  ------------------
   87|   160k|               MULT(one_minus_delta, self->m2_decor_im_prev[pb][row][col]));
  ------------------
  |  |   45|   160k|#define MULT(a, b) (a * b)
  ------------------
   88|   160k|          self->m2_resid_re[ps][pb][row][col] =
   89|   160k|              (MULT(delta, self->m2_resid_re[ps][pb][row][col]) +
  ------------------
  |  |   45|   160k|#define MULT(a, b) (a * b)
  ------------------
   90|   160k|               MULT(one_minus_delta, self->m2_resid_re_prev[pb][row][col]));
  ------------------
  |  |   45|   160k|#define MULT(a, b) (a * b)
  ------------------
   91|   160k|          self->m2_resid_im[ps][pb][row][col] =
   92|   160k|              (MULT(delta, self->m2_resid_im[ps][pb][row][col]) +
  ------------------
  |  |   45|   160k|#define MULT(a, b) (a * b)
  ------------------
   93|   160k|               MULT(one_minus_delta, self->m2_resid_im_prev[pb][row][col]));
  ------------------
  |  |   45|   160k|#define MULT(a, b) (a * b)
  ------------------
   94|   160k|        }
   95|  80.3k|      }
   96|  40.1k|      self->pre_mix_req++;
   97|  40.1k|    }
   98|   784k|  }
   99|       |
  100|   136k|  for (ps = 1; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (100:16): [True: 24.5k, False: 111k]
  ------------------
  101|  24.5k|    delta = self->param_slot_diff[ps] * self->inv_smoothing_time[ps];
  102|  24.5k|    one_minus_delta = 1.0f - delta;
  103|       |
  104|  24.5k|    p_smoothing_data = &self->smoothing_data[ps][res_bands];
  105|       |
  106|   176k|    for (pb = res_bands; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (106:26): [True: 152k, False: 24.5k]
  ------------------
  107|   152k|      smooth_band = *p_smoothing_data++;
  108|   152k|      if (smooth_band) {
  ------------------
  |  Branch (108:11): [True: 25.6k, False: 126k]
  ------------------
  109|  77.0k|        for (row = 0; row < MAX_M_OUTPUT; row++) {
  ------------------
  |  |   63|  77.0k|#define MAX_M_OUTPUT (2)
  ------------------
  |  Branch (109:23): [True: 51.3k, False: 25.6k]
  ------------------
  110|   154k|          for (col = 0; col < MAX_M_INPUT; col++) {
  ------------------
  |  |   62|   154k|#define MAX_M_INPUT (2)
  ------------------
  |  Branch (110:25): [True: 102k, False: 51.3k]
  ------------------
  111|   102k|            self->m1_param_re[ps][pb][row][col] =
  112|   102k|                (MULT(delta, self->m1_param_re[ps][pb][row][col]) +
  ------------------
  |  |   45|   102k|#define MULT(a, b) (a * b)
  ------------------
  113|   102k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|   102k|#define MULT(a, b) (a * b)
  ------------------
  114|   102k|                      self->m1_param_re[ps - 1][pb][row][col]));
  115|   102k|            self->m1_param_im[ps][pb][row][col] =
  116|   102k|                (MULT(delta, self->m1_param_im[ps][pb][row][col]) +
  ------------------
  |  |   45|   102k|#define MULT(a, b) (a * b)
  ------------------
  117|   102k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|   102k|#define MULT(a, b) (a * b)
  ------------------
  118|   102k|                      self->m1_param_im[ps - 1][pb][row][col]));
  119|   102k|            self->m2_resid_re[ps][pb][row][col] =
  120|   102k|                (MULT(delta, self->m2_resid_re[ps][pb][row][col]) +
  ------------------
  |  |   45|   102k|#define MULT(a, b) (a * b)
  ------------------
  121|   102k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|   102k|#define MULT(a, b) (a * b)
  ------------------
  122|   102k|                      self->m2_resid_re[ps - 1][pb][row][col]));
  123|   102k|            self->m2_decor_re[ps][pb][row][col] =
  124|   102k|                (MULT(delta, self->m2_decor_re[ps][pb][row][col]) +
  ------------------
  |  |   45|   102k|#define MULT(a, b) (a * b)
  ------------------
  125|   102k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|   102k|#define MULT(a, b) (a * b)
  ------------------
  126|   102k|                      self->m2_decor_re[ps - 1][pb][row][col]));
  127|   102k|            self->m2_decor_im[ps][pb][row][col] =
  128|   102k|                (MULT(delta, self->m2_decor_im[ps][pb][row][col]) +
  ------------------
  |  |   45|   102k|#define MULT(a, b) (a * b)
  ------------------
  129|   102k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|   102k|#define MULT(a, b) (a * b)
  ------------------
  130|   102k|                      self->m2_decor_im[ps - 1][pb][row][col]));
  131|   102k|            self->m2_resid_im[ps][pb][row][col] =
  132|   102k|                (MULT(delta, self->m2_resid_im[ps][pb][row][col]) +
  ------------------
  |  |   45|   102k|#define MULT(a, b) (a * b)
  ------------------
  133|   102k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|   102k|#define MULT(a, b) (a * b)
  ------------------
  134|   102k|                      self->m2_resid_im[ps - 1][pb][row][col]));
  135|   102k|          }
  136|  51.3k|        }
  137|  25.6k|        self->pre_mix_req++;
  138|  25.6k|      }
  139|   152k|    }
  140|  24.5k|  }
  141|   111k|}
ixheaacd_mps_smoothing_opd:
  143|   111k|VOID ixheaacd_mps_smoothing_opd(ia_mps_dec_state_struct *self) {
  144|   111k|  WORD32 ps, pb;
  145|   111k|  WORD32 delta, one_minus_delta;
  146|       |
  147|   111k|  if (self->opd_smoothing_mode == 0) {
  ------------------
  |  Branch (147:7): [True: 108k, False: 2.69k]
  ------------------
  148|  1.50M|    for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (148:18): [True: 1.39M, False: 108k]
  ------------------
  149|  1.39M|      self->opd_smooth.smooth_l_phase[pb] =
  150|  1.39M|          ((WORD32)(self->phase_l[self->num_parameter_sets - 1][pb] *
  151|  1.39M|                    Q28_VALUE)) >>
  ------------------
  |  |   52|  1.39M|#define Q28_VALUE (1 << 28)
  ------------------
  152|  1.39M|          1;
  153|  1.39M|      self->opd_smooth.smooth_r_phase[pb] =
  154|  1.39M|          ((WORD32)(self->phase_r[self->num_parameter_sets - 1][pb] *
  155|  1.39M|                    Q28_VALUE)) >>
  ------------------
  |  |   52|  1.39M|#define Q28_VALUE (1 << 28)
  ------------------
  156|  1.39M|          1;
  157|  1.39M|    }
  158|   108k|    return;
  159|   108k|  }
  160|  8.26k|  for (ps = 0; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (160:16): [True: 5.56k, False: 2.69k]
  ------------------
  161|  5.56k|    WORD32 thr = self->bs_frame.ipd_data.bs_quant_coarse_xxx[ps]
  ------------------
  |  Branch (161:18): [True: 2.65k, False: 2.91k]
  ------------------
  162|  5.56k|                  ? FIFTY_X_PI_BY_180_Q27
  ------------------
  |  |   50|  2.65k|#define FIFTY_X_PI_BY_180_Q27 (117127067)
  ------------------
  163|  5.56k|                  : TWENTY_FIVE_X_PI_BY_180_Q27;
  ------------------
  |  |   51|  2.91k|#define TWENTY_FIVE_X_PI_BY_180_Q27 (58563533)
  ------------------
  164|       |
  165|  5.56k|    delta = self->param_slot_diff[ps] * ONE_BY_128_IN_Q30;
  ------------------
  |  |   47|  5.56k|#define ONE_BY_128_IN_Q30 (8388608)
  ------------------
  166|  5.56k|    one_minus_delta = ONE_IN_Q30 - delta;
  ------------------
  |  |   48|  5.56k|#define ONE_IN_Q30 (1073741824)
  ------------------
  167|       |
  168|  73.9k|    for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (168:18): [True: 68.3k, False: 5.56k]
  ------------------
  169|  68.3k|      WORD32 ltemp, rtemp, tmp;
  170|  68.3k|      ltemp = ((WORD32)(self->phase_l[ps][pb] * Q28_FLOAT_VAL)) >> 1;
  ------------------
  |  |   53|  68.3k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  ------------------
  171|  68.3k|      rtemp = ((WORD32)(self->phase_r[ps][pb] * Q28_FLOAT_VAL)) >> 1;
  ------------------
  |  |   53|  68.3k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  ------------------
  172|       |
  173|  71.0k|      while (ltemp > self->opd_smooth.smooth_l_phase[pb] + PI_IN_Q27)
  ------------------
  |  |   49|  71.0k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (173:14): [True: 2.67k, False: 68.3k]
  ------------------
  174|  2.67k|        ltemp -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|  2.67k|#define PI_IN_Q27 (421657440)
  ------------------
  175|  71.3k|      while (ltemp < self->opd_smooth.smooth_l_phase[pb] - PI_IN_Q27)
  ------------------
  |  |   49|  71.3k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (175:14): [True: 2.97k, False: 68.3k]
  ------------------
  176|  2.97k|        ltemp += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  2.97k|#define PI_IN_Q27 (421657440)
  ------------------
  177|  70.3k|      while (rtemp > self->opd_smooth.smooth_r_phase[pb] + PI_IN_Q27)
  ------------------
  |  |   49|  70.3k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (177:14): [True: 1.92k, False: 68.3k]
  ------------------
  178|  1.92k|        rtemp -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|  1.92k|#define PI_IN_Q27 (421657440)
  ------------------
  179|  70.5k|      while (rtemp < self->opd_smooth.smooth_r_phase[pb] - PI_IN_Q27)
  ------------------
  |  |   49|  70.5k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (179:14): [True: 2.15k, False: 68.3k]
  ------------------
  180|  2.15k|        rtemp += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  2.15k|#define PI_IN_Q27 (421657440)
  ------------------
  181|       |
  182|  68.3k|      self->opd_smooth.smooth_l_phase[pb] =
  183|  68.3k|          (ixheaac_mult32_shl(delta, ltemp) +
  184|  68.3k|           ixheaac_mult32_shl(one_minus_delta,
  185|  68.3k|                               self->opd_smooth.smooth_l_phase[pb]))
  186|  68.3k|          << 1;
  187|  68.3k|      self->opd_smooth.smooth_r_phase[pb] =
  188|  68.3k|          (ixheaac_mult32_shl(delta, rtemp) +
  189|  68.3k|           ixheaac_mult32_shl(one_minus_delta,
  190|  68.3k|                               self->opd_smooth.smooth_r_phase[pb]))
  191|  68.3k|          << 1;
  192|       |
  193|  68.3k|      tmp = (ltemp - rtemp) - (self->opd_smooth.smooth_l_phase[pb] -
  194|  68.3k|                               self->opd_smooth.smooth_r_phase[pb]);
  195|  68.4k|      while (tmp > PI_IN_Q27) tmp -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|  68.4k|#define PI_IN_Q27 (421657440)
  ------------------
                    while (tmp > PI_IN_Q27) tmp -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|     83|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (195:14): [True: 83, False: 68.3k]
  ------------------
  196|  68.5k|      while (tmp < -PI_IN_Q27) tmp += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  68.5k|#define PI_IN_Q27 (421657440)
  ------------------
                    while (tmp < -PI_IN_Q27) tmp += 2 * PI_IN_Q27;
  ------------------
  |  |   49|    188|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (196:14): [True: 188, False: 68.3k]
  ------------------
  197|       |
  198|  68.3k|      if (ixheaac_abs32(tmp) > thr) {
  ------------------
  |  Branch (198:11): [True: 5.73k, False: 62.6k]
  ------------------
  199|  5.73k|        self->opd_smooth.smooth_l_phase[pb] = ltemp;
  200|  5.73k|        self->opd_smooth.smooth_r_phase[pb] = rtemp;
  201|  5.73k|      }
  202|       |
  203|  69.2k|      while (self->opd_smooth.smooth_l_phase[pb] > 2 * PI_IN_Q27)
  ------------------
  |  |   49|  69.2k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (203:14): [True: 822, False: 68.3k]
  ------------------
  204|    822|        self->opd_smooth.smooth_l_phase[pb] -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|    822|#define PI_IN_Q27 (421657440)
  ------------------
  205|  70.7k|      while (self->opd_smooth.smooth_l_phase[pb] < 0)
  ------------------
  |  Branch (205:14): [True: 2.38k, False: 68.3k]
  ------------------
  206|  2.38k|        self->opd_smooth.smooth_l_phase[pb] += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  2.38k|#define PI_IN_Q27 (421657440)
  ------------------
  207|  69.2k|      while (self->opd_smooth.smooth_r_phase[pb] > 2 * PI_IN_Q27)
  ------------------
  |  |   49|  69.2k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (207:14): [True: 850, False: 68.3k]
  ------------------
  208|    850|        self->opd_smooth.smooth_r_phase[pb] -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|    850|#define PI_IN_Q27 (421657440)
  ------------------
  209|  70.0k|      while (self->opd_smooth.smooth_r_phase[pb] < 0)
  ------------------
  |  Branch (209:14): [True: 1.70k, False: 68.3k]
  ------------------
  210|  1.70k|        self->opd_smooth.smooth_r_phase[pb] += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  1.70k|#define PI_IN_Q27 (421657440)
  ------------------
  211|       |
  212|  68.3k|      self->phase_l[ps][pb] =
  213|  68.3k|          (self->opd_smooth.smooth_l_phase[pb] << 1) * ONE_BY_Q28_FLOAT_VAL;
  ------------------
  |  |   54|  68.3k|#define ONE_BY_Q28_FLOAT_VAL (1.0f / Q28_FLOAT_VAL)
  |  |  ------------------
  |  |  |  |   53|  68.3k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  |  |  ------------------
  ------------------
  214|  68.3k|      self->phase_r[ps][pb] =
  215|  68.3k|          (self->opd_smooth.smooth_r_phase[pb] << 1) * ONE_BY_Q28_FLOAT_VAL;
  ------------------
  |  |   54|  68.3k|#define ONE_BY_Q28_FLOAT_VAL (1.0f / Q28_FLOAT_VAL)
  |  |  ------------------
  |  |  |  |   53|  68.3k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  |  |  ------------------
  ------------------
  216|  68.3k|    }
  217|  5.56k|  }
  218|  2.69k|}
ixheaacd_smooth_m1m2:
  255|  21.0k|VOID ixheaacd_smooth_m1m2(ia_heaac_mps_state_struct *pstr_mps_state) {
  256|  21.0k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
  257|  21.0k|  ia_mps_persistent_mem *persistent_mem = &curr_state->mps_persistent_mem;
  258|  21.0k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  259|  21.0k|  ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
  260|  21.0k|  ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
  261|  21.0k|  WORD32 *m1_param_real_prev = persistent_mem->m1_param_real_prev;
  262|  21.0k|  WORD32 *m2_decor_real_prev = persistent_mem->m2_decor_real_prev;
  263|  21.0k|  WORD32 *m2_resid_real_prev = persistent_mem->m2_resid_real_prev;
  264|       |
  265|  21.0k|  WORD32 num_parameter_bands = curr_state->num_parameter_bands;
  266|  21.0k|  WORD32 num_direct_signals = curr_state->num_direct_signals;
  267|  21.0k|  WORD32 num_decor_signals = curr_state->num_decor_signals;
  268|  21.0k|  WORD32 m1_param_imag_present = curr_state->m1_param_imag_present;
  269|  21.0k|  WORD32 m2_param_imag_present = curr_state->m2_param_imag_present;
  270|  21.0k|  WORD32 col_counter = num_direct_signals + num_decor_signals;
  271|  21.0k|  WORD32 num_parameter_sets = curr_state->num_parameter_sets;
  272|  21.0k|  WORD32 num_output_channels = curr_state->num_output_channels;
  273|  21.0k|  WORD32 num_v_channels = curr_state->num_v_channels;
  274|  21.0k|  WORD32 num_x_channels = curr_state->num_x_channels;
  275|  21.0k|  WORD32 smooth_control = curr_state->smooth_control;
  276|  21.0k|  WORD32 smooth_config = curr_state->smooth_config;
  277|  21.0k|  WORD32 resid_col_counter;
  278|  21.0k|  WORD32 smooth_band_arr[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
  279|       |
  280|  21.0k|  WORD32 *delta, *one_minus_delta, *delta_ptr, *one_minus_delta_ptr;
  281|  21.0k|  WORD32 *param_r, *param_i, *param_prev_r, *param_prev_i;
  282|       |
  283|  21.0k|  WORD32 *ton;
  284|  21.0k|  WORD32 i, ps, pb, row, col;
  285|  21.0k|  WORD32 res_bands = 0;
  286|  21.0k|  WORD32 idx = 0;
  287|       |
  288|  21.0k|  WORD32 *m2_decor_imag_prev = persistent_mem->m2_decor_imag_prev;
  289|  21.0k|  WORD32 *m2_resid_imag_prev = persistent_mem->m2_resid_imag_prev;
  290|  21.0k|  WORD32 *m1_param_imag_prev = persistent_mem->m1_param_imag_prev;
  291|       |
  292|  21.0k|  ton = pstr_mps_state->mps_scratch_mem_v;
  293|  21.0k|  delta = delta_ptr =
  294|  21.0k|      ton + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*delta), BYTE_ALIGN_8);
  ------------------
  |  |   89|  21.0k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  295|  21.0k|  one_minus_delta = one_minus_delta_ptr =
  296|  21.0k|      delta +
  297|  21.0k|      IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_SETS, sizeof(*one_minus_delta), BYTE_ALIGN_8);
  ------------------
  |  |   89|  21.0k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  298|       |
  299|  21.0k|  param_r = curr_state->res_bands;
  300|  21.0k|  if (curr_state->residual_coding) {
  ------------------
  |  Branch (300:7): [True: 548, False: 20.5k]
  ------------------
  301|  6.02k|    for (i = 0; i < MAX_RESIDUAL_CHANNELS_MPS; i++) {
  ------------------
  |  |   68|  6.02k|#define MAX_RESIDUAL_CHANNELS_MPS (10)
  ------------------
  |  Branch (301:17): [True: 5.48k, False: 548]
  ------------------
  302|  5.48k|      if (param_r[i] > res_bands) {
  ------------------
  |  Branch (302:11): [True: 591, False: 4.88k]
  ------------------
  303|    591|        res_bands = param_r[i];
  304|    591|      }
  305|  5.48k|    }
  306|    548|  }
  307|       |
  308|  21.0k|  if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (308:7): [True: 275, False: 20.8k]
  ------------------
  309|    275|    if (res_bands < curr_state->arbdmx_residual_bands) {
  ------------------
  |  Branch (309:9): [True: 246, False: 29]
  ------------------
  310|    246|      res_bands = curr_state->arbdmx_residual_bands;
  311|    246|    }
  312|    275|  }
  313|       |
  314|  21.0k|  if (smooth_config) {
  ------------------
  |  Branch (314:7): [True: 0, False: 21.0k]
  ------------------
  315|      0|    ixheaacd_measure_tonality(pstr_mps_state, ton);
  316|      0|  }
  317|       |
  318|  62.6k|  for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (318:16): [True: 41.5k, False: 21.0k]
  ------------------
  319|  41.5k|    ixheaacd_calc_filter_coeff(pstr_mps_state, ps, delta);
  320|  41.5k|    *one_minus_delta++ = (1 << 15) - *delta++;
  321|  41.5k|  }
  322|       |
  323|  21.0k|  if (smooth_control) {
  ------------------
  |  Branch (323:7): [True: 21.0k, False: 0]
  ------------------
  324|  62.6k|    for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (324:18): [True: 41.5k, False: 21.0k]
  ------------------
  325|  41.5k|      if (ps < 8) {
  ------------------
  |  Branch (325:11): [True: 41.5k, False: 0]
  ------------------
  326|   783k|        for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (326:22): [True: 742k, False: 41.5k]
  ------------------
  327|   742k|          smooth_band_arr[ps][pb] = pstr_mps_state->aux_struct->smg_data[ps][pb];
  328|   742k|        }
  329|  41.5k|      }
  330|  41.5k|    }
  331|  21.0k|  } 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|  21.0k|  if (!(smooth_control == 0 && smooth_config == 0)) {
  ------------------
  |  Branch (339:9): [True: 0, False: 21.0k]
  |  Branch (339:32): [True: 0, False: 0]
  ------------------
  340|  21.0k|    if (m1_param_imag_present) {
  ------------------
  |  Branch (340:9): [True: 17.0k, False: 4.06k]
  ------------------
  341|  17.0k|      WORD32 *ptr_r1 = &m1_param->m1_param_real[0][0][0][0];
  342|  17.0k|      WORD32 *ptr_i1 = &m1_param->m1_param_imag[0][0][0][0];
  343|   151k|      for (row = 0; row < num_v_channels; row++) {
  ------------------
  |  Branch (343:21): [True: 134k, False: 17.0k]
  ------------------
  344|   134k|        WORD32 *ptr_r2 = ptr_r1;
  345|   134k|        WORD32 *ptr_i2 = ptr_i1;
  346|   912k|        for (col = 0; col < num_x_channels; col++) {
  ------------------
  |  Branch (346:23): [True: 778k, False: 134k]
  ------------------
  347|   778k|          param_r = ptr_r2;
  348|   778k|          param_i = ptr_i2;
  349|   778k|          m1_param_real_prev += res_bands;
  350|   778k|          m1_param_imag_prev += res_bands;
  351|       |
  352|  16.1M|          for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (352:32): [True: 15.3M, False: 778k]
  ------------------
  353|  15.3M|            if (smooth_band_arr[0][pb]) {
  ------------------
  |  Branch (353:17): [True: 5.42M, False: 9.89M]
  ------------------
  354|  5.42M|              WORD64 acc;
  355|       |
  356|  5.42M|              acc = (WORD64)((WORD64)param_r[pb] * (WORD64)(*delta_ptr) +
  357|  5.42M|                             (WORD64)(*m1_param_real_prev) *
  358|  5.42M|                                 (WORD64)(*one_minus_delta_ptr));
  359|       |
  360|  5.42M|              acc >>= 15;
  361|       |
  362|  5.42M|              param_r[pb] = (WORD32)acc;
  363|       |
  364|  5.42M|              acc = (WORD64)((WORD64)param_i[pb] * (WORD64)(*delta_ptr) +
  365|  5.42M|                             (WORD64)(*m1_param_imag_prev) *
  366|  5.42M|                                 (WORD64)(*one_minus_delta_ptr));
  367|       |
  368|  5.42M|              acc >>= 15;
  369|       |
  370|  5.42M|              param_i[pb] = (WORD32)acc;
  371|  5.42M|            }
  372|  15.3M|            m1_param_real_prev++;
  373|  15.3M|            m1_param_imag_prev++;
  374|  15.3M|          }
  375|   778k|          param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   778k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  376|   778k|          param_i += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   778k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  377|       |
  378|  1.40M|          for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (378:24): [True: 626k, False: 778k]
  ------------------
  379|   626k|            WORD32 del = delta_ptr[ps];
  380|   626k|            WORD32 one_minus_del = one_minus_delta_ptr[ps];
  381|       |
  382|   626k|            param_prev_r = param_r - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   626k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  383|   626k|            param_prev_i = param_i - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   626k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  384|       |
  385|  12.8M|            for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (385:34): [True: 12.2M, False: 626k]
  ------------------
  386|  12.2M|              if (smooth_band_arr[ps][pb]) {
  ------------------
  |  Branch (386:19): [True: 3.17M, False: 9.03M]
  ------------------
  387|  3.17M|                WORD64 acc;
  388|       |
  389|  3.17M|                acc = (WORD64)((WORD64)param_r[pb] * (WORD64)(del) +
  390|  3.17M|                               (WORD64)param_prev_r[pb] *
  391|  3.17M|                                   (WORD64)(one_minus_del));
  392|       |
  393|  3.17M|                acc >>= 15;
  394|       |
  395|  3.17M|                param_r[pb] = (WORD32)acc;
  396|       |
  397|  3.17M|                acc = (WORD64)((WORD64)param_i[pb] * (WORD64)(del) +
  398|  3.17M|                               (WORD64)param_prev_i[pb] *
  399|  3.17M|                                   (WORD64)(one_minus_del));
  400|       |
  401|  3.17M|                acc >>= 15;
  402|       |
  403|  3.17M|                param_i[pb] = (WORD32)acc;
  404|  3.17M|              }
  405|  12.2M|            }
  406|   626k|            param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   626k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  407|   626k|            param_i += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   626k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  408|   626k|          }
  409|   778k|          ptr_r2 += PBXPS;
  ------------------
  |  |  168|   778k|#define PBXPS (224)
  ------------------
  410|   778k|          ptr_i2 += PBXPS;
  ------------------
  |  |  168|   778k|#define PBXPS (224)
  ------------------
  411|   778k|        }
  412|   134k|        ptr_r1 += INCHXPBXPS;
  ------------------
  |  |  202|   134k|#define INCHXPBXPS (1344)
  ------------------
  413|   134k|        ptr_i1 += INCHXPBXPS;
  ------------------
  |  |  202|   134k|#define INCHXPBXPS (1344)
  ------------------
  414|   134k|      }
  415|  17.0k|    } else {
  416|  4.06k|      WORD32 *ptr1 = (WORD32 *)m1_param;
  417|       |
  418|  30.4k|      for (row = 0; row < num_v_channels; row++) {
  ------------------
  |  Branch (418:21): [True: 26.4k, False: 4.06k]
  ------------------
  419|  26.4k|        WORD32 *ptr2 = ptr1;
  420|       |
  421|   125k|        for (col = 0; col < num_x_channels; col++) {
  ------------------
  |  Branch (421:23): [True: 99.2k, False: 26.4k]
  ------------------
  422|  99.2k|          WORD32 *param_r = ptr2;
  423|       |
  424|  99.2k|          WORD32 del = delta_ptr[0];
  425|  99.2k|          WORD32 one_minus_del = one_minus_delta_ptr[0];
  426|       |
  427|  99.2k|          m1_param_real_prev += res_bands;
  428|       |
  429|  1.72M|          for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (429:32): [True: 1.62M, False: 99.2k]
  ------------------
  430|  1.62M|            if (smooth_band_arr[0][pb]) {
  ------------------
  |  Branch (430:17): [True: 849k, False: 771k]
  ------------------
  431|   849k|              WORD64 acc;
  432|       |
  433|   849k|              acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)(del)) +
  434|   849k|                    (WORD64)((WORD64)(*m1_param_real_prev) *
  435|   849k|                             (WORD64)(one_minus_del));
  436|       |
  437|   849k|              param_r[pb] = (WORD32)(acc >> 15);
  438|   849k|            }
  439|  1.62M|            m1_param_real_prev++;
  440|  1.62M|          }
  441|  99.2k|          param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  99.2k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  442|       |
  443|   180k|          for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (443:24): [True: 80.8k, False: 99.2k]
  ------------------
  444|  80.8k|            WORD32 del = delta_ptr[ps];
  445|  80.8k|            WORD32 one_minus_del = one_minus_delta_ptr[ps];
  446|       |
  447|  80.8k|            param_prev_r = param_r - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  80.8k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  448|       |
  449|  1.16M|            for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (449:34): [True: 1.08M, False: 80.8k]
  ------------------
  450|  1.08M|              if (smooth_band_arr[ps][pb]) {
  ------------------
  |  Branch (450:19): [True: 491k, False: 589k]
  ------------------
  451|   491k|                WORD64 acc;
  452|       |
  453|   491k|                acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)del) +
  454|   491k|                      (WORD64)((WORD64)(param_prev_r[pb]) *
  455|   491k|                               (WORD64)one_minus_del);
  456|       |
  457|   491k|                param_r[pb] = (WORD32)(acc >> 15);
  458|   491k|              }
  459|  1.08M|            }
  460|  80.8k|            param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  80.8k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  461|  80.8k|          }
  462|  99.2k|          ptr2 += PBXPS;
  ------------------
  |  |  168|  99.2k|#define PBXPS (224)
  ------------------
  463|  99.2k|        }
  464|  26.4k|        ptr1 += INCHXPBXPS;
  ------------------
  |  |  202|  26.4k|#define INCHXPBXPS (1344)
  ------------------
  465|  26.4k|      }
  466|  4.06k|    }
  467|       |
  468|  21.0k|    if (curr_state->residual_coding)
  ------------------
  |  Branch (468:9): [True: 548, False: 20.5k]
  ------------------
  469|    548|      resid_col_counter = col_counter;
  470|  20.5k|    else
  471|  20.5k|      resid_col_counter = num_direct_signals;
  472|       |
  473|  21.0k|    idx = 0;
  474|  21.0k|    if (m2_param_imag_present) {
  ------------------
  |  Branch (474:9): [True: 0, False: 21.0k]
  ------------------
  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|  21.0k|    } else {
  618|  21.0k|      WORD32 *ptr1 = &m2_param->m2_resid_real[0][0][0];
  619|       |
  620|   185k|      for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (620:21): [True: 164k, False: 21.0k]
  ------------------
  621|  1.06M|        for (col = 0; col < resid_col_counter; col++) {
  ------------------
  |  Branch (621:23): [True: 905k, False: 164k]
  ------------------
  622|   905k|          if (curr_state->m2_param_present[row][col] & 2) {
  ------------------
  |  Branch (622:15): [True: 167k, False: 738k]
  ------------------
  623|   167k|            WORD32 *ptr2 = ptr1;
  624|   167k|            WORD32 del = *delta_ptr;
  625|   167k|            WORD32 one_minus_del = *one_minus_delta_ptr;
  626|   167k|            m2_resid_real_prev += res_bands;
  627|       |
  628|  3.19M|            for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (628:34): [True: 3.02M, False: 167k]
  ------------------
  629|  3.02M|              if (smooth_band_arr[0][pb]) {
  ------------------
  |  Branch (629:19): [True: 1.07M, False: 1.94M]
  ------------------
  630|  1.07M|                WORD64 acc;
  631|       |
  632|  1.07M|                acc = (WORD64)((WORD64)(ptr2[pb]) * (WORD64)(del) +
  633|  1.07M|                               (WORD64)(*m2_resid_real_prev) *
  634|  1.07M|                                   (WORD64)(one_minus_del));
  635|       |
  636|  1.07M|                acc >>= 15;
  637|  1.07M|                ptr2[pb] = (WORD32)acc;
  638|  1.07M|              }
  639|       |
  640|  3.02M|              m2_resid_real_prev++;
  641|  3.02M|            }
  642|       |
  643|   167k|            ptr2 += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   167k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  644|       |
  645|   324k|            for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (645:26): [True: 156k, False: 167k]
  ------------------
  646|   156k|              WORD32 del = delta_ptr[ps];
  647|   156k|              WORD32 one_minus_del = one_minus_delta_ptr[ps];
  648|       |
  649|   156k|              param_prev_r = ptr2 - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   156k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  650|       |
  651|  2.81M|              for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (651:36): [True: 2.66M, False: 156k]
  ------------------
  652|  2.66M|                if (smooth_band_arr[ps][pb]) {
  ------------------
  |  Branch (652:21): [True: 760k, False: 1.90M]
  ------------------
  653|   760k|                  WORD64 acc;
  654|       |
  655|   760k|                  acc = (WORD64)((WORD64)(ptr2[pb]) * (WORD64)(del) +
  656|   760k|                                 (WORD64)(*param_prev_r) *
  657|   760k|                                     (WORD64)(one_minus_del));
  658|       |
  659|   760k|                  acc >>= 15;
  660|   760k|                  ptr2[pb] = (WORD32)acc;
  661|   760k|                }
  662|       |
  663|  2.66M|                param_prev_r++;
  664|  2.66M|              }
  665|   156k|              ptr2 += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   156k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  666|   156k|            }
  667|   167k|            idx++;
  668|   167k|            ptr1 += PBXPS;
  ------------------
  |  |  168|   167k|#define PBXPS (224)
  ------------------
  669|   167k|          }
  670|   905k|        }
  671|   164k|      }
  672|  21.0k|      idx = 0;
  673|  21.0k|      ptr1 = &m2_param->m2_decor_real[0][0][0];
  674|       |
  675|   185k|      for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (675:21): [True: 164k, False: 21.0k]
  ------------------
  676|   534k|        for (col = num_direct_signals; col < col_counter; col++) {
  ------------------
  |  Branch (676:40): [True: 370k, False: 164k]
  ------------------
  677|   370k|          if (curr_state->m2_param_present[row][col] & 1) {
  ------------------
  |  Branch (677:15): [True: 102k, False: 267k]
  ------------------
  678|   102k|            WORD32 *ptr2 = ptr1;
  679|   102k|            m2_decor_real_prev += res_bands;
  680|       |
  681|   102k|            param_r = &m2_param->m2_decor_real[idx][0][res_bands];
  682|  1.82M|            for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (682:34): [True: 1.72M, False: 102k]
  ------------------
  683|  1.72M|              if (smooth_band_arr[0][pb]) {
  ------------------
  |  Branch (683:19): [True: 574k, False: 1.15M]
  ------------------
  684|   574k|                WORD64 acc;
  685|   574k|                acc = (WORD64)((WORD64)(ptr2[pb]) * (WORD64)*delta_ptr +
  686|   574k|                               (WORD64)(*m2_decor_real_prev) *
  687|   574k|                                   (WORD64)*one_minus_delta_ptr);
  688|   574k|                acc >>= 15;
  689|   574k|                ptr2[pb] = (WORD32)acc;
  690|   574k|              }
  691|  1.72M|              m2_decor_real_prev++;
  692|  1.72M|            }
  693|   102k|            ptr2 += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   102k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  694|       |
  695|   221k|            for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (695:26): [True: 118k, False: 102k]
  ------------------
  696|   118k|              WORD32 del = delta_ptr[ps];
  697|   118k|              WORD32 one_minus_del = one_minus_delta_ptr[ps];
  698|       |
  699|   118k|              param_prev_r = ptr2 - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   118k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  700|  1.93M|              for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (700:36): [True: 1.81M, False: 118k]
  ------------------
  701|  1.81M|                if (smooth_band_arr[ps][pb]) {
  ------------------
  |  Branch (701:21): [True: 565k, False: 1.24M]
  ------------------
  702|   565k|                  WORD64 acc;
  703|       |
  704|   565k|                  acc =
  705|   565k|                      (WORD64)((WORD64)(ptr2[pb]) * (WORD64)del +
  706|   565k|                               (WORD64)(*param_prev_r) * (WORD64)one_minus_del);
  707|   565k|                  acc >>= 15;
  708|   565k|                  ptr2[pb] = (WORD32)acc;
  709|   565k|                }
  710|       |
  711|  1.81M|                param_prev_r++;
  712|  1.81M|              }
  713|       |
  714|   118k|              ptr2 += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   118k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  715|   118k|            }
  716|       |
  717|   102k|            idx++;
  718|       |
  719|   102k|            ptr1 += PBXPS;
  ------------------
  |  |  168|   102k|#define PBXPS (224)
  ------------------
  720|   102k|          }
  721|   370k|        }
  722|   164k|      }
  723|  21.0k|    }
  724|  21.0k|  }
  725|  21.0k|  return;
  726|  21.0k|}
ixheaacd_mps_smoothing.c:ixheaacd_calc_filter_coeff:
  221|  41.5k|    ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps, WORD32 *delta) {
  222|  41.5k|  WORD32 d_slots;
  223|  41.5k|  WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
  224|  41.5k|  WORD32 *smg_time = pstr_mps_state->aux_struct->smg_time;
  225|       |
  226|  41.5k|  if (ps == 0)
  ------------------
  |  Branch (226:7): [True: 21.0k, False: 20.4k]
  ------------------
  227|  21.0k|    d_slots = param_slot[ps] + 1;
  228|  20.4k|  else
  229|  20.4k|    d_slots = param_slot[ps] - param_slot[ps - 1];
  230|       |
  231|  41.5k|  if (pstr_mps_state->smooth_control) {
  ------------------
  |  Branch (231:7): [True: 41.5k, False: 0]
  ------------------
  232|  41.5k|    switch (smg_time[ps]) {
  233|  2.38k|      case SMG_TIME_64:
  ------------------
  |  |   23|  2.38k|#define SMG_TIME_64 (64)
  ------------------
  |  Branch (233:7): [True: 2.38k, False: 39.1k]
  ------------------
  234|  2.38k|        *delta = d_slots << 9;
  235|  2.38k|        break;
  236|  1.25k|      case SMG_TIME_128:
  ------------------
  |  |   24|  1.25k|#define SMG_TIME_128 (128)
  ------------------
  |  Branch (236:7): [True: 1.25k, False: 40.2k]
  ------------------
  237|  1.25k|        *delta = d_slots << 8;
  238|  1.25k|        break;
  239|  32.1k|      case SMG_TIME_256:
  ------------------
  |  |   25|  32.1k|#define SMG_TIME_256 (256)
  ------------------
  |  Branch (239:7): [True: 32.1k, False: 9.41k]
  ------------------
  240|  32.1k|        *delta = d_slots << 7;
  241|  32.1k|        break;
  242|  2.47k|      case SMG_TIME_512:
  ------------------
  |  |   26|  2.47k|#define SMG_TIME_512 (512)
  ------------------
  |  Branch (242:7): [True: 2.47k, False: 39.0k]
  ------------------
  243|  2.47k|        *delta = d_slots << 6;
  244|  2.47k|        break;
  245|  3.29k|      default:
  ------------------
  |  Branch (245:7): [True: 3.29k, False: 38.2k]
  ------------------
  246|  3.29k|        break;
  247|  41.5k|    }
  248|  41.5k|  } else {
  249|      0|    *delta = d_slots << 7;
  250|      0|  }
  251|       |
  252|  41.5k|  return;
  253|  41.5k|}

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

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

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

ixheaacd_peak_limiter_init:
   47|  10.0k|                                  FLOAT32 *buffer, UWORD32 *delay_in_samples) {
   48|  10.0k|  UWORD32 attack;
   49|       |
   50|  10.0k|  attack = (UWORD32)(DEFAULT_ATTACK_TIME_MS * sample_rate / 1000);
  ------------------
  |  |   24|  10.0k|#define DEFAULT_ATTACK_TIME_MS (5.0f)
  ------------------
   51|  10.0k|  *delay_in_samples = attack;
   52|       |
   53|  10.0k|  if (attack < 1) return 0;
  ------------------
  |  Branch (53:7): [True: 89, False: 9.99k]
  ------------------
   54|       |
   55|  9.99k|  peak_limiter->max_buf = buffer;
   56|  9.99k|  peak_limiter->max_idx = 0;
   57|  9.99k|  peak_limiter->cir_buf_pnt = 0;
   58|  9.99k|  peak_limiter->delayed_input = buffer + attack * 4 + 32;
   59|       |
   60|  9.99k|  peak_limiter->delayed_input_index = 0;
   61|  9.99k|  peak_limiter->attack_time = DEFAULT_ATTACK_TIME_MS;
  ------------------
  |  |   24|  9.99k|#define DEFAULT_ATTACK_TIME_MS (5.0f)
  ------------------
   62|  9.99k|  peak_limiter->release_time = DEFAULT_RELEASE_TIME_MS;
  ------------------
  |  |   25|  9.99k|#define DEFAULT_RELEASE_TIME_MS (50.0f)
  ------------------
   63|  9.99k|  peak_limiter->attack_time_samples = attack;
   64|  9.99k|  peak_limiter->attack_constant = (FLOAT32)pow(0.1, 1.0 / (attack + 1));
   65|  9.99k|  peak_limiter->release_constant = (FLOAT32)pow(
   66|  9.99k|      0.1, 1.0 / (DEFAULT_RELEASE_TIME_MS * sample_rate / 1000 + 1));
  ------------------
  |  |   25|  9.99k|#define DEFAULT_RELEASE_TIME_MS (50.0f)
  ------------------
   67|  9.99k|  peak_limiter->num_channels = num_channels;
   68|  9.99k|  peak_limiter->sample_rate = sample_rate;
   69|  9.99k|  peak_limiter->min_gain = 1.0f;
   70|  9.99k|  peak_limiter->limiter_on = 1;
   71|  9.99k|  peak_limiter->pre_smoothed_gain = 1.0f;
   72|  9.99k|  peak_limiter->gain_modified = 1.0f;
   73|       |
   74|  9.99k|  return 0;
   75|  10.0k|}
ixheaacd_peak_limiter_process:
  194|   125k|                                   UWORD8 *qshift_adj) {
  195|   125k|  UWORD32 i, j;
  196|   125k|  FLOAT32 tmp, gain;
  197|   125k|  FLOAT32 min_gain = 1.0f;
  198|   125k|  FLOAT32 maximum;
  199|   125k|  UWORD32 num_channels = peak_limiter->num_channels;
  200|   125k|  UWORD32 attack_time_samples = peak_limiter->attack_time_samples;
  201|   125k|  FLOAT32 attack_constant = peak_limiter->attack_constant;
  202|   125k|  FLOAT32 release_constant = peak_limiter->release_constant;
  203|   125k|  FLOAT32 *max_buf = peak_limiter->max_buf;
  204|   125k|  FLOAT32 gain_modified = peak_limiter->gain_modified;
  205|   125k|  FLOAT32 *delayed_input = peak_limiter->delayed_input;
  206|   125k|  UWORD32 delayed_input_index = peak_limiter->delayed_input_index;
  207|   125k|  FLOAT64 pre_smoothed_gain = peak_limiter->pre_smoothed_gain;
  208|   125k|  WORD32 limit_threshold = PEAK_LIM_THR_FIX;
  ------------------
  |  |   27|   125k|#define PEAK_LIM_THR_FIX (2147483647)
  ------------------
  209|       |
  210|   125k|  WORD32 *samples = (WORD32 *)samples_t;
  211|       |
  212|   125k|  if (peak_limiter->limiter_on || (FLOAT32)pre_smoothed_gain) {
  ------------------
  |  Branch (212:7): [True: 125k, False: 0]
  |  Branch (212:35): [True: 0, False: 0]
  ------------------
  213|   107M|    for (i = 0; i < frame_len; i++) {
  ------------------
  |  Branch (213:17): [True: 107M, False: 125k]
  ------------------
  214|   107M|      tmp = 0.0f;
  215|   246M|      for (j = 0; j < num_channels; j++) {
  ------------------
  |  Branch (215:19): [True: 139M, False: 107M]
  ------------------
  216|   139M|        FLOAT32 gain_t = (FLOAT32)(1 << *(qshift_adj + j));
  217|   139M|        tmp = (FLOAT32)MAX(tmp, fabs((samples[i * num_channels + j] * gain_t)));
  ------------------
  |  |   29|   139M|#define MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (29:20): [True: 5.65M, False: 134M]
  |  |  ------------------
  ------------------
  218|   139M|      }
  219|   107M|      max_buf[peak_limiter->cir_buf_pnt] = tmp;
  220|       |
  221|   107M|      if (peak_limiter->max_idx == peak_limiter->cir_buf_pnt) {
  ------------------
  |  Branch (221:11): [True: 6.96M, False: 100M]
  ------------------
  222|  6.96M|        peak_limiter->max_idx = 0;
  223|   744M|        for (j = 1; j < (attack_time_samples); j++) {
  ------------------
  |  Branch (223:21): [True: 737M, False: 6.96M]
  ------------------
  224|   737M|          if (max_buf[j] > max_buf[peak_limiter->max_idx])
  ------------------
  |  Branch (224:15): [True: 18.7M, False: 718M]
  ------------------
  225|  18.7M|            peak_limiter->max_idx = j;
  226|   737M|        }
  227|   100M|      } else if (tmp >= max_buf[peak_limiter->max_idx]) {
  ------------------
  |  Branch (227:18): [True: 50.1M, False: 49.9M]
  ------------------
  228|  50.1M|        peak_limiter->max_idx = peak_limiter->cir_buf_pnt;
  229|  50.1M|      }
  230|   107M|      peak_limiter->cir_buf_pnt++;
  231|       |
  232|   107M|      if (peak_limiter->cir_buf_pnt == (WORD32)(attack_time_samples))
  ------------------
  |  Branch (232:11): [True: 904k, False: 106M]
  ------------------
  233|   904k|        peak_limiter->cir_buf_pnt = 0;
  234|   107M|      maximum = max_buf[peak_limiter->max_idx];
  235|       |
  236|   107M|      if (maximum > limit_threshold) {
  ------------------
  |  Branch (236:11): [True: 48.4M, False: 58.5M]
  ------------------
  237|  48.4M|        gain = limit_threshold / maximum;
  238|  58.5M|      } else {
  239|  58.5M|        gain = 1;
  240|  58.5M|      }
  241|       |
  242|   107M|      if (gain < pre_smoothed_gain) {
  ------------------
  |  Branch (242:11): [True: 8.07M, False: 98.9M]
  ------------------
  243|  8.07M|        gain_modified =
  244|  8.07M|            MIN(gain_modified,
  ------------------
  |  |   30|  8.07M|#define MIN(x, y) ((x) > (y) ? (y) : (x))
  |  |  ------------------
  |  |  |  Branch (30:20): [True: 254k, False: 7.81M]
  |  |  ------------------
  ------------------
  245|  8.07M|                (gain - 0.1f * (FLOAT32)pre_smoothed_gain) * 1.11111111f);
  246|       |
  247|  98.9M|      } else {
  248|  98.9M|        gain_modified = gain;
  249|  98.9M|      }
  250|       |
  251|   107M|      if (gain_modified < pre_smoothed_gain) {
  ------------------
  |  Branch (251:11): [True: 8.07M, False: 98.9M]
  ------------------
  252|  8.07M|        pre_smoothed_gain =
  253|  8.07M|            attack_constant * (pre_smoothed_gain - gain_modified) +
  254|  8.07M|            gain_modified;
  255|  8.07M|        pre_smoothed_gain = MAX(pre_smoothed_gain, gain);
  ------------------
  |  |   29|  8.07M|#define MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (29:20): [True: 8.03M, False: 38.1k]
  |  |  ------------------
  ------------------
  256|  98.9M|      } else {
  257|  98.9M|        pre_smoothed_gain =
  258|  98.9M|            release_constant * (pre_smoothed_gain - gain_modified) +
  259|  98.9M|            gain_modified;
  260|  98.9M|      }
  261|       |
  262|   107M|      gain = (FLOAT32)pre_smoothed_gain;
  263|       |
  264|   246M|      for (j = 0; j < num_channels; j++) {
  ------------------
  |  Branch (264:19): [True: 139M, False: 107M]
  ------------------
  265|   139M|        WORD64 tmp_fix;
  266|   139M|        tmp = delayed_input[delayed_input_index * num_channels + j];
  267|   139M|        FLOAT32 gain_t = (FLOAT32)(1 << *(qshift_adj + j));
  268|   139M|        delayed_input[delayed_input_index * num_channels + j] =
  269|   139M|            samples[i * num_channels + j] * gain_t;
  270|       |
  271|   139M|        tmp *= gain;
  272|       |
  273|   139M|        tmp_fix = (WORD64)tmp;
  274|       |
  275|   139M|        if (tmp_fix > limit_threshold)
  ------------------
  |  Branch (275:13): [True: 10.9M, False: 128M]
  ------------------
  276|  10.9M|          tmp_fix = limit_threshold;
  277|   128M|        else if (tmp_fix < -limit_threshold)
  ------------------
  |  Branch (277:18): [True: 11.2M, False: 117M]
  ------------------
  278|  11.2M|          tmp_fix = -limit_threshold;
  279|       |
  280|   139M|        samples[i * num_channels + j] = (WORD32)tmp_fix;
  281|   139M|      }
  282|       |
  283|   107M|      delayed_input_index++;
  284|   107M|      if (delayed_input_index >= attack_time_samples) delayed_input_index = 0;
  ------------------
  |  Branch (284:11): [True: 904k, False: 106M]
  ------------------
  285|       |
  286|   107M|      if (gain < min_gain) min_gain = gain;
  ------------------
  |  Branch (286:11): [True: 4.18M, False: 102M]
  ------------------
  287|   107M|    }
  288|   125k|  } 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|   125k|  peak_limiter->gain_modified = gain_modified;
  304|   125k|  peak_limiter->delayed_input_index = delayed_input_index;
  305|   125k|  peak_limiter->pre_smoothed_gain = pre_smoothed_gain;
  306|   125k|  peak_limiter->min_gain = min_gain;
  307|       |
  308|   125k|  return;
  309|   125k|}

ixheaacd_gen_rand_vec:
   75|   586k|                           WORD32 sfb_width, WORD32 *seed) {
   76|   586k|  WORD nrg_scale;
   77|   586k|  WORD32 nrg = 0;
   78|   586k|  WORD32 *spec = ptr_spec_coef;
   79|   586k|  WORD32 sfb;
   80|       |
   81|  7.01M|  for (sfb = 0; sfb <= sfb_width; sfb++) {
  ------------------
  |  Branch (81:17): [True: 6.42M, False: 586k]
  ------------------
   82|  6.42M|    *seed = (WORD32)(((WORD64)1664525 * (WORD64)(*seed)) + (WORD64)1013904223);
   83|       |
   84|  6.42M|    *spec = (*seed >> 3);
   85|       |
   86|  6.42M|    nrg = ixheaac_add32_sat(nrg, ixheaac_mult32_shl_sat(*spec, *spec));
   87|       |
   88|  6.42M|    spec++;
   89|  6.42M|  }
   90|       |
   91|   586k|  nrg_scale = ixheaac_norm32(nrg);
   92|       |
   93|   586k|  if (nrg_scale > 0) {
  ------------------
  |  Branch (93:7): [True: 586k, False: 3]
  ------------------
   94|   586k|    nrg_scale &= ~1;
   95|   586k|    nrg = ixheaac_shl32_sat(nrg, nrg_scale);
   96|   586k|    shift = shift - (nrg_scale >> 1);
   97|   586k|  }
   98|       |
   99|   586k|  nrg = ixheaacd_sqrt(nrg);
  100|   586k|  scale = ixheaac_div32_pos_normb(scale, nrg);
  101|       |
  102|   586k|  spec = ptr_spec_coef;
  103|       |
  104|   586k|  if (shift < -31) {
  ------------------
  |  Branch (104:7): [True: 20.0k, False: 566k]
  ------------------
  105|  20.0k|    shift = -31;
  106|  20.0k|  }
  107|  7.01M|  for (sfb = 0; sfb <= sfb_width; sfb++) {
  ------------------
  |  Branch (107:17): [True: 6.42M, False: 586k]
  ------------------
  108|  6.42M|    *spec = ixheaac_shr32_dir_sat_limit(ixheaac_mult32_shl_sat(*spec, scale),
  109|  6.42M|                                         shift);
  110|  6.42M|    spec++;
  111|  6.42M|  }
  112|   586k|}
ixheaacd_pns_process:
  115|   319k|                          WORD32 channel, ia_aac_dec_tables_struct *ptr_aac_tables) {
  116|   319k|  ia_pns_info_struct *ptr_pns_info =
  117|   319k|      &ptr_aac_dec_channel_info[channel]->str_pns_info;
  118|   319k|  ia_ics_info_struct *ptr_ics_info =
  119|   319k|      &ptr_aac_dec_channel_info[channel]->str_ics_info;
  120|   319k|  WORD16 maximum_bins_short = ptr_ics_info->frame_length >> 3;
  121|   319k|  WORD32 *ptr_scale_mant_tab =
  122|   319k|      ptr_aac_tables->pstr_block_tables->scale_mant_tab;
  123|       |
  124|   319k|  if (ptr_pns_info->pns_active) {
  ------------------
  |  Branch (124:7): [True: 40.1k, False: 279k]
  ------------------
  125|  40.1k|    const WORD16 *swb_offset =
  126|  40.1k|        ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence]
  127|  40.1k|            .sfb_index;
  128|       |
  129|  40.1k|    WORD num_win_group, grp_len, sfb;
  130|  40.1k|    WORD32 *spec = &ptr_aac_dec_channel_info[channel]->ptr_spec_coeff[0];
  131|       |
  132|  89.2k|    for (num_win_group = 0; num_win_group < ptr_ics_info->num_window_groups;
  ------------------
  |  Branch (132:29): [True: 49.0k, False: 40.1k]
  ------------------
  133|  49.0k|         num_win_group++) {
  134|  49.0k|      grp_len = ptr_ics_info->window_group_length[num_win_group];
  135|       |
  136|  49.0k|      for (grp_len = 0;
  137|   136k|           grp_len < ptr_ics_info->window_group_length[num_win_group];
  ------------------
  |  Branch (137:12): [True: 87.7k, False: 49.0k]
  ------------------
  138|  87.7k|           grp_len++) {
  139|  1.54M|        for (sfb = 0; sfb < ptr_ics_info->max_sfb; sfb++) {
  ------------------
  |  Branch (139:23): [True: 1.45M, False: 87.7k]
  ------------------
  140|  1.45M|          WORD16 pns_band = ((num_win_group << 4) + sfb);
  141|       |
  142|  1.45M|          if (ptr_aac_dec_channel_info[channel]
  ------------------
  |  Branch (142:15): [True: 586k, False: 867k]
  ------------------
  143|  1.45M|                  ->str_pns_info.pns_used[pns_band]) {
  144|   586k|            WORD32 scale_mant;
  145|   586k|            WORD32 scale_exp;
  146|   586k|            WORD32 sfb_width = swb_offset[sfb + 1] - swb_offset[sfb] - 1;
  147|   586k|            WORD32 *ptr_spec = &spec[swb_offset[sfb]];
  148|       |
  149|   586k|            scale_mant = ptr_scale_mant_tab[ptr_aac_dec_channel_info[channel]
  150|   586k|                                                ->ptr_scale_factor[pns_band] &
  151|   586k|                                            PNS_SCALE_MANT_TAB_MASK];
  ------------------
  |  |   29|   586k|#define PNS_SCALE_MANT_TAB_MASK (PNS_SCALE_MANT_TAB_SIZE - 1)
  |  |  ------------------
  |  |  |  |   28|   586k|#define PNS_SCALE_MANT_TAB_SIZE 4
  |  |  ------------------
  ------------------
  152|   586k|            scale_exp = add_d(sub_d(31, (ptr_aac_dec_channel_info[channel]
  ------------------
  |  |   23|   586k|#define add_d(a, b) ((a) + (b))
  ------------------
  153|   586k|                                             ->ptr_scale_factor[pns_band] >>
  154|   586k|                                         PNS_SCALEFACTOR_SCALING)),
  155|   586k|                              PNS_SCALE_MANT_TAB_SCALING);
  156|       |
  157|   586k|            if (ixheaacd_is_correlation(ptr_aac_dec_channel_info[LEFT],
  ------------------
  |  |   40|   586k|#define LEFT 0
  ------------------
  |  Branch (157:17): [True: 51.6k, False: 534k]
  ------------------
  158|   586k|                                        pns_band)) {
  159|  51.6k|              if (channel == 0) {
  ------------------
  |  Branch (159:19): [True: 36.5k, False: 15.0k]
  ------------------
  160|  36.5k|                ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  36.5k|#define LEFT 0
  ------------------
  161|  36.5k|                    ->pstr_pns_corr_info->random_vector[pns_band] =
  162|  36.5k|                    ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  36.5k|#define LEFT 0
  ------------------
  163|  36.5k|                        ->pstr_pns_rand_vec_data->current_seed;
  164|       |
  165|  36.5k|                ixheaacd_gen_rand_vec(
  166|  36.5k|                    scale_mant, scale_exp, ptr_spec, sfb_width,
  167|  36.5k|                    &(ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  36.5k|#define LEFT 0
  ------------------
  168|  36.5k|                          ->pstr_pns_rand_vec_data->current_seed));
  169|  36.5k|              }
  170|       |
  171|  15.0k|              else {
  172|  15.0k|                ixheaacd_gen_rand_vec(
  173|  15.0k|                    scale_mant, scale_exp, ptr_spec, sfb_width,
  174|  15.0k|                    &(ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  15.0k|#define LEFT 0
  ------------------
  175|  15.0k|                          ->pstr_pns_corr_info->random_vector[pns_band]));
  176|  15.0k|              }
  177|       |
  178|  51.6k|            }
  179|       |
  180|   534k|            else {
  181|   534k|              ixheaacd_gen_rand_vec(
  182|   534k|                  scale_mant, scale_exp, ptr_spec, sfb_width,
  183|   534k|                  &(ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|   534k|#define LEFT 0
  ------------------
  184|   534k|                        ->pstr_pns_rand_vec_data->current_seed));
  185|   534k|            }
  186|   586k|          }
  187|  1.45M|        }
  188|       |
  189|  87.7k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (189:13): [True: 29.4k, False: 58.3k]
  ------------------
  190|  29.4k|          spec += maximum_bins_short;
  191|  58.3k|        else
  192|  58.3k|          spec += 128;
  193|  87.7k|      }
  194|  49.0k|    }
  195|  40.1k|  }
  196|       |
  197|   319k|  if (channel == 0) {
  ------------------
  |  Branch (197:7): [True: 284k, False: 34.5k]
  ------------------
  198|   284k|    ptr_aac_dec_channel_info[0]->pstr_pns_rand_vec_data->pns_frame_number++;
  199|   284k|  }
  200|   319k|}
ixheaacd_tns_decode_coef:
  204|  40.2k|                              ia_aac_dec_tables_struct *ptr_aac_tables) {
  205|  40.2k|  WORD order, resolution;
  206|  40.2k|  WORD16 *ptr_par_coef = parcor_coef;
  207|  40.2k|  WORD16 *tns_coeff_ptr;
  208|  40.2k|  WORD8 ixheaacd_drc_offset = 4;
  209|  40.2k|  WORD8 *ptr_coef = (WORD8 *)filter->coef;
  210|       |
  211|  40.2k|  resolution = filter->resolution;
  212|  40.2k|  tns_coeff_ptr = ptr_aac_tables->pstr_block_tables->tns_coeff3_16;
  213|       |
  214|  40.2k|  if (resolution) {
  ------------------
  |  Branch (214:7): [True: 26.4k, False: 13.7k]
  ------------------
  215|  26.4k|    tns_coeff_ptr = ptr_aac_tables->pstr_block_tables->tns_coeff4_16;
  216|  26.4k|    ixheaacd_drc_offset = ixheaacd_drc_offset << 1;
  217|  26.4k|  }
  218|       |
  219|   278k|  for (order = 0; order < filter->order; order++) {
  ------------------
  |  Branch (219:19): [True: 238k, False: 40.2k]
  ------------------
  220|   238k|    WORD8 temp = *ptr_coef++;
  221|   238k|    *ptr_par_coef++ = tns_coeff_ptr[temp + ixheaacd_drc_offset];
  222|   238k|  }
  223|  40.2k|}
ixheaacd_aac_tns_process:
  251|  91.5k|    WORD32 ar_flag, WORD32 *predicted_spectrum) {
  252|  91.5k|  WORD i;
  253|  91.5k|  WORD16 scale_lpc;
  254|       |
  255|  91.5k|  ia_tns_info_aac_struct *ptr_tns_info =
  256|  91.5k|      &ptr_aac_dec_channel_info->str_tns_info;
  257|  91.5k|  WORD32 *spec = ptr_aac_dec_channel_info->ptr_spec_coeff;
  258|  91.5k|  WORD32 *scratch_buf = ptr_aac_dec_channel_info->scratch_buf_ptr;
  259|       |
  260|  91.5k|  WORD win, filt, start, stop, size, scale_spec;
  261|  91.5k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
  262|  91.5k|  WORD num_window, tns_max_bands, win_seq;
  263|  91.5k|  WORD16 maximum_bins_short = ptr_ics_info->frame_length >> 3;
  264|  91.5k|  WORD position;
  265|       |
  266|  91.5k|  WORD32 parcor_coef[MAX_ORDER + 1];
  267|  91.5k|  WORD16 parcor_coef_16[MAX_ORDER + 1];
  268|       |
  269|  91.5k|  WORD32 lpc_coef[MAX_ORDER + 1];
  270|  91.5k|  WORD16 lpc_coef_16[MAX_ORDER + 1];
  271|       |
  272|  91.5k|  const WORD16 *ptr_sfb_table;
  273|       |
  274|  91.5k|  WORD16 max_bin_long = ptr_ics_info->frame_length;
  275|       |
  276|  91.5k|  win_seq = ptr_ics_info->window_sequence == 0
  ------------------
  |  Branch (276:13): [True: 44.8k, False: 46.6k]
  ------------------
  277|  91.5k|                ? 0
  278|  91.5k|                : (ptr_ics_info->window_sequence % 2 == 0);
  279|       |
  280|  91.5k|  if (ar_flag)
  ------------------
  |  Branch (280:7): [True: 78.0k, False: 13.5k]
  ------------------
  281|  78.0k|    spec = ptr_aac_dec_channel_info->ptr_spec_coeff;
  282|  13.5k|  else {
  283|  13.5k|    spec = predicted_spectrum;
  284|  13.5k|  }
  285|       |
  286|  91.5k|  if (object_type == AOT_ER_AAC_ELD || object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (286:7): [True: 5.57k, False: 85.9k]
  |  Branch (286:40): [True: 38.1k, False: 47.7k]
  ------------------
  287|  48.0k|      object_type == AOT_AAC_LTP) {
  ------------------
  |  Branch (287:7): [True: 4.26k, False: 43.5k]
  ------------------
  288|  48.0k|    if (512 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (288:9): [True: 33.4k, False: 14.5k]
  ------------------
  289|  33.4k|      tns_max_bands =
  290|  33.4k|          ptr_aac_tables->pstr_block_tables
  291|  33.4k|              ->tns_max_bands_tbl_ld[ptr_ics_info->sampling_rate_index];
  292|  33.4k|      win_seq = 1;
  293|  33.4k|      num_window = win_seq;
  294|  33.4k|    } else if (480 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (294:16): [True: 7.48k, False: 7.05k]
  ------------------
  295|  7.48k|      tns_max_bands =
  296|  7.48k|          ptr_aac_tables->pstr_block_tables
  297|  7.48k|              ->tns_max_bands_tbl_480[ptr_ics_info->sampling_rate_index];
  298|  7.48k|      win_seq = 1;
  299|  7.48k|      num_window = win_seq;
  300|  7.48k|    } else {
  301|  7.05k|      tns_max_bands =
  302|  7.05k|          ptr_aac_tables->pstr_block_tables
  303|  7.05k|              ->tns_max_bands_tbl[ptr_ics_info->sampling_rate_index][win_seq];
  304|       |
  305|  7.05k|      num_window = win_seq ? 8 : 1;
  ------------------
  |  Branch (305:20): [True: 778, False: 6.27k]
  ------------------
  306|  7.05k|    }
  307|  48.0k|  } else {
  308|  43.5k|    tns_max_bands =
  309|  43.5k|        ptr_aac_tables->pstr_block_tables
  310|  43.5k|            ->tns_max_bands_tbl[ptr_ics_info->sampling_rate_index][win_seq];
  311|       |
  312|  43.5k|    num_window = win_seq ? 8 : 1;
  ------------------
  |  Branch (312:18): [True: 10.6k, False: 32.8k]
  ------------------
  313|  43.5k|  }
  314|       |
  315|  91.5k|  ptr_sfb_table =
  316|  91.5k|      ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence].sfb_index;
  317|       |
  318|   262k|  for (win = 0; win < num_window; win++) {
  ------------------
  |  Branch (318:17): [True: 171k, False: 91.5k]
  ------------------
  319|   171k|    WORD n_filt = ptr_tns_info->n_filt[win];
  320|       |
  321|   266k|    for (filt = 0; filt < n_filt; filt++) {
  ------------------
  |  Branch (321:20): [True: 95.5k, False: 171k]
  ------------------
  322|  95.5k|      ia_filter_info_struct *filter = &ptr_tns_info->str_filter[win][filt];
  323|       |
  324|  95.5k|      if (filter->order <= 0) {
  ------------------
  |  Branch (324:11): [True: 15.7k, False: 79.7k]
  ------------------
  325|  15.7k|        continue;
  326|  15.7k|      }
  327|       |
  328|  79.7k|      if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP) ||
  ------------------
  |  Branch (328:11): [True: 37.9k, False: 41.8k]
  |  Branch (328:45): [True: 1.43k, False: 40.4k]
  ------------------
  329|  40.4k|          (num_ch > 2)) {
  ------------------
  |  Branch (329:11): [True: 203, False: 40.2k]
  ------------------
  330|  39.5k|        ixheaacd_tns_decode_coefficients(filter, parcor_coef, ptr_aac_tables);
  331|       |
  332|  40.2k|      } else {
  333|  40.2k|        ixheaacd_tns_decode_coef(filter, parcor_coef_16, ptr_aac_tables);
  334|  40.2k|      }
  335|       |
  336|  79.7k|      start = ixheaac_min32(ixheaac_min32(filter->start_band, tns_max_bands),
  337|  79.7k|                             ptr_ics_info->max_sfb);
  338|       |
  339|  79.7k|      start = ptr_sfb_table[start];
  340|       |
  341|  79.7k|      stop = ixheaac_min32(ixheaac_min32(filter->stop_band, tns_max_bands),
  342|  79.7k|                            ptr_ics_info->max_sfb);
  343|       |
  344|  79.7k|      stop = ptr_sfb_table[stop];
  345|       |
  346|  79.7k|      size = (stop - start);
  347|       |
  348|  79.7k|      if (size <= 0) {
  ------------------
  |  Branch (348:11): [True: 12.8k, False: 66.9k]
  ------------------
  349|  12.8k|        continue;
  350|  12.8k|      }
  351|  66.9k|      if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP) ||
  ------------------
  |  Branch (351:11): [True: 32.8k, False: 34.1k]
  |  Branch (351:45): [True: 1.37k, False: 32.8k]
  ------------------
  352|  34.3k|          (num_ch > 2)) {
  ------------------
  |  Branch (352:11): [True: 143, False: 32.6k]
  ------------------
  353|  34.3k|        ixheaacd_tns_parcor_to_lpc(parcor_coef, lpc_coef, &scale_lpc,
  354|  34.3k|                                   filter->order);
  355|       |
  356|  34.3k|      } else {
  357|  32.6k|        (*ixheaacd_tns_parcor_lpc_convert)(parcor_coef_16, lpc_coef_16,
  358|  32.6k|                                           &scale_lpc, filter->order);
  359|  32.6k|      }
  360|       |
  361|  66.9k|      {
  362|  66.9k|        WORD32 *ptr_tmp;
  363|       |
  364|  66.9k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (364:13): [True: 16.5k, False: 50.4k]
  ------------------
  365|  16.5k|          ptr_tmp = spec + (win * maximum_bins_short) + start;
  366|  50.4k|        else
  367|  50.4k|          ptr_tmp = spec + (win << 7) + start;
  368|       |
  369|  66.9k|        scale_spec = (*ixheaacd_calc_max_spectral_line)(ptr_tmp, size);
  370|  66.9k|      }
  371|       |
  372|  66.9k|      if (filter->direction == -1) {
  ------------------
  |  Branch (372:11): [True: 34.6k, False: 32.3k]
  ------------------
  373|  34.6k|        position = stop - 1;
  374|       |
  375|  34.6k|        if (maximum_bins_short == 120) {
  ------------------
  |  Branch (375:13): [True: 13.1k, False: 21.5k]
  ------------------
  376|  13.1k|          if (((win * maximum_bins_short) + position) < filter->order) continue;
  ------------------
  |  Branch (376:15): [True: 1.69k, False: 11.4k]
  ------------------
  377|  21.5k|        } else {
  378|  21.5k|          if (((win << 7) + position) < filter->order) continue;
  ------------------
  |  Branch (378:15): [True: 898, False: 20.6k]
  ------------------
  379|  21.5k|        }
  380|       |
  381|  34.6k|      } else {
  382|  32.3k|        position = start;
  383|  32.3k|        if (maximum_bins_short == 120) {
  ------------------
  |  Branch (383:13): [True: 3.38k, False: 28.9k]
  ------------------
  384|  3.38k|          if ((((win * maximum_bins_short) + position) + filter->order) > max_bin_long)
  ------------------
  |  Branch (384:15): [True: 0, False: 3.38k]
  ------------------
  385|      0|            continue;
  386|  28.9k|        } else {
  387|  28.9k|          if ((((win << 7) + position) + filter->order) > MAX_BINS_LONG) continue;
  ------------------
  |  |   28|  28.9k|#define MAX_BINS_LONG 1024
  ------------------
  |  Branch (387:15): [True: 0, False: 28.9k]
  ------------------
  388|  28.9k|        }
  389|  32.3k|      }
  390|       |
  391|  64.3k|      if ((num_ch <= 2) &&
  ------------------
  |  Branch (391:11): [True: 63.2k, False: 1.14k]
  ------------------
  392|  63.2k|          ((object_type != AOT_ER_AAC_LD) && (object_type != AOT_AAC_LTP)))
  ------------------
  |  Branch (392:12): [True: 30.4k, False: 32.8k]
  |  Branch (392:46): [True: 30.0k, False: 368]
  ------------------
  393|  30.0k|        scale_spec = ((scale_spec - 4) - scale_lpc);
  394|  34.3k|      else {
  395|  34.3k|        if (scale_spec > 17)
  ------------------
  |  Branch (395:13): [True: 1.18k, False: 33.1k]
  ------------------
  396|  1.18k|          scale_spec = ((scale_spec - 6) - scale_lpc);
  397|  33.1k|        else if (scale_spec > 11)
  ------------------
  |  Branch (397:18): [True: 523, False: 32.6k]
  ------------------
  398|    523|          scale_spec = ((scale_spec - 5) - scale_lpc);
  399|  32.6k|        else
  400|  32.6k|          scale_spec = ((scale_spec - 4) - scale_lpc);
  401|  34.3k|      }
  402|       |
  403|  64.3k|      if (scale_spec > 0) {
  ------------------
  |  Branch (403:11): [True: 20.6k, False: 43.7k]
  ------------------
  404|  20.6k|        scale_spec = ixheaac_min32(scale_spec, 31);
  405|       |
  406|  20.6k|        if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP) ||
  ------------------
  |  Branch (406:13): [True: 6.56k, False: 14.0k]
  |  Branch (406:47): [True: 876, False: 13.1k]
  ------------------
  407|  13.1k|            (num_ch > 2)) {
  ------------------
  |  Branch (407:13): [True: 49, False: 13.1k]
  ------------------
  408|  7.48k|          if (ar_flag)
  ------------------
  |  Branch (408:15): [True: 6.29k, False: 1.19k]
  ------------------
  409|  6.29k|          {
  410|  6.29k|            if (maximum_bins_short == 120) {
  ------------------
  |  Branch (410:17): [True: 845, False: 5.44k]
  ------------------
  411|    845|              (*ixheaacd_tns_ar_filter_fixed)(&spec[(win * maximum_bins_short) + position],
  412|    845|                                              size, filter->direction,
  413|    845|                                              (WORD32 *)lpc_coef, filter->order,
  414|    845|                                              (WORD32)scale_lpc, scale_spec);
  415|  5.44k|            } else {
  416|  5.44k|              (*ixheaacd_tns_ar_filter_fixed)(&spec[(win << 7) + position], size,
  417|  5.44k|                                              filter->direction,
  418|  5.44k|                                              (WORD32 *)lpc_coef, filter->order,
  419|  5.44k|                                              (WORD32)scale_lpc, scale_spec);
  420|  5.44k|            }
  421|  6.29k|          } else {
  422|  1.19k|            if (maximum_bins_short == 120) {
  ------------------
  |  Branch (422:17): [True: 27, False: 1.16k]
  ------------------
  423|     27|              ixheaacd_tns_ma_filter_fixed_ld(&spec[(win * maximum_bins_short) + position],
  424|     27|                                              size, filter->direction, lpc_coef,
  425|     27|                                              filter->order, scale_lpc);
  426|  1.16k|            } else {
  427|  1.16k|              ixheaacd_tns_ma_filter_fixed_ld(&spec[(win << 7) + position], size,
  428|  1.16k|                                              filter->direction, lpc_coef,
  429|  1.16k|                                              filter->order, scale_lpc);
  430|  1.16k|            }
  431|  1.19k|          }
  432|  13.1k|        } else {
  433|  13.1k|          if (object_type == AOT_ER_AAC_ELD) scale_spec = scale_spec - 1;
  ------------------
  |  Branch (433:15): [True: 1.23k, False: 11.9k]
  ------------------
  434|  13.1k|          if (maximum_bins_short == 120) {
  ------------------
  |  Branch (434:15): [True: 9.51k, False: 3.63k]
  ------------------
  435|  9.51k|            (*ixheaacd_tns_ar_filter)(&spec[(win * maximum_bins_short) + position], size,
  436|  9.51k|                                      filter->direction, lpc_coef_16,
  437|  9.51k|                                      filter->order, (WORD32)scale_lpc,
  438|  9.51k|                                      scale_spec, scratch_buf);
  439|  9.51k|          } else {
  440|  3.63k|            (*ixheaacd_tns_ar_filter)(&spec[(win << 7) + position], size,
  441|  3.63k|                                      filter->direction, lpc_coef_16,
  442|  3.63k|                                      filter->order, (WORD32)scale_lpc,
  443|  3.63k|                                      scale_spec, scratch_buf);
  444|  3.63k|          }
  445|  13.1k|        }
  446|  20.6k|      }
  447|       |
  448|  43.7k|      else {
  449|  43.7k|        WORD32 *ptr_tmp;
  450|       |
  451|  43.7k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (451:13): [True: 4.41k, False: 39.3k]
  ------------------
  452|  4.41k|          ptr_tmp = spec + (win * maximum_bins_short) + start;
  453|  39.3k|        else
  454|  39.3k|          ptr_tmp = spec + (win >> 7) + start;
  455|       |
  456|  43.7k|        scale_spec = -scale_spec;
  457|  43.7k|        scale_spec = ixheaac_min32(scale_spec, 31);
  458|       |
  459|  6.78M|        for (i = size; i != 0; i--) {
  ------------------
  |  Branch (459:24): [True: 6.74M, False: 43.7k]
  ------------------
  460|  6.74M|          *ptr_tmp = (*ptr_tmp >> scale_spec);
  461|  6.74M|          ptr_tmp++;
  462|  6.74M|        }
  463|       |
  464|  43.7k|        if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP) ||
  ------------------
  |  Branch (464:13): [True: 26.2k, False: 17.5k]
  |  Branch (464:47): [True: 497, False: 17.0k]
  ------------------
  465|  26.8k|            num_ch > 2) {
  ------------------
  |  Branch (465:13): [True: 94, False: 16.9k]
  ------------------
  466|  26.8k|          if (ar_flag) {
  ------------------
  |  Branch (466:15): [True: 11.5k, False: 15.2k]
  ------------------
  467|  11.5k|            if (maximum_bins_short == 120) {
  ------------------
  |  Branch (467:17): [True: 479, False: 11.1k]
  ------------------
  468|    479|              (*ixheaacd_tns_ar_filter_fixed)(
  469|    479|                  &spec[(win * maximum_bins_short) + position], size, filter->direction,
  470|    479|                  (WORD32 *)lpc_coef, filter->order, scale_lpc, 0);
  471|  11.1k|            } else {
  472|  11.1k|              (*ixheaacd_tns_ar_filter_fixed)(
  473|  11.1k|                  &spec[(win << 7) + position], size, filter->direction,
  474|  11.1k|                  (WORD32 *)lpc_coef, filter->order, scale_lpc, 0);
  475|  11.1k|            }
  476|  15.2k|          } else {
  477|  15.2k|            if (maximum_bins_short == 120) {
  ------------------
  |  Branch (477:17): [True: 11, False: 15.2k]
  ------------------
  478|     11|              ixheaacd_tns_ma_filter_fixed_ld(&spec[(win * maximum_bins_short) + position],
  479|     11|                                              size, filter->direction, lpc_coef,
  480|     11|                                              filter->order, scale_lpc);
  481|  15.2k|            } else {
  482|  15.2k|              ixheaacd_tns_ma_filter_fixed_ld(&spec[(win << 7) + position], size,
  483|  15.2k|                                              filter->direction, lpc_coef,
  484|  15.2k|                                              filter->order, scale_lpc);
  485|  15.2k|            }
  486|  15.2k|          }
  487|  26.8k|        } else {
  488|  16.9k|          if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (488:15): [True: 2.66k, False: 14.2k]
  ------------------
  489|  2.66k|            scale_lpc = scale_lpc - 1;
  490|  2.66k|          }
  491|       |
  492|  16.9k|          if (maximum_bins_short == 120) {
  ------------------
  |  Branch (492:15): [True: 3.92k, False: 12.9k]
  ------------------
  493|  3.92k|            (*ixheaacd_tns_ar_filter)(&spec[(win * maximum_bins_short) + position], size,
  494|  3.92k|                                      filter->direction, lpc_coef_16,
  495|  3.92k|                                      filter->order, scale_lpc, 0, scratch_buf);
  496|  12.9k|          } else {
  497|  12.9k|            (*ixheaacd_tns_ar_filter)(&spec[(win << 7) + position], size,
  498|  12.9k|                                      filter->direction, lpc_coef_16,
  499|  12.9k|                                      filter->order, scale_lpc, 0, scratch_buf);
  500|  12.9k|          }
  501|  16.9k|        }
  502|       |
  503|  43.7k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (503:13): [True: 4.41k, False: 39.3k]
  ------------------
  504|  4.41k|          ptr_tmp = spec + (win * maximum_bins_short) + start;
  505|  39.3k|        else
  506|  39.3k|          ptr_tmp = spec + (win << 7) + start;
  507|       |
  508|  6.78M|        for (i = size; i != 0; i--) {
  ------------------
  |  Branch (508:24): [True: 6.74M, False: 43.7k]
  ------------------
  509|  6.74M|          *ptr_tmp = (*ptr_tmp << scale_spec);
  510|  6.74M|          ptr_tmp++;
  511|  6.74M|        }
  512|  43.7k|      }
  513|  64.3k|    }
  514|   171k|  }
  515|  91.5k|}
ixheaacd_pns_js_thumb.c:ixheaacd_is_correlation:
   65|   586k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info, WORD16 pns_band) {
   66|   586k|  ia_pns_correlation_info_struct *ptr_corr_info =
   67|   586k|      ptr_aac_dec_channel_info->pstr_pns_corr_info;
   68|       |
   69|   586k|  return ((ptr_corr_info->correlated[(pns_band >> PNS_BAND_FLAGS_SHIFT)] >>
  ------------------
  |  |   26|   586k|#define PNS_BAND_FLAGS_SHIFT 3
  ------------------
   70|   586k|           (pns_band & PNS_BAND_FLAGS_MASK)) &
  ------------------
  |  |   25|   586k|  ((WORD16)((((WORD16)1) << PNS_BAND_FLAGS_SHIFT) - 1))
  |  |  ------------------
  |  |  |  |   26|   586k|#define PNS_BAND_FLAGS_SHIFT 3
  |  |  ------------------
  ------------------
   71|   586k|          1);
   72|   586k|}

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

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

ixheaacd_divideby2:
   61|  16.0k|WORD16 ixheaacd_divideby2(WORD op) {
   62|  16.0k|  FLAG sign = (op < 0);
   63|       |
   64|  16.0k|  if (sign) {
  ------------------
  |  Branch (64:7): [True: 5, False: 16.0k]
  ------------------
   65|      5|    op = -(op);
   66|      5|  }
   67|       |
   68|  16.0k|  op = (op >> 1);
   69|       |
   70|  16.0k|  if (sign) {
  ------------------
  |  Branch (70:7): [True: 5, False: 16.0k]
  ------------------
   71|      5|    op = -op;
   72|      5|  }
   73|       |
   74|  16.0k|  return (WORD16)op;
   75|  16.0k|}
ixheaacd_divideby3:
   77|  5.83k|WORD16 ixheaacd_divideby3(WORD op) {
   78|  5.83k|  WORD16 temp, ret;
   79|  5.83k|  FLAG sign = (op < 0);
   80|       |
   81|  5.83k|  if (sign) {
  ------------------
  |  Branch (81:7): [True: 0, False: 5.83k]
  ------------------
   82|      0|    op = -(op);
   83|      0|  }
   84|       |
   85|  5.83k|  temp = (WORD16)(op << 2);
   86|       |
   87|  5.83k|  temp = ixheaac_mult16_shl(temp, 0x2aab);
   88|       |
   89|  5.83k|  ret = (temp >> 2);
   90|       |
   91|  5.83k|  if (sign) {
  ------------------
  |  Branch (91:7): [True: 0, False: 5.83k]
  ------------------
   92|      0|    ret = -(ret);
   93|      0|  }
   94|       |
   95|  5.83k|  return (WORD16)ret;
   96|  5.83k|}
ixheaacd_decode_ps_data:
   98|  15.7k|VOID ixheaacd_decode_ps_data(ia_ps_dec_struct *ptr_ps_dec, WORD32 frame_size) {
   99|  15.7k|  WORD e, i, temp;
  100|  15.7k|  WORD16 iid_mode = (WORD16)((ptr_ps_dec->iid_mode) ? 1 : 2);
  ------------------
  |  Branch (100:30): [True: 2.04k, False: 13.7k]
  ------------------
  101|  15.7k|  WORD16 icc_mode = (WORD16)((ptr_ps_dec->icc_mode) ? 1 : 2);
  ------------------
  |  Branch (101:30): [True: 1.90k, False: 13.8k]
  ------------------
  102|  15.7k|  WORD16 num_iid_levels =
  103|  15.7k|      (WORD16)(ptr_ps_dec->iid_quant ? NUM_IID_LEVELS_FINE : NUM_IID_LEVELS);
  ------------------
  |  |   30|  2.48k|#define NUM_IID_LEVELS_FINE (15)
  ------------------
                    (WORD16)(ptr_ps_dec->iid_quant ? NUM_IID_LEVELS_FINE : NUM_IID_LEVELS);
  ------------------
  |  |   29|  13.2k|#define NUM_IID_LEVELS (7)
  ------------------
  |  Branch (103:16): [True: 2.48k, False: 13.2k]
  ------------------
  104|  15.7k|  WORD32 max_num_columns;
  105|       |
  106|  15.7k|  if (frame_size == 960)
  ------------------
  |  Branch (106:7): [True: 0, False: 15.7k]
  ------------------
  107|      0|    max_num_columns = MAX_NUM_COLUMNS_960;
  ------------------
  |  |   25|      0|#define MAX_NUM_COLUMNS_960 30
  ------------------
  108|  15.7k|  else
  109|  15.7k|    max_num_columns = MAX_NUM_COLUMNS;
  ------------------
  |  |   23|  15.7k|#define MAX_NUM_COLUMNS 32
  ------------------
  110|       |
  111|  15.7k|  if (!ptr_ps_dec->ps_data_present) {
  ------------------
  |  Branch (111:7): [True: 12.3k, False: 3.39k]
  ------------------
  112|  12.3k|    ptr_ps_dec->num_env = 0;
  113|  12.3k|  }
  114|       |
  115|  18.6k|  for (e = 0; e < ptr_ps_dec->num_env; e++) {
  ------------------
  |  Branch (115:15): [True: 2.90k, False: 15.7k]
  ------------------
  116|  2.90k|    WORD16 *p_iid_par_prev;
  117|  2.90k|    WORD16 *p_icc_par_prev;
  118|       |
  119|  2.90k|    if (e == 0) {
  ------------------
  |  Branch (119:9): [True: 2.61k, False: 287]
  ------------------
  120|  2.61k|      p_iid_par_prev = ptr_ps_dec->iid_par_prev;
  121|  2.61k|      p_icc_par_prev = ptr_ps_dec->icc_par_prev;
  122|  2.61k|    } else {
  123|    287|      p_iid_par_prev = ptr_ps_dec->iid_par_table[e - 1];
  124|    287|      p_icc_par_prev = ptr_ps_dec->icc_par_table[e - 1];
  125|    287|    }
  126|       |
  127|  2.90k|    if (ptr_ps_dec->enable_iid) {
  ------------------
  |  Branch (127:9): [True: 981, False: 1.92k]
  ------------------
  128|    981|      if (ptr_ps_dec->iid_dt[e]) {
  ------------------
  |  Branch (128:11): [True: 784, False: 197]
  ------------------
  129|  9.44k|        for (i = 0; i < ixheaacd_num_bands[ptr_ps_dec->iid_mode]; i++) {
  ------------------
  |  Branch (129:21): [True: 8.66k, False: 784]
  ------------------
  130|  8.66k|          temp =
  131|  8.66k|              ixheaac_add16(*p_iid_par_prev, ptr_ps_dec->iid_par_table[e][i]);
  132|  8.66k|          ptr_ps_dec->iid_par_table[e][i] = ixheaacd_clamp(
  133|  8.66k|              temp, ixheaac_negate16(num_iid_levels), num_iid_levels);
  134|  8.66k|          p_iid_par_prev += iid_mode;
  135|  8.66k|        }
  136|    784|      } else {
  137|    197|        ptr_ps_dec->iid_par_table[e][0] =
  138|    197|            ixheaacd_clamp(ptr_ps_dec->iid_par_table[e][0],
  139|    197|                           ixheaac_negate16(num_iid_levels), num_iid_levels);
  140|  1.97k|        for (i = 1; i < ixheaacd_num_bands[ptr_ps_dec->iid_mode]; i++) {
  ------------------
  |  Branch (140:21): [True: 1.77k, False: 197]
  ------------------
  141|  1.77k|          temp = ixheaac_add16(ptr_ps_dec->iid_par_table[e][i - 1],
  142|  1.77k|                                ptr_ps_dec->iid_par_table[e][i]);
  143|  1.77k|          ptr_ps_dec->iid_par_table[e][i] = ixheaacd_clamp(
  144|  1.77k|              temp, ixheaac_negate16(num_iid_levels), num_iid_levels);
  145|  1.77k|        }
  146|    197|      }
  147|  1.92k|    } else {
  148|  1.92k|      memset(ptr_ps_dec->iid_par_table[e], 0,
  149|  1.92k|             sizeof(WORD16) * ixheaacd_num_bands[ptr_ps_dec->iid_mode]);
  150|  1.92k|    }
  151|       |
  152|  2.90k|    if (iid_mode == 2) {
  ------------------
  |  Branch (152:9): [True: 2.82k, False: 82]
  ------------------
  153|  2.82k|      for (i = (ixheaacd_num_bands[ptr_ps_dec->iid_mode] * iid_mode - 1);
  154|  56.4k|           i != 0; i--) {
  ------------------
  |  Branch (154:12): [True: 53.5k, False: 2.82k]
  ------------------
  155|  53.5k|        ptr_ps_dec->iid_par_table[e][i] =
  156|  53.5k|            ptr_ps_dec->iid_par_table[e][ixheaac_shr32(i, 1)];
  157|  53.5k|      }
  158|  2.82k|    }
  159|       |
  160|  2.90k|    if (ptr_ps_dec->enable_icc) {
  ------------------
  |  Branch (160:9): [True: 82, False: 2.82k]
  ------------------
  161|     82|      if (ptr_ps_dec->icc_dt[e]) {
  ------------------
  |  Branch (161:11): [True: 73, False: 9]
  ------------------
  162|  1.46k|        for (i = 0; i < ixheaacd_num_bands[ptr_ps_dec->icc_mode]; i++) {
  ------------------
  |  Branch (162:21): [True: 1.39k, False: 73]
  ------------------
  163|  1.39k|          temp =
  164|  1.39k|              ixheaac_add16(*p_icc_par_prev, ptr_ps_dec->icc_par_table[e][i]);
  165|  1.39k|          ptr_ps_dec->icc_par_table[e][i] =
  166|  1.39k|              ixheaacd_clamp(temp, 0, (WORD16)(NUM_ICC_LEVELS - 1));
  ------------------
  |  |   31|  1.39k|#define NUM_ICC_LEVELS (8)
  ------------------
  167|  1.39k|          p_icc_par_prev += icc_mode;
  168|  1.39k|        }
  169|     73|      } else {
  170|      9|        ptr_ps_dec->icc_par_table[e][0] = ixheaacd_clamp(
  171|      9|            ptr_ps_dec->icc_par_table[e][0], 0, (WORD16)(NUM_ICC_LEVELS - 1));
  ------------------
  |  |   31|      9|#define NUM_ICC_LEVELS (8)
  ------------------
  172|     90|        for (i = 1; i < ixheaacd_num_bands[ptr_ps_dec->icc_mode]; i++) {
  ------------------
  |  Branch (172:21): [True: 81, False: 9]
  ------------------
  173|     81|          temp = ixheaac_add16(ptr_ps_dec->icc_par_table[e][i - 1],
  174|     81|                                ptr_ps_dec->icc_par_table[e][i]);
  175|     81|          ptr_ps_dec->icc_par_table[e][i] =
  176|     81|              ixheaacd_clamp(temp, 0, (WORD16)(NUM_ICC_LEVELS - 1));
  ------------------
  |  |   31|     81|#define NUM_ICC_LEVELS (8)
  ------------------
  177|     81|        }
  178|      9|      }
  179|  2.82k|    } else {
  180|  2.82k|      memset(ptr_ps_dec->icc_par_table[e], 0,
  181|  2.82k|             sizeof(WORD16) * ixheaacd_num_bands[ptr_ps_dec->icc_mode]);
  182|  2.82k|    }
  183|       |
  184|  2.90k|    if (icc_mode == 2) {
  ------------------
  |  Branch (184:9): [True: 2.80k, False: 94]
  ------------------
  185|  2.80k|      for (i = (ixheaacd_num_bands[ptr_ps_dec->icc_mode] * icc_mode - 1);
  186|  56.1k|           i != 0; i--) {
  ------------------
  |  Branch (186:12): [True: 53.3k, False: 2.80k]
  ------------------
  187|  53.3k|        ptr_ps_dec->icc_par_table[e][i] =
  188|  53.3k|            ptr_ps_dec->icc_par_table[e][ixheaac_shr32(i, 1)];
  189|  53.3k|      }
  190|  2.80k|    }
  191|  2.90k|  }
  192|       |
  193|  15.7k|  if (ptr_ps_dec->num_env == 0) {
  ------------------
  |  Branch (193:7): [True: 13.1k, False: 2.61k]
  ------------------
  194|  13.1k|    ptr_ps_dec->num_env = 1;
  195|       |
  196|  13.1k|    if (ptr_ps_dec->enable_iid) {
  ------------------
  |  Branch (196:9): [True: 4.92k, False: 8.22k]
  ------------------
  197|  4.92k|      memcpy(ptr_ps_dec->iid_par_table[0], ptr_ps_dec->iid_par_prev,
  198|  4.92k|             sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  4.92k|#define NUM_BANDS_FINE (34)
  ------------------
  199|  8.22k|    } else {
  200|  8.22k|      memset(ptr_ps_dec->iid_par_table[0], 0, sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  8.22k|#define NUM_BANDS_FINE (34)
  ------------------
  201|  8.22k|    }
  202|       |
  203|  13.1k|    if (ptr_ps_dec->enable_icc) {
  ------------------
  |  Branch (203:9): [True: 1.90k, False: 11.2k]
  ------------------
  204|  1.90k|      memcpy(ptr_ps_dec->icc_par_table[0], ptr_ps_dec->icc_par_prev,
  205|  1.90k|             sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  1.90k|#define NUM_BANDS_FINE (34)
  ------------------
  206|  11.2k|    } else {
  207|  11.2k|      memset(ptr_ps_dec->icc_par_table[0], 0, sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  11.2k|#define NUM_BANDS_FINE (34)
  ------------------
  208|  11.2k|    }
  209|  13.1k|  }
  210|       |
  211|  15.7k|  memcpy(ptr_ps_dec->iid_par_prev,
  212|  15.7k|         ptr_ps_dec->iid_par_table[ptr_ps_dec->num_env - 1],
  213|  15.7k|         sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  15.7k|#define NUM_BANDS_FINE (34)
  ------------------
  214|       |
  215|  15.7k|  memcpy(ptr_ps_dec->icc_par_prev,
  216|  15.7k|         ptr_ps_dec->icc_par_table[ptr_ps_dec->num_env - 1],
  217|  15.7k|         sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  15.7k|#define NUM_BANDS_FINE (34)
  ------------------
  218|       |
  219|  15.7k|  ptr_ps_dec->ps_data_present = 0;
  220|       |
  221|  15.7k|  if (ptr_ps_dec->frame_class == 0) {
  ------------------
  |  Branch (221:7): [True: 15.3k, False: 422]
  ------------------
  222|  15.3k|    WORD env_count;
  223|  15.3k|    WORD16 shift = 0;
  224|       |
  225|  15.3k|    switch (ptr_ps_dec->num_env) {
  ------------------
  |  Branch (225:13): [True: 15.3k, False: 0]
  ------------------
  226|  15.1k|      case 1:
  ------------------
  |  Branch (226:7): [True: 15.1k, False: 165]
  ------------------
  227|  15.1k|        shift = 0;
  228|  15.1k|        break;
  229|    161|      case 2:
  ------------------
  |  Branch (229:7): [True: 161, False: 15.1k]
  ------------------
  230|    161|        shift = 1;
  231|    161|        break;
  232|      4|      case 4:
  ------------------
  |  Branch (232:7): [True: 4, False: 15.3k]
  ------------------
  233|      4|        shift = 2;
  234|      4|        break;
  235|  15.3k|    }
  236|  15.3k|    ptr_ps_dec->border_position[0] = 0;
  237|  15.3k|    env_count = 0;
  238|       |
  239|  15.5k|    for (e = 1; e < ptr_ps_dec->num_env; e++) {
  ------------------
  |  Branch (239:17): [True: 173, False: 15.3k]
  ------------------
  240|    173|      env_count = add_d(env_count, max_num_columns);
  ------------------
  |  |   23|    173|#define add_d(a, b) ((a) + (b))
  ------------------
  241|    173|      ptr_ps_dec->border_position[e] = (WORD16)(env_count >> shift);
  242|    173|    }
  243|  15.3k|    ptr_ps_dec->border_position[ptr_ps_dec->num_env] = max_num_columns;
  244|  15.3k|  } else {
  245|    422|    ptr_ps_dec->border_position[0] = 0;
  246|       |
  247|    422|    if (ptr_ps_dec->border_position[ptr_ps_dec->num_env] < max_num_columns) {
  ------------------
  |  Branch (247:9): [True: 388, False: 34]
  ------------------
  248|    388|      ptr_ps_dec->num_env++;
  249|    388|      ptr_ps_dec->border_position[ptr_ps_dec->num_env] = max_num_columns;
  250|       |
  251|    388|      memcpy(ptr_ps_dec->iid_par_table[ptr_ps_dec->num_env - 1],
  252|    388|             ptr_ps_dec->iid_par_table[ptr_ps_dec->num_env - 2],
  253|    388|             sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|    388|#define NUM_BANDS_FINE (34)
  ------------------
  254|       |
  255|    388|      memcpy(ptr_ps_dec->icc_par_table[ptr_ps_dec->num_env - 1],
  256|    388|             ptr_ps_dec->icc_par_table[ptr_ps_dec->num_env - 2],
  257|    388|             sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|    388|#define NUM_BANDS_FINE (34)
  ------------------
  258|    388|    }
  259|       |
  260|    924|    for (e = 1; e < ptr_ps_dec->num_env; e++) {
  ------------------
  |  Branch (260:17): [True: 502, False: 422]
  ------------------
  261|    502|      WORD threshold;
  262|    502|      threshold = sub_d(max_num_columns, sub_d(ptr_ps_dec->num_env, e));
  ------------------
  |  |   24|    502|#define sub_d(a, b) ((a) - (b))
  ------------------
  263|       |
  264|    502|      if (ptr_ps_dec->border_position[e] > threshold) {
  ------------------
  |  Branch (264:11): [True: 13, False: 489]
  ------------------
  265|     13|        ptr_ps_dec->border_position[e] = threshold;
  266|    489|      } else {
  267|    489|        threshold = add_d(ptr_ps_dec->border_position[e - 1], 1);
  ------------------
  |  |   23|    489|#define add_d(a, b) ((a) + (b))
  ------------------
  268|       |
  269|    489|        if (ptr_ps_dec->border_position[e] < threshold) {
  ------------------
  |  Branch (269:13): [True: 93, False: 396]
  ------------------
  270|     93|          ptr_ps_dec->border_position[e] = threshold;
  271|     93|        }
  272|    489|      }
  273|    502|    }
  274|    422|  }
  275|       |
  276|  32.2k|  for (e = 0; e < ptr_ps_dec->num_env; e++) {
  ------------------
  |  Branch (276:15): [True: 16.4k, False: 15.7k]
  ------------------
  277|  16.4k|    if (ptr_ps_dec->iid_mode == 2)
  ------------------
  |  Branch (277:9): [True: 1.43k, False: 15.0k]
  ------------------
  278|  1.43k|      ixheaacd_map_34_params_to_20(ptr_ps_dec->iid_par_table[e]);
  279|       |
  280|  16.4k|    if (ptr_ps_dec->icc_mode == 2)
  ------------------
  |  Branch (280:9): [True: 22, False: 16.4k]
  ------------------
  281|     22|      ixheaacd_map_34_params_to_20(ptr_ps_dec->icc_par_table[e]);
  282|  16.4k|  }
  283|  15.7k|}
ixheaacd_ps_bitdec.c:ixheaacd_clamp:
   47|  12.1k|static WORD32 ixheaacd_clamp(WORD32 i, WORD16 min, WORD16 max) {
   48|  12.1k|  WORD32 result = i;
   49|       |
   50|  12.1k|  if (i < min) {
  ------------------
  |  Branch (50:7): [True: 591, False: 11.5k]
  ------------------
   51|    591|    result = min;
   52|  11.5k|  } else {
   53|  11.5k|    if (i > max) {
  ------------------
  |  Branch (53:9): [True: 455, False: 11.0k]
  ------------------
   54|    455|      result = max;
   55|    455|    }
   56|  11.5k|  }
   57|       |
   58|  12.1k|  return result;
   59|  12.1k|}

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

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

ixheaacd_rvlc_read_bits:
  408|  7.81M|                               UWORD16 *ptr_position, UWORD8 read_direction) {
  409|  7.81M|  UWORD32 bit;
  410|  7.81M|  WORD32 read_bit_offset =
  411|  7.81M|      *ptr_position - (it_bit_buff->size - it_bit_buff->cnt_bits);
  412|       |
  413|  7.81M|  if (read_bit_offset) it_bit_buff->cnt_bits -= read_bit_offset;
  ------------------
  |  Branch (413:7): [True: 122k, False: 7.69M]
  ------------------
  414|       |
  415|  7.81M|  it_bit_buff->ptr_read_next =
  416|  7.81M|      it_bit_buff->ptr_bit_buf_base +
  417|  7.81M|      ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
  418|  7.81M|  it_bit_buff->bit_pos = ((it_bit_buff->size - it_bit_buff->cnt_bits) & 7);
  419|       |
  420|  7.81M|  if (read_direction == 0) {
  ------------------
  |  Branch (420:7): [True: 6.24M, False: 1.57M]
  ------------------
  421|  6.24M|    bit = ixheaacd_aac_read_bit_rev(it_bit_buff);
  422|       |
  423|  6.24M|    *ptr_position += 1;
  424|  6.24M|  } else {
  425|  1.57M|    bit = ixheaacd_aac_read_bit(it_bit_buff);
  426|       |
  427|  1.57M|    *ptr_position -= 1;
  428|  1.57M|  }
  429|       |
  430|  7.81M|  return (bit);
  431|  7.81M|}
ixheaacd_decode_rvlc_code_word:
  494|  1.22M|                                     ia_rvlc_info_struct *ptr_rvlc) {
  495|  1.22M|  WORD32 i;
  496|       |
  497|  1.22M|  UWORD8 carry_bit;
  498|       |
  499|  1.22M|  UWORD8 direction = ptr_rvlc->direction;
  500|  1.22M|  UWORD16 *ptr_bit_str_idx_rvl = ptr_rvlc->ptr_rvl_bit_str_idx;
  501|       |
  502|  1.22M|  int len = 0;
  503|  1.22M|  short codeword = 0;
  504|  1.22M|  int found = 0;
  505|  1.22M|  int indx;
  506|       |
  507|  3.27M|  for (i = MAX_LEN_RVLC_CODE_WORD - 1; i >= 0; i--) {
  ------------------
  |  |   89|  1.22M|#define MAX_LEN_RVLC_CODE_WORD 9
  ------------------
  |  Branch (507:40): [True: 3.23M, False: 35.3k]
  ------------------
  508|  3.23M|    carry_bit =
  509|  3.23M|        ixheaacd_rvlc_read_bits(it_bit_buff, ptr_bit_str_idx_rvl, direction);
  510|       |
  511|  3.23M|    len++;
  512|  3.23M|    codeword = codeword << 1 | carry_bit;
  513|  3.23M|    indx = ixheaacd_rvlc_decode(codeword, len, &found);
  514|  3.23M|    if (found) {
  ------------------
  |  Branch (514:9): [True: 1.19M, False: 2.04M]
  ------------------
  515|  1.19M|      indx = indx + 7;
  516|  1.19M|      *ptr_rvlc->ptr_rvl_bit_cnt -= (MAX_LEN_RVLC_CODE_WORD - i);
  ------------------
  |  |   89|  1.19M|#define MAX_LEN_RVLC_CODE_WORD 9
  ------------------
  517|  1.19M|      return indx;
  518|  1.19M|    }
  519|  3.23M|  }
  520|       |
  521|  35.3k|  return -1;
  522|  1.22M|}
ixheaacd_rvlc_read:
  861|  73.1k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
  862|  73.1k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
  863|       |
  864|  73.1k|  WORD32 group, band;
  865|       |
  866|  73.1k|  ptr_rvlc->num_wind_grps =
  867|  73.1k|      ptr_aac_dec_channel_info->str_ics_info.num_window_groups;
  868|  73.1k|  ptr_rvlc->max_sfb_transmitted =
  869|  73.1k|      ptr_aac_dec_channel_info->str_ics_info.max_sfb;
  870|  73.1k|  ptr_rvlc->noise_used = 0;
  871|  73.1k|  ptr_rvlc->dpcm_noise_nrg = 0;
  872|  73.1k|  ptr_rvlc->dpcm_noise_last_pos = 0;
  873|  73.1k|  ptr_rvlc->rvlc_esc_len = -1;
  874|  73.1k|  ptr_rvlc->dpcm_is_last_pos = 0;
  875|       |
  876|  73.1k|  ptr_rvlc->sf_concealment = ixheaacd_read_bits_buf(it_bit_buff, 1);
  877|  73.1k|  ptr_rvlc->rev_global_gain = ixheaacd_read_bits_buf(it_bit_buff, 8);
  878|       |
  879|  73.1k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (879:7): [True: 4.56k, False: 68.6k]
  ------------------
  880|  73.1k|      EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  73.1k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  881|  4.56k|    ptr_rvlc->rvlc_sf_len = ixheaacd_read_bits_buf(it_bit_buff, 11);
  882|  68.6k|  } else {
  883|  68.6k|    ptr_rvlc->rvlc_sf_len = ixheaacd_read_bits_buf(it_bit_buff, 9);
  884|  68.6k|  }
  885|       |
  886|   160k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (886:19): [True: 86.9k, False: 73.1k]
  ------------------
  887|   652k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (887:20): [True: 594k, False: 57.9k]
  ------------------
  888|   594k|      if (ptr_aac_dec_channel_info->ptr_code_book[16 * group + band] ==
  ------------------
  |  Branch (888:11): [True: 29.0k, False: 565k]
  ------------------
  889|   594k|          NOISE_HCB) {
  ------------------
  |  |   38|   594k|#define NOISE_HCB 13
  ------------------
  890|  29.0k|        ptr_rvlc->noise_used = 1;
  891|  29.0k|        break;
  892|  29.0k|      }
  893|   594k|    }
  894|  86.9k|  }
  895|       |
  896|  73.1k|  if (ptr_rvlc->noise_used)
  ------------------
  |  Branch (896:7): [True: 29.0k, False: 44.1k]
  ------------------
  897|  29.0k|    ptr_rvlc->dpcm_noise_nrg = ixheaacd_read_bits_buf(it_bit_buff, 9);
  898|       |
  899|  73.1k|  ptr_rvlc->sf_esc_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  900|       |
  901|  73.1k|  if (ptr_rvlc->sf_esc_present) {
  ------------------
  |  Branch (901:7): [True: 36.4k, False: 36.7k]
  ------------------
  902|  36.4k|    ptr_rvlc->rvlc_esc_len = ixheaacd_read_bits_buf(it_bit_buff, 8);
  903|  36.4k|  }
  904|       |
  905|  73.1k|  if (ptr_rvlc->noise_used) {
  ------------------
  |  Branch (905:7): [True: 29.0k, False: 44.1k]
  ------------------
  906|  29.0k|    ptr_rvlc->dpcm_noise_last_pos = ixheaacd_read_bits_buf(it_bit_buff, 9);
  907|  29.0k|    ptr_rvlc->rvlc_sf_len -= 9;
  908|  29.0k|  }
  909|       |
  910|  73.1k|  ptr_rvlc->rvlc_sf_fwd_len = ptr_rvlc->rvlc_sf_len;
  911|  73.1k|  ptr_rvlc->rvlc_sf_bwd_len = ptr_rvlc->rvlc_sf_len;
  912|  73.1k|}
ixheaacd_hcr_read:
  916|  60.8k|                       WORD32 ele_type) {
  917|  60.8k|  WORD16 len_reordered_spec_data;
  918|  60.8k|  WORD8 len_longest_code_word;
  919|       |
  920|  60.8k|  ptr_aac_dec_channel_info->reorder_spect_data_len = 0;
  921|  60.8k|  ptr_aac_dec_channel_info->longest_cw_len = 0;
  922|       |
  923|  60.8k|  len_reordered_spec_data = ixheaacd_read_bits_buf(it_bit_buff, 14);
  924|  60.8k|  if (ele_type == ID_CPE) {
  ------------------
  |  Branch (924:7): [True: 533, False: 60.3k]
  ------------------
  925|    533|    if ((len_reordered_spec_data >= 0) && (len_reordered_spec_data <= 12288)) {
  ------------------
  |  Branch (925:9): [True: 533, False: 0]
  |  Branch (925:43): [True: 516, False: 17]
  ------------------
  926|    516|      ptr_aac_dec_channel_info->reorder_spect_data_len =
  927|    516|          len_reordered_spec_data;
  928|    516|    } else {
  929|     17|      if (len_reordered_spec_data > 12288) {
  ------------------
  |  Branch (929:11): [True: 17, False: 0]
  ------------------
  930|     17|        ptr_aac_dec_channel_info->reorder_spect_data_len = 12288;
  931|     17|      }
  932|     17|    }
  933|  60.3k|  } else if (ele_type == ID_SCE || ele_type == ID_LFE || ele_type == ID_CCE) {
  ------------------
  |  Branch (933:14): [True: 60.3k, False: 0]
  |  Branch (933:36): [True: 0, False: 0]
  |  Branch (933:58): [True: 0, False: 0]
  ------------------
  934|  60.3k|    if ((len_reordered_spec_data >= 0) && (len_reordered_spec_data <= 6144)) {
  ------------------
  |  Branch (934:9): [True: 60.3k, False: 0]
  |  Branch (934:43): [True: 54.5k, False: 5.80k]
  ------------------
  935|  54.5k|      ptr_aac_dec_channel_info->reorder_spect_data_len =
  936|  54.5k|          len_reordered_spec_data;
  937|  54.5k|    } else {
  938|  5.80k|      if (len_reordered_spec_data > 6144) {
  ------------------
  |  Branch (938:11): [True: 5.80k, False: 0]
  ------------------
  939|  5.80k|        ptr_aac_dec_channel_info->reorder_spect_data_len = 6144;
  940|  5.80k|      }
  941|  5.80k|    }
  942|  60.3k|  }
  943|       |
  944|  60.8k|  len_longest_code_word = ixheaacd_read_bits_buf(it_bit_buff, 6);
  945|  60.8k|  if ((len_longest_code_word >= 0) && (len_longest_code_word <= 49)) {
  ------------------
  |  Branch (945:7): [True: 60.8k, False: 0]
  |  Branch (945:39): [True: 50.2k, False: 10.6k]
  ------------------
  946|  50.2k|    ptr_aac_dec_channel_info->longest_cw_len = len_longest_code_word;
  947|  50.2k|  } else {
  948|  10.6k|    if (len_longest_code_word > 49) {
  ------------------
  |  Branch (948:9): [True: 10.6k, False: 0]
  ------------------
  949|  10.6k|      ptr_aac_dec_channel_info->longest_cw_len = 49;
  950|  10.6k|    }
  951|  10.6k|  }
  952|  60.8k|}
ixheaacd_bi_dir_est_lower_scf_cur_frame:
 1258|  16.1k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
 1259|  16.1k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
 1260|  16.1k|  WORD32 band, bnds, start_band, end_band, group;
 1261|  16.1k|  WORD32 conceal_min, conceal_max;
 1262|  16.1k|  WORD32 conceal_group_min, conceal_group_max;
 1263|  16.1k|  WORD32 max_scf_bands;
 1264|       |
 1265|  16.1k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (1265:7): [True: 18, False: 16.1k]
  ------------------
 1266|  16.1k|      EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  16.1k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
 1267|     18|    max_scf_bands = 16;
 1268|  16.1k|  } else {
 1269|  16.1k|    max_scf_bands = 64;
 1270|  16.1k|  }
 1271|       |
 1272|  16.1k|  if (ptr_rvlc->conceal_min == CONCEAL_MIN_INIT) ptr_rvlc->conceal_min = 0;
  ------------------
  |  |   93|  16.1k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1272:7): [True: 10.8k, False: 5.28k]
  ------------------
 1273|       |
 1274|  16.1k|  if (ptr_rvlc->conceal_max == CONCEAL_MAX_INIT)
  ------------------
  |  |   92|  16.1k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1274:7): [True: 1.18k, False: 14.9k]
  ------------------
 1275|  1.18k|    ptr_rvlc->conceal_max =
 1276|  1.18k|        (ptr_rvlc->num_wind_grps - 1) * 16 + ptr_rvlc->max_sfb_transmitted - 1;
 1277|       |
 1278|  16.1k|  conceal_min = ptr_rvlc->conceal_min % max_scf_bands;
 1279|  16.1k|  conceal_group_min = ptr_rvlc->conceal_min / max_scf_bands;
 1280|  16.1k|  conceal_max = ptr_rvlc->conceal_max % max_scf_bands;
 1281|  16.1k|  conceal_group_max = ptr_rvlc->conceal_max / max_scf_bands;
 1282|       |
 1283|  16.1k|  if (ptr_rvlc->conceal_min == ptr_rvlc->conceal_max) {
  ------------------
  |  Branch (1283:7): [True: 7.96k, False: 8.17k]
  ------------------
 1284|  7.96k|    WORD32 ref_fwd = 0, ref_nrg_fwd = 0, ref_scf_fwd = 0;
 1285|  7.96k|    WORD32 ref_bwd = 0, ref_nrg_bwd = 0, ref_scf_bwd = 0;
 1286|       |
 1287|  7.96k|    bnds = ptr_rvlc->conceal_min;
 1288|  7.96k|    ixheaacd_calc_ref_val_fwd(ptr_rvlc, ptr_aac_dec_channel_info, &ref_fwd,
 1289|  7.96k|                              &ref_nrg_fwd, &ref_scf_fwd);
 1290|  7.96k|    ixheaacd_calc_ref_val_bwd(ptr_rvlc, ptr_aac_dec_channel_info, &ref_bwd,
 1291|  7.96k|                              &ref_nrg_bwd, &ref_scf_bwd);
 1292|       |
 1293|  7.96k|    switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1294|  2.46k|      case ZERO_HCB:
  ------------------
  |  |   33|  2.46k|#define ZERO_HCB 0
  ------------------
  |  Branch (1294:7): [True: 2.46k, False: 5.49k]
  ------------------
 1295|  2.46k|        break;
 1296|     87|      case INTENSITY_HCB:
  ------------------
  |  |   40|     87|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1296:7): [True: 87, False: 7.87k]
  ------------------
 1297|  2.01k|      case INTENSITY_HCB2:
  ------------------
  |  |   39|  2.01k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1297:7): [True: 1.92k, False: 6.03k]
  ------------------
 1298|  2.01k|        if (ref_fwd < ref_bwd)
  ------------------
  |  Branch (1298:13): [True: 742, False: 1.26k]
  ------------------
 1299|    742|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_fwd;
 1300|  1.26k|        else
 1301|  1.26k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_bwd;
 1302|  2.01k|        break;
 1303|  1.21k|      case NOISE_HCB:
  ------------------
  |  |   38|  1.21k|#define NOISE_HCB 13
  ------------------
  |  Branch (1303:7): [True: 1.21k, False: 6.74k]
  ------------------
 1304|  1.21k|        if (ref_nrg_fwd < ref_nrg_bwd)
  ------------------
  |  Branch (1304:13): [True: 582, False: 631]
  ------------------
 1305|    582|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_nrg_fwd;
 1306|    631|        else
 1307|    631|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_nrg_bwd;
 1308|  1.21k|        break;
 1309|  2.27k|      default:
  ------------------
  |  Branch (1309:7): [True: 2.27k, False: 5.68k]
  ------------------
 1310|  2.27k|        if (ref_scf_fwd < ref_scf_bwd)
  ------------------
  |  Branch (1310:13): [True: 1.21k, False: 1.05k]
  ------------------
 1311|  1.21k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_scf_fwd;
 1312|  1.05k|        else
 1313|  1.05k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_scf_bwd;
 1314|  2.27k|        break;
 1315|  7.96k|    }
 1316|  8.17k|  } else {
 1317|  8.17k|    ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[ptr_rvlc->conceal_max] =
 1318|  8.17k|        ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[ptr_rvlc->conceal_max];
 1319|  8.17k|    ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[ptr_rvlc->conceal_min] =
 1320|  8.17k|        ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[ptr_rvlc->conceal_min];
 1321|       |
 1322|  8.17k|    start_band = conceal_min;
 1323|  8.17k|    if (conceal_group_min == conceal_group_max)
  ------------------
  |  Branch (1323:9): [True: 8.17k, False: 0]
  ------------------
 1324|  8.17k|      end_band = conceal_max;
 1325|      0|    else
 1326|      0|      end_band = ptr_rvlc->max_sfb_transmitted - 1;
 1327|       |
 1328|  16.3k|    for (group = conceal_group_min; group <= conceal_group_max; group++) {
  ------------------
  |  Branch (1328:37): [True: 8.17k, False: 8.17k]
  ------------------
 1329|   135k|      for (band = start_band; band <= end_band; band++) {
  ------------------
  |  Branch (1329:31): [True: 127k, False: 8.17k]
  ------------------
 1330|   127k|        bnds = 16 * group + band;
 1331|   127k|        if (ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds] <
  ------------------
  |  Branch (1331:13): [True: 29.5k, False: 97.9k]
  ------------------
 1332|   127k|            ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds])
 1333|  29.5k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1334|  29.5k|              ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1335|  97.9k|        else
 1336|  97.9k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1337|  97.9k|              ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1338|   127k|      }
 1339|  8.17k|      start_band = 0;
 1340|  8.17k|      if ((group + 1) == conceal_group_max) end_band = conceal_max;
  ------------------
  |  Branch (1340:11): [True: 0, False: 8.17k]
  ------------------
 1341|  8.17k|    }
 1342|  8.17k|  }
 1343|       |
 1344|  16.1k|  if (conceal_group_min == 0)
  ------------------
  |  Branch (1344:7): [True: 16.1k, False: 0]
  ------------------
 1345|  16.1k|    end_band = conceal_min;
 1346|      0|  else
 1347|      0|    end_band = ptr_rvlc->max_sfb_transmitted;
 1348|  32.2k|  for (group = 0; group <= conceal_group_min; group++) {
  ------------------
  |  Branch (1348:19): [True: 16.1k, False: 16.1k]
  ------------------
 1349|  52.0k|    for (band = 0; band < end_band; band++) {
  ------------------
  |  Branch (1349:20): [True: 35.9k, False: 16.1k]
  ------------------
 1350|  35.9k|      bnds = 16 * group + band;
 1351|  35.9k|      ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1352|  35.9k|          ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1353|  35.9k|    }
 1354|  16.1k|    if ((group + 1) == conceal_group_min) end_band = conceal_min;
  ------------------
  |  Branch (1354:9): [True: 0, False: 16.1k]
  ------------------
 1355|  16.1k|  }
 1356|       |
 1357|  16.1k|  start_band = conceal_max + 1;
 1358|  32.2k|  for (group = conceal_group_max; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1358:35): [True: 16.1k, False: 16.1k]
  ------------------
 1359|   161k|    for (band = start_band; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1359:29): [True: 145k, False: 16.1k]
  ------------------
 1360|   145k|      bnds = 16 * group + band;
 1361|   145k|      ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1362|   145k|          ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1363|   145k|    }
 1364|  16.1k|    start_band = 0;
 1365|  16.1k|  }
 1366|  16.1k|}
ixheaacd_statistical_estimation:
 1369|  5.16k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
 1370|  5.16k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
 1371|  5.16k|  WORD32 band, bnds, group;
 1372|  5.16k|  WORD32 sum_fwd, sum_bwd;
 1373|  5.16k|  WORD32 sum_nrg_fwd, sum_nrg_bwd;
 1374|  5.16k|  WORD32 sum_scf_fwd, sum_scf_bwd;
 1375|  5.16k|  WORD32 use_fwd, use_nrg_fwd, use_scf_fwd;
 1376|       |
 1377|  5.16k|  sum_fwd = sum_bwd = sum_nrg_fwd = sum_nrg_bwd = sum_scf_fwd = sum_scf_bwd = 0;
 1378|  5.16k|  use_fwd = use_nrg_fwd = use_scf_fwd = 0;
 1379|       |
 1380|  10.3k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1380:19): [True: 5.16k, False: 5.16k]
  ------------------
 1381|   132k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1381:20): [True: 127k, False: 5.16k]
  ------------------
 1382|   127k|      bnds = 16 * group + band;
 1383|   127k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1384|  17.6k|        case ZERO_HCB:
  ------------------
  |  |   33|  17.6k|#define ZERO_HCB 0
  ------------------
  |  Branch (1384:9): [True: 17.6k, False: 109k]
  ------------------
 1385|  17.6k|          break;
 1386|       |
 1387|  37.5k|        case INTENSITY_HCB:
  ------------------
  |  |   40|  37.5k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1387:9): [True: 37.5k, False: 90.0k]
  ------------------
 1388|  39.9k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  39.9k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1388:9): [True: 2.40k, False: 125k]
  ------------------
 1389|  39.9k|          sum_fwd += ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1390|  39.9k|          sum_bwd += ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1391|  39.9k|          break;
 1392|       |
 1393|  61.2k|        case NOISE_HCB:
  ------------------
  |  |   38|  61.2k|#define NOISE_HCB 13
  ------------------
  |  Branch (1393:9): [True: 61.2k, False: 66.3k]
  ------------------
 1394|  61.2k|          sum_nrg_fwd += ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1395|  61.2k|          sum_nrg_bwd += ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1396|  61.2k|          break;
 1397|       |
 1398|  8.69k|        default:
  ------------------
  |  Branch (1398:9): [True: 8.69k, False: 118k]
  ------------------
 1399|  8.69k|          sum_scf_fwd += ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1400|  8.69k|          sum_scf_bwd += ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1401|  8.69k|          break;
 1402|   127k|      }
 1403|   127k|    }
 1404|  5.16k|  }
 1405|       |
 1406|  5.16k|  if (sum_fwd < sum_bwd) use_fwd = 1;
  ------------------
  |  Branch (1406:7): [True: 1.11k, False: 4.04k]
  ------------------
 1407|       |
 1408|  5.16k|  if (sum_nrg_fwd < sum_nrg_bwd) use_nrg_fwd = 1;
  ------------------
  |  Branch (1408:7): [True: 2.54k, False: 2.61k]
  ------------------
 1409|       |
 1410|  5.16k|  if (sum_scf_fwd < sum_scf_bwd) use_scf_fwd = 1;
  ------------------
  |  Branch (1410:7): [True: 651, False: 4.50k]
  ------------------
 1411|       |
 1412|  10.3k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1412:19): [True: 5.16k, False: 5.16k]
  ------------------
 1413|   132k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1413:20): [True: 127k, False: 5.16k]
  ------------------
 1414|   127k|      bnds = 16 * group + band;
 1415|   127k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1416|  17.6k|        case ZERO_HCB:
  ------------------
  |  |   33|  17.6k|#define ZERO_HCB 0
  ------------------
  |  Branch (1416:9): [True: 17.6k, False: 109k]
  ------------------
 1417|  17.6k|          break;
 1418|       |
 1419|  37.5k|        case INTENSITY_HCB:
  ------------------
  |  |   40|  37.5k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1419:9): [True: 37.5k, False: 90.0k]
  ------------------
 1420|  39.9k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  39.9k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1420:9): [True: 2.40k, False: 125k]
  ------------------
 1421|  39.9k|          if (use_fwd)
  ------------------
  |  Branch (1421:15): [True: 17.8k, False: 22.0k]
  ------------------
 1422|  17.8k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1423|  17.8k|                ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1424|  22.0k|          else
 1425|  22.0k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1426|  22.0k|                ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1427|  39.9k|          break;
 1428|       |
 1429|  61.2k|        case NOISE_HCB:
  ------------------
  |  |   38|  61.2k|#define NOISE_HCB 13
  ------------------
  |  Branch (1429:9): [True: 61.2k, False: 66.3k]
  ------------------
 1430|  61.2k|          if (use_nrg_fwd)
  ------------------
  |  Branch (1430:15): [True: 22.9k, False: 38.3k]
  ------------------
 1431|  22.9k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1432|  22.9k|                ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1433|  38.3k|          else
 1434|  38.3k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1435|  38.3k|                ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1436|  61.2k|          break;
 1437|       |
 1438|  8.69k|        default:
  ------------------
  |  Branch (1438:9): [True: 8.69k, False: 118k]
  ------------------
 1439|  8.69k|          if (use_scf_fwd)
  ------------------
  |  Branch (1439:15): [True: 1.68k, False: 7.01k]
  ------------------
 1440|  1.68k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1441|  1.68k|                ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1442|  7.01k|          else
 1443|  7.01k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1444|  7.01k|                ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1445|  8.69k|          break;
 1446|   127k|      }
 1447|   127k|    }
 1448|  5.16k|  }
 1449|  5.16k|}
ixheaacd_rvlc_dec:
 1731|  73.0k|    ia_bit_buf_struct *it_bit_buff) {
 1732|  73.0k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
 1733|  73.0k|  ia_bit_buf_struct saved_it_bit_buff;
 1734|  73.0k|  IA_ERRORCODE error_code = 0;
 1735|  73.0k|  error_code =
 1736|  73.0k|      ixheaacd_rvlc_init(ptr_rvlc, ptr_aac_dec_channel_info, it_bit_buff);
 1737|  73.0k|  if (error_code) return error_code;
  ------------------
  |  Branch (1737:7): [True: 103, False: 72.9k]
  ------------------
 1738|       |
 1739|  72.9k|  ixheaacd_bitbuf_checkpoint(*it_bit_buff, saved_it_bit_buff);
  ------------------
  |  |  103|  72.9k|  (saved_bit_buf) = (it_bit_buf)
  ------------------
 1740|  72.9k|  if (ptr_rvlc->sf_esc_present)
  ------------------
  |  Branch (1740:7): [True: 36.2k, False: 36.6k]
  ------------------
 1741|  36.2k|    ixheaacd_rvlc_decode_escape(
 1742|  36.2k|        ptr_rvlc, ptr_aac_dec_channel_info->rvlc_scf_esc_arr, it_bit_buff);
 1743|       |
 1744|  72.9k|  ixheaacd_rvlc_decode_forward(ptr_rvlc, ptr_aac_dec_channel_info, it_bit_buff);
 1745|  72.9k|  ixheaacd_rvlc_decode_backward(ptr_rvlc, ptr_aac_dec_channel_info,
 1746|  72.9k|                                it_bit_buff);
 1747|  72.9k|  ixheaacd_rvlc_final_error_detection(ptr_aac_dec_channel_info,
 1748|  72.9k|                                      ptr_aac_dec_static_channel_info);
 1749|       |
 1750|  72.9k|  ptr_aac_dec_channel_info->rvlc_intensity_used = ptr_rvlc->intensity_used;
 1751|  72.9k|  ptr_aac_dec_channel_info->str_pns_info.pns_active = ptr_rvlc->noise_used;
 1752|       |
 1753|  72.9k|  ixheaacd_bitbuf_restore(*it_bit_buff, saved_it_bit_buff);
  ------------------
  |  |  105|  72.9k|  (it_bit_buf) = (saved_bit_buf)
  ------------------
 1754|  72.9k|  return error_code;
 1755|  73.0k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode:
  107|  3.23M|static WORD32 ixheaacd_rvlc_decode(WORD16 cw, WORD32 len, WORD32 *found) {
  108|  3.23M|  WORD16 indx = 0;
  109|  3.23M|  *found = 0;
  110|  3.23M|  switch (len) {
  111|  1.22M|    case 1:
  ------------------
  |  Branch (111:5): [True: 1.22M, False: 2.01M]
  ------------------
  112|  1.22M|      if (cw == 0)
  ------------------
  |  Branch (112:11): [True: 687k, False: 539k]
  ------------------
  113|   687k|        indx = 0;
  114|   539k|      else
  115|   539k|        return 3;
  116|   687k|      break;
  117|   687k|    case 3:
  ------------------
  |  Branch (117:5): [True: 539k, False: 2.70M]
  ------------------
  118|   539k|      switch (cw) {
  119|  97.7k|        case 5:
  ------------------
  |  Branch (119:9): [True: 97.7k, False: 441k]
  ------------------
  120|  97.7k|          indx = -1;
  121|  97.7k|          break;
  122|   198k|        case 7:
  ------------------
  |  Branch (122:9): [True: 198k, False: 341k]
  ------------------
  123|   198k|          indx = 1;
  124|   198k|          break;
  125|   243k|        default:
  ------------------
  |  Branch (125:9): [True: 243k, False: 296k]
  ------------------
  126|   243k|          return 4;
  127|   539k|      }
  128|   296k|      break;
  129|   296k|    case 4:
  ------------------
  |  Branch (129:5): [True: 243k, False: 2.99M]
  ------------------
  130|   243k|      if (cw == 9)
  ------------------
  |  Branch (130:11): [True: 19.5k, False: 223k]
  ------------------
  131|  19.5k|        indx = -2;
  132|   223k|      else
  133|   223k|        return 5;
  134|  19.5k|      break;
  135|   223k|    case 5:
  ------------------
  |  Branch (135:5): [True: 223k, False: 3.01M]
  ------------------
  136|   223k|      switch (cw) {
  137|  34.9k|        case 17:
  ------------------
  |  Branch (137:9): [True: 34.9k, False: 188k]
  ------------------
  138|  34.9k|          indx = -3;
  139|  34.9k|          break;
  140|  17.8k|        case 27:
  ------------------
  |  Branch (140:9): [True: 17.8k, False: 205k]
  ------------------
  141|  17.8k|          indx = 2;
  142|  17.8k|          break;
  143|   170k|        default:
  ------------------
  |  Branch (143:9): [True: 170k, False: 52.7k]
  ------------------
  144|   170k|          return 6;
  145|   223k|      }
  146|  52.7k|      break;
  147|   170k|    case 6:
  ------------------
  |  Branch (147:5): [True: 170k, False: 3.06M]
  ------------------
  148|   170k|      switch (cw) {
  149|  6.22k|        case 33:
  ------------------
  |  Branch (149:9): [True: 6.22k, False: 164k]
  ------------------
  150|  6.22k|          indx = -4;
  151|  6.22k|          break;
  152|  5.73k|        case 51:
  ------------------
  |  Branch (152:9): [True: 5.73k, False: 165k]
  ------------------
  153|  5.73k|          indx = 3;
  154|  5.73k|          break;
  155|   158k|        default:
  ------------------
  |  Branch (155:9): [True: 158k, False: 11.9k]
  ------------------
  156|   158k|          return 7;
  157|   170k|      }
  158|  11.9k|      break;
  159|   158k|    case 7:
  ------------------
  |  Branch (159:5): [True: 158k, False: 3.08M]
  ------------------
  160|   158k|      switch (cw) {
  161|  39.1k|        case 65:
  ------------------
  |  Branch (161:9): [True: 39.1k, False: 119k]
  ------------------
  162|  39.1k|          indx = -7;
  163|  39.1k|          break;
  164|  23.5k|        case 107:
  ------------------
  |  Branch (164:9): [True: 23.5k, False: 135k]
  ------------------
  165|  23.5k|          indx = 4;
  166|  23.5k|          break;
  167|  25.1k|        case 99:
  ------------------
  |  Branch (167:9): [True: 25.1k, False: 133k]
  ------------------
  168|  25.1k|          indx = 7;
  169|  25.1k|          break;
  170|  71.0k|        default:
  ------------------
  |  Branch (170:9): [True: 71.0k, False: 87.8k]
  ------------------
  171|  71.0k|          return 8;
  172|   158k|      }
  173|  87.8k|      break;
  174|  87.8k|    case 8:
  ------------------
  |  Branch (174:5): [True: 71.0k, False: 3.16M]
  ------------------
  175|  71.0k|      switch (cw) {
  176|  1.36k|        case 129:
  ------------------
  |  Branch (176:9): [True: 1.36k, False: 69.6k]
  ------------------
  177|  1.36k|          indx = -5;
  178|  1.36k|          break;
  179|  3.08k|        case 195:
  ------------------
  |  Branch (179:9): [True: 3.08k, False: 67.9k]
  ------------------
  180|  3.08k|          indx = 5;
  181|  3.08k|          break;
  182|  66.5k|        default:
  ------------------
  |  Branch (182:9): [True: 66.5k, False: 4.45k]
  ------------------
  183|  66.5k|          return 9;
  184|  71.0k|      }
  185|  4.45k|      break;
  186|  66.5k|    case 9:
  ------------------
  |  Branch (186:5): [True: 66.5k, False: 3.17M]
  ------------------
  187|  66.5k|      switch (cw) {
  188|  10.6k|        case 257:
  ------------------
  |  Branch (188:9): [True: 10.6k, False: 55.9k]
  ------------------
  189|  10.6k|          indx = -6;
  190|  10.6k|          break;
  191|  20.6k|        case 427:
  ------------------
  |  Branch (191:9): [True: 20.6k, False: 45.9k]
  ------------------
  192|  20.6k|          indx = 6;
  193|  20.6k|          break;
  194|  35.2k|        default:
  ------------------
  |  Branch (194:9): [True: 35.2k, False: 31.2k]
  ------------------
  195|  35.2k|          return -1;
  196|  66.5k|      }
  197|  31.2k|      break;
  198|   539k|    default:
  ------------------
  |  Branch (198:5): [True: 539k, False: 2.70M]
  ------------------
  199|   539k|      return -1;
  200|  3.23M|  }
  201|  1.19M|  *found = 1;
  202|  1.19M|  return indx;
  203|  3.23M|}
ixheaacd_rev_vlc.c:ixheaacd_calc_ref_val_fwd:
 1147|  7.96k|    WORD32 *ref_nrg_fwd, WORD32 *ref_scf_fwd) {
 1148|  7.96k|  WORD32 band, bnds, group, start_band;
 1149|  7.96k|  WORD32 id_is, id_nrg, id_scf;
 1150|  7.96k|  WORD32 conceal_min, conceal_group_min;
 1151|  7.96k|  WORD32 max_scf_bands;
 1152|       |
 1153|  7.96k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (1153:7): [True: 18, False: 7.94k]
  ------------------
 1154|  7.96k|      EIGHT_SHORT_SEQUENCE)
  ------------------
  |  |  102|  7.96k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
 1155|     18|    max_scf_bands = 16;
 1156|  7.94k|  else
 1157|  7.94k|    max_scf_bands = 64;
 1158|       |
 1159|  7.96k|  conceal_min = ptr_rvlc->conceal_min % max_scf_bands;
 1160|  7.96k|  conceal_group_min = ptr_rvlc->conceal_min / max_scf_bands;
 1161|       |
 1162|  7.96k|  id_is = id_nrg = id_scf = 1;
 1163|       |
 1164|  7.96k|  *ref_nrg_fwd = ptr_aac_dec_channel_info->global_gain - 90 - 256;
 1165|  7.96k|  *ref_scf_fwd = ptr_aac_dec_channel_info->global_gain;
 1166|       |
 1167|  7.96k|  start_band = conceal_min - 1;
 1168|  15.9k|  for (group = conceal_group_min; group >= 0; group--) {
  ------------------
  |  Branch (1168:35): [True: 7.96k, False: 7.96k]
  ------------------
 1169|  43.8k|    for (band = start_band; band >= 0; band--) {
  ------------------
  |  Branch (1169:29): [True: 35.9k, False: 7.96k]
  ------------------
 1170|  35.9k|      bnds = 16 * group + band;
 1171|  35.9k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1172|  1.57k|        case ZERO_HCB:
  ------------------
  |  |   33|  1.57k|#define ZERO_HCB 0
  ------------------
  |  Branch (1172:9): [True: 1.57k, False: 34.3k]
  ------------------
 1173|  1.57k|          break;
 1174|  11.0k|        case INTENSITY_HCB:
  ------------------
  |  |   40|  11.0k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1174:9): [True: 11.0k, False: 24.8k]
  ------------------
 1175|  21.8k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  21.8k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1175:9): [True: 10.7k, False: 25.1k]
  ------------------
 1176|  21.8k|          if (id_is) {
  ------------------
  |  Branch (1176:15): [True: 1.62k, False: 20.2k]
  ------------------
 1177|  1.62k|            *ref_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1178|  1.62k|            id_is = 0;
 1179|  1.62k|          }
 1180|  21.8k|          break;
 1181|  10.2k|        case NOISE_HCB:
  ------------------
  |  |   38|  10.2k|#define NOISE_HCB 13
  ------------------
  |  Branch (1181:9): [True: 10.2k, False: 25.7k]
  ------------------
 1182|  10.2k|          if (id_nrg) {
  ------------------
  |  Branch (1182:15): [True: 1.40k, False: 8.80k]
  ------------------
 1183|  1.40k|            *ref_nrg_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1184|  1.40k|            id_nrg = 0;
 1185|  1.40k|          }
 1186|  10.2k|          break;
 1187|  2.31k|        default:
  ------------------
  |  Branch (1187:9): [True: 2.31k, False: 33.6k]
  ------------------
 1188|  2.31k|          if (id_scf) {
  ------------------
  |  Branch (1188:15): [True: 773, False: 1.54k]
  ------------------
 1189|    773|            *ref_scf_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1190|    773|            id_scf = 0;
 1191|    773|          }
 1192|  2.31k|          break;
 1193|  35.9k|      }
 1194|  35.9k|    }
 1195|  7.96k|    start_band = ptr_rvlc->max_sfb_transmitted - 1;
 1196|  7.96k|  }
 1197|  7.96k|}
ixheaacd_rev_vlc.c:ixheaacd_calc_ref_val_bwd:
 1202|  7.96k|    WORD32 *ref_nrg_bwd, WORD32 *ref_scf_bwd) {
 1203|  7.96k|  WORD32 band, bnds, group, start_band;
 1204|  7.96k|  WORD32 id_is, id_nrg, id_scf;
 1205|  7.96k|  WORD32 conceal_max, conceal_group_max;
 1206|  7.96k|  WORD32 max_scf_bands;
 1207|       |
 1208|  7.96k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (1208:7): [True: 18, False: 7.94k]
  ------------------
 1209|  7.96k|      EIGHT_SHORT_SEQUENCE)
  ------------------
  |  |  102|  7.96k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
 1210|     18|    max_scf_bands = 16;
 1211|  7.94k|  else
 1212|  7.94k|    max_scf_bands = 64;
 1213|       |
 1214|  7.96k|  conceal_max = ptr_rvlc->conceal_max % max_scf_bands;
 1215|  7.96k|  conceal_group_max = ptr_rvlc->conceal_max / max_scf_bands;
 1216|       |
 1217|  7.96k|  id_is = id_nrg = id_scf = 1;
 1218|       |
 1219|  7.96k|  *ref_bwd = ptr_rvlc->dpcm_is_last_pos;
 1220|  7.96k|  *ref_nrg_bwd = ptr_rvlc->rev_global_gain + ptr_rvlc->dpcm_noise_last_pos -
 1221|  7.96k|                 90 - 256 + ptr_rvlc->dpcm_noise_nrg;
 1222|  7.96k|  *ref_scf_bwd = ptr_rvlc->rev_global_gain;
 1223|       |
 1224|  7.96k|  start_band = conceal_max + 1;
 1225|       |
 1226|  15.9k|  for (group = conceal_group_max; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1226:35): [True: 7.96k, False: 7.96k]
  ------------------
 1227|  59.6k|    for (band = start_band; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1227:29): [True: 51.7k, False: 7.96k]
  ------------------
 1228|  51.7k|      bnds = 16 * group + band;
 1229|  51.7k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1230|    335|        case ZERO_HCB:
  ------------------
  |  |   33|    335|#define ZERO_HCB 0
  ------------------
  |  Branch (1230:9): [True: 335, False: 51.3k]
  ------------------
 1231|    335|          break;
 1232|  7.05k|        case INTENSITY_HCB:
  ------------------
  |  |   40|  7.05k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1232:9): [True: 7.05k, False: 44.6k]
  ------------------
 1233|  39.8k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  39.8k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1233:9): [True: 32.8k, False: 18.9k]
  ------------------
 1234|  39.8k|          if (id_is) {
  ------------------
  |  Branch (1234:15): [True: 2.63k, False: 37.2k]
  ------------------
 1235|  2.63k|            *ref_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1236|  2.63k|            id_is = 0;
 1237|  2.63k|          }
 1238|  39.8k|          break;
 1239|  10.3k|        case NOISE_HCB:
  ------------------
  |  |   38|  10.3k|#define NOISE_HCB 13
  ------------------
  |  Branch (1239:9): [True: 10.3k, False: 41.3k]
  ------------------
 1240|  10.3k|          if (id_nrg) {
  ------------------
  |  Branch (1240:15): [True: 956, False: 9.43k]
  ------------------
 1241|    956|            *ref_nrg_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1242|    956|            id_nrg = 0;
 1243|    956|          }
 1244|  10.3k|          break;
 1245|  1.14k|        default:
  ------------------
  |  Branch (1245:9): [True: 1.14k, False: 50.5k]
  ------------------
 1246|  1.14k|          if (id_scf) {
  ------------------
  |  Branch (1246:15): [True: 346, False: 797]
  ------------------
 1247|    346|            *ref_scf_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1248|    346|            id_scf = 0;
 1249|    346|          }
 1250|  1.14k|          break;
 1251|  51.7k|      }
 1252|  51.7k|    }
 1253|  7.96k|    start_band = 0;
 1254|  7.96k|  }
 1255|  7.96k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_init:
  957|  73.0k|    ia_bit_buf_struct *it_bit_buff) {
  958|  73.0k|  WORD16 *ptr_scf_esc = ptr_aac_dec_channel_info->rvlc_scf_esc_arr;
  959|  73.0k|  WORD16 *ptr_scf_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr;
  960|  73.0k|  WORD16 *ptr_scf_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr;
  961|  73.0k|  WORD16 *ptr_scale_factor = ptr_aac_dec_channel_info->ptr_scale_factor;
  962|  73.0k|  WORD32 bnds;
  963|       |
  964|  73.0k|  ptr_aac_dec_channel_info->rvlc_intensity_used = 0;
  965|       |
  966|  73.0k|  ptr_rvlc->num_esc_words_decoded = 0;
  967|  73.0k|  ptr_rvlc->num_fwd_esc_words_decoded = 0;
  968|  73.0k|  ptr_rvlc->num_bwd_esc_words_decoded = 0;
  969|       |
  970|  73.0k|  ptr_rvlc->intensity_used = 0;
  971|  73.0k|  ptr_rvlc->rvlc_err_log = 0;
  972|       |
  973|  73.0k|  ptr_rvlc->conceal_max = CONCEAL_MAX_INIT;
  ------------------
  |  |   92|  73.0k|#define CONCEAL_MAX_INIT 1311
  ------------------
  974|  73.0k|  ptr_rvlc->conceal_min = CONCEAL_MIN_INIT;
  ------------------
  |  |   93|  73.0k|#define CONCEAL_MIN_INIT -1311
  ------------------
  975|       |
  976|  73.0k|  ptr_rvlc->conceal_max_esc = CONCEAL_MAX_INIT;
  ------------------
  |  |   92|  73.0k|#define CONCEAL_MAX_INIT 1311
  ------------------
  977|  73.0k|  ptr_rvlc->conceal_min_esc = CONCEAL_MIN_INIT;
  ------------------
  |  |   93|  73.0k|#define CONCEAL_MIN_INIT -1311
  ------------------
  978|       |
  979|  9.42M|  for (bnds = 0; bnds < RVLC_MAX_SFB; bnds++) {
  ------------------
  |  |   95|  9.42M|#define RVLC_MAX_SFB ((8) * (16))
  ------------------
  |  Branch (979:18): [True: 9.35M, False: 73.0k]
  ------------------
  980|  9.35M|    ptr_scf_fwd[bnds] = 0;
  981|  9.35M|    ptr_scf_bwd[bnds] = 0;
  982|  9.35M|    ptr_scf_esc[bnds] = 0;
  983|  9.35M|    ptr_scale_factor[bnds] = 0;
  984|  9.35M|  }
  985|       |
  986|  73.0k|  ptr_rvlc->rvl_fwd_bit_str_idx = it_bit_buff->size - it_bit_buff->cnt_bits;
  987|  73.0k|  ptr_rvlc->rvl_bwd_bit_str_idx =
  988|  73.0k|      it_bit_buff->size - it_bit_buff->cnt_bits + ptr_rvlc->rvlc_sf_len - 1;
  989|       |
  990|  73.0k|  it_bit_buff->cnt_bits -= ptr_rvlc->rvlc_sf_len;
  991|  73.0k|  it_bit_buff->ptr_read_next =
  992|  73.0k|      it_bit_buff->ptr_bit_buf_base +
  993|  73.0k|      ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
  994|  73.0k|  it_bit_buff->bit_pos = ((it_bit_buff->size - it_bit_buff->cnt_bits) & 7);
  995|       |
  996|  73.0k|  if (ptr_rvlc->sf_esc_present != 0) {
  ------------------
  |  Branch (996:7): [True: 36.3k, False: 36.7k]
  ------------------
  997|  36.3k|    ptr_rvlc->esc_bit_str_idx = it_bit_buff->size - it_bit_buff->cnt_bits;
  998|       |
  999|  36.3k|    it_bit_buff->cnt_bits -= ptr_rvlc->rvlc_esc_len;
 1000|  36.3k|    it_bit_buff->ptr_read_next =
 1001|  36.3k|        it_bit_buff->ptr_bit_buf_base +
 1002|  36.3k|        ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
 1003|  36.3k|    it_bit_buff->bit_pos = ((it_bit_buff->size - it_bit_buff->cnt_bits) & 7);
 1004|  36.3k|  }
 1005|  73.0k|  if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (1005:7): [True: 103, False: 72.9k]
  ------------------
 1006|    103|    return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|    103|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1007|    103|  } else
 1008|  72.9k|    return IA_NO_ERROR;
  ------------------
  |  |   23|  72.9k|#define IA_NO_ERROR 0x00000000
  ------------------
 1009|  73.0k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_escape:
  469|  36.2k|                                        ia_bit_buf_struct *it_bit_buff) {
  470|  36.2k|  WORD8 esc_word;
  471|  36.2k|  WORD8 esc_cnt = 0;
  472|  36.2k|  WORD16 *ptr_esc_bit_cnt_sum;
  473|       |
  474|  36.2k|  ptr_esc_bit_cnt_sum = &(ptr_rvlc->rvlc_esc_len);
  475|       |
  476|  1.55M|  while (*ptr_esc_bit_cnt_sum > 0) {
  ------------------
  |  Branch (476:10): [True: 1.51M, False: 36.2k]
  ------------------
  477|  1.51M|    esc_word = ixheaacd_rvlc_decode_escape_word(ptr_rvlc, it_bit_buff);
  478|       |
  479|  1.51M|    if (esc_word >= 0) {
  ------------------
  |  Branch (479:9): [True: 1.51M, False: 1]
  ------------------
  480|  1.51M|      ptr_escape[esc_cnt] = esc_word;
  481|  1.51M|      esc_cnt++;
  482|  1.51M|    } else {
  483|      1|      ptr_rvlc->rvlc_err_log |= RVLC_ERROR_ALL_ESCAPE_WORDS_INVALID;
  ------------------
  |  |   82|      1|#define RVLC_ERROR_ALL_ESCAPE_WORDS_INVALID 0x80000000
  ------------------
  484|      1|      ptr_rvlc->num_esc_words_decoded = esc_cnt;
  485|       |
  486|      1|      return;
  487|      1|    }
  488|  1.51M|  }
  489|       |
  490|  36.2k|  ptr_rvlc->num_esc_words_decoded = esc_cnt;
  491|  36.2k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_escape_word:
  434|  1.51M|                                              ia_bit_buf_struct *it_bit_buff) {
  435|  1.51M|  WORD32 i;
  436|       |
  437|  1.51M|  UWORD8 carry_bit;
  438|       |
  439|  1.51M|  UWORD16 *ptr_bitstream_index_esc;
  440|       |
  441|  1.51M|  int len = 0;
  442|  1.51M|  int codeword = 0;
  443|  1.51M|  int found = 0;
  444|  1.51M|  int indx;
  445|       |
  446|  1.51M|  ptr_bitstream_index_esc = &(ptr_rvlc->esc_bit_str_idx);
  447|       |
  448|  4.57M|  for (i = MAX_LEN_RVLC_ESCAPE_WORD - 1; i >= 0; i--) {
  ------------------
  |  |   90|  1.51M|#define MAX_LEN_RVLC_ESCAPE_WORD 20
  ------------------
  |  Branch (448:42): [True: 4.57M, False: 1]
  ------------------
  449|  4.57M|    carry_bit =
  450|  4.57M|        ixheaacd_rvlc_read_bits(it_bit_buff, ptr_bitstream_index_esc, FWD);
  ------------------
  |  |   86|  4.57M|#define FWD 0
  ------------------
  451|       |
  452|  4.57M|    len++;
  453|  4.57M|    codeword = codeword << 1 | carry_bit;
  454|  4.57M|    indx = ixheaacd_rvlc_decode_esc(codeword, len, &found);
  455|       |
  456|  4.57M|    if (found) {
  ------------------
  |  Branch (456:9): [True: 1.51M, False: 3.05M]
  ------------------
  457|  1.51M|      ptr_rvlc->rvlc_esc_len -= (MAX_LEN_RVLC_ESCAPE_WORD - i);
  ------------------
  |  |   90|  1.51M|#define MAX_LEN_RVLC_ESCAPE_WORD 20
  ------------------
  458|  1.51M|      return indx;
  459|  1.51M|    }
  460|  4.57M|  }
  461|       |
  462|      1|  ptr_rvlc->rvlc_err_log |= RVLC_ERROR_ALL_ESCAPE_WORDS_INVALID;
  ------------------
  |  |   82|      1|#define RVLC_ERROR_ALL_ESCAPE_WORDS_INVALID 0x80000000
  ------------------
  463|       |
  464|      1|  return -1;
  465|  1.51M|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_esc:
  205|  4.57M|static WORD32 ixheaacd_rvlc_decode_esc(WORD32 cw, WORD32 len, WORD32 *found) {
  206|  4.57M|  WORD16 indx = 0;
  207|  4.57M|  *found = 0;
  208|  4.57M|  switch (len) {
  209|  1.51M|    case 2:
  ------------------
  |  Branch (209:5): [True: 1.51M, False: 3.05M]
  ------------------
  210|  1.51M|      switch (cw) {
  211|   277k|        case 2:
  ------------------
  |  Branch (211:9): [True: 277k, False: 1.24M]
  ------------------
  212|   277k|          indx = 0;
  213|   277k|          break;
  214|   609k|        case 0:
  ------------------
  |  Branch (214:9): [True: 609k, False: 908k]
  ------------------
  215|   609k|          indx = 1;
  216|   609k|          break;
  217|   631k|        default:
  ------------------
  |  Branch (217:9): [True: 631k, False: 886k]
  ------------------
  218|   631k|          return 3;
  219|  1.51M|      }
  220|   886k|      break;
  221|   886k|    case 3:
  ------------------
  |  Branch (221:5): [True: 631k, False: 3.94M]
  ------------------
  222|   631k|      switch (cw) {
  223|   149k|        case 6:
  ------------------
  |  Branch (223:9): [True: 149k, False: 482k]
  ------------------
  224|   149k|          indx = 2;
  225|   149k|          break;
  226|  91.9k|        case 2:
  ------------------
  |  Branch (226:9): [True: 91.9k, False: 539k]
  ------------------
  227|  91.9k|          indx = 3;
  228|  91.9k|          break;
  229|   390k|        default:
  ------------------
  |  Branch (229:9): [True: 390k, False: 241k]
  ------------------
  230|   390k|          return 4;
  231|   631k|      }
  232|   241k|      break;
  233|   390k|    case 4:
  ------------------
  |  Branch (233:5): [True: 390k, False: 4.18M]
  ------------------
  234|   390k|      if (cw == 14)
  ------------------
  |  Branch (234:11): [True: 60.8k, False: 329k]
  ------------------
  235|  60.8k|        indx = 4;
  236|   329k|      else
  237|   329k|        return 5;
  238|  60.8k|      break;
  239|   329k|    case 5:
  ------------------
  |  Branch (239:5): [True: 329k, False: 4.24M]
  ------------------
  240|   329k|      switch (cw) {
  241|   188k|        case 31:
  ------------------
  |  Branch (241:9): [True: 188k, False: 140k]
  ------------------
  242|   188k|          indx = 5;
  243|   188k|          break;
  244|  31.4k|        case 15:
  ------------------
  |  Branch (244:9): [True: 31.4k, False: 298k]
  ------------------
  245|  31.4k|          indx = 6;
  246|  31.4k|          break;
  247|  16.0k|        case 13:
  ------------------
  |  Branch (247:9): [True: 16.0k, False: 313k]
  ------------------
  248|  16.0k|          indx = 7;
  249|  16.0k|          break;
  250|  93.3k|        default:
  ------------------
  |  Branch (250:9): [True: 93.3k, False: 236k]
  ------------------
  251|  93.3k|          return 6;
  252|   329k|      }
  253|   236k|      break;
  254|   236k|    case 6:
  ------------------
  |  Branch (254:5): [True: 93.3k, False: 4.48M]
  ------------------
  255|  93.3k|      switch (cw) {
  256|  11.0k|        case 61:
  ------------------
  |  Branch (256:9): [True: 11.0k, False: 82.2k]
  ------------------
  257|  11.0k|          indx = 8;
  258|  11.0k|          break;
  259|  12.0k|        case 29:
  ------------------
  |  Branch (259:9): [True: 12.0k, False: 81.2k]
  ------------------
  260|  12.0k|          indx = 9;
  261|  12.0k|          break;
  262|  23.6k|        case 25:
  ------------------
  |  Branch (262:9): [True: 23.6k, False: 69.6k]
  ------------------
  263|  23.6k|          indx = 10;
  264|  23.6k|          break;
  265|  8.89k|        case 24:
  ------------------
  |  Branch (265:9): [True: 8.89k, False: 84.4k]
  ------------------
  266|  8.89k|          indx = 11;
  267|  8.89k|          break;
  268|  37.6k|        default:
  ------------------
  |  Branch (268:9): [True: 37.6k, False: 55.7k]
  ------------------
  269|  37.6k|          return 7;
  270|  93.3k|      }
  271|  55.7k|      break;
  272|  55.7k|    case 7:
  ------------------
  |  Branch (272:5): [True: 37.6k, False: 4.53M]
  ------------------
  273|  37.6k|      switch (cw) {
  274|  14.9k|        case 120:
  ------------------
  |  Branch (274:9): [True: 14.9k, False: 22.6k]
  ------------------
  275|  14.9k|          indx = 12;
  276|  14.9k|          break;
  277|  8.41k|        case 56:
  ------------------
  |  Branch (277:9): [True: 8.41k, False: 29.1k]
  ------------------
  278|  8.41k|          indx = 13;
  279|  8.41k|          break;
  280|  14.2k|        default:
  ------------------
  |  Branch (280:9): [True: 14.2k, False: 23.4k]
  ------------------
  281|  14.2k|          return 8;
  282|  37.6k|      }
  283|  23.4k|      break;
  284|  23.4k|    case 8:
  ------------------
  |  Branch (284:5): [True: 14.2k, False: 4.56M]
  ------------------
  285|  14.2k|      switch (cw) {
  286|  2.92k|        case 242:
  ------------------
  |  Branch (286:9): [True: 2.92k, False: 11.2k]
  ------------------
  287|  2.92k|          indx = 14;
  288|  2.92k|          break;
  289|  1.64k|        case 114:
  ------------------
  |  Branch (289:9): [True: 1.64k, False: 12.5k]
  ------------------
  290|  1.64k|          indx = 15;
  291|  1.64k|          break;
  292|  9.64k|        default:
  ------------------
  |  Branch (292:9): [True: 9.64k, False: 4.56k]
  ------------------
  293|  9.64k|          return 9;
  294|  14.2k|      }
  295|  4.56k|      break;
  296|  9.64k|    case 9:
  ------------------
  |  Branch (296:5): [True: 9.64k, False: 4.56M]
  ------------------
  297|  9.64k|      switch (cw) {
  298|    534|        case 486:
  ------------------
  |  Branch (298:9): [True: 534, False: 9.10k]
  ------------------
  299|    534|          indx = 16;
  300|    534|          break;
  301|  1.71k|        case 230:
  ------------------
  |  Branch (301:9): [True: 1.71k, False: 7.92k]
  ------------------
  302|  1.71k|          indx = 17;
  303|  1.71k|          break;
  304|  7.38k|        default:
  ------------------
  |  Branch (304:9): [True: 7.38k, False: 2.25k]
  ------------------
  305|  7.38k|          return 10;
  306|  9.64k|      }
  307|  2.25k|      break;
  308|  7.38k|    case 10:
  ------------------
  |  Branch (308:5): [True: 7.38k, False: 4.56M]
  ------------------
  309|  7.38k|      switch (cw) {
  310|  2.44k|        case 974:
  ------------------
  |  Branch (310:9): [True: 2.44k, False: 4.94k]
  ------------------
  311|  2.44k|          indx = 18;
  312|  2.44k|          break;
  313|     94|        case 463:
  ------------------
  |  Branch (313:9): [True: 94, False: 7.29k]
  ------------------
  314|     94|          indx = 19;
  315|     94|          break;
  316|  4.85k|        default:
  ------------------
  |  Branch (316:9): [True: 4.85k, False: 2.53k]
  ------------------
  317|  4.85k|          return 11;
  318|  7.38k|      }
  319|  2.53k|      break;
  320|  4.85k|    case 11:
  ------------------
  |  Branch (320:5): [True: 4.85k, False: 4.57M]
  ------------------
  321|  4.85k|      switch (cw) {
  322|    192|        case 1950:
  ------------------
  |  Branch (322:9): [True: 192, False: 4.65k]
  ------------------
  323|    192|          indx = 20;
  324|    192|          break;
  325|    205|        case 1951:
  ------------------
  |  Branch (325:9): [True: 205, False: 4.64k]
  ------------------
  326|    205|          indx = 21;
  327|    205|          break;
  328|  1.34k|        case 925:
  ------------------
  |  Branch (328:9): [True: 1.34k, False: 3.50k]
  ------------------
  329|  1.34k|          indx = 22;
  330|  1.34k|          break;
  331|  3.10k|        default:
  ------------------
  |  Branch (331:9): [True: 3.10k, False: 1.74k]
  ------------------
  332|  3.10k|          return 12;
  333|  4.85k|      }
  334|  1.74k|      break;
  335|  3.10k|    case 12:
  ------------------
  |  Branch (335:5): [True: 3.10k, False: 4.57M]
  ------------------
  336|  3.10k|      if (cw == 1848)
  ------------------
  |  Branch (336:11): [True: 142, False: 2.96k]
  ------------------
  337|    142|        indx = 23;
  338|  2.96k|      else
  339|  2.96k|        return 13;
  340|    142|      break;
  341|  2.96k|    case 13:
  ------------------
  |  Branch (341:5): [True: 2.96k, False: 4.57M]
  ------------------
  342|  2.96k|      if (cw == 3698)
  ------------------
  |  Branch (342:11): [True: 322, False: 2.64k]
  ------------------
  343|    322|        indx = 25;
  344|  2.64k|      else
  345|  2.64k|        return 14;
  346|    322|      break;
  347|  2.64k|    case 14:
  ------------------
  |  Branch (347:5): [True: 2.64k, False: 4.57M]
  ------------------
  348|  2.64k|      if (cw == 7399)
  ------------------
  |  Branch (348:11): [True: 17, False: 2.62k]
  ------------------
  349|     17|        indx = 24;
  350|  2.62k|      else
  351|  2.62k|        return 15;
  352|     17|      break;
  353|  2.62k|    case 15:
  ------------------
  |  Branch (353:5): [True: 2.62k, False: 4.57M]
  ------------------
  354|  2.62k|      if (cw == 14797)
  ------------------
  |  Branch (354:11): [True: 574, False: 2.05k]
  ------------------
  355|    574|        indx = 26;
  356|  2.05k|      else
  357|  2.05k|        return 19;
  358|    574|      break;
  359|  2.05k|    case 19:
  ------------------
  |  Branch (359:5): [True: 2.05k, False: 4.57M]
  ------------------
  360|  2.05k|      if ((cw >= 236736) && (cw <= 236740))
  ------------------
  |  Branch (360:11): [True: 2.05k, False: 0]
  |  Branch (360:29): [True: 701, False: 1.34k]
  ------------------
  361|    701|        indx = 53 - (236740 - cw);
  362|  1.34k|      else
  363|  1.34k|        return 20;
  364|    701|      break;
  365|  1.34k|    case 20:
  ------------------
  |  Branch (365:5): [True: 1.34k, False: 4.57M]
  ------------------
  366|  1.34k|      if ((cw >= 473482) && (cw <= 473503))
  ------------------
  |  Branch (366:11): [True: 1.34k, False: 0]
  |  Branch (366:29): [True: 1.34k, False: 0]
  ------------------
  367|  1.34k|        indx = 48 - (473503 - cw);
  368|      0|      else
  369|      0|        return -1;
  370|  1.34k|      break;
  371|  1.52M|    default:
  ------------------
  |  Branch (371:5): [True: 1.52M, False: 3.05M]
  ------------------
  372|  1.52M|      return -1;
  373|  4.57M|  }
  374|  1.51M|  *found = 1;
  375|  1.51M|  return indx;
  376|  4.57M|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_forward:
  527|  72.9k|    ia_bit_buf_struct *it_bit_buff) {
  528|  72.9k|  WORD32 band = 0;
  529|  72.9k|  WORD32 group = 0;
  530|  72.9k|  WORD32 bnds = 0;
  531|       |
  532|  72.9k|  WORD16 dpcm;
  533|       |
  534|  72.9k|  ia_bit_buf_struct temp_buf = {0};
  535|       |
  536|  72.9k|  WORD16 factor = ptr_aac_dec_channel_info->global_gain;
  537|  72.9k|  WORD16 position = 0;
  538|  72.9k|  WORD16 noise_energy = ptr_aac_dec_channel_info->global_gain - 90 - 256;
  539|       |
  540|  72.9k|  WORD16 *ptr_scf_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr;
  541|  72.9k|  WORD16 *ptr_scf_esc = ptr_aac_dec_channel_info->rvlc_scf_esc_arr;
  542|  72.9k|  UWORD8 *ptr_esc_fwd_cnt = &(ptr_rvlc->num_fwd_esc_words_decoded);
  543|       |
  544|  72.9k|  ptr_rvlc->ptr_rvl_bit_cnt = &(ptr_rvlc->rvlc_sf_fwd_len);
  545|  72.9k|  ptr_rvlc->ptr_rvl_bit_str_idx = &(ptr_rvlc->rvl_fwd_bit_str_idx);
  546|       |
  547|  72.9k|  *ptr_esc_fwd_cnt = 0;
  548|  72.9k|  ptr_rvlc->direction = 0;
  549|  72.9k|  ptr_rvlc->noise_used = 0;
  550|  72.9k|  ptr_rvlc->sf_used = 0;
  551|  72.9k|  ptr_rvlc->last_scale_fac = 0;
  552|  72.9k|  ptr_rvlc->last_nrg = 0;
  553|  72.9k|  ptr_rvlc->is_last = 0;
  554|       |
  555|  72.9k|  ixheaacd_rvlc_check_intensity_cb(ptr_rvlc, ptr_aac_dec_channel_info);
  556|       |
  557|   138k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (557:19): [True: 86.6k, False: 51.5k]
  ------------------
  558|   819k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (558:20): [True: 753k, False: 65.2k]
  ------------------
  559|   753k|      bnds = 16 * group + band;
  560|       |
  561|   753k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
  562|  85.1k|        case ZERO_HCB:
  ------------------
  |  |   33|  85.1k|#define ZERO_HCB 0
  ------------------
  |  Branch (562:9): [True: 85.1k, False: 668k]
  ------------------
  563|  85.1k|          ptr_scf_fwd[bnds] = 0;
  564|  85.1k|          break;
  565|       |
  566|  74.2k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  74.2k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (566:9): [True: 74.2k, False: 679k]
  ------------------
  567|   209k|        case INTENSITY_HCB:
  ------------------
  |  |   40|   209k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (567:9): [True: 135k, False: 618k]
  ------------------
  568|       |
  569|   209k|        {
  570|   209k|          dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  571|   209k|          if (dpcm < 0) {
  ------------------
  |  Branch (571:15): [True: 5.54k, False: 204k]
  ------------------
  572|  5.54k|            ptr_rvlc->conceal_max = bnds;
  573|  5.54k|            return;
  574|  5.54k|          }
  575|   204k|          dpcm -= 7;
  576|   204k|        }
  577|   204k|          if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (577:15): [True: 6.91k, False: 197k]
  |  Branch (577:31): [True: 6.35k, False: 190k]
  ------------------
  578|  13.2k|            if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (578:17): [True: 2.02k, False: 11.2k]
  ------------------
  579|  2.02k|              ptr_rvlc->conceal_max = bnds;
  580|  2.02k|              return;
  581|  11.2k|            } else {
  582|  11.2k|              if (dpcm == -7) {
  ------------------
  |  Branch (582:19): [True: 6.75k, False: 4.49k]
  ------------------
  583|  6.75k|                dpcm -= *ptr_scf_esc++;
  584|  6.75k|              } else {
  585|  4.49k|                dpcm += *ptr_scf_esc++;
  586|  4.49k|              }
  587|  11.2k|              (*ptr_esc_fwd_cnt)++;
  588|  11.2k|              if (ptr_rvlc->conceal_max_esc == 1311) {
  ------------------
  |  Branch (588:19): [True: 1.72k, False: 9.52k]
  ------------------
  589|  1.72k|                ptr_rvlc->conceal_max_esc = bnds;
  590|  1.72k|              }
  591|  11.2k|            }
  592|  13.2k|          }
  593|   202k|          position += dpcm;
  594|   202k|          ptr_scf_fwd[bnds] = position;
  595|   202k|          ptr_rvlc->is_last = position;
  596|   202k|          break;
  597|       |
  598|   304k|        case NOISE_HCB:
  ------------------
  |  |   38|   304k|#define NOISE_HCB 13
  ------------------
  |  Branch (598:9): [True: 304k, False: 449k]
  ------------------
  599|   304k|          if (ptr_rvlc->noise_used == 0) {
  ------------------
  |  Branch (599:15): [True: 23.8k, False: 280k]
  ------------------
  600|  23.8k|            ptr_rvlc->noise_used = 1;
  601|  23.8k|            ptr_rvlc->first_noise_band = bnds;
  602|  23.8k|            noise_energy += ptr_rvlc->dpcm_noise_nrg;
  603|  23.8k|            ptr_scf_fwd[bnds] = noise_energy;
  604|  23.8k|            ptr_rvlc->last_nrg = noise_energy;
  605|   280k|          } else {
  606|   280k|            dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  607|   280k|            if (dpcm < 0) {
  ------------------
  |  Branch (607:17): [True: 6.90k, False: 273k]
  ------------------
  608|  6.90k|              ptr_rvlc->conceal_max = bnds;
  609|  6.90k|              return;
  610|  6.90k|            }
  611|   273k|            dpcm -= 7;
  612|   273k|            if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (612:17): [True: 9.18k, False: 264k]
  |  Branch (612:33): [True: 3.13k, False: 261k]
  ------------------
  613|  12.3k|              if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (613:19): [True: 1.37k, False: 10.9k]
  ------------------
  614|  1.37k|                ptr_rvlc->conceal_max = bnds;
  615|  1.37k|                return;
  616|  10.9k|              } else {
  617|  10.9k|                if (dpcm == -7) {
  ------------------
  |  Branch (617:21): [True: 7.85k, False: 3.09k]
  ------------------
  618|  7.85k|                  dpcm -= *ptr_scf_esc++;
  619|  7.85k|                } else {
  620|  3.09k|                  dpcm += *ptr_scf_esc++;
  621|  3.09k|                }
  622|  10.9k|                (*ptr_esc_fwd_cnt)++;
  623|  10.9k|                if (ptr_rvlc->conceal_max_esc == 1311) {
  ------------------
  |  Branch (623:21): [True: 3.10k, False: 7.84k]
  ------------------
  624|  3.10k|                  ptr_rvlc->conceal_max_esc = bnds;
  625|  3.10k|                }
  626|  10.9k|              }
  627|  12.3k|            }
  628|   272k|            noise_energy += dpcm;
  629|   272k|            ptr_scf_fwd[bnds] = noise_energy;
  630|   272k|            ptr_rvlc->last_nrg = noise_energy;
  631|   272k|          }
  632|   295k|          ptr_aac_dec_channel_info->str_pns_info.pns_used[bnds] = 1;
  633|   295k|          break;
  634|       |
  635|   154k|        default:
  ------------------
  |  Branch (635:9): [True: 154k, False: 598k]
  ------------------
  636|   154k|          ptr_rvlc->sf_used = 1;
  637|   154k|          {
  638|   154k|            memcpy(&temp_buf, it_bit_buff, sizeof(ia_bit_buf_struct));
  639|       |
  640|   154k|            dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  641|   154k|            if (dpcm < 0) {
  ------------------
  |  Branch (641:17): [True: 3.02k, False: 151k]
  ------------------
  642|  3.02k|              ptr_rvlc->conceal_max = bnds;
  643|  3.02k|              return;
  644|  3.02k|            }
  645|   151k|            dpcm -= 7;
  646|   151k|          }
  647|   151k|          if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (647:15): [True: 4.27k, False: 147k]
  |  Branch (647:31): [True: 1.67k, False: 145k]
  ------------------
  648|  5.94k|            if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (648:17): [True: 2.56k, False: 3.38k]
  ------------------
  649|  2.56k|              ptr_rvlc->conceal_max = bnds;
  650|  2.56k|              return;
  651|  3.38k|            } else {
  652|  3.38k|              if (dpcm == -7) {
  ------------------
  |  Branch (652:19): [True: 2.25k, False: 1.13k]
  ------------------
  653|  2.25k|                dpcm -= *ptr_scf_esc++;
  654|  2.25k|              } else {
  655|  1.13k|                dpcm += *ptr_scf_esc++;
  656|  1.13k|              }
  657|  3.38k|              (*ptr_esc_fwd_cnt)++;
  658|  3.38k|              if (ptr_rvlc->conceal_max_esc == 1311) {
  ------------------
  |  Branch (658:19): [True: 2.87k, False: 512]
  ------------------
  659|  2.87k|                ptr_rvlc->conceal_max_esc = bnds;
  660|  2.87k|              }
  661|  3.38k|            }
  662|  5.94k|          }
  663|   149k|          factor += dpcm;
  664|   149k|          ptr_scf_fwd[bnds] = factor;
  665|   149k|          ptr_rvlc->last_scale_fac = factor;
  666|   149k|          break;
  667|   753k|      }
  668|   753k|    }
  669|  86.6k|  }
  670|       |
  671|  51.5k|  if (ptr_rvlc->intensity_used) {
  ------------------
  |  Branch (671:7): [True: 8.78k, False: 42.7k]
  ------------------
  672|  8.78k|    dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  673|  8.78k|    if (dpcm < 0) {
  ------------------
  |  Branch (673:9): [True: 317, False: 8.46k]
  ------------------
  674|    317|      ptr_rvlc->conceal_max = bnds;
  675|    317|      return;
  676|    317|    }
  677|  8.46k|    dpcm -= 7;
  678|  8.46k|    if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (678:9): [True: 455, False: 8.01k]
  |  Branch (678:25): [True: 750, False: 7.26k]
  ------------------
  679|  1.20k|      if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (679:11): [True: 137, False: 1.06k]
  ------------------
  680|    137|        ptr_rvlc->conceal_max = bnds;
  681|    137|        return;
  682|  1.06k|      } else {
  683|  1.06k|        if (dpcm == -7) {
  ------------------
  |  Branch (683:13): [True: 449, False: 619]
  ------------------
  684|    449|          dpcm -= *ptr_scf_esc++;
  685|    619|        } else {
  686|    619|          dpcm += *ptr_scf_esc++;
  687|    619|        }
  688|  1.06k|        (*ptr_esc_fwd_cnt)++;
  689|  1.06k|        if (ptr_rvlc->conceal_max_esc == 1311) {
  ------------------
  |  Branch (689:13): [True: 782, False: 286]
  ------------------
  690|    782|          ptr_rvlc->conceal_max_esc = bnds;
  691|    782|        }
  692|  1.06k|      }
  693|  1.20k|    }
  694|  8.33k|    ptr_rvlc->dpcm_is_last_pos = dpcm;
  695|  8.33k|  }
  696|  51.5k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_check_intensity_cb:
  379|  72.9k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
  380|  72.9k|  WORD32 group, band, bnds;
  381|       |
  382|  72.9k|  ptr_rvlc->intensity_used = 0;
  383|       |
  384|   159k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (384:19): [True: 86.6k, False: 72.9k]
  ------------------
  385|   609k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (385:20): [True: 544k, False: 65.3k]
  ------------------
  386|   544k|      bnds = 16 * group + band;
  387|   544k|      if ((ptr_aac_dec_channel_info->ptr_code_book[bnds] == INTENSITY_HCB) ||
  ------------------
  |  |   40|   544k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (387:11): [True: 10.5k, False: 534k]
  ------------------
  388|   534k|          (ptr_aac_dec_channel_info->ptr_code_book[bnds] == INTENSITY_HCB2)) {
  ------------------
  |  |   39|   534k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (388:11): [True: 10.7k, False: 523k]
  ------------------
  389|  21.3k|        ptr_rvlc->intensity_used = 1;
  390|  21.3k|        break;
  391|  21.3k|      }
  392|   544k|    }
  393|  86.6k|  }
  394|  72.9k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_backward:
  701|  72.9k|    ia_bit_buf_struct *it_bit_buff) {
  702|  72.9k|  WORD16 band, group, dpcm;
  703|  72.9k|  WORD16 bnds = ptr_rvlc->max_sfb_transmitted - 1;
  704|       |
  705|  72.9k|  WORD16 factor = ptr_rvlc->rev_global_gain;
  706|  72.9k|  WORD16 position = ptr_rvlc->dpcm_is_last_pos;
  707|  72.9k|  WORD16 noise_energy =
  708|  72.9k|      ptr_rvlc->rev_global_gain + ptr_rvlc->dpcm_noise_last_pos - 90 - 256;
  709|       |
  710|  72.9k|  WORD16 *ptr_scf_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr;
  711|  72.9k|  WORD16 *ptr_scf_esc = ptr_aac_dec_channel_info->rvlc_scf_esc_arr;
  712|  72.9k|  UWORD8 *ptr_esc_cnt = &(ptr_rvlc->num_esc_words_decoded);
  713|  72.9k|  UWORD8 *ptr_esc_bwd_cnt = &(ptr_rvlc->num_bwd_esc_words_decoded);
  714|       |
  715|  72.9k|  ptr_rvlc->ptr_rvl_bit_cnt = &(ptr_rvlc->rvlc_sf_bwd_len);
  716|  72.9k|  ptr_rvlc->ptr_rvl_bit_str_idx = &(ptr_rvlc->rvl_bwd_bit_str_idx);
  717|       |
  718|  72.9k|  *ptr_esc_bwd_cnt = 0;
  719|  72.9k|  ptr_rvlc->direction = 1;
  720|  72.9k|  ptr_scf_esc += *ptr_esc_cnt - 1;
  721|  72.9k|  ptr_rvlc->firt_scale_fac = 0;
  722|  72.9k|  ptr_rvlc->first_nrg = 0;
  723|  72.9k|  ptr_rvlc->is_first = 0;
  724|       |
  725|  72.9k|  if (ptr_rvlc->intensity_used) {
  ------------------
  |  Branch (725:7): [True: 21.3k, False: 51.6k]
  ------------------
  726|  21.3k|    dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  727|  21.3k|    if (dpcm < 0) {
  ------------------
  |  Branch (727:9): [True: 2.75k, False: 18.5k]
  ------------------
  728|  2.75k|      ptr_rvlc->dpcm_is_last_pos = 0;
  729|  2.75k|      ptr_rvlc->conceal_min = bnds;
  730|  2.75k|      return;
  731|  2.75k|    }
  732|  18.5k|    dpcm -= 7;
  733|  18.5k|    if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (733:9): [True: 763, False: 17.8k]
  |  Branch (733:25): [True: 1.29k, False: 16.5k]
  ------------------
  734|  2.06k|      if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (734:11): [True: 1.31k, False: 744]
  ------------------
  735|  1.31k|        ptr_rvlc->conceal_min = bnds;
  736|  1.31k|        return;
  737|  1.31k|      } else {
  738|    744|        if (dpcm == -7) {
  ------------------
  |  Branch (738:13): [True: 500, False: 244]
  ------------------
  739|    500|          dpcm -= *ptr_scf_esc--;
  740|    500|        } else {
  741|    244|          dpcm += *ptr_scf_esc--;
  742|    244|        }
  743|    744|        (*ptr_esc_bwd_cnt)++;
  744|    744|        if (ptr_rvlc->conceal_min_esc == -1311) {
  ------------------
  |  Branch (744:13): [True: 744, False: 0]
  ------------------
  745|    744|          ptr_rvlc->conceal_min_esc = bnds;
  746|    744|        }
  747|    744|      }
  748|  2.06k|    }
  749|  17.2k|    ptr_rvlc->dpcm_is_last_pos = dpcm;
  750|  17.2k|  }
  751|       |
  752|   130k|  for (group = ptr_rvlc->num_wind_grps - 1; group >= 0; group--) {
  ------------------
  |  Branch (752:45): [True: 82.5k, False: 47.6k]
  ------------------
  753|   683k|    for (band = ptr_rvlc->max_sfb_transmitted - 1; band >= 0; band--) {
  ------------------
  |  Branch (753:52): [True: 621k, False: 61.3k]
  ------------------
  754|   621k|      bnds = 16 * group + band;
  755|       |
  756|   621k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
  757|  55.1k|        case ZERO_HCB:
  ------------------
  |  |   33|  55.1k|#define ZERO_HCB 0
  ------------------
  |  Branch (757:9): [True: 55.1k, False: 566k]
  ------------------
  758|  55.1k|          ptr_scf_bwd[bnds] = 0;
  759|  55.1k|          break;
  760|       |
  761|  72.4k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  72.4k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (761:9): [True: 72.4k, False: 549k]
  ------------------
  762|   170k|        case INTENSITY_HCB:
  ------------------
  |  |   40|   170k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (762:9): [True: 98.3k, False: 523k]
  ------------------
  763|       |
  764|   170k|          dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  765|   170k|          if (dpcm < 0) {
  ------------------
  |  Branch (765:15): [True: 4.28k, False: 166k]
  ------------------
  766|  4.28k|            ptr_scf_bwd[bnds] = position;
  767|       |
  768|  4.28k|            return;
  769|  4.28k|          }
  770|   166k|          dpcm -= 7;
  771|   166k|          if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (771:15): [True: 3.38k, False: 163k]
  |  Branch (771:31): [True: 5.42k, False: 157k]
  ------------------
  772|  8.80k|            if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (772:17): [True: 1.56k, False: 7.23k]
  ------------------
  773|  1.56k|              ptr_scf_bwd[bnds] = position;
  774|       |
  775|  1.56k|              return;
  776|  7.23k|            } else {
  777|  7.23k|              if (dpcm == -7) {
  ------------------
  |  Branch (777:19): [True: 2.65k, False: 4.57k]
  ------------------
  778|  2.65k|                dpcm -= *ptr_scf_esc--;
  779|  4.57k|              } else {
  780|  4.57k|                dpcm += *ptr_scf_esc--;
  781|  4.57k|              }
  782|  7.23k|              (*ptr_esc_bwd_cnt)++;
  783|  7.23k|              if (ptr_rvlc->conceal_min_esc == -1311) {
  ------------------
  |  Branch (783:19): [True: 3.17k, False: 4.05k]
  ------------------
  784|  3.17k|              }
  785|  7.23k|            }
  786|  8.80k|          }
  787|   164k|          ptr_scf_bwd[bnds] = position;
  788|   164k|          position -= dpcm;
  789|   164k|          ptr_rvlc->is_first = position;
  790|   164k|          break;
  791|       |
  792|   283k|        case NOISE_HCB:
  ------------------
  |  |   38|   283k|#define NOISE_HCB 13
  ------------------
  |  Branch (792:9): [True: 283k, False: 338k]
  ------------------
  793|   283k|          if (bnds == ptr_rvlc->first_noise_band) {
  ------------------
  |  Branch (793:15): [True: 15.0k, False: 268k]
  ------------------
  794|  15.0k|            ptr_scf_bwd[bnds] = ptr_rvlc->dpcm_noise_nrg +
  795|  15.0k|                                ptr_aac_dec_channel_info->global_gain - 90 -
  796|  15.0k|                                256;
  797|  15.0k|            ptr_rvlc->first_nrg = ptr_scf_bwd[bnds];
  798|   268k|          } else {
  799|   268k|            dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  800|   268k|            if (dpcm < 0) {
  ------------------
  |  Branch (800:17): [True: 9.39k, False: 259k]
  ------------------
  801|  9.39k|              ptr_scf_bwd[bnds] = noise_energy;
  802|  9.39k|              return;
  803|  9.39k|            }
  804|   259k|            dpcm -= 7;
  805|   259k|            if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (805:17): [True: 11.7k, False: 247k]
  |  Branch (805:33): [True: 3.50k, False: 243k]
  ------------------
  806|  15.2k|              if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (806:19): [True: 759, False: 14.4k]
  ------------------
  807|    759|                ptr_scf_bwd[bnds] = noise_energy;
  808|    759|                return;
  809|  14.4k|              } else {
  810|  14.4k|                if (dpcm == -7) {
  ------------------
  |  Branch (810:21): [True: 11.3k, False: 3.10k]
  ------------------
  811|  11.3k|                  dpcm -= *ptr_scf_esc--;
  812|  11.3k|                } else {
  813|  3.10k|                  dpcm += *ptr_scf_esc--;
  814|  3.10k|                }
  815|  14.4k|                (*ptr_esc_bwd_cnt)++;
  816|  14.4k|                if (ptr_rvlc->conceal_min_esc == -1311) {
  ------------------
  |  Branch (816:21): [True: 10.4k, False: 4.01k]
  ------------------
  817|  10.4k|                }
  818|  14.4k|              }
  819|  15.2k|            }
  820|   258k|            ptr_scf_bwd[bnds] = noise_energy;
  821|   258k|            noise_energy -= dpcm;
  822|   258k|            ptr_rvlc->first_nrg = noise_energy;
  823|   258k|          }
  824|   273k|          break;
  825|       |
  826|   273k|        default:
  ------------------
  |  Branch (826:9): [True: 112k, False: 509k]
  ------------------
  827|   112k|          dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  828|   112k|          if (dpcm < 0) {
  ------------------
  |  Branch (828:15): [True: 3.07k, False: 109k]
  ------------------
  829|  3.07k|            ptr_scf_bwd[bnds] = factor;
  830|       |
  831|  3.07k|            return;
  832|  3.07k|          }
  833|   109k|          dpcm -= 7;
  834|   109k|          if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (834:15): [True: 2.44k, False: 106k]
  |  Branch (834:31): [True: 3.01k, False: 103k]
  ------------------
  835|  5.46k|            if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (835:17): [True: 2.21k, False: 3.24k]
  ------------------
  836|  2.21k|              ptr_scf_bwd[bnds] = factor;
  837|       |
  838|  2.21k|              return;
  839|  3.24k|            } else {
  840|  3.24k|              if (dpcm == -7) {
  ------------------
  |  Branch (840:19): [True: 1.83k, False: 1.40k]
  ------------------
  841|  1.83k|                dpcm -= *ptr_scf_esc--;
  842|  1.83k|              } else {
  843|  1.40k|                dpcm += *ptr_scf_esc--;
  844|  1.40k|              }
  845|  3.24k|              (*ptr_esc_bwd_cnt)++;
  846|  3.24k|              if (ptr_rvlc->conceal_min_esc == -1311) {
  ------------------
  |  Branch (846:19): [True: 2.83k, False: 409]
  ------------------
  847|  2.83k|              }
  848|  3.24k|            }
  849|  5.46k|          }
  850|   106k|          ptr_scf_bwd[bnds] = factor;
  851|   106k|          factor -= dpcm;
  852|   106k|          ptr_rvlc->firt_scale_fac = factor;
  853|   106k|          break;
  854|   621k|      }
  855|   621k|    }
  856|  82.5k|  }
  857|  68.9k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_final_error_detection:
 1522|  72.9k|    ia_aac_dec_overlap_info *ptr_aac_dec_static_channel_info) {
 1523|  72.9k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
 1524|  72.9k|  UWORD8 err_status_complete = 0;
 1525|  72.9k|  UWORD8 err_status_length_fwd = 0;
 1526|  72.9k|  UWORD8 err_status_length_bwd = 0;
 1527|  72.9k|  UWORD8 err_status_length_escape = 0;
 1528|  72.9k|  UWORD8 err_status_first_scf = 0;
 1529|  72.9k|  UWORD8 err_status_last_scf = 0;
 1530|  72.9k|  UWORD8 err_status_first_nrg = 0;
 1531|  72.9k|  UWORD8 err_status_last_nrg = 0;
 1532|  72.9k|  UWORD8 err_status_first_is = 0;
 1533|  72.9k|  UWORD8 err_status_last_is = 0;
 1534|  72.9k|  UWORD8 err_status_forbidden_cw_fwd = 0;
 1535|  72.9k|  UWORD8 err_status_forbidden_cw_bwd = 0;
 1536|  72.9k|  UWORD8 err_status_num_escapes_fwd = 0;
 1537|  72.9k|  UWORD8 err_status_num_escapes_bwd = 0;
 1538|  72.9k|  UWORD8 conceal_status = 1;
 1539|  72.9k|  UWORD8 current_block_type;
 1540|       |
 1541|  72.9k|  ptr_aac_dec_channel_info->rvlc_curr_sf_flag = 1;
 1542|       |
 1543|  72.9k|  if (ptr_rvlc->rvlc_err_log & RVLC_ERROR_FORBIDDEN_CW_DETECTED_FWD)
  ------------------
  |  |   83|  72.9k|#define RVLC_ERROR_FORBIDDEN_CW_DETECTED_FWD 0x08000000
  ------------------
  |  Branch (1543:7): [True: 0, False: 72.9k]
  ------------------
 1544|      0|    err_status_forbidden_cw_fwd = 1;
 1545|       |
 1546|  72.9k|  if (ptr_rvlc->rvlc_err_log & RVLC_ERROR_FORBIDDEN_CW_DETECTED_BWD)
  ------------------
  |  |   84|  72.9k|#define RVLC_ERROR_FORBIDDEN_CW_DETECTED_BWD 0x04000000
  ------------------
  |  Branch (1546:7): [True: 0, False: 72.9k]
  ------------------
 1547|      0|    err_status_forbidden_cw_bwd = 1;
 1548|       |
 1549|  72.9k|  if (ptr_rvlc->rvlc_sf_fwd_len) err_status_length_fwd = 1;
  ------------------
  |  Branch (1549:7): [True: 64.2k, False: 8.69k]
  ------------------
 1550|       |
 1551|  72.9k|  if (ptr_rvlc->rvlc_sf_bwd_len) err_status_length_bwd = 1;
  ------------------
  |  Branch (1551:7): [True: 64.3k, False: 8.62k]
  ------------------
 1552|       |
 1553|  72.9k|  if (ptr_rvlc->sf_esc_present)
  ------------------
  |  Branch (1553:7): [True: 36.2k, False: 36.6k]
  ------------------
 1554|  36.2k|    if (ptr_rvlc->rvlc_esc_len) err_status_length_escape = 1;
  ------------------
  |  Branch (1554:9): [True: 18.3k, False: 17.9k]
  ------------------
 1555|       |
 1556|  72.9k|  if (ptr_rvlc->sf_used) {
  ------------------
  |  Branch (1556:7): [True: 24.6k, False: 48.3k]
  ------------------
 1557|  24.6k|    if (ptr_rvlc->firt_scale_fac != (ptr_aac_dec_channel_info->global_gain))
  ------------------
  |  Branch (1557:9): [True: 24.5k, False: 158]
  ------------------
 1558|  24.5k|      err_status_first_scf = 1;
 1559|       |
 1560|  24.6k|    if (ptr_rvlc->last_scale_fac != (ptr_rvlc->rev_global_gain))
  ------------------
  |  Branch (1560:9): [True: 24.2k, False: 395]
  ------------------
 1561|  24.2k|      err_status_last_scf = 1;
 1562|  24.6k|  }
 1563|       |
 1564|  72.9k|  if (ptr_rvlc->noise_used) {
  ------------------
  |  Branch (1564:7): [True: 23.8k, False: 49.0k]
  ------------------
 1565|  23.8k|    if (ptr_rvlc->first_nrg != (ptr_aac_dec_channel_info->global_gain +
  ------------------
  |  Branch (1565:9): [True: 10.9k, False: 12.9k]
  ------------------
 1566|  23.8k|                                ptr_rvlc->dpcm_noise_nrg - 90 - 256))
 1567|  10.9k|      err_status_first_nrg = 1;
 1568|       |
 1569|  23.8k|    if (ptr_rvlc->last_nrg !=
  ------------------
  |  Branch (1569:9): [True: 23.3k, False: 580]
  ------------------
 1570|  23.8k|        (ptr_rvlc->rev_global_gain + ptr_rvlc->dpcm_noise_last_pos - 90 - 256))
 1571|  23.3k|      err_status_last_nrg = 1;
 1572|  23.8k|  }
 1573|       |
 1574|  72.9k|  if (ptr_rvlc->intensity_used) {
  ------------------
  |  Branch (1574:7): [True: 21.3k, False: 51.6k]
  ------------------
 1575|  21.3k|    if (ptr_rvlc->is_first != 0) err_status_first_is = 1;
  ------------------
  |  Branch (1575:9): [True: 11.7k, False: 9.57k]
  ------------------
 1576|       |
 1577|  21.3k|    if (ptr_rvlc->is_last != (ptr_rvlc->dpcm_is_last_pos))
  ------------------
  |  Branch (1577:9): [True: 14.7k, False: 6.64k]
  ------------------
 1578|  14.7k|      err_status_last_is = 1;
 1579|  21.3k|  }
 1580|       |
 1581|  72.9k|  if ((ptr_rvlc->num_fwd_esc_words_decoded !=
  ------------------
  |  Branch (1581:7): [True: 35.0k, False: 37.9k]
  ------------------
 1582|  72.9k|       ptr_rvlc->num_esc_words_decoded) &&
 1583|  35.0k|      (ptr_rvlc->conceal_max == CONCEAL_MAX_INIT)) {
  ------------------
  |  |   92|  35.0k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1583:7): [True: 22.9k, False: 12.0k]
  ------------------
 1584|  22.9k|    err_status_num_escapes_fwd = 1;
 1585|  22.9k|  }
 1586|       |
 1587|  72.9k|  if ((ptr_rvlc->num_bwd_esc_words_decoded !=
  ------------------
  |  Branch (1587:7): [True: 33.8k, False: 39.1k]
  ------------------
 1588|  72.9k|       ptr_rvlc->num_esc_words_decoded) &&
 1589|  33.8k|      (ptr_rvlc->conceal_min == CONCEAL_MIN_INIT)) {
  ------------------
  |  |   93|  33.8k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1589:7): [True: 30.7k, False: 3.14k]
  ------------------
 1590|  30.7k|    err_status_num_escapes_bwd = 1;
 1591|  30.7k|  }
 1592|       |
 1593|  72.9k|  if (err_status_length_escape ||
  ------------------
  |  Branch (1593:7): [True: 18.3k, False: 54.6k]
  ------------------
 1594|  54.6k|      (((ptr_rvlc->conceal_max == CONCEAL_MAX_INIT) &&
  ------------------
  |  |   92|  54.6k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1594:9): [True: 41.4k, False: 13.1k]
  ------------------
 1595|  41.4k|        (ptr_rvlc->num_fwd_esc_words_decoded !=
  ------------------
  |  Branch (1595:9): [True: 13.3k, False: 28.0k]
  ------------------
 1596|  41.4k|         ptr_rvlc->num_esc_words_decoded) &&
 1597|  13.3k|        (err_status_last_scf || err_status_last_nrg || err_status_last_is))
  ------------------
  |  Branch (1597:10): [True: 5.60k, False: 7.77k]
  |  Branch (1597:33): [True: 3.14k, False: 4.62k]
  |  Branch (1597:56): [True: 834, False: 3.79k]
  ------------------
 1598|       |
 1599|  9.58k|       &&
 1600|       |
 1601|  9.58k|       ((ptr_rvlc->conceal_min == CONCEAL_MIN_INIT) &&
  ------------------
  |  |   93|  9.58k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1601:9): [True: 8.91k, False: 662]
  ------------------
 1602|  8.91k|        (ptr_rvlc->num_bwd_esc_words_decoded !=
  ------------------
  |  Branch (1602:9): [True: 8.64k, False: 275]
  ------------------
 1603|  8.91k|         ptr_rvlc->num_esc_words_decoded) &&
 1604|  8.64k|        (err_status_first_scf || err_status_first_nrg ||
  ------------------
  |  Branch (1604:10): [True: 5.32k, False: 3.31k]
  |  Branch (1604:34): [True: 961, False: 2.35k]
  ------------------
 1605|  2.35k|         err_status_first_is))) ||
  ------------------
  |  Branch (1605:10): [True: 1.19k, False: 1.16k]
  ------------------
 1606|  47.1k|      ((ptr_rvlc->conceal_max == CONCEAL_MAX_INIT) &&
  ------------------
  |  |   92|  47.1k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1606:8): [True: 33.9k, False: 13.1k]
  ------------------
 1607|  33.9k|       ((ptr_rvlc->rev_global_gain - ptr_rvlc->last_scale_fac) < -15)) ||
  ------------------
  |  Branch (1607:8): [True: 1.19k, False: 32.7k]
  ------------------
 1608|  45.9k|      ((ptr_rvlc->conceal_min == CONCEAL_MIN_INIT) &&
  ------------------
  |  |   93|  45.9k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1608:8): [True: 44.2k, False: 1.73k]
  ------------------
 1609|  44.2k|       ((ptr_aac_dec_channel_info->global_gain - ptr_rvlc->firt_scale_fac) <
  ------------------
  |  Branch (1609:8): [True: 3.85k, False: 40.3k]
  ------------------
 1610|  44.2k|        -15))) {
 1611|  30.8k|    if ((ptr_rvlc->conceal_max == CONCEAL_MAX_INIT) ||
  ------------------
  |  |   92|  30.8k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1611:9): [True: 20.3k, False: 10.4k]
  ------------------
 1612|  28.7k|        (ptr_rvlc->conceal_min == CONCEAL_MIN_INIT)) {
  ------------------
  |  |   93|  10.4k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1612:9): [True: 8.39k, False: 2.10k]
  ------------------
 1613|  28.7k|      ptr_rvlc->conceal_max = 0;
 1614|  28.7k|      ptr_rvlc->conceal_min =
 1615|  28.7k|          ixheaac_max32(0, (ptr_rvlc->num_wind_grps - 1) * 16 +
 1616|  28.7k|                                ptr_rvlc->max_sfb_transmitted - 1);
 1617|  28.7k|    } else {
 1618|  2.10k|      ptr_rvlc->conceal_max =
 1619|  2.10k|          ixheaac_min32(ptr_rvlc->conceal_max, ptr_rvlc->conceal_max_esc);
 1620|  2.10k|      ptr_rvlc->conceal_min =
 1621|  2.10k|          ixheaac_max32(ptr_rvlc->conceal_min, ptr_rvlc->conceal_min_esc);
 1622|  2.10k|    }
 1623|  30.8k|  }
 1624|       |
 1625|  72.9k|  err_status_complete =
 1626|  72.9k|      err_status_last_scf || err_status_first_scf || err_status_last_nrg ||
  ------------------
  |  Branch (1626:7): [True: 24.2k, False: 48.6k]
  |  Branch (1626:30): [True: 353, False: 48.3k]
  |  Branch (1626:54): [True: 12.3k, False: 35.9k]
  ------------------
 1627|  35.9k|      err_status_first_nrg || err_status_last_is || err_status_first_is ||
  ------------------
  |  Branch (1627:7): [True: 510, False: 35.4k]
  |  Branch (1627:31): [True: 4.54k, False: 30.9k]
  |  Branch (1627:53): [True: 2.50k, False: 28.4k]
  ------------------
 1628|  28.4k|      err_status_forbidden_cw_fwd || err_status_forbidden_cw_bwd ||
  ------------------
  |  Branch (1628:7): [True: 0, False: 28.4k]
  |  Branch (1628:38): [True: 0, False: 28.4k]
  ------------------
 1629|  28.4k|      err_status_length_fwd || err_status_length_bwd ||
  ------------------
  |  Branch (1629:7): [True: 19.9k, False: 8.53k]
  |  Branch (1629:32): [True: 67, False: 8.46k]
  ------------------
 1630|  8.46k|      err_status_length_escape || err_status_num_escapes_fwd ||
  ------------------
  |  Branch (1630:7): [True: 89, False: 8.38k]
  |  Branch (1630:35): [True: 106, False: 8.27k]
  ------------------
 1631|  8.27k|      err_status_num_escapes_bwd;
  ------------------
  |  Branch (1631:7): [True: 0, False: 8.27k]
  ------------------
 1632|       |
 1633|  72.9k|  current_block_type =
 1634|  72.9k|      (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (1634:7): [True: 4.53k, False: 68.4k]
  ------------------
 1635|  72.9k|       EIGHT_SHORT_SEQUENCE)
  ------------------
  |  |  102|  72.9k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
 1636|  72.9k|          ? 0
 1637|  72.9k|          : 1;
 1638|       |
 1639|  72.9k|  if (!err_status_complete) {
  ------------------
  |  Branch (1639:7): [True: 8.27k, False: 64.7k]
  ------------------
 1640|  8.27k|    WORD32 band;
 1641|  8.27k|    WORD32 group;
 1642|  8.27k|    WORD32 bnds;
 1643|  8.27k|    WORD32 last_sfb_idx;
 1644|       |
 1645|  8.27k|    last_sfb_idx = (ptr_rvlc->num_wind_grps > 1) ? 16 : 64;
  ------------------
  |  Branch (1645:20): [True: 131, False: 8.14k]
  ------------------
 1646|       |
 1647|  17.1k|    for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1647:21): [True: 8.86k, False: 8.27k]
  ------------------
 1648|  19.8k|      for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1648:22): [True: 11.0k, False: 8.86k]
  ------------------
 1649|  11.0k|        bnds = 16 * group + band;
 1650|  11.0k|        ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1651|  11.0k|            ptr_aac_dec_static_channel_info->rvlc_prev_sf[bnds] =
 1652|  11.0k|                ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1653|  11.0k|      }
 1654|  8.86k|    }
 1655|       |
 1656|  17.1k|    for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1656:21): [True: 8.86k, False: 8.27k]
  ------------------
 1657|  19.8k|      for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1657:22): [True: 11.0k, False: 8.86k]
  ------------------
 1658|  11.0k|        bnds = 16 * group + band;
 1659|  11.0k|        ptr_aac_dec_static_channel_info->rvlc_prev_cb[bnds] =
 1660|  11.0k|            ptr_aac_dec_channel_info->ptr_code_book[bnds];
 1661|  11.0k|      }
 1662|   530k|      for (; band < last_sfb_idx; band++) {
  ------------------
  |  Branch (1662:14): [True: 521k, False: 8.86k]
  ------------------
 1663|   521k|        bnds = 16 * group + band;
 1664|   521k|        ptr_aac_dec_static_channel_info->rvlc_prev_cb[bnds] = ZERO_HCB;
  ------------------
  |  |   33|   521k|#define ZERO_HCB 0
  ------------------
 1665|   521k|      }
 1666|  8.86k|    }
 1667|  64.7k|  } else {
 1668|  64.7k|    WORD32 band;
 1669|  64.7k|    WORD32 group;
 1670|       |
 1671|  64.7k|    if (((ptr_rvlc->conceal_min != CONCEAL_MIN_INIT) ||
  ------------------
  |  |   93|  64.7k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1671:10): [True: 32.6k, False: 32.1k]
  ------------------
 1672|  32.1k|         (ptr_rvlc->conceal_max != CONCEAL_MAX_INIT)) &&
  ------------------
  |  |   92|  32.1k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1672:10): [True: 10.8k, False: 21.2k]
  ------------------
 1673|  43.4k|        (ptr_rvlc->conceal_min <= ptr_rvlc->conceal_max) &&
  ------------------
  |  Branch (1673:9): [True: 16.1k, False: 27.3k]
  ------------------
 1674|  16.1k|        (ptr_aac_dec_static_channel_info->rvlc_prev_blk_type ==
  ------------------
  |  Branch (1674:9): [True: 18, False: 16.1k]
  ------------------
 1675|  16.1k|         current_block_type) &&
 1676|     18|        ptr_aac_dec_static_channel_info->rvlc_prev_sf_ok &&
  ------------------
  |  Branch (1676:9): [True: 0, False: 18]
  ------------------
 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|  64.7k|    if ((ptr_rvlc->conceal_min <= ptr_rvlc->conceal_max) &&
  ------------------
  |  Branch (1683:9): [True: 37.3k, False: 27.3k]
  ------------------
 1684|  37.3k|        ((ptr_rvlc->conceal_min != CONCEAL_MIN_INIT) ||
  ------------------
  |  |   93|  37.3k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1684:10): [True: 5.28k, False: 32.1k]
  ------------------
 1685|  32.1k|         (ptr_rvlc->conceal_max != CONCEAL_MAX_INIT)) &&
  ------------------
  |  |   92|  32.1k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1685:10): [True: 10.8k, False: 21.2k]
  ------------------
 1686|  16.1k|        !(ptr_aac_dec_static_channel_info->rvlc_prev_sf_ok &&
  ------------------
  |  Branch (1686:11): [True: 0, False: 16.1k]
  ------------------
 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|  16.1k|        conceal_status) {
  ------------------
  |  Branch (1690:9): [True: 16.1k, False: 0]
  ------------------
 1691|  16.1k|      ixheaacd_bi_dir_est_lower_scf_cur_frame(ptr_aac_dec_channel_info);
 1692|  16.1k|      conceal_status = 0;
 1693|  16.1k|    }
 1694|       |
 1695|  64.7k|    if ((ptr_rvlc->conceal_min <= ptr_rvlc->conceal_max) &&
  ------------------
  |  Branch (1695:9): [True: 37.3k, False: 27.3k]
  ------------------
 1696|  37.3k|        ((err_status_last_scf && err_status_first_scf) ||
  ------------------
  |  Branch (1696:11): [True: 7.48k, False: 29.9k]
  |  Branch (1696:34): [True: 7.45k, False: 30]
  ------------------
 1697|  29.9k|         (err_status_last_nrg && err_status_first_nrg) ||
  ------------------
  |  Branch (1697:11): [True: 7.13k, False: 22.8k]
  |  Branch (1697:34): [True: 3.18k, False: 3.94k]
  ------------------
 1698|  26.7k|         (err_status_last_is && err_status_first_is)) &&
  ------------------
  |  Branch (1698:11): [True: 5.13k, False: 21.6k]
  |  Branch (1698:33): [True: 3.48k, False: 1.64k]
  ------------------
 1699|  14.1k|        !(err_status_forbidden_cw_fwd || err_status_forbidden_cw_bwd ||
  ------------------
  |  Branch (1699:11): [True: 0, False: 14.1k]
  |  Branch (1699:42): [True: 0, False: 14.1k]
  ------------------
 1700|  14.1k|          err_status_length_escape) &&
  ------------------
  |  Branch (1700:11): [True: 35, False: 14.0k]
  ------------------
 1701|  14.0k|        conceal_status) {
  ------------------
  |  Branch (1701:9): [True: 5.16k, False: 8.93k]
  ------------------
 1702|  5.16k|      ixheaacd_statistical_estimation(ptr_aac_dec_channel_info);
 1703|  5.16k|      conceal_status = 0;
 1704|  5.16k|    }
 1705|       |
 1706|  64.7k|    if ((ptr_rvlc->conceal_min <= ptr_rvlc->conceal_max) &&
  ------------------
  |  Branch (1706:9): [True: 37.3k, False: 27.3k]
  ------------------
 1707|  37.3k|        ptr_aac_dec_static_channel_info->rvlc_prev_sf_ok &&
  ------------------
  |  Branch (1707:9): [True: 0, False: 37.3k]
  ------------------
 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|  64.7k|    if (conceal_status) {
  ------------------
  |  Branch (1717:9): [True: 43.4k, False: 21.2k]
  ------------------
 1718|  99.9k|      for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1718:23): [True: 56.5k, False: 43.4k]
  ------------------
 1719|   619k|        for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1719:24): [True: 563k, False: 56.5k]
  ------------------
 1720|   563k|          ptr_aac_dec_channel_info->ptr_scale_factor[16 * group + band] = 0;
 1721|   563k|        }
 1722|  56.5k|      }
 1723|  43.4k|      ptr_aac_dec_channel_info->rvlc_curr_sf_flag = 0;
 1724|  43.4k|    }
 1725|  64.7k|  }
 1726|  72.9k|}

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

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

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

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

ixheaacd_prepare_upsamp:
  256|  4.98k|                             WORD32 num_channels) {
  257|  4.98k|  WORD32 lr;
  258|  4.98k|  ia_sbr_qmf_filter_bank_struct *sbr_qmf_bank;
  259|       |
  260|  14.6k|  for (lr = 0; lr < num_channels; lr++) {
  ------------------
  |  Branch (260:16): [True: 9.69k, False: 4.98k]
  ------------------
  261|  9.69k|    ptr_header_data[lr]->pstr_freq_band_data->sub_band_start =
  262|  9.69k|        NO_ANALYSIS_CHANNELS;
  ------------------
  |  |   35|  9.69k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   34|  9.69k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   23|  9.69k|#define SBR_UPSAMPLE_FAC 2
  |  |  ------------------
  ------------------
  263|  9.69k|    ptr_header_data[lr]->pstr_freq_band_data->sub_band_end =
  264|  9.69k|        NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|  9.69k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  265|       |
  266|  9.69k|    sbr_qmf_bank = &pstr_sbr_channel[lr]->str_sbr_dec.str_synthesis_qmf_bank;
  267|  9.69k|    sbr_qmf_bank->lsb = NO_ANALYSIS_CHANNELS;
  ------------------
  |  |   35|  9.69k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   34|  9.69k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   23|  9.69k|#define SBR_UPSAMPLE_FAC 2
  |  |  ------------------
  ------------------
  268|  9.69k|    sbr_qmf_bank->usb = NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|  9.69k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  269|       |
  270|  9.69k|    sbr_qmf_bank = &pstr_sbr_channel[lr]->str_sbr_dec.str_codec_qmf_bank;
  271|  9.69k|    sbr_qmf_bank->lsb = 0;
  272|  9.69k|    sbr_qmf_bank->usb = NO_ANALYSIS_CHANNELS;
  ------------------
  |  |   35|  9.69k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   34|  9.69k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   23|  9.69k|#define SBR_UPSAMPLE_FAC 2
  |  |  ------------------
  ------------------
  273|  9.69k|    ptr_header_data[lr]->sync_state = UPSAMPLING;
  ------------------
  |  |   24|  9.69k|#define UPSAMPLING 1
  ------------------
  274|  9.69k|  }
  275|  4.98k|  return;
  276|  4.98k|}
ixheaacd_applysbr:
  319|   293k|    WORD32 frame_size, WORD32 heaac_mps_present, WORD32 ec_flag, FLAG first_frame) {
  320|   293k|  WORD32 k;
  321|   293k|  FLAG prev_ps_flag = 0;
  322|   293k|  FLAG ps_flag = 0;
  323|   293k|  FLAG stereo = 0;
  324|   293k|  FLAG low_pow_flag = 0;
  325|   293k|  FLAG header_flag = 1;
  326|   293k|  FLAG dual_mono = 0;
  327|   293k|  WORD32 err = 0;
  328|   293k|  WORD32 num_channels = *codec_num_channels;
  329|   293k|  FLAG prev_stereo;
  330|   293k|  WORD32 ele_channels = 0;
  331|   293k|  WORD32 num_elements = p_sbr_bit_stream->no_elements;
  332|   293k|  WORD32 usac_flag = self->aot_usac_flag;
  333|   293k|  WORD32 total_bits_left = 0;
  334|       |
  335|   293k|  ia_sbr_channel_struct *pstr_sbr_channel[2];
  336|   293k|  ia_sbr_header_data_struct *ptr_header_data[MAXNRSBRCHANNELS];
  337|       |
  338|   293k|  WORD32 initial_sync_state;
  339|       |
  340|   293k|  ia_sbr_header_data_struct *ptr_sbr_dflt_header =
  341|   293k|      (ia_sbr_header_data_struct *)(&self->str_sbr_dflt_header);
  342|       |
  343|   293k|  ia_sbr_frame_info_data_struct *ptr_frame_data[2];
  344|   293k|  self->num_delay_frames = 1;
  345|   293k|  self->ptr_mps_data = NULL;
  346|       |
  347|   293k|  if (!ec_flag || !usac_flag) {
  ------------------
  |  Branch (347:7): [True: 293k, False: 0]
  |  Branch (347:19): [True: 0, False: 0]
  ------------------
  348|   879k|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (348:17): [True: 586k, False: 293k]
  ------------------
  349|   586k|      ptr_frame_data[k] = (ia_sbr_frame_info_data_struct *)self->frame_buffer[k];
  350|       |
  351|   586k|      pstr_sbr_channel[k] = self->pstr_sbr_channel[k];
  352|       |
  353|   586k|      ptr_header_data[k] = self->pstr_sbr_header[k];
  354|       |
  355|   586k|      if (audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (355:11): [True: 84.9k, False: 501k]
  ------------------
  356|  84.9k|        ptr_frame_data[k]->eld_sbr_flag = eld_sbr_flag;
  357|  84.9k|        ptr_frame_data[k]->num_time_slots = ptr_header_data[0]->num_time_slots;
  358|  84.9k|      }
  359|       |
  360|   586k|      ptr_frame_data[k]->usac_independency_flag = self->usac_independency_flag;
  361|   586k|      ptr_frame_data[k]->mps_sbr_flag = (self->stereo_config_idx == 3) ? 1 : 0;
  ------------------
  |  Branch (361:41): [True: 112k, False: 474k]
  ------------------
  362|   586k|      ptr_frame_data[k]->stereo_config_idx = self->stereo_config_idx;
  363|   586k|      ptr_frame_data[k]->inter_tes_flag = self->inter_tes_flag;
  364|   586k|      ptr_frame_data[k]->sbr_mode = self->sbr_mode;
  365|       |
  366|   586k|      if (!usac_flag) {
  ------------------
  |  Branch (366:11): [True: 133k, False: 453k]
  ------------------
  367|   133k|        ptr_frame_data[k]->usac_independency_flag = 0;
  368|   133k|        ptr_frame_data[k]->mps_sbr_flag = 0;
  369|   133k|        ptr_frame_data[k]->stereo_config_idx = -1;
  370|   133k|        ptr_frame_data[k]->inter_tes_flag = 0;
  371|   133k|        ptr_frame_data[k]->sbr_mode = ORIG_SBR;
  372|   133k|      }
  373|   586k|    }
  374|       |
  375|   293k|    if (init_flag) {
  ------------------
  |  Branch (375:9): [True: 2.99k, False: 290k]
  ------------------
  376|  2.99k|      ptr_frame_data[1]->reset_flag = 1;
  377|  2.99k|      ptr_frame_data[0]->reset_flag = 1;
  378|  2.99k|    }
  379|       |
  380|   712k|    for (k = 0; k < *codec_num_channels; k++) {
  ------------------
  |  Branch (380:17): [True: 419k, False: 293k]
  ------------------
  381|   419k|      ptr_header_data[k]->usac_flag = self->aot_usac_flag;
  382|   419k|      ptr_header_data[k]->enh_sbr = self->enh_sbr;
  383|   419k|      ptr_header_data[k]->enh_sbr_ps =
  384|   419k|          ((self->enh_sbr_ps) | (ptr_header_data[k]->channel_mode == PS_STEREO));
  ------------------
  |  |   29|   419k|#define PS_STEREO 3
  ------------------
  385|       |
  386|   419k|      ptr_header_data[k]->usac_independency_flag = self->usac_independency_flag;
  387|   419k|      ptr_header_data[k]->hbe_flag = self->hbe_flag;
  388|   419k|      ptr_header_data[k]->pvc_flag = self->pvc_flag;
  389|       |
  390|   419k|      if (!usac_flag) {
  ------------------
  |  Branch (390:11): [True: 99.0k, False: 320k]
  ------------------
  391|  99.0k|        ptr_header_data[k]->usac_independency_flag = 0;
  392|  99.0k|        ptr_header_data[k]->hbe_flag = 0;
  393|  99.0k|        ptr_header_data[k]->pvc_flag = 0;
  394|  99.0k|      }
  395|   419k|      if (self->enh_sbr)
  ------------------
  |  Branch (395:11): [True: 419k, False: 0]
  ------------------
  396|   419k|      {
  397|   419k|        ptr_header_data[k]->esbr_hq = self->esbr_hq;
  398|   419k|      }
  399|       |
  400|   419k|      if (!usac_flag && (!(audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (400:11): [True: 99.0k, False: 320k]
  |  Branch (400:28): [True: 74.7k, False: 24.2k]
  ------------------
  401|  24.2k|          audio_object_type == AOT_ER_AAC_LD)) && self->enh_sbr) {
  ------------------
  |  Branch (401:11): [True: 0, False: 24.2k]
  |  Branch (401:51): [True: 24.2k, False: 0]
  ------------------
  402|  24.2k|        ptr_header_data[k]->hbe_flag = 1;
  403|  24.2k|      }
  404|   419k|    }
  405|       |
  406|   293k|    initial_sync_state = ptr_header_data[0]->sync_state;
  407|       |
  408|   293k|    low_pow_flag = !usac_flag;
  409|   293k|    self->pstr_sbr_tables->sbr_rand_ph = self->pstr_sbr_tables->env_calc_tables_ptr->sbr_rand_ph;
  410|       |
  411|   293k|    if (ps_enable) {
  ------------------
  |  Branch (411:9): [True: 66.2k, False: 226k]
  ------------------
  412|  66.2k|      if (num_channels == 1) {
  ------------------
  |  Branch (412:11): [True: 33.7k, False: 32.4k]
  ------------------
  413|  33.7k|        low_pow_flag = 0;
  414|  33.7k|      }
  415|  66.2k|    }
  416|       |
  417|   293k|    if (audio_object_type == AOT_ER_AAC_ELD || (ps_enable && heaac_mps_present)) {
  ------------------
  |  Branch (417:9): [True: 42.4k, False: 250k]
  |  Branch (417:49): [True: 23.7k, False: 226k]
  |  Branch (417:62): [True: 1.19k, False: 22.6k]
  ------------------
  418|  43.6k|      low_pow_flag = 0;
  419|  43.6k|    }
  420|       |
  421|   293k|    prev_stereo = (ptr_header_data[0]->channel_mode == SBR_STEREO);
  ------------------
  |  |   28|   293k|#define SBR_STEREO 2
  ------------------
  422|       |
  423|   293k|    if (ps_enable) prev_ps_flag = (ptr_header_data[0]->channel_mode == PS_STEREO);
  ------------------
  |  |   29|  66.2k|#define PS_STEREO 3
  ------------------
  |  Branch (423:9): [True: 66.2k, False: 226k]
  ------------------
  424|       |
  425|   293k|    ptr_header_data[0]->err_flag_prev = ptr_header_data[0]->err_flag;
  426|       |
  427|   293k|    if (p_sbr_bit_stream->no_elements == 0) {
  ------------------
  |  Branch (427:9): [True: 123, False: 292k]
  ------------------
  428|    123|      frame_status = 0;
  429|    123|      ptr_header_data[0]->sync_state = UPSAMPLING;
  ------------------
  |  |   24|    123|#define UPSAMPLING 1
  ------------------
  430|    123|      if (num_channels == 2) ptr_header_data[1]->sync_state = UPSAMPLING;
  ------------------
  |  |   24|     12|#define UPSAMPLING 1
  ------------------
  |  Branch (430:11): [True: 12, False: 111]
  ------------------
  431|    123|    }
  432|       |
  433|   293k|    if ((usac_flag)) {
  ------------------
  |  Branch (433:9): [True: 226k, False: 66.5k]
  ------------------
  434|   226k|      if ((p_sbr_bit_stream->no_elements) && (p_sbr_bit_stream->str_sbr_ele->size_payload > 0)) {
  ------------------
  |  Branch (434:11): [True: 226k, False: 0]
  |  Branch (434:46): [True: 224k, False: 1.78k]
  ------------------
  435|   224k|        num_elements = p_sbr_bit_stream->no_elements;
  436|   224k|      } else {
  437|  1.78k|        num_elements = 0;
  438|  1.78k|      }
  439|   226k|    }
  440|       |
  441|   583k|    for (k = 0; k < num_elements; k++) {
  ------------------
  |  Branch (441:17): [True: 291k, False: 292k]
  ------------------
  442|   291k|      struct ia_bit_buf_struct local_bit_buf = {0};
  443|   291k|      ia_sbr_element_stream_struct *ptr_bit_str_ele = &p_sbr_bit_stream->str_sbr_ele[k];
  444|   291k|      ele_channels = (p_sbr_bit_stream->str_sbr_ele[0].sbr_ele_id == SBR_ID_CPE) ? 2 : 1;
  ------------------
  |  Branch (444:22): [True: 97.9k, False: 193k]
  ------------------
  445|   291k|      if (!frame_status && ptr_header_data[k]->sync_state == SBR_ACTIVE && ec_flag) {
  ------------------
  |  |   25|   291k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (445:11): [True: 0, False: 291k]
  |  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|   291k|      switch (ptr_bit_str_ele->sbr_ele_id) {
  450|   183k|        case SBR_ID_SCE:
  ------------------
  |  Branch (450:9): [True: 183k, False: 108k]
  ------------------
  451|   193k|        case SBR_ID_CCE:
  ------------------
  |  Branch (451:9): [True: 10.0k, False: 281k]
  ------------------
  452|   193k|          if (num_channels == 2) {
  ------------------
  |  Branch (452:15): [True: 28.6k, False: 164k]
  ------------------
  453|  28.6k|            dual_mono = 1;
  454|  28.6k|          }
  455|   193k|          stereo = 0;
  456|   193k|          break;
  457|  97.9k|        case SBR_ID_CPE:
  ------------------
  |  Branch (457:9): [True: 97.9k, False: 193k]
  ------------------
  458|  97.9k|          stereo = 1;
  459|  97.9k|          ptr_header_data[1] = ptr_header_data[0];
  460|       |
  461|  97.9k|          memcpy(self->pstr_sbr_header[1], self->pstr_sbr_header[0],
  462|  97.9k|                 sizeof(ia_sbr_header_data_struct));
  463|  97.9k|          break;
  464|      0|        default:
  ------------------
  |  Branch (464:9): [True: 0, False: 291k]
  ------------------
  465|      0|          frame_status = 0;
  466|   291k|      }
  467|       |
  468|   291k|      if (frame_status) {
  ------------------
  |  Branch (468:11): [True: 291k, False: 0]
  ------------------
  469|   291k|        if (!usac_flag) {
  ------------------
  |  Branch (469:13): [True: 66.4k, False: 224k]
  ------------------
  470|  66.4k|          if (!(audio_object_type == AOT_ER_AAC_LD || audio_object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (470:17): [True: 0, False: 66.4k]
  |  Branch (470:55): [True: 42.4k, False: 23.9k]
  ------------------
  471|  23.9k|              && self->enh_sbr) {
  ------------------
  |  Branch (471:18): [True: 23.9k, False: 0]
  ------------------
  472|  23.9k|            WORD8 tmp[1024];
  473|  23.9k|            WORD32 tmp_payload;
  474|  23.9k|            memcpy(&tmp[0], ptr_bit_str_ele->ptr_sbr_data, ptr_bit_str_ele->size_payload);
  475|  23.9k|            memcpy(ptr_bit_str_ele->ptr_sbr_data, ptr_bit_str_ele->ptr_prev_sbr_data,
  476|  23.9k|                   ptr_bit_str_ele->prev_size_payload);
  477|  23.9k|            memcpy(ptr_bit_str_ele->ptr_prev_sbr_data, &tmp[0], ptr_bit_str_ele->size_payload);
  478|  23.9k|            tmp_payload = ptr_bit_str_ele->size_payload;
  479|  23.9k|            ptr_bit_str_ele->size_payload = ptr_bit_str_ele->prev_size_payload;
  480|  23.9k|            ptr_bit_str_ele->prev_size_payload = tmp_payload;
  481|  23.9k|          }
  482|  66.4k|          if (!ptr_bit_str_ele->size_payload) {
  ------------------
  |  Branch (482:15): [True: 1.32k, False: 65.1k]
  ------------------
  483|  1.32k|            continue;
  484|  1.32k|          }
  485|       |
  486|  65.1k|          ixheaacd_create_init_bit_buf(&local_bit_buf, (UWORD8 *)ptr_bit_str_ele->ptr_sbr_data,
  487|  65.1k|                                       ptr_bit_str_ele->size_payload);
  488|  65.1k|          it_bit_buff = &local_bit_buf;
  489|  65.1k|          it_bit_buff->xaac_jmp_buf = self->xaac_jmp_buf;
  490|  65.1k|          total_bits_left = it_bit_buff->cnt_bits;
  491|       |
  492|  65.1k|          if (audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (492:15): [True: 42.4k, False: 22.6k]
  ------------------
  493|  42.4k|            if (eld_sbr_flag != 1) {
  ------------------
  |  Branch (493:17): [True: 0, False: 42.4k]
  ------------------
  494|      0|              ixheaacd_read_bits_buf(&local_bit_buf, LEN_NIBBLE);
  ------------------
  |  |  230|      0|#define LEN_NIBBLE (4)
  ------------------
  495|      0|            }
  496|  42.4k|          } else {
  497|  22.6k|            ixheaacd_read_bits_buf(&local_bit_buf, LEN_NIBBLE);
  ------------------
  |  |  230|  22.6k|#define LEN_NIBBLE (4)
  ------------------
  498|  22.6k|          }
  499|  65.1k|        }
  500|   289k|        if (ptr_bit_str_ele->extension_type == SBR_EXTENSION_CRC) {
  ------------------
  |  |   27|   289k|#define SBR_EXTENSION_CRC 14
  ------------------
  |  Branch (500:13): [True: 14.0k, False: 275k]
  ------------------
  501|  14.0k|          WORD32 crc_bits = 0;
  502|  14.0k|          WORD32 crc_check_flag = 0;
  503|  14.0k|          crc_check_flag = 1;
  504|  14.0k|          crc_bits = (((ptr_bit_str_ele->size_payload - 1) << 3) + (4 - SBR_CYC_REDCY_CHK_BITS));
  ------------------
  |  |   33|  14.0k|#define SBR_CYC_REDCY_CHK_BITS 10
  ------------------
  505|       |
  506|  14.0k|          if (crc_bits < 0) {
  ------------------
  |  Branch (506:15): [True: 11, False: 14.0k]
  ------------------
  507|     11|            crc_check_flag = 0;
  508|     11|            frame_status = 0;
  509|     11|          }
  510|  14.0k|          if (crc_check_flag) frame_status = ixheaacd_sbr_crccheck(it_bit_buff, crc_bits);
  ------------------
  |  Branch (510:15): [True: 14.0k, False: 11]
  ------------------
  511|  14.0k|        }
  512|       |
  513|   289k|        if (!usac_flag) header_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  ------------------
  |  Branch (513:13): [True: 65.1k, False: 224k]
  ------------------
  514|       |
  515|   289k|        if (audio_object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (515:13): [True: 247k, False: 42.4k]
  ------------------
  516|   247k|          if (header_flag) {
  ------------------
  |  Branch (516:15): [True: 226k, False: 20.9k]
  ------------------
  517|   226k|            header_flag = ixheaacd_sbr_read_header_data(ptr_header_data[k], it_bit_buff, stereo,
  518|   226k|                                                        ptr_sbr_dflt_header);
  519|   226k|            if (usac_flag) {
  ------------------
  |  Branch (519:17): [True: 224k, False: 1.72k]
  ------------------
  520|   224k|              if ((self->ptr_pvc_data_str->prev_pvc_mode == 0) &&
  ------------------
  |  Branch (520:19): [True: 108k, False: 115k]
  ------------------
  521|   108k|                  (ptr_header_data[k]->pvc_mode != 0)) {
  ------------------
  |  Branch (521:19): [True: 3.25k, False: 105k]
  ------------------
  522|  3.25k|                self->ptr_pvc_data_str->prev_pvc_id = 0;
  523|  3.25k|              }
  524|   224k|              self->ptr_pvc_data_str->prev_pvc_mode = ptr_header_data[k]->pvc_mode;
  525|   224k|              if (ptr_header_data[k]->pvc_mode == 0) {
  ------------------
  |  Branch (525:19): [True: 107k, False: 117k]
  ------------------
  526|   107k|                ptr_frame_data[k]->sbr_mode = ORIG_SBR;
  527|   117k|              } else {
  528|   117k|                ptr_frame_data[k]->sbr_mode = PVC_SBR;
  529|   117k|              }
  530|   224k|            }
  531|   226k|            if (header_flag == SBR_RESET) {
  ------------------
  |  |   31|   226k|#define SBR_RESET 1
  ------------------
  |  Branch (531:17): [True: 40.7k, False: 185k]
  ------------------
  532|  40.7k|              err = ixheaacd_calc_frq_bnd_tbls(ptr_header_data[k],
  533|       |
  534|  40.7k|                                               self->pstr_common_tables);
  535|  40.7k|              if (!err) {
  ------------------
  |  Branch (535:19): [True: 40.4k, False: 267]
  ------------------
  536|  40.4k|                WORD32 lr;
  537|  40.4k|                WORD32 lr1 = ps_enable ? 2 : num_channels;
  ------------------
  |  Branch (537:30): [True: 828, False: 39.6k]
  ------------------
  538|  99.7k|                for (lr = 0; lr < lr1; lr++) {
  ------------------
  |  Branch (538:30): [True: 59.2k, False: 40.4k]
  ------------------
  539|  59.2k|                  if (ldmps_present != 1) ptr_frame_data[lr]->reset_flag = 1;
  ------------------
  |  Branch (539:23): [True: 59.2k, False: 0]
  ------------------
  540|  59.2k|                  if ((SBR_NOT_INITIALIZED == ptr_header_data[lr]->sync_state) && !usac_flag) {
  ------------------
  |  |   23|  59.2k|#define SBR_NOT_INITIALIZED 0
  ------------------
  |  Branch (540:23): [True: 26.8k, False: 32.3k]
  |  Branch (540:83): [True: 818, False: 26.0k]
  ------------------
  541|    818|                    ptr_frame_data[lr]->sbr_patching_mode = 1;
  542|    818|                    ptr_frame_data[lr]->over_sampling_flag = 0;
  543|    818|                    ptr_frame_data[lr]->pitch_in_bins = 0;
  544|    818|                    ptr_header_data[lr]->pre_proc_flag = 0;
  545|    818|                  }
  546|  59.2k|                  err |= ixheaacd_sbr_dec_reset(
  547|  59.2k|                      &(pstr_sbr_channel[lr]->str_sbr_dec), ptr_header_data[k], low_pow_flag,
  548|  59.2k|                      self->pstr_common_tables, ptr_frame_data[k]->pitch_in_bins,
  549|  59.2k|                      audio_object_type, sbr_scratch_struct->ptr_work_buf_core);
  550|  59.2k|                  if (err < 0) return err;
  ------------------
  |  Branch (550:23): [True: 8, False: 59.2k]
  ------------------
  551|  59.2k|                }
  552|  40.4k|              }
  553|       |
  554|  40.7k|              if (err == 0) {
  ------------------
  |  Branch (554:19): [True: 40.4k, False: 267]
  ------------------
  555|  40.4k|                ptr_header_data[k]->sync_state = SBR_ACTIVE;
  ------------------
  |  |   25|  40.4k|#define SBR_ACTIVE 2
  ------------------
  556|  40.4k|              }
  557|  40.7k|            }
  558|   226k|          }
  559|   247k|        } else {
  560|  42.4k|          if (header_flag) {
  ------------------
  |  Branch (560:15): [True: 11.5k, False: 30.9k]
  ------------------
  561|  11.5k|            header_flag = ixheaacd_sbr_read_header_data(ptr_header_data[k], it_bit_buff, stereo,
  562|  11.5k|                                                        ptr_sbr_dflt_header);
  563|  11.5k|            if (usac_flag) {
  ------------------
  |  Branch (563:17): [True: 0, False: 11.5k]
  ------------------
  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|  11.5k|            if (header_flag == SBR_RESET) {
  ------------------
  |  |   31|  11.5k|#define SBR_RESET 1
  ------------------
  |  Branch (576:17): [True: 9.75k, False: 1.75k]
  ------------------
  577|  9.75k|              err = ixheaacd_calc_frq_bnd_tbls(ptr_header_data[k],
  578|       |
  579|  9.75k|                                               self->pstr_common_tables);
  580|  9.75k|              if (err) {
  ------------------
  |  Branch (580:19): [True: 145, False: 9.61k]
  ------------------
  581|    145|                return err;
  582|    145|              }
  583|  9.75k|            }
  584|  11.5k|          }
  585|       |
  586|  42.3k|          {
  587|  42.3k|            WORD32 lr;
  588|  42.3k|            WORD32 lr1 = ps_enable ? 2 : num_channels;
  ------------------
  |  Branch (588:26): [True: 42.3k, False: 10]
  ------------------
  589|   126k|            for (lr = 0; lr < lr1; lr++) {
  ------------------
  |  Branch (589:26): [True: 84.6k, False: 42.3k]
  ------------------
  590|  84.6k|              if (ldmps_present != 1) ptr_frame_data[lr]->reset_flag = 1;
  ------------------
  |  Branch (590:19): [True: 74.8k, False: 9.73k]
  ------------------
  591|  84.6k|              if (ptr_header_data[k]->status) {
  ------------------
  |  Branch (591:19): [True: 25.2k, False: 59.3k]
  ------------------
  592|  25.2k|                err |= ixheaacd_sbr_dec_reset(
  593|  25.2k|                    &(pstr_sbr_channel[lr]->str_sbr_dec), ptr_header_data[k], low_pow_flag,
  594|  25.2k|                    self->pstr_common_tables, ptr_frame_data[k]->pitch_in_bins, audio_object_type,
  595|  25.2k|                    sbr_scratch_struct->ptr_work_buf_core);
  596|  25.2k|                if (err < 0) return err;
  ------------------
  |  Branch (596:21): [True: 14, False: 25.2k]
  ------------------
  597|  25.2k|              }
  598|  84.6k|            }
  599|  42.3k|            ptr_header_data[k]->status = 0;
  600|  42.3k|          }
  601|       |
  602|  42.3k|          if (err == 0) {
  ------------------
  |  Branch (602:15): [True: 42.2k, False: 10]
  ------------------
  603|  42.2k|            ptr_header_data[k]->sync_state = SBR_ACTIVE;
  ------------------
  |  |   25|  42.2k|#define SBR_ACTIVE 2
  ------------------
  604|  42.2k|          }
  605|  42.3k|        }
  606|   289k|      }
  607|       |
  608|   289k|      if (err || (ptr_header_data[k]->sync_state == SBR_NOT_INITIALIZED)) {
  ------------------
  |  |   23|   289k|#define SBR_NOT_INITIALIZED 0
  ------------------
  |  Branch (608:11): [True: 293, False: 289k]
  |  Branch (608:18): [True: 3.39k, False: 285k]
  ------------------
  609|  3.66k|        WORD32 lr1 = ps_enable ? 2 : num_channels;
  ------------------
  |  Branch (609:22): [True: 3.37k, False: 286]
  ------------------
  610|  3.66k|        ixheaacd_prepare_upsamp(ptr_header_data, pstr_sbr_channel, lr1);
  611|  3.66k|        if (err) return err;
  ------------------
  |  Branch (611:13): [True: 267, False: 3.39k]
  ------------------
  612|  3.66k|      }
  613|       |
  614|   289k|      if (frame_status && (ptr_header_data[k]->sync_state == SBR_ACTIVE)) {
  ------------------
  |  |   25|   275k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (614:11): [True: 275k, False: 14.0k]
  |  Branch (614:27): [True: 273k, False: 2.21k]
  ------------------
  615|   273k|        if (stereo) {
  ------------------
  |  Branch (615:13): [True: 94.9k, False: 178k]
  ------------------
  616|  94.9k|          frame_status = ixheaacd_sbr_read_cpe(ptr_header_data[0], ptr_frame_data, it_bit_buff,
  617|  94.9k|                                               self->pstr_sbr_tables, audio_object_type);
  618|  94.9k|          if (usac_flag && (frame_status == 0)) return -1;
  ------------------
  |  Branch (618:15): [True: 65.3k, False: 29.6k]
  |  Branch (618:28): [True: 42, False: 65.2k]
  ------------------
  619|  94.9k|          if (frame_status < 0) return frame_status;
  ------------------
  |  Branch (619:15): [True: 7, False: 94.9k]
  ------------------
  620|   178k|        } else {
  621|   178k|          if (ps_enable) {
  ------------------
  |  Branch (621:15): [True: 19.1k, False: 159k]
  ------------------
  622|  19.1k|            if (down_mix_flag) {
  ------------------
  |  Branch (622:17): [True: 0, False: 19.1k]
  ------------------
  623|      0|              self->pstr_ps_stereo_dec->force_mono = 1;
  624|  19.1k|            } else {
  625|  19.1k|              self->pstr_ps_stereo_dec->force_mono = 0;
  626|  19.1k|            }
  627|   159k|          } else {
  628|   159k|            self->pstr_ps_stereo_dec = 0;
  629|   159k|          }
  630|   178k|          if (ptr_frame_data[k]->sbr_mode == ORIG_SBR) {
  ------------------
  |  Branch (630:15): [True: 83.8k, False: 94.2k]
  ------------------
  631|  83.8k|            frame_status = ixheaacd_sbr_read_sce(
  632|  83.8k|                ptr_header_data[k], ptr_frame_data[k], self->pstr_ps_stereo_dec, it_bit_buff,
  633|  83.8k|                self->pstr_sbr_tables, audio_object_type, ec_flag);
  634|  83.8k|            if (usac_flag && (frame_status == 0)) return -1;
  ------------------
  |  Branch (634:17): [True: 64.6k, False: 19.2k]
  |  Branch (634:30): [True: 96, False: 64.5k]
  ------------------
  635|  83.7k|            if (frame_status < 0) return frame_status;
  ------------------
  |  Branch (635:17): [True: 5, False: 83.7k]
  ------------------
  636|  83.7k|            if (ec_flag && self->pstr_ps_stereo_dec != NULL) {
  ------------------
  |  Branch (636:17): [True: 0, False: 83.7k]
  |  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|  94.2k|          } else if (ptr_frame_data[k]->sbr_mode == PVC_SBR) {
  ------------------
  |  Branch (640:22): [True: 94.2k, False: 0]
  ------------------
  641|  94.2k|            frame_status = ixheaacd_sbr_read_pvc_sce(
  642|  94.2k|                ptr_frame_data[k], it_bit_buff, ptr_header_data[k]->hbe_flag,
  643|  94.2k|                self->ptr_pvc_data_str, self->pstr_sbr_tables, ptr_header_data[k]);
  644|  94.2k|            if (frame_status < 0) return frame_status;
  ------------------
  |  Branch (644:17): [True: 76, False: 94.2k]
  ------------------
  645|  94.2k|          }
  646|   178k|        }
  647|   272k|        ptr_header_data[k]->enh_sbr_ps =
  648|   272k|            ((self->enh_sbr_ps) | (ptr_header_data[0]->channel_mode == PS_STEREO));
  ------------------
  |  |   29|   272k|#define PS_STEREO 3
  ------------------
  649|   272k|        if ((audio_object_type != AOT_ER_AAC_ELD) && (audio_object_type != AOT_USAC)) {
  ------------------
  |  Branch (649:13): [True: 234k, False: 38.1k]
  |  Branch (649:54): [True: 10.8k, False: 223k]
  ------------------
  650|  10.8k|          WORD32 total_bits_read;
  651|  10.8k|          total_bits_read = ixheaacd_no_bits_read(it_bit_buff);
  ------------------
  |  |  128|  10.8k|  ((it_bit_buff)->size - (it_bit_buff)->cnt_bits)
  ------------------
  652|  10.8k|          if (total_bits_read > (ptr_bit_str_ele->size_payload << 3) ||
  ------------------
  |  Branch (652:15): [True: 0, False: 10.8k]
  ------------------
  653|  10.8k|              total_bits_read < ((ptr_bit_str_ele->size_payload << 3) - 8)) {
  ------------------
  |  Branch (653:15): [True: 8.55k, False: 2.33k]
  ------------------
  654|  8.55k|            frame_status = 0;
  655|  8.55k|          }
  656|  10.8k|          if (ec_flag) {
  ------------------
  |  Branch (656:15): [True: 0, False: 10.8k]
  ------------------
  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|  10.8k|        }
  664|   272k|      }
  665|   289k|      if ((ldmps_present == 1) && (it_bit_buff)) {
  ------------------
  |  Branch (665:11): [True: 4.82k, False: 284k]
  |  Branch (665:35): [True: 4.82k, False: 0]
  ------------------
  666|  4.82k|        WORD32 bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
  667|  4.82k|        self->ptr_mps_data = (WORD8 *)it_bit_buff->ptr_read_next;
  668|  4.82k|        self->left_mps_bits = (total_bits_left - bits_decoded);
  669|  4.82k|        self->mps_bits_pos = it_bit_buff->bit_pos;
  670|  4.82k|      }
  671|   289k|      if (ec_flag) {
  ------------------
  |  Branch (671:11): [True: 0, False: 289k]
  ------------------
  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|   289k|    }
  682|       |
  683|   292k|    if (!usac_flag) {
  ------------------
  |  Branch (683:9): [True: 65.8k, False: 226k]
  ------------------
  684|  65.8k|      if (!frame_status || (ptr_header_data[0]->sync_state != SBR_ACTIVE) ||
  ------------------
  |  |   25|  43.1k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (684:11): [True: 22.6k, False: 43.1k]
  |  Branch (684:28): [True: 3.53k, False: 39.6k]
  ------------------
  685|  39.6k|          ptr_header_data[0]->err_flag) {
  ------------------
  |  Branch (685:11): [True: 10.6k, False: 28.9k]
  ------------------
  686|  36.8k|        ptr_header_data[0]->err_flag = 1;
  687|  36.8k|        stereo = (num_channels == 2) ? 1 : 0;
  ------------------
  |  Branch (687:18): [True: 12.9k, False: 23.8k]
  ------------------
  688|  36.8k|        if (ptr_header_data[0]->channel_mode == 0) {
  ------------------
  |  Branch (688:13): [True: 2.26k, False: 34.6k]
  ------------------
  689|  2.26k|          ptr_header_data[0]->channel_mode = stereo ? SBR_STEREO : SBR_MONO;
  ------------------
  |  |   28|    604|#define SBR_STEREO 2
  ------------------
                        ptr_header_data[0]->channel_mode = stereo ? SBR_STEREO : SBR_MONO;
  ------------------
  |  |   27|  3.92k|#define SBR_MONO 1
  ------------------
  |  Branch (689:46): [True: 604, False: 1.65k]
  ------------------
  690|  2.26k|        }
  691|  36.8k|      }
  692|       |
  693|  65.8k|      if (!(stereo || dual_mono)) {
  ------------------
  |  Branch (693:13): [True: 32.0k, False: 33.8k]
  |  Branch (693:23): [True: 0, False: 33.8k]
  ------------------
  694|  33.8k|        ptr_frame_data[0]->coupling_mode = COUPLING_OFF;
  ------------------
  |  |   38|  33.8k|#define COUPLING_OFF 0
  ------------------
  695|  33.8k|        ptr_frame_data[1]->coupling_mode = COUPLING_OFF;
  ------------------
  |  |   38|  33.8k|#define COUPLING_OFF 0
  ------------------
  696|  33.8k|      }
  697|       |
  698|  65.8k|      if (ptr_header_data[0]->sync_state == SBR_NOT_INITIALIZED && (!ec_flag || init_flag)) {
  ------------------
  |  |   23|   131k|#define SBR_NOT_INITIALIZED 0
  ------------------
  |  Branch (698:11): [True: 1.32k, False: 64.5k]
  |  Branch (698:69): [True: 1.32k, False: 0]
  |  Branch (698:81): [True: 0, False: 0]
  ------------------
  699|  1.32k|        WORD32 lr1 = ps_enable ? 2 : num_channels;
  ------------------
  |  Branch (699:22): [True: 1.21k, False: 113]
  ------------------
  700|  1.32k|        ixheaacd_prepare_upsamp(ptr_header_data, pstr_sbr_channel, lr1);
  701|  1.32k|      }
  702|  65.8k|    }
  703|       |
  704|   292k|    if (ptr_header_data[0]->sync_state == SBR_ACTIVE) {
  ------------------
  |  |   25|   292k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (704:9): [True: 285k, False: 7.17k]
  ------------------
  705|   285k|      if (ptr_frame_data[0]->sbr_mode == PVC_SBR) {
  ------------------
  |  Branch (705:11): [True: 117k, False: 167k]
  ------------------
  706|   117k|        err = ixheaacd_dec_sbrdata_for_pvc(ptr_header_data[0], ptr_frame_data[0],
  707|   117k|                                           pstr_sbr_channel[0]->pstr_prev_frame_data,
  708|   117k|                                           audio_object_type);
  709|   117k|        if (err) return err;
  ------------------
  |  Branch (709:13): [True: 0, False: 117k]
  ------------------
  710|   167k|      } else if (ptr_frame_data[0]->sbr_mode == ORIG_SBR) {
  ------------------
  |  Branch (710:18): [True: 167k, False: 0]
  ------------------
  711|   167k|        err = ixheaacd_dec_sbrdata(
  712|   167k|            ptr_header_data[0], ptr_header_data[1], ptr_frame_data[0],
  713|   167k|            pstr_sbr_channel[0]->pstr_prev_frame_data,
  714|   167k|            (stereo || dual_mono) ? ptr_frame_data[1] : NULL,
  ------------------
  |  Branch (714:14): [True: 74.1k, False: 93.6k]
  |  Branch (714:24): [True: 3.55k, False: 90.0k]
  ------------------
  715|   167k|            (stereo || dual_mono) ? pstr_sbr_channel[1]->pstr_prev_frame_data : NULL,
  ------------------
  |  Branch (715:14): [True: 74.1k, False: 93.6k]
  |  Branch (715:24): [True: 3.55k, False: 90.0k]
  ------------------
  716|   167k|            self->pstr_common_tables, ldmps_present, audio_object_type, ec_flag);
  717|       |
  718|   167k|        if (err) return err;
  ------------------
  |  Branch (718:13): [True: 26, False: 167k]
  ------------------
  719|   167k|      }
  720|       |
  721|   285k|      if (ptr_header_data[0]->channel_mode == PS_STEREO &&
  ------------------
  |  |   29|   570k|#define PS_STEREO 3
  ------------------
  |  Branch (721:11): [True: 18.0k, False: 267k]
  ------------------
  722|  18.0k|          (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD)) {
  ------------------
  |  Branch (722:12): [True: 15.7k, False: 2.25k]
  |  Branch (722:51): [True: 15.7k, False: 0]
  ------------------
  723|  15.7k|        ixheaacd_decode_ps_data(self->pstr_ps_stereo_dec, frame_size);
  724|  15.7k|        ps_flag = 1;
  725|  15.7k|        self->ps_present = ps_flag;
  726|  15.7k|      }
  727|   285k|      if (ptr_header_data[0]->enh_sbr_ps && self->enh_sbr) {
  ------------------
  |  Branch (727:11): [True: 18.0k, False: 267k]
  |  Branch (727:45): [True: 18.0k, False: 0]
  ------------------
  728|  18.0k|        ps_flag = 1;
  729|  18.0k|        self->ps_present = ps_flag;
  730|  18.0k|      }
  731|   285k|      ptr_frame_data[0]->max_qmf_subband_aac =
  732|   285k|          ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
  733|   285k|      if (stereo) {
  ------------------
  |  Branch (733:11): [True: 97.1k, False: 188k]
  ------------------
  734|  97.1k|        ptr_frame_data[1]->max_qmf_subband_aac =
  735|  97.1k|            ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
  736|  97.1k|      }
  737|   285k|      if (ldmps_present == 1) {
  ------------------
  |  Branch (737:11): [True: 4.82k, False: 280k]
  ------------------
  738|  4.82k|        ptr_frame_data[0]->rate = 1;
  739|  4.82k|        if (stereo) {
  ------------------
  |  Branch (739:13): [True: 3.52k, False: 1.30k]
  ------------------
  740|  3.52k|          ptr_frame_data[1]->rate = 1;
  741|  3.52k|        }
  742|  4.82k|      }
  743|   285k|    }
  744|   292k|    if (audio_object_type == AOT_ER_AAC_ELD && ec_flag) {
  ------------------
  |  Branch (744:9): [True: 41.7k, False: 250k]
  |  Branch (744:48): [True: 0, False: 41.7k]
  ------------------
  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|   292k|    } else {
  749|   292k|      if (audio_object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (749:11): [True: 249k, False: 42.6k]
  ------------------
  750|   249k|        if ((initial_sync_state == SBR_NOT_INITIALIZED) && ptr_header_data[0]->err_flag) {
  ------------------
  |  |   23|   249k|#define SBR_NOT_INITIALIZED 0
  ------------------
  |  Branch (750:13): [True: 21.7k, False: 227k]
  |  Branch (750:60): [True: 16.4k, False: 5.21k]
  ------------------
  751|  16.4k|          ptr_header_data[0]->sync_state = SBR_NOT_INITIALIZED;
  ------------------
  |  |   23|  16.4k|#define SBR_NOT_INITIALIZED 0
  ------------------
  752|  16.4k|        }
  753|   249k|      } else {
  754|  42.6k|        ptr_header_data[0]->sync_state = SBR_ACTIVE;
  ------------------
  |  |   25|  42.6k|#define SBR_ACTIVE 2
  ------------------
  755|  42.6k|      }
  756|   292k|    }
  757|       |
  758|   292k|    if ((num_channels == 2) && !(stereo || dual_mono)) {
  ------------------
  |  Branch (758:9): [True: 125k, False: 166k]
  |  Branch (758:34): [True: 97.3k, False: 28.5k]
  |  Branch (758:44): [True: 28.5k, False: 0]
  ------------------
  759|      0|      ixheaacd_downmix_to_monosbr(&core_sample_buf[slot_element], ch_fac);
  760|      0|    }
  761|       |
  762|   292k|    if ((!prev_stereo && !prev_ps_flag) && (ps_flag)) {
  ------------------
  |  Branch (762:10): [True: 264k, False: 27.8k]
  |  Branch (762:26): [True: 246k, False: 18.5k]
  |  Branch (762:44): [True: 1.40k, False: 244k]
  ------------------
  763|  1.40k|      WORD32 copy_size;
  764|  1.40k|      if (down_samp_flag)
  ------------------
  |  Branch (764:11): [True: 325, False: 1.08k]
  ------------------
  765|    325|        copy_size = QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED;
  ------------------
  |  |   39|    325|#define QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED (QMF_FILTER_STATE_SYN_SIZE / 2)
  |  |  ------------------
  |  |  |  |   32|    325|#define QMF_FILTER_STATE_SYN_SIZE 1280
  |  |  ------------------
  ------------------
  766|  1.08k|      else
  767|  1.08k|        copy_size = QMF_FILTER_STATE_SYN_SIZE;
  ------------------
  |  |   32|  1.08k|#define QMF_FILTER_STATE_SYN_SIZE 1280
  ------------------
  768|       |
  769|  1.40k|      memcpy(pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
  770|  1.40k|             pstr_sbr_channel[0]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
  771|  1.40k|             copy_size * sizeof(WORD16));
  772|       |
  773|  1.40k|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale =
  774|  1.40k|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale;
  775|  1.40k|    }
  776|       |
  777|   292k|    if ((!prev_stereo && stereo && (num_channels == 2)) &&
  ------------------
  |  Branch (777:10): [True: 264k, False: 27.8k]
  |  Branch (777:26): [True: 70.4k, False: 194k]
  |  Branch (777:36): [True: 70.4k, False: 0]
  ------------------
  778|  70.4k|        (audio_object_type != AOT_ER_AAC_ELD)) {
  ------------------
  |  Branch (778:9): [True: 65.4k, False: 5.07k]
  ------------------
  779|  65.4k|      WORD32 copy_size;
  780|  65.4k|      if (down_samp_flag)
  ------------------
  |  Branch (780:11): [True: 19, False: 65.3k]
  ------------------
  781|     19|        copy_size = QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED;
  ------------------
  |  |   39|     19|#define QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED (QMF_FILTER_STATE_SYN_SIZE / 2)
  |  |  ------------------
  |  |  |  |   32|     19|#define QMF_FILTER_STATE_SYN_SIZE 1280
  |  |  ------------------
  ------------------
  782|  65.3k|      else
  783|  65.3k|        copy_size = QMF_FILTER_STATE_SYN_SIZE;
  ------------------
  |  |   32|  65.3k|#define QMF_FILTER_STATE_SYN_SIZE 1280
  ------------------
  784|       |
  785|  65.4k|      memcpy(pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
  786|  65.4k|             pstr_sbr_channel[0]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
  787|  65.4k|             copy_size * sizeof(WORD16));
  788|       |
  789|  65.4k|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale =
  790|  65.4k|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale;
  791|       |
  792|  65.4k|      memcpy(pstr_sbr_channel[1]->str_sbr_dec.str_codec_qmf_bank.anal_filter_states,
  793|  65.4k|             pstr_sbr_channel[0]->str_sbr_dec.str_codec_qmf_bank.anal_filter_states,
  794|  65.4k|             QMF_FILTER_STATE_ANA_SIZE * sizeof(WORD16));
  ------------------
  |  |   33|  65.4k|#define QMF_FILTER_STATE_ANA_SIZE 320
  ------------------
  795|       |
  796|  65.4k|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_lb_scale =
  797|  65.4k|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_lb_scale;
  798|       |
  799|  65.4k|      memcpy(pstr_sbr_channel[1]->str_sbr_dec.ptr_sbr_overlap_buf,
  800|  65.4k|             pstr_sbr_channel[0]->str_sbr_dec.ptr_sbr_overlap_buf,
  801|  65.4k|             MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32));
  ------------------
  |  |   70|  65.4k|#define MAX_OV_COLS 6
  ------------------
                           MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32));
  ------------------
  |  |   34|  65.4k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  802|       |
  803|  65.4k|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.ov_lb_scale =
  804|  65.4k|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.ov_lb_scale;
  805|  65.4k|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.ov_hb_scale =
  806|  65.4k|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.ov_hb_scale;
  807|  65.4k|    }
  808|   292k|    pstr_sbr_channel[0]->str_sbr_dec.time_sample_buf = self->time_sample_buf[0];
  809|   292k|    if (self->pstr_ps_stereo_dec != NULL &&
  ------------------
  |  Branch (809:9): [True: 132k, False: 160k]
  ------------------
  810|   132k|        (ps_enable || self->enh_sbr_ps) && self->enh_sbr) {
  ------------------
  |  Branch (810:10): [True: 65.5k, False: 66.5k]
  |  Branch (810:23): [True: 0, False: 66.5k]
  |  Branch (810:44): [True: 65.5k, False: 0]
  ------------------
  811|  65.5k|      self->pstr_ps_stereo_dec->pp_qmf_buf_real[0] =
  812|  65.5k|          pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_real;
  813|  65.5k|      self->pstr_ps_stereo_dec->pp_qmf_buf_imag[0] =
  814|  65.5k|          pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_imag;
  815|  65.5k|      self->pstr_ps_stereo_dec->pp_qmf_buf_real[1] =
  816|  65.5k|          pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_real;
  817|  65.5k|      self->pstr_ps_stereo_dec->pp_qmf_buf_imag[1] =
  818|  65.5k|          pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_imag;
  819|  65.5k|      self->pstr_ps_stereo_dec->time_sample_buf[0] = self->time_sample_buf[0];
  820|  65.5k|      self->pstr_ps_stereo_dec->time_sample_buf[1] = self->time_sample_buf[1];
  821|  65.5k|    }
  822|   292k|  } 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|   292k|  if (ec_flag) {
  ------------------
  |  Branch (863:7): [True: 0, False: 292k]
  ------------------
  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|   292k|  if (ec_flag && usac_flag && !first_frame && !self->sbr_parse_complete) {
  ------------------
  |  Branch (871:7): [True: 0, False: 292k]
  |  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|   292k|  if (!ec_flag || !first_frame || init_flag) {
  ------------------
  |  Branch (874:7): [True: 292k, False: 0]
  |  Branch (874:19): [True: 0, False: 0]
  |  Branch (874:35): [True: 0, False: 0]
  ------------------
  875|   291k|    if (pstr_drc_dec == NULL) {
  ------------------
  |  Branch (875:9): [True: 228k, False: 62.8k]
  ------------------
  876|   228k|      WORD32 err_code = 0;
  877|   228k|      err_code = ixheaacd_sbr_dec(
  878|   228k|          &pstr_sbr_channel[0]->str_sbr_dec, core_sample_buf + slot_element, ptr_header_data[0],
  879|   228k|          ptr_frame_data[0], pstr_sbr_channel[0]->pstr_prev_frame_data, self->pstr_ps_stereo_dec,
  880|   228k|          &pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank,
  881|   228k|          &pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact,
  882|   228k|          (ptr_header_data[0]->sync_state == SBR_ACTIVE), low_pow_flag,
  ------------------
  |  |   25|   228k|#define SBR_ACTIVE 2
  ------------------
  883|   228k|          sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables, self->pstr_common_tables,
  884|   228k|          ch_fac, self->ptr_pvc_data_str, 0, NULL, audio_object_type, ldmps_present, self,
  885|   228k|          heaac_mps_present, ec_flag);
  886|   228k|      if (err_code) return err_code;
  ------------------
  |  Branch (886:11): [True: 91, False: 228k]
  ------------------
  887|   228k|      if (self->enh_sbr)
  ------------------
  |  Branch (887:11): [True: 228k, False: 0]
  ------------------
  888|   228k|      {
  889|   228k|        if (!self->enh_sbr_ps) {
  ------------------
  |  Branch (889:13): [True: 228k, False: 0]
  ------------------
  890|   228k|          if ((ptr_header_data[0]->sync_state == SBR_ACTIVE) && !ptr_frame_data[0]->mps_sbr_flag
  ------------------
  |  |   25|   228k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (890:15): [True: 215k, False: 13.0k]
  |  Branch (890:65): [True: 163k, False: 52.2k]
  ------------------
  891|   163k|              && ch_fac != 2) {
  ------------------
  |  Branch (891:18): [True: 163k, False: 0]
  ------------------
  892|   163k|            ptr_header_data[0]->pstr_freq_band_data[0].qmf_sb_prev =
  893|   163k|                ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
  894|   163k|          }
  895|   228k|        } 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|   228k|      }
  902|   228k|    } else {
  903|  62.8k|      WORD32 err_code = 0;
  904|  62.8k|      err_code = ixheaacd_sbr_dec(
  905|  62.8k|          &pstr_sbr_channel[0]->str_sbr_dec, core_sample_buf + slot_element, ptr_header_data[0],
  906|  62.8k|          ptr_frame_data[0], pstr_sbr_channel[0]->pstr_prev_frame_data, self->pstr_ps_stereo_dec,
  907|  62.8k|          &pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank,
  908|  62.8k|          &pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact,
  909|  62.8k|          (ptr_header_data[0]->sync_state == SBR_ACTIVE), low_pow_flag,
  ------------------
  |  |   25|  62.8k|#define SBR_ACTIVE 2
  ------------------
  910|  62.8k|          sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables, self->pstr_common_tables,
  911|  62.8k|          ch_fac, self->ptr_pvc_data_str, pstr_drc_dec->drc_on,
  912|  62.8k|          pstr_drc_dec->str_drc_channel_data[0].drc_factors_sbr, audio_object_type, ldmps_present,
  913|  62.8k|          self, heaac_mps_present, ec_flag);
  914|  62.8k|      if (err_code) return err_code;
  ------------------
  |  Branch (914:11): [True: 55, False: 62.8k]
  ------------------
  915|  62.8k|      if (self->enh_sbr)
  ------------------
  |  Branch (915:11): [True: 62.8k, False: 0]
  ------------------
  916|  62.8k|      {
  917|  62.8k|        if (!self->enh_sbr_ps) {
  ------------------
  |  Branch (917:13): [True: 62.8k, False: 0]
  ------------------
  918|  62.8k|          if ((ptr_header_data[0]->sync_state == SBR_ACTIVE) && !ptr_frame_data[0]->mps_sbr_flag
  ------------------
  |  |   25|  62.8k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (918:15): [True: 58.1k, False: 4.67k]
  |  Branch (918:65): [True: 58.1k, False: 0]
  ------------------
  919|  58.1k|              && num_channels != 2) {
  ------------------
  |  Branch (919:18): [True: 27.8k, False: 30.3k]
  ------------------
  920|  27.8k|            ptr_header_data[0]->pstr_freq_band_data[0].qmf_sb_prev =
  921|  27.8k|                ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
  922|  27.8k|          }
  923|  62.8k|        } else {
  924|      0|          if (ptr_header_data[0]->sync_state == SBR_ACTIVE) {
  ------------------
  |  |   25|      0|#define SBR_ACTIVE 2
  ------------------
  |  Branch (924:15): [True: 0, False: 0]
  ------------------
  925|      0|            ptr_header_data[0]->pstr_freq_band_data[0].qmf_sb_prev =
  926|      0|                ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
  927|      0|          }
  928|      0|        }
  929|  62.8k|      }
  930|  62.8k|    }
  931|       |
  932|   291k|    if (!down_mix_flag && (stereo || dual_mono) && (num_channels == 2)) {
  ------------------
  |  Branch (932:9): [True: 291k, False: 0]
  |  Branch (932:28): [True: 97.3k, False: 194k]
  |  Branch (932:38): [True: 28.5k, False: 165k]
  |  Branch (932:52): [True: 125k, False: 0]
  ------------------
  933|   125k|      pstr_sbr_channel[1]->str_sbr_dec.time_sample_buf = self->time_sample_buf[1];
  934|       |
  935|   125k|      if (ele_channels == 1 && usac_flag) {
  ------------------
  |  Branch (935:11): [True: 28.5k, False: 97.3k]
  |  Branch (935:32): [True: 28.5k, False: 0]
  ------------------
  936|  28.5k|        WORD32 err_code =
  937|  28.5k|            ixheaacd_esbr_dec(&pstr_sbr_channel[1]->str_sbr_dec, ptr_header_data[1],
  938|  28.5k|                              ptr_frame_data[1], (ptr_header_data[1]->sync_state == SBR_ACTIVE),
  ------------------
  |  |   25|  28.5k|#define SBR_ACTIVE 2
  ------------------
  939|  28.5k|                              low_pow_flag, self->pstr_sbr_tables, ch_fac);
  940|  28.5k|        if (err_code) return err_code;
  ------------------
  |  Branch (940:13): [True: 0, False: 28.5k]
  ------------------
  941|  97.3k|      } else {
  942|  97.3k|        if (pstr_drc_dec == NULL) {
  ------------------
  |  Branch (942:13): [True: 66.8k, False: 30.4k]
  ------------------
  943|  66.8k|          WORD32 err_code = ixheaacd_sbr_dec(
  944|  66.8k|              &pstr_sbr_channel[1]->str_sbr_dec, core_sample_buf + slot_element + 1,
  945|  66.8k|              ptr_header_data[1], ptr_frame_data[1], pstr_sbr_channel[1]->pstr_prev_frame_data,
  946|  66.8k|              NULL, NULL, NULL, (ptr_header_data[1]->sync_state == SBR_ACTIVE), low_pow_flag,
  ------------------
  |  |   25|  66.8k|#define SBR_ACTIVE 2
  ------------------
  947|  66.8k|              sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables,
  948|  66.8k|              self->pstr_common_tables, ch_fac, self->ptr_pvc_data_str, 0, NULL,
  949|  66.8k|              audio_object_type, ldmps_present, self, heaac_mps_present, ec_flag);
  950|  66.8k|          if (err_code) return err_code;
  ------------------
  |  Branch (950:15): [True: 1, False: 66.8k]
  ------------------
  951|  66.8k|          if (self->enh_sbr)
  ------------------
  |  Branch (951:15): [True: 66.8k, False: 0]
  ------------------
  952|  66.8k|          {
  953|  66.8k|            if (!self->enh_sbr_ps) {
  ------------------
  |  Branch (953:17): [True: 66.8k, False: 0]
  ------------------
  954|  66.8k|              if ((ptr_header_data[1]->sync_state == SBR_ACTIVE) &&
  ------------------
  |  |   25|  66.8k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (954:19): [True: 63.0k, False: 3.80k]
  ------------------
  955|  63.0k|                  !ptr_frame_data[0]->mps_sbr_flag) {
  ------------------
  |  Branch (955:19): [True: 10.8k, False: 52.2k]
  ------------------
  956|  10.8k|                ptr_header_data[1]->pstr_freq_band_data[0].qmf_sb_prev =
  957|  10.8k|                    ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
  958|  10.8k|              }
  959|  66.8k|            } 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|  66.8k|          }
  966|  66.8k|        } else {
  967|  30.4k|          WORD32 err_code = ixheaacd_sbr_dec(
  968|  30.4k|              &pstr_sbr_channel[1]->str_sbr_dec, core_sample_buf + slot_element + 1,
  969|  30.4k|              ptr_header_data[1], ptr_frame_data[1], pstr_sbr_channel[1]->pstr_prev_frame_data,
  970|  30.4k|              NULL, NULL, NULL, (ptr_header_data[1]->sync_state == SBR_ACTIVE), low_pow_flag,
  ------------------
  |  |   25|  30.4k|#define SBR_ACTIVE 2
  ------------------
  971|  30.4k|              sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables,
  972|  30.4k|              self->pstr_common_tables, ch_fac, self->ptr_pvc_data_str, pstr_drc_dec->drc_on,
  973|  30.4k|              pstr_drc_dec->str_drc_channel_data[1].drc_factors_sbr, audio_object_type,
  974|  30.4k|              ldmps_present, self, heaac_mps_present, ec_flag);
  975|  30.4k|          if (err_code) return err_code;
  ------------------
  |  Branch (975:15): [True: 1, False: 30.4k]
  ------------------
  976|  30.4k|          if (self->enh_sbr)
  ------------------
  |  Branch (976:15): [True: 30.4k, False: 0]
  ------------------
  977|  30.4k|          {
  978|  30.4k|            if (!self->enh_sbr_ps) {
  ------------------
  |  Branch (978:17): [True: 30.4k, False: 0]
  ------------------
  979|  30.4k|              if ((ptr_header_data[1]->sync_state == SBR_ACTIVE) &&
  ------------------
  |  |   25|  30.4k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (979:19): [True: 30.3k, False: 97]
  ------------------
  980|  30.3k|                  !ptr_frame_data[0]->mps_sbr_flag) {
  ------------------
  |  Branch (980:19): [True: 30.3k, False: 0]
  ------------------
  981|  30.3k|                ptr_header_data[1]->pstr_freq_band_data[0].qmf_sb_prev =
  982|  30.3k|                    ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
  983|  30.3k|              }
  984|  30.4k|            } else {
  985|      0|              if (ptr_header_data[1]->sync_state == SBR_ACTIVE) {
  ------------------
  |  |   25|      0|#define SBR_ACTIVE 2
  ------------------
  |  Branch (985:19): [True: 0, False: 0]
  ------------------
  986|      0|                ptr_header_data[1]->pstr_freq_band_data[0].qmf_sb_prev =
  987|      0|                    ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
  988|      0|              }
  989|      0|            }
  990|  30.4k|          }
  991|  30.4k|        }
  992|  97.3k|      }
  993|       |
  994|   165k|    } else {
  995|   165k|      if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD)
  ------------------
  |  Branch (995:11): [True: 155k, False: 9.89k]
  |  Branch (995:50): [True: 155k, False: 0]
  ------------------
  996|       |
  997|   155k|      {
  998|   155k|        if (sub_d((WORD16)ptr_header_data[0]->channel_mode, PS_STEREO) == 0) {
  ------------------
  |  |   24|   155k|#define sub_d(a, b) ((a) - (b))
  ------------------
  |  Branch (998:13): [True: 16.6k, False: 138k]
  ------------------
  999|  16.6k|          num_channels = 2;
 1000|  16.6k|        }
 1001|   155k|        if (ptr_header_data[0]->enh_sbr_ps && self->enh_sbr) {
  ------------------
  |  Branch (1001:13): [True: 16.7k, False: 138k]
  |  Branch (1001:47): [True: 16.7k, False: 0]
  ------------------
 1002|  16.7k|          num_channels = 2;
 1003|  16.7k|        }
 1004|   155k|      }
 1005|   165k|    }
 1006|   291k|    *codec_num_channels = num_channels;
 1007|   291k|    self->sbr_mode = ptr_frame_data[0]->sbr_mode;
 1008|       |
 1009|   291k|    if ((audio_object_type == AOT_ER_AAC_ELD) || (audio_object_type == AOT_ER_AAC_LD) ||
  ------------------
  |  Branch (1009:9): [True: 41.7k, False: 249k]
  |  Branch (1009:50): [True: 0, False: 249k]
  ------------------
 1010|   249k|        !self->enh_sbr) {
  ------------------
  |  Branch (1010:9): [True: 0, False: 249k]
  ------------------
 1011|  41.7k|      if (pstr_drc_dec != NULL) {
  ------------------
  |  Branch (1011:11): [True: 39.4k, False: 2.28k]
  ------------------
 1012|  39.4k|        WORD32 i, j;
 1013|   109k|        for (i = 0; i < *codec_num_channels; i++) {
  ------------------
  |  Branch (1013:21): [True: 69.7k, False: 39.4k]
  ------------------
 1014|  2.30M|          for (j = 0; j < 32; j++) {
  ------------------
  |  Branch (1014:23): [True: 2.23M, False: 69.7k]
  ------------------
 1015|  2.23M|            memcpy(pstr_drc_dec->str_drc_channel_data[i].drc_factors_sbr[j],
 1016|  2.23M|                   pstr_drc_dec->str_drc_channel_data[i].drc_factors_sbr[j + 32],
 1017|  2.23M|                   64 * sizeof(WORD32));
 1018|  2.23M|          }
 1019|  69.7k|        }
 1020|  39.4k|      }
 1021|  41.7k|    }
 1022|   291k|    if (ec_flag) {
  ------------------
  |  Branch (1022:9): [True: 0, False: 291k]
  ------------------
 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|   291k|  }
 1027|       |
 1028|   292k|  return SBRDEC_OK;
  ------------------
  |  |   33|   292k|#define SBRDEC_OK 0
  ------------------
 1029|   292k|}
ixheaacd_sbrdecoder.c:ixheaacd_sbr_dec_reset:
  109|  84.4k|                                     WORD32 *ptr_work_buf_core) {
  110|  84.4k|  WORD32 old_lsb, new_lsb;
  111|  84.4k|  WORD32 l;
  112|  84.4k|  WORD32 err = 0;
  113|  84.4k|  WORD32 num_time_slots = ptr_sbr_dec->str_codec_qmf_bank.num_time_slots;
  114|  84.4k|  WORD32 upsample_ratio_idx = ptr_header_data->sbr_ratio_idx;
  115|  84.4k|  WORD32 op_delay = 6 + SBR_HF_ADJ_OFFSET;
  ------------------
  |  |   99|  84.4k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  116|  84.4k|  WORD32 hbe_flag = ptr_header_data->hbe_flag;
  117|  84.4k|  WORD32 usac_flag = ptr_header_data->usac_flag;
  118|       |
  119|  84.4k|  if (ptr_header_data->is_usf_4) {
  ------------------
  |  Branch (119:7): [True: 5.61k, False: 78.8k]
  ------------------
  120|  5.61k|    op_delay = op_delay + 6;
  121|  5.61k|  }
  122|       |
  123|  84.4k|  ixheaacd_reset_sbrenvelope_calc(&ptr_sbr_dec->str_sbr_calc_env);
  124|       |
  125|  84.4k|  new_lsb = ptr_header_data->pstr_freq_band_data->sub_band_start;
  126|  84.4k|  ptr_sbr_dec->str_synthesis_qmf_bank.lsb = new_lsb;
  127|  84.4k|  ptr_sbr_dec->str_synthesis_qmf_bank.usb =
  128|  84.4k|      ptr_header_data->pstr_freq_band_data->sub_band_end;
  129|       |
  130|  84.4k|  old_lsb = ptr_sbr_dec->str_synthesis_qmf_bank.lsb;
  131|  84.4k|  ptr_sbr_dec->str_codec_qmf_bank.lsb = 0;
  132|  84.4k|  ptr_sbr_dec->str_codec_qmf_bank.usb = old_lsb;
  133|       |
  134|  84.4k|  {
  135|  84.4k|    WORD32 *plpc_filt_states_real =
  136|  84.4k|        &ptr_sbr_dec->str_hf_generator.lpc_filt_states_real[0][old_lsb];
  137|  84.4k|    WORD32 *plpc_filt_states_real_1 =
  138|  84.4k|        &ptr_sbr_dec->str_hf_generator.lpc_filt_states_real[1][old_lsb];
  139|       |
  140|  84.4k|    WORD32 *plpc_filt_states_imag =
  141|  84.4k|        &ptr_sbr_dec->str_hf_generator.lpc_filt_states_imag[0][old_lsb];
  142|  84.4k|    WORD32 *plpc_filt_states_imag_1 =
  143|  84.4k|        &ptr_sbr_dec->str_hf_generator.lpc_filt_states_imag[1][old_lsb];
  144|       |
  145|  84.4k|    for (l = new_lsb - old_lsb - 1; l >= 0; l--) {
  ------------------
  |  Branch (145:37): [True: 0, False: 84.4k]
  ------------------
  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|  84.4k|  }
  153|  84.4k|  if (1) {
  ------------------
  |  Branch (153:7): [True: 84.4k, Folded]
  ------------------
  154|  84.4k|    WORD32 start_band;
  155|  84.4k|    WORD32 stop_band;
  156|  84.4k|    WORD32 start_slot = SBR_HF_ADJ_OFFSET;
  ------------------
  |  |   99|  84.4k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  157|  84.4k|    WORD32 k;
  158|       |
  159|  84.4k|    start_band = ptr_header_data->pstr_freq_band_data->qmf_sb_prev;
  160|  84.4k|    stop_band = ptr_header_data->pstr_freq_band_data->sub_band_start;
  161|  84.4k|    if (usac_flag && !hbe_flag) {
  ------------------
  |  Branch (161:9): [True: 57.5k, False: 26.8k]
  |  Branch (161:22): [True: 27.9k, False: 29.6k]
  ------------------
  162|  83.8k|      for (l = 0; l < SBR_HF_ADJ_OFFSET; l++) {
  ------------------
  |  |   99|  83.8k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  |  Branch (162:19): [True: 55.8k, False: 27.9k]
  ------------------
  163|   132k|        for (k = start_band; k < stop_band; k++) {
  ------------------
  |  Branch (163:30): [True: 76.4k, False: 55.8k]
  ------------------
  164|  76.4k|          ptr_sbr_dec->qmf_buf_real[l][k] = 0.0;
  165|  76.4k|          ptr_sbr_dec->qmf_buf_imag[l][k] = 0.0;
  166|  76.4k|        }
  167|  55.8k|      }
  168|   196k|      for (l = start_slot; l < op_delay; l++) {
  ------------------
  |  Branch (168:28): [True: 168k, False: 27.9k]
  ------------------
  169|   397k|        for (k = start_band; k < stop_band; k++) {
  ------------------
  |  Branch (169:30): [True: 229k, False: 168k]
  ------------------
  170|   229k|          ptr_sbr_dec->qmf_buf_real[l][k] = 0.0;
  171|   229k|          ptr_sbr_dec->qmf_buf_imag[l][k] = 0.0;
  172|   229k|        }
  173|   168k|      }
  174|  27.9k|    }
  175|  84.4k|    if (ptr_sbr_dec->p_hbe_txposer != NULL && (usac_flag || hbe_flag)) {
  ------------------
  |  Branch (175:9): [True: 84.4k, False: 0]
  |  Branch (175:48): [True: 57.5k, False: 26.8k]
  |  Branch (175:61): [True: 1.67k, False: 25.2k]
  ------------------
  176|  59.2k|      WORD32 k, i;
  177|  59.2k|      WORD32 dft_hbe_flag = ptr_header_data->esbr_hq;
  178|  59.2k|      if (dft_hbe_flag == 1) {
  ------------------
  |  Branch (178:11): [True: 0, False: 59.2k]
  ------------------
  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|  59.2k|      } else {
  184|  59.2k|        err = ixheaacd_qmf_hbe_data_reinit(
  185|  59.2k|            ptr_sbr_dec->p_hbe_txposer,
  186|  59.2k|            ptr_header_data->pstr_freq_band_data->freq_band_table,
  187|  59.2k|            ptr_header_data->pstr_freq_band_data->num_sf_bands,
  188|  59.2k|            ptr_header_data->is_usf_4);
  189|  59.2k|      }
  190|  59.2k|      if (err) return err;
  ------------------
  |  Branch (190:11): [True: 0, False: 59.2k]
  ------------------
  191|       |
  192|   177k|      for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (192:19): [True: 118k, False: 59.2k]
  ------------------
  193|   118k|        if (!((upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) && (k == 0))) {
  ------------------
  |  |   28|   118k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (193:15): [True: 11.2k, False: 107k]
  |  Branch (193:63): [True: 5.61k, False: 5.61k]
  ------------------
  194|   112k|          WORD32 xpos_delay = num_time_slots * k;
  195|   112k|          if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
  ------------------
  |  |   28|   112k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (195:15): [True: 5.61k, False: 107k]
  ------------------
  196|  5.61k|            xpos_delay = num_time_slots * k - 32;
  197|  5.61k|          }
  198|       |
  199|  1.01M|          for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (199:23): [True: 902k, False: 112k]
  ------------------
  200|   902k|            memmove(ptr_sbr_dec->ph_vocod_qmf_real[i],
  201|   902k|                    ptr_sbr_dec->ph_vocod_qmf_real[num_time_slots + i],
  202|   902k|                    64 * sizeof(FLOAT32));
  203|   902k|            memmove(ptr_sbr_dec->ph_vocod_qmf_imag[i],
  204|   902k|                    ptr_sbr_dec->ph_vocod_qmf_imag[num_time_slots + i],
  205|   902k|                    64 * sizeof(FLOAT32));
  206|   902k|          }
  207|   112k|          if (dft_hbe_flag == 1) {
  ------------------
  |  Branch (207:15): [True: 0, False: 112k]
  ------------------
  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|   112k|          } else {
  218|   112k|            err = ixheaacd_qmf_hbe_apply(
  219|   112k|                ptr_sbr_dec->p_hbe_txposer,
  220|   112k|                ptr_sbr_dec->qmf_buf_real + op_delay + xpos_delay,
  221|   112k|                ptr_sbr_dec->qmf_buf_imag + op_delay + xpos_delay, num_time_slots,
  222|   112k|                ptr_sbr_dec->ph_vocod_qmf_real + op_delay,
  223|   112k|                ptr_sbr_dec->ph_vocod_qmf_imag + op_delay, pitch_in_bins,
  224|   112k|                ptr_header_data);
  225|   112k|          if (err) return err;
  ------------------
  |  Branch (225:15): [True: 0, False: 112k]
  ------------------
  226|   112k|          }
  227|       |
  228|   112k|          if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
  ------------------
  |  |   28|   112k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (228:15): [True: 5.61k, False: 107k]
  ------------------
  229|  5.61k|            ixheaacd_hbe_repl_spec(&ptr_sbr_dec->p_hbe_txposer->x_over_qmf[0],
  230|  5.61k|                                   ptr_sbr_dec->ph_vocod_qmf_real + op_delay,
  231|  5.61k|                                   ptr_sbr_dec->ph_vocod_qmf_imag + op_delay,
  232|  5.61k|                                   num_time_slots,
  233|  5.61k|                                   ptr_sbr_dec->p_hbe_txposer->max_stretch);
  234|  5.61k|          }
  235|   112k|        }
  236|   118k|      }
  237|  59.2k|    }
  238|  84.4k|  }
  239|       |
  240|  84.4k|  if (!usac_flag) {
  ------------------
  |  Branch (240:7): [True: 26.8k, False: 57.5k]
  ------------------
  241|  26.8k|    err |= ixheaacd_reset_hf_generator(&ptr_sbr_dec->str_hf_generator,
  242|  26.8k|                                       ptr_header_data, audio_object_type);
  243|       |
  244|  26.8k|    ixheaacd_derive_lim_band_tbl(
  245|  26.8k|        ptr_header_data,
  246|  26.8k|        ptr_sbr_dec->str_hf_generator.pstr_settings->str_patch_param,
  247|  26.8k|        ptr_sbr_dec->str_hf_generator.pstr_settings->num_patches,
  248|  26.8k|        pstr_common_tables);
  249|  26.8k|  }
  250|       |
  251|  84.4k|  return err;
  252|  84.4k|}

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

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

ixheaacd_lpc_coeff_wt_apply:
   60|   342k|VOID ixheaacd_lpc_coeff_wt_apply(FLOAT32 *a, FLOAT32 *ap) {
   61|   342k|  FLOAT32 f;
   62|   342k|  WORD32 i;
   63|   342k|  ap[0] = a[0];
   64|   342k|  f = 0.92f;
   65|  5.82M|  for (i = 1; i <= 16; i++) {
  ------------------
  |  Branch (65:15): [True: 5.48M, False: 342k]
  ------------------
   66|  5.48M|    ap[i] = f * a[i];
   67|  5.48M|    f *= 0.92f;
   68|  5.48M|  }
   69|   342k|  return;
   70|   342k|}
ixheaacd_float2fix:
   72|   273k|WORD8 ixheaacd_float2fix(FLOAT32 *x, WORD32 *int_x, WORD32 length) {
   73|   273k|  WORD32 k, itemp;
   74|   273k|  FLOAT32 ftemp = 0.0;
   75|   273k|  WORD8 shiftp;
   76|  54.5M|  for (k = 0; k < length; k++) {
  ------------------
  |  Branch (76:15): [True: 54.2M, False: 273k]
  ------------------
   77|  54.2M|    if (ABS(x[k]) > ftemp) ftemp = ABS(x[k]);
  ------------------
  |  |   58|  54.2M|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (58:17): [True: 20.5M, False: 33.7M]
  |  |  ------------------
  ------------------
                  if (ABS(x[k]) > ftemp) ftemp = ABS(x[k]);
  ------------------
  |  |   58|   987k|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (58:17): [True: 526k, False: 461k]
  |  |  ------------------
  ------------------
  |  Branch (77:9): [True: 987k, False: 53.2M]
  ------------------
   78|  54.2M|  }
   79|       |
   80|   273k|  itemp = (WORD32)(ftemp);
   81|   273k|  shiftp = ixheaac_norm32(itemp);
   82|       |
   83|  54.5M|  for (k = 0; k < length; k++) {
  ------------------
  |  Branch (83:15): [True: 54.2M, False: 273k]
  ------------------
   84|  54.2M|    int_x[k] = (WORD32)(x[k] * (FLOAT32)((WORD64)1 << shiftp));
   85|  54.2M|  }
   86|       |
   87|   273k|  return (shiftp);
   88|   273k|}
ixheaacd_fix2float:
   91|   273k|                        WORD8 *shiftp, WORD32 *preshift) {
   92|   273k|  WORD32 k;
   93|   273k|  FLOAT32 qfac;
   94|   273k|  if ((*shiftp - *preshift) > 0) {
  ------------------
  |  Branch (94:7): [True: 272k, False: 913]
  ------------------
   95|   272k|    qfac = 1.0f / (FLOAT32)((WORD64)1 << (*shiftp - *preshift));
   96|  83.9M|    for (k = 0; k < length; k++) {
  ------------------
  |  Branch (96:17): [True: 83.6M, False: 272k]
  ------------------
   97|  83.6M|      xn1[k] = (FLOAT32)((FLOAT32)int_xn1[k] * qfac);
   98|  83.6M|    }
   99|   272k|  } else {
  100|   139k|    for (k = 0; k < length; k++) {
  ------------------
  |  Branch (100:17): [True: 138k, False: 913]
  ------------------
  101|   138k|      xn1[k] = (FLOAT32)((FLOAT32)int_xn1[k] *
  102|   138k|                         (FLOAT32)((WORD64)1 << (*preshift - *shiftp)));
  103|   138k|    }
  104|    913|  }
  105|   273k|}
ixheaacd_tcx_mdct:
  173|   125k|                         ia_usac_lpd_decoder_handle st) {
  174|   125k|  WORD32 i, mode;
  175|   125k|  WORD32 *ptr_tcx_quant;
  176|   125k|  FLOAT32 tmp, gain_tcx = 0.0f, noise_level, energy, temp;
  177|   125k|  FLOAT32 *ptr_a, i_ap[ORDER + 1];
  178|   125k|  const FLOAT32 *sine_window_prev, *sine_window;
  179|   125k|  WORD32 fac_length_prev;
  180|   125k|  FLOAT32 alfd_gains[LEN_SUPERFRAME / (4 * 8)] = {0};
  181|   125k|  FLOAT32 x[LEN_SUPERFRAME], buf[ORDER + LEN_SUPERFRAME];
  182|   125k|  WORD32 int_x[LEN_SUPERFRAME + (2 * FAC_LENGTH)];
  183|   125k|  WORD32 int_xn1[LEN_SUPERFRAME + (2 * FAC_LENGTH)];
  184|   125k|  FLOAT32 gain1[LEN_SUPERFRAME], gain2[LEN_SUPERFRAME];
  185|   125k|  FLOAT32 xn_buf[LEN_SUPERFRAME + (2 * FAC_LENGTH)];
  186|   125k|  FLOAT32 *xn;
  187|   125k|  FLOAT32 xn1[2 * FAC_LENGTH], facwindow[2 * FAC_LENGTH];
  188|   125k|  WORD32 TTT;
  189|   125k|  WORD8 shiftp = 0;
  190|   125k|  WORD32 preshift = 0;
  191|   125k|  WORD32 loop_count = 0;
  192|   125k|  FLOAT32 *exc = &usac_data->exc_buf[usac_data->len_subfrm * frame_index +
  193|   125k|                                     MAX_PITCH + INTER_LP_FIL_ORDER + 1];
  ------------------
  |  |   55|   125k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|   125k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   125k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|   125k|   (6 *           \
  |  |   57|   125k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|   125k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   125k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   125k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   125k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   125k|#define TMIN 34
  |  |  ------------------
  ------------------
                                                   MAX_PITCH + INTER_LP_FIL_ORDER + 1];
  ------------------
  |  |   51|   125k|#define INTER_LP_FIL_ORDER 16
  ------------------
  194|   125k|  FLOAT32 *synth =
  195|   125k|      &usac_data->synth_buf[usac_data->len_subfrm * frame_index + MAX_PITCH +
  ------------------
  |  |   55|   125k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|   125k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   125k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|   125k|   (6 *           \
  |  |   57|   125k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|   125k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   125k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   125k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   125k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   125k|#define TMIN 34
  |  |  ------------------
  ------------------
  196|   125k|                            (((NUM_FRAMES * usac_data->num_subfrm) / 2) - 1) *
  ------------------
  |  |   27|   125k|#define NUM_FRAMES 4
  ------------------
  197|   125k|                                LEN_SUBFR];
  ------------------
  |  |  118|   125k|#define LEN_SUBFR 64
  ------------------
  198|       |
  199|   125k|  WORD32 *ptr_scratch = &usac_data->scratch_buffer[0];
  200|       |
  201|   125k|  WORD32 fac_length = (usac_data->len_subfrm) / 2;
  202|   125k|  WORD32 err = 0;
  203|       |
  204|   125k|  mode = lg / (usac_data->len_subfrm);
  205|   125k|  if (mode > 2) mode = 3;
  ------------------
  |  Branch (205:7): [True: 546, False: 124k]
  ------------------
  206|       |
  207|   125k|  if (st->mode_prev == -2)
  ------------------
  |  Branch (207:7): [True: 4.75k, False: 120k]
  ------------------
  208|  4.75k|    fac_length_prev = (usac_data->ccfl) / 16;
  209|       |
  210|   120k|  else
  211|   120k|    fac_length_prev = fac_length;
  212|       |
  213|   125k|  if (fac_length == 96)
  ------------------
  |  Branch (213:7): [True: 39.0k, False: 86.1k]
  ------------------
  214|  39.0k|    sine_window = ixheaacd_sine_window192;
  215|  86.1k|  else
  216|  86.1k|    sine_window = ixheaacd__sine_window256;
  217|       |
  218|   125k|  if (fac_length_prev == 48)
  ------------------
  |  Branch (218:7): [True: 694, False: 124k]
  ------------------
  219|    694|    sine_window_prev = ixheaacd_sine_window96;
  220|       |
  221|   124k|  else if (fac_length_prev == 64)
  ------------------
  |  Branch (221:12): [True: 4.05k, False: 120k]
  ------------------
  222|  4.05k|    sine_window_prev = ixheaacd_sine_window128;
  223|       |
  224|   120k|  else if (fac_length_prev == 96)
  ------------------
  |  Branch (224:12): [True: 38.3k, False: 82.0k]
  ------------------
  225|  38.3k|    sine_window_prev = ixheaacd_sine_window192;
  226|       |
  227|  82.0k|  else
  228|  82.0k|    sine_window_prev = ixheaacd__sine_window256;
  229|       |
  230|   125k|  xn = xn_buf + fac_length;
  231|       |
  232|   125k|  if (st->mode_prev != 0) {
  ------------------
  |  Branch (232:7): [True: 54.8k, False: 70.2k]
  ------------------
  233|  54.8k|    if (st->mode_prev > 0) {
  ------------------
  |  Branch (233:9): [True: 42.8k, False: 12.0k]
  ------------------
  234|  9.94M|      for (i = 0; i < (2 * fac_length_prev); i++) {
  ------------------
  |  Branch (234:19): [True: 9.89M, False: 42.8k]
  ------------------
  235|  9.89M|        st->exc_prev[i + fac_length - fac_length_prev + 1] *=
  236|  9.89M|            sine_window_prev[(2 * fac_length_prev) - 1 - i];
  237|  9.89M|      }
  238|  42.8k|    }
  239|   347k|    for (i = 0; i < fac_length - fac_length_prev; i++) {
  ------------------
  |  Branch (239:17): [True: 293k, False: 54.8k]
  ------------------
  240|   293k|      st->exc_prev[i + fac_length + fac_length_prev + 1] = 0.0f;
  241|   293k|    }
  242|  54.8k|  }
  243|   125k|  if (usac_data->frame_ok == 1) {
  ------------------
  |  Branch (243:7): [True: 125k, False: 0]
  ------------------
  244|   125k|    noise_level = 0.0625f * (8.0f - ((FLOAT32)pstr_td_frame_data->noise_factor[frame_index]));
  245|       |
  246|   125k|  ptr_tcx_quant = pstr_td_frame_data->x_tcx_invquant;
  247|   258k|  for (i = 0; i < frame_index; i++)
  ------------------
  |  Branch (247:15): [True: 133k, False: 125k]
  ------------------
  248|   133k|    ptr_tcx_quant += pstr_td_frame_data->tcx_lg[i];
  249|       |
  250|  36.8M|  for (i = 0; i < lg; i++) x[i] = (FLOAT32)ptr_tcx_quant[i];
  ------------------
  |  Branch (250:15): [True: 36.6M, False: 125k]
  ------------------
  251|       |
  252|   125k|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (252:9): [True: 0, False: 125k]
  ------------------
  253|      0|      st->last_tcx_pitch = ixheaacd_calc_max_pitch(x, (lg >> 5));
  254|      0|    }
  255|       |
  256|  3.98M|  for (i = lg / 6; i < lg; i += 8) {
  ------------------
  |  Branch (256:20): [True: 3.85M, False: 125k]
  ------------------
  257|  3.85M|    WORD32 k, max_k = min(lg, i + 8);
  ------------------
  |  |   75|  3.85M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 86.1k, False: 3.76M]
  |  |  ------------------
  ------------------
  258|  3.85M|    FLOAT32 tmp = 0.0f;
  259|  34.4M|    for (k = i; k < max_k; k++) tmp += ptr_tcx_quant[k] * ptr_tcx_quant[k];
  ------------------
  |  Branch (259:17): [True: 30.6M, False: 3.85M]
  ------------------
  260|       |
  261|  3.85M|    if (tmp == 0.0f) {
  ------------------
  |  Branch (261:9): [True: 1.75M, False: 2.10M]
  ------------------
  262|  15.6M|      for (k = i; k < max_k; k++)
  ------------------
  |  Branch (262:19): [True: 13.8M, False: 1.75M]
  ------------------
  263|  13.8M|        x[k] = noise_level *
  264|  13.8M|               ixheaacd_randomsign(
  265|  13.8M|                   &(usac_data->seed_value[usac_data->present_chan]));
  266|  1.75M|    }
  267|  3.85M|  }
  268|       |
  269|   125k|  ixheaacd_low_fq_deemphasis(x, lg, alfd_gains);
  270|       |
  271|   125k|  ixheaacd_lpc_coeff_wt_apply(lp_flt_coff_a + (ORDER + 1), i_ap);
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
  272|   125k|  ixheaacd_lpc_to_td(i_ap, ORDER, gain1, usac_data->len_subfrm / 4);
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
  273|       |
  274|   125k|  ixheaacd_lpc_coeff_wt_apply(lp_flt_coff_a + (2 * (ORDER + 1)), i_ap);
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
  275|   125k|  ixheaacd_lpc_to_td(i_ap, ORDER, gain2, usac_data->len_subfrm / 4);
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
  276|       |
  277|   125k|  energy = 0.01f;
  278|  36.8M|  for (i = 0; i < lg; i++) energy += x[i] * x[i];
  ------------------
  |  Branch (278:15): [True: 36.6M, False: 125k]
  ------------------
  279|       |
  280|   125k|  temp = (FLOAT32)sqrt(energy) / lg;
  281|       |
  282|   125k|  gain_tcx =
  283|   125k|      (FLOAT32)pow(
  284|   125k|          10.0f,
  285|   125k|          ((FLOAT32)pstr_td_frame_data->global_gain[frame_index]) / 28.0f) /
  286|   125k|      (temp * 2.0f);
  287|   125k|  }
  288|   125k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (288:7): [True: 0, False: 125k]
  ------------------
  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|   125k|  if (usac_data->frame_ok == 1) {
  ------------------
  |  Branch (295:7): [True: 125k, False: 0]
  ------------------
  296|   125k|  ixheaacd_noise_shaping(x, lg, (usac_data->len_subfrm) / 4, gain1, gain2);
  297|   125k|  shiftp = ixheaacd_float2fix(x, int_x, lg);
  298|   125k|  }
  299|   125k|  if (usac_data->ec_flag == 1) {
  ------------------
  |  Branch (299:7): [True: 0, False: 125k]
  ------------------
  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|   125k|  } else {
  310|   125k|    if (lg & (lg - 1)) {
  ------------------
  |  Branch (310:9): [True: 39.0k, False: 86.1k]
  ------------------
  311|  39.0k|      if ((lg != 48) && (lg != 96) && (lg != 192) && (lg != 384) && (lg != 768)) {
  ------------------
  |  Branch (311:11): [True: 39.0k, False: 0]
  |  Branch (311:25): [True: 39.0k, False: 0]
  |  Branch (311:39): [True: 13.4k, False: 25.5k]
  |  Branch (311:54): [True: 174, False: 13.3k]
  |  Branch (311:69): [True: 0, False: 174]
  ------------------
  312|      0|        return -1;
  313|      0|      }
  314|  39.0k|    }
  315|   125k|  }
  316|       |
  317|   125k|  ixheaacd_acelp_mdct_main(usac_data, int_x, int_xn1, (2 * fac_length), lg - (2 * fac_length),
  318|   125k|                           &preshift);
  319|       |
  320|   125k|  ixheaacd_fix2float(int_xn1, xn_buf, (lg + (2 * fac_length)), &shiftp,
  321|   125k|                     &preshift);
  322|       |
  323|   125k|  ixheaacd_vec_cnst_mul((2.0f / lg), xn_buf, xn_buf, lg + (2 * fac_length));
  324|       |
  325|   125k|  st->fac_gain =
  326|   125k|      gain_tcx * 0.5f * (FLOAT32)sqrt(((FLOAT32)fac_length) / (FLOAT32)lg);
  327|       |
  328|  3.81M|  for (i = 0; i < fac_length / 4; i++)
  ------------------
  |  Branch (328:15): [True: 3.69M, False: 125k]
  ------------------
  329|  3.69M|    st->fac_fd_data[i] = alfd_gains[i * lg / (8 * fac_length)];
  330|       |
  331|   125k|  if (st->mode_prev == 0) {
  ------------------
  |  Branch (331:7): [True: 70.2k, False: 54.8k]
  ------------------
  332|  8.41M|    for (i = 0; i < fac_length_prev; i++) {
  ------------------
  |  Branch (332:17): [True: 8.34M, False: 70.2k]
  ------------------
  333|  8.34M|      facwindow[i] =
  334|  8.34M|          sine_window_prev[i] * sine_window_prev[(2 * fac_length_prev) - 1 - i];
  335|  8.34M|      facwindow[fac_length_prev + i] =
  336|  8.34M|          1.0f - (sine_window_prev[fac_length_prev + i] *
  337|  8.34M|                  sine_window_prev[fac_length_prev + i]);
  338|  8.34M|    }
  339|       |
  340|  4.24M|    for (i = 0; i < fac_length / 2; i++) {
  ------------------
  |  Branch (340:17): [True: 4.17M, False: 70.2k]
  ------------------
  341|  4.17M|      x[i] = st->fac_gain *
  342|  4.17M|             (FLOAT32)pstr_td_frame_data->fac[frame_index * FAC_LENGTH + 2 * i];
  ------------------
  |  |   33|  4.17M|#define FAC_LENGTH 128
  ------------------
  343|  4.17M|      x[fac_length / 2 + i] =
  344|  4.17M|          st->fac_gain *
  345|  4.17M|          (FLOAT32)pstr_td_frame_data
  346|  4.17M|              ->fac[frame_index * FAC_LENGTH + fac_length - 2 * i - 1];
  ------------------
  |  |   33|  4.17M|#define FAC_LENGTH 128
  ------------------
  347|  4.17M|    }
  348|       |
  349|  1.11M|    for (i = 0; i < fac_length / 8; i++) {
  ------------------
  |  Branch (349:17): [True: 1.04M, False: 70.2k]
  ------------------
  350|  1.04M|      x[i] *= st->fac_fd_data[2 * i];
  351|  1.04M|      x[fac_length - i - 1] *= st->fac_fd_data[2 * i + 1];
  352|  1.04M|    }
  353|       |
  354|  70.2k|    preshift = 0;
  355|  70.2k|    shiftp = ixheaacd_float2fix(x, int_x, fac_length);
  356|       |
  357|  70.2k|    if (usac_data->ec_flag == 0) {
  ------------------
  |  Branch (357:9): [True: 70.2k, False: 0]
  ------------------
  358|  70.2k|      if (fac_length & (fac_length - 1)) {
  ------------------
  |  Branch (358:11): [True: 20.3k, False: 49.9k]
  ------------------
  359|  20.3k|        if ((fac_length != 48) && (fac_length != 96) && (fac_length != 192) &&
  ------------------
  |  Branch (359:13): [True: 20.3k, False: 0]
  |  Branch (359:35): [True: 0, False: 20.3k]
  |  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.3k|      }
  364|  70.2k|    }
  365|       |
  366|  70.2k|    ixheaacd_acelp_mdct(int_x, int_xn1, &preshift, fac_length, ptr_scratch);
  367|       |
  368|  70.2k|    ixheaacd_fix2float(int_xn1, xn1, fac_length, &shiftp, &preshift);
  369|       |
  370|  70.2k|    ixheaacd_vec_cnst_mul((2.0f / (FLOAT32)fac_length), xn1, xn1, fac_length);
  371|       |
  372|  70.2k|    memset(xn1 + fac_length, 0, fac_length * sizeof(FLOAT32));
  373|       |
  374|  70.2k|    ixheaacd_lpc_coeff_wt_apply(lp_flt_coff_a + (ORDER + 1), i_ap);
  ------------------
  |  |   30|  70.2k|#define ORDER 16
  ------------------
  375|  70.2k|    ixheaacd_synthesis_tool_float(i_ap, xn1, xn1, 2 * fac_length,
  376|  70.2k|                                  xn1 + fac_length);
  377|       |
  378|  8.41M|    for (i = 0; i < fac_length; i++) {
  ------------------
  |  Branch (378:17): [True: 8.34M, False: 70.2k]
  ------------------
  379|  8.34M|      temp = st->exc_prev[1 + fac_length + i] * facwindow[fac_length + i] +
  380|  8.34M|             st->exc_prev[fac_length - i] * facwindow[fac_length - 1 - i];
  381|  8.34M|      xn1[i] += temp;
  382|  8.34M|    }
  383|  70.2k|  }
  384|       |
  385|  66.3M|  for (i = 0; i < lg + (2 * fac_length); i++) xn_buf[i] *= gain_tcx;
  ------------------
  |  Branch (385:15): [True: 66.2M, False: 125k]
  ------------------
  386|       |
  387|  29.0M|  for (i = 0; i < (2 * fac_length_prev); i++)
  ------------------
  |  Branch (387:15): [True: 28.9M, False: 125k]
  ------------------
  388|  28.9M|    xn_buf[i + fac_length - fac_length_prev] *= sine_window_prev[i];
  389|       |
  390|   418k|  for (i = 0; i < fac_length - fac_length_prev; i++) xn_buf[i] = 0.0f;
  ------------------
  |  Branch (390:15): [True: 293k, False: 125k]
  ------------------
  391|       |
  392|   125k|  if (st->mode_prev != 0) {
  ------------------
  |  Branch (392:7): [True: 54.8k, False: 70.2k]
  ------------------
  393|  12.3M|    for (i = fac_length - fac_length_prev; i < (fac_length + fac_length_prev);
  ------------------
  |  Branch (393:44): [True: 12.2M, False: 54.8k]
  ------------------
  394|  12.2M|         i++)
  395|  12.2M|      xn_buf[i] += st->exc_prev[1 + i];
  396|  70.2k|  } else {
  397|  16.7M|    for (i = fac_length - fac_length_prev; i < (fac_length + fac_length_prev);
  ------------------
  |  Branch (397:44): [True: 16.6M, False: 70.2k]
  ------------------
  398|  16.6M|         i++)
  399|  16.6M|      xn_buf[i + fac_length] += xn1[i];
  400|  70.2k|  }
  401|       |
  402|   125k|  ixheaacd_mem_cpy(xn_buf + lg - 1, st->exc_prev, 1 + (2 * fac_length));
  403|       |
  404|  29.6M|  for (i = 0; i < (2 * fac_length); i++) {
  ------------------
  |  Branch (404:15): [True: 29.5M, False: 125k]
  ------------------
  405|  29.5M|    xn_buf[i + lg] *= sine_window[(2 * fac_length) - 1 - i];
  406|  29.5M|  }
  407|       |
  408|   125k|  if (st->mode_prev != 0) {
  ------------------
  |  Branch (408:7): [True: 54.8k, False: 70.2k]
  ------------------
  409|  54.8k|    ixheaacd_mem_cpy(xn_buf + fac_length - fac_length_prev,
  410|  54.8k|                     synth - fac_length_prev, fac_length_prev);
  411|       |
  412|  7.35M|    for (i = 0; i < ORDER + fac_length; i++)
  ------------------
  |  |   30|  7.35M|#define ORDER 16
  ------------------
  |  Branch (412:17): [True: 7.30M, False: 54.8k]
  ------------------
  413|  7.30M|      buf[i] = synth[i - ORDER - fac_length] -
  ------------------
  |  |   30|  7.30M|#define ORDER 16
  ------------------
  414|  7.30M|               (PREEMPH_FILT_FAC * synth[i - ORDER - fac_length - 1]);
  ------------------
  |  |   61|  7.30M|#define PREEMPH_FILT_FAC 0.68f
  ------------------
                             (PREEMPH_FILT_FAC * synth[i - ORDER - fac_length - 1]);
  ------------------
  |  |   30|  7.30M|#define ORDER 16
  ------------------
  415|       |
  416|  54.8k|    ptr_a = st->lp_flt_coeff_a_prev;
  417|  54.8k|    TTT = fac_length % LEN_SUBFR;
  ------------------
  |  |  118|  54.8k|#define LEN_SUBFR 64
  ------------------
  418|  54.8k|    if (TTT != 0)
  ------------------
  |  Branch (418:9): [True: 18.6k, False: 36.1k]
  ------------------
  419|  18.6k|      ixheaacd_residual_tool_float(ptr_a, &buf[ORDER], &exc[-fac_length], TTT,
  ------------------
  |  |   30|  18.6k|#define ORDER 16
  ------------------
  420|  18.6k|                                   1);
  421|       |
  422|  54.8k|    loop_count = (fac_length - TTT) / LEN_SUBFR;
  ------------------
  |  |  118|  54.8k|#define LEN_SUBFR 64
  ------------------
  423|  54.8k|    ixheaacd_residual_tool_float(ptr_a, &buf[ORDER + TTT],
  ------------------
  |  |   30|  54.8k|#define ORDER 16
  ------------------
  424|  54.8k|                                 &exc[TTT - fac_length], LEN_SUBFR, loop_count);
  ------------------
  |  |  118|  54.8k|#define LEN_SUBFR 64
  ------------------
  425|  54.8k|  }
  426|       |
  427|   125k|  ixheaacd_mem_cpy(xn, synth, lg);
  428|       |
  429|   125k|  ixheaacd_mem_cpy(synth - ORDER - 1, xn - ORDER - 1, ORDER + 1);
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
                ixheaacd_mem_cpy(synth - ORDER - 1, xn - ORDER - 1, ORDER + 1);
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
                ixheaacd_mem_cpy(synth - ORDER - 1, xn - ORDER - 1, ORDER + 1);
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
  430|   125k|  tmp = xn[-ORDER - 1];
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
  431|   125k|  ixheaacd_preemphsis_tool_float(xn - ORDER, PREEMPH_FILT_FAC, ORDER + lg, tmp);
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
                ixheaacd_preemphsis_tool_float(xn - ORDER, PREEMPH_FILT_FAC, ORDER + lg, tmp);
  ------------------
  |  |   61|   125k|#define PREEMPH_FILT_FAC 0.68f
  ------------------
                ixheaacd_preemphsis_tool_float(xn - ORDER, PREEMPH_FILT_FAC, ORDER + lg, tmp);
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
  432|       |
  433|   125k|  ptr_a = lp_flt_coff_a + (2 * (ORDER + 1));
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
  434|       |
  435|   125k|  ixheaacd_residual_tool_float(ptr_a, xn, exc, lg, 1);
  436|       |
  437|   125k|  ixheaacd_mem_cpy(ptr_a, st->lp_flt_coeff_a_prev, ORDER + 1);
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
  438|   125k|  ixheaacd_mem_cpy(ptr_a, st->lp_flt_coeff_a_prev + ORDER + 1, ORDER + 1);
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
                ixheaacd_mem_cpy(ptr_a, st->lp_flt_coeff_a_prev + ORDER + 1, ORDER + 1);
  ------------------
  |  |   30|   125k|#define ORDER 16
  ------------------
  439|       |
  440|   125k|  return err;
  441|   125k|}
ixheaacd_randomsign:
  443|  13.8M|FLOAT32 ixheaacd_randomsign(UWORD32 *seed) {
  444|  13.8M|  FLOAT32 sign = 0.0f;
  445|  13.8M|  *seed = (UWORD32)(((UWORD64)(*seed) * (UWORD64)69069) + 5);
  446|       |
  447|  13.8M|  if (((*seed) & 0x10000) > 0)
  ------------------
  |  Branch (447:7): [True: 7.02M, False: 6.83M]
  ------------------
  448|  7.02M|    sign = -1.f;
  449|  6.83M|  else
  450|  6.83M|    sign = +1.f;
  451|       |
  452|  13.8M|  return sign;
  453|  13.8M|}
ixheaacd_tcx_fwd_alcnx.c:ixheaacd_low_fq_deemphasis:
  108|   125k|                                       FLOAT32 gains[]) {
  109|   125k|  WORD32 i, j, k, i_max;
  110|   125k|  FLOAT32 max, factor, rm;
  111|       |
  112|   125k|  k = 8;
  113|   125k|  i_max = lg / 4;
  114|       |
  115|   125k|  max = 0.01f;
  116|  1.27M|  for (i = 0; i < i_max; i += k) {
  ------------------
  |  Branch (116:15): [True: 1.14M, False: 125k]
  ------------------
  117|  1.14M|    rm = 0.01f;
  118|  10.3M|    for (j = i; j < i + k; j++) rm += x[j] * x[j];
  ------------------
  |  Branch (118:17): [True: 9.17M, False: 1.14M]
  ------------------
  119|       |
  120|  1.14M|    if (rm > max) max = rm;
  ------------------
  |  Branch (120:9): [True: 265k, False: 880k]
  ------------------
  121|  1.14M|  }
  122|       |
  123|   125k|  factor = 0.1f;
  124|  1.27M|  for (i = 0; i < i_max; i += k) {
  ------------------
  |  Branch (124:15): [True: 1.14M, False: 125k]
  ------------------
  125|  1.14M|    rm = 0.01f;
  126|  10.3M|    for (j = i; j < i + k; j++) rm += x[j] * x[j];
  ------------------
  |  Branch (126:17): [True: 9.17M, False: 1.14M]
  ------------------
  127|       |
  128|  1.14M|    rm = (FLOAT32)sqrt(rm / max);
  129|  1.14M|    if (rm > factor) factor = rm;
  ------------------
  |  Branch (129:9): [True: 261k, False: 885k]
  ------------------
  130|       |
  131|  10.3M|    for (j = i; j < i + k; j++) x[j] *= factor;
  ------------------
  |  Branch (131:17): [True: 9.17M, False: 1.14M]
  ------------------
  132|       |
  133|  1.14M|    gains[i / k] = factor;
  134|  1.14M|  }
  135|       |
  136|   125k|  return;
  137|   125k|}

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

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

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

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

