LLVMFuzzerTestOneInput:
   42|  22.0k|{
   43|  22.0k|  int32_t i;
   44|  22.0k|  int32_t iBufPos = 0;
   45|  22.0k|  int32_t iEndOfStreamFlag;
   46|  22.0k|  int iLevelSetting = (int) WELS_LOG_QUIET; // disable logging while fuzzing
   47|  22.0k|  int32_t iSliceSize;
   48|  22.0k|  ISVCDecoder *pDecoder;
   49|  22.0k|  SDecodingParam sDecParam = {0};
   50|  22.0k|  SBufferInfo sDstBufInfo;
   51|  22.0k|  std::unique_ptr<uint8_t[]> pBuf(new uint8_t[size + 4]);
   52|  22.0k|  uint8_t* pData[3] = {NULL};
   53|  22.0k|  uint8_t uiStartCode[4] = {0, 0, 0, 1};
   54|       |
   55|  22.0k|  memcpy(pBuf.get(), data, size);
   56|  22.0k|  memcpy(pBuf.get() + size, &uiStartCode[0], 4);
   57|  22.0k|  memset(&sDstBufInfo, 0, sizeof(SBufferInfo));
   58|       |
   59|       |  // TODO: is this the best/fastest ERROR_CON to use?
   60|  22.0k|  sDecParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
   61|       |  // TODO: should we also fuzz VIDEO_BITSTREAM_SVC?
   62|  22.0k|  sDecParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_AVC;
   63|       |  
   64|  22.0k|  WelsCreateDecoder (&pDecoder);
   65|  22.0k|  pDecoder->Initialize (&sDecParam);
   66|  22.0k|  pDecoder->SetOption (DECODER_OPTION_TRACE_LEVEL, &iLevelSetting);
   67|       |
   68|  5.66M|  while (1) {
  ------------------
  |  Branch (68:10): [True: 5.66M, Folded]
  ------------------
   69|  5.66M|    if (iBufPos >= size) {
  ------------------
  |  Branch (69:9): [True: 22.0k, False: 5.64M]
  ------------------
   70|  22.0k|      iEndOfStreamFlag = 1;
   71|  22.0k|      if (iEndOfStreamFlag)
  ------------------
  |  Branch (71:11): [True: 22.0k, False: 0]
  ------------------
   72|  22.0k|        pDecoder->SetOption (DECODER_OPTION_END_OF_STREAM, (void*)&iEndOfStreamFlag);
   73|  22.0k|      break;
   74|  22.0k|    }
   75|       |
   76|   103M|    for (i = 0; i < size; i++) {
  ------------------
  |  Branch (76:17): [True: 103M, False: 1.21k]
  ------------------
   77|   103M|      if ((pBuf[iBufPos + i] == 0 && pBuf[iBufPos + i + 1] == 0 && pBuf[iBufPos + i + 2] == 0 && pBuf[iBufPos + i + 3] == 1
  ------------------
  |  Branch (77:12): [True: 50.9M, False: 52.8M]
  |  Branch (77:38): [True: 36.8M, False: 14.0M]
  |  Branch (77:68): [True: 24.9M, False: 11.9M]
  |  Branch (77:98): [True: 362k, False: 24.5M]
  ------------------
   78|   103M|          && i > 0) || (pBuf[iBufPos + i] == 0 && pBuf[iBufPos + i + 1] == 0 && pBuf[iBufPos + i + 2] == 1 && i > 0)) {
  ------------------
  |  Branch (78:14): [True: 191k, False: 171k]
  |  Branch (78:25): [True: 50.7M, False: 52.8M]
  |  Branch (78:51): [True: 36.6M, False: 14.0M]
  |  Branch (78:81): [True: 10.9M, False: 25.7M]
  |  Branch (78:111): [True: 5.45M, False: 5.46M]
  ------------------
   79|  5.64M|        break;
   80|  5.64M|      }
   81|   103M|    }
   82|  5.64M|    iSliceSize = i;
   83|  5.64M|    if (iSliceSize < 4) {
  ------------------
  |  Branch (83:9): [True: 189k, False: 5.45M]
  ------------------
   84|   189k|      if (iSliceSize == 0) {
  ------------------
  |  Branch (84:11): [True: 0, False: 189k]
  ------------------
   85|       |        // I don't think this should happen but let's just avoid the hang
   86|      0|        goto label_cleanup;
   87|      0|      }
   88|   189k|      iBufPos += iSliceSize;
   89|   189k|      continue;
   90|   189k|    }
   91|       |
   92|  5.45M|    pDecoder->DecodeFrameNoDelay (pBuf.get() + iBufPos, iSliceSize, pData, &sDstBufInfo);
   93|  5.45M|    iBufPos += iSliceSize;
   94|  5.45M|  }
   95|       |
   96|  22.0k|label_cleanup:
   97|  22.0k|  pDecoder->Uninitialize ();
   98|  22.0k|  WelsDestroyDecoder (pDecoder);
   99|       |
  100|  22.0k|  return 0;
  101|  22.0k|}

_ZN11ISVCDecoderD2Ev:
  467|  22.0k|  virtual ~ISVCDecoder() {}

decode_mb_aux.cpp:_ZL9WelsClip1i:
  186|  9.27M|static inline uint8_t WelsClip1 (int32_t iX) {
  187|  9.27M|  uint8_t uiTmp = (uint8_t) (((iX) & ~255) ? (- (iX) >> 31) : (iX));
  ------------------
  |  Branch (187:30): [True: 1.13M, False: 8.13M]
  ------------------
  188|  9.27M|  return uiTmp;
  189|  9.27M|}
mv_pred.cpp:_ZL10WelsMedianiii:
  154|  1.91M|static inline int32_t WelsMedian (int32_t iX,  int32_t iY, int32_t iZ) {
  155|  1.91M|  int32_t iMin = iX, iMax = iX;
  156|       |
  157|  1.91M|  if (iY < iMin)
  ------------------
  |  Branch (157:7): [True: 212k, False: 1.70M]
  ------------------
  158|   212k|    iMin = iY;
  159|  1.70M|  else
  160|  1.70M|    iMax = iY;
  161|       |
  162|  1.91M|  if (iZ < iMin)
  ------------------
  |  Branch (162:7): [True: 96.0k, False: 1.82M]
  ------------------
  163|  96.0k|    iMin = iZ;
  164|  1.82M|  else if (iZ > iMax)
  ------------------
  |  Branch (164:12): [True: 102k, False: 1.71M]
  ------------------
  165|   102k|    iMax = iZ;
  166|       |
  167|  1.91M|  return (iX + iY + iZ) - (iMin + iMax);
  168|  1.91M|}
deblocking_common.cpp:_ZL9WelsClip1i:
  186|  13.8M|static inline uint8_t WelsClip1 (int32_t iX) {
  187|  13.8M|  uint8_t uiTmp = (uint8_t) (((iX) & ~255) ? (- (iX) >> 31) : (iX));
  ------------------
  |  Branch (187:30): [True: 1.32k, False: 13.8M]
  ------------------
  188|  13.8M|  return uiTmp;
  189|  13.8M|}

welsDecoderExt.cpp:_ZL8WelsTimev:
   63|  21.8M|static inline int64_t WelsTime (void) {
   64|  21.8M|#ifndef _WIN32
   65|  21.8M|  struct timeval tv_date;
   66|       |
   67|  21.8M|  gettimeofday (&tv_date, NULL);
   68|  21.8M|  return ((int64_t) tv_date.tv_sec * 1000000 + (int64_t) tv_date.tv_usec);
   69|       |#else
   70|       |  static int64_t iMtimeFreq = 0;
   71|       |  int64_t iMtimeCur = 0;
   72|       |  int64_t iResult = 0;
   73|       |  if (!iMtimeFreq) {
   74|       |    QueryPerformanceFrequency ((LARGE_INTEGER*)&iMtimeFreq);
   75|       |    if (!iMtimeFreq)
   76|       |      iMtimeFreq = 1;
   77|       |  }
   78|       |  QueryPerformanceCounter ((LARGE_INTEGER*)&iMtimeCur);
   79|       |  iResult = (int64_t) ((double)iMtimeCur * 1e6 / (double)iMtimeFreq + 0.5);
   80|       |  return iResult;
   81|       |#endif//_WIN32
   82|  21.8M|}

WelsQueryLogicalProcessInfo:
  484|  22.0k|WELS_THREAD_ERROR_CODE    WelsQueryLogicalProcessInfo (WelsLogicalProcessInfo* pInfo) {
  485|       |#ifdef ANDROID_NDK
  486|       |  pInfo->ProcessorCount = android_getCpuCount();
  487|       |  return WELS_THREAD_ERROR_OK;
  488|       |#elif defined(__linux__) || defined(__GNU__)
  489|       |
  490|  22.0k|  cpu_set_t cpuset;
  491|       |
  492|  22.0k|  CPU_ZERO (&cpuset);
  ------------------
  |  Branch (492:3): [Folded, False: 22.0k]
  ------------------
  493|       |
  494|  22.0k|  if (!sched_getaffinity (0, sizeof (cpuset), &cpuset)) {
  ------------------
  |  Branch (494:7): [True: 22.0k, False: 0]
  ------------------
  495|  22.0k|#ifdef CPU_COUNT
  496|  22.0k|    pInfo->ProcessorCount = CPU_COUNT (&cpuset);
  497|       |#else
  498|       |    int32_t count = 0;
  499|       |    for (int i = 0; i < CPU_SETSIZE; i++) {
  500|       |      if (CPU_ISSET (i, &cpuset)) {
  501|       |        count++;
  502|       |      }
  503|       |    }
  504|       |    pInfo->ProcessorCount = count;
  505|       |#endif
  506|  22.0k|  } else {
  507|      0|    pInfo->ProcessorCount = 1;
  508|      0|  }
  509|       |
  510|  22.0k|  return WELS_THREAD_ERROR_OK;
  ------------------
  |  |  114|  22.0k|#define    WELS_THREAD_ERROR_OK                                 0
  ------------------
  511|       |
  512|       |#elif defined(__EMSCRIPTEN__)
  513|       |
  514|       |  // There is not yet a way to determine CPU count in emscripten JS environment.
  515|       |  pInfo->ProcessorCount = emscripten_num_logical_cores();
  516|       |  return WELS_THREAD_ERROR_OK;
  517|       |
  518|       |#elif defined(__Fuchsia__)
  519|       |
  520|       |  pInfo->ProcessorCount = sysconf(_SC_NPROCESSORS_ONLN);
  521|       |  return WELS_THREAD_ERROR_OK;
  522|       |#else
  523|       |
  524|       |  size_t len = sizeof (pInfo->ProcessorCount);
  525|       |
  526|       |#if defined(__OpenBSD__)
  527|       |  int scname[] = { CTL_HW, HW_NCPUONLINE };
  528|       |  if (sysctl (scname, 2, &pInfo->ProcessorCount, &len, NULL, 0) == -1)
  529|       |#else
  530|       |  if (sysctlbyname (HW_NCPU_NAME, &pInfo->ProcessorCount, &len, NULL, 0) == -1)
  531|       |#endif
  532|       |    pInfo->ProcessorCount = 1;
  533|       |
  534|       |  return WELS_THREAD_ERROR_OK;
  535|       |
  536|       |#endif//__linux__
  537|  22.0k|}

WelsCPUFeatureDetect:
   56|  26.4k|uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) {
   57|  26.4k|  uint32_t uiCPU = 0;
   58|  26.4k|  uint32_t uiFeatureA = 0, uiFeatureB = 0, uiFeatureC = 0, uiFeatureD = 0;
   59|  26.4k|  int32_t  CacheLineSize = 0;
   60|  26.4k|  int8_t   chVendorName[16] = { 0 };
   61|  26.4k|  uint32_t uiMaxCpuidLevel = 0;
   62|       |
   63|  26.4k|  if (!WelsCPUIdVerify()) {
  ------------------
  |  Branch (63:7): [True: 0, False: 26.4k]
  ------------------
   64|       |    /* cpuid is not supported in cpu */
   65|      0|    return 0;
   66|      0|  }
   67|       |
   68|  26.4k|  WelsCPUId (0, &uiFeatureA, (uint32_t*)&chVendorName[0], (uint32_t*)&chVendorName[8], (uint32_t*)&chVendorName[4]);
   69|  26.4k|  uiMaxCpuidLevel = uiFeatureA;
   70|  26.4k|  if (uiMaxCpuidLevel == 0) {
  ------------------
  |  Branch (70:7): [True: 0, False: 26.4k]
  ------------------
   71|       |    /* maximum input value for basic cpuid information */
   72|      0|    return 0;
   73|      0|  }
   74|       |
   75|  26.4k|  WelsCPUId (1, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
   76|  26.4k|  if ((uiFeatureD & 0x00800000) == 0) {
  ------------------
  |  Branch (76:7): [True: 0, False: 26.4k]
  ------------------
   77|       |    /* Basic MMX technology is not support in cpu, mean nothing for us so return here */
   78|      0|    return 0;
   79|      0|  }
   80|       |
   81|  26.4k|  uiCPU = WELS_CPU_MMX;
  ------------------
  |  |   46|  26.4k|#define WELS_CPU_MMX        0x00000001    /* mmx */
  ------------------
   82|  26.4k|  if (uiFeatureD & 0x02000000) {
  ------------------
  |  Branch (82:7): [True: 26.4k, False: 0]
  ------------------
   83|       |    /* SSE technology is identical to AMD MMX extensions */
   84|  26.4k|    uiCPU |= WELS_CPU_MMXEXT | WELS_CPU_SSE;
  ------------------
  |  |   47|  26.4k|#define WELS_CPU_MMXEXT     0x00000002    /* mmx-ext*/
  ------------------
                  uiCPU |= WELS_CPU_MMXEXT | WELS_CPU_SSE;
  ------------------
  |  |   48|  26.4k|#define WELS_CPU_SSE        0x00000004    /* sse */
  ------------------
   85|  26.4k|  }
   86|  26.4k|  if (uiFeatureD & 0x04000000) {
  ------------------
  |  Branch (86:7): [True: 26.4k, False: 0]
  ------------------
   87|       |    /* SSE2 support here */
   88|  26.4k|    uiCPU |= WELS_CPU_SSE2;
  ------------------
  |  |   49|  26.4k|#define WELS_CPU_SSE2       0x00000008    /* sse 2 */
  ------------------
   89|  26.4k|  }
   90|  26.4k|  if (uiFeatureD & 0x00000001) {
  ------------------
  |  Branch (90:7): [True: 26.4k, False: 0]
  ------------------
   91|       |    /* x87 FPU on-chip checking */
   92|  26.4k|    uiCPU |= WELS_CPU_FPU;
  ------------------
  |  |   59|  26.4k|#define WELS_CPU_FPU        0x00001000  /* x87-FPU on chip */
  ------------------
   93|  26.4k|  }
   94|  26.4k|  if (uiFeatureD & 0x00008000) {
  ------------------
  |  Branch (94:7): [True: 26.4k, False: 0]
  ------------------
   95|       |    /* CMOV instruction checking */
   96|  26.4k|    uiCPU |= WELS_CPU_CMOV;
  ------------------
  |  |   63|  26.4k|#define WELS_CPU_CMOV       0x00004000  /* Conditional Move Instructions,
  ------------------
   97|  26.4k|  }
   98|  26.4k|  if ((!strcmp ((const char*)chVendorName, CPU_Vendor_INTEL)) ||
  ------------------
  |  |   51|  26.4k|#define    CPU_Vendor_INTEL  "GenuineIntel"
  ------------------
  |  Branch (98:7): [True: 26.4k, False: 0]
  ------------------
   99|  26.4k|      (!strcmp ((const char*)chVendorName, CPU_Vendor_AMD))) { // confirmed_safe_unsafe_usage
  ------------------
  |  |   50|      0|#define    CPU_Vendor_AMD    "AuthenticAMD"
  ------------------
  |  Branch (99:7): [True: 0, False: 0]
  ------------------
  100|  26.4k|    if (uiFeatureD & 0x10000000) {
  ------------------
  |  Branch (100:9): [True: 26.4k, False: 0]
  ------------------
  101|       |      /* Multi-Threading checking: contains of multiple logic processors */
  102|  26.4k|      uiCPU |= WELS_CPU_HTT;
  ------------------
  |  |   60|  26.4k|#define WELS_CPU_HTT        0x00002000  /* Hyper-Threading Technology (HTT), Multi-threading enabled feature:
  ------------------
  103|  26.4k|    }
  104|  26.4k|  }
  105|       |
  106|  26.4k|  if (uiFeatureC & 0x00000001) {
  ------------------
  |  Branch (106:7): [True: 26.4k, False: 0]
  ------------------
  107|       |    /* SSE3 support here */
  108|  26.4k|    uiCPU |= WELS_CPU_SSE3;
  ------------------
  |  |   50|  26.4k|#define WELS_CPU_SSE3       0x00000010    /* sse 3 */
  ------------------
  109|  26.4k|  }
  110|  26.4k|  if (uiFeatureC & 0x00000200) {
  ------------------
  |  Branch (110:7): [True: 26.4k, False: 0]
  ------------------
  111|       |    /* SSSE3 support here */
  112|  26.4k|    uiCPU |= WELS_CPU_SSSE3;
  ------------------
  |  |   55|  26.4k|#define WELS_CPU_SSSE3      0x00000200    /* ssse3 */
  ------------------
  113|  26.4k|  }
  114|  26.4k|  if (uiFeatureC & 0x00080000) {
  ------------------
  |  Branch (114:7): [True: 26.4k, False: 0]
  ------------------
  115|       |    /* SSE4.1 support here, 45nm Penryn processor */
  116|  26.4k|    uiCPU |= WELS_CPU_SSE41;
  ------------------
  |  |   51|  26.4k|#define WELS_CPU_SSE41      0x00000020    /* sse 4.1 */
  ------------------
  117|  26.4k|  }
  118|  26.4k|  if (uiFeatureC & 0x00100000) {
  ------------------
  |  Branch (118:7): [True: 26.4k, False: 0]
  ------------------
  119|       |    /* SSE4.2 support here, next generation Nehalem processor */
  120|  26.4k|    uiCPU |= WELS_CPU_SSE42;
  ------------------
  |  |   56|  26.4k|#define WELS_CPU_SSE42      0x00000400    /* sse 4.2 */
  ------------------
  121|  26.4k|  }
  122|  26.4k|  if (WelsCPUSupportAVX (uiFeatureA, uiFeatureC)) {
  ------------------
  |  Branch (122:7): [True: 26.4k, False: 0]
  ------------------
  123|       |    /* AVX supported */
  124|  26.4k|    uiCPU |= WELS_CPU_AVX;
  ------------------
  |  |   69|  26.4k|#define WELS_CPU_AVX        0x00000800  /* Advanced Vector eXtentions */
  ------------------
  125|  26.4k|  }
  126|  26.4k|  if (WelsCPUSupportFMA (uiFeatureA, uiFeatureC)) {
  ------------------
  |  Branch (126:7): [True: 26.4k, False: 0]
  ------------------
  127|       |    /* AVX FMA supported */
  128|  26.4k|    uiCPU |= WELS_CPU_FMA;
  ------------------
  |  |   68|  26.4k|#define WELS_CPU_FMA        0x00020000  /* AVX VEX FMA instruction sets */
  ------------------
  129|  26.4k|  }
  130|  26.4k|  if (uiFeatureC & 0x02000000) {
  ------------------
  |  Branch (130:7): [True: 26.4k, False: 0]
  ------------------
  131|       |    /* AES checking */
  132|  26.4k|    uiCPU |= WELS_CPU_AES;
  ------------------
  |  |   67|  26.4k|#define WELS_CPU_AES        0x00010000  /* AES instruction extensions */
  ------------------
  133|  26.4k|  }
  134|  26.4k|  if (uiFeatureC & 0x00400000) {
  ------------------
  |  Branch (134:7): [True: 26.4k, False: 0]
  ------------------
  135|       |    /* MOVBE checking */
  136|  26.4k|    uiCPU |= WELS_CPU_MOVBE;
  ------------------
  |  |   66|  26.4k|#define WELS_CPU_MOVBE      0x00008000  /* MOVBE instruction */
  ------------------
  137|  26.4k|  }
  138|       |
  139|  26.4k|  if (uiMaxCpuidLevel >= 7) {
  ------------------
  |  Branch (139:7): [True: 26.4k, False: 0]
  ------------------
  140|  26.4k|    uiFeatureC = 0;
  141|  26.4k|    WelsCPUId (7, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
  142|  26.4k|    if ((uiCPU & WELS_CPU_AVX) && (uiFeatureB & 0x00000020)) {
  ------------------
  |  |   69|  26.4k|#define WELS_CPU_AVX        0x00000800  /* Advanced Vector eXtentions */
  ------------------
  |  Branch (142:9): [True: 26.4k, False: 0]
  |  Branch (142:35): [True: 26.4k, False: 0]
  ------------------
  143|       |      /* AVX2 supported */
  144|  26.4k|      uiCPU |= WELS_CPU_AVX2;
  ------------------
  |  |   72|  26.4k|#define WELS_CPU_AVX2       0x00040000  /* AVX2 */
  ------------------
  145|  26.4k|    }
  146|  26.4k|  }
  147|       |
  148|  26.4k|  if (uiMaxCpuidLevel >= 7) {
  ------------------
  |  Branch (148:7): [True: 26.4k, False: 0]
  ------------------
  149|  26.4k|    uiFeatureC = WelsCPUDetectAVX512();
  150|  26.4k|    if (uiFeatureC & 0x10000) uiCPU |= WELS_CPU_AVX512F;
  ------------------
  |  |   77|      0|#define WELS_CPU_AVX512F    0x00080000  /* AVX512F */
  ------------------
  |  Branch (150:9): [True: 0, False: 26.4k]
  ------------------
  151|  26.4k|    if (uiFeatureC & 0x10000000) uiCPU |= WELS_CPU_AVX512CD;
  ------------------
  |  |   78|      0|#define WELS_CPU_AVX512CD   0x00100000  /* AVX512CD */
  ------------------
  |  Branch (151:9): [True: 0, False: 26.4k]
  ------------------
  152|  26.4k|    if (uiFeatureC & 0x20000) uiCPU |= WELS_CPU_AVX512DQ;
  ------------------
  |  |   79|      0|#define WELS_CPU_AVX512DQ   0x00200000  /* AVX512DQ */
  ------------------
  |  Branch (152:9): [True: 0, False: 26.4k]
  ------------------
  153|  26.4k|    if (uiFeatureC & 0x40000000) uiCPU |= WELS_CPU_AVX512BW;
  ------------------
  |  |   80|      0|#define WELS_CPU_AVX512BW   0x00400000  /* AVX512BW */
  ------------------
  |  Branch (153:9): [True: 0, False: 26.4k]
  ------------------
  154|  26.4k|    if (uiFeatureC & 0x80000000) uiCPU |= WELS_CPU_AVX512VL;
  ------------------
  |  |   81|      0|#define WELS_CPU_AVX512VL   0x00800000  /* AVX512VL */
  ------------------
  |  Branch (154:9): [True: 0, False: 26.4k]
  ------------------
  155|  26.4k|  }
  156|       |
  157|  26.4k|  if (pNumberOfLogicProcessors != NULL) {
  ------------------
  |  Branch (157:7): [True: 26.4k, False: 0]
  ------------------
  158|  26.4k|    if (uiCPU & WELS_CPU_HTT) {
  ------------------
  |  |   60|  26.4k|#define WELS_CPU_HTT        0x00002000  /* Hyper-Threading Technology (HTT), Multi-threading enabled feature:
  ------------------
  |  Branch (158:9): [True: 26.4k, False: 0]
  ------------------
  159|  26.4k|      *pNumberOfLogicProcessors = (uiFeatureB & 0x00ff0000) >> 16; // feature bits: 23-16 on returned EBX
  160|  26.4k|    } else {
  161|      0|      *pNumberOfLogicProcessors = 0;
  162|      0|    }
  163|  26.4k|    if (!strcmp ((const char*)chVendorName, CPU_Vendor_INTEL)) {
  ------------------
  |  |   51|  26.4k|#define    CPU_Vendor_INTEL  "GenuineIntel"
  ------------------
  |  Branch (163:9): [True: 26.4k, False: 0]
  ------------------
  164|  26.4k|      if (uiMaxCpuidLevel >= 4) {
  ------------------
  |  Branch (164:11): [True: 26.4k, False: 0]
  ------------------
  165|  26.4k|        uiFeatureC = 0;
  166|  26.4k|        WelsCPUId (0x4, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
  167|  26.4k|        if (uiFeatureA != 0) {
  ------------------
  |  Branch (167:13): [True: 26.4k, False: 0]
  ------------------
  168|  26.4k|          *pNumberOfLogicProcessors = ((uiFeatureA & 0xfc000000) >> 26) + 1;
  169|  26.4k|        }
  170|  26.4k|      }
  171|  26.4k|    }
  172|  26.4k|  }
  173|       |
  174|  26.4k|  WelsCPUId (0x80000000, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
  175|       |
  176|  26.4k|  if ((!strcmp ((const char*)chVendorName, CPU_Vendor_AMD))
  ------------------
  |  |   50|  26.4k|#define    CPU_Vendor_AMD    "AuthenticAMD"
  ------------------
  |  Branch (176:7): [True: 0, False: 26.4k]
  ------------------
  177|      0|      && (uiFeatureA >= 0x80000001)) { // confirmed_safe_unsafe_usage
  ------------------
  |  Branch (177:10): [True: 0, False: 0]
  ------------------
  178|      0|    WelsCPUId (0x80000001, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
  179|      0|    if (uiFeatureD & 0x00400000) {
  ------------------
  |  Branch (179:9): [True: 0, False: 0]
  ------------------
  180|      0|      uiCPU |= WELS_CPU_MMXEXT;
  ------------------
  |  |   47|      0|#define WELS_CPU_MMXEXT     0x00000002    /* mmx-ext*/
  ------------------
  181|      0|    }
  182|      0|    if (uiFeatureD & 0x80000000) {
  ------------------
  |  Branch (182:9): [True: 0, False: 0]
  ------------------
  183|      0|      uiCPU |= WELS_CPU_3DNOW;
  ------------------
  |  |   52|      0|#define WELS_CPU_3DNOW      0x00000040    /* 3dnow! */
  ------------------
  184|      0|    }
  185|      0|  }
  186|       |
  187|  26.4k|  if (!strcmp ((const char*)chVendorName, CPU_Vendor_INTEL)) { // confirmed_safe_unsafe_usage
  ------------------
  |  |   51|  26.4k|#define    CPU_Vendor_INTEL  "GenuineIntel"
  ------------------
  |  Branch (187:7): [True: 26.4k, False: 0]
  ------------------
  188|  26.4k|    int32_t  family, model;
  189|       |
  190|  26.4k|    WelsCPUId (1, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
  191|  26.4k|    family = ((uiFeatureA >> 8) & 0xf) + ((uiFeatureA >> 20) & 0xff);
  192|  26.4k|    model  = ((uiFeatureA >> 4) & 0xf) + ((uiFeatureA >> 12) & 0xf0);
  193|       |
  194|  26.4k|    if ((family == 6) && (model == 9 || model == 13 || model == 14)) {
  ------------------
  |  Branch (194:9): [True: 26.4k, False: 0]
  |  Branch (194:27): [True: 0, False: 26.4k]
  |  Branch (194:41): [True: 0, False: 26.4k]
  |  Branch (194:56): [True: 0, False: 26.4k]
  ------------------
  195|      0|      uiCPU &= ~ (WELS_CPU_SSE2 | WELS_CPU_SSE3);
  ------------------
  |  |   49|      0|#define WELS_CPU_SSE2       0x00000008    /* sse 2 */
  ------------------
                    uiCPU &= ~ (WELS_CPU_SSE2 | WELS_CPU_SSE3);
  ------------------
  |  |   50|      0|#define WELS_CPU_SSE3       0x00000010    /* sse 3 */
  ------------------
  196|      0|    }
  197|  26.4k|  }
  198|       |
  199|       |  // get cache line size
  200|  26.4k|  if ((!strcmp ((const char*)chVendorName, CPU_Vendor_INTEL))
  ------------------
  |  |   51|  26.4k|#define    CPU_Vendor_INTEL  "GenuineIntel"
  ------------------
  |  Branch (200:7): [True: 26.4k, False: 0]
  ------------------
  201|  26.4k|      || ! (strcmp ((const char*)chVendorName, CPU_Vendor_CYRIX))) { // confirmed_safe_unsafe_usage
  ------------------
  |  |   52|      0|#define    CPU_Vendor_CYRIX  "CyrixInstead"
  ------------------
  |  Branch (201:10): [True: 0, False: 0]
  ------------------
  202|  26.4k|    WelsCPUId (1, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
  203|       |
  204|  26.4k|    CacheLineSize = (uiFeatureB & 0xff00) >>
  205|  26.4k|                    5; // ((clflush_line_size >> 8) << 3), CLFLUSH_line_size * 8 = CacheLineSize_in_byte
  206|       |
  207|  26.4k|    if (CacheLineSize == 128) {
  ------------------
  |  Branch (207:9): [True: 0, False: 26.4k]
  ------------------
  208|      0|      uiCPU |= WELS_CPU_CACHELINE_128;
  ------------------
  |  |   86|      0|#define WELS_CPU_CACHELINE_128   0x80000000    /* CacheLine Size 128 */
  ------------------
  209|  26.4k|    } else if (CacheLineSize == 64) {
  ------------------
  |  Branch (209:16): [True: 26.4k, False: 0]
  ------------------
  210|  26.4k|      uiCPU |= WELS_CPU_CACHELINE_64;
  ------------------
  |  |   85|  26.4k|#define WELS_CPU_CACHELINE_64    0x40000000    /* CacheLine Size 64 */
  ------------------
  211|  26.4k|    } else if (CacheLineSize == 32) {
  ------------------
  |  Branch (211:16): [True: 0, False: 0]
  ------------------
  212|      0|      uiCPU |= WELS_CPU_CACHELINE_32;
  ------------------
  |  |   84|      0|#define WELS_CPU_CACHELINE_32    0x20000000    /* CacheLine Size 32 */
  ------------------
  213|      0|    } else if (CacheLineSize == 16) {
  ------------------
  |  Branch (213:16): [True: 0, False: 0]
  ------------------
  214|      0|      uiCPU |= WELS_CPU_CACHELINE_16;
  ------------------
  |  |   83|      0|#define WELS_CPU_CACHELINE_16    0x10000000    /* CacheLine Size 16 */
  ------------------
  215|      0|    }
  216|  26.4k|  }
  217|       |
  218|  26.4k|  return uiCPU;
  219|  26.4k|}

WelsSnprintf:
  186|  9.08M|int32_t WelsSnprintf (char* pBuffer,  int32_t iSizeOfBuffer, const char* kpFormat, ...) {
  187|  9.08M|  va_list pArgPtr;
  188|  9.08M|  int32_t iRc;
  189|       |
  190|  9.08M|  va_start (pArgPtr, kpFormat);
  191|       |
  192|  9.08M|  iRc = vsnprintf (pBuffer, iSizeOfBuffer, kpFormat, pArgPtr);
  193|       |
  194|  9.08M|  va_end (pArgPtr);
  195|       |
  196|  9.08M|  return iRc;
  197|  9.08M|}
WelsStrncpy:
  199|  9.08M|char* WelsStrncpy (char* pDest, int32_t iSizeInBytes, const char* kpSrc) {
  200|  9.08M|  strncpy (pDest, kpSrc, iSizeInBytes); //confirmed_safe_unsafe_usage
  201|  9.08M|  pDest[iSizeInBytes - 1] = '\0';
  202|  9.08M|  return pDest;
  203|  9.08M|}
WelsStrcat:
  245|  9.08M|char* WelsStrcat (char* pDest, uint32_t uiSizeInBytes, const char* kpSrc) {
  246|  9.08M|  uint32_t uiCurLen = (uint32_t) strlen (pDest);
  247|  9.08M|  if (uiSizeInBytes > uiCurLen)
  ------------------
  |  Branch (247:7): [True: 9.08M, False: 0]
  ------------------
  248|  9.08M|    return WelsStrncpy (pDest + uiCurLen, uiSizeInBytes - uiCurLen, kpSrc);
  249|      0|  return pDest;
  250|  9.08M|}

_Z19DeblockChromaLt42_cPhiiiiPa:
  185|  1.01M|                          int32_t iBeta, int8_t* pTc) {
  186|  1.01M|  int32_t p0, p1, q0, q1, iDeta;
  187|  1.01M|  bool bDetaP0Q0, bDetaP1P0, bDetaQ1Q0;
  188|       |
  189|  9.16M|  for (int32_t i = 0; i < 8; i++) {
  ------------------
  |  Branch (189:23): [True: 8.14M, False: 1.01M]
  ------------------
  190|  8.14M|    int32_t iTc0 = pTc[i >> 1];
  191|  8.14M|    if (iTc0 > 0) {
  ------------------
  |  Branch (191:9): [True: 7.06M, False: 1.08M]
  ------------------
  192|  7.06M|      p0 = pPixCbCr[-iStrideX];
  193|  7.06M|      p1 = pPixCbCr[-2 * iStrideX];
  194|  7.06M|      q0 = pPixCbCr[0];
  195|  7.06M|      q1 = pPixCbCr[iStrideX];
  196|       |
  197|  7.06M|      bDetaP0Q0 =  WELS_ABS (p0 - q0) < iAlpha;
  ------------------
  |  |  196|  7.06M|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  ------------------
  |  |  |  Branch (196:23): [True: 223k, False: 6.83M]
  |  |  ------------------
  ------------------
  198|  7.06M|      bDetaP1P0 =  WELS_ABS (p1 - p0) < iBeta;
  ------------------
  |  |  196|  7.06M|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  ------------------
  |  |  |  Branch (196:23): [True: 26.4k, False: 7.03M]
  |  |  ------------------
  ------------------
  199|  7.06M|      bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
  ------------------
  |  |  196|  7.06M|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  ------------------
  |  |  |  Branch (196:23): [True: 40.2k, False: 7.02M]
  |  |  ------------------
  ------------------
  200|  7.06M|      if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
  ------------------
  |  Branch (200:11): [True: 6.93M, False: 122k]
  |  Branch (200:24): [True: 6.92M, False: 15.8k]
  |  Branch (200:37): [True: 6.91M, False: 9.16k]
  ------------------
  201|  6.91M|        iDeta = WELS_CLIP3 ((((q0 - p0) * (1 << 2)) + (p1 - q1) + 4) >> 3, -iTc0, iTc0);
  ------------------
  |  |  204|  6.91M|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 16.8k, False: 6.89M]
  |  |  |  Branch (204:55): [True: 11.1k, False: 6.88M]
  |  |  ------------------
  ------------------
  202|  6.91M|        pPixCbCr[-iStrideX] = WelsClip1 (p0 + iDeta);     /* p0' */
  203|  6.91M|        pPixCbCr[0]  = WelsClip1 (q0 - iDeta);     /* q0' */
  204|  6.91M|      }
  205|       |
  206|       |
  207|  7.06M|    }
  208|  8.14M|    pPixCbCr += iStrideY;
  209|  8.14M|  }
  210|  1.01M|}
_Z19DeblockChromaEq42_cPhiiii:
  212|   131k|                          int32_t iBeta) {
  213|   131k|  int32_t p0, p1, q0, q1;
  214|   131k|  bool bDetaP0Q0, bDetaP1P0, bDetaQ1Q0;
  215|  1.18M|  for (int32_t i = 0; i < 8; i++) {
  ------------------
  |  Branch (215:23): [True: 1.05M, False: 131k]
  ------------------
  216|  1.05M|    p0 = pPixCbCr[-iStrideX];
  217|  1.05M|    p1 = pPixCbCr[-2 * iStrideX];
  218|  1.05M|    q0 = pPixCbCr[0];
  219|  1.05M|    q1 = pPixCbCr[iStrideX];
  220|  1.05M|    bDetaP0Q0 = WELS_ABS (p0 - q0) < iAlpha;
  ------------------
  |  |  196|  1.05M|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  ------------------
  |  |  |  Branch (196:23): [True: 64.7k, False: 990k]
  |  |  ------------------
  ------------------
  221|  1.05M|    bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
  ------------------
  |  |  196|  1.05M|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  ------------------
  |  |  |  Branch (196:23): [True: 4.53k, False: 1.05M]
  |  |  ------------------
  ------------------
  222|  1.05M|    bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
  ------------------
  |  |  196|  1.05M|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  ------------------
  |  |  |  Branch (196:23): [True: 10.0k, False: 1.04M]
  |  |  ------------------
  ------------------
  223|  1.05M|    if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
  ------------------
  |  Branch (223:9): [True: 1.02M, False: 27.5k]
  |  Branch (223:22): [True: 1.02M, False: 1.64k]
  |  Branch (223:35): [True: 1.02M, False: 1.53k]
  ------------------
  224|  1.02M|      pPixCbCr[-iStrideX] = ((p1 * (1 << 1)) + p0 + q1 + 2) >> 2;     /* p0' */
  225|  1.02M|      pPixCbCr[0]  = ((q1 * (1 << 1)) + q0 + p1 + 2) >> 2;     /* q0' */
  226|  1.02M|    }
  227|       |
  228|  1.05M|    pPixCbCr += iStrideY;
  229|  1.05M|  }
  230|   131k|}
_Z20DeblockChromaLt4V2_cPhiiiPa:
  233|   490k|                           int8_t* tc) {
  234|   490k|  DeblockChromaLt42_c (pPixCbCr, iStride, 1, iAlpha, iBeta, tc);
  235|   490k|}
_Z20DeblockChromaLt4H2_cPhiiiPa:
  237|   527k|                           int8_t* tc) {
  238|       |
  239|   527k|  DeblockChromaLt42_c (pPixCbCr, 1, iStride, iAlpha, iBeta, tc);
  240|   527k|}
_Z20DeblockChromaEq4V2_cPhiii:
  241|  92.2k|void DeblockChromaEq4V2_c (uint8_t* pPixCbCr, int32_t iStride, int32_t iAlpha, int32_t iBeta) {
  242|  92.2k|  DeblockChromaEq42_c (pPixCbCr, iStride, 1, iAlpha, iBeta);
  243|  92.2k|}
_Z20DeblockChromaEq4H2_cPhiii:
  244|  39.6k|void DeblockChromaEq4H2_c (uint8_t* pPixCbCr, int32_t iStride, int32_t iAlpha, int32_t iBeta) {
  245|  39.6k|  DeblockChromaEq42_c (pPixCbCr, 1, iStride, iAlpha, iBeta);
  246|  39.6k|}
DeblockLumaLt4H_ssse3:
  257|   596k|  void DeblockLumaLt4H_ssse3 (uint8_t* pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t* pTc) {
  258|   596k|    ENFORCE_STACK_ALIGN_1D (uint8_t,  uiBuf,   16 * 8, 16);
  ------------------
  |  |   58|   596k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   596k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
  259|       |
  260|   596k|    DeblockLumaTransposeH2V_sse2 (pPixY - 4, iStride, &uiBuf[0]);
  261|   596k|    DeblockLumaLt4V_ssse3 (&uiBuf[4 * 16], 16, iAlpha, iBeta, pTc);
  262|   596k|    DeblockLumaTransposeV2H_sse2 (pPixY - 4, iStride, &uiBuf[0]);
  263|   596k|  }
DeblockLumaEq4H_ssse3:
  265|  84.1k|  void DeblockLumaEq4H_ssse3 (uint8_t* pPixY, int32_t iStride, int32_t iAlpha, int32_t iBeta) {
  266|  84.1k|    ENFORCE_STACK_ALIGN_1D (uint8_t,  uiBuf,   16 * 8, 16);
  ------------------
  |  |   58|  84.1k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|  84.1k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
  267|       |
  268|  84.1k|    DeblockLumaTransposeH2V_sse2 (pPixY - 4, iStride, &uiBuf[0]);
  269|  84.1k|    DeblockLumaEq4V_ssse3 (&uiBuf[4 * 16], 16, iAlpha, iBeta);
  270|  84.1k|    DeblockLumaTransposeV2H_sse2 (pPixY - 4, iStride, &uiBuf[0]);
  271|  84.1k|  }

InitExpandPictureFunc:
  351|  26.4k|void InitExpandPictureFunc (SExpandPicFunc* pExpandPicFunc, const uint32_t kuiCPUFlag) {
  352|  26.4k|  pExpandPicFunc->pfExpandLumaPicture        = ExpandPictureLuma_c;
  353|  26.4k|  pExpandPicFunc->pfExpandChromaPicture[0]   = ExpandPictureChroma_c;
  354|  26.4k|  pExpandPicFunc->pfExpandChromaPicture[1]   = ExpandPictureChroma_c;
  355|       |
  356|  26.4k|#if defined(X86_ASM)
  357|  26.4k|  if ((kuiCPUFlag & WELS_CPU_SSE2) == WELS_CPU_SSE2) {
  ------------------
  |  |   49|  26.4k|#define WELS_CPU_SSE2       0x00000008    /* sse 2 */
  ------------------
                if ((kuiCPUFlag & WELS_CPU_SSE2) == WELS_CPU_SSE2) {
  ------------------
  |  |   49|  26.4k|#define WELS_CPU_SSE2       0x00000008    /* sse 2 */
  ------------------
  |  Branch (357:7): [True: 26.4k, False: 0]
  ------------------
  358|  26.4k|    pExpandPicFunc->pfExpandLumaPicture      = ExpandPictureLuma_sse2;
  359|  26.4k|    pExpandPicFunc->pfExpandChromaPicture[0] = ExpandPictureChromaUnalign_sse2;
  360|  26.4k|    pExpandPicFunc->pfExpandChromaPicture[1] = ExpandPictureChromaAlign_sse2;
  361|  26.4k|  }
  362|  26.4k|#endif//X86_ASM
  363|       |#if defined(HAVE_NEON)
  364|       |  if (kuiCPUFlag & WELS_CPU_NEON) {
  365|       |    pExpandPicFunc->pfExpandLumaPicture      = ExpandPictureLuma_neon;
  366|       |    pExpandPicFunc->pfExpandChromaPicture[0] = ExpandPictureChroma_neon;
  367|       |    pExpandPicFunc->pfExpandChromaPicture[1] = ExpandPictureChroma_neon;
  368|       |  }
  369|       |#endif//HAVE_NEON
  370|       |#if defined(HAVE_NEON_AARCH64) && defined(__aarch64__)
  371|       |  if (kuiCPUFlag & WELS_CPU_NEON) {
  372|       |    pExpandPicFunc->pfExpandLumaPicture      = ExpandPictureLuma_AArch64_neon;
  373|       |    pExpandPicFunc->pfExpandChromaPicture[0] = ExpandPictureChroma_AArch64_neon;
  374|       |    pExpandPicFunc->pfExpandChromaPicture[1] = ExpandPictureChroma_AArch64_neon;
  375|       |  }
  376|       |#endif//HAVE_NEON_AARCH64
  377|       |#if defined(HAVE_MMI)
  378|       |  if (kuiCPUFlag & WELS_CPU_MMI) {
  379|       |    pExpandPicFunc->pfExpandLumaPicture      = ExpandPictureLuma_mmi;
  380|       |    pExpandPicFunc->pfExpandChromaPicture[0] = ExpandPictureChromaUnalign_mmi;
  381|       |    pExpandPicFunc->pfExpandChromaPicture[1] = ExpandPictureChromaAlign_mmi;
  382|       |  }
  383|       |#endif//HAVE_MMI
  384|  26.4k|}
ExpandReferencingPicture:
  389|   478k|                               PExpandPictureFunc pExpLuma, PExpandPictureFunc pExpChrom[2]) {
  390|       |  /*local variable*/
  391|   478k|  uint8_t* pPicY  = pData[0];
  392|   478k|  uint8_t* pPicCb = pData[1];
  393|   478k|  uint8_t* pPicCr = pData[2];
  394|   478k|  const int32_t kiWidthY    = iWidth;
  395|   478k|  const int32_t kiHeightY   = iHeight;
  396|   478k|  const int32_t kiWidthUV   = kiWidthY >> 1;
  397|   478k|  const int32_t kiHeightUV  = kiHeightY >> 1;
  398|       |
  399|       |
  400|       |
  401|   478k|  pExpLuma (pPicY, iStride[0], kiWidthY, kiHeightY);
  402|   478k|  if (kiWidthUV >= 16) {
  ------------------
  |  Branch (402:7): [True: 300k, False: 178k]
  ------------------
  403|       |    // fix coding picture size as 16x16
  404|   300k|    const bool kbChrAligned = /*(iWidthUV >= 16) && */ ((kiWidthUV & 0x0F) == 0); // chroma planes: (16+iWidthUV) & 15
  405|   300k|    pExpChrom[kbChrAligned] (pPicCb, iStride[1], kiWidthUV, kiHeightUV);
  406|   300k|    pExpChrom[kbChrAligned] (pPicCr, iStride[2], kiWidthUV, kiHeightUV);
  407|   300k|  } else {
  408|       |    // fix coding picture size as 16x16
  409|   178k|    ExpandPictureChroma_c (pPicCb, iStride[1], kiWidthUV, kiHeightUV);
  410|   178k|    ExpandPictureChroma_c (pPicCr, iStride[2], kiWidthUV, kiHeightUV);
  411|   178k|  }
  412|       |
  413|       |
  414|       |
  415|   478k|}
expand_pic.cpp:_ZL21ExpandPictureChroma_cPhiii:
  312|   356k|    const int32_t kiPicH) {
  313|   356k|  uint8_t* pTmp                 = pDst;
  314|   356k|  uint8_t* pDstLastLine         = pTmp + (kiPicH - 1) * kiStride;
  315|   356k|  const int32_t kiPaddingLen    = (PADDING_LENGTH >> 1);
  ------------------
  |  |   49|   356k|#define PADDING_LENGTH 32 // reference extension
  ------------------
  316|   356k|  const uint8_t kuiTL           = pTmp[0];
  317|   356k|  const uint8_t kuiTR           = pTmp[kiPicW - 1];
  318|   356k|  const uint8_t kuiBL           = pDstLastLine[0];
  319|   356k|  const uint8_t kuiBR           = pDstLastLine[kiPicW - 1];
  320|   356k|  int32_t i                     = 0;
  321|       |
  322|  5.70M|  do {
  323|  5.70M|    const int32_t kiStrides = (1 + i) * kiStride;
  324|  5.70M|    uint8_t* pTop           = pTmp - kiStrides;
  325|  5.70M|    uint8_t* pBottom        = pDstLastLine + kiStrides;
  326|       |
  327|       |    // pad pTop and pBottom
  328|  5.70M|    memcpy (pTop, pTmp, kiPicW);                // confirmed_safe_unsafe_usage
  329|  5.70M|    memcpy (pBottom, pDstLastLine, kiPicW);     // confirmed_safe_unsafe_usage
  330|       |
  331|       |    // pad corners
  332|  5.70M|    memset (pTop - kiPaddingLen, kuiTL, kiPaddingLen); //pTop left
  333|  5.70M|    memset (pTop + kiPicW, kuiTR, kiPaddingLen); //pTop right
  334|  5.70M|    memset (pBottom - kiPaddingLen, kuiBL, kiPaddingLen); //pBottom left
  335|  5.70M|    memset (pBottom + kiPicW, kuiBR, kiPaddingLen); //pBottom right
  336|       |
  337|  5.70M|    ++ i;
  338|  5.70M|  } while (i < kiPaddingLen);
  ------------------
  |  Branch (338:12): [True: 5.34M, False: 356k]
  ------------------
  339|       |
  340|       |  // pad left and right
  341|   356k|  i = 0;
  342|  13.2M|  do {
  343|  13.2M|    memset (pTmp - kiPaddingLen, pTmp[0], kiPaddingLen);
  344|  13.2M|    memset (pTmp + kiPicW, pTmp[kiPicW - 1], kiPaddingLen);
  345|       |
  346|  13.2M|    pTmp += kiStride;
  347|  13.2M|    ++ i;
  348|  13.2M|  } while (i < kiPicH);
  ------------------
  |  Branch (348:12): [True: 12.8M, False: 356k]
  ------------------
  349|   356k|}

_ZN10WelsCommon10InitMcFuncEP9TagMcFuncj:
 4528|  26.4k|void WelsCommon::InitMcFunc (SMcFunc* pMcFuncs, uint32_t uiCpuFlag) {
 4529|  26.4k|  pMcFuncs->pfLumaHalfpelHor  = McHorVer20_c;
 4530|  26.4k|  pMcFuncs->pfLumaHalfpelVer  = McHorVer02_c;
 4531|  26.4k|  pMcFuncs->pfLumaHalfpelCen  = McHorVer22_c;
 4532|  26.4k|  pMcFuncs->pfSampleAveraging = PixelAvg_c;
 4533|  26.4k|  pMcFuncs->pMcChromaFunc     = McChroma_c;
 4534|  26.4k|  pMcFuncs->pMcLumaFunc       = McLuma_c;
 4535|       |
 4536|  26.4k|#if defined (X86_ASM)
 4537|  26.4k|  if (uiCpuFlag & WELS_CPU_SSE2) {
  ------------------
  |  |   49|  26.4k|#define WELS_CPU_SSE2       0x00000008    /* sse 2 */
  ------------------
  |  Branch (4537:7): [True: 26.4k, False: 0]
  ------------------
 4538|  26.4k|    pMcFuncs->pfLumaHalfpelHor  = McHorVer20Width5Or9Or17_sse2;
 4539|  26.4k|    pMcFuncs->pfLumaHalfpelVer  = McHorVer02Height5Or9Or17_sse2;
 4540|  26.4k|    pMcFuncs->pfLumaHalfpelCen  = McHorVer22Width5Or9Or17Height5Or9Or17_sse2;
 4541|  26.4k|    pMcFuncs->pfSampleAveraging = PixelAvg_sse2;
 4542|  26.4k|    pMcFuncs->pMcChromaFunc     = McChroma_sse2;
 4543|  26.4k|    pMcFuncs->pMcLumaFunc       = McLuma_sse2;
 4544|  26.4k|  }
 4545|       |
 4546|  26.4k|  if (uiCpuFlag & WELS_CPU_SSSE3) {
  ------------------
  |  |   55|  26.4k|#define WELS_CPU_SSSE3      0x00000200    /* ssse3 */
  ------------------
  |  Branch (4546:7): [True: 26.4k, False: 0]
  ------------------
 4547|  26.4k|    pMcFuncs->pfLumaHalfpelHor  = McHorVer20Width5Or9Or17_ssse3;
 4548|  26.4k|    pMcFuncs->pfLumaHalfpelVer  = McHorVer02_ssse3;
 4549|  26.4k|    pMcFuncs->pfLumaHalfpelCen  = McHorVer22Width5Or9Or17_ssse3;
 4550|  26.4k|    pMcFuncs->pMcChromaFunc = McChroma_ssse3;
 4551|  26.4k|    pMcFuncs->pMcLumaFunc   = McLuma_ssse3;
 4552|  26.4k|  }
 4553|  26.4k|#ifdef HAVE_AVX2
 4554|  26.4k|  if (uiCpuFlag & WELS_CPU_AVX2) {
  ------------------
  |  |   72|  26.4k|#define WELS_CPU_AVX2       0x00040000  /* AVX2 */
  ------------------
  |  Branch (4554:7): [True: 26.4k, False: 0]
  ------------------
 4555|  26.4k|    pMcFuncs->pfLumaHalfpelHor  = McHorVer20Width5Or9Or17_avx2;
 4556|  26.4k|    pMcFuncs->pfLumaHalfpelVer  = McHorVer02_avx2;
 4557|  26.4k|    pMcFuncs->pfLumaHalfpelCen  = McHorVer22Width5Or9Or17_avx2;
 4558|  26.4k|    pMcFuncs->pMcLumaFunc       = McLuma_avx2;
 4559|  26.4k|  }
 4560|  26.4k|#endif
 4561|  26.4k|#endif //(X86_ASM)
 4562|       |
 4563|       |#if defined(HAVE_NEON)
 4564|       |  if (uiCpuFlag & WELS_CPU_NEON) {
 4565|       |    pMcFuncs->pMcLumaFunc       = McLuma_neon;
 4566|       |    pMcFuncs->pMcChromaFunc     = McChroma_neon;
 4567|       |    pMcFuncs->pfSampleAveraging = PixelAvg_neon;
 4568|       |    pMcFuncs->pfLumaHalfpelHor  = McHorVer20Width5Or9Or17_neon;//iWidth+1:4/8/16
 4569|       |    pMcFuncs->pfLumaHalfpelVer  = McHorVer02Height5Or9Or17_neon;//heigh+1:4/8/16
 4570|       |    pMcFuncs->pfLumaHalfpelCen  = McHorVer22Width5Or9Or17Height5Or9Or17_neon;//iWidth+1/heigh+1
 4571|       |  }
 4572|       |#endif
 4573|       |#if defined(HAVE_NEON_AARCH64) && defined(__aarch64__)
 4574|       |  if (uiCpuFlag & WELS_CPU_NEON) {
 4575|       |    pMcFuncs->pMcLumaFunc       = McLuma_AArch64_neon;
 4576|       |    pMcFuncs->pMcChromaFunc     = McChroma_AArch64_neon;
 4577|       |    pMcFuncs->pfSampleAveraging = PixelAvg_AArch64_neon;
 4578|       |    pMcFuncs->pfLumaHalfpelHor  = McHorVer20Width5Or9Or17_AArch64_neon;//iWidth+1:4/8/16
 4579|       |    pMcFuncs->pfLumaHalfpelVer  = McHorVer02Height5Or9Or17_AArch64_neon;//heigh+1:4/8/16
 4580|       |    pMcFuncs->pfLumaHalfpelCen  = McHorVer22Width5Or9Or17Height5Or9Or17_AArch64_neon;//iWidth+1/heigh+1
 4581|       |  }
 4582|       |#endif
 4583|       |
 4584|       |#if defined(HAVE_MMI)
 4585|       |  if (uiCpuFlag & WELS_CPU_MMI) {
 4586|       |    pMcFuncs->pfLumaHalfpelHor  = McHorVer20Width5Or9Or17_mmi;
 4587|       |    pMcFuncs->pfLumaHalfpelVer  = McHorVer02Height5Or9Or17_mmi;
 4588|       |    pMcFuncs->pfLumaHalfpelCen  = McHorVer22Width5Or9Or17Height5Or9Or17_mmi;
 4589|       |    pMcFuncs->pfSampleAveraging = PixelAvg_mmi;
 4590|       |    pMcFuncs->pMcChromaFunc     = McChroma_mmi;
 4591|       |    pMcFuncs->pMcLumaFunc       = McLuma_mmi;
 4592|       |  }
 4593|       |#endif//HAVE_MMI
 4594|       |
 4595|       |#if defined(HAVE_LSX)
 4596|       |  if (uiCpuFlag & WELS_CPU_LSX) {
 4597|       |    pMcFuncs->pMcChromaFunc     = McChroma_lsx;
 4598|       |    pMcFuncs->pfSampleAveraging = PixelAvg_lsx;
 4599|       |    pMcFuncs->pMcLumaFunc       = McLuma_lsx;
 4600|       |    pMcFuncs->pfLumaHalfpelVer  = McHorVer02_lsx;
 4601|       |    pMcFuncs->pfLumaHalfpelHor  = McHorVer20Width5Or9Or17_lsx;
 4602|       |    pMcFuncs->pfLumaHalfpelCen  = McHorVer22Width5Or9Or17_lsx;
 4603|       |  }
 4604|       |#endif//HAVE_LSX
 4605|  26.4k|}
mc.cpp:_ZN12_GLOBAL__N_116McCopyWidthEq4_cEPKhiPhii:
  111|   151M|                                     int32_t iHeight) {
  112|   151M|  int32_t i;
  113|   757M|  for (i = 0; i < iHeight; i++) {
  ------------------
  |  Branch (113:15): [True: 606M, False: 151M]
  ------------------
  114|   606M|    ST32A4 (pDst, LD32 (pSrc));
  ------------------
  |  |   80|   606M|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|   606M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  115|   606M|    pDst += iDstStride;
  116|   606M|    pSrc += iSrcStride;
  117|   606M|  }
  118|   151M|}
mc.cpp:_ZN12_GLOBAL__N_116McCopyWidthEq2_cEPKhiPhii:
  101|  2.94M|                                     int32_t iHeight) {
  102|  2.94M|  int32_t i;
  103|  8.87M|  for (i = 0; i < iHeight; i++) { // iWidth == 2 only for chroma
  ------------------
  |  Branch (103:15): [True: 5.92M, False: 2.94M]
  ------------------
  104|  5.92M|    ST16A2 (pDst, LD16 (pSrc));
  ------------------
  |  |   78|  5.92M|#define ST16A2(a, b) STA(a, b, 16, 2)
  |  |  ------------------
  |  |  |  |   71|  5.92M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  105|  5.92M|    pDst += iDstStride;
  106|  5.92M|    pSrc += iSrcStride;
  107|  5.92M|  }
  108|  2.94M|}
mc.cpp:_ZN12_GLOBAL__N_120McChromaWithFragMv_cEPKhiPhissii:
  350|  1.28M|    int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight) {
  351|  1.28M|  int32_t i, j;
  352|  1.28M|  int32_t iA, iB, iC, iD;
  353|  1.28M|  const uint8_t* pSrcNext = pSrc + iSrcStride;
  354|  1.28M|  const uint8_t* pABCD = g_kuiABCD[iMvY & 0x07][iMvX & 0x07];
  355|  1.28M|  iA = pABCD[0];
  356|  1.28M|  iB = pABCD[1];
  357|  1.28M|  iC = pABCD[2];
  358|  1.28M|  iD = pABCD[3];
  359|  4.09M|  for (i = 0; i < iHeight; i++) {
  ------------------
  |  Branch (359:15): [True: 2.80M, False: 1.28M]
  ------------------
  360|  8.42M|    for (j = 0; j < iWidth; j++) {
  ------------------
  |  Branch (360:17): [True: 5.61M, False: 2.80M]
  ------------------
  361|  5.61M|      pDst[j] = (iA * pSrc[j] + iB * pSrc[j + 1] + iC * pSrcNext[j] + iD * pSrcNext[j + 1] + 32) >> 6;
  362|  5.61M|    }
  363|  2.80M|    pDst     += iDstStride;
  364|  2.80M|    pSrc      = pSrcNext;
  365|  2.80M|    pSrcNext += iSrcStride;
  366|  2.80M|  }
  367|  1.28M|}
mc.cpp:_ZN12_GLOBAL__N_111McCopy_sse2EPKhiPhiii:
  440|   160M|                                int32_t iHeight) {
  441|   160M|  if (iWidth == 16)
  ------------------
  |  Branch (441:7): [True: 0, False: 160M]
  ------------------
  442|      0|    McCopyWidthEq16_sse2 (pSrc, iSrcStride, pDst, iDstStride, iHeight);
  443|   160M|  else if (iWidth == 8)
  ------------------
  |  Branch (443:12): [True: 7.25M, False: 152M]
  ------------------
  444|  7.25M|    McCopyWidthEq8_mmx (pSrc, iSrcStride, pDst, iDstStride, iHeight);
  445|   152M|  else if (iWidth == 4)
  ------------------
  |  Branch (445:12): [True: 149M, False: 2.94M]
  ------------------
  446|   149M|    McCopyWidthEq4_c (pSrc, iSrcStride, pDst, iDstStride, iHeight);
  447|  2.94M|  else
  448|  2.94M|    McCopyWidthEq2_c (pSrc, iSrcStride, pDst, iDstStride, iHeight);
  449|   160M|}
mc.cpp:_ZN12_GLOBAL__N_114McChroma_ssse3EPKhiPhissii:
  892|   163M|                     int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight) {
  893|   163M|  static const PMcChromaWidthExtFunc kpMcChromaWidthFuncs[2] = {
  894|   163M|    McChromaWidthEq4_mmx,
  895|   163M|    McChromaWidthEq8_ssse3
  896|   163M|  };
  897|   163M|  const int32_t kiD8x = iMvX & 0x07;
  898|   163M|  const int32_t kiD8y = iMvY & 0x07;
  899|   163M|  if (kiD8x == 0 && kiD8y == 0) {
  ------------------
  |  Branch (899:7): [True: 161M, False: 2.24M]
  |  Branch (899:21): [True: 160M, False: 836k]
  ------------------
  900|   160M|    McCopy_sse2 (pSrc, iSrcStride, pDst, iDstStride, iWidth, iHeight);
  901|   160M|    return;
  902|   160M|  }
  903|  3.08M|  if (iWidth != 2) {
  ------------------
  |  Branch (903:7): [True: 1.79M, False: 1.28M]
  ------------------
  904|  1.79M|    kpMcChromaWidthFuncs[iWidth >> 3] (pSrc, iSrcStride, pDst, iDstStride, g_kuiABCD[kiD8y][kiD8x], iHeight);
  905|  1.79M|  } else
  906|  1.28M|    McChromaWithFragMv_c (pSrc, iSrcStride, pDst, iDstStride, iMvX, iMvY, iWidth, iHeight);
  907|  3.08M|}
mc.cpp:_ZN12_GLOBAL__N_111McCopy_sse3EPKhiPhiii:
  730|  80.2M|                  int32_t iWidth, int32_t iHeight) {
  731|  80.2M|  switch (iWidth) {
  ------------------
  |  Branch (731:11): [True: 80.2M, False: 0]
  ------------------
  732|  3.64M|  case 16: return McCopyWidthEq16_sse3 (pSrc, iSrcStride, pDst, iDstStride, iHeight);
  ------------------
  |  Branch (732:3): [True: 3.64M, False: 76.5M]
  ------------------
  733|  75.0M|  case 8:  return McCopyWidthEq8_mmx (pSrc, iSrcStride, pDst, iDstStride, iHeight);
  ------------------
  |  Branch (733:3): [True: 75.0M, False: 5.16M]
  ------------------
  734|  1.51M|  case 4:  return McCopyWidthEq4_c (pSrc, iSrcStride, pDst, iDstStride, iHeight);
  ------------------
  |  Branch (734:3): [True: 1.51M, False: 78.6M]
  ------------------
  735|  80.2M|  }
  736|      0|  return McCopyWidthEq2_c (pSrc, iSrcStride, pDst, iDstStride, iHeight);
  737|  80.2M|}
mc.cpp:_ZN12_GLOBAL__N_126PixelAvgWidth4Or8Or16_sse2EPhiPKhiS2_iii:
  719|   930k|                                 const uint8_t* pSrcB, int32_t iSrcBStride, int32_t iWidth, int32_t iHeight) {
  720|   930k|  if (iWidth < 8) {
  ------------------
  |  Branch (720:7): [True: 410k, False: 519k]
  ------------------
  721|   410k|    PixelAvgWidthEq4_mmx   (pDst, iDstStride, pSrcA, iSrcAStride, pSrcB, iSrcBStride, iHeight);
  722|   519k|  } else if (iWidth == 8) {
  ------------------
  |  Branch (722:14): [True: 326k, False: 193k]
  ------------------
  723|   326k|    PixelAvgWidthEq8_mmx   (pDst, iDstStride, pSrcA, iSrcAStride, pSrcB, iSrcBStride, iHeight);
  724|   326k|  } else {
  725|   193k|    PixelAvgWidthEq16_sse2 (pDst, iDstStride, pSrcA, iSrcAStride, pSrcB, iSrcBStride, iHeight);
  726|   193k|  }
  727|   930k|}
mc.cpp:_ZN12_GLOBAL__N_111McLuma_avx2EPKhiPhissii:
 1059|  81.6M|                  int16_t iMvX, int16_t iMvY, int32_t iWidth, int32_t iHeight) {
 1060|  81.6M|  static const PWelsMcWidthHeightFunc pWelsMcFunc[4][4] = {
 1061|  81.6M|    {McCopy_sse3,     McHorVer01_avx2, McHorVer02_avx2, McHorVer03_avx2},
 1062|  81.6M|    {McHorVer10_avx2, McHorVer11_avx2, McHorVer12_avx2, McHorVer13_avx2},
 1063|  81.6M|    {McHorVer20_avx2, McHorVer21_avx2, McHorVer22_avx2, McHorVer23_avx2},
 1064|  81.6M|    {McHorVer30_avx2, McHorVer31_avx2, McHorVer32_avx2, McHorVer33_avx2},
 1065|  81.6M|  };
 1066|       |
 1067|  81.6M|  pWelsMcFunc[iMvX & 0x03][iMvY & 0x03] (pSrc, iSrcStride, pDst, iDstStride, iWidth, iHeight);
 1068|  81.6M|}
mc.cpp:_ZN12_GLOBAL__N_115McHorVer01_avx2EPKhiPhiii:
  931|   164k|                      int32_t iWidth, int32_t iHeight) {
  932|   164k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pTmp, 16, 16, 16);
  ------------------
  |  |   63|   164k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|   164k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|   164k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|   164k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|   164k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (932:3): [True: 0, Folded]
  |  Branch (932:3): [True: 0, Folded]
  |  Branch (932:3): [True: 0, Folded]
  |  Branch (932:3): [True: 164k, Folded]
  ------------------
  933|   164k|  McHorVer02_avx2 (pSrc, iSrcStride, &pTmp[0][0], sizeof *pTmp, iWidth, iHeight);
  934|   164k|  PixelAvgWidth4Or8Or16_sse2 (pDst, iDstStride, pSrc, iSrcStride,
  935|   164k|                              &pTmp[0][0], sizeof *pTmp, iWidth, iHeight);
  936|   164k|}
mc.cpp:_ZN12_GLOBAL__N_115McHorVer03_avx2EPKhiPhiii:
  939|   122k|                      int32_t iWidth, int32_t iHeight) {
  940|   122k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pTmp, 16, 16, 16);
  ------------------
  |  |   63|   122k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|   122k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|   122k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|   122k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|   122k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (940:3): [True: 0, Folded]
  |  Branch (940:3): [True: 0, Folded]
  |  Branch (940:3): [True: 0, Folded]
  |  Branch (940:3): [True: 122k, Folded]
  ------------------
  941|   122k|  McHorVer02_avx2 (pSrc, iSrcStride, &pTmp[0][0], sizeof *pTmp, iWidth, iHeight);
  942|   122k|  PixelAvgWidth4Or8Or16_sse2 (pDst, iDstStride, pSrc + iSrcStride, iSrcStride,
  943|   122k|                              &pTmp[0][0], sizeof *pTmp, iWidth, iHeight);
  944|   122k|}
mc.cpp:_ZN12_GLOBAL__N_115McHorVer10_avx2EPKhiPhiii:
  947|   121k|                      int32_t iWidth, int32_t iHeight) {
  948|   121k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pTmp, 16, 16, 16);
  ------------------
  |  |   63|   121k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|   121k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|   121k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|   121k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|   121k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (948:3): [True: 0, Folded]
  |  Branch (948:3): [True: 0, Folded]
  |  Branch (948:3): [True: 0, Folded]
  |  Branch (948:3): [True: 121k, Folded]
  ------------------
  949|   121k|  McHorVer20_avx2 (pSrc, iSrcStride, &pTmp[0][0], sizeof *pTmp, iWidth, iHeight);
  950|   121k|  PixelAvgWidth4Or8Or16_sse2 (pDst, iDstStride, pSrc, iSrcStride,
  951|   121k|                              &pTmp[0][0], sizeof *pTmp, iWidth, iHeight);
  952|   121k|}
mc.cpp:_ZN12_GLOBAL__N_115McHorVer11_avx2EPKhiPhiii:
  955|  63.8k|                      int32_t iWidth, int32_t iHeight) {
  956|  63.8k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pHorTmp, 16, 16, 16);
  ------------------
  |  |   63|  63.8k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  63.8k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  63.8k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  63.8k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  63.8k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (956:3): [True: 0, Folded]
  |  Branch (956:3): [True: 0, Folded]
  |  Branch (956:3): [True: 0, Folded]
  |  Branch (956:3): [True: 63.8k, Folded]
  ------------------
  957|  63.8k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pVerTmp, 16, 16, 16);
  ------------------
  |  |   63|  63.8k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  63.8k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  63.8k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  63.8k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  63.8k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (957:3): [True: 0, Folded]
  |  Branch (957:3): [True: 0, Folded]
  |  Branch (957:3): [True: 0, Folded]
  |  Branch (957:3): [True: 63.8k, Folded]
  ------------------
  958|  63.8k|  McHorVer20_avx2 (pSrc, iSrcStride, &pHorTmp[0][0], sizeof *pHorTmp, iWidth, iHeight);
  959|  63.8k|  McHorVer02_avx2 (pSrc, iSrcStride, &pVerTmp[0][0], sizeof *pVerTmp, iWidth, iHeight);
  960|  63.8k|  PixelAvgWidth4Or8Or16_sse2 (pDst, iDstStride, &pHorTmp[0][0], sizeof *pHorTmp,
  961|  63.8k|                              &pVerTmp[0][0], sizeof *pVerTmp, iWidth, iHeight);
  962|  63.8k|}
mc.cpp:_ZN12_GLOBAL__N_115McHorVer12_avx2EPKhiPhiii:
  965|  48.5k|                      int32_t iWidth, int32_t iHeight) {
  966|  48.5k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pVerTmp, 16, 16, 16);
  ------------------
  |  |   63|  48.5k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  48.5k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  48.5k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  48.5k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  48.5k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (966:3): [True: 0, Folded]
  |  Branch (966:3): [True: 0, Folded]
  |  Branch (966:3): [True: 0, Folded]
  |  Branch (966:3): [True: 48.5k, Folded]
  ------------------
  967|  48.5k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pCtrTmp, 16, 16, 16);
  ------------------
  |  |   63|  48.5k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  48.5k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  48.5k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  48.5k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  48.5k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (967:3): [True: 0, Folded]
  |  Branch (967:3): [True: 0, Folded]
  |  Branch (967:3): [True: 0, Folded]
  |  Branch (967:3): [True: 48.5k, Folded]
  ------------------
  968|  48.5k|  McHorVer02_avx2 (pSrc, iSrcStride, &pVerTmp[0][0], sizeof *pVerTmp, iWidth, iHeight);
  969|  48.5k|  McHorVer22_avx2 (pSrc, iSrcStride, &pCtrTmp[0][0], sizeof *pCtrTmp, iWidth, iHeight);
  970|  48.5k|  PixelAvgWidth4Or8Or16_sse2 (pDst, iDstStride, &pVerTmp[0][0], sizeof *pVerTmp,
  971|  48.5k|                              &pCtrTmp[0][0], sizeof *pCtrTmp, iWidth, iHeight);
  972|  48.5k|}
mc.cpp:_ZN12_GLOBAL__N_115McHorVer13_avx2EPKhiPhiii:
  975|  62.3k|                      int32_t iWidth, int32_t iHeight) {
  976|  62.3k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pHorTmp, 16, 16, 16);
  ------------------
  |  |   63|  62.3k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  62.3k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  62.3k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  62.3k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  62.3k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (976:3): [True: 0, Folded]
  |  Branch (976:3): [True: 0, Folded]
  |  Branch (976:3): [True: 0, Folded]
  |  Branch (976:3): [True: 62.3k, Folded]
  ------------------
  977|  62.3k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pVerTmp, 16, 16, 16);
  ------------------
  |  |   63|  62.3k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  62.3k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  62.3k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  62.3k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  62.3k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (977:3): [True: 0, Folded]
  |  Branch (977:3): [True: 0, Folded]
  |  Branch (977:3): [True: 0, Folded]
  |  Branch (977:3): [True: 62.3k, Folded]
  ------------------
  978|  62.3k|  McHorVer20_avx2 (pSrc + iSrcStride, iSrcStride, &pHorTmp[0][0], sizeof *pHorTmp, iWidth, iHeight);
  979|  62.3k|  McHorVer02_avx2 (pSrc,              iSrcStride, &pVerTmp[0][0], sizeof *pVerTmp, iWidth, iHeight);
  980|  62.3k|  PixelAvgWidth4Or8Or16_sse2 (pDst, iDstStride, &pHorTmp[0][0], sizeof *pHorTmp,
  981|  62.3k|                              &pVerTmp[0][0], sizeof *pVerTmp, iWidth, iHeight);
  982|  62.3k|}
mc.cpp:_ZN12_GLOBAL__N_115McHorVer21_avx2EPKhiPhiii:
  985|  42.3k|                      int32_t iWidth, int32_t iHeight) {
  986|  42.3k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pHorTmp, 16, 16, 16);
  ------------------
  |  |   63|  42.3k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  42.3k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  42.3k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  42.3k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  42.3k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (986:3): [True: 0, Folded]
  |  Branch (986:3): [True: 0, Folded]
  |  Branch (986:3): [True: 0, Folded]
  |  Branch (986:3): [True: 42.3k, Folded]
  ------------------
  987|  42.3k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pCtrTmp, 16, 16, 16);
  ------------------
  |  |   63|  42.3k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  42.3k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  42.3k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  42.3k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  42.3k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (987:3): [True: 0, Folded]
  |  Branch (987:3): [True: 0, Folded]
  |  Branch (987:3): [True: 0, Folded]
  |  Branch (987:3): [True: 42.3k, Folded]
  ------------------
  988|  42.3k|  McHorVer20_avx2 (pSrc, iSrcStride, &pHorTmp[0][0], sizeof *pHorTmp, iWidth, iHeight);
  989|  42.3k|  McHorVer22_avx2 (pSrc, iSrcStride, &pCtrTmp[0][0], sizeof *pCtrTmp, iWidth, iHeight);
  990|  42.3k|  PixelAvgWidth4Or8Or16_sse2 (pDst, iDstStride, &pHorTmp[0][0], sizeof *pHorTmp,
  991|  42.3k|                              &pCtrTmp[0][0], sizeof *pCtrTmp, iWidth, iHeight);
  992|  42.3k|}
mc.cpp:_ZN12_GLOBAL__N_115McHorVer22_avx2EPKhiPhiii:
  916|   216k|                      int32_t iWidth, int32_t iHeight) {
  917|   216k|  ENFORCE_STACK_ALIGN_2D (int16_t, pTmp, 16 + 5, 16, 32);
  ------------------
  |  |   63|   216k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|   216k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|   216k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|   216k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|   216k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (917:3): [True: 0, Folded]
  |  Branch (917:3): [True: 0, Folded]
  |  Branch (917:3): [True: 0, Folded]
  |  Branch (917:3): [True: 216k, Folded]
  ------------------
  918|   216k|  if (iWidth < 8) {
  ------------------
  |  Branch (918:7): [True: 107k, False: 108k]
  ------------------
  919|   107k|    McHorVer20Width4U8ToS16_avx2 (pSrc, iSrcStride, &pTmp[0][0], iHeight + 5);
  920|   107k|    McHorVer02Width4S16ToU8_avx2 (&pTmp[0][0], pDst, iDstStride, iHeight);
  921|   108k|  } else if (iWidth == 8) {
  ------------------
  |  Branch (921:14): [True: 66.8k, False: 42.0k]
  ------------------
  922|  66.8k|    McHorVer20Width8U8ToS16_avx2 (pSrc, iSrcStride, &pTmp[0][0], iHeight + 5);
  923|  66.8k|    McHorVer02Width8S16ToU8_avx2 (&pTmp[0][0], pDst, iDstStride, iHeight);
  924|  66.8k|  } else {
  925|  42.0k|    McHorVer20Width16U8ToS16_avx2 (pSrc, iSrcStride, &pTmp[0][0], iHeight + 5);
  926|  42.0k|    McHorVer02Width16Or17S16ToU8_avx2 (&pTmp[0][0], sizeof *pTmp, pDst, iDstStride, iWidth, iHeight);
  927|  42.0k|  }
  928|   216k|}
mc.cpp:_ZN12_GLOBAL__N_115McHorVer23_avx2EPKhiPhiii:
  995|  41.3k|                      int32_t iWidth, int32_t iHeight) {
  996|  41.3k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pHorTmp, 16, 16, 16);
  ------------------
  |  |   63|  41.3k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  41.3k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  41.3k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  41.3k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  41.3k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (996:3): [True: 0, Folded]
  |  Branch (996:3): [True: 0, Folded]
  |  Branch (996:3): [True: 0, Folded]
  |  Branch (996:3): [True: 41.3k, Folded]
  ------------------
  997|  41.3k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pCtrTmp, 16, 16, 16);
  ------------------
  |  |   63|  41.3k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  41.3k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  41.3k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  41.3k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  41.3k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (997:3): [True: 0, Folded]
  |  Branch (997:3): [True: 0, Folded]
  |  Branch (997:3): [True: 0, Folded]
  |  Branch (997:3): [True: 41.3k, Folded]
  ------------------
  998|  41.3k|  McHorVer20_avx2 (pSrc + iSrcStride, iSrcStride, &pHorTmp[0][0], sizeof *pHorTmp, iWidth, iHeight);
  999|  41.3k|  McHorVer22_avx2 (pSrc,              iSrcStride, &pCtrTmp[0][0], sizeof *pCtrTmp, iWidth, iHeight);
 1000|  41.3k|  PixelAvgWidth4Or8Or16_sse2 (pDst, iDstStride, &pHorTmp[0][0], sizeof *pHorTmp,
 1001|  41.3k|                              &pCtrTmp[0][0], sizeof *pCtrTmp, iWidth, iHeight);
 1002|  41.3k|}
mc.cpp:_ZN12_GLOBAL__N_115McHorVer30_avx2EPKhiPhiii:
 1005|   117k|                      int32_t iWidth, int32_t iHeight) {
 1006|   117k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pTmp, 16, 16, 16);
  ------------------
  |  |   63|   117k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|   117k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|   117k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|   117k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|   117k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (1006:3): [True: 0, Folded]
  |  Branch (1006:3): [True: 0, Folded]
  |  Branch (1006:3): [True: 0, Folded]
  |  Branch (1006:3): [True: 117k, Folded]
  ------------------
 1007|   117k|  McHorVer20_avx2 (pSrc, iSrcStride, &pTmp[0][0], sizeof *pTmp, iWidth, iHeight);
 1008|   117k|  PixelAvgWidth4Or8Or16_sse2 (pDst, iDstStride, pSrc + 1, iSrcStride, &pTmp[0][0], sizeof *pTmp, iWidth, iHeight);
 1009|   117k|}
mc.cpp:_ZN12_GLOBAL__N_115McHorVer31_avx2EPKhiPhiii:
 1012|  48.1k|                      int32_t iWidth, int32_t iHeight) {
 1013|  48.1k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pHorTmp, 16, 16, 16);
  ------------------
  |  |   63|  48.1k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  48.1k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  48.1k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  48.1k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  48.1k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (1013:3): [True: 0, Folded]
  |  Branch (1013:3): [True: 0, Folded]
  |  Branch (1013:3): [True: 0, Folded]
  |  Branch (1013:3): [True: 48.1k, Folded]
  ------------------
 1014|  48.1k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pVerTmp, 16, 16, 16);
  ------------------
  |  |   63|  48.1k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  48.1k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  48.1k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  48.1k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  48.1k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (1014:3): [True: 0, Folded]
  |  Branch (1014:3): [True: 0, Folded]
  |  Branch (1014:3): [True: 0, Folded]
  |  Branch (1014:3): [True: 48.1k, Folded]
  ------------------
 1015|  48.1k|  McHorVer20_avx2 (pSrc,     iSrcStride, &pHorTmp[0][0], sizeof *pHorTmp, iWidth, iHeight);
 1016|  48.1k|  McHorVer02_avx2 (pSrc + 1, iSrcStride, &pVerTmp[0][0], sizeof *pVerTmp, iWidth, iHeight);
 1017|  48.1k|  PixelAvgWidth4Or8Or16_sse2 (pDst, iDstStride, &pHorTmp[0][0], sizeof *pHorTmp,
 1018|  48.1k|                              &pVerTmp[0][0], sizeof *pVerTmp, iWidth, iHeight);
 1019|  48.1k|}
mc.cpp:_ZN12_GLOBAL__N_115McHorVer32_avx2EPKhiPhiii:
 1022|  51.2k|                      int32_t iWidth, int32_t iHeight) {
 1023|  51.2k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pVerTmp, 16, 16, 16);
  ------------------
  |  |   63|  51.2k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  51.2k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  51.2k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  51.2k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  51.2k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (1023:3): [True: 0, Folded]
  |  Branch (1023:3): [True: 0, Folded]
  |  Branch (1023:3): [True: 0, Folded]
  |  Branch (1023:3): [True: 51.2k, Folded]
  ------------------
 1024|  51.2k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pCtrTmp, 16, 16, 16);
  ------------------
  |  |   63|  51.2k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  51.2k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  51.2k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  51.2k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  51.2k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (1024:3): [True: 0, Folded]
  |  Branch (1024:3): [True: 0, Folded]
  |  Branch (1024:3): [True: 0, Folded]
  |  Branch (1024:3): [True: 51.2k, Folded]
  ------------------
 1025|  51.2k|  McHorVer02_avx2 (pSrc + 1, iSrcStride, &pVerTmp[0][0], sizeof *pVerTmp, iWidth, iHeight);
 1026|  51.2k|  McHorVer22_avx2 (pSrc,     iSrcStride, &pCtrTmp[0][0], sizeof *pCtrTmp, iWidth, iHeight);
 1027|  51.2k|  PixelAvgWidth4Or8Or16_sse2 (pDst, iDstStride, &pVerTmp[0][0], sizeof *pVerTmp,
 1028|  51.2k|                              &pCtrTmp[0][0], sizeof *pCtrTmp, iWidth, iHeight);
 1029|  51.2k|}
mc.cpp:_ZN12_GLOBAL__N_115McHorVer33_avx2EPKhiPhiii:
 1032|  46.6k|                      int32_t iWidth, int32_t iHeight) {
 1033|  46.6k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pHorTmp, 16, 16, 16);
  ------------------
  |  |   63|  46.6k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  46.6k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  46.6k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  46.6k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  46.6k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (1033:3): [True: 0, Folded]
  |  Branch (1033:3): [True: 0, Folded]
  |  Branch (1033:3): [True: 0, Folded]
  |  Branch (1033:3): [True: 46.6k, Folded]
  ------------------
 1034|  46.6k|  ENFORCE_STACK_ALIGN_2D (uint8_t, pVerTmp, 16, 16, 16);
  ------------------
  |  |   63|  46.6k|    assert( ((_al) && !((_al) & ((_al) - 1))) && ((_al) >= sizeof(_tp)) ); /*_al should be power-of-2 and >= sizeof(_tp)*/\
  |  |   64|  46.6k|    _tp _nm ## _tEmP[(_cx)*(_cy)+(_al)/sizeof(_tp)-1]; \
  |  |   65|  46.6k|    _tp *_nm ## _tEmP_al = _nm ## _tEmP + ((_al)/sizeof(_tp)-1); \
  |  |   66|  46.6k|    _nm ## _tEmP_al -= (((uintptr_t)_nm ## _tEmP_al & ((_al)-1))/sizeof(_tp)); \
  |  |   67|  46.6k|    _tp (*_nm)[(_cy)] = (_tp (*)[(_cy)])_nm ## _tEmP_al;
  ------------------
  |  Branch (1034:3): [True: 0, Folded]
  |  Branch (1034:3): [True: 0, Folded]
  |  Branch (1034:3): [True: 0, Folded]
  |  Branch (1034:3): [True: 46.6k, Folded]
  ------------------
 1035|  46.6k|  McHorVer20_avx2 (pSrc + iSrcStride, iSrcStride, &pHorTmp[0][0], sizeof *pHorTmp, iWidth, iHeight);
 1036|  46.6k|  McHorVer02_avx2 (pSrc + 1,          iSrcStride, &pVerTmp[0][0], sizeof *pVerTmp, iWidth, iHeight);
 1037|  46.6k|  PixelAvgWidth4Or8Or16_sse2 (pDst, iDstStride, &pHorTmp[0][0], sizeof *pHorTmp,
 1038|  46.6k|                              &pVerTmp[0][0], sizeof *pVerTmp, iWidth, iHeight);
 1039|  46.6k|}

_ZN10WelsCommon12CMemoryAlignC2Ej:
   49|  26.4k|  : m_nMemoryUsageInBytes (0)
   50|       |#endif//MEMORY_MONITOR
   51|  26.4k|{
   52|  26.4k|  if ((kuiCacheLineSize == 0) || (kuiCacheLineSize & 0x0f))
  ------------------
  |  Branch (52:7): [True: 0, False: 26.4k]
  |  Branch (52:34): [True: 0, False: 26.4k]
  ------------------
   53|      0|    m_nCacheLineSize = 0x10;
   54|  26.4k|  else
   55|  26.4k|    m_nCacheLineSize = kuiCacheLineSize;
   56|  26.4k|}
_ZN10WelsCommon12CMemoryAlignD2Ev:
   58|  26.4k|CMemoryAlign::~CMemoryAlign() {
   59|  26.4k|#ifdef MEMORY_MONITOR
   60|       |  assert (m_nMemoryUsageInBytes == 0);
  ------------------
  |  Branch (60:3): [True: 26.4k, False: 0]
  ------------------
   61|  26.4k|#endif//MEMORY_MONITOR
   62|  26.4k|}
_ZN10WelsCommon10WelsMallocEjPKcj:
   64|  3.17M|void* WelsMalloc (const uint32_t kuiSize, const char* kpTag, const uint32_t kiAlign) {
   65|  3.17M|  const uint32_t kiSizeOfVoidPointer     = sizeof (void**);
   66|  3.17M|  const uint32_t kiSizeOfInt             = sizeof (int32_t);
   67|  3.17M|  const uint32_t kiAlignedBytes          = kiAlign - 1;
   68|  3.17M|  const uint32_t kiTrialRequestedSize    = kuiSize + kiAlignedBytes + kiSizeOfVoidPointer + kiSizeOfInt;
   69|  3.17M|  const uint32_t kiActualRequestedSize   = kiTrialRequestedSize;
   70|  3.17M|  const uint32_t kiPayloadSize          = kuiSize;
   71|       |
   72|  3.17M|  uint8_t* pBuf = (uint8_t*) malloc (kiActualRequestedSize);
   73|  3.17M|  if (NULL == pBuf)
  ------------------
  |  Branch (73:7): [True: 0, False: 3.17M]
  ------------------
   74|      0|    return NULL;
   75|       |
   76|       |#ifdef MEMORY_CHECK
   77|       |  if (fpMemChkPoint == NULL) {
   78|       |    fpMemChkPoint    = fopen ("./enc_mem_check_point.txt",  "at+");
   79|       |    nCountRequestNum = 0;
   80|       |  }
   81|       |
   82|       |  if (fpMemChkPoint != NULL) {
   83|       |    if (kpTag != NULL)
   84|       |      fprintf (fpMemChkPoint, "WelsMalloc(), 0x%x : actual uiSize:\t%d\tbytes, input uiSize: %d bytes, %d - %s\n",
   85|       |               (void*)pBuf, kiActualRequestedSize, kuiSize, nCountRequestNum++, kpTag);
   86|       |    else
   87|       |      fprintf (fpMemChkPoint, "WelsMalloc(), 0x%x : actual uiSize:\t%d\tbytes, input uiSize: %d bytes, %d \n", (void*)pBuf,
   88|       |               kiActualRequestedSize, kuiSize, nCountRequestNum++);
   89|       |    fflush (fpMemChkPoint);
   90|       |  }
   91|       |#endif
   92|  3.17M|  uint8_t* pAlignedBuffer;
   93|  3.17M|  pAlignedBuffer = pBuf + kiAlignedBytes + kiSizeOfVoidPointer + kiSizeOfInt;
   94|  3.17M|  pAlignedBuffer -= ((uintptr_t) pAlignedBuffer & kiAlignedBytes);
   95|  3.17M|  * ((void**) (pAlignedBuffer - kiSizeOfVoidPointer)) = pBuf;
   96|  3.17M|  * ((int32_t*) (pAlignedBuffer - (kiSizeOfVoidPointer + kiSizeOfInt))) = kiPayloadSize;
   97|       |
   98|  3.17M|  return pAlignedBuffer;
   99|  3.17M|}
_ZN10WelsCommon8WelsFreeEPvPKc:
  101|  3.20M|void WelsFree (void* pPointer, const char* kpTag) {
  102|  3.20M|  if (pPointer) {
  ------------------
  |  Branch (102:7): [True: 3.17M, False: 27.1k]
  ------------------
  103|       |#ifdef MEMORY_CHECK
  104|       |    if (fpMemChkPoint != NULL) {
  105|       |      if (kpTag != NULL)
  106|       |        fprintf (fpMemChkPoint, "WelsFree(), 0x%x - %s: \t%d\t bytes \n", (void*) (* (((void**) pPointer) - 1)), kpTag,
  107|       |                 g_iMemoryLength);
  108|       |      else
  109|       |        fprintf (fpMemChkPoint, "WelsFree(), 0x%x \n", (void*) (* (((void**) pPointer) - 1)));
  110|       |      fflush (fpMemChkPoint);
  111|       |    }
  112|       |#endif
  113|  3.17M|    free (* (((void**) pPointer) - 1));
  114|  3.17M|  }
  115|  3.20M|}
_ZN10WelsCommon12CMemoryAlign11WelsMalloczEjPKc:
  117|  3.14M|void* CMemoryAlign::WelsMallocz (const uint32_t kuiSize, const char* kpTag) {
  118|  3.14M|  void* pPointer = WelsMalloc (kuiSize, kpTag);
  119|  3.14M|  if (NULL == pPointer) {
  ------------------
  |  Branch (119:7): [True: 0, False: 3.14M]
  ------------------
  120|      0|    return NULL;
  121|      0|  }
  122|       |  // zero memory
  123|  3.14M|  memset (pPointer, 0, kuiSize);
  124|       |
  125|  3.14M|  return pPointer;
  126|  3.14M|}
_ZN10WelsCommon12CMemoryAlign10WelsMallocEjPKc:
  128|  3.14M|void* CMemoryAlign::WelsMalloc (const uint32_t kuiSize, const char* kpTag) {
  129|  3.14M|  void* pPointer = WelsCommon::WelsMalloc (kuiSize, kpTag, m_nCacheLineSize);
  130|  3.14M|#ifdef MEMORY_MONITOR
  131|  3.14M|  if (pPointer != NULL) {
  ------------------
  |  Branch (131:7): [True: 3.14M, False: 0]
  ------------------
  132|  3.14M|    const int32_t kiMemoryLength = * ((int32_t*) ((uint8_t*)pPointer - sizeof (void**) - sizeof (
  133|  3.14M|                                        int32_t))) + m_nCacheLineSize - 1 + sizeof (void**) + sizeof (int32_t);
  134|  3.14M|    m_nMemoryUsageInBytes += kiMemoryLength;
  135|       |#ifdef MEMORY_CHECK
  136|       |    g_iMemoryLength = kiMemoryLength;
  137|       |#endif
  138|  3.14M|  }
  139|  3.14M|#endif//MEMORY_MONITOR
  140|  3.14M|  return pPointer;
  141|  3.14M|}
_ZN10WelsCommon12CMemoryAlign8WelsFreeEPvPKc:
  143|  3.17M|void CMemoryAlign::WelsFree (void* pPointer, const char* kpTag) {
  144|  3.17M|#ifdef MEMORY_MONITOR
  145|  3.17M|  if (pPointer) {
  ------------------
  |  Branch (145:7): [True: 3.14M, False: 27.1k]
  ------------------
  146|  3.14M|    const int32_t kiMemoryLength = * ((int32_t*) ((uint8_t*)pPointer - sizeof (void**) - sizeof (
  147|  3.14M|                                        int32_t))) + m_nCacheLineSize - 1 + sizeof (void**) + sizeof (int32_t);
  148|  3.14M|    m_nMemoryUsageInBytes -= kiMemoryLength;
  149|       |#ifdef MEMORY_CHECK
  150|       |    g_iMemoryLength = kiMemoryLength;
  151|       |#endif
  152|  3.14M|  }
  153|  3.17M|#endif//MEMORY_MONITOR
  154|  3.17M|  WelsCommon::WelsFree (pPointer, kpTag);
  155|  3.17M|}
_ZN10WelsCommon11WelsMalloczEjPKc:
  157|  26.4k|void* WelsMallocz (const uint32_t kuiSize, const char* kpTag) {
  158|  26.4k|  void* pPointer = WelsMalloc (kuiSize, kpTag, 16);
  159|  26.4k|  if (NULL == pPointer) {
  ------------------
  |  Branch (159:7): [True: 0, False: 26.4k]
  ------------------
  160|      0|    return NULL;
  161|      0|  }
  162|  26.4k|  memset (pPointer, 0, kuiSize);
  163|  26.4k|  return pPointer;
  164|  26.4k|}
_ZNK10WelsCommon12CMemoryAlign18WelsGetMemoryUsageEv:
  170|  71.4k|const uint32_t CMemoryAlign::WelsGetMemoryUsage() const {
  171|  71.4k|  return m_nMemoryUsageInBytes;
  172|  71.4k|}

_Z7WelsLogP13TagLogContextiPKcz:
   51|  9.08M|void WelsLog (SLogContext* logCtx, int32_t iLevel, const char* kpFmt, ...) {
   52|  9.08M|  va_list vl;
   53|  9.08M|  char pTraceTag[MAX_LOG_SIZE] = {0};
   54|  9.08M|  switch (iLevel) {
   55|   158k|  case WELS_LOG_ERROR:
  ------------------
  |  Branch (55:3): [True: 158k, False: 8.92M]
  ------------------
   56|   158k|    WelsSnprintf (pTraceTag, MAX_LOG_SIZE, "[OpenH264] this = 0x%p, Error:", logCtx->pCodecInstance);
  ------------------
  |  |   45|   158k|#define MAX_LOG_SIZE    1024
  ------------------
   57|   158k|    break;
   58|  5.13M|  case WELS_LOG_WARNING:
  ------------------
  |  Branch (58:3): [True: 5.13M, False: 3.95M]
  ------------------
   59|  5.13M|    WelsSnprintf (pTraceTag, MAX_LOG_SIZE, "[OpenH264] this = 0x%p, Warning:", logCtx->pCodecInstance);
  ------------------
  |  |   45|  5.13M|#define MAX_LOG_SIZE    1024
  ------------------
   60|  5.13M|    break;
   61|   363k|  case WELS_LOG_INFO:
  ------------------
  |  Branch (61:3): [True: 363k, False: 8.72M]
  ------------------
   62|   363k|    WelsSnprintf (pTraceTag, MAX_LOG_SIZE, "[OpenH264] this = 0x%p, Info:", logCtx->pCodecInstance);
  ------------------
  |  |   45|   363k|#define MAX_LOG_SIZE    1024
  ------------------
   63|   363k|    break;
   64|  3.43M|  case WELS_LOG_DEBUG:
  ------------------
  |  Branch (64:3): [True: 3.43M, False: 5.65M]
  ------------------
   65|  3.43M|    WelsSnprintf (pTraceTag, MAX_LOG_SIZE, "[OpenH264] this = 0x%p, Debug:", logCtx->pCodecInstance);
  ------------------
  |  |   45|  3.43M|#define MAX_LOG_SIZE    1024
  ------------------
   66|  3.43M|    break;
   67|      0|  default:
  ------------------
  |  Branch (67:3): [True: 0, False: 9.08M]
  ------------------
   68|      0|    WelsSnprintf (pTraceTag, MAX_LOG_SIZE, "[OpenH264] this = 0x%p, Detail:", logCtx->pCodecInstance);
  ------------------
  |  |   45|      0|#define MAX_LOG_SIZE    1024
  ------------------
   69|      0|    break;
   70|  9.08M|  }
   71|  9.08M|  WelsStrcat (pTraceTag, MAX_LOG_SIZE, kpFmt);
  ------------------
  |  |   45|  9.08M|#define MAX_LOG_SIZE    1024
  ------------------
   72|  9.08M|  va_start (vl, kpFmt);
   73|  9.08M|  logCtx->pfLog (logCtx->pLogCtx, iLevel, pTraceTag, vl);
   74|       |  va_end (vl);
   75|  9.08M|}

_ZN14welsCodecTraceC2Ev:
   53|  22.0k|welsCodecTrace::welsCodecTrace() {
   54|       |
   55|  22.0k|  m_iTraceLevel = WELS_LOG_DEFAULT;
   56|  22.0k|  m_fpTrace = welsStderrTrace;
   57|  22.0k|  m_pTraceCtx = NULL;
   58|       |
   59|  22.0k|  m_sLogCtx.pLogCtx = this;
   60|  22.0k|  m_sLogCtx.pfLog = StaticCodecTrace;
   61|       |  m_sLogCtx.pCodecInstance = NULL;
   62|  22.0k|}
_ZN14welsCodecTraceD2Ev:
   64|  22.0k|welsCodecTrace::~welsCodecTrace() {
   65|       |  m_fpTrace = NULL;
   66|  22.0k|}
_ZN14welsCodecTrace16StaticCodecTraceEPviPKcP13__va_list_tag:
   70|  9.08M|void welsCodecTrace::StaticCodecTrace (void* pCtx, const int32_t iLevel, const char* Str_Format, va_list vl) {
   71|  9.08M|  welsCodecTrace* self = (welsCodecTrace*) pCtx;
   72|  9.08M|  self->CodecTrace (iLevel, Str_Format, vl);
   73|  9.08M|}
_ZN14welsCodecTrace10CodecTraceEiPKcP13__va_list_tag:
   75|  9.08M|void welsCodecTrace::CodecTrace (const int32_t iLevel, const char* Str_Format, va_list vl) {
   76|  9.08M|  if (m_iTraceLevel < iLevel) {
  ------------------
  |  Branch (76:7): [True: 9.08M, False: 0]
  ------------------
   77|  9.08M|    return;
   78|  9.08M|  }
   79|       |
   80|      0|  char pBuf[MAX_LOG_SIZE] = {0};
   81|      0|  WelsVsnprintf (pBuf, MAX_LOG_SIZE, Str_Format, vl); // confirmed_safe_unsafe_usage
  ------------------
  |  |   45|      0|#define MAX_LOG_SIZE    1024
  ------------------
   82|      0|  if (m_fpTrace) {
  ------------------
  |  Branch (82:7): [True: 0, False: 0]
  ------------------
   83|      0|    m_fpTrace (m_pTraceCtx, iLevel, pBuf);
   84|      0|  }
   85|      0|}
_ZN14welsCodecTrace16SetCodecInstanceEPv:
   87|  22.0k|void welsCodecTrace::SetCodecInstance (void* pCodecInstance) {
   88|  22.0k|  m_sLogCtx.pCodecInstance = pCodecInstance;
   89|  22.0k|}
_ZN14welsCodecTrace13SetTraceLevelEi:
   91|  44.0k|void welsCodecTrace::SetTraceLevel (const int32_t iLevel) {
   92|  44.0k|  if (iLevel >= 0)
  ------------------
  |  Branch (92:7): [True: 44.0k, False: 0]
  ------------------
   93|  44.0k|    m_iTraceLevel = iLevel;
   94|  44.0k|}

_ZN7WelsDec7GetPNzcEPNS_10TagDqLayerEi:
  108|  49.5M|inline int8_t* GetPNzc (PDqLayer pCurDqLayer, int32_t iMbXy) {
  109|  49.5M|  if (pCurDqLayer->pDec != NULL && pCurDqLayer->pDec->pNzc != NULL) {
  ------------------
  |  Branch (109:7): [True: 49.5M, False: 0]
  |  Branch (109:36): [True: 0, False: 49.5M]
  ------------------
  110|      0|    return pCurDqLayer->pDec->pNzc[iMbXy];
  111|      0|  }
  112|  49.5M|  return pCurDqLayer->pNzc[iMbXy];
  113|  49.5M|}

decoder_core.cpp:_ZN7WelsDecL7BsGetUeEPN10WelsCommon15TagBitStringAuxEPj:
  157|  19.6M|static inline uint32_t BsGetUe (PBitStringAux pBs, uint32_t* pCode) {
  158|  19.6M|  uint32_t iValue = 0;
  159|  19.6M|  int32_t  iLeadingZeroBits = GetLeadingZeroBits (pBs->uiCurBits);
  160|  19.6M|  intX_t iAllowedBytes, iReadBytes;
  161|  19.6M|  iAllowedBytes = pBs->pEndBuf - pBs->pStartBuf; //actual stream bytes
  162|       |
  163|  19.6M|  if (iLeadingZeroBits == -1) { //bistream error
  ------------------
  |  Branch (163:7): [True: 140k, False: 19.5M]
  ------------------
  164|   140k|    return ERR_INFO_READ_LEADING_ZERO;//-1
  165|  19.5M|  } else if (iLeadingZeroBits >
  ------------------
  |  Branch (165:14): [True: 3.46k, False: 19.5M]
  ------------------
  166|  19.5M|             16) { //rarely into this condition (even may be bitstream error), prevent from 16-bit reading overflow
  167|       |    //using two-step reading instead of one time reading of >16 bits.
  168|  3.46k|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  169|  3.46k|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, 16, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  3.46k|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  3.46k|  iCurBits <<= (iNumBits); \
  |  |   73|  3.46k|  iLeftBits += (iNumBits); \
  |  |   74|  3.46k|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  3.46k|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  3.46k|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 2.72k, False: 740]
  |  |  |  |  ------------------
  |  |  |  |   67|  2.72k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  2.72k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|  2.72k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 0, False: 2.72k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|      0|  } \
  |  |  |  |  |  |   61|  2.72k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|  2.72k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|  2.72k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|  2.72k|}
  |  |  |  |  ------------------
  |  |  |  |   68|  2.72k|  } \
  |  |  |  |   69|  3.46k|}
  |  |  ------------------
  |  |   75|  3.46k|}
  ------------------
  170|  3.46k|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  171|  3.46k|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iLeadingZeroBits + 1 - 16, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  3.46k|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  3.46k|  iCurBits <<= (iNumBits); \
  |  |   73|  3.46k|  iLeftBits += (iNumBits); \
  |  |   74|  3.46k|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  3.46k|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  3.46k|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 740, False: 2.72k]
  |  |  |  |  ------------------
  |  |  |  |   67|    740|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    740|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|    740|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 0, False: 740]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|      0|  } \
  |  |  |  |  |  |   61|    740|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|    740|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|    740|  pBufPtr +=2; \
  |  |  |  |  |  |   64|    740|}
  |  |  |  |  ------------------
  |  |  |  |   68|    740|  } \
  |  |  |  |   69|  3.46k|}
  |  |  ------------------
  |  |   75|  3.46k|}
  ------------------
  172|  19.5M|  } else {
  173|  19.5M|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  174|  19.5M|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iLeadingZeroBits + 1, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  19.5M|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  19.5M|  iCurBits <<= (iNumBits); \
  |  |   73|  19.5M|  iLeftBits += (iNumBits); \
  |  |   74|  19.5M|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  19.5M|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  19.5M|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 423k, False: 19.0M]
  |  |  |  |  ------------------
  |  |  |  |   67|   423k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|   423k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|   423k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 0, False: 423k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|      0|  } \
  |  |  |  |  |  |   61|   423k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|   423k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|   423k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|   423k|}
  |  |  |  |  ------------------
  |  |  |  |   68|   423k|  } \
  |  |  |  |   69|  19.5M|}
  |  |  ------------------
  |  |   75|  19.5M|}
  ------------------
  175|  19.5M|  }
  176|  19.5M|  if (iLeadingZeroBits) {
  ------------------
  |  Branch (176:7): [True: 6.12M, False: 13.4M]
  ------------------
  177|  6.12M|    iValue = UBITS (pBs->uiCurBits, iLeadingZeroBits);
  ------------------
  |  |   70|  6.12M|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  178|  6.12M|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  179|  6.12M|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iLeadingZeroBits, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  6.12M|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  6.12M|  iCurBits <<= (iNumBits); \
  |  |   73|  6.12M|  iLeftBits += (iNumBits); \
  |  |   74|  6.12M|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  6.12M|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  6.12M|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 172k, False: 5.95M]
  |  |  |  |  ------------------
  |  |  |  |   67|   172k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|   172k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|   172k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 12.9k, False: 159k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  12.9k|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|  12.9k|  } \
  |  |  |  |  |  |   61|   172k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|   159k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|   159k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|   159k|}
  |  |  |  |  ------------------
  |  |  |  |   68|   159k|  } \
  |  |  |  |   69|  6.12M|}
  |  |  ------------------
  |  |   75|  6.10M|}
  ------------------
  180|  6.10M|  }
  181|       |
  182|  19.5M|  *pCode = ((1u << iLeadingZeroBits) - 1 + iValue);
  183|  19.5M|  return ERR_NONE;
  184|  19.5M|}
decoder_core.cpp:_ZN7WelsDecL18GetLeadingZeroBitsEj:
  131|  19.6M|static inline int32_t GetLeadingZeroBits (uint32_t iCurBits) { //<=32 bits
  132|  19.6M|  uint32_t  uiValue;
  133|       |
  134|  19.6M|  uiValue = UBITS (iCurBits, 8); //ShowBits( bs, 8 );
  ------------------
  |  |   70|  19.6M|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  135|  19.6M|  if (uiValue) {
  ------------------
  |  Branch (135:7): [True: 19.4M, False: 225k]
  ------------------
  136|  19.4M|    return g_kuiLeadingZeroTable[uiValue];
  137|  19.4M|  }
  138|       |
  139|   225k|  uiValue = UBITS (iCurBits, 16); //ShowBits( bs, 16 );
  ------------------
  |  |   70|   225k|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  140|   225k|  if (uiValue) {
  ------------------
  |  Branch (140:7): [True: 78.7k, False: 147k]
  ------------------
  141|  78.7k|    return (g_kuiLeadingZeroTable[uiValue] + 8);
  142|  78.7k|  }
  143|       |
  144|   147k|  uiValue = UBITS (iCurBits, 24); //ShowBits( bs, 24 );
  ------------------
  |  |   70|   147k|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  145|   147k|  if (uiValue) {
  ------------------
  |  Branch (145:7): [True: 5.40k, False: 141k]
  ------------------
  146|  5.40k|    return (g_kuiLeadingZeroTable[uiValue] + 16);
  147|  5.40k|  }
  148|       |
  149|   141k|  uiValue = iCurBits; //ShowBits( bs, 32 );
  150|   141k|  if (uiValue) {
  ------------------
  |  Branch (150:7): [True: 1.12k, False: 140k]
  ------------------
  151|  1.12k|    return (g_kuiLeadingZeroTable[uiValue] + 24);
  152|  1.12k|  }
  153|       |//ASSERT(false);  // should not go here
  154|   140k|  return -1;
  155|   141k|}
decoder_core.cpp:_ZN7WelsDecL11BsGetOneBitEPN10WelsCommon15TagBitStringAuxEPj:
  127|  11.9M|static inline uint32_t BsGetOneBit (PBitStringAux pBs, uint32_t* pCode) {
  128|  11.9M|  return (BsGetBits (pBs, 1, pCode));
  129|  11.9M|}
decoder_core.cpp:_ZN7WelsDecL7BsGetSeEPN10WelsCommon15TagBitStringAuxEPi:
  190|  3.60M|static inline int32_t BsGetSe (PBitStringAux pBs, int32_t* pCode) {
  191|  3.60M|  uint32_t uiCodeNum;
  192|       |
  193|  3.60M|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCodeNum));
  ------------------
  |  |   52|  3.60M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.60M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.60M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 62.8k, False: 3.54M]
  |  |  ------------------
  |  |   55|  3.60M|    return uiRetTmp; \
  |  |   56|  3.60M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.54M]
  |  |  ------------------
  ------------------
  194|       |
  195|  3.54M|  if (uiCodeNum & 0x01) {
  ------------------
  |  Branch (195:7): [True: 839k, False: 2.70M]
  ------------------
  196|   839k|    *pCode = (int32_t) ((uiCodeNum + 1) >> 1);
  197|  2.70M|  } else {
  198|  2.70M|    *pCode = NEG_NUM ((int32_t) (uiCodeNum >> 1));
  ------------------
  |  |  183|  2.70M|#define NEG_NUM(iX) (1+(~(iX)))
  ------------------
  199|  2.70M|  }
  200|  3.54M|  return ERR_NONE;
  201|  3.60M|}
decoder_core.cpp:_ZN7WelsDecL9BsGetBitsEPN10WelsCommon15TagBitStringAuxEiPj:
   77|  22.2M|static inline int32_t BsGetBits (PBitStringAux pBs, int32_t iNumBits, uint32_t* pCode) {
   78|  22.2M|  intX_t iRc = UBITS (pBs->uiCurBits, iNumBits);
  ------------------
  |  |   70|  22.2M|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
   79|  22.2M|  intX_t iAllowedBytes = pBs->pEndBuf - pBs->pStartBuf; //actual stream bytes
   80|  22.2M|  intX_t iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
   81|  22.2M|  DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iNumBits, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  22.2M|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  22.2M|  iCurBits <<= (iNumBits); \
  |  |   73|  22.2M|  iLeftBits += (iNumBits); \
  |  |   74|  22.2M|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  22.2M|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  22.2M|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 6.53M, False: 15.6M]
  |  |  |  |  ------------------
  |  |  |  |   67|  6.53M|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  6.53M|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|  6.53M|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 1.24M, False: 5.29M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  1.24M|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|  1.24M|  } \
  |  |  |  |  |  |   61|  6.53M|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|  5.29M|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|  5.29M|  pBufPtr +=2; \
  |  |  |  |  |  |   64|  5.29M|}
  |  |  |  |  ------------------
  |  |  |  |   68|  5.29M|  } \
  |  |  |  |   69|  22.2M|}
  |  |  ------------------
  |  |   75|  20.9M|}
  ------------------
   82|  20.9M|  *pCode = (uint32_t)iRc;
   83|  20.9M|  return ERR_NONE;
   84|  22.2M|}
au_parser.cpp:_ZN7WelsDecL17BsGetTrailingBitsEPh:
  221|  5.13M|static inline int32_t BsGetTrailingBits (uint8_t* pBuf) {
  222|       |// TODO
  223|  5.13M|  uint32_t uiValue = *pBuf;
  224|  5.13M|  int32_t iRetNum = 0;
  225|       |
  226|  6.10M|  do {
  227|  6.10M|    if (uiValue & 1)
  ------------------
  |  Branch (227:9): [True: 5.13M, False: 972k]
  ------------------
  228|  5.13M|      return iRetNum;
  229|   972k|    uiValue >>= 1;
  230|   972k|    ++ iRetNum;
  231|   972k|  } while (iRetNum < 9);
  ------------------
  |  Branch (231:12): [True: 972k, False: 0]
  ------------------
  232|       |
  233|      0|  return 0;
  234|  5.13M|}
au_parser.cpp:_ZN7WelsDecL11BsGetOneBitEPN10WelsCommon15TagBitStringAuxEPj:
  127|  2.40M|static inline uint32_t BsGetOneBit (PBitStringAux pBs, uint32_t* pCode) {
  128|  2.40M|  return (BsGetBits (pBs, 1, pCode));
  129|  2.40M|}
au_parser.cpp:_ZN7WelsDecL7BsGetUeEPN10WelsCommon15TagBitStringAuxEPj:
  157|  2.10M|static inline uint32_t BsGetUe (PBitStringAux pBs, uint32_t* pCode) {
  158|  2.10M|  uint32_t iValue = 0;
  159|  2.10M|  int32_t  iLeadingZeroBits = GetLeadingZeroBits (pBs->uiCurBits);
  160|  2.10M|  intX_t iAllowedBytes, iReadBytes;
  161|  2.10M|  iAllowedBytes = pBs->pEndBuf - pBs->pStartBuf; //actual stream bytes
  162|       |
  163|  2.10M|  if (iLeadingZeroBits == -1) { //bistream error
  ------------------
  |  Branch (163:7): [True: 42.4k, False: 2.06M]
  ------------------
  164|  42.4k|    return ERR_INFO_READ_LEADING_ZERO;//-1
  165|  2.06M|  } else if (iLeadingZeroBits >
  ------------------
  |  Branch (165:14): [True: 4.64k, False: 2.05M]
  ------------------
  166|  2.06M|             16) { //rarely into this condition (even may be bitstream error), prevent from 16-bit reading overflow
  167|       |    //using two-step reading instead of one time reading of >16 bits.
  168|  4.64k|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  169|  4.64k|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, 16, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  4.64k|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  4.64k|  iCurBits <<= (iNumBits); \
  |  |   73|  4.64k|  iLeftBits += (iNumBits); \
  |  |   74|  4.64k|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  4.64k|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  4.64k|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 3.26k, False: 1.37k]
  |  |  |  |  ------------------
  |  |  |  |   67|  3.26k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  3.26k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|  3.26k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 0, False: 3.26k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|      0|  } \
  |  |  |  |  |  |   61|  3.26k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|  3.26k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|  3.26k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|  3.26k|}
  |  |  |  |  ------------------
  |  |  |  |   68|  3.26k|  } \
  |  |  |  |   69|  4.64k|}
  |  |  ------------------
  |  |   75|  4.64k|}
  ------------------
  170|  4.64k|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  171|  4.64k|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iLeadingZeroBits + 1 - 16, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  4.64k|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  4.64k|  iCurBits <<= (iNumBits); \
  |  |   73|  4.64k|  iLeftBits += (iNumBits); \
  |  |   74|  4.64k|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  4.64k|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  4.64k|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 1.37k, False: 3.26k]
  |  |  |  |  ------------------
  |  |  |  |   67|  1.37k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  1.37k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|  1.37k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 0, False: 1.37k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|      0|  } \
  |  |  |  |  |  |   61|  1.37k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|  1.37k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|  1.37k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|  1.37k|}
  |  |  |  |  ------------------
  |  |  |  |   68|  1.37k|  } \
  |  |  |  |   69|  4.64k|}
  |  |  ------------------
  |  |   75|  4.64k|}
  ------------------
  172|  2.05M|  } else {
  173|  2.05M|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  174|  2.05M|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iLeadingZeroBits + 1, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  2.05M|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  2.05M|  iCurBits <<= (iNumBits); \
  |  |   73|  2.05M|  iLeftBits += (iNumBits); \
  |  |   74|  2.05M|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  2.05M|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  2.05M|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 204k, False: 1.85M]
  |  |  |  |  ------------------
  |  |  |  |   67|   204k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|   204k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|   204k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 0, False: 204k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|      0|  } \
  |  |  |  |  |  |   61|   204k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|   204k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|   204k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|   204k|}
  |  |  |  |  ------------------
  |  |  |  |   68|   204k|  } \
  |  |  |  |   69|  2.05M|}
  |  |  ------------------
  |  |   75|  2.05M|}
  ------------------
  175|  2.05M|  }
  176|  2.06M|  if (iLeadingZeroBits) {
  ------------------
  |  Branch (176:7): [True: 701k, False: 1.36M]
  ------------------
  177|   701k|    iValue = UBITS (pBs->uiCurBits, iLeadingZeroBits);
  ------------------
  |  |   70|   701k|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  178|   701k|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  179|   701k|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iLeadingZeroBits, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|   701k|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|   701k|  iCurBits <<= (iNumBits); \
  |  |   73|   701k|  iLeftBits += (iNumBits); \
  |  |   74|   701k|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|   701k|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|   701k|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 69.5k, False: 631k]
  |  |  |  |  ------------------
  |  |  |  |   67|  69.5k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  69.5k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|  69.5k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 4.36k, False: 65.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  4.36k|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|  4.36k|  } \
  |  |  |  |  |  |   61|  69.5k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|  65.1k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|  65.1k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|  65.1k|}
  |  |  |  |  ------------------
  |  |  |  |   68|  65.1k|  } \
  |  |  |  |   69|   701k|}
  |  |  ------------------
  |  |   75|   696k|}
  ------------------
  180|   696k|  }
  181|       |
  182|  2.05M|  *pCode = ((1u << iLeadingZeroBits) - 1 + iValue);
  183|  2.05M|  return ERR_NONE;
  184|  2.06M|}
au_parser.cpp:_ZN7WelsDecL18GetLeadingZeroBitsEj:
  131|  2.10M|static inline int32_t GetLeadingZeroBits (uint32_t iCurBits) { //<=32 bits
  132|  2.10M|  uint32_t  uiValue;
  133|       |
  134|  2.10M|  uiValue = UBITS (iCurBits, 8); //ShowBits( bs, 8 );
  ------------------
  |  |   70|  2.10M|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  135|  2.10M|  if (uiValue) {
  ------------------
  |  Branch (135:7): [True: 2.04M, False: 61.4k]
  ------------------
  136|  2.04M|    return g_kuiLeadingZeroTable[uiValue];
  137|  2.04M|  }
  138|       |
  139|  61.4k|  uiValue = UBITS (iCurBits, 16); //ShowBits( bs, 16 );
  ------------------
  |  |   70|  61.4k|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  140|  61.4k|  if (uiValue) {
  ------------------
  |  Branch (140:7): [True: 13.0k, False: 48.4k]
  ------------------
  141|  13.0k|    return (g_kuiLeadingZeroTable[uiValue] + 8);
  142|  13.0k|  }
  143|       |
  144|  48.4k|  uiValue = UBITS (iCurBits, 24); //ShowBits( bs, 24 );
  ------------------
  |  |   70|  48.4k|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  145|  48.4k|  if (uiValue) {
  ------------------
  |  Branch (145:7): [True: 5.07k, False: 43.3k]
  ------------------
  146|  5.07k|    return (g_kuiLeadingZeroTable[uiValue] + 16);
  147|  5.07k|  }
  148|       |
  149|  43.3k|  uiValue = iCurBits; //ShowBits( bs, 32 );
  150|  43.3k|  if (uiValue) {
  ------------------
  |  Branch (150:7): [True: 887, False: 42.4k]
  ------------------
  151|    887|    return (g_kuiLeadingZeroTable[uiValue] + 24);
  152|    887|  }
  153|       |//ASSERT(false);  // should not go here
  154|  42.4k|  return -1;
  155|  43.3k|}
au_parser.cpp:_ZN7WelsDecL9BsGetBitsEPN10WelsCommon15TagBitStringAuxEiPj:
   77|  2.93M|static inline int32_t BsGetBits (PBitStringAux pBs, int32_t iNumBits, uint32_t* pCode) {
   78|  2.93M|  intX_t iRc = UBITS (pBs->uiCurBits, iNumBits);
  ------------------
  |  |   70|  2.93M|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
   79|  2.93M|  intX_t iAllowedBytes = pBs->pEndBuf - pBs->pStartBuf; //actual stream bytes
   80|  2.93M|  intX_t iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
   81|  2.93M|  DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iNumBits, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  2.93M|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  2.93M|  iCurBits <<= (iNumBits); \
  |  |   73|  2.93M|  iLeftBits += (iNumBits); \
  |  |   74|  2.93M|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  2.93M|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  2.93M|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 234k, False: 2.69M]
  |  |  |  |  ------------------
  |  |  |  |   67|   234k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|   234k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|   234k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 38.4k, False: 196k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  38.4k|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|  38.4k|  } \
  |  |  |  |  |  |   61|   234k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|   196k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|   196k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|   196k|}
  |  |  |  |  ------------------
  |  |  |  |   68|   196k|  } \
  |  |  |  |   69|  2.93M|}
  |  |  ------------------
  |  |   75|  2.89M|}
  ------------------
   82|  2.89M|  *pCode = (uint32_t)iRc;
   83|  2.89M|  return ERR_NONE;
   84|  2.93M|}
au_parser.cpp:_ZN7WelsDecL7BsGetSeEPN10WelsCommon15TagBitStringAuxEPi:
  190|   595k|static inline int32_t BsGetSe (PBitStringAux pBs, int32_t* pCode) {
  191|   595k|  uint32_t uiCodeNum;
  192|       |
  193|   595k|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCodeNum));
  ------------------
  |  |   52|   595k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   595k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   595k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 8.49k, False: 587k]
  |  |  ------------------
  |  |   55|   595k|    return uiRetTmp; \
  |  |   56|   595k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 587k]
  |  |  ------------------
  ------------------
  194|       |
  195|   587k|  if (uiCodeNum & 0x01) {
  ------------------
  |  Branch (195:7): [True: 99.4k, False: 487k]
  ------------------
  196|  99.4k|    *pCode = (int32_t) ((uiCodeNum + 1) >> 1);
  197|   487k|  } else {
  198|   487k|    *pCode = NEG_NUM ((int32_t) (uiCodeNum >> 1));
  ------------------
  |  |  183|   487k|#define NEG_NUM(iX) (1+(~(iX)))
  ------------------
  199|   487k|  }
  200|   587k|  return ERR_NONE;
  201|   595k|}
au_parser.cpp:_ZN7WelsDecL17CheckMoreRBSPDataEPN10WelsCommon15TagBitStringAuxE:
  239|   100k|static inline bool CheckMoreRBSPData (PBitStringAux pBsAux) {
  240|   100k|  if ((pBsAux->iBits - ((pBsAux->pCurBuf - pBsAux->pStartBuf - 2) << 3) - pBsAux->iLeftBits) > 1) {
  ------------------
  |  Branch (240:7): [True: 68.9k, False: 31.2k]
  ------------------
  241|  68.9k|    return true;
  242|  68.9k|  } else {
  243|  31.2k|    return false;
  244|  31.2k|  }
  245|   100k|}
decode_slice.cpp:_ZN7WelsDecL11BsGetOneBitEPN10WelsCommon15TagBitStringAuxEPj:
  127|  1.89M|static inline uint32_t BsGetOneBit (PBitStringAux pBs, uint32_t* pCode) {
  128|  1.89M|  return (BsGetBits (pBs, 1, pCode));
  129|  1.89M|}
decode_slice.cpp:_ZN7WelsDecL9BsGetBitsEPN10WelsCommon15TagBitStringAuxEiPj:
   77|  2.34M|static inline int32_t BsGetBits (PBitStringAux pBs, int32_t iNumBits, uint32_t* pCode) {
   78|  2.34M|  intX_t iRc = UBITS (pBs->uiCurBits, iNumBits);
  ------------------
  |  |   70|  2.34M|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
   79|  2.34M|  intX_t iAllowedBytes = pBs->pEndBuf - pBs->pStartBuf; //actual stream bytes
   80|  2.34M|  intX_t iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
   81|  2.34M|  DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iNumBits, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  2.34M|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  2.34M|  iCurBits <<= (iNumBits); \
  |  |   73|  2.34M|  iLeftBits += (iNumBits); \
  |  |   74|  2.34M|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  2.34M|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  2.34M|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 176k, False: 2.17M]
  |  |  |  |  ------------------
  |  |  |  |   67|   176k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|   176k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|   176k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 138k, False: 38.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   138k|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|   138k|  } \
  |  |  |  |  |  |   61|   176k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|  38.5k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|  38.5k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|  38.5k|}
  |  |  |  |  ------------------
  |  |  |  |   68|  38.5k|  } \
  |  |  |  |   69|  2.34M|}
  |  |  ------------------
  |  |   75|  2.20M|}
  ------------------
   82|  2.20M|  *pCode = (uint32_t)iRc;
   83|  2.20M|  return ERR_NONE;
   84|  2.34M|}
decode_slice.cpp:_ZN7WelsDecL7BsGetUeEPN10WelsCommon15TagBitStringAuxEPj:
  157|  6.22M|static inline uint32_t BsGetUe (PBitStringAux pBs, uint32_t* pCode) {
  158|  6.22M|  uint32_t iValue = 0;
  159|  6.22M|  int32_t  iLeadingZeroBits = GetLeadingZeroBits (pBs->uiCurBits);
  160|  6.22M|  intX_t iAllowedBytes, iReadBytes;
  161|  6.22M|  iAllowedBytes = pBs->pEndBuf - pBs->pStartBuf; //actual stream bytes
  162|       |
  163|  6.22M|  if (iLeadingZeroBits == -1) { //bistream error
  ------------------
  |  Branch (163:7): [True: 622k, False: 5.60M]
  ------------------
  164|   622k|    return ERR_INFO_READ_LEADING_ZERO;//-1
  165|  5.60M|  } else if (iLeadingZeroBits >
  ------------------
  |  Branch (165:14): [True: 3.02k, False: 5.59M]
  ------------------
  166|  5.60M|             16) { //rarely into this condition (even may be bitstream error), prevent from 16-bit reading overflow
  167|       |    //using two-step reading instead of one time reading of >16 bits.
  168|  3.02k|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  169|  3.02k|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, 16, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  3.02k|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  3.02k|  iCurBits <<= (iNumBits); \
  |  |   73|  3.02k|  iLeftBits += (iNumBits); \
  |  |   74|  3.02k|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  3.02k|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  3.02k|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 1.44k, False: 1.57k]
  |  |  |  |  ------------------
  |  |  |  |   67|  1.44k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  1.44k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|  1.44k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 0, False: 1.44k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|      0|  } \
  |  |  |  |  |  |   61|  1.44k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|  1.44k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|  1.44k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|  1.44k|}
  |  |  |  |  ------------------
  |  |  |  |   68|  1.44k|  } \
  |  |  |  |   69|  3.02k|}
  |  |  ------------------
  |  |   75|  3.02k|}
  ------------------
  170|  3.02k|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  171|  3.02k|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iLeadingZeroBits + 1 - 16, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  3.02k|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  3.02k|  iCurBits <<= (iNumBits); \
  |  |   73|  3.02k|  iLeftBits += (iNumBits); \
  |  |   74|  3.02k|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  3.02k|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  3.02k|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 1.57k, False: 1.44k]
  |  |  |  |  ------------------
  |  |  |  |   67|  1.57k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  1.57k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|  1.57k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 0, False: 1.57k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|      0|  } \
  |  |  |  |  |  |   61|  1.57k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|  1.57k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|  1.57k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|  1.57k|}
  |  |  |  |  ------------------
  |  |  |  |   68|  1.57k|  } \
  |  |  |  |   69|  3.02k|}
  |  |  ------------------
  |  |   75|  3.02k|}
  ------------------
  172|  5.59M|  } else {
  173|  5.59M|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  174|  5.59M|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iLeadingZeroBits + 1, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  5.59M|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  5.59M|  iCurBits <<= (iNumBits); \
  |  |   73|  5.59M|  iLeftBits += (iNumBits); \
  |  |   74|  5.59M|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  5.59M|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  5.59M|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 174k, False: 5.42M]
  |  |  |  |  ------------------
  |  |  |  |   67|   174k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|   174k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|   174k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 0, False: 174k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|      0|  } \
  |  |  |  |  |  |   61|   174k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|   174k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|   174k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|   174k|}
  |  |  |  |  ------------------
  |  |  |  |   68|   174k|  } \
  |  |  |  |   69|  5.59M|}
  |  |  ------------------
  |  |   75|  5.59M|}
  ------------------
  175|  5.59M|  }
  176|  5.60M|  if (iLeadingZeroBits) {
  ------------------
  |  Branch (176:7): [True: 2.73M, False: 2.86M]
  ------------------
  177|  2.73M|    iValue = UBITS (pBs->uiCurBits, iLeadingZeroBits);
  ------------------
  |  |   70|  2.73M|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  178|  2.73M|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  179|  2.73M|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iLeadingZeroBits, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  2.73M|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  2.73M|  iCurBits <<= (iNumBits); \
  |  |   73|  2.73M|  iLeftBits += (iNumBits); \
  |  |   74|  2.73M|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  2.73M|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  2.73M|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 207k, False: 2.53M]
  |  |  |  |  ------------------
  |  |  |  |   67|   207k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|   207k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|   207k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 74.8k, False: 133k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  74.8k|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|  74.8k|  } \
  |  |  |  |  |  |   61|   207k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|   133k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|   133k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|   133k|}
  |  |  |  |  ------------------
  |  |  |  |   68|   133k|  } \
  |  |  |  |   69|  2.73M|}
  |  |  ------------------
  |  |   75|  2.66M|}
  ------------------
  180|  2.66M|  }
  181|       |
  182|  5.52M|  *pCode = ((1u << iLeadingZeroBits) - 1 + iValue);
  183|  5.52M|  return ERR_NONE;
  184|  5.60M|}
decode_slice.cpp:_ZN7WelsDecL18GetLeadingZeroBitsEj:
  131|  6.22M|static inline int32_t GetLeadingZeroBits (uint32_t iCurBits) { //<=32 bits
  132|  6.22M|  uint32_t  uiValue;
  133|       |
  134|  6.22M|  uiValue = UBITS (iCurBits, 8); //ShowBits( bs, 8 );
  ------------------
  |  |   70|  6.22M|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  135|  6.22M|  if (uiValue) {
  ------------------
  |  Branch (135:7): [True: 5.56M, False: 656k]
  ------------------
  136|  5.56M|    return g_kuiLeadingZeroTable[uiValue];
  137|  5.56M|  }
  138|       |
  139|   656k|  uiValue = UBITS (iCurBits, 16); //ShowBits( bs, 16 );
  ------------------
  |  |   70|   656k|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  140|   656k|  if (uiValue) {
  ------------------
  |  Branch (140:7): [True: 30.6k, False: 626k]
  ------------------
  141|  30.6k|    return (g_kuiLeadingZeroTable[uiValue] + 8);
  142|  30.6k|  }
  143|       |
  144|   626k|  uiValue = UBITS (iCurBits, 24); //ShowBits( bs, 24 );
  ------------------
  |  |   70|   626k|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  145|   626k|  if (uiValue) {
  ------------------
  |  Branch (145:7): [True: 2.84k, False: 623k]
  ------------------
  146|  2.84k|    return (g_kuiLeadingZeroTable[uiValue] + 16);
  147|  2.84k|  }
  148|       |
  149|   623k|  uiValue = iCurBits; //ShowBits( bs, 32 );
  150|   623k|  if (uiValue) {
  ------------------
  |  Branch (150:7): [True: 545, False: 622k]
  ------------------
  151|    545|    return (g_kuiLeadingZeroTable[uiValue] + 24);
  152|    545|  }
  153|       |//ASSERT(false);  // should not go here
  154|   622k|  return -1;
  155|   623k|}
decode_slice.cpp:_ZN7WelsDecL7BsGetSeEPN10WelsCommon15TagBitStringAuxEPi:
  190|   145k|static inline int32_t BsGetSe (PBitStringAux pBs, int32_t* pCode) {
  191|   145k|  uint32_t uiCodeNum;
  192|       |
  193|   145k|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCodeNum));
  ------------------
  |  |   52|   145k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   145k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   145k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.78k, False: 143k]
  |  |  ------------------
  |  |   55|   145k|    return uiRetTmp; \
  |  |   56|   145k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 143k]
  |  |  ------------------
  ------------------
  194|       |
  195|   143k|  if (uiCodeNum & 0x01) {
  ------------------
  |  Branch (195:7): [True: 15.2k, False: 127k]
  ------------------
  196|  15.2k|    *pCode = (int32_t) ((uiCodeNum + 1) >> 1);
  197|   127k|  } else {
  198|   127k|    *pCode = NEG_NUM ((int32_t) (uiCodeNum >> 1));
  ------------------
  |  |  183|   127k|#define NEG_NUM(iX) (1+(~(iX)))
  ------------------
  199|   127k|  }
  200|   143k|  return ERR_NONE;
  201|   145k|}
parse_mb_syn_cavlc.cpp:_ZN7WelsDecL13GetPrefixBitsEj:
  103|   136k|static inline uint32_t GetPrefixBits (uint32_t uiValue) {
  104|   136k|  uint32_t iNumBit = 0;
  105|       |
  106|   136k|  if (uiValue & 0xffff0000) {
  ------------------
  |  Branch (106:7): [True: 120k, False: 15.7k]
  ------------------
  107|   120k|    uiValue >>= 16;
  108|   120k|    iNumBit += 16;
  109|   120k|  }
  110|   136k|  if (uiValue & 0xff00) {
  ------------------
  |  Branch (110:7): [True: 116k, False: 20.2k]
  ------------------
  111|   116k|    uiValue >>= 8;
  112|   116k|    iNumBit += 8;
  113|   116k|  }
  114|       |
  115|   136k|  if (uiValue & 0xf0) {
  ------------------
  |  Branch (115:7): [True: 110k, False: 25.5k]
  ------------------
  116|   110k|    uiValue >>= 4;
  117|   110k|    iNumBit += 4;
  118|   110k|  }
  119|   136k|  iNumBit += g_kuiPrefix8BitsTable[uiValue];
  120|       |
  121|   136k|  return (32 - iNumBit);
  122|   136k|}
parse_mb_syn_cavlc.cpp:_ZN7WelsDecL11BsGetOneBitEPN10WelsCommon15TagBitStringAuxEPj:
  127|  95.6k|static inline uint32_t BsGetOneBit (PBitStringAux pBs, uint32_t* pCode) {
  128|  95.6k|  return (BsGetBits (pBs, 1, pCode));
  129|  95.6k|}
parse_mb_syn_cavlc.cpp:_ZN7WelsDecL9BsGetBitsEPN10WelsCommon15TagBitStringAuxEiPj:
   77|  95.6k|static inline int32_t BsGetBits (PBitStringAux pBs, int32_t iNumBits, uint32_t* pCode) {
   78|  95.6k|  intX_t iRc = UBITS (pBs->uiCurBits, iNumBits);
  ------------------
  |  |   70|  95.6k|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
   79|  95.6k|  intX_t iAllowedBytes = pBs->pEndBuf - pBs->pStartBuf; //actual stream bytes
   80|  95.6k|  intX_t iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
   81|  95.6k|  DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iNumBits, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  95.6k|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  95.6k|  iCurBits <<= (iNumBits); \
  |  |   73|  95.6k|  iLeftBits += (iNumBits); \
  |  |   74|  95.6k|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  95.6k|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  95.6k|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 18.0k, False: 77.5k]
  |  |  |  |  ------------------
  |  |  |  |   67|  18.0k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  18.0k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|  18.0k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 5.37k, False: 12.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  5.37k|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|  5.37k|  } \
  |  |  |  |  |  |   61|  18.0k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|  12.6k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|  12.6k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|  12.6k|}
  |  |  |  |  ------------------
  |  |  |  |   68|  12.6k|  } \
  |  |  |  |   69|  95.6k|}
  |  |  ------------------
  |  |   75|  90.2k|}
  ------------------
   82|  90.2k|  *pCode = (uint32_t)iRc;
   83|  90.2k|  return ERR_NONE;
   84|  95.6k|}
parse_mb_syn_cavlc.cpp:_ZN7WelsDecL8BsGetTe0EPN10WelsCommon15TagBitStringAuxEiPj:
  206|  2.21M|static inline int32_t BsGetTe0 (PBitStringAux pBs, int32_t iRange, uint32_t* pCode) {
  207|  2.21M|  if (iRange == 1) {
  ------------------
  |  Branch (207:7): [True: 1.89M, False: 322k]
  ------------------
  208|  1.89M|    *pCode = 0;
  209|  1.89M|  } else if (iRange == 2) {
  ------------------
  |  Branch (209:14): [True: 66.8k, False: 255k]
  ------------------
  210|  66.8k|    WELS_READ_VERIFY (BsGetOneBit (pBs, pCode));
  ------------------
  |  |   52|  66.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  66.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  66.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.11k, False: 64.6k]
  |  |  ------------------
  |  |   55|  66.8k|    return uiRetTmp; \
  |  |   56|  66.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 64.6k]
  |  |  ------------------
  ------------------
  211|  64.6k|    *pCode ^= 1;
  212|   255k|  } else {
  213|   255k|    WELS_READ_VERIFY (BsGetUe (pBs, pCode));
  ------------------
  |  |   52|   255k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   255k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   255k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 16.2k, False: 239k]
  |  |  ------------------
  |  |   55|   255k|    return uiRetTmp; \
  |  |   56|   255k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 239k]
  |  |  ------------------
  ------------------
  214|   255k|  }
  215|  2.19M|  return ERR_NONE;
  216|  2.21M|}
parse_mb_syn_cavlc.cpp:_ZN7WelsDecL7BsGetSeEPN10WelsCommon15TagBitStringAuxEPi:
  190|  4.29M|static inline int32_t BsGetSe (PBitStringAux pBs, int32_t* pCode) {
  191|  4.29M|  uint32_t uiCodeNum;
  192|       |
  193|  4.29M|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCodeNum));
  ------------------
  |  |   52|  4.29M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.29M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.29M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.28M, False: 3.00M]
  |  |  ------------------
  |  |   55|  4.29M|    return uiRetTmp; \
  |  |   56|  4.29M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.00M]
  |  |  ------------------
  ------------------
  194|       |
  195|  3.00M|  if (uiCodeNum & 0x01) {
  ------------------
  |  Branch (195:7): [True: 729k, False: 2.28M]
  ------------------
  196|   729k|    *pCode = (int32_t) ((uiCodeNum + 1) >> 1);
  197|  2.28M|  } else {
  198|  2.28M|    *pCode = NEG_NUM ((int32_t) (uiCodeNum >> 1));
  ------------------
  |  |  183|  2.28M|#define NEG_NUM(iX) (1+(~(iX)))
  ------------------
  199|  2.28M|  }
  200|  3.00M|  return ERR_NONE;
  201|  4.29M|}
parse_mb_syn_cavlc.cpp:_ZN7WelsDecL7BsGetUeEPN10WelsCommon15TagBitStringAuxEPj:
  157|  4.63M|static inline uint32_t BsGetUe (PBitStringAux pBs, uint32_t* pCode) {
  158|  4.63M|  uint32_t iValue = 0;
  159|  4.63M|  int32_t  iLeadingZeroBits = GetLeadingZeroBits (pBs->uiCurBits);
  160|  4.63M|  intX_t iAllowedBytes, iReadBytes;
  161|  4.63M|  iAllowedBytes = pBs->pEndBuf - pBs->pStartBuf; //actual stream bytes
  162|       |
  163|  4.63M|  if (iLeadingZeroBits == -1) { //bistream error
  ------------------
  |  Branch (163:7): [True: 1.27M, False: 3.35M]
  ------------------
  164|  1.27M|    return ERR_INFO_READ_LEADING_ZERO;//-1
  165|  3.35M|  } else if (iLeadingZeroBits >
  ------------------
  |  Branch (165:14): [True: 4.58k, False: 3.35M]
  ------------------
  166|  3.35M|             16) { //rarely into this condition (even may be bitstream error), prevent from 16-bit reading overflow
  167|       |    //using two-step reading instead of one time reading of >16 bits.
  168|  4.58k|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  169|  4.58k|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, 16, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  4.58k|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  4.58k|  iCurBits <<= (iNumBits); \
  |  |   73|  4.58k|  iLeftBits += (iNumBits); \
  |  |   74|  4.58k|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  4.58k|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  4.58k|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 4.58k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   67|  4.58k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  4.58k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|  4.58k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 0, False: 4.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|      0|  } \
  |  |  |  |  |  |   61|  4.58k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|  4.58k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|  4.58k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|  4.58k|}
  |  |  |  |  ------------------
  |  |  |  |   68|  4.58k|  } \
  |  |  |  |   69|  4.58k|}
  |  |  ------------------
  |  |   75|  4.58k|}
  ------------------
  170|  4.58k|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  171|  4.58k|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iLeadingZeroBits + 1 - 16, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  4.58k|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  4.58k|  iCurBits <<= (iNumBits); \
  |  |   73|  4.58k|  iLeftBits += (iNumBits); \
  |  |   74|  4.58k|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  4.58k|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  4.58k|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 0, False: 4.58k]
  |  |  |  |  ------------------
  |  |  |  |   67|      0|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|      0|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|      0|  } \
  |  |  |  |  |  |   61|      0|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|      0|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|      0|  pBufPtr +=2; \
  |  |  |  |  |  |   64|      0|}
  |  |  |  |  ------------------
  |  |  |  |   68|      0|  } \
  |  |  |  |   69|  4.58k|}
  |  |  ------------------
  |  |   75|  4.58k|}
  ------------------
  172|  3.35M|  } else {
  173|  3.35M|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  174|  3.35M|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iLeadingZeroBits + 1, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  3.35M|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  3.35M|  iCurBits <<= (iNumBits); \
  |  |   73|  3.35M|  iLeftBits += (iNumBits); \
  |  |   74|  3.35M|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  3.35M|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  3.35M|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 704k, False: 2.64M]
  |  |  |  |  ------------------
  |  |  |  |   67|   704k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|   704k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|   704k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 0, False: 704k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|      0|  } \
  |  |  |  |  |  |   61|   704k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|   704k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|   704k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|   704k|}
  |  |  |  |  ------------------
  |  |  |  |   68|   704k|  } \
  |  |  |  |   69|  3.35M|}
  |  |  ------------------
  |  |   75|  3.35M|}
  ------------------
  175|  3.35M|  }
  176|  3.35M|  if (iLeadingZeroBits) {
  ------------------
  |  Branch (176:7): [True: 1.00M, False: 2.35M]
  ------------------
  177|  1.00M|    iValue = UBITS (pBs->uiCurBits, iLeadingZeroBits);
  ------------------
  |  |   70|  1.00M|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  178|  1.00M|    iReadBytes = pBs->pCurBuf - pBs->pStartBuf;
  179|  1.00M|    DUMP_BITS (pBs->uiCurBits, pBs->pCurBuf, pBs->iLeftBits, iLeadingZeroBits, iAllowedBytes, iReadBytes);
  ------------------
  |  |   71|  1.00M|#define DUMP_BITS(iCurBits, pBufPtr, iLeftBits, iNumBits, iAllowedBytes, iReadBytes) { \
  |  |   72|  1.00M|  iCurBits <<= (iNumBits); \
  |  |   73|  1.00M|  iLeftBits += (iNumBits); \
  |  |   74|  1.00M|  NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  ------------------
  |  |  |  |   65|  1.00M|#define NEED_BITS(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |   66|  1.00M|  if (iLeftBits > 0) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (66:7): [True: 98.1k, False: 908k]
  |  |  |  |  ------------------
  |  |  |  |   67|  98.1k|    GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  98.1k|#define GET_WORD(iCurBits, pBufPtr, iLeftBits, iAllowedBytes, iReadBytes) { \
  |  |  |  |  |  |   58|  98.1k|  if (iReadBytes > iAllowedBytes+1) { \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (58:7): [True: 27.7k, False: 70.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  27.7k|    return ERR_INFO_READ_OVERFLOW; \
  |  |  |  |  |  |   60|  27.7k|  } \
  |  |  |  |  |  |   61|  98.1k|  iCurBits |= ((uint32_t)((pBufPtr[0] << 8) | pBufPtr[1])) << (iLeftBits); \
  |  |  |  |  |  |   62|  70.3k|  iLeftBits -= 16; \
  |  |  |  |  |  |   63|  70.3k|  pBufPtr +=2; \
  |  |  |  |  |  |   64|  70.3k|}
  |  |  |  |  ------------------
  |  |  |  |   68|  70.3k|  } \
  |  |  |  |   69|  1.00M|}
  |  |  ------------------
  |  |   75|   978k|}
  ------------------
  180|   978k|  }
  181|       |
  182|  3.32M|  *pCode = ((1u << iLeadingZeroBits) - 1 + iValue);
  183|  3.32M|  return ERR_NONE;
  184|  3.35M|}
parse_mb_syn_cavlc.cpp:_ZN7WelsDecL18GetLeadingZeroBitsEj:
  131|  4.63M|static inline int32_t GetLeadingZeroBits (uint32_t iCurBits) { //<=32 bits
  132|  4.63M|  uint32_t  uiValue;
  133|       |
  134|  4.63M|  uiValue = UBITS (iCurBits, 8); //ShowBits( bs, 8 );
  ------------------
  |  |   70|  4.63M|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  135|  4.63M|  if (uiValue) {
  ------------------
  |  Branch (135:7): [True: 2.72M, False: 1.91M]
  ------------------
  136|  2.72M|    return g_kuiLeadingZeroTable[uiValue];
  137|  2.72M|  }
  138|       |
  139|  1.91M|  uiValue = UBITS (iCurBits, 16); //ShowBits( bs, 16 );
  ------------------
  |  |   70|  1.91M|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  140|  1.91M|  if (uiValue) {
  ------------------
  |  Branch (140:7): [True: 620k, False: 1.28M]
  ------------------
  141|   620k|    return (g_kuiLeadingZeroTable[uiValue] + 8);
  142|   620k|  }
  143|       |
  144|  1.28M|  uiValue = UBITS (iCurBits, 24); //ShowBits( bs, 24 );
  ------------------
  |  |   70|  1.28M|#define UBITS(iCurBits, iNumBits) (iCurBits>>(32-(iNumBits)))
  ------------------
  145|  1.28M|  if (uiValue) {
  ------------------
  |  Branch (145:7): [True: 10.6k, False: 1.27M]
  ------------------
  146|  10.6k|    return (g_kuiLeadingZeroTable[uiValue] + 16);
  147|  10.6k|  }
  148|       |
  149|  1.27M|  uiValue = iCurBits; //ShowBits( bs, 32 );
  150|  1.27M|  if (uiValue) {
  ------------------
  |  Branch (150:7): [True: 405, False: 1.27M]
  ------------------
  151|    405|    return (g_kuiLeadingZeroTable[uiValue] + 24);
  152|    405|  }
  153|       |//ASSERT(false);  // should not go here
  154|  1.27M|  return -1;
  155|  1.27M|}

welsDecoderExt.cpp:_ZN7WelsDecL14GetThreadCountEPNS_21TagWelsDecoderContextE:
  556|  49.5M|static inline int32_t GetThreadCount (PWelsDecoderContext pCtx) {
  557|  49.5M|  int32_t iThreadCount = 0;
  558|  49.5M|  if (pCtx->pThreadCtx != NULL) {
  ------------------
  |  Branch (558:7): [True: 0, False: 49.5M]
  ------------------
  559|      0|    PWelsDecoderThreadCTX pThreadCtx = (PWelsDecoderThreadCTX)pCtx->pThreadCtx;
  560|      0|    iThreadCount = pThreadCtx->sThreadInfo.uiThrMaxNum;
  561|      0|  }
  562|  49.5M|  return iThreadCount;
  563|  49.5M|}
decoder.cpp:_ZN7WelsDecL14GetThreadCountEPNS_21TagWelsDecoderContextE:
  556|  3.18M|static inline int32_t GetThreadCount (PWelsDecoderContext pCtx) {
  557|  3.18M|  int32_t iThreadCount = 0;
  558|  3.18M|  if (pCtx->pThreadCtx != NULL) {
  ------------------
  |  Branch (558:7): [True: 0, False: 3.18M]
  ------------------
  559|      0|    PWelsDecoderThreadCTX pThreadCtx = (PWelsDecoderThreadCTX)pCtx->pThreadCtx;
  560|      0|    iThreadCount = pThreadCtx->sThreadInfo.uiThrMaxNum;
  561|      0|  }
  562|  3.18M|  return iThreadCount;
  563|  3.18M|}
decoder_core.cpp:_ZN7WelsDecL26ResetActiveSPSForEachLayerEPNS_21TagWelsDecoderContextE:
  549|  9.09k|static inline void ResetActiveSPSForEachLayer (PWelsDecoderContext pCtx) {
  550|  9.09k|  if (pCtx->iTotalNumMbRec == 0) {
  ------------------
  |  Branch (550:7): [True: 8.87k, False: 222]
  ------------------
  551|  79.8k|    for (int i = 0; i < MAX_LAYER_NUM; i++) {
  ------------------
  |  |   55|  79.8k|#define MAX_LAYER_NUM                   8
  ------------------
  |  Branch (551:21): [True: 71.0k, False: 8.87k]
  ------------------
  552|       |      pCtx->sSpsPpsCtx.pActiveLayerSps[i] = NULL;
  553|  71.0k|    }
  554|  8.87k|  }
  555|  9.09k|}
decoder_core.cpp:_ZN7WelsDecL14GetThreadCountEPNS_21TagWelsDecoderContextE:
  556|  7.76M|static inline int32_t GetThreadCount (PWelsDecoderContext pCtx) {
  557|  7.76M|  int32_t iThreadCount = 0;
  558|  7.76M|  if (pCtx->pThreadCtx != NULL) {
  ------------------
  |  Branch (558:7): [True: 0, False: 7.76M]
  ------------------
  559|      0|    PWelsDecoderThreadCTX pThreadCtx = (PWelsDecoderThreadCTX)pCtx->pThreadCtx;
  560|      0|    iThreadCount = pThreadCtx->sThreadInfo.uiThrMaxNum;
  561|      0|  }
  562|  7.76M|  return iThreadCount;
  563|  7.76M|}
pic_queue.cpp:_ZN7WelsDecL14GetThreadCountEPNS_21TagWelsDecoderContextE:
  556|   270k|static inline int32_t GetThreadCount (PWelsDecoderContext pCtx) {
  557|   270k|  int32_t iThreadCount = 0;
  558|   270k|  if (pCtx->pThreadCtx != NULL) {
  ------------------
  |  Branch (558:7): [True: 0, False: 270k]
  ------------------
  559|      0|    PWelsDecoderThreadCTX pThreadCtx = (PWelsDecoderThreadCTX)pCtx->pThreadCtx;
  560|      0|    iThreadCount = pThreadCtx->sThreadInfo.uiThrMaxNum;
  561|      0|  }
  562|   270k|  return iThreadCount;
  563|   270k|}
rec_mb.cpp:_ZN7WelsDecL14GetThreadCountEPNS_21TagWelsDecoderContextE:
  556|  81.6M|static inline int32_t GetThreadCount (PWelsDecoderContext pCtx) {
  557|  81.6M|  int32_t iThreadCount = 0;
  558|  81.6M|  if (pCtx->pThreadCtx != NULL) {
  ------------------
  |  Branch (558:7): [True: 0, False: 81.6M]
  ------------------
  559|      0|    PWelsDecoderThreadCTX pThreadCtx = (PWelsDecoderThreadCTX)pCtx->pThreadCtx;
  560|      0|    iThreadCount = pThreadCtx->sThreadInfo.uiThrMaxNum;
  561|      0|  }
  562|  81.6M|  return iThreadCount;
  563|  81.6M|}
au_parser.cpp:_ZN7WelsDecL26ResetActiveSPSForEachLayerEPNS_21TagWelsDecoderContextE:
  549|   219k|static inline void ResetActiveSPSForEachLayer (PWelsDecoderContext pCtx) {
  550|   219k|  if (pCtx->iTotalNumMbRec == 0) {
  ------------------
  |  Branch (550:7): [True: 157k, False: 61.8k]
  ------------------
  551|  1.41M|    for (int i = 0; i < MAX_LAYER_NUM; i++) {
  ------------------
  |  |   55|  1.41M|#define MAX_LAYER_NUM                   8
  ------------------
  |  Branch (551:21): [True: 1.25M, False: 157k]
  ------------------
  552|       |      pCtx->sSpsPpsCtx.pActiveLayerSps[i] = NULL;
  553|  1.25M|    }
  554|   157k|  }
  555|   219k|}
decode_slice.cpp:_ZN7WelsDecL14GetThreadCountEPNS_21TagWelsDecoderContextE:
  556|  14.6M|static inline int32_t GetThreadCount (PWelsDecoderContext pCtx) {
  557|  14.6M|  int32_t iThreadCount = 0;
  558|  14.6M|  if (pCtx->pThreadCtx != NULL) {
  ------------------
  |  Branch (558:7): [True: 0, False: 14.6M]
  ------------------
  559|      0|    PWelsDecoderThreadCTX pThreadCtx = (PWelsDecoderThreadCTX)pCtx->pThreadCtx;
  560|      0|    iThreadCount = pThreadCtx->sThreadInfo.uiThrMaxNum;
  561|      0|  }
  562|  14.6M|  return iThreadCount;
  563|  14.6M|}
mv_pred.cpp:_ZN7WelsDecL14GetThreadCountEPNS_21TagWelsDecoderContextE:
  556|  9.55M|static inline int32_t GetThreadCount (PWelsDecoderContext pCtx) {
  557|  9.55M|  int32_t iThreadCount = 0;
  558|  9.55M|  if (pCtx->pThreadCtx != NULL) {
  ------------------
  |  Branch (558:7): [True: 0, False: 9.55M]
  ------------------
  559|      0|    PWelsDecoderThreadCTX pThreadCtx = (PWelsDecoderThreadCTX)pCtx->pThreadCtx;
  560|      0|    iThreadCount = pThreadCtx->sThreadInfo.uiThrMaxNum;
  561|      0|  }
  562|  9.55M|  return iThreadCount;
  563|  9.55M|}
parse_mb_syn_cabac.cpp:_ZN7WelsDecL14GetThreadCountEPNS_21TagWelsDecoderContextE:
  556|   320k|static inline int32_t GetThreadCount (PWelsDecoderContext pCtx) {
  557|   320k|  int32_t iThreadCount = 0;
  558|   320k|  if (pCtx->pThreadCtx != NULL) {
  ------------------
  |  Branch (558:7): [True: 0, False: 320k]
  ------------------
  559|      0|    PWelsDecoderThreadCTX pThreadCtx = (PWelsDecoderThreadCTX)pCtx->pThreadCtx;
  560|      0|    iThreadCount = pThreadCtx->sThreadInfo.uiThrMaxNum;
  561|      0|  }
  562|   320k|  return iThreadCount;
  563|   320k|}
parse_mb_syn_cavlc.cpp:_ZN7WelsDecL14GetThreadCountEPNS_21TagWelsDecoderContextE:
  556|  2.22M|static inline int32_t GetThreadCount (PWelsDecoderContext pCtx) {
  557|  2.22M|  int32_t iThreadCount = 0;
  558|  2.22M|  if (pCtx->pThreadCtx != NULL) {
  ------------------
  |  Branch (558:7): [True: 0, False: 2.22M]
  ------------------
  559|      0|    PWelsDecoderThreadCTX pThreadCtx = (PWelsDecoderThreadCTX)pCtx->pThreadCtx;
  560|      0|    iThreadCount = pThreadCtx->sThreadInfo.uiThrMaxNum;
  561|      0|  }
  562|  2.22M|  return iThreadCount;
  563|  2.22M|}

_ZN7WelsDec9GetMbTypeERPNS_10TagDqLayerE:
  185|  47.5M|inline uint32_t* GetMbType (PDqLayer& pCurDqLayer) {
  186|  47.5M|  if (pCurDqLayer->pDec != NULL) {
  ------------------
  |  Branch (186:7): [True: 47.5M, False: 0]
  ------------------
  187|  47.5M|    return pCurDqLayer->pDec->pMbType;
  188|  47.5M|  } else {
  189|      0|    return pCurDqLayer->pMbType;
  190|      0|  }
  191|  47.5M|}

decoder.cpp:_ZN7WelsDecL12InitVlcTableEPNS_11TagVlcTableE:
  119|  26.4k|static inline void InitVlcTable (SVlcTable* pVlcTable) {
  120|  26.4k|pVlcTable->kpChromaCoeffTokenVlcTable = g_kuiVlcChromaTable;
  121|       |
  122|  26.4k|pVlcTable->kpCoeffTokenVlcTable[0][0] = g_kuiVlcTable_0;
  123|  26.4k|pVlcTable->kpCoeffTokenVlcTable[0][1] = g_kuiVlcTable_1;
  124|  26.4k|pVlcTable->kpCoeffTokenVlcTable[0][2] = g_kuiVlcTable_2;
  125|  26.4k|pVlcTable->kpCoeffTokenVlcTable[0][3] = g_kuiVlcTable_3;
  126|       |
  127|  26.4k|pVlcTable->kpCoeffTokenVlcTable[1][0] = g_kuiVlcTable_0_0;
  128|  26.4k|pVlcTable->kpCoeffTokenVlcTable[1][1] = g_kuiVlcTable_0_1;
  129|  26.4k|pVlcTable->kpCoeffTokenVlcTable[1][2] = g_kuiVlcTable_0_2;
  130|  26.4k|pVlcTable->kpCoeffTokenVlcTable[1][3] = g_kuiVlcTable_0_3;
  131|       |
  132|  26.4k|pVlcTable->kpCoeffTokenVlcTable[2][0] = g_kuiVlcTable_1_0;
  133|  26.4k|pVlcTable->kpCoeffTokenVlcTable[2][1] = g_kuiVlcTable_1_1;
  134|  26.4k|pVlcTable->kpCoeffTokenVlcTable[2][2] = g_kuiVlcTable_1_2;
  135|  26.4k|pVlcTable->kpCoeffTokenVlcTable[2][3] = g_kuiVlcTable_1_3;
  136|       |
  137|  26.4k|pVlcTable->kpCoeffTokenVlcTable[3][0] = g_kuiVlcTable_2_0;
  138|  26.4k|pVlcTable->kpCoeffTokenVlcTable[3][1] = g_kuiVlcTable_2_1;
  139|  26.4k|pVlcTable->kpCoeffTokenVlcTable[3][2] = g_kuiVlcTable_2_2;
  140|  26.4k|pVlcTable->kpCoeffTokenVlcTable[3][3] = g_kuiVlcTable_2_3;
  141|  26.4k|pVlcTable->kpCoeffTokenVlcTable[3][4] = g_kuiVlcTable_2_4;
  142|  26.4k|pVlcTable->kpCoeffTokenVlcTable[3][5] = g_kuiVlcTable_2_5;
  143|  26.4k|pVlcTable->kpCoeffTokenVlcTable[3][6] = g_kuiVlcTable_2_6;
  144|  26.4k|pVlcTable->kpCoeffTokenVlcTable[3][7] = g_kuiVlcTable_2_7;
  145|       |
  146|  26.4k|pVlcTable->kpZeroTable[0] = g_kuiZeroLeftTable0;
  147|  26.4k|pVlcTable->kpZeroTable[1] = g_kuiZeroLeftTable1;
  148|  26.4k|pVlcTable->kpZeroTable[2] = g_kuiZeroLeftTable2;
  149|  26.4k|pVlcTable->kpZeroTable[3] = g_kuiZeroLeftTable3;
  150|  26.4k|pVlcTable->kpZeroTable[4] = g_kuiZeroLeftTable4;
  151|  26.4k|pVlcTable->kpZeroTable[5] = g_kuiZeroLeftTable5;
  152|  26.4k|pVlcTable->kpZeroTable[6] = g_kuiZeroLeftTable6;
  153|       |
  154|  26.4k|pVlcTable->kpTotalZerosTable[0][0] = g_kuiTotalZerosTable0;
  155|  26.4k|pVlcTable->kpTotalZerosTable[0][1] = g_kuiTotalZerosTable1;
  156|  26.4k|pVlcTable->kpTotalZerosTable[0][2] = g_kuiTotalZerosTable2;
  157|  26.4k|pVlcTable->kpTotalZerosTable[0][3] = g_kuiTotalZerosTable3;
  158|  26.4k|pVlcTable->kpTotalZerosTable[0][4] = g_kuiTotalZerosTable4;
  159|  26.4k|pVlcTable->kpTotalZerosTable[0][5] = g_kuiTotalZerosTable5;
  160|  26.4k|pVlcTable->kpTotalZerosTable[0][6] = g_kuiTotalZerosTable6;
  161|  26.4k|pVlcTable->kpTotalZerosTable[0][7] = g_kuiTotalZerosTable7;
  162|  26.4k|pVlcTable->kpTotalZerosTable[0][8] = g_kuiTotalZerosTable8;
  163|  26.4k|pVlcTable->kpTotalZerosTable[0][9] = g_kuiTotalZerosTable9;
  164|  26.4k|pVlcTable->kpTotalZerosTable[0][10] = g_kuiTotalZerosTable10;
  165|  26.4k|pVlcTable->kpTotalZerosTable[0][11] = g_kuiTotalZerosTable11;
  166|  26.4k|pVlcTable->kpTotalZerosTable[0][12] = g_kuiTotalZerosTable12;
  167|  26.4k|pVlcTable->kpTotalZerosTable[0][13] = g_kuiTotalZerosTable13;
  168|  26.4k|pVlcTable->kpTotalZerosTable[0][14] = g_kuiTotalZerosTable14;
  169|  26.4k|pVlcTable->kpTotalZerosTable[1][0] = g_kuiTotalZerosChromaTable0;
  170|  26.4k|pVlcTable->kpTotalZerosTable[1][1] = g_kuiTotalZerosChromaTable1;
  171|  26.4k|pVlcTable->kpTotalZerosTable[1][2] = g_kuiTotalZerosChromaTable2;
  172|       |
  173|  26.4k|}

parse_mb_syn_cabac.cpp:_ZN7WelsDecL16GetMbResPropertyEPiS0_b:
  132|   543k|static inline void GetMbResProperty (int32_t* pMBproperty, int32_t* pResidualProperty, bool bCavlc) {
  133|   543k|  switch (*pResidualProperty) {
  ------------------
  |  Branch (133:11): [True: 543k, False: 0]
  ------------------
  134|  8.06k|  case CHROMA_AC_U:
  ------------------
  |  |   78|  8.06k|#define CHROMA_AC_U  9
  ------------------
  |  Branch (134:3): [True: 8.06k, False: 535k]
  ------------------
  135|  8.06k|    *pMBproperty = 1;
  136|  8.06k|    *pResidualProperty = bCavlc ? CHROMA_AC : CHROMA_AC_U;
  ------------------
  |  |   74|      0|#define CHROMA_AC    5
  ------------------
                  *pResidualProperty = bCavlc ? CHROMA_AC : CHROMA_AC_U;
  ------------------
  |  |   78|  16.1k|#define CHROMA_AC_U  9
  ------------------
  |  Branch (136:26): [True: 0, False: 8.06k]
  ------------------
  137|  8.06k|    break;
  138|  6.46k|  case CHROMA_AC_V:
  ------------------
  |  |   79|  6.46k|#define CHROMA_AC_V  10
  ------------------
  |  Branch (138:3): [True: 6.46k, False: 536k]
  ------------------
  139|  6.46k|    *pMBproperty = 2;
  140|  6.46k|    *pResidualProperty = bCavlc ? CHROMA_AC : CHROMA_AC_V;
  ------------------
  |  |   74|      0|#define CHROMA_AC    5
  ------------------
                  *pResidualProperty = bCavlc ? CHROMA_AC : CHROMA_AC_V;
  ------------------
  |  |   79|  12.9k|#define CHROMA_AC_V  10
  ------------------
  |  Branch (140:26): [True: 0, False: 6.46k]
  ------------------
  141|  6.46k|    break;
  142|  47.0k|  case LUMA_DC_AC_INTRA:
  ------------------
  |  |   80|  47.0k|#define LUMA_DC_AC_INTRA 11
  ------------------
  |  Branch (142:3): [True: 47.0k, False: 496k]
  ------------------
  143|  47.0k|    *pMBproperty = 0;
  144|  47.0k|    *pResidualProperty = LUMA_DC_AC;
  ------------------
  |  |   72|  47.0k|#define LUMA_DC_AC   3
  ------------------
  145|  47.0k|    break;
  146|  8.30k|  case CHROMA_DC_U:
  ------------------
  |  |   76|  8.30k|#define CHROMA_DC_U  7
  ------------------
  |  Branch (146:3): [True: 8.30k, False: 535k]
  ------------------
  147|  8.30k|    *pMBproperty = 1;
  148|  8.30k|    *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_U;
  ------------------
  |  |   73|      0|#define CHROMA_DC    4
  ------------------
                  *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_U;
  ------------------
  |  |   76|  16.6k|#define CHROMA_DC_U  7
  ------------------
  |  Branch (148:27): [True: 0, False: 8.30k]
  ------------------
  149|  8.30k|    break;
  150|  8.19k|  case CHROMA_DC_V:
  ------------------
  |  |   77|  8.19k|#define CHROMA_DC_V  8
  ------------------
  |  Branch (150:3): [True: 8.19k, False: 535k]
  ------------------
  151|  8.19k|    *pMBproperty = 2;
  152|  8.19k|    *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_V;
  ------------------
  |  |   73|      0|#define CHROMA_DC    4
  ------------------
                  *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_V;
  ------------------
  |  |   77|  16.3k|#define CHROMA_DC_V  8
  ------------------
  |  Branch (152:27): [True: 0, False: 8.19k]
  ------------------
  153|  8.19k|    break;
  154|  54.6k|  case I16_LUMA_AC:
  ------------------
  |  |   71|  54.6k|#define I16_LUMA_AC  2
  ------------------
  |  Branch (154:3): [True: 54.6k, False: 488k]
  ------------------
  155|  54.6k|    *pMBproperty = 0;
  156|  54.6k|    break;
  157|  29.0k|  case I16_LUMA_DC:
  ------------------
  |  |   70|  29.0k|#define I16_LUMA_DC  1
  ------------------
  |  Branch (157:3): [True: 29.0k, False: 514k]
  ------------------
  158|  29.0k|    *pMBproperty = 0;
  159|  29.0k|    break;
  160|   172k|  case LUMA_DC_AC_INTER:
  ------------------
  |  |   81|   172k|#define LUMA_DC_AC_INTER 12
  ------------------
  |  Branch (160:3): [True: 172k, False: 371k]
  ------------------
  161|   172k|    *pMBproperty = 3;
  162|   172k|    *pResidualProperty = LUMA_DC_AC;
  ------------------
  |  |   72|   172k|#define LUMA_DC_AC   3
  ------------------
  163|   172k|    break;
  164|  19.1k|  case CHROMA_DC_U_INTER:
  ------------------
  |  |   82|  19.1k|#define CHROMA_DC_U_INTER  13
  ------------------
  |  Branch (164:3): [True: 19.1k, False: 524k]
  ------------------
  165|  19.1k|    *pMBproperty = 4;
  166|  19.1k|    *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_U;
  ------------------
  |  |   73|      0|#define CHROMA_DC    4
  ------------------
                  *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_U;
  ------------------
  |  |   76|  38.3k|#define CHROMA_DC_U  7
  ------------------
  |  Branch (166:27): [True: 0, False: 19.1k]
  ------------------
  167|  19.1k|    break;
  168|  18.5k|  case CHROMA_DC_V_INTER:
  ------------------
  |  |   83|  18.5k|#define CHROMA_DC_V_INTER  14
  ------------------
  |  Branch (168:3): [True: 18.5k, False: 524k]
  ------------------
  169|  18.5k|    *pMBproperty = 5;
  170|  18.5k|    *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_V;
  ------------------
  |  |   73|      0|#define CHROMA_DC    4
  ------------------
                  *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_V;
  ------------------
  |  |   77|  37.1k|#define CHROMA_DC_V  8
  ------------------
  |  Branch (170:27): [True: 0, False: 18.5k]
  ------------------
  171|  18.5k|    break;
  172|  23.3k|  case CHROMA_AC_U_INTER:
  ------------------
  |  |   84|  23.3k|#define CHROMA_AC_U_INTER  15
  ------------------
  |  Branch (172:3): [True: 23.3k, False: 520k]
  ------------------
  173|  23.3k|    *pMBproperty = 4;
  174|  23.3k|    *pResidualProperty =  bCavlc ? CHROMA_AC : CHROMA_AC_U;
  ------------------
  |  |   74|      0|#define CHROMA_AC    5
  ------------------
                  *pResidualProperty =  bCavlc ? CHROMA_AC : CHROMA_AC_U;
  ------------------
  |  |   78|  46.6k|#define CHROMA_AC_U  9
  ------------------
  |  Branch (174:27): [True: 0, False: 23.3k]
  ------------------
  175|  23.3k|    break;
  176|  22.4k|  case CHROMA_AC_V_INTER:
  ------------------
  |  |   85|  22.4k|#define CHROMA_AC_V_INTER  16
  ------------------
  |  Branch (176:3): [True: 22.4k, False: 520k]
  ------------------
  177|  22.4k|    *pMBproperty = 5;
  178|  22.4k|    *pResidualProperty =  bCavlc ? CHROMA_AC : CHROMA_AC_V;
  ------------------
  |  |   74|      0|#define CHROMA_AC    5
  ------------------
                  *pResidualProperty =  bCavlc ? CHROMA_AC : CHROMA_AC_V;
  ------------------
  |  |   79|  44.9k|#define CHROMA_AC_V  10
  ------------------
  |  Branch (178:27): [True: 0, False: 22.4k]
  ------------------
  179|  22.4k|    break;
  180|       |  // Reference to Table 7-2
  181|  37.6k|  case LUMA_DC_AC_INTRA_8:
  ------------------
  |  |   86|  37.6k|#define LUMA_DC_AC_INTRA_8  17
  ------------------
  |  Branch (181:3): [True: 37.6k, False: 505k]
  ------------------
  182|  37.6k|    *pMBproperty = 6;
  183|  37.6k|    *pResidualProperty = LUMA_DC_AC_8;
  ------------------
  |  |   75|  37.6k|#define LUMA_DC_AC_8  6
  ------------------
  184|  37.6k|    break;
  185|  88.1k|  case LUMA_DC_AC_INTER_8:
  ------------------
  |  |   87|  88.1k|#define LUMA_DC_AC_INTER_8  18
  ------------------
  |  Branch (185:3): [True: 88.1k, False: 455k]
  ------------------
  186|  88.1k|    *pMBproperty = 7;
  187|  88.1k|    *pResidualProperty = LUMA_DC_AC_8;
  ------------------
  |  |   75|  88.1k|#define LUMA_DC_AC_8  6
  ------------------
  188|  88.1k|    break;
  189|   543k|  }
  190|   543k|}
parse_mb_syn_cavlc.cpp:_ZN7WelsDecL16GetMbResPropertyEPiS0_b:
  132|   779k|static inline void GetMbResProperty (int32_t* pMBproperty, int32_t* pResidualProperty, bool bCavlc) {
  133|   779k|  switch (*pResidualProperty) {
  ------------------
  |  Branch (133:11): [True: 779k, False: 0]
  ------------------
  134|  14.6k|  case CHROMA_AC_U:
  ------------------
  |  |   78|  14.6k|#define CHROMA_AC_U  9
  ------------------
  |  Branch (134:3): [True: 14.6k, False: 764k]
  ------------------
  135|  14.6k|    *pMBproperty = 1;
  136|  14.6k|    *pResidualProperty = bCavlc ? CHROMA_AC : CHROMA_AC_U;
  ------------------
  |  |   74|  14.6k|#define CHROMA_AC    5
  ------------------
                  *pResidualProperty = bCavlc ? CHROMA_AC : CHROMA_AC_U;
  ------------------
  |  |   78|  14.6k|#define CHROMA_AC_U  9
  ------------------
  |  Branch (136:26): [True: 14.6k, False: 0]
  ------------------
  137|  14.6k|    break;
  138|  14.0k|  case CHROMA_AC_V:
  ------------------
  |  |   79|  14.0k|#define CHROMA_AC_V  10
  ------------------
  |  Branch (138:3): [True: 14.0k, False: 764k]
  ------------------
  139|  14.0k|    *pMBproperty = 2;
  140|  14.0k|    *pResidualProperty = bCavlc ? CHROMA_AC : CHROMA_AC_V;
  ------------------
  |  |   74|  14.0k|#define CHROMA_AC    5
  ------------------
                  *pResidualProperty = bCavlc ? CHROMA_AC : CHROMA_AC_V;
  ------------------
  |  |   79|  14.0k|#define CHROMA_AC_V  10
  ------------------
  |  Branch (140:26): [True: 14.0k, False: 0]
  ------------------
  141|  14.0k|    break;
  142|   152k|  case LUMA_DC_AC_INTRA:
  ------------------
  |  |   80|   152k|#define LUMA_DC_AC_INTRA 11
  ------------------
  |  Branch (142:3): [True: 152k, False: 626k]
  ------------------
  143|   152k|    *pMBproperty = 0;
  144|   152k|    *pResidualProperty = LUMA_DC_AC;
  ------------------
  |  |   72|   152k|#define LUMA_DC_AC   3
  ------------------
  145|   152k|    break;
  146|  10.4k|  case CHROMA_DC_U:
  ------------------
  |  |   76|  10.4k|#define CHROMA_DC_U  7
  ------------------
  |  Branch (146:3): [True: 10.4k, False: 768k]
  ------------------
  147|  10.4k|    *pMBproperty = 1;
  148|  10.4k|    *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_U;
  ------------------
  |  |   73|  10.4k|#define CHROMA_DC    4
  ------------------
                  *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_U;
  ------------------
  |  |   76|  10.4k|#define CHROMA_DC_U  7
  ------------------
  |  Branch (148:27): [True: 10.4k, False: 0]
  ------------------
  149|  10.4k|    break;
  150|  8.99k|  case CHROMA_DC_V:
  ------------------
  |  |   77|  8.99k|#define CHROMA_DC_V  8
  ------------------
  |  Branch (150:3): [True: 8.99k, False: 770k]
  ------------------
  151|  8.99k|    *pMBproperty = 2;
  152|  8.99k|    *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_V;
  ------------------
  |  |   73|  8.99k|#define CHROMA_DC    4
  ------------------
                  *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_V;
  ------------------
  |  |   77|  8.99k|#define CHROMA_DC_V  8
  ------------------
  |  Branch (152:27): [True: 8.99k, False: 0]
  ------------------
  153|  8.99k|    break;
  154|  16.0k|  case I16_LUMA_AC:
  ------------------
  |  |   71|  16.0k|#define I16_LUMA_AC  2
  ------------------
  |  Branch (154:3): [True: 16.0k, False: 762k]
  ------------------
  155|  16.0k|    *pMBproperty = 0;
  156|  16.0k|    break;
  157|  17.8k|  case I16_LUMA_DC:
  ------------------
  |  |   70|  17.8k|#define I16_LUMA_DC  1
  ------------------
  |  Branch (157:3): [True: 17.8k, False: 761k]
  ------------------
  158|  17.8k|    *pMBproperty = 0;
  159|  17.8k|    break;
  160|   215k|  case LUMA_DC_AC_INTER:
  ------------------
  |  |   81|   215k|#define LUMA_DC_AC_INTER 12
  ------------------
  |  Branch (160:3): [True: 215k, False: 563k]
  ------------------
  161|   215k|    *pMBproperty = 3;
  162|   215k|    *pResidualProperty = LUMA_DC_AC;
  ------------------
  |  |   72|   215k|#define LUMA_DC_AC   3
  ------------------
  163|   215k|    break;
  164|  24.5k|  case CHROMA_DC_U_INTER:
  ------------------
  |  |   82|  24.5k|#define CHROMA_DC_U_INTER  13
  ------------------
  |  Branch (164:3): [True: 24.5k, False: 754k]
  ------------------
  165|  24.5k|    *pMBproperty = 4;
  166|  24.5k|    *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_U;
  ------------------
  |  |   73|  24.5k|#define CHROMA_DC    4
  ------------------
                  *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_U;
  ------------------
  |  |   76|  24.5k|#define CHROMA_DC_U  7
  ------------------
  |  Branch (166:27): [True: 24.5k, False: 0]
  ------------------
  167|  24.5k|    break;
  168|  23.8k|  case CHROMA_DC_V_INTER:
  ------------------
  |  |   83|  23.8k|#define CHROMA_DC_V_INTER  14
  ------------------
  |  Branch (168:3): [True: 23.8k, False: 755k]
  ------------------
  169|  23.8k|    *pMBproperty = 5;
  170|  23.8k|    *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_V;
  ------------------
  |  |   73|  23.8k|#define CHROMA_DC    4
  ------------------
                  *pResidualProperty =  bCavlc ? CHROMA_DC : CHROMA_DC_V;
  ------------------
  |  |   77|  23.8k|#define CHROMA_DC_V  8
  ------------------
  |  Branch (170:27): [True: 23.8k, False: 0]
  ------------------
  171|  23.8k|    break;
  172|  15.1k|  case CHROMA_AC_U_INTER:
  ------------------
  |  |   84|  15.1k|#define CHROMA_AC_U_INTER  15
  ------------------
  |  Branch (172:3): [True: 15.1k, False: 763k]
  ------------------
  173|  15.1k|    *pMBproperty = 4;
  174|  15.1k|    *pResidualProperty =  bCavlc ? CHROMA_AC : CHROMA_AC_U;
  ------------------
  |  |   74|  15.1k|#define CHROMA_AC    5
  ------------------
                  *pResidualProperty =  bCavlc ? CHROMA_AC : CHROMA_AC_U;
  ------------------
  |  |   78|  15.1k|#define CHROMA_AC_U  9
  ------------------
  |  Branch (174:27): [True: 15.1k, False: 0]
  ------------------
  175|  15.1k|    break;
  176|  13.9k|  case CHROMA_AC_V_INTER:
  ------------------
  |  |   85|  13.9k|#define CHROMA_AC_V_INTER  16
  ------------------
  |  Branch (176:3): [True: 13.9k, False: 765k]
  ------------------
  177|  13.9k|    *pMBproperty = 5;
  178|  13.9k|    *pResidualProperty =  bCavlc ? CHROMA_AC : CHROMA_AC_V;
  ------------------
  |  |   74|  13.9k|#define CHROMA_AC    5
  ------------------
                  *pResidualProperty =  bCavlc ? CHROMA_AC : CHROMA_AC_V;
  ------------------
  |  |   79|  13.9k|#define CHROMA_AC_V  10
  ------------------
  |  Branch (178:27): [True: 13.9k, False: 0]
  ------------------
  179|  13.9k|    break;
  180|       |  // Reference to Table 7-2
  181|   102k|  case LUMA_DC_AC_INTRA_8:
  ------------------
  |  |   86|   102k|#define LUMA_DC_AC_INTRA_8  17
  ------------------
  |  Branch (181:3): [True: 102k, False: 676k]
  ------------------
  182|   102k|    *pMBproperty = 6;
  183|   102k|    *pResidualProperty = LUMA_DC_AC_8;
  ------------------
  |  |   75|   102k|#define LUMA_DC_AC_8  6
  ------------------
  184|   102k|    break;
  185|   149k|  case LUMA_DC_AC_INTER_8:
  ------------------
  |  |   87|   149k|#define LUMA_DC_AC_INTER_8  18
  ------------------
  |  Branch (185:3): [True: 149k, False: 629k]
  ------------------
  186|   149k|    *pMBproperty = 7;
  187|   149k|    *pResidualProperty = LUMA_DC_AC_8;
  ------------------
  |  |   75|   149k|#define LUMA_DC_AC_8  6
  ------------------
  188|   149k|    break;
  189|   779k|  }
  190|   779k|}

_ZN7WelsDec21DetectStartCodePrefixEPKhPii:
   66|  5.45M|uint8_t* DetectStartCodePrefix (const uint8_t* kpBuf, int32_t* pOffset, int32_t iBufSize) {
   67|  5.45M|  uint8_t* pBits = (uint8_t*)kpBuf;
   68|       |
   69|  10.7M|  do {
   70|  10.7M|    int32_t iIdx = 0;
   71|  24.2M|    while ((iIdx < iBufSize) && (! (*pBits))) {
  ------------------
  |  Branch (71:12): [True: 24.2M, False: 1.32k]
  |  Branch (71:33): [True: 13.4M, False: 10.7M]
  ------------------
   72|  13.4M|      ++ pBits;
   73|  13.4M|      ++ iIdx;
   74|  13.4M|    }
   75|  10.7M|    if (iIdx >= iBufSize)  break;
  ------------------
  |  Branch (75:9): [True: 1.32k, False: 10.7M]
  ------------------
   76|       |
   77|  10.7M|    ++ iIdx;
   78|  10.7M|    ++ pBits;
   79|       |
   80|  10.7M|    if ((iIdx >= 3) && ((* (pBits - 1)) == 0x1)) {
  ------------------
  |  Branch (80:9): [True: 5.45M, False: 5.30M]
  |  Branch (80:24): [True: 5.45M, False: 1.21k]
  ------------------
   81|  5.45M|      *pOffset = (int32_t) (((uintptr_t)pBits) - ((uintptr_t)kpBuf));
   82|  5.45M|      return pBits;
   83|  5.45M|    }
   84|       |
   85|  5.30M|    iBufSize -= iIdx;
   86|  5.30M|  }  while (1);
  ------------------
  |  Branch (86:13): [True: 5.30M, Folded]
  ------------------
   87|       |
   88|  1.32k|  return NULL;
   89|  5.45M|}
_ZN7WelsDec14ParseNalHeaderEPNS_21TagWelsDecoderContextEPN10WelsCommon16TagNalUnitHeaderEPhiS5_iPi:
  109|  5.44M|                         int32_t iSrcRbspLen, uint8_t* pSrcNal, int32_t iSrcNalLen, int32_t* pConsumedBytes) {
  110|  5.44M|  PNalUnit pCurNal = NULL;
  111|  5.44M|  uint8_t* pNal     = pSrcRbsp;
  112|  5.44M|  int32_t iNalSize  = iSrcRbspLen;
  113|  5.44M|  PBitStringAux pBs = NULL;
  114|  5.44M|  bool bExtensionFlag = false;
  115|  5.44M|  int32_t iErr = ERR_NONE;
  116|  5.44M|  int32_t iBitSize = 0;
  117|  5.44M|  SDataBuffer* pSavedData = &pCtx->sSavedData;
  118|  5.44M|  SLogContext* pLogCtx = & (pCtx->sLogCtx);
  119|  5.44M|  pNalUnitHeader->eNalUnitType = NAL_UNIT_UNSPEC_0;//SHOULD init it. because pCtx->sCurNalHead is common variable.
  120|       |
  121|       |  //remove the consecutive ZERO at the end of current NAL in the reverse order.--2011.6.1
  122|  5.44M|  {
  123|  5.44M|    int32_t iIndex = iSrcRbspLen - 1;
  124|  5.44M|    uint8_t uiBsZero = 0;
  125|  11.2M|    while (iIndex >= 0) {
  ------------------
  |  Branch (125:12): [True: 11.2M, False: 10.3k]
  ------------------
  126|  11.2M|      uiBsZero = pSrcRbsp[iIndex];
  127|  11.2M|      if (0 == uiBsZero) {
  ------------------
  |  Branch (127:11): [True: 5.84M, False: 5.43M]
  ------------------
  128|  5.84M|        --iNalSize;
  129|  5.84M|        ++ (*pConsumedBytes);
  130|  5.84M|        --iIndex;
  131|  5.84M|      } else {
  132|  5.43M|        break;
  133|  5.43M|      }
  134|  11.2M|    }
  135|  5.44M|  }
  136|       |
  137|  5.44M|  pNalUnitHeader->uiForbiddenZeroBit = (uint8_t) (pNal[0] >> 7); // uiForbiddenZeroBit
  138|  5.44M|  if (pNalUnitHeader->uiForbiddenZeroBit) { //2010.4.14
  ------------------
  |  Branch (138:7): [True: 44.8k, False: 5.40M]
  ------------------
  139|  44.8k|    pCtx->iErrorCode |= dsBitstreamError;
  140|  44.8k|    return NULL; //uiForbiddenZeroBit should always equal to 0
  141|  44.8k|  }
  142|       |
  143|  5.40M|  pNalUnitHeader->uiNalRefIdc   = (uint8_t) (pNal[0] >> 5);             // uiNalRefIdc
  144|  5.40M|  pNalUnitHeader->eNalUnitType  = (EWelsNalUnitType) (pNal[0] & 0x1f);  // eNalUnitType
  145|       |
  146|  5.40M|  ++pNal;
  147|  5.40M|  --iNalSize;
  148|  5.40M|  ++ (*pConsumedBytes);
  149|       |
  150|  5.40M|  if (! (IS_SEI_NAL (pNalUnitHeader->eNalUnitType) || IS_SPS_NAL (pNalUnitHeader->eNalUnitType)
  ------------------
  |  |  149|  10.8M|#define IS_SEI_NAL(t)                           ( (t) == NAL_UNIT_SEI )
  |  |  ------------------
  |  |  |  Branch (149:49): [True: 685, False: 5.40M]
  |  |  ------------------
  ------------------
                if (! (IS_SEI_NAL (pNalUnitHeader->eNalUnitType) || IS_SPS_NAL (pNalUnitHeader->eNalUnitType)
  ------------------
  |  |  146|  10.8M|#define IS_SPS_NAL(t)                           ( (t) == NAL_UNIT_SPS )
  |  |  ------------------
  |  |  |  Branch (146:49): [True: 106k, False: 5.29M]
  |  |  ------------------
  ------------------
  151|  5.29M|         || IS_AU_DELIMITER_NAL (pNalUnitHeader->eNalUnitType) || pCtx->sSpsPpsCtx.bSpsExistAheadFlag)) {
  ------------------
  |  |  150|  10.7M|#define IS_AU_DELIMITER_NAL(t)                  ( (t) == NAL_UNIT_AU_DELIMITER )
  |  |  ------------------
  |  |  |  Branch (150:49): [True: 3.49k, False: 5.29M]
  |  |  ------------------
  ------------------
  |  Branch (151:67): [True: 5.09M, False: 200k]
  ------------------
  152|   200k|    if (pCtx->bPrintFrameErrorTraceFlag && pCtx->sSpsPpsCtx.iSpsErrorIgnored == 0) {
  ------------------
  |  Branch (152:9): [True: 1.07k, False: 199k]
  |  Branch (152:44): [True: 1.07k, False: 0]
  ------------------
  153|  1.07k|      WelsLog (pLogCtx, WELS_LOG_WARNING,
  154|  1.07k|               "parse_nal(), no exist Sequence Parameter Sets ahead of sequence when try to decode NAL(type:%d).",
  155|  1.07k|               pNalUnitHeader->eNalUnitType);
  156|   199k|    } else {
  157|   199k|      pCtx->sSpsPpsCtx.iSpsErrorIgnored++;
  158|   199k|    }
  159|   200k|    pCtx->pDecoderStatistics->iSpsNoExistNalNum++;
  160|   200k|    pCtx->iErrorCode = dsNoParamSets;
  161|   200k|    return NULL;
  162|   200k|  }
  163|  5.20M|  pCtx->sSpsPpsCtx.iSpsErrorIgnored = 0;
  164|  5.20M|  if (! (IS_SEI_NAL (pNalUnitHeader->eNalUnitType) || IS_PARAM_SETS_NALS (pNalUnitHeader->eNalUnitType)
  ------------------
  |  |  149|  10.4M|#define IS_SEI_NAL(t)                           ( (t) == NAL_UNIT_SEI )
  |  |  ------------------
  |  |  |  Branch (149:49): [True: 685, False: 5.20M]
  |  |  ------------------
  ------------------
                if (! (IS_SEI_NAL (pNalUnitHeader->eNalUnitType) || IS_PARAM_SETS_NALS (pNalUnitHeader->eNalUnitType)
  ------------------
  |  |  145|  10.4M|#define IS_PARAM_SETS_NALS(t)                   ( (t) == NAL_UNIT_SPS || (t) == NAL_UNIT_PPS || (t) == NAL_UNIT_SUBSET_SPS )
  |  |  ------------------
  |  |  |  Branch (145:51): [True: 106k, False: 5.09M]
  |  |  |  Branch (145:74): [True: 116k, False: 4.98M]
  |  |  |  Branch (145:97): [True: 15.6k, False: 4.96M]
  |  |  ------------------
  ------------------
  165|  4.96M|         || IS_AU_DELIMITER_NAL (pNalUnitHeader->eNalUnitType) || pCtx->sSpsPpsCtx.bPpsExistAheadFlag)) {
  ------------------
  |  |  150|  10.1M|#define IS_AU_DELIMITER_NAL(t)                  ( (t) == NAL_UNIT_AU_DELIMITER )
  |  |  ------------------
  |  |  |  Branch (150:49): [True: 3.49k, False: 4.96M]
  |  |  ------------------
  ------------------
  |  Branch (165:67): [True: 4.95M, False: 4.53k]
  ------------------
  166|  4.53k|    if (pCtx->bPrintFrameErrorTraceFlag && pCtx->sSpsPpsCtx.iPpsErrorIgnored == 0) {
  ------------------
  |  Branch (166:9): [True: 598, False: 3.94k]
  |  Branch (166:44): [True: 598, False: 0]
  ------------------
  167|    598|      WelsLog (pLogCtx, WELS_LOG_WARNING,
  168|    598|               "parse_nal(), no exist Picture Parameter Sets ahead of sequence when try to decode NAL(type:%d).",
  169|    598|               pNalUnitHeader->eNalUnitType);
  170|  3.94k|    } else {
  171|  3.94k|      pCtx->sSpsPpsCtx.iPpsErrorIgnored++;
  172|  3.94k|    }
  173|  4.53k|    pCtx->pDecoderStatistics->iPpsNoExistNalNum++;
  174|  4.53k|    pCtx->iErrorCode = dsNoParamSets;
  175|  4.53k|    return NULL;
  176|  4.53k|  }
  177|  5.19M|  pCtx->sSpsPpsCtx.iPpsErrorIgnored = 0;
  178|  5.19M|  if ((IS_VCL_NAL_AVC_BASE (pNalUnitHeader->eNalUnitType) && ! (pCtx->sSpsPpsCtx.bSpsExistAheadFlag
  ------------------
  |  |  153|  10.3M|#define IS_VCL_NAL_AVC_BASE(t)                  ( (t) == NAL_UNIT_CODED_SLICE || (t) == NAL_UNIT_CODED_SLICE_IDR )
  |  |  ------------------
  |  |  |  Branch (153:51): [True: 2.77M, False: 2.42M]
  |  |  |  Branch (153:82): [True: 185k, False: 2.23M]
  |  |  ------------------
  ------------------
  |  Branch (178:65): [True: 2.96M, False: 0]
  ------------------
  179|      0|       || pCtx->sSpsPpsCtx.bPpsExistAheadFlag)) ||
  ------------------
  |  Branch (179:11): [True: 0, False: 0]
  ------------------
  180|  5.19M|      (IS_NEW_INTRODUCED_SVC_NAL (pNalUnitHeader->eNalUnitType) && ! (pCtx->sSpsPpsCtx.bSpsExistAheadFlag
  ------------------
  |  |  154|  10.3M|#define IS_NEW_INTRODUCED_SVC_NAL(t)            ( (t) == NAL_UNIT_PREFIX || (t) == NAL_UNIT_CODED_SLICE_EXT )
  |  |  ------------------
  |  |  |  Branch (154:51): [True: 6.40k, False: 5.19M]
  |  |  |  Branch (154:77): [True: 1.94M, False: 3.25M]
  |  |  ------------------
  ------------------
  |  Branch (180:71): [True: 1.94M, False: 0]
  ------------------
  181|      0|          || pCtx->sSpsPpsCtx.bSubspsExistAheadFlag
  ------------------
  |  Branch (181:14): [True: 0, False: 0]
  ------------------
  182|      0|          || pCtx->sSpsPpsCtx.bPpsExistAheadFlag))) {
  ------------------
  |  Branch (182:14): [True: 0, False: 0]
  ------------------
  183|      0|    if (pCtx->bPrintFrameErrorTraceFlag && pCtx->sSpsPpsCtx.iSubSpsErrorIgnored == 0) {
  ------------------
  |  Branch (183:9): [True: 0, False: 0]
  |  Branch (183:44): [True: 0, False: 0]
  ------------------
  184|      0|      WelsLog (pLogCtx, WELS_LOG_WARNING,
  185|      0|               "ParseNalHeader(), no exist Parameter Sets ahead of sequence when try to decode slice(type:%d).",
  186|      0|               pNalUnitHeader->eNalUnitType);
  187|      0|    } else {
  188|      0|      pCtx->sSpsPpsCtx.iSubSpsErrorIgnored++;
  189|      0|    }
  190|      0|    pCtx->pDecoderStatistics->iSubSpsNoExistNalNum++;
  191|      0|    pCtx->iErrorCode    |= dsNoParamSets;
  192|      0|    return NULL;
  193|      0|  }
  194|  5.19M|  pCtx->sSpsPpsCtx.iSubSpsErrorIgnored = 0;
  195|       |
  196|  5.19M|  switch (pNalUnitHeader->eNalUnitType) {
  197|  3.49k|  case NAL_UNIT_AU_DELIMITER:
  ------------------
  |  Branch (197:3): [True: 3.49k, False: 5.19M]
  ------------------
  198|  4.18k|  case NAL_UNIT_SEI:
  ------------------
  |  Branch (198:3): [True: 685, False: 5.19M]
  ------------------
  199|  4.18k|    if (pCtx->pAccessUnitList->uiAvailUnitsNum > 0) {
  ------------------
  |  Branch (199:9): [True: 0, False: 4.18k]
  ------------------
  200|      0|      pCtx->pAccessUnitList->uiEndPos = pCtx->pAccessUnitList->uiAvailUnitsNum - 1;
  201|      0|      pCtx->bAuReadyFlag = true;
  202|      0|    }
  203|  4.18k|    break;
  204|       |
  205|  6.40k|  case NAL_UNIT_PREFIX:
  ------------------
  |  Branch (205:3): [True: 6.40k, False: 5.19M]
  ------------------
  206|  6.40k|    pCurNal = &pCtx->sSpsPpsCtx.sPrefixNal;
  207|  6.40k|    pCurNal->uiTimeStamp = pCtx->uiTimeStamp;
  208|       |
  209|  6.40k|    if (iNalSize < NAL_UNIT_HEADER_EXT_SIZE) {
  ------------------
  |  |   42|  6.40k|#define NAL_UNIT_HEADER_EXT_SIZE        3       // Size of NAL unit header for extension in byte
  ------------------
  |  Branch (209:9): [True: 660, False: 5.74k]
  ------------------
  210|    660|      PAccessUnit pCurAu = pCtx->pAccessUnitList;
  211|    660|      uint32_t uiAvailNalNum = pCurAu->uiAvailUnitsNum;
  212|       |
  213|    660|      if (uiAvailNalNum > 0) {
  ------------------
  |  Branch (213:11): [True: 0, False: 660]
  ------------------
  214|      0|        pCurAu->uiEndPos = uiAvailNalNum - 1;
  215|      0|        if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) {
  ------------------
  |  Branch (215:13): [True: 0, False: 0]
  ------------------
  216|      0|          pCtx->bAuReadyFlag = true;
  217|      0|        }
  218|      0|      }
  219|    660|      pCurNal->sNalData.sPrefixNal.bPrefixNalCorrectFlag = false;
  220|    660|      pCtx->iErrorCode |= dsBitstreamError;
  221|    660|      return NULL;
  222|    660|    }
  223|       |
  224|  5.74k|    DecodeNalHeaderExt (pCurNal, pNal);
  225|  5.74k|    if ((pCurNal->sNalHeaderExt.uiQualityId != 0) || (pCurNal->sNalHeaderExt.bUseRefBasePicFlag != 0)) {
  ------------------
  |  Branch (225:9): [True: 869, False: 4.87k]
  |  Branch (225:54): [True: 334, False: 4.53k]
  ------------------
  226|  1.20k|      WelsLog (pLogCtx, WELS_LOG_WARNING,
  227|  1.20k|               "ParseNalHeader() in Prefix Nal Unit:uiQualityId (%d) != 0, bUseRefBasePicFlag (%d) != 0, not supported!",
  228|  1.20k|               pCurNal->sNalHeaderExt.uiQualityId, pCurNal->sNalHeaderExt.bUseRefBasePicFlag);
  229|  1.20k|      PAccessUnit pCurAu = pCtx->pAccessUnitList;
  230|  1.20k|      uint32_t uiAvailNalNum = pCurAu->uiAvailUnitsNum;
  231|       |
  232|  1.20k|      if (uiAvailNalNum > 0) {
  ------------------
  |  Branch (232:11): [True: 0, False: 1.20k]
  ------------------
  233|      0|        pCurAu->uiEndPos = uiAvailNalNum - 1;
  234|      0|        if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) {
  ------------------
  |  Branch (234:13): [True: 0, False: 0]
  ------------------
  235|      0|          pCtx->bAuReadyFlag = true;
  236|      0|        }
  237|      0|      }
  238|  1.20k|      pCurNal->sNalData.sPrefixNal.bPrefixNalCorrectFlag = false;
  239|  1.20k|      pCtx->iErrorCode |= dsBitstreamError;
  240|  1.20k|      return NULL;
  241|  1.20k|    }
  242|       |
  243|  4.53k|    pNal            += NAL_UNIT_HEADER_EXT_SIZE;
  ------------------
  |  |   42|  4.53k|#define NAL_UNIT_HEADER_EXT_SIZE        3       // Size of NAL unit header for extension in byte
  ------------------
  244|  4.53k|    iNalSize        -= NAL_UNIT_HEADER_EXT_SIZE;
  ------------------
  |  |   42|  4.53k|#define NAL_UNIT_HEADER_EXT_SIZE        3       // Size of NAL unit header for extension in byte
  ------------------
  245|  4.53k|    *pConsumedBytes += NAL_UNIT_HEADER_EXT_SIZE;
  ------------------
  |  |   42|  4.53k|#define NAL_UNIT_HEADER_EXT_SIZE        3       // Size of NAL unit header for extension in byte
  ------------------
  246|       |
  247|  4.53k|    pCurNal->sNalHeaderExt.sNalUnitHeader.uiForbiddenZeroBit = pNalUnitHeader->uiForbiddenZeroBit;
  248|  4.53k|    pCurNal->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc        = pNalUnitHeader->uiNalRefIdc;
  249|  4.53k|    pCurNal->sNalHeaderExt.sNalUnitHeader.eNalUnitType       = pNalUnitHeader->eNalUnitType;
  250|  4.53k|    if (pNalUnitHeader->uiNalRefIdc != 0) {
  ------------------
  |  Branch (250:9): [True: 4.32k, False: 211]
  ------------------
  251|  4.32k|      pBs = &pCtx->sBs;
  252|  4.32k|      iBitSize = (iNalSize << 3) - BsGetTrailingBits (pNal + iNalSize - 1); // convert into bit
  253|       |
  254|  4.32k|      iErr = DecInitBits (pBs, pNal, iBitSize);
  255|  4.32k|      if (iErr) {
  ------------------
  |  Branch (255:11): [True: 255, False: 4.07k]
  ------------------
  256|    255|        WelsLog (pLogCtx, WELS_LOG_ERROR, "NAL_UNIT_PREFIX: DecInitBits() fail due invalid access.");
  257|    255|        pCtx->iErrorCode |= dsBitstreamError;
  258|    255|        return NULL;
  259|    255|      }
  260|  4.07k|      ParsePrefixNalUnit (pCtx, pBs);
  261|  4.07k|    }
  262|  4.28k|    pCurNal->sNalData.sPrefixNal.bPrefixNalCorrectFlag = true;
  263|       |
  264|  4.28k|    break;
  265|  1.94M|  case NAL_UNIT_CODED_SLICE_EXT:
  ------------------
  |  Branch (265:3): [True: 1.94M, False: 3.25M]
  ------------------
  266|  1.94M|    bExtensionFlag = true;
  267|  4.71M|  case NAL_UNIT_CODED_SLICE:
  ------------------
  |  Branch (267:3): [True: 2.77M, False: 2.42M]
  ------------------
  268|  4.90M|  case NAL_UNIT_CODED_SLICE_IDR: {
  ------------------
  |  Branch (268:3): [True: 185k, False: 5.01M]
  ------------------
  269|  4.90M|    PAccessUnit pCurAu = NULL;
  270|  4.90M|    uint32_t uiAvailNalNum;
  271|  4.90M|    pCurNal = MemGetNextNal (&pCtx->pAccessUnitList, pCtx->pMemAlign);
  272|  4.90M|    if (NULL == pCurNal) {
  ------------------
  |  Branch (272:9): [True: 0, False: 4.90M]
  ------------------
  273|      0|      WelsLog (pLogCtx, WELS_LOG_ERROR, "MemGetNextNal() fail due out of memory.");
  274|      0|      pCtx->iErrorCode |= dsOutOfMemory;
  275|      0|      return NULL;
  276|      0|    }
  277|  4.90M|    pCurNal->uiTimeStamp = pCtx->uiTimeStamp;
  278|  4.90M|    pCurNal->sNalHeaderExt.sNalUnitHeader.uiForbiddenZeroBit = pNalUnitHeader->uiForbiddenZeroBit;
  279|  4.90M|    pCurNal->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc        = pNalUnitHeader->uiNalRefIdc;
  280|  4.90M|    pCurNal->sNalHeaderExt.sNalUnitHeader.eNalUnitType       = pNalUnitHeader->eNalUnitType;
  281|  4.90M|    pCurAu        = pCtx->pAccessUnitList;
  282|  4.90M|    uiAvailNalNum = pCurAu->uiAvailUnitsNum;
  283|       |
  284|       |
  285|  4.90M|    if (pNalUnitHeader->eNalUnitType == NAL_UNIT_CODED_SLICE_EXT) {
  ------------------
  |  Branch (285:9): [True: 1.94M, False: 2.96M]
  ------------------
  286|  1.94M|      if (iNalSize < NAL_UNIT_HEADER_EXT_SIZE) {
  ------------------
  |  |   42|  1.94M|#define NAL_UNIT_HEADER_EXT_SIZE        3       // Size of NAL unit header for extension in byte
  ------------------
  |  Branch (286:11): [True: 2.24k, False: 1.93M]
  ------------------
  287|  2.24k|        ForceClearCurrentNal (pCurAu);
  288|       |
  289|  2.24k|        if (uiAvailNalNum > 1) {
  ------------------
  |  Branch (289:13): [True: 0, False: 2.24k]
  ------------------
  290|      0|          pCurAu->uiEndPos = uiAvailNalNum - 2;
  291|      0|          if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) {
  ------------------
  |  Branch (291:15): [True: 0, False: 0]
  ------------------
  292|      0|            pCtx->bAuReadyFlag = true;
  293|      0|          }
  294|      0|        }
  295|  2.24k|        pCtx->iErrorCode |= dsBitstreamError;
  296|  2.24k|        return NULL;
  297|  2.24k|      }
  298|       |
  299|  1.93M|      DecodeNalHeaderExt (pCurNal, pNal);
  300|  1.93M|      if (pCurNal->sNalHeaderExt.uiQualityId != 0 ||
  ------------------
  |  Branch (300:11): [True: 3.12k, False: 1.93M]
  ------------------
  301|  1.93M|          pCurNal->sNalHeaderExt.bUseRefBasePicFlag) {
  ------------------
  |  Branch (301:11): [True: 1.06k, False: 1.93M]
  ------------------
  302|  4.18k|        if (pCurNal->sNalHeaderExt.uiQualityId != 0)
  ------------------
  |  Branch (302:13): [True: 3.12k, False: 1.06k]
  ------------------
  303|  3.12k|          WelsLog (pLogCtx, WELS_LOG_WARNING, "ParseNalHeader():uiQualityId (%d) != 0, MGS not supported!",
  304|  3.12k|                   pCurNal->sNalHeaderExt.uiQualityId);
  305|  4.18k|        if (pCurNal->sNalHeaderExt.bUseRefBasePicFlag != 0)
  ------------------
  |  Branch (305:13): [True: 1.77k, False: 2.41k]
  ------------------
  306|  1.77k|          WelsLog (pLogCtx, WELS_LOG_WARNING, "ParseNalHeader():bUseRefBasePicFlag (%d) != 0, MGS not supported!",
  307|  1.77k|                   pCurNal->sNalHeaderExt.bUseRefBasePicFlag);
  308|       |
  309|  4.18k|        ForceClearCurrentNal (pCurAu);
  310|       |
  311|  4.18k|        if (uiAvailNalNum > 1) {
  ------------------
  |  Branch (311:13): [True: 0, False: 4.18k]
  ------------------
  312|      0|          pCurAu->uiEndPos = uiAvailNalNum - 2;
  313|      0|          if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) {
  ------------------
  |  Branch (313:15): [True: 0, False: 0]
  ------------------
  314|      0|            pCtx->bAuReadyFlag = true;
  315|      0|          }
  316|      0|        }
  317|  4.18k|        pCtx->iErrorCode |= dsBitstreamError;
  318|  4.18k|        return NULL;
  319|  4.18k|      }
  320|  1.93M|      pNal            += NAL_UNIT_HEADER_EXT_SIZE;
  ------------------
  |  |   42|  1.93M|#define NAL_UNIT_HEADER_EXT_SIZE        3       // Size of NAL unit header for extension in byte
  ------------------
  321|  1.93M|      iNalSize        -= NAL_UNIT_HEADER_EXT_SIZE;
  ------------------
  |  |   42|  1.93M|#define NAL_UNIT_HEADER_EXT_SIZE        3       // Size of NAL unit header for extension in byte
  ------------------
  322|  1.93M|      *pConsumedBytes += NAL_UNIT_HEADER_EXT_SIZE;
  ------------------
  |  |   42|  1.93M|#define NAL_UNIT_HEADER_EXT_SIZE        3       // Size of NAL unit header for extension in byte
  ------------------
  323|       |
  324|  1.93M|      if (pCtx->pParam->bParseOnly) {
  ------------------
  |  Branch (324:11): [True: 0, False: 1.93M]
  ------------------
  325|      0|        int32_t iTrailingZeroByte = 0;
  326|      0|        while (pSrcNal[iSrcNalLen - iTrailingZeroByte - 1] == 0x0) //remove final trailing 0 bytes
  ------------------
  |  Branch (326:16): [True: 0, False: 0]
  ------------------
  327|      0|          iTrailingZeroByte++;
  328|      0|        int32_t iActualLen = iSrcNalLen - iTrailingZeroByte;
  329|       |        //unify start code as 0x0001
  330|      0|        int32_t iCurrStartByte = 4; //4 for 0x0001, 3 for 0x001
  331|      0|        if (pSrcNal[0] == 0x0 && pSrcNal[1] == 0x0 && pSrcNal[2] == 0x1) { //if 0x001
  ------------------
  |  Branch (331:13): [True: 0, False: 0]
  |  Branch (331:34): [True: 0, False: 0]
  |  Branch (331:55): [True: 0, False: 0]
  ------------------
  332|      0|          iCurrStartByte = 3;
  333|      0|        }
  334|      0|        int32_t iOffset = iCurrStartByte + 1 + NAL_UNIT_HEADER_EXT_SIZE;
  ------------------
  |  |   42|      0|#define NAL_UNIT_HEADER_EXT_SIZE        3       // Size of NAL unit header for extension in byte
  ------------------
  335|      0|        int32_t iWriteLen = 5 + (iActualLen - iOffset); // 4-byte start code + NAL type byte + payload
  336|       |        // Bounds check: ensure write fits in sSavedData buffer
  337|      0|        if (pSavedData->pCurPos + iWriteLen > pSavedData->pEnd) {
  ------------------
  |  Branch (337:13): [True: 0, False: 0]
  ------------------
  338|      0|          pSavedData->pCurPos = pSavedData->pHead;
  339|      0|        }
  340|      0|        pCurNal->sNalData.sVclNal.pNalPos = pSavedData->pCurPos;
  341|      0|        pCurNal->sNalData.sVclNal.iNalLength = iActualLen - NAL_UNIT_HEADER_EXT_SIZE;
  ------------------
  |  |   42|      0|#define NAL_UNIT_HEADER_EXT_SIZE        3       // Size of NAL unit header for extension in byte
  ------------------
  342|      0|        if (iCurrStartByte == 3) {
  ------------------
  |  Branch (342:13): [True: 0, False: 0]
  ------------------
  343|      0|          pCurNal->sNalData.sVclNal.iNalLength++;
  344|      0|        }
  345|      0|        if (pCurNal->sNalHeaderExt.bIdrFlag) {
  ------------------
  |  Branch (345:13): [True: 0, False: 0]
  ------------------
  346|      0|          * (pSrcNal + iCurrStartByte) &= 0xE0;
  347|      0|          * (pSrcNal + iCurrStartByte) |= 0x05;
  348|      0|        } else {
  349|      0|          * (pSrcNal + iCurrStartByte) &= 0xE0;
  350|      0|          * (pSrcNal + iCurrStartByte) |= 0x01;
  351|      0|        }
  352|      0|        pSavedData->pCurPos[0] = pSavedData->pCurPos[1] = pSavedData->pCurPos[2] = 0x0;
  353|      0|        pSavedData->pCurPos[3] = 0x1;
  354|      0|        pSavedData->pCurPos[4] = * (pSrcNal + iCurrStartByte);
  355|      0|        pSavedData->pCurPos += 5;
  356|      0|        memcpy (pSavedData->pCurPos, pSrcNal + iOffset, iActualLen - iOffset);
  357|      0|        pSavedData->pCurPos += iActualLen - iOffset;
  358|      0|      }
  359|  2.96M|    } else {
  360|  2.96M|      if (pCtx->pParam->bParseOnly) {
  ------------------
  |  Branch (360:11): [True: 0, False: 2.96M]
  ------------------
  361|      0|        int32_t iTrailingZeroByte = 0;
  362|      0|        while (pSrcNal[iSrcNalLen - iTrailingZeroByte - 1] == 0x0) //remove final trailing 0 bytes
  ------------------
  |  Branch (362:16): [True: 0, False: 0]
  ------------------
  363|      0|          iTrailingZeroByte++;
  364|      0|        int32_t iActualLen = iSrcNalLen - iTrailingZeroByte;
  365|       |        //unify start code as 0x0001
  366|      0|        int32_t iStartDeltaByte = 0; //0 for 0x0001, 1 for 0x001
  367|      0|        if (pSrcNal[0] == 0x0 && pSrcNal[1] == 0x0 && pSrcNal[2] == 0x1) { //if 0x001
  ------------------
  |  Branch (367:13): [True: 0, False: 0]
  |  Branch (367:34): [True: 0, False: 0]
  |  Branch (367:55): [True: 0, False: 0]
  ------------------
  368|      0|          iStartDeltaByte = 1;
  369|      0|        }
  370|      0|        int32_t iWriteLen = iStartDeltaByte + iActualLen;
  371|       |        // Bounds check: ensure write fits in sSavedData buffer
  372|      0|        if (pSavedData->pCurPos + iWriteLen > pSavedData->pEnd) {
  ------------------
  |  Branch (372:13): [True: 0, False: 0]
  ------------------
  373|      0|          pSavedData->pCurPos = pSavedData->pHead;
  374|      0|        }
  375|      0|        pCurNal->sNalData.sVclNal.pNalPos = pSavedData->pCurPos;
  376|      0|        pCurNal->sNalData.sVclNal.iNalLength = iActualLen;
  377|      0|        if (iStartDeltaByte) {
  ------------------
  |  Branch (377:13): [True: 0, False: 0]
  ------------------
  378|      0|          pSavedData->pCurPos[0] = 0x0;
  379|      0|          pCurNal->sNalData.sVclNal.iNalLength++;
  380|      0|        }
  381|      0|        memcpy (pSavedData->pCurPos + iStartDeltaByte, pSrcNal, iActualLen);
  382|      0|        pSavedData->pCurPos += iStartDeltaByte + iActualLen;
  383|      0|      }
  384|  2.96M|      if (NAL_UNIT_PREFIX == pCtx->sSpsPpsCtx.sPrefixNal.sNalHeaderExt.sNalUnitHeader.eNalUnitType) {
  ------------------
  |  Branch (384:11): [True: 284k, False: 2.67M]
  ------------------
  385|   284k|        if (pCtx->sSpsPpsCtx.sPrefixNal.sNalData.sPrefixNal.bPrefixNalCorrectFlag) {
  ------------------
  |  Branch (385:13): [True: 53.4k, False: 231k]
  ------------------
  386|  53.4k|          PrefetchNalHeaderExtSyntax (pCtx, pCurNal, &pCtx->sSpsPpsCtx.sPrefixNal);
  387|  53.4k|        }
  388|   284k|      }
  389|       |
  390|  2.96M|      pCurNal->sNalHeaderExt.bIdrFlag = (NAL_UNIT_CODED_SLICE_IDR == pNalUnitHeader->eNalUnitType) ? true :
  ------------------
  |  Branch (390:41): [True: 185k, False: 2.77M]
  ------------------
  391|  2.96M|                                        false;   //SHOULD update this flag for AVC if no prefix NAL
  392|  2.96M|      pCurNal->sNalHeaderExt.iNoInterLayerPredFlag = 1;
  393|  2.96M|    }
  394|       |
  395|  4.89M|    pBs = &pCurAu->pNalUnitsList[uiAvailNalNum - 1]->sNalData.sVclNal.sSliceBitsRead;
  396|  4.89M|    iBitSize = (iNalSize << 3) - BsGetTrailingBits (pNal + iNalSize - 1); // convert into bit
  397|  4.89M|    iErr = DecInitBits (pBs, pNal, iBitSize);
  398|  4.89M|    if (iErr) {
  ------------------
  |  Branch (398:9): [True: 15.3k, False: 4.88M]
  ------------------
  399|  15.3k|      ForceClearCurrentNal (pCurAu);
  400|  15.3k|      if (uiAvailNalNum > 1) {
  ------------------
  |  Branch (400:11): [True: 0, False: 15.3k]
  ------------------
  401|      0|        pCurAu->uiEndPos = uiAvailNalNum - 2;
  402|      0|        if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) {
  ------------------
  |  Branch (402:13): [True: 0, False: 0]
  ------------------
  403|      0|          pCtx->bAuReadyFlag = true;
  404|      0|        }
  405|      0|      }
  406|  15.3k|      WelsLog (pLogCtx, WELS_LOG_ERROR, "NAL_UNIT_CODED_SLICE: DecInitBits() fail due invalid access.");
  407|  15.3k|      pCtx->iErrorCode |= dsBitstreamError;
  408|  15.3k|      return NULL;
  409|  15.3k|    }
  410|  4.88M|    iErr = ParseSliceHeaderSyntaxs (pCtx, pBs, bExtensionFlag);
  411|  4.88M|    if (iErr != ERR_NONE) {
  ------------------
  |  Branch (411:9): [True: 2.28M, False: 2.59M]
  ------------------
  412|  2.28M|      if ((uiAvailNalNum == 1) && (pCurNal->sNalHeaderExt.bIdrFlag)) { //IDR parse error
  ------------------
  |  Branch (412:11): [True: 2.28M, False: 0]
  |  Branch (412:35): [True: 32.5k, False: 2.25M]
  ------------------
  413|  32.5k|        ResetActiveSPSForEachLayer (pCtx);
  414|  32.5k|      }
  415|       |      //if current NAL occur error when parsing, should clean it from pNalUnitsList
  416|       |      //otherwise, when Next good NAL decoding, this corrupt NAL is considered as normal NAL and lead to decoder crash
  417|  2.28M|      ForceClearCurrentNal (pCurAu);
  418|       |
  419|  2.28M|      if (uiAvailNalNum > 1) {
  ------------------
  |  Branch (419:11): [True: 0, False: 2.28M]
  ------------------
  420|      0|        pCurAu->uiEndPos = uiAvailNalNum - 2;
  421|      0|        if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) {
  ------------------
  |  Branch (421:13): [True: 0, False: 0]
  ------------------
  422|      0|          pCtx->bAuReadyFlag = true;
  423|      0|        }
  424|      0|      }
  425|  2.28M|      pCtx->iErrorCode |= dsBitstreamError;
  426|  2.28M|      return NULL;
  427|  2.28M|    }
  428|       |
  429|  2.59M|    if ((uiAvailNalNum == 1)
  ------------------
  |  Branch (429:9): [True: 2.59M, False: 0]
  ------------------
  430|  2.59M|        && CheckNextAuNewSeq (pCtx, pCurNal, pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pSps)) {
  ------------------
  |  Branch (430:12): [True: 186k, False: 2.40M]
  ------------------
  431|   186k|      ResetActiveSPSForEachLayer (pCtx);
  432|   186k|    }
  433|  2.59M|    if ((uiAvailNalNum > 1) &&
  ------------------
  |  Branch (433:9): [True: 0, False: 2.59M]
  ------------------
  434|      0|        CheckAccessUnitBoundary (pCtx, pCurAu->pNalUnitsList[uiAvailNalNum - 1], pCurAu->pNalUnitsList[uiAvailNalNum - 2],
  ------------------
  |  Branch (434:9): [True: 0, False: 0]
  ------------------
  435|      0|                                 pCurAu->pNalUnitsList[uiAvailNalNum - 1]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pSps)) {
  436|      0|      pCurAu->uiEndPos = uiAvailNalNum - 2;
  437|      0|      pCtx->bAuReadyFlag = true;
  438|      0|      pCtx->bNextNewSeqBegin = CheckNextAuNewSeq (pCtx, pCurNal, pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pSps);
  439|       |
  440|      0|    }
  441|  2.59M|  }
  442|      0|  break;
  443|   286k|  default:
  ------------------
  |  Branch (443:3): [True: 286k, False: 4.91M]
  ------------------
  444|   286k|    break;
  445|  5.19M|  }
  446|       |
  447|  2.88M|  return pNal;
  448|  5.19M|}
_ZN7WelsDec26CheckAccessUnitBoundaryExtEPN10WelsCommon19TagNalUnitHeaderExtES2_PNS_15TagSliceHeadersES4_:
  452|   686k|                                 PSliceHeader pLastSliceHeader, PSliceHeader pCurSliceHeader) {
  453|   686k|  const PSps kpSps = pCurSliceHeader->pSps;
  454|       |
  455|       |  //Sub-clause 7.1.4.1.1 temporal_id
  456|   686k|  if (pLastNalHdrExt->uiTemporalId != pCurNalHeaderExt->uiTemporalId) {
  ------------------
  |  Branch (456:7): [True: 4.48k, False: 682k]
  ------------------
  457|  4.48k|    return true;
  458|  4.48k|  }
  459|       |
  460|       |  // Subclause 7.4.1.2.5
  461|   682k|  if (pLastSliceHeader->iRedundantPicCnt > pCurSliceHeader->iRedundantPicCnt)
  ------------------
  |  Branch (461:7): [True: 0, False: 682k]
  ------------------
  462|      0|    return true;
  463|       |
  464|       |  // Subclause G7.4.1.2.4
  465|   682k|  if (pLastNalHdrExt->uiDependencyId > pCurNalHeaderExt->uiDependencyId)
  ------------------
  |  Branch (465:7): [True: 207, False: 682k]
  ------------------
  466|    207|    return true;
  467|   682k|  if (pLastNalHdrExt->uiQualityId > pCurNalHeaderExt->uiQualityId)
  ------------------
  |  Branch (467:7): [True: 0, False: 682k]
  ------------------
  468|      0|    return true;
  469|       |
  470|       |  // Subclause 7.4.1.2.4
  471|   682k|  if (pLastSliceHeader->iFrameNum != pCurSliceHeader->iFrameNum)
  ------------------
  |  Branch (471:7): [True: 158k, False: 523k]
  ------------------
  472|   158k|    return true;
  473|   523k|  if (pLastSliceHeader->iPpsId != pCurSliceHeader->iPpsId)
  ------------------
  |  Branch (473:7): [True: 492, False: 522k]
  ------------------
  474|    492|    return true;
  475|   522k|  if (pLastSliceHeader->pSps->iSpsId != pCurSliceHeader->pSps->iSpsId)
  ------------------
  |  Branch (475:7): [True: 0, False: 522k]
  ------------------
  476|      0|    return true;
  477|   522k|  if (pLastSliceHeader->bFieldPicFlag != pCurSliceHeader->bFieldPicFlag)
  ------------------
  |  Branch (477:7): [True: 0, False: 522k]
  ------------------
  478|      0|    return true;
  479|   522k|  if (pLastSliceHeader->bBottomFiledFlag != pCurSliceHeader->bBottomFiledFlag)
  ------------------
  |  Branch (479:7): [True: 0, False: 522k]
  ------------------
  480|      0|    return true;
  481|   522k|  if ((pLastNalHdrExt->sNalUnitHeader.uiNalRefIdc != NRI_PRI_LOWEST) != (pCurNalHeaderExt->sNalUnitHeader.uiNalRefIdc !=
  ------------------
  |  Branch (481:7): [True: 641, False: 522k]
  ------------------
  482|   522k|      NRI_PRI_LOWEST))
  483|    641|    return true;
  484|   522k|  if (pLastNalHdrExt->bIdrFlag != pCurNalHeaderExt->bIdrFlag)
  ------------------
  |  Branch (484:7): [True: 845, False: 521k]
  ------------------
  485|    845|    return true;
  486|   521k|  if (pCurNalHeaderExt->bIdrFlag) {
  ------------------
  |  Branch (486:7): [True: 39.7k, False: 481k]
  ------------------
  487|  39.7k|    if (pLastSliceHeader->uiIdrPicId != pCurSliceHeader->uiIdrPicId)
  ------------------
  |  Branch (487:9): [True: 270, False: 39.4k]
  ------------------
  488|    270|      return true;
  489|  39.7k|  }
  490|   521k|  if (kpSps->uiPocType == 0) {
  ------------------
  |  Branch (490:7): [True: 434k, False: 86.3k]
  ------------------
  491|   434k|    if (pLastSliceHeader->iPicOrderCntLsb != pCurSliceHeader->iPicOrderCntLsb)
  ------------------
  |  Branch (491:9): [True: 274k, False: 159k]
  ------------------
  492|   274k|      return true;
  493|   159k|    if (pLastSliceHeader->iDeltaPicOrderCntBottom != pCurSliceHeader->iDeltaPicOrderCntBottom)
  ------------------
  |  Branch (493:9): [True: 3.09k, False: 156k]
  ------------------
  494|  3.09k|      return true;
  495|   159k|  } else if (kpSps->uiPocType == 1) {
  ------------------
  |  Branch (495:14): [True: 1.61k, False: 84.7k]
  ------------------
  496|  1.61k|    if (pLastSliceHeader->iDeltaPicOrderCnt[0] != pCurSliceHeader->iDeltaPicOrderCnt[0])
  ------------------
  |  Branch (496:9): [True: 209, False: 1.40k]
  ------------------
  497|    209|      return true;
  498|  1.40k|    if (pLastSliceHeader->iDeltaPicOrderCnt[1] != pCurSliceHeader->iDeltaPicOrderCnt[1])
  ------------------
  |  Branch (498:9): [True: 275, False: 1.12k]
  ------------------
  499|    275|      return true;
  500|  1.40k|  }
  501|   242k|  if (memcmp (pLastSliceHeader->pPps, pCurSliceHeader->pPps, sizeof (SPps)) != 0
  ------------------
  |  Branch (501:7): [True: 0, False: 242k]
  ------------------
  502|   242k|      || memcmp (pLastSliceHeader->pSps, pCurSliceHeader->pSps, sizeof (SSps)) != 0) {
  ------------------
  |  Branch (502:10): [True: 813, False: 241k]
  ------------------
  503|    813|    return true;
  504|    813|  }
  505|   241k|  return false;
  506|   242k|}
_ZN7WelsDec17CheckNextAuNewSeqEPNS_21TagWelsDecoderContextEPNS_10TagNalUnitEPNS_6TagSpsE:
  565|  2.59M|bool CheckNextAuNewSeq (PWelsDecoderContext pCtx, const PNalUnit kpCurNal, const PSps kpSps) {
  566|  2.59M|  const PNalUnitHeaderExt kpCurNalHeaderExt = &kpCurNal->sNalHeaderExt;
  567|  2.59M|  if (pCtx->sSpsPpsCtx.pActiveLayerSps[kpCurNalHeaderExt->uiDependencyId] != NULL
  ------------------
  |  Branch (567:7): [True: 2.55M, False: 41.9k]
  ------------------
  568|  2.55M|      && pCtx->sSpsPpsCtx.pActiveLayerSps[kpCurNalHeaderExt->uiDependencyId] != kpSps)
  ------------------
  |  Branch (568:10): [True: 14.6k, False: 2.53M]
  ------------------
  569|  14.6k|    return true;
  570|  2.57M|  if (kpCurNalHeaderExt->bIdrFlag)
  ------------------
  |  Branch (570:7): [True: 172k, False: 2.40M]
  ------------------
  571|   172k|    return true;
  572|       |
  573|  2.40M|  return false;
  574|  2.57M|}
_ZN7WelsDec14ParseNonVclNalEPNS_21TagWelsDecoderContextEPhiS2_i:
  590|   238k|                        const int32_t kSrcNalLen) {
  591|   238k|  PBitStringAux pBs = NULL;
  592|   238k|  EWelsNalUnitType eNalType     = NAL_UNIT_UNSPEC_0; // make initial value as unspecified
  593|   238k|  int32_t iPicWidth             = 0;
  594|   238k|  int32_t iPicHeight            = 0;
  595|   238k|  int32_t iBitSize              = 0;
  596|   238k|  int32_t iErr                  = ERR_NONE;
  597|   238k|  if (kiSrcLen <= 0)
  ------------------
  |  Branch (597:7): [True: 1.71k, False: 236k]
  ------------------
  598|  1.71k|    return iErr;
  599|       |
  600|   236k|  pBs = &pCtx->sBs; // SBitStringAux instance for non VCL NALs decoding
  601|   236k|  iBitSize = (kiSrcLen << 3) - BsGetTrailingBits (pRbsp + kiSrcLen - 1); // convert into bit
  602|   236k|  eNalType = pCtx->sCurNalHead.eNalUnitType;
  603|       |
  604|   236k|  switch (eNalType) {
  605|   106k|  case NAL_UNIT_SPS:
  ------------------
  |  Branch (605:3): [True: 106k, False: 130k]
  ------------------
  606|   121k|  case NAL_UNIT_SUBSET_SPS:
  ------------------
  |  Branch (606:3): [True: 15.3k, False: 221k]
  ------------------
  607|   121k|    if (iBitSize > 0) {
  ------------------
  |  Branch (607:9): [True: 121k, False: 0]
  ------------------
  608|   121k|      iErr = DecInitBits (pBs, pRbsp, iBitSize);
  609|   121k|      if (ERR_NONE != iErr) {
  ------------------
  |  Branch (609:11): [True: 0, False: 121k]
  ------------------
  610|      0|        if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE)
  ------------------
  |  Branch (610:13): [True: 0, False: 0]
  ------------------
  611|      0|          pCtx->iErrorCode |= dsNoParamSets;
  612|      0|        else
  613|      0|          pCtx->iErrorCode |= dsBitstreamError;
  614|      0|        return iErr;
  615|      0|      }
  616|   121k|    }
  617|   121k|    iErr = ParseSps (pCtx, pBs, &iPicWidth, &iPicHeight, pSrcNal, kSrcNalLen);
  618|   121k|    if (ERR_NONE != iErr) { // modified for pSps/pSubsetSps invalid, 12/1/2009
  ------------------
  |  Branch (618:9): [True: 47.6k, False: 73.7k]
  ------------------
  619|  47.6k|      if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE)
  ------------------
  |  Branch (619:11): [True: 0, False: 47.6k]
  ------------------
  620|      0|        pCtx->iErrorCode |= dsNoParamSets;
  621|  47.6k|      else
  622|  47.6k|        pCtx->iErrorCode |= dsBitstreamError;
  623|  47.6k|      return iErr;
  624|  47.6k|    }
  625|  73.7k|    pCtx->bHasNewSps = true;
  626|  73.7k|    break;
  627|       |
  628|   115k|  case NAL_UNIT_PPS:
  ------------------
  |  Branch (628:3): [True: 115k, False: 121k]
  ------------------
  629|   115k|    if (iBitSize > 0) {
  ------------------
  |  Branch (629:9): [True: 115k, False: 0]
  ------------------
  630|   115k|      iErr = DecInitBits (pBs, pRbsp, iBitSize);
  631|   115k|      if (ERR_NONE != iErr) {
  ------------------
  |  Branch (631:11): [True: 0, False: 115k]
  ------------------
  632|      0|        if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE)
  ------------------
  |  Branch (632:13): [True: 0, False: 0]
  ------------------
  633|      0|          pCtx->iErrorCode |= dsNoParamSets;
  634|      0|        else
  635|      0|          pCtx->iErrorCode |= dsBitstreamError;
  636|      0|        return iErr;
  637|      0|      }
  638|   115k|    }
  639|   115k|    iErr = ParsePps (pCtx, &pCtx->sSpsPpsCtx.sPpsBuffer[0], pBs, pSrcNal, kSrcNalLen);
  640|   115k|    if (ERR_NONE != iErr) { // modified for pps invalid, 12/1/2009
  ------------------
  |  Branch (640:9): [True: 26.3k, False: 89.0k]
  ------------------
  641|  26.3k|      if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE)
  ------------------
  |  Branch (641:11): [True: 0, False: 26.3k]
  ------------------
  642|      0|        pCtx->iErrorCode |= dsNoParamSets;
  643|  26.3k|      else
  644|  26.3k|        pCtx->iErrorCode |= dsBitstreamError;
  645|  26.3k|      pCtx->bHasNewSps = false;
  646|  26.3k|      return iErr;
  647|  26.3k|    }
  648|       |
  649|  89.0k|    pCtx->sSpsPpsCtx.bPpsExistAheadFlag = true;
  650|  89.0k|    ++ (pCtx->sSpsPpsCtx.iSeqId);
  651|  89.0k|    break;
  652|       |
  653|      0|  case NAL_UNIT_SEI:
  ------------------
  |  Branch (653:3): [True: 0, False: 236k]
  ------------------
  654|       |
  655|      0|    break;
  656|       |
  657|      0|  case NAL_UNIT_PREFIX:
  ------------------
  |  Branch (657:3): [True: 0, False: 236k]
  ------------------
  658|      0|    break;
  659|      0|  case NAL_UNIT_CODED_SLICE_DPA:
  ------------------
  |  Branch (659:3): [True: 0, False: 236k]
  ------------------
  660|      0|  case NAL_UNIT_CODED_SLICE_DPB:
  ------------------
  |  Branch (660:3): [True: 0, False: 236k]
  ------------------
  661|      0|  case NAL_UNIT_CODED_SLICE_DPC:
  ------------------
  |  Branch (661:3): [True: 0, False: 236k]
  ------------------
  662|       |
  663|      0|    break;
  664|       |
  665|      0|  default:
  ------------------
  |  Branch (665:3): [True: 0, False: 236k]
  ------------------
  666|      0|    break;
  667|   236k|  }
  668|       |
  669|   162k|  return iErr;
  670|   236k|}
_ZN7WelsDec22ParseRefBasePicMarkingEPN10WelsCommon15TagBitStringAuxEPNS_23TagRefBasePicMarkingSynE:
  672|  3.10k|int32_t ParseRefBasePicMarking (PBitStringAux pBs, PRefBasePicMarking pRefBasePicMarking) {
  673|  3.10k|  uint32_t uiCode;
  674|  3.10k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_ref_base_pic_marking_mode_flag
  ------------------
  |  |   52|  3.10k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.10k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.10k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 3.10k]
  |  |  ------------------
  |  |   55|  3.10k|    return uiRetTmp; \
  |  |   56|  3.10k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.10k]
  |  |  ------------------
  ------------------
  675|  3.10k|  const bool kbAdaptiveMarkingModeFlag = !!uiCode;
  676|  3.10k|  pRefBasePicMarking->bAdaptiveRefBasePicMarkingModeFlag = kbAdaptiveMarkingModeFlag;
  677|  3.10k|  if (kbAdaptiveMarkingModeFlag) {
  ------------------
  |  Branch (677:7): [True: 2.73k, False: 371]
  ------------------
  678|  2.73k|    int32_t iIdx = 0;
  679|  21.5k|    do {
  680|  21.5k|      WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //MMCO_base
  ------------------
  |  |   52|  21.5k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  21.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  21.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 508, False: 21.0k]
  |  |  ------------------
  |  |   55|  21.5k|    return uiRetTmp; \
  |  |   56|  21.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 21.0k]
  |  |  ------------------
  ------------------
  681|  21.0k|      const uint32_t kuiMmco = uiCode;
  682|       |
  683|  21.0k|      pRefBasePicMarking->mmco_base[iIdx].uiMmcoType = kuiMmco;
  684|       |
  685|  21.0k|      if (kuiMmco == MMCO_END)
  ------------------
  |  Branch (685:11): [True: 1.43k, False: 19.5k]
  ------------------
  686|  1.43k|        break;
  687|       |
  688|  19.5k|      if (kuiMmco == MMCO_SHORT2UNUSED) {
  ------------------
  |  Branch (688:11): [True: 9.28k, False: 10.2k]
  ------------------
  689|  9.28k|        WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //difference_of_base_pic_nums_minus1
  ------------------
  |  |   52|  9.28k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  9.28k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  9.28k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 363, False: 8.92k]
  |  |  ------------------
  |  |   55|  9.28k|    return uiRetTmp; \
  |  |   56|  9.28k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 8.92k]
  |  |  ------------------
  ------------------
  690|  8.92k|        pRefBasePicMarking->mmco_base[iIdx].uiDiffOfPicNums = 1 + uiCode;
  691|  8.92k|        pRefBasePicMarking->mmco_base[iIdx].iShortFrameNum  = 0;
  692|  10.2k|      } else if (kuiMmco == MMCO_LONG2UNUSED) {
  ------------------
  |  Branch (692:18): [True: 7.68k, False: 2.60k]
  ------------------
  693|  7.68k|        WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //long_term_base_pic_num
  ------------------
  |  |   52|  7.68k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  7.68k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  7.68k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 223, False: 7.45k]
  |  |  ------------------
  |  |   55|  7.68k|    return uiRetTmp; \
  |  |   56|  7.68k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 7.45k]
  |  |  ------------------
  ------------------
  694|  7.45k|        pRefBasePicMarking->mmco_base[iIdx].uiLongTermPicNum = uiCode;
  695|  7.45k|      }
  696|  18.9k|      ++ iIdx;
  697|  18.9k|    } while (iIdx < MAX_MMCO_COUNT);
  ------------------
  |  |   51|  18.9k|#define MAX_MMCO_COUNT                  66
  ------------------
  |  Branch (697:14): [True: 18.7k, False: 212]
  ------------------
  698|  2.73k|  }
  699|  2.01k|  return ERR_NONE;
  700|  3.10k|}
_ZN7WelsDec18ParsePrefixNalUnitEPNS_21TagWelsDecoderContextEPN10WelsCommon15TagBitStringAuxE:
  702|  4.07k|int32_t ParsePrefixNalUnit (PWelsDecoderContext pCtx, PBitStringAux pBs) {
  703|  4.07k|  PNalUnit pCurNal = &pCtx->sSpsPpsCtx.sPrefixNal;
  704|  4.07k|  uint32_t uiCode;
  705|       |
  706|  4.07k|  if (pCurNal->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc != 0) {
  ------------------
  |  Branch (706:7): [True: 4.07k, False: 0]
  ------------------
  707|  4.07k|    PNalUnitHeaderExt head_ext = &pCurNal->sNalHeaderExt;
  708|  4.07k|    PPrefixNalUnit sPrefixNal = &pCurNal->sNalData.sPrefixNal;
  709|  4.07k|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //store_ref_base_pic_flag
  ------------------
  |  |   52|  4.07k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.07k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.07k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 4.07k]
  |  |  ------------------
  |  |   55|  4.07k|    return uiRetTmp; \
  |  |   56|  4.07k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.07k]
  |  |  ------------------
  ------------------
  710|  4.07k|    sPrefixNal->bStoreRefBasePicFlag = !!uiCode;
  711|  4.07k|    if ((head_ext->bUseRefBasePicFlag || sPrefixNal->bStoreRefBasePicFlag) && !head_ext->bIdrFlag) {
  ------------------
  |  Branch (711:10): [True: 0, False: 4.07k]
  |  Branch (711:42): [True: 3.49k, False: 579]
  |  Branch (711:79): [True: 3.10k, False: 386]
  ------------------
  712|  3.10k|      WELS_READ_VERIFY (ParseRefBasePicMarking (pBs, &sPrefixNal->sRefPicBaseMarking));
  ------------------
  |  |   52|  3.10k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.10k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.10k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.09k, False: 2.01k]
  |  |  ------------------
  |  |   55|  3.10k|    return uiRetTmp; \
  |  |   56|  3.10k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.01k]
  |  |  ------------------
  ------------------
  713|  3.10k|    }
  714|  2.97k|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //additional_prefix_nal_unit_extension_flag
  ------------------
  |  |   52|  2.97k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.97k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.97k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 363, False: 2.61k]
  |  |  ------------------
  |  |   55|  2.97k|    return uiRetTmp; \
  |  |   56|  2.97k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.61k]
  |  |  ------------------
  ------------------
  715|  2.61k|    sPrefixNal->bPrefixNalUnitAdditionalExtFlag = !!uiCode;
  716|  2.61k|    if (sPrefixNal->bPrefixNalUnitAdditionalExtFlag) {
  ------------------
  |  Branch (716:9): [True: 1.43k, False: 1.18k]
  ------------------
  717|  1.43k|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //additional_prefix_nal_unit_extension_data_flag
  ------------------
  |  |   52|  1.43k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.43k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.43k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 207, False: 1.22k]
  |  |  ------------------
  |  |   55|  1.43k|    return uiRetTmp; \
  |  |   56|  1.43k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.22k]
  |  |  ------------------
  ------------------
  718|  1.22k|      sPrefixNal->bPrefixNalUnitExtFlag = !!uiCode;
  719|  1.22k|    }
  720|  2.61k|  }
  721|  2.40k|  return ERR_NONE;
  722|  4.07k|}
_ZN7WelsDec15DecodeSpsSvcExtEPNS_21TagWelsDecoderContextEPNS_12TagSubsetSpsEPN10WelsCommon15TagBitStringAuxE:
  736|  8.78k|int32_t DecodeSpsSvcExt (PWelsDecoderContext pCtx, PSubsetSps pSpsExt, PBitStringAux pBs) {
  737|  8.78k|  PSpsSvcExt  pExt = NULL;
  738|  8.78k|  uint32_t uiCode;
  739|  8.78k|  int32_t iCode;
  740|       |
  741|  8.78k|  pExt = &pSpsExt->sSpsSvcExt;
  742|       |
  743|  8.78k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //inter_layer_deblocking_filter_control_present_flag
  ------------------
  |  |   52|  8.78k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  8.78k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  8.78k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 348, False: 8.43k]
  |  |  ------------------
  |  |   55|  8.78k|    return uiRetTmp; \
  |  |   56|  8.78k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 8.43k]
  |  |  ------------------
  ------------------
  744|  8.43k|  pExt->bInterLayerDeblockingFilterCtrlPresentFlag = !!uiCode;
  745|  8.43k|  WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); //extended_spatial_scalability_idc
  ------------------
  |  |   52|  8.43k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  8.43k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  8.43k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 217, False: 8.21k]
  |  |  ------------------
  |  |   55|  8.43k|    return uiRetTmp; \
  |  |   56|  8.43k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 8.21k]
  |  |  ------------------
  ------------------
  746|  8.21k|  pExt->uiExtendedSpatialScalability = uiCode;
  747|  8.21k|  if (pExt->uiExtendedSpatialScalability > 2) {
  ------------------
  |  Branch (747:7): [True: 324, False: 7.89k]
  ------------------
  748|    324|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
  749|    324|             "DecodeSpsSvcExt():extended_spatial_scalability (%d) != 0, ESS not supported!",
  750|    324|             pExt->uiExtendedSpatialScalability);
  751|    324|    return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_ESS);
  ------------------
  |  |   59|    324|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  752|    324|  }
  753|       |
  754|  7.89k|  pExt->uiChromaPhaseXPlus1Flag =
  755|  7.89k|    0;  // FIXME: Incoherent with JVT X201 standard (= 1), but conformance to JSVM (= 0) implementation.
  756|  7.89k|  pExt->uiChromaPhaseYPlus1 = 1;
  757|       |
  758|  7.89k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //chroma_phase_x_plus1_flag
  ------------------
  |  |   52|  7.89k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  7.89k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  7.89k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 464, False: 7.43k]
  |  |  ------------------
  |  |   55|  7.89k|    return uiRetTmp; \
  |  |   56|  7.89k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 7.43k]
  |  |  ------------------
  ------------------
  759|  7.43k|  pExt->uiChromaPhaseXPlus1Flag = uiCode;
  760|  7.43k|  WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); //chroma_phase_y_plus1
  ------------------
  |  |   52|  7.43k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  7.43k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  7.43k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 388, False: 7.04k]
  |  |  ------------------
  |  |   55|  7.43k|    return uiRetTmp; \
  |  |   56|  7.43k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 7.04k]
  |  |  ------------------
  ------------------
  761|  7.04k|  pExt->uiChromaPhaseYPlus1 = uiCode;
  762|       |
  763|  7.04k|  pExt->uiSeqRefLayerChromaPhaseXPlus1Flag = pExt->uiChromaPhaseXPlus1Flag;
  764|  7.04k|  pExt->uiSeqRefLayerChromaPhaseYPlus1     = pExt->uiChromaPhaseYPlus1;
  765|  7.04k|  memset (&pExt->sSeqScaledRefLayer, 0, sizeof (SPosOffset));
  766|       |
  767|  7.04k|  if (pExt->uiExtendedSpatialScalability == 1) {
  ------------------
  |  Branch (767:7): [True: 4.75k, False: 2.28k]
  ------------------
  768|  4.75k|    SPosOffset* const kpPos = &pExt->sSeqScaledRefLayer;
  769|  4.75k|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //seq_ref_layer_chroma_phase_x_plus1_flag
  ------------------
  |  |   52|  4.75k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.75k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.75k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 196, False: 4.56k]
  |  |  ------------------
  |  |   55|  4.75k|    return uiRetTmp; \
  |  |   56|  4.75k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.56k]
  |  |  ------------------
  ------------------
  770|  4.56k|    pExt->uiSeqRefLayerChromaPhaseXPlus1Flag = uiCode;
  771|  4.56k|    WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); //seq_ref_layer_chroma_phase_y_plus1
  ------------------
  |  |   52|  4.56k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.56k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.56k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 198, False: 4.36k]
  |  |  ------------------
  |  |   55|  4.56k|    return uiRetTmp; \
  |  |   56|  4.56k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.36k]
  |  |  ------------------
  ------------------
  772|  4.36k|    pExt->uiSeqRefLayerChromaPhaseYPlus1 = uiCode;
  773|       |
  774|  4.36k|    WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //seq_scaled_ref_layer_left_offset
  ------------------
  |  |   52|  4.36k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.36k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.36k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 247, False: 4.11k]
  |  |  ------------------
  |  |   55|  4.36k|    return uiRetTmp; \
  |  |   56|  4.36k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.11k]
  |  |  ------------------
  ------------------
  775|  4.11k|    kpPos->iLeftOffset = iCode;
  776|  4.11k|    WELS_CHECK_SE_BOTH_WARNING (kpPos->iLeftOffset, SUBSET_SPS_SEQ_SCALED_REF_LAYER_LEFT_OFFSET_MIN,
  ------------------
  |  |  288|  4.11k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  4.11k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 445, False: 3.67k]
  |  |  |  Branch (289:28): [True: 322, False: 3.35k]
  |  |  ------------------
  |  |  290|    767|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|    767|}\
  |  |  292|  4.11k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 4.11k]
  |  |  ------------------
  ------------------
  777|  4.11k|                                SUBSET_SPS_SEQ_SCALED_REF_LAYER_LEFT_OFFSET_MAX, "seq_scaled_ref_layer_left_offset");
  778|  4.11k|    WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //seq_scaled_ref_layer_top_offset
  ------------------
  |  |   52|  4.11k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.11k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.11k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 629, False: 3.48k]
  |  |  ------------------
  |  |   55|  4.11k|    return uiRetTmp; \
  |  |   56|  4.11k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.48k]
  |  |  ------------------
  ------------------
  779|  3.48k|    kpPos->iTopOffset = iCode;
  780|  3.48k|    WELS_CHECK_SE_BOTH_WARNING (kpPos->iTopOffset, SUBSET_SPS_SEQ_SCALED_REF_LAYER_TOP_OFFSET_MIN,
  ------------------
  |  |  288|  3.48k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  3.48k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 283, False: 3.20k]
  |  |  |  Branch (289:28): [True: 397, False: 2.80k]
  |  |  ------------------
  |  |  290|    680|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|    680|}\
  |  |  292|  3.48k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 3.48k]
  |  |  ------------------
  ------------------
  781|  3.48k|                                SUBSET_SPS_SEQ_SCALED_REF_LAYER_TOP_OFFSET_MAX, "seq_scaled_ref_layer_top_offset");
  782|  3.48k|    WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //seq_scaled_ref_layer_right_offset
  ------------------
  |  |   52|  3.48k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.48k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.48k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 567, False: 2.92k]
  |  |  ------------------
  |  |   55|  3.48k|    return uiRetTmp; \
  |  |   56|  3.48k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  783|  2.92k|    kpPos->iRightOffset = iCode;
  784|  2.92k|    WELS_CHECK_SE_BOTH_WARNING (kpPos->iRightOffset, SUBSET_SPS_SEQ_SCALED_REF_LAYER_RIGHT_OFFSET_MIN,
  ------------------
  |  |  288|  2.92k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  2.92k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 297, False: 2.62k]
  |  |  |  Branch (289:28): [True: 283, False: 2.34k]
  |  |  ------------------
  |  |  290|    580|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|    580|}\
  |  |  292|  2.92k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 2.92k]
  |  |  ------------------
  ------------------
  785|  2.92k|                                SUBSET_SPS_SEQ_SCALED_REF_LAYER_RIGHT_OFFSET_MAX, "seq_scaled_ref_layer_right_offset");
  786|  2.92k|    WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //seq_scaled_ref_layer_bottom_offset
  ------------------
  |  |   52|  2.92k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.92k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.92k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 701, False: 2.22k]
  |  |  ------------------
  |  |   55|  2.92k|    return uiRetTmp; \
  |  |   56|  2.92k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.22k]
  |  |  ------------------
  ------------------
  787|  2.22k|    kpPos->iBottomOffset = iCode;
  788|  2.22k|    WELS_CHECK_SE_BOTH_WARNING (kpPos->iBottomOffset, SUBSET_SPS_SEQ_SCALED_REF_LAYER_BOTTOM_OFFSET_MIN,
  ------------------
  |  |  288|  2.22k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  2.22k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 254, False: 1.96k]
  |  |  |  Branch (289:28): [True: 320, False: 1.64k]
  |  |  ------------------
  |  |  290|    574|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|    574|}\
  |  |  292|  2.22k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 2.22k]
  |  |  ------------------
  ------------------
  789|  2.22k|                                SUBSET_SPS_SEQ_SCALED_REF_LAYER_BOTTOM_OFFSET_MAX, "seq_scaled_ref_layer_bottom_offset");
  790|  2.22k|  }
  791|       |
  792|  4.50k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //seq_tcoeff_level_prediction_flag
  ------------------
  |  |   52|  4.50k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.50k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.50k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 341, False: 4.16k]
  |  |  ------------------
  |  |   55|  4.50k|    return uiRetTmp; \
  |  |   56|  4.50k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.16k]
  |  |  ------------------
  ------------------
  793|  4.16k|  pExt->bSeqTCoeffLevelPredFlag = !!uiCode;
  794|  4.16k|  pExt->bAdaptiveTCoeffLevelPredFlag = false;
  795|  4.16k|  if (pExt->bSeqTCoeffLevelPredFlag) {
  ------------------
  |  Branch (795:7): [True: 2.37k, False: 1.79k]
  ------------------
  796|  2.37k|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_tcoeff_level_prediction_flag
  ------------------
  |  |   52|  2.37k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.37k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.37k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 440, False: 1.93k]
  |  |  ------------------
  |  |   55|  2.37k|    return uiRetTmp; \
  |  |   56|  2.37k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.93k]
  |  |  ------------------
  ------------------
  797|  1.93k|    pExt->bAdaptiveTCoeffLevelPredFlag = !!uiCode;
  798|  1.93k|  }
  799|  3.72k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //slice_header_restriction_flag
  ------------------
  |  |   52|  3.72k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.72k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.72k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 646, False: 3.07k]
  |  |  ------------------
  |  |   55|  3.72k|    return uiRetTmp; \
  |  |   56|  3.72k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.07k]
  |  |  ------------------
  ------------------
  800|  3.07k|  pExt->bSliceHeaderRestrictionFlag = !!uiCode;
  801|       |
  802|       |
  803|       |
  804|  3.07k|  return ERR_NONE;
  805|  3.72k|}
_ZN7WelsDec14GetLevelLimitsEib:
  807|   222k|const SLevelLimits* GetLevelLimits (int32_t iLevelIdx, bool bConstraint3) {
  808|   222k|  switch (iLevelIdx) {
  809|  7.25k|  case 9:
  ------------------
  |  Branch (809:3): [True: 7.25k, False: 215k]
  ------------------
  810|  7.25k|    return &g_ksLevelLimits[1];
  811|  16.7k|  case 10:
  ------------------
  |  Branch (811:3): [True: 16.7k, False: 206k]
  ------------------
  812|  16.7k|    return &g_ksLevelLimits[0];
  813|  10.0k|  case 11:
  ------------------
  |  Branch (813:3): [True: 10.0k, False: 212k]
  ------------------
  814|  10.0k|    if (bConstraint3)
  ------------------
  |  Branch (814:9): [True: 3.57k, False: 6.46k]
  ------------------
  815|  3.57k|      return &g_ksLevelLimits[1];
  816|  6.46k|    else
  817|  6.46k|      return &g_ksLevelLimits[2];
  818|  5.00k|  case 12:
  ------------------
  |  Branch (818:3): [True: 5.00k, False: 217k]
  ------------------
  819|  5.00k|    return &g_ksLevelLimits[3];
  820|  5.06k|  case 13:
  ------------------
  |  Branch (820:3): [True: 5.06k, False: 217k]
  ------------------
  821|  5.06k|    return &g_ksLevelLimits[4];
  822|  1.67k|  case 20:
  ------------------
  |  Branch (822:3): [True: 1.67k, False: 221k]
  ------------------
  823|  1.67k|    return &g_ksLevelLimits[5];
  824|  15.9k|  case 21:
  ------------------
  |  Branch (824:3): [True: 15.9k, False: 206k]
  ------------------
  825|  15.9k|    return &g_ksLevelLimits[6];
  826|    447|  case 22:
  ------------------
  |  Branch (826:3): [True: 447, False: 222k]
  ------------------
  827|    447|    return &g_ksLevelLimits[7];
  828|  1.22k|  case 30:
  ------------------
  |  Branch (828:3): [True: 1.22k, False: 221k]
  ------------------
  829|  1.22k|    return &g_ksLevelLimits[8];
  830|  2.15k|  case 31:
  ------------------
  |  Branch (830:3): [True: 2.15k, False: 220k]
  ------------------
  831|  2.15k|    return &g_ksLevelLimits[9];
  832|  3.82k|  case 32:
  ------------------
  |  Branch (832:3): [True: 3.82k, False: 218k]
  ------------------
  833|  3.82k|    return &g_ksLevelLimits[10];
  834|  21.9k|  case 40:
  ------------------
  |  Branch (834:3): [True: 21.9k, False: 200k]
  ------------------
  835|  21.9k|    return &g_ksLevelLimits[11];
  836|  4.28k|  case 41:
  ------------------
  |  Branch (836:3): [True: 4.28k, False: 218k]
  ------------------
  837|  4.28k|    return &g_ksLevelLimits[12];
  838|  9.79k|  case 42:
  ------------------
  |  Branch (838:3): [True: 9.79k, False: 213k]
  ------------------
  839|  9.79k|    return &g_ksLevelLimits[13];
  840|  1.54k|  case 50:
  ------------------
  |  Branch (840:3): [True: 1.54k, False: 221k]
  ------------------
  841|  1.54k|    return &g_ksLevelLimits[14];
  842|    371|  case 51:
  ------------------
  |  Branch (842:3): [True: 371, False: 222k]
  ------------------
  843|    371|    return &g_ksLevelLimits[15];
  844|   112k|  case 52:
  ------------------
  |  Branch (844:3): [True: 112k, False: 110k]
  ------------------
  845|   112k|    return &g_ksLevelLimits[16];
  846|  3.44k|  default:
  ------------------
  |  Branch (846:3): [True: 3.44k, False: 219k]
  ------------------
  847|  3.44k|    return NULL;
  848|   222k|  }
  849|      0|  return NULL;
  850|   222k|}
_ZN7WelsDec14CheckSpsActiveEPNS_21TagWelsDecoderContextEPNS_6TagSpsEb:
  852|  68.8k|bool CheckSpsActive (PWelsDecoderContext pCtx, PSps pSps, bool bUseSubsetFlag) {
  853|   364k|  for (int i = 0; i < MAX_LAYER_NUM; i++) {
  ------------------
  |  |   55|   364k|#define MAX_LAYER_NUM                   8
  ------------------
  |  Branch (853:19): [True: 327k, False: 37.0k]
  ------------------
  854|   327k|    if (pCtx->sSpsPpsCtx.pActiveLayerSps[i] == pSps)
  ------------------
  |  Branch (854:9): [True: 31.8k, False: 296k]
  ------------------
  855|  31.8k|      return true;
  856|   327k|  }
  857|       |  // Pre-active, will be used soon
  858|  37.0k|  if (bUseSubsetFlag) {
  ------------------
  |  Branch (858:7): [True: 4.55k, False: 32.4k]
  ------------------
  859|  4.55k|    if (pSps->iMbWidth > 0 && pSps->iMbHeight > 0 && pCtx->sSpsPpsCtx.bSubspsAvailFlags[pSps->iSpsId]) {
  ------------------
  |  Branch (859:9): [True: 2.77k, False: 1.77k]
  |  Branch (859:31): [True: 2.77k, False: 0]
  |  Branch (859:54): [True: 2.77k, False: 0]
  ------------------
  860|  2.77k|      if (pCtx->iTotalNumMbRec > 0) {
  ------------------
  |  Branch (860:11): [True: 880, False: 1.89k]
  ------------------
  861|    880|        return true;
  862|    880|      }
  863|  1.89k|      if (pCtx->pAccessUnitList->uiAvailUnitsNum > 0) {
  ------------------
  |  Branch (863:11): [True: 0, False: 1.89k]
  ------------------
  864|      0|        int i = 0, iNum = (int32_t) pCtx->pAccessUnitList->uiAvailUnitsNum;
  865|      0|        while (i < iNum) {
  ------------------
  |  Branch (865:16): [True: 0, False: 0]
  ------------------
  866|      0|          PNalUnit pNalUnit = pCtx->pAccessUnitList->pNalUnitsList[i];
  867|      0|          if (pNalUnit->sNalData.sVclNal.bSliceHeaderExtFlag) { //ext data
  ------------------
  |  Branch (867:15): [True: 0, False: 0]
  ------------------
  868|      0|            PSps pNextUsedSps = pNalUnit->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pSps;
  869|      0|            if (pNextUsedSps->iSpsId == pSps->iSpsId)
  ------------------
  |  Branch (869:17): [True: 0, False: 0]
  ------------------
  870|      0|              return true;
  871|      0|          }
  872|      0|          ++i;
  873|      0|        }
  874|      0|      }
  875|  1.89k|    }
  876|  32.4k|  } else {
  877|  32.4k|    if (pSps->iMbWidth > 0 && pSps->iMbHeight > 0 && pCtx->sSpsPpsCtx.bSpsAvailFlags[pSps->iSpsId]) {
  ------------------
  |  Branch (877:9): [True: 7.85k, False: 24.6k]
  |  Branch (877:31): [True: 7.85k, False: 0]
  |  Branch (877:54): [True: 7.85k, False: 0]
  ------------------
  878|  7.85k|      if (pCtx->iTotalNumMbRec > 0) {
  ------------------
  |  Branch (878:11): [True: 655, False: 7.19k]
  ------------------
  879|    655|        return true;
  880|    655|      }
  881|  7.19k|      if (pCtx->pAccessUnitList->uiAvailUnitsNum > 0) {
  ------------------
  |  Branch (881:11): [True: 0, False: 7.19k]
  ------------------
  882|      0|        int i = 0, iNum = (int32_t) pCtx->pAccessUnitList->uiAvailUnitsNum;
  883|      0|        while (i < iNum) {
  ------------------
  |  Branch (883:16): [True: 0, False: 0]
  ------------------
  884|      0|          PNalUnit pNalUnit = pCtx->pAccessUnitList->pNalUnitsList[i];
  885|      0|          if (!pNalUnit->sNalData.sVclNal.bSliceHeaderExtFlag) { //non-ext data
  ------------------
  |  Branch (885:15): [True: 0, False: 0]
  ------------------
  886|      0|            PSps pNextUsedSps = pNalUnit->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pSps;
  887|      0|            if (pNextUsedSps->iSpsId == pSps->iSpsId)
  ------------------
  |  Branch (887:17): [True: 0, False: 0]
  ------------------
  888|      0|              return true;
  889|      0|          }
  890|      0|          ++i;
  891|      0|        }
  892|      0|      }
  893|  7.19k|    }
  894|  32.4k|  }
  895|  35.4k|  return false;
  896|  37.0k|}
_ZN7WelsDec8ParseSpsEPNS_21TagWelsDecoderContextEPN10WelsCommon15TagBitStringAuxEPiS5_Phi:
  926|   121k|                  uint8_t* pSrcNal, const int32_t kSrcNalLen) {
  927|   121k|  PBitStringAux pBs = pBsAux;
  928|   121k|  SSubsetSps sTempSubsetSps;
  929|   121k|  PSps pSps = NULL;
  930|   121k|  PSubsetSps pSubsetSps = NULL;
  931|   121k|  SNalUnitHeader* pNalHead = &pCtx->sCurNalHead;
  932|   121k|  ProfileIdc uiProfileIdc;
  933|   121k|  uint8_t uiLevelIdc;
  934|   121k|  int32_t iSpsId;
  935|   121k|  uint32_t uiCode;
  936|   121k|  int32_t iCode;
  937|   121k|  int32_t iRet = ERR_NONE;
  938|   121k|  bool bConstraintSetFlags[6] = { false };
  939|   121k|  const bool kbUseSubsetFlag   = IS_SUBSET_SPS_NAL (pNalHead->eNalUnitType);
  ------------------
  |  |  147|   121k|#define IS_SUBSET_SPS_NAL(t)                    ( (t) == NAL_UNIT_SUBSET_SPS )
  ------------------
  940|       |
  941|   121k|  WELS_READ_VERIFY (BsGetBits (pBs, 8, &uiCode)); //profile_idc
  ------------------
  |  |   52|   121k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   121k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   121k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 121k]
  |  |  ------------------
  |  |   55|   121k|    return uiRetTmp; \
  |  |   56|   121k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 121k]
  |  |  ------------------
  ------------------
  942|   121k|  uiProfileIdc = uiCode;
  943|   121k|  if (uiProfileIdc != PRO_BASELINE && uiProfileIdc != PRO_MAIN && uiProfileIdc != PRO_SCALABLE_BASELINE
  ------------------
  |  Branch (943:7): [True: 76.2k, False: 45.2k]
  |  Branch (943:39): [True: 47.3k, False: 28.8k]
  |  Branch (943:67): [True: 39.2k, False: 8.12k]
  ------------------
  944|  39.2k|      && uiProfileIdc != PRO_SCALABLE_HIGH
  ------------------
  |  Branch (944:10): [True: 17.5k, False: 21.6k]
  ------------------
  945|  17.5k|      && uiProfileIdc != PRO_EXTENDED && uiProfileIdc != PRO_HIGH) {
  ------------------
  |  Branch (945:10): [True: 15.3k, False: 2.22k]
  |  Branch (945:42): [True: 4.87k, False: 10.4k]
  ------------------
  946|  4.87k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "SPS ID can not be supported!\n");
  947|  4.87k|    return false;
  948|  4.87k|  }
  949|   116k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set0_flag
  ------------------
  |  |   52|   116k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   116k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   116k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 116k]
  |  |  ------------------
  |  |   55|   116k|    return uiRetTmp; \
  |  |   56|   116k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 116k]
  |  |  ------------------
  ------------------
  950|   116k|  bConstraintSetFlags[0] = !!uiCode;
  951|   116k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set1_flag
  ------------------
  |  |   52|   116k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   116k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   116k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 116k]
  |  |  ------------------
  |  |   55|   116k|    return uiRetTmp; \
  |  |   56|   116k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 116k]
  |  |  ------------------
  ------------------
  952|   116k|  bConstraintSetFlags[1] = !!uiCode;
  953|   116k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set2_flag
  ------------------
  |  |   52|   116k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   116k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   116k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 116k]
  |  |  ------------------
  |  |   55|   116k|    return uiRetTmp; \
  |  |   56|   116k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 116k]
  |  |  ------------------
  ------------------
  954|   116k|  bConstraintSetFlags[2] = !!uiCode;
  955|   116k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set3_flag
  ------------------
  |  |   52|   116k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   116k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   116k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 116k]
  |  |  ------------------
  |  |   55|   116k|    return uiRetTmp; \
  |  |   56|   116k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 116k]
  |  |  ------------------
  ------------------
  956|   116k|  bConstraintSetFlags[3] = !!uiCode;
  957|   116k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set4_flag
  ------------------
  |  |   52|   116k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   116k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   116k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 116k]
  |  |  ------------------
  |  |   55|   116k|    return uiRetTmp; \
  |  |   56|   116k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 116k]
  |  |  ------------------
  ------------------
  958|   116k|  bConstraintSetFlags[4] = !!uiCode;
  959|   116k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constraint_set5_flag
  ------------------
  |  |   52|   116k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   116k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   116k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 116k]
  |  |  ------------------
  |  |   55|   116k|    return uiRetTmp; \
  |  |   56|   116k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 116k]
  |  |  ------------------
  ------------------
  960|   116k|  bConstraintSetFlags[5] = !!uiCode;
  961|   116k|  WELS_READ_VERIFY (BsGetBits (pBs, 2, &uiCode)); // reserved_zero_2bits, equal to 0
  ------------------
  |  |   52|   116k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   116k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   116k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 116k]
  |  |  ------------------
  |  |   55|   116k|    return uiRetTmp; \
  |  |   56|   116k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 116k]
  |  |  ------------------
  ------------------
  962|   116k|  WELS_READ_VERIFY (BsGetBits (pBs, 8, &uiCode)); // level_idc
  ------------------
  |  |   52|   116k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   116k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   116k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.41k, False: 114k]
  |  |  ------------------
  |  |   55|   116k|    return uiRetTmp; \
  |  |   56|   116k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 114k]
  |  |  ------------------
  ------------------
  963|   114k|  uiLevelIdc = uiCode;
  964|   114k|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //seq_parameter_set_id
  ------------------
  |  |   52|   114k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   114k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   114k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 987, False: 113k]
  |  |  ------------------
  |  |   55|   114k|    return uiRetTmp; \
  |  |   56|   114k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 113k]
  |  |  ------------------
  ------------------
  965|   113k|  if (uiCode >= MAX_SPS_COUNT) { // Modified to check invalid negative iSpsId, 12/1/2009
  ------------------
  |  |   59|   113k|#define MAX_SPS_COUNT           32      // Count number of SPS
  ------------------
  |  Branch (965:7): [True: 1.74k, False: 111k]
  ------------------
  966|  1.74k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " iSpsId is out of range! \n");
  967|  1.74k|    return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_SPS_ID_OVERFLOW);
  ------------------
  |  |   59|  1.74k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  968|  1.74k|  }
  969|   111k|  iSpsId = uiCode;
  970|   111k|  pSubsetSps = &sTempSubsetSps;
  971|   111k|  pSps = &sTempSubsetSps.sSps;
  972|   111k|  memset (pSubsetSps, 0, sizeof (SSubsetSps));
  973|       |  // Use the level 5.2 for compatibility
  974|   111k|  const SLevelLimits* pSMaxLevelLimits = GetLevelLimits (52, false);
  975|   111k|  const SLevelLimits* pSLevelLimits = GetLevelLimits (uiLevelIdc, bConstraintSetFlags[3]);
  976|   111k|  if (NULL == pSLevelLimits) {
  ------------------
  |  Branch (976:7): [True: 3.44k, False: 107k]
  ------------------
  977|  3.44k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): level_idx (%d).\n", uiLevelIdc);
  978|  3.44k|    return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
  ------------------
  |  |   59|  3.44k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  979|   107k|  } else pSps->pSLevelLimits = pSLevelLimits;
  980|       |  // syntax elements in default
  981|   107k|  pSps->uiChromaFormatIdc = 1;
  982|   107k|  pSps->uiChromaArrayType = 1;
  983|       |
  984|   107k|  pSps->uiProfileIdc = uiProfileIdc;
  985|   107k|  pSps->uiLevelIdc   = uiLevelIdc;
  986|   107k|  pSps->iSpsId       = iSpsId;
  987|       |
  988|   107k|  if (PRO_SCALABLE_BASELINE == uiProfileIdc || PRO_SCALABLE_HIGH == uiProfileIdc ||
  ------------------
  |  Branch (988:7): [True: 7.38k, False: 100k]
  |  Branch (988:48): [True: 21.2k, False: 79.3k]
  ------------------
  989|  79.3k|      PRO_HIGH == uiProfileIdc || PRO_HIGH10 == uiProfileIdc ||
  ------------------
  |  Branch (989:7): [True: 9.79k, False: 69.5k]
  |  Branch (989:35): [True: 0, False: 69.5k]
  ------------------
  990|  69.5k|      PRO_HIGH422 == uiProfileIdc || PRO_HIGH444 == uiProfileIdc ||
  ------------------
  |  Branch (990:7): [True: 0, False: 69.5k]
  |  Branch (990:38): [True: 0, False: 69.5k]
  ------------------
  991|  69.5k|      PRO_CAVLC444 == uiProfileIdc || 44 == uiProfileIdc) {
  ------------------
  |  Branch (991:7): [True: 0, False: 69.5k]
  |  Branch (991:39): [True: 0, False: 69.5k]
  ------------------
  992|       |
  993|  38.4k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //chroma_format_idc
  ------------------
  |  |   52|  38.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  38.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  38.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 208, False: 38.2k]
  |  |  ------------------
  |  |   55|  38.4k|    return uiRetTmp; \
  |  |   56|  38.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 38.2k]
  |  |  ------------------
  ------------------
  994|  38.2k|    pSps->uiChromaFormatIdc = uiCode;
  995|       |//    if (pSps->uiChromaFormatIdc != 1) {
  996|       |//      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) = 1 supported.",
  997|       |//               pSps->uiChromaFormatIdc);
  998|       |//      return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
  999|       |//    }
 1000|  38.2k|    if (pSps->uiChromaFormatIdc > 1) {
  ------------------
  |  Branch (1000:9): [True: 406, False: 37.8k]
  ------------------
 1001|    406|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): chroma_format_idc (%d) <=1 supported.",
 1002|    406|               pSps->uiChromaFormatIdc);
 1003|    406|      return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
  ------------------
  |  |   59|    406|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1004|       |
 1005|    406|    }// To support 4:0:0; 4:2:0
 1006|  37.8k|    pSps->uiChromaArrayType = pSps->uiChromaFormatIdc;
 1007|  37.8k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //bit_depth_luma_minus8
  ------------------
  |  |   52|  37.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  37.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  37.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 396, False: 37.4k]
  |  |  ------------------
  |  |   55|  37.8k|    return uiRetTmp; \
  |  |   56|  37.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 37.4k]
  |  |  ------------------
  ------------------
 1008|  37.4k|    if (uiCode != 0) {
  ------------------
  |  Branch (1008:9): [True: 320, False: 37.0k]
  ------------------
 1009|    320|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): bit_depth_luma (%d) Only 8 bit supported.", 8 + uiCode);
 1010|    320|      return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
  ------------------
  |  |   59|    320|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1011|    320|    }
 1012|  37.0k|    pSps->uiBitDepthLuma = 8;
 1013|       |
 1014|  37.0k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //bit_depth_chroma_minus8
  ------------------
  |  |   52|  37.0k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  37.0k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  37.0k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 198, False: 36.8k]
  |  |  ------------------
  |  |   55|  37.0k|    return uiRetTmp; \
  |  |   56|  37.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 36.8k]
  |  |  ------------------
  ------------------
 1015|  36.8k|    if (uiCode != 0) {
  ------------------
  |  Branch (1015:9): [True: 255, False: 36.6k]
  ------------------
 1016|    255|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): bit_depth_chroma (%d). Only 8 bit supported.", 8 + uiCode);
 1017|    255|      return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_NON_BASELINE);
  ------------------
  |  |   59|    255|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1018|    255|    }
 1019|  36.6k|    pSps->uiBitDepthChroma = 8;
 1020|       |
 1021|  36.6k|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //qpprime_y_zero_transform_bypass_flag
  ------------------
  |  |   52|  36.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  36.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  36.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 393, False: 36.2k]
  |  |  ------------------
  |  |   55|  36.6k|    return uiRetTmp; \
  |  |   56|  36.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 36.2k]
  |  |  ------------------
  ------------------
 1022|  36.2k|    pSps->bQpPrimeYZeroTransfBypassFlag = !!uiCode;
 1023|  36.2k|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //seq_scaling_matrix_present_flag
  ------------------
  |  |   52|  36.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  36.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  36.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 36.2k]
  |  |  ------------------
  |  |   55|  36.2k|    return uiRetTmp; \
  |  |   56|  36.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 36.2k]
  |  |  ------------------
  ------------------
 1024|  36.2k|    pSps->bSeqScalingMatrixPresentFlag = !!uiCode;
 1025|       |
 1026|  36.2k|    if (pSps->bSeqScalingMatrixPresentFlag) {
  ------------------
  |  Branch (1026:9): [True: 19.4k, False: 16.7k]
  ------------------
 1027|  19.4k|      WELS_READ_VERIFY (ParseScalingList (pSps, pBs, 0, 0, pSps->bSeqScalingListPresentFlag, pSps->iScalingList4x4,
  ------------------
  |  |   52|  19.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  19.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  19.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.89k, False: 17.5k]
  |  |  ------------------
  |  |   55|  19.4k|    return uiRetTmp; \
  |  |   56|  19.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 17.5k]
  |  |  ------------------
  ------------------
 1028|  19.4k|                                          pSps->iScalingList8x8));
 1029|  19.4k|    }
 1030|  36.2k|  }
 1031|   103k|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //log2_max_frame_num_minus4
  ------------------
  |  |   52|   103k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   103k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   103k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 969, False: 102k]
  |  |  ------------------
  |  |   55|   103k|    return uiRetTmp; \
  |  |   56|   103k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 102k]
  |  |  ------------------
  ------------------
 1032|   102k|  WELS_CHECK_SE_UPPER_ERROR (uiCode, SPS_LOG2_MAX_FRAME_NUM_MINUS4_MAX, "log2_max_frame_num_minus4",
  ------------------
  |  |  262|   102k|#define WELS_CHECK_SE_UPPER_ERROR(val, upper_bound, syntax_name, ret_code) do {\
  |  |  263|   102k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (263:5): [True: 366, False: 102k]
  |  |  ------------------
  |  |  264|    366|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  265|    366|  return ret_code;\
  |  |  266|    366|}\
  |  |  267|   102k|}while(0)
  |  |  ------------------
  |  |  |  Branch (267:8): [Folded, False: 102k]
  |  |  ------------------
  ------------------
 1033|   102k|                             GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_LOG2_MAX_FRAME_NUM_MINUS4));
 1034|   102k|  pSps->uiLog2MaxFrameNum = LOG2_MAX_FRAME_NUM_OFFSET + uiCode;
  ------------------
  |  |  310|   102k|#define LOG2_MAX_FRAME_NUM_OFFSET 4
  ------------------
 1035|   102k|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_order_cnt_type
  ------------------
  |  |   52|   102k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   102k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   102k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 453, False: 102k]
  |  |  ------------------
  |  |   55|   102k|    return uiRetTmp; \
  |  |   56|   102k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 102k]
  |  |  ------------------
  ------------------
 1036|   102k|  pSps->uiPocType = uiCode;
 1037|       |
 1038|   102k|  if (0 == pSps->uiPocType) {
  ------------------
  |  Branch (1038:7): [True: 76.9k, False: 25.1k]
  ------------------
 1039|  76.9k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //log2_max_pic_order_cnt_lsb_minus4
  ------------------
  |  |   52|  76.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  76.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  76.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 254, False: 76.7k]
  |  |  ------------------
  |  |   55|  76.9k|    return uiRetTmp; \
  |  |   56|  76.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 76.7k]
  |  |  ------------------
  ------------------
 1040|       |    // log2_max_pic_order_cnt_lsb_minus4 should be in range 0 to 12, inclusive. (sec. 7.4.3)
 1041|  76.7k|    WELS_CHECK_SE_UPPER_ERROR (uiCode, SPS_LOG2_MAX_PIC_ORDER_CNT_LSB_MINUS4_MAX, "log2_max_pic_order_cnt_lsb_minus4",
  ------------------
  |  |  262|  76.7k|#define WELS_CHECK_SE_UPPER_ERROR(val, upper_bound, syntax_name, ret_code) do {\
  |  |  263|  76.7k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (263:5): [True: 565, False: 76.1k]
  |  |  ------------------
  |  |  264|    565|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  265|    565|  return ret_code;\
  |  |  266|    565|}\
  |  |  267|  76.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (267:8): [Folded, False: 76.1k]
  |  |  ------------------
  ------------------
 1042|  76.7k|                               GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_LOG2_MAX_PIC_ORDER_CNT_LSB_MINUS4));
 1043|  76.1k|    pSps->iLog2MaxPocLsb = LOG2_MAX_PIC_ORDER_CNT_LSB_OFFSET + uiCode; // log2_max_pic_order_cnt_lsb_minus4
  ------------------
  |  |  312|  76.1k|#define LOG2_MAX_PIC_ORDER_CNT_LSB_OFFSET 4
  ------------------
 1044|       |
 1045|  76.1k|  } else if (1 == pSps->uiPocType) {
  ------------------
  |  Branch (1045:14): [True: 4.74k, False: 20.3k]
  ------------------
 1046|  4.74k|    int32_t i;
 1047|  4.74k|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //delta_pic_order_always_zero_flag
  ------------------
  |  |   52|  4.74k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.74k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.74k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 194, False: 4.55k]
  |  |  ------------------
  |  |   55|  4.74k|    return uiRetTmp; \
  |  |   56|  4.74k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.55k]
  |  |  ------------------
  ------------------
 1048|  4.55k|    pSps->bDeltaPicOrderAlwaysZeroFlag = !!uiCode;
 1049|  4.55k|    WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //offset_for_non_ref_pic
  ------------------
  |  |   52|  4.55k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.55k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.55k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.14k, False: 3.40k]
  |  |  ------------------
  |  |   55|  4.55k|    return uiRetTmp; \
  |  |   56|  4.55k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.40k]
  |  |  ------------------
  ------------------
 1050|  3.40k|    pSps->iOffsetForNonRefPic = iCode;
 1051|  3.40k|    WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //offset_for_top_to_bottom_field
  ------------------
  |  |   52|  3.40k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.40k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.40k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 282, False: 3.12k]
  |  |  ------------------
  |  |   55|  3.40k|    return uiRetTmp; \
  |  |   56|  3.40k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.12k]
  |  |  ------------------
  ------------------
 1052|  3.12k|    pSps->iOffsetForTopToBottomField = iCode;
 1053|  3.12k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //num_ref_frames_in_pic_order_cnt_cycle
  ------------------
  |  |   52|  3.12k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.12k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.12k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 497, False: 2.62k]
  |  |  ------------------
  |  |   55|  3.12k|    return uiRetTmp; \
  |  |   56|  3.12k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.62k]
  |  |  ------------------
  ------------------
 1054|  2.62k|    WELS_CHECK_SE_UPPER_ERROR (uiCode, SPS_NUM_REF_FRAMES_IN_PIC_ORDER_CNT_CYCLE_MAX,
  ------------------
  |  |  262|  2.62k|#define WELS_CHECK_SE_UPPER_ERROR(val, upper_bound, syntax_name, ret_code) do {\
  |  |  263|  2.62k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (263:5): [True: 279, False: 2.34k]
  |  |  ------------------
  |  |  264|    279|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  265|    279|  return ret_code;\
  |  |  266|    279|}\
  |  |  267|  2.62k|}while(0)
  |  |  ------------------
  |  |  |  Branch (267:8): [Folded, False: 2.34k]
  |  |  ------------------
  ------------------
 1055|  2.62k|                               "num_ref_frames_in_pic_order_cnt_cycle", GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS,
 1056|  2.62k|                                   ERR_INFO_INVALID_NUM_REF_FRAME_IN_PIC_ORDER_CNT_CYCLE));
 1057|  2.34k|    pSps->iNumRefFramesInPocCycle = uiCode;
 1058|  8.17k|    for (i = 0; i < pSps->iNumRefFramesInPocCycle; i++) {
  ------------------
  |  Branch (1058:17): [True: 6.15k, False: 2.02k]
  ------------------
 1059|  6.15k|      WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //offset_for_ref_frame[ i ]
  ------------------
  |  |   52|  6.15k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  6.15k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  6.15k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 325, False: 5.82k]
  |  |  ------------------
  |  |   55|  6.15k|    return uiRetTmp; \
  |  |   56|  6.15k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 5.82k]
  |  |  ------------------
  ------------------
 1060|  5.82k|      pSps->iOffsetForRefFrame[ i ] = iCode;
 1061|  5.82k|    }
 1062|  2.34k|  }
 1063|  98.5k|  if (pSps->uiPocType > 2) {
  ------------------
  |  Branch (1063:7): [True: 602, False: 97.9k]
  ------------------
 1064|    602|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " illegal pic_order_cnt_type: %d ! ", pSps->uiPocType);
 1065|    602|    return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_POC_TYPE);
  ------------------
  |  |   59|    602|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1066|    602|  }
 1067|       |
 1068|  97.9k|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //max_num_ref_frames
  ------------------
  |  |   52|  97.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  97.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  97.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 550, False: 97.4k]
  |  |  ------------------
  |  |   55|  97.9k|    return uiRetTmp; \
  |  |   56|  97.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 97.4k]
  |  |  ------------------
  ------------------
 1069|  97.4k|  pSps->iNumRefFrames = uiCode;
 1070|  97.4k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //gaps_in_frame_num_value_allowed_flag
  ------------------
  |  |   52|  97.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  97.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  97.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 526, False: 96.8k]
  |  |  ------------------
  |  |   55|  97.4k|    return uiRetTmp; \
  |  |   56|  97.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 96.8k]
  |  |  ------------------
  ------------------
 1071|  96.8k|  pSps->bGapsInFrameNumValueAllowedFlag = !!uiCode;
 1072|  96.8k|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_width_in_mbs_minus1
  ------------------
  |  |   52|  96.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  96.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  96.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.54k, False: 95.3k]
  |  |  ------------------
  |  |   55|  96.8k|    return uiRetTmp; \
  |  |   56|  96.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 95.3k]
  |  |  ------------------
  ------------------
 1073|  95.3k|  pSps->iMbWidth = PIC_WIDTH_IN_MBS_OFFSET + uiCode;
  ------------------
  |  |  314|  95.3k|#define PIC_WIDTH_IN_MBS_OFFSET 1
  ------------------
 1074|  95.3k|  if (pSps->iMbWidth > MAX_MB_SIZE || pSps->iMbWidth == 0) {
  ------------------
  |  |  338|   190k|#define MAX_MB_SIZE 36864
  ------------------
  |  Branch (1074:7): [True: 600, False: 94.7k]
  |  Branch (1074:39): [True: 0, False: 94.7k]
  ------------------
 1075|    600|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "pic_width_in_mbs(%d) invalid!", pSps->iMbWidth);
 1076|    600|    return  GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_MB_SIZE);
  ------------------
  |  |   59|    600|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1077|    600|  }
 1078|  94.7k|  if (((uint64_t)pSps->iMbWidth * (uint64_t)pSps->iMbWidth) > (uint64_t) (8 * pSLevelLimits->uiMaxFS)) {
  ------------------
  |  Branch (1078:7): [True: 3.16k, False: 91.5k]
  ------------------
 1079|  3.16k|    if (((uint64_t)pSps->iMbWidth * (uint64_t)pSps->iMbWidth) > (uint64_t) (8 * pSMaxLevelLimits->uiMaxFS)) {
  ------------------
  |  Branch (1079:9): [True: 308, False: 2.85k]
  ------------------
 1080|    308|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "the pic_width_in_mbs exceeds the level limits!");
 1081|    308|      return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_MB_SIZE);
  ------------------
  |  |   59|    308|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1082|  2.85k|    } else {
 1083|  2.85k|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "the pic_width_in_mbs exceeds the level limits!");
 1084|  2.85k|    }
 1085|  3.16k|  }
 1086|  94.4k|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_height_in_map_units_minus1
  ------------------
  |  |   52|  94.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  94.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  94.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 913, False: 93.5k]
  |  |  ------------------
  |  |   55|  94.4k|    return uiRetTmp; \
  |  |   56|  94.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 93.5k]
  |  |  ------------------
  ------------------
 1087|  93.5k|  pSps->iMbHeight = PIC_HEIGHT_IN_MAP_UNITS_OFFSET + uiCode;
  ------------------
  |  |  316|  93.5k|#define PIC_HEIGHT_IN_MAP_UNITS_OFFSET 1
  ------------------
 1088|  93.5k|  if (pSps->iMbHeight > MAX_MB_SIZE || pSps->iMbHeight == 0) {
  ------------------
  |  |  338|   187k|#define MAX_MB_SIZE 36864
  ------------------
  |  Branch (1088:7): [True: 238, False: 93.2k]
  |  Branch (1088:40): [True: 0, False: 93.2k]
  ------------------
 1089|    238|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "pic_height_in_mbs(%d) invalid!", pSps->iMbHeight);
 1090|    238|    return  GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_MB_SIZE);
  ------------------
  |  |   59|    238|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1091|    238|  }
 1092|  93.2k|  if (((uint64_t)pSps->iMbHeight * (uint64_t)pSps->iMbHeight) > (uint64_t) (8 * pSLevelLimits->uiMaxFS)) {
  ------------------
  |  Branch (1092:7): [True: 3.42k, False: 89.8k]
  ------------------
 1093|  3.42k|    if (((uint64_t)pSps->iMbHeight * (uint64_t)pSps->iMbHeight) > (uint64_t) (8 * pSMaxLevelLimits->uiMaxFS)) {
  ------------------
  |  Branch (1093:9): [True: 353, False: 3.07k]
  ------------------
 1094|    353|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "the pic_height_in_mbs exceeds the level limits!");
 1095|    353|      return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_MB_SIZE);
  ------------------
  |  |   59|    353|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1096|  3.07k|    } else {
 1097|  3.07k|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "the pic_height_in_mbs exceeds the level limits!");
 1098|  3.07k|    }
 1099|  3.42k|  }
 1100|  92.9k|  uint64_t uiTmp64 = (uint64_t)pSps->iMbWidth * (uint64_t)pSps->iMbHeight;
 1101|  92.9k|  if (uiTmp64 > (uint64_t)pSLevelLimits->uiMaxFS) {
  ------------------
  |  Branch (1101:7): [True: 5.33k, False: 87.5k]
  ------------------
 1102|  5.33k|    if (uiTmp64 > (uint64_t)pSMaxLevelLimits->uiMaxFS) {
  ------------------
  |  Branch (1102:9): [True: 229, False: 5.10k]
  ------------------
 1103|    229|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "the total count of mb exceeds the level limits!");
 1104|    229|      return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_MB_SIZE);
  ------------------
  |  |   59|    229|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1105|  5.10k|    } else {
 1106|  5.10k|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "the total count of mb exceeds the level limits!");
 1107|  5.10k|    }
 1108|  5.33k|  }
 1109|  92.6k|  pSps->uiTotalMbCount = (uint32_t)uiTmp64;
 1110|  92.6k|  WELS_CHECK_SE_UPPER_ERROR (pSps->iNumRefFrames, SPS_MAX_NUM_REF_FRAMES_MAX, "max_num_ref_frames",
  ------------------
  |  |  262|  92.6k|#define WELS_CHECK_SE_UPPER_ERROR(val, upper_bound, syntax_name, ret_code) do {\
  |  |  263|  92.6k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (263:5): [True: 305, False: 92.3k]
  |  |  ------------------
  |  |  264|    305|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  265|    305|  return ret_code;\
  |  |  266|    305|}\
  |  |  267|  92.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (267:8): [Folded, False: 92.3k]
  |  |  ------------------
  ------------------
 1111|  92.6k|                             GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_NUM_REF_FRAMES));
 1112|       |  // here we check max_num_ref_frames
 1113|  92.3k|  uint32_t uiMaxDpbMbs = pSLevelLimits->uiMaxDPBMbs;
 1114|  92.3k|  uint32_t uiMaxDpbFrames = uiMaxDpbMbs / pSps->uiTotalMbCount;
 1115|  92.3k|  if (uiMaxDpbFrames > SPS_MAX_NUM_REF_FRAMES_MAX)
  ------------------
  |  |  901|  92.3k|#define  SPS_MAX_NUM_REF_FRAMES_MAX 16
  ------------------
  |  Branch (1115:7): [True: 81.6k, False: 10.7k]
  ------------------
 1116|  81.6k|    uiMaxDpbFrames = SPS_MAX_NUM_REF_FRAMES_MAX;
  ------------------
  |  |  901|  81.6k|#define  SPS_MAX_NUM_REF_FRAMES_MAX 16
  ------------------
 1117|  92.3k|  if ((uint32_t)pSps->iNumRefFrames > uiMaxDpbFrames) {
  ------------------
  |  Branch (1117:7): [True: 3.15k, False: 89.2k]
  ------------------
 1118|  3.15k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, " max_num_ref_frames exceeds level limits!");
 1119|  3.15k|  }
 1120|  92.3k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //frame_mbs_only_flag
  ------------------
  |  |   52|  92.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  92.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  92.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 625, False: 91.7k]
  |  |  ------------------
  |  |   55|  92.3k|    return uiRetTmp; \
  |  |   56|  92.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 91.7k]
  |  |  ------------------
  ------------------
 1121|  91.7k|  pSps->bFrameMbsOnlyFlag = !!uiCode;
 1122|  91.7k|  if (!pSps->bFrameMbsOnlyFlag) {
  ------------------
  |  Branch (1122:7): [True: 1.90k, False: 89.8k]
  ------------------
 1123|  1.90k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParseSps(): frame_mbs_only_flag (%d) not supported.",
 1124|  1.90k|             pSps->bFrameMbsOnlyFlag);
 1125|  1.90k|    return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_MBAFF);
  ------------------
  |  |   59|  1.90k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1126|  1.90k|  }
 1127|  89.8k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //direct_8x8_inference_flag
  ------------------
  |  |   52|  89.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  89.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  89.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 229, False: 89.6k]
  |  |  ------------------
  |  |   55|  89.8k|    return uiRetTmp; \
  |  |   56|  89.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 89.6k]
  |  |  ------------------
  ------------------
 1128|  89.6k|  pSps->bDirect8x8InferenceFlag = !!uiCode;
 1129|  89.6k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //frame_cropping_flag
  ------------------
  |  |   52|  89.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  89.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  89.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 200, False: 89.4k]
  |  |  ------------------
  |  |   55|  89.6k|    return uiRetTmp; \
  |  |   56|  89.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 89.4k]
  |  |  ------------------
  ------------------
 1130|  89.4k|  pSps->bFrameCroppingFlag = !!uiCode;
 1131|  89.4k|  if (pSps->bFrameCroppingFlag) {
  ------------------
  |  Branch (1131:7): [True: 10.8k, False: 78.5k]
  ------------------
 1132|  10.8k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_left_offset
  ------------------
  |  |   52|  10.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  10.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  10.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 249, False: 10.6k]
  |  |  ------------------
  |  |   55|  10.8k|    return uiRetTmp; \
  |  |   56|  10.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 10.6k]
  |  |  ------------------
  ------------------
 1133|  10.6k|    pSps->sFrameCrop.iLeftOffset = uiCode;
 1134|  10.6k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_right_offset
  ------------------
  |  |   52|  10.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  10.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  10.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 591, False: 10.0k]
  |  |  ------------------
  |  |   55|  10.6k|    return uiRetTmp; \
  |  |   56|  10.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
 1135|  10.0k|    pSps->sFrameCrop.iRightOffset = uiCode;
 1136|  10.0k|    if ((pSps->sFrameCrop.iLeftOffset + pSps->sFrameCrop.iRightOffset) > ((int32_t)pSps->iMbWidth * 16 / 2)) {
  ------------------
  |  Branch (1136:9): [True: 288, False: 9.73k]
  ------------------
 1137|    288|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "frame_crop_left_offset + frame_crop_right_offset exceeds limits!");
 1138|    288|      return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_CROPPING_DATA);
  ------------------
  |  |   59|    288|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1139|    288|    }
 1140|  9.73k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_top_offset
  ------------------
  |  |   52|  9.73k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  9.73k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  9.73k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 215, False: 9.51k]
  |  |  ------------------
  |  |   55|  9.73k|    return uiRetTmp; \
  |  |   56|  9.73k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 9.51k]
  |  |  ------------------
  ------------------
 1141|  9.51k|    pSps->sFrameCrop.iTopOffset = uiCode;
 1142|  9.51k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //frame_crop_bottom_offset
  ------------------
  |  |   52|  9.51k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  9.51k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  9.51k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 250, False: 9.26k]
  |  |  ------------------
  |  |   55|  9.51k|    return uiRetTmp; \
  |  |   56|  9.51k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 9.26k]
  |  |  ------------------
  ------------------
 1143|  9.26k|    pSps->sFrameCrop.iBottomOffset = uiCode;
 1144|  9.26k|    if ((pSps->sFrameCrop.iTopOffset + pSps->sFrameCrop.iBottomOffset) > ((int32_t)pSps->iMbHeight * 16 / 2)) {
  ------------------
  |  Branch (1144:9): [True: 317, False: 8.95k]
  ------------------
 1145|    317|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "frame_crop_top_offset + frame_crop_right_offset exceeds limits!");
 1146|    317|      return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_CROPPING_DATA);
  ------------------
  |  |   59|    317|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1147|    317|    }
 1148|  78.5k|  } else {
 1149|  78.5k|    pSps->sFrameCrop.iLeftOffset   = 0; // frame_crop_left_offset
 1150|  78.5k|    pSps->sFrameCrop.iRightOffset  = 0; // frame_crop_right_offset
 1151|  78.5k|    pSps->sFrameCrop.iTopOffset    = 0; // frame_crop_top_offset
 1152|  78.5k|    pSps->sFrameCrop.iBottomOffset = 0; // frame_crop_bottom_offset
 1153|  78.5k|  }
 1154|  87.5k|  WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //vui_parameters_present_flag
  ------------------
  |  |   52|  87.5k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  87.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  87.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 249, False: 87.2k]
  |  |  ------------------
  |  |   55|  87.5k|    return uiRetTmp; \
  |  |   56|  87.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 87.2k]
  |  |  ------------------
  ------------------
 1155|  87.2k|  pSps->bVuiParamPresentFlag = !!uiCode;
 1156|  87.2k|  if (pSps->bVuiParamPresentFlag) {
  ------------------
  |  Branch (1156:7): [True: 21.6k, False: 65.5k]
  ------------------
 1157|  21.6k|    int iRetVui = ParseVui (pCtx, pSps, pBsAux);
 1158|  21.6k|    if (iRetVui == GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_VUI_HRD)) {
  ------------------
  |  |   59|  21.6k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  |  Branch (1158:9): [True: 0, False: 21.6k]
  ------------------
 1159|      0|      if (kbUseSubsetFlag) { //Currently do no support VUI with HRD enable in subsetSPS
  ------------------
  |  Branch (1159:11): [True: 0, False: 0]
  ------------------
 1160|      0|        WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "hrd parse in vui of subsetSPS is not supported!");
 1161|      0|        return iRetVui;
 1162|      0|      }
 1163|  21.6k|    } else {
 1164|  21.6k|      WELS_READ_VERIFY (iRetVui);
  ------------------
  |  |   52|  21.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  21.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  21.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 12.2k, False: 9.45k]
  |  |  ------------------
  |  |   55|  21.6k|    return uiRetTmp; \
  |  |   56|  21.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 9.45k]
  |  |  ------------------
  ------------------
 1165|  21.6k|    }
 1166|  21.6k|  }
 1167|       |
 1168|  75.0k|  if (pCtx->pParam->bParseOnly) {
  ------------------
  |  Branch (1168:7): [True: 0, False: 75.0k]
  ------------------
 1169|      0|    if (kSrcNalLen >= SPS_PPS_BS_SIZE - 4) { //sps bs exceeds!
  ------------------
  |  |  117|      0|#define SPS_PPS_BS_SIZE 128
  ------------------
  |  Branch (1169:9): [True: 0, False: 0]
  ------------------
 1170|      0|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "sps payload size (%d) too large for parse only (%d), not supported!",
 1171|      0|               kSrcNalLen, SPS_PPS_BS_SIZE - 4);
  ------------------
  |  |  117|      0|#define SPS_PPS_BS_SIZE 128
  ------------------
 1172|      0|      pCtx->iErrorCode |= dsBitstreamError;
 1173|      0|      return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_OUT_OF_MEMORY);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1174|      0|    }
 1175|      0|    if (!kbUseSubsetFlag) { //SPS
  ------------------
  |  Branch (1175:9): [True: 0, False: 0]
  ------------------
 1176|      0|      SSpsBsInfo* pSpsBs = &pCtx->sSpsBsInfo [iSpsId];
 1177|      0|      pSpsBs->iSpsId = iSpsId;
 1178|      0|      int32_t iTrailingZeroByte = 0;
 1179|      0|      while (pSrcNal[kSrcNalLen - iTrailingZeroByte - 1] == 0x0) //remove final trailing 0 bytes
  ------------------
  |  Branch (1179:14): [True: 0, False: 0]
  ------------------
 1180|      0|        iTrailingZeroByte++;
 1181|      0|      int32_t iActualLen = kSrcNalLen - iTrailingZeroByte;
 1182|      0|      pSpsBs->uiSpsBsLen = (uint16_t) iActualLen;
 1183|       |      //unify start code as 0x0001
 1184|      0|      int32_t iStartDeltaByte = 0; //0 for 0x0001, 1 for 0x001
 1185|      0|      if (pSrcNal[0] == 0x0 && pSrcNal[1] == 0x0 && pSrcNal[2] == 0x1) { //if 0x001
  ------------------
  |  Branch (1185:11): [True: 0, False: 0]
  |  Branch (1185:32): [True: 0, False: 0]
  |  Branch (1185:53): [True: 0, False: 0]
  ------------------
 1186|      0|        pSpsBs->pSpsBsBuf[0] = 0x0; //add 0 to form 0x0001
 1187|      0|        iStartDeltaByte++;
 1188|      0|        pSpsBs->uiSpsBsLen++;
 1189|      0|      }
 1190|      0|      memcpy (pSpsBs->pSpsBsBuf + iStartDeltaByte, pSrcNal, iActualLen);
 1191|      0|    } else { //subset SPS
 1192|      0|      SSpsBsInfo* pSpsBs = &pCtx->sSubsetSpsBsInfo [iSpsId];
 1193|      0|      pSpsBs->iSpsId = iSpsId;
 1194|      0|      pSpsBs->pSpsBsBuf [0] = pSpsBs->pSpsBsBuf [1] = pSpsBs->pSpsBsBuf [2] = 0x00;
 1195|      0|      pSpsBs->pSpsBsBuf [3] = 0x01;
 1196|      0|      pSpsBs->pSpsBsBuf [4] = 0x67;
 1197|       |
 1198|       |      //re-write subset SPS to SPS
 1199|      0|      SBitStringAux sSubsetSpsBs;
 1200|      0|      CMemoryAlign* pMa = pCtx->pMemAlign;
 1201|       |
 1202|      0|      uint8_t* pBsBuf = static_cast<uint8_t*> (pMa->WelsMallocz (SPS_PPS_BS_SIZE + 4,
  ------------------
  |  |  117|      0|#define SPS_PPS_BS_SIZE 128
  ------------------
 1203|      0|                        "Temp buffer for parse only usage.")); //to reserve 4 bytes for UVLC writing buffer
 1204|      0|      if (NULL == pBsBuf) {
  ------------------
  |  Branch (1204:11): [True: 0, False: 0]
  ------------------
 1205|      0|        WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "sps buffer alloc failed for parse only!");
 1206|      0|        pCtx->iErrorCode |= dsOutOfMemory;
 1207|      0|        return pCtx->iErrorCode;
 1208|      0|      }
 1209|      0|      InitBits (&sSubsetSpsBs, pBsBuf, (int32_t) (pBs->pEndBuf - pBs->pStartBuf));
 1210|      0|      BsWriteBits (&sSubsetSpsBs, 8, 77); //profile_idc, forced to Main profile
 1211|      0|      BsWriteOneBit (&sSubsetSpsBs, pSps->bConstraintSet0Flag); // constraint_set0_flag
 1212|      0|      BsWriteOneBit (&sSubsetSpsBs, pSps->bConstraintSet1Flag); // constraint_set1_flag
 1213|      0|      BsWriteOneBit (&sSubsetSpsBs, pSps->bConstraintSet2Flag); // constraint_set2_flag
 1214|      0|      BsWriteOneBit (&sSubsetSpsBs, pSps->bConstraintSet3Flag); // constraint_set3_flag
 1215|      0|      BsWriteBits (&sSubsetSpsBs, 4, 0); //constraint_set4_flag, constraint_set5_flag, reserved_zero_2bits
 1216|      0|      BsWriteBits (&sSubsetSpsBs, 8, pSps->uiLevelIdc); //level_idc
 1217|      0|      BsWriteUE (&sSubsetSpsBs, pSps->iSpsId); //sps_id
 1218|      0|      BsWriteUE (&sSubsetSpsBs, pSps->uiLog2MaxFrameNum - 4); //log2_max_frame_num_minus4
 1219|      0|      BsWriteUE (&sSubsetSpsBs, pSps->uiPocType); //pic_order_cnt_type
 1220|      0|      if (pSps->uiPocType == 0) {
  ------------------
  |  Branch (1220:11): [True: 0, False: 0]
  ------------------
 1221|      0|        BsWriteUE (&sSubsetSpsBs, pSps->iLog2MaxPocLsb - 4); //log2_max_pic_order_cnt_lsb_minus4
 1222|      0|      } else if (pSps->uiPocType == 1) {
  ------------------
  |  Branch (1222:18): [True: 0, False: 0]
  ------------------
 1223|      0|        BsWriteOneBit (&sSubsetSpsBs, pSps->bDeltaPicOrderAlwaysZeroFlag); //delta_pic_order_always_zero_flag
 1224|      0|        BsWriteSE (&sSubsetSpsBs, pSps->iOffsetForNonRefPic); //offset_for_no_ref_pic
 1225|      0|        BsWriteSE (&sSubsetSpsBs, pSps->iOffsetForTopToBottomField); //offset_for_top_to_bottom_field
 1226|      0|        BsWriteUE (&sSubsetSpsBs, pSps->iNumRefFramesInPocCycle); //num_ref_frames_in_pic_order_cnt_cycle
 1227|      0|        for (int32_t i = 0; i < pSps->iNumRefFramesInPocCycle; ++i) {
  ------------------
  |  Branch (1227:29): [True: 0, False: 0]
  ------------------
 1228|      0|          BsWriteSE (&sSubsetSpsBs, pSps->iOffsetForRefFrame[i]); //offset_for_ref_frame[i]
 1229|      0|        }
 1230|      0|      }
 1231|      0|      BsWriteUE (&sSubsetSpsBs, pSps->iNumRefFrames); //max_num_ref_frames
 1232|      0|      BsWriteOneBit (&sSubsetSpsBs, pSps->bGapsInFrameNumValueAllowedFlag); //gaps_in_frame_num_value_allowed_flag
 1233|      0|      BsWriteUE (&sSubsetSpsBs, pSps->iMbWidth - 1); //pic_width_in_mbs_minus1
 1234|      0|      BsWriteUE (&sSubsetSpsBs, pSps->iMbHeight - 1); //pic_height_in_map_units_minus1
 1235|      0|      BsWriteOneBit (&sSubsetSpsBs, pSps->bFrameMbsOnlyFlag); //frame_mbs_only_flag
 1236|      0|      if (!pSps->bFrameMbsOnlyFlag) {
  ------------------
  |  Branch (1236:11): [True: 0, False: 0]
  ------------------
 1237|      0|        BsWriteOneBit (&sSubsetSpsBs, pSps->bMbaffFlag); //mb_adaptive_frame_field_flag
 1238|      0|      }
 1239|      0|      BsWriteOneBit (&sSubsetSpsBs, pSps->bDirect8x8InferenceFlag); //direct_8x8_inference_flag
 1240|      0|      BsWriteOneBit (&sSubsetSpsBs, pSps->bFrameCroppingFlag); //frame_cropping_flag
 1241|      0|      if (pSps->bFrameCroppingFlag) {
  ------------------
  |  Branch (1241:11): [True: 0, False: 0]
  ------------------
 1242|      0|        BsWriteUE (&sSubsetSpsBs, pSps->sFrameCrop.iLeftOffset); //frame_crop_left_offset
 1243|      0|        BsWriteUE (&sSubsetSpsBs, pSps->sFrameCrop.iRightOffset); //frame_crop_right_offset
 1244|      0|        BsWriteUE (&sSubsetSpsBs, pSps->sFrameCrop.iTopOffset); //frame_crop_top_offset
 1245|      0|        BsWriteUE (&sSubsetSpsBs, pSps->sFrameCrop.iBottomOffset); //frame_crop_bottom_offset
 1246|      0|      }
 1247|      0|      BsWriteOneBit (&sSubsetSpsBs, 0); //vui_parameters_present_flag
 1248|      0|      BsRbspTrailingBits (&sSubsetSpsBs); //finished, rbsp trailing bit
 1249|      0|      int32_t iRbspSize = (int32_t) (sSubsetSpsBs.pCurBuf - sSubsetSpsBs.pStartBuf);
 1250|      0|      RBSP2EBSP (pSpsBs->pSpsBsBuf + 5, sSubsetSpsBs.pStartBuf, iRbspSize);
 1251|      0|      pSpsBs->uiSpsBsLen = (uint16_t) (sSubsetSpsBs.pCurBuf - sSubsetSpsBs.pStartBuf + 5);
 1252|      0|      if (pBsBuf) {
  ------------------
  |  Branch (1252:11): [True: 0, False: 0]
  ------------------
 1253|      0|        pMa->WelsFree (pBsBuf, "pBsBuf for parse only usage");
 1254|      0|      }
 1255|      0|    }
 1256|      0|  }
 1257|       |  // Check if SPS SVC extension applicated
 1258|  75.0k|  if (kbUseSubsetFlag && (PRO_SCALABLE_BASELINE == uiProfileIdc || PRO_SCALABLE_HIGH == uiProfileIdc)) {
  ------------------
  |  Branch (1258:7): [True: 10.9k, False: 64.0k]
  |  Branch (1258:27): [True: 4.67k, False: 6.31k]
  |  Branch (1258:68): [True: 4.11k, False: 2.20k]
  ------------------
 1259|  8.78k|    if ((iRet = DecodeSpsSvcExt (pCtx, pSubsetSps, pBs)) != ERR_NONE) {
  ------------------
  |  Branch (1259:9): [True: 5.70k, False: 3.07k]
  ------------------
 1260|  5.70k|      return iRet;
 1261|  5.70k|    }
 1262|       |
 1263|  3.07k|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //svc_vui_parameters_present_flag
  ------------------
  |  |   52|  3.07k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.07k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.07k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 469, False: 2.60k]
  |  |  ------------------
  |  |   55|  3.07k|    return uiRetTmp; \
  |  |   56|  3.07k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.60k]
  |  |  ------------------
  ------------------
 1264|  2.60k|    pSubsetSps->bSvcVuiParamPresentFlag = !!uiCode;
 1265|  2.60k|    if (pSubsetSps->bSvcVuiParamPresentFlag) {
  ------------------
  |  Branch (1265:9): [True: 1.36k, False: 1.24k]
  ------------------
 1266|  1.36k|    }
 1267|  2.60k|  }
 1268|       |
 1269|       |
 1270|  68.8k|  if (PRO_SCALABLE_BASELINE == uiProfileIdc || PRO_SCALABLE_HIGH == uiProfileIdc)
  ------------------
  |  Branch (1270:7): [True: 2.74k, False: 66.1k]
  |  Branch (1270:48): [True: 15.8k, False: 50.2k]
  ------------------
 1271|  18.6k|    pCtx->sSpsPpsCtx.bAvcBasedFlag = false;
 1272|       |
 1273|  68.8k|  *pPicWidth  = pSps->iMbWidth << 4;
 1274|  68.8k|  *pPicHeight = pSps->iMbHeight << 4;
 1275|  68.8k|  PSps pTmpSps = NULL;
 1276|  68.8k|  if (kbUseSubsetFlag) {
  ------------------
  |  Branch (1276:7): [True: 4.81k, False: 64.0k]
  ------------------
 1277|  4.81k|    pTmpSps = &pCtx->sSpsPpsCtx.sSubsetSpsBuffer[iSpsId].sSps;
 1278|  64.0k|  } else {
 1279|  64.0k|    pTmpSps = &pCtx->sSpsPpsCtx.sSpsBuffer[iSpsId];
 1280|  64.0k|  }
 1281|  68.8k|  if (CheckSpsActive (pCtx, pTmpSps, kbUseSubsetFlag)) {
  ------------------
  |  Branch (1281:7): [True: 33.3k, False: 35.4k]
  ------------------
 1282|       |    // we are overwriting the active sps, copy a temp buffer
 1283|  33.3k|    if (kbUseSubsetFlag) {
  ------------------
  |  Branch (1283:9): [True: 1.14k, False: 32.2k]
  ------------------
 1284|  1.14k|      if (memcmp (&pCtx->sSpsPpsCtx.sSubsetSpsBuffer[iSpsId], pSubsetSps, sizeof (SSubsetSps)) != 0) {
  ------------------
  |  Branch (1284:11): [True: 473, False: 671]
  ------------------
 1285|    473|        if (pCtx->pAccessUnitList->uiAvailUnitsNum > 0) {
  ------------------
  |  Branch (1285:13): [True: 0, False: 473]
  ------------------
 1286|      0|          memcpy (&pCtx->sSpsPpsCtx.sSubsetSpsBuffer[MAX_SPS_COUNT], pSubsetSps, sizeof (SSubsetSps));
  ------------------
  |  |   59|      0|#define MAX_SPS_COUNT           32      // Count number of SPS
  ------------------
 1287|      0|          pCtx->bAuReadyFlag = true;
 1288|      0|          pCtx->pAccessUnitList->uiEndPos = pCtx->pAccessUnitList->uiAvailUnitsNum - 1;
 1289|      0|          pCtx->sSpsPpsCtx.iOverwriteFlags |= OVERWRITE_SUBSETSPS;
 1290|    473|        } else if ((pCtx->pSps != NULL) && (pCtx->pSps->iSpsId == pSubsetSps->sSps.iSpsId)) {
  ------------------
  |  Branch (1290:20): [True: 473, False: 0]
  |  Branch (1290:44): [True: 269, False: 204]
  ------------------
 1291|    269|          memcpy (&pCtx->sSpsPpsCtx.sSubsetSpsBuffer[MAX_SPS_COUNT], pSubsetSps, sizeof (SSubsetSps));
  ------------------
  |  |   59|    269|#define MAX_SPS_COUNT           32      // Count number of SPS
  ------------------
 1292|    269|          pCtx->sSpsPpsCtx.iOverwriteFlags |= OVERWRITE_SUBSETSPS;
 1293|    269|        } else {
 1294|    204|          memcpy (&pCtx->sSpsPpsCtx.sSubsetSpsBuffer[iSpsId], pSubsetSps, sizeof (SSubsetSps));
 1295|    204|        }
 1296|    473|      }
 1297|  32.2k|    } else {
 1298|  32.2k|      if (memcmp (&pCtx->sSpsPpsCtx.sSpsBuffer[iSpsId], pSps, sizeof (SSps)) != 0) {
  ------------------
  |  Branch (1298:11): [True: 8.40k, False: 23.8k]
  ------------------
 1299|  8.40k|        if (pCtx->pAccessUnitList->uiAvailUnitsNum > 0) {
  ------------------
  |  Branch (1299:13): [True: 0, False: 8.40k]
  ------------------
 1300|      0|          memcpy (&pCtx->sSpsPpsCtx.sSpsBuffer[MAX_SPS_COUNT], pSps, sizeof (SSps));
  ------------------
  |  |   59|      0|#define MAX_SPS_COUNT           32      // Count number of SPS
  ------------------
 1301|      0|          pCtx->sSpsPpsCtx.iOverwriteFlags |= OVERWRITE_SPS;
 1302|      0|          pCtx->bAuReadyFlag = true;
 1303|      0|          pCtx->pAccessUnitList->uiEndPos = pCtx->pAccessUnitList->uiAvailUnitsNum - 1;
 1304|  8.40k|        } else if ((pCtx->pSps != NULL) && (pCtx->pSps->iSpsId == pSps->iSpsId)) {
  ------------------
  |  Branch (1304:20): [True: 8.40k, False: 0]
  |  Branch (1304:44): [True: 8.05k, False: 357]
  ------------------
 1305|  8.05k|          memcpy (&pCtx->sSpsPpsCtx.sSpsBuffer[MAX_SPS_COUNT], pSps, sizeof (SSps));
  ------------------
  |  |   59|  8.05k|#define MAX_SPS_COUNT           32      // Count number of SPS
  ------------------
 1306|  8.05k|          pCtx->sSpsPpsCtx.iOverwriteFlags |= OVERWRITE_SPS;
 1307|  8.05k|        } else {
 1308|    357|          memcpy (&pCtx->sSpsPpsCtx.sSpsBuffer[iSpsId], pSps, sizeof (SSps));
 1309|    357|        }
 1310|  8.40k|      }
 1311|  32.2k|    }
 1312|  33.3k|  }
 1313|       |  // Not overwrite active sps, just copy to final place
 1314|  35.4k|  else if (kbUseSubsetFlag) {
  ------------------
  |  Branch (1314:12): [True: 3.67k, False: 31.7k]
  ------------------
 1315|  3.67k|    memcpy (&pCtx->sSpsPpsCtx.sSubsetSpsBuffer[iSpsId], pSubsetSps, sizeof (SSubsetSps));
 1316|  3.67k|    pCtx->sSpsPpsCtx.bSubspsAvailFlags[iSpsId] = true;
 1317|  3.67k|    pCtx->sSpsPpsCtx.bSubspsExistAheadFlag = true;
 1318|  31.7k|  } else {
 1319|  31.7k|    memcpy (&pCtx->sSpsPpsCtx.sSpsBuffer[iSpsId], pSps, sizeof (SSps));
 1320|  31.7k|    pCtx->sSpsPpsCtx.bSpsAvailFlags[iSpsId] = true;
 1321|  31.7k|    pCtx->sSpsPpsCtx.bSpsExistAheadFlag = true;
 1322|  31.7k|  }
 1323|  68.8k|  return ERR_NONE;
 1324|  75.0k|}
_ZN7WelsDec8ParsePpsEPNS_21TagWelsDecoderContextEPNS_6TagPpsEPN10WelsCommon15TagBitStringAuxEPhi:
 1341|   115k|                  const int32_t kSrcNalLen) {
 1342|       |
 1343|   115k|  PPps pPps = NULL;
 1344|   115k|  SPps sTempPps;
 1345|   115k|  uint32_t uiPpsId = 0;
 1346|   115k|  uint32_t iTmp;
 1347|   115k|  uint32_t uiCode;
 1348|   115k|  int32_t iCode;
 1349|       |
 1350|   115k|  WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //pic_parameter_set_id
  ------------------
  |  |   52|   115k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   115k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   115k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 863, False: 114k]
  |  |  ------------------
  |  |   55|   115k|    return uiRetTmp; \
  |  |   56|   115k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 114k]
  |  |  ------------------
  ------------------
 1351|   114k|  uiPpsId = uiCode;
 1352|   114k|  if (uiPpsId >= MAX_PPS_COUNT) {
  ------------------
  |  |   43|   114k|#define MAX_PPS_COUNT                   256     // Count number of PPS
  ------------------
  |  Branch (1352:7): [True: 910, False: 113k]
  ------------------
 1353|    910|    return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_PPS_ID_OVERFLOW);
  ------------------
  |  |   59|    910|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1354|    910|  }
 1355|   113k|  pPps = &sTempPps;
 1356|   113k|  memset (pPps, 0, sizeof (SPps));
 1357|       |
 1358|   113k|  pPps->iPpsId = uiPpsId;
 1359|   113k|  WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //seq_parameter_set_id
  ------------------
  |  |   52|   113k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   113k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   113k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 291, False: 113k]
  |  |  ------------------
  |  |   55|   113k|    return uiRetTmp; \
  |  |   56|   113k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 113k]
  |  |  ------------------
  ------------------
 1360|   113k|  pPps->iSpsId = uiCode;
 1361|       |
 1362|   113k|  if (pPps->iSpsId >= MAX_SPS_COUNT) {
  ------------------
  |  |   59|   113k|#define MAX_SPS_COUNT           32      // Count number of SPS
  ------------------
  |  Branch (1362:7): [True: 285, False: 113k]
  ------------------
 1363|    285|    return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_SPS_ID_OVERFLOW);
  ------------------
  |  |   59|    285|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1364|    285|  }
 1365|       |
 1366|   113k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //entropy_coding_mode_flag
  ------------------
  |  |   52|   113k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   113k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   113k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 209, False: 112k]
  |  |  ------------------
  |  |   55|   113k|    return uiRetTmp; \
  |  |   56|   113k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 112k]
  |  |  ------------------
  ------------------
 1367|   112k|  pPps->bEntropyCodingModeFlag = !!uiCode;
 1368|   112k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //bottom_field_pic_order_in_frame_present_flag
  ------------------
  |  |   52|   112k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   112k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   112k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 112k]
  |  |  ------------------
  |  |   55|   112k|    return uiRetTmp; \
  |  |   56|   112k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 112k]
  |  |  ------------------
  ------------------
 1369|   112k|  pPps->bPicOrderPresentFlag   = !!uiCode;
 1370|       |
 1371|   112k|  WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //num_slice_groups_minus1
  ------------------
  |  |   52|   112k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   112k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   112k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 375, False: 112k]
  |  |  ------------------
  |  |   55|   112k|    return uiRetTmp; \
  |  |   56|   112k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 112k]
  |  |  ------------------
  ------------------
 1372|   112k|  pPps->uiNumSliceGroups = NUM_SLICE_GROUPS_OFFSET + uiCode;
  ------------------
  |  |  320|   112k|#define NUM_SLICE_GROUPS_OFFSET 1
  ------------------
 1373|       |
 1374|   112k|  if (pPps->uiNumSliceGroups > MAX_SLICEGROUP_IDS) {
  ------------------
  |  |   53|   112k|#define MAX_SLICEGROUP_IDS              8       // Count number of Slice Groups
  ------------------
  |  Branch (1374:7): [True: 814, False: 111k]
  ------------------
 1375|    814|    return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_SLICEGROUP);
  ------------------
  |  |   59|    814|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1376|    814|  }
 1377|       |
 1378|   111k|  if (pPps->uiNumSliceGroups > 1) {
  ------------------
  |  Branch (1378:7): [True: 6.17k, False: 105k]
  ------------------
 1379|  6.17k|    WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //slice_group_map_type
  ------------------
  |  |   52|  6.17k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  6.17k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  6.17k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 437, False: 5.73k]
  |  |  ------------------
  |  |   55|  6.17k|    return uiRetTmp; \
  |  |   56|  6.17k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 5.73k]
  |  |  ------------------
  ------------------
 1380|  5.73k|    pPps->uiSliceGroupMapType = uiCode;
 1381|  5.73k|    if (pPps->uiSliceGroupMapType > 1) {
  ------------------
  |  Branch (1381:9): [True: 506, False: 5.23k]
  ------------------
 1382|    506|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "ParsePps(): slice_group_map_type (%d): support only 0,1.",
 1383|    506|               pPps->uiSliceGroupMapType);
 1384|    506|      return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_FMOTYPE);
  ------------------
  |  |   59|    506|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1385|    506|    }
 1386|       |
 1387|  5.23k|    switch (pPps->uiSliceGroupMapType) {
 1388|  3.64k|    case 0:
  ------------------
  |  Branch (1388:5): [True: 3.64k, False: 1.58k]
  ------------------
 1389|  11.7k|      for (iTmp = 0; iTmp < pPps->uiNumSliceGroups; iTmp++) {
  ------------------
  |  Branch (1389:22): [True: 8.69k, False: 3.07k]
  ------------------
 1390|  8.69k|        WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //run_length_minus1[ iGroup ]
  ------------------
  |  |   52|  8.69k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  8.69k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  8.69k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 312, False: 8.38k]
  |  |  ------------------
  |  |   55|  8.69k|    return uiRetTmp; \
  |  |   56|  8.69k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 8.38k]
  |  |  ------------------
  ------------------
 1391|  8.38k|        WELS_CHECK_SE_UPPER_ERROR (uiCode, MAX_MB_SIZE - 1, "run_length_minus1",
  ------------------
  |  |  262|  8.38k|#define WELS_CHECK_SE_UPPER_ERROR(val, upper_bound, syntax_name, ret_code) do {\
  |  |  263|  8.38k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (263:5): [True: 256, False: 8.12k]
  |  |  ------------------
  |  |  264|    256|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  265|    256|  return ret_code;\
  |  |  266|    256|}\
  |  |  267|  8.38k|}while(0)
  |  |  ------------------
  |  |  |  Branch (267:8): [Folded, False: 8.12k]
  |  |  ------------------
  ------------------
 1392|  8.38k|                                   GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_SLICEGROUP));
 1393|  8.12k|        pPps->uiRunLength[iTmp] = RUN_LENGTH_OFFSET + uiCode;
  ------------------
  |  |  322|  8.12k|#define RUN_LENGTH_OFFSET 1
  ------------------
 1394|  8.12k|      }
 1395|  3.07k|      break;
 1396|  3.07k|    default:
  ------------------
  |  Branch (1396:5): [True: 1.58k, False: 3.64k]
  ------------------
 1397|  1.58k|      break;
 1398|  5.23k|    }
 1399|  5.23k|  }
 1400|       |
 1401|   110k|  WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //num_ref_idx_l0_default_active_minus1
  ------------------
  |  |   52|   110k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   110k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   110k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 447, False: 109k]
  |  |  ------------------
  |  |   55|   110k|    return uiRetTmp; \
  |  |   56|   110k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 109k]
  |  |  ------------------
  ------------------
 1402|   109k|  pPps->uiNumRefIdxL0Active = NUM_REF_IDX_L0_DEFAULT_ACTIVE_OFFSET + uiCode;
  ------------------
  |  |  328|   109k|#define NUM_REF_IDX_L0_DEFAULT_ACTIVE_OFFSET 1
  ------------------
 1403|   109k|  WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //num_ref_idx_l1_default_active_minus1
  ------------------
  |  |   52|   109k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   109k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   109k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 464, False: 109k]
  |  |  ------------------
  |  |   55|   109k|    return uiRetTmp; \
  |  |   56|   109k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 109k]
  |  |  ------------------
  ------------------
 1404|   109k|  pPps->uiNumRefIdxL1Active = NUM_REF_IDX_L1_DEFAULT_ACTIVE_OFFSET + uiCode;
  ------------------
  |  |  329|   109k|#define NUM_REF_IDX_L1_DEFAULT_ACTIVE_OFFSET 1
  ------------------
 1405|       |
 1406|   109k|  if (pPps->uiNumRefIdxL0Active > MAX_REF_PIC_COUNT ||
  ------------------
  |  |   45|   218k|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
  |  Branch (1406:7): [True: 344, False: 108k]
  ------------------
 1407|   108k|      pPps->uiNumRefIdxL1Active > MAX_REF_PIC_COUNT) {
  ------------------
  |  |   45|   108k|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
  |  Branch (1407:7): [True: 433, False: 108k]
  ------------------
 1408|    777|    return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_REF_COUNT_OVERFLOW);
  ------------------
  |  |   59|    777|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1409|    777|  }
 1410|       |
 1411|   108k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //weighted_pred_flag
  ------------------
  |  |   52|   108k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   108k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   108k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 316, False: 108k]
  |  |  ------------------
  |  |   55|   108k|    return uiRetTmp; \
  |  |   56|   108k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 108k]
  |  |  ------------------
  ------------------
 1412|   108k|  pPps->bWeightedPredFlag  = !!uiCode;
 1413|   108k|  WELS_READ_VERIFY (BsGetBits (pBsAux, 2, &uiCode)); //weighted_bipred_idc
  ------------------
  |  |   52|   108k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   108k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   108k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 353, False: 107k]
  |  |  ------------------
  |  |   55|   108k|    return uiRetTmp; \
  |  |   56|   108k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 107k]
  |  |  ------------------
  ------------------
 1414|   107k|  pPps->uiWeightedBipredIdc = uiCode;
 1415|       |  // weighted_bipred_idc > 0 NOT supported now, but no impact when we ignore it
 1416|       |
 1417|   107k|  WELS_READ_VERIFY (BsGetSe (pBsAux, &iCode)); //pic_init_qp_minus26
  ------------------
  |  |   52|   107k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   107k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   107k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 734, False: 107k]
  |  |  ------------------
  |  |   55|   107k|    return uiRetTmp; \
  |  |   56|   107k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 107k]
  |  |  ------------------
  ------------------
 1418|   107k|  pPps->iPicInitQp = PIC_INIT_QP_OFFSET + iCode;
  ------------------
  |  |  331|   107k|#define PIC_INIT_QP_OFFSET 26
  ------------------
 1419|   107k|  WELS_CHECK_SE_BOTH_ERROR (pPps->iPicInitQp, PPS_PIC_INIT_QP_QS_MIN, PPS_PIC_INIT_QP_QS_MAX, "pic_init_qp_minus26 + 26",
  ------------------
  |  |  248|   107k|#define WELS_CHECK_SE_BOTH_ERROR(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  249|   107k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (249:5): [True: 345, False: 106k]
  |  |  |  Branch (249:28): [True: 900, False: 105k]
  |  |  ------------------
  |  |  250|  1.24k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  251|  1.24k|  return ret_code;\
  |  |  252|  1.24k|}\
  |  |  253|   107k|}while(0)
  |  |  ------------------
  |  |  |  Branch (253:8): [Folded, False: 105k]
  |  |  ------------------
  ------------------
 1420|   107k|                            GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_PIC_INIT_QP));
 1421|   105k|  WELS_READ_VERIFY (BsGetSe (pBsAux, &iCode)); //pic_init_qs_minus26
  ------------------
  |  |   52|   105k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   105k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   105k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 321, False: 105k]
  |  |  ------------------
  |  |   55|   105k|    return uiRetTmp; \
  |  |   56|   105k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 105k]
  |  |  ------------------
  ------------------
 1422|   105k|  pPps->iPicInitQs = PIC_INIT_QS_OFFSET + iCode;
  ------------------
  |  |  332|   105k|#define PIC_INIT_QS_OFFSET 26
  ------------------
 1423|   105k|  WELS_CHECK_SE_BOTH_ERROR (pPps->iPicInitQs, PPS_PIC_INIT_QP_QS_MIN, PPS_PIC_INIT_QP_QS_MAX, "pic_init_qs_minus26 + 26",
  ------------------
  |  |  248|   105k|#define WELS_CHECK_SE_BOTH_ERROR(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  249|   105k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (249:5): [True: 260, False: 105k]
  |  |  |  Branch (249:28): [True: 639, False: 104k]
  |  |  ------------------
  |  |  250|    899|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  251|    899|  return ret_code;\
  |  |  252|    899|}\
  |  |  253|   105k|}while(0)
  |  |  ------------------
  |  |  |  Branch (253:8): [Folded, False: 104k]
  |  |  ------------------
  ------------------
 1424|   105k|                            GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_PIC_INIT_QS));
 1425|   104k|  WELS_READ_VERIFY (BsGetSe (pBsAux, &iCode)); //chroma_qp_index_offset,cb
  ------------------
  |  |   52|   104k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   104k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   104k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 421, False: 104k]
  |  |  ------------------
  |  |   55|   104k|    return uiRetTmp; \
  |  |   56|   104k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 104k]
  |  |  ------------------
  ------------------
 1426|   104k|  pPps->iChromaQpIndexOffset[0]                  = iCode;
 1427|   104k|  WELS_CHECK_SE_BOTH_ERROR (pPps->iChromaQpIndexOffset[0], PPS_CHROMA_QP_INDEX_OFFSET_MIN, PPS_CHROMA_QP_INDEX_OFFSET_MAX,
  ------------------
  |  |  248|   104k|#define WELS_CHECK_SE_BOTH_ERROR(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  249|   104k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (249:5): [True: 538, False: 103k]
  |  |  |  Branch (249:28): [True: 1.89k, False: 101k]
  |  |  ------------------
  |  |  250|  2.42k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  251|  2.42k|  return ret_code;\
  |  |  252|  2.42k|}\
  |  |  253|   104k|}while(0)
  |  |  ------------------
  |  |  |  Branch (253:8): [Folded, False: 101k]
  |  |  ------------------
  ------------------
 1428|   104k|                            "chroma_qp_index_offset", GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_CHROMA_QP_INDEX_OFFSET));
 1429|   101k|  pPps->iChromaQpIndexOffset[1] = pPps->iChromaQpIndexOffset[0];//init cr qp offset
 1430|   101k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //deblocking_filter_control_present_flag
  ------------------
  |  |   52|   101k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   101k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   101k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 220, False: 101k]
  |  |  ------------------
  |  |   55|   101k|    return uiRetTmp; \
  |  |   56|   101k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 101k]
  |  |  ------------------
  ------------------
 1431|   101k|  pPps->bDeblockingFilterControlPresentFlag   = !!uiCode;
 1432|   101k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //constrained_intra_pred_flag
  ------------------
  |  |   52|   101k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   101k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   101k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 595, False: 100k]
  |  |  ------------------
  |  |   55|   101k|    return uiRetTmp; \
  |  |   56|   101k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 100k]
  |  |  ------------------
  ------------------
 1433|   100k|  pPps->bConstainedIntraPredFlag              = !!uiCode;
 1434|   100k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //redundant_pic_cnt_present_flag
  ------------------
  |  |   52|   100k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   100k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   100k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 755, False: 100k]
  |  |  ------------------
  |  |   55|   100k|    return uiRetTmp; \
  |  |   56|   100k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 100k]
  |  |  ------------------
  ------------------
 1435|   100k|  pPps->bRedundantPicCntPresentFlag           = !!uiCode;
 1436|       |
 1437|   100k|  if (CheckMoreRBSPData (pBsAux)) {
  ------------------
  |  Branch (1437:7): [True: 68.9k, False: 31.2k]
  ------------------
 1438|  68.9k|    WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //transform_8x8_mode_flag
  ------------------
  |  |   52|  68.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  68.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  68.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 68.9k]
  |  |  ------------------
  |  |   55|  68.9k|    return uiRetTmp; \
  |  |   56|  68.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 68.9k]
  |  |  ------------------
  ------------------
 1439|  68.9k|    pPps->bTransform8x8ModeFlag = !!uiCode;
 1440|  68.9k|    WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //pic_scaling_matrix_present_flag
  ------------------
  |  |   52|  68.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  68.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  68.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 68.9k]
  |  |  ------------------
  |  |   55|  68.9k|    return uiRetTmp; \
  |  |   56|  68.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 68.9k]
  |  |  ------------------
  ------------------
 1441|  68.9k|    pPps->bPicScalingMatrixPresentFlag = !!uiCode;
 1442|  68.9k|    if (pPps->bPicScalingMatrixPresentFlag) {
  ------------------
  |  Branch (1442:9): [True: 3.49k, False: 65.4k]
  ------------------
 1443|  3.49k|      if (pCtx->sSpsPpsCtx.bSpsAvailFlags[pPps->iSpsId]) {
  ------------------
  |  Branch (1443:11): [True: 3.21k, False: 277]
  ------------------
 1444|  3.21k|        WELS_READ_VERIFY (ParseScalingList (&pCtx->sSpsPpsCtx.sSpsBuffer[pPps->iSpsId], pBsAux, 1, pPps->bTransform8x8ModeFlag,
  ------------------
  |  |   52|  3.21k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.21k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.21k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.21k, False: 1.00k]
  |  |  ------------------
  |  |   55|  3.21k|    return uiRetTmp; \
  |  |   56|  3.21k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.00k]
  |  |  ------------------
  ------------------
 1445|  3.21k|                                            pPps->bPicScalingListPresentFlag, pPps->iScalingList4x4, pPps->iScalingList8x8));
 1446|  3.21k|      } else {
 1447|    277|        WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
 1448|    277|                 "ParsePps(): sps_id (%d) does not exist for scaling_list. This PPS (%d) is marked as invalid.", pPps->iSpsId,
 1449|    277|                 pPps->iPpsId);
 1450|    277|        return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_SPS_ID);
  ------------------
  |  |   59|    277|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1451|    277|      }
 1452|  3.49k|    }
 1453|  66.4k|    WELS_READ_VERIFY (BsGetSe (pBsAux, &iCode)); //second_chroma_qp_index_offset
  ------------------
  |  |   52|  66.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  66.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  66.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 781, False: 65.6k]
  |  |  ------------------
  |  |   55|  66.4k|    return uiRetTmp; \
  |  |   56|  66.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 65.6k]
  |  |  ------------------
  ------------------
 1454|  65.6k|    pPps->iChromaQpIndexOffset[1] = iCode;
 1455|  65.6k|    WELS_CHECK_SE_BOTH_ERROR (pPps->iChromaQpIndexOffset[1], PPS_CHROMA_QP_INDEX_OFFSET_MIN,
  ------------------
  |  |  248|  65.6k|#define WELS_CHECK_SE_BOTH_ERROR(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  249|  65.6k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (249:5): [True: 7.29k, False: 58.3k]
  |  |  |  Branch (249:28): [True: 525, False: 57.8k]
  |  |  ------------------
  |  |  250|  7.81k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  251|  7.81k|  return ret_code;\
  |  |  252|  7.81k|}\
  |  |  253|  65.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (253:8): [Folded, False: 57.8k]
  |  |  ------------------
  ------------------
 1456|  65.6k|                              PPS_CHROMA_QP_INDEX_OFFSET_MAX, "chroma_qp_index_offset", GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS,
 1457|  65.6k|                                  ERR_INFO_INVALID_CHROMA_QP_INDEX_OFFSET));
 1458|  65.6k|  }
 1459|       |
 1460|  89.0k|  if (pCtx->pPps != NULL && pCtx->pPps->iPpsId == pPps->iPpsId) {
  ------------------
  |  Branch (1460:7): [True: 64.0k, False: 25.0k]
  |  Branch (1460:29): [True: 61.7k, False: 2.31k]
  ------------------
 1461|  61.7k|    if (memcmp (pCtx->pPps, pPps, sizeof (*pPps)) != 0) {
  ------------------
  |  Branch (1461:9): [True: 32.6k, False: 29.0k]
  ------------------
 1462|  32.6k|      memcpy (&pCtx->sSpsPpsCtx.sPpsBuffer[MAX_PPS_COUNT], pPps, sizeof (SPps));
  ------------------
  |  |   43|  32.6k|#define MAX_PPS_COUNT                   256     // Count number of PPS
  ------------------
 1463|  32.6k|      pCtx->sSpsPpsCtx.iOverwriteFlags |= OVERWRITE_PPS;
 1464|  32.6k|      if (pCtx->pAccessUnitList->uiAvailUnitsNum > 0) {
  ------------------
  |  Branch (1464:11): [True: 0, False: 32.6k]
  ------------------
 1465|      0|        pCtx->bAuReadyFlag = true;
 1466|      0|        pCtx->pAccessUnitList->uiEndPos = pCtx->pAccessUnitList->uiAvailUnitsNum - 1;
 1467|      0|      }
 1468|  32.6k|    }
 1469|  61.7k|  } else {
 1470|  27.3k|    memcpy (&pCtx->sSpsPpsCtx.sPpsBuffer[uiPpsId], pPps, sizeof (SPps));
 1471|  27.3k|    pCtx->sSpsPpsCtx.bPpsAvailFlags[uiPpsId] = true;
 1472|  27.3k|  }
 1473|  89.0k|  if (pCtx->pParam->bParseOnly) {
  ------------------
  |  Branch (1473:7): [True: 0, False: 89.0k]
  ------------------
 1474|      0|    if (kSrcNalLen >= SPS_PPS_BS_SIZE - 4) { //pps bs exceeds
  ------------------
  |  |  117|      0|#define SPS_PPS_BS_SIZE 128
  ------------------
  |  Branch (1474:9): [True: 0, False: 0]
  ------------------
 1475|      0|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "pps payload size (%d) too large for parse only (%d), not supported!",
 1476|      0|               kSrcNalLen, SPS_PPS_BS_SIZE - 4);
  ------------------
  |  |  117|      0|#define SPS_PPS_BS_SIZE 128
  ------------------
 1477|      0|      pCtx->iErrorCode |= dsBitstreamError;
 1478|      0|      return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_OUT_OF_MEMORY);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1479|      0|    }
 1480|      0|    SPpsBsInfo* pPpsBs = &pCtx->sPpsBsInfo [uiPpsId];
 1481|      0|    pPpsBs->iPpsId = (int32_t) uiPpsId;
 1482|      0|    int32_t iTrailingZeroByte = 0;
 1483|      0|    while (pSrcNal[kSrcNalLen - iTrailingZeroByte - 1] == 0x0) //remove final trailing 0 bytes
  ------------------
  |  Branch (1483:12): [True: 0, False: 0]
  ------------------
 1484|      0|      iTrailingZeroByte++;
 1485|      0|    int32_t iActualLen = kSrcNalLen - iTrailingZeroByte;
 1486|      0|    pPpsBs->uiPpsBsLen = (uint16_t) iActualLen;
 1487|       |    //unify start code as 0x0001
 1488|      0|    int32_t iStartDeltaByte = 0; //0 for 0x0001, 1 for 0x001
 1489|      0|    if (pSrcNal[0] == 0x0 && pSrcNal[1] == 0x0 && pSrcNal[2] == 0x1) { //if 0x001
  ------------------
  |  Branch (1489:9): [True: 0, False: 0]
  |  Branch (1489:30): [True: 0, False: 0]
  |  Branch (1489:51): [True: 0, False: 0]
  ------------------
 1490|      0|      pPpsBs->pPpsBsBuf[0] = 0x0; //add 0 to form 0x0001
 1491|      0|      iStartDeltaByte++;
 1492|      0|      pPpsBs->uiPpsBsLen++;
 1493|      0|    }
 1494|      0|    memcpy (pPpsBs->pPpsBsBuf + iStartDeltaByte, pSrcNal, iActualLen);
 1495|      0|  }
 1496|  89.0k|  return ERR_NONE;
 1497|  89.0k|}
_ZN7WelsDec8ParseVuiEPNS_21TagWelsDecoderContextEPNS_6TagSpsEPN10WelsCommon15TagBitStringAuxE:
 1507|  21.6k|int32_t ParseVui (PWelsDecoderContext pCtx, PSps pSps, PBitStringAux pBsAux) {
 1508|  21.6k|  uint32_t uiCode;
 1509|  21.6k|  PVui pVui = &pSps->sVui;
 1510|  21.6k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //aspect_ratio_info_present_flag
  ------------------
  |  |   52|  21.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  21.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  21.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 197, False: 21.5k]
  |  |  ------------------
  |  |   55|  21.6k|    return uiRetTmp; \
  |  |   56|  21.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 21.5k]
  |  |  ------------------
  ------------------
 1511|  21.5k|  pVui->bAspectRatioInfoPresentFlag = !!uiCode;
 1512|  21.5k|  if (pSps->sVui.bAspectRatioInfoPresentFlag) {
  ------------------
  |  Branch (1512:7): [True: 7.60k, False: 13.8k]
  ------------------
 1513|  7.60k|    WELS_READ_VERIFY (BsGetBits (pBsAux, 8, &uiCode)); //aspect_ratio_idc
  ------------------
  |  |   52|  7.60k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  7.60k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  7.60k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 231, False: 7.37k]
  |  |  ------------------
  |  |   55|  7.60k|    return uiRetTmp; \
  |  |   56|  7.60k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 7.37k]
  |  |  ------------------
  ------------------
 1514|  7.37k|    pVui->uiAspectRatioIdc = uiCode;
 1515|  7.37k|    if (pVui->uiAspectRatioIdc < 17) {
  ------------------
  |  Branch (1515:9): [True: 769, False: 6.60k]
  ------------------
 1516|    769|      pVui->uiSarWidth  = g_ksVuiSampleAspectRatio[pVui->uiAspectRatioIdc].uiWidth;
 1517|    769|      pVui->uiSarHeight = g_ksVuiSampleAspectRatio[pVui->uiAspectRatioIdc].uiHeight;
 1518|  6.60k|    } else if (pVui->uiAspectRatioIdc == EXTENDED_SAR) {
  ------------------
  |  |  340|  6.60k|#define EXTENDED_SAR 255
  ------------------
  |  Branch (1518:16): [True: 1.53k, False: 5.06k]
  ------------------
 1519|  1.53k|      WELS_READ_VERIFY (BsGetBits (pBsAux, 16, &uiCode)); //sar_width
  ------------------
  |  |   52|  1.53k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.53k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.53k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 448, False: 1.09k]
  |  |  ------------------
  |  |   55|  1.53k|    return uiRetTmp; \
  |  |   56|  1.53k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.09k]
  |  |  ------------------
  ------------------
 1520|  1.09k|      pVui->uiSarWidth = uiCode;
 1521|  1.09k|      WELS_READ_VERIFY (BsGetBits (pBsAux, 16, &uiCode)); //sar_height
  ------------------
  |  |   52|  1.09k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.09k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.09k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 457, False: 633]
  |  |  ------------------
  |  |   55|  1.09k|    return uiRetTmp; \
  |  |   56|  1.09k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 633]
  |  |  ------------------
  ------------------
 1522|    633|      pVui->uiSarHeight = uiCode;
 1523|    633|    }
 1524|  7.37k|  }
 1525|  20.3k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //overscan_info_present_flag
  ------------------
  |  |   52|  20.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  20.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  20.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 361, False: 20.0k]
  |  |  ------------------
  |  |   55|  20.3k|    return uiRetTmp; \
  |  |   56|  20.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 20.0k]
  |  |  ------------------
  ------------------
 1526|  20.0k|  pVui->bOverscanInfoPresentFlag = !!uiCode;
 1527|  20.0k|  if (pVui->bOverscanInfoPresentFlag) {
  ------------------
  |  Branch (1527:7): [True: 7.93k, False: 12.0k]
  ------------------
 1528|  7.93k|    WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //overscan_appropriate_flag
  ------------------
  |  |   52|  7.93k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  7.93k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  7.93k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 198, False: 7.73k]
  |  |  ------------------
  |  |   55|  7.93k|    return uiRetTmp; \
  |  |   56|  7.93k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 7.73k]
  |  |  ------------------
  ------------------
 1529|  7.73k|    pVui->bOverscanAppropriateFlag = !!uiCode;
 1530|  7.73k|  }
 1531|  19.8k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //video_signal_type_present_flag
  ------------------
  |  |   52|  19.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  19.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  19.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 396, False: 19.4k]
  |  |  ------------------
  |  |   55|  19.8k|    return uiRetTmp; \
  |  |   56|  19.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 19.4k]
  |  |  ------------------
  ------------------
 1532|  19.4k|  pVui->bVideoSignalTypePresentFlag = !!uiCode;
 1533|  19.4k|  if (pVui->bVideoSignalTypePresentFlag) {
  ------------------
  |  Branch (1533:7): [True: 5.41k, False: 13.9k]
  ------------------
 1534|  5.41k|    WELS_READ_VERIFY (BsGetBits (pBsAux, 3, &uiCode)); //video_format
  ------------------
  |  |   52|  5.41k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  5.41k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  5.41k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 222, False: 5.18k]
  |  |  ------------------
  |  |   55|  5.41k|    return uiRetTmp; \
  |  |   56|  5.41k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 5.18k]
  |  |  ------------------
  ------------------
 1535|  5.18k|    pVui->uiVideoFormat = uiCode;
 1536|  5.18k|    WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //video_full_range_flag
  ------------------
  |  |   52|  5.18k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  5.18k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  5.18k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 206, False: 4.98k]
  |  |  ------------------
  |  |   55|  5.18k|    return uiRetTmp; \
  |  |   56|  5.18k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.98k]
  |  |  ------------------
  ------------------
 1537|  4.98k|    pVui->bVideoFullRangeFlag = !!uiCode;
 1538|  4.98k|    WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //colour_description_present_flag
  ------------------
  |  |   52|  4.98k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.98k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.98k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 288, False: 4.69k]
  |  |  ------------------
  |  |   55|  4.98k|    return uiRetTmp; \
  |  |   56|  4.98k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.69k]
  |  |  ------------------
  ------------------
 1539|  4.69k|    pVui->bColourDescripPresentFlag = !!uiCode;
 1540|  4.69k|    if (pVui->bColourDescripPresentFlag) {
  ------------------
  |  Branch (1540:9): [True: 2.05k, False: 2.63k]
  ------------------
 1541|  2.05k|      WELS_READ_VERIFY (BsGetBits (pBsAux, 8, &uiCode)); //colour_primaries
  ------------------
  |  |   52|  2.05k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.05k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.05k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 289, False: 1.76k]
  |  |  ------------------
  |  |   55|  2.05k|    return uiRetTmp; \
  |  |   56|  2.05k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.76k]
  |  |  ------------------
  ------------------
 1542|  1.76k|      pVui->uiColourPrimaries = uiCode;
 1543|  1.76k|      WELS_READ_VERIFY (BsGetBits (pBsAux, 8, &uiCode)); //transfer_characteristics
  ------------------
  |  |   52|  1.76k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.76k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.76k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 415, False: 1.35k]
  |  |  ------------------
  |  |   55|  1.76k|    return uiRetTmp; \
  |  |   56|  1.76k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.35k]
  |  |  ------------------
  ------------------
 1544|  1.35k|      pVui->uiTransferCharacteristics = uiCode;
 1545|  1.35k|      WELS_READ_VERIFY (BsGetBits (pBsAux, 8, &uiCode)); //matrix_coefficients
  ------------------
  |  |   52|  1.35k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.35k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.35k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 372, False: 981]
  |  |  ------------------
  |  |   55|  1.35k|    return uiRetTmp; \
  |  |   56|  1.35k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 981]
  |  |  ------------------
  ------------------
 1546|    981|      pVui->uiMatrixCoeffs = uiCode;
 1547|    981|    }
 1548|  4.69k|  }
 1549|  17.6k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //chroma_loc_info_present_flag
  ------------------
  |  |   52|  17.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  17.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  17.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 203, False: 17.4k]
  |  |  ------------------
  |  |   55|  17.6k|    return uiRetTmp; \
  |  |   56|  17.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 17.4k]
  |  |  ------------------
  ------------------
 1550|  17.4k|  pVui->bChromaLocInfoPresentFlag = !!uiCode;
 1551|  17.4k|  if (pVui->bChromaLocInfoPresentFlag) {
  ------------------
  |  Branch (1551:7): [True: 3.25k, False: 14.1k]
  ------------------
 1552|  3.25k|    WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //chroma_sample_loc_type_top_field
  ------------------
  |  |   52|  3.25k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.25k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.25k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 355, False: 2.89k]
  |  |  ------------------
  |  |   55|  3.25k|    return uiRetTmp; \
  |  |   56|  3.25k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.89k]
  |  |  ------------------
  ------------------
 1553|  2.89k|    pVui->uiChromaSampleLocTypeTopField = uiCode;
 1554|  2.89k|    WELS_CHECK_SE_UPPER_WARNING (pVui->uiChromaSampleLocTypeTopField, VUI_MAX_CHROMA_LOG_TYPE_TOP_BOTTOM_FIELD_MAX,
  ------------------
  |  |  300|  2.89k|#define WELS_CHECK_SE_UPPER_WARNING(val, upper_bound, syntax_name) do {\
  |  |  301|  2.89k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (301:5): [True: 1.19k, False: 1.70k]
  |  |  ------------------
  |  |  302|  1.19k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  303|  1.19k|}\
  |  |  304|  2.89k|}while(0)
  |  |  ------------------
  |  |  |  Branch (304:8): [Folded, False: 2.89k]
  |  |  ------------------
  ------------------
 1555|  2.89k|                                 "chroma_sample_loc_type_top_field");
 1556|  2.89k|    WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //chroma_sample_loc_type_bottom_field
  ------------------
  |  |   52|  2.89k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.89k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.89k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 429, False: 2.47k]
  |  |  ------------------
  |  |   55|  2.89k|    return uiRetTmp; \
  |  |   56|  2.89k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.47k]
  |  |  ------------------
  ------------------
 1557|  2.47k|    pVui->uiChromaSampleLocTypeBottomField = uiCode;
 1558|  2.47k|    WELS_CHECK_SE_UPPER_WARNING (pVui->uiChromaSampleLocTypeBottomField, VUI_MAX_CHROMA_LOG_TYPE_TOP_BOTTOM_FIELD_MAX,
  ------------------
  |  |  300|  2.47k|#define WELS_CHECK_SE_UPPER_WARNING(val, upper_bound, syntax_name) do {\
  |  |  301|  2.47k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (301:5): [True: 801, False: 1.66k]
  |  |  ------------------
  |  |  302|    801|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  303|    801|}\
  |  |  304|  2.47k|}while(0)
  |  |  ------------------
  |  |  |  Branch (304:8): [Folded, False: 2.47k]
  |  |  ------------------
  ------------------
 1559|  2.47k|                                 "chroma_sample_loc_type_bottom_field");
 1560|  2.47k|  }
 1561|  16.6k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //timing_info_present_flag
  ------------------
  |  |   52|  16.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  16.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  16.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 319, False: 16.3k]
  |  |  ------------------
  |  |   55|  16.6k|    return uiRetTmp; \
  |  |   56|  16.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 16.3k]
  |  |  ------------------
  ------------------
 1562|  16.3k|  pVui->bTimingInfoPresentFlag = !!uiCode;
 1563|  16.3k|  if (pVui->bTimingInfoPresentFlag) {
  ------------------
  |  Branch (1563:7): [True: 3.09k, False: 13.2k]
  ------------------
 1564|  3.09k|    uint32_t uiTmp = 0;
 1565|  3.09k|    WELS_READ_VERIFY (BsGetBits (pBsAux, 16, &uiCode)); //num_units_in_tick
  ------------------
  |  |   52|  3.09k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.09k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.09k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 643, False: 2.44k]
  |  |  ------------------
  |  |   55|  3.09k|    return uiRetTmp; \
  |  |   56|  3.09k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.44k]
  |  |  ------------------
  ------------------
 1566|  2.44k|    uiTmp = (uiCode << 16);
 1567|  2.44k|    WELS_READ_VERIFY (BsGetBits (pBsAux, 16, &uiCode)); //num_units_in_tick
  ------------------
  |  |   52|  2.44k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.44k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.44k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 395, False: 2.05k]
  |  |  ------------------
  |  |   55|  2.44k|    return uiRetTmp; \
  |  |   56|  2.44k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.05k]
  |  |  ------------------
  ------------------
 1568|  2.05k|    uiTmp |= uiCode;
 1569|  2.05k|    pVui->uiNumUnitsInTick = uiTmp;
 1570|  2.05k|    WELS_CHECK_SE_LOWER_WARNING (pVui->uiNumUnitsInTick, VUI_NUM_UNITS_IN_TICK_MIN, "num_units_in_tick");
  ------------------
  |  |  294|  2.05k|#define WELS_CHECK_SE_LOWER_WARNING(val, lower_bound, syntax_name) do {\
  |  |  295|  2.05k|if (val < lower_bound) {\
  |  |  ------------------
  |  |  |  Branch (295:5): [True: 494, False: 1.56k]
  |  |  ------------------
  |  |  296|    494|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  297|    494|}\
  |  |  298|  2.05k|}while(0)
  |  |  ------------------
  |  |  |  Branch (298:8): [Folded, False: 2.05k]
  |  |  ------------------
  ------------------
 1571|  2.05k|    WELS_READ_VERIFY (BsGetBits (pBsAux, 16, &uiCode)); //time_scale
  ------------------
  |  |   52|  2.05k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.05k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.05k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 508, False: 1.54k]
  |  |  ------------------
  |  |   55|  2.05k|    return uiRetTmp; \
  |  |   56|  2.05k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.54k]
  |  |  ------------------
  ------------------
 1572|  1.54k|    uiTmp = (uiCode << 16);
 1573|  1.54k|    WELS_READ_VERIFY (BsGetBits (pBsAux, 16, &uiCode)); //time_scale
  ------------------
  |  |   52|  1.54k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.54k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.54k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 297, False: 1.24k]
  |  |  ------------------
  |  |   55|  1.54k|    return uiRetTmp; \
  |  |   56|  1.54k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.24k]
  |  |  ------------------
  ------------------
 1574|  1.24k|    uiTmp |= uiCode;
 1575|  1.24k|    pVui->uiTimeScale = uiTmp;
 1576|  1.24k|    WELS_CHECK_SE_LOWER_WARNING (pVui->uiNumUnitsInTick, VUI_TIME_SCALE_MIN, "time_scale");
  ------------------
  |  |  294|  1.24k|#define WELS_CHECK_SE_LOWER_WARNING(val, lower_bound, syntax_name) do {\
  |  |  295|  1.24k|if (val < lower_bound) {\
  |  |  ------------------
  |  |  |  Branch (295:5): [True: 306, False: 943]
  |  |  ------------------
  |  |  296|    306|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  297|    306|}\
  |  |  298|  1.24k|}while(0)
  |  |  ------------------
  |  |  |  Branch (298:8): [Folded, False: 1.24k]
  |  |  ------------------
  ------------------
 1577|  1.24k|    WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //fixed_frame_rate_flag
  ------------------
  |  |   52|  1.24k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.24k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.24k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 350, False: 899]
  |  |  ------------------
  |  |   55|  1.24k|    return uiRetTmp; \
  |  |   56|  1.24k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 899]
  |  |  ------------------
  ------------------
 1578|    899|    pVui->bFixedFrameRateFlag = !!uiCode;
 1579|    899|  }
 1580|  14.1k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //nal_hrd_parameters_present_flag
  ------------------
  |  |   52|  14.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  14.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  14.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 366, False: 13.7k]
  |  |  ------------------
  |  |   55|  14.1k|    return uiRetTmp; \
  |  |   56|  14.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 13.7k]
  |  |  ------------------
  ------------------
 1581|  13.7k|  pVui->bNalHrdParamPresentFlag = !!uiCode;
 1582|  13.7k|  if (pVui->bNalHrdParamPresentFlag) { //Add HRD parse. the values are not being used though.
  ------------------
  |  Branch (1582:7): [True: 963, False: 12.7k]
  ------------------
 1583|    963|#ifdef _PARSE_NALHRD_VCLHRD_PARAMS_
 1584|    963|    int32_t cpb_cnt_minus1 = BsGetUe (pBsAux, &uiCode);
 1585|    963|    /*bit_rate_scale = */BsGetBits (pBsAux, 4, &uiCode);
 1586|    963|    /*cpb_size_scale = */BsGetBits (pBsAux, 4, &uiCode);
 1587|  6.38k|    for (int32_t i = 0; i <= cpb_cnt_minus1; i++) {
  ------------------
  |  Branch (1587:25): [True: 5.42k, False: 963]
  ------------------
 1588|  5.42k|      /*bit_rate_value_minus1[i] = */BsGetUe (pBsAux, &uiCode);
 1589|  5.42k|      /*cpb_size_value_minus1[i] = */BsGetUe (pBsAux, &uiCode);
 1590|  5.42k|      /*cbr_flag[i] = */BsGetOneBit (pBsAux, &uiCode);
 1591|  5.42k|    }
 1592|    963|    /*initial_cpb_removal_delay_length_minus1 = */BsGetBits (pBsAux, 5, &uiCode);
 1593|    963|    /*cpb_removal_delay_length_minus1 = */BsGetBits (pBsAux, 5, &uiCode);
 1594|    963|    /*dpb_output_delay_length_minus1 = */BsGetBits (pBsAux, 5, &uiCode);
 1595|    963|    /*time_offset_length = */BsGetBits (pBsAux, 5, &uiCode);
 1596|       |#else
 1597|       |    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "nal_hrd_parameters_present_flag = 1 not supported.");
 1598|       |    return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_VUI_HRD);
 1599|       |#endif
 1600|    963|  }
 1601|  13.7k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //vcl_hrd_parameters_present_flag
  ------------------
  |  |   52|  13.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  13.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  13.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 625, False: 13.1k]
  |  |  ------------------
  |  |   55|  13.7k|    return uiRetTmp; \
  |  |   56|  13.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 13.1k]
  |  |  ------------------
  ------------------
 1602|  13.1k|  pVui->bVclHrdParamPresentFlag = !!uiCode;
 1603|  13.1k|  if (pVui->bVclHrdParamPresentFlag) {//Add HRD parse. the values are not being used though.
  ------------------
  |  Branch (1603:7): [True: 949, False: 12.1k]
  ------------------
 1604|    949|#ifdef _PARSE_NALHRD_VCLHRD_PARAMS_
 1605|    949|    int32_t cpb_cnt_minus1 = BsGetUe (pBsAux, &uiCode);
 1606|    949|    /*bit_rate_scale = */BsGetBits (pBsAux, 4, &uiCode);
 1607|    949|    /*cpb_size_scale = */BsGetBits (pBsAux, 4, &uiCode);
 1608|  7.47k|    for (int32_t i = 0; i <= cpb_cnt_minus1; i++) {
  ------------------
  |  Branch (1608:25): [True: 6.52k, False: 949]
  ------------------
 1609|  6.52k|      /*bit_rate_value_minus1[i] = */BsGetUe (pBsAux, &uiCode);
 1610|  6.52k|      /*cpb_size_value_minus1[i] = */BsGetUe (pBsAux, &uiCode);
 1611|  6.52k|      /*cbr_flag[i] = */BsGetOneBit (pBsAux, &uiCode);
 1612|  6.52k|    }
 1613|    949|    /*initial_cpb_removal_delay_length_minus1 = */BsGetBits (pBsAux, 5, &uiCode);
 1614|    949|    /*cpb_removal_delay_length_minus1 = */BsGetBits (pBsAux, 5, &uiCode);
 1615|    949|    /*dpb_output_delay_length_minus1 = */BsGetBits (pBsAux, 5, &uiCode);
 1616|    949|    /*time_offset_length = */BsGetBits (pBsAux, 5, &uiCode);
 1617|       |#else
 1618|       |    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "vcl_hrd_parameters_present_flag = 1 not supported.");
 1619|       |    return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_UNSUPPORTED_VUI_HRD);
 1620|       |#endif
 1621|    949|  }
 1622|  13.1k|#ifdef _PARSE_NALHRD_VCLHRD_PARAMS_
 1623|  13.1k|  if (pVui->bNalHrdParamPresentFlag | pVui->bVclHrdParamPresentFlag) {
  ------------------
  |  Branch (1623:7): [True: 1.09k, False: 12.0k]
  ------------------
 1624|  1.09k|    /*low_delay_hrd_flag = */BsGetOneBit (pBsAux, &uiCode);
 1625|  1.09k|  }
 1626|  13.1k|#endif
 1627|  13.1k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //pic_struct_present_flag
  ------------------
  |  |   52|  13.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  13.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  13.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 657, False: 12.4k]
  |  |  ------------------
  |  |   55|  13.1k|    return uiRetTmp; \
  |  |   56|  13.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 12.4k]
  |  |  ------------------
  ------------------
 1628|  12.4k|  pVui->bPicStructPresentFlag = !!uiCode;
 1629|  12.4k|  WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //bitstream_restriction_flag
  ------------------
  |  |   52|  12.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  12.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  12.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 371, False: 12.0k]
  |  |  ------------------
  |  |   55|  12.4k|    return uiRetTmp; \
  |  |   56|  12.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 12.0k]
  |  |  ------------------
  ------------------
 1630|  12.0k|  pVui->bBitstreamRestrictionFlag = !!uiCode;
 1631|  12.0k|  if (pVui->bBitstreamRestrictionFlag) {
  ------------------
  |  Branch (1631:7): [True: 4.21k, False: 7.88k]
  ------------------
 1632|  4.21k|    WELS_READ_VERIFY (BsGetOneBit (pBsAux, &uiCode)); //motion_vectors_over_pic_boundaries_flag
  ------------------
  |  |   52|  4.21k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.21k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.21k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 336, False: 3.88k]
  |  |  ------------------
  |  |   55|  4.21k|    return uiRetTmp; \
  |  |   56|  4.21k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.88k]
  |  |  ------------------
  ------------------
 1633|  3.88k|    pVui->bMotionVectorsOverPicBoundariesFlag = !!uiCode;
 1634|  3.88k|    WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //max_bytes_per_pic_denom
  ------------------
  |  |   52|  3.88k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.88k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.88k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 222, False: 3.65k]
  |  |  ------------------
  |  |   55|  3.88k|    return uiRetTmp; \
  |  |   56|  3.88k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.65k]
  |  |  ------------------
  ------------------
 1635|  3.65k|    pVui->uiMaxBytesPerPicDenom = uiCode;
 1636|  3.65k|    WELS_CHECK_SE_UPPER_WARNING (pVui->uiMaxBytesPerPicDenom, VUI_MAX_BYTES_PER_PIC_DENOM_MAX,
  ------------------
  |  |  300|  3.65k|#define WELS_CHECK_SE_UPPER_WARNING(val, upper_bound, syntax_name) do {\
  |  |  301|  3.65k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (301:5): [True: 604, False: 3.05k]
  |  |  ------------------
  |  |  302|    604|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  303|    604|}\
  |  |  304|  3.65k|}while(0)
  |  |  ------------------
  |  |  |  Branch (304:8): [Folded, False: 3.65k]
  |  |  ------------------
  ------------------
 1637|  3.65k|                                 "max_bytes_per_pic_denom");
 1638|  3.65k|    WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //max_bits_per_mb_denom
  ------------------
  |  |   52|  3.65k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.65k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.65k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 397, False: 3.26k]
  |  |  ------------------
  |  |   55|  3.65k|    return uiRetTmp; \
  |  |   56|  3.65k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.26k]
  |  |  ------------------
  ------------------
 1639|  3.26k|    pVui->uiMaxBitsPerMbDenom = uiCode;
 1640|  3.26k|    WELS_CHECK_SE_UPPER_WARNING (pVui->uiMaxBitsPerMbDenom, VUI_MAX_BITS_PER_MB_DENOM_MAX,
  ------------------
  |  |  300|  3.26k|#define WELS_CHECK_SE_UPPER_WARNING(val, upper_bound, syntax_name) do {\
  |  |  301|  3.26k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (301:5): [True: 465, False: 2.79k]
  |  |  ------------------
  |  |  302|    465|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  303|    465|}\
  |  |  304|  3.26k|}while(0)
  |  |  ------------------
  |  |  |  Branch (304:8): [Folded, False: 3.26k]
  |  |  ------------------
  ------------------
 1641|  3.26k|                                 "max_bits_per_mb_denom");
 1642|  3.26k|    WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //log2_max_mv_length_horizontal
  ------------------
  |  |   52|  3.26k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.26k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.26k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 402, False: 2.85k]
  |  |  ------------------
  |  |   55|  3.26k|    return uiRetTmp; \
  |  |   56|  3.26k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.85k]
  |  |  ------------------
  ------------------
 1643|  2.85k|    pVui->uiLog2MaxMvLengthHorizontal = uiCode;
 1644|  2.85k|    WELS_CHECK_SE_UPPER_WARNING (pVui->uiLog2MaxMvLengthHorizontal, VUI_LOG2_MAX_MV_LENGTH_HOR_MAX,
  ------------------
  |  |  300|  2.85k|#define WELS_CHECK_SE_UPPER_WARNING(val, upper_bound, syntax_name) do {\
  |  |  301|  2.85k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (301:5): [True: 746, False: 2.11k]
  |  |  ------------------
  |  |  302|    746|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  303|    746|}\
  |  |  304|  2.85k|}while(0)
  |  |  ------------------
  |  |  |  Branch (304:8): [Folded, False: 2.85k]
  |  |  ------------------
  ------------------
 1645|  2.85k|                                 "log2_max_mv_length_horizontal");
 1646|  2.85k|    WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //log2_max_mv_length_vertical
  ------------------
  |  |   52|  2.85k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.85k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.85k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 507, False: 2.35k]
  |  |  ------------------
  |  |   55|  2.85k|    return uiRetTmp; \
  |  |   56|  2.85k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.35k]
  |  |  ------------------
  ------------------
 1647|  2.35k|    pVui->uiLog2MaxMvLengthVertical = uiCode;
 1648|  2.35k|    WELS_CHECK_SE_UPPER_WARNING (pVui->uiLog2MaxMvLengthVertical, VUI_LOG2_MAX_MV_LENGTH_VER_MAX,
  ------------------
  |  |  300|  2.35k|#define WELS_CHECK_SE_UPPER_WARNING(val, upper_bound, syntax_name) do {\
  |  |  301|  2.35k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (301:5): [True: 422, False: 1.93k]
  |  |  ------------------
  |  |  302|    422|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  303|    422|}\
  |  |  304|  2.35k|}while(0)
  |  |  ------------------
  |  |  |  Branch (304:8): [Folded, False: 2.35k]
  |  |  ------------------
  ------------------
 1649|  2.35k|                                 "log2_max_mv_length_vertical");
 1650|  2.35k|    WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //max_num_reorder_frames
  ------------------
  |  |   52|  2.35k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.35k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.35k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 390, False: 1.96k]
  |  |  ------------------
  |  |   55|  2.35k|    return uiRetTmp; \
  |  |   56|  2.35k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.96k]
  |  |  ------------------
  ------------------
 1651|  1.96k|    pVui->uiMaxNumReorderFrames = uiCode;
 1652|  1.96k|    WELS_CHECK_SE_UPPER_WARNING (pVui->uiMaxNumReorderFrames, VUI_MAX_DEC_FRAME_BUFFERING_MAX,
  ------------------
  |  |  300|  1.96k|#define WELS_CHECK_SE_UPPER_WARNING(val, upper_bound, syntax_name) do {\
  |  |  301|  1.96k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (301:5): [True: 688, False: 1.27k]
  |  |  ------------------
  |  |  302|    688|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  303|    688|}\
  |  |  304|  1.96k|}while(0)
  |  |  ------------------
  |  |  |  Branch (304:8): [Folded, False: 1.96k]
  |  |  ------------------
  ------------------
 1653|  1.96k|                                 "max_num_reorder_frames");
 1654|  1.96k|    WELS_READ_VERIFY (BsGetUe (pBsAux, &uiCode)); //max_dec_frame_buffering
  ------------------
  |  |   52|  1.96k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.96k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.96k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 389, False: 1.57k]
  |  |  ------------------
  |  |   55|  1.96k|    return uiRetTmp; \
  |  |   56|  1.96k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.57k]
  |  |  ------------------
  ------------------
 1655|  1.57k|    pVui->uiMaxDecFrameBuffering = uiCode;
 1656|  1.57k|    WELS_CHECK_SE_UPPER_WARNING (pVui->uiMaxDecFrameBuffering, VUI_MAX_DEC_FRAME_BUFFERING_MAX,
  ------------------
  |  |  300|  1.57k|#define WELS_CHECK_SE_UPPER_WARNING(val, upper_bound, syntax_name) do {\
  |  |  301|  1.57k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (301:5): [True: 452, False: 1.12k]
  |  |  ------------------
  |  |  302|    452|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  303|    452|}\
  |  |  304|  1.57k|}while(0)
  |  |  ------------------
  |  |  |  Branch (304:8): [Folded, False: 1.57k]
  |  |  ------------------
  ------------------
 1657|  1.57k|                                 "max_num_reorder_frames");
 1658|  1.57k|  }
 1659|  9.45k|  return ERR_NONE;
 1660|  12.0k|}
_ZN7WelsDec19SetScalingListValueEPhiPbPN10WelsCommon15TagBitStringAuxE:
 1693|  23.2k|                             PBitStringAux pBsAux) { // reserved Sei_Msg type
 1694|  23.2k|  int iLastScale = 8;
 1695|  23.2k|  int iNextScale = 8;
 1696|  23.2k|  int iDeltaScale;
 1697|  23.2k|  int32_t iCode;
 1698|  23.2k|  int32_t iIdx;
 1699|  1.11M|  for (int j = 0; j < iScalingListNum; j++) {
  ------------------
  |  Branch (1699:19): [True: 1.09M, False: 18.8k]
  ------------------
 1700|  1.09M|    if (iNextScale != 0) {
  ------------------
  |  Branch (1700:9): [True: 181k, False: 916k]
  ------------------
 1701|   181k|      WELS_READ_VERIFY (BsGetSe (pBsAux, &iCode));
  ------------------
  |  |   52|   181k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   181k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   181k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.33k, False: 179k]
  |  |  ------------------
  |  |   55|   181k|    return uiRetTmp; \
  |  |   56|   181k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 179k]
  |  |  ------------------
  ------------------
 1702|   179k|      WELS_CHECK_SE_BOTH_ERROR_NOLOG (iCode, SCALING_LIST_DELTA_SCALE_MIN, SCALING_LIST_DELTA_SCALE_MAX, "DeltaScale",
  ------------------
  |  |  269|   179k|#define WELS_CHECK_SE_BOTH_ERROR_NOLOG(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  270|   179k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (270:5): [True: 929, False: 178k]
  |  |  |  Branch (270:28): [True: 394, False: 178k]
  |  |  ------------------
  |  |  271|  1.32k|  return ret_code;\
  |  |  272|  1.32k|}\
  |  |  273|   179k|}while(0)
  |  |  ------------------
  |  |  |  Branch (273:8): [Folded, False: 178k]
  |  |  ------------------
  ------------------
 1703|   179k|                                      ERR_SCALING_LIST_DELTA_SCALE);
 1704|   178k|      iDeltaScale = iCode;
 1705|   178k|      iNextScale = (iLastScale + iDeltaScale + 256) % 256;
 1706|   178k|      *bUseDefaultScalingMatrixFlag = (j == 0 && iNextScale == 0);
  ------------------
  |  Branch (1706:40): [True: 22.7k, False: 155k]
  |  Branch (1706:50): [True: 650, False: 22.1k]
  ------------------
 1707|   178k|      if (*bUseDefaultScalingMatrixFlag)
  ------------------
  |  Branch (1707:11): [True: 650, False: 177k]
  ------------------
 1708|    650|        break;
 1709|   178k|    }
 1710|  1.09M|    iIdx = iScalingListNum == 16 ? g_kuiZigzagScan[j] : g_kuiZigzagScan8x8[j];
  ------------------
  |  Branch (1710:12): [True: 55.5k, False: 1.03M]
  ------------------
 1711|  1.09M|    pScalingList[iIdx] = (iNextScale == 0) ? iLastScale : iNextScale;
  ------------------
  |  Branch (1711:26): [True: 933k, False: 160k]
  ------------------
 1712|  1.09M|    iLastScale = pScalingList[iIdx];
 1713|  1.09M|  }
 1714|       |
 1715|       |
 1716|  19.5k|  return ERR_NONE;
 1717|  23.2k|}
_ZN7WelsDec16ParseScalingListEPNS_6TagSpsEPN10WelsCommon15TagBitStringAuxEbbPbPA16_hPA64_h:
 1720|  22.6k|                          bool* pScalingListPresentFlag, uint8_t (*iScalingList4x4)[16], uint8_t (*iScalingList8x8)[64]) {
 1721|  22.6k|  uint32_t uiScalingListNum;
 1722|  22.6k|  uint32_t uiCode;
 1723|       |
 1724|  22.6k|  bool bUseDefaultScalingMatrixFlag4x4 = false;
 1725|  22.6k|  bool bUseDefaultScalingMatrixFlag8x8 = false;
 1726|  22.6k|  bool bInit = false;
 1727|  22.6k|  const uint8_t* defaultScaling[4];
 1728|       |
 1729|  22.6k|  if (!bPPS) { //sps scaling_list
  ------------------
  |  Branch (1729:7): [True: 19.4k, False: 3.21k]
  ------------------
 1730|  19.4k|    uiScalingListNum = (pSps->uiChromaFormatIdc != 3) ? 8 : 12;
  ------------------
  |  Branch (1730:24): [True: 19.4k, False: 0]
  ------------------
 1731|  19.4k|  } else { //pps scaling_list
 1732|  3.21k|    uiScalingListNum = 6 + (int32_t) kbTrans8x8ModeFlag * ((pSps->uiChromaFormatIdc != 3) ? 2 : 6);
  ------------------
  |  Branch (1732:60): [True: 3.21k, False: 0]
  ------------------
 1733|  3.21k|    bInit = pSps->bSeqScalingMatrixPresentFlag;
 1734|  3.21k|  }
 1735|       |
 1736|       |//Init default_scaling_list value for sps or pps
 1737|  22.6k|  defaultScaling[0] = bInit ? pSps->iScalingList4x4[0] : g_kuiDequantScaling4x4Default[0];
  ------------------
  |  Branch (1737:23): [True: 697, False: 21.9k]
  ------------------
 1738|  22.6k|  defaultScaling[1] = bInit ? pSps->iScalingList4x4[3] : g_kuiDequantScaling4x4Default[1];
  ------------------
  |  Branch (1738:23): [True: 697, False: 21.9k]
  ------------------
 1739|  22.6k|  defaultScaling[2] = bInit ? pSps->iScalingList8x8[0] : g_kuiDequantScaling8x8Default[0];
  ------------------
  |  Branch (1739:23): [True: 697, False: 21.9k]
  ------------------
 1740|  22.6k|  defaultScaling[3] = bInit ? pSps->iScalingList8x8[1] : g_kuiDequantScaling8x8Default[1];
  ------------------
  |  Branch (1740:23): [True: 697, False: 21.9k]
  ------------------
 1741|       |
 1742|   183k|  for (unsigned int i = 0; i < uiScalingListNum; i++) {
  ------------------
  |  Branch (1742:28): [True: 164k, False: 18.5k]
  ------------------
 1743|   164k|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode));
  ------------------
  |  |   52|   164k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   164k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   164k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 453, False: 164k]
  |  |  ------------------
  |  |   55|   164k|    return uiRetTmp; \
  |  |   56|   164k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 164k]
  |  |  ------------------
  ------------------
 1744|   164k|    pScalingListPresentFlag[i] = !!uiCode;
 1745|   164k|    if (!!uiCode) {
  ------------------
  |  Branch (1745:9): [True: 23.2k, False: 140k]
  ------------------
 1746|  23.2k|      if (i < 6) {//4x4 scaling list
  ------------------
  |  Branch (1746:11): [True: 5.42k, False: 17.7k]
  ------------------
 1747|  5.42k|        WELS_READ_VERIFY (SetScalingListValue (iScalingList4x4[i], 16, &bUseDefaultScalingMatrixFlag4x4, pBs));
  ------------------
  |  |   52|  5.42k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  5.42k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  5.42k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.20k, False: 3.22k]
  |  |  ------------------
  |  |   55|  5.42k|    return uiRetTmp; \
  |  |   56|  5.42k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.22k]
  |  |  ------------------
  ------------------
 1748|  3.22k|        if (bUseDefaultScalingMatrixFlag4x4) {
  ------------------
  |  Branch (1748:13): [True: 448, False: 2.77k]
  ------------------
 1749|    448|          bUseDefaultScalingMatrixFlag4x4 = false;
 1750|    448|          memcpy (iScalingList4x4[i], g_kuiDequantScaling4x4Default[i / 3], sizeof (uint8_t) * 16);
 1751|    448|        }
 1752|       |
 1753|       |
 1754|  17.7k|      } else {
 1755|  17.7k|        WELS_READ_VERIFY (SetScalingListValue (iScalingList8x8[i - 6], 64, &bUseDefaultScalingMatrixFlag8x8, pBs));
  ------------------
  |  |   52|  17.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  17.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  17.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.45k, False: 16.3k]
  |  |  ------------------
  |  |   55|  17.7k|    return uiRetTmp; \
  |  |   56|  17.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 16.3k]
  |  |  ------------------
  ------------------
 1756|       |
 1757|  16.3k|        if (bUseDefaultScalingMatrixFlag8x8) {
  ------------------
  |  Branch (1757:13): [True: 202, False: 16.1k]
  ------------------
 1758|    202|          bUseDefaultScalingMatrixFlag8x8 = false;
 1759|    202|          memcpy (iScalingList8x8[i - 6], g_kuiDequantScaling8x8Default[ (i - 6) & 1], sizeof (uint8_t) * 64);
 1760|    202|        }
 1761|  16.3k|      }
 1762|       |
 1763|   140k|    } else {
 1764|   140k|      if (i < 6) {
  ------------------
  |  Branch (1764:11): [True: 119k, False: 21.5k]
  ------------------
 1765|   119k|        if ((i != 0) && (i != 3))
  ------------------
  |  Branch (1765:13): [True: 98.6k, False: 20.6k]
  |  Branch (1765:25): [True: 79.1k, False: 19.5k]
  ------------------
 1766|  79.1k|          memcpy (iScalingList4x4[i], iScalingList4x4[i - 1], sizeof (uint8_t) * 16);
 1767|  40.1k|        else
 1768|  40.1k|          memcpy (iScalingList4x4[i], defaultScaling[i / 3], sizeof (uint8_t) * 16);
 1769|       |
 1770|   119k|      } else {
 1771|  21.5k|        if ((i == 6) || (i == 7))
  ------------------
  |  Branch (1771:13): [True: 4.63k, False: 16.9k]
  |  Branch (1771:25): [True: 16.9k, False: 0]
  ------------------
 1772|  21.5k|          memcpy (iScalingList8x8[i - 6], defaultScaling[ (i & 1) + 2], sizeof (uint8_t) * 64);
 1773|      0|        else
 1774|      0|          memcpy (iScalingList8x8[i - 6], iScalingList8x8[i - 8], sizeof (uint8_t) * 64);
 1775|       |
 1776|  21.5k|      }
 1777|   140k|    }
 1778|   164k|  }
 1779|  18.5k|  return ERR_NONE;
 1780|       |
 1781|  22.6k|}
_ZN7WelsDec12ResetFmoListEPNS_21TagWelsDecoderContextE:
 1792|  26.4k|int32_t ResetFmoList (PWelsDecoderContext pCtx) {
 1793|  26.4k|  int32_t iCountNum = 0;
 1794|  26.4k|  if (NULL != pCtx) {
  ------------------
  |  Branch (1794:7): [True: 26.4k, False: 0]
  ------------------
 1795|       |    // Fixed memory leak due to PPS_ID might not be continuous sometimes, 1/5/2010
 1796|  26.4k|    UninitFmoList (&pCtx->sFmoList[0], MAX_PPS_COUNT, pCtx->iActiveFmoNum, pCtx->pMemAlign);
  ------------------
  |  |   43|  26.4k|#define MAX_PPS_COUNT                   256     // Count number of PPS
  ------------------
 1797|  26.4k|    iCountNum = pCtx->iActiveFmoNum;
 1798|  26.4k|    pCtx->iActiveFmoNum = 0;
 1799|  26.4k|  }
 1800|  26.4k|  return iCountNum;
 1801|  26.4k|}

_ZN7WelsDec12InitReadBitsEPN10WelsCommon15TagBitStringAuxEl:
   51|  5.14M|int32_t InitReadBits (PBitStringAux pBitString, intX_t iEndOffset) {
   52|  5.14M|  if (pBitString->pCurBuf >= (pBitString->pEndBuf - iEndOffset)) {
  ------------------
  |  Branch (52:7): [True: 15.8k, False: 5.12M]
  ------------------
   53|  15.8k|    return ERR_INFO_INVALID_ACCESS;
   54|  15.8k|  }
   55|  5.12M|  pBitString->uiCurBits  = GetValue4Bytes (pBitString->pCurBuf);
   56|  5.12M|  pBitString->pCurBuf  += 4;
   57|  5.12M|  pBitString->iLeftBits = -16;
   58|  5.12M|  return ERR_NONE;
   59|  5.14M|}
_ZN7WelsDec11DecInitBitsEPN10WelsCommon15TagBitStringAuxEPKhi:
   70|  5.13M|int32_t DecInitBits (PBitStringAux pBitString, const uint8_t* kpBuf, const int32_t kiSize) {
   71|  5.13M|  const int32_t kiSizeBuf = (kiSize + 7) >> 3;
   72|  5.13M|  uint8_t* pTmp = (uint8_t*)kpBuf;
   73|       |
   74|  5.13M|  if (NULL == pTmp)
  ------------------
  |  Branch (74:7): [True: 0, False: 5.13M]
  ------------------
   75|      0|    return ERR_INFO_INVALID_ACCESS;
   76|       |
   77|  5.13M|  pBitString->pStartBuf = pTmp;             // buffer to start position
   78|  5.13M|  pBitString->pEndBuf   = pTmp + kiSizeBuf; // buffer + length
   79|  5.13M|  pBitString->iBits     = kiSize;           // count bits of overall bitstreaming inputindex;
   80|  5.13M|  pBitString->pCurBuf   = pBitString->pStartBuf;
   81|  5.13M|  int32_t iErr = InitReadBits (pBitString, 0);
   82|  5.13M|  if (iErr) {
  ------------------
  |  Branch (82:7): [True: 15.6k, False: 5.12M]
  ------------------
   83|  15.6k|    return iErr;
   84|  15.6k|  }
   85|  5.12M|  return ERR_NONE;
   86|  5.13M|}
_ZN7WelsDec14GetValue4BytesEPh:
   45|  5.12M|inline uint32_t GetValue4Bytes (uint8_t* pDstNal) {
   46|  5.12M|  uint32_t uiValue = 0;
   47|  5.12M|  uiValue = (pDstNal[0] << 24) | (pDstNal[1] << 16) | (pDstNal[2] << 8) | (pDstNal[3]);
   48|  5.12M|  return uiValue;
   49|  5.12M|}

_ZN7WelsDec19WelsCabacGlobalInitEPNS_21TagWelsDecoderContextE:
   37|  9.10k|void WelsCabacGlobalInit (PWelsDecoderContext pCtx) {
   38|  45.5k|  for (int32_t iModel = 0; iModel < 4; iModel++) {
  ------------------
  |  Branch (38:28): [True: 36.4k, False: 9.10k]
  ------------------
   39|  1.93M|    for (int32_t iQp = 0; iQp <= WELS_QP_MAX; iQp++)
  ------------------
  |  |   65|  1.93M|#define  WELS_QP_MAX    51
  ------------------
  |  Branch (39:27): [True: 1.89M, False: 36.4k]
  ------------------
   40|   873M|      for (int32_t iIdx = 0; iIdx < WELS_CONTEXT_COUNT; iIdx++) {
  ------------------
  |  |   46|   873M|#define  WELS_CONTEXT_COUNT 460
  ------------------
  |  Branch (40:30): [True: 871M, False: 1.89M]
  ------------------
   41|   871M|        int32_t m               = g_kiCabacGlobalContextIdx[iIdx][iModel][0];
   42|   871M|        int32_t n               = g_kiCabacGlobalContextIdx[iIdx][iModel][1];
   43|   871M|        int32_t iPreCtxState    = WELS_CLIP3 ((((m * iQp) >> 4) + n), 1, 126);
  ------------------
  |  |  204|   871M|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 43.5M, False: 827M]
  |  |  |  Branch (204:55): [True: 8.52M, False: 819M]
  |  |  ------------------
  ------------------
   44|   871M|        uint8_t uiValMps         = 0;
   45|   871M|        uint8_t uiStateIdx       = 0;
   46|   871M|        if (iPreCtxState <= 63) {
  ------------------
  |  Branch (46:13): [True: 463M, False: 408M]
  ------------------
   47|   463M|          uiStateIdx = 63 - iPreCtxState;
   48|   463M|          uiValMps = 0;
   49|   463M|        } else {
   50|   408M|          uiStateIdx = iPreCtxState - 64;
   51|   408M|          uiValMps = 1;
   52|   408M|        }
   53|   871M|        pCtx->sWelsCabacContexts[iModel][iQp][iIdx].uiState = uiStateIdx;
   54|   871M|        pCtx->sWelsCabacContexts[iModel][iQp][iIdx].uiMPS = uiValMps;
   55|   871M|      }
   56|  36.4k|  }
   57|  9.10k|  pCtx->bCabacInited = true;
   58|  9.10k|}
_ZN7WelsDec20WelsCabacContextInitEPNS_21TagWelsDecoderContextEhii:
   61|   148k|void WelsCabacContextInit (PWelsDecoderContext  pCtx, uint8_t eSliceType, int32_t iCabacInitIdc, int32_t iQp) {
   62|   148k|  int32_t iIdx =  pCtx->eSliceType == WelsCommon::I_SLICE ? 0 : iCabacInitIdc + 1;
  ------------------
  |  Branch (62:19): [True: 25.2k, False: 123k]
  ------------------
   63|   148k|  if (!pCtx->bCabacInited) {
  ------------------
  |  Branch (63:7): [True: 9.10k, False: 139k]
  ------------------
   64|  9.10k|    WelsCabacGlobalInit (pCtx);
   65|  9.10k|  }
   66|   148k|  memcpy (pCtx->pCabacCtx, pCtx->sWelsCabacContexts[iIdx][iQp],
   67|   148k|          WELS_CONTEXT_COUNT * sizeof (SWelsCabacCtx));
  ------------------
  |  |   46|   148k|#define  WELS_CONTEXT_COUNT 460
  ------------------
   68|   148k|}
_ZN7WelsDec24InitCabacDecEngineFromBSEPNS_19SWelsCabacDecEngineEPN10WelsCommon15TagBitStringAuxE:
   71|   152k|int32_t InitCabacDecEngineFromBS (PWelsCabacDecEngine pDecEngine, PBitStringAux pBsAux) {
   72|   152k|  int32_t iRemainingBits = - pBsAux->iLeftBits; //pBsAux->iLeftBits < 0
   73|   152k|  int32_t iRemainingBytes = (iRemainingBits >> 3) + 2; //+2: indicating the pre-read 2 bytes
   74|   152k|  uint8_t* pCurr;
   75|       |
   76|   152k|  pCurr = pBsAux->pCurBuf - iRemainingBytes;
   77|   152k|  if (pCurr >= (pBsAux->pEndBuf - 1)) {
  ------------------
  |  Branch (77:7): [True: 11.4k, False: 141k]
  ------------------
   78|  11.4k|    return ERR_INFO_INVALID_ACCESS;
   79|  11.4k|  }
   80|   141k|  pDecEngine->uiOffset = ((pCurr[0] << 16) | (pCurr[1] << 8) | pCurr[2]);
   81|   141k|  pDecEngine->uiOffset <<= 16;
   82|   141k|  pDecEngine->uiOffset |= (pCurr[3] << 8) | pCurr[4];
   83|   141k|  pDecEngine->iBitsLeft = 31;
   84|   141k|  pDecEngine->pBuffCurr = pCurr + 5;
   85|       |
   86|   141k|  pDecEngine->uiRange = WELS_CABAC_HALF;
  ------------------
  |  |  104|   141k|#define WELS_CABAC_HALF    0x01FE
  ------------------
   87|   141k|  pDecEngine->pBuffStart = pBsAux->pStartBuf;
   88|   141k|  pDecEngine->pBuffEnd = pBsAux->pEndBuf;
   89|   141k|  pBsAux->iLeftBits = 0;
   90|   141k|  return ERR_NONE;
   91|   152k|}
_ZN7WelsDec25RestoreCabacDecEngineToBSEPNS_19SWelsCabacDecEngineEPN10WelsCommon15TagBitStringAuxE:
   93|  7.40k|void RestoreCabacDecEngineToBS (PWelsCabacDecEngine pDecEngine, PBitStringAux pBsAux) {
   94|       |  //CABAC decoding finished, changing to SBitStringAux
   95|  7.40k|  pDecEngine->pBuffCurr -= (pDecEngine->iBitsLeft >> 3);
   96|  7.40k|  pDecEngine->iBitsLeft = 0;     //pcm_alignment_zero_bit in CABAC
   97|  7.40k|  pBsAux->iLeftBits = 0;
   98|  7.40k|  pBsAux->pStartBuf = pDecEngine->pBuffStart;
   99|  7.40k|  pBsAux->pCurBuf = pDecEngine->pBuffCurr;
  100|  7.40k|  pBsAux->uiCurBits = 0;
  101|  7.40k|  pBsAux->iIndex = 0;
  102|  7.40k|}
_ZN7WelsDec15Read32BitsCabacEPNS_19SWelsCabacDecEngineERjRi:
  105|   980k|int32_t Read32BitsCabac (PWelsCabacDecEngine pDecEngine, uint32_t& uiValue, int32_t& iNumBitsRead) {
  106|   980k|  intX_t iLeftBytes = pDecEngine->pBuffEnd - pDecEngine->pBuffCurr;
  107|   980k|  iNumBitsRead = 0;
  108|   980k|  uiValue = 0;
  109|   980k|  if (iLeftBytes <= 0) {
  ------------------
  |  Branch (109:7): [True: 103k, False: 877k]
  ------------------
  110|   103k|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_CABAC_NO_BS_TO_READ);
  ------------------
  |  |   59|   103k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  111|   103k|  }
  112|   877k|  switch (iLeftBytes) {
  113|  8.27k|  case 3:
  ------------------
  |  Branch (113:3): [True: 8.27k, False: 868k]
  ------------------
  114|  8.27k|    uiValue = ((pDecEngine->pBuffCurr[0]) << 16 | (pDecEngine->pBuffCurr[1]) << 8 | (pDecEngine->pBuffCurr[2]));
  115|  8.27k|    pDecEngine->pBuffCurr += 3;
  116|  8.27k|    iNumBitsRead = 24;
  117|  8.27k|    break;
  118|  5.03k|  case 2:
  ------------------
  |  Branch (118:3): [True: 5.03k, False: 872k]
  ------------------
  119|  5.03k|    uiValue = ((pDecEngine->pBuffCurr[0]) << 8 | (pDecEngine->pBuffCurr[1]));
  120|  5.03k|    pDecEngine->pBuffCurr += 2;
  121|  5.03k|    iNumBitsRead = 16;
  122|  5.03k|    break;
  123|  8.18k|  case 1:
  ------------------
  |  Branch (123:3): [True: 8.18k, False: 868k]
  ------------------
  124|  8.18k|    uiValue = pDecEngine->pBuffCurr[0];
  125|  8.18k|    pDecEngine->pBuffCurr += 1;
  126|  8.18k|    iNumBitsRead = 8;
  127|  8.18k|    break;
  128|   855k|  default:
  ------------------
  |  Branch (128:3): [True: 855k, False: 21.4k]
  ------------------
  129|   855k|    uiValue = ((pDecEngine->pBuffCurr[0] << 24) | (pDecEngine->pBuffCurr[1]) << 16 | (pDecEngine->pBuffCurr[2]) << 8 |
  130|   855k|               (pDecEngine->pBuffCurr[3]));
  131|   855k|    pDecEngine->pBuffCurr += 4;
  132|   855k|    iNumBitsRead = 32;
  133|   855k|    break;
  134|   877k|  }
  135|   877k|  return ERR_NONE;
  136|   877k|}
_ZN7WelsDec14DecodeBinCabacEPNS_19SWelsCabacDecEngineEPNS_19SWels_Cabac_ElementERj:
  138|   779M|int32_t DecodeBinCabac (PWelsCabacDecEngine pDecEngine, PWelsCabacCtx pBinCtx, uint32_t& uiBinVal) {
  139|   779M|  int32_t iErrorInfo = ERR_NONE;
  140|   779M|  uint32_t uiState = pBinCtx->uiState;
  141|   779M|  uiBinVal = pBinCtx->uiMPS;
  142|   779M|  uint64_t uiOffset = pDecEngine->uiOffset;
  143|   779M|  uint64_t uiRange = pDecEngine->uiRange;
  144|       |
  145|   779M|  int32_t iRenorm = 1;
  146|   779M|  uint32_t uiRangeLPS = g_kuiCabacRangeLps[uiState][ (uiRange >> 6) & 0x03];
  147|   779M|  uiRange -= uiRangeLPS;
  148|   779M|  if (uiOffset >= (uiRange << pDecEngine->iBitsLeft)) { //LPS
  ------------------
  |  Branch (148:7): [True: 1.96M, False: 777M]
  ------------------
  149|  1.96M|    uiOffset -= (uiRange << pDecEngine->iBitsLeft);
  150|  1.96M|    uiBinVal ^= 0x0001;
  151|  1.96M|    if (!uiState)
  ------------------
  |  Branch (151:9): [True: 210k, False: 1.75M]
  ------------------
  152|   210k|      pBinCtx->uiMPS ^= 0x01;
  153|  1.96M|    pBinCtx->uiState = g_kuiStateTransTable[uiState][0];
  154|  1.96M|    iRenorm = g_kRenormTable256[uiRangeLPS];
  155|  1.96M|    uiRange = (uiRangeLPS << iRenorm);
  156|   777M|  } else {  //MPS
  157|   777M|    pBinCtx->uiState = g_kuiStateTransTable[uiState][1];
  158|   777M|    if (uiRange >= WELS_CABAC_QUARTER) {
  ------------------
  |  |  105|   777M|#define WELS_CABAC_QUARTER 0x0100
  ------------------
  |  Branch (158:9): [True: 752M, False: 25.1M]
  ------------------
  159|   752M|      pDecEngine->uiRange = uiRange;
  160|   752M|      return ERR_NONE;
  161|   752M|    } else {
  162|  25.1M|      uiRange <<= 1;
  163|  25.1M|    }
  164|   777M|  }
  165|       |  //Renorm
  166|  27.0M|  pDecEngine->uiRange = uiRange;
  167|  27.0M|  pDecEngine->iBitsLeft -= iRenorm;
  168|  27.0M|  if (pDecEngine->iBitsLeft > 0) {
  ------------------
  |  Branch (168:7): [True: 26.1M, False: 928k]
  ------------------
  169|  26.1M|    pDecEngine->uiOffset = uiOffset;
  170|  26.1M|    return ERR_NONE;
  171|  26.1M|  }
  172|   928k|  uint32_t uiVal = 0;
  173|   928k|  int32_t iNumBitsRead = 0;
  174|   928k|  iErrorInfo = Read32BitsCabac (pDecEngine, uiVal, iNumBitsRead);
  175|   928k|  pDecEngine->uiOffset = (uiOffset << iNumBitsRead) | uiVal;
  176|   928k|  pDecEngine->iBitsLeft += iNumBitsRead;
  177|   928k|  if (iErrorInfo && pDecEngine->iBitsLeft < 0) {
  ------------------
  |  Branch (177:7): [True: 87.8k, False: 840k]
  |  Branch (177:21): [True: 44.9k, False: 42.8k]
  ------------------
  178|  44.9k|    return iErrorInfo;
  179|  44.9k|  }
  180|   883k|  return ERR_NONE;
  181|   928k|}
_ZN7WelsDec17DecodeBypassCabacEPNS_19SWelsCabacDecEngineERj:
  183|  2.09M|int32_t DecodeBypassCabac (PWelsCabacDecEngine pDecEngine, uint32_t& uiBinVal) {
  184|  2.09M|  int32_t iErrorInfo = ERR_NONE;
  185|  2.09M|  int32_t iBitsLeft = pDecEngine->iBitsLeft;
  186|  2.09M|  uint64_t uiOffset = pDecEngine->uiOffset;
  187|  2.09M|  uint64_t uiRangeValue;
  188|       |
  189|       |
  190|  2.09M|  if (iBitsLeft <= 0) {
  ------------------
  |  Branch (190:7): [True: 48.8k, False: 2.04M]
  ------------------
  191|  48.8k|    uint32_t uiVal = 0;
  192|  48.8k|    int32_t iNumBitsRead = 0;
  193|  48.8k|    iErrorInfo = Read32BitsCabac (pDecEngine, uiVal, iNumBitsRead);
  194|  48.8k|    uiOffset = (uiOffset << iNumBitsRead) | uiVal;
  195|  48.8k|    iBitsLeft = iNumBitsRead;
  196|  48.8k|    if (iErrorInfo && iBitsLeft == 0) {
  ------------------
  |  Branch (196:9): [True: 13.2k, False: 35.6k]
  |  Branch (196:23): [True: 13.2k, False: 0]
  ------------------
  197|  13.2k|      return iErrorInfo;
  198|  13.2k|    }
  199|  48.8k|  }
  200|  2.08M|  iBitsLeft--;
  201|  2.08M|  uiRangeValue = (pDecEngine->uiRange << iBitsLeft);
  202|  2.08M|  if (uiOffset >= uiRangeValue) {
  ------------------
  |  Branch (202:7): [True: 663k, False: 1.42M]
  ------------------
  203|   663k|    pDecEngine->iBitsLeft = iBitsLeft;
  204|   663k|    pDecEngine->uiOffset = uiOffset - uiRangeValue;
  205|   663k|    uiBinVal = 1;
  206|   663k|    return ERR_NONE;
  207|   663k|  }
  208|  1.42M|  pDecEngine->iBitsLeft = iBitsLeft;
  209|  1.42M|  pDecEngine->uiOffset = uiOffset;
  210|  1.42M|  uiBinVal = 0;
  211|  1.42M|  return ERR_NONE;
  212|  2.08M|}
_ZN7WelsDec20DecodeTerminateCabacEPNS_19SWelsCabacDecEngineERj:
  214|  1.96M|int32_t DecodeTerminateCabac (PWelsCabacDecEngine pDecEngine, uint32_t& uiBinVal) {
  215|  1.96M|  int32_t iErrorInfo = ERR_NONE;
  216|  1.96M|  uint64_t uiRange = pDecEngine->uiRange - 2;
  217|  1.96M|  uint64_t uiOffset = pDecEngine->uiOffset;
  218|       |
  219|  1.96M|  if (uiOffset >= (uiRange << pDecEngine->iBitsLeft)) {
  ------------------
  |  Branch (219:7): [True: 7.80k, False: 1.95M]
  ------------------
  220|  7.80k|    uiBinVal = 1;
  221|  1.95M|  } else {
  222|  1.95M|    uiBinVal = 0;
  223|       |    // Renorm
  224|  1.95M|    if (uiRange < WELS_CABAC_QUARTER) {
  ------------------
  |  |  105|  1.95M|#define WELS_CABAC_QUARTER 0x0100
  ------------------
  |  Branch (224:9): [True: 49.8k, False: 1.90M]
  ------------------
  225|  49.8k|      int32_t iRenorm = g_kRenormTable256[uiRange];
  226|  49.8k|      pDecEngine->uiRange = (uiRange << iRenorm);
  227|  49.8k|      pDecEngine->iBitsLeft -= iRenorm;
  228|  49.8k|      if (pDecEngine->iBitsLeft < 0) {
  ------------------
  |  Branch (228:11): [True: 3.22k, False: 46.5k]
  ------------------
  229|  3.22k|        uint32_t uiVal = 0;
  230|  3.22k|        int32_t iNumBitsRead = 0;
  231|  3.22k|        iErrorInfo = Read32BitsCabac (pDecEngine, uiVal, iNumBitsRead);
  232|  3.22k|        pDecEngine->uiOffset = (pDecEngine->uiOffset << iNumBitsRead) | uiVal;
  233|  3.22k|        pDecEngine->iBitsLeft += iNumBitsRead;
  234|  3.22k|      }
  235|  49.8k|      if (iErrorInfo && pDecEngine->iBitsLeft < 0) {
  ------------------
  |  Branch (235:11): [True: 2.10k, False: 47.6k]
  |  Branch (235:25): [True: 2.10k, False: 0]
  ------------------
  236|  2.10k|        return iErrorInfo;
  237|  2.10k|      }
  238|  47.6k|      return ERR_NONE;
  239|  1.90M|    } else {
  240|  1.90M|      pDecEngine->uiRange = uiRange;
  241|  1.90M|      return ERR_NONE;
  242|  1.90M|    }
  243|  1.95M|  }
  244|  7.80k|  return ERR_NONE;
  245|  1.96M|}
_ZN7WelsDec19DecodeUnaryBinCabacEPNS_19SWelsCabacDecEngineEPNS_19SWels_Cabac_ElementEiRj:
  248|   186k|                             uint32_t& uiSymVal) {
  249|   186k|  uiSymVal = 0;
  250|   186k|  WELS_READ_VERIFY (DecodeBinCabac (pDecEngine, pBinCtx, uiSymVal));
  ------------------
  |  |   52|   186k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   186k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   186k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 857, False: 185k]
  |  |  ------------------
  |  |   55|   186k|    return uiRetTmp; \
  |  |   56|   186k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 185k]
  |  |  ------------------
  ------------------
  251|   185k|  if (uiSymVal == 0) {
  ------------------
  |  Branch (251:7): [True: 140k, False: 44.7k]
  ------------------
  252|   140k|    return ERR_NONE;
  253|   140k|  } else {
  254|  44.7k|    uint32_t uiCode;
  255|  44.7k|    pBinCtx += iCtxOffset;
  256|  44.7k|    uiSymVal = 0;
  257|   761M|    do {
  258|   761M|      WELS_READ_VERIFY (DecodeBinCabac (pDecEngine, pBinCtx, uiCode));
  ------------------
  |  |   52|   761M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   761M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   761M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.05k, False: 761M]
  |  |  ------------------
  |  |   55|   761M|    return uiRetTmp; \
  |  |   56|   761M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 761M]
  |  |  ------------------
  ------------------
  259|   761M|      ++uiSymVal;
  260|   761M|    } while (uiCode != 0);
  ------------------
  |  Branch (260:14): [True: 761M, False: 43.6k]
  ------------------
  261|  43.6k|    return ERR_NONE;
  262|  44.7k|  }
  263|   185k|}
_ZN7WelsDec20DecodeExpBypassCabacEPNS_19SWelsCabacDecEngineEiRj:
  265|   197k|int32_t DecodeExpBypassCabac (PWelsCabacDecEngine pDecEngine, int32_t iCount, uint32_t& uiSymVal) {
  266|   197k|  uint32_t uiCode;
  267|   197k|  int32_t iSymTmp = 0;
  268|   197k|  int32_t iSymTmp2 = 0;
  269|   197k|  uiSymVal = 0;
  270|   341k|  do {
  271|   341k|    WELS_READ_VERIFY (DecodeBypassCabac (pDecEngine, uiCode));
  ------------------
  |  |   52|   341k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   341k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   341k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.46k, False: 339k]
  |  |  ------------------
  |  |   55|   341k|    return uiRetTmp; \
  |  |   56|   341k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 339k]
  |  |  ------------------
  ------------------
  272|   339k|    if (uiCode == 1) {
  ------------------
  |  Branch (272:9): [True: 144k, False: 195k]
  ------------------
  273|   144k|      iSymTmp += (1 << iCount);
  274|   144k|      ++iCount;
  275|   144k|    }
  276|   339k|  } while (uiCode != 0 && iCount != 16);
  ------------------
  |  Branch (276:12): [True: 144k, False: 195k]
  |  Branch (276:27): [True: 143k, False: 450]
  ------------------
  277|   195k|  if (iCount == 16) {
  ------------------
  |  Branch (277:7): [True: 450, False: 195k]
  ------------------
  278|    450|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_CABAC_UNEXPECTED_VALUE);
  ------------------
  |  |   59|    450|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  279|    450|  }
  280|       |
  281|   890k|  while (iCount--) {
  ------------------
  |  Branch (281:10): [True: 697k, False: 192k]
  ------------------
  282|   697k|    WELS_READ_VERIFY (DecodeBypassCabac (pDecEngine, uiCode));
  ------------------
  |  |   52|   697k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   697k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   697k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.89k, False: 694k]
  |  |  ------------------
  |  |   55|   697k|    return uiRetTmp; \
  |  |   56|   697k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 694k]
  |  |  ------------------
  ------------------
  283|   694k|    if (uiCode == 1) {
  ------------------
  |  Branch (283:9): [True: 196k, False: 498k]
  ------------------
  284|   196k|      iSymTmp2 |= (1 << iCount);
  285|   196k|    }
  286|   694k|  }
  287|   192k|  uiSymVal = (uint32_t) (iSymTmp + iSymTmp2);
  288|   192k|  return ERR_NONE;
  289|   195k|}
_ZN7WelsDec19DecodeUEGLevelCabacEPNS_19SWelsCabacDecEngineEPNS_19SWels_Cabac_ElementERj:
  291|  61.4k|uint32_t DecodeUEGLevelCabac (PWelsCabacDecEngine pDecEngine, PWelsCabacCtx pBinCtx, uint32_t& uiCode) {
  292|  61.4k|  uiCode = 0;
  293|  61.4k|  WELS_READ_VERIFY (DecodeBinCabac (pDecEngine, pBinCtx, uiCode));
  ------------------
  |  |   52|  61.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  61.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  61.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 405, False: 61.0k]
  |  |  ------------------
  |  |   55|  61.4k|    return uiRetTmp; \
  |  |   56|  61.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 61.0k]
  |  |  ------------------
  ------------------
  294|  61.0k|  if (uiCode == 0)
  ------------------
  |  Branch (294:7): [True: 34.2k, False: 26.7k]
  ------------------
  295|  34.2k|    return ERR_NONE;
  296|  26.7k|  else {
  297|  26.7k|    uint32_t uiTmp, uiCount = 1;
  298|  26.7k|    uiCode = 0;
  299|   126k|    do {
  300|   126k|      WELS_READ_VERIFY (DecodeBinCabac (pDecEngine, pBinCtx, uiTmp));
  ------------------
  |  |   52|   126k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   126k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   126k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.08k, False: 125k]
  |  |  ------------------
  |  |   55|   126k|    return uiRetTmp; \
  |  |   56|   126k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 125k]
  |  |  ------------------
  ------------------
  301|   125k|      ++uiCode;
  302|   125k|      ++uiCount;
  303|   125k|    } while (uiTmp != 0 && uiCount != 13);
  ------------------
  |  Branch (303:14): [True: 105k, False: 19.8k]
  |  Branch (303:28): [True: 99.5k, False: 5.83k]
  ------------------
  304|       |
  305|  25.6k|    if (uiTmp != 0) {
  ------------------
  |  Branch (305:9): [True: 5.83k, False: 19.8k]
  ------------------
  306|  5.83k|      WELS_READ_VERIFY (DecodeExpBypassCabac (pDecEngine, 0, uiTmp));
  ------------------
  |  |   52|  5.83k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  5.83k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  5.83k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 942, False: 4.89k]
  |  |  ------------------
  |  |   55|  5.83k|    return uiRetTmp; \
  |  |   56|  5.83k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.89k]
  |  |  ------------------
  ------------------
  307|  4.89k|      uiCode += uiTmp + 1;
  308|  4.89k|    }
  309|  24.7k|    return ERR_NONE;
  310|  25.6k|  }
  311|      0|  return ERR_NONE;
  312|  61.0k|}
_ZN7WelsDec16DecodeUEGMvCabacEPNS_19SWelsCabacDecEngineEPNS_19SWels_Cabac_ElementEjRj:
  314|   502k|int32_t DecodeUEGMvCabac (PWelsCabacDecEngine pDecEngine, PWelsCabacCtx pBinCtx, uint32_t iMaxBin,  uint32_t& uiCode) {
  315|   502k|  WELS_READ_VERIFY (DecodeBinCabac (pDecEngine, pBinCtx + g_kMvdBinPos2Ctx[0], uiCode));
  ------------------
  |  |   52|   502k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   502k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   502k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.51k, False: 501k]
  |  |  ------------------
  |  |   55|   502k|    return uiRetTmp; \
  |  |   56|   502k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 501k]
  |  |  ------------------
  ------------------
  316|   501k|  if (uiCode == 0)
  ------------------
  |  Branch (316:7): [True: 143k, False: 358k]
  ------------------
  317|   143k|    return ERR_NONE;
  318|   358k|  else {
  319|   358k|    uint32_t uiTmp, uiCount = 1;
  320|   358k|    uiCode = 0;
  321|  1.81M|    do {
  322|  1.81M|      WELS_READ_VERIFY (DecodeBinCabac (pDecEngine, pBinCtx + g_kMvdBinPos2Ctx[uiCount++], uiTmp));
  ------------------
  |  |   52|  1.81M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.81M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.81M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.85k, False: 1.81M]
  |  |  ------------------
  |  |   55|  1.81M|    return uiRetTmp; \
  |  |   56|  1.81M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.81M]
  |  |  ------------------
  ------------------
  323|  1.81M|      uiCode++;
  324|  1.81M|    } while (uiTmp != 0 && uiCount != 8);
  ------------------
  |  Branch (324:14): [True: 1.64M, False: 164k]
  |  Branch (324:28): [True: 1.45M, False: 191k]
  ------------------
  325|       |
  326|   356k|    if (uiTmp != 0) {
  ------------------
  |  Branch (326:9): [True: 191k, False: 164k]
  ------------------
  327|   191k|      WELS_READ_VERIFY (DecodeExpBypassCabac (pDecEngine, 3, uiTmp));
  ------------------
  |  |   52|   191k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   191k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   191k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 3.86k, False: 187k]
  |  |  ------------------
  |  |   55|   191k|    return uiRetTmp; \
  |  |   56|   191k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 187k]
  |  |  ------------------
  ------------------
  328|   187k|      uiCode += (uiTmp + 1);
  329|   187k|    }
  330|   352k|    return ERR_NONE;
  331|   356k|  }
  332|   501k|}

_ZN7WelsDec29DeblockingBsMarginalMBAvcbaseEPNS_19tagDeblockingFilterEPNS_10TagDqLayerEiii:
  452|  5.04M|                                        int32_t iNeighMb, int32_t iMbXy) {
  453|  5.04M|  int32_t i, j;
  454|  5.04M|  uint32_t uiBSx4;
  455|  5.04M|  uint8_t* pBS = (uint8_t*) (&uiBSx4);
  456|  5.04M|  const uint8_t* pBIdx      = &g_kuiTableBIdx[iEdge][0];
  457|  5.04M|  const uint8_t* pBnIdx     = &g_kuiTableBIdx[iEdge][4];
  458|  5.04M|  const uint8_t* pB8x8Idx   = &g_kuiTableB8x8Idx[iEdge][0];
  459|  5.04M|  const uint8_t* pBn8x8Idx  = &g_kuiTableB8x8Idx[iEdge][8];
  460|  5.04M|  int8_t (*iRefIdx)[MB_BLOCK4x4_NUM] = pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pRefIndex[LIST_0] :
  ------------------
  |  Branch (460:40): [True: 5.04M, False: 0]
  ------------------
  461|  5.04M|                                       pCurDqLayer->pRefIndex[LIST_0];
  462|       |
  463|  5.04M|  if (pCurDqLayer->pTransformSize8x8Flag[iMbXy] && pCurDqLayer->pTransformSize8x8Flag[iNeighMb]) {
  ------------------
  |  Branch (463:7): [True: 26.5k, False: 5.02M]
  |  Branch (463:52): [True: 12.6k, False: 13.8k]
  ------------------
  464|  38.0k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (464:17): [True: 25.3k, False: 12.6k]
  ------------------
  465|  25.3k|      uint8_t uiNzc = 0;
  466|  92.3k|      for (j = 0; uiNzc == 0 && j < 4; j++) {
  ------------------
  |  Branch (466:19): [True: 77.7k, False: 14.5k]
  |  Branch (466:33): [True: 66.9k, False: 10.8k]
  ------------------
  467|  66.9k|        uiNzc |= (GetPNzc (pCurDqLayer, iMbXy)[* (pB8x8Idx + j)] | GetPNzc (pCurDqLayer, iNeighMb)[* (pBn8x8Idx + j)]);
  468|  66.9k|      }
  469|  25.3k|      if (uiNzc) {
  ------------------
  |  Branch (469:11): [True: 14.5k, False: 10.8k]
  ------------------
  470|  14.5k|        pBS[i << 1] = pBS[1 + (i << 1)] = 2;
  471|  14.5k|      } else {
  472|  10.8k|        PPicture ref0, ref1;
  473|  10.8k|        ref0 = (iRefIdx[iMbXy][*pB8x8Idx] > REF_NOT_IN_LIST) ? pFilter->pRefPics[LIST_0][iRefIdx[iMbXy][*pB8x8Idx]] : NULL;
  ------------------
  |  |   42|  10.8k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (473:16): [True: 10.8k, False: 0]
  ------------------
  474|  10.8k|        ref1 = (iRefIdx[iNeighMb][*pBn8x8Idx] > REF_NOT_IN_LIST) ? pFilter->pRefPics[LIST_0][iRefIdx[iNeighMb][*pBn8x8Idx]] :
  ------------------
  |  |   42|  10.8k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (474:16): [True: 10.6k, False: 210]
  ------------------
  475|  10.8k|               NULL;
  476|  10.8k|        pBS[i << 1] = pBS[1 + (i << 1)] = MB_BS_MV (ref0, ref1, pCurDqLayer->pDec->pMv[LIST_0], iMbXy, iNeighMb,
  ------------------
  |  |   58|  10.8k|#define MB_BS_MV(pRefPic0, pRefPic1, iMotionVector, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |   59|  10.8k|(\
  |  |   60|  10.8k|    ( pRefPic0 != pRefPic1) ||\
  |  |  ------------------
  |  |  |  Branch (60:5): [True: 1.14k, False: 9.71k]
  |  |  ------------------
  |  |   61|  10.8k|    ( WELS_ABS( iMotionVector[iMbXy][iIndex][0] - iMotionVector[iMbBn][iNeighIndex][0] ) >= 4 ) ||\
  |  |  ------------------
  |  |  |  |  196|  9.71k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (196:23): [True: 4.19k, False: 5.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (61:5): [True: 3.11k, False: 6.59k]
  |  |  ------------------
  |  |   62|  10.8k|    ( WELS_ABS( iMotionVector[iMbXy][iIndex][1] - iMotionVector[iMbBn][iNeighIndex][1] ) >= 4 )\
  |  |  ------------------
  |  |  |  |  196|  6.59k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (196:23): [True: 1.36k, False: 5.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:5): [True: 268, False: 6.33k]
  |  |  ------------------
  |  |   63|  10.8k|)
  ------------------
  477|  10.8k|                                          *pB8x8Idx, *pBn8x8Idx);
  478|  10.8k|      }
  479|  25.3k|      pB8x8Idx += 4;
  480|  25.3k|      pBn8x8Idx += 4;
  481|  25.3k|    }
  482|  5.03M|  } else if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (482:14): [True: 13.8k, False: 5.02M]
  ------------------
  483|  41.5k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (483:17): [True: 27.6k, False: 13.8k]
  ------------------
  484|  27.6k|      uint8_t uiNzc = 0;
  485|   104k|      for (j = 0; uiNzc == 0 && j < 4; j++) {
  ------------------
  |  Branch (485:19): [True: 92.6k, False: 12.2k]
  |  Branch (485:33): [True: 77.2k, False: 15.3k]
  ------------------
  486|  77.2k|        uiNzc |= GetPNzc (pCurDqLayer, iMbXy)[* (pB8x8Idx + j)];
  487|  77.2k|      }
  488|  83.0k|      for (j = 0; j < 2; j++) {
  ------------------
  |  Branch (488:19): [True: 55.3k, False: 27.6k]
  ------------------
  489|  55.3k|        if (uiNzc | GetPNzc (pCurDqLayer, iNeighMb)[*pBnIdx]) {
  ------------------
  |  Branch (489:13): [True: 24.7k, False: 30.5k]
  ------------------
  490|  24.7k|          pBS[j + (i << 1)] = 2;
  491|  30.5k|        } else {
  492|  30.5k|          PPicture ref0, ref1;
  493|  30.5k|          ref0 = (iRefIdx[iMbXy][*pB8x8Idx] > REF_NOT_IN_LIST) ? pFilter->pRefPics[LIST_0][iRefIdx[iMbXy][*pB8x8Idx]] : NULL;
  ------------------
  |  |   42|  30.5k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (493:18): [True: 30.5k, False: 0]
  ------------------
  494|  30.5k|          ref1 = (iRefIdx[iNeighMb][*pBnIdx] > REF_NOT_IN_LIST) ? pFilter->pRefPics[LIST_0][iRefIdx[iNeighMb][*pBnIdx]] : NULL;
  ------------------
  |  |   42|  30.5k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (494:18): [True: 29.7k, False: 852]
  ------------------
  495|  30.5k|          pBS[j + (i << 1)] = MB_BS_MV (ref0, ref1,
  ------------------
  |  |   58|  30.5k|#define MB_BS_MV(pRefPic0, pRefPic1, iMotionVector, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |   59|  30.5k|(\
  |  |   60|  30.5k|    ( pRefPic0 != pRefPic1) ||\
  |  |  ------------------
  |  |  |  Branch (60:5): [True: 1.74k, False: 28.8k]
  |  |  ------------------
  |  |   61|  30.5k|    ( WELS_ABS( iMotionVector[iMbXy][iIndex][0] - iMotionVector[iMbBn][iNeighIndex][0] ) >= 4 ) ||\
  |  |  ------------------
  |  |  |  |  196|   115k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (196:23): [True: 11.1k, False: 17.6k]
  |  |  |  |  |  Branch (196:24): [True: 28.8k, False: 0]
  |  |  |  |  |  Branch (196:24): [True: 28.8k, False: 0]
  |  |  |  |  |  Branch (196:33): [True: 11.1k, False: 0]
  |  |  |  |  |  Branch (196:33): [True: 11.1k, False: 0]
  |  |  |  |  |  Branch (196:41): [True: 17.6k, False: 0]
  |  |  |  |  |  Branch (196:41): [True: 17.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (61:5): [True: 13.5k, False: 15.2k]
  |  |  ------------------
  |  |   62|  30.5k|    ( WELS_ABS( iMotionVector[iMbXy][iIndex][1] - iMotionVector[iMbBn][iNeighIndex][1] ) >= 4 )\
  |  |  ------------------
  |  |  |  |  196|  60.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (196:23): [True: 2.29k, False: 12.9k]
  |  |  |  |  |  Branch (196:24): [True: 15.2k, False: 0]
  |  |  |  |  |  Branch (196:24): [True: 15.2k, False: 0]
  |  |  |  |  |  Branch (196:33): [True: 2.29k, False: 0]
  |  |  |  |  |  Branch (196:33): [True: 2.29k, False: 0]
  |  |  |  |  |  Branch (196:41): [True: 12.9k, False: 0]
  |  |  |  |  |  Branch (196:41): [True: 12.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:5): [True: 5.16k, False: 10.0k]
  |  |  ------------------
  |  |   63|  30.5k|)
  ------------------
  496|  30.5k|                                        (pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pMv[LIST_0] : pCurDqLayer->pMv[LIST_0]), iMbXy, iNeighMb, *pB8x8Idx,
  497|  30.5k|                                        *pBnIdx);
  498|  30.5k|        }
  499|  55.3k|        pBnIdx++;
  500|  55.3k|      }
  501|  27.6k|      pB8x8Idx += 4;
  502|  27.6k|    }
  503|  5.02M|  } else if (pCurDqLayer->pTransformSize8x8Flag[iNeighMb]) {
  ------------------
  |  Branch (503:14): [True: 9.08k, False: 5.01M]
  ------------------
  504|  27.2k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (504:17): [True: 18.1k, False: 9.08k]
  ------------------
  505|  18.1k|      uint8_t uiNzc = 0;
  506|  79.2k|      for (j = 0; uiNzc == 0 && j < 4; j++) {
  ------------------
  |  Branch (506:19): [True: 75.3k, False: 3.93k]
  |  Branch (506:33): [True: 61.0k, False: 14.2k]
  ------------------
  507|  61.0k|        uiNzc |= GetPNzc (pCurDqLayer, iNeighMb)[* (pBn8x8Idx + j)];
  508|  61.0k|      }
  509|  54.4k|      for (j = 0; j < 2; j++) {
  ------------------
  |  Branch (509:19): [True: 36.3k, False: 18.1k]
  ------------------
  510|  36.3k|        if (uiNzc | GetPNzc (pCurDqLayer, iMbXy)[*pBIdx]) {
  ------------------
  |  Branch (510:13): [True: 8.08k, False: 28.2k]
  ------------------
  511|  8.08k|          pBS[j + (i << 1)] = 2;
  512|  28.2k|        } else {
  513|  28.2k|          PPicture ref0, ref1;
  514|  28.2k|          ref0 = (iRefIdx[iMbXy][*pBIdx] > REF_NOT_IN_LIST) ? pFilter->pRefPics[LIST_0][iRefIdx[iMbXy][*pBIdx]] : NULL;
  ------------------
  |  |   42|  28.2k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (514:18): [True: 28.2k, False: 0]
  ------------------
  515|  28.2k|          ref1 = (iRefIdx[iNeighMb][*pBn8x8Idx] > REF_NOT_IN_LIST) ? pFilter->pRefPics[LIST_0][iRefIdx[iNeighMb][*pBn8x8Idx]] :
  ------------------
  |  |   42|  28.2k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (515:18): [True: 27.9k, False: 258]
  ------------------
  516|  28.2k|                 NULL;
  517|  28.2k|          pBS[j + (i << 1)] = MB_BS_MV (ref0, ref1,
  ------------------
  |  |   58|  28.2k|#define MB_BS_MV(pRefPic0, pRefPic1, iMotionVector, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |   59|  28.2k|(\
  |  |   60|  28.2k|    ( pRefPic0 != pRefPic1) ||\
  |  |  ------------------
  |  |  |  Branch (60:5): [True: 1.49k, False: 26.7k]
  |  |  ------------------
  |  |   61|  28.2k|    ( WELS_ABS( iMotionVector[iMbXy][iIndex][0] - iMotionVector[iMbBn][iNeighIndex][0] ) >= 4 ) ||\
  |  |  ------------------
  |  |  |  |  196|   107k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (196:23): [True: 9.44k, False: 17.3k]
  |  |  |  |  |  Branch (196:24): [True: 26.7k, False: 0]
  |  |  |  |  |  Branch (196:24): [True: 26.7k, False: 0]
  |  |  |  |  |  Branch (196:33): [True: 9.44k, False: 0]
  |  |  |  |  |  Branch (196:33): [True: 9.44k, False: 0]
  |  |  |  |  |  Branch (196:41): [True: 17.3k, False: 0]
  |  |  |  |  |  Branch (196:41): [True: 17.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (61:5): [True: 13.6k, False: 13.1k]
  |  |  ------------------
  |  |   62|  28.2k|    ( WELS_ABS( iMotionVector[iMbXy][iIndex][1] - iMotionVector[iMbBn][iNeighIndex][1] ) >= 4 )\
  |  |  ------------------
  |  |  |  |  196|  52.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (196:23): [True: 3.02k, False: 10.0k]
  |  |  |  |  |  Branch (196:24): [True: 13.1k, False: 0]
  |  |  |  |  |  Branch (196:24): [True: 13.1k, False: 0]
  |  |  |  |  |  Branch (196:33): [True: 3.02k, False: 0]
  |  |  |  |  |  Branch (196:33): [True: 3.02k, False: 0]
  |  |  |  |  |  Branch (196:41): [True: 10.0k, False: 0]
  |  |  |  |  |  Branch (196:41): [True: 10.0k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:5): [True: 1.42k, False: 11.7k]
  |  |  ------------------
  |  |   63|  28.2k|)
  ------------------
  518|  28.2k|                                        (pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pMv[LIST_0] : pCurDqLayer->pMv[LIST_0]), iMbXy, iNeighMb, *pBIdx,
  519|  28.2k|                                        *pBn8x8Idx);
  520|  28.2k|        }
  521|  36.3k|        pBIdx++;
  522|  36.3k|      }
  523|  18.1k|      pBn8x8Idx += 4;
  524|  18.1k|    }
  525|  5.01M|  } else {
  526|       |    // only 4x4 transform
  527|  25.0M|    for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (527:17): [True: 20.0M, False: 5.01M]
  ------------------
  528|  20.0M|      if (GetPNzc (pCurDqLayer, iMbXy)[*pBIdx] | GetPNzc (pCurDqLayer, iNeighMb)[*pBnIdx]) {
  ------------------
  |  Branch (528:11): [True: 23.8k, False: 20.0M]
  ------------------
  529|  23.8k|        pBS[i] = 2;
  530|  20.0M|      } else {
  531|  20.0M|        PPicture ref0, ref1;
  532|  20.0M|        ref0 = (iRefIdx[iMbXy][*pBIdx] > REF_NOT_IN_LIST) ? pFilter->pRefPics[LIST_0][iRefIdx[iMbXy][*pBIdx]] : NULL;
  ------------------
  |  |   42|  20.0M|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (532:16): [True: 20.0M, False: 0]
  ------------------
  533|  20.0M|        ref1 = (iRefIdx[iNeighMb][*pBnIdx] > REF_NOT_IN_LIST) ? pFilter->pRefPics[LIST_0][iRefIdx[iNeighMb][*pBnIdx]] : NULL;
  ------------------
  |  |   42|  20.0M|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (533:16): [True: 20.0M, False: 721]
  ------------------
  534|  20.0M|        pBS[i] = MB_BS_MV (ref0, ref1, (pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pMv[LIST_0] : pCurDqLayer->pMv[LIST_0]),
  ------------------
  |  |   58|  20.0M|#define MB_BS_MV(pRefPic0, pRefPic1, iMotionVector, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |   59|  20.0M|(\
  |  |   60|  20.0M|    ( pRefPic0 != pRefPic1) ||\
  |  |  ------------------
  |  |  |  Branch (60:5): [True: 28.5k, False: 19.9M]
  |  |  ------------------
  |  |   61|  20.0M|    ( WELS_ABS( iMotionVector[iMbXy][iIndex][0] - iMotionVector[iMbBn][iNeighIndex][0] ) >= 4 ) ||\
  |  |  ------------------
  |  |  |  |  196|  79.9M|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (196:23): [True: 428k, False: 19.5M]
  |  |  |  |  |  Branch (196:24): [True: 19.9M, False: 0]
  |  |  |  |  |  Branch (196:24): [True: 19.9M, False: 0]
  |  |  |  |  |  Branch (196:33): [True: 428k, False: 0]
  |  |  |  |  |  Branch (196:33): [True: 428k, False: 0]
  |  |  |  |  |  Branch (196:41): [True: 19.5M, False: 0]
  |  |  |  |  |  Branch (196:41): [True: 19.5M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (61:5): [True: 346k, False: 19.6M]
  |  |  ------------------
  |  |   62|  20.0M|    ( WELS_ABS( iMotionVector[iMbXy][iIndex][1] - iMotionVector[iMbBn][iNeighIndex][1] ) >= 4 )\
  |  |  ------------------
  |  |  |  |  196|  78.6M|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (196:23): [True: 345k, False: 19.3M]
  |  |  |  |  |  Branch (196:24): [True: 19.6M, False: 0]
  |  |  |  |  |  Branch (196:24): [True: 19.6M, False: 0]
  |  |  |  |  |  Branch (196:33): [True: 345k, False: 0]
  |  |  |  |  |  Branch (196:33): [True: 345k, False: 0]
  |  |  |  |  |  Branch (196:41): [True: 19.3M, False: 0]
  |  |  |  |  |  Branch (196:41): [True: 19.3M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:5): [True: 254k, False: 19.3M]
  |  |  ------------------
  |  |   63|  20.0M|)
  ------------------
  535|  20.0M|                           iMbXy, iNeighMb, *pBIdx, *pBnIdx);
  536|  20.0M|      }
  537|  20.0M|      pBIdx++;
  538|  20.0M|      pBnIdx++;
  539|  20.0M|    }
  540|  5.01M|  }
  541|       |
  542|  5.04M|  return uiBSx4;
  543|  5.04M|}
_ZN7WelsDec35DeblockingBSliceBsMarginalMBAvcbaseEPNS_19tagDeblockingFilterEPNS_10TagDqLayerEiii:
  545|  1.04M|    int32_t iNeighMb, int32_t iMbXy) {
  546|  1.04M|  int32_t i, j;
  547|  1.04M|  uint32_t uiBSx4;
  548|  1.04M|  uint8_t* pBS = (uint8_t*) (&uiBSx4);
  549|  1.04M|  const uint8_t* pBIdx = &g_kuiTableBIdx[iEdge][0];
  550|  1.04M|  const uint8_t* pBnIdx = &g_kuiTableBIdx[iEdge][4];
  551|  1.04M|  const uint8_t* pB8x8Idx = &g_kuiTableB8x8Idx[iEdge][0];
  552|  1.04M|  const uint8_t* pBn8x8Idx = &g_kuiTableB8x8Idx[iEdge][8];
  553|  1.04M|  PPicture ref_p0, ref_p1, ref_q0, ref_q1;
  554|  1.04M|  int8_t (*iRefIdx0)[MB_BLOCK4x4_NUM] = pCurDqLayer->pDec->pRefIndex[LIST_0];
  555|  1.04M|  int8_t (*iRefIdx1)[MB_BLOCK4x4_NUM] = pCurDqLayer->pDec->pRefIndex[LIST_1];
  556|       |
  557|  1.04M|  if (pCurDqLayer->pTransformSize8x8Flag[iMbXy] && pCurDqLayer->pTransformSize8x8Flag[iNeighMb]) {
  ------------------
  |  Branch (557:7): [True: 59.0k, False: 984k]
  |  Branch (557:52): [True: 32.0k, False: 26.9k]
  ------------------
  558|  96.1k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (558:17): [True: 64.1k, False: 32.0k]
  ------------------
  559|  64.1k|      uint8_t uiNzc = 0;
  560|   226k|      for (j = 0; uiNzc == 0 && j < 4; j++) {
  ------------------
  |  Branch (560:19): [True: 193k, False: 33.1k]
  |  Branch (560:33): [True: 162k, False: 30.9k]
  ------------------
  561|   162k|        uiNzc |= (GetPNzc (pCurDqLayer, iMbXy)[* (pB8x8Idx + j)] | GetPNzc (pCurDqLayer, iNeighMb)[* (pBn8x8Idx + j)]);
  562|   162k|      }
  563|  64.1k|      if (uiNzc) {
  ------------------
  |  Branch (563:11): [True: 33.1k, False: 30.9k]
  ------------------
  564|  33.1k|        pBS[i << 1] = pBS[1 + (i << 1)] = 2;
  565|  33.1k|      } else {
  566|  30.9k|        pBS[i << 1] = pBS[1 + (i << 1)] = 1;
  567|  30.9k|        ref_p0 = iRefIdx0[iMbXy][*pB8x8Idx] > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_0][iRefIdx0[iMbXy][*pB8x8Idx]] : NULL;
  ------------------
  |  |   42|  30.9k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (567:18): [True: 20.9k, False: 9.94k]
  ------------------
  568|  30.9k|        ref_q0 = iRefIdx0[iNeighMb][*pBn8x8Idx]  > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_0][iRefIdx0[iNeighMb][*pBn8x8Idx]] :
  ------------------
  |  |   42|  30.9k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (568:18): [True: 21.3k, False: 9.62k]
  ------------------
  569|  30.9k|                 NULL;
  570|  30.9k|        ref_p1 = iRefIdx1[iMbXy][*pB8x8Idx] > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_1][iRefIdx1[iMbXy][*pB8x8Idx]] : NULL;
  ------------------
  |  |   42|  30.9k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (570:18): [True: 22.4k, False: 8.49k]
  ------------------
  571|  30.9k|        ref_q1 = iRefIdx1[iNeighMb][*pBn8x8Idx]  > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_1][iRefIdx1[iNeighMb][*pBn8x8Idx]] :
  ------------------
  |  |   42|  30.9k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (571:18): [True: 23.0k, False: 7.83k]
  ------------------
  572|  30.9k|                 NULL;
  573|  30.9k|        if (((ref_p0 == ref_q0) && (ref_p1 == ref_q1)) || ((ref_p0 == ref_q1) && (ref_p1 == ref_q0))) {
  ------------------
  |  Branch (573:14): [True: 24.5k, False: 6.40k]
  |  Branch (573:36): [True: 22.6k, False: 1.88k]
  |  Branch (573:60): [True: 6.74k, False: 1.54k]
  |  Branch (573:82): [True: 5.20k, False: 1.54k]
  ------------------
  574|  27.8k|          int16_t (*pMv0)[MB_BLOCK4x4_NUM][MV_A] = pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pMv[LIST_0] :
  ------------------
  |  Branch (574:52): [True: 27.8k, False: 0]
  ------------------
  575|  27.8k|              pCurDqLayer->pMv[LIST_0];
  576|  27.8k|          int16_t (*pMv1)[MB_BLOCK4x4_NUM][MV_A] = pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pMv[LIST_1] :
  ------------------
  |  Branch (576:52): [True: 27.8k, False: 0]
  ------------------
  577|  27.8k|              pCurDqLayer->pMv[LIST_1];
  578|  27.8k|          pBS[i << 1] = pBS[1 + (i << 1)] = ON_MB_BS (ref_p0, ref_q0, ref_p1, ref_q1, pMv0, pMv1, iMbXy, iNeighMb, *pB8x8Idx,
  ------------------
  |  |   79|  27.8k|#define ON_MB_BS(ref_p0, ref_q0, ref_p1, ref_q1, mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |   80|  27.8k|(\
  |  |   81|  27.8k|  (ref_p0 != ref_p1) ? \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 17.7k, False: 10.0k]
  |  |  ------------------
  |  |   82|  27.8k|  ((ref_p0 == ref_q0) ? \
  |  |  ------------------
  |  |  |  Branch (82:4): [True: 12.5k, False: 5.20k]
  |  |  ------------------
  |  |   83|  17.7k|  (ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) : \
  |  |  ------------------
  |  |  |  |   65|  25.1k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  25.1k|(\
  |  |  |  |   67|  25.1k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  12.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.21k, False: 11.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.69k, False: 10.8k]
  |  |  |  |  ------------------
  |  |  |  |   68|  25.1k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  10.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 643, False: 10.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 985, False: 9.88k]
  |  |  |  |  ------------------
  |  |  |  |   69|  25.1k|)
  |  |  ------------------
  |  |                 (ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) : \
  |  |  ------------------
  |  |  |  |   65|  9.88k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  9.88k|(\
  |  |  |  |   67|  9.88k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  9.88k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.40k, False: 7.48k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 2.46k, False: 7.42k]
  |  |  |  |  ------------------
  |  |  |  |   68|  9.88k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  7.42k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.06k, False: 6.35k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 1.04k, False: 6.37k]
  |  |  |  |  ------------------
  |  |  |  |   69|  9.88k|)
  |  |  ------------------
  |  |   84|  17.7k|  (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) : \
  |  |  ------------------
  |  |  |  |   65|  10.4k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  10.4k|(\
  |  |  |  |   67|  10.4k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  5.20k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.43k, False: 3.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.65k, False: 3.54k]
  |  |  |  |  ------------------
  |  |  |  |   68|  10.4k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  3.54k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 556, False: 2.99k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 570, False: 2.97k]
  |  |  |  |  ------------------
  |  |  |  |   69|  10.4k|)
  |  |  ------------------
  |  |                 (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) : \
  |  |  ------------------
  |  |  |  |   65|  2.97k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  2.97k|(\
  |  |  |  |   67|  2.97k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  2.97k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.58k, False: 1.39k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 597, False: 2.37k]
  |  |  |  |  ------------------
  |  |  |  |   68|  2.97k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  2.37k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 618, False: 1.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 339, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |   69|  2.97k|)
  |  |  ------------------
  |  |   85|  27.8k|  ((ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) && \
  |  |  ------------------
  |  |  |  |   65|  20.1k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  20.1k|(\
  |  |  |  |   67|  20.1k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  10.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 833, False: 9.23k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 971, False: 9.09k]
  |  |  |  |  ------------------
  |  |  |  |   68|  20.1k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  9.09k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.54k, False: 7.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 847, False: 8.25k]
  |  |  |  |  ------------------
  |  |  |  |   69|  20.1k|)
  |  |  ------------------
  |  |                 ((ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) && \
  |  |  ------------------
  |  |  |  |   65|  8.25k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  8.25k|(\
  |  |  |  |   67|  8.25k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  8.25k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.53k, False: 6.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 2.11k, False: 6.13k]
  |  |  |  |  ------------------
  |  |  |  |   68|  8.25k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  6.13k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.57k, False: 4.56k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 1.67k, False: 4.45k]
  |  |  |  |  ------------------
  |  |  |  |   69|  8.25k|)
  |  |  ------------------
  |  |   86|  10.0k|  (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) \
  |  |  ------------------
  |  |  |  |   65|  11.2k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  11.2k|(\
  |  |  |  |   67|  11.2k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  5.61k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.77k, False: 3.84k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 2.17k, False: 3.43k]
  |  |  |  |  ------------------
  |  |  |  |   68|  11.2k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  3.43k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.36k, False: 2.07k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 1.59k, False: 1.84k]
  |  |  |  |  ------------------
  |  |  |  |   69|  11.2k|)
  |  |  ------------------
  |  |                 (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) \
  |  |  ------------------
  |  |  |  |   65|  1.84k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  1.84k|(\
  |  |  |  |   67|  1.84k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  1.84k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 571, False: 1.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.07k, False: 765]
  |  |  |  |  ------------------
  |  |  |  |   68|  1.84k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    765|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 336, False: 429]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 741, False: 24]
  |  |  |  |  ------------------
  |  |  |  |   69|  1.84k|)
  |  |  ------------------
  |  |   87|  27.8k|)
  ------------------
  579|  27.8k|                                            *pBn8x8Idx);
  580|  27.8k|        }
  581|  30.9k|      }
  582|  64.1k|      pB8x8Idx += 4;
  583|  64.1k|      pBn8x8Idx += 4;
  584|  64.1k|    }
  585|  1.01M|  } else if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (585:14): [True: 26.9k, False: 984k]
  ------------------
  586|  80.8k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (586:17): [True: 53.9k, False: 26.9k]
  ------------------
  587|  53.9k|      uint8_t uiNzc = 0;
  588|   228k|      for (j = 0; uiNzc == 0 && j < 4; j++) {
  ------------------
  |  Branch (588:19): [True: 209k, False: 19.0k]
  |  Branch (588:33): [True: 174k, False: 34.9k]
  ------------------
  589|   174k|        uiNzc |= GetPNzc (pCurDqLayer, iMbXy)[* (pB8x8Idx + j)];
  590|   174k|      }
  591|   161k|      for (j = 0; j < 2; j++) {
  ------------------
  |  Branch (591:19): [True: 107k, False: 53.9k]
  ------------------
  592|   107k|        if (uiNzc | GetPNzc (pCurDqLayer, iNeighMb)[*pBnIdx]) {
  ------------------
  |  Branch (592:13): [True: 38.4k, False: 69.3k]
  ------------------
  593|  38.4k|          pBS[j + (i << 1)] = 2;
  594|  69.3k|        } else {
  595|  69.3k|          pBS[j + (i << 1)] = 1;
  596|  69.3k|          ref_p0 = iRefIdx0[iMbXy][*pB8x8Idx] > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_0][iRefIdx0[iMbXy][*pB8x8Idx]] : NULL;
  ------------------
  |  |   42|  69.3k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (596:20): [True: 57.0k, False: 12.3k]
  ------------------
  597|  69.3k|          ref_q0 = iRefIdx0[iNeighMb][*pBnIdx]  > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_0][iRefIdx0[iNeighMb][*pBnIdx]] :
  ------------------
  |  |   42|  69.3k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (597:20): [True: 57.4k, False: 11.8k]
  ------------------
  598|  69.3k|                   NULL;
  599|  69.3k|          ref_p1 = iRefIdx1[iMbXy][*pB8x8Idx] > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_1][iRefIdx1[iMbXy][*pB8x8Idx]] : NULL;
  ------------------
  |  |   42|  69.3k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (599:20): [True: 50.6k, False: 18.7k]
  ------------------
  600|  69.3k|          ref_q1 = iRefIdx1[iNeighMb][*pBnIdx]  > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_1][iRefIdx1[iNeighMb][*pBnIdx]] :
  ------------------
  |  |   42|  69.3k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (600:20): [True: 58.7k, False: 10.6k]
  ------------------
  601|  69.3k|                   NULL;
  602|  69.3k|          if (((ref_p0 == ref_q0) && (ref_p1 == ref_q1)) || ((ref_p0 == ref_q1) && (ref_p1 == ref_q0))) {
  ------------------
  |  Branch (602:16): [True: 54.0k, False: 15.3k]
  |  Branch (602:38): [True: 42.7k, False: 11.2k]
  |  Branch (602:62): [True: 17.9k, False: 8.60k]
  |  Branch (602:84): [True: 5.75k, False: 12.2k]
  ------------------
  603|  48.5k|            int16_t (*pMv0)[MB_BLOCK4x4_NUM][MV_A] = pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pMv[LIST_0] :
  ------------------
  |  Branch (603:54): [True: 48.5k, False: 0]
  ------------------
  604|  48.5k|                pCurDqLayer->pMv[LIST_0];
  605|  48.5k|            int16_t (*pMv1)[MB_BLOCK4x4_NUM][MV_A] = pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pMv[LIST_1] :
  ------------------
  |  Branch (605:54): [True: 48.5k, False: 0]
  ------------------
  606|  48.5k|                pCurDqLayer->pMv[LIST_1];
  607|  48.5k|            pBS[j + (i << 1)] = ON_MB_BS (ref_p0, ref_q0, ref_p1, ref_q1, pMv0, pMv1, iMbXy, iNeighMb, *pB8x8Idx, *pBnIdx);
  ------------------
  |  |   79|  48.5k|#define ON_MB_BS(ref_p0, ref_q0, ref_p1, ref_q1, mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |   80|  48.5k|(\
  |  |   81|  48.5k|  (ref_p0 != ref_p1) ? \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 16.4k, False: 32.1k]
  |  |  ------------------
  |  |   82|  48.5k|  ((ref_p0 == ref_q0) ? \
  |  |  ------------------
  |  |  |  Branch (82:4): [True: 10.6k, False: 5.75k]
  |  |  ------------------
  |  |   83|  16.4k|  (ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) : \
  |  |  ------------------
  |  |  |  |   65|  21.3k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  21.3k|(\
  |  |  |  |   67|  21.3k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  10.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.01k, False: 8.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.54k, False: 9.13k]
  |  |  |  |  ------------------
  |  |  |  |   68|  21.3k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  9.13k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 512, False: 8.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 1.17k, False: 7.95k]
  |  |  |  |  ------------------
  |  |  |  |   69|  21.3k|)
  |  |  ------------------
  |  |                 (ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) : \
  |  |  ------------------
  |  |  |  |   65|  7.95k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  7.95k|(\
  |  |  |  |   67|  7.95k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  7.95k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.23k, False: 6.72k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 915, False: 7.04k]
  |  |  |  |  ------------------
  |  |  |  |   68|  7.95k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  7.04k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 754, False: 6.29k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 543, False: 6.50k]
  |  |  |  |  ------------------
  |  |  |  |   69|  7.95k|)
  |  |  ------------------
  |  |   84|  16.4k|  (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) : \
  |  |  ------------------
  |  |  |  |   65|  11.5k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  11.5k|(\
  |  |  |  |   67|  11.5k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  5.75k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 598, False: 5.16k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.60k, False: 4.15k]
  |  |  |  |  ------------------
  |  |  |  |   68|  11.5k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  4.15k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 571, False: 3.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 1.10k, False: 3.04k]
  |  |  |  |  ------------------
  |  |  |  |   69|  11.5k|)
  |  |  ------------------
  |  |                 (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) : \
  |  |  ------------------
  |  |  |  |   65|  3.04k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  3.04k|(\
  |  |  |  |   67|  3.04k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  3.04k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 892, False: 2.15k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 869, False: 2.17k]
  |  |  |  |  ------------------
  |  |  |  |   68|  3.04k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  2.17k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 548, False: 1.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 255, False: 1.92k]
  |  |  |  |  ------------------
  |  |  |  |   69|  3.04k|)
  |  |  ------------------
  |  |   85|  48.5k|  ((ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) && \
  |  |  ------------------
  |  |  |  |   65|  64.2k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  64.2k|(\
  |  |  |  |   67|  64.2k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  32.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.45k, False: 29.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.48k, False: 30.6k]
  |  |  |  |  ------------------
  |  |  |  |   68|  64.2k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  30.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 4.57k, False: 26.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 3.07k, False: 27.5k]
  |  |  |  |  ------------------
  |  |  |  |   69|  64.2k|)
  |  |  ------------------
  |  |                 ((ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) && \
  |  |  ------------------
  |  |  |  |   65|  27.5k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  27.5k|(\
  |  |  |  |   67|  27.5k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  27.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 964, False: 26.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.18k, False: 26.3k]
  |  |  |  |  ------------------
  |  |  |  |   68|  27.5k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  26.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 592, False: 25.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 1.05k, False: 25.3k]
  |  |  |  |  ------------------
  |  |  |  |   69|  27.5k|)
  |  |  ------------------
  |  |   86|  32.1k|  (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) \
  |  |  ------------------
  |  |  |  |   65|  13.5k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  13.5k|(\
  |  |  |  |   67|  13.5k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  6.79k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.20k, False: 5.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.44k, False: 5.35k]
  |  |  |  |  ------------------
  |  |  |  |   68|  13.5k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  5.35k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.76k, False: 2.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 2.85k, False: 2.49k]
  |  |  |  |  ------------------
  |  |  |  |   69|  13.5k|)
  |  |  ------------------
  |  |                 (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) \
  |  |  ------------------
  |  |  |  |   65|  2.49k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  2.49k|(\
  |  |  |  |   67|  2.49k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  2.49k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 707, False: 1.78k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.06k, False: 1.43k]
  |  |  |  |  ------------------
  |  |  |  |   68|  2.49k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  1.43k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 488, False: 944]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 1.33k, False: 94]
  |  |  |  |  ------------------
  |  |  |  |   69|  2.49k|)
  |  |  ------------------
  |  |   87|  48.5k|)
  ------------------
  608|  48.5k|          }
  609|  69.3k|        }
  610|   107k|        pBnIdx++;
  611|   107k|      }
  612|  53.9k|      pB8x8Idx += 4;
  613|  53.9k|    }
  614|   984k|  } else if (pCurDqLayer->pTransformSize8x8Flag[iNeighMb]) {
  ------------------
  |  Branch (614:14): [True: 24.1k, False: 960k]
  ------------------
  615|  72.3k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (615:17): [True: 48.2k, False: 24.1k]
  ------------------
  616|  48.2k|      uint8_t uiNzc = 0;
  617|   214k|      for (j = 0; uiNzc == 0 && j < 4; j++) {
  ------------------
  |  Branch (617:19): [True: 204k, False: 10.7k]
  |  Branch (617:33): [True: 166k, False: 37.5k]
  ------------------
  618|   166k|        uiNzc |= GetPNzc (pCurDqLayer, iNeighMb)[* (pBn8x8Idx + j)];
  619|   166k|      }
  620|   144k|      for (j = 0; j < 2; j++) {
  ------------------
  |  Branch (620:19): [True: 96.4k, False: 48.2k]
  ------------------
  621|  96.4k|        if (uiNzc | GetPNzc (pCurDqLayer, iMbXy)[*pBIdx]) {
  ------------------
  |  Branch (621:13): [True: 21.9k, False: 74.5k]
  ------------------
  622|  21.9k|          pBS[j + (i << 1)] = 2;
  623|  74.5k|        } else {
  624|  74.5k|          pBS[j + (i << 1)] = 1;
  625|  74.5k|          ref_p0 = iRefIdx0[iMbXy][*pBIdx] > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_0][iRefIdx0[iMbXy][*pBIdx]] : NULL;
  ------------------
  |  |   42|  74.5k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (625:20): [True: 61.6k, False: 12.9k]
  ------------------
  626|  74.5k|          ref_q0 = iRefIdx0[iNeighMb][*pBn8x8Idx]  > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_0][iRefIdx0[iNeighMb][*pBn8x8Idx]] :
  ------------------
  |  |   42|  74.5k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (626:20): [True: 58.7k, False: 15.7k]
  ------------------
  627|  74.5k|                   NULL;
  628|  74.5k|          ref_p1 = iRefIdx1[iMbXy][*pBIdx] > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_1][iRefIdx1[iMbXy][*pBIdx]] : NULL;
  ------------------
  |  |   42|  74.5k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (628:20): [True: 59.6k, False: 14.9k]
  ------------------
  629|  74.5k|          ref_q1 = iRefIdx1[iNeighMb][*pBn8x8Idx]  > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_1][iRefIdx1[iNeighMb][*pBn8x8Idx]] :
  ------------------
  |  |   42|  74.5k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (629:20): [True: 58.8k, False: 15.7k]
  ------------------
  630|  74.5k|                   NULL;
  631|  74.5k|          if (((ref_p0 == ref_q0) && (ref_p1 == ref_q1)) || ((ref_p0 == ref_q1) && (ref_p1 == ref_q0))) {
  ------------------
  |  Branch (631:16): [True: 57.4k, False: 17.1k]
  |  Branch (631:38): [True: 46.7k, False: 10.6k]
  |  Branch (631:62): [True: 18.6k, False: 9.08k]
  |  Branch (631:84): [True: 6.70k, False: 11.9k]
  ------------------
  632|  53.4k|            int16_t (*pMv0)[MB_BLOCK4x4_NUM][MV_A] = pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pMv[LIST_0] :
  ------------------
  |  Branch (632:54): [True: 53.4k, False: 0]
  ------------------
  633|  53.4k|                pCurDqLayer->pMv[LIST_0];
  634|  53.4k|            int16_t (*pMv1)[MB_BLOCK4x4_NUM][MV_A] = pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pMv[LIST_1] :
  ------------------
  |  Branch (634:54): [True: 53.4k, False: 0]
  ------------------
  635|  53.4k|                pCurDqLayer->pMv[LIST_1];
  636|  53.4k|            pBS[j + (i << 1)] = ON_MB_BS (ref_p0, ref_q0, ref_p1, ref_q1, pMv0, pMv1, iMbXy, iNeighMb, *pBIdx, *pBn8x8Idx);
  ------------------
  |  |   79|  53.4k|#define ON_MB_BS(ref_p0, ref_q0, ref_p1, ref_q1, mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |   80|  53.4k|(\
  |  |   81|  53.4k|  (ref_p0 != ref_p1) ? \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 19.3k, False: 34.1k]
  |  |  ------------------
  |  |   82|  53.4k|  ((ref_p0 == ref_q0) ? \
  |  |  ------------------
  |  |  |  Branch (82:4): [True: 12.6k, False: 6.70k]
  |  |  ------------------
  |  |   83|  19.3k|  (ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) : \
  |  |  ------------------
  |  |  |  |   65|  25.2k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  25.2k|(\
  |  |  |  |   67|  25.2k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  12.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.96k, False: 9.65k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.14k, False: 11.4k]
  |  |  |  |  ------------------
  |  |  |  |   68|  25.2k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  11.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 792, False: 10.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 2.34k, False: 9.13k]
  |  |  |  |  ------------------
  |  |  |  |   69|  25.2k|)
  |  |  ------------------
  |  |                 (ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) : \
  |  |  ------------------
  |  |  |  |   65|  9.13k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  9.13k|(\
  |  |  |  |   67|  9.13k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  9.13k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.50k, False: 7.63k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.06k, False: 8.07k]
  |  |  |  |  ------------------
  |  |  |  |   68|  9.13k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  8.07k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 515, False: 7.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 601, False: 7.47k]
  |  |  |  |  ------------------
  |  |  |  |   69|  9.13k|)
  |  |  ------------------
  |  |   84|  19.3k|  (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) : \
  |  |  ------------------
  |  |  |  |   65|  13.4k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  13.4k|(\
  |  |  |  |   67|  13.4k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  6.70k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.02k, False: 5.68k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.10k, False: 5.60k]
  |  |  |  |  ------------------
  |  |  |  |   68|  13.4k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  5.60k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 577, False: 5.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 1.03k, False: 4.57k]
  |  |  |  |  ------------------
  |  |  |  |   69|  13.4k|)
  |  |  ------------------
  |  |                 (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) : \
  |  |  ------------------
  |  |  |  |   65|  4.57k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  4.57k|(\
  |  |  |  |   67|  4.57k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  4.57k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.72k, False: 2.84k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.10k, False: 3.46k]
  |  |  |  |  ------------------
  |  |  |  |   68|  4.57k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  3.46k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 924, False: 2.53k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 1.42k, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |   69|  4.57k|)
  |  |  ------------------
  |  |   85|  53.4k|  ((ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) && \
  |  |  ------------------
  |  |  |  |   65|  68.3k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  68.3k|(\
  |  |  |  |   67|  68.3k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  34.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 4.40k, False: 29.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.50k, False: 32.6k]
  |  |  |  |  ------------------
  |  |  |  |   68|  68.3k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  32.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 3.66k, False: 29.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 4.37k, False: 28.2k]
  |  |  |  |  ------------------
  |  |  |  |   69|  68.3k|)
  |  |  ------------------
  |  |                 ((ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) && \
  |  |  ------------------
  |  |  |  |   65|  28.2k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  28.2k|(\
  |  |  |  |   67|  28.2k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  28.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.64k, False: 26.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.73k, False: 26.5k]
  |  |  |  |  ------------------
  |  |  |  |   68|  28.2k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  26.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 3.43k, False: 23.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 2.64k, False: 23.9k]
  |  |  |  |  ------------------
  |  |  |  |   69|  28.2k|)
  |  |  ------------------
  |  |   86|  34.1k|  (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) \
  |  |  ------------------
  |  |  |  |   65|  20.5k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  20.5k|(\
  |  |  |  |   67|  20.5k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  10.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 3.39k, False: 6.85k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.97k, False: 8.28k]
  |  |  |  |  ------------------
  |  |  |  |   68|  20.5k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  8.28k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.77k, False: 6.50k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 2.62k, False: 5.65k]
  |  |  |  |  ------------------
  |  |  |  |   69|  20.5k|)
  |  |  ------------------
  |  |                 (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) \
  |  |  ------------------
  |  |  |  |   65|  5.65k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  5.65k|(\
  |  |  |  |   67|  5.65k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  5.65k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.55k, False: 3.10k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 1.06k, False: 4.59k]
  |  |  |  |  ------------------
  |  |  |  |   68|  5.65k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  4.59k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.17k, False: 2.41k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 4.37k, False: 218]
  |  |  |  |  ------------------
  |  |  |  |   69|  5.65k|)
  |  |  ------------------
  |  |   87|  53.4k|)
  ------------------
  637|  53.4k|          }
  638|  74.5k|        }
  639|  96.4k|        pBIdx++;
  640|  96.4k|      }
  641|  48.2k|      pBn8x8Idx += 4;
  642|  48.2k|    }
  643|   960k|  } else {
  644|       |    // only 4x4 transform
  645|  4.80M|    for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (645:17): [True: 3.84M, False: 960k]
  ------------------
  646|  3.84M|      if (GetPNzc (pCurDqLayer, iMbXy)[*pBIdx] | GetPNzc (pCurDqLayer, iNeighMb)[*pBnIdx]) {
  ------------------
  |  Branch (646:11): [True: 14.6k, False: 3.82M]
  ------------------
  647|  14.6k|        pBS[i] = 2;
  648|  3.82M|      } else {
  649|  3.82M|        pBS[i] = 1;
  650|  3.82M|        ref_p0 = iRefIdx0[iMbXy][*pBIdx] > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_0][iRefIdx0[iMbXy][*pBIdx]] : NULL;
  ------------------
  |  |   42|  3.82M|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (650:18): [True: 3.49M, False: 334k]
  ------------------
  651|  3.82M|        ref_q0 = iRefIdx0[iNeighMb][*pBnIdx]  > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_0][iRefIdx0[iNeighMb][*pBnIdx]] :
  ------------------
  |  |   42|  3.82M|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (651:18): [True: 3.49M, False: 327k]
  ------------------
  652|  3.82M|                 NULL;
  653|  3.82M|        ref_p1 = iRefIdx1[iMbXy][*pBIdx] > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_1][iRefIdx1[iMbXy][*pBIdx]] : NULL;
  ------------------
  |  |   42|  3.82M|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (653:18): [True: 3.52M, False: 297k]
  ------------------
  654|  3.82M|        ref_q1 = iRefIdx1[iNeighMb][*pBnIdx]  > REF_NOT_IN_LIST ? pFilter->pRefPics[LIST_1][iRefIdx1[iNeighMb][*pBnIdx]] :
  ------------------
  |  |   42|  3.82M|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (654:18): [True: 3.52M, False: 299k]
  ------------------
  655|  3.82M|                 NULL;
  656|  3.82M|        if (((ref_p0 == ref_q0) && (ref_p1 == ref_q1)) || ((ref_p0 == ref_q1) && (ref_p1 == ref_q0))) {
  ------------------
  |  Branch (656:14): [True: 3.58M, False: 239k]
  |  Branch (656:36): [True: 3.42M, False: 160k]
  |  Branch (656:60): [True: 193k, False: 206k]
  |  Branch (656:82): [True: 41.9k, False: 151k]
  ------------------
  657|  3.46M|          int16_t (*pMv0)[MB_BLOCK4x4_NUM][MV_A] = pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pMv[LIST_0] :
  ------------------
  |  Branch (657:52): [True: 3.46M, False: 0]
  ------------------
  658|  3.46M|              pCurDqLayer->pMv[LIST_0];
  659|  3.46M|          int16_t (*pMv1)[MB_BLOCK4x4_NUM][MV_A] = pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pMv[LIST_1] :
  ------------------
  |  Branch (659:52): [True: 3.46M, False: 0]
  ------------------
  660|  3.46M|              pCurDqLayer->pMv[LIST_1];
  661|  3.46M|          pBS[i] = ON_MB_BS (ref_p0, ref_q0, ref_p1, ref_q1, pMv0, pMv1, iMbXy, iNeighMb, *pBIdx, *pBnIdx);
  ------------------
  |  |   79|  3.46M|#define ON_MB_BS(ref_p0, ref_q0, ref_p1, ref_q1, mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |   80|  3.46M|(\
  |  |   81|  3.46M|  (ref_p0 != ref_p1) ? \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 702k, False: 2.76M]
  |  |  ------------------
  |  |   82|  3.46M|  ((ref_p0 == ref_q0) ? \
  |  |  ------------------
  |  |  |  Branch (82:4): [True: 660k, False: 41.9k]
  |  |  ------------------
  |  |   83|   702k|  (ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) : \
  |  |  ------------------
  |  |  |  |   65|  1.32M|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  1.32M|(\
  |  |  |  |   67|  1.32M|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|   660k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 19.4k, False: 641k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 14.3k, False: 646k]
  |  |  |  |  ------------------
  |  |  |  |   68|  1.32M|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|   646k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 20.1k, False: 626k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 15.6k, False: 630k]
  |  |  |  |  ------------------
  |  |  |  |   69|  1.32M|)
  |  |  ------------------
  |  |                 (ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) : \
  |  |  ------------------
  |  |  |  |   65|   630k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|   630k|(\
  |  |  |  |   67|   630k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|   630k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 18.1k, False: 612k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 10.2k, False: 620k]
  |  |  |  |  ------------------
  |  |  |  |   68|   630k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|   620k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 11.7k, False: 608k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 5.90k, False: 614k]
  |  |  |  |  ------------------
  |  |  |  |   69|   630k|)
  |  |  ------------------
  |  |   84|   702k|  (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) : \
  |  |  ------------------
  |  |  |  |   65|  83.9k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  83.9k|(\
  |  |  |  |   67|  83.9k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  41.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 6.28k, False: 35.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 6.22k, False: 35.7k]
  |  |  |  |  ------------------
  |  |  |  |   68|  83.9k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  35.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 4.28k, False: 31.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 5.31k, False: 30.4k]
  |  |  |  |  ------------------
  |  |  |  |   69|  83.9k|)
  |  |  ------------------
  |  |                 (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) : \
  |  |  ------------------
  |  |  |  |   65|  30.4k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  30.4k|(\
  |  |  |  |   67|  30.4k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  30.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 4.96k, False: 25.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 4.58k, False: 25.8k]
  |  |  |  |  ------------------
  |  |  |  |   68|  30.4k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  25.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 5.19k, False: 20.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 2.95k, False: 22.9k]
  |  |  |  |  ------------------
  |  |  |  |   69|  30.4k|)
  |  |  ------------------
  |  |   85|  3.46M|  ((ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) && \
  |  |  ------------------
  |  |  |  |   65|  5.53M|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  5.53M|(\
  |  |  |  |   67|  5.53M|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  2.76M|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 56.8k, False: 2.70M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 44.1k, False: 2.72M]
  |  |  |  |  ------------------
  |  |  |  |   68|  5.53M|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  2.72M|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 57.8k, False: 2.66M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 43.6k, False: 2.67M]
  |  |  |  |  ------------------
  |  |  |  |   69|  5.53M|)
  |  |  ------------------
  |  |                 ((ON_MB_BS_MV_DIFF (mv0, mv0, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv1, iMbXy, iMbBn, iIndex, iNeighIndex)) && \
  |  |  ------------------
  |  |  |  |   65|  2.67M|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  2.67M|(\
  |  |  |  |   67|  2.67M|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  2.67M|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 19.9k, False: 2.65M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 12.8k, False: 2.66M]
  |  |  |  |  ------------------
  |  |  |  |   68|  2.67M|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  2.66M|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 11.5k, False: 2.65M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 10.0k, False: 2.65M]
  |  |  |  |  ------------------
  |  |  |  |   69|  2.67M|)
  |  |  ------------------
  |  |   86|  2.76M|  (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) \
  |  |  ------------------
  |  |  |  |   65|   221k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|   221k|(\
  |  |  |  |   67|   221k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|   110k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 35.1k, False: 75.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 41.0k, False: 69.6k]
  |  |  |  |  ------------------
  |  |  |  |   68|   221k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 28.3k, False: 41.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 37.3k, False: 32.2k]
  |  |  |  |  ------------------
  |  |  |  |   69|   221k|)
  |  |  ------------------
  |  |                 (ON_MB_BS_MV_DIFF (mv0, mv1, iMbXy, iMbBn, iIndex, iNeighIndex) || ON_MB_BS_MV_DIFF (mv1, mv0, iMbXy, iMbBn, iIndex, iNeighIndex))) \
  |  |  ------------------
  |  |  |  |   65|  32.2k|#define ON_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iMbBn, iIndex, iNeighIndex) \
  |  |  |  |   66|  32.2k|(\
  |  |  |  |   67|  32.2k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbBn][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  32.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 10.5k, False: 21.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (67:6): [True: 15.2k, False: 17.0k]
  |  |  |  |  ------------------
  |  |  |  |   68|  32.2k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbBn][iNeighIndex][1] ) >= 4 ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  17.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 7.86k, False: 9.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:5): [True: 15.9k, False: 1.04k]
  |  |  |  |  ------------------
  |  |  |  |   69|  32.2k|)
  |  |  ------------------
  |  |   87|  3.46M|)
  ------------------
  662|  3.46M|        }
  663|  3.82M|      }
  664|  3.84M|      pBIdx++;
  665|  3.84M|      pBnIdx++;
  666|  3.84M|    }
  667|   960k|  }
  668|       |
  669|  1.04M|  return uiBSx4;
  670|  1.04M|}
_ZN7WelsDec31DeblockingAvailableNoInterlayerEPNS_10TagDqLayerEi:
  671|  4.54M|int32_t DeblockingAvailableNoInterlayer (PDqLayer pCurDqLayer, int32_t iFilterIdc) {
  672|  4.54M|  int32_t iMbY = pCurDqLayer->iMbY;
  673|  4.54M|  int32_t iMbX = pCurDqLayer->iMbX;
  674|  4.54M|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  675|  4.54M|  bool bLeftFlag = false;
  676|  4.54M|  bool bTopFlag  = false;
  677|       |
  678|  4.54M|  if (2 == iFilterIdc) {
  ------------------
  |  Branch (678:7): [True: 421k, False: 4.12M]
  ------------------
  679|   421k|    bLeftFlag = (iMbX > 0) && (pCurDqLayer->pSliceIdc[iMbXy] == pCurDqLayer->pSliceIdc[iMbXy - 1]);
  ------------------
  |  Branch (679:17): [True: 410k, False: 10.8k]
  |  Branch (679:31): [True: 352k, False: 57.7k]
  ------------------
  680|   421k|    bTopFlag  = (iMbY > 0) && (pCurDqLayer->pSliceIdc[iMbXy] == pCurDqLayer->pSliceIdc[iMbXy - pCurDqLayer->iMbWidth]);
  ------------------
  |  Branch (680:17): [True: 402k, False: 18.2k]
  |  Branch (680:31): [True: 301k, False: 101k]
  ------------------
  681|  4.12M|  } else { //if ( 0 == iFilterIdc )
  682|  4.12M|    bLeftFlag = (iMbX > 0);
  683|  4.12M|    bTopFlag  = (iMbY > 0);
  684|  4.12M|  }
  685|  4.54M|  return (bLeftFlag << LEFT_FLAG_BIT) | (bTopFlag << TOP_FLAG_BIT);
  ------------------
  |  |   48|  4.54M|#define LEFT_FLAG_BIT 0
  ------------------
                return (bLeftFlag << LEFT_FLAG_BIT) | (bTopFlag << TOP_FLAG_BIT);
  ------------------
  |  |   49|  4.54M|#define TOP_FLAG_BIT 1
  ------------------
  686|  4.54M|}
_ZN7WelsDec18FilteringEdgeLumaHEPNS_19tagDeblockingFilterEPhiS2_:
  688|   432k|void FilteringEdgeLumaH (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t iStride, uint8_t* pBS) {
  689|   432k|  int32_t iIndexA;
  690|   432k|  int32_t iAlpha;
  691|   432k|  int32_t iBeta;
  692|   432k|  ENFORCE_STACK_ALIGN_1D (int8_t, tc, 4, 16);
  ------------------
  |  |   58|   432k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   432k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
  693|       |
  694|   432k|  GET_ALPHA_BETA_FROM_QP (pFilter->iLumaQP, pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|   432k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|   432k|{\
  |  |  139|   432k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|   432k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|   432k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|   432k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|   432k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|   432k|}
  ------------------
  695|   432k|                          iBeta);
  696|       |
  697|   432k|  if (iAlpha | iBeta) {
  ------------------
  |  Branch (697:7): [True: 406k, False: 25.5k]
  ------------------
  698|   406k|    TC0_TBL_LOOKUP (tc, iIndexA, pBS, 0);
  ------------------
  |  |  207|   406k|#define TC0_TBL_LOOKUP(tc, iIndexA, pBS, bChroma) \
  |  |  208|   406k|{\
  |  |  209|   406k|  tc[0] = g_kiTc0Table(iIndexA)[pBS[0] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   406k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  210|   406k|  tc[1] = g_kiTc0Table(iIndexA)[pBS[1] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   406k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  211|   406k|  tc[2] = g_kiTc0Table(iIndexA)[pBS[2] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   406k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  212|   406k|  tc[3] = g_kiTc0Table(iIndexA)[pBS[3] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   406k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  213|   406k|}
  ------------------
  699|   406k|    pFilter->pLoopf->pfLumaDeblockingLT4Ver (pPix, iStride, iAlpha, iBeta, tc);
  700|   406k|  }
  701|   432k|  return;
  702|   432k|}
_ZN7WelsDec18FilteringEdgeLumaVEPNS_19tagDeblockingFilterEPhiS2_:
  705|   434k|void FilteringEdgeLumaV (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t iStride, uint8_t* pBS) {
  706|   434k|  int32_t  iIndexA;
  707|   434k|  int32_t  iAlpha;
  708|   434k|  int32_t  iBeta;
  709|   434k|  ENFORCE_STACK_ALIGN_1D (int8_t, tc, 4, 16);
  ------------------
  |  |   58|   434k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   434k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
  710|       |
  711|   434k|  GET_ALPHA_BETA_FROM_QP (pFilter->iLumaQP, pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|   434k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|   434k|{\
  |  |  139|   434k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|   434k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|   434k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|   434k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|   434k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|   434k|}
  ------------------
  712|   434k|                          iBeta);
  713|       |
  714|   434k|  if (iAlpha | iBeta) {
  ------------------
  |  Branch (714:7): [True: 404k, False: 30.3k]
  ------------------
  715|   404k|    TC0_TBL_LOOKUP (tc, iIndexA, pBS, 0);
  ------------------
  |  |  207|   404k|#define TC0_TBL_LOOKUP(tc, iIndexA, pBS, bChroma) \
  |  |  208|   404k|{\
  |  |  209|   404k|  tc[0] = g_kiTc0Table(iIndexA)[pBS[0] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   404k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  210|   404k|  tc[1] = g_kiTc0Table(iIndexA)[pBS[1] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   404k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  211|   404k|  tc[2] = g_kiTc0Table(iIndexA)[pBS[2] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   404k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  212|   404k|  tc[3] = g_kiTc0Table(iIndexA)[pBS[3] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   404k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  213|   404k|}
  ------------------
  716|   404k|    pFilter->pLoopf->pfLumaDeblockingLT4Hor (pPix, iStride, iAlpha, iBeta, tc);
  717|   404k|  }
  718|   434k|  return;
  719|   434k|}
_ZN7WelsDec23FilteringEdgeLumaIntraHEPNS_19tagDeblockingFilterEPhiS2_:
  722|   119k|void FilteringEdgeLumaIntraH (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t iStride, uint8_t* pBS) {
  723|   119k|  int32_t iIndexA;
  724|   119k|  int32_t iAlpha;
  725|   119k|  int32_t iBeta;
  726|       |
  727|   119k|  GET_ALPHA_BETA_FROM_QP (pFilter->iLumaQP, pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|   119k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|   119k|{\
  |  |  139|   119k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|   119k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|   119k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|   119k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|   119k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|   119k|}
  ------------------
  728|   119k|                          iBeta);
  729|       |
  730|   119k|  if (iAlpha | iBeta) {
  ------------------
  |  Branch (730:7): [True: 99.2k, False: 20.7k]
  ------------------
  731|  99.2k|    pFilter->pLoopf->pfLumaDeblockingEQ4Ver (pPix, iStride, iAlpha, iBeta);
  732|  99.2k|  }
  733|   119k|  return;
  734|   119k|}
_ZN7WelsDec23FilteringEdgeLumaIntraVEPNS_19tagDeblockingFilterEPhiS2_:
  736|   116k|void FilteringEdgeLumaIntraV (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t iStride, uint8_t* pBS) {
  737|   116k|  int32_t iIndexA;
  738|   116k|  int32_t iAlpha;
  739|   116k|  int32_t iBeta;
  740|       |
  741|   116k|  GET_ALPHA_BETA_FROM_QP (pFilter->iLumaQP, pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|   116k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|   116k|{\
  |  |  139|   116k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|   116k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|   116k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|   116k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|   116k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|   116k|}
  ------------------
  742|   116k|                          iBeta);
  743|       |
  744|   116k|  if (iAlpha | iBeta) {
  ------------------
  |  Branch (744:7): [True: 84.1k, False: 31.9k]
  ------------------
  745|  84.1k|    pFilter->pLoopf->pfLumaDeblockingEQ4Hor (pPix, iStride, iAlpha, iBeta);
  746|  84.1k|  }
  747|   116k|  return;
  748|   116k|}
_ZN7WelsDec20FilteringEdgeChromaHEPNS_19tagDeblockingFilterEPhS2_iS2_:
  750|   362k|                           uint8_t* pBS) {
  751|   362k|  int32_t iIndexA;
  752|   362k|  int32_t iAlpha;
  753|   362k|  int32_t iBeta;
  754|   362k|  ENFORCE_STACK_ALIGN_1D (int8_t, tc, 4, 16);
  ------------------
  |  |   58|   362k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   362k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
  755|   362k|  if (pFilter->iChromaQP[0] == pFilter->iChromaQP[1]) {
  ------------------
  |  Branch (755:7): [True: 159k, False: 203k]
  ------------------
  756|       |
  757|   159k|    GET_ALPHA_BETA_FROM_QP (pFilter->iChromaQP[0], pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|   159k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|   159k|{\
  |  |  139|   159k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|   159k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|   159k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|   159k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|   159k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|   159k|}
  ------------------
  758|   159k|                            iBeta);
  759|       |
  760|   159k|    if (iAlpha | iBeta) {
  ------------------
  |  Branch (760:9): [True: 144k, False: 15.1k]
  ------------------
  761|   144k|      TC0_TBL_LOOKUP (tc, iIndexA, pBS, 1);
  ------------------
  |  |  207|   144k|#define TC0_TBL_LOOKUP(tc, iIndexA, pBS, bChroma) \
  |  |  208|   144k|{\
  |  |  209|   144k|  tc[0] = g_kiTc0Table(iIndexA)[pBS[0] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   144k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  210|   144k|  tc[1] = g_kiTc0Table(iIndexA)[pBS[1] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   144k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  211|   144k|  tc[2] = g_kiTc0Table(iIndexA)[pBS[2] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   144k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  212|   144k|  tc[3] = g_kiTc0Table(iIndexA)[pBS[3] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   144k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  213|   144k|}
  ------------------
  762|   144k|      pFilter->pLoopf->pfChromaDeblockingLT4Ver (pPixCb, pPixCr, iStride, iAlpha, iBeta, tc);
  763|   144k|    }
  764|   203k|  } else {
  765|       |
  766|   610k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (766:21): [True: 407k, False: 203k]
  ------------------
  767|       |
  768|       |
  769|   407k|      GET_ALPHA_BETA_FROM_QP (pFilter->iChromaQP[i], pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|   407k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|   407k|{\
  |  |  139|   407k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|   407k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|   407k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|   407k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|   407k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|   407k|}
  ------------------
  770|   407k|                              iBeta);
  771|       |
  772|   407k|      if (iAlpha | iBeta) {
  ------------------
  |  Branch (772:11): [True: 388k, False: 18.5k]
  ------------------
  773|   388k|        uint8_t* pPixCbCr = (i == 0) ? pPixCb : pPixCr;
  ------------------
  |  Branch (773:29): [True: 193k, False: 194k]
  ------------------
  774|   388k|        TC0_TBL_LOOKUP (tc, iIndexA, pBS, 1);
  ------------------
  |  |  207|   388k|#define TC0_TBL_LOOKUP(tc, iIndexA, pBS, bChroma) \
  |  |  208|   388k|{\
  |  |  209|   388k|  tc[0] = g_kiTc0Table(iIndexA)[pBS[0] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   388k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  210|   388k|  tc[1] = g_kiTc0Table(iIndexA)[pBS[1] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   388k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  211|   388k|  tc[2] = g_kiTc0Table(iIndexA)[pBS[2] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   388k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  212|   388k|  tc[3] = g_kiTc0Table(iIndexA)[pBS[3] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   388k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  213|   388k|}
  ------------------
  775|   388k|        pFilter->pLoopf->pfChromaDeblockingLT4Ver2 (pPixCbCr, iStride, iAlpha, iBeta, tc);
  776|   388k|      }
  777|       |
  778|       |
  779|       |
  780|   407k|    }
  781|       |
  782|   203k|  }
  783|   362k|  return;
  784|   362k|}
_ZN7WelsDec20FilteringEdgeChromaVEPNS_19tagDeblockingFilterEPhS2_iS2_:
  786|   371k|                           uint8_t* pBS) {
  787|   371k|  int32_t iIndexA;
  788|   371k|  int32_t iAlpha;
  789|   371k|  int32_t iBeta;
  790|   371k|  ENFORCE_STACK_ALIGN_1D (int8_t, tc, 4, 16);
  ------------------
  |  |   58|   371k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   371k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
  791|   371k|  if (pFilter->iChromaQP[0] == pFilter->iChromaQP[1]) {
  ------------------
  |  Branch (791:7): [True: 148k, False: 223k]
  ------------------
  792|       |
  793|       |
  794|   148k|    GET_ALPHA_BETA_FROM_QP (pFilter->iChromaQP[0], pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|   148k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|   148k|{\
  |  |  139|   148k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|   148k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|   148k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|   148k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|   148k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|   148k|}
  ------------------
  795|   148k|                            iBeta);
  796|       |
  797|   148k|    if (iAlpha | iBeta) {
  ------------------
  |  Branch (797:9): [True: 130k, False: 18.0k]
  ------------------
  798|   130k|      TC0_TBL_LOOKUP (tc, iIndexA, pBS, 1);
  ------------------
  |  |  207|   130k|#define TC0_TBL_LOOKUP(tc, iIndexA, pBS, bChroma) \
  |  |  208|   130k|{\
  |  |  209|   130k|  tc[0] = g_kiTc0Table(iIndexA)[pBS[0] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   130k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  210|   130k|  tc[1] = g_kiTc0Table(iIndexA)[pBS[1] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   130k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  211|   130k|  tc[2] = g_kiTc0Table(iIndexA)[pBS[2] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   130k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  212|   130k|  tc[3] = g_kiTc0Table(iIndexA)[pBS[3] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   130k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  213|   130k|}
  ------------------
  799|   130k|      pFilter->pLoopf->pfChromaDeblockingLT4Hor (pPixCb, pPixCr, iStride, iAlpha, iBeta, tc);
  800|   130k|    }
  801|       |
  802|       |
  803|   223k|  } else {
  804|       |
  805|   671k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (805:21): [True: 447k, False: 223k]
  ------------------
  806|       |
  807|   447k|      GET_ALPHA_BETA_FROM_QP (pFilter->iChromaQP[i], pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|   447k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|   447k|{\
  |  |  139|   447k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|   447k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|   447k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|   447k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|   447k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|   447k|}
  ------------------
  808|   447k|                              iBeta);
  809|       |
  810|   447k|      if (iAlpha | iBeta) {
  ------------------
  |  Branch (810:11): [True: 425k, False: 21.8k]
  ------------------
  811|   425k|        uint8_t* pPixCbCr = (i == 0) ? pPixCb : pPixCr;
  ------------------
  |  Branch (811:29): [True: 212k, False: 213k]
  ------------------
  812|   425k|        TC0_TBL_LOOKUP (tc, iIndexA, pBS, 1);
  ------------------
  |  |  207|   425k|#define TC0_TBL_LOOKUP(tc, iIndexA, pBS, bChroma) \
  |  |  208|   425k|{\
  |  |  209|   425k|  tc[0] = g_kiTc0Table(iIndexA)[pBS[0] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   425k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  210|   425k|  tc[1] = g_kiTc0Table(iIndexA)[pBS[1] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   425k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  211|   425k|  tc[2] = g_kiTc0Table(iIndexA)[pBS[2] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   425k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  212|   425k|  tc[3] = g_kiTc0Table(iIndexA)[pBS[3] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   425k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  213|   425k|}
  ------------------
  813|   425k|        pFilter->pLoopf->pfChromaDeblockingLT4Hor2 (pPixCbCr, iStride, iAlpha, iBeta, tc);
  814|   425k|      }
  815|       |
  816|       |
  817|   447k|    }
  818|   223k|  }
  819|   371k|  return;
  820|   371k|}
_ZN7WelsDec25FilteringEdgeChromaIntraHEPNS_19tagDeblockingFilterEPhS2_iS2_:
  823|   119k|                                uint8_t* pBS) {
  824|   119k|  int32_t iIndexA;
  825|   119k|  int32_t iAlpha;
  826|   119k|  int32_t iBeta;
  827|   119k|  if (pFilter->iChromaQP[0] == pFilter->iChromaQP[1]) {
  ------------------
  |  Branch (827:7): [True: 57.8k, False: 62.0k]
  ------------------
  828|       |
  829|  57.8k|    GET_ALPHA_BETA_FROM_QP (pFilter->iChromaQP[0], pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|  57.8k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|  57.8k|{\
  |  |  139|  57.8k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|  57.8k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|  57.8k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|  57.8k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|  57.8k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|  57.8k|}
  ------------------
  830|  57.8k|                            iBeta);
  831|       |
  832|  57.8k|    if (iAlpha | iBeta) {
  ------------------
  |  Branch (832:9): [True: 52.4k, False: 5.41k]
  ------------------
  833|  52.4k|      pFilter->pLoopf->pfChromaDeblockingEQ4Ver (pPixCb, pPixCr, iStride, iAlpha, iBeta);
  834|  52.4k|    }
  835|  62.0k|  } else {
  836|       |
  837|   186k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (837:21): [True: 124k, False: 62.0k]
  ------------------
  838|       |
  839|   124k|      GET_ALPHA_BETA_FROM_QP (pFilter->iChromaQP[i], pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|   124k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|   124k|{\
  |  |  139|   124k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|   124k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|   124k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|   124k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|   124k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|   124k|}
  ------------------
  840|   124k|                              iBeta);
  841|       |
  842|   124k|      if (iAlpha | iBeta) {
  ------------------
  |  Branch (842:11): [True: 92.2k, False: 31.9k]
  ------------------
  843|  92.2k|        uint8_t* pPixCbCr = (i == 0) ? pPixCb : pPixCr;
  ------------------
  |  Branch (843:29): [True: 46.6k, False: 45.5k]
  ------------------
  844|  92.2k|        pFilter->pLoopf->pfChromaDeblockingEQ4Ver2 (pPixCbCr, iStride, iAlpha, iBeta);
  845|  92.2k|      }
  846|       |
  847|   124k|    }
  848|  62.0k|  }
  849|   119k|  return;
  850|   119k|}
_ZN7WelsDec25FilteringEdgeChromaIntraVEPNS_19tagDeblockingFilterEPhS2_iS2_:
  853|   116k|                                uint8_t* pBS) {
  854|   116k|  int32_t iIndexA;
  855|   116k|  int32_t iAlpha;
  856|   116k|  int32_t iBeta;
  857|   116k|  if (pFilter->iChromaQP[0] == pFilter->iChromaQP[1]) { // QP of cb and cr are the same
  ------------------
  |  Branch (857:7): [True: 70.6k, False: 45.4k]
  ------------------
  858|       |
  859|       |
  860|       |
  861|       |
  862|  70.6k|    GET_ALPHA_BETA_FROM_QP (pFilter->iChromaQP[0], pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|  70.6k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|  70.6k|{\
  |  |  139|  70.6k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|  70.6k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|  70.6k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|  70.6k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|  70.6k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|  70.6k|}
  ------------------
  863|  70.6k|                            iBeta);
  864|  70.6k|    if (iAlpha | iBeta) {
  ------------------
  |  Branch (864:9): [True: 63.4k, False: 7.22k]
  ------------------
  865|  63.4k|      pFilter->pLoopf->pfChromaDeblockingEQ4Hor (pPixCb, pPixCr, iStride, iAlpha, iBeta);
  866|  63.4k|    }
  867|  70.6k|  } else {
  868|       |
  869|   136k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (869:21): [True: 90.8k, False: 45.4k]
  ------------------
  870|       |
  871|       |
  872|  90.8k|      GET_ALPHA_BETA_FROM_QP (pFilter->iChromaQP[i], pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|  90.8k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|  90.8k|{\
  |  |  139|  90.8k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|  90.8k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|  90.8k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|  90.8k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|  90.8k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|  90.8k|}
  ------------------
  873|  90.8k|                              iBeta);
  874|  90.8k|      if (iAlpha | iBeta) {
  ------------------
  |  Branch (874:11): [True: 39.6k, False: 51.1k]
  ------------------
  875|  39.6k|        uint8_t* pPixCbCr = (i == 0) ? pPixCb : pPixCr;
  ------------------
  |  Branch (875:29): [True: 20.4k, False: 19.2k]
  ------------------
  876|  39.6k|        pFilter->pLoopf->pfChromaDeblockingEQ4Hor2 (pPixCbCr, iStride, iAlpha, iBeta);
  877|  39.6k|      }
  878|  90.8k|    }
  879|       |
  880|  45.4k|  }
  881|   116k|  return;
  882|   116k|}
_ZN7WelsDec19FilteringEdgeLumaHVEPNS_10TagDqLayerEPNS_19tagDeblockingFilterEi:
  974|   156k|void FilteringEdgeLumaHV (PDqLayer pCurDqLayer, PDeblockingFilter  pFilter, int32_t iBoundryFlag) {
  975|   156k|  int32_t iMbXyIndex = pCurDqLayer->iMbXyIndex;
  976|   156k|  int32_t iMbX      = pCurDqLayer->iMbX;
  977|   156k|  int32_t iMbY      = pCurDqLayer->iMbY;
  978|   156k|  int32_t iMbWidth  = pCurDqLayer->iMbWidth;
  979|   156k|  int32_t iLineSize  = pFilter->iCsStride[0];
  980|       |
  981|   156k|  uint8_t*  pDestY;
  982|   156k|  int32_t  iCurQp;
  983|   156k|  int32_t  iIndexA, iAlpha, iBeta;
  984|       |
  985|   156k|  ENFORCE_STACK_ALIGN_1D (int8_t,  iTc,   4, 16);
  ------------------
  |  |   58|   156k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   156k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
  986|   156k|  ENFORCE_STACK_ALIGN_1D (uint8_t, uiBSx4, 4, 4);
  ------------------
  |  |   58|   156k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   156k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
  987|       |
  988|   156k|  pDestY  = pFilter->pCsData[0] + ((iMbY * iLineSize + iMbX) << 4);
  989|   156k|  iCurQp  = pCurDqLayer->pLumaQp[iMbXyIndex];
  990|       |
  991|   156k|  * (uint32_t*)uiBSx4 = 0x03030303;
  992|       |
  993|       |  // luma v
  994|   156k|  if (iBoundryFlag & LEFT_FLAG_MASK) {
  ------------------
  |  |   50|   156k|#define LEFT_FLAG_MASK 0x01
  ------------------
  |  Branch (994:7): [True: 100k, False: 56.3k]
  ------------------
  995|   100k|    pFilter->iLumaQP   = (iCurQp   + pCurDqLayer->pLumaQp[iMbXyIndex - 1] + 1) >> 1;
  996|   100k|    FilteringEdgeLumaIntraV (pFilter, pDestY, iLineSize, NULL);
  997|   100k|  }
  998|       |
  999|   156k|  pFilter->iLumaQP   = iCurQp;
 1000|   156k|  GET_ALPHA_BETA_FROM_QP (pFilter->iLumaQP, pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|   156k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|   156k|{\
  |  |  139|   156k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|   156k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|   156k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|   156k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|   156k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|   156k|}
  ------------------
 1001|   156k|                          iBeta);
 1002|   156k|  if (iAlpha | iBeta) {
  ------------------
  |  Branch (1002:7): [True: 122k, False: 34.5k]
  ------------------
 1003|   122k|    TC0_TBL_LOOKUP (iTc, iIndexA, uiBSx4, 0);
  ------------------
  |  |  207|   122k|#define TC0_TBL_LOOKUP(tc, iIndexA, pBS, bChroma) \
  |  |  208|   122k|{\
  |  |  209|   122k|  tc[0] = g_kiTc0Table(iIndexA)[pBS[0] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   122k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  210|   122k|  tc[1] = g_kiTc0Table(iIndexA)[pBS[1] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   122k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  211|   122k|  tc[2] = g_kiTc0Table(iIndexA)[pBS[2] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   122k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  212|   122k|  tc[3] = g_kiTc0Table(iIndexA)[pBS[3] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   122k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  213|   122k|}
  ------------------
 1004|       |
 1005|   122k|    if (!pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
  ------------------
  |  Branch (1005:9): [True: 34.9k, False: 87.3k]
  ------------------
 1006|  34.9k|      pFilter->pLoopf->pfLumaDeblockingLT4Hor (&pDestY[1 << 2], iLineSize, iAlpha, iBeta, iTc);
 1007|  34.9k|    }
 1008|       |
 1009|   122k|    pFilter->pLoopf->pfLumaDeblockingLT4Hor (&pDestY[2 << 2], iLineSize, iAlpha, iBeta, iTc);
 1010|       |
 1011|   122k|    if (!pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
  ------------------
  |  Branch (1011:9): [True: 34.9k, False: 87.3k]
  ------------------
 1012|  34.9k|      pFilter->pLoopf->pfLumaDeblockingLT4Hor (&pDestY[3 << 2], iLineSize, iAlpha, iBeta, iTc);
 1013|  34.9k|    }
 1014|   122k|  }
 1015|       |
 1016|       |  // luma h
 1017|   156k|  if (iBoundryFlag & TOP_FLAG_MASK) {
  ------------------
  |  |   51|   156k|#define TOP_FLAG_MASK 0x02
  ------------------
  |  Branch (1017:7): [True: 97.4k, False: 59.3k]
  ------------------
 1018|  97.4k|    pFilter->iLumaQP   = (iCurQp   + pCurDqLayer->pLumaQp[iMbXyIndex - iMbWidth] + 1) >> 1;
 1019|  97.4k|    FilteringEdgeLumaIntraH (pFilter, pDestY, iLineSize, NULL);
 1020|  97.4k|  }
 1021|       |
 1022|   156k|  pFilter->iLumaQP   = iCurQp;
 1023|   156k|  if (iAlpha | iBeta) {
  ------------------
  |  Branch (1023:7): [True: 122k, False: 34.5k]
  ------------------
 1024|   122k|    if (!pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
  ------------------
  |  Branch (1024:9): [True: 34.9k, False: 87.3k]
  ------------------
 1025|  34.9k|      pFilter->pLoopf->pfLumaDeblockingLT4Ver (&pDestY[ (1 << 2)*iLineSize], iLineSize, iAlpha, iBeta, iTc);
 1026|  34.9k|    }
 1027|       |
 1028|   122k|    pFilter->pLoopf->pfLumaDeblockingLT4Ver (&pDestY[ (2 << 2)*iLineSize], iLineSize, iAlpha, iBeta, iTc);
 1029|       |
 1030|   122k|    if (!pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
  ------------------
  |  Branch (1030:9): [True: 34.9k, False: 87.3k]
  ------------------
 1031|  34.9k|      pFilter->pLoopf->pfLumaDeblockingLT4Ver (&pDestY[ (3 << 2)*iLineSize], iLineSize, iAlpha, iBeta, iTc);
 1032|  34.9k|    }
 1033|   122k|  }
 1034|   156k|}
_ZN7WelsDec21FilteringEdgeChromaHVEPNS_10TagDqLayerEPNS_19tagDeblockingFilterEi:
 1035|   156k|void FilteringEdgeChromaHV (PDqLayer pCurDqLayer, PDeblockingFilter  pFilter, int32_t iBoundryFlag) {
 1036|   156k|  int32_t iMbXyIndex     = pCurDqLayer->iMbXyIndex;
 1037|   156k|  int32_t iMbX      = pCurDqLayer->iMbX;
 1038|   156k|  int32_t iMbY      = pCurDqLayer->iMbY;
 1039|   156k|  int32_t iMbWidth  = pCurDqLayer->iMbWidth;
 1040|   156k|  int32_t iLineSize  = pFilter->iCsStride[1];
 1041|       |
 1042|   156k|  uint8_t* pDestCb;
 1043|   156k|  uint8_t* pDestCr;
 1044|       |  //int32_t  iCurQp;
 1045|   156k|  int8_t* pCurQp;
 1046|   156k|  int32_t  iIndexA, iAlpha, iBeta;
 1047|       |
 1048|   156k|  ENFORCE_STACK_ALIGN_1D (int8_t,  iTc,   4, 16);
  ------------------
  |  |   58|   156k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   156k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
 1049|   156k|  ENFORCE_STACK_ALIGN_1D (uint8_t, uiBSx4, 4, 4);
  ------------------
  |  |   58|   156k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   156k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
 1050|       |
 1051|   156k|  pDestCb = pFilter->pCsData[1] + ((iMbY * iLineSize + iMbX) << 3);
 1052|   156k|  pDestCr = pFilter->pCsData[2] + ((iMbY * iLineSize + iMbX) << 3);
 1053|   156k|  pCurQp  = pCurDqLayer->pChromaQp[iMbXyIndex];
 1054|       |
 1055|   156k|  * (uint32_t*)uiBSx4 = 0x03030303;
 1056|       |
 1057|       |
 1058|       |// chroma v
 1059|   156k|  if (iBoundryFlag & LEFT_FLAG_MASK) {
  ------------------
  |  |   50|   156k|#define LEFT_FLAG_MASK 0x01
  ------------------
  |  Branch (1059:7): [True: 100k, False: 56.3k]
  ------------------
 1060|       |
 1061|   301k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (1061:21): [True: 200k, False: 100k]
  ------------------
 1062|   200k|      pFilter->iChromaQP[i] = (pCurQp[i] + pCurDqLayer->pChromaQp[iMbXyIndex - 1][i] + 1) >> 1;
 1063|       |
 1064|   200k|    }
 1065|   100k|    FilteringEdgeChromaIntraV (pFilter, pDestCb, pDestCr, iLineSize, NULL);
 1066|   100k|  }
 1067|       |
 1068|   156k|  pFilter->iChromaQP[0]   = pCurQp[0];
 1069|   156k|  pFilter->iChromaQP[1]   = pCurQp[1];
 1070|   156k|  if (pFilter->iChromaQP[0] == pFilter->iChromaQP[1]) {
  ------------------
  |  Branch (1070:7): [True: 82.3k, False: 74.4k]
  ------------------
 1071|  82.3k|    GET_ALPHA_BETA_FROM_QP (pFilter->iChromaQP[0], pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|  82.3k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|  82.3k|{\
  |  |  139|  82.3k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|  82.3k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|  82.3k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|  82.3k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|  82.3k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|  82.3k|}
  ------------------
 1072|  82.3k|                            iBeta);
 1073|  82.3k|    if (iAlpha | iBeta) {
  ------------------
  |  Branch (1073:9): [True: 70.8k, False: 11.5k]
  ------------------
 1074|  70.8k|      TC0_TBL_LOOKUP (iTc, iIndexA, uiBSx4, 1);
  ------------------
  |  |  207|  70.8k|#define TC0_TBL_LOOKUP(tc, iIndexA, pBS, bChroma) \
  |  |  208|  70.8k|{\
  |  |  209|  70.8k|  tc[0] = g_kiTc0Table(iIndexA)[pBS[0] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|  70.8k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  210|  70.8k|  tc[1] = g_kiTc0Table(iIndexA)[pBS[1] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|  70.8k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  211|  70.8k|  tc[2] = g_kiTc0Table(iIndexA)[pBS[2] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|  70.8k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  212|  70.8k|  tc[3] = g_kiTc0Table(iIndexA)[pBS[3] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|  70.8k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  213|  70.8k|}
  ------------------
 1075|  70.8k|      pFilter->pLoopf->pfChromaDeblockingLT4Hor (&pDestCb[2 << 1], &pDestCr[2 << 1], iLineSize, iAlpha, iBeta, iTc);
 1076|  70.8k|    }
 1077|  82.3k|  } else {
 1078|       |
 1079|   223k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (1079:21): [True: 148k, False: 74.4k]
  ------------------
 1080|   148k|      GET_ALPHA_BETA_FROM_QP (pFilter->iChromaQP[i], pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|   148k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|   148k|{\
  |  |  139|   148k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|   148k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|   148k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|   148k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|   148k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|   148k|}
  ------------------
 1081|   148k|                              iBeta);
 1082|   148k|      if (iAlpha | iBeta) {
  ------------------
  |  Branch (1082:11): [True: 102k, False: 46.9k]
  ------------------
 1083|   102k|        uint8_t* pDestCbCr = (i == 0) ? &pDestCb[2 << 1] : &pDestCr[2 << 1];
  ------------------
  |  Branch (1083:30): [True: 51.3k, False: 50.7k]
  ------------------
 1084|   102k|        TC0_TBL_LOOKUP (iTc, iIndexA, uiBSx4, 1);
  ------------------
  |  |  207|   102k|#define TC0_TBL_LOOKUP(tc, iIndexA, pBS, bChroma) \
  |  |  208|   102k|{\
  |  |  209|   102k|  tc[0] = g_kiTc0Table(iIndexA)[pBS[0] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   102k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  210|   102k|  tc[1] = g_kiTc0Table(iIndexA)[pBS[1] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   102k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  211|   102k|  tc[2] = g_kiTc0Table(iIndexA)[pBS[2] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   102k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  212|   102k|  tc[3] = g_kiTc0Table(iIndexA)[pBS[3] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   102k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  213|   102k|}
  ------------------
 1085|   102k|        pFilter->pLoopf->pfChromaDeblockingLT4Hor2 (pDestCbCr, iLineSize, iAlpha, iBeta, iTc);
 1086|   102k|      }
 1087|       |
 1088|   148k|    }
 1089|  74.4k|  }
 1090|       |
 1091|       |  // chroma h
 1092|       |
 1093|   156k|  if (iBoundryFlag & TOP_FLAG_MASK) {
  ------------------
  |  |   51|   156k|#define TOP_FLAG_MASK 0x02
  ------------------
  |  Branch (1093:7): [True: 97.4k, False: 59.3k]
  ------------------
 1094|   292k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (1094:21): [True: 194k, False: 97.4k]
  ------------------
 1095|   194k|      pFilter->iChromaQP[i] = (pCurQp[i] + pCurDqLayer->pChromaQp[iMbXyIndex - iMbWidth][i] + 1) >> 1;
 1096|   194k|    }
 1097|  97.4k|    FilteringEdgeChromaIntraH (pFilter, pDestCb, pDestCr, iLineSize, NULL);
 1098|  97.4k|  }
 1099|       |
 1100|   156k|  pFilter->iChromaQP[0]   = pCurQp[0];
 1101|   156k|  pFilter->iChromaQP[1]   = pCurQp[1];
 1102|       |
 1103|   156k|  if (pFilter->iChromaQP[0] == pFilter->iChromaQP[1]) {
  ------------------
  |  Branch (1103:7): [True: 82.3k, False: 74.4k]
  ------------------
 1104|  82.3k|    GET_ALPHA_BETA_FROM_QP (pFilter->iChromaQP[0], pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|  82.3k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|  82.3k|{\
  |  |  139|  82.3k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|  82.3k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|  82.3k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|  82.3k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|  82.3k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|  82.3k|}
  ------------------
 1105|  82.3k|                            iBeta);
 1106|  82.3k|    if (iAlpha | iBeta) {
  ------------------
  |  Branch (1106:9): [True: 70.8k, False: 11.5k]
  ------------------
 1107|  70.8k|      TC0_TBL_LOOKUP (iTc, iIndexA, uiBSx4, 1);
  ------------------
  |  |  207|  70.8k|#define TC0_TBL_LOOKUP(tc, iIndexA, pBS, bChroma) \
  |  |  208|  70.8k|{\
  |  |  209|  70.8k|  tc[0] = g_kiTc0Table(iIndexA)[pBS[0] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|  70.8k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  210|  70.8k|  tc[1] = g_kiTc0Table(iIndexA)[pBS[1] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|  70.8k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  211|  70.8k|  tc[2] = g_kiTc0Table(iIndexA)[pBS[2] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|  70.8k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  212|  70.8k|  tc[3] = g_kiTc0Table(iIndexA)[pBS[3] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|  70.8k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  213|  70.8k|}
  ------------------
 1108|  70.8k|      pFilter->pLoopf->pfChromaDeblockingLT4Ver (&pDestCb[ (2 << 1)*iLineSize], &pDestCr[ (2 << 1)*iLineSize], iLineSize,
 1109|  70.8k|          iAlpha, iBeta, iTc);
 1110|  70.8k|    }
 1111|  82.3k|  } else {
 1112|   223k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (1112:21): [True: 148k, False: 74.4k]
  ------------------
 1113|       |
 1114|   148k|      GET_ALPHA_BETA_FROM_QP (pFilter->iChromaQP[i], pFilter->iSliceAlphaC0Offset, pFilter->iSliceBetaOffset, iIndexA, iAlpha,
  ------------------
  |  |  137|   148k|#define GET_ALPHA_BETA_FROM_QP(iQp, iAlphaOffset, iBetaOffset, iIndex, iAlpha, iBeta) \
  |  |  138|   148k|{\
  |  |  139|   148k|  iIndex = (iQp + iAlphaOffset);\
  |  |  140|   148k|  iAlpha = g_kuiAlphaTable(iIndex);\
  |  |  ------------------
  |  |  |  |   54|   148k|#define g_kuiAlphaTable(x) g_kuiAlphaTable[(x)+12]
  |  |  ------------------
  |  |  141|   148k|  iBeta  = g_kiBetaTable((iQp + iBetaOffset));\
  |  |  ------------------
  |  |  |  |   55|   148k|#define g_kiBetaTable(x)  g_kiBetaTable[(x)+12]
  |  |  ------------------
  |  |  142|   148k|}
  ------------------
 1115|   148k|                              iBeta);
 1116|   148k|      if (iAlpha | iBeta) {
  ------------------
  |  Branch (1116:11): [True: 102k, False: 46.9k]
  ------------------
 1117|   102k|        TC0_TBL_LOOKUP (iTc, iIndexA, uiBSx4, 1);
  ------------------
  |  |  207|   102k|#define TC0_TBL_LOOKUP(tc, iIndexA, pBS, bChroma) \
  |  |  208|   102k|{\
  |  |  209|   102k|  tc[0] = g_kiTc0Table(iIndexA)[pBS[0] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   102k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  210|   102k|  tc[1] = g_kiTc0Table(iIndexA)[pBS[1] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   102k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  211|   102k|  tc[2] = g_kiTc0Table(iIndexA)[pBS[2] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   102k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  212|   102k|  tc[3] = g_kiTc0Table(iIndexA)[pBS[3] & 3] + bChroma;\
  |  |  ------------------
  |  |  |  |   56|   102k|#define g_kiTc0Table(x)   g_kiTc0Table[(x)+12]
  |  |  ------------------
  |  |  213|   102k|}
  ------------------
 1118|   102k|        uint8_t* pDestCbCr = (i == 0) ? &pDestCb[ (2 << 1) * iLineSize] : &pDestCr[ (2 << 1) * iLineSize];
  ------------------
  |  Branch (1118:30): [True: 51.3k, False: 50.7k]
  ------------------
 1119|   102k|        pFilter->pLoopf->pfChromaDeblockingLT4Ver2 (pDestCbCr, iLineSize,
 1120|   102k|            iAlpha, iBeta, iTc);
 1121|   102k|      }
 1122|   148k|    }
 1123|       |
 1124|       |
 1125|  74.4k|  }
 1126|   156k|}
_ZN7WelsDec16WelsDeblockingMbEPNS_10TagDqLayerEPNS_19tagDeblockingFilterEi:
 1134|  4.54M|void WelsDeblockingMb (PDqLayer pCurDqLayer, PDeblockingFilter  pFilter, int32_t iBoundryFlag) {
 1135|  4.54M|  uint8_t nBS[2][4][4] = {{{ 0 }}};
 1136|       |
 1137|  4.54M|  int32_t iMbXyIndex  = pCurDqLayer->iMbXyIndex;
 1138|  4.54M|  uint32_t iCurMbType  = pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pMbType[iMbXyIndex] :
  ------------------
  |  Branch (1138:26): [True: 4.54M, False: 0]
  ------------------
 1139|  4.54M|                         pCurDqLayer->pMbType[iMbXyIndex];
 1140|  4.54M|  int32_t iMbNb;
 1141|       |
 1142|  4.54M|  PSlice pSlice = &pCurDqLayer->sLayerInfo.sSliceInLayer;
 1143|  4.54M|  PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
 1144|  4.54M|  bool bBSlice = pSliceHeader->eSliceType == B_SLICE;
 1145|       |
 1146|  4.54M|  switch (iCurMbType) {
 1147|  17.6k|  case MB_TYPE_INTRA4x4:
  ------------------
  |  |  275|  17.6k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
  |  Branch (1147:3): [True: 17.6k, False: 4.52M]
  ------------------
 1148|   117k|  case MB_TYPE_INTRA8x8:
  ------------------
  |  |  277|   117k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
  |  Branch (1148:3): [True: 99.6k, False: 4.44M]
  ------------------
 1149|   151k|  case MB_TYPE_INTRA16x16:
  ------------------
  |  |  276|   151k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (1149:3): [True: 34.2k, False: 4.51M]
  ------------------
 1150|   156k|  case MB_TYPE_INTRA_PCM:
  ------------------
  |  |  284|   156k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1150:3): [True: 5.17k, False: 4.54M]
  ------------------
 1151|   156k|    DeblockingIntraMb (pCurDqLayer, pFilter, iBoundryFlag);
 1152|   156k|    break;
 1153|  4.38M|  default:
  ------------------
  |  Branch (1153:3): [True: 4.38M, False: 156k]
  ------------------
 1154|       |
 1155|  4.38M|    if (iBoundryFlag & LEFT_FLAG_MASK) {
  ------------------
  |  |   50|  4.38M|#define LEFT_FLAG_MASK 0x01
  ------------------
  |  Branch (1155:9): [True: 3.05M, False: 1.33M]
  ------------------
 1156|  3.05M|      iMbNb = iMbXyIndex - 1;
 1157|  3.05M|      uint32_t uiMbType = pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pMbType[iMbNb] : pCurDqLayer->pMbType[iMbNb];
  ------------------
  |  Branch (1157:27): [True: 3.05M, False: 0]
  ------------------
 1158|  3.05M|      if (bBSlice) {
  ------------------
  |  Branch (1158:11): [True: 587k, False: 2.46M]
  ------------------
 1159|   587k|        * (uint32_t*)nBS[0][0] = IS_INTRA (uiMbType) ? 0x04040404 :
  ------------------
  |  |  305|   587k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|   587k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|   587k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|   587k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   587k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|   587k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 5.05k, False: 582k]
  |  |  ------------------
  ------------------
 1160|   587k|                                 DeblockingBSliceBsMarginalMBAvcbase (
 1161|   582k|                                   pFilter, pCurDqLayer, 0, iMbNb, iMbXyIndex);
 1162|  2.46M|      } else {
 1163|  2.46M|        * (uint32_t*)nBS[0][0] = IS_INTRA (uiMbType) ? 0x04040404 : DeblockingBsMarginalMBAvcbase (
  ------------------
  |  |  305|  2.46M|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  2.46M|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  2.46M|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  2.46M|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.46M|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  2.46M|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 10.5k, False: 2.45M]
  |  |  ------------------
  ------------------
 1164|  2.45M|                                   pFilter, pCurDqLayer, 0, iMbNb, iMbXyIndex);
 1165|  2.46M|      }
 1166|  3.05M|    } else {
 1167|  1.33M|      * (uint32_t*)nBS[0][0] = 0;
 1168|  1.33M|    }
 1169|  4.38M|    if (iBoundryFlag & TOP_FLAG_MASK) {
  ------------------
  |  |   51|  4.38M|#define TOP_FLAG_MASK 0x02
  ------------------
  |  Branch (1169:9): [True: 3.07M, False: 1.31M]
  ------------------
 1170|  3.07M|      iMbNb = iMbXyIndex - pCurDqLayer->iMbWidth;
 1171|  3.07M|      uint32_t uiMbType = pCurDqLayer->pDec != NULL ? pCurDqLayer->pDec->pMbType[iMbNb] : pCurDqLayer->pMbType[iMbNb];
  ------------------
  |  Branch (1171:27): [True: 3.07M, False: 0]
  ------------------
 1172|  3.07M|      if (bBSlice) {
  ------------------
  |  Branch (1172:11): [True: 464k, False: 2.61M]
  ------------------
 1173|   464k|        * (uint32_t*)nBS[1][0] = IS_INTRA (uiMbType) ? 0x04040404 :
  ------------------
  |  |  305|   464k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|   464k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|   464k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|   464k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   464k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|   464k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 4.19k, False: 460k]
  |  |  ------------------
  ------------------
 1174|   464k|                                 DeblockingBSliceBsMarginalMBAvcbase (
 1175|   460k|                                   pFilter, pCurDqLayer, 1, iMbNb, iMbXyIndex);
 1176|  2.61M|      } else {
 1177|  2.61M|        * (uint32_t*)nBS[1][0] = IS_INTRA (uiMbType) ? 0x04040404 : DeblockingBsMarginalMBAvcbase (
  ------------------
  |  |  305|  2.61M|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  2.61M|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  2.61M|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  2.61M|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.61M|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  2.61M|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 18.2k, False: 2.59M]
  |  |  ------------------
  ------------------
 1178|  2.59M|                                   pFilter, pCurDqLayer, 1, iMbNb, iMbXyIndex);
 1179|  2.61M|      }
 1180|  3.07M|    } else {
 1181|  1.31M|      * (uint32_t*)nBS[1][0] = 0;
 1182|  1.31M|    }
 1183|       |    //SKIP MB_16x16 or others
 1184|  4.38M|    if (IS_SKIP (iCurMbType)) {
  ------------------
  |  |  315|  4.38M|#define IS_SKIP(type) ( ((type)&MB_TYPE_SKIP) != 0 )
  |  |  ------------------
  |  |  |  |  283|  4.38M|#define MB_TYPE_SKIP        0x00000100
  |  |  ------------------
  |  |  |  Branch (315:23): [True: 3.87M, False: 517k]
  |  |  ------------------
  ------------------
 1185|  3.87M|      * (uint32_t*)nBS[0][1] = * (uint32_t*)nBS[0][2] = * (uint32_t*)nBS[0][3] =
 1186|  3.87M|                                 * (uint32_t*)nBS[1][1] = * (uint32_t*)nBS[1][2] = * (uint32_t*)nBS[1][3] = 0;
 1187|  3.87M|    } else {
 1188|   517k|      if (IS_INTER_16x16 (iCurMbType)) {
  ------------------
  |  |  307|   517k|#define IS_INTER_16x16(type) ( (type)&MB_TYPE_16x16 )
  |  |  ------------------
  |  |  |  |  278|   517k|#define MB_TYPE_16x16       0x00000008
  |  |  ------------------
  |  |  |  Branch (307:30): [True: 237k, False: 279k]
  |  |  ------------------
  ------------------
 1189|   237k|        if (!pCurDqLayer->pTransformSize8x8Flag[pCurDqLayer->iMbXyIndex]) {
  ------------------
  |  Branch (1189:13): [True: 211k, False: 26.5k]
  ------------------
 1190|   211k|          DeblockingBSInsideMBAvsbase (GetPNzc (pCurDqLayer, iMbXyIndex), nBS, 1);
 1191|   211k|        } else {
 1192|  26.5k|          DeblockingBSInsideMBAvsbase8x8 (GetPNzc (pCurDqLayer, iMbXyIndex), nBS, 1);
 1193|  26.5k|        }
 1194|   279k|      } else {
 1195|       |
 1196|   279k|        if (bBSlice) {
  ------------------
  |  Branch (1196:13): [True: 201k, False: 78.7k]
  ------------------
 1197|   201k|          DeblockingBSliceBSInsideMBNormal (pFilter, pCurDqLayer, nBS, GetPNzc (pCurDqLayer, iMbXyIndex), iMbXyIndex);
 1198|   201k|        } else {
 1199|  78.7k|          DeblockingBSInsideMBNormal (pFilter, pCurDqLayer, nBS, GetPNzc (pCurDqLayer, iMbXyIndex), iMbXyIndex);
 1200|  78.7k|        }
 1201|   279k|      }
 1202|   517k|    }
 1203|  4.38M|    DeblockingInterMb (pCurDqLayer, pFilter, nBS, iBoundryFlag);
 1204|  4.38M|    break;
 1205|  4.54M|  }
 1206|  4.54M|}
_ZN7WelsDec25WelsDeblockingFilterSliceEPNS_21TagWelsDecoderContextEPFvPNS_10TagDqLayerEPNS_19tagDeblockingFilterEiE:
 1215|   759k|void WelsDeblockingFilterSlice (PWelsDecoderContext pCtx, PDeblockingFilterMbFunc pDeblockMb) {
 1216|   759k|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
 1217|   759k|  PSliceHeaderExt pSliceHeaderExt = &pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt;
 1218|   759k|  int32_t iMbWidth  = pCurDqLayer->iMbWidth;
 1219|   759k|  int32_t iTotalMbCount = pSliceHeaderExt->sSliceHeader.pSps->uiTotalMbCount;
 1220|       |
 1221|   759k|  SDeblockingFilter pFilter;
 1222|   759k|  memset (&pFilter, 0, sizeof (pFilter));
 1223|   759k|  PFmo pFmo = pCtx->pFmo;
 1224|   759k|  int32_t iNextMbXyIndex = 0;
 1225|   759k|  int32_t iTotalNumMb = pCurDqLayer->sLayerInfo.sSliceInLayer.iTotalMbInCurSlice;
 1226|   759k|  int32_t iCountNumMb = 0;
 1227|   759k|  int32_t iBoundryFlag;
 1228|   759k|  int32_t iFilterIdc = pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.uiDisableDeblockingFilterIdc;
 1229|       |
 1230|       |  /* Step1: parameters set */
 1231|   759k|  pFilter.pCsData[0] = pCtx->pDec->pData[0];
 1232|   759k|  pFilter.pCsData[1] = pCtx->pDec->pData[1];
 1233|   759k|  pFilter.pCsData[2] = pCtx->pDec->pData[2];
 1234|       |
 1235|   759k|  pFilter.iCsStride[0] = pCtx->pDec->iLinesize[0];
 1236|   759k|  pFilter.iCsStride[1] = pCtx->pDec->iLinesize[1];
 1237|       |
 1238|   759k|  pFilter.eSliceType = (EWelsSliceType) pCurDqLayer->sLayerInfo.sSliceInLayer.eSliceType;
 1239|       |
 1240|   759k|  pFilter.iSliceAlphaC0Offset = pSliceHeaderExt->sSliceHeader.iSliceAlphaC0Offset;
 1241|   759k|  pFilter.iSliceBetaOffset     = pSliceHeaderExt->sSliceHeader.iSliceBetaOffset;
 1242|       |
 1243|   759k|  pFilter.pLoopf = &pCtx->sDeblockingFunc;
 1244|   759k|  pFilter.pRefPics[0] = pCtx->sRefPic.pRefList[0];
 1245|   759k|  pFilter.pRefPics[1] = pCtx->sRefPic.pRefList[1];
 1246|       |
 1247|       |  /* Step2: macroblock deblocking */
 1248|   759k|  if (0 == iFilterIdc || 2 == iFilterIdc) {
  ------------------
  |  Branch (1248:7): [True: 752k, False: 6.23k]
  |  Branch (1248:26): [True: 5.68k, False: 547]
  ------------------
 1249|   758k|    iNextMbXyIndex = pSliceHeaderExt->sSliceHeader.iFirstMbInSlice;
 1250|   758k|    pCurDqLayer->iMbX  = iNextMbXyIndex % iMbWidth;
 1251|   758k|    pCurDqLayer->iMbY  = iNextMbXyIndex / iMbWidth;
 1252|   758k|    pCurDqLayer->iMbXyIndex = iNextMbXyIndex;
 1253|       |
 1254|  4.54M|    do {
 1255|  4.54M|      iBoundryFlag = DeblockingAvailableNoInterlayer (pCurDqLayer, iFilterIdc);
 1256|       |
 1257|  4.54M|      pDeblockMb (pCurDqLayer, &pFilter, iBoundryFlag);
 1258|       |
 1259|  4.54M|      ++iCountNumMb;
 1260|  4.54M|      if (iCountNumMb >= iTotalNumMb) {
  ------------------
  |  Branch (1260:11): [True: 758k, False: 3.78M]
  ------------------
 1261|   758k|        break;
 1262|   758k|      }
 1263|       |
 1264|  3.78M|      if (pSliceHeaderExt->sSliceHeader.pPps->uiNumSliceGroups > 1) {
  ------------------
  |  Branch (1264:11): [True: 409k, False: 3.37M]
  ------------------
 1265|   409k|        iNextMbXyIndex = FmoNextMb (pFmo, iNextMbXyIndex);
 1266|  3.37M|      } else {
 1267|  3.37M|        ++iNextMbXyIndex;
 1268|  3.37M|      }
 1269|  3.78M|      if (-1 == iNextMbXyIndex || iNextMbXyIndex >= iTotalMbCount) { // slice group boundary or end of a frame
  ------------------
  |  Branch (1269:11): [True: 0, False: 3.78M]
  |  Branch (1269:35): [True: 0, False: 3.78M]
  ------------------
 1270|      0|        break;
 1271|      0|      }
 1272|       |
 1273|  3.78M|      pCurDqLayer->iMbX  = iNextMbXyIndex % iMbWidth;
 1274|  3.78M|      pCurDqLayer->iMbY  = iNextMbXyIndex / iMbWidth;
 1275|  3.78M|      pCurDqLayer->iMbXyIndex = iNextMbXyIndex;
 1276|  3.78M|    } while (1);
  ------------------
  |  Branch (1276:14): [True: 3.78M, Folded]
  ------------------
 1277|   758k|  }
 1278|   759k|}
_ZN7WelsDec14DeblockingInitEPNS_17TagDeblockingFuncEi:
 1338|  26.4k|void  DeblockingInit (SDeblockingFunc*  pFunc,  int32_t iCpu) {
 1339|  26.4k|  pFunc->pfLumaDeblockingLT4Ver     = DeblockLumaLt4V_c;
 1340|  26.4k|  pFunc->pfLumaDeblockingEQ4Ver     = DeblockLumaEq4V_c;
 1341|  26.4k|  pFunc->pfLumaDeblockingLT4Hor     = DeblockLumaLt4H_c;
 1342|  26.4k|  pFunc->pfLumaDeblockingEQ4Hor     = DeblockLumaEq4H_c;
 1343|       |
 1344|  26.4k|  pFunc->pfChromaDeblockingLT4Ver   = DeblockChromaLt4V_c;
 1345|  26.4k|  pFunc->pfChromaDeblockingEQ4Ver   = DeblockChromaEq4V_c;
 1346|  26.4k|  pFunc->pfChromaDeblockingLT4Hor   = DeblockChromaLt4H_c;
 1347|  26.4k|  pFunc->pfChromaDeblockingEQ4Hor   = DeblockChromaEq4H_c;
 1348|       |
 1349|  26.4k|  pFunc->pfChromaDeblockingLT4Ver2  = DeblockChromaLt4V2_c;
 1350|  26.4k|  pFunc->pfChromaDeblockingEQ4Ver2  = DeblockChromaEq4V2_c;
 1351|  26.4k|  pFunc->pfChromaDeblockingLT4Hor2  = DeblockChromaLt4H2_c;
 1352|  26.4k|  pFunc->pfChromaDeblockingEQ4Hor2  = DeblockChromaEq4H2_c;
 1353|       |
 1354|  26.4k|#ifdef X86_ASM
 1355|  26.4k|  if (iCpu & WELS_CPU_SSSE3) {
  ------------------
  |  |   55|  26.4k|#define WELS_CPU_SSSE3      0x00000200    /* ssse3 */
  ------------------
  |  Branch (1355:7): [True: 26.4k, False: 0]
  ------------------
 1356|  26.4k|    pFunc->pfLumaDeblockingLT4Ver   = DeblockLumaLt4V_ssse3;
 1357|  26.4k|    pFunc->pfLumaDeblockingEQ4Ver   = DeblockLumaEq4V_ssse3;
 1358|  26.4k|    pFunc->pfLumaDeblockingLT4Hor   = DeblockLumaLt4H_ssse3;
 1359|  26.4k|    pFunc->pfLumaDeblockingEQ4Hor   = DeblockLumaEq4H_ssse3;
 1360|  26.4k|    pFunc->pfChromaDeblockingLT4Ver = DeblockChromaLt4V_ssse3;
 1361|  26.4k|    pFunc->pfChromaDeblockingEQ4Ver = DeblockChromaEq4V_ssse3;
 1362|  26.4k|    pFunc->pfChromaDeblockingLT4Hor = DeblockChromaLt4H_ssse3;
 1363|  26.4k|    pFunc->pfChromaDeblockingEQ4Hor = DeblockChromaEq4H_ssse3;
 1364|  26.4k|  }
 1365|  26.4k|#endif
 1366|       |
 1367|       |#if defined(HAVE_NEON)
 1368|       |  if (iCpu & WELS_CPU_NEON) {
 1369|       |    pFunc->pfLumaDeblockingLT4Ver   = DeblockLumaLt4V_neon;
 1370|       |    pFunc->pfLumaDeblockingEQ4Ver   = DeblockLumaEq4V_neon;
 1371|       |    pFunc->pfLumaDeblockingLT4Hor   = DeblockLumaLt4H_neon;
 1372|       |    pFunc->pfLumaDeblockingEQ4Hor   = DeblockLumaEq4H_neon;
 1373|       |
 1374|       |    pFunc->pfChromaDeblockingLT4Ver = DeblockChromaLt4V_neon;
 1375|       |    pFunc->pfChromaDeblockingEQ4Ver = DeblockChromaEq4V_neon;
 1376|       |    pFunc->pfChromaDeblockingLT4Hor = DeblockChromaLt4H_neon;
 1377|       |    pFunc->pfChromaDeblockingEQ4Hor = DeblockChromaEq4H_neon;
 1378|       |  }
 1379|       |#endif
 1380|       |
 1381|       |#if defined(HAVE_NEON_AARCH64) && defined(__aarch64__)
 1382|       |  if (iCpu & WELS_CPU_NEON) {
 1383|       |    pFunc->pfLumaDeblockingLT4Ver   = DeblockLumaLt4V_AArch64_neon;
 1384|       |    pFunc->pfLumaDeblockingEQ4Ver   = DeblockLumaEq4V_AArch64_neon;
 1385|       |    pFunc->pfLumaDeblockingLT4Hor   = DeblockLumaLt4H_AArch64_neon;
 1386|       |    pFunc->pfLumaDeblockingEQ4Hor   = DeblockLumaEq4H_AArch64_neon;
 1387|       |
 1388|       |    pFunc->pfChromaDeblockingLT4Ver = DeblockChromaLt4V_AArch64_neon;
 1389|       |    pFunc->pfChromaDeblockingEQ4Ver = DeblockChromaEq4V_AArch64_neon;
 1390|       |    pFunc->pfChromaDeblockingLT4Hor = DeblockChromaLt4H_AArch64_neon;
 1391|       |    pFunc->pfChromaDeblockingEQ4Hor = DeblockChromaEq4H_AArch64_neon;
 1392|       |  }
 1393|       |#endif
 1394|       |
 1395|       |#if defined(HAVE_MMI)
 1396|       |  if (iCpu & WELS_CPU_MMI) {
 1397|       |    pFunc->pfLumaDeblockingLT4Ver   = DeblockLumaLt4V_mmi;
 1398|       |    pFunc->pfLumaDeblockingEQ4Ver   = DeblockLumaEq4V_mmi;
 1399|       |    pFunc->pfLumaDeblockingLT4Hor   = DeblockLumaLt4H_mmi;
 1400|       |    pFunc->pfLumaDeblockingEQ4Hor   = DeblockLumaEq4H_mmi;
 1401|       |    pFunc->pfChromaDeblockingLT4Ver = DeblockChromaLt4V_mmi;
 1402|       |    pFunc->pfChromaDeblockingEQ4Ver = DeblockChromaEq4V_mmi;
 1403|       |    pFunc->pfChromaDeblockingLT4Hor = DeblockChromaLt4H_mmi;
 1404|       |    pFunc->pfChromaDeblockingEQ4Hor = DeblockChromaEq4H_mmi;
 1405|       |  }
 1406|       |#endif//HAVE_MMI
 1407|       |
 1408|       |#if defined(HAVE_MSA)
 1409|       |  if (iCpu & WELS_CPU_MSA) {
 1410|       |    pFunc->pfLumaDeblockingLT4Ver   = DeblockLumaLt4V_msa;
 1411|       |    pFunc->pfLumaDeblockingEQ4Ver   = DeblockLumaEq4V_msa;
 1412|       |    pFunc->pfLumaDeblockingLT4Hor   = DeblockLumaLt4H_msa;
 1413|       |    pFunc->pfLumaDeblockingEQ4Hor   = DeblockLumaEq4H_msa;
 1414|       |    pFunc->pfChromaDeblockingLT4Ver = DeblockChromaLt4V_msa;
 1415|       |    pFunc->pfChromaDeblockingEQ4Ver = DeblockChromaEq4V_msa;
 1416|       |    pFunc->pfChromaDeblockingLT4Hor = DeblockChromaLt4H_msa;
 1417|       |    pFunc->pfChromaDeblockingEQ4Hor = DeblockChromaEq4H_msa;
 1418|       |  }
 1419|       |#endif//HAVE_MSA
 1420|       |
 1421|       |#if defined(HAVE_LSX)
 1422|       |  if (iCpu & WELS_CPU_LSX) {
 1423|       |    pFunc->pfLumaDeblockingLT4Ver   = DeblockLumaLt4V_lsx;
 1424|       |    pFunc->pfLumaDeblockingLT4Hor   = DeblockLumaLt4H_lsx;
 1425|       |    pFunc->pfLumaDeblockingEQ4Ver   = DeblockLumaEq4V_lsx;
 1426|       |    pFunc->pfLumaDeblockingEQ4Hor   = DeblockLumaEq4H_lsx;
 1427|       |    pFunc->pfChromaDeblockingLT4Ver = DeblockChromaLt4V_lsx;
 1428|       |    pFunc->pfChromaDeblockingLT4Hor = DeblockChromaLt4H_lsx;
 1429|       |    pFunc->pfChromaDeblockingEQ4Hor = DeblockChromaEq4H_lsx;
 1430|       |  }
 1431|       |#endif//HAVE_LSX
 1432|  26.4k|}
deblocking.cpp:_ZN7WelsDecL17DeblockingIntraMbEPNS_10TagDqLayerEPNS_19tagDeblockingFilterEi:
 1129|   156k|static void DeblockingIntraMb (PDqLayer pCurDqLayer, PDeblockingFilter  pFilter, int32_t iBoundryFlag) {
 1130|   156k|  FilteringEdgeLumaHV (pCurDqLayer, pFilter, iBoundryFlag);
 1131|   156k|  FilteringEdgeChromaHV (pCurDqLayer, pFilter, iBoundryFlag);
 1132|   156k|}
_ZN7WelsDec27DeblockingBSInsideMBAvsbaseEPaPA4_A4_hi:
  215|   211k|void inline DeblockingBSInsideMBAvsbase (int8_t* pNnzTab, uint8_t nBS[2][4][4], int32_t iLShiftFactor) {
  216|   211k|  uint32_t uiNnz32b0, uiNnz32b1, uiNnz32b2, uiNnz32b3;
  217|       |
  218|   211k|  uiNnz32b0 = * (uint32_t*) (pNnzTab + 0);
  219|   211k|  uiNnz32b1 = * (uint32_t*) (pNnzTab + 4);
  220|   211k|  uiNnz32b2 = * (uint32_t*) (pNnzTab + 8);
  221|   211k|  uiNnz32b3 = * (uint32_t*) (pNnzTab + 12);
  222|       |
  223|   211k|  nBS[0][1][0] = (pNnzTab[0] | pNnzTab[1]) << iLShiftFactor;
  224|   211k|  nBS[0][2][0] = (pNnzTab[1] | pNnzTab[2]) << iLShiftFactor;
  225|   211k|  nBS[0][3][0] = (pNnzTab[2] | pNnzTab[3]) << iLShiftFactor;
  226|       |
  227|   211k|  nBS[0][1][1] = (pNnzTab[4] | pNnzTab[5]) << iLShiftFactor;
  228|   211k|  nBS[0][2][1] = (pNnzTab[5] | pNnzTab[6]) << iLShiftFactor;
  229|   211k|  nBS[0][3][1] = (pNnzTab[6] | pNnzTab[7]) << iLShiftFactor;
  230|   211k|  * (uint32_t*)nBS[1][1] = (uiNnz32b0 | uiNnz32b1) << iLShiftFactor;
  231|       |
  232|   211k|  nBS[0][1][2] = (pNnzTab[8]  | pNnzTab[9])  << iLShiftFactor;
  233|   211k|  nBS[0][2][2] = (pNnzTab[9]  | pNnzTab[10]) << iLShiftFactor;
  234|   211k|  nBS[0][3][2] = (pNnzTab[10] | pNnzTab[11]) << iLShiftFactor;
  235|   211k|  * (uint32_t*)nBS[1][2] = (uiNnz32b1 | uiNnz32b2) << iLShiftFactor;
  236|       |
  237|   211k|  nBS[0][1][3] = (pNnzTab[12] | pNnzTab[13]) << iLShiftFactor;
  238|   211k|  nBS[0][2][3] = (pNnzTab[13] | pNnzTab[14]) << iLShiftFactor;
  239|   211k|  nBS[0][3][3] = (pNnzTab[14] | pNnzTab[15]) << iLShiftFactor;
  240|   211k|  * (uint32_t*)nBS[1][3] = (uiNnz32b2 | uiNnz32b3) << iLShiftFactor;
  241|   211k|}
_ZN7WelsDec30DeblockingBSInsideMBAvsbase8x8EPaPA4_A4_hi:
  243|  26.5k|void inline DeblockingBSInsideMBAvsbase8x8 (int8_t* pNnzTab, uint8_t nBS[2][4][4], int32_t iLShiftFactor) {
  244|  26.5k|  int8_t i8x8NnzTab[4];
  245|   132k|  for (int32_t i = 0; i < 4; i++) {
  ------------------
  |  Branch (245:23): [True: 106k, False: 26.5k]
  ------------------
  246|   106k|    int32_t iBlkIdx = i << 2;
  247|   106k|    i8x8NnzTab[i] = (pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx]] | pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 1]] |
  248|   106k|                     pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 2]] | pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 3]]);
  249|   106k|  }
  250|       |
  251|       |  //vertical
  252|  26.5k|  nBS[0][2][0] = nBS[0][2][1] = (i8x8NnzTab[0] | i8x8NnzTab[1]) << iLShiftFactor;
  253|  26.5k|  nBS[0][2][2] = nBS[0][2][3] = (i8x8NnzTab[2] | i8x8NnzTab[3]) << iLShiftFactor;
  254|       |  //horizontal
  255|  26.5k|  nBS[1][2][0] = nBS[1][2][1] = (i8x8NnzTab[0] | i8x8NnzTab[2]) << iLShiftFactor;
  256|  26.5k|  nBS[1][2][2] = nBS[1][2][3] = (i8x8NnzTab[1] | i8x8NnzTab[3]) << iLShiftFactor;
  257|  26.5k|}
deblocking.cpp:_ZN7WelsDecL32DeblockingBSliceBSInsideMBNormalEPNS_19tagDeblockingFilterEPNS_10TagDqLayerEPA4_A4_hPai:
  348|   201k|    int32_t iMbXy) {
  349|   201k|  uint32_t uiNnz32b0, uiNnz32b1, uiNnz32b2, uiNnz32b3;
  350|   201k|  void* iRefs[LIST_A][MB_BLOCK4x4_NUM];
  351|       |
  352|   201k|  ENFORCE_STACK_ALIGN_1D (uint8_t, uiBsx4, 4, 4);
  ------------------
  |  |   58|   201k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   201k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
  353|   201k|  int8_t i8x8NnzTab[4];
  354|   201k|  int l;
  355|       |
  356|   603k|  for (l = 0; l < LIST_A; l++) {
  ------------------
  |  Branch (356:15): [True: 402k, False: 201k]
  ------------------
  357|   402k|    int8_t* iRefIdx = pCurDqLayer->pDec->pRefIndex[l][iMbXy];
  358|   402k|    int i;
  359|       |    /* Look up each reference picture based on indices */
  360|  6.83M|    for (i = 0; i < MB_BLOCK4x4_NUM; i++) {
  ------------------
  |  |   57|  6.83M|#define MB_BLOCK4x4_NUM         16
  ------------------
  |  Branch (360:17): [True: 6.43M, False: 402k]
  ------------------
  361|  6.43M|      if (iRefIdx[i] > REF_NOT_IN_LIST)
  ------------------
  |  |   42|  6.43M|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (361:11): [True: 5.31M, False: 1.12M]
  ------------------
  362|  5.31M|        iRefs[l][i] = pFilter->pRefPics[l][iRefIdx[i]];
  363|  1.12M|      else
  364|  1.12M|        iRefs[l][i] = NULL;
  365|  6.43M|    }
  366|   402k|  }
  367|       |
  368|   201k|  if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (368:7): [True: 34.2k, False: 166k]
  ------------------
  369|   171k|    for (int32_t i = 0; i < 4; i++) {
  ------------------
  |  Branch (369:25): [True: 136k, False: 34.2k]
  ------------------
  370|   136k|      int32_t iBlkIdx = i << 2;
  371|   136k|      i8x8NnzTab[i] = (pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx]] | pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 1]] |
  372|   136k|                       pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 2]] | pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 3]]);
  373|   136k|    }
  374|       |    //vertical
  375|  34.2k|    int8_t iIndex = g_kuiMbCountScan4Idx[1 << 2];
  376|  34.2k|    int8_t iNeigborIndex = g_kuiMbCountScan4Idx[0];
  377|  34.2k|    nBS[0][2][0] = nBS[0][2][1] = IN_BS_EDGE ((i8x8NnzTab[0] | i8x8NnzTab[1]), iRefs, pCurDqLayer->pDec->pMv, iMbXy,
  ------------------
  |  |  134|  34.2k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|  34.2k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|  34.2k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|  34.2k|(\
  |  |  |  |  106|  34.2k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 29.1k, False: 5.09k]
  |  |  |  |  |  Branch (106:62): [True: 28.2k, False: 832]
  |  |  |  |  ------------------
  |  |  |  |  107|  34.2k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 4.28k, False: 1.64k]
  |  |  |  |  |  Branch (107:61): [True: 3.88k, False: 399]
  |  |  |  |  ------------------
  |  |  |  |  108|  34.2k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 16.7k, False: 15.3k]
  |  |  |  |  ------------------
  |  |  |  |  109|  32.1k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 12.9k, False: 3.88k]
  |  |  |  |  ------------------
  |  |  |  |  110|  16.7k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  25.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  25.8k|(\
  |  |  |  |  |  |   73|  25.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  12.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 487, False: 12.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 524, False: 12.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  25.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  12.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 314, False: 12.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 345, False: 12.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  25.8k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  12.0k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  12.0k|(\
  |  |  |  |  |  |   73|  12.0k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  12.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 895, False: 11.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 956, False: 11.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  12.0k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  11.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 689, False: 10.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 736, False: 10.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  12.0k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  16.7k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  7.76k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  7.76k|(\
  |  |  |  |  |  |   73|  7.76k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.88k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 894, False: 2.98k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 628, False: 3.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  7.76k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.25k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 624, False: 2.63k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 637, False: 2.61k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  7.76k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.61k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  2.61k|(\
  |  |  |  |  |  |   73|  2.61k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.61k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.29k, False: 1.32k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 441, False: 2.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  2.61k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.17k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 324, False: 1.85k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 212, False: 1.96k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.61k|)
  |  |  |  |  ------------------
  |  |  |  |  112|  32.1k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.7k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  30.7k|(\
  |  |  |  |  |  |   73|  30.7k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  15.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.27k, False: 14.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.33k, False: 14.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  30.7k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  14.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.47k, False: 12.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 874, False: 13.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  30.7k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  13.1k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  13.1k|(\
  |  |  |  |  |  |   73|  13.1k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  13.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 732, False: 12.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 783, False: 12.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.1k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  12.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.18k, False: 11.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.07k, False: 11.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  13.1k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  15.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  8.13k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  8.13k|(\
  |  |  |  |  |  |   73|  8.13k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.06k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.44k, False: 2.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.36k, False: 2.70k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  8.13k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.70k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.10k, False: 1.60k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.38k, False: 1.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  8.13k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.31k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  1.31k|(\
  |  |  |  |  |  |   73|  1.31k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.31k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 690, False: 629]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 392, False: 927]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.31k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|    927|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 328, False: 599]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 332, False: 595]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  1.31k|)
  |  |  |  |  ------------------
  |  |  |  |  114|  34.2k|)
  |  |  ------------------
  ------------------
  378|  34.2k|                                  iIndex, iNeigborIndex);
  379|  34.2k|    iIndex = g_kuiMbCountScan4Idx[3 << 2];
  380|  34.2k|    iNeigborIndex = g_kuiMbCountScan4Idx[2 << 2];
  381|  34.2k|    nBS[0][2][2] = nBS[0][2][3] = IN_BS_EDGE ((i8x8NnzTab[2] | i8x8NnzTab[3]), iRefs, pCurDqLayer->pDec->pMv, iMbXy,
  ------------------
  |  |  134|  34.2k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|  34.2k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|  34.2k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|  34.2k|(\
  |  |  |  |  106|  34.2k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 29.1k, False: 5.03k]
  |  |  |  |  |  Branch (106:62): [True: 28.3k, False: 850]
  |  |  |  |  ------------------
  |  |  |  |  107|  34.2k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 4.21k, False: 1.66k]
  |  |  |  |  |  Branch (107:61): [True: 3.89k, False: 321]
  |  |  |  |  ------------------
  |  |  |  |  108|  34.2k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 14.3k, False: 17.8k]
  |  |  |  |  ------------------
  |  |  |  |  109|  32.2k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 10.4k, False: 3.89k]
  |  |  |  |  ------------------
  |  |  |  |  110|  14.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  20.9k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  20.9k|(\
  |  |  |  |  |  |   73|  20.9k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  10.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 493, False: 9.98k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 504, False: 9.97k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  20.9k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  9.97k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 527, False: 9.44k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 575, False: 9.39k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  20.9k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  9.39k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  9.39k|(\
  |  |  |  |  |  |   73|  9.39k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  9.39k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 892, False: 8.50k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.01k, False: 8.37k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  9.39k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  8.37k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 686, False: 7.69k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 731, False: 7.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  9.39k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  14.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  7.79k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  7.79k|(\
  |  |  |  |  |  |   73|  7.79k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.89k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 891, False: 3.00k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 622, False: 3.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  7.79k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.27k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 623, False: 2.65k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 641, False: 2.63k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  7.79k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.63k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  2.63k|(\
  |  |  |  |  |  |   73|  2.63k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.63k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.29k, False: 1.34k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 443, False: 2.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  2.63k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.18k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 314, False: 1.87k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 214, False: 1.97k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.63k|)
  |  |  |  |  ------------------
  |  |  |  |  112|  32.2k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  35.7k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  35.7k|(\
  |  |  |  |  |  |   73|  35.7k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  17.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.24k, False: 16.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.31k, False: 16.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  35.7k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  16.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.53k, False: 15.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 885, False: 15.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  35.7k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  15.6k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  15.6k|(\
  |  |  |  |  |  |   73|  15.6k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  15.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 735, False: 14.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 808, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  15.6k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  14.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.18k, False: 13.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.08k, False: 13.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  15.6k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  17.8k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  8.18k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  8.18k|(\
  |  |  |  |  |  |   73|  8.18k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.09k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.41k, False: 2.67k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.41k, False: 2.68k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  8.18k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.68k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 968, False: 1.71k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.32k, False: 1.35k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  8.18k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.35k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  1.35k|(\
  |  |  |  |  |  |   73|  1.35k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.35k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 701, False: 658]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 404, False: 955]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.35k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|    955|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 343, False: 612]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 359, False: 596]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  1.35k|)
  |  |  |  |  ------------------
  |  |  |  |  114|  34.2k|)
  |  |  ------------------
  ------------------
  382|  34.2k|                                  iIndex, iNeigborIndex);
  383|       |
  384|       |    //horizontal
  385|  34.2k|    iIndex = g_kuiMbCountScan4Idx[2 << 2];
  386|  34.2k|    iNeigborIndex = g_kuiMbCountScan4Idx[0];
  387|  34.2k|    nBS[1][2][0] = nBS[1][2][1] = IN_BS_EDGE ((i8x8NnzTab[0] | i8x8NnzTab[2]), iRefs, pCurDqLayer->pDec->pMv, iMbXy,
  ------------------
  |  |  134|  34.2k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|  34.2k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|  34.2k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|  34.2k|(\
  |  |  |  |  106|  34.2k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 29.4k, False: 4.78k]
  |  |  |  |  |  Branch (106:62): [True: 26.7k, False: 2.68k]
  |  |  |  |  ------------------
  |  |  |  |  107|  34.2k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 5.03k, False: 2.44k]
  |  |  |  |  |  Branch (107:61): [True: 4.12k, False: 907]
  |  |  |  |  ------------------
  |  |  |  |  108|  34.2k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 14.9k, False: 15.9k]
  |  |  |  |  ------------------
  |  |  |  |  109|  30.8k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 10.8k, False: 4.12k]
  |  |  |  |  ------------------
  |  |  |  |  110|  14.9k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  21.6k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  21.6k|(\
  |  |  |  |  |  |   73|  21.6k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  10.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 841, False: 9.96k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 575, False: 10.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  21.6k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  10.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 642, False: 9.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 751, False: 9.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  21.6k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  9.47k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  9.47k|(\
  |  |  |  |  |  |   73|  9.47k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  9.47k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 949, False: 8.52k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 792, False: 8.68k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  9.47k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  8.68k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 894, False: 7.79k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 944, False: 7.74k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  9.47k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  14.9k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  8.25k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  8.25k|(\
  |  |  |  |  |  |   73|  8.25k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.12k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 450, False: 3.67k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 505, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  8.25k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.62k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 433, False: 3.18k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 291, False: 3.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  8.25k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.33k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.33k|(\
  |  |  |  |  |  |   73|  3.33k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.33k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.91k, False: 1.41k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.83k, False: 1.49k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.33k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.49k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 446, False: 1.04k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 473, False: 1.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.33k|)
  |  |  |  |  ------------------
  |  |  |  |  112|  30.8k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  31.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  31.8k|(\
  |  |  |  |  |  |   73|  31.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  15.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 796, False: 15.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.10k, False: 14.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  31.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  14.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.21k, False: 13.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 935, False: 13.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  31.8k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  13.9k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  13.9k|(\
  |  |  |  |  |  |   73|  13.9k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  13.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 581, False: 13.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 589, False: 13.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.9k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  13.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.26k, False: 12.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 899, False: 12.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  13.9k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  15.9k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  7.04k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  7.04k|(\
  |  |  |  |  |  |   73|  7.04k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.52k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 764, False: 2.76k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.19k, False: 2.32k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  7.04k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.32k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.27k, False: 1.05k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.33k, False: 994]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  7.04k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|    994|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|    994|(\
  |  |  |  |  |  |   73|    994|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|    994|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 254, False: 740]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 283, False: 711]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|    994|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|    711|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 367, False: 344]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 404, False: 307]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    994|)
  |  |  |  |  ------------------
  |  |  |  |  114|  34.2k|)
  |  |  ------------------
  ------------------
  388|  34.2k|                                  iIndex, iNeigborIndex);
  389|       |
  390|  34.2k|    iIndex = g_kuiMbCountScan4Idx[3 << 2];
  391|  34.2k|    iNeigborIndex = g_kuiMbCountScan4Idx[1 << 2];
  392|  34.2k|    nBS[1][2][2] = nBS[1][2][3] = IN_BS_EDGE ((i8x8NnzTab[1] | i8x8NnzTab[3]), iRefs, pCurDqLayer->pDec->pMv, iMbXy,
  ------------------
  |  |  134|  34.2k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|  34.2k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|  34.2k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|  34.2k|(\
  |  |  |  |  106|  34.2k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 29.3k, False: 4.86k]
  |  |  |  |  |  Branch (106:62): [True: 26.7k, False: 2.60k]
  |  |  |  |  ------------------
  |  |  |  |  107|  34.2k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 5.00k, False: 2.46k]
  |  |  |  |  |  Branch (107:61): [True: 4.14k, False: 859]
  |  |  |  |  ------------------
  |  |  |  |  108|  34.2k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 14.8k, False: 16.0k]
  |  |  |  |  ------------------
  |  |  |  |  109|  30.8k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 10.6k, False: 4.14k]
  |  |  |  |  ------------------
  |  |  |  |  110|  14.8k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  21.3k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  21.3k|(\
  |  |  |  |  |  |   73|  21.3k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  10.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 857, False: 9.82k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 566, False: 10.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  21.3k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  10.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 639, False: 9.47k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 756, False: 9.35k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  21.3k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  9.35k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  9.35k|(\
  |  |  |  |  |  |   73|  9.35k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  9.35k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 949, False: 8.40k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 792, False: 8.56k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  9.35k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  8.56k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 892, False: 7.67k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 942, False: 7.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  9.35k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  14.8k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  8.28k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  8.28k|(\
  |  |  |  |  |  |   73|  8.28k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.14k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 451, False: 3.69k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 506, False: 3.63k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  8.28k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.63k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 436, False: 3.20k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 299, False: 3.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  8.28k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.33k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.33k|(\
  |  |  |  |  |  |   73|  3.33k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.33k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.92k, False: 1.41k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.84k, False: 1.49k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.33k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.49k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 450, False: 1.04k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 479, False: 1.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.33k|)
  |  |  |  |  ------------------
  |  |  |  |  112|  30.8k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  32.1k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  32.1k|(\
  |  |  |  |  |  |   73|  32.1k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  16.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 744, False: 15.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.10k, False: 14.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  32.1k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  14.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.19k, False: 13.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.10k, False: 13.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  32.1k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  13.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  13.8k|(\
  |  |  |  |  |  |   73|  13.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  13.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 574, False: 13.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 731, False: 13.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  13.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.26k, False: 11.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 945, False: 12.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  13.8k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  16.0k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  7.76k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  7.76k|(\
  |  |  |  |  |  |   73|  7.76k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.88k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 848, False: 3.03k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.43k, False: 2.44k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  7.76k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.44k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.32k, False: 1.11k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.41k, False: 1.03k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  7.76k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.03k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  1.03k|(\
  |  |  |  |  |  |   73|  1.03k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.03k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 268, False: 766]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 290, False: 744]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.03k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|    744|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 378, False: 366]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 432, False: 312]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  1.03k|)
  |  |  |  |  ------------------
  |  |  |  |  114|  34.2k|)
  |  |  ------------------
  ------------------
  393|  34.2k|                                  iIndex, iNeigborIndex);
  394|   166k|  } else {
  395|   166k|    uiNnz32b0 = * (uint32_t*) (pNnzTab + 0);
  396|   166k|    uiNnz32b1 = * (uint32_t*) (pNnzTab + 4);
  397|   166k|    uiNnz32b2 = * (uint32_t*) (pNnzTab + 8);
  398|   166k|    uiNnz32b3 = * (uint32_t*) (pNnzTab + 12);
  399|       |
  400|   667k|    for (int i = 0; i < 3; i++)
  ------------------
  |  Branch (400:21): [True: 500k, False: 166k]
  ------------------
  401|   500k|      uiBsx4[i] = pNnzTab[i] | pNnzTab[i + 1];
  402|   166k|    nBS[0][1][0] = IN_BS_EDGE (uiBsx4[0], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 1, 0);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 69.3k, False: 97.5k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 69.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  69.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   138k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   138k|(\
  |  |  |  |  |  |   73|   138k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  69.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.89k, False: 67.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 519, False: 68.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   138k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  68.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 845, False: 67.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 871, False: 67.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   138k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  67.9k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  67.9k|(\
  |  |  |  |  |  |   73|  67.9k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  67.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 636, False: 67.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 967, False: 66.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  67.9k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  66.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 477, False: 66.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 147, False: 66.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  67.9k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  69.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   195k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   195k|(\
  |  |  |  |  |  |   73|   195k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  97.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.01k, False: 94.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.10k, False: 95.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   195k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  95.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.85k, False: 93.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.95k, False: 92.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   195k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  92.5k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  92.5k|(\
  |  |  |  |  |  |   73|  92.5k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  92.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 663, False: 91.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 675, False: 91.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  92.5k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  91.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 410, False: 91.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 406, False: 91.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  92.5k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  97.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  12.2k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  12.2k|(\
  |  |  |  |  |  |   73|  12.2k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.14k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.42k, False: 3.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.83k, False: 4.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  12.2k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.31k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.57k, False: 2.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.39k, False: 2.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  12.2k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.91k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  2.91k|(\
  |  |  |  |  |  |   73|  2.91k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.91k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.16k, False: 1.74k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 773, False: 2.14k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  2.91k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.14k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 440, False: 1.70k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.82k, False: 319]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.91k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  403|   166k|    nBS[0][2][0] = IN_BS_EDGE (uiBsx4[1], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 2, 1);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 156k, False: 10.1k]
  |  |  |  |  |  Branch (106:62): [True: 150k, False: 6.26k]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 10.5k, False: 5.85k]
  |  |  |  |  |  Branch (107:61): [True: 6.77k, False: 3.75k]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 63.5k, False: 93.7k]
  |  |  |  |  ------------------
  |  |  |  |  109|   157k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 56.8k, False: 6.77k]
  |  |  |  |  ------------------
  |  |  |  |  110|  63.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   113k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   113k|(\
  |  |  |  |  |  |   73|   113k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  56.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.86k, False: 53.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.76k, False: 55.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   113k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  55.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.46k, False: 52.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.31k, False: 52.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   113k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  52.7k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  52.7k|(\
  |  |  |  |  |  |   73|  52.7k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  52.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.62k, False: 51.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.46k, False: 51.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  52.7k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  51.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.70k, False: 49.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 631, False: 50.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  52.7k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  63.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  13.5k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  13.5k|(\
  |  |  |  |  |  |   73|  13.5k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.77k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.27k, False: 5.50k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.32k, False: 5.45k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.45k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.52k, False: 3.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 629, False: 4.82k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  13.5k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  4.82k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  4.82k|(\
  |  |  |  |  |  |   73|  4.82k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.82k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.46k, False: 3.35k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 856, False: 3.96k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  4.82k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.96k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 681, False: 3.28k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 244, False: 3.72k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  4.82k|)
  |  |  |  |  ------------------
  |  |  |  |  112|   157k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   187k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   187k|(\
  |  |  |  |  |  |   73|   187k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  93.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 6.63k, False: 87.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 4.20k, False: 89.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   187k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  89.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 6.83k, False: 82.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 5.25k, False: 84.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   187k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  84.2k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  84.2k|(\
  |  |  |  |  |  |   73|  84.2k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  84.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.59k, False: 82.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 983, False: 83.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  84.2k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  83.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.44k, False: 81.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 748, False: 82.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  84.2k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  93.7k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  22.3k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  22.3k|(\
  |  |  |  |  |  |   73|  22.3k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  11.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.13k, False: 8.05k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 4.23k, False: 6.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.3k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.95k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.81k, False: 3.14k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 4.32k, False: 2.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  22.3k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.62k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  2.62k|(\
  |  |  |  |  |  |   73|  2.62k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.62k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.17k, False: 1.44k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.16k, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  2.62k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.46k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 625, False: 836]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 851, False: 610]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.62k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  404|   166k|    nBS[0][3][0] = IN_BS_EDGE (uiBsx4[2], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 3, 2);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 68.5k, False: 98.3k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 68.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  68.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   137k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   137k|(\
  |  |  |  |  |  |   73|   137k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  68.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.40k, False: 67.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 489, False: 68.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   137k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  68.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 743, False: 67.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 856, False: 67.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   137k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  67.1k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  67.1k|(\
  |  |  |  |  |  |   73|  67.1k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  67.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 580, False: 66.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 573, False: 66.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  67.1k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  66.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 371, False: 66.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 47, False: 66.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  67.1k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  68.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   196k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   196k|(\
  |  |  |  |  |  |   73|   196k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  98.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.55k, False: 95.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.09k, False: 96.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   196k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  96.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.30k, False: 94.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.58k, False: 93.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   196k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  93.7k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  93.7k|(\
  |  |  |  |  |  |   73|  93.7k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  93.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 764, False: 92.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 770, False: 92.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  93.7k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  92.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 393, False: 92.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 449, False: 92.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  93.7k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  98.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  11.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  11.8k|(\
  |  |  |  |  |  |   73|  11.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.90k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.43k, False: 4.47k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.63k, False: 4.26k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  11.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.26k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.32k, False: 1.94k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.37k, False: 2.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  11.8k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.89k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  2.89k|(\
  |  |  |  |  |  |   73|  2.89k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.89k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.66k, False: 1.23k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 891, False: 2.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  2.89k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.00k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 282, False: 1.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.82k, False: 183]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.89k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  405|       |
  406|   667k|    for (int i = 0; i < 3; i++)
  ------------------
  |  Branch (406:21): [True: 500k, False: 166k]
  ------------------
  407|   500k|      uiBsx4[i] = pNnzTab[4 + i] | pNnzTab[4 + i + 1];
  408|   166k|    nBS[0][1][1] = IN_BS_EDGE (uiBsx4[0], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 5, 4);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 69.3k, False: 97.5k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 69.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  69.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   138k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   138k|(\
  |  |  |  |  |  |   73|   138k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  69.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.06k, False: 67.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 625, False: 68.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   138k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  68.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 857, False: 67.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 924, False: 67.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   138k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  67.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  67.8k|(\
  |  |  |  |  |  |   73|  67.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  67.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 963, False: 66.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 608, False: 67.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  67.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  67.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 482, False: 66.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 161, False: 67.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  67.8k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  69.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   195k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   195k|(\
  |  |  |  |  |  |   73|   195k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  97.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.82k, False: 93.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.64k, False: 94.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   195k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  94.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.30k, False: 93.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 3.11k, False: 91.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   195k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  91.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  91.8k|(\
  |  |  |  |  |  |   73|  91.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  91.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 537, False: 91.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 544, False: 91.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  91.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  91.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 488, False: 90.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 578, False: 90.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  91.8k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  97.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  13.7k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  13.7k|(\
  |  |  |  |  |  |   73|  13.7k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.87k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.87k, False: 3.99k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.93k, False: 4.94k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.7k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.94k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.64k, False: 3.30k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.35k, False: 3.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  13.7k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.59k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.59k|(\
  |  |  |  |  |  |   73|  3.59k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.59k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.03k, False: 2.55k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.19k, False: 2.39k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.59k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.39k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 534, False: 1.86k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.26k, False: 129]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.59k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  409|   166k|    nBS[0][2][1] = IN_BS_EDGE (uiBsx4[1], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 6, 5);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 156k, False: 10.1k]
  |  |  |  |  |  Branch (106:62): [True: 150k, False: 6.26k]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 10.5k, False: 5.85k]
  |  |  |  |  |  Branch (107:61): [True: 6.77k, False: 3.75k]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 63.5k, False: 93.7k]
  |  |  |  |  ------------------
  |  |  |  |  109|   157k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 56.8k, False: 6.77k]
  |  |  |  |  ------------------
  |  |  |  |  110|  63.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   113k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   113k|(\
  |  |  |  |  |  |   73|   113k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  56.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.86k, False: 53.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.14k, False: 54.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   113k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  54.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.30k, False: 52.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.30k, False: 52.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   113k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  52.3k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  52.3k|(\
  |  |  |  |  |  |   73|  52.3k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  52.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.44k, False: 50.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.25k, False: 51.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  52.3k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  51.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.87k, False: 49.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 680, False: 50.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  52.3k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  63.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  13.5k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  13.5k|(\
  |  |  |  |  |  |   73|  13.5k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.77k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.01k, False: 5.76k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.05k, False: 5.72k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.72k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.53k, False: 4.19k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 572, False: 5.15k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  13.5k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  5.15k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  5.15k|(\
  |  |  |  |  |  |   73|  5.15k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.15k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.50k, False: 3.64k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 857, False: 4.29k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  5.15k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.29k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 675, False: 3.61k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 245, False: 4.04k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.15k|)
  |  |  |  |  ------------------
  |  |  |  |  112|   157k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   187k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   187k|(\
  |  |  |  |  |  |   73|   187k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  93.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 6.66k, False: 87.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 4.21k, False: 89.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   187k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  89.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 5.65k, False: 83.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 5.17k, False: 84.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   187k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  84.3k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  84.3k|(\
  |  |  |  |  |  |   73|  84.3k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  84.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.83k, False: 82.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.25k, False: 83.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  84.3k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  83.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.57k, False: 81.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 835, False: 82.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  84.3k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  93.7k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  22.9k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  22.9k|(\
  |  |  |  |  |  |   73|  22.9k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  11.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.44k, False: 8.04k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 4.57k, False: 6.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.9k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.91k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.78k, False: 3.12k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 4.13k, False: 2.77k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  22.9k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.77k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  2.77k|(\
  |  |  |  |  |  |   73|  2.77k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.77k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.23k, False: 1.54k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 964, False: 1.81k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  2.77k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.81k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 992, False: 821]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.22k, False: 593]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.77k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  410|   166k|    nBS[0][3][1] = IN_BS_EDGE (uiBsx4[2], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 7, 6);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 68.5k, False: 98.3k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 68.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  68.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   137k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   137k|(\
  |  |  |  |  |  |   73|   137k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  68.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.37k, False: 67.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 549, False: 67.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   137k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  67.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 737, False: 67.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 812, False: 67.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   137k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  67.1k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  67.1k|(\
  |  |  |  |  |  |   73|  67.1k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  67.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 594, False: 66.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 586, False: 66.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  67.1k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  66.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 366, False: 66.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 50, False: 66.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  67.1k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  68.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   196k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   196k|(\
  |  |  |  |  |  |   73|   196k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  98.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 4.14k, False: 94.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.79k, False: 95.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   196k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  95.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.36k, False: 94.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.02k, False: 93.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   196k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  93.5k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  93.5k|(\
  |  |  |  |  |  |   73|  93.5k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  93.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 506, False: 93.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 574, False: 92.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  93.5k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  92.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 566, False: 92.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 523, False: 92.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  93.5k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  98.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  11.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  11.8k|(\
  |  |  |  |  |  |   73|  11.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.92k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.66k, False: 4.25k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.85k, False: 4.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  11.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.06k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.98k, False: 2.07k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.43k, False: 2.63k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  11.8k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.63k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  2.63k|(\
  |  |  |  |  |  |   73|  2.63k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.63k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.40k, False: 1.23k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 855, False: 1.78k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  2.63k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.78k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 519, False: 1.26k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.26k, False: 512]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.63k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  411|       |
  412|   667k|    for (int i = 0; i < 3; i++)
  ------------------
  |  Branch (412:21): [True: 500k, False: 166k]
  ------------------
  413|   500k|      uiBsx4[i] = pNnzTab[8 + i] | pNnzTab[8 + i + 1];
  414|   166k|    nBS[0][1][2] = IN_BS_EDGE (uiBsx4[0], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 9, 8);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 66.5k, False: 100k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 66.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  66.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   133k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   133k|(\
  |  |  |  |  |  |   73|   133k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  66.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.63k, False: 64.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 618, False: 65.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   133k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  65.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.39k, False: 64.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.28k, False: 64.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   133k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  64.6k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  64.6k|(\
  |  |  |  |  |  |   73|  64.6k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  64.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 636, False: 64.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 579, False: 64.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  64.6k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  64.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 399, False: 63.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 86, False: 63.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  64.6k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  66.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   200k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   200k|(\
  |  |  |  |  |  |   73|   200k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|   100k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 6.03k, False: 94.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 3.36k, False: 97.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   200k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  97.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.87k, False: 94.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 4.18k, False: 92.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   200k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  92.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  92.8k|(\
  |  |  |  |  |  |   73|  92.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  92.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.18k, False: 91.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 999, False: 91.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  92.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  91.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 499, False: 91.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 438, False: 91.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  92.8k|)
  |  |  |  |  ------------------
  |  |  |  |  113|   100k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  17.9k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  17.9k|(\
  |  |  |  |  |  |   73|  17.9k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  8.98k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.13k, False: 5.84k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.71k, False: 6.26k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  17.9k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.26k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.60k, False: 3.65k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.63k, False: 3.63k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  17.9k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.63k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.63k|(\
  |  |  |  |  |  |   73|  3.63k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.63k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.13k, False: 1.49k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.51k, False: 2.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.63k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.11k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 595, False: 1.52k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.56k, False: 547]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.63k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  415|   166k|    nBS[0][2][2] = IN_BS_EDGE (uiBsx4[1], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 10, 9);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 155k, False: 10.9k]
  |  |  |  |  |  Branch (106:62): [True: 151k, False: 4.71k]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 9.83k, False: 5.87k]
  |  |  |  |  |  Branch (107:61): [True: 6.34k, False: 3.48k]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 60.0k, False: 97.5k]
  |  |  |  |  ------------------
  |  |  |  |  109|   157k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 53.6k, False: 6.34k]
  |  |  |  |  ------------------
  |  |  |  |  110|  60.0k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   107k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   107k|(\
  |  |  |  |  |  |   73|   107k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  53.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.73k, False: 50.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.72k, False: 51.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   107k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  51.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.23k, False: 49.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.23k, False: 49.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   107k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  49.7k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  49.7k|(\
  |  |  |  |  |  |   73|  49.7k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  49.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.76k, False: 47.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.41k, False: 48.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  49.7k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  48.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.78k, False: 46.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 719, False: 47.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  49.7k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  60.0k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  12.6k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  12.6k|(\
  |  |  |  |  |  |   73|  12.6k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.34k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 947, False: 5.39k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 922, False: 5.41k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  12.6k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.41k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.50k, False: 3.91k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 610, False: 4.80k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  12.6k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  4.80k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  4.80k|(\
  |  |  |  |  |  |   73|  4.80k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.80k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.35k, False: 3.45k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 916, False: 3.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  4.80k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.89k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 685, False: 3.20k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 270, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  4.80k|)
  |  |  |  |  ------------------
  |  |  |  |  112|   157k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   195k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   195k|(\
  |  |  |  |  |  |   73|   195k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  97.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 8.24k, False: 89.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 4.87k, False: 92.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   195k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  92.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 4.98k, False: 87.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 5.23k, False: 87.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   195k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  87.4k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  87.4k|(\
  |  |  |  |  |  |   73|  87.4k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  87.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.61k, False: 85.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.49k, False: 85.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  87.4k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  85.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.13k, False: 84.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 770, False: 85.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  87.4k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  97.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  24.7k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  24.7k|(\
  |  |  |  |  |  |   73|  24.7k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  12.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 5.44k, False: 6.92k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 5.46k, False: 6.89k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  24.7k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.89k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 4.36k, False: 2.53k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 3.84k, False: 3.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  24.7k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.05k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.05k|(\
  |  |  |  |  |  |   73|  3.05k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.05k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.04k, False: 2.00k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 952, False: 2.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.05k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.09k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.15k, False: 945]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.34k, False: 758]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.05k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  416|   166k|    nBS[0][3][2] = IN_BS_EDGE (uiBsx4[2], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 11, 10);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 63.6k, False: 103k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 63.6k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  63.6k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   127k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   127k|(\
  |  |  |  |  |  |   73|   127k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  63.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.16k, False: 62.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 404, False: 63.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   127k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  63.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 795, False: 62.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 663, False: 62.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   127k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  62.6k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  62.6k|(\
  |  |  |  |  |  |   73|  62.6k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  62.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 535, False: 62.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 544, False: 62.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  62.6k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  62.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 357, False: 61.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 62, False: 62.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  62.6k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  63.6k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   206k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   206k|(\
  |  |  |  |  |  |   73|   206k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|   103k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.03k, False: 101k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.14k, False: 101k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   206k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|   101k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.54k, False: 98.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.32k, False: 98.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   206k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  98.7k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  98.7k|(\
  |  |  |  |  |  |   73|  98.7k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  98.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 773, False: 97.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 772, False: 97.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  98.7k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  97.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 424, False: 97.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 515, False: 97.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  98.7k|)
  |  |  |  |  ------------------
  |  |  |  |  113|   103k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  11.5k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  11.5k|(\
  |  |  |  |  |  |   73|  11.5k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.76k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.53k, False: 4.22k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.34k, False: 3.41k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  11.5k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.41k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.60k, False: 1.81k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.05k, False: 1.35k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  11.5k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.35k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  1.35k|(\
  |  |  |  |  |  |   73|  1.35k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.35k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 409, False: 950]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 789, False: 570]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.35k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|    570|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 252, False: 318]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 346, False: 224]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  1.35k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  417|       |
  418|   667k|    for (int i = 0; i < 3; i++)
  ------------------
  |  Branch (418:21): [True: 500k, False: 166k]
  ------------------
  419|   500k|      uiBsx4[i] = pNnzTab[12 + i] | pNnzTab[12 + i + 1];
  420|   166k|    nBS[0][1][3] = IN_BS_EDGE (uiBsx4[0], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 13, 12);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 66.5k, False: 100k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 66.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  66.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   133k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   133k|(\
  |  |  |  |  |  |   73|   133k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  66.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.43k, False: 65.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 579, False: 65.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   133k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  65.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.08k, False: 64.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.20k, False: 64.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   133k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  64.7k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  64.7k|(\
  |  |  |  |  |  |   73|  64.7k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  64.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 701, False: 64.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 624, False: 64.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  64.7k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  64.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 439, False: 63.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 60, False: 64.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  64.7k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  66.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   200k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   200k|(\
  |  |  |  |  |  |   73|   200k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|   100k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 5.47k, False: 94.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 3.63k, False: 96.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   200k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  96.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.39k, False: 94.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 3.45k, False: 93.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   200k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  93.2k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  93.2k|(\
  |  |  |  |  |  |   73|  93.2k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  93.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 726, False: 92.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 557, False: 92.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  93.2k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  92.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 528, False: 92.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 481, False: 92.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  93.2k|)
  |  |  |  |  ------------------
  |  |  |  |  113|   100k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  16.2k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  16.2k|(\
  |  |  |  |  |  |   73|  16.2k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  8.13k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.09k, False: 5.04k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 3.04k, False: 5.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  16.2k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.08k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.82k, False: 3.26k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.16k, False: 2.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  16.2k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.92k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  2.92k|(\
  |  |  |  |  |  |   73|  2.92k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.92k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.42k, False: 1.49k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.39k, False: 1.52k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  2.92k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.52k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 322, False: 1.20k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.38k, False: 141]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.92k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  421|   166k|    nBS[0][2][3] = IN_BS_EDGE (uiBsx4[1], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 14, 13);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 155k, False: 10.9k]
  |  |  |  |  |  Branch (106:62): [True: 151k, False: 4.71k]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 9.83k, False: 5.87k]
  |  |  |  |  |  Branch (107:61): [True: 6.34k, False: 3.48k]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 60.0k, False: 97.5k]
  |  |  |  |  ------------------
  |  |  |  |  109|   157k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 53.6k, False: 6.34k]
  |  |  |  |  ------------------
  |  |  |  |  110|  60.0k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   107k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   107k|(\
  |  |  |  |  |  |   73|   107k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  53.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.26k, False: 50.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.09k, False: 51.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   107k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  51.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.86k, False: 48.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.68k, False: 48.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   107k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  48.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  48.8k|(\
  |  |  |  |  |  |   73|  48.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  48.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.55k, False: 47.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.25k, False: 47.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  48.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  47.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.63k, False: 46.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 718, False: 46.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  48.8k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  60.0k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  12.6k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  12.6k|(\
  |  |  |  |  |  |   73|  12.6k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.34k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 947, False: 5.39k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 932, False: 5.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  12.6k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.40k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.50k, False: 3.90k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 613, False: 4.79k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  12.6k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  4.79k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  4.79k|(\
  |  |  |  |  |  |   73|  4.79k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.79k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.36k, False: 3.43k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 923, False: 3.87k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  4.79k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.87k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 693, False: 3.18k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 270, False: 3.60k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  4.79k|)
  |  |  |  |  ------------------
  |  |  |  |  112|   157k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   195k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   195k|(\
  |  |  |  |  |  |   73|   195k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  97.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 6.98k, False: 90.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 4.37k, False: 93.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   195k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  93.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 6.46k, False: 86.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 5.36k, False: 87.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   195k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  87.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  87.8k|(\
  |  |  |  |  |  |   73|  87.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  87.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.78k, False: 86.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.66k, False: 86.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  87.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  86.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.12k, False: 85.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 836, False: 85.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  87.8k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  97.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  24.4k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  24.4k|(\
  |  |  |  |  |  |   73|  24.4k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  12.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 4.08k, False: 8.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 5.04k, False: 7.20k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  24.4k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  7.20k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 4.02k, False: 3.17k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 4.21k, False: 2.98k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  24.4k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.98k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  2.98k|(\
  |  |  |  |  |  |   73|  2.98k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.98k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.54k, False: 1.44k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.21k, False: 1.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  2.98k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.76k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 757, False: 1.01k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.25k, False: 516]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.98k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  422|   166k|    nBS[0][3][3] = IN_BS_EDGE (uiBsx4[2], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 15, 14);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 63.6k, False: 103k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 63.6k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  63.6k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   127k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   127k|(\
  |  |  |  |  |  |   73|   127k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  63.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.18k, False: 62.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 391, False: 63.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   127k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  63.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 797, False: 62.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 691, False: 62.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   127k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  62.5k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  62.5k|(\
  |  |  |  |  |  |   73|  62.5k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  62.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 525, False: 62.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 562, False: 62.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  62.5k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  62.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 353, False: 61.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 63, False: 61.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  62.5k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  63.6k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   206k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   206k|(\
  |  |  |  |  |  |   73|   206k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|   103k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.49k, False: 100k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.20k, False: 101k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   206k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|   101k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.61k, False: 98.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.83k, False: 98.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   206k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  98.2k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  98.2k|(\
  |  |  |  |  |  |   73|  98.2k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  98.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 540, False: 97.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 541, False: 97.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  98.2k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  97.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 434, False: 97.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 482, False: 97.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  98.2k|)
  |  |  |  |  ------------------
  |  |  |  |  113|   103k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  12.1k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  12.1k|(\
  |  |  |  |  |  |   73|  12.1k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.06k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.57k, False: 4.49k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.36k, False: 3.70k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  12.1k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.70k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.65k, False: 2.05k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.27k, False: 1.43k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  12.1k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  1.43k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  1.43k|(\
  |  |  |  |  |  |   73|  1.43k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.43k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 640, False: 793]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 783, False: 650]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.43k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|    650|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 273, False: 377]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 363, False: 287]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  1.43k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  423|       |
  424|       |    // horizontal
  425|   166k|    * (uint32_t*)uiBsx4 = (uiNnz32b0 | uiNnz32b1);
  426|   166k|    nBS[1][1][0] = IN_BS_EDGE (uiBsx4[0], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 4, 0);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 69.3k, False: 97.5k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 69.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  69.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   138k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   138k|(\
  |  |  |  |  |  |   73|   138k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  69.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.07k, False: 68.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 848, False: 68.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   138k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  68.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 870, False: 67.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.05k, False: 67.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   138k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  67.4k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  67.4k|(\
  |  |  |  |  |  |   73|  67.4k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  67.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 904, False: 66.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.01k, False: 66.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  67.4k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  66.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 398, False: 66.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 281, False: 66.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  67.4k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  69.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   195k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   195k|(\
  |  |  |  |  |  |   73|   195k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  97.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.75k, False: 94.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.26k, False: 95.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   195k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  95.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.24k, False: 93.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.39k, False: 92.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   195k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  92.9k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  92.9k|(\
  |  |  |  |  |  |   73|  92.9k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  92.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.48k, False: 91.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.37k, False: 91.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  92.9k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  91.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.04k, False: 90.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 540, False: 90.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  92.9k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  97.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  13.1k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  13.1k|(\
  |  |  |  |  |  |   73|  13.1k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.57k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.26k, False: 4.30k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.11k, False: 4.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.1k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.46k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.88k, False: 2.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.34k, False: 3.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  13.1k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.11k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.11k|(\
  |  |  |  |  |  |   73|  3.11k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.11k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 873, False: 2.24k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.02k, False: 2.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.11k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.09k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.40k, False: 694]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.47k, False: 616]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.11k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  427|   166k|    nBS[1][1][1] = IN_BS_EDGE (uiBsx4[1], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 5, 1);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 69.3k, False: 97.5k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 69.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  69.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   138k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   138k|(\
  |  |  |  |  |  |   73|   138k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  69.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.28k, False: 68.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 971, False: 68.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   138k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  68.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 852, False: 67.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 907, False: 67.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   138k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  67.4k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  67.4k|(\
  |  |  |  |  |  |   73|  67.4k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  67.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.23k, False: 66.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.37k, False: 66.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  67.4k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  66.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 364, False: 65.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 266, False: 65.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  67.4k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  69.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   195k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   195k|(\
  |  |  |  |  |  |   73|   195k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  97.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.72k, False: 94.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.00k, False: 95.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   195k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  95.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.56k, False: 92.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.90k, False: 92.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   195k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  92.6k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  92.6k|(\
  |  |  |  |  |  |   73|  92.6k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  92.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.26k, False: 91.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.19k, False: 91.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  92.6k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  91.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.04k, False: 90.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 535, False: 90.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  92.6k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  97.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  13.2k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  13.2k|(\
  |  |  |  |  |  |   73|  13.2k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.64k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.48k, False: 4.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.67k, False: 4.97k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.2k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.97k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.82k, False: 3.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.30k, False: 3.66k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  13.2k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.66k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.66k|(\
  |  |  |  |  |  |   73|  3.66k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.66k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 895, False: 2.76k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 933, False: 2.72k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.66k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.72k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.95k, False: 778]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.01k, False: 718]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.66k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  428|   166k|    nBS[1][1][2] = IN_BS_EDGE (uiBsx4[2], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 6, 2);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 68.5k, False: 98.3k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 68.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  68.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   137k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   137k|(\
  |  |  |  |  |  |   73|   137k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  68.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.32k, False: 67.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.10k, False: 67.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   137k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  67.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.17k, False: 66.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.57k, False: 65.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   137k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  65.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  65.8k|(\
  |  |  |  |  |  |   73|  65.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  65.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 602, False: 65.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 661, False: 65.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  65.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  65.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 486, False: 64.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 288, False: 64.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  65.8k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  68.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   196k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   196k|(\
  |  |  |  |  |  |   73|   196k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  98.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.02k, False: 96.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.20k, False: 97.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   196k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  97.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.16k, False: 94.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 3.36k, False: 93.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   196k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  93.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  93.8k|(\
  |  |  |  |  |  |   73|  93.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  93.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.57k, False: 92.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.37k, False: 92.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  93.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  92.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.03k, False: 91.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 483, False: 91.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  93.8k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  98.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  12.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  12.8k|(\
  |  |  |  |  |  |   73|  12.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.42k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.55k, False: 4.86k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.54k, False: 4.88k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  12.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.88k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.58k, False: 2.30k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.85k, False: 3.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  12.8k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.02k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.02k|(\
  |  |  |  |  |  |   73|  3.02k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.02k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.68k, False: 1.34k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 444, False: 2.58k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.02k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.58k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.13k, False: 1.44k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.91k, False: 667]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.02k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  429|   166k|    nBS[1][1][3] = IN_BS_EDGE (uiBsx4[3], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 7, 3);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 68.5k, False: 98.3k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 68.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  68.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   137k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   137k|(\
  |  |  |  |  |  |   73|   137k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  68.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.28k, False: 67.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.14k, False: 67.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   137k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  67.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.21k, False: 66.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.60k, False: 65.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   137k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  65.7k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  65.7k|(\
  |  |  |  |  |  |   73|  65.7k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  65.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 615, False: 65.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 665, False: 65.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  65.7k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  65.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 431, False: 64.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 280, False: 64.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  65.7k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  68.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   196k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   196k|(\
  |  |  |  |  |  |   73|   196k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  98.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.92k, False: 95.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.55k, False: 96.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   196k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  96.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.97k, False: 93.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.53k, False: 94.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   196k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  94.3k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  94.3k|(\
  |  |  |  |  |  |   73|  94.3k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  94.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.20k, False: 93.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.28k, False: 93.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  94.3k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  93.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 955, False: 92.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 495, False: 92.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  94.3k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  98.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  11.7k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  11.7k|(\
  |  |  |  |  |  |   73|  11.7k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.87k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.56k, False: 4.30k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.83k, False: 4.03k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  11.7k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.03k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.88k, False: 2.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.70k, False: 2.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  11.7k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.33k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  2.33k|(\
  |  |  |  |  |  |   73|  2.33k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.33k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.01k, False: 1.31k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 535, False: 1.79k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  2.33k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.79k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.09k, False: 698]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.22k, False: 574]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.33k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  430|       |
  431|   166k|    * (uint32_t*)uiBsx4 = (uiNnz32b1 | uiNnz32b2);
  432|   166k|    nBS[1][2][0] = IN_BS_EDGE (uiBsx4[0], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 8, 4);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 155k, False: 10.9k]
  |  |  |  |  |  Branch (106:62): [True: 148k, False: 7.82k]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 11.4k, False: 7.35k]
  |  |  |  |  |  Branch (107:61): [True: 5.81k, False: 5.60k]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 61.2k, False: 92.7k]
  |  |  |  |  ------------------
  |  |  |  |  109|   153k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 55.3k, False: 5.81k]
  |  |  |  |  ------------------
  |  |  |  |  110|  61.2k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   110k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   110k|(\
  |  |  |  |  |  |   73|   110k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  55.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.81k, False: 51.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.85k, False: 53.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   110k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  53.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.66k, False: 49.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.47k, False: 51.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   110k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  51.0k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  51.0k|(\
  |  |  |  |  |  |   73|  51.0k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  51.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.60k, False: 48.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.20k, False: 48.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  51.0k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  48.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.25k, False: 46.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 577, False: 48.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  51.0k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  61.2k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  11.6k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  11.6k|(\
  |  |  |  |  |  |   73|  11.6k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.81k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.01k, False: 4.79k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.26k, False: 4.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  11.6k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.55k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 382, False: 4.17k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.22k, False: 3.32k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  11.6k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.32k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.32k|(\
  |  |  |  |  |  |   73|  3.32k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.32k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.07k, False: 2.25k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 781, False: 2.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.32k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.54k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 591, False: 1.95k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 418, False: 2.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.32k|)
  |  |  |  |  ------------------
  |  |  |  |  112|   153k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   185k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   185k|(\
  |  |  |  |  |  |   73|   185k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  92.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 7.05k, False: 85.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 5.94k, False: 86.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   185k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  86.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 7.02k, False: 79.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 5.66k, False: 81.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   185k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  81.1k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  81.1k|(\
  |  |  |  |  |  |   73|  81.1k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  81.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.40k, False: 77.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.70k, False: 78.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  81.1k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  78.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.46k, False: 76.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.12k, False: 77.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  81.1k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  92.7k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  30.8k|(\
  |  |  |  |  |  |   73|  30.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  15.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.96k, False: 11.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 6.03k, False: 9.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  30.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  9.40k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 5.51k, False: 3.88k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 5.24k, False: 4.16k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  30.8k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  4.16k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  4.16k|(\
  |  |  |  |  |  |   73|  4.16k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.16k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.16k, False: 2.00k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.87k, False: 2.28k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  4.16k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.28k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 735, False: 1.54k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.57k, False: 706]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  4.16k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  433|   166k|    nBS[1][2][1] = IN_BS_EDGE (uiBsx4[1], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 9, 5);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 155k, False: 10.9k]
  |  |  |  |  |  Branch (106:62): [True: 148k, False: 7.82k]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 11.4k, False: 7.35k]
  |  |  |  |  |  Branch (107:61): [True: 5.81k, False: 5.60k]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 61.2k, False: 92.7k]
  |  |  |  |  ------------------
  |  |  |  |  109|   153k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 55.3k, False: 5.81k]
  |  |  |  |  ------------------
  |  |  |  |  110|  61.2k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   110k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   110k|(\
  |  |  |  |  |  |   73|   110k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  55.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.47k, False: 51.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.82k, False: 53.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   110k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  53.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 4.33k, False: 49.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.83k, False: 50.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   110k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  50.7k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  50.7k|(\
  |  |  |  |  |  |   73|  50.7k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  50.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.66k, False: 48.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.21k, False: 48.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  50.7k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  48.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.28k, False: 46.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 688, False: 47.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  50.7k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  61.2k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  11.6k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  11.6k|(\
  |  |  |  |  |  |   73|  11.6k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.81k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.01k, False: 4.79k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.27k, False: 4.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  11.6k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.54k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 367, False: 4.17k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.22k, False: 3.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  11.6k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.31k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.31k|(\
  |  |  |  |  |  |   73|  3.31k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.31k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.08k, False: 2.23k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 815, False: 2.50k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.31k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.50k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 592, False: 1.91k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 417, False: 2.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.31k|)
  |  |  |  |  ------------------
  |  |  |  |  112|   153k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   185k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   185k|(\
  |  |  |  |  |  |   73|   185k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  92.7k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 6.50k, False: 86.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 4.42k, False: 88.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   185k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  88.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 8.00k, False: 80.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 6.19k, False: 82.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   185k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  82.1k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  82.1k|(\
  |  |  |  |  |  |   73|  82.1k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  82.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.49k, False: 78.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.80k, False: 79.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  82.1k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  79.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.52k, False: 77.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.16k, False: 78.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  82.1k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  92.7k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  29.2k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  29.2k|(\
  |  |  |  |  |  |   73|  29.2k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  14.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 4.54k, False: 10.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 5.14k, False: 9.45k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  29.2k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  9.45k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 5.87k, False: 3.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 5.97k, False: 3.48k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  29.2k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.48k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.48k|(\
  |  |  |  |  |  |   73|  3.48k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.48k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.58k, False: 1.89k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.64k, False: 1.83k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.48k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.83k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 645, False: 1.19k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 907, False: 932]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.48k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  434|   166k|    nBS[1][2][2] = IN_BS_EDGE (uiBsx4[2], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 10, 6);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 156k, False: 10.3k]
  |  |  |  |  |  Branch (106:62): [True: 146k, False: 9.80k]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 12.0k, False: 8.15k]
  |  |  |  |  |  Branch (107:61): [True: 6.30k, False: 5.73k]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 58.7k, False: 94.3k]
  |  |  |  |  ------------------
  |  |  |  |  109|   153k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 52.4k, False: 6.30k]
  |  |  |  |  ------------------
  |  |  |  |  110|  58.7k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   104k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   104k|(\
  |  |  |  |  |  |   73|   104k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  52.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.67k, False: 48.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.22k, False: 50.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   104k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  50.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.84k, False: 46.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.49k, False: 47.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   104k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  47.6k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  47.6k|(\
  |  |  |  |  |  |   73|  47.6k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  47.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.92k, False: 44.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.45k, False: 45.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  47.6k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  45.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.11k, False: 43.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 552, False: 44.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  47.6k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  58.7k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  12.6k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  12.6k|(\
  |  |  |  |  |  |   73|  12.6k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.30k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 910, False: 5.39k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.11k, False: 5.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  12.6k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.18k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 535, False: 4.64k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.22k, False: 3.96k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  12.6k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.96k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.96k|(\
  |  |  |  |  |  |   73|  3.96k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.96k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.19k, False: 2.77k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 933, False: 3.03k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.96k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.03k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 596, False: 2.43k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 413, False: 2.61k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.96k|)
  |  |  |  |  ------------------
  |  |  |  |  112|   153k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   188k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   188k|(\
  |  |  |  |  |  |   73|   188k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  94.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 9.99k, False: 84.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 5.75k, False: 88.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   188k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  88.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 6.58k, False: 81.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 5.20k, False: 83.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   188k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  83.3k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  83.3k|(\
  |  |  |  |  |  |   73|  83.3k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  83.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.33k, False: 80.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.67k, False: 80.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  83.3k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  80.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.54k, False: 79.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.23k, False: 79.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  83.3k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  94.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  29.7k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  29.7k|(\
  |  |  |  |  |  |   73|  29.7k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  14.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 5.85k, False: 9.01k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 5.57k, False: 9.29k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  29.7k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  9.29k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 5.18k, False: 4.11k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 4.51k, False: 4.78k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  29.7k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  4.78k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  4.78k|(\
  |  |  |  |  |  |   73|  4.78k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.78k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.31k, False: 2.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.00k, False: 2.77k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  4.78k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.77k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.43k, False: 1.34k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.04k, False: 1.73k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  4.78k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  435|   166k|    nBS[1][2][3] = IN_BS_EDGE (uiBsx4[3], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 11, 7);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 156k, False: 10.3k]
  |  |  |  |  |  Branch (106:62): [True: 146k, False: 9.80k]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 12.0k, False: 8.15k]
  |  |  |  |  |  Branch (107:61): [True: 6.30k, False: 5.73k]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 58.7k, False: 94.3k]
  |  |  |  |  ------------------
  |  |  |  |  109|   153k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 52.4k, False: 6.30k]
  |  |  |  |  ------------------
  |  |  |  |  110|  58.7k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   104k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   104k|(\
  |  |  |  |  |  |   73|   104k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  52.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.77k, False: 48.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.30k, False: 50.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   104k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  50.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.88k, False: 46.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.73k, False: 47.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   104k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  47.3k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  47.3k|(\
  |  |  |  |  |  |   73|  47.3k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  47.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.91k, False: 44.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.50k, False: 44.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  47.3k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  44.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.11k, False: 42.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 551, False: 44.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  47.3k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  58.7k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  12.6k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  12.6k|(\
  |  |  |  |  |  |   73|  12.6k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  6.30k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 914, False: 5.38k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.13k, False: 5.16k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  12.6k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.16k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 536, False: 4.63k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.22k, False: 3.94k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  12.6k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.94k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.94k|(\
  |  |  |  |  |  |   73|  3.94k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.94k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.17k, False: 2.76k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 963, False: 2.98k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.94k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.98k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 582, False: 2.40k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 423, False: 2.55k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.94k|)
  |  |  |  |  ------------------
  |  |  |  |  112|   153k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   188k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   188k|(\
  |  |  |  |  |  |   73|   188k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  94.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 9.19k, False: 85.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 6.28k, False: 88.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   188k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  88.0k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 7.18k, False: 80.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 6.21k, False: 81.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   188k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  81.8k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  81.8k|(\
  |  |  |  |  |  |   73|  81.8k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  81.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.54k, False: 78.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.83k, False: 78.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  81.8k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  78.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.48k, False: 77.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.17k, False: 77.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  81.8k|)
  |  |  |  |  ------------------
  |  |  |  |  113|  94.3k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  33.0k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  33.0k|(\
  |  |  |  |  |  |   73|  33.0k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  16.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 6.40k, False: 10.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 5.85k, False: 10.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  33.0k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  10.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 6.27k, False: 4.37k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 5.85k, False: 4.80k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  33.0k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  4.80k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  4.80k|(\
  |  |  |  |  |  |   73|  4.80k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.80k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.33k, False: 2.47k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.46k, False: 2.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  4.80k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.33k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.30k, False: 1.02k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 982, False: 1.35k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  4.80k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  436|       |
  437|   166k|    * (uint32_t*)uiBsx4 = (uiNnz32b2 | uiNnz32b3);
  438|   166k|    nBS[1][3][0] = IN_BS_EDGE (uiBsx4[0], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 12, 8);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 66.5k, False: 100k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 66.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  66.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   133k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   133k|(\
  |  |  |  |  |  |   73|   133k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  66.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.84k, False: 64.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.00k, False: 65.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   133k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  65.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 681, False: 64.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 916, False: 64.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   133k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  64.6k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  64.6k|(\
  |  |  |  |  |  |   73|  64.6k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  64.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.22k, False: 63.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.32k, False: 63.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  64.6k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  63.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 839, False: 62.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 624, False: 62.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  64.6k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  66.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   200k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   200k|(\
  |  |  |  |  |  |   73|   200k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|   100k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.07k, False: 97.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.70k, False: 98.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   200k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  98.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.83k, False: 96.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.43k, False: 96.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   200k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  96.2k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  96.2k|(\
  |  |  |  |  |  |   73|  96.2k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  96.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.56k, False: 93.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.55k, False: 93.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  96.2k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  93.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 940, False: 92.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 975, False: 92.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  96.2k|)
  |  |  |  |  ------------------
  |  |  |  |  113|   100k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  15.3k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  15.3k|(\
  |  |  |  |  |  |   73|  15.3k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  7.67k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.08k, False: 5.59k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.56k, False: 5.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  15.3k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.11k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.54k, False: 1.56k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.10k, False: 3.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  15.3k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.01k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.01k|(\
  |  |  |  |  |  |   73|  3.01k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.01k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.09k, False: 912]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.14k, False: 1.86k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.01k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.86k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 725, False: 1.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.34k, False: 522]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.01k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  439|   166k|    nBS[1][3][1] = IN_BS_EDGE (uiBsx4[1], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 13, 9);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 66.5k, False: 100k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 66.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  66.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   133k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   133k|(\
  |  |  |  |  |  |   73|   133k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  66.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.17k, False: 65.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 857, False: 65.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   133k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  65.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 690, False: 65.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.32k, False: 64.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   133k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  64.3k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  64.3k|(\
  |  |  |  |  |  |   73|  64.3k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  64.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.26k, False: 63.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.27k, False: 63.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  64.3k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  63.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 838, False: 62.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 626, False: 62.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  64.3k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  66.5k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   200k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   200k|(\
  |  |  |  |  |  |   73|   200k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|   100k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.08k, False: 98.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.25k, False: 98.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   200k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  98.1k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.03k, False: 96.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.59k, False: 95.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   200k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  95.5k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  95.5k|(\
  |  |  |  |  |  |   73|  95.5k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  95.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.22k, False: 93.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.13k, False: 93.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  95.5k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  93.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 944, False: 92.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 975, False: 92.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  95.5k|)
  |  |  |  |  ------------------
  |  |  |  |  113|   100k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  15.9k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  15.9k|(\
  |  |  |  |  |  |   73|  15.9k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  7.96k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.28k, False: 5.68k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 3.00k, False: 4.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  15.9k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  4.95k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.36k, False: 1.59k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.44k, False: 2.51k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  15.9k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.51k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  2.51k|(\
  |  |  |  |  |  |   73|  2.51k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.51k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.21k, False: 1.30k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 843, False: 1.66k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  2.51k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.66k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.00k, False: 662]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.13k, False: 539]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.51k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  440|   166k|    nBS[1][3][2] = IN_BS_EDGE (uiBsx4[2], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 14, 10);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 63.6k, False: 103k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 63.6k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  63.6k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   127k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   127k|(\
  |  |  |  |  |  |   73|   127k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  63.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.39k, False: 62.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.07k, False: 62.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   127k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  62.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.32k, False: 61.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.05k, False: 61.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   127k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  61.5k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  61.5k|(\
  |  |  |  |  |  |   73|  61.5k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  61.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 911, False: 60.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 981, False: 60.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  61.5k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  60.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 513, False: 60.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 536, False: 60.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  61.5k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  63.6k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   206k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   206k|(\
  |  |  |  |  |  |   73|   206k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|   103k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.42k, False: 100k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.89k, False: 100k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   206k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|   100k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.58k, False: 97.7k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.12k, False: 98.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   206k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  98.2k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  98.2k|(\
  |  |  |  |  |  |   73|  98.2k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  98.2k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.29k, False: 95.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.34k, False: 95.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  98.2k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  95.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 905, False: 94.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 931, False: 94.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  98.2k|)
  |  |  |  |  ------------------
  |  |  |  |  113|   103k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  16.5k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  16.5k|(\
  |  |  |  |  |  |   73|  16.5k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  8.29k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.57k, False: 5.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.89k, False: 5.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  16.5k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.40k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.62k, False: 1.77k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.29k, False: 3.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  16.5k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.11k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  3.11k|(\
  |  |  |  |  |  |   73|  3.11k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  3.11k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.38k, False: 1.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.93k, False: 1.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  3.11k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.18k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 642, False: 538]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 707, False: 473]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  3.11k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  441|   166k|    nBS[1][3][3] = IN_BS_EDGE (uiBsx4[3], iRefs, pCurDqLayer->pDec->pMv, iMbXy, 15, 11);
  ------------------
  |  |  134|   166k|#define IN_BS_EDGE(bsx1, refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  135|   166k|( (bsx1|IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |  104|   166k|#define IN_SMB_EDGE_MV(refs, mv, iMbXy, iIndex, iNeigborIndex) \
  |  |  |  |  105|   166k|(\
  |  |  |  |  106|   166k|  (((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_1][iNeigborIndex])) || \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:5): [True: 166k, False: 0]
  |  |  |  |  |  Branch (106:62): [True: 166k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  107|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_1][iNeigborIndex]) && (refs[LIST_1][iIndex] == refs[LIST_0][iNeigborIndex]))) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (107:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (107:61): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  108|   166k|  ((refs[LIST_0][iIndex] != refs[LIST_1][iIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (108:4): [True: 63.6k, False: 103k]
  |  |  |  |  ------------------
  |  |  |  |  109|   166k|  ((refs[LIST_0][iIndex] == refs[LIST_0][iNeigborIndex]) ? \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (109:4): [True: 63.6k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  110|  63.6k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   127k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   127k|(\
  |  |  |  |  |  |   73|   127k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  63.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.39k, False: 62.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.08k, False: 62.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   127k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  62.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.31k, False: 61.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 1.06k, False: 61.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   127k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  61.5k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  61.5k|(\
  |  |  |  |  |  |   73|  61.5k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  61.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 913, False: 60.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.00k, False: 60.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  61.5k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  60.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 519, False: 60.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 541, False: 59.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  61.5k|)
  |  |  |  |  ------------------
  |  |  |  |  111|  63.6k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex))) : \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|      0|(\
  |  |  |  |  |  |   73|      0|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|      0|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|)
  |  |  |  |  ------------------
  |  |  |  |  112|   166k|  ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   206k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|   206k|(\
  |  |  |  |  |  |   73|   206k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|   103k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.83k, False: 100k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 3.36k, False: 99.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   206k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  99.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.42k, False: 97.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.25k, False: 97.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   206k|)
  |  |  |  |  ------------------
  |  |  |  |                 ((IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_0], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_1], iMbXy, iIndex, iNeigborIndex)) && \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  97.6k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  97.6k|(\
  |  |  |  |  |  |   73|  97.6k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  97.6k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.08k, False: 95.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 2.17k, False: 95.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  97.6k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  95.4k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 919, False: 94.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 932, False: 94.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  97.6k|)
  |  |  |  |  ------------------
  |  |  |  |  113|   103k|  (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  17.4k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  17.4k|(\
  |  |  |  |  |  |   73|  17.4k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  8.72k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 2.81k, False: 5.90k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 3.26k, False: 5.45k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  17.4k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  5.45k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 3.67k, False: 1.78k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 2.60k, False: 2.85k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  17.4k|)
  |  |  |  |  ------------------
  |  |  |  |                 (IN_MB_BS_MV_DIFF (mv[LIST_0], mv[LIST_1], iMbXy, iIndex, iNeigborIndex) || IN_MB_BS_MV_DIFF (mv[LIST_1], mv[LIST_0], iMbXy, iIndex, iNeigborIndex)))) : 1 \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.85k|#define IN_MB_BS_MV_DIFF(iMV_A, iMV_B, iMbXy, iIndex, iNeighIndex) \
  |  |  |  |  |  |   72|  2.85k|(\
  |  |  |  |  |  |   73|  2.85k|    (( WELS_ABS( iMV_A[iMbXy][iIndex][0] - iMV_B[iMbXy][iNeighIndex][0] ) >= 4 ) || \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  2.85k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 1.19k, False: 1.66k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (73:6): [True: 1.64k, False: 1.21k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  2.85k|    ( WELS_ABS( iMV_A[iMbXy][iIndex][1] - iMV_B[iMbXy][iNeighIndex][1] )  >= 4 )) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  196|  1.21k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (196:23): [True: 670, False: 543]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (74:5): [True: 729, False: 484]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  2.85k|)
  |  |  |  |  ------------------
  |  |  |  |  114|   166k|)
  |  |  ------------------
  ------------------
  442|   500k|    for (int ii = 0; ii < 2; ii++)
  ------------------
  |  Branch (442:22): [True: 333k, False: 166k]
  ------------------
  443|  1.33M|      for (int jj = 1; jj < 4; jj++)
  ------------------
  |  Branch (443:24): [True: 1.00M, False: 333k]
  ------------------
  444|  5.00M|        for (int kk = 0; kk < 4; kk++)
  ------------------
  |  Branch (444:26): [True: 4.00M, False: 1.00M]
  ------------------
  445|  4.00M|          if (nBS[ii][jj][kk] > 1)
  ------------------
  |  Branch (445:15): [True: 68.6k, False: 3.93M]
  ------------------
  446|  68.6k|            nBS[ii][jj][kk] = nBS[ii][jj][kk];
  447|   166k|  }
  448|   201k|}
deblocking.cpp:_ZN7WelsDecL26DeblockingBSInsideMBNormalEPNS_19tagDeblockingFilterEPNS_10TagDqLayerEPA4_A4_hPai:
  261|  78.7k|    int32_t iMbXy) {
  262|  78.7k|  uint32_t uiNnz32b0, uiNnz32b1, uiNnz32b2, uiNnz32b3;
  263|  78.7k|  int8_t* iRefIdx = pCurDqLayer->pDec->pRefIndex[LIST_0][iMbXy];
  264|  78.7k|  void* iRefs[MB_BLOCK4x4_NUM];
  265|  78.7k|  int i;
  266|  78.7k|  ENFORCE_STACK_ALIGN_1D (uint8_t, uiBsx4, 4, 4);
  ------------------
  |  |   58|  78.7k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|  78.7k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
  267|       |
  268|  78.7k|  int8_t i8x8NnzTab[4];
  269|       |
  270|       |  /* Look up each reference picture based on indices */
  271|  1.33M|  for (i = 0; i < MB_BLOCK4x4_NUM; i++) {
  ------------------
  |  |   57|  1.33M|#define MB_BLOCK4x4_NUM         16
  ------------------
  |  Branch (271:15): [True: 1.25M, False: 78.7k]
  ------------------
  272|  1.25M|    if (iRefIdx[i] > REF_NOT_IN_LIST)
  ------------------
  |  |   42|  1.25M|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (272:9): [True: 1.25M, False: 0]
  ------------------
  273|  1.25M|      iRefs[i] = pFilter->pRefPics[LIST_0][iRefIdx[i]];
  274|      0|    else
  275|      0|      iRefs[i] = NULL;
  276|  1.25M|  }
  277|       |
  278|  78.7k|  if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (278:7): [True: 8.21k, False: 70.5k]
  ------------------
  279|  41.0k|    for (int32_t i = 0; i < 4; i++) {
  ------------------
  |  Branch (279:25): [True: 32.8k, False: 8.21k]
  ------------------
  280|  32.8k|      int32_t iBlkIdx = i << 2;
  281|  32.8k|      i8x8NnzTab[i] = (pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx]] | pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 1]] |
  282|  32.8k|                       pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 2]] | pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 3]]);
  283|  32.8k|    }
  284|       |    //vertical
  285|  8.21k|    nBS[0][2][0] = nBS[0][2][1] = BS_EDGE ((i8x8NnzTab[0] | i8x8NnzTab[1]), iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy],
  ------------------
  |  |  129|  8.21k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  8.21k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  8.21k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  8.21k|(\
  |  |  |  |   92|  8.21k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 467, False: 7.75k]
  |  |  |  |  |  Branch (92:52): [True: 499, False: 7.25k]
  |  |  |  |  ------------------
  |  |  |  |   93|  7.75k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  7.75k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 801, False: 6.94k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  7.75k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  7.75k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.05k, False: 6.69k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  8.21k|)
  |  |  ------------------
  ------------------
  286|  8.21k|                                           g_kuiMbCountScan4Idx[1 << 2], g_kuiMbCountScan4Idx[0]);
  287|  8.21k|    nBS[0][2][2] = nBS[0][2][3] = BS_EDGE ((i8x8NnzTab[2] | i8x8NnzTab[3]), iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy],
  ------------------
  |  |  129|  8.21k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  8.21k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  8.21k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  8.21k|(\
  |  |  |  |   92|  8.21k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 474, False: 7.74k]
  |  |  |  |  |  Branch (92:52): [True: 522, False: 7.22k]
  |  |  |  |  ------------------
  |  |  |  |   93|  7.74k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  7.74k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 858, False: 6.88k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  7.74k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  7.74k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 877, False: 6.86k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  8.21k|)
  |  |  ------------------
  ------------------
  288|  8.21k|                                           g_kuiMbCountScan4Idx[3 << 2], g_kuiMbCountScan4Idx[2 << 2]);
  289|       |
  290|       |    //horizontal
  291|  8.21k|    nBS[1][2][0] = nBS[1][2][1] = BS_EDGE ((i8x8NnzTab[0] | i8x8NnzTab[2]), iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy],
  ------------------
  |  |  129|  8.21k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  8.21k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  8.21k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  8.21k|(\
  |  |  |  |   92|  8.21k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 828, False: 7.38k]
  |  |  |  |  |  Branch (92:52): [True: 1.70k, False: 5.68k]
  |  |  |  |  ------------------
  |  |  |  |   93|  7.38k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  7.38k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.11k, False: 6.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  7.38k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  7.38k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.14k, False: 5.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  8.21k|)
  |  |  ------------------
  ------------------
  292|  8.21k|                                           g_kuiMbCountScan4Idx[2 << 2], g_kuiMbCountScan4Idx[0]);
  293|  8.21k|    nBS[1][2][2] = nBS[1][2][3] = BS_EDGE ((i8x8NnzTab[1] | i8x8NnzTab[3]), iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy],
  ------------------
  |  |  129|  8.21k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  8.21k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  8.21k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  8.21k|(\
  |  |  |  |   92|  8.21k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 835, False: 7.38k]
  |  |  |  |  |  Branch (92:52): [True: 1.70k, False: 5.67k]
  |  |  |  |  ------------------
  |  |  |  |   93|  7.38k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  7.38k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.16k, False: 6.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  7.38k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  7.38k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.11k, False: 5.26k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  8.21k|)
  |  |  ------------------
  ------------------
  294|  8.21k|                                           g_kuiMbCountScan4Idx[3 << 2], g_kuiMbCountScan4Idx[1 << 2]);
  295|  70.5k|  } else {
  296|  70.5k|    uiNnz32b0 = * (uint32_t*) (pNnzTab + 0);
  297|  70.5k|    uiNnz32b1 = * (uint32_t*) (pNnzTab + 4);
  298|  70.5k|    uiNnz32b2 = * (uint32_t*) (pNnzTab + 8);
  299|  70.5k|    uiNnz32b3 = * (uint32_t*) (pNnzTab + 12);
  300|       |
  301|   282k|    for (int i = 0; i < 3; i++)
  ------------------
  |  Branch (301:21): [True: 211k, False: 70.5k]
  ------------------
  302|   211k|      uiBsx4[i] = pNnzTab[i] | pNnzTab[i + 1];
  303|  70.5k|    nBS[0][1][0] = BS_EDGE (uiBsx4[0], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 1, 0);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 2.23k, False: 68.3k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.55k, False: 67.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.76k, False: 68.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  304|  70.5k|    nBS[0][2][0] = BS_EDGE (uiBsx4[1], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 2, 1);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 582, False: 69.9k]
  |  |  |  |  |  Branch (92:52): [True: 15.0k, False: 54.9k]
  |  |  |  |  ------------------
  |  |  |  |   93|  69.9k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 12.9k, False: 56.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  69.9k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 10.4k, False: 59.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  305|  70.5k|    nBS[0][3][0] = BS_EDGE (uiBsx4[2], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 3, 2);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 1.95k, False: 68.5k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.30k, False: 69.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.05k, False: 69.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  306|       |
  307|   282k|    for (int i = 0; i < 3; i++)
  ------------------
  |  Branch (307:21): [True: 211k, False: 70.5k]
  ------------------
  308|   211k|      uiBsx4[i] = pNnzTab[4 + i] | pNnzTab[4 + i + 1];
  309|  70.5k|    nBS[0][1][1] = BS_EDGE (uiBsx4[0], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 5, 4);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 2.24k, False: 68.2k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.56k, False: 67.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.74k, False: 68.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  310|  70.5k|    nBS[0][2][1] = BS_EDGE (uiBsx4[1], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 6, 5);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 582, False: 69.9k]
  |  |  |  |  |  Branch (92:52): [True: 18.1k, False: 51.7k]
  |  |  |  |  ------------------
  |  |  |  |   93|  69.9k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 12.5k, False: 57.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  69.9k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 11.6k, False: 58.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  311|  70.5k|    nBS[0][3][1] = BS_EDGE (uiBsx4[2], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 7, 6);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 2.00k, False: 68.5k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.17k, False: 69.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.23k, False: 69.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  312|       |
  313|   282k|    for (int i = 0; i < 3; i++)
  ------------------
  |  Branch (313:21): [True: 211k, False: 70.5k]
  ------------------
  314|   211k|      uiBsx4[i] = pNnzTab[8 + i] | pNnzTab[8 + i + 1];
  315|  70.5k|    nBS[0][1][2] = BS_EDGE (uiBsx4[0], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 9, 8);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 2.37k, False: 68.1k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.68k, False: 68.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.86k, False: 68.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  316|  70.5k|    nBS[0][2][2] = BS_EDGE (uiBsx4[1], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 10, 9);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 599, False: 69.9k]
  |  |  |  |  |  Branch (92:52): [True: 16.6k, False: 53.2k]
  |  |  |  |  ------------------
  |  |  |  |   93|  69.9k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 11.2k, False: 58.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  69.9k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 12.0k, False: 57.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  317|  70.5k|    nBS[0][3][2] = BS_EDGE (uiBsx4[2], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 11, 10);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 1.02k, False: 69.5k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.05k, False: 69.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.04k, False: 69.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  318|       |
  319|   282k|    for (int i = 0; i < 3; i++)
  ------------------
  |  Branch (319:21): [True: 211k, False: 70.5k]
  ------------------
  320|   211k|      uiBsx4[i] = pNnzTab[12 + i] | pNnzTab[12 + i + 1];
  321|  70.5k|    nBS[0][1][3] = BS_EDGE (uiBsx4[0], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 13, 12);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 2.37k, False: 68.1k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.65k, False: 68.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.73k, False: 68.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  322|  70.5k|    nBS[0][2][3] = BS_EDGE (uiBsx4[1], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 14, 13);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 599, False: 69.9k]
  |  |  |  |  |  Branch (92:52): [True: 18.8k, False: 51.0k]
  |  |  |  |  ------------------
  |  |  |  |   93|  69.9k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 11.3k, False: 58.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  69.9k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.9k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 14.2k, False: 55.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  323|  70.5k|    nBS[0][3][3] = BS_EDGE (uiBsx4[2], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 15, 14);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 1.06k, False: 69.4k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.08k, False: 69.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.06k, False: 69.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  324|       |
  325|       |    // horizontal
  326|  70.5k|    * (uint32_t*)uiBsx4 = (uiNnz32b0 | uiNnz32b1);
  327|  70.5k|    nBS[1][1][0] = BS_EDGE (uiBsx4[0], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 4, 0);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 1.99k, False: 68.5k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.76k, False: 68.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.65k, False: 68.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  328|  70.5k|    nBS[1][1][1] = BS_EDGE (uiBsx4[1], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 5, 1);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 2.03k, False: 68.4k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.77k, False: 68.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.64k, False: 68.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  329|  70.5k|    nBS[1][1][2] = BS_EDGE (uiBsx4[2], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 6, 2);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 3.86k, False: 66.6k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.55k, False: 68.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.04k, False: 68.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  330|  70.5k|    nBS[1][1][3] = BS_EDGE (uiBsx4[3], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 7, 3);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 3.89k, False: 66.6k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.43k, False: 69.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.21k, False: 68.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  331|       |
  332|  70.5k|    * (uint32_t*)uiBsx4 = (uiNnz32b1 | uiNnz32b2);
  333|  70.5k|    nBS[1][2][0] = BS_EDGE (uiBsx4[0], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 8, 4);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 1.20k, False: 69.3k]
  |  |  |  |  |  Branch (92:52): [True: 18.7k, False: 50.5k]
  |  |  |  |  ------------------
  |  |  |  |   93|  69.3k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 13.1k, False: 56.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  69.3k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 11.6k, False: 57.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  334|  70.5k|    nBS[1][2][1] = BS_EDGE (uiBsx4[1], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 9, 5);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 1.20k, False: 69.3k]
  |  |  |  |  |  Branch (92:52): [True: 19.9k, False: 49.4k]
  |  |  |  |  ------------------
  |  |  |  |   93|  69.3k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 12.8k, False: 56.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  69.3k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 11.0k, False: 58.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  335|  70.5k|    nBS[1][2][2] = BS_EDGE (uiBsx4[2], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 10, 6);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 1.14k, False: 69.3k]
  |  |  |  |  |  Branch (92:52): [True: 19.4k, False: 49.9k]
  |  |  |  |  ------------------
  |  |  |  |   93|  69.3k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 11.7k, False: 57.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  69.3k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 10.3k, False: 59.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  336|  70.5k|    nBS[1][2][3] = BS_EDGE (uiBsx4[3], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 11, 7);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 1.14k, False: 69.3k]
  |  |  |  |  |  Branch (92:52): [True: 19.5k, False: 49.7k]
  |  |  |  |  ------------------
  |  |  |  |   93|  69.3k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 12.6k, False: 56.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  69.3k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  69.3k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 10.3k, False: 59.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  337|       |
  338|  70.5k|    * (uint32_t*)uiBsx4 = (uiNnz32b2 | uiNnz32b3);
  339|  70.5k|    nBS[1][3][0] = BS_EDGE (uiBsx4[0], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 12, 8);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 2.05k, False: 68.4k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.93k, False: 68.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 959, False: 69.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  340|  70.5k|    nBS[1][3][1] = BS_EDGE (uiBsx4[1], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 13, 9);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 2.17k, False: 68.3k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.77k, False: 68.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 982, False: 69.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  341|  70.5k|    nBS[1][3][2] = BS_EDGE (uiBsx4[2], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 14, 10);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 2.03k, False: 68.4k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.09k, False: 69.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.12k, False: 68.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  342|  70.5k|    nBS[1][3][3] = BS_EDGE (uiBsx4[3], iRefs, pCurDqLayer->pDec->pMv[LIST_0][iMbXy], 15, 11);
  ------------------
  |  |  129|  70.5k|#define BS_EDGE(bsx1, pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  130|  70.5k|( (bsx1|SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex))<<((uint8_t)(!!bsx1)))
  |  |  ------------------
  |  |  |  |   90|  70.5k|#define SMB_EDGE_MV(pRefPics, iMotionVector, iIndex, iNeighIndex) \
  |  |  |  |   91|  70.5k|(\
  |  |  |  |   92|  70.5k|    ( pRefPics[iIndex] != pRefPics[iNeighIndex] )||(\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (92:5): [True: 0, False: 70.5k]
  |  |  |  |  |  Branch (92:52): [True: 2.05k, False: 68.4k]
  |  |  |  |  ------------------
  |  |  |  |   93|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][0] - iMotionVector[iNeighIndex][0] ) &(~3) ) |\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 1.13k, False: 69.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  70.5k|    ( WELS_ABS( iMotionVector[iIndex][1] - iMotionVector[iNeighIndex][1] ) &(~3) ))\
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|  70.5k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:23): [True: 2.16k, False: 68.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  70.5k|)
  |  |  ------------------
  ------------------
  343|  70.5k|  }
  344|  78.7k|}
deblocking.cpp:_ZN7WelsDecL17DeblockingInterMbEPNS_10TagDqLayerEPNS_19tagDeblockingFilterEPA4_A4_hi:
  886|  4.38M|                               int32_t iBoundryFlag) {
  887|  4.38M|  int32_t iMbXyIndex = pCurDqLayer->iMbXyIndex;
  888|  4.38M|  int32_t iMbX = pCurDqLayer->iMbX;
  889|  4.38M|  int32_t iMbY = pCurDqLayer->iMbY;
  890|       |
  891|  4.38M|  int32_t iCurLumaQp = pCurDqLayer->pLumaQp[iMbXyIndex];
  892|       |  //int32_t* iCurChromaQp = pCurDqLayer->pChromaQp[iMbXyIndex];
  893|  4.38M|  int8_t* pCurChromaQp = pCurDqLayer->pChromaQp[iMbXyIndex];
  894|  4.38M|  int32_t iLineSize   = pFilter->iCsStride[0];
  895|  4.38M|  int32_t iLineSizeUV = pFilter->iCsStride[1];
  896|       |
  897|  4.38M|  uint8_t* pDestY, * pDestCb, * pDestCr;
  898|  4.38M|  pDestY  = pFilter->pCsData[0] + ((iMbY * iLineSize + iMbX) << 4);
  899|  4.38M|  pDestCb = pFilter->pCsData[1] + ((iMbY * iLineSizeUV + iMbX) << 3);
  900|  4.38M|  pDestCr = pFilter->pCsData[2] + ((iMbY * iLineSizeUV + iMbX) << 3);
  901|       |
  902|       |  //Vertical margin
  903|  4.38M|  if (iBoundryFlag & LEFT_FLAG_MASK) {
  ------------------
  |  |   50|  4.38M|#define LEFT_FLAG_MASK 0x01
  ------------------
  |  Branch (903:7): [True: 3.05M, False: 1.33M]
  ------------------
  904|  3.05M|    int32_t iLeftXyIndex = iMbXyIndex - 1;
  905|  3.05M|    pFilter->iLumaQP   = (iCurLumaQp + pCurDqLayer->pLumaQp[iLeftXyIndex] + 1) >> 1;
  906|  9.15M|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (906:21): [True: 6.10M, False: 3.05M]
  ------------------
  907|  6.10M|      pFilter->iChromaQP[i] = (pCurChromaQp[i] + pCurDqLayer->pChromaQp[iLeftXyIndex][i] + 1) >> 1;
  908|  6.10M|    }
  909|  3.05M|    if (nBS[0][0][0] == 0x04) {
  ------------------
  |  Branch (909:9): [True: 15.5k, False: 3.03M]
  ------------------
  910|  15.5k|      FilteringEdgeLumaIntraV (pFilter, pDestY, iLineSize, NULL);
  911|  15.5k|      FilteringEdgeChromaIntraV (pFilter, pDestCb, pDestCr, iLineSizeUV, NULL);
  912|  3.03M|    } else {
  913|  3.03M|      if (* (uint32_t*)nBS[0][0] != 0) {
  ------------------
  |  Branch (913:11): [True: 231k, False: 2.80M]
  ------------------
  914|   231k|        FilteringEdgeLumaV (pFilter, pDestY, iLineSize, nBS[0][0]);
  915|   231k|        FilteringEdgeChromaV (pFilter, pDestCb, pDestCr, iLineSizeUV, nBS[0][0]);
  916|   231k|      }
  917|  3.03M|    }
  918|  3.05M|  }
  919|       |
  920|  4.38M|  pFilter->iLumaQP = iCurLumaQp;
  921|  4.38M|  pFilter->iChromaQP[0] = pCurChromaQp[0];
  922|  4.38M|  pFilter->iChromaQP[1] = pCurChromaQp[1];
  923|       |
  924|  4.38M|  if (* (uint32_t*)nBS[0][1] != 0 && !pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
  ------------------
  |  Branch (924:7): [True: 38.2k, False: 4.35M]
  |  Branch (924:38): [True: 38.2k, False: 0]
  ------------------
  925|  38.2k|    FilteringEdgeLumaV (pFilter, &pDestY[1 << 2], iLineSize, nBS[0][1]);
  926|  38.2k|  }
  927|       |
  928|  4.38M|  if (* (uint32_t*)nBS[0][2] != 0) {
  ------------------
  |  Branch (928:7): [True: 139k, False: 4.24M]
  ------------------
  929|   139k|    FilteringEdgeLumaV (pFilter, &pDestY[2 << 2], iLineSize, nBS[0][2]);
  930|   139k|    FilteringEdgeChromaV (pFilter, &pDestCb[2 << 1], &pDestCr[2 << 1], iLineSizeUV, nBS[0][2]);
  931|   139k|  }
  932|       |
  933|  4.38M|  if (* (uint32_t*)nBS[0][3] != 0  && !pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
  ------------------
  |  Branch (933:7): [True: 24.7k, False: 4.36M]
  |  Branch (933:39): [True: 24.7k, False: 0]
  ------------------
  934|  24.7k|    FilteringEdgeLumaV (pFilter, &pDestY[3 << 2], iLineSize, nBS[0][3]);
  935|  24.7k|  }
  936|       |
  937|  4.38M|  if (iBoundryFlag & TOP_FLAG_MASK) {
  ------------------
  |  |   51|  4.38M|#define TOP_FLAG_MASK 0x02
  ------------------
  |  Branch (937:7): [True: 3.07M, False: 1.31M]
  ------------------
  938|  3.07M|    int32_t iTopXyIndex = iMbXyIndex - pCurDqLayer->iMbWidth;
  939|  3.07M|    pFilter->iLumaQP = (iCurLumaQp + pCurDqLayer->pLumaQp[iTopXyIndex] + 1) >> 1;
  940|  9.22M|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (940:21): [True: 6.15M, False: 3.07M]
  ------------------
  941|  6.15M|      pFilter->iChromaQP[i] = (pCurChromaQp[i] + pCurDqLayer->pChromaQp[iTopXyIndex][i] + 1) >> 1;
  942|  6.15M|    }
  943|       |
  944|  3.07M|    if (nBS[1][0][0] == 0x04) {
  ------------------
  |  Branch (944:9): [True: 22.4k, False: 3.05M]
  ------------------
  945|  22.4k|      FilteringEdgeLumaIntraH (pFilter, pDestY, iLineSize, NULL);
  946|  22.4k|      FilteringEdgeChromaIntraH (pFilter, pDestCb, pDestCr, iLineSizeUV, NULL);
  947|  3.05M|    } else {
  948|  3.05M|      if (* (uint32_t*)nBS[1][0] != 0) {
  ------------------
  |  Branch (948:11): [True: 210k, False: 2.84M]
  ------------------
  949|   210k|        FilteringEdgeLumaH (pFilter, pDestY, iLineSize, nBS[1][0]);
  950|   210k|        FilteringEdgeChromaH (pFilter, pDestCb, pDestCr, iLineSizeUV, nBS[1][0]);
  951|   210k|      }
  952|  3.05M|    }
  953|  3.07M|  }
  954|       |
  955|  4.38M|  pFilter->iLumaQP = iCurLumaQp;
  956|  4.38M|  pFilter->iChromaQP[0] = pCurChromaQp[0];
  957|  4.38M|  pFilter->iChromaQP[1] = pCurChromaQp[1];
  958|       |
  959|  4.38M|  if (* (uint32_t*)nBS[1][1] != 0  && !pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
  ------------------
  |  Branch (959:7): [True: 38.0k, False: 4.35M]
  |  Branch (959:39): [True: 38.0k, False: 0]
  ------------------
  960|  38.0k|    FilteringEdgeLumaH (pFilter, &pDestY[ (1 << 2)*iLineSize], iLineSize, nBS[1][1]);
  961|  38.0k|  }
  962|       |
  963|  4.38M|  if (* (uint32_t*)nBS[1][2] != 0) {
  ------------------
  |  Branch (963:7): [True: 152k, False: 4.23M]
  ------------------
  964|   152k|    FilteringEdgeLumaH (pFilter, &pDestY[ (2 << 2)*iLineSize], iLineSize, nBS[1][2]);
  965|   152k|    FilteringEdgeChromaH (pFilter, &pDestCb[ (2 << 1)*iLineSizeUV], &pDestCr[ (2 << 1)*iLineSizeUV], iLineSizeUV,
  966|   152k|                          nBS[1][2]);
  967|   152k|  }
  968|       |
  969|  4.38M|  if (* (uint32_t*)nBS[1][3] != 0  && !pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
  ------------------
  |  Branch (969:7): [True: 31.2k, False: 4.35M]
  |  Branch (969:39): [True: 31.2k, False: 0]
  ------------------
  970|  31.2k|    FilteringEdgeLumaH (pFilter, &pDestY[ (3 << 2)*iLineSize], iLineSize, nBS[1][3]);
  971|  31.2k|  }
  972|  4.38M|}

_ZN7WelsDec19IdctResAddPred8x8_cEPhiPs:
   79|   144k|void IdctResAddPred8x8_c (uint8_t* pPred, const int32_t kiStride, int16_t* pRs) {
   80|       |  // To make the ASM code easy to write, should using one funciton to apply hor and ver together, such as we did on HEVC
   81|       |  // Ugly code, just for easy debug, the final version need optimization
   82|   144k|  int16_t p[8], b[8];
   83|   144k|  int16_t a[4];
   84|       |
   85|   144k|  int16_t iTmp[64];
   86|   144k|  int16_t iRes[64];
   87|       |
   88|       |  // Horizontal
   89|  1.30M|  for (int i = 0; i < 8; i++) {
  ------------------
  |  Branch (89:19): [True: 1.15M, False: 144k]
  ------------------
   90|  10.4M|    for (int j = 0; j < 8; j++) {
  ------------------
  |  Branch (90:21): [True: 9.27M, False: 1.15M]
  ------------------
   91|  9.27M|      p[j] = pRs[j + (i << 3)];
   92|  9.27M|    }
   93|  1.15M|    a[0] = p[0] + p[4];
   94|  1.15M|    a[1] = p[0] - p[4];
   95|  1.15M|    a[2] = p[6] - (p[2] >> 1);
   96|  1.15M|    a[3] = p[2] + (p[6] >> 1);
   97|       |
   98|  1.15M|    b[0] =  a[0] + a[3];
   99|  1.15M|    b[2] =  a[1] - a[2];
  100|  1.15M|    b[4] =  a[1] + a[2];
  101|  1.15M|    b[6] =  a[0] - a[3];
  102|       |
  103|  1.15M|    a[0] = -p[3] + p[5] - p[7] - (p[7] >> 1);
  104|  1.15M|    a[1] =  p[1] + p[7] - p[3] - (p[3] >> 1);
  105|  1.15M|    a[2] = -p[1] + p[7] + p[5] + (p[5] >> 1);
  106|  1.15M|    a[3] =  p[3] + p[5] + p[1] + (p[1] >> 1);
  107|       |
  108|  1.15M|    b[1] =  a[0] + (a[3] >> 2);
  109|  1.15M|    b[3] =  a[1] + (a[2] >> 2);
  110|  1.15M|    b[5] =  a[2] - (a[1] >> 2);
  111|  1.15M|    b[7] =  a[3] - (a[0] >> 2);
  112|       |
  113|  1.15M|    iTmp[0 + (i << 3)] = b[0] + b[7];
  114|  1.15M|    iTmp[1 + (i << 3)] = b[2] - b[5];
  115|  1.15M|    iTmp[2 + (i << 3)] = b[4] + b[3];
  116|  1.15M|    iTmp[3 + (i << 3)] = b[6] + b[1];
  117|  1.15M|    iTmp[4 + (i << 3)] = b[6] - b[1];
  118|  1.15M|    iTmp[5 + (i << 3)] = b[4] - b[3];
  119|  1.15M|    iTmp[6 + (i << 3)] = b[2] + b[5];
  120|  1.15M|    iTmp[7 + (i << 3)] = b[0] - b[7];
  121|  1.15M|  }
  122|       |
  123|       |  //Vertical
  124|  1.30M|  for (int i = 0; i < 8; i++) {
  ------------------
  |  Branch (124:19): [True: 1.15M, False: 144k]
  ------------------
  125|  10.4M|    for (int j = 0; j < 8; j++) {
  ------------------
  |  Branch (125:21): [True: 9.27M, False: 1.15M]
  ------------------
  126|  9.27M|      p[j] = iTmp[i + (j << 3)];
  127|  9.27M|    }
  128|       |
  129|  1.15M|    a[0] =  p[0] + p[4];
  130|  1.15M|    a[1] =  p[0] - p[4];
  131|  1.15M|    a[2] =  p[6] - (p[2] >> 1);
  132|  1.15M|    a[3] =  p[2] + (p[6] >> 1);
  133|       |
  134|  1.15M|    b[0] = a[0] + a[3];
  135|  1.15M|    b[2] = a[1] - a[2];
  136|  1.15M|    b[4] = a[1] + a[2];
  137|  1.15M|    b[6] = a[0] - a[3];
  138|       |
  139|  1.15M|    a[0] = -p[3] + p[5] - p[7] - (p[7] >> 1);
  140|  1.15M|    a[1] =  p[1] + p[7] - p[3] - (p[3] >> 1);
  141|  1.15M|    a[2] = -p[1] + p[7] + p[5] + (p[5] >> 1);
  142|  1.15M|    a[3] =  p[3] + p[5] + p[1] + (p[1] >> 1);
  143|       |
  144|       |
  145|  1.15M|    b[1] =  a[0] + (a[3] >> 2);
  146|  1.15M|    b[7] =  a[3] - (a[0] >> 2);
  147|  1.15M|    b[3] =  a[1] + (a[2] >> 2);
  148|  1.15M|    b[5] =  a[2] - (a[1] >> 2);
  149|       |
  150|  1.15M|    iRes[ (0 << 3) + i] = b[0] + b[7];
  151|  1.15M|    iRes[ (1 << 3) + i] = b[2] - b[5];
  152|  1.15M|    iRes[ (2 << 3) + i] = b[4] + b[3];
  153|  1.15M|    iRes[ (3 << 3) + i] = b[6] + b[1];
  154|  1.15M|    iRes[ (4 << 3) + i] = b[6] - b[1];
  155|  1.15M|    iRes[ (5 << 3) + i] = b[4] - b[3];
  156|  1.15M|    iRes[ (6 << 3) + i] = b[2] + b[5];
  157|  1.15M|    iRes[ (7 << 3) + i] = b[0] - b[7];
  158|  1.15M|  }
  159|       |
  160|   144k|  uint8_t* pDst = pPred;
  161|  1.30M|  for (int i = 0; i < 8; i++) {
  ------------------
  |  Branch (161:19): [True: 1.15M, False: 144k]
  ------------------
  162|  10.4M|    for (int j = 0; j < 8; j++) {
  ------------------
  |  Branch (162:21): [True: 9.27M, False: 1.15M]
  ------------------
  163|  9.27M|      pDst[i * kiStride + j] = WelsClip1 (((32 + iRes[ (i << 3) + j]) >> 6) + pDst[i * kiStride + j]);
  164|  9.27M|    }
  165|  1.15M|  }
  166|       |
  167|   144k|}
_ZN7WelsDec25GetI4LumaIChromaAddrTableEPiii:
  169|  2.58M|void GetI4LumaIChromaAddrTable (int32_t* pBlockOffset, const int32_t kiYStride, const int32_t kiUVStride) {
  170|  2.58M|  int32_t* pOffset = pBlockOffset;
  171|  2.58M|  int32_t i;
  172|  2.58M|  const uint8_t kuiScan0 = g_kuiScan8[0];
  173|       |
  174|  44.0M|  for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (174:15): [True: 41.4M, False: 2.58M]
  ------------------
  175|  41.4M|    const uint32_t kuiA = g_kuiScan8[i] - kuiScan0;
  176|  41.4M|    const uint32_t kuiX = kuiA & 0x07;
  177|  41.4M|    const uint32_t kuiY = kuiA >> 3;
  178|       |
  179|  41.4M|    pOffset[i] = (kuiX + kiYStride * kuiY) << 2;
  180|  41.4M|  }
  181|       |
  182|  12.9M|  for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (182:15): [True: 10.3M, False: 2.58M]
  ------------------
  183|  10.3M|    const uint32_t kuiA = g_kuiScan8[i] - kuiScan0;
  184|       |
  185|  10.3M|    pOffset[16 + i] =
  186|  10.3M|      pOffset[20 + i] = ((kuiA & 0x07) + (kiUVStride/*>>1*/) * (kuiA >> 3)) << 2;
  187|  10.3M|  }
  188|  2.58M|}

_ZN7WelsDec27WelsTargetSliceConstructionEPNS_21TagWelsDecoderContextE:
   81|  2.58M|int32_t WelsTargetSliceConstruction (PWelsDecoderContext pCtx) {
   82|  2.58M|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
   83|  2.58M|  PSlice pCurSlice = &pCurDqLayer->sLayerInfo.sSliceInLayer;
   84|  2.58M|  PSliceHeader pSliceHeader = &pCurSlice->sSliceHeaderExt.sSliceHeader;
   85|       |
   86|  2.58M|  int32_t iTotalMbTargetLayer = pSliceHeader->pSps->uiTotalMbCount;
   87|       |
   88|  2.58M|  int32_t iCurLayerWidth  = pCurDqLayer->iMbWidth << 4;
   89|  2.58M|  int32_t iCurLayerHeight = pCurDqLayer->iMbHeight << 4;
   90|       |
   91|  2.58M|  int32_t iNextMbXyIndex = 0;
   92|  2.58M|  PFmo pFmo = pCtx->pFmo;
   93|       |
   94|  2.58M|  int32_t iTotalNumMb = pCurSlice->iTotalMbInCurSlice;
   95|  2.58M|  int32_t iCountNumMb = 0;
   96|  2.58M|  PDeblockingFilterMbFunc pDeblockMb = WelsDeblockingMb;
   97|       |
   98|  2.58M|  if (!pCtx->sSpsPpsCtx.bAvcBasedFlag && iCurLayerWidth != pCtx->iCurSeqIntervalMaxPicWidth) {
  ------------------
  |  Branch (98:7): [True: 2.16M, False: 418k]
  |  Branch (98:42): [True: 1.52M, False: 645k]
  ------------------
   99|  1.52M|    return ERR_INFO_WIDTH_MISMATCH;
  100|  1.52M|  }
  101|       |
  102|  1.06M|  iNextMbXyIndex   = pSliceHeader->iFirstMbInSlice;
  103|  1.06M|  pCurDqLayer->iMbX  = iNextMbXyIndex % pCurDqLayer->iMbWidth;
  104|  1.06M|  pCurDqLayer->iMbY  = iNextMbXyIndex / pCurDqLayer->iMbWidth;
  105|  1.06M|  pCurDqLayer->iMbXyIndex = iNextMbXyIndex;
  106|       |
  107|  1.06M|  if (0 == iNextMbXyIndex) {
  ------------------
  |  Branch (107:7): [True: 993k, False: 71.0k]
  ------------------
  108|   993k|    pCurDqLayer->pDec->iSpsId = pCtx->pSps->iSpsId;
  109|   993k|    pCurDqLayer->pDec->iPpsId = pCtx->pPps->iPpsId;
  110|       |
  111|   993k|    pCurDqLayer->pDec->uiQualityId = pCurDqLayer->sLayerInfo.sNalHeaderExt.uiQualityId;
  112|   993k|  }
  113|       |
  114|  14.4M|  do {
  115|  14.4M|    if (iCountNumMb >= iTotalNumMb) {
  ------------------
  |  Branch (115:9): [True: 885k, False: 13.5M]
  ------------------
  116|   885k|      break;
  117|   885k|    }
  118|       |
  119|  13.5M|    if (!pCtx->pParam->bParseOnly) { //for parse only, actual recon MB unnecessary
  ------------------
  |  Branch (119:9): [True: 13.5M, False: 0]
  ------------------
  120|  13.5M|      if (WelsTargetMbConstruction (pCtx)) {
  ------------------
  |  Branch (120:11): [True: 568, False: 13.5M]
  ------------------
  121|    568|        WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
  122|    568|                 "WelsTargetSliceConstruction():::MB(%d, %d) construction error. pCurSlice_type:%d",
  123|    568|                 pCurDqLayer->iMbX, pCurDqLayer->iMbY, pCurSlice->eSliceType);
  124|       |
  125|    568|        return ERR_INFO_MB_RECON_FAIL;
  126|    568|      }
  127|  13.5M|    }
  128|       |
  129|  13.5M|    ++iCountNumMb;
  130|  13.5M|    if (!pCurDqLayer->pMbCorrectlyDecodedFlag[iNextMbXyIndex]) { //already con-ed, overwrite
  ------------------
  |  Branch (130:9): [True: 3.19M, False: 10.3M]
  ------------------
  131|  3.19M|      pCurDqLayer->pMbCorrectlyDecodedFlag[iNextMbXyIndex] = true;
  132|  3.19M|      pCtx->pDec->iMbEcedPropNum += (pCurDqLayer->pMbRefConcealedFlag[iNextMbXyIndex] ? 1 : 0);
  ------------------
  |  Branch (132:38): [True: 2.98M, False: 207k]
  ------------------
  133|  3.19M|      ++pCtx->iTotalNumMbRec;
  134|  3.19M|    }
  135|       |
  136|  13.5M|    if (pCtx->iTotalNumMbRec > iTotalMbTargetLayer) {
  ------------------
  |  Branch (136:9): [True: 0, False: 13.5M]
  ------------------
  137|      0|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
  138|      0|               "WelsTargetSliceConstruction():::pCtx->iTotalNumMbRec:%d, iTotalMbTargetLayer:%d",
  139|      0|               pCtx->iTotalNumMbRec, iTotalMbTargetLayer);
  140|       |
  141|      0|      return ERR_INFO_MB_NUM_EXCEED_FAIL;
  142|      0|    }
  143|       |
  144|  13.5M|    if (pSliceHeader->pPps->uiNumSliceGroups > 1) {
  ------------------
  |  Branch (144:9): [True: 482k, False: 13.0M]
  ------------------
  145|   482k|      iNextMbXyIndex = FmoNextMb (pFmo, iNextMbXyIndex);
  146|  13.0M|    } else {
  147|  13.0M|      ++iNextMbXyIndex;
  148|  13.0M|    }
  149|  13.5M|    if (-1 == iNextMbXyIndex || iNextMbXyIndex >= iTotalMbTargetLayer) { // slice group boundary or end of a frame
  ------------------
  |  Branch (149:9): [True: 57.5k, False: 13.4M]
  |  Branch (149:33): [True: 120k, False: 13.3M]
  ------------------
  150|   178k|      break;
  151|   178k|    }
  152|  13.3M|    pCurDqLayer->iMbX  = iNextMbXyIndex % pCurDqLayer->iMbWidth;
  153|  13.3M|    pCurDqLayer->iMbY  = iNextMbXyIndex / pCurDqLayer->iMbWidth;
  154|  13.3M|    pCurDqLayer->iMbXyIndex = iNextMbXyIndex;
  155|  13.3M|  } while (1);
  ------------------
  |  Branch (155:12): [True: 13.3M, Folded]
  ------------------
  156|       |
  157|  1.06M|  pCtx->pDec->iWidthInPixel  = iCurLayerWidth;
  158|  1.06M|  pCtx->pDec->iHeightInPixel = iCurLayerHeight;
  159|       |
  160|  1.06M|  if ((pCurSlice->eSliceType != I_SLICE) && (pCurSlice->eSliceType != P_SLICE) && (pCurSlice->eSliceType != B_SLICE))
  ------------------
  |  Branch (160:7): [True: 830k, False: 233k]
  |  Branch (160:45): [True: 121k, False: 708k]
  |  Branch (160:83): [True: 0, False: 121k]
  ------------------
  161|      0|    return ERR_NONE; //no error but just ignore the type unsupported
  162|       |
  163|  1.06M|  if (pCtx->pParam->bParseOnly) //for parse only, deblocking should not go on
  ------------------
  |  Branch (163:7): [True: 0, False: 1.06M]
  ------------------
  164|      0|    return ERR_NONE;
  165|       |
  166|  1.06M|  if (1 == pSliceHeader->uiDisableDeblockingFilterIdc
  ------------------
  |  Branch (166:7): [True: 15.7k, False: 1.04M]
  ------------------
  167|  1.04M|      || pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.iTotalMbInCurSlice <= 0) {
  ------------------
  |  Branch (167:10): [True: 288k, False: 759k]
  ------------------
  168|   304k|    return ERR_NONE;//NO_SUPPORTED_FILTER_IDX
  169|   759k|  } else {
  170|   759k|    WelsDeblockingFilterSlice (pCtx, pDeblockMb);
  171|   759k|  }
  172|       |  // any other filter_idc not supported here, 7/22/2010
  173|       |
  174|   759k|  return ERR_NONE;
  175|  1.06M|}
_ZN7WelsDec29WelsMbInterSampleConstructionEPNS_21TagWelsDecoderContextEPNS_10TagDqLayerEPhS4_S4_ii:
  178|   153k|                                       uint8_t* pDstY, uint8_t* pDstU, uint8_t* pDstV, int32_t iStrideL, int32_t iStrideC) {
  179|   153k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  180|   153k|  int32_t i, iIndex, iOffset;
  181|       |
  182|   153k|  if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (182:7): [True: 69.4k, False: 83.5k]
  ------------------
  183|   347k|    for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (183:17): [True: 277k, False: 69.4k]
  ------------------
  184|   277k|      iIndex = g_kuiMbCountScan4Idx[i << 2];
  185|   277k|      if (pCurDqLayer->pNzc[iMbXy][iIndex] || pCurDqLayer->pNzc[iMbXy][iIndex + 1] || pCurDqLayer->pNzc[iMbXy][iIndex + 4]
  ------------------
  |  Branch (185:11): [True: 89.9k, False: 187k]
  |  Branch (185:47): [True: 6.44k, False: 181k]
  |  Branch (185:87): [True: 3.68k, False: 177k]
  ------------------
  186|   177k|          || pCurDqLayer->pNzc[iMbXy][iIndex + 5]) {
  ------------------
  |  Branch (186:14): [True: 3.60k, False: 174k]
  ------------------
  187|   103k|        iOffset = ((iIndex >> 2) << 2) * iStrideL + ((iIndex % 4) << 2);
  188|   103k|        pCtx->pIdctResAddPredFunc8x8 (pDstY + iOffset, iStrideL, pCurDqLayer->pScaledTCoeff[iMbXy] + (i << 6));
  189|   103k|      }
  190|   277k|    }
  191|  83.5k|  } else {
  192|       |    // luma.
  193|  83.5k|    const int8_t* pNzc = pCurDqLayer->pNzc[iMbXy];
  194|  83.5k|    int16_t* pScaledTCoeff = pCurDqLayer->pScaledTCoeff[iMbXy];
  195|  83.5k|    pCtx->pIdctFourResAddPredFunc (pDstY + 0 * iStrideL + 0, iStrideL, pScaledTCoeff + 0 * 64, pNzc +  0);
  196|  83.5k|    pCtx->pIdctFourResAddPredFunc (pDstY + 0 * iStrideL + 8, iStrideL, pScaledTCoeff + 1 * 64, pNzc +  2);
  197|  83.5k|    pCtx->pIdctFourResAddPredFunc (pDstY + 8 * iStrideL + 0, iStrideL, pScaledTCoeff + 2 * 64, pNzc +  8);
  198|  83.5k|    pCtx->pIdctFourResAddPredFunc (pDstY + 8 * iStrideL + 8, iStrideL, pScaledTCoeff + 3 * 64, pNzc + 10);
  199|  83.5k|  }
  200|       |
  201|   153k|  const int8_t* pNzc = pCurDqLayer->pNzc[iMbXy];
  202|   153k|  int16_t* pScaledTCoeff = pCurDqLayer->pScaledTCoeff[iMbXy];
  203|       |  // Cb.
  204|   153k|  pCtx->pIdctFourResAddPredFunc (pDstU, iStrideC, pScaledTCoeff + 4 * 64, pNzc + 16);
  205|       |  // Cr.
  206|   153k|  pCtx->pIdctFourResAddPredFunc (pDstV, iStrideC, pScaledTCoeff + 5 * 64, pNzc + 18);
  207|       |
  208|   153k|  return ERR_NONE;
  209|   153k|}
_ZN7WelsDec23WelsMbInterConstructionEPNS_21TagWelsDecoderContextEPNS_10TagDqLayerE:
  210|   153k|int32_t WelsMbInterConstruction (PWelsDecoderContext pCtx, PDqLayer pCurDqLayer) {
  211|   153k|  int32_t iMbX = pCurDqLayer->iMbX;
  212|   153k|  int32_t iMbY = pCurDqLayer->iMbY;
  213|   153k|  uint8_t*  pDstY, *pDstCb, *pDstCr;
  214|       |
  215|   153k|  int32_t iLumaStride   = pCtx->pDec->iLinesize[0];
  216|   153k|  int32_t iChromaStride = pCtx->pDec->iLinesize[1];
  217|       |
  218|   153k|  pDstY  = pCurDqLayer->pDec->pData[0] + ((iMbY * iLumaStride + iMbX) << 4);
  219|   153k|  pDstCb = pCurDqLayer->pDec->pData[1] + ((iMbY * iChromaStride + iMbX) << 3);
  220|   153k|  pDstCr = pCurDqLayer->pDec->pData[2] + ((iMbY * iChromaStride + iMbX) << 3);
  221|       |
  222|   153k|  if (pCtx->eSliceType == P_SLICE) {
  ------------------
  |  Branch (222:7): [True: 44.8k, False: 108k]
  ------------------
  223|  44.8k|    WELS_B_MB_REC_VERIFY (GetInterPred (pDstY, pDstCb, pDstCr, pCtx));
  ------------------
  |  |   52|  44.8k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  44.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  44.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 44.8k]
  |  |  ------------------
  |  |   55|  44.8k|    return uiRetTmp; \
  |  |   56|  44.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 44.8k]
  |  |  ------------------
  ------------------
  224|   108k|  } else {
  225|   108k|    if (pCtx->pTempDec == NULL)
  ------------------
  |  Branch (225:9): [True: 4.25k, False: 104k]
  ------------------
  226|  4.25k|      pCtx->pTempDec = AllocPicture (pCtx, pCtx->pSps->iMbWidth << 4, pCtx->pSps->iMbHeight << 4);
  227|   108k|    uint8_t*   pTempDstYCbCr[3];
  228|   108k|    uint8_t*   pDstYCbCr[3];
  229|   108k|    pTempDstYCbCr[0] = pCtx->pTempDec->pData[0] + ((iMbY * iLumaStride + iMbX) << 4);
  230|   108k|    pTempDstYCbCr[1] = pCtx->pTempDec->pData[1] + ((iMbY * iChromaStride + iMbX) << 3);
  231|   108k|    pTempDstYCbCr[2] = pCtx->pTempDec->pData[2] + ((iMbY * iChromaStride + iMbX) << 3);
  232|   108k|    pDstYCbCr[0] = pDstY;
  233|   108k|    pDstYCbCr[1] = pDstCb;
  234|   108k|    pDstYCbCr[2] = pDstCr;
  235|   108k|    WELS_B_MB_REC_VERIFY (GetInterBPred (pDstYCbCr, pTempDstYCbCr, pCtx));
  ------------------
  |  |   52|   108k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|   108k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   108k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 344, False: 108k]
  |  |  ------------------
  |  |   55|   108k|    return uiRetTmp; \
  |  |   56|   108k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 108k]
  |  |  ------------------
  ------------------
  236|   108k|  }
  237|   153k|  WelsMbInterSampleConstruction (pCtx, pCurDqLayer, pDstY, pDstCb, pDstCr, iLumaStride, iChromaStride);
  238|       |
  239|   153k|  if (GetThreadCount (pCtx) <= 1) {
  ------------------
  |  Branch (239:7): [True: 153k, False: 0]
  ------------------
  240|   153k|    pCtx->sBlockFunc.pWelsSetNonZeroCountFunc (
  241|   153k|      pCurDqLayer->pNzc[pCurDqLayer->iMbXyIndex]); // set all none-zero nzc to 1; dbk can be opti!
  242|   153k|  }
  243|   153k|  return ERR_NONE;
  244|   153k|}
_ZN7WelsDec21WelsLumaDcDequantIdctEPsiPNS_21TagWelsDecoderContextE:
  246|  14.9k|void WelsLumaDcDequantIdct (int16_t* pBlock, int32_t iQp, PWelsDecoderContext pCtx) {
  247|  14.9k|  const int32_t kiQMul = pCtx->bUseScalingList ? pCtx->pDequant_coeff4x4[0][iQp][0] : (g_kuiDequantCoeff[iQp][0] << 4);
  ------------------
  |  Branch (247:26): [True: 3.05k, False: 11.8k]
  ------------------
  248|  14.9k|#define STRIDE 16
  249|  14.9k|  int32_t i;
  250|  14.9k|  int32_t iTemp[16]; //FIXME check if this is a good idea
  251|  14.9k|  int16_t* pBlk = pBlock;
  252|  14.9k|  static const int32_t kiXOffset[4] = {0, STRIDE, STRIDE << 2,  5 * STRIDE};
  ------------------
  |  |  248|  14.9k|#define STRIDE 16
  ------------------
                static const int32_t kiXOffset[4] = {0, STRIDE, STRIDE << 2,  5 * STRIDE};
  ------------------
  |  |  248|  14.9k|#define STRIDE 16
  ------------------
                static const int32_t kiXOffset[4] = {0, STRIDE, STRIDE << 2,  5 * STRIDE};
  ------------------
  |  |  248|  14.9k|#define STRIDE 16
  ------------------
  253|  14.9k|  static const int32_t kiYOffset[4] = {0, STRIDE << 1, STRIDE << 3, 10 * STRIDE};
  ------------------
  |  |  248|  14.9k|#define STRIDE 16
  ------------------
                static const int32_t kiYOffset[4] = {0, STRIDE << 1, STRIDE << 3, 10 * STRIDE};
  ------------------
  |  |  248|  14.9k|#define STRIDE 16
  ------------------
                static const int32_t kiYOffset[4] = {0, STRIDE << 1, STRIDE << 3, 10 * STRIDE};
  ------------------
  |  |  248|  14.9k|#define STRIDE 16
  ------------------
  254|       |
  255|  74.6k|  for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (255:15): [True: 59.7k, False: 14.9k]
  ------------------
  256|  59.7k|    const int32_t kiOffset = kiYOffset[i];
  257|  59.7k|    const int32_t kiX1 = kiOffset + kiXOffset[2];
  258|  59.7k|    const int32_t kiX2 = STRIDE + kiOffset;
  ------------------
  |  |  248|  59.7k|#define STRIDE 16
  ------------------
  259|  59.7k|    const int32_t kiX3 = kiOffset + kiXOffset[3];
  260|  59.7k|    const int32_t kiI4 = i << 2; // 4*i
  261|  59.7k|    const int32_t kiZ0 = pBlk[kiOffset] + pBlk[kiX1];
  262|  59.7k|    const int32_t kiZ1 = pBlk[kiOffset] - pBlk[kiX1];
  263|  59.7k|    const int32_t kiZ2 = pBlk[kiX2] - pBlk[kiX3];
  264|  59.7k|    const int32_t kiZ3 = pBlk[kiX2] + pBlk[kiX3];
  265|       |
  266|  59.7k|    iTemp[kiI4]  = kiZ0 + kiZ3;
  267|  59.7k|    iTemp[1 + kiI4] = kiZ1 + kiZ2;
  268|  59.7k|    iTemp[2 + kiI4] = kiZ1 - kiZ2;
  269|  59.7k|    iTemp[3 + kiI4] = kiZ0 - kiZ3;
  270|  59.7k|  }
  271|       |
  272|  74.6k|  for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (272:15): [True: 59.7k, False: 14.9k]
  ------------------
  273|  59.7k|    const int32_t kiOffset = kiXOffset[i];
  274|  59.7k|    const int32_t kiI4 = 4 + i;
  275|  59.7k|    const int32_t kiZ0 = iTemp[i] + iTemp[4 + kiI4];
  276|  59.7k|    const int32_t kiZ1 = iTemp[i] - iTemp[4 + kiI4];
  277|  59.7k|    const int32_t kiZ2 = iTemp[kiI4] - iTemp[8 + kiI4];
  278|  59.7k|    const int32_t kiZ3 = iTemp[kiI4] + iTemp[8 + kiI4];
  279|       |
  280|  59.7k|    pBlk[kiOffset] = ((kiZ0 + kiZ3) * kiQMul + (1 << 5)) >> 6; //FIXME think about merging this into decode_resdual
  281|  59.7k|    pBlk[kiYOffset[1] + kiOffset] = ((kiZ1 + kiZ2) * kiQMul + (1 << 5)) >> 6;
  282|  59.7k|    pBlk[kiYOffset[2] + kiOffset] = ((kiZ1 - kiZ2) * kiQMul + (1 << 5)) >> 6;
  283|  59.7k|    pBlk[kiYOffset[3] + kiOffset] = ((kiZ0 - kiZ3) * kiQMul + (1 << 5)) >> 6;
  284|  59.7k|  }
  285|  14.9k|#undef STRIDE
  286|  14.9k|}
_ZN7WelsDec33WelsMbIntraPredictionConstructionEPNS_21TagWelsDecoderContextEPNS_10TagDqLayerEb:
  288|   152k|int32_t WelsMbIntraPredictionConstruction (PWelsDecoderContext pCtx, PDqLayer pCurDqLayer, bool bOutput) {
  289|       |//seems IPCM should not enter this path
  290|   152k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  291|       |
  292|   152k|  WelsFillRecNeededMbInfo (pCtx, bOutput, pCurDqLayer);
  293|       |
  294|   152k|  if (IS_INTRA16x16 (pCurDqLayer->pDec->pMbType[iMbXy])) {
  ------------------
  |  |  304|   152k|#define IS_INTRA16x16(type) ( MB_TYPE_INTRA16x16 == (type) )
  |  |  ------------------
  |  |  |  |  276|   152k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  ------------------
  |  |  |  Branch (304:29): [True: 35.2k, False: 117k]
  |  |  ------------------
  ------------------
  295|  35.2k|    RecI16x16Mb (iMbXy, pCtx, pCurDqLayer->pScaledTCoeff[iMbXy], pCurDqLayer);
  296|   117k|  } else if (IS_INTRA8x8 (pCurDqLayer->pDec->pMbType[iMbXy])) {
  ------------------
  |  |  302|   117k|#define IS_INTRA8x8(type) ( MB_TYPE_INTRA8x8 == (type) )
  |  |  ------------------
  |  |  |  |  277|   117k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  ------------------
  |  |  |  Branch (302:27): [True: 100k, False: 17.7k]
  |  |  ------------------
  ------------------
  297|   100k|    RecI8x8Mb (iMbXy, pCtx, pCurDqLayer->pScaledTCoeff[iMbXy], pCurDqLayer);
  298|   100k|  } else if (IS_INTRA4x4 (pCurDqLayer->pDec->pMbType[iMbXy])) {
  ------------------
  |  |  301|  17.7k|#define IS_INTRA4x4(type) ( MB_TYPE_INTRA4x4 == (type) )
  |  |  ------------------
  |  |  |  |  275|  17.7k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  ------------------
  |  |  |  Branch (301:27): [True: 17.7k, False: 0]
  |  |  ------------------
  ------------------
  299|  17.7k|    RecI4x4Mb (iMbXy, pCtx, pCurDqLayer->pScaledTCoeff[iMbXy], pCurDqLayer);
  300|  17.7k|  }
  301|   152k|  return ERR_NONE;
  302|   152k|}
_ZN7WelsDec21WelsMbInterPredictionEPNS_21TagWelsDecoderContextEPNS_10TagDqLayerE:
  304|  13.2M|int32_t WelsMbInterPrediction (PWelsDecoderContext pCtx, PDqLayer pCurDqLayer) {
  305|  13.2M|  int32_t iMbX = pCurDqLayer->iMbX;
  306|  13.2M|  int32_t iMbY = pCurDqLayer->iMbY;
  307|  13.2M|  uint8_t*  pDstY, *pDstCb, *pDstCr;
  308|       |
  309|  13.2M|  int32_t iLumaStride   = pCtx->pDec->iLinesize[0];
  310|  13.2M|  int32_t iChromaStride = pCtx->pDec->iLinesize[1];
  311|       |
  312|  13.2M|  pDstY  = pCurDqLayer->pDec->pData[0] + ((iMbY * iLumaStride + iMbX) << 4);
  313|  13.2M|  pDstCb = pCurDqLayer->pDec->pData[1] + ((iMbY * iChromaStride + iMbX) << 3);
  314|  13.2M|  pDstCr = pCurDqLayer->pDec->pData[2] + ((iMbY * iChromaStride + iMbX) << 3);
  315|       |
  316|  13.2M|  if (pCtx->eSliceType == P_SLICE) {
  ------------------
  |  Branch (316:7): [True: 3.65M, False: 9.57M]
  ------------------
  317|  3.65M|    WELS_B_MB_REC_VERIFY (GetInterPred (pDstY, pDstCb, pDstCr, pCtx));
  ------------------
  |  |   52|  3.65M|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  3.65M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.65M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 3.65M]
  |  |  ------------------
  |  |   55|  3.65M|    return uiRetTmp; \
  |  |   56|  3.65M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.65M]
  |  |  ------------------
  ------------------
  318|  9.57M|  } else {
  319|  9.57M|    if (pCtx->pTempDec == NULL)
  ------------------
  |  Branch (319:9): [True: 8.79k, False: 9.56M]
  ------------------
  320|  8.79k|      pCtx->pTempDec = AllocPicture (pCtx, pCtx->pSps->iMbWidth << 4, pCtx->pSps->iMbHeight << 4);
  321|  9.57M|    uint8_t*   pTempDstYCbCr[3];
  322|  9.57M|    uint8_t*   pDstYCbCr[3];
  323|  9.57M|    pTempDstYCbCr[0] = pCtx->pTempDec->pData[0] + ((iMbY * iLumaStride + iMbX) << 4);
  324|  9.57M|    pTempDstYCbCr[1] = pCtx->pTempDec->pData[1] + ((iMbY * iChromaStride + iMbX) << 3);
  325|  9.57M|    pTempDstYCbCr[2] = pCtx->pTempDec->pData[2] + ((iMbY * iChromaStride + iMbX) << 3);
  326|  9.57M|    pDstYCbCr[0] = pDstY;
  327|  9.57M|    pDstYCbCr[1] = pDstCb;
  328|  9.57M|    pDstYCbCr[2] = pDstCr;
  329|  9.57M|    WELS_B_MB_REC_VERIFY (GetInterBPred (pDstYCbCr, pTempDstYCbCr, pCtx));
  ------------------
  |  |   52|  9.57M|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  9.57M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  9.57M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 568, False: 9.57M]
  |  |  ------------------
  |  |   55|  9.57M|    return uiRetTmp; \
  |  |   56|  9.57M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 9.57M]
  |  |  ------------------
  ------------------
  330|  9.57M|  }
  331|  13.2M|  return ERR_NONE;
  332|  13.2M|}
_ZN7WelsDec24WelsTargetMbConstructionEPNS_21TagWelsDecoderContextE:
  334|  13.5M|int32_t WelsTargetMbConstruction (PWelsDecoderContext pCtx) {
  335|  13.5M|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
  336|  13.5M|  if (MB_TYPE_INTRA_PCM == pCurDqLayer->pDec->pMbType[pCurDqLayer->iMbXyIndex]) {
  ------------------
  |  |  284|  13.5M|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (336:7): [True: 5.17k, False: 13.5M]
  ------------------
  337|       |    //already decoded and reconstructed when parsing
  338|  5.17k|    return ERR_NONE;
  339|  13.5M|  } else if (IS_INTRA (pCurDqLayer->pDec->pMbType[pCurDqLayer->iMbXyIndex])) {
  ------------------
  |  |  305|  13.5M|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  13.5M|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  13.5M|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  13.5M|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  13.5M|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  13.5M|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 152k, False: 13.3M]
  |  |  ------------------
  ------------------
  340|   152k|    WelsMbIntraPredictionConstruction (pCtx, pCurDqLayer, 1);
  341|  13.3M|  } else if (IS_INTER (pCurDqLayer->pDec->pMbType[pCurDqLayer->iMbXyIndex])) { //InterMB
  ------------------
  |  |  306|  13.3M|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|  13.3M|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|  13.3M|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|  13.3M|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|  13.3M|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|  13.3M|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|  13.3M|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|  13.3M|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|  13.3M|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 13.3M, False: 0]
  |  |  ------------------
  ------------------
  342|  13.3M|    if (0 == pCurDqLayer->pCbp[pCurDqLayer->iMbXyIndex]) { //uiCbp==0 include SKIP
  ------------------
  |  Branch (342:9): [True: 13.2M, False: 153k]
  ------------------
  343|  13.2M|      if (!CheckRefPics (pCtx)) {
  ------------------
  |  Branch (343:11): [True: 0, False: 13.2M]
  ------------------
  344|      0|        return ERR_INFO_MB_RECON_FAIL;
  345|      0|      }
  346|  13.2M|      return WelsMbInterPrediction (pCtx, pCurDqLayer);
  347|  13.2M|    } else {
  348|   153k|      WelsMbInterConstruction (pCtx, pCurDqLayer);
  349|   153k|    }
  350|  13.3M|  } else {
  351|      0|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "WelsTargetMbConstruction():::::Unknown MB type: %d",
  352|      0|             pCurDqLayer->pDec->pMbType[pCurDqLayer->iMbXyIndex]);
  353|      0|    return ERR_INFO_MB_RECON_FAIL;
  354|      0|  }
  355|       |
  356|   306k|  return ERR_NONE;
  357|  13.5M|}
_ZN7WelsDec16WelsChromaDcIdctEPs:
  359|  74.1k|void WelsChromaDcIdct (int16_t* pBlock) {
  360|  74.1k|  int32_t iStride = 32;
  361|  74.1k|  int32_t iXStride = 16;
  362|  74.1k|  int32_t iStride1 = iXStride + iStride;
  363|  74.1k|  int16_t* pBlk = pBlock;
  364|  74.1k|  int32_t iA, iB, iC, iD, iE;
  365|       |
  366|  74.1k|  iA = pBlk[0];
  367|  74.1k|  iB = pBlk[iXStride];
  368|  74.1k|  iC = pBlk[iStride];
  369|  74.1k|  iD = pBlk[iStride1];
  370|       |
  371|  74.1k|  iE = iA - iB;
  372|  74.1k|  iA += iB;
  373|  74.1k|  iB = iC - iD;
  374|  74.1k|  iC += iD;
  375|       |
  376|  74.1k|  pBlk[0] = (iA + iC);
  377|  74.1k|  pBlk[iXStride] = (iE + iB);
  378|  74.1k|  pBlk[iStride] = (iA - iC);
  379|  74.1k|  pBlk[iStride1] = (iE - iB);
  380|  74.1k|}
_ZN7WelsDec29WelsMapNxNNeighToSampleNormalEPNS_16TagNeighborAvailEPi:
  382|  93.1k|void WelsMapNxNNeighToSampleNormal (PWelsNeighAvail pNeighAvail, int32_t* pSampleAvail) {
  383|  93.1k|  if (pNeighAvail->iLeftAvail) {  //left
  ------------------
  |  Branch (383:7): [True: 64.3k, False: 28.7k]
  ------------------
  384|  64.3k|    pSampleAvail[ 6] =
  385|  64.3k|      pSampleAvail[12] =
  386|  64.3k|        pSampleAvail[18] =
  387|  64.3k|          pSampleAvail[24] = 1;
  388|  64.3k|  }
  389|  93.1k|  if (pNeighAvail->iLeftTopAvail) { //top_left
  ------------------
  |  Branch (389:7): [True: 35.9k, False: 57.2k]
  ------------------
  390|  35.9k|    pSampleAvail[0] = 1;
  391|  35.9k|  }
  392|  93.1k|  if (pNeighAvail->iTopAvail) { //top
  ------------------
  |  Branch (392:7): [True: 42.8k, False: 50.3k]
  ------------------
  393|  42.8k|    pSampleAvail[1] =
  394|  42.8k|      pSampleAvail[2] =
  395|  42.8k|        pSampleAvail[3] =
  396|  42.8k|          pSampleAvail[4] = 1;
  397|  42.8k|  }
  398|  93.1k|  if (pNeighAvail->iRightTopAvail) { //top_right
  ------------------
  |  Branch (398:7): [True: 35.5k, False: 57.6k]
  ------------------
  399|  35.5k|    pSampleAvail[5] = 1;
  400|  35.5k|  }
  401|  93.1k|}
_ZN7WelsDec33WelsMapNxNNeighToSampleConstrain1EPNS_16TagNeighborAvailEPi:
  403|   237k|void WelsMapNxNNeighToSampleConstrain1 (PWelsNeighAvail pNeighAvail, int32_t* pSampleAvail) {
  404|   237k|  if (pNeighAvail->iLeftAvail && IS_INTRA (pNeighAvail->iLeftType)) {   //left
  ------------------
  |  |  305|  15.5k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  15.5k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  15.5k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  15.5k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  15.5k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  15.5k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 14.6k, False: 924]
  |  |  ------------------
  ------------------
  |  Branch (404:7): [True: 15.5k, False: 222k]
  ------------------
  405|  14.6k|    pSampleAvail[ 6] =
  406|  14.6k|      pSampleAvail[12] =
  407|  14.6k|        pSampleAvail[18] =
  408|  14.6k|          pSampleAvail[24] = 1;
  409|  14.6k|  }
  410|   237k|  if (pNeighAvail->iLeftTopAvail && IS_INTRA (pNeighAvail->iLeftTopType)) {  //top_left
  ------------------
  |  |  305|  7.54k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  7.54k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  7.54k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  7.54k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.54k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  7.54k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 6.84k, False: 707]
  |  |  ------------------
  ------------------
  |  Branch (410:7): [True: 7.54k, False: 230k]
  ------------------
  411|  6.84k|    pSampleAvail[0] = 1;
  412|  6.84k|  }
  413|   237k|  if (pNeighAvail->iTopAvail && IS_INTRA (pNeighAvail->iTopType)) {  //top
  ------------------
  |  |  305|  38.4k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  38.4k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  38.4k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  38.4k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  38.4k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  38.4k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 37.6k, False: 831]
  |  |  ------------------
  ------------------
  |  Branch (413:7): [True: 38.4k, False: 199k]
  ------------------
  414|  37.6k|    pSampleAvail[1] =
  415|  37.6k|      pSampleAvail[2] =
  416|  37.6k|        pSampleAvail[3] =
  417|  37.6k|          pSampleAvail[4] = 1;
  418|  37.6k|  }
  419|   237k|  if (pNeighAvail->iRightTopAvail && IS_INTRA (pNeighAvail->iRightTopType)) {  //top_right
  ------------------
  |  |  305|  7.17k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  7.17k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  7.17k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  7.17k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.17k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  7.17k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 6.48k, False: 685]
  |  |  ------------------
  ------------------
  |  Branch (419:7): [True: 7.17k, False: 230k]
  ------------------
  420|  6.48k|    pSampleAvail[5] = 1;
  421|  6.48k|  }
  422|   237k|}
_ZN7WelsDec31WelsMap16x16NeighToSampleNormalEPNS_16TagNeighborAvailEPh:
  423|  47.7k|void WelsMap16x16NeighToSampleNormal (PWelsNeighAvail pNeighAvail, uint8_t* pSampleAvail) {
  424|  47.7k|  if (pNeighAvail->iLeftAvail) {
  ------------------
  |  Branch (424:7): [True: 19.4k, False: 28.2k]
  ------------------
  425|  19.4k|    *pSampleAvail = (1 << 2);
  426|  19.4k|  }
  427|  47.7k|  if (pNeighAvail->iLeftTopAvail) {
  ------------------
  |  Branch (427:7): [True: 11.8k, False: 35.8k]
  ------------------
  428|  11.8k|    *pSampleAvail |= (1 << 1);
  429|  11.8k|  }
  430|  47.7k|  if (pNeighAvail->iTopAvail) {
  ------------------
  |  Branch (430:7): [True: 24.9k, False: 22.7k]
  ------------------
  431|  24.9k|    *pSampleAvail |= 1;
  432|  24.9k|  }
  433|  47.7k|}
_ZN7WelsDec35WelsMap16x16NeighToSampleConstrain1EPNS_16TagNeighborAvailEPh:
  435|  20.1k|void WelsMap16x16NeighToSampleConstrain1 (PWelsNeighAvail pNeighAvail, uint8_t* pSampleAvail) {
  436|  20.1k|  if (pNeighAvail->iLeftAvail && IS_INTRA (pNeighAvail->iLeftType)) {
  ------------------
  |  |  305|  7.36k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  7.36k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  7.36k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  7.36k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.36k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  7.36k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 5.36k, False: 1.99k]
  |  |  ------------------
  ------------------
  |  Branch (436:7): [True: 7.36k, False: 12.7k]
  ------------------
  437|  5.36k|    *pSampleAvail = (1 << 2);
  438|  5.36k|  }
  439|  20.1k|  if (pNeighAvail->iLeftTopAvail && IS_INTRA (pNeighAvail->iLeftTopType)) {
  ------------------
  |  |  305|  3.96k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  3.96k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  3.96k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  3.96k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.96k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  3.96k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 2.60k, False: 1.35k]
  |  |  ------------------
  ------------------
  |  Branch (439:7): [True: 3.96k, False: 16.1k]
  ------------------
  440|  2.60k|    *pSampleAvail |= (1 << 1);
  441|  2.60k|  }
  442|  20.1k|  if (pNeighAvail->iTopAvail && IS_INTRA (pNeighAvail->iTopType)) {
  ------------------
  |  |  305|  7.31k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  7.31k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  7.31k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  7.31k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.31k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  7.31k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 5.49k, False: 1.81k]
  |  |  ------------------
  ------------------
  |  Branch (442:7): [True: 7.31k, False: 12.7k]
  ------------------
  443|  5.49k|    *pSampleAvail |= 1;
  444|  5.49k|  }
  445|  20.1k|}
_ZN7WelsDec17ParseIntra4x4ModeEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailEPaPN10WelsCommon15TagBitStringAuxEPNS_10TagDqLayerE:
  449|   187k|                           PDqLayer pCurDqLayer) {
  450|   187k|  int32_t iSampleAvail[5 * 6] = { 0 }; //initialize as 0
  451|   187k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  452|   187k|  int32_t iFinalMode, i;
  453|       |
  454|   187k|  uint8_t uiNeighAvail = 0;
  455|   187k|  uint32_t uiCode;
  456|   187k|  int32_t iCode;
  457|   187k|  pCtx->pMapNxNNeighToSampleFunc (pNeighAvail, iSampleAvail);
  458|   187k|  uiNeighAvail = (iSampleAvail[6] << 2) | (iSampleAvail[0] << 1) | (iSampleAvail[1]);
  459|  1.81M|  for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (459:15): [True: 1.78M, False: 31.2k]
  ------------------
  460|  1.78M|    int32_t iPrevIntra4x4PredMode = 0;
  461|  1.78M|    if (pCurDqLayer->sLayerInfo.pPps->bEntropyCodingModeFlag) {
  ------------------
  |  Branch (461:9): [True: 331k, False: 1.45M]
  ------------------
  462|   331k|      WELS_READ_VERIFY (ParseIntraPredModeLumaCabac (pCtx, iCode));
  ------------------
  |  |   52|   331k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   331k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   331k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.30k, False: 330k]
  |  |  ------------------
  |  |   55|   331k|    return uiRetTmp; \
  |  |   56|   331k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 330k]
  |  |  ------------------
  ------------------
  463|   330k|      iPrevIntra4x4PredMode = iCode;
  464|  1.45M|    } else {
  465|  1.45M|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode));
  ------------------
  |  |   52|  1.45M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.45M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.45M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 134k, False: 1.31M]
  |  |  ------------------
  |  |   55|  1.45M|    return uiRetTmp; \
  |  |   56|  1.45M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
  466|  1.31M|      iPrevIntra4x4PredMode = uiCode;
  467|  1.31M|    }
  468|  1.64M|    const int32_t kiPredMode = PredIntra4x4Mode (pIntraPredMode, i);
  469|       |
  470|  1.64M|    int8_t iBestMode;
  471|  1.64M|    if (pCurDqLayer->sLayerInfo.pPps->bEntropyCodingModeFlag) {
  ------------------
  |  Branch (471:9): [True: 330k, False: 1.31M]
  ------------------
  472|   330k|      if (iPrevIntra4x4PredMode == -1)
  ------------------
  |  Branch (472:11): [True: 302k, False: 27.5k]
  ------------------
  473|   302k|        iBestMode = kiPredMode;
  474|  27.5k|      else
  475|  27.5k|        iBestMode = iPrevIntra4x4PredMode + (iPrevIntra4x4PredMode >= kiPredMode);
  476|  1.31M|    } else {
  477|  1.31M|      if (iPrevIntra4x4PredMode) {
  ------------------
  |  Branch (477:11): [True: 967k, False: 349k]
  ------------------
  478|   967k|        iBestMode = kiPredMode;
  479|   967k|      } else {
  480|   349k|        WELS_READ_VERIFY (BsGetBits (pBs, 3, &uiCode));
  ------------------
  |  |   52|   349k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   349k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   349k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 470, False: 348k]
  |  |  ------------------
  |  |   55|   349k|    return uiRetTmp; \
  |  |   56|   349k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 348k]
  |  |  ------------------
  ------------------
  481|   348k|        iBestMode = uiCode + ((int32_t) uiCode >= kiPredMode);
  482|   348k|      }
  483|  1.31M|    }
  484|       |
  485|  1.64M|    iFinalMode = CheckIntraNxNPredMode (&iSampleAvail[0], &iBestMode, i, false);
  486|  1.64M|    if (iFinalMode == GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INVALID_INTRA4X4_MODE)) {
  ------------------
  |  |   59|  1.64M|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  |  Branch (486:9): [True: 19.9k, False: 1.62M]
  ------------------
  487|  19.9k|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I4x4_PRED_MODE);
  ------------------
  |  |   59|  19.9k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  488|  19.9k|    }
  489|       |
  490|  1.62M|    pCurDqLayer->pIntra4x4FinalMode[iMbXy][g_kuiScan4[i]] = iFinalMode;
  491|       |
  492|  1.62M|    pIntraPredMode[g_kuiScan8[i]] = iBestMode;
  493|       |
  494|  1.62M|    iSampleAvail[g_kuiCache30ScanIdx[i]] = 1;
  495|  1.62M|  }
  496|  31.2k|  ST32 (&pCurDqLayer->pIntraPredMode[iMbXy][0], LD32 (&pIntraPredMode[1 + 8 * 4]));
  ------------------
  |  |   67|  31.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  497|  31.2k|  pCurDqLayer->pIntraPredMode[iMbXy][4] = pIntraPredMode[4 + 8 * 1];
  498|  31.2k|  pCurDqLayer->pIntraPredMode[iMbXy][5] = pIntraPredMode[4 + 8 * 2];
  499|  31.2k|  pCurDqLayer->pIntraPredMode[iMbXy][6] = pIntraPredMode[4 + 8 * 3];
  500|       |
  501|  31.2k|  if (pCtx->pSps->uiChromaFormatIdc == 0)//no need parse chroma
  ------------------
  |  Branch (501:7): [True: 12.8k, False: 18.3k]
  ------------------
  502|  12.8k|    return ERR_NONE;
  503|       |
  504|  18.3k|  if (pCurDqLayer->sLayerInfo.pPps->bEntropyCodingModeFlag) {
  ------------------
  |  Branch (504:7): [True: 14.4k, False: 3.91k]
  ------------------
  505|  14.4k|    WELS_READ_VERIFY (ParseIntraPredModeChromaCabac (pCtx, uiNeighAvail, iCode));
  ------------------
  |  |   52|  14.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  14.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  14.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 326, False: 14.1k]
  |  |  ------------------
  |  |   55|  14.4k|    return uiRetTmp; \
  |  |   56|  14.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 14.1k]
  |  |  ------------------
  ------------------
  506|  14.1k|    if (iCode > MAX_PRED_MODE_ID_CHROMA) {
  ------------------
  |  |   63|  14.1k|#define MAX_PRED_MODE_ID_CHROMA  3
  ------------------
  |  Branch (506:9): [True: 0, False: 14.1k]
  ------------------
  507|      0|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I_CHROMA_PRED_MODE);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  508|      0|    }
  509|  14.1k|    pCurDqLayer->pChromaPredMode[iMbXy] = iCode;
  510|  14.1k|  } else {
  511|  3.91k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //intra_chroma_pred_mode
  ------------------
  |  |   52|  3.91k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.91k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.91k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 230, False: 3.68k]
  |  |  ------------------
  |  |   55|  3.91k|    return uiRetTmp; \
  |  |   56|  3.91k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.68k]
  |  |  ------------------
  ------------------
  512|  3.68k|    if (uiCode > MAX_PRED_MODE_ID_CHROMA) {
  ------------------
  |  |   63|  3.68k|#define MAX_PRED_MODE_ID_CHROMA  3
  ------------------
  |  Branch (512:9): [True: 462, False: 3.21k]
  ------------------
  513|    462|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I_CHROMA_PRED_MODE);
  ------------------
  |  |   59|    462|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  514|    462|    }
  515|  3.21k|    pCurDqLayer->pChromaPredMode[iMbXy] = uiCode;
  516|  3.21k|  }
  517|       |
  518|  17.3k|  if (-1 == pCurDqLayer->pChromaPredMode[iMbXy]
  ------------------
  |  Branch (518:7): [True: 0, False: 17.3k]
  ------------------
  519|  17.3k|      || CheckIntraChromaPredMode (uiNeighAvail, &pCurDqLayer->pChromaPredMode[iMbXy])) {
  ------------------
  |  Branch (519:10): [True: 1.31k, False: 16.0k]
  ------------------
  520|  1.31k|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I_CHROMA_PRED_MODE);
  ------------------
  |  |   59|  1.31k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  521|  1.31k|  }
  522|  16.0k|  return ERR_NONE;
  523|  17.3k|}
_ZN7WelsDec17ParseIntra8x8ModeEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailEPaPN10WelsCommon15TagBitStringAuxEPNS_10TagDqLayerE:
  527|   143k|                           PDqLayer pCurDqLayer) {
  528|       |  // Similar with Intra_4x4, can put them together when needed
  529|   143k|  int32_t iSampleAvail[5 * 6] = { 0 }; //initialize as 0
  530|   143k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  531|   143k|  int32_t iFinalMode, i;
  532|       |
  533|   143k|  uint8_t uiNeighAvail = 0;
  534|   143k|  uint32_t uiCode;
  535|   143k|  int32_t iCode;
  536|   143k|  pCtx->pMapNxNNeighToSampleFunc (pNeighAvail, iSampleAvail);
  537|       |  // Top-Right : Left : Top-Left : Top
  538|   143k|  uiNeighAvail = (iSampleAvail[5] << 3) | (iSampleAvail[6] << 2) | (iSampleAvail[0] << 1) | (iSampleAvail[1]);
  539|       |
  540|   143k|  pCurDqLayer->pIntraNxNAvailFlag[iMbXy] = uiNeighAvail;
  541|       |
  542|   706k|  for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (542:15): [True: 566k, False: 139k]
  ------------------
  543|   566k|    int32_t iPrevIntra4x4PredMode = 0;
  544|   566k|    if (pCurDqLayer->sLayerInfo.pPps->bEntropyCodingModeFlag) {
  ------------------
  |  Branch (544:9): [True: 266k, False: 300k]
  ------------------
  545|   266k|      WELS_READ_VERIFY (ParseIntraPredModeLumaCabac (pCtx, iCode));
  ------------------
  |  |   52|   266k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   266k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   266k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 754, False: 266k]
  |  |  ------------------
  |  |   55|   266k|    return uiRetTmp; \
  |  |   56|   266k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 266k]
  |  |  ------------------
  ------------------
  546|   266k|      iPrevIntra4x4PredMode = iCode;
  547|   300k|    } else {
  548|   300k|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode));
  ------------------
  |  |   52|   300k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   300k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   300k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 423, False: 299k]
  |  |  ------------------
  |  |   55|   300k|    return uiRetTmp; \
  |  |   56|   300k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 299k]
  |  |  ------------------
  ------------------
  549|   299k|      iPrevIntra4x4PredMode = uiCode;
  550|   299k|    }
  551|   565k|    const int32_t kiPredMode = PredIntra4x4Mode (pIntraPredMode, i << 2);
  552|       |
  553|   565k|    int8_t iBestMode;
  554|   565k|    if (pCurDqLayer->sLayerInfo.pPps->bEntropyCodingModeFlag) {
  ------------------
  |  Branch (554:9): [True: 266k, False: 299k]
  ------------------
  555|   266k|      if (iPrevIntra4x4PredMode == -1)
  ------------------
  |  Branch (555:11): [True: 209k, False: 56.5k]
  ------------------
  556|   209k|        iBestMode = kiPredMode;
  557|  56.5k|      else
  558|  56.5k|        iBestMode = iPrevIntra4x4PredMode + (iPrevIntra4x4PredMode >= kiPredMode);
  559|   299k|    } else {
  560|   299k|      if (iPrevIntra4x4PredMode) {
  ------------------
  |  Branch (560:11): [True: 198k, False: 101k]
  ------------------
  561|   198k|        iBestMode = kiPredMode;
  562|   198k|      } else {
  563|   101k|        WELS_READ_VERIFY (BsGetBits (pBs, 3, &uiCode));
  ------------------
  |  |   52|   101k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   101k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   101k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 481, False: 100k]
  |  |  ------------------
  |  |   55|   101k|    return uiRetTmp; \
  |  |   56|   101k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 100k]
  |  |  ------------------
  ------------------
  564|   100k|        iBestMode = uiCode + ((int32_t) uiCode >= kiPredMode);
  565|   100k|      }
  566|   299k|    }
  567|       |
  568|   565k|    iFinalMode = CheckIntraNxNPredMode (&iSampleAvail[0], &iBestMode, i << 2, true);
  569|       |
  570|   565k|    if (iFinalMode == GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INVALID_INTRA4X4_MODE)) {
  ------------------
  |  |   59|   565k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  |  Branch (570:9): [True: 2.12k, False: 563k]
  ------------------
  571|  2.12k|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I4x4_PRED_MODE);
  ------------------
  |  |   59|  2.12k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  572|  2.12k|    }
  573|       |
  574|  2.81M|    for (int j = 0; j < 4; j++) {
  ------------------
  |  Branch (574:21): [True: 2.25M, False: 563k]
  ------------------
  575|  2.25M|      pCurDqLayer->pIntra4x4FinalMode[iMbXy][g_kuiScan4[ (i << 2) + j]] = iFinalMode;
  576|  2.25M|      pIntraPredMode[g_kuiScan8[ (i << 2) + j]] = iBestMode;
  577|  2.25M|      iSampleAvail[g_kuiCache30ScanIdx[ (i << 2) + j]] = 1;
  578|  2.25M|    }
  579|   563k|  }
  580|   139k|  ST32 (&pCurDqLayer->pIntraPredMode[iMbXy][0], LD32 (&pIntraPredMode[1 + 8 * 4]));
  ------------------
  |  |   67|   139k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  581|   139k|  pCurDqLayer->pIntraPredMode[iMbXy][4] = pIntraPredMode[4 + 8 * 1];
  582|   139k|  pCurDqLayer->pIntraPredMode[iMbXy][5] = pIntraPredMode[4 + 8 * 2];
  583|   139k|  pCurDqLayer->pIntraPredMode[iMbXy][6] = pIntraPredMode[4 + 8 * 3];
  584|       |
  585|   139k|  if (pCtx->pSps->uiChromaFormatIdc == 0)
  ------------------
  |  Branch (585:7): [True: 67.0k, False: 72.8k]
  ------------------
  586|  67.0k|    return ERR_NONE;
  587|       |
  588|  72.8k|  if (pCurDqLayer->sLayerInfo.pPps->bEntropyCodingModeFlag) {
  ------------------
  |  Branch (588:7): [True: 63.5k, False: 9.29k]
  ------------------
  589|  63.5k|    WELS_READ_VERIFY (ParseIntraPredModeChromaCabac (pCtx, uiNeighAvail, iCode));
  ------------------
  |  |   52|  63.5k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  63.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  63.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 259, False: 63.3k]
  |  |  ------------------
  |  |   55|  63.5k|    return uiRetTmp; \
  |  |   56|  63.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 63.3k]
  |  |  ------------------
  ------------------
  590|  63.3k|    if (iCode > MAX_PRED_MODE_ID_CHROMA) {
  ------------------
  |  |   63|  63.3k|#define MAX_PRED_MODE_ID_CHROMA  3
  ------------------
  |  Branch (590:9): [True: 0, False: 63.3k]
  ------------------
  591|      0|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I_CHROMA_PRED_MODE);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  592|      0|    }
  593|  63.3k|    pCurDqLayer->pChromaPredMode[iMbXy] = iCode;
  594|  63.3k|  } else {
  595|  9.29k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //intra_chroma_pred_mode
  ------------------
  |  |   52|  9.29k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  9.29k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  9.29k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.05k, False: 8.24k]
  |  |  ------------------
  |  |   55|  9.29k|    return uiRetTmp; \
  |  |   56|  9.29k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 8.24k]
  |  |  ------------------
  ------------------
  596|  8.24k|    if (uiCode > MAX_PRED_MODE_ID_CHROMA) {
  ------------------
  |  |   63|  8.24k|#define MAX_PRED_MODE_ID_CHROMA  3
  ------------------
  |  Branch (596:9): [True: 339, False: 7.90k]
  ------------------
  597|    339|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I_CHROMA_PRED_MODE);
  ------------------
  |  |   59|    339|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  598|    339|    }
  599|  7.90k|    pCurDqLayer->pChromaPredMode[iMbXy] = uiCode;
  600|  7.90k|  }
  601|       |
  602|  71.2k|  if (-1 == pCurDqLayer->pChromaPredMode[iMbXy]
  ------------------
  |  Branch (602:7): [True: 0, False: 71.2k]
  ------------------
  603|  71.2k|      || CheckIntraChromaPredMode (uiNeighAvail, &pCurDqLayer->pChromaPredMode[iMbXy])) {
  ------------------
  |  Branch (603:10): [True: 754, False: 70.4k]
  ------------------
  604|    754|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I_CHROMA_PRED_MODE);
  ------------------
  |  |   59|    754|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  605|    754|  }
  606|       |
  607|  70.4k|  return ERR_NONE;
  608|  71.2k|}
_ZN7WelsDec19ParseIntra16x16ModeEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailEPN10WelsCommon15TagBitStringAuxEPNS_10TagDqLayerE:
  611|  67.8k|                             PDqLayer pCurDqLayer) {
  612|  67.8k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  613|  67.8k|  uint8_t uiNeighAvail = 0; //0x07 = 0 1 1 1, means left, top-left, top avail or not. (1: avail, 0: unavail)
  614|  67.8k|  uint32_t uiCode;
  615|  67.8k|  int32_t iCode;
  616|  67.8k|  pCtx->pMap16x16NeighToSampleFunc (pNeighAvail, &uiNeighAvail);
  617|       |
  618|  67.8k|  if (CheckIntra16x16PredMode (uiNeighAvail,
  ------------------
  |  Branch (618:7): [True: 18.0k, False: 49.8k]
  ------------------
  619|  67.8k|                               &pCurDqLayer->pIntraPredMode[iMbXy][7])) { //invalid iPredMode, must stop decoding
  620|  18.0k|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I16x16_PRED_MODE);
  ------------------
  |  |   59|  18.0k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  621|  18.0k|  }
  622|  49.8k|  if (pCtx->pSps->uiChromaFormatIdc == 0)
  ------------------
  |  Branch (622:7): [True: 8.51k, False: 41.2k]
  ------------------
  623|  8.51k|    return ERR_NONE;
  624|       |
  625|  41.2k|  if (pCurDqLayer->sLayerInfo.pPps->bEntropyCodingModeFlag) {
  ------------------
  |  Branch (625:7): [True: 27.3k, False: 13.9k]
  ------------------
  626|  27.3k|    WELS_READ_VERIFY (ParseIntraPredModeChromaCabac (pCtx, uiNeighAvail, iCode));
  ------------------
  |  |   52|  27.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  27.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  27.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 370, False: 26.9k]
  |  |  ------------------
  |  |   55|  27.3k|    return uiRetTmp; \
  |  |   56|  27.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 26.9k]
  |  |  ------------------
  ------------------
  627|  26.9k|    if (iCode > MAX_PRED_MODE_ID_CHROMA) {
  ------------------
  |  |   63|  26.9k|#define MAX_PRED_MODE_ID_CHROMA  3
  ------------------
  |  Branch (627:9): [True: 0, False: 26.9k]
  ------------------
  628|      0|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I_CHROMA_PRED_MODE);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  629|      0|    }
  630|  26.9k|    pCurDqLayer->pChromaPredMode[iMbXy] = iCode;
  631|  26.9k|  } else {
  632|  13.9k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //intra_chroma_pred_mode
  ------------------
  |  |   52|  13.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  13.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  13.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 943, False: 13.0k]
  |  |  ------------------
  |  |   55|  13.9k|    return uiRetTmp; \
  |  |   56|  13.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 13.0k]
  |  |  ------------------
  ------------------
  633|  13.0k|    if (uiCode > MAX_PRED_MODE_ID_CHROMA) {
  ------------------
  |  |   63|  13.0k|#define MAX_PRED_MODE_ID_CHROMA  3
  ------------------
  |  Branch (633:9): [True: 606, False: 12.4k]
  ------------------
  634|    606|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I_CHROMA_PRED_MODE);
  ------------------
  |  |   59|    606|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  635|    606|    }
  636|  12.4k|    pCurDqLayer->pChromaPredMode[iMbXy] = uiCode;
  637|  12.4k|  }
  638|  39.3k|  if (-1 == pCurDqLayer->pChromaPredMode[iMbXy]
  ------------------
  |  Branch (638:7): [True: 0, False: 39.3k]
  ------------------
  639|  39.3k|      || CheckIntraChromaPredMode (uiNeighAvail, &pCurDqLayer->pChromaPredMode[iMbXy])) {
  ------------------
  |  Branch (639:10): [True: 683, False: 38.6k]
  ------------------
  640|    683|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I_CHROMA_PRED_MODE);
  ------------------
  |  |   59|    683|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  641|    683|  }
  642|       |
  643|  38.6k|  return ERR_NONE;
  644|  39.3k|}
_ZN7WelsDec32WelsDecodeMbCabacISliceBaseMode0EPNS_21TagWelsDecoderContextERj:
  646|   100k|int32_t WelsDecodeMbCabacISliceBaseMode0 (PWelsDecoderContext pCtx, uint32_t& uiEosFlag) {
  647|   100k|  PDqLayer pCurDqLayer             = pCtx->pCurDqLayer;
  648|   100k|  PBitStringAux pBsAux           = pCurDqLayer->pBitStringAux;
  649|   100k|  PSlice pSlice                  = &pCurDqLayer->sLayerInfo.sSliceInLayer;
  650|   100k|  PSliceHeader pSliceHeader      = &pSlice->sSliceHeaderExt.sSliceHeader;
  651|   100k|  SWelsNeighAvail sNeighAvail;
  652|   100k|  int32_t iScanIdxStart = pSlice->sSliceHeaderExt.uiScanIdxStart;
  653|   100k|  int32_t iScanIdxEnd   = pSlice->sSliceHeaderExt.uiScanIdxEnd;
  654|   100k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  655|   100k|  int32_t i;
  656|   100k|  uint32_t uiMbType = 0, uiCbp = 0, uiCbpLuma = 0, uiCbpChroma = 0;
  657|       |
  658|   100k|  ENFORCE_STACK_ALIGN_1D (uint8_t, pNonZeroCount, 48, 16);
  ------------------
  |  |   58|   100k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   100k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
  659|       |
  660|   100k|  pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] = true;
  661|   100k|  pCurDqLayer->pTransformSize8x8Flag[iMbXy] = false;
  662|       |
  663|   100k|  pCurDqLayer->pInterPredictionDoneFlag[iMbXy] = 0;
  664|   100k|  pCurDqLayer->pResidualPredFlag[iMbXy] = pSlice->sSliceHeaderExt.bDefaultResidualPredFlag;
  665|   100k|  GetNeighborAvailMbType (&sNeighAvail, pCurDqLayer);
  666|   100k|  WELS_READ_VERIFY (ParseMBTypeISliceCabac (pCtx, &sNeighAvail, uiMbType));
  ------------------
  |  |   52|   100k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   100k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   100k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.49k, False: 98.9k]
  |  |  ------------------
  |  |   55|   100k|    return uiRetTmp; \
  |  |   56|   100k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 98.9k]
  |  |  ------------------
  ------------------
  667|  98.9k|  if (uiMbType > 25) {
  ------------------
  |  Branch (667:7): [True: 0, False: 98.9k]
  ------------------
  668|      0|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_TYPE);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  669|  98.9k|  } else if (!pCtx->pSps->uiChromaFormatIdc && ((uiMbType >= 5 && uiMbType <= 12) || (uiMbType >= 17
  ------------------
  |  Branch (669:14): [True: 6.07k, False: 92.9k]
  |  Branch (669:50): [True: 1.43k, False: 4.64k]
  |  Branch (669:67): [True: 414, False: 1.01k]
  |  Branch (669:87): [True: 606, False: 5.05k]
  ------------------
  670|    800|             && uiMbType <= 24))) {
  ------------------
  |  Branch (670:17): [True: 386, False: 220]
  ------------------
  671|    800|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_TYPE);
  ------------------
  |  |   59|    800|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  672|  98.1k|  } else if (25 == uiMbType) {   //I_PCM
  ------------------
  |  Branch (672:14): [True: 2.07k, False: 96.1k]
  ------------------
  673|  2.07k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "I_PCM mode exists in I slice!");
  674|  2.07k|    WELS_READ_VERIFY (ParseIPCMInfoCabac (pCtx));
  ------------------
  |  |   52|  2.07k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.07k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.07k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 590, False: 1.48k]
  |  |  ------------------
  |  |   55|  2.07k|    return uiRetTmp; \
  |  |   56|  2.07k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.48k]
  |  |  ------------------
  ------------------
  675|  1.48k|    pSlice->iLastDeltaQp = 0;
  676|  1.48k|    WELS_READ_VERIFY (ParseEndOfSliceCabac (pCtx, uiEosFlag));
  ------------------
  |  |   52|  1.48k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.48k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.48k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 1.48k]
  |  |  ------------------
  |  |   55|  1.48k|    return uiRetTmp; \
  |  |   56|  1.48k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.48k]
  |  |  ------------------
  ------------------
  677|  1.48k|    if (uiEosFlag) {
  ------------------
  |  Branch (677:9): [True: 353, False: 1.13k]
  ------------------
  678|    353|      RestoreCabacDecEngineToBS (pCtx->pCabacDecEngine, pCtx->pCurDqLayer->pBitStringAux);
  679|    353|    }
  680|  1.48k|    return ERR_NONE;
  681|  96.1k|  } else if (0 == uiMbType) { //I4x4
  ------------------
  |  Branch (681:14): [True: 75.2k, False: 20.8k]
  ------------------
  682|  75.2k|    ENFORCE_STACK_ALIGN_1D (int8_t, pIntraPredMode, 48, 16);
  ------------------
  |  |   58|  75.2k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|  75.2k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
  683|  75.2k|    pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA4x4;
  ------------------
  |  |  275|  75.2k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
  684|  75.2k|    if (pCtx->pPps->bTransform8x8ModeFlag) {
  ------------------
  |  Branch (684:9): [True: 62.9k, False: 12.3k]
  ------------------
  685|       |      // Transform 8x8 cabac will be added soon
  686|  62.9k|      WELS_READ_VERIFY (ParseTransformSize8x8FlagCabac (pCtx, &sNeighAvail, pCtx->pCurDqLayer->pTransformSize8x8Flag[iMbXy]));
  ------------------
  |  |   52|  62.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  62.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  62.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 200, False: 62.7k]
  |  |  ------------------
  |  |   55|  62.9k|    return uiRetTmp; \
  |  |   56|  62.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 62.7k]
  |  |  ------------------
  ------------------
  687|  62.9k|    }
  688|  75.0k|    if (pCtx->pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (688:9): [True: 62.2k, False: 12.7k]
  ------------------
  689|  62.2k|      uiMbType = pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA8x8;
  ------------------
  |  |  277|  62.2k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
  690|  62.2k|      pCtx->pFillInfoCacheIntraNxNFunc (&sNeighAvail, pNonZeroCount, pIntraPredMode, pCurDqLayer);
  691|  62.2k|      WELS_READ_VERIFY (ParseIntra8x8Mode (pCtx, &sNeighAvail, pIntraPredMode, pBsAux, pCurDqLayer));
  ------------------
  |  |   52|  62.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  62.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  62.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.61k, False: 60.6k]
  |  |  ------------------
  |  |   55|  62.2k|    return uiRetTmp; \
  |  |   56|  62.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 60.6k]
  |  |  ------------------
  ------------------
  692|  62.2k|    } else {
  693|  12.7k|      pCtx->pFillInfoCacheIntraNxNFunc (&sNeighAvail, pNonZeroCount, pIntraPredMode, pCurDqLayer);
  694|  12.7k|      WELS_READ_VERIFY (ParseIntra4x4Mode (pCtx, &sNeighAvail, pIntraPredMode, pBsAux, pCurDqLayer));
  ------------------
  |  |   52|  12.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  12.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  12.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 7.06k, False: 5.71k]
  |  |  ------------------
  |  |   55|  12.7k|    return uiRetTmp; \
  |  |   56|  12.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 5.71k]
  |  |  ------------------
  ------------------
  695|  12.7k|    }
  696|       |    //get uiCbp for I4x4
  697|  66.3k|    WELS_READ_VERIFY (ParseCbpInfoCabac (pCtx, &sNeighAvail, uiCbp));
  ------------------
  |  |   52|  66.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  66.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  66.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 618, False: 65.7k]
  |  |  ------------------
  |  |   55|  66.3k|    return uiRetTmp; \
  |  |   56|  66.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 65.7k]
  |  |  ------------------
  ------------------
  698|  65.7k|    pCurDqLayer->pCbp[iMbXy] = uiCbp;
  699|  65.7k|    pSlice->iLastDeltaQp = uiCbp == 0 ? 0 : pSlice->iLastDeltaQp;
  ------------------
  |  Branch (699:28): [True: 45.4k, False: 20.3k]
  ------------------
  700|  65.7k|    uiCbpChroma = pCtx->pSps->uiChromaFormatIdc ? uiCbp >> 4 : 0;
  ------------------
  |  Branch (700:19): [True: 62.4k, False: 3.25k]
  ------------------
  701|  65.7k|    uiCbpLuma = uiCbp & 15;
  702|  65.7k|  } else { //I16x16;
  703|  20.8k|    pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA16x16;
  ------------------
  |  |  276|  20.8k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  704|  20.8k|    pCurDqLayer->pTransformSize8x8Flag[iMbXy] = false;
  705|  20.8k|    pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] = true;
  706|  20.8k|    pCurDqLayer->pIntraPredMode[iMbXy][7] = (uiMbType - 1) & 3;
  707|  20.8k|    pCurDqLayer->pCbp[iMbXy] = g_kuiI16CbpTable[ (uiMbType - 1) >> 2];
  708|  20.8k|    uiCbpChroma = pCtx->pSps->uiChromaFormatIdc ? pCurDqLayer->pCbp[iMbXy] >> 4 : 0 ;
  ------------------
  |  Branch (708:19): [True: 19.9k, False: 945]
  ------------------
  709|  20.8k|    uiCbpLuma = pCurDqLayer->pCbp[iMbXy] & 15;
  710|  20.8k|    WelsFillCacheNonZeroCount (&sNeighAvail, pNonZeroCount, pCurDqLayer);
  711|  20.8k|    WELS_READ_VERIFY (ParseIntra16x16Mode (pCtx, &sNeighAvail, pBsAux, pCurDqLayer));
  ------------------
  |  |   52|  20.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  20.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  20.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 768, False: 20.1k]
  |  |  ------------------
  |  |   55|  20.8k|    return uiRetTmp; \
  |  |   56|  20.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 20.1k]
  |  |  ------------------
  ------------------
  712|  20.8k|  }
  713|       |
  714|  85.8k|  ST32 (&pCurDqLayer->pNzc[iMbXy][0], 0);
  ------------------
  |  |   67|  85.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  715|  85.8k|  ST32 (&pCurDqLayer->pNzc[iMbXy][4], 0);
  ------------------
  |  |   67|  85.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  716|  85.8k|  ST32 (&pCurDqLayer->pNzc[iMbXy][8], 0);
  ------------------
  |  |   67|  85.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  717|  85.8k|  ST32 (&pCurDqLayer->pNzc[iMbXy][12], 0);
  ------------------
  |  |   67|  85.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  718|  85.8k|  ST32 (&pCurDqLayer->pNzc[iMbXy][16], 0);
  ------------------
  |  |   67|  85.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  719|  85.8k|  ST32 (&pCurDqLayer->pNzc[iMbXy][20], 0);
  ------------------
  |  |   67|  85.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  720|  85.8k|  pCurDqLayer->pCbfDc[iMbXy] = 0;
  721|       |
  722|  85.8k|  if (pCurDqLayer->pCbp[iMbXy] == 0 && IS_INTRANxN (pCurDqLayer->pDec->pMbType[iMbXy])) {
  ------------------
  |  |  303|  57.3k|#define IS_INTRANxN(type) ( MB_TYPE_INTRA4x4 == (type) || MB_TYPE_INTRA8x8 == (type) )
  |  |  ------------------
  |  |  |  |  275|  57.3k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  ------------------
  |  |               #define IS_INTRANxN(type) ( MB_TYPE_INTRA4x4 == (type) || MB_TYPE_INTRA8x8 == (type) )
  |  |  ------------------
  |  |  |  |  277|  55.6k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  ------------------
  |  |  |  Branch (303:29): [True: 1.70k, False: 55.6k]
  |  |  |  Branch (303:59): [True: 43.6k, False: 11.9k]
  |  |  ------------------
  ------------------
  |  Branch (722:7): [True: 57.3k, False: 28.5k]
  ------------------
  723|  45.4k|    pCurDqLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp;
  724|   136k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (724:17): [True: 90.8k, False: 45.4k]
  ------------------
  725|  90.8k|      pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 ((pCurDqLayer->pLumaQp[iMbXy] +
  ------------------
  |  |  204|  90.8k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 9.21k, False: 81.5k]
  |  |  |  Branch (204:55): [True: 6.06k, False: 75.5k]
  |  |  ------------------
  ------------------
  726|  90.8k|                                         pSliceHeader->pPps->iChromaQpIndexOffset[i]), 0, 51)];
  727|  90.8k|    }
  728|  45.4k|  }
  729|       |
  730|  85.8k|  if (pCurDqLayer->pCbp[iMbXy] || MB_TYPE_INTRA16x16 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|  57.3k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (730:7): [True: 28.5k, False: 57.3k]
  |  Branch (730:35): [True: 11.9k, False: 45.4k]
  ------------------
  731|  40.4k|    memset (pCurDqLayer->pScaledTCoeff[iMbXy], 0, 384 * sizeof (pCurDqLayer->pScaledTCoeff[iMbXy][0]));
  732|  40.4k|    int32_t iQpDelta, iId8x8, iId4x4;
  733|  40.4k|    WELS_READ_VERIFY (ParseDeltaQpCabac (pCtx, iQpDelta));
  ------------------
  |  |   52|  40.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  40.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  40.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 357, False: 40.1k]
  |  |  ------------------
  |  |   55|  40.4k|    return uiRetTmp; \
  |  |   56|  40.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 40.1k]
  |  |  ------------------
  ------------------
  734|  40.1k|    if (iQpDelta > 25 || iQpDelta < -26) {//out of iQpDelta range
  ------------------
  |  Branch (734:9): [True: 207, False: 39.8k]
  |  Branch (734:26): [True: 269, False: 39.6k]
  ------------------
  735|    476|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_QP);
  ------------------
  |  |   59|    476|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  736|    476|    }
  737|  39.6k|    pCurDqLayer->pLumaQp[iMbXy] = (pSlice->iLastMbQp + iQpDelta + 52) % 52; //update last_mb_qp
  738|  39.6k|    pSlice->iLastMbQp = pCurDqLayer->pLumaQp[iMbXy];
  739|   118k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (739:17): [True: 79.2k, False: 39.6k]
  ------------------
  740|  79.2k|      pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 ((pSlice->iLastMbQp +
  ------------------
  |  |  204|  79.2k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 4.33k, False: 74.9k]
  |  |  |  Branch (204:55): [True: 11.4k, False: 63.4k]
  |  |  ------------------
  ------------------
  741|  79.2k|                                         pSliceHeader->pPps->iChromaQpIndexOffset[i]), 0, 51)];
  742|  79.2k|    }
  743|  39.6k|    if (MB_TYPE_INTRA16x16 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|  39.6k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (743:9): [True: 20.1k, False: 19.5k]
  ------------------
  744|       |      //step1: Luma DC
  745|  20.1k|      WELS_READ_VERIFY (ParseResidualBlockCabac (&sNeighAvail, pNonZeroCount, pBsAux, 0, 16, g_kuiLumaDcZigzagScan,
  ------------------
  |  |   52|  20.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  20.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  20.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 4.94k, False: 15.1k]
  |  |  ------------------
  |  |   55|  20.1k|    return uiRetTmp; \
  |  |   56|  20.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
  746|  20.1k|                        I16_LUMA_DC, pCurDqLayer->pScaledTCoeff[iMbXy], pCurDqLayer->pLumaQp[iMbXy], pCtx));
  747|       |      //step2: Luma AC
  748|  15.1k|      if (uiCbpLuma) {
  ------------------
  |  Branch (748:11): [True: 1.51k, False: 13.6k]
  ------------------
  749|  18.8k|        for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (749:21): [True: 17.8k, False: 990]
  ------------------
  750|  17.8k|          WELS_READ_VERIFY (ParseResidualBlockCabac (&sNeighAvail, pNonZeroCount, pBsAux, i,
  ------------------
  |  |   52|  17.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  71.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |  ------------------
  |  |  |  Branch (53:33): [True: 0, False: 17.8k]
  |  |  |  Branch (53:33): [True: 0, False: 17.8k]
  |  |  ------------------
  |  |   54|  17.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 521, False: 17.3k]
  |  |  ------------------
  |  |   55|  17.8k|    return uiRetTmp; \
  |  |   56|  17.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 17.3k]
  |  |  ------------------
  ------------------
  751|  17.8k|                            iScanIdxEnd - WELS_MAX (iScanIdxStart, 1) + 1, g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1), I16_LUMA_AC,
  752|  17.8k|                            pCurDqLayer->pScaledTCoeff[iMbXy] + (i << 4), pCurDqLayer->pLumaQp[iMbXy], pCtx));
  753|  17.8k|        }
  754|    990|        ST32 (&pCurDqLayer->pNzc[iMbXy][0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   67|    990|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  755|    990|        ST32 (&pCurDqLayer->pNzc[iMbXy][4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   67|    990|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  756|    990|        ST32 (&pCurDqLayer->pNzc[iMbXy][8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   67|    990|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  757|    990|        ST32 (&pCurDqLayer->pNzc[iMbXy][12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   67|    990|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  758|  13.6k|      } else { //pNonZeroCount = 0
  759|  13.6k|        ST32 (&pCurDqLayer->pNzc[iMbXy][0], 0);
  ------------------
  |  |   67|  13.6k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  760|  13.6k|        ST32 (&pCurDqLayer->pNzc[iMbXy][4], 0);
  ------------------
  |  |   67|  13.6k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  761|  13.6k|        ST32 (&pCurDqLayer->pNzc[iMbXy][8], 0);
  ------------------
  |  |   67|  13.6k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  762|  13.6k|        ST32 (&pCurDqLayer->pNzc[iMbXy][12], 0);
  ------------------
  |  |   67|  13.6k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  763|  13.6k|      }
  764|  19.5k|    } else { //non-MB_TYPE_INTRA16x16
  765|  19.5k|      if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (765:11): [True: 15.5k, False: 3.96k]
  ------------------
  766|       |        // Transform 8x8 support for CABAC
  767|  72.7k|        for (iId8x8 = 0; iId8x8 < 4; iId8x8++) {
  ------------------
  |  Branch (767:26): [True: 58.8k, False: 13.9k]
  ------------------
  768|  58.8k|          if (uiCbpLuma & (1 << iId8x8)) {
  ------------------
  |  Branch (768:15): [True: 36.4k, False: 22.3k]
  ------------------
  769|  36.4k|            WELS_READ_VERIFY (ParseResidualBlockCabac8x8 (&sNeighAvail, pNonZeroCount, pBsAux, (iId8x8 << 2),
  ------------------
  |  |   52|  36.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  36.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  36.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.64k, False: 34.8k]
  |  |  ------------------
  |  |   55|  36.4k|    return uiRetTmp; \
  |  |   56|  36.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 34.8k]
  |  |  ------------------
  ------------------
  770|  36.4k|                              iScanIdxEnd - iScanIdxStart + 1, g_kuiZigzagScan8x8 + iScanIdxStart, LUMA_DC_AC_INTRA_8,
  771|  36.4k|                              pCurDqLayer->pScaledTCoeff[iMbXy] + (iId8x8 << 6), pCurDqLayer->pLumaQp[iMbXy], pCtx));
  772|  36.4k|          } else {
  773|  22.3k|            ST16 (&pNonZeroCount[g_kCacheNzcScanIdx[ (iId8x8 << 2)]], 0);
  ------------------
  |  |   66|  22.3k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  774|  22.3k|            ST16 (&pNonZeroCount[g_kCacheNzcScanIdx[ (iId8x8 << 2) + 2]], 0);
  ------------------
  |  |   66|  22.3k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  775|  22.3k|          }
  776|  58.8k|        }
  777|  13.9k|        ST32 (&pCurDqLayer->pNzc[iMbXy][0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   67|  13.9k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  778|  13.9k|        ST32 (&pCurDqLayer->pNzc[iMbXy][4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   67|  13.9k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  779|  13.9k|        ST32 (&pCurDqLayer->pNzc[iMbXy][8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   67|  13.9k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  780|  13.9k|        ST32 (&pCurDqLayer->pNzc[iMbXy][12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   67|  13.9k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  781|  13.9k|      } else {
  782|  18.2k|        for (iId8x8 = 0; iId8x8 < 4; iId8x8++) {
  ------------------
  |  Branch (782:26): [True: 14.7k, False: 3.52k]
  ------------------
  783|  14.7k|          if (uiCbpLuma & (1 << iId8x8)) {
  ------------------
  |  Branch (783:15): [True: 11.3k, False: 3.35k]
  ------------------
  784|  11.3k|            int32_t iIdx = (iId8x8 << 2);
  785|  55.7k|            for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (785:30): [True: 44.8k, False: 10.9k]
  ------------------
  786|       |              //Luma (DC and AC decoding together)
  787|  44.8k|              WELS_READ_VERIFY (ParseResidualBlockCabac (&sNeighAvail, pNonZeroCount, pBsAux, iIdx, iScanIdxEnd - iScanIdxStart + 1,
  ------------------
  |  |   52|  44.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  44.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  44.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 435, False: 44.3k]
  |  |  ------------------
  |  |   55|  44.8k|    return uiRetTmp; \
  |  |   56|  44.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 44.3k]
  |  |  ------------------
  ------------------
  788|  44.8k|                                g_kuiZigzagScan + iScanIdxStart, LUMA_DC_AC_INTRA, pCurDqLayer->pScaledTCoeff[iMbXy] + (iIdx << 4),
  789|  44.8k|                                pCurDqLayer->pLumaQp[iMbXy], pCtx));
  790|  44.3k|              iIdx++;
  791|  44.3k|            }
  792|  11.3k|          } else {
  793|  3.35k|            ST16 (&pNonZeroCount[g_kCacheNzcScanIdx[ (iId8x8 << 2)]], 0);
  ------------------
  |  |   66|  3.35k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  794|  3.35k|            ST16 (&pNonZeroCount[g_kCacheNzcScanIdx[ (iId8x8 << 2) + 2]], 0);
  ------------------
  |  |   66|  3.35k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  795|  3.35k|          }
  796|  14.7k|        }
  797|  3.52k|        ST32 (&pCurDqLayer->pNzc[iMbXy][0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   67|  3.52k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  798|  3.52k|        ST32 (&pCurDqLayer->pNzc[iMbXy][4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   67|  3.52k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  799|  3.52k|        ST32 (&pCurDqLayer->pNzc[iMbXy][8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   67|  3.52k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  800|  3.52k|        ST32 (&pCurDqLayer->pNzc[iMbXy][12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   67|  3.52k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  801|  3.52k|      }
  802|  19.5k|    }
  803|  32.0k|    int32_t iMbResProperty;
  804|       |    //chroma
  805|       |    //step1: DC
  806|  32.0k|    if (1 == uiCbpChroma || 2 == uiCbpChroma) {
  ------------------
  |  Branch (806:9): [True: 3.70k, False: 28.3k]
  |  Branch (806:29): [True: 865, False: 27.5k]
  ------------------
  807|       |      //Cb Cr
  808|  13.3k|      for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (808:19): [True: 9.06k, False: 4.30k]
  ------------------
  809|  9.06k|        iMbResProperty = i ? CHROMA_DC_V : CHROMA_DC_U;
  ------------------
  |  |   77|  4.49k|#define CHROMA_DC_V  8
  ------------------
                      iMbResProperty = i ? CHROMA_DC_V : CHROMA_DC_U;
  ------------------
  |  |   76|  13.6k|#define CHROMA_DC_U  7
  ------------------
  |  Branch (809:26): [True: 4.49k, False: 4.56k]
  ------------------
  810|  9.06k|        WELS_READ_VERIFY (ParseResidualBlockCabac (&sNeighAvail, pNonZeroCount, pBsAux, 16 + (i << 2), 4, g_kuiChromaDcScan,
  ------------------
  |  |   52|  9.06k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  9.06k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  9.06k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 267, False: 8.79k]
  |  |  ------------------
  |  |   55|  9.06k|    return uiRetTmp; \
  |  |   56|  9.06k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 8.79k]
  |  |  ------------------
  ------------------
  811|  9.06k|                          iMbResProperty, pCurDqLayer->pScaledTCoeff[iMbXy] + 256 + (i << 6), pCurDqLayer->pChromaQp[iMbXy][i], pCtx));
  812|  9.06k|      }
  813|  4.56k|    }
  814|       |
  815|       |    //step2: AC
  816|  31.8k|    if (2 == uiCbpChroma) {
  ------------------
  |  Branch (816:9): [True: 855, False: 30.9k]
  ------------------
  817|  2.16k|      for (i = 0; i < 2; i++) { //Cb Cr
  ------------------
  |  Branch (817:19): [True: 1.52k, False: 640]
  ------------------
  818|  1.52k|        iMbResProperty = i ? CHROMA_AC_V : CHROMA_AC_U;
  ------------------
  |  |   79|    670|#define CHROMA_AC_V  10
  ------------------
                      iMbResProperty = i ? CHROMA_AC_V : CHROMA_AC_U;
  ------------------
  |  |   78|  2.38k|#define CHROMA_AC_U  9
  ------------------
  |  Branch (818:26): [True: 670, False: 855]
  ------------------
  819|  1.52k|        int32_t iIdx = 16 + (i << 2);
  820|  7.25k|        for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (820:26): [True: 5.94k, False: 1.31k]
  ------------------
  821|  5.94k|          WELS_READ_VERIFY (ParseResidualBlockCabac (&sNeighAvail, pNonZeroCount, pBsAux, iIdx,
  ------------------
  |  |   52|  5.94k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  23.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |  ------------------
  |  |  |  Branch (53:33): [True: 0, False: 5.94k]
  |  |  |  Branch (53:33): [True: 0, False: 5.94k]
  |  |  ------------------
  |  |   54|  5.94k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 215, False: 5.72k]
  |  |  ------------------
  |  |   55|  5.94k|    return uiRetTmp; \
  |  |   56|  5.94k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 5.72k]
  |  |  ------------------
  ------------------
  822|  5.94k|                            iScanIdxEnd - WELS_MAX (iScanIdxStart, 1) + 1, g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1), iMbResProperty,
  823|  5.94k|                            pCurDqLayer->pScaledTCoeff[iMbXy] + (iIdx << 4), pCurDqLayer->pChromaQp[iMbXy][i], pCtx));
  824|  5.72k|          iIdx++;
  825|  5.72k|        }
  826|  1.52k|      }
  827|    640|      ST16 (&pCurDqLayer->pNzc[iMbXy][16], LD16 (&pNonZeroCount[6 + 8 * 1]));
  ------------------
  |  |   66|    640|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  828|    640|      ST16 (&pCurDqLayer->pNzc[iMbXy][20], LD16 (&pNonZeroCount[6 + 8 * 2]));
  ------------------
  |  |   66|    640|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  829|    640|      ST16 (&pCurDqLayer->pNzc[iMbXy][18], LD16 (&pNonZeroCount[6 + 8 * 4]));
  ------------------
  |  |   66|    640|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  830|    640|      ST16 (&pCurDqLayer->pNzc[iMbXy][22], LD16 (&pNonZeroCount[6 + 8 * 5]));
  ------------------
  |  |   66|    640|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  831|  30.9k|    } else {
  832|  30.9k|      ST16 (&pCurDqLayer->pNzc[iMbXy][16], 0);
  ------------------
  |  |   66|  30.9k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  833|  30.9k|      ST16 (&pCurDqLayer->pNzc[iMbXy][20], 0);
  ------------------
  |  |   66|  30.9k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  834|  30.9k|      ST16 (&pCurDqLayer->pNzc[iMbXy][18], 0);
  ------------------
  |  |   66|  30.9k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  835|  30.9k|      ST16 (&pCurDqLayer->pNzc[iMbXy][22], 0);
  ------------------
  |  |   66|  30.9k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  836|  30.9k|    }
  837|  45.4k|  } else {
  838|  45.4k|    ST32 (&pCurDqLayer->pNzc[iMbXy][0], 0);
  ------------------
  |  |   67|  45.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  839|  45.4k|    ST32 (&pCurDqLayer->pNzc[iMbXy][4], 0);
  ------------------
  |  |   67|  45.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  840|  45.4k|    ST32 (&pCurDqLayer->pNzc[iMbXy][8], 0);
  ------------------
  |  |   67|  45.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  841|  45.4k|    ST32 (&pCurDqLayer->pNzc[iMbXy][12], 0);
  ------------------
  |  |   67|  45.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  842|  45.4k|    ST32 (&pCurDqLayer->pNzc[iMbXy][16], 0);
  ------------------
  |  |   67|  45.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  843|  45.4k|    ST32 (&pCurDqLayer->pNzc[iMbXy][20], 0);
  ------------------
  |  |   67|  45.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  844|  45.4k|  }
  845|       |
  846|  76.9k|  WELS_READ_VERIFY (ParseEndOfSliceCabac (pCtx, uiEosFlag));
  ------------------
  |  |   52|  76.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  76.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  76.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 203, False: 76.7k]
  |  |  ------------------
  |  |   55|  76.9k|    return uiRetTmp; \
  |  |   56|  76.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 76.7k]
  |  |  ------------------
  ------------------
  847|  76.7k|  if (uiEosFlag) {
  ------------------
  |  Branch (847:7): [True: 233, False: 76.5k]
  ------------------
  848|    233|    RestoreCabacDecEngineToBS (pCtx->pCabacDecEngine, pCtx->pCurDqLayer->pBitStringAux);
  849|    233|  }
  850|  76.7k|  return ERR_NONE;
  851|  76.9k|}
_ZN7WelsDec23WelsDecodeMbCabacISliceEPNS_21TagWelsDecoderContextEPNS_10TagNalUnitERj:
  853|   100k|int32_t WelsDecodeMbCabacISlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uint32_t& uiEosFlag) {
  854|   100k|  WELS_READ_VERIFY (WelsDecodeMbCabacISliceBaseMode0 (pCtx, uiEosFlag));
  ------------------
  |  |   52|   100k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   100k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   100k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 22.2k, False: 78.2k]
  |  |  ------------------
  |  |   55|   100k|    return uiRetTmp; \
  |  |   56|   100k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 78.2k]
  |  |  ------------------
  ------------------
  855|  78.2k|  return ERR_NONE;
  856|   100k|}
_ZN7WelsDec32WelsDecodeMbCabacPSliceBaseMode0EPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailERj:
  858|   226k|int32_t WelsDecodeMbCabacPSliceBaseMode0 (PWelsDecoderContext pCtx, PWelsNeighAvail pNeighAvail, uint32_t& uiEosFlag) {
  859|   226k|  PDqLayer pCurDqLayer             = pCtx->pCurDqLayer;
  860|   226k|  PBitStringAux pBsAux           = pCurDqLayer->pBitStringAux;
  861|   226k|  PSlice pSlice                  = &pCurDqLayer->sLayerInfo.sSliceInLayer;
  862|   226k|  PSliceHeader pSliceHeader      = &pSlice->sSliceHeaderExt.sSliceHeader;
  863|       |
  864|   226k|  int32_t iScanIdxStart = pSlice->sSliceHeaderExt.uiScanIdxStart;
  865|   226k|  int32_t iScanIdxEnd   = pSlice->sSliceHeaderExt.uiScanIdxEnd;
  866|   226k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  867|   226k|  int32_t iMbResProperty;
  868|   226k|  int32_t i;
  869|   226k|  uint32_t uiMbType = 0, uiCbp = 0, uiCbpLuma = 0, uiCbpChroma = 0;
  870|       |
  871|   226k|  ENFORCE_STACK_ALIGN_1D (uint8_t, pNonZeroCount, 48, 16);
  ------------------
  |  |   58|   226k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   226k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
  872|       |
  873|   226k|  pCurDqLayer->pInterPredictionDoneFlag[iMbXy] = 0;
  874|       |
  875|   226k|  WELS_READ_VERIFY (ParseMBTypePSliceCabac (pCtx, pNeighAvail, uiMbType));
  ------------------
  |  |   52|   226k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   226k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   226k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 3.39k, False: 223k]
  |  |  ------------------
  |  |   55|   226k|    return uiRetTmp; \
  |  |   56|   226k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 223k]
  |  |  ------------------
  ------------------
  876|       |  // uiMbType = 4 is not allowded.
  877|   223k|  if (uiMbType < 4) { //Inter mode
  ------------------
  |  Branch (877:7): [True: 190k, False: 32.6k]
  ------------------
  878|   190k|    int16_t pMotionVector[LIST_A][30][MV_A];
  879|   190k|    int16_t pMvdCache[LIST_A][30][MV_A];
  880|   190k|    int8_t  pRefIndex[LIST_A][30];
  881|   190k|    pCurDqLayer->pDec->pMbType[iMbXy] = g_ksInterPMbTypeInfo[uiMbType].iType;
  882|   190k|    WelsFillCacheInterCabac (pNeighAvail, pNonZeroCount, pMotionVector, pMvdCache, pRefIndex, pCurDqLayer);
  883|   190k|    WELS_READ_VERIFY (ParseInterPMotionInfoCabac (pCtx, pNeighAvail, pNonZeroCount, pMotionVector, pMvdCache, pRefIndex));
  ------------------
  |  |   52|   190k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   190k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   190k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 8.65k, False: 182k]
  |  |  ------------------
  |  |   55|   190k|    return uiRetTmp; \
  |  |   56|   190k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 182k]
  |  |  ------------------
  ------------------
  884|   182k|    pCurDqLayer->pInterPredictionDoneFlag[iMbXy] = 0;
  885|   182k|  } else { //Intra mode
  886|  32.6k|    uiMbType -= 5;
  887|  32.6k|    if (uiMbType > 25)
  ------------------
  |  Branch (887:9): [True: 0, False: 32.6k]
  ------------------
  888|      0|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_TYPE);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  889|  32.6k|    if (!pCtx->pSps->uiChromaFormatIdc && ((uiMbType >= 5 && uiMbType <= 12) || (uiMbType >= 17 && uiMbType <= 24)))
  ------------------
  |  Branch (889:9): [True: 14.7k, False: 17.9k]
  |  Branch (889:45): [True: 1.74k, False: 13.0k]
  |  Branch (889:62): [True: 214, False: 1.53k]
  |  Branch (889:82): [True: 1.04k, False: 13.5k]
  |  Branch (889:100): [True: 401, False: 643]
  ------------------
  890|    615|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_TYPE);
  ------------------
  |  |   59|    615|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  891|       |
  892|  32.0k|    if (25 == uiMbType) {   //I_PCM
  ------------------
  |  Branch (892:9): [True: 2.38k, False: 29.6k]
  ------------------
  893|  2.38k|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "I_PCM mode exists in P slice!");
  894|  2.38k|      WELS_READ_VERIFY (ParseIPCMInfoCabac (pCtx));
  ------------------
  |  |   52|  2.38k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.38k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.38k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 896, False: 1.48k]
  |  |  ------------------
  |  |   55|  2.38k|    return uiRetTmp; \
  |  |   56|  2.38k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.48k]
  |  |  ------------------
  ------------------
  895|  1.48k|      pSlice->iLastDeltaQp = 0;
  896|  1.48k|      WELS_READ_VERIFY (ParseEndOfSliceCabac (pCtx, uiEosFlag));
  ------------------
  |  |   52|  1.48k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.48k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.48k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 1.48k]
  |  |  ------------------
  |  |   55|  1.48k|    return uiRetTmp; \
  |  |   56|  1.48k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.48k]
  |  |  ------------------
  ------------------
  897|  1.48k|      if (uiEosFlag) {
  ------------------
  |  Branch (897:11): [True: 157, False: 1.33k]
  ------------------
  898|    157|        RestoreCabacDecEngineToBS (pCtx->pCabacDecEngine, pCtx->pCurDqLayer->pBitStringAux);
  899|    157|      }
  900|  1.48k|      return ERR_NONE;
  901|  29.6k|    } else { //normal Intra mode
  902|  29.6k|      if (0 == uiMbType) { //Intra4x4
  ------------------
  |  Branch (902:11): [True: 14.3k, False: 15.3k]
  ------------------
  903|  14.3k|        ENFORCE_STACK_ALIGN_1D (int8_t, pIntraPredMode, 48, 16);
  ------------------
  |  |   58|  14.3k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|  14.3k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
  904|  14.3k|        pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA4x4;
  ------------------
  |  |  275|  14.3k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
  905|  14.3k|        if (pCtx->pPps->bTransform8x8ModeFlag) {
  ------------------
  |  Branch (905:13): [True: 3.53k, False: 10.8k]
  ------------------
  906|  3.53k|          WELS_READ_VERIFY (ParseTransformSize8x8FlagCabac (pCtx, pNeighAvail, pCtx->pCurDqLayer->pTransformSize8x8Flag[iMbXy]));
  ------------------
  |  |   52|  3.53k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.53k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.53k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 216, False: 3.32k]
  |  |  ------------------
  |  |   55|  3.53k|    return uiRetTmp; \
  |  |   56|  3.53k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.32k]
  |  |  ------------------
  ------------------
  907|  3.53k|        }
  908|  14.1k|        if (pCtx->pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (908:13): [True: 3.17k, False: 10.9k]
  ------------------
  909|  3.17k|          uiMbType = pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA8x8;
  ------------------
  |  |  277|  3.17k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
  910|  3.17k|          pCtx->pFillInfoCacheIntraNxNFunc (pNeighAvail, pNonZeroCount, pIntraPredMode, pCurDqLayer);
  911|  3.17k|          WELS_READ_VERIFY (ParseIntra8x8Mode (pCtx, pNeighAvail, pIntraPredMode, pBsAux, pCurDqLayer));
  ------------------
  |  |   52|  3.17k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.17k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.17k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 233, False: 2.94k]
  |  |  ------------------
  |  |   55|  3.17k|    return uiRetTmp; \
  |  |   56|  3.17k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.94k]
  |  |  ------------------
  ------------------
  912|  10.9k|        } else {
  913|  10.9k|          pCtx->pFillInfoCacheIntraNxNFunc (pNeighAvail, pNonZeroCount, pIntraPredMode, pCurDqLayer);
  914|  10.9k|          WELS_READ_VERIFY (ParseIntra4x4Mode (pCtx, pNeighAvail, pIntraPredMode, pBsAux, pCurDqLayer));
  ------------------
  |  |   52|  10.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  10.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  10.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 978, False: 9.97k]
  |  |  ------------------
  |  |   55|  10.9k|    return uiRetTmp; \
  |  |   56|  10.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 9.97k]
  |  |  ------------------
  ------------------
  915|  10.9k|        }
  916|  15.3k|      } else { //Intra16x16
  917|  15.3k|        pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA16x16;
  ------------------
  |  |  276|  15.3k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  918|  15.3k|        pCurDqLayer->pTransformSize8x8Flag[iMbXy] = false;
  919|  15.3k|        pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] = true;
  920|  15.3k|        pCurDqLayer->pIntraPredMode[iMbXy][7] = (uiMbType - 1) & 3;
  921|  15.3k|        pCurDqLayer->pCbp[iMbXy] = g_kuiI16CbpTable[ (uiMbType - 1) >> 2];
  922|  15.3k|        uiCbpChroma = pCtx->pSps->uiChromaFormatIdc ? pCurDqLayer->pCbp[iMbXy] >> 4 : 0;
  ------------------
  |  Branch (922:23): [True: 3.97k, False: 11.3k]
  ------------------
  923|  15.3k|        uiCbpLuma = pCurDqLayer->pCbp[iMbXy] & 15;
  924|  15.3k|        WelsFillCacheNonZeroCount (pNeighAvail, pNonZeroCount, pCurDqLayer);
  925|  15.3k|        WELS_READ_VERIFY (ParseIntra16x16Mode (pCtx, pNeighAvail, pBsAux, pCurDqLayer));
  ------------------
  |  |   52|  15.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  15.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  15.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 11.3k, False: 3.94k]
  |  |  ------------------
  |  |   55|  15.3k|    return uiRetTmp; \
  |  |   56|  15.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.94k]
  |  |  ------------------
  ------------------
  926|  15.3k|      }
  927|  29.6k|    }
  928|  32.0k|  }
  929|       |
  930|   198k|  ST32 (&pCurDqLayer->pNzc[iMbXy][0], 0);
  ------------------
  |  |   67|   198k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  931|   198k|  ST32 (&pCurDqLayer->pNzc[iMbXy][4], 0);
  ------------------
  |  |   67|   198k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  932|   198k|  ST32 (&pCurDqLayer->pNzc[iMbXy][8], 0);
  ------------------
  |  |   67|   198k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  933|   198k|  ST32 (&pCurDqLayer->pNzc[iMbXy][12], 0);
  ------------------
  |  |   67|   198k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  934|   198k|  ST32 (&pCurDqLayer->pNzc[iMbXy][16], 0);
  ------------------
  |  |   67|   198k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  935|   198k|  ST32 (&pCurDqLayer->pNzc[iMbXy][20], 0);
  ------------------
  |  |   67|   198k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  936|       |
  937|   198k|  if (MB_TYPE_INTRA16x16 != pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|   198k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (937:7): [True: 194k, False: 3.94k]
  ------------------
  938|   194k|    WELS_READ_VERIFY (ParseCbpInfoCabac (pCtx, pNeighAvail, uiCbp));
  ------------------
  |  |   52|   194k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   194k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   194k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.35k, False: 193k]
  |  |  ------------------
  |  |   55|   194k|    return uiRetTmp; \
  |  |   56|   194k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 193k]
  |  |  ------------------
  ------------------
  939|       |
  940|   193k|    pCurDqLayer->pCbp[iMbXy] = uiCbp;
  941|   193k|    pSlice->iLastDeltaQp = uiCbp == 0 ? 0 : pSlice->iLastDeltaQp;
  ------------------
  |  Branch (941:28): [True: 153k, False: 39.8k]
  ------------------
  942|   193k|    uiCbpChroma = pCtx->pSps->uiChromaFormatIdc ? pCurDqLayer->pCbp[iMbXy] >> 4 : 0 ;
  ------------------
  |  Branch (942:19): [True: 166k, False: 27.2k]
  ------------------
  943|   193k|    uiCbpLuma = pCurDqLayer->pCbp[iMbXy] & 15;
  944|   193k|  }
  945|       |
  946|   197k|  if (pCurDqLayer->pCbp[iMbXy] || MB_TYPE_INTRA16x16 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|   155k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (946:7): [True: 42.2k, False: 155k]
  |  Branch (946:35): [True: 1.50k, False: 153k]
  ------------------
  947|       |
  948|  43.7k|    if (MB_TYPE_INTRA16x16 != pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|  43.7k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (948:9): [True: 39.8k, False: 3.94k]
  ------------------
  949|       |      // Need modification when B picutre add in
  950|  39.8k|      bool bNeedParseTransformSize8x8Flag =
  951|  39.8k|        (((pCurDqLayer->pDec->pMbType[iMbXy] >= MB_TYPE_16x16 && pCurDqLayer->pDec->pMbType[iMbXy] <= MB_TYPE_8x16)
  ------------------
  |  |  278|  79.6k|#define MB_TYPE_16x16       0x00000008
  ------------------
                      (((pCurDqLayer->pDec->pMbType[iMbXy] >= MB_TYPE_16x16 && pCurDqLayer->pDec->pMbType[iMbXy] <= MB_TYPE_8x16)
  ------------------
  |  |  280|  38.0k|#define MB_TYPE_8x16        0x00000020
  ------------------
  |  Branch (951:12): [True: 38.0k, False: 1.79k]
  |  Branch (951:66): [True: 30.2k, False: 7.73k]
  ------------------
  952|  9.52k|          || pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy])
  ------------------
  |  Branch (952:14): [True: 5.33k, False: 4.19k]
  ------------------
  953|  35.6k|         && (pCurDqLayer->pDec->pMbType[iMbXy] != MB_TYPE_INTRA8x8)
  ------------------
  |  |  277|  35.6k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
  |  Branch (953:13): [True: 34.6k, False: 1.01k]
  ------------------
  954|  34.6k|         && (pCurDqLayer->pDec->pMbType[iMbXy] != MB_TYPE_INTRA4x4)
  ------------------
  |  |  275|  34.6k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
  |  Branch (954:13): [True: 33.8k, False: 779]
  ------------------
  955|  33.8k|         && ((pCurDqLayer->pCbp[iMbXy] & 0x0F) > 0)
  ------------------
  |  Branch (955:13): [True: 25.8k, False: 7.97k]
  ------------------
  956|  25.8k|         && (pCtx->pPps->bTransform8x8ModeFlag));
  ------------------
  |  Branch (956:13): [True: 18.7k, False: 7.06k]
  ------------------
  957|       |
  958|  39.8k|      if (bNeedParseTransformSize8x8Flag) {
  ------------------
  |  Branch (958:11): [True: 18.7k, False: 21.0k]
  ------------------
  959|  18.7k|        WELS_READ_VERIFY (ParseTransformSize8x8FlagCabac (pCtx, pNeighAvail,
  ------------------
  |  |   52|  18.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  18.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  18.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 267, False: 18.5k]
  |  |  ------------------
  |  |   55|  18.7k|    return uiRetTmp; \
  |  |   56|  18.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 18.5k]
  |  |  ------------------
  ------------------
  960|  18.7k|                          pCtx->pCurDqLayer->pTransformSize8x8Flag[iMbXy])); //transform_size_8x8_flag
  961|  18.7k|      }
  962|  39.8k|    }
  963|       |
  964|  43.4k|    memset (pCurDqLayer->pScaledTCoeff[iMbXy], 0, 384 * sizeof (pCurDqLayer->pScaledTCoeff[iMbXy][0]));
  965|       |
  966|  43.4k|    int32_t iQpDelta, iId8x8, iId4x4;
  967|       |
  968|  43.4k|    WELS_READ_VERIFY (ParseDeltaQpCabac (pCtx, iQpDelta));
  ------------------
  |  |   52|  43.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  43.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  43.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 590, False: 42.9k]
  |  |  ------------------
  |  |   55|  43.4k|    return uiRetTmp; \
  |  |   56|  43.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 42.9k]
  |  |  ------------------
  ------------------
  969|  42.9k|    if (iQpDelta > 25 || iQpDelta < -26) { //out of iQpDelta range
  ------------------
  |  Branch (969:9): [True: 211, False: 42.6k]
  |  Branch (969:26): [True: 215, False: 42.4k]
  ------------------
  970|    426|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_QP);
  ------------------
  |  |   59|    426|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  971|    426|    }
  972|  42.4k|    pCurDqLayer->pLumaQp[iMbXy] = (pSlice->iLastMbQp + iQpDelta + 52) % 52; //update last_mb_qp
  973|  42.4k|    pSlice->iLastMbQp = pCurDqLayer->pLumaQp[iMbXy];
  974|   127k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (974:17): [True: 84.9k, False: 42.4k]
  ------------------
  975|  84.9k|      pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 (pSlice->iLastMbQp +
  ------------------
  |  |  204|  84.9k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 829, False: 84.1k]
  |  |  |  Branch (204:55): [True: 904, False: 83.2k]
  |  |  ------------------
  ------------------
  976|  84.9k|                                         pSliceHeader->pPps->iChromaQpIndexOffset[i], 0, 51)];
  977|  84.9k|    }
  978|       |
  979|  42.4k|    if (MB_TYPE_INTRA16x16 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|  42.4k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (979:9): [True: 3.94k, False: 38.5k]
  ------------------
  980|       |      //step1: Luma DC
  981|  3.94k|      WELS_READ_VERIFY (ParseResidualBlockCabac (pNeighAvail, pNonZeroCount, pBsAux, 0, 16, g_kuiLumaDcZigzagScan,
  ------------------
  |  |   52|  3.94k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.94k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.94k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 241, False: 3.70k]
  |  |  ------------------
  |  |   55|  3.94k|    return uiRetTmp; \
  |  |   56|  3.94k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.70k]
  |  |  ------------------
  ------------------
  982|  3.94k|                        I16_LUMA_DC, pCurDqLayer->pScaledTCoeff[iMbXy], pCurDqLayer->pLumaQp[iMbXy], pCtx));
  983|       |      //step2: Luma AC
  984|  3.70k|      if (uiCbpLuma) {
  ------------------
  |  Branch (984:11): [True: 2.04k, False: 1.65k]
  ------------------
  985|  31.9k|        for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (985:21): [True: 30.1k, False: 1.80k]
  ------------------
  986|  30.1k|          WELS_READ_VERIFY (ParseResidualBlockCabac (pNeighAvail, pNonZeroCount, pBsAux, i, iScanIdxEnd - WELS_MAX (iScanIdxStart,
  ------------------
  |  |   52|  30.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   120k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |  ------------------
  |  |  |  Branch (53:33): [True: 0, False: 30.1k]
  |  |  |  Branch (53:33): [True: 0, False: 30.1k]
  |  |  ------------------
  |  |   54|  30.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 241, False: 29.8k]
  |  |  ------------------
  |  |   55|  30.1k|    return uiRetTmp; \
  |  |   56|  30.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 29.8k]
  |  |  ------------------
  ------------------
  987|  30.1k|                            1) + 1, g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1), I16_LUMA_AC, pCurDqLayer->pScaledTCoeff[iMbXy] + (i << 4),
  988|  30.1k|                            pCurDqLayer->pLumaQp[iMbXy], pCtx));
  989|  30.1k|        }
  990|  1.80k|        ST32 (&pCurDqLayer->pNzc[iMbXy][0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   67|  1.80k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  991|  1.80k|        ST32 (&pCurDqLayer->pNzc[iMbXy][4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   67|  1.80k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  992|  1.80k|        ST32 (&pCurDqLayer->pNzc[iMbXy][8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   67|  1.80k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  993|  1.80k|        ST32 (&pCurDqLayer->pNzc[iMbXy][12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   67|  1.80k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  994|  1.80k|      } else {
  995|  1.65k|        ST32 (&pCurDqLayer->pNzc[iMbXy][0], 0);
  ------------------
  |  |   67|  1.65k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  996|  1.65k|        ST32 (&pCurDqLayer->pNzc[iMbXy][4], 0);
  ------------------
  |  |   67|  1.65k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  997|  1.65k|        ST32 (&pCurDqLayer->pNzc[iMbXy][8], 0);
  ------------------
  |  |   67|  1.65k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  998|  1.65k|        ST32 (&pCurDqLayer->pNzc[iMbXy][12], 0);
  ------------------
  |  |   67|  1.65k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  999|  1.65k|      }
 1000|  38.5k|    } else { //non-MB_TYPE_INTRA16x16
 1001|  38.5k|      if (pCtx->pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (1001:11): [True: 14.5k, False: 23.9k]
  ------------------
 1002|       |        // Transform 8x8 support for CABAC
 1003|  66.8k|        for (iId8x8 = 0; iId8x8 < 4; iId8x8++) {
  ------------------
  |  Branch (1003:26): [True: 54.5k, False: 12.2k]
  ------------------
 1004|  54.5k|          if (uiCbpLuma & (1 << iId8x8)) {
  ------------------
  |  Branch (1004:15): [True: 27.1k, False: 27.3k]
  ------------------
 1005|  27.1k|            WELS_READ_VERIFY (ParseResidualBlockCabac8x8 (pNeighAvail, pNonZeroCount, pBsAux, (iId8x8 << 2),
  ------------------
  |  |   52|  27.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  54.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |  ------------------
  |  |  |  Branch (53:33): [True: 221, False: 26.9k]
  |  |  ------------------
  |  |   54|  27.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.31k, False: 24.8k]
  |  |  ------------------
  |  |   55|  27.1k|    return uiRetTmp; \
  |  |   56|  27.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 24.8k]
  |  |  ------------------
  ------------------
 1006|  27.1k|                              iScanIdxEnd - iScanIdxStart + 1, g_kuiZigzagScan8x8 + iScanIdxStart,
 1007|  27.1k|                              IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy]) ? LUMA_DC_AC_INTRA_8 : LUMA_DC_AC_INTER_8,
 1008|  27.1k|                              pCurDqLayer->pScaledTCoeff[iMbXy] + (iId8x8 << 6), pCurDqLayer->pLumaQp[iMbXy], pCtx));
 1009|  27.3k|          } else {
 1010|  27.3k|            ST16 (&pNonZeroCount[g_kCacheNzcScanIdx[ (iId8x8 << 2)]], 0);
  ------------------
  |  |   66|  27.3k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1011|  27.3k|            ST16 (&pNonZeroCount[g_kCacheNzcScanIdx[ (iId8x8 << 2) + 2]], 0);
  ------------------
  |  |   66|  27.3k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1012|  27.3k|          }
 1013|  54.5k|        }
 1014|  12.2k|        ST32 (&pCurDqLayer->pNzc[iMbXy][0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   67|  12.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1015|  12.2k|        ST32 (&pCurDqLayer->pNzc[iMbXy][4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   67|  12.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1016|  12.2k|        ST32 (&pCurDqLayer->pNzc[iMbXy][8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   67|  12.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1017|  12.2k|        ST32 (&pCurDqLayer->pNzc[iMbXy][12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   67|  12.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1018|  23.9k|      } else {
 1019|  23.9k|        iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA : LUMA_DC_AC_INTER;
  ------------------
  |  |  305|  23.9k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  23.9k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  23.9k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  23.9k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  23.9k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  23.9k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA : LUMA_DC_AC_INTER;
  ------------------
  |  |   80|    778|#define LUMA_DC_AC_INTRA 11
  ------------------
                      iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA : LUMA_DC_AC_INTER;
  ------------------
  |  |   81|  47.1k|#define LUMA_DC_AC_INTER 12
  ------------------
  |  Branch (1019:26): [True: 778, False: 23.2k]
  ------------------
 1020|   102k|        for (iId8x8 = 0; iId8x8 < 4; iId8x8++) {
  ------------------
  |  Branch (1020:26): [True: 83.6k, False: 19.0k]
  ------------------
 1021|  83.6k|          if (uiCbpLuma & (1 << iId8x8)) {
  ------------------
  |  Branch (1021:15): [True: 24.2k, False: 59.4k]
  ------------------
 1022|  24.2k|            int32_t iIdx = (iId8x8 << 2);
 1023|   105k|            for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (1023:30): [True: 86.6k, False: 19.2k]
  ------------------
 1024|       |              //Luma (DC and AC decoding together)
 1025|  86.6k|              WELS_READ_VERIFY (ParseResidualBlockCabac (pNeighAvail, pNonZeroCount, pBsAux, iIdx, iScanIdxEnd - iScanIdxStart + 1,
  ------------------
  |  |   52|  86.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  86.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  86.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 4.92k, False: 81.7k]
  |  |  ------------------
  |  |   55|  86.6k|    return uiRetTmp; \
  |  |   56|  86.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 81.7k]
  |  |  ------------------
  ------------------
 1026|  86.6k|                                g_kuiZigzagScan + iScanIdxStart, iMbResProperty, pCurDqLayer->pScaledTCoeff[iMbXy] + (iIdx << 4),
 1027|  86.6k|                                pCurDqLayer->pLumaQp[iMbXy],
 1028|  86.6k|                                pCtx));
 1029|  81.7k|              iIdx++;
 1030|  81.7k|            }
 1031|  59.4k|          } else {
 1032|  59.4k|            ST16 (&pNonZeroCount[g_kCacheNzcScanIdx[iId8x8 << 2]], 0);
  ------------------
  |  |   66|  59.4k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1033|  59.4k|            ST16 (&pNonZeroCount[g_kCacheNzcScanIdx[ (iId8x8 << 2) + 2]], 0);
  ------------------
  |  |   66|  59.4k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1034|  59.4k|          }
 1035|  83.6k|        }
 1036|  19.0k|        ST32 (&pCurDqLayer->pNzc[iMbXy][0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   67|  19.0k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1037|  19.0k|        ST32 (&pCurDqLayer->pNzc[iMbXy][4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   67|  19.0k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1038|  19.0k|        ST32 (&pCurDqLayer->pNzc[iMbXy][8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   67|  19.0k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1039|  19.0k|        ST32 (&pCurDqLayer->pNzc[iMbXy][12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   67|  19.0k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1040|  19.0k|      }
 1041|  38.5k|    }
 1042|       |
 1043|       |    //chroma
 1044|       |    //step1: DC
 1045|  34.7k|    if (1 == uiCbpChroma || 2 == uiCbpChroma) {
  ------------------
  |  Branch (1045:9): [True: 9.67k, False: 25.0k]
  |  Branch (1045:29): [True: 3.09k, False: 21.9k]
  ------------------
 1046|  37.5k|      for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1046:19): [True: 25.1k, False: 12.3k]
  ------------------
 1047|  25.1k|        if (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy]))
  ------------------
  |  |  305|  25.1k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  25.1k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  25.1k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  25.1k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  25.1k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  25.1k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 2.80k, False: 22.3k]
  |  |  ------------------
  ------------------
 1048|  2.80k|          iMbResProperty = i ? CHROMA_DC_V : CHROMA_DC_U;
  ------------------
  |  |   77|  1.39k|#define CHROMA_DC_V  8
  ------------------
                        iMbResProperty = i ? CHROMA_DC_V : CHROMA_DC_U;
  ------------------
  |  |   76|  1.40k|#define CHROMA_DC_U  7
  ------------------
  |  Branch (1048:28): [True: 1.39k, False: 1.40k]
  ------------------
 1049|  22.3k|        else
 1050|  22.3k|          iMbResProperty = i ? CHROMA_DC_V_INTER : CHROMA_DC_U_INTER;
  ------------------
  |  |   83|  11.0k|#define CHROMA_DC_V_INTER  14
  ------------------
                        iMbResProperty = i ? CHROMA_DC_V_INTER : CHROMA_DC_U_INTER;
  ------------------
  |  |   82|  11.3k|#define CHROMA_DC_U_INTER  13
  ------------------
  |  Branch (1050:28): [True: 11.0k, False: 11.3k]
  ------------------
 1051|       |
 1052|  25.1k|        WELS_READ_VERIFY (ParseResidualBlockCabac (pNeighAvail, pNonZeroCount, pBsAux, 16 + (i << 2), 4, g_kuiChromaDcScan,
  ------------------
  |  |   52|  25.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  25.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  25.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 430, False: 24.7k]
  |  |  ------------------
  |  |   55|  25.1k|    return uiRetTmp; \
  |  |   56|  25.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 24.7k]
  |  |  ------------------
  ------------------
 1053|  25.1k|                          iMbResProperty, pCurDqLayer->pScaledTCoeff[iMbXy] + 256 + (i << 6), pCurDqLayer->pChromaQp[iMbXy][i], pCtx));
 1054|  25.1k|      }
 1055|  12.7k|    }
 1056|       |    //step2: AC
 1057|  34.3k|    if (2 == uiCbpChroma) {
  ------------------
  |  Branch (1057:9): [True: 3.04k, False: 31.2k]
  ------------------
 1058|  8.51k|      for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1058:19): [True: 5.94k, False: 2.56k]
  ------------------
 1059|  5.94k|        if (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy]))
  ------------------
  |  |  305|  5.94k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  5.94k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  5.94k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  5.94k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.94k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  5.94k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 1.76k, False: 4.18k]
  |  |  ------------------
  ------------------
 1060|  1.76k|          iMbResProperty = i ? CHROMA_AC_V : CHROMA_AC_U;
  ------------------
  |  |   79|    875|#define CHROMA_AC_V  10
  ------------------
                        iMbResProperty = i ? CHROMA_AC_V : CHROMA_AC_U;
  ------------------
  |  |   78|    887|#define CHROMA_AC_U  9
  ------------------
  |  Branch (1060:28): [True: 875, False: 887]
  ------------------
 1061|  4.18k|        else
 1062|  4.18k|          iMbResProperty = i ? CHROMA_AC_V_INTER : CHROMA_AC_U_INTER;
  ------------------
  |  |   85|  2.02k|#define CHROMA_AC_V_INTER  16
  ------------------
                        iMbResProperty = i ? CHROMA_AC_V_INTER : CHROMA_AC_U_INTER;
  ------------------
  |  |   84|  2.15k|#define CHROMA_AC_U_INTER  15
  ------------------
  |  Branch (1062:28): [True: 2.02k, False: 2.15k]
  ------------------
 1063|  5.94k|        int32_t index = 16 + (i << 2);
 1064|  28.7k|        for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (1064:26): [True: 23.2k, False: 5.46k]
  ------------------
 1065|  23.2k|          WELS_READ_VERIFY (ParseResidualBlockCabac (pNeighAvail, pNonZeroCount, pBsAux, index,
  ------------------
  |  |   52|  23.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  93.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |  ------------------
  |  |  |  Branch (53:33): [True: 0, False: 23.2k]
  |  |  |  Branch (53:33): [True: 0, False: 23.2k]
  |  |  ------------------
  |  |   54|  23.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 478, False: 22.7k]
  |  |  ------------------
  |  |   55|  23.2k|    return uiRetTmp; \
  |  |   56|  23.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 22.7k]
  |  |  ------------------
  ------------------
 1066|  23.2k|                            iScanIdxEnd - WELS_MAX (iScanIdxStart, 1) + 1, g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1),
 1067|  23.2k|                            iMbResProperty, pCurDqLayer->pScaledTCoeff[iMbXy] + (index << 4), pCurDqLayer->pChromaQp[iMbXy][i], pCtx));
 1068|  22.7k|          index++;
 1069|  22.7k|        }
 1070|  5.94k|      }
 1071|  2.56k|      ST16 (&pCurDqLayer->pNzc[iMbXy][16], LD16 (&pNonZeroCount[6 + 8 * 1]));
  ------------------
  |  |   66|  2.56k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1072|  2.56k|      ST16 (&pCurDqLayer->pNzc[iMbXy][20], LD16 (&pNonZeroCount[6 + 8 * 2]));
  ------------------
  |  |   66|  2.56k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1073|  2.56k|      ST16 (&pCurDqLayer->pNzc[iMbXy][18], LD16 (&pNonZeroCount[6 + 8 * 4]));
  ------------------
  |  |   66|  2.56k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1074|  2.56k|      ST16 (&pCurDqLayer->pNzc[iMbXy][22], LD16 (&pNonZeroCount[6 + 8 * 5]));
  ------------------
  |  |   66|  2.56k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1075|  31.2k|    } else {
 1076|  31.2k|      ST32 (&pCurDqLayer->pNzc[iMbXy][16], 0);
  ------------------
  |  |   67|  31.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1077|  31.2k|      ST32 (&pCurDqLayer->pNzc[iMbXy][20], 0);
  ------------------
  |  |   67|  31.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1078|  31.2k|    }
 1079|   153k|  } else {
 1080|   153k|    pCurDqLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp;
 1081|   461k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1081:17): [True: 307k, False: 153k]
  ------------------
 1082|   307k|      pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 (pCurDqLayer->pLumaQp[iMbXy] +
  ------------------
  |  |  204|   307k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 4.36k, False: 303k]
  |  |  |  Branch (204:55): [True: 1.39k, False: 301k]
  |  |  ------------------
  ------------------
 1083|   307k|                                         pSliceHeader->pPps->iChromaQpIndexOffset[i], 0, 51)];
 1084|   307k|    }
 1085|   153k|  }
 1086|       |
 1087|   187k|  WELS_READ_VERIFY (ParseEndOfSliceCabac (pCtx, uiEosFlag));
  ------------------
  |  |   52|   187k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   187k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   187k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 234, False: 187k]
  |  |  ------------------
  |  |   55|   187k|    return uiRetTmp; \
  |  |   56|   187k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 187k]
  |  |  ------------------
  ------------------
 1088|   187k|  if (uiEosFlag) {
  ------------------
  |  Branch (1088:7): [True: 344, False: 187k]
  ------------------
 1089|    344|    RestoreCabacDecEngineToBS (pCtx->pCabacDecEngine, pCtx->pCurDqLayer->pBitStringAux);
 1090|    344|  }
 1091|       |
 1092|   187k|  return ERR_NONE;
 1093|   187k|}
_ZN7WelsDec32WelsDecodeMbCabacBSliceBaseMode0EPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailERj:
 1095|   146k|int32_t WelsDecodeMbCabacBSliceBaseMode0 (PWelsDecoderContext pCtx, PWelsNeighAvail pNeighAvail, uint32_t& uiEosFlag) {
 1096|   146k|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
 1097|   146k|  PBitStringAux pBsAux = pCurDqLayer->pBitStringAux;
 1098|   146k|  PSlice pSlice = &pCurDqLayer->sLayerInfo.sSliceInLayer;
 1099|   146k|  PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
 1100|       |
 1101|   146k|  int32_t iScanIdxStart = pSlice->sSliceHeaderExt.uiScanIdxStart;
 1102|   146k|  int32_t iScanIdxEnd = pSlice->sSliceHeaderExt.uiScanIdxEnd;
 1103|   146k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
 1104|   146k|  int32_t iMbResProperty;
 1105|   146k|  int32_t i;
 1106|   146k|  uint32_t uiMbType = 0, uiCbp = 0, uiCbpLuma = 0, uiCbpChroma = 0;
 1107|       |
 1108|   146k|  ENFORCE_STACK_ALIGN_1D (uint8_t, pNonZeroCount, 48, 16);
  ------------------
  |  |   58|   146k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   146k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
 1109|       |
 1110|   146k|  pCurDqLayer->pInterPredictionDoneFlag[iMbXy] = 0;
 1111|       |
 1112|   146k|  WELS_READ_VERIFY (ParseMBTypeBSliceCabac (pCtx, pNeighAvail, uiMbType));
  ------------------
  |  |   52|   146k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   146k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   146k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 4.94k, False: 141k]
  |  |  ------------------
  |  |   55|   146k|    return uiRetTmp; \
  |  |   56|   146k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 141k]
  |  |  ------------------
  ------------------
 1113|       |
 1114|   141k|  if (uiMbType < 23) { //Inter B mode
  ------------------
  |  Branch (1114:7): [True: 129k, False: 12.2k]
  ------------------
 1115|   129k|    int16_t pMotionVector[LIST_A][30][MV_A];
 1116|   129k|    int16_t pMvdCache[LIST_A][30][MV_A];
 1117|   129k|    int8_t  pRefIndex[LIST_A][30];
 1118|   129k|    int8_t  pDirect[30];
 1119|   129k|    pCurDqLayer->pDec->pMbType[iMbXy] = g_ksInterBMbTypeInfo[uiMbType].iType;
 1120|   129k|    WelsFillCacheInterCabac (pNeighAvail, pNonZeroCount, pMotionVector, pMvdCache, pRefIndex, pCurDqLayer);
 1121|   129k|    WelsFillDirectCacheCabac (pNeighAvail, pDirect, pCurDqLayer);
 1122|   129k|    WELS_READ_VERIFY (ParseInterBMotionInfoCabac (pCtx, pNeighAvail, pNonZeroCount, pMotionVector, pMvdCache, pRefIndex,
  ------------------
  |  |   52|   129k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   129k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   129k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 21.3k, False: 108k]
  |  |  ------------------
  |  |   55|   129k|    return uiRetTmp; \
  |  |   56|   129k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 108k]
  |  |  ------------------
  ------------------
 1123|   129k|                      pDirect));
 1124|   108k|    pCurDqLayer->pInterPredictionDoneFlag[iMbXy] = 0;
 1125|   108k|  } else { //Intra mode
 1126|  12.2k|    uiMbType -= 23;
 1127|  12.2k|    if (uiMbType > 25)
  ------------------
  |  Branch (1127:9): [True: 1.87k, False: 10.3k]
  ------------------
 1128|  1.87k|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_TYPE);
  ------------------
  |  |   59|  1.87k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1129|  10.3k|    if (!pCtx->pSps->uiChromaFormatIdc && ((uiMbType >= 5 && uiMbType <= 12) || (uiMbType >= 17 && uiMbType <= 24)))
  ------------------
  |  Branch (1129:9): [True: 2.16k, False: 8.22k]
  |  Branch (1129:45): [True: 682, False: 1.48k]
  |  Branch (1129:62): [True: 210, False: 472]
  |  Branch (1129:82): [True: 408, False: 1.55k]
  |  Branch (1129:100): [True: 200, False: 208]
  ------------------
 1130|    410|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_TYPE);
  ------------------
  |  |   59|    410|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1131|       |
 1132|  9.98k|    if (25 == uiMbType) {   //I_PCM
  ------------------
  |  Branch (1132:9): [True: 1.26k, False: 8.72k]
  ------------------
 1133|  1.26k|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "I_PCM mode exists in B slice!");
 1134|  1.26k|      WELS_READ_VERIFY (ParseIPCMInfoCabac (pCtx));
  ------------------
  |  |   52|  1.26k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.26k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.26k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 407, False: 860]
  |  |  ------------------
  |  |   55|  1.26k|    return uiRetTmp; \
  |  |   56|  1.26k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 860]
  |  |  ------------------
  ------------------
 1135|    860|      pSlice->iLastDeltaQp = 0;
 1136|    860|      WELS_READ_VERIFY (ParseEndOfSliceCabac (pCtx, uiEosFlag));
  ------------------
  |  |   52|    860|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|    860|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|    860|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 860]
  |  |  ------------------
  |  |   55|    860|    return uiRetTmp; \
  |  |   56|    860|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 860]
  |  |  ------------------
  ------------------
 1137|    860|      if (uiEosFlag) {
  ------------------
  |  Branch (1137:11): [True: 195, False: 665]
  ------------------
 1138|    195|        RestoreCabacDecEngineToBS (pCtx->pCabacDecEngine, pCtx->pCurDqLayer->pBitStringAux);
 1139|    195|      }
 1140|    860|      return ERR_NONE;
 1141|  8.72k|    } else { //normal Intra mode
 1142|  8.72k|      if (0 == uiMbType) { //Intra4x4
  ------------------
  |  Branch (1142:11): [True: 3.06k, False: 5.65k]
  ------------------
 1143|  3.06k|        ENFORCE_STACK_ALIGN_1D (int8_t, pIntraPredMode, 48, 16);
  ------------------
  |  |   58|  3.06k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|  3.06k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
 1144|  3.06k|        pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA4x4;
  ------------------
  |  |  275|  3.06k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
 1145|  3.06k|        if (pCtx->pPps->bTransform8x8ModeFlag) {
  ------------------
  |  Branch (1145:13): [True: 2.56k, False: 500]
  ------------------
 1146|  2.56k|          WELS_READ_VERIFY (ParseTransformSize8x8FlagCabac (pCtx, pNeighAvail, pCtx->pCurDqLayer->pTransformSize8x8Flag[iMbXy]));
  ------------------
  |  |   52|  2.56k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.56k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.56k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 194, False: 2.36k]
  |  |  ------------------
  |  |   55|  2.56k|    return uiRetTmp; \
  |  |   56|  2.56k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
 1147|  2.56k|        }
 1148|  2.86k|        if (pCtx->pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (1148:13): [True: 2.15k, False: 713]
  ------------------
 1149|  2.15k|          uiMbType = pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA8x8;
  ------------------
  |  |  277|  2.15k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
 1150|  2.15k|          pCtx->pFillInfoCacheIntraNxNFunc (pNeighAvail, pNonZeroCount, pIntraPredMode, pCurDqLayer);
 1151|  2.15k|          WELS_READ_VERIFY (ParseIntra8x8Mode (pCtx, pNeighAvail, pIntraPredMode, pBsAux, pCurDqLayer));
  ------------------
  |  |   52|  2.15k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.15k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.15k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 545, False: 1.61k]
  |  |  ------------------
  |  |   55|  2.15k|    return uiRetTmp; \
  |  |   56|  2.15k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.61k]
  |  |  ------------------
  ------------------
 1152|  2.15k|        } else {
 1153|    713|          pCtx->pFillInfoCacheIntraNxNFunc (pNeighAvail, pNonZeroCount, pIntraPredMode, pCurDqLayer);
 1154|    713|          WELS_READ_VERIFY (ParseIntra4x4Mode (pCtx, pNeighAvail, pIntraPredMode, pBsAux, pCurDqLayer));
  ------------------
  |  |   52|    713|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|    713|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|    713|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 260, False: 453]
  |  |  ------------------
  |  |   55|    713|    return uiRetTmp; \
  |  |   56|    713|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 453]
  |  |  ------------------
  ------------------
 1155|    713|        }
 1156|  5.65k|      } else { //Intra16x16
 1157|  5.65k|        pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA16x16;
  ------------------
  |  |  276|  5.65k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
 1158|  5.65k|        pCurDqLayer->pTransformSize8x8Flag[iMbXy] = false;
 1159|  5.65k|        pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] = true;
 1160|  5.65k|        pCurDqLayer->pIntraPredMode[iMbXy][7] = (uiMbType - 1) & 3;
 1161|  5.65k|        pCurDqLayer->pCbp[iMbXy] = g_kuiI16CbpTable[ (uiMbType - 1) >> 2];
 1162|  5.65k|        uiCbpChroma = pCtx->pSps->uiChromaFormatIdc ? pCurDqLayer->pCbp[iMbXy] >> 4 : 0;
  ------------------
  |  Branch (1162:23): [True: 4.68k, False: 976]
  ------------------
 1163|  5.65k|        uiCbpLuma = pCurDqLayer->pCbp[iMbXy] & 15;
 1164|  5.65k|        WelsFillCacheNonZeroCount (pNeighAvail, pNonZeroCount, pCurDqLayer);
 1165|  5.65k|        WELS_READ_VERIFY (ParseIntra16x16Mode (pCtx, pNeighAvail, pBsAux, pCurDqLayer));
  ------------------
  |  |   52|  5.65k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  5.65k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  5.65k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 645, False: 5.01k]
  |  |  ------------------
  |  |   55|  5.65k|    return uiRetTmp; \
  |  |   56|  5.65k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 5.01k]
  |  |  ------------------
  ------------------
 1166|  5.65k|      }
 1167|  8.72k|    }
 1168|  9.98k|  }
 1169|       |
 1170|   115k|  ST32 (&pCurDqLayer->pNzc[iMbXy][0], 0);
  ------------------
  |  |   67|   115k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1171|   115k|  ST32 (&pCurDqLayer->pNzc[iMbXy][4], 0);
  ------------------
  |  |   67|   115k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1172|   115k|  ST32 (&pCurDqLayer->pNzc[iMbXy][8], 0);
  ------------------
  |  |   67|   115k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1173|   115k|  ST32 (&pCurDqLayer->pNzc[iMbXy][12], 0);
  ------------------
  |  |   67|   115k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1174|   115k|  ST32 (&pCurDqLayer->pNzc[iMbXy][16], 0);
  ------------------
  |  |   67|   115k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1175|   115k|  ST32 (&pCurDqLayer->pNzc[iMbXy][20], 0);
  ------------------
  |  |   67|   115k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1176|       |
 1177|   115k|  if (MB_TYPE_INTRA16x16 != pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|   115k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (1177:7): [True: 110k, False: 5.01k]
  ------------------
 1178|   110k|    WELS_READ_VERIFY (ParseCbpInfoCabac (pCtx, pNeighAvail, uiCbp));
  ------------------
  |  |   52|   110k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   110k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   110k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.06k, False: 109k]
  |  |  ------------------
  |  |   55|   110k|    return uiRetTmp; \
  |  |   56|   110k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 109k]
  |  |  ------------------
  ------------------
 1179|       |
 1180|   109k|    pCurDqLayer->pCbp[iMbXy] = uiCbp;
 1181|   109k|    pSlice->iLastDeltaQp = uiCbp == 0 ? 0 : pSlice->iLastDeltaQp;
  ------------------
  |  Branch (1181:28): [True: 59.4k, False: 49.5k]
  ------------------
 1182|   109k|    uiCbpChroma = pCtx->pSps->uiChromaFormatIdc ? pCurDqLayer->pCbp[iMbXy] >> 4 : 0;
  ------------------
  |  Branch (1182:19): [True: 98.6k, False: 10.3k]
  ------------------
 1183|   109k|    uiCbpLuma = pCurDqLayer->pCbp[iMbXy] & 15;
 1184|   109k|  }
 1185|       |
 1186|   114k|  if (pCurDqLayer->pCbp[iMbXy] || MB_TYPE_INTRA16x16 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|  61.5k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (1186:7): [True: 52.4k, False: 61.5k]
  |  Branch (1186:35): [True: 2.07k, False: 59.4k]
  ------------------
 1187|       |
 1188|  54.5k|    if (MB_TYPE_INTRA16x16 != pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|  54.5k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (1188:9): [True: 49.5k, False: 5.01k]
  ------------------
 1189|       |      // Need modification when B picutre add in
 1190|  49.5k|      bool bNeedParseTransformSize8x8Flag =
 1191|  49.5k|        (((IS_INTER_16x16 (pCurDqLayer->pDec->pMbType[iMbXy]) || IS_DIRECT (pCurDqLayer->pDec->pMbType[iMbXy])
  ------------------
  |  |  307|  99.0k|#define IS_INTER_16x16(type) ( (type)&MB_TYPE_16x16 )
  |  |  ------------------
  |  |  |  |  278|  49.5k|#define MB_TYPE_16x16       0x00000008
  |  |  ------------------
  |  |  |  Branch (307:30): [True: 16.6k, False: 32.8k]
  |  |  ------------------
  ------------------
                      (((IS_INTER_16x16 (pCurDqLayer->pDec->pMbType[iMbXy]) || IS_DIRECT (pCurDqLayer->pDec->pMbType[iMbXy])
  ------------------
  |  |  316|  82.4k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|  32.8k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  |  |  |  Branch (316:25): [True: 3.19k, False: 29.6k]
  |  |  ------------------
  ------------------
 1192|  29.6k|           || IS_INTER_16x8 (pCurDqLayer->pDec->pMbType[iMbXy]) || IS_INTER_8x16 (pCurDqLayer->pDec->pMbType[iMbXy]))
  ------------------
  |  |  308|  79.2k|#define IS_INTER_16x8(type) ( (type)&MB_TYPE_16x8 )
  |  |  ------------------
  |  |  |  |  279|  29.6k|#define MB_TYPE_16x8        0x00000010
  |  |  ------------------
  |  |  |  Branch (308:29): [True: 7.15k, False: 22.5k]
  |  |  ------------------
  ------------------
                         || IS_INTER_16x8 (pCurDqLayer->pDec->pMbType[iMbXy]) || IS_INTER_8x16 (pCurDqLayer->pDec->pMbType[iMbXy]))
  ------------------
  |  |  309|  22.5k|#define IS_INTER_8x16(type) ( (type)&MB_TYPE_8x16 )
  |  |  ------------------
  |  |  |  |  280|  22.5k|#define MB_TYPE_8x16        0x00000020
  |  |  ------------------
  |  |  |  Branch (309:29): [True: 4.45k, False: 18.0k]
  |  |  ------------------
  ------------------
 1193|  18.0k|          || pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy])
  ------------------
  |  Branch (1193:14): [True: 14.6k, False: 3.42k]
  ------------------
 1194|  46.1k|         && (pCurDqLayer->pDec->pMbType[iMbXy] != MB_TYPE_INTRA8x8)
  ------------------
  |  |  277|  46.1k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
  |  Branch (1194:13): [True: 44.9k, False: 1.12k]
  ------------------
 1195|  44.9k|         && (pCurDqLayer->pDec->pMbType[iMbXy] != MB_TYPE_INTRA4x4)
  ------------------
  |  |  275|  44.9k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
  |  Branch (1195:13): [True: 44.7k, False: 250]
  ------------------
 1196|  44.7k|         && ((pCurDqLayer->pCbp[iMbXy] & 0x0F) > 0)
  ------------------
  |  Branch (1196:13): [True: 42.1k, False: 2.55k]
  ------------------
 1197|  42.1k|         && (pCtx->pPps->bTransform8x8ModeFlag));
  ------------------
  |  Branch (1197:13): [True: 37.7k, False: 4.43k]
  ------------------
 1198|       |
 1199|  49.5k|      if (bNeedParseTransformSize8x8Flag) {
  ------------------
  |  Branch (1199:11): [True: 37.7k, False: 11.7k]
  ------------------
 1200|  37.7k|        WELS_READ_VERIFY (ParseTransformSize8x8FlagCabac (pCtx, pNeighAvail,
  ------------------
  |  |   52|  37.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  37.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  37.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 236, False: 37.5k]
  |  |  ------------------
  |  |   55|  37.7k|    return uiRetTmp; \
  |  |   56|  37.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 37.5k]
  |  |  ------------------
  ------------------
 1201|  37.7k|                          pCtx->pCurDqLayer->pTransformSize8x8Flag[iMbXy])); //transform_size_8x8_flag
 1202|  37.7k|      }
 1203|  49.5k|    }
 1204|       |
 1205|  54.3k|    memset (pCurDqLayer->pScaledTCoeff[iMbXy], 0, 384 * sizeof (pCurDqLayer->pScaledTCoeff[iMbXy][0]));
 1206|       |
 1207|  54.3k|    int32_t iQpDelta, iId8x8, iId4x4;
 1208|       |
 1209|  54.3k|    WELS_READ_VERIFY (ParseDeltaQpCabac (pCtx, iQpDelta));
  ------------------
  |  |   52|  54.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  54.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  54.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 336, False: 53.9k]
  |  |  ------------------
  |  |   55|  54.3k|    return uiRetTmp; \
  |  |   56|  54.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 53.9k]
  |  |  ------------------
  ------------------
 1210|  53.9k|    if (iQpDelta > 25 || iQpDelta < -26) { //out of iQpDelta range
  ------------------
  |  Branch (1210:9): [True: 300, False: 53.6k]
  |  Branch (1210:26): [True: 225, False: 53.4k]
  ------------------
 1211|    525|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_QP);
  ------------------
  |  |   59|    525|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1212|    525|    }
 1213|  53.4k|    pCurDqLayer->pLumaQp[iMbXy] = (pSlice->iLastMbQp + iQpDelta + 52) % 52; //update last_mb_qp
 1214|  53.4k|    pSlice->iLastMbQp = pCurDqLayer->pLumaQp[iMbXy];
 1215|   160k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1215:17): [True: 106k, False: 53.4k]
  ------------------
 1216|   106k|      pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 (pSlice->iLastMbQp +
  ------------------
  |  |  204|   106k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 1.85k, False: 105k]
  |  |  |  Branch (204:55): [True: 400, False: 104k]
  |  |  ------------------
  ------------------
 1217|   106k|                                         pSliceHeader->pPps->iChromaQpIndexOffset[i], 0, 51)];
 1218|   106k|    }
 1219|       |
 1220|  53.4k|    if (MB_TYPE_INTRA16x16 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|  53.4k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (1220:9): [True: 5.01k, False: 48.4k]
  ------------------
 1221|       |      //step1: Luma DC
 1222|  5.01k|      WELS_READ_VERIFY (ParseResidualBlockCabac (pNeighAvail, pNonZeroCount, pBsAux, 0, 16, g_kuiLumaDcZigzagScan,
  ------------------
  |  |   52|  5.01k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  5.01k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  5.01k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 303, False: 4.70k]
  |  |  ------------------
  |  |   55|  5.01k|    return uiRetTmp; \
  |  |   56|  5.01k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.70k]
  |  |  ------------------
  ------------------
 1223|  5.01k|                        I16_LUMA_DC, pCurDqLayer->pScaledTCoeff[iMbXy], pCurDqLayer->pLumaQp[iMbXy], pCtx));
 1224|       |      //step2: Luma AC
 1225|  4.70k|      if (uiCbpLuma) {
  ------------------
  |  Branch (1225:11): [True: 648, False: 4.06k]
  ------------------
 1226|  7.02k|        for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (1226:21): [True: 6.70k, False: 327]
  ------------------
 1227|  6.70k|          WELS_READ_VERIFY (ParseResidualBlockCabac (pNeighAvail, pNonZeroCount, pBsAux, i, iScanIdxEnd - WELS_MAX (iScanIdxStart,
  ------------------
  |  |   52|  6.70k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  26.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |  ------------------
  |  |  |  Branch (53:33): [True: 0, False: 6.70k]
  |  |  |  Branch (53:33): [True: 0, False: 6.70k]
  |  |  ------------------
  |  |   54|  6.70k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 321, False: 6.37k]
  |  |  ------------------
  |  |   55|  6.70k|    return uiRetTmp; \
  |  |   56|  6.70k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 6.37k]
  |  |  ------------------
  ------------------
 1228|  6.70k|                            1) + 1, g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1), I16_LUMA_AC, pCurDqLayer->pScaledTCoeff[iMbXy] + (i << 4),
 1229|  6.70k|                            pCurDqLayer->pLumaQp[iMbXy], pCtx));
 1230|  6.70k|        }
 1231|    327|        ST32 (&pCurDqLayer->pNzc[iMbXy][0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   67|    327|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1232|    327|        ST32 (&pCurDqLayer->pNzc[iMbXy][4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   67|    327|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1233|    327|        ST32 (&pCurDqLayer->pNzc[iMbXy][8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   67|    327|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1234|    327|        ST32 (&pCurDqLayer->pNzc[iMbXy][12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   67|    327|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1235|  4.06k|      } else {
 1236|  4.06k|        ST32 (&pCurDqLayer->pNzc[iMbXy][0], 0);
  ------------------
  |  |   67|  4.06k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1237|  4.06k|        ST32 (&pCurDqLayer->pNzc[iMbXy][4], 0);
  ------------------
  |  |   67|  4.06k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1238|  4.06k|        ST32 (&pCurDqLayer->pNzc[iMbXy][8], 0);
  ------------------
  |  |   67|  4.06k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1239|  4.06k|        ST32 (&pCurDqLayer->pNzc[iMbXy][12], 0);
  ------------------
  |  |   67|  4.06k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1240|  4.06k|      }
 1241|  48.4k|    } else { //non-MB_TYPE_INTRA16x16
 1242|  48.4k|      if (pCtx->pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (1242:11): [True: 34.2k, False: 14.2k]
  ------------------
 1243|       |        // Transform 8x8 support for CABAC
 1244|   168k|        for (iId8x8 = 0; iId8x8 < 4; iId8x8++) {
  ------------------
  |  Branch (1244:26): [True: 135k, False: 33.1k]
  ------------------
 1245|   135k|          if (uiCbpLuma & (1 << iId8x8)) {
  ------------------
  |  Branch (1245:15): [True: 62.1k, False: 72.9k]
  ------------------
 1246|  62.1k|            WELS_READ_VERIFY (ParseResidualBlockCabac8x8 (pNeighAvail, pNonZeroCount, pBsAux, (iId8x8 << 2),
  ------------------
  |  |   52|  62.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   124k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |  ------------------
  |  |  |  Branch (53:33): [True: 1.00k, False: 61.1k]
  |  |  ------------------
  |  |   54|  62.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.10k, False: 61.0k]
  |  |  ------------------
  |  |   55|  62.1k|    return uiRetTmp; \
  |  |   56|  62.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 61.0k]
  |  |  ------------------
  ------------------
 1247|  62.1k|                              iScanIdxEnd - iScanIdxStart + 1, g_kuiZigzagScan8x8 + iScanIdxStart,
 1248|  62.1k|                              IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy]) ? LUMA_DC_AC_INTRA_8 : LUMA_DC_AC_INTER_8,
 1249|  62.1k|                              pCurDqLayer->pScaledTCoeff[iMbXy] + (iId8x8 << 6), pCurDqLayer->pLumaQp[iMbXy], pCtx));
 1250|  72.9k|          } else {
 1251|  72.9k|            ST16 (&pNonZeroCount[g_kCacheNzcScanIdx[ (iId8x8 << 2)]], 0);
  ------------------
  |  |   66|  72.9k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1252|  72.9k|            ST16 (&pNonZeroCount[g_kCacheNzcScanIdx[ (iId8x8 << 2) + 2]], 0);
  ------------------
  |  |   66|  72.9k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1253|  72.9k|          }
 1254|   135k|        }
 1255|  33.1k|        ST32 (&pCurDqLayer->pNzc[iMbXy][0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   67|  33.1k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1256|  33.1k|        ST32 (&pCurDqLayer->pNzc[iMbXy][4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   67|  33.1k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1257|  33.1k|        ST32 (&pCurDqLayer->pNzc[iMbXy][8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   67|  33.1k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1258|  33.1k|        ST32 (&pCurDqLayer->pNzc[iMbXy][12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   67|  33.1k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1259|  33.1k|      } else {
 1260|  14.2k|        iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA : LUMA_DC_AC_INTER;
  ------------------
  |  |  305|  14.2k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  14.2k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  14.2k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  14.2k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  14.2k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  14.2k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA : LUMA_DC_AC_INTER;
  ------------------
  |  |   80|    250|#define LUMA_DC_AC_INTRA 11
  ------------------
                      iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA : LUMA_DC_AC_INTER;
  ------------------
  |  |   81|  28.1k|#define LUMA_DC_AC_INTER 12
  ------------------
  |  Branch (1260:26): [True: 250, False: 13.9k]
  ------------------
 1261|  65.4k|        for (iId8x8 = 0; iId8x8 < 4; iId8x8++) {
  ------------------
  |  Branch (1261:26): [True: 53.3k, False: 12.0k]
  ------------------
 1262|  53.3k|          if (uiCbpLuma & (1 << iId8x8)) {
  ------------------
  |  Branch (1262:15): [True: 22.7k, False: 30.6k]
  ------------------
 1263|  22.7k|            int32_t iIdx = (iId8x8 << 2);
 1264|   108k|            for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (1264:30): [True: 87.8k, False: 20.5k]
  ------------------
 1265|       |              //Luma (DC and AC decoding together)
 1266|  87.8k|              WELS_READ_VERIFY (ParseResidualBlockCabac (pNeighAvail, pNonZeroCount, pBsAux, iIdx, iScanIdxEnd - iScanIdxStart + 1,
  ------------------
  |  |   52|  87.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  87.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  87.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.19k, False: 85.6k]
  |  |  ------------------
  |  |   55|  87.8k|    return uiRetTmp; \
  |  |   56|  87.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 85.6k]
  |  |  ------------------
  ------------------
 1267|  87.8k|                                g_kuiZigzagScan + iScanIdxStart, iMbResProperty, pCurDqLayer->pScaledTCoeff[iMbXy] + (iIdx << 4),
 1268|  87.8k|                                pCurDqLayer->pLumaQp[iMbXy],
 1269|  87.8k|                                pCtx));
 1270|  85.6k|              iIdx++;
 1271|  85.6k|            }
 1272|  30.6k|          } else {
 1273|  30.6k|            ST16 (&pNonZeroCount[g_kCacheNzcScanIdx[iId8x8 << 2]], 0);
  ------------------
  |  |   66|  30.6k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1274|  30.6k|            ST16 (&pNonZeroCount[g_kCacheNzcScanIdx[ (iId8x8 << 2) + 2]], 0);
  ------------------
  |  |   66|  30.6k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1275|  30.6k|          }
 1276|  53.3k|        }
 1277|  12.0k|        ST32 (&pCurDqLayer->pNzc[iMbXy][0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   67|  12.0k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1278|  12.0k|        ST32 (&pCurDqLayer->pNzc[iMbXy][4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   67|  12.0k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1279|  12.0k|        ST32 (&pCurDqLayer->pNzc[iMbXy][8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   67|  12.0k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1280|  12.0k|        ST32 (&pCurDqLayer->pNzc[iMbXy][12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   67|  12.0k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1281|  12.0k|      }
 1282|  48.4k|    }
 1283|       |
 1284|       |    //chroma
 1285|       |    //step1: DC
 1286|  49.5k|    if (1 == uiCbpChroma || 2 == uiCbpChroma) {
  ------------------
  |  Branch (1286:9): [True: 5.89k, False: 43.6k]
  |  Branch (1286:29): [True: 4.22k, False: 39.4k]
  ------------------
 1287|  29.7k|      for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1287:19): [True: 19.9k, False: 9.74k]
  ------------------
 1288|  19.9k|        if (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy]))
  ------------------
  |  |  305|  19.9k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  19.9k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  19.9k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  19.9k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  19.9k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  19.9k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 4.63k, False: 15.3k]
  |  |  ------------------
  ------------------
 1289|  4.63k|          iMbResProperty = i ? CHROMA_DC_V : CHROMA_DC_U;
  ------------------
  |  |   77|  2.30k|#define CHROMA_DC_V  8
  ------------------
                        iMbResProperty = i ? CHROMA_DC_V : CHROMA_DC_U;
  ------------------
  |  |   76|  2.33k|#define CHROMA_DC_U  7
  ------------------
  |  Branch (1289:28): [True: 2.30k, False: 2.33k]
  ------------------
 1290|  15.3k|        else
 1291|  15.3k|          iMbResProperty = i ? CHROMA_DC_V_INTER : CHROMA_DC_U_INTER;
  ------------------
  |  |   83|  7.57k|#define CHROMA_DC_V_INTER  14
  ------------------
                        iMbResProperty = i ? CHROMA_DC_V_INTER : CHROMA_DC_U_INTER;
  ------------------
  |  |   82|  7.78k|#define CHROMA_DC_U_INTER  13
  ------------------
  |  Branch (1291:28): [True: 7.57k, False: 7.78k]
  ------------------
 1292|       |
 1293|  19.9k|        WELS_READ_VERIFY (ParseResidualBlockCabac (pNeighAvail, pNonZeroCount, pBsAux, 16 + (i << 2), 4, g_kuiChromaDcScan,
  ------------------
  |  |   52|  19.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  19.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  19.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 376, False: 19.6k]
  |  |  ------------------
  |  |   55|  19.9k|    return uiRetTmp; \
  |  |   56|  19.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 19.6k]
  |  |  ------------------
  ------------------
 1294|  19.9k|                          iMbResProperty, pCurDqLayer->pScaledTCoeff[iMbXy] + 256 + (i << 6), pCurDqLayer->pChromaQp[iMbXy][i], pCtx));
 1295|  19.9k|      }
 1296|  10.1k|    }
 1297|       |    //step2: AC
 1298|  49.1k|    if (2 == uiCbpChroma) {
  ------------------
  |  Branch (1298:9): [True: 4.03k, False: 45.1k]
  ------------------
 1299|  11.6k|      for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1299:19): [True: 8.02k, False: 3.66k]
  ------------------
 1300|  8.02k|        if (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy]))
  ------------------
  |  |  305|  8.02k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  8.02k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  8.02k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  8.02k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  8.02k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  8.02k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 613, False: 7.41k]
  |  |  ------------------
  ------------------
 1301|    613|          iMbResProperty = i ? CHROMA_AC_V : CHROMA_AC_U;
  ------------------
  |  |   79|    299|#define CHROMA_AC_V  10
  ------------------
                        iMbResProperty = i ? CHROMA_AC_V : CHROMA_AC_U;
  ------------------
  |  |   78|    314|#define CHROMA_AC_U  9
  ------------------
  |  Branch (1301:28): [True: 299, False: 314]
  ------------------
 1302|  7.41k|        else
 1303|  7.41k|          iMbResProperty = i ? CHROMA_AC_V_INTER : CHROMA_AC_U_INTER;
  ------------------
  |  |   85|  3.69k|#define CHROMA_AC_V_INTER  16
  ------------------
                        iMbResProperty = i ? CHROMA_AC_V_INTER : CHROMA_AC_U_INTER;
  ------------------
  |  |   84|  3.72k|#define CHROMA_AC_U_INTER  15
  ------------------
  |  Branch (1303:28): [True: 3.69k, False: 3.72k]
  ------------------
 1304|  8.02k|        int32_t index = 16 + (i << 2);
 1305|  38.7k|        for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (1305:26): [True: 31.1k, False: 7.66k]
  ------------------
 1306|  31.1k|          WELS_READ_VERIFY (ParseResidualBlockCabac (pNeighAvail, pNonZeroCount, pBsAux, index,
  ------------------
  |  |   52|  31.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   124k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |  ------------------
  |  |  |  Branch (53:33): [True: 0, False: 31.1k]
  |  |  |  Branch (53:33): [True: 0, False: 31.1k]
  |  |  ------------------
  |  |   54|  31.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 365, False: 30.7k]
  |  |  ------------------
  |  |   55|  31.1k|    return uiRetTmp; \
  |  |   56|  31.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 30.7k]
  |  |  ------------------
  ------------------
 1307|  31.1k|                            iScanIdxEnd - WELS_MAX (iScanIdxStart, 1) + 1, g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1),
 1308|  31.1k|                            iMbResProperty, pCurDqLayer->pScaledTCoeff[iMbXy] + (index << 4), pCurDqLayer->pChromaQp[iMbXy][i], pCtx));
 1309|  30.7k|          index++;
 1310|  30.7k|        }
 1311|  8.02k|      }
 1312|  3.66k|      ST16 (&pCurDqLayer->pNzc[iMbXy][16], LD16 (&pNonZeroCount[6 + 8 * 1]));
  ------------------
  |  |   66|  3.66k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1313|  3.66k|      ST16 (&pCurDqLayer->pNzc[iMbXy][20], LD16 (&pNonZeroCount[6 + 8 * 2]));
  ------------------
  |  |   66|  3.66k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1314|  3.66k|      ST16 (&pCurDqLayer->pNzc[iMbXy][18], LD16 (&pNonZeroCount[6 + 8 * 4]));
  ------------------
  |  |   66|  3.66k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1315|  3.66k|      ST16 (&pCurDqLayer->pNzc[iMbXy][22], LD16 (&pNonZeroCount[6 + 8 * 5]));
  ------------------
  |  |   66|  3.66k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 1316|  45.1k|    } else {
 1317|  45.1k|      ST32 (&pCurDqLayer->pNzc[iMbXy][16], 0);
  ------------------
  |  |   67|  45.1k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1318|  45.1k|      ST32 (&pCurDqLayer->pNzc[iMbXy][20], 0);
  ------------------
  |  |   67|  45.1k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1319|  45.1k|    }
 1320|  59.4k|  } else {
 1321|  59.4k|    pCurDqLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp;
 1322|   178k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1322:17): [True: 118k, False: 59.4k]
  ------------------
 1323|   118k|      pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 (pCurDqLayer->pLumaQp[iMbXy] +
  ------------------
  |  |  204|   118k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 250, False: 118k]
  |  |  |  Branch (204:55): [True: 346, False: 118k]
  |  |  ------------------
  ------------------
 1324|   118k|                                         pSliceHeader->pPps->iChromaQpIndexOffset[i], 0, 51)];
 1325|   118k|    }
 1326|  59.4k|  }
 1327|       |
 1328|   108k|  WELS_READ_VERIFY (ParseEndOfSliceCabac (pCtx, uiEosFlag));
  ------------------
  |  |   52|   108k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   108k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   108k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 239, False: 108k]
  |  |  ------------------
  |  |   55|   108k|    return uiRetTmp; \
  |  |   56|   108k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 108k]
  |  |  ------------------
  ------------------
 1329|   108k|  if (uiEosFlag) {
  ------------------
  |  Branch (1329:7): [True: 396, False: 107k]
  ------------------
 1330|    396|    RestoreCabacDecEngineToBS (pCtx->pCabacDecEngine, pCtx->pCurDqLayer->pBitStringAux);
 1331|    396|  }
 1332|       |
 1333|   108k|  return ERR_NONE;
 1334|   108k|}
_ZN7WelsDec23WelsDecodeMbCabacPSliceEPNS_21TagWelsDecoderContextEPNS_10TagNalUnitERj:
 1337|  1.73M|int32_t WelsDecodeMbCabacPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uint32_t& uiEosFlag) {
 1338|  1.73M|  PDqLayer pCurDqLayer             = pCtx->pCurDqLayer;
 1339|  1.73M|  PSlice pSlice                  = &pCurDqLayer->sLayerInfo.sSliceInLayer;
 1340|  1.73M|  PSliceHeader pSliceHeader      = &pSlice->sSliceHeaderExt.sSliceHeader;
 1341|  1.73M|  PPicture* ppRefPic = pCtx->sRefPic.pRefList[LIST_0];
 1342|  1.73M|  uint32_t uiCode;
 1343|  1.73M|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
 1344|  1.73M|  int32_t i;
 1345|  1.73M|  SWelsNeighAvail uiNeighAvail;
 1346|  1.73M|  pCurDqLayer->pCbp[iMbXy] = 0;
 1347|  1.73M|  pCurDqLayer->pCbfDc[iMbXy] = 0;
 1348|  1.73M|  pCurDqLayer->pChromaPredMode[iMbXy] = C_PRED_DC;
  ------------------
  |  |  363|  1.73M|#define C_PRED_DC        0
  ------------------
 1349|       |
 1350|  1.73M|  pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] = true;
 1351|  1.73M|  pCurDqLayer->pTransformSize8x8Flag[iMbXy] = false;
 1352|       |
 1353|  1.73M|  GetNeighborAvailMbType (&uiNeighAvail, pCurDqLayer);
 1354|  1.73M|  WELS_READ_VERIFY (ParseSkipFlagCabac (pCtx, &uiNeighAvail, uiCode));
  ------------------
  |  |   52|  1.73M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.73M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.73M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 436, False: 1.73M]
  |  |  ------------------
  |  |   55|  1.73M|    return uiRetTmp; \
  |  |   56|  1.73M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.73M]
  |  |  ------------------
  ------------------
 1355|       |
 1356|  1.73M|  if (uiCode) {
  ------------------
  |  Branch (1356:7): [True: 1.51M, False: 226k]
  ------------------
 1357|  1.51M|    int16_t pMv[2] = {0};
 1358|  1.51M|    pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_SKIP;
  ------------------
  |  |  283|  1.51M|#define MB_TYPE_SKIP        0x00000100
  ------------------
 1359|  1.51M|    ST32 (&pCurDqLayer->pNzc[iMbXy][0], 0);
  ------------------
  |  |   67|  1.51M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1360|  1.51M|    ST32 (&pCurDqLayer->pNzc[iMbXy][4], 0);
  ------------------
  |  |   67|  1.51M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1361|  1.51M|    ST32 (&pCurDqLayer->pNzc[iMbXy][8], 0);
  ------------------
  |  |   67|  1.51M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1362|  1.51M|    ST32 (&pCurDqLayer->pNzc[iMbXy][12], 0);
  ------------------
  |  |   67|  1.51M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1363|  1.51M|    ST32 (&pCurDqLayer->pNzc[iMbXy][16], 0);
  ------------------
  |  |   67|  1.51M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1364|  1.51M|    ST32 (&pCurDqLayer->pNzc[iMbXy][20], 0);
  ------------------
  |  |   67|  1.51M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1365|       |
 1366|  1.51M|    pCurDqLayer->pInterPredictionDoneFlag[iMbXy] = 0;
 1367|  1.51M|    memset (pCurDqLayer->pDec->pRefIndex[0][iMbXy], 0, sizeof (int8_t) * 16);
 1368|  1.51M|    bool bIsPending = GetThreadCount (pCtx) > 1;
 1369|  1.51M|    pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPic[0] && (ppRefPic[0]->bIsComplete
  ------------------
  |  Branch (1369:29): [True: 4.38k, False: 1.50M]
  |  Branch (1369:49): [True: 0, False: 1.50M]
  |  Branch (1369:77): [True: 1.50M, False: 0]
  |  Branch (1369:93): [True: 1.78k, False: 1.50M]
  ------------------
 1370|  1.50M|                            || bIsPending));
  ------------------
  |  Branch (1370:32): [True: 0, False: 1.50M]
  ------------------
 1371|       |    //predict mv
 1372|  1.51M|    PredPSkipMvFromNeighbor (pCurDqLayer, pMv);
 1373|  25.6M|    for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (1373:17): [True: 24.1M, False: 1.51M]
  ------------------
 1374|  24.1M|      ST32 (pCurDqLayer->pDec->pMv[0][iMbXy][i], * (uint32_t*)pMv);
  ------------------
  |  |   67|  24.1M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1375|  24.1M|      ST32 (pCurDqLayer->pMvd[0][iMbXy][i], 0);
  ------------------
  |  |   67|  24.1M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1376|  24.1M|    }
 1377|       |
 1378|       |    //if (!pSlice->sSliceHeaderExt.bDefaultResidualPredFlag) {
 1379|       |    //  memset (pCurDqLayer->pScaledTCoeff[iMbXy], 0, 384 * sizeof (int16_t));
 1380|       |    //}
 1381|       |
 1382|       |    //reset rS
 1383|  1.51M|    pCurDqLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp; //??????????????? dqaunt of previous mb
 1384|  4.53M|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1384:17): [True: 3.02M, False: 1.51M]
  ------------------
 1385|  3.02M|      pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 (pCurDqLayer->pLumaQp[iMbXy] +
  ------------------
  |  |  204|  3.02M|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 4.97k, False: 3.01M]
  |  |  |  Branch (204:55): [True: 2.23k, False: 3.01M]
  |  |  ------------------
  ------------------
 1386|  3.02M|                                         pSliceHeader->pPps->iChromaQpIndexOffset[i], 0, 51)];
 1387|  3.02M|    }
 1388|       |
 1389|       |    //for neighboring CABAC usage
 1390|  1.51M|    pSlice->iLastDeltaQp = 0;
 1391|       |
 1392|  1.51M|    WELS_READ_VERIFY (ParseEndOfSliceCabac (pCtx, uiEosFlag));
  ------------------
  |  |   52|  1.51M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.51M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.51M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 661, False: 1.50M]
  |  |  ------------------
  |  |   55|  1.51M|    return uiRetTmp; \
  |  |   56|  1.51M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.50M]
  |  |  ------------------
  ------------------
 1393|       |
 1394|  1.50M|    return ERR_NONE;
 1395|  1.51M|  }
 1396|       |
 1397|   226k|  WELS_READ_VERIFY (WelsDecodeMbCabacPSliceBaseMode0 (pCtx, &uiNeighAvail, uiEosFlag));
  ------------------
  |  |   52|   226k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   226k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   226k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 37.8k, False: 188k]
  |  |  ------------------
  |  |   55|   226k|    return uiRetTmp; \
  |  |   56|   226k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 188k]
  |  |  ------------------
  ------------------
 1398|   188k|  return ERR_NONE;
 1399|   226k|}
_ZN7WelsDec23WelsDecodeMbCabacBSliceEPNS_21TagWelsDecoderContextEPNS_10TagNalUnitERj:
 1402|   179k|int32_t WelsDecodeMbCabacBSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uint32_t& uiEosFlag) {
 1403|   179k|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
 1404|   179k|  PSlice pSlice = &pCurDqLayer->sLayerInfo.sSliceInLayer;
 1405|   179k|  PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
 1406|   179k|  PPicture* ppRefPicL0 = pCtx->sRefPic.pRefList[LIST_0];
 1407|   179k|  PPicture* ppRefPicL1 = pCtx->sRefPic.pRefList[LIST_1];
 1408|   179k|  uint32_t uiCode;
 1409|   179k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
 1410|   179k|  int32_t i;
 1411|   179k|  SWelsNeighAvail uiNeighAvail;
 1412|   179k|  pCurDqLayer->pCbp[iMbXy] = 0;
 1413|   179k|  pCurDqLayer->pCbfDc[iMbXy] = 0;
 1414|   179k|  pCurDqLayer->pChromaPredMode[iMbXy] = C_PRED_DC;
  ------------------
  |  |  363|   179k|#define C_PRED_DC        0
  ------------------
 1415|       |
 1416|   179k|  pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] = true;
 1417|   179k|  pCurDqLayer->pTransformSize8x8Flag[iMbXy] = false;
 1418|       |
 1419|   179k|  GetNeighborAvailMbType (&uiNeighAvail, pCurDqLayer);
 1420|   179k|  WELS_READ_VERIFY (ParseSkipFlagCabac (pCtx, &uiNeighAvail, uiCode));
  ------------------
  |  |   52|   179k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   179k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   179k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 327, False: 179k]
  |  |  ------------------
  |  |   55|   179k|    return uiRetTmp; \
  |  |   56|   179k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 179k]
  |  |  ------------------
  ------------------
 1421|       |
 1422|   179k|  memset (pCurDqLayer->pDirect[iMbXy], 0, sizeof (int8_t) * 16);
 1423|       |
 1424|   179k|  bool bIsPending = GetThreadCount (pCtx) > 1;
 1425|       |
 1426|   179k|  if (uiCode) {
  ------------------
  |  Branch (1426:7): [True: 32.4k, False: 146k]
  ------------------
 1427|  32.4k|    int16_t pMv[LIST_A][2] = { {0, 0}, { 0, 0 } };
 1428|  32.4k|    int8_t  ref[LIST_A] = { 0 };
 1429|  32.4k|    pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_SKIP | MB_TYPE_DIRECT;
  ------------------
  |  |  283|  32.4k|#define MB_TYPE_SKIP        0x00000100
  ------------------
                  pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_SKIP | MB_TYPE_DIRECT;
  ------------------
  |  |  286|  32.4k|#define MB_TYPE_DIRECT      0x00000800
  ------------------
 1430|  32.4k|    ST32 (&pCurDqLayer->pNzc[iMbXy][0], 0);
  ------------------
  |  |   67|  32.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1431|  32.4k|    ST32 (&pCurDqLayer->pNzc[iMbXy][4], 0);
  ------------------
  |  |   67|  32.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1432|  32.4k|    ST32 (&pCurDqLayer->pNzc[iMbXy][8], 0);
  ------------------
  |  |   67|  32.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1433|  32.4k|    ST32 (&pCurDqLayer->pNzc[iMbXy][12], 0);
  ------------------
  |  |   67|  32.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1434|  32.4k|    ST32 (&pCurDqLayer->pNzc[iMbXy][16], 0);
  ------------------
  |  |   67|  32.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1435|  32.4k|    ST32 (&pCurDqLayer->pNzc[iMbXy][20], 0);
  ------------------
  |  |   67|  32.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1436|       |
 1437|  32.4k|    pCurDqLayer->pInterPredictionDoneFlag[iMbXy] = 0;
 1438|  32.4k|    memset (pCurDqLayer->pDec->pRefIndex[LIST_0][iMbXy], 0, sizeof (int8_t) * 16);
 1439|  32.4k|    memset (pCurDqLayer->pDec->pRefIndex[LIST_1][iMbXy], 0, sizeof (int8_t) * 16);
 1440|  32.4k|    pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPicL0[0] && (ppRefPicL0[0]->bIsComplete
  ------------------
  |  Branch (1440:29): [True: 610, False: 31.8k]
  |  Branch (1440:49): [True: 0, False: 31.8k]
  |  Branch (1440:77): [True: 30.4k, False: 1.38k]
  |  Branch (1440:95): [True: 25.1k, False: 5.32k]
  ------------------
 1441|  25.1k|                            || bIsPending)) || ! (ppRefPicL1[0] && (ppRefPicL1[0]->bIsComplete || bIsPending));
  ------------------
  |  Branch (1441:32): [True: 0, False: 5.32k]
  |  Branch (1441:51): [True: 24.8k, False: 269]
  |  Branch (1441:69): [True: 24.7k, False: 196]
  |  Branch (1441:99): [True: 0, False: 196]
  ------------------
 1442|       |
 1443|  32.4k|    if (pCtx->bMbRefConcealed) {
  ------------------
  |  Branch (1443:9): [True: 7.77k, False: 24.7k]
  ------------------
 1444|  7.77k|      SLogContext* pLogCtx = & (pCtx->sLogCtx);
 1445|  7.77k|      WelsLog (pLogCtx, WELS_LOG_ERROR, "Ref Picture for B-Slice is lost, B-Slice decoding cannot be continued!");
 1446|  7.77k|      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_DATA, ERR_INFO_REFERENCE_PIC_LOST);
  ------------------
  |  |   59|  7.77k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1447|  7.77k|    }
 1448|       |
 1449|  24.7k|    SubMbType subMbType;
 1450|  24.7k|    if (pSliceHeader->iDirectSpatialMvPredFlag) {
  ------------------
  |  Branch (1450:9): [True: 847, False: 23.8k]
  ------------------
 1451|       |
 1452|       |      //predict direct spatial mv
 1453|    847|      int32_t ret = PredMvBDirectSpatial (pCtx, pMv, ref, subMbType);
 1454|    847|      if (ret != ERR_NONE) {
  ------------------
  |  Branch (1454:11): [True: 0, False: 847]
  ------------------
 1455|      0|        return ret;
 1456|      0|      }
 1457|  23.8k|    } else {
 1458|       |      //temporal direct mode
 1459|  23.8k|      int32_t ret = PredBDirectTemporal (pCtx, pMv, ref, subMbType);
 1460|  23.8k|      if (ret != ERR_NONE) {
  ------------------
  |  Branch (1460:11): [True: 0, False: 23.8k]
  ------------------
 1461|      0|        return ret;
 1462|      0|      }
 1463|  23.8k|    }
 1464|       |
 1465|       |
 1466|       |    //reset rS
 1467|  24.7k|    pCurDqLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp; //??????????????? dqaunt of previous mb
 1468|  74.1k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1468:17): [True: 49.4k, False: 24.7k]
  ------------------
 1469|  49.4k|      pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 (pCurDqLayer->pLumaQp[iMbXy] +
  ------------------
  |  |  204|  49.4k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 604, False: 48.7k]
  |  |  |  Branch (204:55): [True: 623, False: 48.1k]
  |  |  ------------------
  ------------------
 1470|  49.4k|                                         pSliceHeader->pPps->iChromaQpIndexOffset[i], 0, 51)];
 1471|  49.4k|    }
 1472|       |
 1473|       |    //for neighboring CABAC usage
 1474|  24.7k|    pSlice->iLastDeltaQp = 0;
 1475|       |
 1476|  24.7k|    WELS_READ_VERIFY (ParseEndOfSliceCabac (pCtx, uiEosFlag));
  ------------------
  |  |   52|  24.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  24.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  24.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 82, False: 24.6k]
  |  |  ------------------
  |  |   55|  24.7k|    return uiRetTmp; \
  |  |   56|  24.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 24.6k]
  |  |  ------------------
  ------------------
 1477|       |
 1478|  24.6k|    return ERR_NONE;
 1479|  24.7k|  }
 1480|       |
 1481|   146k|  WELS_READ_VERIFY (WelsDecodeMbCabacBSliceBaseMode0 (pCtx, &uiNeighAvail, uiEosFlag));
  ------------------
  |  |   52|   146k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   146k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   146k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 37.6k, False: 108k]
  |  |  ------------------
  |  |   55|   146k|    return uiRetTmp; \
  |  |   56|   146k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 108k]
  |  |  ------------------
  ------------------
 1482|   108k|  return ERR_NONE;
 1483|   146k|}
_ZN7WelsDec27WelsCalcDeqCoeffScalingListEPNS_21TagWelsDecoderContextE:
 1486|  2.57M|int32_t  WelsCalcDeqCoeffScalingList (PWelsDecoderContext pCtx) {
 1487|  2.57M|  if (pCtx->pSps->bSeqScalingMatrixPresentFlag || pCtx->pPps->bPicScalingMatrixPresentFlag) {
  ------------------
  |  Branch (1487:7): [True: 321k, False: 2.25M]
  |  Branch (1487:51): [True: 3.45k, False: 2.24M]
  ------------------
 1488|   325k|    pCtx->bUseScalingList = true;
 1489|       |
 1490|   325k|    if (!pCtx->bDequantCoeff4x4Init || (pCtx->iDequantCoeffPpsid != pCtx->pPps->iPpsId)) {
  ------------------
  |  Branch (1490:9): [True: 1.23k, False: 324k]
  |  Branch (1490:40): [True: 1.24k, False: 322k]
  ------------------
 1491|  2.48k|      int i, q, x, y;
 1492|       |      //Init dequant coeff value for different QP
 1493|  17.3k|      for (i = 0; i < 6; i++) {
  ------------------
  |  Branch (1493:19): [True: 14.8k, False: 2.48k]
  ------------------
 1494|  14.8k|        pCtx->pDequant_coeff4x4[i] = pCtx->pDequant_coeff_buffer4x4[i];
 1495|  14.8k|        pCtx->pDequant_coeff8x8[i] = pCtx->pDequant_coeff_buffer8x8[i];
 1496|   774k|        for (q = 0; q < 51; q++) {
  ------------------
  |  Branch (1496:21): [True: 759k, False: 14.8k]
  ------------------
 1497|  12.9M|          for (x = 0; x < 16; x++) {
  ------------------
  |  Branch (1497:23): [True: 12.1M, False: 759k]
  ------------------
 1498|  12.1M|            pCtx->pDequant_coeff4x4[i][q][x] = pCtx->pPps->bPicScalingMatrixPresentFlag ? pCtx->pPps->iScalingList4x4[i][x] *
  ------------------
  |  Branch (1498:48): [True: 6.91M, False: 5.23M]
  ------------------
 1499|  6.91M|                                               g_kuiDequantCoeff[q][x & 0x07] : pCtx->pSps->iScalingList4x4[i][x] * g_kuiDequantCoeff[q][x & 0x07];
 1500|  12.1M|          }
 1501|  49.3M|          for (y = 0; y < 64; y++) {
  ------------------
  |  Branch (1501:23): [True: 48.6M, False: 759k]
  ------------------
 1502|  48.6M|            pCtx->pDequant_coeff8x8[i][q][y] = pCtx->pPps->bPicScalingMatrixPresentFlag ? pCtx->pPps->iScalingList8x8[i][y] *
  ------------------
  |  Branch (1502:48): [True: 27.6M, False: 20.9M]
  ------------------
 1503|  27.6M|                                               g_kuiMatrixV[q % 6][y / 8][y % 8] : pCtx->pSps->iScalingList8x8[i][y] * g_kuiMatrixV[q % 6][y / 8][y % 8];
 1504|  48.6M|          }
 1505|   759k|        }
 1506|  14.8k|      }
 1507|  2.48k|      pCtx->bDequantCoeff4x4Init = true;
 1508|  2.48k|      pCtx->iDequantCoeffPpsid = pCtx->pPps->iPpsId;
 1509|  2.48k|    }
 1510|   325k|  } else
 1511|  2.24M|    pCtx->bUseScalingList = false;
 1512|  2.57M|  return ERR_NONE;
 1513|  2.57M|}
_ZN7WelsDec15WelsDecodeSliceEPNS_21TagWelsDecoderContextEbPNS_10TagNalUnitE:
 1515|  2.58M|int32_t WelsDecodeSlice (PWelsDecoderContext pCtx, bool bFirstSliceInLayer, PNalUnit pNalCur) {
 1516|  2.58M|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
 1517|  2.58M|  PFmo pFmo = pCtx->pFmo;
 1518|  2.58M|  int32_t iRet;
 1519|  2.58M|  int32_t iNextMbXyIndex, iSliceIdc;
 1520|       |
 1521|  2.58M|  PSlice pSlice = &pCurDqLayer->sLayerInfo.sSliceInLayer;
 1522|  2.58M|  PSliceHeaderExt pSliceHeaderExt = &pSlice->sSliceHeaderExt;
 1523|  2.58M|  PSliceHeader pSliceHeader = &pSliceHeaderExt->sSliceHeader;
 1524|  2.58M|  int32_t iMbX, iMbY;
 1525|  2.58M|  const int32_t kiCountNumMb = pSliceHeader->pSps->uiTotalMbCount; //need to be correct when fmo or multi slice
 1526|  2.58M|  uint32_t uiEosFlag = 0;
 1527|  2.58M|  PWelsDecMbFunc pDecMbFunc;
 1528|       |
 1529|  2.58M|  pSlice->iTotalMbInCurSlice = 0; //initialize at the starting of slice decoding.
 1530|       |
 1531|  2.58M|  if (pCtx->pPps->bEntropyCodingModeFlag) {
  ------------------
  |  Branch (1531:7): [True: 149k, False: 2.43M]
  ------------------
 1532|   149k|    if (pSlice->sSliceHeaderExt.bAdaptiveMotionPredFlag ||
  ------------------
  |  Branch (1532:9): [True: 215, False: 149k]
  ------------------
 1533|   149k|        pSlice->sSliceHeaderExt.bAdaptiveBaseModeFlag ||
  ------------------
  |  Branch (1533:9): [True: 200, False: 148k]
  ------------------
 1534|   148k|        pSlice->sSliceHeaderExt.bAdaptiveResidualPredFlag) {
  ------------------
  |  Branch (1534:9): [True: 221, False: 148k]
  ------------------
 1535|    636|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR,
 1536|    636|               "WelsDecodeSlice()::::ILP flag exist, not supported with CABAC enabled!");
 1537|    636|      pCtx->iErrorCode |= dsBitstreamError;
 1538|    636|      return dsBitstreamError;
 1539|    636|    }
 1540|   148k|    if (P_SLICE == pSliceHeader->eSliceType)
  ------------------
  |  Branch (1540:9): [True: 74.6k, False: 74.0k]
  ------------------
 1541|  74.6k|      pDecMbFunc = WelsDecodeMbCabacPSlice;
 1542|  74.0k|    else if (B_SLICE == pSliceHeader->eSliceType)
  ------------------
  |  Branch (1542:14): [True: 48.7k, False: 25.2k]
  ------------------
 1543|  48.7k|      pDecMbFunc = WelsDecodeMbCabacBSlice;
 1544|  25.2k|    else //I_SLICE. B_SLICE is being supported
 1545|  25.2k|      pDecMbFunc = WelsDecodeMbCabacISlice;
 1546|  2.43M|  } else {
 1547|  2.43M|    if (P_SLICE == pSliceHeader->eSliceType) {
  ------------------
  |  Branch (1547:9): [True: 2.15M, False: 281k]
  ------------------
 1548|  2.15M|      pDecMbFunc = WelsDecodeMbCavlcPSlice;
 1549|  2.15M|    } else if (B_SLICE == pSliceHeader->eSliceType) {
  ------------------
  |  Branch (1549:16): [True: 73.4k, False: 208k]
  ------------------
 1550|  73.4k|      pDecMbFunc = WelsDecodeMbCavlcBSlice;
 1551|   208k|    } else { //I_SLICE
 1552|   208k|      pDecMbFunc = WelsDecodeMbCavlcISlice;
 1553|   208k|    }
 1554|  2.43M|  }
 1555|       |
 1556|  2.58M|  if (pSliceHeader->pPps->bConstainedIntraPredFlag) {
  ------------------
  |  Branch (1556:7): [True: 2.09M, False: 483k]
  ------------------
 1557|  2.09M|    pCtx->pFillInfoCacheIntraNxNFunc = WelsFillCacheConstrain1IntraNxN;
 1558|  2.09M|    pCtx->pMapNxNNeighToSampleFunc    = WelsMapNxNNeighToSampleConstrain1;
 1559|  2.09M|    pCtx->pMap16x16NeighToSampleFunc  = WelsMap16x16NeighToSampleConstrain1;
 1560|  2.09M|  } else {
 1561|   483k|    pCtx->pFillInfoCacheIntraNxNFunc = WelsFillCacheConstrain0IntraNxN;
 1562|   483k|    pCtx->pMapNxNNeighToSampleFunc    = WelsMapNxNNeighToSampleNormal;
 1563|   483k|    pCtx->pMap16x16NeighToSampleFunc  = WelsMap16x16NeighToSampleNormal;
 1564|   483k|  }
 1565|       |
 1566|  2.58M|  pCtx->eSliceType = pSliceHeader->eSliceType;
 1567|  2.58M|  if (pCurDqLayer->sLayerInfo.pPps->bEntropyCodingModeFlag == 1) {
  ------------------
  |  Branch (1567:7): [True: 148k, False: 2.43M]
  ------------------
 1568|   148k|    int32_t iQp = pSlice->sSliceHeaderExt.sSliceHeader.iSliceQp;
 1569|   148k|    int32_t iCabacInitIdc = pSlice->sSliceHeaderExt.sSliceHeader.iCabacInitIdc;
 1570|   148k|    WelsCabacContextInit (pCtx, pSlice->eSliceType, iCabacInitIdc, iQp);
 1571|       |    //InitCabacCtx (pCtx->pCabacCtx, pSlice->eSliceType, iCabacInitIdc, iQp);
 1572|   148k|    pSlice->iLastDeltaQp = 0;
 1573|   148k|    WELS_READ_VERIFY (InitCabacDecEngineFromBS (pCtx->pCabacDecEngine, pCtx->pCurDqLayer->pBitStringAux));
  ------------------
  |  |   52|   148k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   148k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   148k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 11.4k, False: 137k]
  |  |  ------------------
  |  |   55|   148k|    return uiRetTmp; \
  |  |   56|   148k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 137k]
  |  |  ------------------
  ------------------
 1574|   148k|  }
 1575|       |  //try to calculate  the dequant_coeff
 1576|  2.57M|  WelsCalcDeqCoeffScalingList (pCtx);
 1577|       |
 1578|  2.57M|  iNextMbXyIndex = pSliceHeader->iFirstMbInSlice;
 1579|  2.57M|  iMbX = iNextMbXyIndex % pCurDqLayer->iMbWidth;
 1580|  2.57M|  iMbY = iNextMbXyIndex / pCurDqLayer->iMbWidth; // error is introduced by multiple slices case, 11/23/2009
 1581|  2.57M|  pSlice->iMbSkipRun = -1;
 1582|  2.57M|  iSliceIdc = (pSliceHeader->iFirstMbInSlice << 7) + pCurDqLayer->uiLayerDqId;
 1583|       |
 1584|  2.57M|  pCurDqLayer->iMbX =  iMbX;
 1585|  2.57M|  pCurDqLayer->iMbY = iMbY;
 1586|  2.57M|  pCurDqLayer->iMbXyIndex = iNextMbXyIndex;
 1587|       |
 1588|  17.6M|  do {
 1589|  17.6M|    if ((-1 == iNextMbXyIndex) || (iNextMbXyIndex >= kiCountNumMb)) { // slice group boundary or end of a frame
  ------------------
  |  Branch (1589:9): [True: 57.4k, False: 17.5M]
  |  Branch (1589:35): [True: 113k, False: 17.4M]
  ------------------
 1590|   170k|      break;
 1591|   170k|    }
 1592|       |
 1593|  17.4M|    pCurDqLayer->pSliceIdc[iNextMbXyIndex] = iSliceIdc;
 1594|  17.4M|    pCtx->bMbRefConcealed = false;
 1595|  17.4M|    iRet = pDecMbFunc (pCtx,  pNalCur, uiEosFlag);
 1596|  17.4M|    pCurDqLayer->pMbRefConcealedFlag[iNextMbXyIndex] = pCtx->bMbRefConcealed;
 1597|  17.4M|    if (iRet != ERR_NONE) {
  ------------------
  |  Branch (1597:9): [True: 2.37M, False: 15.0M]
  ------------------
 1598|  2.37M|      return iRet;
 1599|  2.37M|    }
 1600|       |
 1601|  15.0M|    ++pSlice->iTotalMbInCurSlice;
 1602|  15.0M|    if (uiEosFlag) { //end of slice
  ------------------
  |  Branch (1602:9): [True: 28.3k, False: 15.0M]
  ------------------
 1603|  28.3k|      break;
 1604|  28.3k|    }
 1605|  15.0M|    if (pSliceHeader->pPps->uiNumSliceGroups > 1) {
  ------------------
  |  Branch (1605:9): [True: 482k, False: 14.5M]
  ------------------
 1606|   482k|      iNextMbXyIndex = FmoNextMb (pFmo, iNextMbXyIndex);
 1607|  14.5M|    } else {
 1608|  14.5M|      ++iNextMbXyIndex;
 1609|  14.5M|    }
 1610|  15.0M|    iMbX = iNextMbXyIndex % pCurDqLayer->iMbWidth;
 1611|  15.0M|    iMbY = iNextMbXyIndex / pCurDqLayer->iMbWidth;
 1612|  15.0M|    pCurDqLayer->iMbX =  iMbX;
 1613|  15.0M|    pCurDqLayer->iMbY = iMbY;
 1614|  15.0M|    pCurDqLayer->iMbXyIndex = iNextMbXyIndex;
 1615|  15.0M|  } while (1);
  ------------------
  |  Branch (1615:12): [True: 15.0M, Folded]
  ------------------
 1616|       |
 1617|   199k|  return ERR_NONE;
 1618|  2.57M|}
_ZN7WelsDec29WelsActualDecodeMbCavlcISliceEPNS_21TagWelsDecoderContextE:
 1784|   251k|int32_t WelsActualDecodeMbCavlcISlice (PWelsDecoderContext pCtx) {
 1785|   251k|  SVlcTable* pVlcTable     = pCtx->pVlcTable;
 1786|   251k|  PDqLayer pCurDqLayer             = pCtx->pCurDqLayer;
 1787|   251k|  PBitStringAux pBs              = pCurDqLayer->pBitStringAux;
 1788|   251k|  PSlice pSlice                  = &pCurDqLayer->sLayerInfo.sSliceInLayer;
 1789|   251k|  PSliceHeader pSliceHeader      = &pSlice->sSliceHeaderExt.sSliceHeader;
 1790|       |
 1791|   251k|  SWelsNeighAvail sNeighAvail;
 1792|   251k|  int32_t iMbResProperty;
 1793|       |
 1794|   251k|  int32_t iScanIdxStart = pSlice->sSliceHeaderExt.uiScanIdxStart;
 1795|   251k|  int32_t iScanIdxEnd   = pSlice->sSliceHeaderExt.uiScanIdxEnd;
 1796|       |
 1797|   251k|  int32_t iMbX = pCurDqLayer->iMbX;
 1798|   251k|  int32_t iMbY = pCurDqLayer->iMbY;
 1799|   251k|  const int32_t iMbXy = pCurDqLayer->iMbXyIndex;
 1800|   251k|  int8_t* pNzc = pCurDqLayer->pNzc[iMbXy];
 1801|   251k|  int32_t i;
 1802|   251k|  int32_t iRet = ERR_NONE;
 1803|   251k|  uint32_t uiMbType = 0, uiCbp = 0, uiCbpL = 0, uiCbpC = 0;
 1804|   251k|  uint32_t uiCode;
 1805|   251k|  int32_t iCode;
 1806|       |
 1807|   251k|  ENFORCE_STACK_ALIGN_1D (uint8_t, pNonZeroCount, 48, 16);
  ------------------
  |  |   58|   251k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   251k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
 1808|   251k|  GetNeighborAvailMbType (&sNeighAvail, pCurDqLayer);
 1809|   251k|  pCurDqLayer->pInterPredictionDoneFlag[iMbXy] = 0;
 1810|   251k|  pCurDqLayer->pResidualPredFlag[iMbXy] = pSlice->sSliceHeaderExt.bDefaultResidualPredFlag;
 1811|       |
 1812|   251k|  pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] = true;
 1813|   251k|  pCurDqLayer->pTransformSize8x8Flag[iMbXy] = false;
 1814|       |
 1815|   251k|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //uiMbType
  ------------------
  |  |   52|   251k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   251k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   251k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.17k, False: 249k]
  |  |  ------------------
  |  |   55|   251k|    return uiRetTmp; \
  |  |   56|   251k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 249k]
  |  |  ------------------
  ------------------
 1816|   249k|  uiMbType = uiCode;
 1817|   249k|  if (uiMbType > 25)
  ------------------
  |  Branch (1817:7): [True: 1.01k, False: 248k]
  ------------------
 1818|  1.01k|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_TYPE);
  ------------------
  |  |   59|  1.01k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1819|   248k|  if (!pCtx->pSps->uiChromaFormatIdc && ((uiMbType >= 5 && uiMbType <= 12) || (uiMbType >= 17 && uiMbType <= 24)))
  ------------------
  |  Branch (1819:7): [True: 222k, False: 26.1k]
  |  Branch (1819:43): [True: 1.67k, False: 220k]
  |  Branch (1819:60): [True: 484, False: 1.18k]
  |  Branch (1819:80): [True: 486, False: 221k]
  |  Branch (1819:98): [True: 229, False: 257]
  ------------------
 1820|    713|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_TYPE);
  ------------------
  |  |   59|    713|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1821|       |
 1822|   247k|  if (25 == uiMbType) {
  ------------------
  |  Branch (1822:7): [True: 2.11k, False: 245k]
  ------------------
 1823|  2.11k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "I_PCM mode exists in I slice!");
 1824|  2.11k|    int32_t iDecStrideL = pCurDqLayer->pDec->iLinesize[0];
 1825|  2.11k|    int32_t iDecStrideC = pCurDqLayer->pDec->iLinesize[1];
 1826|       |
 1827|  2.11k|    int32_t iOffsetL = (iMbX + iMbY * iDecStrideL) << 4;
 1828|  2.11k|    int32_t iOffsetC = (iMbX + iMbY * iDecStrideC) << 3;
 1829|       |
 1830|  2.11k|    uint8_t* pDecY = pCurDqLayer->pDec->pData[0] + iOffsetL;
 1831|  2.11k|    uint8_t* pDecU = pCurDqLayer->pDec->pData[1] + iOffsetC;
 1832|  2.11k|    uint8_t* pDecV = pCurDqLayer->pDec->pData[2] + iOffsetC;
 1833|       |
 1834|  2.11k|    uint8_t* pTmpBsBuf;
 1835|       |
 1836|       |
 1837|  2.11k|    int32_t i;
 1838|  2.11k|    int32_t iCopySizeY  = (sizeof (uint8_t) << 4);
 1839|  2.11k|    int32_t iCopySizeUV = (sizeof (uint8_t) << 3);
 1840|       |
 1841|  2.11k|    int32_t iIndex = ((-pBs->iLeftBits) >> 3) + 2;
 1842|       |
 1843|  2.11k|    pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA_PCM;
  ------------------
  |  |  284|  2.11k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
 1844|       |
 1845|       |    //step 1: locating bit-stream pointer [must align into integer byte]
 1846|  2.11k|    pBs->pCurBuf -= iIndex;
 1847|       |
 1848|       |    //bounds check: I_PCM copies I_PCM_MB_SIZE_IN_BYTE (256 luma + 128 chroma) bytes
 1849|       |    //directly from the bitstream buffer; reject when fewer bytes remain to avoid
 1850|       |    //an out-of-bounds read (mirrors ParseIPCMInfoCabac).
 1851|  2.11k|    if (pBs->pEndBuf - pBs->pCurBuf < I_PCM_MB_SIZE_IN_BYTE) {
  ------------------
  |  |   42|  2.11k|#define I_PCM_MB_SIZE_IN_BYTE (16 * 16 + 2 * (8 * 8))
  ------------------
  |  Branch (1851:9): [True: 1.63k, False: 474]
  ------------------
 1852|  1.63k|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_BS_INCOMPLETE);
  ------------------
  |  |   59|  1.63k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1853|  1.63k|    }
 1854|       |
 1855|       |    //step 2: copy pixel from bit-stream into fdec [reconstruction]
 1856|    474|    pTmpBsBuf = pBs->pCurBuf;
 1857|    474|    if (!pCtx->pParam->bParseOnly) {
  ------------------
  |  Branch (1857:9): [True: 474, False: 0]
  ------------------
 1858|  8.05k|      for (i = 0; i < 16; i++) { //luma
  ------------------
  |  Branch (1858:19): [True: 7.58k, False: 474]
  ------------------
 1859|  7.58k|        memcpy (pDecY, pTmpBsBuf, iCopySizeY);
 1860|  7.58k|        pDecY += iDecStrideL;
 1861|  7.58k|        pTmpBsBuf += 16;
 1862|  7.58k|      }
 1863|  4.26k|      for (i = 0; i < 8; i++) { //cb
  ------------------
  |  Branch (1863:19): [True: 3.79k, False: 474]
  ------------------
 1864|  3.79k|        memcpy (pDecU, pTmpBsBuf, iCopySizeUV);
 1865|  3.79k|        pDecU += iDecStrideC;
 1866|  3.79k|        pTmpBsBuf += 8;
 1867|  3.79k|      }
 1868|  4.26k|      for (i = 0; i < 8; i++) { //cr
  ------------------
  |  Branch (1868:19): [True: 3.79k, False: 474]
  ------------------
 1869|  3.79k|        memcpy (pDecV, pTmpBsBuf, iCopySizeUV);
 1870|  3.79k|        pDecV += iDecStrideC;
 1871|  3.79k|        pTmpBsBuf += 8;
 1872|  3.79k|      }
 1873|    474|    }
 1874|       |
 1875|    474|    pBs->pCurBuf += I_PCM_MB_SIZE_IN_BYTE;
  ------------------
  |  |   42|    474|#define I_PCM_MB_SIZE_IN_BYTE (16 * 16 + 2 * (8 * 8))
  ------------------
 1876|       |
 1877|       |    //step 3: update QP and pNonZeroCount
 1878|    474|    pCurDqLayer->pLumaQp[iMbXy] = 0;
 1879|    474|    memset (pCurDqLayer->pChromaQp[iMbXy], 0, sizeof (pCurDqLayer->pChromaQp[iMbXy]));
 1880|    474|    memset (pNzc, 16, sizeof (pCurDqLayer->pNzc[iMbXy]));   //Rec. 9.2.1 for PCM, nzc=16
 1881|    474|    WELS_READ_VERIFY (InitReadBits (pBs, 0));
  ------------------
  |  |   52|    474|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|    474|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|    474|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 474]
  |  |  ------------------
  |  |   55|    474|    return uiRetTmp; \
  |  |   56|    474|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 474]
  |  |  ------------------
  ------------------
 1882|    474|    return ERR_NONE;
 1883|   245k|  } else if (0 == uiMbType) { //reference to JM
  ------------------
  |  Branch (1883:14): [True: 231k, False: 14.6k]
  ------------------
 1884|   231k|    ENFORCE_STACK_ALIGN_1D (int8_t, pIntraPredMode, 48, 16);
  ------------------
  |  |   58|   231k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   231k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
 1885|   231k|    pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA4x4;
  ------------------
  |  |  275|   231k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
 1886|   231k|    if (pCtx->pPps->bTransform8x8ModeFlag) {
  ------------------
  |  Branch (1886:9): [True: 75.6k, False: 155k]
  ------------------
 1887|  75.6k|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //transform_size_8x8_flag
  ------------------
  |  |   52|  75.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  75.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  75.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 202, False: 75.4k]
  |  |  ------------------
  |  |   55|  75.6k|    return uiRetTmp; \
  |  |   56|  75.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 75.4k]
  |  |  ------------------
  ------------------
 1888|  75.4k|      pCurDqLayer->pTransformSize8x8Flag[iMbXy] = !!uiCode;
 1889|  75.4k|      if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (1889:11): [True: 72.1k, False: 3.38k]
  ------------------
 1890|  72.1k|        uiMbType = pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA8x8;
  ------------------
  |  |  277|  72.1k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
 1891|  72.1k|      }
 1892|  75.4k|    }
 1893|   230k|    if (!pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (1893:9): [True: 158k, False: 72.1k]
  ------------------
 1894|   158k|      pCtx->pFillInfoCacheIntraNxNFunc (&sNeighAvail, pNonZeroCount, pIntraPredMode, pCurDqLayer);
 1895|   158k|      WELS_READ_VERIFY (ParseIntra4x4Mode (pCtx, &sNeighAvail, pIntraPredMode, pBs, pCurDqLayer));
  ------------------
  |  |   52|   158k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   158k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   158k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 147k, False: 11.6k]
  |  |  ------------------
  |  |   55|   158k|    return uiRetTmp; \
  |  |   56|   158k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 11.6k]
  |  |  ------------------
  ------------------
 1896|   158k|    } else {
 1897|  72.1k|      pCtx->pFillInfoCacheIntraNxNFunc (&sNeighAvail, pNonZeroCount, pIntraPredMode, pCurDqLayer);
 1898|  72.1k|      WELS_READ_VERIFY (ParseIntra8x8Mode (pCtx, &sNeighAvail, pIntraPredMode, pBs, pCurDqLayer));
  ------------------
  |  |   52|  72.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  72.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  72.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.73k, False: 69.3k]
  |  |  ------------------
  |  |   55|  72.1k|    return uiRetTmp; \
  |  |   56|  72.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 69.3k]
  |  |  ------------------
  ------------------
 1899|  72.1k|    }
 1900|       |
 1901|       |    //uiCbp
 1902|  81.0k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //coded_block_pattern
  ------------------
  |  |   52|  81.0k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  81.0k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  81.0k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 25.9k, False: 55.0k]
  |  |  ------------------
  |  |   55|  81.0k|    return uiRetTmp; \
  |  |   56|  81.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 55.0k]
  |  |  ------------------
  ------------------
 1903|  55.0k|    uiCbp = uiCode;
 1904|       |    //G.9.1 Alternative parsing process for coded pBlock pattern
 1905|  55.0k|    if (pCtx->pSps->uiChromaFormatIdc && (uiCbp > 47))
  ------------------
  |  Branch (1905:9): [True: 7.80k, False: 47.2k]
  |  Branch (1905:42): [True: 362, False: 7.43k]
  ------------------
 1906|    362|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_CBP);
  ------------------
  |  |   59|    362|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1907|  54.6k|    if (!pCtx->pSps->uiChromaFormatIdc && (uiCbp > 15))
  ------------------
  |  Branch (1907:9): [True: 47.2k, False: 7.43k]
  |  Branch (1907:43): [True: 1.08k, False: 46.1k]
  ------------------
 1908|  1.08k|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_CBP);
  ------------------
  |  |   59|  1.08k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1909|       |
 1910|  53.6k|    if (pCtx->pSps->uiChromaFormatIdc)
  ------------------
  |  Branch (1910:9): [True: 7.43k, False: 46.1k]
  ------------------
 1911|  7.43k|      uiCbp = g_kuiIntra4x4CbpTable[uiCbp];
 1912|  46.1k|    else
 1913|  46.1k|      uiCbp = g_kuiIntra4x4CbpTable400[uiCbp];
 1914|  53.6k|    pCurDqLayer->pCbp[iMbXy] = uiCbp;
 1915|  53.6k|    uiCbpC = uiCbp >> 4;
 1916|  53.6k|    uiCbpL = uiCbp & 15;
 1917|  53.6k|  } else { //I_PCM exclude, we can ignore it
 1918|  14.6k|    pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA16x16;
  ------------------
  |  |  276|  14.6k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
 1919|  14.6k|    pCurDqLayer->pTransformSize8x8Flag[iMbXy] = false;
 1920|  14.6k|    pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] = true;
 1921|  14.6k|    pCurDqLayer->pIntraPredMode[iMbXy][7] = (uiMbType - 1) & 3;
 1922|  14.6k|    pCurDqLayer->pCbp[iMbXy] = g_kuiI16CbpTable[ (uiMbType - 1) >> 2];
 1923|  14.6k|    uiCbpC = pCtx->pSps->uiChromaFormatIdc ? pCurDqLayer->pCbp[iMbXy] >> 4 : 0;
  ------------------
  |  Branch (1923:14): [True: 9.49k, False: 5.17k]
  ------------------
 1924|  14.6k|    uiCbpL = pCurDqLayer->pCbp[iMbXy] & 15;
 1925|  14.6k|    WelsFillCacheNonZeroCount (&sNeighAvail, pNonZeroCount, pCurDqLayer);
 1926|  14.6k|    WELS_READ_VERIFY (ParseIntra16x16Mode (pCtx, &sNeighAvail, pBs, pCurDqLayer));
  ------------------
  |  |   52|  14.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  14.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  14.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 4.29k, False: 10.3k]
  |  |  ------------------
  |  |   55|  14.6k|    return uiRetTmp; \
  |  |   56|  14.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 10.3k]
  |  |  ------------------
  ------------------
 1927|  14.6k|  }
 1928|       |
 1929|  63.9k|  ST32A4 (&pNzc[0], 0);
  ------------------
  |  |   80|  63.9k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  63.9k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 1930|  63.9k|  ST32A4 (&pNzc[4], 0);
  ------------------
  |  |   80|  63.9k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  63.9k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 1931|  63.9k|  ST32A4 (&pNzc[8], 0);
  ------------------
  |  |   80|  63.9k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  63.9k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 1932|  63.9k|  ST32A4 (&pNzc[12], 0);
  ------------------
  |  |   80|  63.9k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  63.9k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 1933|  63.9k|  ST32A4 (&pNzc[16], 0);
  ------------------
  |  |   80|  63.9k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  63.9k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 1934|  63.9k|  ST32A4 (&pNzc[20], 0);
  ------------------
  |  |   80|  63.9k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  63.9k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 1935|       |
 1936|  63.9k|  if (pCurDqLayer->pCbp[iMbXy] == 0 && IS_INTRANxN (pCurDqLayer->pDec->pMbType[iMbXy])) {
  ------------------
  |  |  303|  42.8k|#define IS_INTRANxN(type) ( MB_TYPE_INTRA4x4 == (type) || MB_TYPE_INTRA8x8 == (type) )
  |  |  ------------------
  |  |  |  |  275|  42.8k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  ------------------
  |  |               #define IS_INTRANxN(type) ( MB_TYPE_INTRA4x4 == (type) || MB_TYPE_INTRA8x8 == (type) )
  |  |  ------------------
  |  |  |  |  277|  42.1k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  ------------------
  |  |  |  Branch (303:29): [True: 700, False: 42.1k]
  |  |  |  Branch (303:59): [True: 34.2k, False: 7.93k]
  |  |  ------------------
  ------------------
  |  Branch (1936:7): [True: 42.8k, False: 21.0k]
  ------------------
 1937|  34.9k|    pCurDqLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp;
 1938|   104k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1938:17): [True: 69.9k, False: 34.9k]
  ------------------
 1939|  69.9k|      pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 (pCurDqLayer->pLumaQp[iMbXy] +
  ------------------
  |  |  204|  69.9k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 379, False: 69.5k]
  |  |  |  Branch (204:55): [True: 211, False: 69.3k]
  |  |  ------------------
  ------------------
 1940|  69.9k|                                         pSliceHeader->pPps->iChromaQpIndexOffset[i], 0, 51)];
 1941|  69.9k|    }
 1942|       |
 1943|  34.9k|  }
 1944|       |
 1945|  63.9k|  if (pCurDqLayer->pCbp[iMbXy] || MB_TYPE_INTRA16x16 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|  42.8k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (1945:7): [True: 21.0k, False: 42.8k]
  |  Branch (1945:35): [True: 7.93k, False: 34.9k]
  ------------------
 1946|  29.0k|    memset (pCurDqLayer->pScaledTCoeff[iMbXy], 0, 384 * sizeof (pCurDqLayer->pScaledTCoeff[iMbXy][0]));
 1947|  29.0k|    int32_t iQpDelta, iId8x8, iId4x4;
 1948|       |
 1949|  29.0k|    WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mb_qp_delta
  ------------------
  |  |   52|  29.0k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  29.0k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  29.0k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 337, False: 28.6k]
  |  |  ------------------
  |  |   55|  29.0k|    return uiRetTmp; \
  |  |   56|  29.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 28.6k]
  |  |  ------------------
  ------------------
 1950|  28.6k|    iQpDelta = iCode;
 1951|       |
 1952|  28.6k|    if (iQpDelta > 25 || iQpDelta < -26) { //out of iQpDelta range
  ------------------
  |  Branch (1952:9): [True: 237, False: 28.4k]
  |  Branch (1952:26): [True: 242, False: 28.2k]
  ------------------
 1953|    479|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_QP);
  ------------------
  |  |   59|    479|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1954|    479|    }
 1955|       |
 1956|  28.2k|    pCurDqLayer->pLumaQp[iMbXy] = (pSlice->iLastMbQp + iQpDelta + 52) % 52; //update last_mb_qp
 1957|  28.2k|    pSlice->iLastMbQp = pCurDqLayer->pLumaQp[iMbXy];
 1958|  84.6k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1958:17): [True: 56.4k, False: 28.2k]
  ------------------
 1959|  56.4k|      pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 (pSlice->iLastMbQp +
  ------------------
  |  |  204|  56.4k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 2.05k, False: 54.3k]
  |  |  |  Branch (204:55): [True: 1.11k, False: 53.2k]
  |  |  ------------------
  ------------------
 1960|  56.4k|                                         pSliceHeader->pPps->iChromaQpIndexOffset[i], 0,
 1961|  56.4k|                                         51)];
 1962|  56.4k|    }
 1963|       |
 1964|       |
 1965|  28.2k|    BsStartCavlc (pBs);
 1966|       |
 1967|  28.2k|    if (MB_TYPE_INTRA16x16 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|  28.2k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (1967:9): [True: 10.3k, False: 17.8k]
  ------------------
 1968|       |      //step1: Luma DC
 1969|  10.3k|      if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, 0, 16, g_kuiLumaDcZigzagScan, I16_LUMA_DC,
  ------------------
  |  |   70|  10.3k|#define I16_LUMA_DC  1
  ------------------
  |  Branch (1969:11): [True: 1.31k, False: 9.00k]
  ------------------
 1970|  10.3k|                                          pCurDqLayer->pScaledTCoeff[iMbXy], pCurDqLayer->pLumaQp[iMbXy], pCtx)) != ERR_NONE) {
 1971|  1.31k|        return iRet;//abnormal
 1972|  1.31k|      }
 1973|       |      //step2: Luma AC
 1974|  9.00k|      if (uiCbpL) {
  ------------------
  |  Branch (1974:11): [True: 538, False: 8.47k]
  ------------------
 1975|  4.79k|        for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (1975:21): [True: 4.53k, False: 261]
  ------------------
 1976|  4.53k|          if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, i, iScanIdxEnd - WELS_MAX (iScanIdxStart, 1) + 1,
  ------------------
  |  |   91|  4.53k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 0, False: 4.53k]
  |  |  ------------------
  ------------------
  |  Branch (1976:15): [True: 277, False: 4.26k]
  ------------------
 1977|  4.53k|                                              g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1), I16_LUMA_AC, pCurDqLayer->pScaledTCoeff[iMbXy] + (i << 4),
  ------------------
  |  |   91|  4.53k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 0, False: 4.53k]
  |  |  ------------------
  ------------------
                                                            g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1), I16_LUMA_AC, pCurDqLayer->pScaledTCoeff[iMbXy] + (i << 4),
  ------------------
  |  |   71|  4.53k|#define I16_LUMA_AC  2
  ------------------
 1978|  4.53k|                                              pCurDqLayer->pLumaQp[iMbXy], pCtx)) != ERR_NONE) {
 1979|    277|            return iRet;//abnormal
 1980|    277|          }
 1981|  4.53k|        }
 1982|    261|        ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   80|    261|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    261|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 1983|    261|        ST32A4 (&pNzc[4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   80|    261|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    261|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 1984|    261|        ST32A4 (&pNzc[8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   80|    261|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    261|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 1985|    261|        ST32A4 (&pNzc[12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   80|    261|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    261|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 1986|    261|      }
 1987|  17.8k|    } else { //non-MB_TYPE_INTRA16x16
 1988|  17.8k|      if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (1988:11): [True: 7.04k, False: 10.8k]
  ------------------
 1989|  25.6k|        for (iId8x8 = 0; iId8x8 < 4; iId8x8++) {
  ------------------
  |  Branch (1989:26): [True: 21.5k, False: 4.10k]
  ------------------
 1990|  21.5k|          iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA_8 : LUMA_DC_AC_INTER_8;
  ------------------
  |  |  305|  21.5k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  21.5k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  21.5k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  21.5k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  21.5k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  21.5k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                        iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA_8 : LUMA_DC_AC_INTER_8;
  ------------------
  |  |   86|  21.5k|#define LUMA_DC_AC_INTRA_8  17
  ------------------
                        iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA_8 : LUMA_DC_AC_INTER_8;
  ------------------
  |  |   87|  21.5k|#define LUMA_DC_AC_INTER_8  18
  ------------------
  |  Branch (1990:28): [True: 21.5k, False: 0]
  ------------------
 1991|  21.5k|          if (uiCbpL & (1 << iId8x8)) {
  ------------------
  |  Branch (1991:15): [True: 20.6k, False: 814]
  ------------------
 1992|  20.6k|            int32_t iIndex = (iId8x8 << 2);
 1993|  98.1k|            for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (1993:30): [True: 80.4k, False: 17.7k]
  ------------------
 1994|  80.4k|              if ((iRet = WelsResidualBlockCavlc8x8 (pVlcTable, pNonZeroCount, pBs, iIndex, iScanIdxEnd - iScanIdxStart + 1,
  ------------------
  |  Branch (1994:19): [True: 2.93k, False: 77.4k]
  ------------------
 1995|  80.4k|                                                     g_kuiZigzagScan8x8 + iScanIdxStart, iMbResProperty, pCurDqLayer->pScaledTCoeff[iMbXy] + (iId8x8 << 6), iId4x4,
 1996|  80.4k|                                                     pCurDqLayer->pLumaQp[iMbXy], pCtx)) != ERR_NONE) {
 1997|  2.93k|                return iRet;
 1998|  2.93k|              }
 1999|  77.4k|              iIndex++;
 2000|  77.4k|            }
 2001|  20.6k|          } else {
 2002|    814|            ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[iId8x8 << 2]], 0);
  ------------------
  |  |   66|    814|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 2003|    814|            ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[ (iId8x8 << 2) + 2]], 0);
  ------------------
  |  |   66|    814|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 2004|    814|          }
 2005|  21.5k|        }
 2006|  4.10k|        ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   80|  4.10k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  4.10k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2007|  4.10k|        ST32A4 (&pNzc[4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   80|  4.10k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  4.10k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2008|  4.10k|        ST32A4 (&pNzc[8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   80|  4.10k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  4.10k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2009|  4.10k|        ST32A4 (&pNzc[12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   80|  4.10k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  4.10k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2010|  10.8k|      } else {
 2011|  52.1k|        for (iId8x8 = 0; iId8x8 < 4; iId8x8++) {
  ------------------
  |  Branch (2011:26): [True: 41.9k, False: 10.2k]
  ------------------
 2012|  41.9k|          if (uiCbpL & (1 << iId8x8)) {
  ------------------
  |  Branch (2012:15): [True: 34.9k, False: 6.96k]
  ------------------
 2013|  34.9k|            int32_t iIndex = (iId8x8 << 2);
 2014|   173k|            for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (2014:30): [True: 139k, False: 34.3k]
  ------------------
 2015|       |              //Luma (DC and AC decoding together)
 2016|   139k|              if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, iIndex, iScanIdxEnd - iScanIdxStart + 1,
  ------------------
  |  Branch (2016:19): [True: 632, False: 138k]
  ------------------
 2017|   139k|                                                  g_kuiZigzagScan + iScanIdxStart, LUMA_DC_AC_INTRA, pCurDqLayer->pScaledTCoeff[iMbXy] + (iIndex << 4),
  ------------------
  |  |   80|   139k|#define LUMA_DC_AC_INTRA 11
  ------------------
 2018|   139k|                                                  pCurDqLayer->pLumaQp[iMbXy], pCtx)) != ERR_NONE) {
 2019|    632|                return iRet;//abnormal
 2020|    632|              }
 2021|   138k|              iIndex++;
 2022|   138k|            }
 2023|  34.9k|          } else {
 2024|  6.96k|            ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[ (iId8x8 << 2)]], 0);
  ------------------
  |  |   66|  6.96k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 2025|  6.96k|            ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[ (iId8x8 << 2) + 2]], 0);
  ------------------
  |  |   66|  6.96k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 2026|  6.96k|          }
 2027|  41.9k|        }
 2028|  10.2k|        ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   80|  10.2k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  10.2k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2029|  10.2k|        ST32A4 (&pNzc[4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   80|  10.2k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  10.2k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2030|  10.2k|        ST32A4 (&pNzc[8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   80|  10.2k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  10.2k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2031|  10.2k|        ST32A4 (&pNzc[12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   80|  10.2k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  10.2k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2032|  10.2k|      }
 2033|  17.8k|    }
 2034|       |
 2035|       |    //chroma
 2036|       |    //step1: DC
 2037|  23.0k|    if (1 == uiCbpC || 2 == uiCbpC) {
  ------------------
  |  Branch (2037:9): [True: 1.23k, False: 21.8k]
  |  Branch (2037:24): [True: 3.76k, False: 18.0k]
  ------------------
 2038|  13.5k|      for (i = 0; i < 2; i++) { //Cb Cr
  ------------------
  |  Branch (2038:19): [True: 9.26k, False: 4.23k]
  ------------------
 2039|  9.26k|        iMbResProperty = i ? CHROMA_DC_V : CHROMA_DC_U;
  ------------------
  |  |   77|  4.26k|#define CHROMA_DC_V  8
  ------------------
                      iMbResProperty = i ? CHROMA_DC_V : CHROMA_DC_U;
  ------------------
  |  |   76|  14.2k|#define CHROMA_DC_U  7
  ------------------
  |  Branch (2039:26): [True: 4.26k, False: 4.99k]
  ------------------
 2040|  9.26k|        if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, 16 + (i << 2), 4, g_kuiChromaDcScan, iMbResProperty,
  ------------------
  |  Branch (2040:13): [True: 760, False: 8.50k]
  ------------------
 2041|  9.26k|                                            pCurDqLayer->pScaledTCoeff[iMbXy] + 256 + (i << 6), pCurDqLayer->pChromaQp[iMbXy][i], pCtx)) != ERR_NONE) {
 2042|    760|          return iRet;//abnormal
 2043|    760|        }
 2044|  9.26k|      }
 2045|  4.99k|    }
 2046|       |
 2047|       |    //step2: AC
 2048|  22.2k|    if (2 == uiCbpC) {
  ------------------
  |  Branch (2048:9): [True: 3.02k, False: 19.2k]
  ------------------
 2049|  8.54k|      for (i = 0; i < 2; i++) { //Cb Cr
  ------------------
  |  Branch (2049:19): [True: 5.79k, False: 2.75k]
  ------------------
 2050|  5.79k|        iMbResProperty = i ? CHROMA_AC_V : CHROMA_AC_U;
  ------------------
  |  |   79|  2.77k|#define CHROMA_AC_V  10
  ------------------
                      iMbResProperty = i ? CHROMA_AC_V : CHROMA_AC_U;
  ------------------
  |  |   78|  8.81k|#define CHROMA_AC_U  9
  ------------------
  |  Branch (2050:26): [True: 2.77k, False: 3.02k]
  ------------------
 2051|  5.79k|        int32_t iIndex = 16 + (i << 2);
 2052|  28.0k|        for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (2052:26): [True: 22.5k, False: 5.52k]
  ------------------
 2053|  22.5k|          if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, iIndex, iScanIdxEnd - WELS_MAX (iScanIdxStart,
  ------------------
  |  |   91|  22.5k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 0, False: 22.5k]
  |  |  ------------------
  ------------------
  |  Branch (2053:15): [True: 270, False: 22.2k]
  ------------------
 2054|  22.5k|                                              1) + 1, g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1), iMbResProperty,
  ------------------
  |  |   91|  22.5k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 0, False: 22.5k]
  |  |  ------------------
  ------------------
 2055|  22.5k|                                              pCurDqLayer->pScaledTCoeff[iMbXy] + (iIndex << 4),
 2056|  22.5k|                                              pCurDqLayer->pChromaQp[iMbXy][i], pCtx)) != ERR_NONE) {
 2057|    270|            return iRet;//abnormal
 2058|    270|          }
 2059|  22.2k|          iIndex++;
 2060|  22.2k|        }
 2061|  5.79k|      }
 2062|  2.75k|      ST16A2 (&pNzc[16], LD16A2 (&pNonZeroCount[6 + 8 * 1]));
  ------------------
  |  |   78|  2.75k|#define ST16A2(a, b) STA(a, b, 16, 2)
  |  |  ------------------
  |  |  |  |   71|  2.75k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2063|  2.75k|      ST16A2 (&pNzc[20], LD16A2 (&pNonZeroCount[6 + 8 * 2]));
  ------------------
  |  |   78|  2.75k|#define ST16A2(a, b) STA(a, b, 16, 2)
  |  |  ------------------
  |  |  |  |   71|  2.75k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2064|  2.75k|      ST16A2 (&pNzc[18], LD16A2 (&pNonZeroCount[6 + 8 * 4]));
  ------------------
  |  |   78|  2.75k|#define ST16A2(a, b) STA(a, b, 16, 2)
  |  |  ------------------
  |  |  |  |   71|  2.75k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2065|  2.75k|      ST16A2 (&pNzc[22], LD16A2 (&pNonZeroCount[6 + 8 * 5]));
  ------------------
  |  |   78|  2.75k|#define ST16A2(a, b) STA(a, b, 16, 2)
  |  |  ------------------
  |  |  |  |   71|  2.75k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2066|  2.75k|    }
 2067|  22.0k|    BsEndCavlc (pBs);
 2068|  22.0k|  }
 2069|       |
 2070|  56.9k|  return ERR_NONE;
 2071|  63.9k|}
_ZN7WelsDec23WelsDecodeMbCavlcISliceEPNS_21TagWelsDecoderContextEPNS_10TagNalUnitERj:
 2073|   252k|int32_t WelsDecodeMbCavlcISlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uint32_t& uiEosFlag) {
 2074|   252k|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
 2075|   252k|  PBitStringAux pBs = pCurDqLayer->pBitStringAux;
 2076|   252k|  PSliceHeaderExt pSliceHeaderExt = &pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt;
 2077|   252k|  int32_t iBaseModeFlag;
 2078|   252k|  int32_t iRet = 0; //should have the return value to indicate decoding error or not, It's NECESSARY--2010.4.15
 2079|   252k|  uint32_t uiCode;
 2080|   252k|  intX_t iUsedBits;
 2081|   252k|  if (pSliceHeaderExt->bAdaptiveBaseModeFlag == 1) {
  ------------------
  |  Branch (2081:7): [True: 1.66k, False: 250k]
  ------------------
 2082|  1.66k|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //base_mode_flag
  ------------------
  |  |   52|  1.66k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.66k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.66k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 252, False: 1.40k]
  |  |  ------------------
  |  |   55|  1.66k|    return uiRetTmp; \
  |  |   56|  1.66k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.40k]
  |  |  ------------------
  ------------------
 2083|  1.40k|    iBaseModeFlag = uiCode;
 2084|   250k|  } else {
 2085|   250k|    iBaseModeFlag = pSliceHeaderExt->bDefaultBaseModeFlag;
 2086|   250k|  }
 2087|   252k|  if (!iBaseModeFlag) {
  ------------------
  |  Branch (2087:7): [True: 251k, False: 457]
  ------------------
 2088|   251k|    iRet = WelsActualDecodeMbCavlcISlice (pCtx);
 2089|   251k|  } else {
 2090|    457|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "iBaseModeFlag (%d) != 0, inter-layer prediction not supported.",
 2091|    457|             iBaseModeFlag);
 2092|    457|    return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_ILP);
  ------------------
  |  |   59|    457|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2093|    457|  }
 2094|   251k|  if (iRet) { //occur error when parsing, MUST STOP decoding
  ------------------
  |  Branch (2094:7): [True: 194k, False: 57.4k]
  ------------------
 2095|   194k|    return iRet;
 2096|   194k|  }
 2097|       |
 2098|       |  // check whether there is left bits to read next time in case multiple slices
 2099|  57.4k|  iUsedBits = ((pBs->pCurBuf - pBs->pStartBuf) << 3) - (16 - pBs->iLeftBits);
 2100|       |  // sub 1, for stop bit
 2101|  57.4k|  if ((iUsedBits == (pBs->iBits - 1)) && (0 >= pCurDqLayer->sLayerInfo.sSliceInLayer.iMbSkipRun)) { // slice boundary
  ------------------
  |  Branch (2101:7): [True: 770, False: 56.6k]
  |  Branch (2101:42): [True: 770, False: 0]
  ------------------
 2102|    770|    uiEosFlag = 1;
 2103|    770|  }
 2104|  57.4k|  if (iUsedBits > (pBs->iBits -
  ------------------
  |  Branch (2104:7): [True: 10.6k, False: 46.8k]
  ------------------
 2105|  57.4k|                   1)) { //When BS incomplete, as long as find it, SHOULD stop decoding to avoid mosaic or crash.
 2106|  10.6k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
 2107|  10.6k|             "WelsDecodeMbCavlcISlice()::::pBs incomplete, iUsedBits:%" PRId64 " > pBs->iBits:%d, MUST stop decoding.",
 2108|  10.6k|             (int64_t) iUsedBits, pBs->iBits);
 2109|  10.6k|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_BS_INCOMPLETE);
  ------------------
  |  |   59|  10.6k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2110|  10.6k|  }
 2111|  46.8k|  return ERR_NONE;
 2112|  57.4k|}
_ZN7WelsDec29WelsActualDecodeMbCavlcPSliceEPNS_21TagWelsDecoderContextE:
 2114|  2.07M|int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) {
 2115|  2.07M|  SVlcTable* pVlcTable     = pCtx->pVlcTable;
 2116|  2.07M|  PDqLayer pCurDqLayer             = pCtx->pCurDqLayer;
 2117|  2.07M|  PBitStringAux pBs              = pCurDqLayer->pBitStringAux;
 2118|  2.07M|  PSlice pSlice                  = &pCurDqLayer->sLayerInfo.sSliceInLayer;
 2119|  2.07M|  PSliceHeader pSliceHeader      = &pSlice->sSliceHeaderExt.sSliceHeader;
 2120|       |
 2121|  2.07M|  int32_t iScanIdxStart = pSlice->sSliceHeaderExt.uiScanIdxStart;
 2122|  2.07M|  int32_t iScanIdxEnd   = pSlice->sSliceHeaderExt.uiScanIdxEnd;
 2123|       |
 2124|  2.07M|  SWelsNeighAvail sNeighAvail;
 2125|  2.07M|  int32_t iMbX = pCurDqLayer->iMbX;
 2126|  2.07M|  int32_t iMbY = pCurDqLayer->iMbY;
 2127|  2.07M|  const int32_t iMbXy = pCurDqLayer->iMbXyIndex;
 2128|  2.07M|  int8_t* pNzc = pCurDqLayer->pNzc[iMbXy];
 2129|  2.07M|  int32_t i;
 2130|  2.07M|  int32_t iRet = ERR_NONE;
 2131|  2.07M|  uint32_t uiMbType = 0, uiCbp = 0, uiCbpL = 0, uiCbpC = 0;
 2132|  2.07M|  uint32_t uiCode;
 2133|  2.07M|  int32_t iCode;
 2134|  2.07M|  int32_t iMbResProperty;
 2135|       |
 2136|  2.07M|  GetNeighborAvailMbType (&sNeighAvail, pCurDqLayer);
 2137|  2.07M|  ENFORCE_STACK_ALIGN_1D (uint8_t, pNonZeroCount, 48, 16);
  ------------------
  |  |   58|  2.07M|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|  2.07M|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
 2138|  2.07M|  pCurDqLayer->pInterPredictionDoneFlag[iMbXy] = 0;//2009.10.23
 2139|  2.07M|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //uiMbType
  ------------------
  |  |   52|  2.07M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.07M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.07M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 67.8k, False: 2.00M]
  |  |  ------------------
  |  |   55|  2.07M|    return uiRetTmp; \
  |  |   56|  2.07M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.00M]
  |  |  ------------------
  ------------------
 2140|  2.00M|  uiMbType = uiCode;
 2141|  2.00M|  if (uiMbType < 5) { //inter MB type
  ------------------
  |  Branch (2141:7): [True: 1.98M, False: 16.9k]
  ------------------
 2142|  1.98M|    int16_t iMotionVector[LIST_A][30][MV_A];
 2143|  1.98M|    int8_t  iRefIndex[LIST_A][30];
 2144|  1.98M|    pCurDqLayer->pDec->pMbType[iMbXy] = g_ksInterPMbTypeInfo[uiMbType].iType;
 2145|  1.98M|    WelsFillCacheInter (&sNeighAvail, pNonZeroCount, iMotionVector, iRefIndex, pCurDqLayer);
 2146|       |
 2147|  1.98M|    if ((iRet = ParseInterInfo (pCtx, iMotionVector, iRefIndex, pBs)) != ERR_NONE) {
  ------------------
  |  Branch (2147:9): [True: 1.30M, False: 682k]
  ------------------
 2148|  1.30M|      return iRet;//abnormal
 2149|  1.30M|    }
 2150|       |
 2151|   682k|    if (pSlice->sSliceHeaderExt.bAdaptiveResidualPredFlag == 1) {
  ------------------
  |  Branch (2151:9): [True: 2.85k, False: 679k]
  ------------------
 2152|  2.85k|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //residual_prediction_flag
  ------------------
  |  |   52|  2.85k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.85k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.85k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 372, False: 2.48k]
  |  |  ------------------
  |  |   55|  2.85k|    return uiRetTmp; \
  |  |   56|  2.85k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.48k]
  |  |  ------------------
  ------------------
 2153|  2.48k|      pCurDqLayer->pResidualPredFlag[iMbXy] =  uiCode;
 2154|   679k|    } else {
 2155|   679k|      pCurDqLayer->pResidualPredFlag[iMbXy] = pSlice->sSliceHeaderExt.bDefaultResidualPredFlag;
 2156|   679k|    }
 2157|       |
 2158|   682k|    if (pCurDqLayer->pResidualPredFlag[iMbXy] == 0) {
  ------------------
  |  Branch (2158:9): [True: 681k, False: 298]
  ------------------
 2159|   681k|      pCurDqLayer->pInterPredictionDoneFlag[iMbXy] = 0;
 2160|   681k|    } else {
 2161|    298|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "residual_pred_flag = 1 not supported.");
 2162|    298|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_UNSUPPORTED_ILP);
  ------------------
  |  |   59|    298|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2163|    298|    }
 2164|   682k|  } else { //intra MB type
 2165|  16.9k|    uiMbType -= 5;
 2166|  16.9k|    if (uiMbType > 25)
  ------------------
  |  Branch (2166:9): [True: 2.26k, False: 14.6k]
  ------------------
 2167|  2.26k|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_TYPE);
  ------------------
  |  |   59|  2.26k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2168|  14.6k|    if (!pCtx->pSps->uiChromaFormatIdc && ((uiMbType >= 5 && uiMbType <= 12) || (uiMbType >= 17 && uiMbType <= 24)))
  ------------------
  |  Branch (2168:9): [True: 5.37k, False: 9.26k]
  |  Branch (2168:45): [True: 2.06k, False: 3.30k]
  |  Branch (2168:62): [True: 359, False: 1.71k]
  |  Branch (2168:82): [True: 1.68k, False: 3.33k]
  |  Branch (2168:100): [True: 287, False: 1.39k]
  ------------------
 2169|    646|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_TYPE);
  ------------------
  |  |   59|    646|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2170|       |
 2171|  13.9k|    if (25 == uiMbType) {
  ------------------
  |  Branch (2171:9): [True: 1.64k, False: 12.3k]
  ------------------
 2172|  1.64k|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "I_PCM mode exists in P slice!");
 2173|  1.64k|      int32_t iDecStrideL = pCurDqLayer->pDec->iLinesize[0];
 2174|  1.64k|      int32_t iDecStrideC = pCurDqLayer->pDec->iLinesize[1];
 2175|       |
 2176|  1.64k|      int32_t iOffsetL = (iMbX + iMbY * iDecStrideL) << 4;
 2177|  1.64k|      int32_t iOffsetC = (iMbX + iMbY * iDecStrideC) << 3;
 2178|       |
 2179|  1.64k|      uint8_t* pDecY = pCurDqLayer->pDec->pData[0] + iOffsetL;
 2180|  1.64k|      uint8_t* pDecU = pCurDqLayer->pDec->pData[1] + iOffsetC;
 2181|  1.64k|      uint8_t* pDecV = pCurDqLayer->pDec->pData[2] + iOffsetC;
 2182|       |
 2183|  1.64k|      uint8_t* pTmpBsBuf;
 2184|       |
 2185|  1.64k|      int32_t i;
 2186|  1.64k|      int32_t iCopySizeY  = (sizeof (uint8_t) << 4);
 2187|  1.64k|      int32_t iCopySizeUV = (sizeof (uint8_t) << 3);
 2188|       |
 2189|  1.64k|      int32_t iIndex = ((-pBs->iLeftBits) >> 3) + 2;
 2190|       |
 2191|  1.64k|      pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA_PCM;
  ------------------
  |  |  284|  1.64k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
 2192|       |
 2193|       |      //step 1: locating bit-stream pointer [must align into integer byte]
 2194|  1.64k|      pBs->pCurBuf -= iIndex;
 2195|       |
 2196|       |      //bounds check: I_PCM copies I_PCM_MB_SIZE_IN_BYTE (256 luma + 128 chroma) bytes
 2197|       |      //directly from the bitstream buffer; reject when fewer bytes remain to avoid
 2198|       |      //an out-of-bounds read (mirrors ParseIPCMInfoCabac).
 2199|  1.64k|      if (pBs->pEndBuf - pBs->pCurBuf < I_PCM_MB_SIZE_IN_BYTE) {
  ------------------
  |  |   42|  1.64k|#define I_PCM_MB_SIZE_IN_BYTE (16 * 16 + 2 * (8 * 8))
  ------------------
  |  Branch (2199:11): [True: 1.45k, False: 199]
  ------------------
 2200|  1.45k|        return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_BS_INCOMPLETE);
  ------------------
  |  |   59|  1.45k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2201|  1.45k|      }
 2202|       |
 2203|       |      //step 2: copy pixel from bit-stream into fdec [reconstruction]
 2204|    199|      pTmpBsBuf = pBs->pCurBuf;
 2205|    199|      if (!pCtx->pParam->bParseOnly) {
  ------------------
  |  Branch (2205:11): [True: 199, False: 0]
  ------------------
 2206|  3.38k|        for (i = 0; i < 16; i++) { //luma
  ------------------
  |  Branch (2206:21): [True: 3.18k, False: 199]
  ------------------
 2207|  3.18k|          memcpy (pDecY, pTmpBsBuf, iCopySizeY);
 2208|  3.18k|          pDecY += iDecStrideL;
 2209|  3.18k|          pTmpBsBuf += 16;
 2210|  3.18k|        }
 2211|       |
 2212|  1.79k|        for (i = 0; i < 8; i++) { //cb
  ------------------
  |  Branch (2212:21): [True: 1.59k, False: 199]
  ------------------
 2213|  1.59k|          memcpy (pDecU, pTmpBsBuf, iCopySizeUV);
 2214|  1.59k|          pDecU += iDecStrideC;
 2215|  1.59k|          pTmpBsBuf += 8;
 2216|  1.59k|        }
 2217|  1.79k|        for (i = 0; i < 8; i++) { //cr
  ------------------
  |  Branch (2217:21): [True: 1.59k, False: 199]
  ------------------
 2218|  1.59k|          memcpy (pDecV, pTmpBsBuf, iCopySizeUV);
 2219|  1.59k|          pDecV += iDecStrideC;
 2220|  1.59k|          pTmpBsBuf += 8;
 2221|  1.59k|        }
 2222|    199|      }
 2223|       |
 2224|    199|      pBs->pCurBuf += I_PCM_MB_SIZE_IN_BYTE;
  ------------------
  |  |   42|    199|#define I_PCM_MB_SIZE_IN_BYTE (16 * 16 + 2 * (8 * 8))
  ------------------
 2225|       |
 2226|       |      //step 3: update QP and pNonZeroCount
 2227|    199|      pCurDqLayer->pLumaQp[iMbXy] = 0;
 2228|    199|      pCurDqLayer->pChromaQp[iMbXy][0] = pCurDqLayer->pChromaQp[iMbXy][1] = 0;
 2229|       |      //Rec. 9.2.1 for PCM, nzc=16
 2230|    199|      ST32A4 (&pNzc[0], 0x10101010);
  ------------------
  |  |   80|    199|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    199|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2231|    199|      ST32A4 (&pNzc[4], 0x10101010);
  ------------------
  |  |   80|    199|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    199|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2232|    199|      ST32A4 (&pNzc[8], 0x10101010);
  ------------------
  |  |   80|    199|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    199|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2233|    199|      ST32A4 (&pNzc[12], 0x10101010);
  ------------------
  |  |   80|    199|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    199|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2234|    199|      ST32A4 (&pNzc[16], 0x10101010);
  ------------------
  |  |   80|    199|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    199|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2235|    199|      ST32A4 (&pNzc[20], 0x10101010);
  ------------------
  |  |   80|    199|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    199|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2236|    199|      WELS_READ_VERIFY (InitReadBits (pBs, 0));
  ------------------
  |  |   52|    199|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|    199|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|    199|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 199]
  |  |  ------------------
  |  |   55|    199|    return uiRetTmp; \
  |  |   56|    199|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 199]
  |  |  ------------------
  ------------------
 2237|    199|      return ERR_NONE;
 2238|  12.3k|    } else {
 2239|  12.3k|      if (0 == uiMbType) {
  ------------------
  |  Branch (2239:11): [True: 4.58k, False: 7.76k]
  ------------------
 2240|  4.58k|        ENFORCE_STACK_ALIGN_1D (int8_t, pIntraPredMode, 48, 16);
  ------------------
  |  |   58|  4.58k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|  4.58k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
 2241|  4.58k|        pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA4x4;
  ------------------
  |  |  275|  4.58k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
 2242|  4.58k|        if (pCtx->pPps->bTransform8x8ModeFlag) {
  ------------------
  |  Branch (2242:13): [True: 3.54k, False: 1.04k]
  ------------------
 2243|  3.54k|          WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //transform_size_8x8_flag
  ------------------
  |  |   52|  3.54k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.54k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.54k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 207, False: 3.33k]
  |  |  ------------------
  |  |   55|  3.54k|    return uiRetTmp; \
  |  |   56|  3.54k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.33k]
  |  |  ------------------
  ------------------
 2244|  3.33k|          pCurDqLayer->pTransformSize8x8Flag[iMbXy] = !!uiCode;
 2245|  3.33k|          if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (2245:15): [True: 1.73k, False: 1.59k]
  ------------------
 2246|  1.73k|            uiMbType = pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA8x8;
  ------------------
  |  |  277|  1.73k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
 2247|  1.73k|          }
 2248|  3.33k|        }
 2249|  4.38k|        if (!pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (2249:13): [True: 2.64k, False: 1.73k]
  ------------------
 2250|  2.64k|          pCtx->pFillInfoCacheIntraNxNFunc (&sNeighAvail, pNonZeroCount, pIntraPredMode, pCurDqLayer);
 2251|  2.64k|          WELS_READ_VERIFY (ParseIntra4x4Mode (pCtx, &sNeighAvail, pIntraPredMode, pBs, pCurDqLayer));
  ------------------
  |  |   52|  2.64k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.64k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.64k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.10k, False: 533]
  |  |  ------------------
  |  |   55|  2.64k|    return uiRetTmp; \
  |  |   56|  2.64k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 533]
  |  |  ------------------
  ------------------
 2252|  2.64k|        } else {
 2253|  1.73k|          pCtx->pFillInfoCacheIntraNxNFunc (&sNeighAvail, pNonZeroCount, pIntraPredMode, pCurDqLayer);
 2254|  1.73k|          WELS_READ_VERIFY (ParseIntra8x8Mode (pCtx, &sNeighAvail, pIntraPredMode, pBs, pCurDqLayer));
  ------------------
  |  |   52|  1.73k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.73k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.73k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 640, False: 1.09k]
  |  |  ------------------
  |  |   55|  1.73k|    return uiRetTmp; \
  |  |   56|  1.73k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.09k]
  |  |  ------------------
  ------------------
 2255|  1.73k|        }
 2256|  7.76k|      } else { //I_PCM exclude, we can ignore it
 2257|  7.76k|        pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA16x16;
  ------------------
  |  |  276|  7.76k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
 2258|  7.76k|        pCurDqLayer->pTransformSize8x8Flag[iMbXy] = false;
 2259|  7.76k|        pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] = true;
 2260|  7.76k|        pCurDqLayer->pIntraPredMode[iMbXy][7] = (uiMbType - 1) & 3;
 2261|  7.76k|        pCurDqLayer->pCbp[iMbXy] = g_kuiI16CbpTable[ (uiMbType - 1) >> 2];
 2262|  7.76k|        uiCbpC = pCtx->pSps->uiChromaFormatIdc ? pCurDqLayer->pCbp[iMbXy] >> 4 : 0;
  ------------------
  |  Branch (2262:18): [True: 5.59k, False: 2.16k]
  ------------------
 2263|  7.76k|        uiCbpL = pCurDqLayer->pCbp[iMbXy] & 15;
 2264|  7.76k|        WelsFillCacheNonZeroCount (&sNeighAvail, pNonZeroCount, pCurDqLayer);
 2265|  7.76k|        if ((iRet = ParseIntra16x16Mode (pCtx, &sNeighAvail, pBs, pCurDqLayer)) != ERR_NONE) {
  ------------------
  |  Branch (2265:13): [True: 2.99k, False: 4.76k]
  ------------------
 2266|  2.99k|          return iRet;
 2267|  2.99k|        }
 2268|  7.76k|      }
 2269|  12.3k|    }
 2270|  13.9k|  }
 2271|       |
 2272|   688k|  if (MB_TYPE_INTRA16x16 != pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|   688k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (2272:7): [True: 683k, False: 4.76k]
  ------------------
 2273|   683k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //coded_block_pattern
  ------------------
  |  |   52|   683k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   683k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   683k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 585k, False: 98.4k]
  |  |  ------------------
  |  |   55|   683k|    return uiRetTmp; \
  |  |   56|   683k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 98.4k]
  |  |  ------------------
  ------------------
 2274|  98.4k|    uiCbp = uiCode;
 2275|  98.4k|    {
 2276|  98.4k|      if (pCtx->pSps->uiChromaFormatIdc && (uiCbp > 47))
  ------------------
  |  Branch (2276:11): [True: 63.6k, False: 34.7k]
  |  Branch (2276:44): [True: 1.66k, False: 61.9k]
  ------------------
 2277|  1.66k|        return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_CBP);
  ------------------
  |  |   59|  1.66k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2278|  96.7k|      if (!pCtx->pSps->uiChromaFormatIdc && (uiCbp > 15))
  ------------------
  |  Branch (2278:11): [True: 34.7k, False: 61.9k]
  |  Branch (2278:45): [True: 4.16k, False: 30.6k]
  ------------------
 2279|  4.16k|        return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_CBP);
  ------------------
  |  |   59|  4.16k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2280|  92.6k|      if (MB_TYPE_INTRA4x4 == pCurDqLayer->pDec->pMbType[iMbXy] || MB_TYPE_INTRA8x8 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  275|  92.6k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
                    if (MB_TYPE_INTRA4x4 == pCurDqLayer->pDec->pMbType[iMbXy] || MB_TYPE_INTRA8x8 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  277|  92.0k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
  |  Branch (2280:11): [True: 530, False: 92.0k]
  |  Branch (2280:68): [True: 1.08k, False: 91.0k]
  ------------------
 2281|       |
 2282|  1.61k|        uiCbp = pCtx->pSps->uiChromaFormatIdc ? g_kuiIntra4x4CbpTable[uiCbp] : g_kuiIntra4x4CbpTable400[uiCbp];
  ------------------
  |  Branch (2282:17): [True: 699, False: 918]
  ------------------
 2283|  1.61k|      } else //inter
 2284|  91.0k|        uiCbp = pCtx->pSps->uiChromaFormatIdc ?  g_kuiInterCbpTable[uiCbp] : g_kuiInterCbpTable400[uiCbp];
  ------------------
  |  Branch (2284:17): [True: 61.2k, False: 29.7k]
  ------------------
 2285|  92.6k|    }
 2286|       |
 2287|      0|    pCurDqLayer->pCbp[iMbXy] = uiCbp;
 2288|  92.6k|    uiCbpC = pCurDqLayer->pCbp[iMbXy] >> 4;
 2289|  92.6k|    uiCbpL = pCurDqLayer->pCbp[iMbXy] & 15;
 2290|       |
 2291|       |    // Need modification when B picutre add in
 2292|  92.6k|    bool bNeedParseTransformSize8x8Flag =
 2293|  92.6k|      (((pCurDqLayer->pDec->pMbType[iMbXy] >= MB_TYPE_16x16 && pCurDqLayer->pDec->pMbType[iMbXy] <= MB_TYPE_8x16)
  ------------------
  |  |  278|   185k|#define MB_TYPE_16x16       0x00000008
  ------------------
                    (((pCurDqLayer->pDec->pMbType[iMbXy] >= MB_TYPE_16x16 && pCurDqLayer->pDec->pMbType[iMbXy] <= MB_TYPE_8x16)
  ------------------
  |  |  280|  91.0k|#define MB_TYPE_8x16        0x00000020
  ------------------
  |  Branch (2293:10): [True: 91.0k, False: 1.61k]
  |  Branch (2293:64): [True: 87.8k, False: 3.18k]
  ------------------
 2294|  4.80k|        || pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy])
  ------------------
  |  Branch (2294:12): [True: 2.33k, False: 2.47k]
  ------------------
 2295|  90.1k|       && (pCurDqLayer->pDec->pMbType[iMbXy] != MB_TYPE_INTRA8x8)
  ------------------
  |  |  277|  90.1k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
  |  Branch (2295:11): [True: 89.0k, False: 1.08k]
  ------------------
 2296|  89.0k|       && (pCurDqLayer->pDec->pMbType[iMbXy] != MB_TYPE_INTRA4x4)
  ------------------
  |  |  275|  89.0k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
  |  Branch (2296:11): [True: 88.5k, False: 530]
  ------------------
 2297|  88.5k|       && (uiCbpL > 0)
  ------------------
  |  Branch (2297:11): [True: 24.1k, False: 64.3k]
  ------------------
 2298|  24.1k|       && (pCtx->pPps->bTransform8x8ModeFlag));
  ------------------
  |  Branch (2298:11): [True: 20.0k, False: 4.08k]
  ------------------
 2299|       |
 2300|  92.6k|    if (bNeedParseTransformSize8x8Flag) {
  ------------------
  |  Branch (2300:9): [True: 20.0k, False: 72.5k]
  ------------------
 2301|  20.0k|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //transform_size_8x8_flag
  ------------------
  |  |   52|  20.0k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  20.0k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  20.0k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 260, False: 19.8k]
  |  |  ------------------
  |  |   55|  20.0k|    return uiRetTmp; \
  |  |   56|  20.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 19.8k]
  |  |  ------------------
  ------------------
 2302|  19.8k|      pCurDqLayer->pTransformSize8x8Flag[iMbXy] = !!uiCode;
 2303|  19.8k|    }
 2304|  92.6k|  }
 2305|       |
 2306|  97.1k|  ST32A4 (&pNzc[0], 0);
  ------------------
  |  |   80|  97.1k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  97.1k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2307|  97.1k|  ST32A4 (&pNzc[4], 0);
  ------------------
  |  |   80|  97.1k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  97.1k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2308|  97.1k|  ST32A4 (&pNzc[8], 0);
  ------------------
  |  |   80|  97.1k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  97.1k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2309|  97.1k|  ST32A4 (&pNzc[12], 0);
  ------------------
  |  |   80|  97.1k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  97.1k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2310|  97.1k|  ST32A4 (&pNzc[16], 0);
  ------------------
  |  |   80|  97.1k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  97.1k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2311|  97.1k|  ST32A4 (&pNzc[20], 0);
  ------------------
  |  |   80|  97.1k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  97.1k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2312|  97.1k|  if (pCurDqLayer->pCbp[iMbXy] == 0 && !IS_INTRA16x16 (pCurDqLayer->pDec->pMbType[iMbXy])
  ------------------
  |  |  304|   157k|#define IS_INTRA16x16(type) ( MB_TYPE_INTRA16x16 == (type) )
  |  |  ------------------
  |  |  |  |  276|  60.8k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  ------------------
  ------------------
  |  Branch (2312:7): [True: 60.8k, False: 36.2k]
  |  Branch (2312:40): [True: 58.9k, False: 1.93k]
  ------------------
 2313|  58.9k|      && !IS_I_BL (pCurDqLayer->pDec->pMbType[iMbXy])) {
  ------------------
  |  |  318|  58.9k|#define IS_I_BL(type) ( (type) == MB_TYPE_INTRA_BL )
  |  |  ------------------
  |  |  |  |  285|  58.9k|#define MB_TYPE_INTRA_BL    0x00000400
  |  |  ------------------
  ------------------
  |  Branch (2313:10): [True: 58.9k, False: 0]
  ------------------
 2314|  58.9k|    pCurDqLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp;
 2315|   176k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (2315:17): [True: 117k, False: 58.9k]
  ------------------
 2316|   117k|      pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 (pCurDqLayer->pLumaQp[iMbXy] +
  ------------------
  |  |  204|   117k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 467, False: 117k]
  |  |  |  Branch (204:55): [True: 929, False: 116k]
  |  |  ------------------
  ------------------
 2317|   117k|                                         pSliceHeader->pPps->iChromaQpIndexOffset[i], 0, 51)];
 2318|   117k|    }
 2319|  58.9k|  }
 2320|       |
 2321|  97.1k|  if (pCurDqLayer->pCbp[iMbXy] || MB_TYPE_INTRA16x16 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|  60.8k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (2321:7): [True: 36.2k, False: 60.8k]
  |  Branch (2321:35): [True: 1.93k, False: 58.9k]
  ------------------
 2322|  38.2k|    int32_t iQpDelta, iId8x8, iId4x4;
 2323|  38.2k|    memset (pCurDqLayer->pScaledTCoeff[iMbXy], 0, MB_COEFF_LIST_SIZE * sizeof (int16_t));
  ------------------
  |  |   55|  38.2k|#define MB_COEFF_LIST_SIZE      (256+((MB_WIDTH_CHROMA*MB_HEIGHT_CHROMA)<<1))
  |  |  ------------------
  |  |  |  |   51|  38.2k|#define MB_WIDTH_CHROMA         (MB_WIDTH_LUMA>>1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   50|  38.2k|#define MB_WIDTH_LUMA           16
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define MB_COEFF_LIST_SIZE      (256+((MB_WIDTH_CHROMA*MB_HEIGHT_CHROMA)<<1))
  |  |  ------------------
  |  |  |  |   54|  38.2k|#define MB_HEIGHT_CHROMA        (MB_HEIGHT_LUMA>>1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   53|  38.2k|#define MB_HEIGHT_LUMA          16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2324|  38.2k|    WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mb_qp_delta
  ------------------
  |  |   52|  38.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  38.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  38.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.37k, False: 36.8k]
  |  |  ------------------
  |  |   55|  38.2k|    return uiRetTmp; \
  |  |   56|  38.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 36.8k]
  |  |  ------------------
  ------------------
 2325|  36.8k|    iQpDelta = iCode;
 2326|       |
 2327|  36.8k|    if (iQpDelta > 25 || iQpDelta < -26) { //out of iQpDelta range
  ------------------
  |  Branch (2327:9): [True: 572, False: 36.2k]
  |  Branch (2327:26): [True: 672, False: 35.5k]
  ------------------
 2328|  1.24k|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_QP);
  ------------------
  |  |   59|  1.24k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2329|  1.24k|    }
 2330|       |
 2331|  35.5k|    pCurDqLayer->pLumaQp[iMbXy] = (pSlice->iLastMbQp + iQpDelta + 52) % 52; //update last_mb_qp
 2332|  35.5k|    pSlice->iLastMbQp = pCurDqLayer->pLumaQp[iMbXy];
 2333|   106k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (2333:17): [True: 71.1k, False: 35.5k]
  ------------------
 2334|  71.1k|      pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 (pSlice->iLastMbQp +
  ------------------
  |  |  204|  71.1k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 447, False: 70.7k]
  |  |  |  Branch (204:55): [True: 245, False: 70.4k]
  |  |  ------------------
  ------------------
 2335|  71.1k|                                         pSliceHeader->pPps->iChromaQpIndexOffset[i], 0,
 2336|  71.1k|                                         51)];
 2337|  71.1k|    }
 2338|       |
 2339|  35.5k|    BsStartCavlc (pBs);
 2340|       |
 2341|  35.5k|    if (MB_TYPE_INTRA16x16 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|  35.5k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (2341:9): [True: 4.59k, False: 30.9k]
  ------------------
 2342|       |      //step1: Luma DC
 2343|  4.59k|      if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, 0, 16, g_kuiLumaDcZigzagScan, I16_LUMA_DC,
  ------------------
  |  |   70|  4.59k|#define I16_LUMA_DC  1
  ------------------
  |  Branch (2343:11): [True: 205, False: 4.38k]
  ------------------
 2344|  4.59k|                                          pCurDqLayer->pScaledTCoeff[iMbXy], pCurDqLayer->pLumaQp[iMbXy], pCtx)) != ERR_NONE) {
 2345|    205|        return iRet;//abnormal
 2346|    205|      }
 2347|       |      //step2: Luma AC
 2348|  4.38k|      if (uiCbpL) {
  ------------------
  |  Branch (2348:11): [True: 508, False: 3.88k]
  ------------------
 2349|  4.56k|        for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (2349:21): [True: 4.32k, False: 247]
  ------------------
 2350|  4.32k|          if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, i, iScanIdxEnd - WELS_MAX (iScanIdxStart, 1) + 1,
  ------------------
  |  |   91|  4.32k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 0, False: 4.32k]
  |  |  ------------------
  ------------------
  |  Branch (2350:15): [True: 261, False: 4.06k]
  ------------------
 2351|  4.32k|                                              g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1), I16_LUMA_AC, pCurDqLayer->pScaledTCoeff[iMbXy] + (i << 4),
  ------------------
  |  |   91|  4.32k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 0, False: 4.32k]
  |  |  ------------------
  ------------------
                                                            g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1), I16_LUMA_AC, pCurDqLayer->pScaledTCoeff[iMbXy] + (i << 4),
  ------------------
  |  |   71|  4.32k|#define I16_LUMA_AC  2
  ------------------
 2352|  4.32k|                                              pCurDqLayer->pLumaQp[iMbXy], pCtx)) != ERR_NONE) {
 2353|    261|            return iRet;//abnormal
 2354|    261|          }
 2355|  4.32k|        }
 2356|    247|        ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   80|    247|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    247|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2357|    247|        ST32A4 (&pNzc[4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   80|    247|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    247|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2358|    247|        ST32A4 (&pNzc[8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   80|    247|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    247|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2359|    247|        ST32A4 (&pNzc[12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   80|    247|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    247|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2360|    247|      }
 2361|  30.9k|    } else { //non-MB_TYPE_INTRA16x16
 2362|  30.9k|      if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (2362:11): [True: 9.51k, False: 21.4k]
  ------------------
 2363|  42.4k|        for (iId8x8 = 0; iId8x8 < 4; iId8x8++) {
  ------------------
  |  Branch (2363:26): [True: 34.4k, False: 8.03k]
  ------------------
 2364|  34.4k|          iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA_8 : LUMA_DC_AC_INTER_8;
  ------------------
  |  |  305|  34.4k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  34.4k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  34.4k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  34.4k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  34.4k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  34.4k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                        iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA_8 : LUMA_DC_AC_INTER_8;
  ------------------
  |  |   86|  2.65k|#define LUMA_DC_AC_INTRA_8  17
  ------------------
                        iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA_8 : LUMA_DC_AC_INTER_8;
  ------------------
  |  |   87|  66.2k|#define LUMA_DC_AC_INTER_8  18
  ------------------
  |  Branch (2364:28): [True: 2.65k, False: 31.7k]
  ------------------
 2365|  34.4k|          if (uiCbpL & (1 << iId8x8)) {
  ------------------
  |  Branch (2365:15): [True: 12.2k, False: 22.1k]
  ------------------
 2366|  12.2k|            int32_t iIndex = (iId8x8 << 2);
 2367|  58.1k|            for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (2367:30): [True: 47.3k, False: 10.7k]
  ------------------
 2368|  47.3k|              if ((iRet = WelsResidualBlockCavlc8x8 (pVlcTable, pNonZeroCount, pBs, iIndex, iScanIdxEnd - iScanIdxStart + 1,
  ------------------
  |  Branch (2368:19): [True: 1.47k, False: 45.9k]
  ------------------
 2369|  47.3k|                                                     g_kuiZigzagScan8x8 + iScanIdxStart, iMbResProperty, pCurDqLayer->pScaledTCoeff[iMbXy] + (iId8x8 << 6), iId4x4,
 2370|  47.3k|                                                     pCurDqLayer->pLumaQp[iMbXy], pCtx)) != ERR_NONE) {
 2371|  1.47k|                return iRet;
 2372|  1.47k|              }
 2373|  45.9k|              iIndex++;
 2374|  45.9k|            }
 2375|  22.1k|          } else {
 2376|  22.1k|            ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[iId8x8 << 2]], 0);
  ------------------
  |  |   66|  22.1k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 2377|  22.1k|            ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[ (iId8x8 << 2) + 2]], 0);
  ------------------
  |  |   66|  22.1k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 2378|  22.1k|          }
 2379|  34.4k|        }
 2380|  8.03k|        ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   80|  8.03k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  8.03k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2381|  8.03k|        ST32A4 (&pNzc[4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   80|  8.03k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  8.03k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2382|  8.03k|        ST32A4 (&pNzc[8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   80|  8.03k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  8.03k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2383|  8.03k|        ST32A4 (&pNzc[12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   80|  8.03k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  8.03k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2384|  21.4k|      } else { // Normal T4x4
 2385|  97.4k|        for (iId8x8 = 0; iId8x8 < 4; iId8x8++) {
  ------------------
  |  Branch (2385:26): [True: 79.0k, False: 18.4k]
  ------------------
 2386|  79.0k|          iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA : LUMA_DC_AC_INTER;
  ------------------
  |  |  305|  79.0k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  79.0k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  79.0k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  79.0k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  79.0k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  79.0k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                        iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA : LUMA_DC_AC_INTER;
  ------------------
  |  |   80|  1.49k|#define LUMA_DC_AC_INTRA 11
  ------------------
                        iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA : LUMA_DC_AC_INTER;
  ------------------
  |  |   81|   156k|#define LUMA_DC_AC_INTER 12
  ------------------
  |  Branch (2386:28): [True: 1.49k, False: 77.5k]
  ------------------
 2387|  79.0k|          if (uiCbpL & (1 << iId8x8)) {
  ------------------
  |  Branch (2387:15): [True: 17.7k, False: 61.2k]
  ------------------
 2388|  17.7k|            int32_t iIndex = (iId8x8 << 2);
 2389|  81.2k|            for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (2389:30): [True: 66.5k, False: 14.6k]
  ------------------
 2390|       |              //Luma (DC and AC decoding together)
 2391|  66.5k|              if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, iIndex, iScanIdxEnd - iScanIdxStart + 1,
  ------------------
  |  Branch (2391:19): [True: 3.07k, False: 63.5k]
  ------------------
 2392|  66.5k|                                                  g_kuiZigzagScan + iScanIdxStart, iMbResProperty, pCurDqLayer->pScaledTCoeff[iMbXy] + (iIndex << 4),
 2393|  66.5k|                                                  pCurDqLayer->pLumaQp[iMbXy], pCtx)) != ERR_NONE) {
 2394|  3.07k|                return iRet;//abnormal
 2395|  3.07k|              }
 2396|  63.5k|              iIndex++;
 2397|  63.5k|            }
 2398|  61.2k|          } else {
 2399|  61.2k|            ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[iId8x8 << 2]], 0);
  ------------------
  |  |   66|  61.2k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 2400|  61.2k|            ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[ (iId8x8 << 2) + 2]], 0);
  ------------------
  |  |   66|  61.2k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 2401|  61.2k|          }
 2402|  79.0k|        }
 2403|  18.4k|        ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   80|  18.4k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  18.4k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2404|  18.4k|        ST32A4 (&pNzc[4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   80|  18.4k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  18.4k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2405|  18.4k|        ST32A4 (&pNzc[8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   80|  18.4k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  18.4k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2406|  18.4k|        ST32A4 (&pNzc[12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   80|  18.4k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  18.4k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2407|  18.4k|      }
 2408|  30.9k|    }
 2409|       |
 2410|       |
 2411|       |    //chroma
 2412|       |    //step1: DC
 2413|  30.5k|    if (1 == uiCbpC || 2 == uiCbpC) {
  ------------------
  |  Branch (2413:9): [True: 8.14k, False: 22.4k]
  |  Branch (2413:24): [True: 2.09k, False: 20.3k]
  ------------------
 2414|  28.1k|      for (i = 0; i < 2; i++) { //Cb Cr
  ------------------
  |  Branch (2414:19): [True: 19.7k, False: 8.45k]
  ------------------
 2415|  19.7k|        if (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy]))
  ------------------
  |  |  305|  19.7k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  19.7k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  19.7k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  19.7k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  19.7k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  19.7k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 4.94k, False: 14.7k]
  |  |  ------------------
  ------------------
 2416|  4.94k|          iMbResProperty = i ? CHROMA_DC_V : CHROMA_DC_U;
  ------------------
  |  |   77|  2.26k|#define CHROMA_DC_V  8
  ------------------
                        iMbResProperty = i ? CHROMA_DC_V : CHROMA_DC_U;
  ------------------
  |  |   76|  2.67k|#define CHROMA_DC_U  7
  ------------------
  |  Branch (2416:28): [True: 2.26k, False: 2.67k]
  ------------------
 2417|  14.7k|        else
 2418|  14.7k|          iMbResProperty = i ? CHROMA_DC_V_INTER : CHROMA_DC_U_INTER;
  ------------------
  |  |   83|  7.19k|#define CHROMA_DC_V_INTER  14
  ------------------
                        iMbResProperty = i ? CHROMA_DC_V_INTER : CHROMA_DC_U_INTER;
  ------------------
  |  |   82|  7.56k|#define CHROMA_DC_U_INTER  13
  ------------------
  |  Branch (2418:28): [True: 7.19k, False: 7.56k]
  ------------------
 2419|       |
 2420|  19.7k|        if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, 16 + (i << 2), 4, g_kuiChromaDcScan, iMbResProperty,
  ------------------
  |  Branch (2420:13): [True: 1.79k, False: 17.9k]
  ------------------
 2421|  19.7k|                                            pCurDqLayer->pScaledTCoeff[iMbXy] + 256 + (i << 6), pCurDqLayer->pChromaQp[iMbXy][i], pCtx)) != ERR_NONE) {
 2422|  1.79k|          return iRet;//abnormal
 2423|  1.79k|        }
 2424|  19.7k|      }
 2425|  20.3k|    } else {
 2426|  20.3k|    }
 2427|       |    //step2: AC
 2428|  28.7k|    if (2 == uiCbpC) {
  ------------------
  |  Branch (2428:9): [True: 1.63k, False: 27.1k]
  ------------------
 2429|  4.14k|      for (i = 0; i < 2; i++) { //Cb Cr
  ------------------
  |  Branch (2429:19): [True: 2.92k, False: 1.22k]
  ------------------
 2430|  2.92k|        if (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy]))
  ------------------
  |  |  305|  2.92k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  2.92k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  2.92k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  2.92k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.92k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  2.92k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 670, False: 2.25k]
  |  |  ------------------
  ------------------
 2431|    670|          iMbResProperty = i ? CHROMA_AC_V : CHROMA_AC_U;
  ------------------
  |  |   79|    330|#define CHROMA_AC_V  10
  ------------------
                        iMbResProperty = i ? CHROMA_AC_V : CHROMA_AC_U;
  ------------------
  |  |   78|    340|#define CHROMA_AC_U  9
  ------------------
  |  Branch (2431:28): [True: 330, False: 340]
  ------------------
 2432|  2.25k|        else
 2433|  2.25k|          iMbResProperty = i ? CHROMA_AC_V_INTER : CHROMA_AC_U_INTER;
  ------------------
  |  |   85|    956|#define CHROMA_AC_V_INTER  16
  ------------------
                        iMbResProperty = i ? CHROMA_AC_V_INTER : CHROMA_AC_U_INTER;
  ------------------
  |  |   84|  1.29k|#define CHROMA_AC_U_INTER  15
  ------------------
  |  Branch (2433:28): [True: 956, False: 1.29k]
  ------------------
 2434|       |
 2435|  2.92k|        int32_t iIndex = 16 + (i << 2);
 2436|  13.3k|        for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (2436:26): [True: 10.8k, False: 2.50k]
  ------------------
 2437|  10.8k|          if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, iIndex, iScanIdxEnd - WELS_MAX (iScanIdxStart,
  ------------------
  |  |   91|  10.8k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 0, False: 10.8k]
  |  |  ------------------
  ------------------
  |  Branch (2437:15): [True: 416, False: 10.4k]
  ------------------
 2438|  10.8k|                                              1) + 1, g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1), iMbResProperty,
  ------------------
  |  |   91|  10.8k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 0, False: 10.8k]
  |  |  ------------------
  ------------------
 2439|  10.8k|                                              pCurDqLayer->pScaledTCoeff[iMbXy] + (iIndex << 4),
 2440|  10.8k|                                              pCurDqLayer->pChromaQp[iMbXy][i], pCtx)) != ERR_NONE) {
 2441|    416|            return iRet;//abnormal
 2442|    416|          }
 2443|  10.4k|          iIndex++;
 2444|  10.4k|        }
 2445|  2.92k|      }
 2446|  1.22k|      ST16A2 (&pNzc[16], LD16A2 (&pNonZeroCount[6 + 8 * 1]));
  ------------------
  |  |   78|  1.22k|#define ST16A2(a, b) STA(a, b, 16, 2)
  |  |  ------------------
  |  |  |  |   71|  1.22k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2447|  1.22k|      ST16A2 (&pNzc[20], LD16A2 (&pNonZeroCount[6 + 8 * 2]));
  ------------------
  |  |   78|  1.22k|#define ST16A2(a, b) STA(a, b, 16, 2)
  |  |  ------------------
  |  |  |  |   71|  1.22k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2448|  1.22k|      ST16A2 (&pNzc[18], LD16A2 (&pNonZeroCount[6 + 8 * 4]));
  ------------------
  |  |   78|  1.22k|#define ST16A2(a, b) STA(a, b, 16, 2)
  |  |  ------------------
  |  |  |  |   71|  1.22k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2449|  1.22k|      ST16A2 (&pNzc[22], LD16A2 (&pNonZeroCount[6 + 8 * 5]));
  ------------------
  |  |   78|  1.22k|#define ST16A2(a, b) STA(a, b, 16, 2)
  |  |  ------------------
  |  |  |  |   71|  1.22k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2450|  1.22k|    }
 2451|  28.3k|    BsEndCavlc (pBs);
 2452|  28.3k|  }
 2453|       |
 2454|  87.2k|  return ERR_NONE;
 2455|  97.1k|}
_ZN7WelsDec23WelsDecodeMbCavlcPSliceEPNS_21TagWelsDecoderContextEPNS_10TagNalUnitERj:
 2457|  5.54M|int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uint32_t& uiEosFlag) {
 2458|  5.54M|  PDqLayer pCurDqLayer             = pCtx->pCurDqLayer;
 2459|  5.54M|  PBitStringAux pBs              = pCurDqLayer->pBitStringAux;
 2460|  5.54M|  PSlice pSlice                  = &pCurDqLayer->sLayerInfo.sSliceInLayer;
 2461|  5.54M|  PSliceHeader pSliceHeader      = &pSlice->sSliceHeaderExt.sSliceHeader;
 2462|  5.54M|  PPicture* ppRefPic = pCtx->sRefPic.pRefList[LIST_0];
 2463|  5.54M|  intX_t iUsedBits;
 2464|  5.54M|  const int32_t iMbXy = pCurDqLayer->iMbXyIndex;
 2465|  5.54M|  int8_t* pNzc = pCurDqLayer->pNzc[iMbXy];
 2466|  5.54M|  int32_t iBaseModeFlag, i;
 2467|  5.54M|  int32_t iRet = 0; //should have the return value to indicate decoding error or not, It's NECESSARY--2010.4.15
 2468|  5.54M|  uint32_t uiCode;
 2469|       |
 2470|  5.54M|  pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] = true;
 2471|  5.54M|  pCurDqLayer->pTransformSize8x8Flag[iMbXy] = false;
 2472|       |
 2473|  5.54M|  if (-1 == pSlice->iMbSkipRun) {
  ------------------
  |  Branch (2473:7): [True: 2.21M, False: 3.32M]
  ------------------
 2474|  2.21M|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //mb_skip_run
  ------------------
  |  |   52|  2.21M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.21M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.21M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 3.77k, False: 2.21M]
  |  |  ------------------
  |  |   55|  2.21M|    return uiRetTmp; \
  |  |   56|  2.21M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.21M]
  |  |  ------------------
  ------------------
 2475|  2.21M|    pSlice->iMbSkipRun = uiCode;
 2476|  2.21M|    if (-1 == pSlice->iMbSkipRun) {
  ------------------
  |  Branch (2476:9): [True: 0, False: 2.21M]
  ------------------
 2477|      0|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_SKIP_RUN);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2478|      0|    }
 2479|  2.21M|  }
 2480|  5.53M|  if (pSlice->iMbSkipRun--) {
  ------------------
  |  Branch (2480:7): [True: 3.46M, False: 2.07M]
  ------------------
 2481|  3.46M|    int16_t iMv[2];
 2482|       |
 2483|  3.46M|    pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_SKIP;
  ------------------
  |  |  283|  3.46M|#define MB_TYPE_SKIP        0x00000100
  ------------------
 2484|  3.46M|    ST32A4 (&pNzc[0], 0);
  ------------------
  |  |   80|  3.46M|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  3.46M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2485|  3.46M|    ST32A4 (&pNzc[4], 0);
  ------------------
  |  |   80|  3.46M|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  3.46M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2486|  3.46M|    ST32A4 (&pNzc[8], 0);
  ------------------
  |  |   80|  3.46M|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  3.46M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2487|  3.46M|    ST32A4 (&pNzc[12], 0);
  ------------------
  |  |   80|  3.46M|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  3.46M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2488|  3.46M|    ST32A4 (&pNzc[16], 0);
  ------------------
  |  |   80|  3.46M|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  3.46M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2489|  3.46M|    ST32A4 (&pNzc[20], 0);
  ------------------
  |  |   80|  3.46M|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  3.46M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2490|       |
 2491|  3.46M|    pCurDqLayer->pInterPredictionDoneFlag[iMbXy] = 0;
 2492|  3.46M|    memset (pCurDqLayer->pDec->pRefIndex[0][iMbXy], 0, sizeof (int8_t) * 16);
 2493|  3.46M|    bool bIsPending = GetThreadCount (pCtx) > 1;
 2494|  3.46M|    pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPic[0] && (ppRefPic[0]->bIsComplete
  ------------------
  |  Branch (2494:29): [True: 18.3k, False: 3.44M]
  |  Branch (2494:49): [True: 0, False: 3.44M]
  |  Branch (2494:77): [True: 3.44M, False: 0]
  |  Branch (2494:93): [True: 7.36k, False: 3.44M]
  ------------------
 2495|  3.44M|                            || bIsPending));
  ------------------
  |  Branch (2495:32): [True: 0, False: 3.44M]
  ------------------
 2496|       |    //predict iMv
 2497|  3.46M|    PredPSkipMvFromNeighbor (pCurDqLayer, iMv);
 2498|  58.9M|    for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (2498:17): [True: 55.4M, False: 3.46M]
  ------------------
 2499|  55.4M|      ST32A2 (pCurDqLayer->pDec->pMv[0][iMbXy][i], * (uint32_t*)iMv);
  ------------------
  |  |   79|  55.4M|#define ST32A2(a, b) STA(a, b, 32, 2)
  |  |  ------------------
  |  |  |  |   71|  55.4M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2500|  55.4M|    }
 2501|       |
 2502|       |    //if (!pSlice->sSliceHeaderExt.bDefaultResidualPredFlag) {
 2503|       |    //  memset (pCurDqLayer->pScaledTCoeff[iMbXy], 0, 384 * sizeof (int16_t));
 2504|       |    //}
 2505|       |
 2506|       |    //reset rS
 2507|  3.46M|    if (!pSlice->sSliceHeaderExt.bDefaultResidualPredFlag ||
  ------------------
  |  Branch (2507:9): [True: 3.45M, False: 17.0k]
  ------------------
 2508|  3.46M|        (pNalCur->sNalHeaderExt.uiQualityId == 0 && pNalCur->sNalHeaderExt.uiDependencyId == 0)) {
  ------------------
  |  Branch (2508:10): [True: 17.0k, False: 0]
  |  Branch (2508:53): [True: 17.0k, False: 0]
  ------------------
 2509|  3.46M|      pCurDqLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp;
 2510|  10.4M|      for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (2510:19): [True: 6.93M, False: 3.46M]
  ------------------
 2511|  6.93M|        pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 (pCurDqLayer->pLumaQp[iMbXy] +
  ------------------
  |  |  204|  6.93M|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 1.61k, False: 6.93M]
  |  |  |  Branch (204:55): [True: 1.19k, False: 6.93M]
  |  |  ------------------
  ------------------
 2512|  6.93M|                                           pSliceHeader->pPps->iChromaQpIndexOffset[i], 0, 51)];
 2513|  6.93M|      }
 2514|  3.46M|    }
 2515|       |
 2516|  3.46M|    pCurDqLayer->pCbp[iMbXy] = 0;
 2517|  3.46M|  } else {
 2518|  2.07M|    if (pSlice->sSliceHeaderExt.bAdaptiveBaseModeFlag == 1) {
  ------------------
  |  Branch (2518:9): [True: 2.32k, False: 2.06M]
  ------------------
 2519|  2.32k|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //base_mode_flag
  ------------------
  |  |   52|  2.32k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.32k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.32k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 198, False: 2.12k]
  |  |  ------------------
  |  |   55|  2.32k|    return uiRetTmp; \
  |  |   56|  2.32k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.12k]
  |  |  ------------------
  ------------------
 2520|  2.12k|      iBaseModeFlag = uiCode;
 2521|  2.06M|    } else {
 2522|  2.06M|      iBaseModeFlag = pSlice->sSliceHeaderExt.bDefaultBaseModeFlag;
 2523|  2.06M|    }
 2524|  2.07M|    if (!iBaseModeFlag) {
  ------------------
  |  Branch (2524:9): [True: 2.07M, False: 365]
  ------------------
 2525|  2.07M|      iRet = WelsActualDecodeMbCavlcPSlice (pCtx);
 2526|  2.07M|    } else {
 2527|    365|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "iBaseModeFlag (%d) != 0, inter-layer prediction not supported.",
 2528|    365|               iBaseModeFlag);
 2529|    365|      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_ILP);
  ------------------
  |  |   59|    365|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2530|    365|    }
 2531|  2.07M|    if (iRet) { //occur error when parsing, MUST STOP decoding
  ------------------
  |  Branch (2531:9): [True: 1.98M, False: 87.4k]
  ------------------
 2532|  1.98M|      return iRet;
 2533|  1.98M|    }
 2534|  2.07M|  }
 2535|       |  // check whether there is left bits to read next time in case multiple slices
 2536|  3.55M|  iUsedBits = ((pBs->pCurBuf - pBs->pStartBuf) << 3) - (16 - pBs->iLeftBits);
 2537|       |  // sub 1, for stop bit
 2538|  3.55M|  if ((iUsedBits == (pBs->iBits - 1)) && (0 >= pCurDqLayer->sLayerInfo.sSliceInLayer.iMbSkipRun)) { // slice boundary
  ------------------
  |  Branch (2538:7): [True: 52.5k, False: 3.50M]
  |  Branch (2538:42): [True: 17.7k, False: 34.8k]
  ------------------
 2539|  17.7k|    uiEosFlag = 1;
 2540|  17.7k|  }
 2541|  3.55M|  if (iUsedBits > (pBs->iBits -
  ------------------
  |  Branch (2541:7): [True: 11.4k, False: 3.54M]
  ------------------
 2542|  3.55M|                   1)) { //When BS incomplete, as long as find it, SHOULD stop decoding to avoid mosaic or crash.
 2543|  11.4k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
 2544|  11.4k|             "WelsDecodeMbCavlcISlice()::::pBs incomplete, iUsedBits:%" PRId64 " > pBs->iBits:%d, MUST stop decoding.",
 2545|  11.4k|             (int64_t) iUsedBits, pBs->iBits);
 2546|  11.4k|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_BS_INCOMPLETE);
  ------------------
  |  |   59|  11.4k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2547|  11.4k|  }
 2548|  3.54M|  return ERR_NONE;
 2549|  3.55M|}
_ZN7WelsDec23WelsDecodeMbCavlcBSliceEPNS_21TagWelsDecoderContextEPNS_10TagNalUnitERj:
 2551|  9.61M|int32_t WelsDecodeMbCavlcBSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uint32_t& uiEosFlag) {
 2552|  9.61M|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
 2553|  9.61M|  PBitStringAux pBs = pCurDqLayer->pBitStringAux;
 2554|  9.61M|  PSlice pSlice = &pCurDqLayer->sLayerInfo.sSliceInLayer;
 2555|  9.61M|  PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
 2556|  9.61M|  PPicture* ppRefPicL0 = pCtx->sRefPic.pRefList[LIST_0];
 2557|  9.61M|  PPicture* ppRefPicL1 = pCtx->sRefPic.pRefList[LIST_1];
 2558|  9.61M|  intX_t iUsedBits;
 2559|  9.61M|  const int32_t iMbXy = pCurDqLayer->iMbXyIndex;
 2560|  9.61M|  int8_t* pNzc = pCurDqLayer->pNzc[iMbXy];
 2561|  9.61M|  int32_t iBaseModeFlag, i;
 2562|  9.61M|  int32_t iRet = 0; //should have the return value to indicate decoding error or not, It's NECESSARY--2010.4.15
 2563|  9.61M|  uint32_t uiCode;
 2564|       |
 2565|  9.61M|  pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] = true;
 2566|  9.61M|  pCurDqLayer->pTransformSize8x8Flag[iMbXy] = false;
 2567|       |
 2568|  9.61M|  if (-1 == pSlice->iMbSkipRun) {
  ------------------
  |  Branch (2568:7): [True: 271k, False: 9.34M]
  ------------------
 2569|   271k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //mb_skip_run
  ------------------
  |  |   52|   271k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   271k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   271k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.33k, False: 270k]
  |  |  ------------------
  |  |   55|   271k|    return uiRetTmp; \
  |  |   56|   271k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 270k]
  |  |  ------------------
  ------------------
 2570|   270k|    pSlice->iMbSkipRun = uiCode;
 2571|   270k|    if (-1 == pSlice->iMbSkipRun) {
  ------------------
  |  Branch (2571:9): [True: 0, False: 270k]
  ------------------
 2572|      0|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_SKIP_RUN);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2573|      0|    }
 2574|   270k|    if ((uint32_t) (pSlice->iMbSkipRun) > (uint32_t) (pCurDqLayer->iMbWidth * pCurDqLayer->iMbHeight - iMbXy)) {
  ------------------
  |  Branch (2574:9): [True: 4.83k, False: 265k]
  ------------------
 2575|  4.83k|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_SKIP_RUN);
  ------------------
  |  |   59|  4.83k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2576|  4.83k|    }
 2577|   270k|  }
 2578|  9.61M|  if (pSlice->iMbSkipRun--) {
  ------------------
  |  Branch (2578:7): [True: 9.35M, False: 256k]
  ------------------
 2579|  9.35M|    int16_t iMv[LIST_A][2] = { { 0, 0 }, { 0, 0 } };
 2580|  9.35M|    int8_t  ref[LIST_A] = { 0 };
 2581|       |
 2582|  9.35M|    pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_SKIP | MB_TYPE_DIRECT;
  ------------------
  |  |  283|  9.35M|#define MB_TYPE_SKIP        0x00000100
  ------------------
                  pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_SKIP | MB_TYPE_DIRECT;
  ------------------
  |  |  286|  9.35M|#define MB_TYPE_DIRECT      0x00000800
  ------------------
 2583|  9.35M|    ST32A4 (&pNzc[0], 0);
  ------------------
  |  |   80|  9.35M|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  9.35M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2584|  9.35M|    ST32A4 (&pNzc[4], 0);
  ------------------
  |  |   80|  9.35M|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  9.35M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2585|  9.35M|    ST32A4 (&pNzc[8], 0);
  ------------------
  |  |   80|  9.35M|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  9.35M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2586|  9.35M|    ST32A4 (&pNzc[12], 0);
  ------------------
  |  |   80|  9.35M|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  9.35M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2587|  9.35M|    ST32A4 (&pNzc[16], 0);
  ------------------
  |  |   80|  9.35M|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  9.35M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2588|  9.35M|    ST32A4 (&pNzc[20], 0);
  ------------------
  |  |   80|  9.35M|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  9.35M|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2589|       |
 2590|  9.35M|    pCurDqLayer->pInterPredictionDoneFlag[iMbXy] = 0;
 2591|  9.35M|    memset (pCurDqLayer->pDec->pRefIndex[LIST_0][iMbXy], 0, sizeof (int8_t) * 16);
 2592|  9.35M|    memset (pCurDqLayer->pDec->pRefIndex[LIST_1][iMbXy], 0, sizeof (int8_t) * 16);
 2593|  9.35M|    bool bIsPending = GetThreadCount (pCtx) > 1;
 2594|  9.35M|    pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPicL0[0] && (ppRefPicL0[0]->bIsComplete
  ------------------
  |  Branch (2594:29): [True: 19.7k, False: 9.33M]
  |  Branch (2594:49): [True: 0, False: 9.33M]
  |  Branch (2594:77): [True: 9.33M, False: 835]
  |  Branch (2594:95): [True: 2.10k, False: 9.33M]
  ------------------
 2595|  9.33M|                            || bIsPending)) || ! (ppRefPicL1[0] && (ppRefPicL1[0]->bIsComplete || bIsPending));
  ------------------
  |  Branch (2595:32): [True: 0, False: 9.33M]
  |  Branch (2595:51): [True: 2.10k, False: 0]
  |  Branch (2595:69): [True: 1.71k, False: 394]
  |  Branch (2595:99): [True: 0, False: 394]
  ------------------
 2596|       |
 2597|       |    /*if (pCtx->bMbRefConcealed) {
 2598|       |      SLogContext* pLogCtx = & (pCtx->sLogCtx);
 2599|       |      WelsLog (pLogCtx, WELS_LOG_ERROR, "Ref Picture for B-Slice is lost, B-Slice decoding cannot be continued!");
 2600|       |      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_DATA, ERR_INFO_REFERENCE_PIC_LOST);
 2601|       |    }*/
 2602|       |    //predict iMv
 2603|  9.35M|    SubMbType subMbType;
 2604|  9.35M|    if (pSliceHeader->iDirectSpatialMvPredFlag) {
  ------------------
  |  Branch (2604:9): [True: 278k, False: 9.07M]
  ------------------
 2605|       |
 2606|       |      //predict direct spatial mv
 2607|   278k|      int32_t ret = PredMvBDirectSpatial (pCtx, iMv, ref, subMbType);
 2608|   278k|      if (ret != ERR_NONE) {
  ------------------
  |  Branch (2608:11): [True: 529, False: 277k]
  ------------------
 2609|    529|        return ret;
 2610|    529|      }
 2611|  9.07M|    } else {
 2612|       |      //temporal direct mode
 2613|  9.07M|      int32_t ret = PredBDirectTemporal (pCtx, iMv, ref, subMbType);
 2614|  9.07M|      if (ret != ERR_NONE) {
  ------------------
  |  Branch (2614:11): [True: 325, False: 9.07M]
  ------------------
 2615|    325|        return ret;
 2616|    325|      }
 2617|  9.07M|    }
 2618|       |
 2619|       |    //if (!pSlice->sSliceHeaderExt.bDefaultResidualPredFlag) {
 2620|       |    //  memset (pCurDqLayer->pScaledTCoeff[iMbXy], 0, 384 * sizeof (int16_t));
 2621|       |    //}
 2622|       |
 2623|       |    //reset rS
 2624|  9.35M|    if (!pSlice->sSliceHeaderExt.bDefaultResidualPredFlag ||
  ------------------
  |  Branch (2624:9): [True: 9.35M, False: 447]
  ------------------
 2625|  9.35M|        (pNalCur->sNalHeaderExt.uiQualityId == 0 && pNalCur->sNalHeaderExt.uiDependencyId == 0)) {
  ------------------
  |  Branch (2625:10): [True: 447, False: 0]
  |  Branch (2625:53): [True: 447, False: 0]
  ------------------
 2626|  9.35M|      pCurDqLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp;
 2627|  28.0M|      for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (2627:19): [True: 18.7M, False: 9.35M]
  ------------------
 2628|  18.7M|        pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 (pCurDqLayer->pLumaQp[iMbXy] +
  ------------------
  |  |  204|  18.7M|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 2.68k, False: 18.7M]
  |  |  |  Branch (204:55): [True: 779, False: 18.7M]
  |  |  ------------------
  ------------------
 2629|  18.7M|                                           pSliceHeader->pPps->iChromaQpIndexOffset[i], 0, 51)];
 2630|  18.7M|      }
 2631|  9.35M|    }
 2632|       |
 2633|  9.35M|    pCurDqLayer->pCbp[iMbXy] = 0;
 2634|  9.35M|  } else {
 2635|   256k|    if (pSlice->sSliceHeaderExt.bAdaptiveBaseModeFlag == 1) {
  ------------------
  |  Branch (2635:9): [True: 1.77k, False: 255k]
  ------------------
 2636|  1.77k|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //base_mode_flag
  ------------------
  |  |   52|  1.77k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.77k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.77k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 196, False: 1.58k]
  |  |  ------------------
  |  |   55|  1.77k|    return uiRetTmp; \
  |  |   56|  1.77k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.58k]
  |  |  ------------------
  ------------------
 2637|  1.58k|      iBaseModeFlag = uiCode;
 2638|   255k|    } else {
 2639|   255k|      iBaseModeFlag = pSlice->sSliceHeaderExt.bDefaultBaseModeFlag;
 2640|   255k|    }
 2641|   256k|    if (!iBaseModeFlag) {
  ------------------
  |  Branch (2641:9): [True: 256k, False: 291]
  ------------------
 2642|   256k|      iRet = WelsActualDecodeMbCavlcBSlice (pCtx);
 2643|   256k|    } else {
 2644|    291|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "iBaseModeFlag (%d) != 0, inter-layer prediction not supported.",
 2645|    291|               iBaseModeFlag);
 2646|    291|      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_ILP);
  ------------------
  |  |   59|    291|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2647|    291|    }
 2648|   256k|    if (iRet) { //occur error when parsing, MUST STOP decoding
  ------------------
  |  Branch (2648:9): [True: 47.2k, False: 209k]
  ------------------
 2649|  47.2k|      return iRet;
 2650|  47.2k|    }
 2651|   256k|  }
 2652|       |  // check whether there is left bits to read next time in case multiple slices
 2653|  9.56M|  iUsedBits = ((pBs->pCurBuf - pBs->pStartBuf) << 3) - (16 - pBs->iLeftBits);
 2654|       |  // sub 1, for stop bit
 2655|  9.56M|  if ((iUsedBits == (pBs->iBits - 1)) && (0 >= pCurDqLayer->sLayerInfo.sSliceInLayer.iMbSkipRun)) { // slice boundary
  ------------------
  |  Branch (2655:7): [True: 61.4k, False: 9.50M]
  |  Branch (2655:42): [True: 7.72k, False: 53.7k]
  ------------------
 2656|  7.72k|    uiEosFlag = 1;
 2657|  7.72k|  }
 2658|  9.56M|  if (iUsedBits > (pBs->iBits -
  ------------------
  |  Branch (2658:7): [True: 5.79k, False: 9.55M]
  ------------------
 2659|  9.56M|                   1)) { //When BS incomplete, as long as find it, SHOULD stop decoding to avoid mosaic or crash.
 2660|  5.79k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
 2661|  5.79k|             "WelsDecodeMbCavlcBSlice()::::pBs incomplete, iUsedBits:%" PRId64 " > pBs->iBits:%d, MUST stop decoding.",
 2662|  5.79k|             (int64_t)iUsedBits, pBs->iBits);
 2663|  5.79k|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_BS_INCOMPLETE);
  ------------------
  |  |   59|  5.79k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2664|  5.79k|  }
 2665|  9.55M|  return ERR_NONE;
 2666|  9.56M|}
_ZN7WelsDec29WelsActualDecodeMbCavlcBSliceEPNS_21TagWelsDecoderContextE:
 2668|   256k|int32_t WelsActualDecodeMbCavlcBSlice (PWelsDecoderContext pCtx) {
 2669|   256k|  SVlcTable* pVlcTable = pCtx->pVlcTable;
 2670|   256k|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
 2671|   256k|  PBitStringAux pBs = pCurDqLayer->pBitStringAux;
 2672|   256k|  PSlice pSlice = &pCurDqLayer->sLayerInfo.sSliceInLayer;
 2673|   256k|  PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
 2674|       |
 2675|   256k|  int32_t iScanIdxStart = pSlice->sSliceHeaderExt.uiScanIdxStart;
 2676|   256k|  int32_t iScanIdxEnd = pSlice->sSliceHeaderExt.uiScanIdxEnd;
 2677|       |
 2678|   256k|  SWelsNeighAvail sNeighAvail;
 2679|   256k|  int32_t iMbX = pCurDqLayer->iMbX;
 2680|   256k|  int32_t iMbY = pCurDqLayer->iMbY;
 2681|   256k|  const int32_t iMbXy = pCurDqLayer->iMbXyIndex;
 2682|   256k|  int8_t* pNzc = pCurDqLayer->pNzc[iMbXy];
 2683|   256k|  int32_t i;
 2684|   256k|  int32_t iRet = ERR_NONE;
 2685|   256k|  uint32_t uiMbType = 0, uiCbp = 0, uiCbpL = 0, uiCbpC = 0;
 2686|   256k|  uint32_t uiCode;
 2687|   256k|  int32_t iCode;
 2688|   256k|  int32_t iMbResProperty;
 2689|       |
 2690|   256k|  GetNeighborAvailMbType (&sNeighAvail, pCurDqLayer);
 2691|   256k|  ENFORCE_STACK_ALIGN_1D (uint8_t, pNonZeroCount, 48, 16);
  ------------------
  |  |   58|   256k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|   256k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
 2692|   256k|  pCurDqLayer->pInterPredictionDoneFlag[iMbXy] = 0;//2009.10.23
 2693|   256k|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //uiMbType
  ------------------
  |  |   52|   256k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   256k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   256k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.32k, False: 255k]
  |  |  ------------------
  |  |   55|   256k|    return uiRetTmp; \
  |  |   56|   256k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 255k]
  |  |  ------------------
  ------------------
 2694|   255k|  uiMbType = uiCode;
 2695|   255k|  if (uiMbType < 23) { //inter MB type
  ------------------
  |  Branch (2695:7): [True: 233k, False: 21.5k]
  ------------------
 2696|   233k|    int16_t iMotionVector[LIST_A][30][MV_A];
 2697|   233k|    int8_t  iRefIndex[LIST_A][30];
 2698|   233k|    pCurDqLayer->pDec->pMbType[iMbXy] = g_ksInterBMbTypeInfo[uiMbType].iType;
 2699|   233k|    WelsFillCacheInter (&sNeighAvail, pNonZeroCount, iMotionVector, iRefIndex, pCurDqLayer);
 2700|       |
 2701|   233k|    if ((iRet = ParseInterBInfo (pCtx, iMotionVector, iRefIndex, pBs)) != ERR_NONE) {
  ------------------
  |  Branch (2701:9): [True: 16.0k, False: 217k]
  ------------------
 2702|  16.0k|      return iRet;//abnormal
 2703|  16.0k|    }
 2704|       |
 2705|   217k|    if (pSlice->sSliceHeaderExt.bAdaptiveResidualPredFlag == 1) {
  ------------------
  |  Branch (2705:9): [True: 7.33k, False: 210k]
  ------------------
 2706|  7.33k|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //residual_prediction_flag
  ------------------
  |  |   52|  7.33k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  7.33k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  7.33k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 282, False: 7.05k]
  |  |  ------------------
  |  |   55|  7.33k|    return uiRetTmp; \
  |  |   56|  7.33k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 7.05k]
  |  |  ------------------
  ------------------
 2707|  7.05k|      pCurDqLayer->pResidualPredFlag[iMbXy] = uiCode;
 2708|   210k|    } else {
 2709|   210k|      pCurDqLayer->pResidualPredFlag[iMbXy] = pSlice->sSliceHeaderExt.bDefaultResidualPredFlag;
 2710|   210k|    }
 2711|       |
 2712|   217k|    if (pCurDqLayer->pResidualPredFlag[iMbXy] == 0) {
  ------------------
  |  Branch (2712:9): [True: 216k, False: 400]
  ------------------
 2713|   216k|      pCurDqLayer->pInterPredictionDoneFlag[iMbXy] = 0;
 2714|   216k|    } else {
 2715|    400|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "residual_pred_flag = 1 not supported.");
 2716|    400|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_UNSUPPORTED_ILP);
  ------------------
  |  |   59|    400|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2717|    400|    }
 2718|   217k|  } else { //intra MB type
 2719|  21.5k|    uiMbType -= 23;
 2720|  21.5k|    if (uiMbType > 25)
  ------------------
  |  Branch (2720:9): [True: 11.8k, False: 9.69k]
  ------------------
 2721|  11.8k|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_TYPE);
  ------------------
  |  |   59|  11.8k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2722|  9.69k|    if (!pCtx->pSps->uiChromaFormatIdc && ((uiMbType >= 5 && uiMbType <= 12) || (uiMbType >= 17 && uiMbType <= 24)))
  ------------------
  |  Branch (2722:9): [True: 3.84k, False: 5.85k]
  |  Branch (2722:45): [True: 1.85k, False: 1.99k]
  |  Branch (2722:62): [True: 208, False: 1.64k]
  |  Branch (2722:82): [True: 1.64k, False: 1.99k]
  |  Branch (2722:100): [True: 217, False: 1.42k]
  ------------------
 2723|    425|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_MB_TYPE);
  ------------------
  |  |   59|    425|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2724|       |
 2725|  9.27k|    if (25 == uiMbType) {
  ------------------
  |  Branch (2725:9): [True: 1.98k, False: 7.29k]
  ------------------
 2726|  1.98k|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "I_PCM mode exists in B slice!");
 2727|  1.98k|      int32_t iDecStrideL = pCurDqLayer->pDec->iLinesize[0];
 2728|  1.98k|      int32_t iDecStrideC = pCurDqLayer->pDec->iLinesize[1];
 2729|       |
 2730|  1.98k|      int32_t iOffsetL = (iMbX + iMbY * iDecStrideL) << 4;
 2731|  1.98k|      int32_t iOffsetC = (iMbX + iMbY * iDecStrideC) << 3;
 2732|       |
 2733|  1.98k|      uint8_t* pDecY = pCurDqLayer->pDec->pData[0] + iOffsetL;
 2734|  1.98k|      uint8_t* pDecU = pCurDqLayer->pDec->pData[1] + iOffsetC;
 2735|  1.98k|      uint8_t* pDecV = pCurDqLayer->pDec->pData[2] + iOffsetC;
 2736|       |
 2737|  1.98k|      uint8_t* pTmpBsBuf;
 2738|       |
 2739|  1.98k|      int32_t i;
 2740|  1.98k|      int32_t iCopySizeY = (sizeof (uint8_t) << 4);
 2741|  1.98k|      int32_t iCopySizeUV = (sizeof (uint8_t) << 3);
 2742|       |
 2743|  1.98k|      int32_t iIndex = ((-pBs->iLeftBits) >> 3) + 2;
 2744|       |
 2745|  1.98k|      pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA_PCM;
  ------------------
  |  |  284|  1.98k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
 2746|       |
 2747|       |      //step 1: locating bit-stream pointer [must align into integer byte]
 2748|  1.98k|      pBs->pCurBuf -= iIndex;
 2749|       |
 2750|       |      //bounds check: I_PCM copies I_PCM_MB_SIZE_IN_BYTE (256 luma + 128 chroma) bytes
 2751|       |      //directly from the bitstream buffer; reject when fewer bytes remain to avoid
 2752|       |      //an out-of-bounds read (mirrors ParseIPCMInfoCabac).
 2753|  1.98k|      if (pBs->pEndBuf - pBs->pCurBuf < I_PCM_MB_SIZE_IN_BYTE) {
  ------------------
  |  |   42|  1.98k|#define I_PCM_MB_SIZE_IN_BYTE (16 * 16 + 2 * (8 * 8))
  ------------------
  |  Branch (2753:11): [True: 1.31k, False: 671]
  ------------------
 2754|  1.31k|        return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_BS_INCOMPLETE);
  ------------------
  |  |   59|  1.31k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2755|  1.31k|      }
 2756|       |
 2757|       |      //step 2: copy pixel from bit-stream into fdec [reconstruction]
 2758|    671|      pTmpBsBuf = pBs->pCurBuf;
 2759|    671|      if (!pCtx->pParam->bParseOnly) {
  ------------------
  |  Branch (2759:11): [True: 671, False: 0]
  ------------------
 2760|  11.4k|        for (i = 0; i < 16; i++) { //luma
  ------------------
  |  Branch (2760:21): [True: 10.7k, False: 671]
  ------------------
 2761|  10.7k|          memcpy (pDecY, pTmpBsBuf, iCopySizeY);
 2762|  10.7k|          pDecY += iDecStrideL;
 2763|  10.7k|          pTmpBsBuf += 16;
 2764|  10.7k|        }
 2765|       |
 2766|  6.03k|        for (i = 0; i < 8; i++) { //cb
  ------------------
  |  Branch (2766:21): [True: 5.36k, False: 671]
  ------------------
 2767|  5.36k|          memcpy (pDecU, pTmpBsBuf, iCopySizeUV);
 2768|  5.36k|          pDecU += iDecStrideC;
 2769|  5.36k|          pTmpBsBuf += 8;
 2770|  5.36k|        }
 2771|  6.03k|        for (i = 0; i < 8; i++) { //cr
  ------------------
  |  Branch (2771:21): [True: 5.36k, False: 671]
  ------------------
 2772|  5.36k|          memcpy (pDecV, pTmpBsBuf, iCopySizeUV);
 2773|  5.36k|          pDecV += iDecStrideC;
 2774|  5.36k|          pTmpBsBuf += 8;
 2775|  5.36k|        }
 2776|    671|      }
 2777|       |
 2778|    671|      pBs->pCurBuf += I_PCM_MB_SIZE_IN_BYTE;
  ------------------
  |  |   42|    671|#define I_PCM_MB_SIZE_IN_BYTE (16 * 16 + 2 * (8 * 8))
  ------------------
 2779|       |
 2780|       |      //step 3: update QP and pNonZeroCount
 2781|    671|      pCurDqLayer->pLumaQp[iMbXy] = 0;
 2782|    671|      pCurDqLayer->pChromaQp[iMbXy][0] = pCurDqLayer->pChromaQp[iMbXy][1] = 0;
 2783|       |      //Rec. 9.2.1 for PCM, nzc=16
 2784|    671|      ST32A4 (&pNzc[0], 0x10101010);
  ------------------
  |  |   80|    671|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    671|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2785|    671|      ST32A4 (&pNzc[4], 0x10101010);
  ------------------
  |  |   80|    671|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    671|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2786|    671|      ST32A4 (&pNzc[8], 0x10101010);
  ------------------
  |  |   80|    671|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    671|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2787|    671|      ST32A4 (&pNzc[12], 0x10101010);
  ------------------
  |  |   80|    671|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    671|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2788|    671|      ST32A4 (&pNzc[16], 0x10101010);
  ------------------
  |  |   80|    671|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    671|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2789|    671|      ST32A4 (&pNzc[20], 0x10101010);
  ------------------
  |  |   80|    671|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    671|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2790|    671|      WELS_READ_VERIFY (InitReadBits (pBs, 0));
  ------------------
  |  |   52|    671|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|    671|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|    671|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 671]
  |  |  ------------------
  |  |   55|    671|    return uiRetTmp; \
  |  |   56|    671|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 671]
  |  |  ------------------
  ------------------
 2791|    671|      return ERR_NONE;
 2792|  7.29k|    } else {
 2793|  7.29k|      if (0 == uiMbType) {
  ------------------
  |  Branch (2793:11): [True: 3.76k, False: 3.52k]
  ------------------
 2794|  3.76k|        ENFORCE_STACK_ALIGN_1D (int8_t, pIntraPredMode, 48, 16);
  ------------------
  |  |   58|  3.76k|    _tp _nm ## _tEmP[(_sz)+(_al)-1]; \
  |  |   59|  3.76k|    _tp *_nm = _nm ## _tEmP + ((_al)-1) - (((uintptr_t)(_nm ## _tEmP + ((_al)-1)) & ((_al)-1))/sizeof(_tp));
  ------------------
 2795|  3.76k|        pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA4x4;
  ------------------
  |  |  275|  3.76k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
 2796|  3.76k|        if (pCtx->pPps->bTransform8x8ModeFlag) {
  ------------------
  |  Branch (2796:13): [True: 3.36k, False: 395]
  ------------------
 2797|  3.36k|          WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //transform_size_8x8_flag
  ------------------
  |  |   52|  3.36k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.36k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.36k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 214, False: 3.15k]
  |  |  ------------------
  |  |   55|  3.36k|    return uiRetTmp; \
  |  |   56|  3.36k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.15k]
  |  |  ------------------
  ------------------
 2798|  3.15k|          pCurDqLayer->pTransformSize8x8Flag[iMbXy] = !!uiCode;
 2799|  3.15k|          if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (2799:15): [True: 2.27k, False: 881]
  ------------------
 2800|  2.27k|            uiMbType = pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA8x8;
  ------------------
  |  |  277|  2.27k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
 2801|  2.27k|          }
 2802|  3.15k|        }
 2803|  3.54k|        if (!pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (2803:13): [True: 1.27k, False: 2.27k]
  ------------------
 2804|  1.27k|          pCtx->pFillInfoCacheIntraNxNFunc (&sNeighAvail, pNonZeroCount, pIntraPredMode, pCurDqLayer);
 2805|  1.27k|          WELS_READ_VERIFY (ParseIntra4x4Mode (pCtx, &sNeighAvail, pIntraPredMode, pBs, pCurDqLayer));
  ------------------
  |  |   52|  1.27k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.27k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.27k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 709, False: 567]
  |  |  ------------------
  |  |   55|  1.27k|    return uiRetTmp; \
  |  |   56|  1.27k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 567]
  |  |  ------------------
  ------------------
 2806|  2.27k|        } else {
 2807|  2.27k|          pCtx->pFillInfoCacheIntraNxNFunc (&sNeighAvail, pNonZeroCount, pIntraPredMode, pCurDqLayer);
 2808|  2.27k|          WELS_READ_VERIFY (ParseIntra8x8Mode (pCtx, &sNeighAvail, pIntraPredMode, pBs, pCurDqLayer));
  ------------------
  |  |   52|  2.27k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.27k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.27k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 436, False: 1.83k]
  |  |  ------------------
  |  |   55|  2.27k|    return uiRetTmp; \
  |  |   56|  2.27k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.83k]
  |  |  ------------------
  ------------------
 2809|  2.27k|        }
 2810|  3.54k|      } else { //I_PCM exclude, we can ignore it
 2811|  3.52k|        pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA16x16;
  ------------------
  |  |  276|  3.52k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
 2812|  3.52k|        pCurDqLayer->pTransformSize8x8Flag[iMbXy] = false;
 2813|  3.52k|        pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] = true;
 2814|  3.52k|        pCurDqLayer->pIntraPredMode[iMbXy][7] = (uiMbType - 1) & 3;
 2815|  3.52k|        pCurDqLayer->pCbp[iMbXy] = g_kuiI16CbpTable[ (uiMbType - 1) >> 2];
 2816|  3.52k|        uiCbpC = pCtx->pSps->uiChromaFormatIdc ? pCurDqLayer->pCbp[iMbXy] >> 4 : 0;
  ------------------
  |  Branch (2816:18): [True: 2.01k, False: 1.51k]
  ------------------
 2817|  3.52k|        uiCbpL = pCurDqLayer->pCbp[iMbXy] & 15;
 2818|  3.52k|        WelsFillCacheNonZeroCount (&sNeighAvail, pNonZeroCount, pCurDqLayer);
 2819|  3.52k|        if ((iRet = ParseIntra16x16Mode (pCtx, &sNeighAvail, pBs, pCurDqLayer)) != ERR_NONE) {
  ------------------
  |  Branch (2819:13): [True: 520, False: 3.00k]
  ------------------
 2820|    520|          return iRet;
 2821|    520|        }
 2822|  3.52k|      }
 2823|  7.29k|    }
 2824|  9.27k|  }
 2825|       |
 2826|   222k|  if (MB_TYPE_INTRA16x16 != pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|   222k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (2826:7): [True: 219k, False: 3.00k]
  ------------------
 2827|   219k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //coded_block_pattern
  ------------------
  |  |   52|   219k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   219k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   219k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 5.05k, False: 214k]
  |  |  ------------------
  |  |   55|   219k|    return uiRetTmp; \
  |  |   56|   219k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 214k]
  |  |  ------------------
  ------------------
 2828|   214k|    uiCbp = uiCode;
 2829|   214k|    {
 2830|   214k|      if (pCtx->pSps->uiChromaFormatIdc && (uiCbp > 47))
  ------------------
  |  Branch (2830:11): [True: 190k, False: 24.0k]
  |  Branch (2830:44): [True: 1.14k, False: 189k]
  ------------------
 2831|  1.14k|        return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_CBP);
  ------------------
  |  |   59|  1.14k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2832|   213k|      if (!pCtx->pSps->uiChromaFormatIdc && (uiCbp > 15))
  ------------------
  |  Branch (2832:11): [True: 24.0k, False: 189k]
  |  Branch (2832:45): [True: 873, False: 23.1k]
  ------------------
 2833|    873|        return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_CBP);
  ------------------
  |  |   59|    873|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2834|   212k|      if (MB_TYPE_INTRA4x4 == pCurDqLayer->pDec->pMbType[iMbXy] || MB_TYPE_INTRA8x8 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  275|   212k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
                    if (MB_TYPE_INTRA4x4 == pCurDqLayer->pDec->pMbType[iMbXy] || MB_TYPE_INTRA8x8 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  277|   211k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
  |  Branch (2834:11): [True: 567, False: 211k]
  |  Branch (2834:68): [True: 1.83k, False: 209k]
  ------------------
 2835|       |
 2836|  2.40k|        uiCbp = pCtx->pSps->uiChromaFormatIdc ? g_kuiIntra4x4CbpTable[uiCbp] : g_kuiIntra4x4CbpTable400[uiCbp];
  ------------------
  |  Branch (2836:17): [True: 2.20k, False: 199]
  ------------------
 2837|  2.40k|      } else //inter
 2838|   209k|        uiCbp = pCtx->pSps->uiChromaFormatIdc ? g_kuiInterCbpTable[uiCbp] : g_kuiInterCbpTable400[uiCbp];
  ------------------
  |  Branch (2838:17): [True: 186k, False: 22.9k]
  ------------------
 2839|   212k|    }
 2840|       |
 2841|      0|    pCurDqLayer->pCbp[iMbXy] = uiCbp;
 2842|   212k|    uiCbpC = pCurDqLayer->pCbp[iMbXy] >> 4;
 2843|   212k|    uiCbpL = pCurDqLayer->pCbp[iMbXy] & 15;
 2844|       |
 2845|       |    // Need modification when B picutre add in
 2846|   212k|    bool bNeedParseTransformSize8x8Flag =
 2847|   212k|      (((pCurDqLayer->pDec->pMbType[iMbXy] >= MB_TYPE_16x16 && pCurDqLayer->pDec->pMbType[iMbXy] <= MB_TYPE_8x16)
  ------------------
  |  |  278|   424k|#define MB_TYPE_16x16       0x00000008
  ------------------
                    (((pCurDqLayer->pDec->pMbType[iMbXy] >= MB_TYPE_16x16 && pCurDqLayer->pDec->pMbType[iMbXy] <= MB_TYPE_8x16)
  ------------------
  |  |  280|   209k|#define MB_TYPE_8x16        0x00000020
  ------------------
  |  Branch (2847:10): [True: 209k, False: 2.40k]
  |  Branch (2847:64): [True: 0, False: 209k]
  ------------------
 2848|   212k|        || pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy])
  ------------------
  |  Branch (2848:12): [True: 205k, False: 6.45k]
  ------------------
 2849|   205k|       && (pCurDqLayer->pDec->pMbType[iMbXy] != MB_TYPE_INTRA8x8)
  ------------------
  |  |  277|   205k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
  |  Branch (2849:11): [True: 203k, False: 1.83k]
  ------------------
 2850|   203k|       && (pCurDqLayer->pDec->pMbType[iMbXy] != MB_TYPE_INTRA4x4)
  ------------------
  |  |  275|   203k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
  |  Branch (2850:11): [True: 203k, False: 567]
  ------------------
 2851|   203k|       && (uiCbpL > 0)
  ------------------
  |  Branch (2851:11): [True: 58.0k, False: 145k]
  ------------------
 2852|  58.0k|       && (pCtx->pPps->bTransform8x8ModeFlag));
  ------------------
  |  Branch (2852:11): [True: 27.3k, False: 30.7k]
  ------------------
 2853|       |
 2854|   212k|    if (bNeedParseTransformSize8x8Flag) {
  ------------------
  |  Branch (2854:9): [True: 27.3k, False: 184k]
  ------------------
 2855|  27.3k|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //transform_size_8x8_flag
  ------------------
  |  |   52|  27.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  27.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  27.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 234, False: 27.0k]
  |  |  ------------------
  |  |   55|  27.3k|    return uiRetTmp; \
  |  |   56|  27.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 27.0k]
  |  |  ------------------
  ------------------
 2856|  27.0k|      pCurDqLayer->pTransformSize8x8Flag[iMbXy] = !!uiCode;
 2857|  27.0k|    }
 2858|   212k|  }
 2859|       |
 2860|   214k|  ST32A4 (&pNzc[0], 0);
  ------------------
  |  |   80|   214k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|   214k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2861|   214k|  ST32A4 (&pNzc[4], 0);
  ------------------
  |  |   80|   214k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|   214k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2862|   214k|  ST32A4 (&pNzc[8], 0);
  ------------------
  |  |   80|   214k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|   214k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2863|   214k|  ST32A4 (&pNzc[12], 0);
  ------------------
  |  |   80|   214k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|   214k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2864|   214k|  ST32A4 (&pNzc[16], 0);
  ------------------
  |  |   80|   214k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|   214k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2865|   214k|  ST32A4 (&pNzc[20], 0);
  ------------------
  |  |   80|   214k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|   214k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2866|   214k|  if (pCurDqLayer->pCbp[iMbXy] == 0 && !IS_INTRA16x16 (pCurDqLayer->pDec->pMbType[iMbXy])
  ------------------
  |  |  304|   352k|#define IS_INTRA16x16(type) ( MB_TYPE_INTRA16x16 == (type) )
  |  |  ------------------
  |  |  |  |  276|   137k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  ------------------
  ------------------
  |  Branch (2866:7): [True: 137k, False: 77.1k]
  |  Branch (2866:40): [True: 136k, False: 1.57k]
  ------------------
 2867|   136k|      && !IS_I_BL (pCurDqLayer->pDec->pMbType[iMbXy])) {
  ------------------
  |  |  318|   136k|#define IS_I_BL(type) ( (type) == MB_TYPE_INTRA_BL )
  |  |  ------------------
  |  |  |  |  285|   136k|#define MB_TYPE_INTRA_BL    0x00000400
  |  |  ------------------
  ------------------
  |  Branch (2867:10): [True: 136k, False: 0]
  ------------------
 2868|   136k|    pCurDqLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp;
 2869|   408k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (2869:17): [True: 272k, False: 136k]
  ------------------
 2870|   272k|      pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 (pCurDqLayer->pLumaQp[iMbXy] +
  ------------------
  |  |  204|   272k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 1.08k, False: 271k]
  |  |  |  Branch (204:55): [True: 331, False: 271k]
  |  |  ------------------
  ------------------
 2871|   272k|                                         pSliceHeader->pPps->iChromaQpIndexOffset[i], 0, 51)];
 2872|   272k|    }
 2873|   136k|  }
 2874|       |
 2875|   214k|  if (pCurDqLayer->pCbp[iMbXy] || MB_TYPE_INTRA16x16 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|   137k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (2875:7): [True: 77.1k, False: 137k]
  |  Branch (2875:35): [True: 1.57k, False: 136k]
  ------------------
 2876|  78.7k|    int32_t iQpDelta, iId8x8, iId4x4;
 2877|  78.7k|    memset (pCurDqLayer->pScaledTCoeff[iMbXy], 0, MB_COEFF_LIST_SIZE * sizeof (int16_t));
  ------------------
  |  |   55|  78.7k|#define MB_COEFF_LIST_SIZE      (256+((MB_WIDTH_CHROMA*MB_HEIGHT_CHROMA)<<1))
  |  |  ------------------
  |  |  |  |   51|  78.7k|#define MB_WIDTH_CHROMA         (MB_WIDTH_LUMA>>1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   50|  78.7k|#define MB_WIDTH_LUMA           16
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define MB_COEFF_LIST_SIZE      (256+((MB_WIDTH_CHROMA*MB_HEIGHT_CHROMA)<<1))
  |  |  ------------------
  |  |  |  |   54|  78.7k|#define MB_HEIGHT_CHROMA        (MB_HEIGHT_LUMA>>1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   53|  78.7k|#define MB_HEIGHT_LUMA          16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2878|  78.7k|    WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mb_qp_delta
  ------------------
  |  |   52|  78.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  78.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  78.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.07k, False: 77.6k]
  |  |  ------------------
  |  |   55|  78.7k|    return uiRetTmp; \
  |  |   56|  78.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 77.6k]
  |  |  ------------------
  ------------------
 2879|  77.6k|    iQpDelta = iCode;
 2880|       |
 2881|  77.6k|    if (iQpDelta > 25 || iQpDelta < -26) { //out of iQpDelta range
  ------------------
  |  Branch (2881:9): [True: 400, False: 77.2k]
  |  Branch (2881:26): [True: 318, False: 76.9k]
  ------------------
 2882|    718|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_QP);
  ------------------
  |  |   59|    718|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2883|    718|    }
 2884|       |
 2885|  76.9k|    pCurDqLayer->pLumaQp[iMbXy] = (pSlice->iLastMbQp + iQpDelta + 52) % 52; //update last_mb_qp
 2886|  76.9k|    pSlice->iLastMbQp = pCurDqLayer->pLumaQp[iMbXy];
 2887|   230k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (2887:17): [True: 153k, False: 76.9k]
  ------------------
 2888|   153k|      pCurDqLayer->pChromaQp[iMbXy][i] = g_kuiChromaQpTable[WELS_CLIP3 (pSlice->iLastMbQp +
  ------------------
  |  |  204|   153k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 1.16k, False: 152k]
  |  |  |  Branch (204:55): [True: 352, False: 152k]
  |  |  ------------------
  ------------------
 2889|   153k|                                         pSliceHeader->pPps->iChromaQpIndexOffset[i], 0,
 2890|   153k|                                         51)];
 2891|   153k|    }
 2892|       |
 2893|  76.9k|    BsStartCavlc (pBs);
 2894|       |
 2895|  76.9k|    if (MB_TYPE_INTRA16x16 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  276|  76.9k|#define MB_TYPE_INTRA16x16  0x00000002
  ------------------
  |  Branch (2895:9): [True: 2.97k, False: 73.9k]
  ------------------
 2896|       |      //step1: Luma DC
 2897|  2.97k|      if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, 0, 16, g_kuiLumaDcZigzagScan, I16_LUMA_DC,
  ------------------
  |  |   70|  2.97k|#define I16_LUMA_DC  1
  ------------------
  |  Branch (2897:11): [True: 248, False: 2.72k]
  ------------------
 2898|  2.97k|                                          pCurDqLayer->pScaledTCoeff[iMbXy], pCurDqLayer->pLumaQp[iMbXy], pCtx)) != ERR_NONE) {
 2899|    248|        return iRet;//abnormal
 2900|    248|      }
 2901|       |      //step2: Luma AC
 2902|  2.72k|      if (uiCbpL) {
  ------------------
  |  Branch (2902:11): [True: 633, False: 2.09k]
  ------------------
 2903|  7.58k|        for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (2903:21): [True: 7.16k, False: 413]
  ------------------
 2904|  7.16k|          if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, i, iScanIdxEnd - WELS_MAX (iScanIdxStart, 1) + 1,
  ------------------
  |  |   91|  7.16k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 0, False: 7.16k]
  |  |  ------------------
  ------------------
  |  Branch (2904:15): [True: 220, False: 6.94k]
  ------------------
 2905|  7.16k|                                              g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1), I16_LUMA_AC, pCurDqLayer->pScaledTCoeff[iMbXy] + (i << 4),
  ------------------
  |  |   91|  7.16k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 0, False: 7.16k]
  |  |  ------------------
  ------------------
                                                            g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1), I16_LUMA_AC, pCurDqLayer->pScaledTCoeff[iMbXy] + (i << 4),
  ------------------
  |  |   71|  7.16k|#define I16_LUMA_AC  2
  ------------------
 2906|  7.16k|                                              pCurDqLayer->pLumaQp[iMbXy], pCtx)) != ERR_NONE) {
 2907|    220|            return iRet;//abnormal
 2908|    220|          }
 2909|  7.16k|        }
 2910|    413|        ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   80|    413|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    413|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2911|    413|        ST32A4 (&pNzc[4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   80|    413|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    413|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2912|    413|        ST32A4 (&pNzc[8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   80|    413|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    413|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2913|    413|        ST32A4 (&pNzc[12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   80|    413|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    413|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2914|    413|      }
 2915|  73.9k|    } else { //non-MB_TYPE_INTRA16x16
 2916|  73.9k|      if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
  ------------------
  |  Branch (2916:11): [True: 23.0k, False: 50.9k]
  ------------------
 2917|   112k|        for (iId8x8 = 0; iId8x8 < 4; iId8x8++) {
  ------------------
  |  Branch (2917:26): [True: 90.2k, False: 22.1k]
  ------------------
 2918|  90.2k|          iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA_8 : LUMA_DC_AC_INTER_8;
  ------------------
  |  |  305|  90.2k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  90.2k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  90.2k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  90.2k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  90.2k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  90.2k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                        iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA_8 : LUMA_DC_AC_INTER_8;
  ------------------
  |  |   86|  6.29k|#define LUMA_DC_AC_INTRA_8  17
  ------------------
                        iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA_8 : LUMA_DC_AC_INTER_8;
  ------------------
  |  |   87|   174k|#define LUMA_DC_AC_INTER_8  18
  ------------------
  |  Branch (2918:28): [True: 6.29k, False: 83.9k]
  ------------------
 2919|  90.2k|          if (uiCbpL & (1 << iId8x8)) {
  ------------------
  |  Branch (2919:15): [True: 31.4k, False: 58.7k]
  ------------------
 2920|  31.4k|            int32_t iIndex = (iId8x8 << 2);
 2921|   154k|            for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (2921:30): [True: 123k, False: 30.4k]
  ------------------
 2922|   123k|              if ((iRet = WelsResidualBlockCavlc8x8 (pVlcTable, pNonZeroCount, pBs, iIndex, iScanIdxEnd - iScanIdxStart + 1,
  ------------------
  |  Branch (2922:19): [True: 969, False: 122k]
  ------------------
 2923|   123k|                                                     g_kuiZigzagScan8x8 + iScanIdxStart, iMbResProperty, pCurDqLayer->pScaledTCoeff[iMbXy] + (iId8x8 << 6), iId4x4,
 2924|   123k|                                                     pCurDqLayer->pLumaQp[iMbXy], pCtx)) != ERR_NONE) {
 2925|    969|                return iRet;
 2926|    969|              }
 2927|   122k|              iIndex++;
 2928|   122k|            }
 2929|  58.7k|          } else {
 2930|  58.7k|            ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[iId8x8 << 2]], 0);
  ------------------
  |  |   66|  58.7k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 2931|  58.7k|            ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[ (iId8x8 << 2) + 2]], 0);
  ------------------
  |  |   66|  58.7k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 2932|  58.7k|          }
 2933|  90.2k|        }
 2934|  22.1k|        ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   80|  22.1k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  22.1k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2935|  22.1k|        ST32A4 (&pNzc[4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   80|  22.1k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  22.1k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2936|  22.1k|        ST32A4 (&pNzc[8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   80|  22.1k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  22.1k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2937|  22.1k|        ST32A4 (&pNzc[12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   80|  22.1k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  22.1k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2938|  50.9k|      } else { // Normal T4x4
 2939|   250k|        for (iId8x8 = 0; iId8x8 < 4; iId8x8++) {
  ------------------
  |  Branch (2939:26): [True: 200k, False: 49.6k]
  ------------------
 2940|   200k|          iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA : LUMA_DC_AC_INTER;
  ------------------
  |  |  305|   200k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|   200k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|   200k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|   200k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   200k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|   200k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                        iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA : LUMA_DC_AC_INTER;
  ------------------
  |  |   80|  2.21k|#define LUMA_DC_AC_INTRA 11
  ------------------
                        iMbResProperty = (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy])) ? LUMA_DC_AC_INTRA : LUMA_DC_AC_INTER;
  ------------------
  |  |   81|   399k|#define LUMA_DC_AC_INTER 12
  ------------------
  |  Branch (2940:28): [True: 2.21k, False: 198k]
  ------------------
 2941|   200k|          if (uiCbpL & (1 << iId8x8)) {
  ------------------
  |  Branch (2941:15): [True: 40.8k, False: 159k]
  ------------------
 2942|  40.8k|            int32_t iIndex = (iId8x8 << 2);
 2943|   201k|            for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (2943:30): [True: 162k, False: 39.6k]
  ------------------
 2944|       |              //Luma (DC and AC decoding together)
 2945|   162k|              if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, iIndex, iScanIdxEnd - iScanIdxStart + 1,
  ------------------
  |  Branch (2945:19): [True: 1.20k, False: 160k]
  ------------------
 2946|   162k|                                                  g_kuiZigzagScan + iScanIdxStart, iMbResProperty, pCurDqLayer->pScaledTCoeff[iMbXy] + (iIndex << 4),
 2947|   162k|                                                  pCurDqLayer->pLumaQp[iMbXy], pCtx)) != ERR_NONE) {
 2948|  1.20k|                return iRet;//abnormal
 2949|  1.20k|              }
 2950|   160k|              iIndex++;
 2951|   160k|            }
 2952|   159k|          } else {
 2953|   159k|            ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[iId8x8 << 2]], 0);
  ------------------
  |  |   66|   159k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 2954|   159k|            ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[ (iId8x8 << 2) + 2]], 0);
  ------------------
  |  |   66|   159k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
 2955|   159k|          }
 2956|   200k|        }
 2957|  49.6k|        ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));
  ------------------
  |  |   80|  49.6k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  49.6k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2958|  49.6k|        ST32A4 (&pNzc[4], LD32 (&pNonZeroCount[1 + 8 * 2]));
  ------------------
  |  |   80|  49.6k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  49.6k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2959|  49.6k|        ST32A4 (&pNzc[8], LD32 (&pNonZeroCount[1 + 8 * 3]));
  ------------------
  |  |   80|  49.6k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  49.6k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2960|  49.6k|        ST32A4 (&pNzc[12], LD32 (&pNonZeroCount[1 + 8 * 4]));
  ------------------
  |  |   80|  49.6k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  49.6k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 2961|  49.6k|      }
 2962|  73.9k|    }
 2963|       |
 2964|       |
 2965|       |    //chroma
 2966|       |    //step1: DC
 2967|  74.3k|    if (1 == uiCbpC || 2 == uiCbpC) {
  ------------------
  |  Branch (2967:9): [True: 16.3k, False: 57.9k]
  |  Branch (2967:24): [True: 3.49k, False: 54.4k]
  ------------------
 2968|  57.1k|      for (i = 0; i < 2; i++) { //Cb Cr
  ------------------
  |  Branch (2968:19): [True: 38.9k, False: 18.1k]
  ------------------
 2969|  38.9k|        if (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy]))
  ------------------
  |  |  305|  38.9k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  38.9k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  38.9k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  38.9k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  38.9k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  38.9k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 5.27k, False: 33.7k]
  |  |  ------------------
  ------------------
 2970|  5.27k|          iMbResProperty = i ? CHROMA_DC_V : CHROMA_DC_U;
  ------------------
  |  |   77|  2.46k|#define CHROMA_DC_V  8
  ------------------
                        iMbResProperty = i ? CHROMA_DC_V : CHROMA_DC_U;
  ------------------
  |  |   76|  2.80k|#define CHROMA_DC_U  7
  ------------------
  |  Branch (2970:28): [True: 2.46k, False: 2.80k]
  ------------------
 2971|  33.7k|        else
 2972|  33.7k|          iMbResProperty = i ? CHROMA_DC_V_INTER : CHROMA_DC_U_INTER;
  ------------------
  |  |   83|  16.6k|#define CHROMA_DC_V_INTER  14
  ------------------
                        iMbResProperty = i ? CHROMA_DC_V_INTER : CHROMA_DC_U_INTER;
  ------------------
  |  |   82|  17.0k|#define CHROMA_DC_U_INTER  13
  ------------------
  |  Branch (2972:28): [True: 16.6k, False: 17.0k]
  ------------------
 2973|       |
 2974|  38.9k|        if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, 16 + (i << 2), 4, g_kuiChromaDcScan, iMbResProperty,
  ------------------
  |  Branch (2974:13): [True: 1.64k, False: 37.3k]
  ------------------
 2975|  38.9k|                                            pCurDqLayer->pScaledTCoeff[iMbXy] + 256 + (i << 6), pCurDqLayer->pChromaQp[iMbXy][i], pCtx)) != ERR_NONE) {
 2976|  1.64k|          return iRet;//abnormal
 2977|  1.64k|        }
 2978|  38.9k|      }
 2979|  54.4k|    } else {
 2980|  54.4k|    }
 2981|       |    //step2: AC
 2982|  72.6k|    if (2 == uiCbpC) {
  ------------------
  |  Branch (2982:9): [True: 3.30k, False: 69.3k]
  ------------------
 2983|  9.25k|      for (i = 0; i < 2; i++) { //Cb Cr
  ------------------
  |  Branch (2983:19): [True: 6.29k, False: 2.95k]
  ------------------
 2984|  6.29k|        if (IS_INTRA (pCurDqLayer->pDec->pMbType[iMbXy]))
  ------------------
  |  |  305|  6.29k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  6.29k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  6.29k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  6.29k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.29k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  6.29k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 882, False: 5.41k]
  |  |  ------------------
  ------------------
 2985|    882|          iMbResProperty = i ? CHROMA_AC_V : CHROMA_AC_U;
  ------------------
  |  |   79|    431|#define CHROMA_AC_V  10
  ------------------
                        iMbResProperty = i ? CHROMA_AC_V : CHROMA_AC_U;
  ------------------
  |  |   78|    451|#define CHROMA_AC_U  9
  ------------------
  |  Branch (2985:28): [True: 431, False: 451]
  ------------------
 2986|  5.41k|        else
 2987|  5.41k|          iMbResProperty = i ? CHROMA_AC_V_INTER : CHROMA_AC_U_INTER;
  ------------------
  |  |   85|  2.56k|#define CHROMA_AC_V_INTER  16
  ------------------
                        iMbResProperty = i ? CHROMA_AC_V_INTER : CHROMA_AC_U_INTER;
  ------------------
  |  |   84|  2.85k|#define CHROMA_AC_U_INTER  15
  ------------------
  |  Branch (2987:28): [True: 2.56k, False: 2.85k]
  ------------------
 2988|       |
 2989|  6.29k|        int32_t iIndex = 16 + (i << 2);
 2990|  30.3k|        for (iId4x4 = 0; iId4x4 < 4; iId4x4++) {
  ------------------
  |  Branch (2990:26): [True: 24.4k, False: 5.95k]
  ------------------
 2991|  24.4k|          if ((iRet = WelsResidualBlockCavlc (pVlcTable, pNonZeroCount, pBs, iIndex, iScanIdxEnd - WELS_MAX (iScanIdxStart,
  ------------------
  |  |   91|  24.4k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 0, False: 24.4k]
  |  |  ------------------
  ------------------
  |  Branch (2991:15): [True: 344, False: 24.0k]
  ------------------
 2992|  24.4k|                                              1) + 1, g_kuiZigzagScan + WELS_MAX (iScanIdxStart, 1), iMbResProperty,
  ------------------
  |  |   91|  24.4k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 0, False: 24.4k]
  |  |  ------------------
  ------------------
 2993|  24.4k|                                              pCurDqLayer->pScaledTCoeff[iMbXy] + (iIndex << 4),
 2994|  24.4k|                                              pCurDqLayer->pChromaQp[iMbXy][i], pCtx)) != ERR_NONE) {
 2995|    344|            return iRet;//abnormal
 2996|    344|          }
 2997|  24.0k|          iIndex++;
 2998|  24.0k|        }
 2999|  6.29k|      }
 3000|  2.95k|      ST16A2 (&pNzc[16], LD16A2 (&pNonZeroCount[6 + 8 * 1]));
  ------------------
  |  |   78|  2.95k|#define ST16A2(a, b) STA(a, b, 16, 2)
  |  |  ------------------
  |  |  |  |   71|  2.95k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 3001|  2.95k|      ST16A2 (&pNzc[20], LD16A2 (&pNonZeroCount[6 + 8 * 2]));
  ------------------
  |  |   78|  2.95k|#define ST16A2(a, b) STA(a, b, 16, 2)
  |  |  ------------------
  |  |  |  |   71|  2.95k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 3002|  2.95k|      ST16A2 (&pNzc[18], LD16A2 (&pNonZeroCount[6 + 8 * 4]));
  ------------------
  |  |   78|  2.95k|#define ST16A2(a, b) STA(a, b, 16, 2)
  |  |  ------------------
  |  |  |  |   71|  2.95k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 3003|  2.95k|      ST16A2 (&pNzc[22], LD16A2 (&pNonZeroCount[6 + 8 * 5]));
  ------------------
  |  |   78|  2.95k|#define ST16A2(a, b) STA(a, b, 16, 2)
  |  |  ------------------
  |  |  |  |   71|  2.95k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 3004|  2.95k|    }
 3005|  72.3k|    BsEndCavlc (pBs);
 3006|  72.3k|  }
 3007|       |
 3008|   208k|  return ERR_NONE;
 3009|   214k|}
_ZN7WelsDec17WelsBlockFuncInitEPNS_12TagBlockFuncEi:
 3011|  26.4k|void WelsBlockFuncInit (SBlockFunc*    pFunc,  int32_t iCpu) {
 3012|  26.4k|  pFunc->pWelsSetNonZeroCountFunc   = WelsNonZeroCount_c;
 3013|  26.4k|  pFunc->pWelsBlockZero16x16Func    = WelsBlockZero16x16_c;
 3014|  26.4k|  pFunc->pWelsBlockZero8x8Func      = WelsBlockZero8x8_c;
 3015|       |
 3016|       |#ifdef HAVE_NEON
 3017|       |  if (iCpu & WELS_CPU_NEON) {
 3018|       |    pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_neon;
 3019|       |    pFunc->pWelsBlockZero16x16Func  = WelsBlockZero16x16_neon;
 3020|       |    pFunc->pWelsBlockZero8x8Func    = WelsBlockZero8x8_neon;
 3021|       |  }
 3022|       |#endif
 3023|       |
 3024|       |#if defined(HAVE_NEON_AARCH64) && defined(__aarch64__)
 3025|       |  if (iCpu & WELS_CPU_NEON) {
 3026|       |    pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_AArch64_neon;
 3027|       |    pFunc->pWelsBlockZero16x16Func  = WelsBlockZero16x16_AArch64_neon;
 3028|       |    pFunc->pWelsBlockZero8x8Func    = WelsBlockZero8x8_AArch64_neon;
 3029|       |  }
 3030|       |#endif
 3031|       |
 3032|  26.4k|#if defined(X86_ASM)
 3033|  26.4k|  if (iCpu & WELS_CPU_SSE2) {
  ------------------
  |  |   49|  26.4k|#define WELS_CPU_SSE2       0x00000008    /* sse 2 */
  ------------------
  |  Branch (3033:7): [True: 26.4k, False: 0]
  ------------------
 3034|  26.4k|    pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_sse2;
 3035|  26.4k|    pFunc->pWelsBlockZero16x16Func  = WelsBlockZero16x16_sse2;
 3036|  26.4k|    pFunc->pWelsBlockZero8x8Func    = WelsBlockZero8x8_sse2;
 3037|  26.4k|  }
 3038|  26.4k|#endif
 3039|       |
 3040|  26.4k|}
_ZN7WelsDec31ComputeColocatedTemporalScalingEPNS_21TagWelsDecoderContextE:
 3062|  65.7k|bool ComputeColocatedTemporalScaling (PWelsDecoderContext pCtx) {
 3063|  65.7k|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
 3064|  65.7k|  PSlice pCurSlice = &pCurDqLayer->sLayerInfo.sSliceInLayer;
 3065|  65.7k|  PSliceHeader pSliceHeader = &pCurSlice->sSliceHeaderExt.sSliceHeader;
 3066|  65.7k|  if (!pSliceHeader->iDirectSpatialMvPredFlag) {
  ------------------
  |  Branch (3066:7): [True: 65.7k, False: 0]
  ------------------
 3067|  65.7k|    uint32_t uiRefCount = pSliceHeader->uiRefCount[LIST_0];
 3068|  65.7k|    if (pCtx->sRefPic.pRefList[LIST_1][0] != NULL) {
  ------------------
  |  Branch (3068:9): [True: 54.7k, False: 11.0k]
  ------------------
 3069|   213k|      for (uint32_t i = 0; i < uiRefCount; ++i) {
  ------------------
  |  Branch (3069:28): [True: 158k, False: 54.7k]
  ------------------
 3070|   158k|        if (pCtx->sRefPic.pRefList[LIST_0][i] != NULL) {
  ------------------
  |  Branch (3070:13): [True: 64.4k, False: 94.2k]
  ------------------
 3071|  64.4k|          const int32_t poc0 = pCtx->sRefPic.pRefList[LIST_0][i]->iFramePoc;
 3072|  64.4k|          const int32_t poc1 = pCtx->sRefPic.pRefList[LIST_1][0]->iFramePoc;
 3073|  64.4k|          const int32_t poc = pSliceHeader->iPicOrderCntLsb;
 3074|  64.4k|          const int32_t td = WELS_CLIP3 (poc1 - poc0, -128, 127);
  ------------------
  |  |  204|  64.4k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 940, False: 63.5k]
  |  |  |  Branch (204:55): [True: 3.32k, False: 60.2k]
  |  |  ------------------
  ------------------
 3075|  64.4k|          if (td == 0) {
  ------------------
  |  Branch (3075:15): [True: 54.2k, False: 10.1k]
  ------------------
 3076|  54.2k|            pCurSlice->iMvScale[LIST_0][i] = 1 << 8;
 3077|  54.2k|          } else {
 3078|  10.1k|            int32_t tb = WELS_CLIP3 (poc - poc0, -128, 127);
  ------------------
  |  |  204|  10.1k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 2.22k, False: 7.95k]
  |  |  |  Branch (204:55): [True: 5.09k, False: 2.85k]
  |  |  ------------------
  ------------------
 3079|  10.1k|            int32_t tx = (16384 + (abs (td) >> 1)) / td;
 3080|  10.1k|            pCurSlice->iMvScale[LIST_0][i] = WELS_CLIP3 ((tb * tx + 32) >> 6, -1024, 1023);
  ------------------
  |  |  204|  10.1k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 297, False: 9.88k]
  |  |  |  Branch (204:55): [True: 2.00k, False: 7.87k]
  |  |  ------------------
  ------------------
 3081|  10.1k|          }
 3082|  64.4k|        }
 3083|   158k|      }
 3084|  54.7k|    }
 3085|  65.7k|  }
 3086|  65.7k|  return true;
 3087|  65.7k|}
decode_slice.cpp:_ZN7WelsDecL12CheckRefPicsERKPNS_21TagWelsDecoderContextE:
   59|  13.2M|static bool CheckRefPics (const PWelsDecoderContext& pCtx) {
   60|  13.2M|  int32_t listCount = 1;
   61|  13.2M|  if (pCtx->eSliceType == B_SLICE) {
  ------------------
  |  Branch (61:7): [True: 9.57M, False: 3.65M]
  ------------------
   62|  9.57M|    ++listCount;
   63|  9.57M|  }
   64|  36.0M|  for (int32_t list = LIST_0; list < listCount; ++list) {
  ------------------
  |  Branch (64:31): [True: 22.7M, False: 13.2M]
  ------------------
   65|  22.7M|    int32_t shortRefCount = pCtx->sRefPic.uiShortRefCount[list];
   66|  36.4M|    for (int32_t refIdx = 0; refIdx < shortRefCount; ++refIdx) {
  ------------------
  |  Branch (66:30): [True: 13.6M, False: 22.7M]
  ------------------
   67|  13.6M|      if (!pCtx->sRefPic.pShortRefList[list][refIdx]) {
  ------------------
  |  Branch (67:11): [True: 0, False: 13.6M]
  ------------------
   68|      0|        return false;
   69|      0|      }
   70|  13.6M|    }
   71|  22.7M|    int32_t longRefCount = pCtx->sRefPic.uiLongRefCount[list];
   72|  23.4M|    for (int32_t refIdx = 0; refIdx < longRefCount; ++refIdx) {
  ------------------
  |  Branch (72:30): [True: 631k, False: 22.7M]
  ------------------
   73|   631k|      if (!pCtx->sRefPic.pLongRefList[list][refIdx]) {
  ------------------
  |  Branch (73:11): [True: 0, False: 631k]
  ------------------
   74|      0|        return false;
   75|      0|      }
   76|   631k|    }
   77|  22.7M|  }
   78|  13.2M|  return true;
   79|  13.2M|}

DestroyPicBuff:
  260|  40.4k|void DestroyPicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, CMemoryAlign* pMa) {
  261|  40.4k|  PPicBuff pPicBuf = NULL;
  262|       |
  263|  40.4k|  ResetReorderingPictureBuffers (pCtx->pPictReoderingStatus, pCtx->pPictInfoList, false);
  264|       |
  265|  40.4k|  if (NULL == ppPicBuf || NULL == *ppPicBuf)
  ------------------
  |  Branch (265:7): [True: 0, False: 40.4k]
  |  Branch (265:27): [True: 0, False: 40.4k]
  ------------------
  266|      0|    return;
  267|       |
  268|  40.4k|  pPicBuf = *ppPicBuf;
  269|  80.8k|  while (pPicBuf->ppPic != NULL) {
  ------------------
  |  Branch (269:10): [True: 40.4k, False: 40.4k]
  ------------------
  270|  40.4k|    int32_t iPicIdx = 0;
  271|   267k|    while (iPicIdx < pPicBuf->iCapacity) {
  ------------------
  |  Branch (271:12): [True: 227k, False: 40.4k]
  ------------------
  272|   227k|      PPicture pPic = pPicBuf->ppPic[iPicIdx];
  273|   227k|      if (pPic != NULL) {
  ------------------
  |  Branch (273:11): [True: 227k, False: 0]
  ------------------
  274|   227k|        FreePicture (pPic, pMa);
  275|   227k|      }
  276|   227k|      pPic = NULL;
  277|   227k|      ++ iPicIdx;
  278|   227k|    }
  279|       |
  280|  40.4k|    pMa->WelsFree (pPicBuf->ppPic, "pPicBuf->queue");
  281|       |
  282|  40.4k|    pPicBuf->ppPic = NULL;
  283|  40.4k|  }
  284|  40.4k|  pPicBuf->iCapacity = 0;
  285|  40.4k|  pPicBuf->iCurrentIdx = 0;
  286|       |
  287|  40.4k|  pMa->WelsFree (pPicBuf, "pPicBuf");
  288|       |
  289|  40.4k|  pPicBuf = NULL;
  290|       |  *ppPicBuf = NULL;
  291|  40.4k|}
ResetReorderingPictureBuffers:
  295|  69.1k|                                    const bool& fullReset) {
  296|  69.1k|  if (pPictReoderingStatus != NULL && pPictInfo != NULL) {
  ------------------
  |  Branch (296:7): [True: 69.1k, False: 0]
  |  Branch (296:39): [True: 69.1k, False: 0]
  ------------------
  297|  69.1k|    int32_t pictInfoListCount = fullReset ? 16 : (pPictReoderingStatus->iLargestBufferedPicIndex + 1);
  ------------------
  |  Branch (297:33): [True: 22.0k, False: 47.1k]
  ------------------
  298|  69.1k|    pPictReoderingStatus->iPictInfoIndex = 0;
  299|  69.1k|    pPictReoderingStatus->iMinPOC = IMinInt32;
  ------------------
  |  |   68|  69.1k|#define IMinInt32 -0x7FFFFFFF
  ------------------
  300|  69.1k|    pPictReoderingStatus->iNumOfPicts = 0;
  301|  69.1k|    pPictReoderingStatus->iLastWrittenPOC = IMinInt32;
  ------------------
  |  |   68|  69.1k|#define IMinInt32 -0x7FFFFFFF
  ------------------
  302|  69.1k|    pPictReoderingStatus->iLargestBufferedPicIndex = 0;
  303|   478k|    for (int32_t i = 0; i < pictInfoListCount; ++i) {
  ------------------
  |  Branch (303:25): [True: 409k, False: 69.1k]
  ------------------
  304|   409k|      pPictInfo[i].iPOC = IMinInt32;
  ------------------
  |  |   68|   409k|#define IMinInt32 -0x7FFFFFFF
  ------------------
  305|   409k|      pPictInfo[i].iPicBuffIdx = -1; //ensure a deterministic invalid sentinel so error-path decoding cannot leave heap garbage
  306|   409k|    }
  307|  69.1k|    pPictInfo->sBufferInfo.iBufferStatus = 0;
  308|  69.1k|		pPictReoderingStatus->bHasBSlice = false;
  309|  69.1k|  }
  310|  69.1k|}
WelsDecoderDefaults:
  315|  26.4k|void WelsDecoderDefaults (PWelsDecoderContext pCtx, SLogContext* pLogCtx) {
  316|  26.4k|  int32_t iCpuCores               = 1;
  317|  26.4k|  pCtx->sLogCtx = *pLogCtx;
  318|       |
  319|  26.4k|  pCtx->pArgDec                   = NULL;
  320|       |
  321|  26.4k|  pCtx->bHaveGotMemory            = false;              // not ever request memory blocks for decoder context related
  322|  26.4k|  pCtx->uiCpuFlag                 = 0;
  323|       |
  324|  26.4k|  pCtx->bAuReadyFlag              = 0;                  // au data is not ready
  325|  26.4k|  pCtx->bCabacInited = false;
  326|       |
  327|  26.4k|  pCtx->uiCpuFlag = WelsCPUFeatureDetect (&iCpuCores);
  328|       |
  329|  26.4k|  pCtx->iImgWidthInPixel          = 0;
  330|  26.4k|  pCtx->iImgHeightInPixel         = 0;                  // alloc picture data when picture size is available
  331|  26.4k|  pCtx->iLastImgWidthInPixel      = 0;
  332|  26.4k|  pCtx->iLastImgHeightInPixel     = 0;
  333|  26.4k|  pCtx->bFreezeOutput = true;
  334|       |
  335|  26.4k|  pCtx->iFrameNum                 = -1;
  336|  26.4k|  pCtx->pLastDecPicInfo->iPrevFrameNum             = -1;
  337|  26.4k|  pCtx->iErrorCode                = ERR_NONE;
  338|       |
  339|  26.4k|  pCtx->pDec                      = NULL;
  340|       |
  341|  26.4k|  pCtx->pTempDec                  = NULL;
  342|       |
  343|  26.4k|  WelsResetRefPic (pCtx);
  344|       |
  345|  26.4k|  pCtx->iActiveFmoNum             = 0;
  346|       |
  347|  26.4k|  pCtx->pPicBuff          = NULL;
  348|       |
  349|       |  //pCtx->sSpsPpsCtx.bAvcBasedFlag             = true;
  350|  26.4k|  pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb = NULL;
  351|  26.4k|  pCtx->pDecoderStatistics->iAvgLumaQp = -1;
  352|  26.4k|  pCtx->pDecoderStatistics->iStatisticsLogInterval = 1000;
  353|  26.4k|  pCtx->bUseScalingList = false;
  354|       |  /*pCtx->sSpsPpsCtx.iSpsErrorIgnored = 0;
  355|       |  pCtx->sSpsPpsCtx.iSubSpsErrorIgnored = 0;
  356|       |  pCtx->sSpsPpsCtx.iPpsErrorIgnored = 0;
  357|       |  pCtx->sSpsPpsCtx.iPPSInvalidNum = 0;
  358|       |  pCtx->sSpsPpsCtx.iPPSLastInvalidId = -1;
  359|       |  pCtx->sSpsPpsCtx.iSPSInvalidNum = 0;
  360|       |  pCtx->sSpsPpsCtx.iSPSLastInvalidId = -1;
  361|       |  pCtx->sSpsPpsCtx.iSubSPSInvalidNum = 0;
  362|       |  pCtx->sSpsPpsCtx.iSubSPSLastInvalidId = -1;
  363|       |  */
  364|  26.4k|  pCtx->iFeedbackNalRefIdc = -1; //initialize
  365|  26.4k|  pCtx->pLastDecPicInfo->iPrevPicOrderCntMsb = 0;
  366|  26.4k|  pCtx->pLastDecPicInfo->iPrevPicOrderCntLsb = 0;
  367|       |
  368|  26.4k|}
WelsDecoderSpsPpsDefaults:
  373|  26.4k|void WelsDecoderSpsPpsDefaults (SWelsDecoderSpsPpsCTX& sSpsPpsCtx) {
  374|  26.4k|  sSpsPpsCtx.bSpsExistAheadFlag = false;
  375|  26.4k|  sSpsPpsCtx.bSubspsExistAheadFlag = false;
  376|  26.4k|  sSpsPpsCtx.bPpsExistAheadFlag = false;
  377|  26.4k|  sSpsPpsCtx.bAvcBasedFlag = true;
  378|  26.4k|  sSpsPpsCtx.iSpsErrorIgnored = 0;
  379|  26.4k|  sSpsPpsCtx.iSubSpsErrorIgnored = 0;
  380|  26.4k|  sSpsPpsCtx.iPpsErrorIgnored = 0;
  381|  26.4k|  sSpsPpsCtx.iPPSInvalidNum = 0;
  382|  26.4k|  sSpsPpsCtx.iPPSLastInvalidId = -1;
  383|  26.4k|  sSpsPpsCtx.iSPSInvalidNum = 0;
  384|  26.4k|  sSpsPpsCtx.iSPSLastInvalidId = -1;
  385|  26.4k|  sSpsPpsCtx.iSubSPSInvalidNum = 0;
  386|  26.4k|  sSpsPpsCtx.iSubSPSLastInvalidId = -1;
  387|  26.4k|  sSpsPpsCtx.iSeqId = -1;
  388|  26.4k|}
WelsDecoderLastDecPicInfoDefaults:
  393|  22.0k|void WelsDecoderLastDecPicInfoDefaults (SWelsLastDecPicInfo& sLastDecPicInfo) {
  394|  22.0k|  sLastDecPicInfo.iPrevPicOrderCntMsb = 0;
  395|  22.0k|  sLastDecPicInfo.iPrevPicOrderCntLsb = 0;
  396|       |  sLastDecPicInfo.pPreviousDecodedPictureInDpb = NULL;
  397|  22.0k|  sLastDecPicInfo.iPrevFrameNum = -1;
  398|  22.0k|  sLastDecPicInfo.bLastHasMmco5 = false;
  399|  22.0k|  sLastDecPicInfo.uiDecodingTimeStamp = 0;
  400|  22.0k|}
WelsRequestMem:
  465|   219k|                        bool& bReallocFlag) {
  466|   219k|  const int32_t kiPicWidth      = kiMbWidth << 4;
  467|   219k|  const int32_t kiPicHeight     = kiMbHeight << 4;
  468|   219k|  int32_t iErr = ERR_NONE;
  469|       |
  470|   219k|  int32_t iPicQueueSize         = 0;    // adaptive size of picture queue, = (pSps->iNumRefFrames x 2)
  471|   219k|  bReallocFlag                  = false;
  472|   219k|  bool  bNeedChangePicQueue     = true;
  473|   219k|  CMemoryAlign* pMa = pCtx->pMemAlign;
  474|       |
  475|   219k|  WELS_VERIFY_RETURN_IF (ERR_INFO_INVALID_PARAM, (NULL == pCtx || kiPicWidth <= 0 || kiPicHeight <= 0))
  ------------------
  |  |  239|  1.09M|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 219k]
  |  |  |  Branch (239:7): [True: 0, False: 219k]
  |  |  |  Branch (239:7): [True: 0, False: 219k]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
  476|       |
  477|       |  // Fixed the issue about different gop size over last, 5/17/2010
  478|       |  // get picture queue size currently
  479|   219k|  iPicQueueSize = GetTargetRefListSize (pCtx);  // adaptive size of picture queue, = (pSps->iNumRefFrames x 2)
  480|   219k|  pCtx->iPicQueueNumber = iPicQueueSize;
  481|   219k|  if (pCtx->pPicBuff != NULL
  ------------------
  |  Branch (481:7): [True: 197k, False: 21.7k]
  ------------------
  482|   197k|      && pCtx->pPicBuff->iCapacity ==
  ------------------
  |  Branch (482:10): [True: 175k, False: 21.8k]
  ------------------
  483|   197k|      iPicQueueSize) // comparing current picture queue size requested and previous allocation picture queue
  484|   175k|    bNeedChangePicQueue = false;
  485|       |  // HD based pic buffer need consider memory size consumed when switch from 720p to other lower size
  486|   219k|  WELS_VERIFY_RETURN_IF (ERR_NONE, pCtx->bHaveGotMemory && (kiPicWidth == pCtx->iImgWidthInPixel
  ------------------
  |  |  239|  1.41M|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 180k, False: 16.8k]
  |  |  |  Branch (239:7): [True: 179k, False: 1.81k]
  |  |  |  Branch (239:7): [True: 197k, False: 21.7k]
  |  |  |  Branch (239:7): [True: 174k, False: 4.56k]
  |  |  ------------------
  |  |  240|   174k|    return iResult;                             \
  |  |  241|   174k|  }
  ------------------
  487|       |                         && kiPicHeight == pCtx->iImgHeightInPixel) && (!bNeedChangePicQueue)) // have same scaled buffer
  488|  44.9k|
  489|  44.9k|  // sync update pRefList
  490|  44.9k|  if (GetThreadCount (pCtx) <= 1) {
  ------------------
  |  Branch (490:7): [True: 44.9k, False: 0]
  ------------------
  491|  44.9k|    WelsResetRefPic (pCtx); // added to sync update ref list due to pictures are free
  492|  44.9k|  }
  493|       |
  494|  44.9k|  if (pCtx->bHaveGotMemory && (kiPicWidth == pCtx->iImgWidthInPixel && kiPicHeight == pCtx->iImgHeightInPixel)
  ------------------
  |  Branch (494:7): [True: 23.1k, False: 21.7k]
  |  Branch (494:32): [True: 6.37k, False: 16.8k]
  |  Branch (494:72): [True: 4.56k, False: 1.81k]
  ------------------
  495|  4.56k|      && pCtx->pPicBuff != NULL && pCtx->pPicBuff->iCapacity != iPicQueueSize) {
  ------------------
  |  Branch (495:10): [True: 4.56k, False: 0]
  |  Branch (495:36): [True: 4.56k, False: 0]
  ------------------
  496|       |    // currently only active for LIST_0 due to have no B frames
  497|       |    // Actually just need one memory allocation for the PicBuff. While it needs two pointer list (LIST_0 and LIST_1).
  498|  4.56k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO,
  499|  4.56k|             "WelsRequestMem(): memory re-alloc for no resolution change (size = %d * %d), ref list size change from %d to %d",
  500|  4.56k|             kiPicWidth, kiPicHeight, pCtx->pPicBuff->iCapacity, iPicQueueSize);
  501|  4.56k|    if (pCtx->pPicBuff->iCapacity < iPicQueueSize) {
  ------------------
  |  Branch (501:9): [True: 2.27k, False: 2.28k]
  ------------------
  502|  2.27k|      iErr = IncreasePicBuff (pCtx, &pCtx->pPicBuff, pCtx->pPicBuff->iCapacity, kiPicWidth, kiPicHeight,
  503|  2.27k|                              iPicQueueSize);
  504|  2.28k|    } else {
  505|  2.28k|      iErr = DecreasePicBuff (pCtx, &pCtx->pPicBuff, pCtx->pPicBuff->iCapacity, kiPicWidth, kiPicHeight,
  506|  2.28k|                              iPicQueueSize);
  507|  2.28k|    }
  508|  40.4k|  } else {
  509|  40.4k|    if (pCtx->bHaveGotMemory)
  ------------------
  |  Branch (509:9): [True: 18.6k, False: 21.7k]
  ------------------
  510|  18.6k|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO,
  511|  18.6k|               "WelsRequestMem(): memory re-alloc for resolution change, size change from %d * %d to %d * %d, ref list size change from %d to %d",
  512|  18.6k|               pCtx->iImgWidthInPixel, pCtx->iImgHeightInPixel, kiPicWidth, kiPicHeight, pCtx->pPicBuff->iCapacity,
  513|  18.6k|               iPicQueueSize);
  514|  21.7k|    else
  515|  21.7k|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO, "WelsRequestMem(): memory alloc size = %d * %d, ref list size = %d",
  516|  21.7k|               kiPicWidth, kiPicHeight, iPicQueueSize);
  517|       |    // for Recycled_Pic_Queue
  518|  40.4k|    PPicBuff* ppPic = &pCtx->pPicBuff;
  519|  40.4k|    if (NULL != ppPic && NULL != *ppPic) {
  ------------------
  |  Branch (519:9): [True: 40.4k, False: 0]
  |  Branch (519:26): [True: 18.6k, False: 21.7k]
  ------------------
  520|  18.6k|      DestroyPicBuff (pCtx, ppPic, pMa);
  521|  18.6k|    }
  522|       |
  523|       |
  524|  40.4k|    pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb = NULL;
  525|       |
  526|       |    // currently only active for LIST_0 due to have no B frames
  527|  40.4k|    iErr = CreatePicBuff (pCtx, &pCtx->pPicBuff, iPicQueueSize, kiPicWidth, kiPicHeight);
  528|  40.4k|  }
  529|       |
  530|  44.9k|  if (iErr != ERR_NONE)
  ------------------
  |  Branch (530:7): [True: 0, False: 44.9k]
  ------------------
  531|      0|    return iErr;
  532|       |
  533|       |
  534|  44.9k|  pCtx->iImgWidthInPixel    = kiPicWidth;   // target width of image to be reconstruted while decoding
  535|  44.9k|  pCtx->iImgHeightInPixel   = kiPicHeight;  // target height of image to be reconstruted while decoding
  536|       |
  537|  44.9k|  pCtx->bHaveGotMemory      = true;         // global memory for decoder context related is requested
  538|  44.9k|  pCtx->pDec                = NULL;         // need prefetch a new pic due to spatial size changed
  539|       |
  540|  44.9k|  if (pCtx->pCabacDecEngine == NULL)
  ------------------
  |  Branch (540:7): [True: 21.7k, False: 23.1k]
  ------------------
  541|  21.7k|    pCtx->pCabacDecEngine = (SWelsCabacDecEngine*) pMa->WelsMallocz (sizeof (SWelsCabacDecEngine), "pCtx->pCabacDecEngine");
  542|  44.9k|  WELS_VERIFY_RETURN_IF (ERR_INFO_OUT_OF_MEMORY, (NULL == pCtx->pCabacDecEngine))
  ------------------
  |  |  239|  44.9k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 44.9k]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
  543|       |
  544|  44.9k|  bReallocFlag              = true;         // memory re-allocation successfully finished
  545|  44.9k|  return ERR_NONE;
  546|  44.9k|}
WelsFreeDynamicMemory:
  551|  26.4k|void WelsFreeDynamicMemory (PWelsDecoderContext pCtx) {
  552|       |
  553|  26.4k|  CMemoryAlign* pMa = pCtx->pMemAlign;
  554|       |
  555|       |  //free dq layer memory
  556|  26.4k|  UninitialDqLayersContext (pCtx);
  557|       |
  558|       |  //free FMO memory
  559|  26.4k|  ResetFmoList (pCtx);
  560|       |
  561|       |  //free ref-pic list & picture memory
  562|  26.4k|  WelsResetRefPic (pCtx);
  563|       |
  564|  26.4k|  PPicBuff* pPicBuff = &pCtx->pPicBuff;
  565|  26.4k|  if (NULL != pPicBuff && NULL != *pPicBuff) {
  ------------------
  |  Branch (565:7): [True: 26.4k, False: 0]
  |  Branch (565:27): [True: 21.7k, False: 4.67k]
  ------------------
  566|  21.7k|    DestroyPicBuff (pCtx, pPicBuff, pMa);
  567|  21.7k|  }
  568|  26.4k|  if (GetThreadCount (pCtx) > 1) {
  ------------------
  |  Branch (568:7): [True: 0, False: 26.4k]
  ------------------
  569|       |    //prevent from double destruction of PPicBuff
  570|      0|    PWelsDecoderThreadCTX pThreadCtx = (PWelsDecoderThreadCTX) (pCtx->pThreadCtx);
  571|      0|    int32_t threadCount = pThreadCtx->sThreadInfo.uiThrMaxNum;
  572|      0|    int32_t  id = pThreadCtx->sThreadInfo.uiThrNum;
  573|      0|    for (int32_t i = 0; i < threadCount; ++i) {
  ------------------
  |  Branch (573:25): [True: 0, False: 0]
  ------------------
  574|      0|      if (pThreadCtx[i - id].pCtx != NULL) {
  ------------------
  |  Branch (574:11): [True: 0, False: 0]
  ------------------
  575|      0|        pThreadCtx[i - id].pCtx->pPicBuff = NULL;
  576|      0|      }
  577|      0|    }
  578|      0|  }
  579|       |
  580|  26.4k|  if (pCtx->pTempDec) {
  ------------------
  |  Branch (580:7): [True: 13.0k, False: 13.4k]
  ------------------
  581|  13.0k|    FreePicture (pCtx->pTempDec, pCtx->pMemAlign);
  582|  13.0k|    pCtx->pTempDec = NULL;
  583|  13.0k|  }
  584|       |
  585|       |  // added for safe memory
  586|  26.4k|  pCtx->iImgWidthInPixel  = 0;
  587|  26.4k|  pCtx->iImgHeightInPixel = 0;
  588|  26.4k|  pCtx->iLastImgWidthInPixel  = 0;
  589|  26.4k|  pCtx->iLastImgHeightInPixel = 0;
  590|  26.4k|  pCtx->bFreezeOutput = true;
  591|  26.4k|  pCtx->bHaveGotMemory = false;
  592|       |
  593|       |  //free CABAC memory
  594|  26.4k|  pMa->WelsFree (pCtx->pCabacDecEngine, "pCtx->pCabacDecEngine");
  595|  26.4k|}
_ZN7WelsDec15WelsOpenDecoderEPNS_21TagWelsDecoderContextEP13TagLogContext:
  600|  26.4k|int32_t WelsOpenDecoder (PWelsDecoderContext pCtx, SLogContext* pLogCtx) {
  601|  26.4k|  int iRet = ERR_NONE;
  602|       |  // function pointers
  603|  26.4k|  InitDecFuncs (pCtx, pCtx->uiCpuFlag);
  604|       |
  605|       |  // vlc tables
  606|  26.4k|  InitVlcTable (pCtx->pVlcTable);
  607|       |
  608|       |  // static memory
  609|  26.4k|  iRet = WelsInitStaticMemory (pCtx);
  610|  26.4k|  if (ERR_NONE != iRet) {
  ------------------
  |  Branch (610:7): [True: 0, False: 26.4k]
  ------------------
  611|      0|    pCtx->iErrorCode |= dsOutOfMemory;
  612|      0|    WelsLog (pLogCtx, WELS_LOG_ERROR, "WelsInitStaticMemory() failed in WelsOpenDecoder().");
  613|      0|    return iRet;
  614|      0|  }
  615|       |
  616|  26.4k|#ifdef LONG_TERM_REF
  617|  26.4k|  pCtx->bParamSetsLostFlag = true;
  618|       |#else
  619|       |  pCtx->bReferenceLostAtT0Flag = true; // should be true to waiting IDR at incoming AU bits following, 6/4/2010
  620|       |#endif //LONG_TERM_REF
  621|  26.4k|  pCtx->bNewSeqBegin = true;
  622|  26.4k|  pCtx->bPrintFrameErrorTraceFlag = true;
  623|  26.4k|  pCtx->iIgnoredErrorInfoPacketCount = 0;
  624|  26.4k|  pCtx->bFrameFinish = true;
  625|  26.4k|  pCtx->iSeqNum = 0;
  626|  26.4k|  return iRet;
  627|  26.4k|}
_ZN7WelsDec16WelsCloseDecoderEPNS_21TagWelsDecoderContextE:
  632|  26.4k|void WelsCloseDecoder (PWelsDecoderContext pCtx) {
  633|  26.4k|  WelsFreeDynamicMemory (pCtx);
  634|       |
  635|  26.4k|  WelsFreeStaticMemory (pCtx);
  636|       |
  637|  26.4k|#ifdef LONG_TERM_REF
  638|  26.4k|  pCtx->bParamSetsLostFlag       = false;
  639|       |#else
  640|       |  pCtx->bReferenceLostAtT0Flag = false;
  641|       |#endif
  642|  26.4k|  pCtx->bNewSeqBegin = false;
  643|  26.4k|  pCtx->bPrintFrameErrorTraceFlag = false;
  644|  26.4k|}
DecoderConfigParam:
  649|  26.4k|int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const SDecodingParam* kpParam) {
  650|  26.4k|  if (NULL == pCtx || NULL == kpParam)
  ------------------
  |  Branch (650:7): [True: 0, False: 26.4k]
  |  Branch (650:23): [True: 0, False: 26.4k]
  ------------------
  651|      0|    return ERR_INFO_INVALID_PARAM;
  652|       |
  653|  26.4k|  memcpy (pCtx->pParam, kpParam, sizeof (SDecodingParam));
  654|  26.4k|  if ((pCtx->pParam->eEcActiveIdc > ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE)
  ------------------
  |  Branch (654:7): [True: 0, False: 26.4k]
  ------------------
  655|  26.4k|      || (pCtx->pParam->eEcActiveIdc < ERROR_CON_DISABLE)) {
  ------------------
  |  Branch (655:10): [True: 0, False: 26.4k]
  ------------------
  656|      0|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
  657|      0|             "eErrorConMethod (%d) not in range: (%d - %d). Set as default value: (%d).", pCtx->pParam->eEcActiveIdc,
  658|      0|             ERROR_CON_DISABLE, ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE,
  659|      0|             ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE);
  660|      0|    pCtx->pParam->eEcActiveIdc = ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE;
  661|      0|  }
  662|       |
  663|  26.4k|  if (pCtx->pParam->bParseOnly) //parse only, disable EC method
  ------------------
  |  Branch (663:7): [True: 0, False: 26.4k]
  ------------------
  664|      0|    pCtx->pParam->eEcActiveIdc = ERROR_CON_DISABLE;
  665|  26.4k|  InitErrorCon (pCtx);
  666|       |
  667|  26.4k|  if (VIDEO_BITSTREAM_SVC == pCtx->pParam->sVideoProperty.eVideoBsType ||
  ------------------
  |  Branch (667:7): [True: 0, False: 26.4k]
  ------------------
  668|  26.4k|      VIDEO_BITSTREAM_AVC == pCtx->pParam->sVideoProperty.eVideoBsType) {
  ------------------
  |  Branch (668:7): [True: 26.4k, False: 0]
  ------------------
  669|  26.4k|    pCtx->eVideoType = pCtx->pParam->sVideoProperty.eVideoBsType;
  670|  26.4k|  } else {
  671|      0|    pCtx->eVideoType = VIDEO_BITSTREAM_DEFAULT;
  672|      0|  }
  673|       |
  674|  26.4k|  WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO, "eVideoType: %d", pCtx->eVideoType);
  675|       |
  676|  26.4k|  return ERR_NONE;
  677|  26.4k|}
WelsInitDecoder:
  691|  26.4k|int32_t WelsInitDecoder (PWelsDecoderContext pCtx, SLogContext* pLogCtx) {
  692|  26.4k|  if (pCtx == NULL) {
  ------------------
  |  Branch (692:7): [True: 0, False: 26.4k]
  ------------------
  693|      0|    return ERR_INFO_INVALID_PTR;
  694|      0|  }
  695|       |
  696|       |  // open decoder
  697|  26.4k|  return WelsOpenDecoder (pCtx, pLogCtx);
  698|  26.4k|}
WelsEndDecoder:
  711|  26.4k|void WelsEndDecoder (PWelsDecoderContext pCtx) {
  712|       |  // close decoder
  713|  26.4k|  WelsCloseDecoder (pCtx);
  714|  26.4k|}
GetVclNalTemporalId:
  716|  2.59M|void GetVclNalTemporalId (PWelsDecoderContext pCtx) {
  717|  2.59M|  PAccessUnit pAccessUnit = pCtx->pAccessUnitList;
  718|  2.59M|  int32_t idx = pAccessUnit->uiStartPos;
  719|       |
  720|  2.59M|  pCtx->iFeedbackVclNalInAu = FEEDBACK_VCL_NAL;
  721|  2.59M|  pCtx->iFeedbackTidInAu    = pAccessUnit->pNalUnitsList[idx]->sNalHeaderExt.uiTemporalId;
  722|  2.59M|  pCtx->iFeedbackNalRefIdc  = pAccessUnit->pNalUnitsList[idx]->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc;
  723|  2.59M|}
WelsDecodeBs:
  742|  10.9M|                      uint8_t** ppDst, SBufferInfo* pDstBufInfo, SParserBsInfo* pDstBsInfo) {
  743|  10.9M|  if (!pCtx->bEndOfStreamFlag) {
  ------------------
  |  Branch (743:7): [True: 5.45M, False: 5.45M]
  ------------------
  744|  5.45M|    SDataBuffer* pRawData   = &pCtx->sRawData;
  745|  5.45M|    SDataBuffer* pSavedData = NULL;
  746|       |
  747|  5.45M|    int32_t iSrcIdx        = 0; //the index of source bit-stream till now after parsing one or more NALs
  748|  5.45M|    int32_t iSrcConsumed   = 0; // consumed bit count of source bs
  749|  5.45M|    int32_t iDstIdx        = 0; //the size of current NAL after 0x03 removal and 00 00 01 removal
  750|  5.45M|    int32_t iSrcLength     = 0; //the total size of current AU or NAL
  751|  5.45M|    int32_t iRet = 0;
  752|  5.45M|    int32_t iConsumedBytes = 0;
  753|  5.45M|    int32_t iOffset        = 0;
  754|       |
  755|  5.45M|    uint8_t* pSrcNal       = NULL;
  756|  5.45M|    uint8_t* pDstNal       = NULL;
  757|  5.45M|    uint8_t* pNalPayload   = NULL;
  758|       |
  759|       |
  760|  5.45M|    if (NULL == DetectStartCodePrefix (kpBsBuf, &iOffset,
  ------------------
  |  Branch (760:9): [True: 1.32k, False: 5.45M]
  ------------------
  761|  5.45M|                                       kiBsLen)) {  //CAN'T find the 00 00 01 start prefix from the source buffer
  762|  1.32k|      pCtx->iErrorCode |= dsBitstreamError;
  763|  1.32k|      return dsBitstreamError;
  764|  1.32k|    }
  765|       |
  766|  5.45M|    pSrcNal    = const_cast<uint8_t*> (kpBsBuf) + iOffset;
  767|  5.45M|    iSrcLength = kiBsLen - iOffset;
  768|       |
  769|  5.45M|    if ((kiBsLen + 4) > (pRawData->pEnd - pRawData->pCurPos)) {
  ------------------
  |  Branch (769:9): [True: 0, False: 5.45M]
  ------------------
  770|      0|      pRawData->pCurPos = pRawData->pHead;
  771|      0|    }
  772|       |
  773|  5.45M|    if (pCtx->pParam->bParseOnly) {
  ------------------
  |  Branch (773:9): [True: 0, False: 5.45M]
  ------------------
  774|      0|      pSavedData = &pCtx->sSavedData;
  775|      0|      if ((kiBsLen + 4) > (pSavedData->pEnd - pSavedData->pCurPos)) {
  ------------------
  |  Branch (775:11): [True: 0, False: 0]
  ------------------
  776|      0|        pSavedData->pCurPos = pSavedData->pHead;
  777|      0|      }
  778|      0|    }
  779|       |    //copy raw data from source buffer (application) to raw data buffer (codec inside)
  780|       |    //0x03 removal and extract all of NAL Unit from current raw data
  781|  5.45M|    pDstNal = pRawData->pCurPos;
  782|       |
  783|  5.45M|    bool bNalStartBytes = false;
  784|       |
  785|  78.7M|    while (iSrcConsumed < iSrcLength) {
  ------------------
  |  Branch (785:12): [True: 73.3M, False: 5.44M]
  ------------------
  786|  73.3M|      if ((2 + iSrcConsumed < iSrcLength) && (0 == LD16 (pSrcNal + iSrcIdx)) && (pSrcNal[2 + iSrcIdx] <= 0x03)) {
  ------------------
  |  |   51|  62.4M|#define LD16(a) (((struct tagUnaligned_16 *) (a))->l)
  ------------------
  |  Branch (786:11): [True: 62.4M, False: 10.8M]
  |  Branch (786:46): [True: 23.1M, False: 39.3M]
  |  Branch (786:81): [True: 22.0M, False: 1.03M]
  ------------------
  787|  22.0M|        if (bNalStartBytes && (pSrcNal[2 + iSrcIdx] != 0x00 && pSrcNal[2 + iSrcIdx] != 0x01)) {
  ------------------
  |  Branch (787:13): [True: 21.9M, False: 148k]
  |  Branch (787:32): [True: 2.68k, False: 21.9M]
  |  Branch (787:64): [True: 2.68k, False: 0]
  ------------------
  788|  2.68k|          pCtx->iErrorCode |= dsBitstreamError;
  789|  2.68k|          return pCtx->iErrorCode;
  790|  2.68k|        }
  791|       |
  792|  22.0M|        if (pSrcNal[2 + iSrcIdx] == 0x02) {
  ------------------
  |  Branch (792:13): [True: 583, False: 22.0M]
  ------------------
  793|    583|          pCtx->iErrorCode |= dsBitstreamError;
  794|    583|          return pCtx->iErrorCode;
  795|  22.0M|        } else if (pSrcNal[2 + iSrcIdx] == 0x00) {
  ------------------
  |  Branch (795:20): [True: 22.0M, False: 2.76k]
  ------------------
  796|  22.0M|          pDstNal[iDstIdx++] = pSrcNal[iSrcIdx++];
  797|  22.0M|          iSrcConsumed++;
  798|  22.0M|          bNalStartBytes = true;
  799|  22.0M|        } else if (pSrcNal[2 + iSrcIdx] == 0x03) {
  ------------------
  |  Branch (799:20): [True: 2.76k, False: 0]
  ------------------
  800|  2.76k|          if ((3 + iSrcConsumed < iSrcLength) && pSrcNal[3 + iSrcIdx] > 0x03) {
  ------------------
  |  Branch (800:15): [True: 2.35k, False: 410]
  |  Branch (800:50): [True: 519, False: 1.83k]
  ------------------
  801|       |            /* Just skip */
  802|  2.24k|          } else {
  803|  2.24k|            ST16 (pDstNal + iDstIdx, 0);
  ------------------
  |  |   66|  2.24k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  804|  2.24k|            iDstIdx      += 2;
  805|  2.24k|          }
  806|  2.76k|          iSrcIdx      += 3;
  807|  2.76k|          iSrcConsumed += 3;
  808|  2.76k|        } else { // 0x01
  809|      0|          bNalStartBytes = false;
  810|       |
  811|      0|          iConsumedBytes = 0;
  812|      0|          pDstNal[iDstIdx] = pDstNal[iDstIdx + 1] = pDstNal[iDstIdx + 2] = pDstNal[iDstIdx + 3] =
  813|      0|                               0; // set 4 reserved bytes to zero
  814|      0|          pNalPayload = ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes);
  815|      0|          if (pNalPayload) { //parse correct
  ------------------
  |  Branch (815:15): [True: 0, False: 0]
  ------------------
  816|      0|            if (IS_PARAM_SETS_NALS (pCtx->sCurNalHead.eNalUnitType)) {
  ------------------
  |  |  145|      0|#define IS_PARAM_SETS_NALS(t)                   ( (t) == NAL_UNIT_SPS || (t) == NAL_UNIT_PPS || (t) == NAL_UNIT_SUBSET_SPS )
  |  |  ------------------
  |  |  |  Branch (145:51): [True: 0, False: 0]
  |  |  |  Branch (145:74): [True: 0, False: 0]
  |  |  |  Branch (145:97): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  817|      0|              iRet = ParseNonVclNal (pCtx, pNalPayload, iDstIdx - iConsumedBytes, pSrcNal - 3, iSrcIdx + 3);
  818|      0|            }
  819|      0|            CheckAndFinishLastPic (pCtx, ppDst, pDstBufInfo);
  820|      0|            if (pCtx->bAuReadyFlag && pCtx->pAccessUnitList->uiAvailUnitsNum != 0) {
  ------------------
  |  Branch (820:17): [True: 0, False: 0]
  |  Branch (820:39): [True: 0, False: 0]
  ------------------
  821|      0|              if (GetThreadCount (pCtx) <= 1) {
  ------------------
  |  Branch (821:19): [True: 0, False: 0]
  ------------------
  822|      0|                ConstructAccessUnit (pCtx, ppDst, pDstBufInfo);
  823|      0|              }
  824|      0|            }
  825|      0|          }
  826|      0|          DecodeFinishUpdate (pCtx);
  827|       |
  828|      0|          if ((dsOutOfMemory | dsNoParamSets) & pCtx->iErrorCode) {
  ------------------
  |  Branch (828:15): [True: 0, False: 0]
  ------------------
  829|      0|#ifdef LONG_TERM_REF
  830|      0|            pCtx->bParamSetsLostFlag = true;
  831|       |#else
  832|       |            pCtx->bReferenceLostAtT0Flag = true;
  833|       |#endif
  834|      0|            if (dsOutOfMemory & pCtx->iErrorCode) {
  ------------------
  |  Branch (834:17): [True: 0, False: 0]
  ------------------
  835|      0|              return pCtx->iErrorCode;
  836|      0|            }
  837|      0|          }
  838|      0|          if (iRet) {
  ------------------
  |  Branch (838:15): [True: 0, False: 0]
  ------------------
  839|      0|            iRet = 0;
  840|      0|            if (dsNoParamSets & pCtx->iErrorCode) {
  ------------------
  |  Branch (840:17): [True: 0, False: 0]
  ------------------
  841|      0|#ifdef LONG_TERM_REF
  842|      0|              pCtx->bParamSetsLostFlag = true;
  843|       |#else
  844|       |              pCtx->bReferenceLostAtT0Flag = true;
  845|       |#endif
  846|      0|            }
  847|      0|            return pCtx->iErrorCode;
  848|      0|          }
  849|       |
  850|      0|          if (pCtx->iErrorCode != ERR_NONE && !(pCtx->iErrorCode & dsDataErrorConcealed)) {
  ------------------
  |  Branch (850:15): [True: 0, False: 0]
  |  Branch (850:47): [True: 0, False: 0]
  ------------------
  851|      0|              return pCtx->iErrorCode;
  852|      0|          }
  853|       |
  854|      0|          pDstNal += (iDstIdx + 4); //init, increase 4 reserved zero bytes, used to store the next NAL
  855|      0|          if ((iSrcLength - iSrcConsumed + 4) > (pRawData->pEnd - pDstNal)) {
  ------------------
  |  Branch (855:15): [True: 0, False: 0]
  ------------------
  856|      0|            pDstNal = pRawData->pCurPos = pRawData->pHead;
  857|      0|          } else {
  858|      0|            pRawData->pCurPos = pDstNal;
  859|      0|          }
  860|       |
  861|      0|          pSrcNal += iSrcIdx + 3;
  862|      0|          iSrcConsumed += 3;
  863|      0|          iSrcIdx = 0;
  864|      0|          iDstIdx  = 0; //reset 0, used to statistic the length of next NAL
  865|      0|        }
  866|  22.0M|        continue;
  867|  22.0M|      }
  868|  51.2M|      pDstNal[iDstIdx++] = pSrcNal[iSrcIdx++];
  869|  51.2M|      iSrcConsumed++;
  870|  51.2M|    }
  871|       |
  872|       |    //last NAL decoding
  873|       |
  874|  5.44M|    iConsumedBytes = 0;
  875|  5.44M|    pDstNal[iDstIdx] = pDstNal[iDstIdx + 1] = pDstNal[iDstIdx + 2] = pDstNal[iDstIdx + 3] =
  876|  5.44M|                         0; // set 4 reserved bytes to zero
  877|  5.44M|    pRawData->pCurPos = pDstNal + iDstIdx + 4; //init, increase 4 reserved zero bytes, used to store the next NAL
  878|  5.44M|    pNalPayload = ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes);
  879|  5.44M|    if (pNalPayload) { //parse correct
  ------------------
  |  Branch (879:9): [True: 2.88M, False: 2.55M]
  ------------------
  880|  2.88M|      if (IS_PARAM_SETS_NALS (pCtx->sCurNalHead.eNalUnitType)) {
  ------------------
  |  |  145|  2.88M|#define IS_PARAM_SETS_NALS(t)                   ( (t) == NAL_UNIT_SPS || (t) == NAL_UNIT_PPS || (t) == NAL_UNIT_SUBSET_SPS )
  |  |  ------------------
  |  |  |  Branch (145:51): [True: 106k, False: 2.78M]
  |  |  |  Branch (145:74): [True: 116k, False: 2.66M]
  |  |  |  Branch (145:97): [True: 15.6k, False: 2.65M]
  |  |  ------------------
  ------------------
  881|   238k|        iRet = ParseNonVclNal (pCtx, pNalPayload, iDstIdx - iConsumedBytes, pSrcNal - 3, iSrcIdx + 3);
  882|   238k|      }
  883|  2.88M|      if (GetThreadCount (pCtx) <= 1) {
  ------------------
  |  Branch (883:11): [True: 2.88M, False: 0]
  ------------------
  884|  2.88M|        CheckAndFinishLastPic (pCtx, ppDst, pDstBufInfo);
  885|  2.88M|      }
  886|  2.88M|      if (pCtx->bAuReadyFlag && pCtx->pAccessUnitList->uiAvailUnitsNum != 0) {
  ------------------
  |  Branch (886:11): [True: 0, False: 2.88M]
  |  Branch (886:33): [True: 0, False: 0]
  ------------------
  887|      0|        if (GetThreadCount (pCtx) <= 1) {
  ------------------
  |  Branch (887:13): [True: 0, False: 0]
  ------------------
  888|      0|          ConstructAccessUnit (pCtx, ppDst, pDstBufInfo);
  889|      0|        }
  890|      0|      }
  891|  2.88M|    }
  892|  5.44M|    DecodeFinishUpdate (pCtx);
  893|       |
  894|  5.44M|    if ((dsOutOfMemory | dsNoParamSets) & pCtx->iErrorCode) {
  ------------------
  |  Branch (894:9): [True: 273k, False: 5.17M]
  ------------------
  895|   273k|#ifdef LONG_TERM_REF
  896|   273k|      pCtx->bParamSetsLostFlag = true;
  897|       |#else
  898|       |      pCtx->bReferenceLostAtT0Flag = true;
  899|       |#endif
  900|   273k|      return pCtx->iErrorCode;
  901|   273k|    }
  902|  5.17M|    if (iRet) {
  ------------------
  |  Branch (902:9): [True: 74.0k, False: 5.10M]
  ------------------
  903|  74.0k|      iRet = 0;
  904|  74.0k|      if (dsNoParamSets & pCtx->iErrorCode) {
  ------------------
  |  Branch (904:11): [True: 0, False: 74.0k]
  ------------------
  905|      0|#ifdef LONG_TERM_REF
  906|      0|        pCtx->bParamSetsLostFlag = true;
  907|       |#else
  908|       |        pCtx->bReferenceLostAtT0Flag = true;
  909|       |#endif
  910|      0|      }
  911|  74.0k|      return pCtx->iErrorCode;
  912|  74.0k|    }
  913|  5.45M|  } else { /* no supplementary picture payload input, but stored a picture */
  914|  5.45M|    PAccessUnit pCurAu =
  915|  5.45M|      pCtx->pAccessUnitList; // current access unit, it will never point to NULL after decode's successful initialization
  916|       |
  917|  5.45M|    if (pCurAu->uiAvailUnitsNum == 0) {
  ------------------
  |  Branch (917:9): [True: 2.85M, False: 2.59M]
  ------------------
  918|  2.85M|      return pCtx->iErrorCode;
  919|  2.85M|    } else {
  920|  2.59M|      pCtx->pAccessUnitList->uiEndPos = pCtx->pAccessUnitList->uiAvailUnitsNum - 1;
  921|       |
  922|  2.59M|      ConstructAccessUnit (pCtx, ppDst, pDstBufInfo);
  923|  2.59M|    }
  924|  2.59M|    DecodeFinishUpdate (pCtx);
  925|       |
  926|  2.59M|    if ((dsOutOfMemory | dsNoParamSets) & pCtx->iErrorCode) {
  ------------------
  |  Branch (926:9): [True: 4.44k, False: 2.59M]
  ------------------
  927|  4.44k|#ifdef LONG_TERM_REF
  928|  4.44k|      pCtx->bParamSetsLostFlag = true;
  929|       |#else
  930|       |      pCtx->bReferenceLostAtT0Flag = true;
  931|       |#endif
  932|  4.44k|      return pCtx->iErrorCode;
  933|  4.44k|    }
  934|  2.59M|  }
  935|       |
  936|  7.69M|  return pCtx->iErrorCode;
  937|  10.9M|}
SyncPictureResolutionExt:
  948|   219k|int32_t SyncPictureResolutionExt (PWelsDecoderContext pCtx, const int32_t kiMbWidth, const int32_t kiMbHeight) {
  949|   219k|  int32_t iErr = ERR_NONE;
  950|   219k|  const int32_t kiPicWidth    = kiMbWidth << 4;
  951|   219k|  const int32_t kiPicHeight   = kiMbHeight << 4;
  952|       |  //fix Bugzilla Bug1479656 reallocate temp dec picture
  953|   219k|  if (pCtx->pTempDec != NULL && (pCtx->pTempDec->iWidthInPixel != kiPicWidth
  ------------------
  |  Branch (953:7): [True: 26.8k, False: 192k]
  |  Branch (953:34): [True: 14.3k, False: 12.5k]
  ------------------
  954|  14.7k|                                 || pCtx->pTempDec->iHeightInPixel != kiPicHeight)) {
  ------------------
  |  Branch (954:37): [True: 436, False: 12.0k]
  ------------------
  955|  14.7k|    FreePicture (pCtx->pTempDec, pCtx->pMemAlign);
  956|  14.7k|    pCtx->pTempDec = AllocPicture (pCtx, pCtx->pSps->iMbWidth << 4, pCtx->pSps->iMbHeight << 4);
  957|  14.7k|  }
  958|   219k|  bool bReallocFlag = false;
  959|   219k|  iErr = WelsRequestMem (pCtx, kiMbWidth, kiMbHeight, bReallocFlag); // common memory used
  960|   219k|  if (ERR_NONE != iErr) {
  ------------------
  |  Branch (960:7): [True: 0, False: 219k]
  ------------------
  961|      0|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR,
  962|      0|             "SyncPictureResolutionExt()::WelsRequestMem--buffer allocated failure.");
  963|      0|    pCtx->iErrorCode |= dsOutOfMemory;
  964|      0|    return iErr;
  965|      0|  }
  966|       |
  967|   219k|  iErr = InitialDqLayersContext (pCtx, kiPicWidth, kiPicHeight);
  968|   219k|  if (ERR_NONE != iErr) {
  ------------------
  |  Branch (968:7): [True: 0, False: 219k]
  ------------------
  969|      0|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR,
  970|      0|             "SyncPictureResolutionExt()::InitialDqLayersContext--buffer allocated failure.");
  971|      0|    pCtx->iErrorCode |= dsOutOfMemory;
  972|      0|  }
  973|   219k|#if defined(MEMORY_MONITOR)
  974|   219k|  if (bReallocFlag) {
  ------------------
  |  Branch (974:7): [True: 44.9k, False: 174k]
  ------------------
  975|  44.9k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO, "SyncPictureResolutionExt(), overall memory usage: %llu bytes",
  976|  44.9k|             static_cast<unsigned long long> (sizeof (SWelsDecoderContext) + pCtx->pMemAlign->WelsGetMemoryUsage()));
  977|  44.9k|  }
  978|   219k|#endif//MEMORY_MONITOR
  979|   219k|  return iErr;
  980|   219k|}
InitDecFuncs:
  982|  26.4k|void InitDecFuncs (PWelsDecoderContext pCtx, uint32_t uiCpuFlag) {
  983|  26.4k|  WelsBlockFuncInit (&pCtx->sBlockFunc, uiCpuFlag);
  984|  26.4k|  InitPredFunc (pCtx, uiCpuFlag);
  985|  26.4k|  InitMcFunc (& (pCtx->sMcFunc), uiCpuFlag);
  986|  26.4k|  InitExpandPictureFunc (& (pCtx->sExpandPicFunc), uiCpuFlag);
  987|  26.4k|  DeblockingInit (&pCtx->sDeblockingFunc, uiCpuFlag);
  988|  26.4k|}
InitPredFunc:
 1006|  26.4k|void InitPredFunc (PWelsDecoderContext pCtx, uint32_t uiCpuFlag) {
 1007|  26.4k|  pCtx->pGetI16x16LumaPredFunc[I16_PRED_V     ] = WelsI16x16LumaPredV_c;
  ------------------
  |  |  331|  26.4k|#define I16_PRED_V       0
  ------------------
 1008|  26.4k|  pCtx->pGetI16x16LumaPredFunc[I16_PRED_H     ] = WelsI16x16LumaPredH_c;
  ------------------
  |  |  332|  26.4k|#define I16_PRED_H       1
  ------------------
 1009|  26.4k|  pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC    ] = WelsI16x16LumaPredDc_c;
  ------------------
  |  |  333|  26.4k|#define I16_PRED_DC      2
  ------------------
 1010|  26.4k|  pCtx->pGetI16x16LumaPredFunc[I16_PRED_P     ] = WelsI16x16LumaPredPlane_c;
  ------------------
  |  |  334|  26.4k|#define I16_PRED_P       3
  ------------------
 1011|  26.4k|  pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC_L  ] = WelsI16x16LumaPredDcLeft_c;
  ------------------
  |  |  336|  26.4k|#define I16_PRED_DC_L    4
  ------------------
 1012|  26.4k|  pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC_T  ] = WelsI16x16LumaPredDcTop_c;
  ------------------
  |  |  337|  26.4k|#define I16_PRED_DC_T    5
  ------------------
 1013|  26.4k|  pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC_128] = WelsI16x16LumaPredDcNA_c;
  ------------------
  |  |  338|  26.4k|#define I16_PRED_DC_128  6
  ------------------
 1014|       |
 1015|  26.4k|  pCtx->pGetI4x4LumaPredFunc[I4_PRED_V     ] = WelsI4x4LumaPredV_c;
  ------------------
  |  |  343|  26.4k|#define I4_PRED_V        0
  ------------------
 1016|  26.4k|  pCtx->pGetI4x4LumaPredFunc[I4_PRED_H     ] = WelsI4x4LumaPredH_c;
  ------------------
  |  |  344|  26.4k|#define I4_PRED_H        1
  ------------------
 1017|  26.4k|  pCtx->pGetI4x4LumaPredFunc[I4_PRED_DC    ] = WelsI4x4LumaPredDc_c;
  ------------------
  |  |  345|  26.4k|#define I4_PRED_DC       2
  ------------------
 1018|  26.4k|  pCtx->pGetI4x4LumaPredFunc[I4_PRED_DC_L  ] = WelsI4x4LumaPredDcLeft_c;
  ------------------
  |  |  353|  26.4k|#define I4_PRED_DC_L     9
  ------------------
 1019|  26.4k|  pCtx->pGetI4x4LumaPredFunc[I4_PRED_DC_T  ] = WelsI4x4LumaPredDcTop_c;
  ------------------
  |  |  354|  26.4k|#define I4_PRED_DC_T     10
  ------------------
 1020|  26.4k|  pCtx->pGetI4x4LumaPredFunc[I4_PRED_DC_128] = WelsI4x4LumaPredDcNA_c;
  ------------------
  |  |  355|  26.4k|#define I4_PRED_DC_128   11
  ------------------
 1021|  26.4k|  pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDL    ] = WelsI4x4LumaPredDDL_c;
  ------------------
  |  |  346|  26.4k|#define I4_PRED_DDL      3 //diagonal_down_left
  ------------------
 1022|  26.4k|  pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDL_TOP] = WelsI4x4LumaPredDDLTop_c;
  ------------------
  |  |  357|  26.4k|#define I4_PRED_DDL_TOP  12 //right-top replacing by padding rightmost pixel of top
  ------------------
 1023|  26.4k|  pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDR    ] = WelsI4x4LumaPredDDR_c;
  ------------------
  |  |  347|  26.4k|#define I4_PRED_DDR      4 //diagonal_down_right
  ------------------
 1024|  26.4k|  pCtx->pGetI4x4LumaPredFunc[I4_PRED_VL    ] = WelsI4x4LumaPredVL_c;
  ------------------
  |  |  350|  26.4k|#define I4_PRED_VL       7 //vertical_left
  ------------------
 1025|  26.4k|  pCtx->pGetI4x4LumaPredFunc[I4_PRED_VL_TOP] = WelsI4x4LumaPredVLTop_c;
  ------------------
  |  |  358|  26.4k|#define I4_PRED_VL_TOP   13 //right-top replacing by padding rightmost pixel of top
  ------------------
 1026|  26.4k|  pCtx->pGetI4x4LumaPredFunc[I4_PRED_VR    ] = WelsI4x4LumaPredVR_c;
  ------------------
  |  |  348|  26.4k|#define I4_PRED_VR       5 //vertical_right
  ------------------
 1027|  26.4k|  pCtx->pGetI4x4LumaPredFunc[I4_PRED_HU    ] = WelsI4x4LumaPredHU_c;
  ------------------
  |  |  351|  26.4k|#define I4_PRED_HU       8 //horizon_up
  ------------------
 1028|  26.4k|  pCtx->pGetI4x4LumaPredFunc[I4_PRED_HD    ] = WelsI4x4LumaPredHD_c;
  ------------------
  |  |  349|  26.4k|#define I4_PRED_HD       6 //horizon_down
  ------------------
 1029|       |
 1030|  26.4k|  pCtx->pGetI8x8LumaPredFunc[I4_PRED_V     ] = WelsI8x8LumaPredV_c;
  ------------------
  |  |  343|  26.4k|#define I4_PRED_V        0
  ------------------
 1031|  26.4k|  pCtx->pGetI8x8LumaPredFunc[I4_PRED_H     ] = WelsI8x8LumaPredH_c;
  ------------------
  |  |  344|  26.4k|#define I4_PRED_H        1
  ------------------
 1032|  26.4k|  pCtx->pGetI8x8LumaPredFunc[I4_PRED_DC    ] = WelsI8x8LumaPredDc_c;
  ------------------
  |  |  345|  26.4k|#define I4_PRED_DC       2
  ------------------
 1033|  26.4k|  pCtx->pGetI8x8LumaPredFunc[I4_PRED_DC_L  ] = WelsI8x8LumaPredDcLeft_c;
  ------------------
  |  |  353|  26.4k|#define I4_PRED_DC_L     9
  ------------------
 1034|  26.4k|  pCtx->pGetI8x8LumaPredFunc[I4_PRED_DC_T  ] = WelsI8x8LumaPredDcTop_c;
  ------------------
  |  |  354|  26.4k|#define I4_PRED_DC_T     10
  ------------------
 1035|  26.4k|  pCtx->pGetI8x8LumaPredFunc[I4_PRED_DC_128] = WelsI8x8LumaPredDcNA_c;
  ------------------
  |  |  355|  26.4k|#define I4_PRED_DC_128   11
  ------------------
 1036|  26.4k|  pCtx->pGetI8x8LumaPredFunc[I4_PRED_DDL    ] = WelsI8x8LumaPredDDL_c;
  ------------------
  |  |  346|  26.4k|#define I4_PRED_DDL      3 //diagonal_down_left
  ------------------
 1037|  26.4k|  pCtx->pGetI8x8LumaPredFunc[I4_PRED_DDL_TOP] = WelsI8x8LumaPredDDLTop_c;
  ------------------
  |  |  357|  26.4k|#define I4_PRED_DDL_TOP  12 //right-top replacing by padding rightmost pixel of top
  ------------------
 1038|  26.4k|  pCtx->pGetI8x8LumaPredFunc[I4_PRED_DDR    ] = WelsI8x8LumaPredDDR_c;
  ------------------
  |  |  347|  26.4k|#define I4_PRED_DDR      4 //diagonal_down_right
  ------------------
 1039|  26.4k|  pCtx->pGetI8x8LumaPredFunc[I4_PRED_VL    ] = WelsI8x8LumaPredVL_c;
  ------------------
  |  |  350|  26.4k|#define I4_PRED_VL       7 //vertical_left
  ------------------
 1040|  26.4k|  pCtx->pGetI8x8LumaPredFunc[I4_PRED_VL_TOP] = WelsI8x8LumaPredVLTop_c;
  ------------------
  |  |  358|  26.4k|#define I4_PRED_VL_TOP   13 //right-top replacing by padding rightmost pixel of top
  ------------------
 1041|  26.4k|  pCtx->pGetI8x8LumaPredFunc[I4_PRED_VR    ] = WelsI8x8LumaPredVR_c;
  ------------------
  |  |  348|  26.4k|#define I4_PRED_VR       5 //vertical_right
  ------------------
 1042|  26.4k|  pCtx->pGetI8x8LumaPredFunc[I4_PRED_HU    ] = WelsI8x8LumaPredHU_c;
  ------------------
  |  |  351|  26.4k|#define I4_PRED_HU       8 //horizon_up
  ------------------
 1043|  26.4k|  pCtx->pGetI8x8LumaPredFunc[I4_PRED_HD    ] = WelsI8x8LumaPredHD_c;
  ------------------
  |  |  349|  26.4k|#define I4_PRED_HD       6 //horizon_down
  ------------------
 1044|       |
 1045|  26.4k|  pCtx->pGetIChromaPredFunc[C_PRED_DC    ] = WelsIChromaPredDc_c;
  ------------------
  |  |  363|  26.4k|#define C_PRED_DC        0
  ------------------
 1046|  26.4k|  pCtx->pGetIChromaPredFunc[C_PRED_H     ] = WelsIChromaPredH_c;
  ------------------
  |  |  364|  26.4k|#define C_PRED_H         1
  ------------------
 1047|  26.4k|  pCtx->pGetIChromaPredFunc[C_PRED_V     ] = WelsIChromaPredV_c;
  ------------------
  |  |  365|  26.4k|#define C_PRED_V         2
  ------------------
 1048|  26.4k|  pCtx->pGetIChromaPredFunc[C_PRED_P     ] = WelsIChromaPredPlane_c;
  ------------------
  |  |  366|  26.4k|#define C_PRED_P         3
  ------------------
 1049|  26.4k|  pCtx->pGetIChromaPredFunc[C_PRED_DC_L  ] = WelsIChromaPredDcLeft_c;
  ------------------
  |  |  368|  26.4k|#define C_PRED_DC_L      4
  ------------------
 1050|  26.4k|  pCtx->pGetIChromaPredFunc[C_PRED_DC_T  ] = WelsIChromaPredDcTop_c;
  ------------------
  |  |  369|  26.4k|#define C_PRED_DC_T      5
  ------------------
 1051|  26.4k|  pCtx->pGetIChromaPredFunc[C_PRED_DC_128] = WelsIChromaPredDcNA_c;
  ------------------
  |  |  370|  26.4k|#define C_PRED_DC_128    6
  ------------------
 1052|       |
 1053|  26.4k|  pCtx->pIdctResAddPredFunc     = IdctResAddPred_c;
 1054|  26.4k|  pCtx->pIdctFourResAddPredFunc = IdctFourResAddPred_<IdctResAddPred_c>;
 1055|       |
 1056|  26.4k|  pCtx->pIdctResAddPredFunc8x8  = IdctResAddPred8x8_c;
 1057|       |
 1058|       |#if defined(HAVE_NEON)
 1059|       |  if (uiCpuFlag & WELS_CPU_NEON) {
 1060|       |    pCtx->pIdctResAddPredFunc   = IdctResAddPred_neon;
 1061|       |    pCtx->pIdctFourResAddPredFunc = IdctFourResAddPred_<IdctResAddPred_neon>;
 1062|       |
 1063|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC] = WelsDecoderI16x16LumaPredDc_neon;
 1064|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_P]  = WelsDecoderI16x16LumaPredPlane_neon;
 1065|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_H]  = WelsDecoderI16x16LumaPredH_neon;
 1066|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_V]  = WelsDecoderI16x16LumaPredV_neon;
 1067|       |
 1068|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_V    ] = WelsDecoderI4x4LumaPredV_neon;
 1069|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_H    ] = WelsDecoderI4x4LumaPredH_neon;
 1070|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDL  ] = WelsDecoderI4x4LumaPredDDL_neon;
 1071|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDR  ] = WelsDecoderI4x4LumaPredDDR_neon;
 1072|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_VL   ] = WelsDecoderI4x4LumaPredVL_neon;
 1073|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_VR   ] = WelsDecoderI4x4LumaPredVR_neon;
 1074|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_HU   ] = WelsDecoderI4x4LumaPredHU_neon;
 1075|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_HD   ] = WelsDecoderI4x4LumaPredHD_neon;
 1076|       |
 1077|       |    pCtx->pGetIChromaPredFunc[C_PRED_H]       = WelsDecoderIChromaPredH_neon;
 1078|       |    pCtx->pGetIChromaPredFunc[C_PRED_V]       = WelsDecoderIChromaPredV_neon;
 1079|       |    pCtx->pGetIChromaPredFunc[C_PRED_P ]      = WelsDecoderIChromaPredPlane_neon;
 1080|       |    pCtx->pGetIChromaPredFunc[C_PRED_DC]      = WelsDecoderIChromaPredDc_neon;
 1081|       |  }
 1082|       |#endif//HAVE_NEON
 1083|       |
 1084|       |#if defined(HAVE_NEON_AARCH64) && defined(__aarch64__)
 1085|       |  if (uiCpuFlag & WELS_CPU_NEON) {
 1086|       |    pCtx->pIdctResAddPredFunc   = IdctResAddPred_AArch64_neon;
 1087|       |    pCtx->pIdctFourResAddPredFunc = IdctFourResAddPred_<IdctResAddPred_AArch64_neon>;
 1088|       |
 1089|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC] = WelsDecoderI16x16LumaPredDc_AArch64_neon;
 1090|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_P]  = WelsDecoderI16x16LumaPredPlane_AArch64_neon;
 1091|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_H]  = WelsDecoderI16x16LumaPredH_AArch64_neon;
 1092|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_V]  = WelsDecoderI16x16LumaPredV_AArch64_neon;
 1093|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC_L]  = WelsDecoderI16x16LumaPredDcLeft_AArch64_neon;
 1094|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC_T]  = WelsDecoderI16x16LumaPredDcTop_AArch64_neon;
 1095|       |
 1096|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_H    ] = WelsDecoderI4x4LumaPredH_AArch64_neon;
 1097|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDL  ] = WelsDecoderI4x4LumaPredDDL_AArch64_neon;
 1098|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDL_TOP] = WelsDecoderI4x4LumaPredDDLTop_AArch64_neon;
 1099|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_VL   ] = WelsDecoderI4x4LumaPredVL_AArch64_neon;
 1100|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_VL_TOP ] = WelsDecoderI4x4LumaPredVLTop_AArch64_neon;
 1101|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_VR   ] = WelsDecoderI4x4LumaPredVR_AArch64_neon;
 1102|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_HU   ] = WelsDecoderI4x4LumaPredHU_AArch64_neon;
 1103|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_HD   ] = WelsDecoderI4x4LumaPredHD_AArch64_neon;
 1104|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_DC   ] = WelsDecoderI4x4LumaPredDc_AArch64_neon;
 1105|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_DC_T   ] = WelsDecoderI4x4LumaPredDcTop_AArch64_neon;
 1106|       |
 1107|       |    pCtx->pGetIChromaPredFunc[C_PRED_H]       = WelsDecoderIChromaPredH_AArch64_neon;
 1108|       |    pCtx->pGetIChromaPredFunc[C_PRED_V]       = WelsDecoderIChromaPredV_AArch64_neon;
 1109|       |    pCtx->pGetIChromaPredFunc[C_PRED_P ]      = WelsDecoderIChromaPredPlane_AArch64_neon;
 1110|       |    pCtx->pGetIChromaPredFunc[C_PRED_DC]      = WelsDecoderIChromaPredDc_AArch64_neon;
 1111|       |    pCtx->pGetIChromaPredFunc[C_PRED_DC_T]      = WelsDecoderIChromaPredDcTop_AArch64_neon;
 1112|       |  }
 1113|       |#endif//HAVE_NEON_AARCH64
 1114|       |
 1115|  26.4k|#if defined(X86_ASM)
 1116|  26.4k|  if (uiCpuFlag & WELS_CPU_MMXEXT) {
  ------------------
  |  |   47|  26.4k|#define WELS_CPU_MMXEXT     0x00000002    /* mmx-ext*/
  ------------------
  |  Branch (1116:7): [True: 26.4k, False: 0]
  ------------------
 1117|  26.4k|    pCtx->pIdctResAddPredFunc   = IdctResAddPred_mmx;
 1118|  26.4k|    pCtx->pIdctFourResAddPredFunc = IdctFourResAddPred_<IdctResAddPred_mmx>;
 1119|       |
 1120|       |    ///////mmx code opt---
 1121|  26.4k|    pCtx->pGetIChromaPredFunc[C_PRED_H]      = WelsDecoderIChromaPredH_mmx;
  ------------------
  |  |  364|  26.4k|#define C_PRED_H         1
  ------------------
 1122|  26.4k|    pCtx->pGetIChromaPredFunc[C_PRED_V]      = WelsDecoderIChromaPredV_mmx;
  ------------------
  |  |  365|  26.4k|#define C_PRED_V         2
  ------------------
 1123|  26.4k|    pCtx->pGetIChromaPredFunc[C_PRED_DC_L  ] = WelsDecoderIChromaPredDcLeft_mmx;
  ------------------
  |  |  368|  26.4k|#define C_PRED_DC_L      4
  ------------------
 1124|  26.4k|    pCtx->pGetIChromaPredFunc[C_PRED_DC_128] = WelsDecoderIChromaPredDcNA_mmx;
  ------------------
  |  |  370|  26.4k|#define C_PRED_DC_128    6
  ------------------
 1125|  26.4k|    pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDR]  = WelsDecoderI4x4LumaPredDDR_mmx;
  ------------------
  |  |  347|  26.4k|#define I4_PRED_DDR      4 //diagonal_down_right
  ------------------
 1126|  26.4k|    pCtx->pGetI4x4LumaPredFunc[I4_PRED_HD ]  = WelsDecoderI4x4LumaPredHD_mmx;
  ------------------
  |  |  349|  26.4k|#define I4_PRED_HD       6 //horizon_down
  ------------------
 1127|  26.4k|    pCtx->pGetI4x4LumaPredFunc[I4_PRED_HU ]  = WelsDecoderI4x4LumaPredHU_mmx;
  ------------------
  |  |  351|  26.4k|#define I4_PRED_HU       8 //horizon_up
  ------------------
 1128|  26.4k|    pCtx->pGetI4x4LumaPredFunc[I4_PRED_VR ]  = WelsDecoderI4x4LumaPredVR_mmx;
  ------------------
  |  |  348|  26.4k|#define I4_PRED_VR       5 //vertical_right
  ------------------
 1129|  26.4k|    pCtx->pGetI4x4LumaPredFunc[I4_PRED_DDL]  = WelsDecoderI4x4LumaPredDDL_mmx;
  ------------------
  |  |  346|  26.4k|#define I4_PRED_DDL      3 //diagonal_down_left
  ------------------
 1130|  26.4k|    pCtx->pGetI4x4LumaPredFunc[I4_PRED_VL ]  = WelsDecoderI4x4LumaPredVL_mmx;
  ------------------
  |  |  350|  26.4k|#define I4_PRED_VL       7 //vertical_left
  ------------------
 1131|  26.4k|  }
 1132|  26.4k|  if (uiCpuFlag & WELS_CPU_SSE2) {
  ------------------
  |  |   49|  26.4k|#define WELS_CPU_SSE2       0x00000008    /* sse 2 */
  ------------------
  |  Branch (1132:7): [True: 26.4k, False: 0]
  ------------------
 1133|  26.4k|    pCtx->pIdctResAddPredFunc     = IdctResAddPred_sse2;
 1134|  26.4k|    pCtx->pIdctFourResAddPredFunc = IdctFourResAddPred_<IdctResAddPred_sse2>;
 1135|       |
 1136|  26.4k|    pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC] = WelsDecoderI16x16LumaPredDc_sse2;
  ------------------
  |  |  333|  26.4k|#define I16_PRED_DC      2
  ------------------
 1137|  26.4k|    pCtx->pGetI16x16LumaPredFunc[I16_PRED_P]  = WelsDecoderI16x16LumaPredPlane_sse2;
  ------------------
  |  |  334|  26.4k|#define I16_PRED_P       3
  ------------------
 1138|  26.4k|    pCtx->pGetI16x16LumaPredFunc[I16_PRED_H]  = WelsDecoderI16x16LumaPredH_sse2;
  ------------------
  |  |  332|  26.4k|#define I16_PRED_H       1
  ------------------
 1139|  26.4k|    pCtx->pGetI16x16LumaPredFunc[I16_PRED_V]  = WelsDecoderI16x16LumaPredV_sse2;
  ------------------
  |  |  331|  26.4k|#define I16_PRED_V       0
  ------------------
 1140|  26.4k|    pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC_T  ] = WelsDecoderI16x16LumaPredDcTop_sse2;
  ------------------
  |  |  337|  26.4k|#define I16_PRED_DC_T    5
  ------------------
 1141|  26.4k|    pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC_128] = WelsDecoderI16x16LumaPredDcNA_sse2;
  ------------------
  |  |  338|  26.4k|#define I16_PRED_DC_128  6
  ------------------
 1142|  26.4k|    pCtx->pGetIChromaPredFunc[C_PRED_P ]      = WelsDecoderIChromaPredPlane_sse2;
  ------------------
  |  |  366|  26.4k|#define C_PRED_P         3
  ------------------
 1143|  26.4k|    pCtx->pGetIChromaPredFunc[C_PRED_DC]      = WelsDecoderIChromaPredDc_sse2;
  ------------------
  |  |  363|  26.4k|#define C_PRED_DC        0
  ------------------
 1144|  26.4k|    pCtx->pGetIChromaPredFunc[C_PRED_DC_T]    = WelsDecoderIChromaPredDcTop_sse2;
  ------------------
  |  |  369|  26.4k|#define C_PRED_DC_T      5
  ------------------
 1145|  26.4k|    pCtx->pGetI4x4LumaPredFunc[I4_PRED_H]     = WelsDecoderI4x4LumaPredH_sse2;
  ------------------
  |  |  344|  26.4k|#define I4_PRED_H        1
  ------------------
 1146|  26.4k|  }
 1147|  26.4k|#if defined(HAVE_AVX2)
 1148|  26.4k|  if (uiCpuFlag & WELS_CPU_AVX2) {
  ------------------
  |  |   72|  26.4k|#define WELS_CPU_AVX2       0x00040000  /* AVX2 */
  ------------------
  |  Branch (1148:7): [True: 26.4k, False: 0]
  ------------------
 1149|  26.4k|    pCtx->pIdctResAddPredFunc     = IdctResAddPred_avx2;
 1150|  26.4k|    pCtx->pIdctFourResAddPredFunc = IdctFourResAddPred_avx2;
 1151|  26.4k|  }
 1152|  26.4k|#endif
 1153|       |
 1154|  26.4k|#endif
 1155|       |
 1156|       |#if defined(HAVE_MMI)
 1157|       |  if (uiCpuFlag & WELS_CPU_MMI) {
 1158|       |    pCtx->pIdctResAddPredFunc   = IdctResAddPred_mmi;
 1159|       |    pCtx->pIdctFourResAddPredFunc = IdctFourResAddPred_<IdctResAddPred_mmi>;
 1160|       |
 1161|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC] = WelsDecoderI16x16LumaPredDc_mmi;
 1162|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_P]  = WelsDecoderI16x16LumaPredPlane_mmi;
 1163|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_H]  = WelsDecoderI16x16LumaPredH_mmi;
 1164|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_V]  = WelsDecoderI16x16LumaPredV_mmi;
 1165|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC_T  ] = WelsDecoderI16x16LumaPredDcTop_mmi;
 1166|       |    pCtx->pGetI16x16LumaPredFunc[I16_PRED_DC_128] = WelsDecoderI16x16LumaPredDcNA_mmi;
 1167|       |    pCtx->pGetIChromaPredFunc[C_PRED_P ]      = WelsDecoderIChromaPredPlane_mmi;
 1168|       |    pCtx->pGetIChromaPredFunc[C_PRED_DC]      = WelsDecoderIChromaPredDc_mmi;
 1169|       |    pCtx->pGetIChromaPredFunc[C_PRED_DC_T]    = WelsDecoderIChromaPredDcTop_mmi;
 1170|       |    pCtx->pGetI4x4LumaPredFunc[I4_PRED_H]     = WelsDecoderI4x4LumaPredH_mmi;
 1171|       |  }
 1172|       |#endif//HAVE_MMI
 1173|       |
 1174|       |#if defined(HAVE_LSX)
 1175|       |  if (uiCpuFlag & WELS_CPU_LSX) {
 1176|       |    pCtx->pIdctResAddPredFunc   = IdctResAddPred_lsx;
 1177|       |    pCtx->pIdctFourResAddPredFunc = IdctFourResAddPred_<IdctResAddPred_lsx>;
 1178|       |    pCtx->pIdctResAddPredFunc8x8  = IdctResAddPred8x8_lsx;
 1179|       |  }
 1180|       |#endif
 1181|  26.4k|}
UpdateDecStatNoFreezingInfo:
 1209|   580k|void UpdateDecStatNoFreezingInfo (PWelsDecoderContext pCtx) {
 1210|   580k|  PDqLayer pCurDq = pCtx->pCurDqLayer;
 1211|   580k|  PPicture pPic = pCtx->pDec;
 1212|   580k|  SDecoderStatistics* pDecStat = pCtx->pDecoderStatistics;
 1213|       |
 1214|   580k|  if (pDecStat->iAvgLumaQp == -1) //first correct frame received
  ------------------
  |  Branch (1214:7): [True: 10.8k, False: 570k]
  ------------------
 1215|  10.8k|    pDecStat->iAvgLumaQp = 0;
 1216|       |
 1217|       |  //update QP info
 1218|   580k|  int32_t iTotalQp = 0;
 1219|   580k|  const int32_t kiMbNum = pCurDq->iMbWidth * pCurDq->iMbHeight;
 1220|   580k|  if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) { //all correct
  ------------------
  |  Branch (1220:7): [True: 0, False: 580k]
  ------------------
 1221|      0|    for (int32_t iMb = 0; iMb < kiMbNum; ++iMb) {
  ------------------
  |  Branch (1221:27): [True: 0, False: 0]
  ------------------
 1222|      0|      iTotalQp += pCurDq->pLumaQp[iMb];
 1223|      0|    }
 1224|      0|    iTotalQp /= kiMbNum;
 1225|   580k|  } else {
 1226|   580k|    int32_t iCorrectMbNum = 0;
 1227|   405M|    for (int32_t iMb = 0; iMb < kiMbNum; ++iMb) {
  ------------------
  |  Branch (1227:27): [True: 405M, False: 580k]
  ------------------
 1228|   405M|      iCorrectMbNum += (int32_t) pCurDq->pMbCorrectlyDecodedFlag[iMb];
 1229|   405M|      iTotalQp += pCurDq->pLumaQp[iMb] * pCurDq->pMbCorrectlyDecodedFlag[iMb];
 1230|   405M|    }
 1231|   580k|    if (iCorrectMbNum == 0) //non MB is correct, should remain QP statistic info
  ------------------
  |  Branch (1231:9): [True: 0, False: 580k]
  ------------------
 1232|      0|      iTotalQp = pDecStat->iAvgLumaQp;
 1233|   580k|    else
 1234|   580k|      iTotalQp /= iCorrectMbNum;
 1235|   580k|  }
 1236|   580k|  if (pDecStat->uiDecodedFrameCount + 1 == 0) { //maximum uint32_t reached
  ------------------
  |  Branch (1236:7): [True: 0, False: 580k]
  ------------------
 1237|      0|    ResetDecStatNums (pDecStat);
 1238|      0|    pDecStat->iAvgLumaQp = iTotalQp;
 1239|      0|  } else
 1240|   580k|    pDecStat->iAvgLumaQp = (int) ((uint64_t) (pDecStat->iAvgLumaQp * pDecStat->uiDecodedFrameCount + iTotalQp) /
 1241|   580k|                                  (pDecStat->uiDecodedFrameCount + 1));
 1242|       |
 1243|       |  //update IDR number
 1244|   580k|  if (pCurDq->sLayerInfo.sNalHeaderExt.bIdrFlag) {
  ------------------
  |  Branch (1244:7): [True: 7.04k, False: 573k]
  ------------------
 1245|  7.04k|    pDecStat->uiIDRCorrectNum += (pPic->bIsComplete);
 1246|  7.04k|    if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE)
  ------------------
  |  Branch (1246:9): [True: 7.04k, False: 0]
  ------------------
 1247|  7.04k|      pDecStat->uiEcIDRNum += (!pPic->bIsComplete);
 1248|  7.04k|  }
 1249|   580k|}
UpdateDecStat:
 1252|   580k|void UpdateDecStat (PWelsDecoderContext pCtx, const bool kbOutput) {
 1253|   580k|  if (pCtx->bFreezeOutput)
  ------------------
  |  Branch (1253:7): [True: 0, False: 580k]
  ------------------
 1254|      0|    UpdateDecStatFreezingInfo (pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.bIdrFlag, pCtx->pDecoderStatistics);
 1255|   580k|  else if (kbOutput)
  ------------------
  |  Branch (1255:12): [True: 580k, False: 0]
  ------------------
 1256|   580k|    UpdateDecStatNoFreezingInfo (pCtx);
 1257|   580k|}
decoder.cpp:_ZN7WelsDecL20GetTargetRefListSizeEPNS_21TagWelsDecoderContextE:
  437|   219k|static inline int32_t GetTargetRefListSize (PWelsDecoderContext pCtx) {
  438|   219k|  int32_t iNumRefFrames = 0;
  439|       |  // +2 for EC MV Copy buffer exchange
  440|   219k|  if ((pCtx == NULL) || (pCtx->pSps == NULL)) {
  ------------------
  |  Branch (440:7): [True: 0, False: 219k]
  |  Branch (440:25): [True: 0, False: 219k]
  ------------------
  441|      0|    iNumRefFrames = MAX_REF_PIC_COUNT + 2;
  ------------------
  |  |   45|      0|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
  442|   219k|  } else {
  443|   219k|    iNumRefFrames = pCtx->pSps->iNumRefFrames + 2;
  444|   219k|    int32_t  iThreadCount = GetThreadCount (pCtx);
  445|   219k|    if (iThreadCount > 1) {
  ------------------
  |  Branch (445:9): [True: 0, False: 219k]
  ------------------
  446|       |      //due to thread and reordering buffering, it needs more dpb space
  447|      0|      iNumRefFrames = MAX_DPB_COUNT + iThreadCount;
  ------------------
  |  |   49|      0|#define MAX_DPB_COUNT                   (MAX_REF_PIC_COUNT + 1) // 1 additional position for re-order and other process
  |  |  ------------------
  |  |  |  |   45|      0|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  |  |  ------------------
  ------------------
  448|      0|    }
  449|   219k|  }
  450|       |
  451|   219k|#ifdef LONG_TERM_REF
  452|       |  //pic_queue size minimum set 2
  453|   219k|  if (iNumRefFrames < 2) {
  ------------------
  |  Branch (453:7): [True: 0, False: 219k]
  ------------------
  454|      0|    iNumRefFrames = 2;
  455|      0|  }
  456|   219k|#endif
  457|       |
  458|   219k|  return iNumRefFrames;
  459|   219k|}
decoder.cpp:_ZN7WelsDecL15IncreasePicBuffEPNS_21TagWelsDecoderContextEPPNS_10TagPicBuffEiiii:
  108|  2.27k|                                const int32_t kiPicWidth, const int32_t kiPicHeight, const int32_t kiNewSize) {
  109|  2.27k|  PPicBuff pPicOldBuf = *ppPicBuf;
  110|  2.27k|  PPicBuff pPicNewBuf = NULL;
  111|  2.27k|  int32_t iPicIdx = 0;
  112|  2.27k|  if (kiOldSize <= 0 || kiNewSize <= 0 || kiPicWidth <= 0 || kiPicHeight <= 0) {
  ------------------
  |  Branch (112:7): [True: 0, False: 2.27k]
  |  Branch (112:25): [True: 0, False: 2.27k]
  |  Branch (112:43): [True: 0, False: 2.27k]
  |  Branch (112:62): [True: 0, False: 2.27k]
  ------------------
  113|      0|    return ERR_INFO_INVALID_PARAM;
  114|      0|  }
  115|       |
  116|  2.27k|  CMemoryAlign* pMa = pCtx->pMemAlign;
  117|  2.27k|  pPicNewBuf = (PPicBuff)pMa->WelsMallocz (sizeof (SPicBuff), "PPicBuff");
  118|       |
  119|  2.27k|  if (NULL == pPicNewBuf) {
  ------------------
  |  Branch (119:7): [True: 0, False: 2.27k]
  ------------------
  120|      0|    return ERR_INFO_OUT_OF_MEMORY;
  121|      0|  }
  122|       |
  123|  2.27k|  pPicNewBuf->ppPic = (PPicture*)pMa->WelsMallocz (kiNewSize * sizeof (PPicture), "PPicture*");
  124|       |
  125|  2.27k|  if (NULL == pPicNewBuf->ppPic) {
  ------------------
  |  Branch (125:7): [True: 0, False: 2.27k]
  ------------------
  126|      0|    pPicNewBuf->iCapacity = 0;
  127|      0|    DestroyPicBuff (pCtx, &pPicNewBuf, pMa);
  128|      0|    return ERR_INFO_OUT_OF_MEMORY;
  129|      0|  }
  130|       |
  131|       |  // increase new PicBuf
  132|  17.4k|  for (iPicIdx = kiOldSize; iPicIdx < kiNewSize; ++ iPicIdx) {
  ------------------
  |  Branch (132:29): [True: 15.1k, False: 2.27k]
  ------------------
  133|  15.1k|    PPicture pPic = AllocPicture (pCtx, kiPicWidth, kiPicHeight);
  134|  15.1k|    if (NULL == pPic) {
  ------------------
  |  Branch (134:9): [True: 0, False: 15.1k]
  ------------------
  135|       |      // Set maximum capacity as the new malloc memory at the tail
  136|      0|      pPicNewBuf->iCapacity = iPicIdx;
  137|      0|      DestroyPicBuff (pCtx, &pPicNewBuf, pMa);
  138|      0|      return ERR_INFO_OUT_OF_MEMORY;
  139|      0|    }
  140|  15.1k|    pPicNewBuf->ppPic[iPicIdx] = pPic;
  141|  15.1k|  }
  142|       |
  143|       |  // copy old PicBuf to new PicBuf
  144|  2.27k|  memcpy (pPicNewBuf->ppPic, pPicOldBuf->ppPic, kiOldSize * sizeof (PPicture));
  145|       |
  146|       |// initialize context in queue
  147|  2.27k|  pPicNewBuf->iCapacity   = kiNewSize;
  148|  2.27k|  pPicNewBuf->iCurrentIdx = pPicOldBuf->iCurrentIdx;
  149|  2.27k|  * ppPicBuf              = pPicNewBuf;
  150|       |
  151|  25.1k|  for (int32_t i = 0; i < pPicNewBuf->iCapacity; i++) {
  ------------------
  |  Branch (151:23): [True: 22.9k, False: 2.27k]
  ------------------
  152|  22.9k|    pPicNewBuf->ppPic[i]->bUsedAsRef = false;
  153|  22.9k|    pPicNewBuf->ppPic[i]->bIsLongRef = false;
  154|  22.9k|    pPicNewBuf->ppPic[i]->iRefCount = 0;
  155|  22.9k|    pPicNewBuf->ppPic[i]->pSetUnRef = NULL;
  156|  22.9k|    pPicNewBuf->ppPic[i]->bIsComplete = false;
  157|  22.9k|  }
  158|       |// remove old PicBuf
  159|  2.27k|  if (pPicOldBuf->ppPic != NULL) {
  ------------------
  |  Branch (159:7): [True: 2.27k, False: 0]
  ------------------
  160|  2.27k|    pMa->WelsFree (pPicOldBuf->ppPic, "pPicOldBuf->queue");
  161|  2.27k|    pPicOldBuf->ppPic = NULL;
  162|  2.27k|  }
  163|  2.27k|  pPicOldBuf->iCapacity = 0;
  164|  2.27k|  pPicOldBuf->iCurrentIdx = 0;
  165|  2.27k|  pMa->WelsFree (pPicOldBuf, "pPicOldBuf");
  166|       |  pPicOldBuf = NULL;
  167|  2.27k|  return ERR_NONE;
  168|  2.27k|}
decoder.cpp:_ZN7WelsDecL15DecreasePicBuffEPNS_21TagWelsDecoderContextEPPNS_10TagPicBuffEiiii:
  171|  2.28k|                                const int32_t kiPicWidth, const int32_t kiPicHeight, const int32_t kiNewSize) {
  172|  2.28k|  PPicBuff pPicOldBuf = *ppPicBuf;
  173|  2.28k|  PPicBuff pPicNewBuf = NULL;
  174|  2.28k|  int32_t iPicIdx = 0;
  175|  2.28k|  if (kiOldSize <= 0 || kiNewSize <= 0 || kiPicWidth <= 0 || kiPicHeight <= 0) {
  ------------------
  |  Branch (175:7): [True: 0, False: 2.28k]
  |  Branch (175:25): [True: 0, False: 2.28k]
  |  Branch (175:43): [True: 0, False: 2.28k]
  |  Branch (175:62): [True: 0, False: 2.28k]
  ------------------
  176|      0|    return ERR_INFO_INVALID_PARAM;
  177|      0|  }
  178|       |
  179|  2.28k|  CMemoryAlign* pMa = pCtx->pMemAlign;
  180|       |
  181|  2.28k|  pPicNewBuf = (PPicBuff)pMa->WelsMallocz (sizeof (SPicBuff), "PPicBuff");
  182|       |
  183|  2.28k|  if (NULL == pPicNewBuf) {
  ------------------
  |  Branch (183:7): [True: 0, False: 2.28k]
  ------------------
  184|      0|    return ERR_INFO_OUT_OF_MEMORY;
  185|      0|  }
  186|       |
  187|  2.28k|  pPicNewBuf->ppPic = (PPicture*)pMa->WelsMallocz (kiNewSize * sizeof (PPicture), "PPicture*");
  188|       |
  189|  2.28k|  if (NULL == pPicNewBuf->ppPic) {
  ------------------
  |  Branch (189:7): [True: 0, False: 2.28k]
  ------------------
  190|      0|    pPicNewBuf->iCapacity = 0;
  191|      0|    DestroyPicBuff (pCtx, &pPicNewBuf, pMa);
  192|      0|    return ERR_INFO_OUT_OF_MEMORY;
  193|      0|  }
  194|       |
  195|  2.28k|  ResetReorderingPictureBuffers (pCtx->pPictReoderingStatus, pCtx->pPictInfoList, false);
  196|       |
  197|  2.28k|  int32_t iPrevPicIdx = -1;
  198|  11.2k|  for (iPrevPicIdx = 0; iPrevPicIdx < kiOldSize; ++iPrevPicIdx) {
  ------------------
  |  Branch (198:25): [True: 10.7k, False: 552]
  ------------------
  199|  10.7k|    if (pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb == pPicOldBuf->ppPic[iPrevPicIdx]) {
  ------------------
  |  Branch (199:9): [True: 1.73k, False: 8.99k]
  ------------------
  200|  1.73k|      break;
  201|  1.73k|    }
  202|  10.7k|  }
  203|  2.28k|  int32_t iDelIdx;
  204|  2.28k|  if (iPrevPicIdx < kiOldSize && iPrevPicIdx >= kiNewSize) {
  ------------------
  |  Branch (204:7): [True: 1.73k, False: 552]
  |  Branch (204:34): [True: 448, False: 1.28k]
  ------------------
  205|       |    // found pPreviousDecodedPictureInDpb,
  206|    448|    pPicNewBuf->ppPic[0] = pPicOldBuf->ppPic[iPrevPicIdx];
  207|    448|    pPicNewBuf->iCurrentIdx = 0;
  208|    448|    memcpy (pPicNewBuf->ppPic + 1, pPicOldBuf->ppPic, (kiNewSize - 1) * sizeof (PPicture));
  209|    448|    iDelIdx = kiNewSize - 1;
  210|  1.83k|  } else {
  211|  1.83k|    memcpy (pPicNewBuf->ppPic, pPicOldBuf->ppPic, kiNewSize * sizeof (PPicture));
  212|  1.83k|    pPicNewBuf->iCurrentIdx = iPrevPicIdx < kiNewSize ? iPrevPicIdx : 0;
  ------------------
  |  Branch (212:31): [True: 1.28k, False: 552]
  ------------------
  213|  1.83k|    iDelIdx = kiNewSize;
  214|  1.83k|  }
  215|       |
  216|       |  //update references due to allocation changes
  217|       |  //all references' references have to be reset oss-buzz 14423
  218|  10.1k|  for (int32_t i = 0; i < kiNewSize; i++) {
  ------------------
  |  Branch (218:23): [True: 7.87k, False: 2.28k]
  ------------------
  219|  23.6k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (219:36): [True: 15.7k, False: 7.87k]
  ------------------
  220|  15.7k|      int32_t j = -1;
  221|  21.4k|      while (++j < MAX_DPB_COUNT && pPicNewBuf->ppPic[i]->pRefPic[listIdx][j] != NULL) {
  ------------------
  |  |   49|  42.9k|#define MAX_DPB_COUNT                   (MAX_REF_PIC_COUNT + 1) // 1 additional position for re-order and other process
  |  |  ------------------
  |  |  |  |   45|  21.4k|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  |  |  ------------------
  ------------------
  |  Branch (221:14): [True: 21.1k, False: 323]
  |  Branch (221:37): [True: 5.73k, False: 15.4k]
  ------------------
  222|  5.73k|        pPicNewBuf->ppPic[i]->pRefPic[listIdx][j] = NULL;
  223|  5.73k|      }
  224|  15.7k|    }
  225|  7.87k|  }
  226|       |
  227|  17.9k|  for (iPicIdx = iDelIdx; iPicIdx < kiOldSize; iPicIdx++) {
  ------------------
  |  Branch (227:27): [True: 15.6k, False: 2.28k]
  ------------------
  228|  15.6k|    if (iPrevPicIdx != iPicIdx) {
  ------------------
  |  Branch (228:9): [True: 15.2k, False: 448]
  ------------------
  229|  15.2k|      if (pPicOldBuf->ppPic[iPicIdx] != NULL) {
  ------------------
  |  Branch (229:11): [True: 15.2k, False: 0]
  ------------------
  230|  15.2k|        FreePicture (pPicOldBuf->ppPic[iPicIdx], pMa);
  231|  15.2k|        pPicOldBuf->ppPic[iPicIdx] = NULL;
  232|  15.2k|      }
  233|  15.2k|    }
  234|  15.6k|  }
  235|       |
  236|       |  // initialize context in queue
  237|  2.28k|  pPicNewBuf->iCapacity = kiNewSize;
  238|  2.28k|  * ppPicBuf             = pPicNewBuf;
  239|       |
  240|  10.1k|  for (int32_t i = 0; i < pPicNewBuf->iCapacity; i++) {
  ------------------
  |  Branch (240:23): [True: 7.87k, False: 2.28k]
  ------------------
  241|  7.87k|    pPicNewBuf->ppPic[i]->bUsedAsRef = false;
  242|  7.87k|    pPicNewBuf->ppPic[i]->bIsLongRef = false;
  243|  7.87k|    pPicNewBuf->ppPic[i]->iRefCount = 0;
  244|  7.87k|    pPicNewBuf->ppPic[i]->pSetUnRef = NULL;
  245|  7.87k|    pPicNewBuf->ppPic[i]->bIsComplete = false;
  246|  7.87k|  }
  247|       |  // remove old PicBuf
  248|  2.28k|  if (pPicOldBuf->ppPic != NULL) {
  ------------------
  |  Branch (248:7): [True: 2.28k, False: 0]
  ------------------
  249|  2.28k|    pMa->WelsFree (pPicOldBuf->ppPic, "pPicOldBuf->queue");
  250|  2.28k|    pPicOldBuf->ppPic = NULL;
  251|  2.28k|  }
  252|  2.28k|  pPicOldBuf->iCapacity = 0;
  253|  2.28k|  pPicOldBuf->iCurrentIdx = 0;
  254|  2.28k|  pMa->WelsFree (pPicOldBuf, "pPicOldBuf");
  255|  2.28k|  pPicOldBuf = NULL;
  256|       |
  257|  2.28k|  return ERR_NONE;
  258|  2.28k|}
decoder.cpp:_ZN7WelsDecL13CreatePicBuffEPNS_21TagWelsDecoderContextEPPNS_10TagPicBuffEiii:
   64|  40.4k|                              const int32_t kiPicWidth, const int32_t kiPicHeight) {
   65|       |
   66|  40.4k|  PPicBuff pPicBuf = NULL;
   67|  40.4k|  int32_t iPicIdx = 0;
   68|  40.4k|  if (kiSize <= 0 || kiPicWidth <= 0 || kiPicHeight <= 0) {
  ------------------
  |  Branch (68:7): [True: 0, False: 40.4k]
  |  Branch (68:22): [True: 0, False: 40.4k]
  |  Branch (68:41): [True: 0, False: 40.4k]
  ------------------
   69|      0|    return ERR_INFO_INVALID_PARAM;
   70|      0|  }
   71|       |
   72|  40.4k|  CMemoryAlign* pMa = pCtx->pMemAlign;
   73|       |
   74|  40.4k|  pPicBuf = (PPicBuff)pMa->WelsMallocz (sizeof (SPicBuff), "PPicBuff");
   75|       |
   76|  40.4k|  if (NULL == pPicBuf) {
  ------------------
  |  Branch (76:7): [True: 0, False: 40.4k]
  ------------------
   77|      0|    return ERR_INFO_OUT_OF_MEMORY;
   78|      0|  }
   79|       |
   80|  40.4k|  pPicBuf->ppPic = (PPicture*)pMa->WelsMallocz (kiSize * sizeof (PPicture), "PPicture*");
   81|       |
   82|  40.4k|  if (NULL == pPicBuf->ppPic) {
  ------------------
  |  Branch (82:7): [True: 0, False: 40.4k]
  ------------------
   83|      0|    pPicBuf->iCapacity = 0;
   84|      0|    DestroyPicBuff (pCtx, &pPicBuf, pMa);
   85|      0|    return ERR_INFO_OUT_OF_MEMORY;
   86|      0|  }
   87|       |
   88|   267k|  for (iPicIdx = 0; iPicIdx < kiSize; ++ iPicIdx) {
  ------------------
  |  Branch (88:21): [True: 227k, False: 40.4k]
  ------------------
   89|   227k|    PPicture pPic = AllocPicture (pCtx, kiPicWidth, kiPicHeight);
   90|   227k|    if (NULL == pPic) {
  ------------------
  |  Branch (90:9): [True: 0, False: 227k]
  ------------------
   91|       |      // init capacity first for free memory
   92|      0|      pPicBuf->iCapacity = iPicIdx;
   93|      0|      DestroyPicBuff (pCtx, &pPicBuf, pMa);
   94|      0|      return ERR_INFO_OUT_OF_MEMORY;
   95|      0|    }
   96|   227k|    pPicBuf->ppPic[iPicIdx] = pPic;
   97|   227k|  }
   98|       |
   99|       |// initialize context in queue
  100|  40.4k|  pPicBuf->iCapacity   = kiSize;
  101|  40.4k|  pPicBuf->iCurrentIdx = 0;
  102|  40.4k|  * ppPicBuf           = pPicBuf;
  103|       |
  104|  40.4k|  return ERR_NONE;
  105|  40.4k|}

_ZN7WelsDec22ParsePredWeightedTableEPN10WelsCommon15TagBitStringAuxEPNS_15TagSliceHeadersE:
  320|  78.3k|int32_t ParsePredWeightedTable (PBitStringAux pBs, PSliceHeader pSh) {
  321|  78.3k|  uint32_t uiCode;
  322|  78.3k|  int32_t iList = 0;
  323|  78.3k|  int32_t iCode;
  324|       |
  325|  78.3k|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCode));
  ------------------
  |  |   52|  78.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  78.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  78.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.29k, False: 77.0k]
  |  |  ------------------
  |  |   55|  78.3k|    return uiRetTmp; \
  |  |   56|  78.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 77.0k]
  |  |  ------------------
  ------------------
  326|  77.0k|  WELS_CHECK_SE_BOTH_ERROR_NOLOG (uiCode, 0, 7, "luma_log2_weight_denom",
  ------------------
  |  |  269|  77.0k|#define WELS_CHECK_SE_BOTH_ERROR_NOLOG(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  270|  77.0k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (270:5): [True: 0, False: 77.0k]
  |  |  |  Branch (270:28): [True: 15.9k, False: 61.1k]
  |  |  ------------------
  |  |  271|  15.9k|  return ret_code;\
  |  |  272|  15.9k|}\
  |  |  273|  77.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (273:8): [Folded, False: 61.1k]
  |  |  ------------------
  ------------------
  327|  77.0k|                                  GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_LUMA_LOG2_WEIGHT_DENOM));
  328|  61.1k|  pSh->sPredWeightTable.uiLumaLog2WeightDenom = uiCode;
  329|  61.1k|  if (pSh->pSps->uiChromaArrayType != 0) {
  ------------------
  |  Branch (329:7): [True: 12.5k, False: 48.5k]
  ------------------
  330|  12.5k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode));
  ------------------
  |  |   52|  12.5k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  12.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  12.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 480, False: 12.0k]
  |  |  ------------------
  |  |   55|  12.5k|    return uiRetTmp; \
  |  |   56|  12.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 12.0k]
  |  |  ------------------
  ------------------
  331|  12.0k|    WELS_CHECK_SE_BOTH_ERROR_NOLOG (uiCode, 0, 7, "chroma_log2_weight_denom",
  ------------------
  |  |  269|  12.0k|#define WELS_CHECK_SE_BOTH_ERROR_NOLOG(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  270|  12.0k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (270:5): [True: 0, False: 12.0k]
  |  |  |  Branch (270:28): [True: 449, False: 11.6k]
  |  |  ------------------
  |  |  271|    449|  return ret_code;\
  |  |  272|    449|}\
  |  |  273|  12.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (273:8): [Folded, False: 11.6k]
  |  |  ------------------
  ------------------
  332|  12.0k|                                    GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_CHROMA_LOG2_WEIGHT_DENOM));
  333|  11.6k|    pSh->sPredWeightTable.uiChromaLog2WeightDenom = uiCode;
  334|  11.6k|  }
  335|       |
  336|  60.2k|  if ((pSh->sPredWeightTable.uiLumaLog2WeightDenom | pSh->sPredWeightTable.uiChromaLog2WeightDenom) > 7)
  ------------------
  |  Branch (336:7): [True: 0, False: 60.2k]
  ------------------
  337|      0|    return ERR_NONE;
  338|       |
  339|  63.8k|  do {
  340|       |
  341|  94.2k|    for (int i = 0; i < pSh->uiRefCount[iList]; i++) {
  ------------------
  |  Branch (341:21): [True: 77.8k, False: 16.4k]
  ------------------
  342|       |      //luma
  343|  77.8k|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode));
  ------------------
  |  |   52|  77.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  77.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  77.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 331, False: 77.4k]
  |  |  ------------------
  |  |   55|  77.8k|    return uiRetTmp; \
  |  |   56|  77.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 77.4k]
  |  |  ------------------
  ------------------
  344|  77.4k|      if (!!uiCode) {
  ------------------
  |  Branch (344:11): [True: 61.8k, False: 15.6k]
  ------------------
  345|       |
  346|  61.8k|        WELS_READ_VERIFY (BsGetSe (pBs, &iCode));
  ------------------
  |  |   52|  61.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  61.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  61.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 476, False: 61.4k]
  |  |  ------------------
  |  |   55|  61.8k|    return uiRetTmp; \
  |  |   56|  61.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 61.4k]
  |  |  ------------------
  ------------------
  347|  61.4k|        WELS_CHECK_SE_BOTH_ERROR_NOLOG (iCode, -128, 127, "luma_weight",
  ------------------
  |  |  269|  61.4k|#define WELS_CHECK_SE_BOTH_ERROR_NOLOG(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  270|  61.4k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (270:5): [True: 255, False: 61.1k]
  |  |  |  Branch (270:28): [True: 177, False: 60.9k]
  |  |  ------------------
  |  |  271|    432|  return ret_code;\
  |  |  272|    432|}\
  |  |  273|  61.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (273:8): [Folded, False: 60.9k]
  |  |  ------------------
  ------------------
  348|  61.4k|                                        GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_LUMA_WEIGHT));
  349|  60.9k|        pSh->sPredWeightTable.sPredList[iList].iLumaWeight[i] = iCode;
  350|       |
  351|  60.9k|        WELS_READ_VERIFY (BsGetSe (pBs, &iCode));
  ------------------
  |  |   52|  60.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  60.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  60.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 29.5k, False: 31.3k]
  |  |  ------------------
  |  |   55|  60.9k|    return uiRetTmp; \
  |  |   56|  60.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 31.3k]
  |  |  ------------------
  ------------------
  352|  31.3k|        WELS_CHECK_SE_BOTH_ERROR_NOLOG (iCode, -128, 127, "luma_offset",
  ------------------
  |  |  269|  31.3k|#define WELS_CHECK_SE_BOTH_ERROR_NOLOG(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  270|  31.3k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (270:5): [True: 88, False: 31.3k]
  |  |  |  Branch (270:28): [True: 14.4k, False: 16.8k]
  |  |  ------------------
  |  |  271|  14.5k|  return ret_code;\
  |  |  272|  14.5k|}\
  |  |  273|  31.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (273:8): [Folded, False: 16.8k]
  |  |  ------------------
  ------------------
  353|  31.3k|                                        GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_LUMA_OFFSET));
  354|  16.8k|        pSh->sPredWeightTable.sPredList[iList].iLumaOffset[i] = iCode;
  355|  16.8k|      } else {
  356|  15.6k|        pSh->sPredWeightTable.sPredList[iList].iLumaWeight[i] = 1 << (pSh->sPredWeightTable.uiLumaLog2WeightDenom);
  357|  15.6k|        pSh->sPredWeightTable.sPredList[iList].iLumaOffset[i] = 0;
  358|       |
  359|  15.6k|      }
  360|       |      //chroma
  361|  32.5k|      if (pSh->pSps->uiChromaArrayType == 0)
  ------------------
  |  Branch (361:11): [True: 10.8k, False: 21.6k]
  ------------------
  362|  10.8k|        continue;
  363|       |
  364|  21.6k|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode));
  ------------------
  |  |   52|  21.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  21.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  21.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 372, False: 21.3k]
  |  |  ------------------
  |  |   55|  21.6k|    return uiRetTmp; \
  |  |   56|  21.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
  365|  21.3k|      if (!!uiCode) {
  ------------------
  |  Branch (365:11): [True: 9.17k, False: 12.1k]
  ------------------
  366|  24.9k|        for (int j = 0; j < 2; j++) {
  ------------------
  |  Branch (366:25): [True: 17.4k, False: 7.48k]
  ------------------
  367|       |
  368|       |
  369|  17.4k|          WELS_READ_VERIFY (BsGetSe (pBs, &iCode));
  ------------------
  |  |   52|  17.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  17.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  17.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 404, False: 17.0k]
  |  |  ------------------
  |  |   55|  17.4k|    return uiRetTmp; \
  |  |   56|  17.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 17.0k]
  |  |  ------------------
  ------------------
  370|  17.0k|          WELS_CHECK_SE_BOTH_ERROR_NOLOG (iCode, -128, 127, "chroma_weight",
  ------------------
  |  |  269|  17.0k|#define WELS_CHECK_SE_BOTH_ERROR_NOLOG(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  270|  17.0k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (270:5): [True: 196, False: 16.8k]
  |  |  |  Branch (270:28): [True: 187, False: 16.7k]
  |  |  ------------------
  |  |  271|    383|  return ret_code;\
  |  |  272|    383|}\
  |  |  273|  17.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (273:8): [Folded, False: 16.7k]
  |  |  ------------------
  ------------------
  371|  17.0k|                                          GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_CHROMA_WEIGHT));
  372|  16.7k|          pSh->sPredWeightTable.sPredList[iList].iChromaWeight[i][j] = iCode;
  373|       |
  374|  16.7k|          WELS_READ_VERIFY (BsGetSe (pBs, &iCode));
  ------------------
  |  |   52|  16.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  16.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  16.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 639, False: 16.0k]
  |  |  ------------------
  |  |   55|  16.7k|    return uiRetTmp; \
  |  |   56|  16.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 16.0k]
  |  |  ------------------
  ------------------
  375|  16.0k|          WELS_CHECK_SE_BOTH_ERROR_NOLOG (iCode, -128, 127, "chroma_offset",
  ------------------
  |  |  269|  16.0k|#define WELS_CHECK_SE_BOTH_ERROR_NOLOG(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  270|  16.0k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (270:5): [True: 41, False: 16.0k]
  |  |  |  Branch (270:28): [True: 223, False: 15.8k]
  |  |  ------------------
  |  |  271|    264|  return ret_code;\
  |  |  272|    264|}\
  |  |  273|  16.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (273:8): [Folded, False: 15.8k]
  |  |  ------------------
  ------------------
  376|  16.0k|                                          GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_CHROMA_OFFSET));
  377|  15.8k|          pSh->sPredWeightTable.sPredList[iList].iChromaOffset[i][j] = iCode;
  378|  15.8k|        }
  379|  12.1k|      } else {
  380|  36.4k|        for (int j = 0; j < 2; j++) {
  ------------------
  |  Branch (380:25): [True: 24.2k, False: 12.1k]
  ------------------
  381|       |
  382|       |
  383|  24.2k|          pSh->sPredWeightTable.sPredList[iList].iChromaWeight[i][j] = 1 << (pSh->sPredWeightTable.uiChromaLog2WeightDenom);
  384|  24.2k|          pSh->sPredWeightTable.sPredList[iList].iChromaOffset[i][j] = 0;
  385|  24.2k|        }
  386|  12.1k|      }
  387|       |
  388|  21.3k|    }
  389|  16.4k|    ++iList;
  390|  16.4k|    if (pSh->eSliceType != B_SLICE) {
  ------------------
  |  Branch (390:9): [True: 9.88k, False: 6.59k]
  ------------------
  391|  9.88k|      break;
  392|  9.88k|    }
  393|  16.4k|  } while (iList < LIST_A);//TODO: SUPPORT LIST_A
  ------------------
  |  Branch (393:12): [True: 3.64k, False: 2.94k]
  ------------------
  394|  12.8k|  return ERR_NONE;
  395|  60.2k|}
_ZN7WelsDec25CreateImplicitWeightTableEPNS_21TagWelsDecoderContextE:
  397|   122k|void CreateImplicitWeightTable (PWelsDecoderContext pCtx) {
  398|       |
  399|   122k|  PSlice pSlice = &pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer;
  400|   122k|  PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
  401|   122k|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
  402|   122k|  if (pCurDqLayer->bUseWeightedBiPredIdc && pSliceHeader->pPps->uiWeightedBipredIdc == 2) {
  ------------------
  |  Branch (402:7): [True: 85.9k, False: 36.3k]
  |  Branch (402:45): [True: 37.4k, False: 48.4k]
  ------------------
  403|  37.4k|    int32_t iPoc = pSliceHeader->iPicOrderCntLsb;
  404|       |
  405|       |    //fix Bugzilla 1485229 check if pointers are NULL
  406|  37.4k|    if (pCtx->sRefPic.pRefList[LIST_0][0] && pCtx->sRefPic.pRefList[LIST_1][0]) {
  ------------------
  |  Branch (406:9): [True: 30.4k, False: 7.09k]
  |  Branch (406:46): [True: 30.4k, False: 0]
  ------------------
  407|  30.4k|      if (pSliceHeader->uiRefCount[0] == 1 && pSliceHeader->uiRefCount[1] == 1
  ------------------
  |  Branch (407:11): [True: 17.3k, False: 13.0k]
  |  Branch (407:47): [True: 14.7k, False: 2.65k]
  ------------------
  408|  14.7k|          && int64_t(pCtx->sRefPic.pRefList[LIST_0][0]->iFramePoc) + int64_t(pCtx->sRefPic.pRefList[LIST_1][0]->iFramePoc) == 2 * int64_t(iPoc)) {
  ------------------
  |  Branch (408:14): [True: 1.69k, False: 13.0k]
  ------------------
  409|  1.69k|        pCurDqLayer->bUseWeightedBiPredIdc = false;
  410|  1.69k|        return;
  411|  1.69k|      }
  412|  30.4k|    }
  413|       |
  414|  35.8k|    pCurDqLayer->pPredWeightTable->uiLumaLog2WeightDenom = 5;
  415|  35.8k|    pCurDqLayer->pPredWeightTable->uiChromaLog2WeightDenom = 5;
  416|   131k|    for (int32_t iRef0 = 0; iRef0 < pSliceHeader->uiRefCount[0]; iRef0++) {
  ------------------
  |  Branch (416:29): [True: 95.9k, False: 35.8k]
  ------------------
  417|  95.9k|      if (pCtx->sRefPic.pRefList[LIST_0][iRef0]) {
  ------------------
  |  Branch (417:11): [True: 35.3k, False: 60.5k]
  ------------------
  418|  35.3k|        const int32_t iPoc0 = pCtx->sRefPic.pRefList[LIST_0][iRef0]->iFramePoc;
  419|  35.3k|        bool bIsLongRef0 = pCtx->sRefPic.pRefList[LIST_0][iRef0]->bIsLongRef;
  420|   113k|        for (int32_t iRef1 = 0; iRef1 < pSliceHeader->uiRefCount[1]; iRef1++) {
  ------------------
  |  Branch (420:33): [True: 78.1k, False: 35.3k]
  ------------------
  421|  78.1k|          if (pCtx->sRefPic.pRefList[LIST_1][iRef1]) {
  ------------------
  |  Branch (421:15): [True: 54.8k, False: 23.3k]
  ------------------
  422|  54.8k|            const int32_t iPoc1 = pCtx->sRefPic.pRefList[LIST_1][iRef1]->iFramePoc;
  423|  54.8k|            bool bIsLongRef1 = pCtx->sRefPic.pRefList[LIST_1][iRef1]->bIsLongRef;
  424|  54.8k|            pCurDqLayer->pPredWeightTable->iImplicitWeight[iRef0][iRef1] = 32;
  425|  54.8k|            if (!bIsLongRef0 && !bIsLongRef1) {
  ------------------
  |  Branch (425:17): [True: 52.3k, False: 2.52k]
  |  Branch (425:33): [True: 51.7k, False: 608]
  ------------------
  426|  51.7k|              const int32_t iTd = WELS_CLIP3 (iPoc1 - iPoc0, -128, 127);
  ------------------
  |  |  204|  51.7k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 2.63k, False: 49.1k]
  |  |  |  Branch (204:55): [True: 4.97k, False: 44.1k]
  |  |  ------------------
  ------------------
  427|  51.7k|              if (iTd) {
  ------------------
  |  Branch (427:19): [True: 19.8k, False: 31.8k]
  ------------------
  428|  19.8k|                int32_t iTb = WELS_CLIP3 (iPoc - iPoc0, -128, 127);
  ------------------
  |  |  204|  19.8k|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 7.39k, False: 12.4k]
  |  |  |  Branch (204:55): [True: 7.77k, False: 4.69k]
  |  |  ------------------
  ------------------
  429|  19.8k|                int32_t iTx = (16384 + (WELS_ABS (iTd) >> 1)) / iTd;
  ------------------
  |  |  196|  19.8k|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  ------------------
  |  |  |  Branch (196:23): [True: 11.6k, False: 8.24k]
  |  |  ------------------
  ------------------
  430|  19.8k|                int32_t iDistScaleFactor = (iTb * iTx + 32) >> 8;
  431|  19.8k|                if (iDistScaleFactor >= -64 && iDistScaleFactor <= 128) {
  ------------------
  |  Branch (431:21): [True: 15.3k, False: 4.50k]
  |  Branch (431:48): [True: 9.52k, False: 5.83k]
  ------------------
  432|  9.52k|                  pCurDqLayer->pPredWeightTable->iImplicitWeight[iRef0][iRef1] = 64 - iDistScaleFactor;
  433|  9.52k|                }
  434|  19.8k|              }
  435|  51.7k|            }
  436|  54.8k|          }
  437|  78.1k|        }
  438|  35.3k|      }
  439|  95.9k|    }
  440|  35.8k|  }
  441|   120k|  return;
  442|   122k|}
_ZN7WelsDec25ParseRefPicListReorderingEPN10WelsCommon15TagBitStringAuxEPNS_15TagSliceHeadersE:
  447|  3.45M|int32_t ParseRefPicListReordering (PBitStringAux pBs, PSliceHeader pSh) {
  448|  3.45M|  int32_t iList = 0;
  449|  3.45M|  const EWelsSliceType keSt = pSh->eSliceType;
  450|  3.45M|  PRefPicListReorderSyn pRefPicListReordering = &pSh->pRefPicListReordering;
  451|  3.45M|  PSps pSps = pSh->pSps;
  452|  3.45M|  uint32_t uiCode;
  453|  3.45M|  if (keSt == I_SLICE || keSt == SI_SLICE)
  ------------------
  |  Branch (453:7): [True: 248k, False: 3.20M]
  |  Branch (453:26): [True: 951, False: 3.20M]
  ------------------
  454|   249k|    return ERR_NONE;
  455|       |
  456|       |  // Common syntaxs for P or B slices: list0, list1 followed if B slices used.
  457|  3.33M|  do {
  458|  3.33M|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //ref_pic_list_modification_flag_l0
  ------------------
  |  |   52|  3.33M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.33M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.33M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 835, False: 3.33M]
  |  |  ------------------
  |  |   55|  3.33M|    return uiRetTmp; \
  |  |   56|  3.33M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.33M]
  |  |  ------------------
  ------------------
  459|  3.33M|    pRefPicListReordering->bRefPicListReorderingFlag[iList] = !!uiCode;
  460|       |
  461|  3.33M|    if (pRefPicListReordering->bRefPicListReorderingFlag[iList]) {
  ------------------
  |  Branch (461:9): [True: 142k, False: 3.19M]
  ------------------
  462|   142k|      int32_t iIdx = 0;
  463|   310k|      do {
  464|   310k|        WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //modification_of_pic_nums_idc
  ------------------
  |  |   52|   310k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   310k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   310k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 26.3k, False: 284k]
  |  |  ------------------
  |  |   55|   310k|    return uiRetTmp; \
  |  |   56|   310k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 284k]
  |  |  ------------------
  ------------------
  465|   284k|        const uint32_t kuiIdc = uiCode;
  466|       |
  467|       |        //Fixed the referrence list reordering crash issue.(fault kIdc value > 3 case)---
  468|   284k|        if (((iIdx >= MAX_REF_PIC_COUNT) && (kuiIdc != 3)) || (kuiIdc > 3)) {
  ------------------
  |  |   45|   284k|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
  |  Branch (468:14): [True: 422, False: 284k]
  |  Branch (468:45): [True: 202, False: 220]
  |  Branch (468:63): [True: 40.2k, False: 244k]
  ------------------
  469|  40.4k|          return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REF_REORDERING);
  ------------------
  |  |   59|  40.4k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  470|  40.4k|        }
  471|   244k|        pRefPicListReordering->sReorderingSyn[iList][iIdx].uiReorderingOfPicNumsIdc = kuiIdc;
  472|   244k|        if (kuiIdc == 3)
  ------------------
  |  Branch (472:13): [True: 32.5k, False: 211k]
  ------------------
  473|  32.5k|          break;
  474|       |
  475|   211k|        if (iIdx >= pSh->uiRefCount[iList] || iIdx >= MAX_REF_PIC_COUNT)
  ------------------
  |  |   45|   183k|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
  |  Branch (475:13): [True: 28.2k, False: 183k]
  |  Branch (475:47): [True: 0, False: 183k]
  ------------------
  476|  28.2k|          return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REF_REORDERING);
  ------------------
  |  |   59|  28.2k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  477|       |
  478|   183k|        if (kuiIdc == 0 || kuiIdc == 1) {
  ------------------
  |  Branch (478:13): [True: 96.6k, False: 86.6k]
  |  Branch (478:28): [True: 38.4k, False: 48.1k]
  ------------------
  479|       |          // abs_diff_pic_num_minus1 should be in range 0 to MaxPicNum-1, MaxPicNum is derived as
  480|       |          // 2^(4+log2_max_frame_num_minus4)
  481|   135k|          WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //abs_diff_pic_num_minus1
  ------------------
  |  |   52|   135k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   135k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   135k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 9.71k, False: 125k]
  |  |  ------------------
  |  |   55|   135k|    return uiRetTmp; \
  |  |   56|   135k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 125k]
  |  |  ------------------
  ------------------
  482|   125k|          WELS_CHECK_SE_UPPER_ERROR_NOLOG (uiCode, (uint32_t) (1 << pSps->uiLog2MaxFrameNum), "abs_diff_pic_num_minus1",
  ------------------
  |  |  281|   125k|#define WELS_CHECK_SE_UPPER_ERROR_NOLOG(val, upper_bound, syntax_name, ret_code) do {\
  |  |  282|   125k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (282:5): [True: 4.95k, False: 120k]
  |  |  ------------------
  |  |  283|  4.95k|  return ret_code;\
  |  |  284|  4.95k|}\
  |  |  285|   125k|}while(0)
  |  |  ------------------
  |  |  |  Branch (285:8): [Folded, False: 120k]
  |  |  ------------------
  ------------------
  483|   125k|                                           GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REF_REORDERING));
  484|   120k|          pRefPicListReordering->sReorderingSyn[iList][iIdx].uiAbsDiffPicNumMinus1 = uiCode; // uiAbsDiffPicNumMinus1
  485|   120k|        } else if (kuiIdc == 2) {
  ------------------
  |  Branch (485:20): [True: 48.1k, False: 0]
  ------------------
  486|  48.1k|          WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //long_term_pic_num
  ------------------
  |  |   52|  48.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  48.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  48.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 401, False: 47.7k]
  |  |  ------------------
  |  |   55|  48.1k|    return uiRetTmp; \
  |  |   56|  48.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 47.7k]
  |  |  ------------------
  ------------------
  487|  47.7k|          pRefPicListReordering->sReorderingSyn[iList][iIdx].uiLongTermPicNum = uiCode;
  488|  47.7k|        }
  489|       |
  490|   168k|        ++ iIdx;
  491|   168k|      } while (true);
  ------------------
  |  Branch (491:16): [True: 168k, Folded]
  ------------------
  492|   142k|    }
  493|  3.22M|    if (keSt != B_SLICE)
  ------------------
  |  Branch (493:9): [True: 2.95M, False: 269k]
  ------------------
  494|  2.95M|      break;
  495|   269k|    ++ iList;
  496|   269k|  } while (iList < LIST_A);
  ------------------
  |  Branch (496:12): [True: 137k, False: 132k]
  ------------------
  497|       |
  498|  3.09M|  return ERR_NONE;
  499|  3.20M|}
_ZN7WelsDec21ParseDecRefPicMarkingEPNS_21TagWelsDecoderContextEPN10WelsCommon15TagBitStringAuxEPNS_15TagSliceHeadersEPNS_6TagSpsEb:
  502|  2.94M|                               const bool kbIdrFlag) {
  503|  2.94M|  PRefPicMarking const kpRefMarking = &pSh->sRefMarking;
  504|  2.94M|  uint32_t uiCode;
  505|  2.94M|  if (kbIdrFlag) {
  ------------------
  |  Branch (505:7): [True: 194k, False: 2.74M]
  ------------------
  506|   194k|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //no_output_of_prior_pics_flag
  ------------------
  |  |   52|   194k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   194k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   194k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 298, False: 194k]
  |  |  ------------------
  |  |   55|   194k|    return uiRetTmp; \
  |  |   56|   194k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 194k]
  |  |  ------------------
  ------------------
  507|   194k|    kpRefMarking->bNoOutputOfPriorPicsFlag = !!uiCode;
  508|   194k|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //long_term_reference_flag
  ------------------
  |  |   52|   194k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   194k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   194k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 467, False: 193k]
  |  |  ------------------
  |  |   55|   194k|    return uiRetTmp; \
  |  |   56|   194k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 193k]
  |  |  ------------------
  ------------------
  509|   193k|    kpRefMarking->bLongTermRefFlag = !!uiCode;
  510|  2.74M|  } else {
  511|  2.74M|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_ref_pic_marking_mode_flag
  ------------------
  |  |   52|  2.74M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.74M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.74M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 354, False: 2.74M]
  |  |  ------------------
  |  |   55|  2.74M|    return uiRetTmp; \
  |  |   56|  2.74M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.74M]
  |  |  ------------------
  ------------------
  512|  2.74M|    kpRefMarking->bAdaptiveRefPicMarkingModeFlag = !!uiCode;
  513|  2.74M|    if (kpRefMarking->bAdaptiveRefPicMarkingModeFlag) {
  ------------------
  |  Branch (513:9): [True: 48.5k, False: 2.69M]
  ------------------
  514|  48.5k|      int32_t iIdx = 0;
  515|  48.5k|      bool bAllowMmco5 = true, bMmco4Exist = false, bMmco5Exist = false, bMmco6Exist = false;
  516|   122k|      do {
  517|   122k|        WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //memory_management_control_operation
  ------------------
  |  |   52|   122k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   122k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   122k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.61k, False: 119k]
  |  |  ------------------
  |  |   55|   122k|    return uiRetTmp; \
  |  |   56|   122k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 119k]
  |  |  ------------------
  ------------------
  518|   119k|        const uint32_t kuiMmco = uiCode;
  519|       |
  520|   119k|        kpRefMarking->sMmcoRef[iIdx].uiMmcoType = kuiMmco;
  521|   119k|        if (kuiMmco == MMCO_END)
  ------------------
  |  Branch (521:13): [True: 40.3k, False: 79.5k]
  ------------------
  522|  40.3k|          break;
  523|       |
  524|  79.5k|        if (kuiMmco == MMCO_SHORT2UNUSED || kuiMmco == MMCO_SHORT2LONG) {
  ------------------
  |  Branch (524:13): [True: 31.3k, False: 48.2k]
  |  Branch (524:45): [True: 6.94k, False: 41.2k]
  ------------------
  525|  38.2k|          bAllowMmco5 = false;
  526|  38.2k|          WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //difference_of_pic_nums_minus1
  ------------------
  |  |   52|  38.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  38.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  38.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 508, False: 37.7k]
  |  |  ------------------
  |  |   55|  38.2k|    return uiRetTmp; \
  |  |   56|  38.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 37.7k]
  |  |  ------------------
  ------------------
  527|  37.7k|          kpRefMarking->sMmcoRef[iIdx].iDiffOfPicNum = 1 + uiCode;
  528|  37.7k|          kpRefMarking->sMmcoRef[iIdx].iShortFrameNum = (pSh->iFrameNum - kpRefMarking->sMmcoRef[iIdx].iDiffOfPicNum) & ((
  529|  37.7k|                1 << pSps->uiLog2MaxFrameNum) - 1);
  530|  41.2k|        } else if (kuiMmco == MMCO_LONG2UNUSED) {
  ------------------
  |  Branch (530:20): [True: 7.71k, False: 33.5k]
  ------------------
  531|  7.71k|          bAllowMmco5 = false;
  532|  7.71k|          WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //long_term_pic_num
  ------------------
  |  |   52|  7.71k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  7.71k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  7.71k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 377, False: 7.33k]
  |  |  ------------------
  |  |   55|  7.71k|    return uiRetTmp; \
  |  |   56|  7.71k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 7.33k]
  |  |  ------------------
  ------------------
  533|  7.33k|          kpRefMarking->sMmcoRef[iIdx].uiLongTermPicNum = uiCode;
  534|  7.33k|        }
  535|  78.6k|        if (kuiMmco == MMCO_SHORT2LONG || kuiMmco == MMCO_LONG) {
  ------------------
  |  Branch (535:13): [True: 6.93k, False: 71.7k]
  |  Branch (535:43): [True: 14.5k, False: 57.2k]
  ------------------
  536|  21.4k|          if (kuiMmco == MMCO_LONG) {
  ------------------
  |  Branch (536:15): [True: 14.5k, False: 6.93k]
  ------------------
  537|  14.5k|            WELS_VERIFY_RETURN_IF (-1, bMmco6Exist);
  ------------------
  |  |  239|  14.5k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 1.70k, False: 12.8k]
  |  |  ------------------
  |  |  240|  1.70k|    return iResult;                             \
  |  |  241|  1.70k|  }
  ------------------
  538|  12.8k|            bMmco6Exist = true;
  539|  12.8k|          }
  540|  19.7k|          WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //long_term_frame_idx
  ------------------
  |  |   52|  19.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  19.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  19.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 433, False: 19.3k]
  |  |  ------------------
  |  |   55|  19.7k|    return uiRetTmp; \
  |  |   56|  19.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 19.3k]
  |  |  ------------------
  ------------------
  541|  19.3k|          kpRefMarking->sMmcoRef[iIdx].iLongTermFrameIdx = uiCode;
  542|  57.2k|        } else if (kuiMmco == MMCO_SET_MAX_LONG) {
  ------------------
  |  Branch (542:20): [True: 5.77k, False: 51.4k]
  ------------------
  543|  5.77k|          WELS_VERIFY_RETURN_IF (-1, bMmco4Exist);
  ------------------
  |  |  239|  5.77k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 259, False: 5.51k]
  |  |  ------------------
  |  |  240|    259|    return iResult;                             \
  |  |  241|    259|  }
  ------------------
  544|  5.51k|          bMmco4Exist = true;
  545|  5.51k|          WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //max_long_term_frame_idx_plus1
  ------------------
  |  |   52|  5.51k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  5.51k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  5.51k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 204, False: 5.30k]
  |  |  ------------------
  |  |   55|  5.51k|    return uiRetTmp; \
  |  |   56|  5.51k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 5.30k]
  |  |  ------------------
  ------------------
  546|  5.30k|          int32_t iMaxLongTermFrameIdx = -1 + uiCode;
  547|  5.30k|          if (iMaxLongTermFrameIdx > pSps->iNumRefFrames) {
  ------------------
  |  Branch (547:15): [True: 905, False: 4.40k]
  ------------------
  548|       |            //ISO/IEC 14496-10:2009(E) 7.4.3.3 Decoded reference picture marking semantics page 96
  549|    905|            return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REF_MARKING);
  ------------------
  |  |   59|    905|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  550|    905|          }
  551|  4.40k|          kpRefMarking->sMmcoRef[iIdx].iMaxLongTermFrameIdx = iMaxLongTermFrameIdx;
  552|  51.4k|        } else if (kuiMmco == MMCO_RESET) {
  ------------------
  |  Branch (552:20): [True: 3.91k, False: 47.5k]
  ------------------
  553|  3.91k|          WELS_VERIFY_RETURN_IF (-1, (!bAllowMmco5 || bMmco5Exist));
  ------------------
  |  |  239|  11.4k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 336, False: 3.57k]
  |  |  |  Branch (239:7): [True: 459, False: 3.11k]
  |  |  ------------------
  |  |  240|    795|    return iResult;                             \
  |  |  241|    795|  }
  ------------------
  554|  3.11k|          bMmco5Exist = true;
  555|       |
  556|  3.11k|          pCtx->pLastDecPicInfo->iPrevPicOrderCntLsb = 0;
  557|  3.11k|          pCtx->pLastDecPicInfo->iPrevPicOrderCntMsb = 0;
  558|  3.11k|          pSh->iPicOrderCntLsb = 0;
  559|  3.11k|          if (pCtx->pSliceHeader)
  ------------------
  |  Branch (559:15): [True: 2.41k, False: 700]
  ------------------
  560|  2.41k|            pCtx->pSliceHeader->iPicOrderCntLsb = 0;
  561|  3.11k|        }
  562|  74.3k|        ++ iIdx;
  563|       |
  564|  74.3k|      } while (iIdx < MAX_MMCO_COUNT);
  ------------------
  |  |   51|  74.3k|#define MAX_MMCO_COUNT                  66
  ------------------
  |  Branch (564:16): [True: 74.0k, False: 317]
  ------------------
  565|  48.5k|    }
  566|  2.74M|  }
  567|       |
  568|  2.93M|  return ERR_NONE;
  569|  2.94M|}
_ZN7WelsDec25FillDefaultSliceHeaderExtEPNS_17TagSliceHeaderExtEPN10WelsCommon19TagNalUnitHeaderExtE:
  571|  2.57M|bool FillDefaultSliceHeaderExt (PSliceHeaderExt pShExt, PNalUnitHeaderExt pNalExt) {
  572|  2.57M|  if (pShExt == NULL || pNalExt == NULL)
  ------------------
  |  Branch (572:7): [True: 0, False: 2.57M]
  |  Branch (572:25): [True: 0, False: 2.57M]
  ------------------
  573|      0|    return false;
  574|       |
  575|  2.57M|  if (pNalExt->iNoInterLayerPredFlag || pNalExt->uiQualityId > 0)
  ------------------
  |  Branch (575:7): [True: 2.57M, False: 0]
  |  Branch (575:41): [True: 0, False: 0]
  ------------------
  576|  2.57M|    pShExt->bBasePredWeightTableFlag = false;
  577|      0|  else
  578|      0|    pShExt->bBasePredWeightTableFlag = true;
  579|  2.57M|  pShExt->uiRefLayerDqId = (uint8_t) - 1;
  580|  2.57M|  pShExt->uiDisableInterLayerDeblockingFilterIdc        = 0;
  581|  2.57M|  pShExt->iInterLayerSliceAlphaC0Offset                 = 0;
  582|  2.57M|  pShExt->iInterLayerSliceBetaOffset                    = 0;
  583|  2.57M|  pShExt->bConstrainedIntraResamplingFlag               = false;
  584|  2.57M|  pShExt->uiRefLayerChromaPhaseXPlus1Flag               = 0;
  585|  2.57M|  pShExt->uiRefLayerChromaPhaseYPlus1                   = 1;
  586|       |  //memset(&pShExt->sScaledRefLayer, 0, sizeof(SPosOffset));
  587|       |
  588|  2.57M|  pShExt->iScaledRefLayerPicWidthInSampleLuma   = pShExt->sSliceHeader.iMbWidth << 4;
  589|  2.57M|  pShExt->iScaledRefLayerPicHeightInSampleLuma  = pShExt->sSliceHeader.iMbHeight << 4;
  590|       |
  591|  2.57M|  pShExt->bSliceSkipFlag                = false;
  592|  2.57M|  pShExt->bAdaptiveBaseModeFlag         = false;
  593|  2.57M|  pShExt->bDefaultBaseModeFlag          = false;
  594|  2.57M|  pShExt->bAdaptiveMotionPredFlag       = false;
  595|  2.57M|  pShExt->bDefaultMotionPredFlag        = false;
  596|  2.57M|  pShExt->bAdaptiveResidualPredFlag     = false;
  597|  2.57M|  pShExt->bDefaultResidualPredFlag      = false;
  598|  2.57M|  pShExt->bTCoeffLevelPredFlag          = false;
  599|  2.57M|  pShExt->uiScanIdxStart                = 0;
  600|  2.57M|  pShExt->uiScanIdxEnd                  = 15;
  601|       |
  602|  2.57M|  return true;
  603|  2.57M|}
_ZN7WelsDec12InitBsBufferEPNS_21TagWelsDecoderContextE:
  605|  26.4k|int32_t InitBsBuffer (PWelsDecoderContext pCtx) {
  606|  26.4k|  if (pCtx == NULL)
  ------------------
  |  Branch (606:7): [True: 0, False: 26.4k]
  ------------------
  607|      0|    return ERR_INFO_INVALID_PTR;
  608|       |
  609|  26.4k|  CMemoryAlign* pMa = pCtx->pMemAlign;
  610|       |
  611|  26.4k|  pCtx->iMaxBsBufferSizeInByte = MIN_ACCESS_UNIT_CAPACITY * MAX_BUFFERED_NUM;
  ------------------
  |  |   60|  26.4k|#define MIN_ACCESS_UNIT_CAPACITY        1048576 // Min AU capacity in bytes: (1<<20) = 1024 KB predefined
  ------------------
                pCtx->iMaxBsBufferSizeInByte = MIN_ACCESS_UNIT_CAPACITY * MAX_BUFFERED_NUM;
  ------------------
  |  |   61|  26.4k|#define MAX_BUFFERED_NUM 3 //mamixum stored number of AU|packet to prevent overwrite
  ------------------
  612|  26.4k|  if ((pCtx->sRawData.pHead = static_cast<uint8_t*> (pMa->WelsMallocz (pCtx->iMaxBsBufferSizeInByte,
  ------------------
  |  Branch (612:7): [True: 0, False: 26.4k]
  ------------------
  613|  26.4k|                              "pCtx->sRawData.pHead"))) == NULL) {
  614|      0|    return ERR_INFO_OUT_OF_MEMORY;
  615|      0|  }
  616|  26.4k|  pCtx->sRawData.pStartPos = pCtx->sRawData.pCurPos = pCtx->sRawData.pHead;
  617|  26.4k|  pCtx->sRawData.pEnd = pCtx->sRawData.pHead + pCtx->iMaxBsBufferSizeInByte;
  618|  26.4k|  if (pCtx->pParam->bParseOnly) {
  ------------------
  |  Branch (618:7): [True: 0, False: 26.4k]
  ------------------
  619|      0|    pCtx->pParserBsInfo = static_cast<SParserBsInfo*> (pMa->WelsMallocz (sizeof (SParserBsInfo), "pCtx->pParserBsInfo"));
  620|      0|    if (pCtx->pParserBsInfo == NULL) {
  ------------------
  |  Branch (620:9): [True: 0, False: 0]
  ------------------
  621|      0|      return ERR_INFO_OUT_OF_MEMORY;
  622|      0|    }
  623|      0|    memset (pCtx->pParserBsInfo, 0, sizeof (SParserBsInfo));
  624|      0|    pCtx->pParserBsInfo->pDstBuff = static_cast<uint8_t*> (pMa->WelsMallocz (MAX_ACCESS_UNIT_CAPACITY * sizeof (uint8_t),
  ------------------
  |  |   62|      0|#define MAX_ACCESS_UNIT_CAPACITY 7077888 //Maximum AU size in bytes for level 5.2 for single frame
  ------------------
  625|      0|                                    "pCtx->pParserBsInfo->pDstBuff"));
  626|      0|    if (pCtx->pParserBsInfo->pDstBuff == NULL) {
  ------------------
  |  Branch (626:9): [True: 0, False: 0]
  ------------------
  627|      0|      return ERR_INFO_OUT_OF_MEMORY;
  628|      0|    }
  629|      0|    memset (pCtx->pParserBsInfo->pDstBuff, 0, MAX_ACCESS_UNIT_CAPACITY * sizeof (uint8_t));
  ------------------
  |  |   62|      0|#define MAX_ACCESS_UNIT_CAPACITY 7077888 //Maximum AU size in bytes for level 5.2 for single frame
  ------------------
  630|       |
  631|      0|    if ((pCtx->sSavedData.pHead = static_cast<uint8_t*> (pMa->WelsMallocz (pCtx->iMaxBsBufferSizeInByte,
  ------------------
  |  Branch (631:9): [True: 0, False: 0]
  ------------------
  632|      0|                                  "pCtx->sSavedData.pHead"))) == NULL) {
  633|      0|      return ERR_INFO_OUT_OF_MEMORY;
  634|      0|    }
  635|      0|    pCtx->sSavedData.pStartPos = pCtx->sSavedData.pCurPos = pCtx->sSavedData.pHead;
  636|      0|    pCtx->sSavedData.pEnd = pCtx->sSavedData.pHead + pCtx->iMaxBsBufferSizeInByte;
  637|       |
  638|      0|    pCtx->iMaxNalNum = MAX_NAL_UNITS_IN_LAYER + 2; //2 reserved for SPS+PPS
  ------------------
  |  |   49|      0|#define MAX_NAL_UNITS_IN_LAYER          128     ///< predetermined here, adjust it later if need
  ------------------
  639|      0|    pCtx->pParserBsInfo->pNalLenInByte = static_cast<int*> (pMa->WelsMallocz (pCtx->iMaxNalNum * sizeof (int),
  640|      0|                                         "pCtx->pParserBsInfo->pNalLenInByte"));
  641|      0|    if (pCtx->pParserBsInfo->pNalLenInByte == NULL) {
  ------------------
  |  Branch (641:9): [True: 0, False: 0]
  ------------------
  642|      0|      return ERR_INFO_OUT_OF_MEMORY;
  643|      0|    }
  644|      0|  }
  645|  26.4k|  return ERR_NONE;
  646|  26.4k|}
_ZN7WelsDec13CheckBsBufferEPNS_21TagWelsDecoderContextEi:
  733|  10.9M|int32_t CheckBsBuffer (PWelsDecoderContext pCtx, const int32_t kiSrcLen) {
  734|  10.9M|  if (kiSrcLen > MAX_ACCESS_UNIT_CAPACITY) { //exceeds max allowed data
  ------------------
  |  |   62|  10.9M|#define MAX_ACCESS_UNIT_CAPACITY 7077888 //Maximum AU size in bytes for level 5.2 for single frame
  ------------------
  |  Branch (734:7): [True: 0, False: 10.9M]
  ------------------
  735|      0|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "Max AU size exceeded. Allowed size = %d, current size = %d",
  736|      0|             MAX_ACCESS_UNIT_CAPACITY,
  ------------------
  |  |   62|      0|#define MAX_ACCESS_UNIT_CAPACITY 7077888 //Maximum AU size in bytes for level 5.2 for single frame
  ------------------
  737|      0|             kiSrcLen);
  738|      0|    pCtx->iErrorCode |= dsBitstreamError;
  739|      0|    return ERR_INFO_INVALID_ACCESS;
  740|  10.9M|  } else if (kiSrcLen > pCtx->iMaxBsBufferSizeInByte /
  ------------------
  |  Branch (740:14): [True: 0, False: 10.9M]
  ------------------
  741|  10.9M|             MAX_BUFFERED_NUM) { //may lead to buffer overwrite, prevent it by expanding buffer
  ------------------
  |  |   61|  10.9M|#define MAX_BUFFERED_NUM 3 //mamixum stored number of AU|packet to prevent overwrite
  ------------------
  742|      0|    if (ExpandBsBuffer (pCtx, kiSrcLen)) {
  ------------------
  |  Branch (742:9): [True: 0, False: 0]
  ------------------
  743|      0|      return ERR_INFO_OUT_OF_MEMORY;
  744|      0|    }
  745|      0|  }
  746|       |
  747|  10.9M|  return ERR_NONE;
  748|  10.9M|}
_ZN7WelsDec20WelsInitStaticMemoryEPNS_21TagWelsDecoderContextE:
  758|  26.4k|int32_t WelsInitStaticMemory (PWelsDecoderContext pCtx) {
  759|  26.4k|  if (pCtx == NULL) {
  ------------------
  |  Branch (759:7): [True: 0, False: 26.4k]
  ------------------
  760|      0|    return ERR_INFO_INVALID_PTR;
  761|      0|  }
  762|       |
  763|  26.4k|  if (MemInitNalList (&pCtx->pAccessUnitList, MAX_NAL_UNIT_NUM_IN_AU, pCtx->pMemAlign) != 0)
  ------------------
  |  |   59|  26.4k|#define MAX_NAL_UNIT_NUM_IN_AU          32      // predefined maximal number of NAL Units in an access unit
  ------------------
  |  Branch (763:7): [True: 0, False: 26.4k]
  ------------------
  764|      0|    return ERR_INFO_OUT_OF_MEMORY;
  765|       |
  766|  26.4k|  if (InitBsBuffer (pCtx) != 0)
  ------------------
  |  Branch (766:7): [True: 0, False: 26.4k]
  ------------------
  767|      0|    return ERR_INFO_OUT_OF_MEMORY;
  768|       |
  769|  26.4k|  pCtx->uiTargetDqId            = (uint8_t) - 1;
  770|  26.4k|  pCtx->bEndOfStreamFlag        = false;
  771|       |
  772|  26.4k|  return ERR_NONE;
  773|  26.4k|}
_ZN7WelsDec20WelsFreeStaticMemoryEPNS_21TagWelsDecoderContextE:
  780|  26.4k|void WelsFreeStaticMemory (PWelsDecoderContext pCtx) {
  781|  26.4k|  if (pCtx == NULL)
  ------------------
  |  Branch (781:7): [True: 0, False: 26.4k]
  ------------------
  782|      0|    return;
  783|       |
  784|  26.4k|  CMemoryAlign* pMa = pCtx->pMemAlign;
  785|       |
  786|  26.4k|  MemFreeNalList (&pCtx->pAccessUnitList, pMa);
  787|       |
  788|  26.4k|  if (pCtx->sRawData.pHead) {
  ------------------
  |  Branch (788:7): [True: 26.4k, False: 0]
  ------------------
  789|  26.4k|    pMa->WelsFree (pCtx->sRawData.pHead, "pCtx->sRawData->pHead");
  790|  26.4k|  }
  791|  26.4k|  pCtx->sRawData.pHead                = NULL;
  792|  26.4k|  pCtx->sRawData.pEnd                 = NULL;
  793|  26.4k|  pCtx->sRawData.pStartPos            = NULL;
  794|  26.4k|  pCtx->sRawData.pCurPos              = NULL;
  795|  26.4k|  if (pCtx->pParam->bParseOnly) {
  ------------------
  |  Branch (795:7): [True: 0, False: 26.4k]
  ------------------
  796|      0|    if (pCtx->sSavedData.pHead) {
  ------------------
  |  Branch (796:9): [True: 0, False: 0]
  ------------------
  797|      0|      pMa->WelsFree (pCtx->sSavedData.pHead, "pCtx->sSavedData->pHead");
  798|      0|    }
  799|      0|    pCtx->sSavedData.pHead                = NULL;
  800|      0|    pCtx->sSavedData.pEnd                 = NULL;
  801|      0|    pCtx->sSavedData.pStartPos            = NULL;
  802|      0|    pCtx->sSavedData.pCurPos              = NULL;
  803|      0|    if (pCtx->pParserBsInfo) {
  ------------------
  |  Branch (803:9): [True: 0, False: 0]
  ------------------
  804|      0|      if (pCtx->pParserBsInfo->pNalLenInByte) {
  ------------------
  |  Branch (804:11): [True: 0, False: 0]
  ------------------
  805|      0|        pMa->WelsFree (pCtx->pParserBsInfo->pNalLenInByte, "pCtx->pParserBsInfo->pNalLenInByte");
  806|      0|        pCtx->pParserBsInfo->pNalLenInByte = NULL;
  807|      0|        pCtx->iMaxNalNum = 0;
  808|      0|      }
  809|      0|      if (pCtx->pParserBsInfo->pDstBuff) {
  ------------------
  |  Branch (809:11): [True: 0, False: 0]
  ------------------
  810|      0|        pMa->WelsFree (pCtx->pParserBsInfo->pDstBuff, "pCtx->pParserBsInfo->pDstBuff");
  811|      0|        pCtx->pParserBsInfo->pDstBuff = NULL;
  812|      0|      }
  813|      0|      pMa->WelsFree (pCtx->pParserBsInfo, "pCtx->pParserBsInfo");
  814|      0|      pCtx->pParserBsInfo = NULL;
  815|      0|    }
  816|      0|  }
  817|       |
  818|  26.4k|  if (NULL != pCtx->pParam) {
  ------------------
  |  Branch (818:7): [True: 26.4k, False: 0]
  ------------------
  819|  26.4k|    pMa->WelsFree (pCtx->pParam, "pCtx->pParam");
  820|       |
  821|       |    pCtx->pParam = NULL;
  822|  26.4k|  }
  823|  26.4k|}
_ZN7WelsDec18DecodeNalHeaderExtEPNS_10TagNalUnitEPh:
  831|  1.94M|void DecodeNalHeaderExt (PNalUnit pNal, uint8_t* pSrc) {
  832|  1.94M|  PNalUnitHeaderExt pHeaderExt = &pNal->sNalHeaderExt;
  833|       |
  834|  1.94M|  uint8_t uiCurByte = *pSrc;
  835|  1.94M|  pHeaderExt->bIdrFlag              = !! (uiCurByte & 0x40);
  836|  1.94M|  pHeaderExt->uiPriorityId          = uiCurByte & 0x3F;
  837|       |
  838|  1.94M|  uiCurByte = * (++pSrc);
  839|  1.94M|  pHeaderExt->iNoInterLayerPredFlag = uiCurByte >> 7;
  840|  1.94M|  pHeaderExt->uiDependencyId        = (uiCurByte & 0x70) >> 4;
  841|  1.94M|  pHeaderExt->uiQualityId           = uiCurByte & 0x0F;
  842|  1.94M|  uiCurByte = * (++pSrc);
  843|  1.94M|  pHeaderExt->uiTemporalId          = uiCurByte >> 5;
  844|  1.94M|  pHeaderExt->bUseRefBasePicFlag    = !! (uiCurByte & 0x10);
  845|  1.94M|  pHeaderExt->bDiscardableFlag      = !! (uiCurByte & 0x08);
  846|  1.94M|  pHeaderExt->bOutputFlag           = !! (uiCurByte & 0x04);
  847|  1.94M|  pHeaderExt->uiReservedThree2Bits  = uiCurByte & 0x03;
  848|  1.94M|  pHeaderExt->uiLayerDqId           = (pHeaderExt->uiDependencyId << 4) | pHeaderExt->uiQualityId;
  849|  1.94M|}
_ZN7WelsDec39UpdateDecoderStatisticsForActiveParasetEP25TagVideoDecoderStatisticsPNS_6TagSpsEPNS_6TagPpsE:
  853|  2.58M|    PSps pSps, PPps pPps) {
  854|  2.58M|  pDecoderStatistics->iCurrentActiveSpsId = pSps->iSpsId;
  855|       |
  856|  2.58M|  pDecoderStatistics->iCurrentActivePpsId = pPps->iPpsId;
  857|  2.58M|  pDecoderStatistics->uiProfile = static_cast<unsigned int> (pSps->uiProfileIdc);
  858|  2.58M|  pDecoderStatistics->uiLevel = pSps->uiLevelIdc;
  859|  2.58M|}
_ZN7WelsDec23ParseSliceHeaderSyntaxsEPNS_21TagWelsDecoderContextEPN10WelsCommon15TagBitStringAuxEb:
  874|  4.88M|int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, const bool kbExtensionFlag) {
  875|  4.88M|  PNalUnit const kpCurNal               =
  876|  4.88M|    pCtx->pAccessUnitList->pNalUnitsList[pCtx->pAccessUnitList->uiAvailUnitsNum -
  877|  4.88M|                                                                                1];
  878|       |
  879|  4.88M|  PNalUnitHeaderExt pNalHeaderExt       = NULL;
  880|  4.88M|  PSliceHeader pSliceHead               = NULL;
  881|  4.88M|  PSliceHeaderExt pSliceHeadExt         = NULL;
  882|  4.88M|  PSubsetSps pSubsetSps                 = NULL;
  883|  4.88M|  PSps pSps                             = NULL;
  884|  4.88M|  PPps pPps                             = NULL;
  885|  4.88M|  EWelsNalUnitType eNalType             = static_cast<EWelsNalUnitType> (0);
  886|  4.88M|  int32_t iPpsId                        = 0;
  887|  4.88M|  int32_t iRet                          = ERR_NONE;
  888|  4.88M|  uint8_t uiSliceType                   = 0;
  889|  4.88M|  uint8_t uiQualityId                   = BASE_QUALITY_ID;
  ------------------
  |  |   60|  4.88M|#define BASE_QUALITY_ID         0
  ------------------
  890|  4.88M|  bool  bIdrFlag                        = false;
  891|  4.88M|  bool  bSgChangeCycleInvolved          = false;        // involved slice group change cycle ?
  892|  4.88M|  uint32_t uiCode;
  893|  4.88M|  int32_t iCode;
  894|  4.88M|  SLogContext* pLogCtx = & (pCtx->sLogCtx);
  895|       |
  896|  4.88M|  if (kpCurNal == NULL) {
  ------------------
  |  Branch (896:7): [True: 0, False: 4.88M]
  ------------------
  897|      0|    return ERR_INFO_OUT_OF_MEMORY;
  898|      0|  }
  899|       |
  900|  4.88M|  pNalHeaderExt = &kpCurNal->sNalHeaderExt;
  901|  4.88M|  pSliceHead    = &kpCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader;
  902|  4.88M|  eNalType      = pNalHeaderExt->sNalUnitHeader.eNalUnitType;
  903|       |
  904|  4.88M|  pSliceHeadExt = &kpCurNal->sNalData.sVclNal.sSliceHeaderExt;
  905|       |
  906|  4.88M|  if (pSliceHeadExt) {
  ------------------
  |  Branch (906:7): [True: 4.88M, False: 0]
  ------------------
  907|  4.88M|    SRefBasePicMarking sBaseMarking;
  908|  4.88M|    const bool kbStoreRefBaseFlag = pSliceHeadExt->bStoreRefBasePicFlag;
  909|  4.88M|    memcpy (&sBaseMarking, &pSliceHeadExt->sRefBasePicMarking, sizeof (SRefBasePicMarking)); //confirmed_safe_unsafe_usage
  910|  4.88M|    memset (pSliceHeadExt, 0, sizeof (SSliceHeaderExt));
  911|  4.88M|    pSliceHeadExt->bStoreRefBasePicFlag = kbStoreRefBaseFlag;
  912|  4.88M|    memcpy (&pSliceHeadExt->sRefBasePicMarking, &sBaseMarking, sizeof (SRefBasePicMarking)); //confirmed_safe_unsafe_usage
  913|  4.88M|  }
  914|       |
  915|  4.88M|  kpCurNal->sNalData.sVclNal.bSliceHeaderExtFlag = kbExtensionFlag;
  916|       |
  917|       |  // first_mb_in_slice
  918|  4.88M|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //first_mb_in_slice
  ------------------
  |  |   52|  4.88M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.88M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.88M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 7.03k, False: 4.87M]
  |  |  ------------------
  |  |   55|  4.88M|    return uiRetTmp; \
  |  |   56|  4.88M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.87M]
  |  |  ------------------
  ------------------
  919|  4.87M|  WELS_CHECK_SE_UPPER_ERROR (uiCode, 36863u, "first_mb_in_slice", GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER,
  ------------------
  |  |  262|  4.87M|#define WELS_CHECK_SE_UPPER_ERROR(val, upper_bound, syntax_name, ret_code) do {\
  |  |  263|  4.87M|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (263:5): [True: 8.40k, False: 4.86M]
  |  |  ------------------
  |  |  264|  8.40k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  265|  8.40k|  return ret_code;\
  |  |  266|  8.40k|}\
  |  |  267|  4.87M|}while(0)
  |  |  ------------------
  |  |  |  Branch (267:8): [Folded, False: 4.86M]
  |  |  ------------------
  ------------------
  920|  4.87M|                             ERR_INFO_INVALID_FIRST_MB_IN_SLICE));
  921|  4.86M|  pSliceHead->iFirstMbInSlice = uiCode;
  922|       |
  923|  4.86M|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //slice_type
  ------------------
  |  |   52|  4.86M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.86M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.86M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 868, False: 4.86M]
  |  |  ------------------
  |  |   55|  4.86M|    return uiRetTmp; \
  |  |   56|  4.86M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.86M]
  |  |  ------------------
  ------------------
  924|  4.86M|  uiSliceType = uiCode;
  925|  4.86M|  if (uiSliceType > 9) {
  ------------------
  |  Branch (925:7): [True: 4.17k, False: 4.85M]
  ------------------
  926|  4.17k|    WelsLog (pLogCtx, WELS_LOG_WARNING, "slice type too large (%d) at first_mb(%d)", uiSliceType,
  927|  4.17k|             pSliceHead->iFirstMbInSlice);
  928|  4.17k|    return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_TYPE);
  ------------------
  |  |   59|  4.17k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  929|  4.17k|  }
  930|  4.85M|  if (uiSliceType > 4)
  ------------------
  |  Branch (930:7): [True: 3.85M, False: 1.00M]
  ------------------
  931|  3.85M|    uiSliceType -= 5;
  932|       |
  933|  4.85M|  if ((NAL_UNIT_CODED_SLICE_IDR == eNalType) && (I_SLICE != uiSliceType)) {
  ------------------
  |  Branch (933:7): [True: 185k, False: 4.67M]
  |  Branch (933:49): [True: 3.13k, False: 182k]
  ------------------
  934|  3.13k|    WelsLog (pLogCtx, WELS_LOG_WARNING, "Invalid slice type(%d) in IDR picture. ", uiSliceType);
  935|  3.13k|    return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_TYPE);
  ------------------
  |  |   59|  3.13k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  936|  3.13k|  }
  937|       |
  938|  4.85M|  if (kbExtensionFlag) {
  ------------------
  |  Branch (938:7): [True: 1.93M, False: 2.92M]
  ------------------
  939|  1.93M|    if (uiSliceType > 2) {
  ------------------
  |  Branch (939:9): [True: 325, False: 1.93M]
  ------------------
  940|    325|      WelsLog (pLogCtx, WELS_LOG_WARNING, "Invalid slice type(%d).", uiSliceType);
  941|    325|      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_TYPE);
  ------------------
  |  |   59|    325|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  942|    325|    }
  943|  1.93M|  }
  944|       |
  945|  4.85M|  pSliceHead->eSliceType = static_cast <EWelsSliceType> (uiSliceType);
  946|       |
  947|  4.85M|  WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //pic_parameter_set_id
  ------------------
  |  |   52|  4.85M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.85M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.85M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 728, False: 4.85M]
  |  |  ------------------
  |  |   55|  4.85M|    return uiRetTmp; \
  |  |   56|  4.85M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.85M]
  |  |  ------------------
  ------------------
  948|  4.85M|  WELS_CHECK_SE_UPPER_ERROR (uiCode, (MAX_PPS_COUNT - 1), "iPpsId out of range",
  ------------------
  |  |  262|  4.85M|#define WELS_CHECK_SE_UPPER_ERROR(val, upper_bound, syntax_name, ret_code) do {\
  |  |  263|  4.85M|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (263:5): [True: 1.35k, False: 4.85M]
  |  |  ------------------
  |  |  264|  1.35k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  265|  1.35k|  return ret_code;\
  |  |  266|  1.35k|}\
  |  |  267|  4.85M|}while(0)
  |  |  ------------------
  |  |  |  Branch (267:8): [Folded, False: 4.85M]
  |  |  ------------------
  ------------------
  949|  4.85M|                             GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER,
  950|  4.85M|                                 ERR_INFO_PPS_ID_OVERFLOW));
  951|  4.85M|  iPpsId = uiCode;
  952|       |
  953|       |  //add check PPS available here
  954|  4.85M|  if (pCtx->sSpsPpsCtx.bPpsAvailFlags[iPpsId] == false) {
  ------------------
  |  Branch (954:7): [True: 22.5k, False: 4.83M]
  ------------------
  955|  22.5k|    pCtx->pDecoderStatistics->iPpsReportErrorNum++;
  956|  22.5k|    if (pCtx->sSpsPpsCtx.iPPSLastInvalidId != iPpsId) {
  ------------------
  |  Branch (956:9): [True: 20.8k, False: 1.72k]
  ------------------
  957|  20.8k|      WelsLog (pLogCtx, WELS_LOG_ERROR, "PPS id (%d) is invalid, previous id (%d) error ignored (%d)!", iPpsId,
  958|  20.8k|               pCtx->sSpsPpsCtx.iPPSLastInvalidId, pCtx->sSpsPpsCtx.iPPSInvalidNum);
  959|  20.8k|      pCtx->sSpsPpsCtx.iPPSLastInvalidId = iPpsId;
  960|  20.8k|      pCtx->sSpsPpsCtx.iPPSInvalidNum = 0;
  961|  20.8k|    } else {
  962|  1.72k|      pCtx->sSpsPpsCtx.iPPSInvalidNum++;
  963|  1.72k|    }
  964|  22.5k|    pCtx->iErrorCode |= dsNoParamSets;
  965|  22.5k|    return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_PPS_ID);
  ------------------
  |  |   59|  22.5k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  966|  22.5k|  }
  967|  4.83M|  pCtx->sSpsPpsCtx.iPPSLastInvalidId = -1;
  968|       |
  969|  4.83M|  pPps    = &pCtx->sSpsPpsCtx.sPpsBuffer[iPpsId];
  970|       |
  971|  4.83M|  if (pPps->uiNumSliceGroups == 0) {
  ------------------
  |  Branch (971:7): [True: 0, False: 4.83M]
  ------------------
  972|      0|    WelsLog (pLogCtx, WELS_LOG_WARNING, "Invalid PPS referenced");
  973|      0|    pCtx->iErrorCode |= dsNoParamSets;
  974|      0|    return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_NO_PARAM_SETS);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  975|      0|  }
  976|       |
  977|  4.83M|  if (kbExtensionFlag) {
  ------------------
  |  Branch (977:7): [True: 1.93M, False: 2.90M]
  ------------------
  978|  1.93M|    pSubsetSps      = &pCtx->sSpsPpsCtx.sSubsetSpsBuffer[pPps->iSpsId];
  979|  1.93M|    pSps            = &pSubsetSps->sSps;
  980|  1.93M|    if (pCtx->sSpsPpsCtx.bSubspsAvailFlags[pPps->iSpsId] == false) {
  ------------------
  |  Branch (980:9): [True: 27.8k, False: 1.90M]
  ------------------
  981|  27.8k|      pCtx->pDecoderStatistics->iSubSpsReportErrorNum++;
  982|  27.8k|      if (pCtx->sSpsPpsCtx.iSubSPSLastInvalidId != pPps->iSpsId) {
  ------------------
  |  Branch (982:11): [True: 434, False: 27.4k]
  ------------------
  983|    434|        WelsLog (pLogCtx, WELS_LOG_ERROR, "Sub SPS id (%d) is invalid, previous id (%d) error ignored (%d)!", pPps->iSpsId,
  984|    434|                 pCtx->sSpsPpsCtx.iSubSPSLastInvalidId, pCtx->sSpsPpsCtx.iSubSPSInvalidNum);
  985|    434|        pCtx->sSpsPpsCtx.iSubSPSLastInvalidId = pPps->iSpsId;
  986|    434|        pCtx->sSpsPpsCtx.iSubSPSInvalidNum = 0;
  987|  27.4k|      } else {
  988|  27.4k|        pCtx->sSpsPpsCtx.iSubSPSInvalidNum++;
  989|  27.4k|      }
  990|  27.8k|      pCtx->iErrorCode |= dsNoParamSets;
  991|  27.8k|      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);
  ------------------
  |  |   59|  27.8k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  992|  27.8k|    }
  993|  1.90M|    pCtx->sSpsPpsCtx.iSubSPSLastInvalidId = -1;
  994|  2.90M|  } else {
  995|  2.90M|    if (pCtx->sSpsPpsCtx.bSpsAvailFlags[pPps->iSpsId] == false) {
  ------------------
  |  Branch (995:9): [True: 17.9k, False: 2.88M]
  ------------------
  996|  17.9k|      pCtx->pDecoderStatistics->iSpsReportErrorNum++;
  997|  17.9k|      if (pCtx->sSpsPpsCtx.iSPSLastInvalidId != pPps->iSpsId) {
  ------------------
  |  Branch (997:11): [True: 6.32k, False: 11.6k]
  ------------------
  998|  6.32k|        WelsLog (pLogCtx, WELS_LOG_ERROR, "SPS id (%d) is invalid, previous id (%d) error ignored (%d)!", pPps->iSpsId,
  999|  6.32k|                 pCtx->sSpsPpsCtx.iSPSLastInvalidId, pCtx->sSpsPpsCtx.iSPSInvalidNum);
 1000|  6.32k|        pCtx->sSpsPpsCtx.iSPSLastInvalidId = pPps->iSpsId;
 1001|  6.32k|        pCtx->sSpsPpsCtx.iSPSInvalidNum = 0;
 1002|  11.6k|      } else {
 1003|  11.6k|        pCtx->sSpsPpsCtx.iSPSInvalidNum++;
 1004|  11.6k|      }
 1005|  17.9k|      pCtx->iErrorCode |= dsNoParamSets;
 1006|  17.9k|      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);
  ------------------
  |  |   59|  17.9k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1007|  17.9k|    }
 1008|  2.88M|    pCtx->sSpsPpsCtx.iSPSLastInvalidId = -1;
 1009|  2.88M|    pSps = &pCtx->sSpsPpsCtx.sSpsBuffer[pPps->iSpsId];
 1010|  2.88M|  }
 1011|  4.78M|  pSliceHead->iPpsId = iPpsId;
 1012|  4.78M|  pSliceHead->iSpsId = pPps->iSpsId;
 1013|  4.78M|  pSliceHead->pPps   = pPps;
 1014|  4.78M|  pSliceHead->pSps   = pSps;
 1015|       |
 1016|  4.78M|  pSliceHeadExt->pSubsetSps = pSubsetSps;
 1017|       |
 1018|  4.78M|  if (pSps->iNumRefFrames == 0) {
  ------------------
  |  Branch (1018:7): [True: 11.0k, False: 4.77M]
  ------------------
 1019|  11.0k|    if ((uiSliceType != I_SLICE) && (uiSliceType != SI_SLICE)) {
  ------------------
  |  Branch (1019:9): [True: 1.88k, False: 9.19k]
  |  Branch (1019:37): [True: 1.65k, False: 236]
  ------------------
 1020|  1.65k|      WelsLog (pLogCtx, WELS_LOG_WARNING, "slice_type (%d) not supported for num_ref_frames = 0.", uiSliceType);
 1021|  1.65k|      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_TYPE);
  ------------------
  |  |   59|  1.65k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1022|  1.65k|    }
 1023|  11.0k|  }
 1024|       |
 1025|  4.78M|  bIdrFlag = (!kbExtensionFlag && eNalType == NAL_UNIT_CODED_SLICE_IDR) || (kbExtensionFlag && pNalHeaderExt->bIdrFlag);
  ------------------
  |  Branch (1025:15): [True: 2.88M, False: 1.90M]
  |  Branch (1025:35): [True: 180k, False: 2.70M]
  |  Branch (1025:77): [True: 1.90M, False: 2.70M]
  |  Branch (1025:96): [True: 23.0k, False: 1.87M]
  ------------------
 1026|  4.78M|  pSliceHead->bIdrFlag = bIdrFlag;
 1027|       |
 1028|  4.78M|  if (pSps->uiLog2MaxFrameNum == 0) {
  ------------------
  |  Branch (1028:7): [True: 0, False: 4.78M]
  ------------------
 1029|      0|    WelsLog (pLogCtx, WELS_LOG_WARNING, "non existing SPS referenced");
 1030|      0|    return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_NO_PARAM_SETS);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1031|      0|  }
 1032|       |  // check first_mb_in_slice
 1033|  4.78M|  WELS_CHECK_SE_UPPER_ERROR ((uint32_t) (pSliceHead->iFirstMbInSlice), (pSps->uiTotalMbCount - 1), "first_mb_in_slice",
  ------------------
  |  |  262|  4.78M|#define WELS_CHECK_SE_UPPER_ERROR(val, upper_bound, syntax_name, ret_code) do {\
  |  |  263|  4.78M|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (263:5): [True: 27.3k, False: 4.75M]
  |  |  ------------------
  |  |  264|  27.3k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  265|  27.3k|  return ret_code;\
  |  |  266|  27.3k|}\
  |  |  267|  4.78M|}while(0)
  |  |  ------------------
  |  |  |  Branch (267:8): [Folded, False: 4.75M]
  |  |  ------------------
  ------------------
 1034|  4.78M|                             GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_FIRST_MB_IN_SLICE));
 1035|  4.75M|  WELS_READ_VERIFY (BsGetBits (pBs, pSps->uiLog2MaxFrameNum, &uiCode)); //frame_num
  ------------------
  |  |   52|  4.75M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.75M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.75M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 499, False: 4.75M]
  |  |  ------------------
  |  |   55|  4.75M|    return uiRetTmp; \
  |  |   56|  4.75M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.75M]
  |  |  ------------------
  ------------------
 1036|  4.75M|  pSliceHead->iFrameNum = uiCode;
 1037|       |
 1038|  4.75M|  pSliceHead->bFieldPicFlag    = false;
 1039|  4.75M|  pSliceHead->bBottomFiledFlag = false;
 1040|  4.75M|  if (!pSps->bFrameMbsOnlyFlag) {
  ------------------
  |  Branch (1040:7): [True: 0, False: 4.75M]
  ------------------
 1041|      0|    WelsLog (pLogCtx, WELS_LOG_WARNING, "ParseSliceHeaderSyntaxs(): frame_mbs_only_flag = %d not supported. ",
 1042|      0|             pSps->bFrameMbsOnlyFlag);
 1043|      0|    return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_MBAFF);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1044|      0|  }
 1045|  4.75M|  pSliceHead->iMbWidth  = pSps->iMbWidth;
 1046|  4.75M|  pSliceHead->iMbHeight = pSps->iMbHeight / (1 + pSliceHead->bFieldPicFlag);
 1047|       |
 1048|  4.75M|  if (bIdrFlag) {
  ------------------
  |  Branch (1048:7): [True: 203k, False: 4.55M]
  ------------------
 1049|   203k|    if (pSliceHead->iFrameNum != 0) {
  ------------------
  |  Branch (1049:9): [True: 1.45k, False: 201k]
  ------------------
 1050|  1.45k|      WelsLog (pLogCtx, WELS_LOG_WARNING,
 1051|  1.45k|               "ParseSliceHeaderSyntaxs(), invaild frame number: %d due to IDR frame introduced!",
 1052|  1.45k|               pSliceHead->iFrameNum);
 1053|  1.45k|      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_FRAME_NUM);
  ------------------
  |  |   59|  1.45k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1054|  1.45k|    }
 1055|   201k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //idr_pic_id
  ------------------
  |  |   52|   201k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   201k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   201k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 5.48k, False: 196k]
  |  |  ------------------
  |  |   55|   201k|    return uiRetTmp; \
  |  |   56|   201k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 196k]
  |  |  ------------------
  ------------------
 1056|       |    // standard 7.4.3 idr_pic_id should be in range 0 to 65535, inclusive.
 1057|   196k|    WELS_CHECK_SE_UPPER_ERROR (uiCode, SLICE_HEADER_IDR_PIC_ID_MAX, "idr_pic_id", GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER,
  ------------------
  |  |  262|   196k|#define WELS_CHECK_SE_UPPER_ERROR(val, upper_bound, syntax_name, ret_code) do {\
  |  |  263|   196k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (263:5): [True: 340, False: 196k]
  |  |  ------------------
  |  |  264|    340|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  265|    340|  return ret_code;\
  |  |  266|    340|}\
  |  |  267|   196k|}while(0)
  |  |  ------------------
  |  |  |  Branch (267:8): [Folded, False: 196k]
  |  |  ------------------
  ------------------
 1058|   196k|                               ERR_INFO_INVALID_IDR_PIC_ID));
 1059|   196k|    pSliceHead->uiIdrPicId = uiCode; /* uiIdrPicId */
 1060|   196k|#ifdef LONG_TERM_REF
 1061|   196k|    pCtx->uiCurIdrPicId = pSliceHead->uiIdrPicId;
 1062|   196k|#endif
 1063|   196k|  }
 1064|       |
 1065|  4.74M|  pSliceHead->iDeltaPicOrderCntBottom = 0;
 1066|  4.74M|  pSliceHead->iDeltaPicOrderCnt[0] =
 1067|  4.74M|    pSliceHead->iDeltaPicOrderCnt[1] = 0;
 1068|  4.74M|  if (pSps->uiPocType == 0) {
  ------------------
  |  Branch (1068:7): [True: 4.31M, False: 434k]
  ------------------
 1069|  4.31M|    WELS_READ_VERIFY (BsGetBits (pBs, pSps->iLog2MaxPocLsb, &uiCode)); //pic_order_cnt_lsb
  ------------------
  |  |   52|  4.31M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.31M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.31M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 3.41k, False: 4.31M]
  |  |  ------------------
  |  |   55|  4.31M|    return uiRetTmp; \
  |  |   56|  4.31M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.31M]
  |  |  ------------------
  ------------------
 1070|  4.31M|    const int32_t iMaxPocLsb = 1 << (pSps->iLog2MaxPocLsb);
 1071|  4.31M|    pSliceHead->iPicOrderCntLsb = uiCode;
 1072|  4.31M|    if (pPps->bPicOrderPresentFlag && !pSliceHead->bFieldPicFlag) {
  ------------------
  |  Branch (1072:9): [True: 112k, False: 4.19M]
  |  Branch (1072:39): [True: 112k, False: 0]
  ------------------
 1073|   112k|      WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //delta_pic_order_cnt_bottom
  ------------------
  |  |   52|   112k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   112k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   112k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 6.43k, False: 106k]
  |  |  ------------------
  |  |   55|   112k|    return uiRetTmp; \
  |  |   56|   112k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 106k]
  |  |  ------------------
  ------------------
 1074|   106k|      pSliceHead->iDeltaPicOrderCntBottom = iCode;
 1075|   106k|    }
 1076|       |    //Calculate poc if necessary
 1077|  4.30M|    int32_t pocLsb = pSliceHead->iPicOrderCntLsb;
 1078|  4.30M|    if (pSliceHead->bIdrFlag || kpCurNal->sNalHeaderExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_CODED_SLICE_IDR) {
  ------------------
  |  Branch (1078:9): [True: 176k, False: 4.12M]
  |  Branch (1078:33): [True: 0, False: 4.12M]
  ------------------
 1079|   176k|      pCtx->pLastDecPicInfo->iPrevPicOrderCntMsb = 0;
 1080|   176k|      pCtx->pLastDecPicInfo->iPrevPicOrderCntLsb = 0;
 1081|   176k|    }
 1082|  4.30M|    int32_t pocMsb;
 1083|  4.30M|    if (pocLsb < pCtx->pLastDecPicInfo->iPrevPicOrderCntLsb
  ------------------
  |  Branch (1083:9): [True: 1.95M, False: 2.35M]
  ------------------
 1084|  1.95M|        && pCtx->pLastDecPicInfo->iPrevPicOrderCntLsb - pocLsb >= iMaxPocLsb / 2)
  ------------------
  |  Branch (1084:12): [True: 1.91M, False: 34.6k]
  ------------------
 1085|  1.91M|      pocMsb = pCtx->pLastDecPicInfo->iPrevPicOrderCntMsb + iMaxPocLsb;
 1086|  2.38M|    else if (pocLsb > pCtx->pLastDecPicInfo->iPrevPicOrderCntLsb
  ------------------
  |  Branch (1086:14): [True: 2.24M, False: 141k]
  ------------------
 1087|  2.24M|             && pocLsb - pCtx->pLastDecPicInfo->iPrevPicOrderCntLsb > iMaxPocLsb / 2)
  ------------------
  |  Branch (1087:17): [True: 2.06M, False: 178k]
  ------------------
 1088|  2.06M|      pocMsb = pCtx->pLastDecPicInfo->iPrevPicOrderCntMsb - iMaxPocLsb;
 1089|   319k|    else
 1090|   319k|      pocMsb = pCtx->pLastDecPicInfo->iPrevPicOrderCntMsb;
 1091|  4.30M|    pSliceHead->iPicOrderCntLsb = pocMsb + pocLsb;
 1092|       |
 1093|  4.30M|    if (pPps->bPicOrderPresentFlag && !pSliceHead->bFieldPicFlag) {
  ------------------
  |  Branch (1093:9): [True: 106k, False: 4.19M]
  |  Branch (1093:39): [True: 106k, False: 0]
  ------------------
 1094|   106k|      pSliceHead->iPicOrderCntLsb += pSliceHead->iDeltaPicOrderCntBottom;
 1095|   106k|    }
 1096|       |
 1097|  4.30M|    if (kpCurNal->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc != 0) {
  ------------------
  |  Branch (1097:9): [True: 4.06M, False: 243k]
  ------------------
 1098|  4.06M|      pCtx->pLastDecPicInfo->iPrevPicOrderCntLsb = pocLsb;
 1099|  4.06M|      pCtx->pLastDecPicInfo->iPrevPicOrderCntMsb = pocMsb;
 1100|  4.06M|    }
 1101|       |    //End of Calculating poc
 1102|  4.30M|  } else if (pSps->uiPocType == 1 && !pSps->bDeltaPicOrderAlwaysZeroFlag) {
  ------------------
  |  Branch (1102:14): [True: 7.05k, False: 427k]
  |  Branch (1102:38): [True: 2.81k, False: 4.23k]
  ------------------
 1103|  2.81k|    WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //delta_pic_order_cnt[ 0 ]
  ------------------
  |  |   52|  2.81k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.81k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.81k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 229, False: 2.58k]
  |  |  ------------------
  |  |   55|  2.81k|    return uiRetTmp; \
  |  |   56|  2.81k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.58k]
  |  |  ------------------
  ------------------
 1104|  2.58k|    pSliceHead->iDeltaPicOrderCnt[0] = iCode;
 1105|  2.58k|    if (pPps->bPicOrderPresentFlag && !pSliceHead->bFieldPicFlag) {
  ------------------
  |  Branch (1105:9): [True: 1.73k, False: 848]
  |  Branch (1105:39): [True: 1.73k, False: 0]
  ------------------
 1106|  1.73k|      WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //delta_pic_order_cnt[ 1 ]
  ------------------
  |  |   52|  1.73k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.73k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.73k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 398, False: 1.34k]
  |  |  ------------------
  |  |   55|  1.73k|    return uiRetTmp; \
  |  |   56|  1.73k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.34k]
  |  |  ------------------
  ------------------
 1107|  1.34k|      pSliceHead->iDeltaPicOrderCnt[1] = iCode;
 1108|  1.34k|    }
 1109|  2.58k|  }
 1110|  4.73M|  pSliceHead->iRedundantPicCnt = 0;
 1111|  4.73M|  if (pPps->bRedundantPicCntPresentFlag) {
  ------------------
  |  Branch (1111:7): [True: 27.2k, False: 4.71M]
  ------------------
 1112|  27.2k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //redundant_pic_cnt
  ------------------
  |  |   52|  27.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  27.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  27.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.44k, False: 24.8k]
  |  |  ------------------
  |  |   55|  27.2k|    return uiRetTmp; \
  |  |   56|  27.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 24.8k]
  |  |  ------------------
  ------------------
 1113|       |    // standard section 7.4.3, redundant_pic_cnt should be in range 0 to 127, inclusive.
 1114|  24.8k|    WELS_CHECK_SE_UPPER_ERROR (uiCode, SLICE_HEADER_REDUNDANT_PIC_CNT_MAX, "redundant_pic_cnt",
  ------------------
  |  |  262|  24.8k|#define WELS_CHECK_SE_UPPER_ERROR(val, upper_bound, syntax_name, ret_code) do {\
  |  |  263|  24.8k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (263:5): [True: 1.38k, False: 23.4k]
  |  |  ------------------
  |  |  264|  1.38k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  265|  1.38k|  return ret_code;\
  |  |  266|  1.38k|}\
  |  |  267|  24.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (267:8): [Folded, False: 23.4k]
  |  |  ------------------
  ------------------
 1115|  24.8k|                               GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REDUNDANT_PIC_CNT));
 1116|  23.4k|    pSliceHead->iRedundantPicCnt = uiCode;
 1117|  23.4k|    if (pSliceHead->iRedundantPicCnt > 0) {
  ------------------
  |  Branch (1117:9): [True: 8.78k, False: 14.6k]
  ------------------
 1118|  8.78k|      WelsLog (pLogCtx, WELS_LOG_WARNING, "Redundant picture not supported!");
 1119|  8.78k|      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REDUNDANT_PIC_CNT);
  ------------------
  |  |   59|  8.78k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1120|  8.78k|    }
 1121|  23.4k|  }
 1122|       |
 1123|  4.72M|  if (B_SLICE == uiSliceType) {
  ------------------
  |  Branch (1123:7): [True: 145k, False: 4.58M]
  ------------------
 1124|       |    //fix me: it needs to use the this flag somewhere for B-Sclice
 1125|   145k|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //direct_spatial_mv_pred_flag
  ------------------
  |  |   52|   145k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   145k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   145k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 280, False: 145k]
  |  |  ------------------
  |  |   55|   145k|    return uiRetTmp; \
  |  |   56|   145k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 145k]
  |  |  ------------------
  ------------------
 1126|   145k|    pSliceHead->iDirectSpatialMvPredFlag = uiCode;
 1127|   145k|  }
 1128|       |
 1129|       |  //set defaults, might be overriden a few line later
 1130|  4.72M|  pSliceHead->uiRefCount[0] = pPps->uiNumRefIdxL0Active;
 1131|  4.72M|  pSliceHead->uiRefCount[1] = pPps->uiNumRefIdxL1Active;
 1132|       |
 1133|  4.72M|  bool bReadNumRefFlag = (P_SLICE == uiSliceType || B_SLICE == uiSliceType);
  ------------------
  |  Branch (1133:27): [True: 4.32M, False: 395k]
  |  Branch (1133:53): [True: 145k, False: 250k]
  ------------------
 1134|  4.72M|  if (kbExtensionFlag) {
  ------------------
  |  Branch (1134:7): [True: 1.89M, False: 2.82M]
  ------------------
 1135|  1.89M|    bReadNumRefFlag &= (BASE_QUALITY_ID == pNalHeaderExt->uiQualityId);
  ------------------
  |  |   60|  1.89M|#define BASE_QUALITY_ID         0
  ------------------
 1136|  1.89M|  }
 1137|  4.72M|  if (bReadNumRefFlag) {
  ------------------
  |  Branch (1137:7): [True: 4.47M, False: 250k]
  ------------------
 1138|  4.47M|    WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //num_ref_idx_active_override_flag
  ------------------
  |  |   52|  4.47M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.47M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.47M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.23M, False: 3.24M]
  |  |  ------------------
  |  |   55|  4.47M|    return uiRetTmp; \
  |  |   56|  4.47M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.24M]
  |  |  ------------------
  ------------------
 1139|  3.24M|    pSliceHead->bNumRefIdxActiveOverrideFlag = !!uiCode;
 1140|  3.24M|    if (pSliceHead->bNumRefIdxActiveOverrideFlag) {
  ------------------
  |  Branch (1140:9): [True: 193k, False: 3.05M]
  ------------------
 1141|   193k|      WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //num_ref_idx_l0_active_minus1
  ------------------
  |  |   52|   193k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   193k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   193k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 18.0k, False: 175k]
  |  |  ------------------
  |  |   55|   193k|    return uiRetTmp; \
  |  |   56|   193k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 175k]
  |  |  ------------------
  ------------------
 1142|   175k|      WELS_CHECK_SE_UPPER_ERROR (uiCode, MAX_NUM_REF_IDX_L0_ACTIVE_MINUS1, "num_ref_idx_l0_active_minus1",
  ------------------
  |  |  262|   175k|#define WELS_CHECK_SE_UPPER_ERROR(val, upper_bound, syntax_name, ret_code) do {\
  |  |  263|   175k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (263:5): [True: 25.3k, False: 149k]
  |  |  ------------------
  |  |  264|  25.3k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  265|  25.3k|  return ret_code;\
  |  |  266|  25.3k|}\
  |  |  267|   175k|}while(0)
  |  |  ------------------
  |  |  |  Branch (267:8): [Folded, False: 149k]
  |  |  ------------------
  ------------------
 1143|   175k|                                 GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_NUM_REF_IDX_L0_ACTIVE_MINUS1));
 1144|   149k|      pSliceHead->uiRefCount[0] = 1 + uiCode;
 1145|   149k|      if (B_SLICE == uiSliceType) {
  ------------------
  |  Branch (1145:11): [True: 20.9k, False: 128k]
  ------------------
 1146|  20.9k|        WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //num_ref_idx_l1_active_minus1
  ------------------
  |  |   52|  20.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  20.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  20.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 364, False: 20.5k]
  |  |  ------------------
  |  |   55|  20.9k|    return uiRetTmp; \
  |  |   56|  20.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 20.5k]
  |  |  ------------------
  ------------------
 1147|  20.5k|        WELS_CHECK_SE_UPPER_ERROR (uiCode, MAX_NUM_REF_IDX_L1_ACTIVE_MINUS1, "num_ref_idx_l1_active_minus1",
  ------------------
  |  |  262|  20.5k|#define WELS_CHECK_SE_UPPER_ERROR(val, upper_bound, syntax_name, ret_code) do {\
  |  |  263|  20.5k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (263:5): [True: 871, False: 19.6k]
  |  |  ------------------
  |  |  264|    871|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  265|    871|  return ret_code;\
  |  |  266|    871|}\
  |  |  267|  20.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (267:8): [Folded, False: 19.6k]
  |  |  ------------------
  ------------------
 1148|  20.5k|                                   GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_NUM_REF_IDX_L1_ACTIVE_MINUS1));
 1149|  19.6k|        pSliceHead->uiRefCount[1] = 1 + uiCode;
 1150|  19.6k|      }
 1151|   149k|    }
 1152|  3.24M|  }
 1153|       |
 1154|  3.45M|  if (pSliceHead->uiRefCount[0] > MAX_REF_PIC_COUNT || pSliceHead->uiRefCount[1] > MAX_REF_PIC_COUNT) {
  ------------------
  |  |   45|  6.90M|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
                if (pSliceHead->uiRefCount[0] > MAX_REF_PIC_COUNT || pSliceHead->uiRefCount[1] > MAX_REF_PIC_COUNT) {
  ------------------
  |  |   45|  3.45M|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
  |  Branch (1154:7): [True: 0, False: 3.45M]
  |  Branch (1154:56): [True: 0, False: 3.45M]
  ------------------
 1155|      0|    WelsLog (pLogCtx, WELS_LOG_WARNING, "reference overflow");
 1156|      0|    return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_REF_COUNT_OVERFLOW);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1157|      0|  }
 1158|       |
 1159|  3.45M|  if (BASE_QUALITY_ID == uiQualityId) {
  ------------------
  |  |   60|  3.45M|#define BASE_QUALITY_ID         0
  ------------------
  |  Branch (1159:7): [True: 3.45M, False: 0]
  ------------------
 1160|  3.45M|    iRet = ParseRefPicListReordering (pBs, pSliceHead);
 1161|  3.45M|    if (iRet != ERR_NONE) {
  ------------------
  |  Branch (1161:9): [True: 110k, False: 3.33M]
  ------------------
 1162|   110k|      WelsLog (pLogCtx, WELS_LOG_WARNING, "invalid ref pPic list reordering syntaxs!");
 1163|   110k|      return iRet;
 1164|   110k|    }
 1165|       |
 1166|  3.33M|    if ((pPps->bWeightedPredFlag && uiSliceType == P_SLICE) || (pPps->uiWeightedBipredIdc == 1 && uiSliceType == B_SLICE)) {
  ------------------
  |  Branch (1166:10): [True: 277k, False: 3.06M]
  |  Branch (1166:37): [True: 73.6k, False: 204k]
  |  Branch (1166:65): [True: 238k, False: 3.02M]
  |  Branch (1166:99): [True: 4.69k, False: 233k]
  ------------------
 1167|  78.3k|      iRet = ParsePredWeightedTable (pBs, pSliceHead);
 1168|  78.3k|      if (iRet != ERR_NONE) {
  ------------------
  |  Branch (1168:11): [True: 65.5k, False: 12.8k]
  ------------------
 1169|  65.5k|        WelsLog (pLogCtx, WELS_LOG_WARNING, "invalid weighted prediction syntaxs!");
 1170|  65.5k|        return iRet;
 1171|  65.5k|      }
 1172|  78.3k|    }
 1173|       |
 1174|  3.27M|    if (kbExtensionFlag) {
  ------------------
  |  Branch (1174:9): [True: 635k, False: 2.63M]
  ------------------
 1175|   635k|      if (pNalHeaderExt->iNoInterLayerPredFlag || pNalHeaderExt->uiQualityId > 0)
  ------------------
  |  Branch (1175:11): [True: 606k, False: 28.9k]
  |  Branch (1175:51): [True: 0, False: 28.9k]
  ------------------
 1176|   606k|        pSliceHeadExt->bBasePredWeightTableFlag = false;
 1177|  28.9k|      else
 1178|  28.9k|        pSliceHeadExt->bBasePredWeightTableFlag = true;
 1179|   635k|    }
 1180|       |
 1181|  3.27M|    if (kpCurNal->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc != 0) {
  ------------------
  |  Branch (1181:9): [True: 2.94M, False: 330k]
  ------------------
 1182|  2.94M|      iRet = ParseDecRefPicMarking (pCtx, pBs, pSliceHead, pSps, bIdrFlag);
 1183|  2.94M|      if (iRet != ERR_NONE) {
  ------------------
  |  Branch (1183:11): [True: 8.91k, False: 2.93M]
  ------------------
 1184|  8.91k|        return iRet;
 1185|  8.91k|      }
 1186|       |
 1187|  2.93M|      if (kbExtensionFlag && !pSubsetSps->sSpsSvcExt.bSliceHeaderRestrictionFlag) {
  ------------------
  |  Branch (1187:11): [True: 634k, False: 2.29M]
  |  Branch (1187:30): [True: 626k, False: 8.34k]
  ------------------
 1188|   626k|        WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //store_ref_base_pic_flag
  ------------------
  |  |   52|   626k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   626k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   626k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 381, False: 626k]
  |  |  ------------------
  |  |   55|   626k|    return uiRetTmp; \
  |  |   56|   626k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 626k]
  |  |  ------------------
  ------------------
 1189|   626k|        pSliceHeadExt->bStoreRefBasePicFlag = !!uiCode;
 1190|   626k|        if ((pNalHeaderExt->bUseRefBasePicFlag || pSliceHeadExt->bStoreRefBasePicFlag) && !bIdrFlag) {
  ------------------
  |  Branch (1190:14): [True: 0, False: 626k]
  |  Branch (1190:51): [True: 6.16k, False: 619k]
  |  Branch (1190:91): [True: 432, False: 5.73k]
  ------------------
 1191|    432|          WelsLog (pLogCtx, WELS_LOG_WARNING,
 1192|    432|                   "ParseSliceHeaderSyntaxs(): bUseRefBasePicFlag or bStoreRefBasePicFlag = 1 not supported.");
 1193|    432|          return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_ILP);
  ------------------
  |  |   59|    432|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1194|    432|        }
 1195|   626k|      }
 1196|  2.93M|    }
 1197|  3.27M|  }
 1198|       |
 1199|  3.26M|  if (pPps->bEntropyCodingModeFlag) {
  ------------------
  |  Branch (1199:7): [True: 173k, False: 3.09M]
  ------------------
 1200|   173k|    if (pSliceHead->eSliceType != I_SLICE && pSliceHead->eSliceType != SI_SLICE) {
  ------------------
  |  Branch (1200:9): [True: 145k, False: 28.3k]
  |  Branch (1200:46): [True: 144k, False: 399]
  ------------------
 1201|   144k|      WELS_READ_VERIFY (BsGetUe (pBs, &uiCode));
  ------------------
  |  |   52|   144k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   144k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   144k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 5.03k, False: 139k]
  |  |  ------------------
  |  |   55|   144k|    return uiRetTmp; \
  |  |   56|   144k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 139k]
  |  |  ------------------
  ------------------
 1202|   139k|      WELS_CHECK_SE_UPPER_ERROR (uiCode, SLICE_HEADER_CABAC_INIT_IDC_MAX, "cabac_init_idc", ERR_INFO_INVALID_CABAC_INIT_IDC);
  ------------------
  |  |  262|   139k|#define WELS_CHECK_SE_UPPER_ERROR(val, upper_bound, syntax_name, ret_code) do {\
  |  |  263|   139k|if (val > upper_bound) {\
  |  |  ------------------
  |  |  |  Branch (263:5): [True: 10.8k, False: 128k]
  |  |  ------------------
  |  |  264|  10.8k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  265|  10.8k|  return ret_code;\
  |  |  266|  10.8k|}\
  |  |  267|   139k|}while(0)
  |  |  ------------------
  |  |  |  Branch (267:8): [Folded, False: 128k]
  |  |  ------------------
  ------------------
 1203|   128k|      pSliceHead->iCabacInitIdc = uiCode;
 1204|   128k|    } else
 1205|  28.7k|      pSliceHead->iCabacInitIdc = 0;
 1206|   173k|  }
 1207|       |
 1208|  3.24M|  WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //slice_qp_delta
  ------------------
  |  |   52|  3.24M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.24M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.24M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 17.8k, False: 3.23M]
  |  |  ------------------
  |  |   55|  3.24M|    return uiRetTmp; \
  |  |   56|  3.24M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.23M]
  |  |  ------------------
  ------------------
 1209|  3.23M|  pSliceHead->iSliceQpDelta     = iCode;
 1210|  3.23M|  pSliceHead->iSliceQp          = pPps->iPicInitQp + pSliceHead->iSliceQpDelta;
 1211|  3.23M|  if (pSliceHead->iSliceQp < 0 || pSliceHead->iSliceQp > 51) {
  ------------------
  |  Branch (1211:7): [True: 5.12k, False: 3.22M]
  |  Branch (1211:35): [True: 6.89k, False: 3.21M]
  ------------------
 1212|  12.0k|    WelsLog (pLogCtx, WELS_LOG_WARNING, "QP %d out of range", pSliceHead->iSliceQp);
 1213|  12.0k|    return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_QP);
  ------------------
  |  |   59|  12.0k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1214|  12.0k|  }
 1215|       |
 1216|       |  //FIXME qscale / qp ... stuff
 1217|  3.21M|  if (!kbExtensionFlag) {
  ------------------
  |  Branch (1217:7): [True: 2.59M, False: 628k]
  ------------------
 1218|  2.59M|    if (uiSliceType == SP_SLICE || uiSliceType == SI_SLICE) {
  ------------------
  |  Branch (1218:9): [True: 341, False: 2.58M]
  |  Branch (1218:36): [True: 689, False: 2.58M]
  ------------------
 1219|  1.03k|      WelsLog (pLogCtx, WELS_LOG_WARNING, "SP/SI not supported");
 1220|  1.03k|      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_SPSI);
  ------------------
  |  |   59|  1.03k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1221|  1.03k|    }
 1222|  2.59M|  }
 1223|       |
 1224|  3.21M|  pSliceHead->uiDisableDeblockingFilterIdc = 0;
 1225|  3.21M|  pSliceHead->iSliceAlphaC0Offset          = 0;
 1226|  3.21M|  pSliceHead->iSliceBetaOffset             = 0;
 1227|  3.21M|  if (pPps->bDeblockingFilterControlPresentFlag) {
  ------------------
  |  Branch (1227:7): [True: 68.3k, False: 3.14M]
  ------------------
 1228|  68.3k|    WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //disable_deblocking_filter_idc
  ------------------
  |  |   52|  68.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  68.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  68.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 7.27k, False: 61.0k]
  |  |  ------------------
  |  |   55|  68.3k|    return uiRetTmp; \
  |  |   56|  68.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 61.0k]
  |  |  ------------------
  ------------------
 1229|  61.0k|    pSliceHead->uiDisableDeblockingFilterIdc = uiCode;
 1230|       |    //refer to JVT-X201wcm1.doc G.7.4.3.4--2010.4.20
 1231|  61.0k|    if (pSliceHead->uiDisableDeblockingFilterIdc > 6) {
  ------------------
  |  Branch (1231:9): [True: 2.78k, False: 58.3k]
  ------------------
 1232|  2.78k|      WelsLog (pLogCtx, WELS_LOG_WARNING, "disable_deblock_filter_idc (%d) out of range [0, 6]",
 1233|  2.78k|               pSliceHead->uiDisableDeblockingFilterIdc);
 1234|  2.78k|      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_DBLOCKING_IDC);
  ------------------
  |  |   59|  2.78k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1235|  2.78k|    }
 1236|  58.3k|    if (pSliceHead->uiDisableDeblockingFilterIdc != 1) {
  ------------------
  |  Branch (1236:9): [True: 42.1k, False: 16.1k]
  ------------------
 1237|  42.1k|      WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //slice_alpha_c0_offset_div2
  ------------------
  |  |   52|  42.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  42.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  42.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 5.15k, False: 37.0k]
  |  |  ------------------
  |  |   55|  42.1k|    return uiRetTmp; \
  |  |   56|  42.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 37.0k]
  |  |  ------------------
  ------------------
 1238|  37.0k|      pSliceHead->iSliceAlphaC0Offset = iCode * 2;
 1239|  37.0k|      WELS_CHECK_SE_BOTH_ERROR (pSliceHead->iSliceAlphaC0Offset, SLICE_HEADER_ALPHAC0_BETA_OFFSET_MIN,
  ------------------
  |  |  248|  37.0k|#define WELS_CHECK_SE_BOTH_ERROR(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  249|  37.0k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (249:5): [True: 324, False: 36.6k]
  |  |  |  Branch (249:28): [True: 303, False: 36.3k]
  |  |  ------------------
  |  |  250|    627|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  251|    627|  return ret_code;\
  |  |  252|    627|}\
  |  |  253|  37.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (253:8): [Folded, False: 36.3k]
  |  |  ------------------
  ------------------
 1240|  37.0k|                                SLICE_HEADER_ALPHAC0_BETA_OFFSET_MAX, "slice_alpha_c0_offset_div2 * 2", GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER,
 1241|  37.0k|                                    ERR_INFO_INVALID_SLICE_ALPHA_C0_OFFSET_DIV2));
 1242|  36.3k|      WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //slice_beta_offset_div2
  ------------------
  |  |   52|  36.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  36.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  36.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.14k, False: 35.2k]
  |  |  ------------------
  |  |   55|  36.3k|    return uiRetTmp; \
  |  |   56|  36.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 35.2k]
  |  |  ------------------
  ------------------
 1243|  35.2k|      pSliceHead->iSliceBetaOffset = iCode * 2;
 1244|  35.2k|      WELS_CHECK_SE_BOTH_ERROR (pSliceHead->iSliceBetaOffset, SLICE_HEADER_ALPHAC0_BETA_OFFSET_MIN,
  ------------------
  |  |  248|  35.2k|#define WELS_CHECK_SE_BOTH_ERROR(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  249|  35.2k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (249:5): [True: 684, False: 34.5k]
  |  |  |  Branch (249:28): [True: 1.02k, False: 33.5k]
  |  |  ------------------
  |  |  250|  1.70k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  251|  1.70k|  return ret_code;\
  |  |  252|  1.70k|}\
  |  |  253|  35.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (253:8): [Folded, False: 33.5k]
  |  |  ------------------
  ------------------
 1245|  35.2k|                                SLICE_HEADER_ALPHAC0_BETA_OFFSET_MAX, "slice_beta_offset_div2 * 2", GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER,
 1246|  35.2k|                                    ERR_INFO_INVALID_SLICE_BETA_OFFSET_DIV2));
 1247|  35.2k|    }
 1248|  58.3k|  }
 1249|       |
 1250|  3.19M|  bSgChangeCycleInvolved = (pPps->uiNumSliceGroups > 1 && pPps->uiSliceGroupMapType >= 3
  ------------------
  |  Branch (1250:29): [True: 79.0k, False: 3.11M]
  |  Branch (1250:59): [True: 0, False: 79.0k]
  ------------------
 1251|      0|                            && pPps->uiSliceGroupMapType <= 5);
  ------------------
  |  Branch (1251:32): [True: 0, False: 0]
  ------------------
 1252|  3.19M|  if (kbExtensionFlag && bSgChangeCycleInvolved)
  ------------------
  |  Branch (1252:7): [True: 619k, False: 2.57M]
  |  Branch (1252:26): [True: 0, False: 619k]
  ------------------
 1253|      0|    bSgChangeCycleInvolved = (bSgChangeCycleInvolved && (uiQualityId == BASE_QUALITY_ID));
  ------------------
  |  |   60|      0|#define BASE_QUALITY_ID         0
  ------------------
  |  Branch (1253:31): [True: 0, False: 0]
  |  Branch (1253:57): [True: 0, False: 0]
  ------------------
 1254|  3.19M|  if (bSgChangeCycleInvolved) {
  ------------------
  |  Branch (1254:7): [True: 0, False: 3.19M]
  ------------------
 1255|      0|    if (pPps->uiSliceGroupChangeRate > 0) {
  ------------------
  |  Branch (1255:9): [True: 0, False: 0]
  ------------------
 1256|      0|      const int32_t kiNumBits = (int32_t)WELS_CEIL (log (static_cast<double> (1 + pPps->uiPicSizeInMapUnits /
  ------------------
  |  |  112|      0|#define WELS_CEIL(x) ceil(x) // FIXME: low complexity instead of math library used
  ------------------
 1257|      0|                                pPps->uiSliceGroupChangeRate)));
 1258|      0|      WELS_READ_VERIFY (BsGetBits (pBs, kiNumBits, &uiCode)); //lice_group_change_cycle
  ------------------
  |  |   52|      0|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|      0|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|      0|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|    return uiRetTmp; \
  |  |   56|      0|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1259|      0|      pSliceHead->iSliceGroupChangeCycle = uiCode;
 1260|      0|    } else
 1261|      0|      pSliceHead->iSliceGroupChangeCycle = 0;
 1262|      0|  }
 1263|       |
 1264|  3.19M|  if (!kbExtensionFlag) {
  ------------------
  |  Branch (1264:7): [True: 2.57M, False: 619k]
  ------------------
 1265|  2.57M|    FillDefaultSliceHeaderExt (pSliceHeadExt, pNalHeaderExt);
 1266|  2.57M|  } else {
 1267|       |    /* Extra syntax elements newly introduced */
 1268|   619k|    pSliceHeadExt->pSubsetSps = pSubsetSps;
 1269|       |
 1270|   619k|    if (!pNalHeaderExt->iNoInterLayerPredFlag && BASE_QUALITY_ID == uiQualityId) {
  ------------------
  |  |   60|  18.9k|#define BASE_QUALITY_ID         0
  ------------------
  |  Branch (1270:9): [True: 18.9k, False: 600k]
  |  Branch (1270:50): [True: 18.9k, False: 0]
  ------------------
 1271|       |      //the following should be deleted for CODE_CLEAN
 1272|  18.9k|      WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //ref_layer_dq_id
  ------------------
  |  |   52|  18.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  18.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  18.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 649, False: 18.3k]
  |  |  ------------------
  |  |   55|  18.9k|    return uiRetTmp; \
  |  |   56|  18.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 18.3k]
  |  |  ------------------
  ------------------
 1273|  18.3k|      pSliceHeadExt->uiRefLayerDqId = uiCode;
 1274|  18.3k|      if (pSubsetSps->sSpsSvcExt.bInterLayerDeblockingFilterCtrlPresentFlag) {
  ------------------
  |  Branch (1274:11): [True: 3.41k, False: 14.9k]
  ------------------
 1275|  3.41k|        WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //disable_inter_layer_deblocking_filter_idc
  ------------------
  |  |   52|  3.41k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.41k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.41k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 445, False: 2.96k]
  |  |  ------------------
  |  |   55|  3.41k|    return uiRetTmp; \
  |  |   56|  3.41k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.96k]
  |  |  ------------------
  ------------------
 1276|  2.96k|        pSliceHeadExt->uiDisableInterLayerDeblockingFilterIdc = uiCode;
 1277|       |        //refer to JVT-X201wcm1.doc G.7.4.3.4--2010.4.20
 1278|  2.96k|        if (pSliceHeadExt->uiDisableInterLayerDeblockingFilterIdc > 6) {
  ------------------
  |  Branch (1278:13): [True: 232, False: 2.73k]
  ------------------
 1279|    232|          WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "disable_inter_layer_deblock_filter_idc (%d) out of range [0, 6]",
 1280|    232|                   pSliceHeadExt->uiDisableInterLayerDeblockingFilterIdc);
 1281|    232|          return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_DBLOCKING_IDC);
  ------------------
  |  |   59|    232|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1282|    232|        }
 1283|  2.73k|        if (pSliceHeadExt->uiDisableInterLayerDeblockingFilterIdc != 1) {
  ------------------
  |  Branch (1283:13): [True: 2.48k, False: 247]
  ------------------
 1284|  2.48k|          WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //inter_layer_slice_alpha_c0_offset_div2
  ------------------
  |  |   52|  2.48k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.48k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.48k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 267, False: 2.22k]
  |  |  ------------------
  |  |   55|  2.48k|    return uiRetTmp; \
  |  |   56|  2.48k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.22k]
  |  |  ------------------
  ------------------
 1285|  2.22k|          pSliceHeadExt->iInterLayerSliceAlphaC0Offset = iCode * 2;
 1286|  2.22k|          WELS_CHECK_SE_BOTH_ERROR (pSliceHeadExt->iInterLayerSliceAlphaC0Offset,
  ------------------
  |  |  248|  2.22k|#define WELS_CHECK_SE_BOTH_ERROR(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  249|  2.22k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (249:5): [True: 225, False: 1.99k]
  |  |  |  Branch (249:28): [True: 463, False: 1.53k]
  |  |  ------------------
  |  |  250|    688|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  251|    688|  return ret_code;\
  |  |  252|    688|}\
  |  |  253|  2.22k|}while(0)
  |  |  ------------------
  |  |  |  Branch (253:8): [Folded, False: 1.53k]
  |  |  ------------------
  ------------------
 1287|  2.22k|                                    SLICE_HEADER_INTER_LAYER_ALPHAC0_BETA_OFFSET_MIN, SLICE_HEADER_INTER_LAYER_ALPHAC0_BETA_OFFSET_MAX,
 1288|  2.22k|                                    "inter_layer_alpha_c0_offset_div2 * 2", GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER,
 1289|  2.22k|                                        ERR_INFO_INVALID_SLICE_ALPHA_C0_OFFSET_DIV2));
 1290|  1.53k|          WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //inter_layer_slice_beta_offset_div2
  ------------------
  |  |   52|  1.53k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.53k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.53k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 277, False: 1.25k]
  |  |  ------------------
  |  |   55|  1.53k|    return uiRetTmp; \
  |  |   56|  1.53k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.25k]
  |  |  ------------------
  ------------------
 1291|  1.25k|          pSliceHeadExt->iInterLayerSliceBetaOffset = iCode * 2;
 1292|  1.25k|          WELS_CHECK_SE_BOTH_ERROR (pSliceHeadExt->iInterLayerSliceBetaOffset, SLICE_HEADER_INTER_LAYER_ALPHAC0_BETA_OFFSET_MIN,
  ------------------
  |  |  248|  1.25k|#define WELS_CHECK_SE_BOTH_ERROR(val, lower_bound, upper_bound, syntax_name, ret_code) do {\
  |  |  249|  1.25k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (249:5): [True: 212, False: 1.04k]
  |  |  |  Branch (249:28): [True: 229, False: 816]
  |  |  ------------------
  |  |  250|    441|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_ERROR, "invalid syntax " syntax_name " %d", val);\
  |  |  251|    441|  return ret_code;\
  |  |  252|    441|}\
  |  |  253|  1.25k|}while(0)
  |  |  ------------------
  |  |  |  Branch (253:8): [Folded, False: 816]
  |  |  ------------------
  ------------------
 1293|  1.25k|                                    SLICE_HEADER_INTER_LAYER_ALPHAC0_BETA_OFFSET_MAX, "inter_layer_slice_beta_offset_div2 * 2",
 1294|  1.25k|                                    GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SLICE_BETA_OFFSET_DIV2));
 1295|  1.25k|        }
 1296|  2.73k|      }
 1297|       |
 1298|  15.9k|      pSliceHeadExt->uiRefLayerChromaPhaseXPlus1Flag = pSubsetSps->sSpsSvcExt.uiSeqRefLayerChromaPhaseXPlus1Flag;
 1299|  15.9k|      pSliceHeadExt->uiRefLayerChromaPhaseYPlus1     = pSubsetSps->sSpsSvcExt.uiSeqRefLayerChromaPhaseYPlus1;
 1300|       |
 1301|  15.9k|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //constrained_intra_resampling_flag
  ------------------
  |  |   52|  15.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  15.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  15.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 259, False: 15.7k]
  |  |  ------------------
  |  |   55|  15.9k|    return uiRetTmp; \
  |  |   56|  15.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 15.7k]
  |  |  ------------------
  ------------------
 1302|  15.7k|      pSliceHeadExt->bConstrainedIntraResamplingFlag = !!uiCode;
 1303|       |
 1304|  15.7k|      {
 1305|  15.7k|        SPosOffset pos;
 1306|  15.7k|        pos.iLeftOffset   = pSubsetSps->sSpsSvcExt.sSeqScaledRefLayer.iLeftOffset;
 1307|  15.7k|        pos.iTopOffset    = pSubsetSps->sSpsSvcExt.sSeqScaledRefLayer.iTopOffset * (2 - pSps->bFrameMbsOnlyFlag);
 1308|  15.7k|        pos.iRightOffset  = pSubsetSps->sSpsSvcExt.sSeqScaledRefLayer.iRightOffset;
 1309|  15.7k|        pos.iBottomOffset = pSubsetSps->sSpsSvcExt.sSeqScaledRefLayer.iBottomOffset * (2 - pSps->bFrameMbsOnlyFlag);
 1310|       |        //memcpy(&pSliceHeadExt->sScaledRefLayer, &pos, sizeof(SPosOffset));//confirmed_safe_unsafe_usage
 1311|  15.7k|        pSliceHeadExt->iScaledRefLayerPicWidthInSampleLuma  = (pSliceHead->iMbWidth << 4) -
 1312|  15.7k|            (pos.iLeftOffset + pos.iRightOffset);
 1313|  15.7k|        pSliceHeadExt->iScaledRefLayerPicHeightInSampleLuma = (pSliceHead->iMbHeight << 4) -
 1314|  15.7k|            (pos.iTopOffset + pos.iBottomOffset) / (1 + pSliceHead->bFieldPicFlag);
 1315|  15.7k|      }
 1316|   600k|    } else if (uiQualityId > BASE_QUALITY_ID) {
  ------------------
  |  |   60|   600k|#define BASE_QUALITY_ID         0
  ------------------
  |  Branch (1316:16): [True: 0, False: 600k]
  ------------------
 1317|      0|      WelsLog (pLogCtx, WELS_LOG_WARNING, "MGS not supported.");
 1318|      0|      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_MGS);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1319|   600k|    } else {
 1320|   600k|      pSliceHeadExt->uiRefLayerDqId = (uint8_t) - 1;
 1321|   600k|    }
 1322|       |
 1323|   616k|    pSliceHeadExt->bSliceSkipFlag            = false;
 1324|   616k|    pSliceHeadExt->bAdaptiveBaseModeFlag     = false;
 1325|   616k|    pSliceHeadExt->bDefaultBaseModeFlag      = false;
 1326|   616k|    pSliceHeadExt->bAdaptiveMotionPredFlag   = false;
 1327|   616k|    pSliceHeadExt->bDefaultMotionPredFlag    = false;
 1328|   616k|    pSliceHeadExt->bAdaptiveResidualPredFlag = false;
 1329|   616k|    pSliceHeadExt->bDefaultResidualPredFlag  = false;
 1330|   616k|    if (pNalHeaderExt->iNoInterLayerPredFlag)
  ------------------
  |  Branch (1330:9): [True: 600k, False: 15.7k]
  ------------------
 1331|   600k|      pSliceHeadExt->bTCoeffLevelPredFlag    = false;
 1332|  15.7k|    else
 1333|  15.7k|      pSliceHeadExt->bTCoeffLevelPredFlag    = pSubsetSps->sSpsSvcExt.bSeqTCoeffLevelPredFlag;
 1334|       |
 1335|   616k|    if (!pNalHeaderExt->iNoInterLayerPredFlag) {
  ------------------
  |  Branch (1335:9): [True: 15.7k, False: 600k]
  ------------------
 1336|  15.7k|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //slice_skip_flag
  ------------------
  |  |   52|  15.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  15.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  15.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 208, False: 15.5k]
  |  |  ------------------
  |  |   55|  15.7k|    return uiRetTmp; \
  |  |   56|  15.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 15.5k]
  |  |  ------------------
  ------------------
 1337|  15.5k|      pSliceHeadExt->bSliceSkipFlag = !!uiCode;
 1338|  15.5k|      if (pSliceHeadExt->bSliceSkipFlag) {
  ------------------
  |  Branch (1338:11): [True: 805, False: 14.7k]
  ------------------
 1339|    805|        WelsLog (pLogCtx, WELS_LOG_WARNING, "bSliceSkipFlag == 1 not supported.");
 1340|    805|        return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_SLICESKIP);
  ------------------
  |  |   59|    805|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1341|  14.7k|      } else {
 1342|  14.7k|        WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_base_mode_flag
  ------------------
  |  |   52|  14.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  14.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  14.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 233, False: 14.4k]
  |  |  ------------------
  |  |   55|  14.7k|    return uiRetTmp; \
  |  |   56|  14.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 14.4k]
  |  |  ------------------
  ------------------
 1343|  14.4k|        pSliceHeadExt->bAdaptiveBaseModeFlag = !!uiCode;
 1344|  14.4k|        if (!pSliceHeadExt->bAdaptiveBaseModeFlag) {
  ------------------
  |  Branch (1344:13): [True: 11.2k, False: 3.21k]
  ------------------
 1345|  11.2k|          WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //default_base_mode_flag
  ------------------
  |  |   52|  11.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  11.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  11.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 199, False: 11.0k]
  |  |  ------------------
  |  |   55|  11.2k|    return uiRetTmp; \
  |  |   56|  11.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 11.0k]
  |  |  ------------------
  ------------------
 1346|  11.0k|          pSliceHeadExt->bDefaultBaseModeFlag = !!uiCode;
 1347|  11.0k|        }
 1348|  14.2k|        if (!pSliceHeadExt->bDefaultBaseModeFlag) {
  ------------------
  |  Branch (1348:13): [True: 12.4k, False: 1.79k]
  ------------------
 1349|  12.4k|          WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_motion_prediction_flag
  ------------------
  |  |   52|  12.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  12.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  12.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 220, False: 12.2k]
  |  |  ------------------
  |  |   55|  12.4k|    return uiRetTmp; \
  |  |   56|  12.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 12.2k]
  |  |  ------------------
  ------------------
 1350|  12.2k|          pSliceHeadExt->bAdaptiveMotionPredFlag = !!uiCode;
 1351|  12.2k|          if (!pSliceHeadExt->bAdaptiveMotionPredFlag) {
  ------------------
  |  Branch (1351:15): [True: 3.79k, False: 8.47k]
  ------------------
 1352|  3.79k|            WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //default_motion_prediction_flag
  ------------------
  |  |   52|  3.79k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.79k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.79k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 206, False: 3.58k]
  |  |  ------------------
  |  |   55|  3.79k|    return uiRetTmp; \
  |  |   56|  3.79k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.58k]
  |  |  ------------------
  ------------------
 1353|  3.58k|            pSliceHeadExt->bDefaultMotionPredFlag = !!uiCode;
 1354|  3.58k|          }
 1355|  12.2k|        }
 1356|       |
 1357|  13.8k|        WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //adaptive_residual_prediction_flag
  ------------------
  |  |   52|  13.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  13.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  13.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 244, False: 13.6k]
  |  |  ------------------
  |  |   55|  13.8k|    return uiRetTmp; \
  |  |   56|  13.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 13.6k]
  |  |  ------------------
  ------------------
 1358|  13.6k|        pSliceHeadExt->bAdaptiveResidualPredFlag = !!uiCode;
 1359|  13.6k|        if (!pSliceHeadExt->bAdaptiveResidualPredFlag) {
  ------------------
  |  Branch (1359:13): [True: 6.05k, False: 7.55k]
  ------------------
 1360|  6.05k|          WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //default_residual_prediction_flag
  ------------------
  |  |   52|  6.05k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  6.05k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  6.05k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 230, False: 5.82k]
  |  |  ------------------
  |  |   55|  6.05k|    return uiRetTmp; \
  |  |   56|  6.05k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 5.82k]
  |  |  ------------------
  ------------------
 1361|  5.82k|          pSliceHeadExt->bDefaultResidualPredFlag = !!uiCode;
 1362|  5.82k|        }
 1363|  13.6k|      }
 1364|  13.3k|      if (pSubsetSps->sSpsSvcExt.bAdaptiveTCoeffLevelPredFlag) {
  ------------------
  |  Branch (1364:11): [True: 1.75k, False: 11.6k]
  ------------------
 1365|  1.75k|        WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //tcoeff_level_prediction_flag
  ------------------
  |  |   52|  1.75k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.75k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.75k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 213, False: 1.53k]
  |  |  ------------------
  |  |   55|  1.75k|    return uiRetTmp; \
  |  |   56|  1.75k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.53k]
  |  |  ------------------
  ------------------
 1366|  1.53k|        pSliceHeadExt->bTCoeffLevelPredFlag = !!uiCode;
 1367|  1.53k|      }
 1368|  13.3k|    }
 1369|       |
 1370|   613k|    if (!pSubsetSps->sSpsSvcExt.bSliceHeaderRestrictionFlag) {
  ------------------
  |  Branch (1370:9): [True: 608k, False: 4.96k]
  ------------------
 1371|   608k|      WELS_READ_VERIFY (BsGetBits (pBs, 4, &uiCode)); //scan_idx_start
  ------------------
  |  |   52|   608k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   608k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   608k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 347, False: 608k]
  |  |  ------------------
  |  |   55|   608k|    return uiRetTmp; \
  |  |   56|   608k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 608k]
  |  |  ------------------
  ------------------
 1372|   608k|      pSliceHeadExt->uiScanIdxStart = uiCode;
 1373|   608k|      WELS_READ_VERIFY (BsGetBits (pBs, 4, &uiCode)); //scan_idx_end
  ------------------
  |  |   52|   608k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   608k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   608k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 297, False: 608k]
  |  |  ------------------
  |  |   55|   608k|    return uiRetTmp; \
  |  |   56|   608k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 608k]
  |  |  ------------------
  ------------------
 1374|   608k|      pSliceHeadExt->uiScanIdxEnd = uiCode;
 1375|   608k|      if (pSliceHeadExt->uiScanIdxStart != 0 || pSliceHeadExt->uiScanIdxEnd != 15) {
  ------------------
  |  Branch (1375:11): [True: 597k, False: 10.8k]
  |  Branch (1375:49): [True: 518, False: 10.3k]
  ------------------
 1376|   597k|        WelsLog (pLogCtx, WELS_LOG_WARNING, "uiScanIdxStart (%d) != 0 and uiScanIdxEnd (%d) !=15 not supported here",
 1377|   597k|                 pSliceHeadExt->uiScanIdxStart, pSliceHeadExt->uiScanIdxEnd);
 1378|   597k|        return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_MGS);
  ------------------
  |  |   59|   597k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1379|   597k|      }
 1380|   608k|    } else {
 1381|  4.96k|      pSliceHeadExt->uiScanIdxStart = 0;
 1382|  4.96k|      pSliceHeadExt->uiScanIdxEnd   = 15;
 1383|  4.96k|    }
 1384|   613k|  }
 1385|       |
 1386|  2.59M|  return ERR_NONE;
 1387|  3.19M|}
_ZN7WelsDec26PrefetchNalHeaderExtSyntaxEPNS_21TagWelsDecoderContextEPNS_10TagNalUnitES3_:
 1394|  53.4k|bool PrefetchNalHeaderExtSyntax (PWelsDecoderContext pCtx, PNalUnit const kppDst, PNalUnit const kpSrc) {
 1395|  53.4k|  PNalUnitHeaderExt pNalHdrExtD = NULL, pNalHdrExtS = NULL;
 1396|  53.4k|  PSliceHeaderExt pShExtD = NULL;
 1397|  53.4k|  PPrefixNalUnit pPrefixS = NULL;
 1398|  53.4k|  PSps pSps = NULL;
 1399|  53.4k|  int32_t iIdx = 0;
 1400|       |
 1401|  53.4k|  if (kppDst == NULL || kpSrc == NULL)
  ------------------
  |  Branch (1401:7): [True: 0, False: 53.4k]
  |  Branch (1401:25): [True: 0, False: 53.4k]
  ------------------
 1402|      0|    return false;
 1403|       |
 1404|  53.4k|  pNalHdrExtD   = &kppDst->sNalHeaderExt;
 1405|  53.4k|  pNalHdrExtS   = &kpSrc->sNalHeaderExt;
 1406|  53.4k|  pShExtD       = &kppDst->sNalData.sVclNal.sSliceHeaderExt;
 1407|  53.4k|  pPrefixS      = &kpSrc->sNalData.sPrefixNal;
 1408|  53.4k|  pSps          = &pCtx->sSpsPpsCtx.sSpsBuffer[pCtx->sSpsPpsCtx.sPpsBuffer[pShExtD->sSliceHeader.iPpsId].iSpsId];
 1409|       |
 1410|  53.4k|  pNalHdrExtD->uiDependencyId           = pNalHdrExtS->uiDependencyId;
 1411|  53.4k|  pNalHdrExtD->uiQualityId              = pNalHdrExtS->uiQualityId;
 1412|  53.4k|  pNalHdrExtD->uiTemporalId             = pNalHdrExtS->uiTemporalId;
 1413|  53.4k|  pNalHdrExtD->uiPriorityId             = pNalHdrExtS->uiPriorityId;
 1414|  53.4k|  pNalHdrExtD->bIdrFlag                 = pNalHdrExtS->bIdrFlag;
 1415|  53.4k|  pNalHdrExtD->iNoInterLayerPredFlag    = pNalHdrExtS->iNoInterLayerPredFlag;
 1416|  53.4k|  pNalHdrExtD->bDiscardableFlag         = pNalHdrExtS->bDiscardableFlag;
 1417|  53.4k|  pNalHdrExtD->bOutputFlag              = pNalHdrExtS->bOutputFlag;
 1418|  53.4k|  pNalHdrExtD->bUseRefBasePicFlag       = pNalHdrExtS->bUseRefBasePicFlag;
 1419|  53.4k|  pNalHdrExtD->uiLayerDqId              = pNalHdrExtS->uiLayerDqId;
 1420|       |
 1421|  53.4k|  pShExtD->bStoreRefBasePicFlag         = pPrefixS->bStoreRefBasePicFlag;
 1422|  53.4k|  memcpy (&pShExtD->sRefBasePicMarking, &pPrefixS->sRefPicBaseMarking,
 1423|  53.4k|          sizeof (SRefBasePicMarking)); //confirmed_safe_unsafe_usage
 1424|  53.4k|  if (pShExtD->sRefBasePicMarking.bAdaptiveRefBasePicMarkingModeFlag) {
  ------------------
  |  Branch (1424:7): [True: 39.5k, False: 13.8k]
  ------------------
 1425|  39.5k|    PRefBasePicMarking pRefBasePicMarking = &pShExtD->sRefBasePicMarking;
 1426|  39.5k|    iIdx = 0;
 1427|   215k|    do {
 1428|   215k|      if (pRefBasePicMarking->mmco_base[iIdx].uiMmcoType == MMCO_END)
  ------------------
  |  Branch (1428:11): [True: 39.2k, False: 175k]
  ------------------
 1429|  39.2k|        break;
 1430|   175k|      if (pRefBasePicMarking->mmco_base[iIdx].uiMmcoType == MMCO_SHORT2UNUSED)
  ------------------
  |  Branch (1430:11): [True: 85.0k, False: 90.8k]
  ------------------
 1431|  85.0k|        pRefBasePicMarking->mmco_base[iIdx].iShortFrameNum = (pShExtD->sSliceHeader.iFrameNum -
 1432|  85.0k|            pRefBasePicMarking->mmco_base[iIdx].uiDiffOfPicNums) & ((1 << pSps->uiLog2MaxFrameNum) - 1);
 1433|   175k|      ++ iIdx;
 1434|   175k|    } while (iIdx < MAX_MMCO_COUNT);
  ------------------
  |  |   51|   175k|#define MAX_MMCO_COUNT                  66
  ------------------
  |  Branch (1434:14): [True: 175k, False: 250]
  ------------------
 1435|  39.5k|  }
 1436|       |
 1437|  53.4k|  return true;
 1438|  53.4k|}
_ZN7WelsDec16UpdateAccessUnitEPNS_21TagWelsDecoderContextE:
 1442|  2.59M|int32_t UpdateAccessUnit (PWelsDecoderContext pCtx) {
 1443|  2.59M|  PAccessUnit pCurAu   = pCtx->pAccessUnitList;
 1444|  2.59M|  int32_t iIdx         = pCurAu->uiEndPos;
 1445|       |
 1446|       |  // Conversed iterator
 1447|  2.59M|  pCtx->uiTargetDqId = pCurAu->pNalUnitsList[iIdx]->sNalHeaderExt.uiLayerDqId;
 1448|  2.59M|  pCurAu->uiActualUnitsNum  = iIdx + 1;
 1449|  2.59M|  pCurAu->bCompletedAuFlag = true;
 1450|       |
 1451|       |  // Added for mosaic avoidance, 11/19/2009
 1452|  2.59M|#ifdef LONG_TERM_REF
 1453|  2.59M|  if (pCtx->bParamSetsLostFlag || pCtx->bNewSeqBegin)
  ------------------
  |  Branch (1453:7): [True: 1.59M, False: 1.00M]
  |  Branch (1453:35): [True: 194k, False: 807k]
  ------------------
 1454|       |#else
 1455|       |  if (pCtx->bReferenceLostAtT0Flag || pCtx->bNewSeqBegin)
 1456|       |#endif
 1457|  1.78M|  {
 1458|  1.78M|    uint32_t uiActualIdx = 0;
 1459|  3.39M|    while (uiActualIdx < pCurAu->uiActualUnitsNum) {
  ------------------
  |  Branch (1459:12): [True: 1.78M, False: 1.60M]
  ------------------
 1460|  1.78M|      PNalUnit nal = pCurAu->pNalUnitsList[uiActualIdx];
 1461|       |
 1462|  1.78M|      if (nal->sNalHeaderExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_CODED_SLICE_IDR || nal->sNalHeaderExt.bIdrFlag) {
  ------------------
  |  Branch (1462:11): [True: 168k, False: 1.61M]
  |  Branch (1462:89): [True: 10.6k, False: 1.60M]
  ------------------
 1463|   178k|        break;
 1464|   178k|      }
 1465|  1.60M|      ++ uiActualIdx;
 1466|  1.60M|    }
 1467|  1.78M|    if (uiActualIdx ==
  ------------------
  |  Branch (1467:9): [True: 1.60M, False: 178k]
  ------------------
 1468|  1.78M|        pCurAu->uiActualUnitsNum) { // no found IDR nal within incoming AU, need exit to avoid mosaic issue, 11/19/2009
 1469|       |
 1470|  1.60M|      pCtx->pDecoderStatistics->uiIDRLostNum++;
 1471|  1.60M|      if (!pCtx->bParamSetsLostFlag)
  ------------------
  |  Branch (1471:11): [True: 19.4k, False: 1.58M]
  ------------------
 1472|  19.4k|        WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
 1473|  19.4k|                 "UpdateAccessUnit():::::Key frame lost.....CAN NOT find IDR from current AU.");
 1474|  1.60M|      pCtx->iErrorCode |= dsRefLost;
 1475|  1.60M|      if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) {
  ------------------
  |  Branch (1475:11): [True: 0, False: 1.60M]
  ------------------
 1476|      0|#ifdef LONG_TERM_REF
 1477|      0|        pCtx->iErrorCode |= dsNoParamSets;
 1478|      0|        return dsNoParamSets;
 1479|       |#else
 1480|       |        pCtx->iErrorCode |= dsRefLost;
 1481|       |        return ERR_INFO_REFERENCE_PIC_LOST;
 1482|       |#endif
 1483|      0|      }
 1484|  1.60M|    }
 1485|  1.78M|  }
 1486|       |
 1487|  2.59M|  return ERR_NONE;
 1488|  2.59M|}
_ZN7WelsDec22InitialDqLayersContextEPNS_21TagWelsDecoderContextEii:
 1490|   219k|int32_t InitialDqLayersContext (PWelsDecoderContext pCtx, const int32_t kiMaxWidth, const int32_t kiMaxHeight) {
 1491|   219k|  int32_t i = 0;
 1492|   219k|  WELS_VERIFY_RETURN_IF (ERR_INFO_INVALID_PARAM, (NULL == pCtx || kiMaxWidth <= 0 || kiMaxHeight <= 0))
  ------------------
  |  |  239|  1.09M|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 219k]
  |  |  |  Branch (239:7): [True: 0, False: 219k]
  |  |  |  Branch (239:7): [True: 0, False: 219k]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
 1493|   219k|  pCtx->sMb.iMbWidth  = (kiMaxWidth + 15) >> 4;
 1494|   219k|  pCtx->sMb.iMbHeight = (kiMaxHeight + 15) >> 4;
 1495|       |
 1496|   219k|  if (pCtx->bInitialDqLayersMem && kiMaxWidth <= pCtx->iPicWidthReq
  ------------------
  |  Branch (1496:7): [True: 197k, False: 21.7k]
  |  Branch (1496:36): [True: 195k, False: 2.10k]
  ------------------
 1497|   195k|      && kiMaxHeight <= pCtx->iPicHeightReq) // have same dimension memory, skipped
  ------------------
  |  Branch (1497:10): [True: 193k, False: 1.60k]
  ------------------
 1498|   193k|    return ERR_NONE;
 1499|       |
 1500|  25.4k|  CMemoryAlign* pMa = pCtx->pMemAlign;
 1501|       |
 1502|  25.4k|  UninitialDqLayersContext (pCtx);
 1503|       |
 1504|  25.4k|  do {
 1505|  25.4k|    PDqLayer pDq = (PDqLayer)pMa->WelsMallocz (sizeof (SDqLayer), "PDqLayer");
 1506|       |
 1507|  25.4k|    if (pDq == NULL)
  ------------------
  |  Branch (1507:9): [True: 0, False: 25.4k]
  ------------------
 1508|      0|      return ERR_INFO_OUT_OF_MEMORY;
 1509|       |
 1510|  25.4k|    pCtx->pDqLayersList[i] = pDq; //to keep consistence with in UninitialDqLayersContext()
 1511|  25.4k|    memset (pDq, 0, sizeof (SDqLayer));
 1512|       |
 1513|  25.4k|    pCtx->sMb.pMbType[i] = (uint32_t*)pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (uint32_t),
 1514|  25.4k|                           "pCtx->sMb.pMbType[]");
 1515|  25.4k|    pCtx->sMb.pMv[i][LIST_0] = (int16_t (*)[16][2])pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (
 1516|  25.4k|                                 int16_t) * MV_A * MB_BLOCK4x4_NUM, "pCtx->sMb.pMv[][]");
  ------------------
  |  |   57|  25.4k|#define MB_BLOCK4x4_NUM         16
  ------------------
 1517|  25.4k|    pCtx->sMb.pMv[i][LIST_1] = (int16_t (*)[16][2])pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (
 1518|  25.4k|                                 int16_t) * MV_A * MB_BLOCK4x4_NUM, "pCtx->sMb.pMv[][]");
  ------------------
  |  |   57|  25.4k|#define MB_BLOCK4x4_NUM         16
  ------------------
 1519|       |
 1520|  25.4k|    pCtx->sMb.pRefIndex[i][LIST_0] = (int8_t (*)[MB_BLOCK4x4_NUM])pMa->WelsMallocz (pCtx->sMb.iMbWidth *
 1521|  25.4k|                                     pCtx->sMb.iMbHeight *
 1522|  25.4k|                                     sizeof (
 1523|  25.4k|                                       int8_t) * MB_BLOCK4x4_NUM, "pCtx->sMb.pRefIndex[][]");
  ------------------
  |  |   57|  25.4k|#define MB_BLOCK4x4_NUM         16
  ------------------
 1524|  25.4k|    pCtx->sMb.pRefIndex[i][LIST_1] = (int8_t (*)[MB_BLOCK4x4_NUM])pMa->WelsMallocz (pCtx->sMb.iMbWidth *
 1525|  25.4k|                                     pCtx->sMb.iMbHeight *
 1526|  25.4k|                                     sizeof (
 1527|  25.4k|                                       int8_t) * MB_BLOCK4x4_NUM, "pCtx->sMb.pRefIndex[][]");
  ------------------
  |  |   57|  25.4k|#define MB_BLOCK4x4_NUM         16
  ------------------
 1528|  25.4k|    pCtx->sMb.pDirect[i] = (int8_t (*)[MB_BLOCK4x4_NUM])pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight *
 1529|  25.4k|                           sizeof (
 1530|  25.4k|                             int8_t) * MB_BLOCK4x4_NUM, "pCtx->sMb.pDirect[]");
  ------------------
  |  |   57|  25.4k|#define MB_BLOCK4x4_NUM         16
  ------------------
 1531|  25.4k|    pCtx->sMb.pLumaQp[i] = (int8_t*)pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t),
 1532|  25.4k|                           "pCtx->sMb.pLumaQp[]");
 1533|  25.4k|    pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[i] = (bool*)pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight *
 1534|  25.4k|        sizeof (
 1535|  25.4k|          bool),
 1536|  25.4k|        "pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[]");
 1537|  25.4k|    pCtx->sMb.pTransformSize8x8Flag[i] = (bool*)pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (
 1538|  25.4k|                                           bool),
 1539|  25.4k|                                         "pCtx->sMb.pTransformSize8x8Flag[]");
 1540|  25.4k|    pCtx->sMb.pChromaQp[i] = (int8_t (*)[2])pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (
 1541|  25.4k|                               int8_t) * 2,
 1542|  25.4k|                             "pCtx->sMb.pChromaQp[]");
 1543|  25.4k|    pCtx->sMb.pMvd[i][LIST_0] = (int16_t (*)[16][2])pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (
 1544|  25.4k|                                  int16_t) * MV_A * MB_BLOCK4x4_NUM, "pCtx->sMb.pMvd[][]");
  ------------------
  |  |   57|  25.4k|#define MB_BLOCK4x4_NUM         16
  ------------------
 1545|  25.4k|    pCtx->sMb.pMvd[i][LIST_1] = (int16_t (*)[16][2])pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (
 1546|  25.4k|                                  int16_t) * MV_A * MB_BLOCK4x4_NUM, "pCtx->sMb.pMvd[][]");
  ------------------
  |  |   57|  25.4k|#define MB_BLOCK4x4_NUM         16
  ------------------
 1547|  25.4k|    pCtx->sMb.pCbfDc[i] = (uint16_t*)pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (uint16_t),
 1548|  25.4k|                          "pCtx->sMb.pCbfDc[]");
 1549|  25.4k|    pCtx->sMb.pNzc[i] = (int8_t (*)[24])pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (
 1550|  25.4k|                          int8_t) * 24,
 1551|  25.4k|                        "pCtx->sMb.pNzc[]");
 1552|  25.4k|    pCtx->sMb.pNzcRs[i] = (int8_t (*)[24])pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (
 1553|  25.4k|                            int8_t) * 24,
 1554|  25.4k|                          "pCtx->sMb.pNzcRs[]");
 1555|  25.4k|    pCtx->sMb.pScaledTCoeff[i] = (int16_t (*)[MB_COEFF_LIST_SIZE])pMa->WelsMallocz (pCtx->sMb.iMbWidth *
 1556|  25.4k|                                 pCtx->sMb.iMbHeight *
 1557|  25.4k|                                 sizeof (int16_t) * MB_COEFF_LIST_SIZE, "pCtx->sMb.pScaledTCoeff[]");
  ------------------
  |  |   55|  25.4k|#define MB_COEFF_LIST_SIZE      (256+((MB_WIDTH_CHROMA*MB_HEIGHT_CHROMA)<<1))
  |  |  ------------------
  |  |  |  |   51|  25.4k|#define MB_WIDTH_CHROMA         (MB_WIDTH_LUMA>>1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   50|  25.4k|#define MB_WIDTH_LUMA           16
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define MB_COEFF_LIST_SIZE      (256+((MB_WIDTH_CHROMA*MB_HEIGHT_CHROMA)<<1))
  |  |  ------------------
  |  |  |  |   54|  25.4k|#define MB_HEIGHT_CHROMA        (MB_HEIGHT_LUMA>>1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   53|  25.4k|#define MB_HEIGHT_LUMA          16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1558|  25.4k|    pCtx->sMb.pIntraPredMode[i] = (int8_t (*)[8])pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (
 1559|  25.4k|                                    int8_t) * 8,
 1560|  25.4k|                                  "pCtx->sMb.pIntraPredMode[]");
 1561|  25.4k|    pCtx->sMb.pIntra4x4FinalMode[i] = (int8_t (*)[MB_BLOCK4x4_NUM])pMa->WelsMallocz (pCtx->sMb.iMbWidth *
 1562|  25.4k|                                      pCtx->sMb.iMbHeight *
 1563|  25.4k|                                      sizeof (int8_t) * MB_BLOCK4x4_NUM, "pCtx->sMb.pIntra4x4FinalMode[]");
  ------------------
  |  |   57|  25.4k|#define MB_BLOCK4x4_NUM         16
  ------------------
 1564|  25.4k|    pCtx->sMb.pIntraNxNAvailFlag[i] = (uint8_t (*))pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (
 1565|  25.4k|                                        int8_t),
 1566|  25.4k|                                      "pCtx->sMb.pIntraNxNAvailFlag");
 1567|  25.4k|    pCtx->sMb.pChromaPredMode[i] = (int8_t*)pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t),
 1568|  25.4k|                                   "pCtx->sMb.pChromaPredMode[]");
 1569|  25.4k|    pCtx->sMb.pCbp[i] = (int8_t*)pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t),
 1570|  25.4k|                        "pCtx->sMb.pCbp[]");
 1571|  25.4k|    pCtx->sMb.pSubMbType[i] = (uint32_t (*)[MB_PARTITION_SIZE])pMa->WelsMallocz (pCtx->sMb.iMbWidth *
 1572|  25.4k|                              pCtx->sMb.iMbHeight *
 1573|  25.4k|                              sizeof (
 1574|  25.4k|                                uint32_t) * MB_PARTITION_SIZE, "pCtx->sMb.pSubMbType[]");
  ------------------
  |  |   56|  25.4k|#define MB_PARTITION_SIZE       4       // Macroblock partition size in 8x8 sub-blocks
  ------------------
 1575|  25.4k|    pCtx->sMb.pSliceIdc[i] = (int32_t*) pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int32_t),
 1576|  25.4k|                             "pCtx->sMb.pSliceIdc[]"); // using int32_t for slice_idc, 4/21/2010
 1577|  25.4k|    pCtx->sMb.pResidualPredFlag[i] = (int8_t*) pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (
 1578|  25.4k|                                       int8_t),
 1579|  25.4k|                                     "pCtx->sMb.pResidualPredFlag[]");
 1580|  25.4k|    pCtx->sMb.pInterPredictionDoneFlag[i] = (int8_t*) pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight *
 1581|  25.4k|                                            sizeof (
 1582|  25.4k|                                                int8_t), "pCtx->sMb.pInterPredictionDoneFlag[]");
 1583|       |
 1584|  25.4k|    pCtx->sMb.pMbCorrectlyDecodedFlag[i] = (bool*) pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (
 1585|  25.4k|        bool),
 1586|  25.4k|                                           "pCtx->sMb.pMbCorrectlyDecodedFlag[]");
 1587|  25.4k|    pCtx->sMb.pMbRefConcealedFlag[i] = (bool*) pMa->WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (
 1588|  25.4k|                                         bool),
 1589|  25.4k|                                       "pCtx->pMbRefConcealedFlag[]");
 1590|       |
 1591|       |    // check memory block valid due above allocated..
 1592|  25.4k|    WELS_VERIFY_RETURN_IF (ERR_INFO_OUT_OF_MEMORY,
  ------------------
  |  |  239|  1.35M|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  |  Branch (239:7): [True: 0, False: 25.4k]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
 1593|  25.4k|                           ((NULL == pCtx->sMb.pMbType[i]) ||
 1594|  25.4k|                            (NULL == pCtx->sMb.pMv[i][LIST_0]) ||
 1595|  25.4k|                            (NULL == pCtx->sMb.pMv[i][LIST_1]) ||
 1596|  25.4k|                            (NULL == pCtx->sMb.pRefIndex[i][LIST_0]) ||
 1597|  25.4k|                            (NULL == pCtx->sMb.pRefIndex[i][LIST_1]) ||
 1598|  25.4k|                            (NULL == pCtx->sMb.pDirect[i]) ||
 1599|  25.4k|                            (NULL == pCtx->sMb.pLumaQp[i]) ||
 1600|  25.4k|                            (NULL == pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[i]) ||
 1601|  25.4k|                            (NULL == pCtx->sMb.pTransformSize8x8Flag[i]) ||
 1602|  25.4k|                            (NULL == pCtx->sMb.pChromaQp[i]) ||
 1603|  25.4k|                            (NULL == pCtx->sMb.pMvd[i][LIST_0]) ||
 1604|  25.4k|                            (NULL == pCtx->sMb.pMvd[i][LIST_1]) ||
 1605|  25.4k|                            (NULL == pCtx->sMb.pCbfDc[i]) ||
 1606|  25.4k|                            (NULL == pCtx->sMb.pNzc[i]) ||
 1607|  25.4k|                            (NULL == pCtx->sMb.pNzcRs[i]) ||
 1608|  25.4k|                            (NULL == pCtx->sMb.pScaledTCoeff[i]) ||
 1609|  25.4k|                            (NULL == pCtx->sMb.pIntraPredMode[i]) ||
 1610|  25.4k|                            (NULL == pCtx->sMb.pIntra4x4FinalMode[i]) ||
 1611|  25.4k|                            (NULL == pCtx->sMb.pIntraNxNAvailFlag[i]) ||
 1612|  25.4k|                            (NULL == pCtx->sMb.pChromaPredMode[i]) ||
 1613|  25.4k|                            (NULL == pCtx->sMb.pCbp[i]) ||
 1614|  25.4k|                            (NULL == pCtx->sMb.pSubMbType[i]) ||
 1615|  25.4k|                            (NULL == pCtx->sMb.pSliceIdc[i]) ||
 1616|  25.4k|                            (NULL == pCtx->sMb.pResidualPredFlag[i]) ||
 1617|  25.4k|                            (NULL == pCtx->sMb.pInterPredictionDoneFlag[i]) ||
 1618|  25.4k|                            (NULL == pCtx->sMb.pMbRefConcealedFlag[i]) ||
 1619|  25.4k|                            (NULL == pCtx->sMb.pMbCorrectlyDecodedFlag[i])
 1620|  25.4k|                           )
 1621|  25.4k|                          )
 1622|       |
 1623|  25.4k|    memset (pCtx->sMb.pSliceIdc[i], 0xff, (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int32_t)));
 1624|       |
 1625|  25.4k|    ++ i;
 1626|  25.4k|  } while (i < LAYER_NUM_EXCHANGEABLE);
  ------------------
  |  |   57|  25.4k|#define LAYER_NUM_EXCHANGEABLE          1
  ------------------
  |  Branch (1626:12): [True: 0, False: 25.4k]
  ------------------
 1627|       |
 1628|  25.4k|  pCtx->bInitialDqLayersMem     = true;
 1629|  25.4k|  pCtx->iPicWidthReq            = kiMaxWidth;
 1630|  25.4k|  pCtx->iPicHeightReq           = kiMaxHeight;
 1631|       |
 1632|  25.4k|  return ERR_NONE;
 1633|  25.4k|}
_ZN7WelsDec24UninitialDqLayersContextEPNS_21TagWelsDecoderContextE:
 1637|  51.9k|void UninitialDqLayersContext (PWelsDecoderContext pCtx) {
 1638|  51.9k|  int32_t i = 0;
 1639|  51.9k|  CMemoryAlign* pMa = pCtx->pMemAlign;
 1640|       |
 1641|  51.9k|  do {
 1642|  51.9k|    PDqLayer pDq = pCtx->pDqLayersList[i];
 1643|  51.9k|    if (pDq == NULL) {
  ------------------
  |  Branch (1643:9): [True: 26.4k, False: 25.4k]
  ------------------
 1644|  26.4k|      ++ i;
 1645|  26.4k|      continue;
 1646|  26.4k|    }
 1647|       |
 1648|  25.4k|    if (pCtx->sMb.pMbType[i]) {
  ------------------
  |  Branch (1648:9): [True: 25.4k, False: 0]
  ------------------
 1649|  25.4k|      pMa->WelsFree (pCtx->sMb.pMbType[i], "pCtx->sMb.pMbType[]");
 1650|       |
 1651|  25.4k|      pCtx->sMb.pMbType[i] = NULL;
 1652|  25.4k|    }
 1653|       |
 1654|  76.4k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (1654:36): [True: 50.9k, False: 25.4k]
  ------------------
 1655|  50.9k|      if (pCtx->sMb.pMv[i][listIdx]) {
  ------------------
  |  Branch (1655:11): [True: 50.9k, False: 0]
  ------------------
 1656|  50.9k|        pMa->WelsFree (pCtx->sMb.pMv[i][listIdx], "pCtx->sMb.pMv[][]");
 1657|  50.9k|        pCtx->sMb.pMv[i][listIdx] = NULL;
 1658|  50.9k|      }
 1659|       |
 1660|  50.9k|      if (pCtx->sMb.pRefIndex[i][listIdx]) {
  ------------------
  |  Branch (1660:11): [True: 50.9k, False: 0]
  ------------------
 1661|  50.9k|        pMa->WelsFree (pCtx->sMb.pRefIndex[i][listIdx], "pCtx->sMb.pRefIndex[][]");
 1662|  50.9k|        pCtx->sMb.pRefIndex[i][listIdx] = NULL;
 1663|  50.9k|      }
 1664|       |
 1665|  50.9k|      if (pCtx->sMb.pDirect[i]) {
  ------------------
  |  Branch (1665:11): [True: 25.4k, False: 25.4k]
  ------------------
 1666|  25.4k|        pMa->WelsFree (pCtx->sMb.pDirect[i], "pCtx->sMb.pDirect[]");
 1667|  25.4k|        pCtx->sMb.pDirect[i] = NULL;
 1668|  25.4k|      }
 1669|       |
 1670|  50.9k|      if (pCtx->sMb.pMvd[i][listIdx]) {
  ------------------
  |  Branch (1670:11): [True: 50.9k, False: 0]
  ------------------
 1671|  50.9k|        pMa->WelsFree (pCtx->sMb.pMvd[i][listIdx], "pCtx->sMb.pMvd[][]");
 1672|  50.9k|        pCtx->sMb.pMvd[i][listIdx] = NULL;
 1673|  50.9k|      }
 1674|  50.9k|    }
 1675|       |
 1676|  25.4k|    if (pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[i]) {
  ------------------
  |  Branch (1676:9): [True: 25.4k, False: 0]
  ------------------
 1677|  25.4k|      pMa->WelsFree (pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[i], "pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[]");
 1678|       |
 1679|  25.4k|      pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[i] = NULL;
 1680|  25.4k|    }
 1681|       |
 1682|  25.4k|    if (pCtx->sMb.pTransformSize8x8Flag[i]) {
  ------------------
  |  Branch (1682:9): [True: 25.4k, False: 0]
  ------------------
 1683|  25.4k|      pMa->WelsFree (pCtx->sMb.pTransformSize8x8Flag[i], "pCtx->sMb.pTransformSize8x8Flag[]");
 1684|       |
 1685|  25.4k|      pCtx->sMb.pTransformSize8x8Flag[i] = NULL;
 1686|  25.4k|    }
 1687|       |
 1688|  25.4k|    if (pCtx->sMb.pLumaQp[i]) {
  ------------------
  |  Branch (1688:9): [True: 25.4k, False: 0]
  ------------------
 1689|  25.4k|      pMa->WelsFree (pCtx->sMb.pLumaQp[i], "pCtx->sMb.pLumaQp[]");
 1690|       |
 1691|  25.4k|      pCtx->sMb.pLumaQp[i] = NULL;
 1692|  25.4k|    }
 1693|       |
 1694|  25.4k|    if (pCtx->sMb.pChromaQp[i]) {
  ------------------
  |  Branch (1694:9): [True: 25.4k, False: 0]
  ------------------
 1695|  25.4k|      pMa->WelsFree (pCtx->sMb.pChromaQp[i], "pCtx->sMb.pChromaQp[]");
 1696|       |
 1697|  25.4k|      pCtx->sMb.pChromaQp[i] = NULL;
 1698|  25.4k|    }
 1699|       |
 1700|  25.4k|    if (pCtx->sMb.pCbfDc[i]) {
  ------------------
  |  Branch (1700:9): [True: 25.4k, False: 0]
  ------------------
 1701|  25.4k|      pMa->WelsFree (pCtx->sMb.pCbfDc[i], "pCtx->sMb.pCbfDc[]");
 1702|  25.4k|      pCtx->sMb.pCbfDc[i] = NULL;
 1703|  25.4k|    }
 1704|       |
 1705|  25.4k|    if (pCtx->sMb.pNzc[i]) {
  ------------------
  |  Branch (1705:9): [True: 25.4k, False: 0]
  ------------------
 1706|  25.4k|      pMa->WelsFree (pCtx->sMb.pNzc[i], "pCtx->sMb.pNzc[]");
 1707|       |
 1708|  25.4k|      pCtx->sMb.pNzc[i] = NULL;
 1709|  25.4k|    }
 1710|       |
 1711|  25.4k|    if (pCtx->sMb.pNzcRs[i]) {
  ------------------
  |  Branch (1711:9): [True: 25.4k, False: 0]
  ------------------
 1712|  25.4k|      pMa->WelsFree (pCtx->sMb.pNzcRs[i], "pCtx->sMb.pNzcRs[]");
 1713|       |
 1714|  25.4k|      pCtx->sMb.pNzcRs[i] = NULL;
 1715|  25.4k|    }
 1716|       |
 1717|  25.4k|    if (pCtx->sMb.pScaledTCoeff[i]) {
  ------------------
  |  Branch (1717:9): [True: 25.4k, False: 0]
  ------------------
 1718|  25.4k|      pMa->WelsFree (pCtx->sMb.pScaledTCoeff[i], "pCtx->sMb.pScaledTCoeff[]");
 1719|       |
 1720|  25.4k|      pCtx->sMb.pScaledTCoeff[i] = NULL;
 1721|  25.4k|    }
 1722|       |
 1723|  25.4k|    if (pCtx->sMb.pIntraPredMode[i]) {
  ------------------
  |  Branch (1723:9): [True: 25.4k, False: 0]
  ------------------
 1724|  25.4k|      pMa->WelsFree (pCtx->sMb.pIntraPredMode[i], "pCtx->sMb.pIntraPredMode[]");
 1725|       |
 1726|  25.4k|      pCtx->sMb.pIntraPredMode[i] = NULL;
 1727|  25.4k|    }
 1728|       |
 1729|  25.4k|    if (pCtx->sMb.pIntra4x4FinalMode[i]) {
  ------------------
  |  Branch (1729:9): [True: 25.4k, False: 0]
  ------------------
 1730|  25.4k|      pMa->WelsFree (pCtx->sMb.pIntra4x4FinalMode[i], "pCtx->sMb.pIntra4x4FinalMode[]");
 1731|       |
 1732|  25.4k|      pCtx->sMb.pIntra4x4FinalMode[i] = NULL;
 1733|  25.4k|    }
 1734|       |
 1735|  25.4k|    if (pCtx->sMb.pIntraNxNAvailFlag[i]) {
  ------------------
  |  Branch (1735:9): [True: 25.4k, False: 0]
  ------------------
 1736|  25.4k|      pMa->WelsFree (pCtx->sMb.pIntraNxNAvailFlag[i], "pCtx->sMb.pIntraNxNAvailFlag");
 1737|       |
 1738|  25.4k|      pCtx->sMb.pIntraNxNAvailFlag[i] = NULL;
 1739|  25.4k|    }
 1740|       |
 1741|  25.4k|    if (pCtx->sMb.pChromaPredMode[i]) {
  ------------------
  |  Branch (1741:9): [True: 25.4k, False: 0]
  ------------------
 1742|  25.4k|      pMa->WelsFree (pCtx->sMb.pChromaPredMode[i], "pCtx->sMb.pChromaPredMode[]");
 1743|       |
 1744|  25.4k|      pCtx->sMb.pChromaPredMode[i] = NULL;
 1745|  25.4k|    }
 1746|       |
 1747|  25.4k|    if (pCtx->sMb.pCbp[i]) {
  ------------------
  |  Branch (1747:9): [True: 25.4k, False: 0]
  ------------------
 1748|  25.4k|      pMa->WelsFree (pCtx->sMb.pCbp[i], "pCtx->sMb.pCbp[]");
 1749|       |
 1750|  25.4k|      pCtx->sMb.pCbp[i] = NULL;
 1751|  25.4k|    }
 1752|       |
 1753|       |    //      if (pCtx->sMb.pMotionPredFlag[i])
 1754|       |    //{
 1755|       |    //  pMa->WelsFree( pCtx->sMb.pMotionPredFlag[i], "pCtx->sMb.pMotionPredFlag[]" );
 1756|       |
 1757|       |    //  pCtx->sMb.pMotionPredFlag[i] = NULL;
 1758|       |    //}
 1759|       |
 1760|  25.4k|    if (pCtx->sMb.pSubMbType[i]) {
  ------------------
  |  Branch (1760:9): [True: 25.4k, False: 0]
  ------------------
 1761|  25.4k|      pMa->WelsFree (pCtx->sMb.pSubMbType[i], "pCtx->sMb.pSubMbType[]");
 1762|       |
 1763|  25.4k|      pCtx->sMb.pSubMbType[i] = NULL;
 1764|  25.4k|    }
 1765|       |
 1766|  25.4k|    if (pCtx->sMb.pSliceIdc[i]) {
  ------------------
  |  Branch (1766:9): [True: 25.4k, False: 0]
  ------------------
 1767|  25.4k|      pMa->WelsFree (pCtx->sMb.pSliceIdc[i], "pCtx->sMb.pSliceIdc[]");
 1768|       |
 1769|  25.4k|      pCtx->sMb.pSliceIdc[i] = NULL;
 1770|  25.4k|    }
 1771|       |
 1772|  25.4k|    if (pCtx->sMb.pResidualPredFlag[i]) {
  ------------------
  |  Branch (1772:9): [True: 25.4k, False: 0]
  ------------------
 1773|  25.4k|      pMa->WelsFree (pCtx->sMb.pResidualPredFlag[i], "pCtx->sMb.pResidualPredFlag[]");
 1774|       |
 1775|  25.4k|      pCtx->sMb.pResidualPredFlag[i] = NULL;
 1776|  25.4k|    }
 1777|       |
 1778|  25.4k|    if (pCtx->sMb.pInterPredictionDoneFlag[i]) {
  ------------------
  |  Branch (1778:9): [True: 25.4k, False: 0]
  ------------------
 1779|  25.4k|      pMa->WelsFree (pCtx->sMb.pInterPredictionDoneFlag[i], "pCtx->sMb.pInterPredictionDoneFlag[]");
 1780|       |
 1781|  25.4k|      pCtx->sMb.pInterPredictionDoneFlag[i] = NULL;
 1782|  25.4k|    }
 1783|       |
 1784|  25.4k|    if (pCtx->sMb.pMbCorrectlyDecodedFlag[i]) {
  ------------------
  |  Branch (1784:9): [True: 25.4k, False: 0]
  ------------------
 1785|  25.4k|      pMa->WelsFree (pCtx->sMb.pMbCorrectlyDecodedFlag[i], "pCtx->sMb.pMbCorrectlyDecodedFlag[]");
 1786|  25.4k|      pCtx->sMb.pMbCorrectlyDecodedFlag[i] = NULL;
 1787|  25.4k|    }
 1788|       |
 1789|  25.4k|    if (pCtx->sMb.pMbRefConcealedFlag[i]) {
  ------------------
  |  Branch (1789:9): [True: 25.4k, False: 0]
  ------------------
 1790|  25.4k|      pMa->WelsFree (pCtx->sMb.pMbRefConcealedFlag[i], "pCtx->sMb.pMbRefConcealedFlag[]");
 1791|  25.4k|      pCtx->sMb.pMbRefConcealedFlag[i] = NULL;
 1792|  25.4k|    }
 1793|  25.4k|    pMa->WelsFree (pDq, "pDq");
 1794|       |
 1795|  25.4k|    pDq = NULL;
 1796|  25.4k|    pCtx->pDqLayersList[i] = NULL;
 1797|       |
 1798|  25.4k|    ++ i;
 1799|  51.9k|  } while (i < LAYER_NUM_EXCHANGEABLE);
  ------------------
  |  |   57|  51.9k|#define LAYER_NUM_EXCHANGEABLE          1
  ------------------
  |  Branch (1799:12): [True: 0, False: 51.9k]
  ------------------
 1800|       |
 1801|  51.9k|  pCtx->iPicWidthReq            = 0;
 1802|  51.9k|  pCtx->iPicHeightReq           = 0;
 1803|  51.9k|  pCtx->bInitialDqLayersMem     = false;
 1804|  51.9k|}
_ZN7WelsDec22ResetCurrentAccessUnitEPNS_21TagWelsDecoderContextE:
 1806|  2.59M|void ResetCurrentAccessUnit (PWelsDecoderContext pCtx) {
 1807|  2.59M|  PAccessUnit pCurAu = pCtx->pAccessUnitList;
 1808|  2.59M|  pCurAu->uiStartPos            = 0;
 1809|  2.59M|  pCurAu->uiEndPos              = 0;
 1810|  2.59M|  pCurAu->bCompletedAuFlag      = false;
 1811|  2.59M|  if (pCurAu->uiActualUnitsNum > 0) {
  ------------------
  |  Branch (1811:7): [True: 2.59M, False: 0]
  ------------------
 1812|  2.59M|    uint32_t iIdx = 0;
 1813|  2.59M|    const uint32_t kuiActualNum = pCurAu->uiActualUnitsNum;
 1814|       |    // a more simpler method to do nal units list management prefered here
 1815|  2.59M|    const uint32_t kuiAvailNum  = pCurAu->uiAvailUnitsNum;
 1816|  2.59M|    const uint32_t kuiLeftNum   = kuiAvailNum - kuiActualNum;
 1817|       |
 1818|       |    // Swapping active nal unit nodes of succeeding AU with leading of list
 1819|  2.59M|    while (iIdx < kuiLeftNum) {
  ------------------
  |  Branch (1819:12): [True: 0, False: 2.59M]
  ------------------
 1820|      0|      PNalUnit t = pCurAu->pNalUnitsList[kuiActualNum + iIdx];
 1821|      0|      pCurAu->pNalUnitsList[kuiActualNum + iIdx] = pCurAu->pNalUnitsList[iIdx];
 1822|      0|      pCurAu->pNalUnitsList[iIdx] = t;
 1823|      0|      ++ iIdx;
 1824|      0|    }
 1825|  2.59M|    pCurAu->uiActualUnitsNum = pCurAu->uiAvailUnitsNum = kuiLeftNum;
 1826|  2.59M|  }
 1827|  2.59M|}
_ZN7WelsDec27ForceResetCurrentAccessUnitEPNS_14TagAccessUnitsE:
 1834|  1.39k|void ForceResetCurrentAccessUnit (PAccessUnit pAu) {
 1835|  1.39k|  uint32_t uiSucAuIdx = pAu->uiEndPos + 1;
 1836|  1.39k|  uint32_t uiCurAuIdx = 0;
 1837|       |
 1838|       |  // swap the succeeding AU's nal units to the front
 1839|  1.39k|  while (uiSucAuIdx < pAu->uiAvailUnitsNum) {
  ------------------
  |  Branch (1839:10): [True: 0, False: 1.39k]
  ------------------
 1840|      0|    PNalUnit t = pAu->pNalUnitsList[uiSucAuIdx];
 1841|      0|    pAu->pNalUnitsList[uiSucAuIdx] = pAu->pNalUnitsList[uiCurAuIdx];
 1842|      0|    pAu->pNalUnitsList[uiCurAuIdx] = t;
 1843|      0|    ++ uiSucAuIdx;
 1844|      0|    ++ uiCurAuIdx;
 1845|      0|  }
 1846|       |
 1847|       |  // Update avail/actual units num accordingly for next AU parsing
 1848|  1.39k|  if (pAu->uiAvailUnitsNum > pAu->uiEndPos)
  ------------------
  |  Branch (1848:7): [True: 1.39k, False: 0]
  ------------------
 1849|  1.39k|    pAu->uiAvailUnitsNum -= (pAu->uiEndPos + 1);
 1850|      0|  else
 1851|      0|    pAu->uiAvailUnitsNum = 0;
 1852|  1.39k|  pAu->uiActualUnitsNum = 0;
 1853|  1.39k|  pAu->uiStartPos       = 0;
 1854|  1.39k|  pAu->uiEndPos         = 0;
 1855|  1.39k|  pAu->bCompletedAuFlag = false;
 1856|  1.39k|}
_ZN7WelsDec20ForceClearCurrentNalEPNS_14TagAccessUnitsE:
 1859|  2.30M|void ForceClearCurrentNal (PAccessUnit pAu) {
 1860|  2.30M|  if (pAu->uiAvailUnitsNum > 0)
  ------------------
  |  Branch (1860:7): [True: 2.30M, False: 0]
  ------------------
 1861|  2.30M|    -- pAu->uiAvailUnitsNum;
 1862|  2.30M|}
_ZN7WelsDec32CheckAvailNalUnitsListContinuityEPNS_21TagWelsDecoderContextEii:
 1877|  2.17M|void CheckAvailNalUnitsListContinuity (PWelsDecoderContext pCtx, int32_t iStartIdx, int32_t iEndIdx) {
 1878|  2.17M|  PAccessUnit pCurAu = pCtx->pAccessUnitList;
 1879|       |
 1880|  2.17M|  uint8_t uiLastNuDependencyId, uiLastNuLayerDqId;
 1881|  2.17M|  uint8_t uiCurNuDependencyId, uiCurNuQualityId, uiCurNuLayerDqId, uiCurNuRefLayerDqId;
 1882|       |
 1883|  2.17M|  int32_t iCurNalUnitIdx = 0;
 1884|       |
 1885|       |  //check the continuity of pNalUnitsList forwards (from pIdxNoInterLayerPred to end_postion)
 1886|  2.17M|  uiLastNuDependencyId = pCurAu->pNalUnitsList[iStartIdx]->sNalHeaderExt.uiDependencyId;//starting nal unit
 1887|  2.17M|  uiLastNuLayerDqId   = pCurAu->pNalUnitsList[iStartIdx]->sNalHeaderExt.uiLayerDqId;//starting nal unit
 1888|  2.17M|  iCurNalUnitIdx = iStartIdx + 1;//current nal unit
 1889|  2.17M|  while (iCurNalUnitIdx <= iEndIdx) {
  ------------------
  |  Branch (1889:10): [True: 0, False: 2.17M]
  ------------------
 1890|      0|    uiCurNuDependencyId   = pCurAu->pNalUnitsList[iCurNalUnitIdx]->sNalHeaderExt.uiDependencyId;
 1891|      0|    uiCurNuQualityId      = pCurAu->pNalUnitsList[iCurNalUnitIdx]->sNalHeaderExt.uiQualityId;
 1892|      0|    uiCurNuLayerDqId     = pCurAu->pNalUnitsList[iCurNalUnitIdx]->sNalHeaderExt.uiLayerDqId;
 1893|      0|    uiCurNuRefLayerDqId = pCurAu->pNalUnitsList[iCurNalUnitIdx]->sNalData.sVclNal.sSliceHeaderExt.uiRefLayerDqId;
 1894|       |
 1895|      0|    if (uiCurNuDependencyId == uiLastNuDependencyId) {
  ------------------
  |  Branch (1895:9): [True: 0, False: 0]
  ------------------
 1896|      0|      uiLastNuLayerDqId = uiCurNuLayerDqId;
 1897|      0|      ++ iCurNalUnitIdx;
 1898|      0|    } else { //uiCurNuDependencyId != uiLastNuDependencyId, new dependency arrive
 1899|      0|      if (uiCurNuQualityId == 0) {
  ------------------
  |  Branch (1899:11): [True: 0, False: 0]
  ------------------
 1900|      0|        uiLastNuDependencyId = uiCurNuDependencyId;
 1901|      0|        if (uiCurNuRefLayerDqId == uiLastNuLayerDqId) {
  ------------------
  |  Branch (1901:13): [True: 0, False: 0]
  ------------------
 1902|      0|          uiLastNuLayerDqId = uiCurNuLayerDqId;
 1903|      0|          ++ iCurNalUnitIdx;
 1904|      0|        } else { //cur_nu_layer_id != next_nu_ref_layer_dq_id, the chain is broken at this point
 1905|      0|          break;
 1906|      0|        }
 1907|      0|      } else { //new dependency arrive, but no base quality layer, so we must stop in this point
 1908|      0|        break;
 1909|      0|      }
 1910|      0|    }
 1911|      0|  }
 1912|       |
 1913|  2.17M|  -- iCurNalUnitIdx;
 1914|  2.17M|  pCurAu->uiEndPos = iCurNalUnitIdx;
 1915|  2.17M|  pCtx->uiTargetDqId = pCurAu->pNalUnitsList[iCurNalUnitIdx]->sNalHeaderExt.uiLayerDqId;
 1916|  2.17M|}
_ZN7WelsDec25RefineIdxNoInterLayerPredEPNS_14TagAccessUnitsEPi:
 1920|  2.17M|void RefineIdxNoInterLayerPred (PAccessUnit pCurAu, int32_t* pIdxNoInterLayerPred) {
 1921|  2.17M|  int32_t iLastNalDependId  = pCurAu->pNalUnitsList[*pIdxNoInterLayerPred]->sNalHeaderExt.uiDependencyId;
 1922|  2.17M|  int32_t iLastNalQualityId = pCurAu->pNalUnitsList[*pIdxNoInterLayerPred]->sNalHeaderExt.uiQualityId;
 1923|  2.17M|  uint8_t uiLastNalTId       = pCurAu->pNalUnitsList[*pIdxNoInterLayerPred]->sNalHeaderExt.uiTemporalId;
 1924|  2.17M|  int32_t iLastNalFrameNum  =
 1925|  2.17M|    pCurAu->pNalUnitsList[*pIdxNoInterLayerPred]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.iFrameNum;
 1926|  2.17M|  int32_t iLastNalPoc        =
 1927|  2.17M|    pCurAu->pNalUnitsList[*pIdxNoInterLayerPred]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.iPicOrderCntLsb;
 1928|  2.17M|  int32_t iLastNalFirstMb   =
 1929|  2.17M|    pCurAu->pNalUnitsList[*pIdxNoInterLayerPred]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.iFirstMbInSlice;
 1930|  2.17M|  int32_t iCurNalDependId, iCurNalQualityId, iCurNalTId, iCurNalFrameNum, iCurNalPoc, iCurNalFirstMb, iCurIdx,
 1931|  2.17M|          iFinalIdxNoInterLayerPred;
 1932|       |
 1933|  2.17M|  bool  bMultiSliceFind = false;
 1934|       |
 1935|  2.17M|  iFinalIdxNoInterLayerPred = 0;
 1936|  2.17M|  iCurIdx = *pIdxNoInterLayerPred - 1;
 1937|  2.17M|  while (iCurIdx >= 0) {
  ------------------
  |  Branch (1937:10): [True: 0, False: 2.17M]
  ------------------
 1938|      0|    if (pCurAu->pNalUnitsList[iCurIdx]->sNalHeaderExt.iNoInterLayerPredFlag) {
  ------------------
  |  Branch (1938:9): [True: 0, False: 0]
  ------------------
 1939|      0|      iCurNalDependId  = pCurAu->pNalUnitsList[iCurIdx]->sNalHeaderExt.uiDependencyId;
 1940|      0|      iCurNalQualityId = pCurAu->pNalUnitsList[iCurIdx]->sNalHeaderExt.uiQualityId;
 1941|      0|      iCurNalTId       = pCurAu->pNalUnitsList[iCurIdx]->sNalHeaderExt.uiTemporalId;
 1942|      0|      iCurNalFrameNum  = pCurAu->pNalUnitsList[iCurIdx]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.iFrameNum;
 1943|      0|      iCurNalPoc        = pCurAu->pNalUnitsList[iCurIdx]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.iPicOrderCntLsb;
 1944|      0|      iCurNalFirstMb   = pCurAu->pNalUnitsList[iCurIdx]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.iFirstMbInSlice;
 1945|       |
 1946|      0|      if (iCurNalDependId == iLastNalDependId  &&
  ------------------
  |  Branch (1946:11): [True: 0, False: 0]
  ------------------
 1947|      0|          iCurNalQualityId == iLastNalQualityId &&
  ------------------
  |  Branch (1947:11): [True: 0, False: 0]
  ------------------
 1948|      0|          iCurNalTId       == uiLastNalTId       &&
  ------------------
  |  Branch (1948:11): [True: 0, False: 0]
  ------------------
 1949|      0|          iCurNalFrameNum  == iLastNalFrameNum  &&
  ------------------
  |  Branch (1949:11): [True: 0, False: 0]
  ------------------
 1950|      0|          iCurNalPoc        == iLastNalPoc        &&
  ------------------
  |  Branch (1950:11): [True: 0, False: 0]
  ------------------
 1951|      0|          iCurNalFirstMb   != iLastNalFirstMb) {
  ------------------
  |  Branch (1951:11): [True: 0, False: 0]
  ------------------
 1952|      0|        bMultiSliceFind = true;
 1953|      0|        iFinalIdxNoInterLayerPred = iCurIdx;
 1954|      0|        --iCurIdx;
 1955|      0|        continue;
 1956|      0|      } else {
 1957|      0|        break;
 1958|      0|      }
 1959|      0|    }
 1960|      0|    --iCurIdx;
 1961|      0|  }
 1962|       |
 1963|  2.17M|  if (bMultiSliceFind && *pIdxNoInterLayerPred != iFinalIdxNoInterLayerPred) {
  ------------------
  |  Branch (1963:7): [True: 0, False: 2.17M]
  |  Branch (1963:26): [True: 0, False: 0]
  ------------------
 1964|      0|    *pIdxNoInterLayerPred = iFinalIdxNoInterLayerPred;
 1965|      0|  }
 1966|  2.17M|}
_ZN7WelsDec26CheckPocOfCurValidNalUnitsEPNS_14TagAccessUnitsEi:
 1968|  2.17M|bool CheckPocOfCurValidNalUnits (PAccessUnit pCurAu, int32_t pIdxNoInterLayerPred) {
 1969|  2.17M|  int32_t iEndIdx    = pCurAu->uiEndPos;
 1970|  2.17M|  int32_t iCurAuPoc =
 1971|  2.17M|    pCurAu->pNalUnitsList[pIdxNoInterLayerPred]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.iPicOrderCntLsb;
 1972|  2.17M|  int32_t iTmpPoc, i;
 1973|  2.17M|  for (i = pIdxNoInterLayerPred + 1; i < iEndIdx; i++) {
  ------------------
  |  Branch (1973:38): [True: 0, False: 2.17M]
  ------------------
 1974|      0|    iTmpPoc = pCurAu->pNalUnitsList[i]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.iPicOrderCntLsb;
 1975|      0|    if (iTmpPoc != iCurAuPoc) {
  ------------------
  |  Branch (1975:9): [True: 0, False: 0]
  ------------------
 1976|      0|      return false;
 1977|      0|    }
 1978|      0|  }
 1979|       |
 1980|  2.17M|  return true;
 1981|  2.17M|}
_ZN7WelsDec26CheckIntegrityNalUnitsListEPNS_21TagWelsDecoderContextE:
 1983|  2.17M|bool CheckIntegrityNalUnitsList (PWelsDecoderContext pCtx) {
 1984|  2.17M|  PAccessUnit pCurAu = pCtx->pAccessUnitList;
 1985|  2.17M|  const int32_t kiEndPos = pCurAu->uiEndPos;
 1986|  2.17M|  int32_t iIdxNoInterLayerPred = 0;
 1987|       |
 1988|  2.17M|  if (!pCurAu->bCompletedAuFlag)
  ------------------
  |  Branch (1988:7): [True: 0, False: 2.17M]
  ------------------
 1989|      0|    return false;
 1990|       |
 1991|  2.17M|  if (pCtx->bNewSeqBegin) {
  ------------------
  |  Branch (1991:7): [True: 27.3k, False: 2.14M]
  ------------------
 1992|  27.3k|    pCurAu->uiStartPos = 0;
 1993|       |    //step1: search the pNalUnit whose iNoInterLayerPredFlag equal to 1 backwards (from uiEndPos to 0)
 1994|  27.3k|    iIdxNoInterLayerPred = kiEndPos;
 1995|  28.1k|    while (iIdxNoInterLayerPred >= 0) {
  ------------------
  |  Branch (1995:12): [True: 27.3k, False: 780]
  ------------------
 1996|  27.3k|      if (pCurAu->pNalUnitsList[iIdxNoInterLayerPred]->sNalHeaderExt.iNoInterLayerPredFlag) {
  ------------------
  |  Branch (1996:11): [True: 26.5k, False: 780]
  ------------------
 1997|  26.5k|        break;
 1998|  26.5k|      }
 1999|    780|      --iIdxNoInterLayerPred;
 2000|    780|    }
 2001|  27.3k|    if (iIdxNoInterLayerPred < 0) {
  ------------------
  |  Branch (2001:9): [True: 780, False: 26.5k]
  ------------------
 2002|       |      //can not find the Nal Unit whose no_inter_pred_falg equal to 1, MUST STOP decode
 2003|    780|      return false;
 2004|    780|    }
 2005|       |
 2006|       |    //step2: support multi-slice, to include all base layer slice
 2007|  26.5k|    RefineIdxNoInterLayerPred (pCurAu, &iIdxNoInterLayerPred);
 2008|  26.5k|    pCurAu->uiStartPos = iIdxNoInterLayerPred;
 2009|  26.5k|    CheckAvailNalUnitsListContinuity (pCtx, iIdxNoInterLayerPred, kiEndPos);
 2010|       |
 2011|  26.5k|    if (!CheckPocOfCurValidNalUnits (pCurAu, iIdxNoInterLayerPred)) {
  ------------------
  |  Branch (2011:9): [True: 0, False: 26.5k]
  ------------------
 2012|      0|      return false;
 2013|      0|    }
 2014|       |
 2015|  26.5k|    pCtx->iCurSeqIntervalTargetDependId = pCurAu->pNalUnitsList[pCurAu->uiEndPos]->sNalHeaderExt.uiDependencyId;
 2016|  26.5k|    pCtx->iCurSeqIntervalMaxPicWidth  =
 2017|  26.5k|      pCurAu->pNalUnitsList[pCurAu->uiEndPos]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.iMbWidth << 4;
 2018|  26.5k|    pCtx->iCurSeqIntervalMaxPicHeight =
 2019|  26.5k|      pCurAu->pNalUnitsList[pCurAu->uiEndPos]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.iMbHeight << 4;
 2020|  2.14M|  } else { //P_SLICE
 2021|       |    //step 1: search uiDependencyId equal to pCtx->cur_seq_interval_target_dependency_id
 2022|  2.14M|    bool bGetDependId = false;
 2023|  2.14M|    int32_t iIdxDependId = 0;
 2024|       |
 2025|  2.14M|    iIdxDependId = kiEndPos;
 2026|  2.14M|    while (iIdxDependId >= 0) {
  ------------------
  |  Branch (2026:12): [True: 2.14M, False: 435]
  ------------------
 2027|  2.14M|      if (pCtx->iCurSeqIntervalTargetDependId == pCurAu->pNalUnitsList[iIdxDependId]->sNalHeaderExt.uiDependencyId) {
  ------------------
  |  Branch (2027:11): [True: 2.14M, False: 435]
  ------------------
 2028|  2.14M|        bGetDependId = true;
 2029|  2.14M|        break;
 2030|  2.14M|      } else {
 2031|    435|        --iIdxDependId;
 2032|    435|      }
 2033|  2.14M|    }
 2034|       |
 2035|       |    //step 2: switch according to whether or not find the index of pNalUnit whose uiDependencyId equal to iCurSeqIntervalTargetDependId
 2036|  2.14M|    if (bGetDependId) { //get the index of pNalUnit whose uiDependencyId equal to iCurSeqIntervalTargetDependId
  ------------------
  |  Branch (2036:9): [True: 2.14M, False: 435]
  ------------------
 2037|  2.14M|      bool bGetNoInterPredFront = false;
 2038|       |      //step 2a: search iNoInterLayerPredFlag [0....iIdxDependId]
 2039|  2.14M|      iIdxNoInterLayerPred = iIdxDependId;
 2040|  2.14M|      while (iIdxNoInterLayerPred >= 0) {
  ------------------
  |  Branch (2040:14): [True: 2.14M, False: 392]
  ------------------
 2041|  2.14M|        if (pCurAu->pNalUnitsList[iIdxNoInterLayerPred]->sNalHeaderExt.iNoInterLayerPredFlag) {
  ------------------
  |  Branch (2041:13): [True: 2.14M, False: 392]
  ------------------
 2042|  2.14M|          bGetNoInterPredFront = true;
 2043|  2.14M|          break;
 2044|  2.14M|        }
 2045|    392|        --iIdxNoInterLayerPred;
 2046|    392|      }
 2047|       |      //step 2b: switch, whether or not find the NAL unit whose no_inter_pred_flag equal to 1 among [0....iIdxDependId]
 2048|  2.14M|      if (bGetNoInterPredFront) { //YES
  ------------------
  |  Branch (2048:11): [True: 2.14M, False: 392]
  ------------------
 2049|  2.14M|        RefineIdxNoInterLayerPred (pCurAu, &iIdxNoInterLayerPred);
 2050|  2.14M|        pCurAu->uiStartPos = iIdxNoInterLayerPred;
 2051|  2.14M|        CheckAvailNalUnitsListContinuity (pCtx, iIdxNoInterLayerPred, iIdxDependId);
 2052|       |
 2053|  2.14M|        if (!CheckPocOfCurValidNalUnits (pCurAu, iIdxNoInterLayerPred)) {
  ------------------
  |  Branch (2053:13): [True: 0, False: 2.14M]
  ------------------
 2054|      0|          return false;
 2055|      0|        }
 2056|  2.14M|      } else { //NO, should find the NAL unit whose no_inter_pred_flag equal to 1 among [iIdxDependId....uiEndPos]
 2057|    392|        iIdxNoInterLayerPred = iIdxDependId;
 2058|    784|        while (iIdxNoInterLayerPred <= kiEndPos) {
  ------------------
  |  Branch (2058:16): [True: 392, False: 392]
  ------------------
 2059|    392|          if (pCurAu->pNalUnitsList[iIdxNoInterLayerPred]->sNalHeaderExt.iNoInterLayerPredFlag) {
  ------------------
  |  Branch (2059:15): [True: 0, False: 392]
  ------------------
 2060|      0|            break;
 2061|      0|          }
 2062|    392|          ++iIdxNoInterLayerPred;
 2063|    392|        }
 2064|       |
 2065|    392|        if (iIdxNoInterLayerPred > kiEndPos) {
  ------------------
  |  Branch (2065:13): [True: 392, False: 0]
  ------------------
 2066|    392|          return false; //cann't find the index of pNalUnit whose no_inter_pred_flag = 1
 2067|    392|        }
 2068|       |
 2069|      0|        RefineIdxNoInterLayerPred (pCurAu, &iIdxNoInterLayerPred);
 2070|      0|        pCurAu->uiStartPos = iIdxNoInterLayerPred;
 2071|      0|        CheckAvailNalUnitsListContinuity (pCtx, iIdxNoInterLayerPred, kiEndPos);
 2072|       |
 2073|      0|        if (!CheckPocOfCurValidNalUnits (pCurAu, iIdxNoInterLayerPred)) {
  ------------------
  |  Branch (2073:13): [True: 0, False: 0]
  ------------------
 2074|      0|          return false;
 2075|      0|        }
 2076|      0|      }
 2077|  2.14M|    } else { //without the index of pNalUnit, should process this AU as common case
 2078|    435|      iIdxNoInterLayerPred = kiEndPos;
 2079|    657|      while (iIdxNoInterLayerPred >= 0) {
  ------------------
  |  Branch (2079:14): [True: 435, False: 222]
  ------------------
 2080|    435|        if (pCurAu->pNalUnitsList[iIdxNoInterLayerPred]->sNalHeaderExt.iNoInterLayerPredFlag) {
  ------------------
  |  Branch (2080:13): [True: 213, False: 222]
  ------------------
 2081|    213|          break;
 2082|    213|        }
 2083|    222|        --iIdxNoInterLayerPred;
 2084|    222|      }
 2085|    435|      if (iIdxNoInterLayerPred < 0) {
  ------------------
  |  Branch (2085:11): [True: 222, False: 213]
  ------------------
 2086|    222|        return false; //cann't find the index of pNalUnit whose iNoInterLayerPredFlag = 1
 2087|    222|      }
 2088|       |
 2089|    213|      RefineIdxNoInterLayerPred (pCurAu, &iIdxNoInterLayerPred);
 2090|    213|      pCurAu->uiStartPos = iIdxNoInterLayerPred;
 2091|    213|      CheckAvailNalUnitsListContinuity (pCtx, iIdxNoInterLayerPred, kiEndPos);
 2092|       |
 2093|    213|      if (!CheckPocOfCurValidNalUnits (pCurAu, iIdxNoInterLayerPred)) {
  ------------------
  |  Branch (2093:11): [True: 0, False: 213]
  ------------------
 2094|      0|        return false;
 2095|      0|      }
 2096|    213|    }
 2097|  2.14M|  }
 2098|       |
 2099|  2.17M|  return true;
 2100|  2.17M|}
_ZN7WelsDec21CheckOnlyOneLayerInAuEPNS_21TagWelsDecoderContextE:
 2102|  2.17M|void CheckOnlyOneLayerInAu (PWelsDecoderContext pCtx) {
 2103|  2.17M|  PAccessUnit pCurAu = pCtx->pAccessUnitList;
 2104|       |
 2105|  2.17M|  int32_t iEndIdx = pCurAu->uiEndPos;
 2106|  2.17M|  int32_t iCurIdx = pCurAu->uiStartPos;
 2107|  2.17M|  uint8_t uiDId = pCurAu->pNalUnitsList[iCurIdx]->sNalHeaderExt.uiDependencyId;
 2108|  2.17M|  uint8_t uiQId = pCurAu->pNalUnitsList[iCurIdx]->sNalHeaderExt.uiQualityId;
 2109|  2.17M|  uint8_t uiTId = pCurAu->pNalUnitsList[iCurIdx]->sNalHeaderExt.uiTemporalId;
 2110|       |
 2111|  2.17M|  uint8_t uiCurDId, uiCurQId, uiCurTId;
 2112|       |
 2113|  2.17M|  pCtx->bOnlyOneLayerInCurAuFlag = true;
 2114|       |
 2115|  2.17M|  if (iEndIdx == iCurIdx) { //only one NAL in pNalUnitsList
  ------------------
  |  Branch (2115:7): [True: 2.17M, False: 0]
  ------------------
 2116|  2.17M|    return;
 2117|  2.17M|  }
 2118|       |
 2119|      0|  ++iCurIdx;
 2120|      0|  while (iCurIdx <= iEndIdx) {
  ------------------
  |  Branch (2120:10): [True: 0, False: 0]
  ------------------
 2121|      0|    uiCurDId = pCurAu->pNalUnitsList[iCurIdx]->sNalHeaderExt.uiDependencyId;
 2122|      0|    uiCurQId = pCurAu->pNalUnitsList[iCurIdx]->sNalHeaderExt.uiQualityId;
 2123|      0|    uiCurTId = pCurAu->pNalUnitsList[iCurIdx]->sNalHeaderExt.uiTemporalId;
 2124|       |
 2125|      0|    if (uiDId != uiCurDId || uiQId != uiCurQId || uiTId != uiCurTId) {
  ------------------
  |  Branch (2125:9): [True: 0, False: 0]
  |  Branch (2125:30): [True: 0, False: 0]
  |  Branch (2125:51): [True: 0, False: 0]
  ------------------
 2126|      0|      pCtx->bOnlyOneLayerInCurAuFlag = false;
 2127|      0|      return;
 2128|      0|    }
 2129|       |
 2130|      0|    ++iCurIdx;
 2131|      0|  }
 2132|      0|}
_ZN7WelsDec25WelsDecodeAccessUnitStartEPNS_21TagWelsDecoderContextE:
 2134|  2.59M|int32_t WelsDecodeAccessUnitStart (PWelsDecoderContext pCtx) {
 2135|       |  // Roll back NAL units not being belong to current access unit list for proceeded access unit
 2136|  2.59M|  int32_t iRet = UpdateAccessUnit (pCtx);
 2137|  2.59M|  if (iRet != ERR_NONE)
  ------------------
  |  Branch (2137:7): [True: 0, False: 2.59M]
  ------------------
 2138|      0|    return iRet;
 2139|       |
 2140|  2.59M|  pCtx->pAccessUnitList->uiStartPos = 0;
 2141|  2.59M|  if (!pCtx->sSpsPpsCtx.bAvcBasedFlag && !CheckIntegrityNalUnitsList (pCtx)) {
  ------------------
  |  Branch (2141:7): [True: 2.17M, False: 422k]
  |  Branch (2141:42): [True: 1.39k, False: 2.17M]
  ------------------
 2142|  1.39k|    pCtx->iErrorCode |= dsBitstreamError;
 2143|  1.39k|    return dsBitstreamError;
 2144|  1.39k|  }
 2145|       |
 2146|       |  //check current AU has only one layer or not
 2147|       |  //If YES, can use deblocking based on AVC
 2148|  2.59M|  if (!pCtx->sSpsPpsCtx.bAvcBasedFlag) {
  ------------------
  |  Branch (2148:7): [True: 2.17M, False: 422k]
  ------------------
 2149|  2.17M|    CheckOnlyOneLayerInAu (pCtx);
 2150|  2.17M|  }
 2151|       |
 2152|  2.59M|  return ERR_NONE;
 2153|  2.59M|}
_ZN7WelsDec23WelsDecodeAccessUnitEndEPNS_21TagWelsDecoderContextE:
 2155|  2.59M|void WelsDecodeAccessUnitEnd (PWelsDecoderContext pCtx) {
 2156|       |  //save previous header info
 2157|  2.59M|  PAccessUnit pCurAu = pCtx->pAccessUnitList;
 2158|  2.59M|  PNalUnit pCurNal = pCurAu->pNalUnitsList[pCurAu->uiEndPos];
 2159|  2.59M|  memcpy (&pCtx->pLastDecPicInfo->sLastNalHdrExt, &pCurNal->sNalHeaderExt, sizeof (SNalUnitHeaderExt));
 2160|  2.59M|  memcpy (&pCtx->pLastDecPicInfo->sLastSliceHeader,
 2161|  2.59M|          &pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader, sizeof (SSliceHeader));
 2162|       |  // uninitialize context of current access unit and rbsp buffer clean
 2163|  2.59M|  ResetCurrentAccessUnit (pCtx);
 2164|  2.59M|}
_ZN7WelsDec18DecodeFinishUpdateEPNS_21TagWelsDecoderContextE:
 2240|  8.04M|void DecodeFinishUpdate (PWelsDecoderContext pCtx) {
 2241|  8.04M|  pCtx->bNewSeqBegin = false;
 2242|  8.04M|  WriteBackActiveParameters (pCtx);
 2243|  8.04M|  pCtx->bNewSeqBegin = pCtx->bNewSeqBegin || pCtx->bNextNewSeqBegin;
  ------------------
  |  Branch (2243:24): [True: 8.31k, False: 8.03M]
  |  Branch (2243:46): [True: 0, False: 8.03M]
  ------------------
 2244|  8.04M|  pCtx->bNextNewSeqBegin = false; // reset it
 2245|  8.04M|  if (pCtx->bNewSeqBegin)
  ------------------
  |  Branch (2245:7): [True: 8.31k, False: 8.03M]
  ------------------
 2246|  8.31k|    ResetActiveSPSForEachLayer (pCtx);
 2247|  8.04M|}
_ZN7WelsDec29WelsDecodeInitAccessUnitStartEPNS_21TagWelsDecoderContextEP13TagBufferInfo:
 2258|  2.59M|int32_t WelsDecodeInitAccessUnitStart (PWelsDecoderContext pCtx, SBufferInfo* pDstInfo) {
 2259|  2.59M|  int32_t iErr = ERR_NONE;
 2260|  2.59M|  PAccessUnit pCurAu = pCtx->pAccessUnitList;
 2261|  2.59M|  pCtx->bAuReadyFlag = false;
 2262|  2.59M|  pCtx->pLastDecPicInfo->bLastHasMmco5 = false;
 2263|  2.59M|  bool bTmpNewSeqBegin = CheckNewSeqBeginAndUpdateActiveLayerSps (pCtx);
 2264|  2.59M|  if (bTmpNewSeqBegin) {
  ------------------
  |  Branch (2264:7): [True: 220k, False: 2.37M]
  ------------------
 2265|   220k|    if (pCtx->pStreamSeqNum)
  ------------------
  |  Branch (2265:9): [True: 220k, False: 0]
  ------------------
 2266|   220k|      (*pCtx->pStreamSeqNum)++;
 2267|      0|    else
 2268|      0|      pCtx->iSeqNum++;
 2269|   220k|  }
 2270|  2.59M|  pCtx->bNewSeqBegin = pCtx->bNewSeqBegin || bTmpNewSeqBegin;
  ------------------
  |  Branch (2270:24): [True: 0, False: 2.59M]
  |  Branch (2270:46): [True: 220k, False: 2.37M]
  ------------------
 2271|  2.59M|  if (pCtx->pStreamSeqNum)
  ------------------
  |  Branch (2271:7): [True: 2.59M, False: 0]
  ------------------
 2272|  2.59M|    pCtx->iSeqNum = *pCtx->pStreamSeqNum;
 2273|  2.59M|  iErr = WelsDecodeAccessUnitStart (pCtx);
 2274|  2.59M|  GetVclNalTemporalId (pCtx);
 2275|       |
 2276|  2.59M|  if (ERR_NONE != iErr) {
  ------------------
  |  Branch (2276:7): [True: 1.39k, False: 2.59M]
  ------------------
 2277|  1.39k|    ForceResetCurrentAccessUnit (pCtx->pAccessUnitList);
 2278|  1.39k|    if (!pCtx->pParam->bParseOnly)
  ------------------
  |  Branch (2278:9): [True: 1.39k, False: 0]
  ------------------
 2279|  1.39k|      pDstInfo->iBufferStatus = 0;
 2280|  1.39k|    pCtx->bNewSeqBegin = pCtx->bNewSeqBegin || pCtx->bNextNewSeqBegin;
  ------------------
  |  Branch (2280:26): [True: 780, False: 614]
  |  Branch (2280:48): [True: 0, False: 614]
  ------------------
 2281|  1.39k|    pCtx->bNextNewSeqBegin = false; // reset it
 2282|  1.39k|    if (pCtx->bNewSeqBegin)
  ------------------
  |  Branch (2282:9): [True: 780, False: 614]
  ------------------
 2283|    780|      ResetActiveSPSForEachLayer (pCtx);
 2284|  1.39k|    return iErr;
 2285|  1.39k|  }
 2286|       |
 2287|  2.59M|  pCtx->pSps = pCurAu->pNalUnitsList[pCurAu->uiStartPos]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pSps;
 2288|  2.59M|  pCtx->pPps = pCurAu->pNalUnitsList[pCurAu->uiStartPos]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pPps;
 2289|       |
 2290|  2.59M|  return iErr;
 2291|  2.59M|}
_ZN7WelsDec25AllocPicBuffOnNewSeqBeginEPNS_21TagWelsDecoderContextE:
 2299|   219k|int32_t AllocPicBuffOnNewSeqBegin (PWelsDecoderContext pCtx) {
 2300|       |  //try to allocate or relocate DPB memory only when new sequence is coming.
 2301|   219k|  if (GetThreadCount (pCtx) <= 1) {
  ------------------
  |  Branch (2301:7): [True: 219k, False: 0]
  ------------------
 2302|   219k|    WelsResetRefPic (pCtx); //clear ref pPic when IDR NAL
 2303|   219k|  }
 2304|   219k|  int32_t iErr = SyncPictureResolutionExt (pCtx, pCtx->pSps->iMbWidth, pCtx->pSps->iMbHeight);
 2305|       |
 2306|   219k|  if (ERR_NONE != iErr) {
  ------------------
  |  Branch (2306:7): [True: 0, False: 219k]
  ------------------
 2307|      0|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "sync picture resolution ext failed,  the error is %d", iErr);
 2308|      0|    return iErr;
 2309|      0|  }
 2310|       |
 2311|   219k|  return iErr;
 2312|   219k|}
_ZN7WelsDec23InitConstructAccessUnitEPNS_21TagWelsDecoderContextEP13TagBufferInfo:
 2323|  2.59M|int32_t InitConstructAccessUnit (PWelsDecoderContext pCtx, SBufferInfo* pDstInfo) {
 2324|  2.59M|  int32_t iErr = ERR_NONE;
 2325|       |
 2326|  2.59M|  iErr = WelsDecodeInitAccessUnitStart (pCtx, pDstInfo);
 2327|  2.59M|  if (ERR_NONE != iErr) {
  ------------------
  |  Branch (2327:7): [True: 1.39k, False: 2.59M]
  ------------------
 2328|  1.39k|    return iErr;
 2329|  1.39k|  }
 2330|  2.59M|  if (pCtx->bNewSeqBegin) {
  ------------------
  |  Branch (2330:7): [True: 219k, False: 2.37M]
  ------------------
 2331|   219k|    iErr = AllocPicBuffOnNewSeqBegin (pCtx);
 2332|   219k|    if (ERR_NONE != iErr) {
  ------------------
  |  Branch (2332:9): [True: 0, False: 219k]
  ------------------
 2333|      0|      return iErr;
 2334|      0|    }
 2335|   219k|  }
 2336|       |
 2337|  2.59M|  return iErr;
 2338|  2.59M|}
_ZN7WelsDec19ConstructAccessUnitEPNS_21TagWelsDecoderContextEPPhP13TagBufferInfo:
 2352|  2.59M|int32_t ConstructAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstInfo) {
 2353|  2.59M|  int32_t iErr = ERR_NONE;
 2354|  2.59M|  if (GetThreadCount (pCtx) <= 1) {
  ------------------
  |  Branch (2354:7): [True: 2.59M, False: 0]
  ------------------
 2355|  2.59M|    iErr = InitConstructAccessUnit (pCtx, pDstInfo);
 2356|  2.59M|    if (ERR_NONE != iErr) {
  ------------------
  |  Branch (2356:9): [True: 1.39k, False: 2.59M]
  ------------------
 2357|  1.39k|      return iErr;
 2358|  1.39k|    }
 2359|  2.59M|  }
 2360|  2.59M|  if (pCtx->pCabacDecEngine == NULL) {
  ------------------
  |  Branch (2360:7): [True: 0, False: 2.59M]
  ------------------
 2361|      0|    pCtx->pCabacDecEngine = (SWelsCabacDecEngine*)pCtx->pMemAlign->WelsMallocz (sizeof (SWelsCabacDecEngine),
 2362|      0|                            "pCtx->pCabacDecEngine");
 2363|      0|    WELS_VERIFY_RETURN_IF (ERR_INFO_OUT_OF_MEMORY, (NULL == pCtx->pCabacDecEngine))
  ------------------
  |  |  239|      0|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
 2364|      0|  }
 2365|       |
 2366|  2.59M|  iErr = DecodeCurrentAccessUnit (pCtx, ppDst, pDstInfo);
 2367|       |
 2368|  2.59M|  WelsDecodeAccessUnitEnd (pCtx);
 2369|       |
 2370|  2.59M|  if (ERR_NONE != iErr) {
  ------------------
  |  Branch (2370:7): [True: 2.46M, False: 123k]
  ------------------
 2371|  2.46M|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "returned error from decoding:[0x%x]", iErr);
 2372|  2.46M|    return iErr;
 2373|  2.46M|  }
 2374|       |
 2375|   123k|  return ERR_NONE;
 2376|  2.59M|}
_ZN7WelsDec22WelsDqLayerDecodeStartEPNS_21TagWelsDecoderContextEPNS_10TagNalUnitEPNS_6TagSpsEPNS_6TagPpsE:
 2424|  2.58M|void WelsDqLayerDecodeStart (PWelsDecoderContext pCtx, PNalUnit pCurNal, PSps pSps, PPps pPps) {
 2425|  2.58M|  PSliceHeader pSh = &pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader;
 2426|       |
 2427|  2.58M|  pCtx->eSliceType   = pSh->eSliceType;
 2428|  2.58M|  pCtx->pSliceHeader = pSh;
 2429|  2.58M|  pCtx->bUsedAsRef   = false;
 2430|       |
 2431|  2.58M|  pCtx->iFrameNum    = pSh->iFrameNum;
 2432|  2.58M|  UpdateDecoderStatisticsForActiveParaset (pCtx->pDecoderStatistics, pSps, pPps);
 2433|  2.58M|}
_ZN7WelsDec14InitRefPicListEPNS_21TagWelsDecoderContextEhi:
 2435|  2.58M|int32_t InitRefPicList (PWelsDecoderContext pCtx, const uint8_t kuiNRi, int32_t iPoc) {
 2436|  2.58M|  int32_t iRet = ERR_NONE;
 2437|  2.58M|  if (pCtx->eSliceType == B_SLICE) {
  ------------------
  |  Branch (2437:7): [True: 122k, False: 2.46M]
  ------------------
 2438|   122k|    iRet = WelsInitBSliceRefList (pCtx, iPoc);
 2439|   122k|    CreateImplicitWeightTable (pCtx);
 2440|   122k|  } else
 2441|  2.46M|    iRet = WelsInitRefList (pCtx, iPoc);
 2442|  2.58M|  if ((pCtx->eSliceType != I_SLICE && pCtx->eSliceType != SI_SLICE)) {
  ------------------
  |  Branch (2442:8): [True: 2.35M, False: 233k]
  |  Branch (2442:39): [True: 2.35M, False: 0]
  ------------------
 2443|  2.35M|#if 1
 2444|  2.35M|    if (pCtx->pSps->uiProfileIdc != 66 && pCtx->pPps->bEntropyCodingModeFlag)
  ------------------
  |  Branch (2444:9): [True: 2.17M, False: 177k]
  |  Branch (2444:43): [True: 78.0k, False: 2.09M]
  ------------------
 2445|  78.0k|      iRet = WelsReorderRefList2 (pCtx);
 2446|  2.27M|    else
 2447|  2.27M|#endif
 2448|  2.27M|      iRet = WelsReorderRefList (pCtx);
 2449|  2.35M|  }
 2450|       |
 2451|  2.58M|  return iRet;
 2452|  2.58M|}
_ZN7WelsDec18InitCurDqLayerDataEPNS_21TagWelsDecoderContextEPNS_10TagDqLayerE:
 2454|  2.59M|void InitCurDqLayerData (PWelsDecoderContext pCtx, PDqLayer pCurDq) {
 2455|  2.59M|  if (NULL != pCtx && NULL != pCurDq) {
  ------------------
  |  Branch (2455:7): [True: 2.59M, False: 0]
  |  Branch (2455:23): [True: 2.59M, False: 0]
  ------------------
 2456|  2.59M|    pCurDq->pMbType         = pCtx->sMb.pMbType[0];
 2457|  2.59M|    pCurDq->pSliceIdc       = pCtx->sMb.pSliceIdc[0];
 2458|  2.59M|    pCurDq->pMv[LIST_0]         = pCtx->sMb.pMv[0][LIST_0];
 2459|  2.59M|    pCurDq->pMv[LIST_1]         = pCtx->sMb.pMv[0][LIST_1];
 2460|  2.59M|    pCurDq->pRefIndex[LIST_0]    = pCtx->sMb.pRefIndex[0][LIST_0];
 2461|  2.59M|    pCurDq->pRefIndex[LIST_1]   = pCtx->sMb.pRefIndex[0][LIST_1];
 2462|  2.59M|    pCurDq->pDirect             = pCtx->sMb.pDirect[0];
 2463|  2.59M|    pCurDq->pNoSubMbPartSizeLessThan8x8Flag = pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[0];
 2464|  2.59M|    pCurDq->pTransformSize8x8Flag = pCtx->sMb.pTransformSize8x8Flag[0];
 2465|  2.59M|    pCurDq->pLumaQp         = pCtx->sMb.pLumaQp[0];
 2466|  2.59M|    pCurDq->pChromaQp       = pCtx->sMb.pChromaQp[0];
 2467|  2.59M|    pCurDq->pMvd[LIST_0]         = pCtx->sMb.pMvd[0][LIST_0];
 2468|  2.59M|    pCurDq->pMvd[LIST_1]          = pCtx->sMb.pMvd[0][LIST_1];
 2469|  2.59M|    pCurDq->pCbfDc          = pCtx->sMb.pCbfDc[0];
 2470|  2.59M|    pCurDq->pNzc            = pCtx->sMb.pNzc[0];
 2471|  2.59M|    pCurDq->pNzcRs          = pCtx->sMb.pNzcRs[0];
 2472|  2.59M|    pCurDq->pScaledTCoeff   = pCtx->sMb.pScaledTCoeff[0];
 2473|  2.59M|    pCurDq->pIntraPredMode  = pCtx->sMb.pIntraPredMode[0];
 2474|  2.59M|    pCurDq->pIntra4x4FinalMode = pCtx->sMb.pIntra4x4FinalMode[0];
 2475|  2.59M|    pCurDq->pIntraNxNAvailFlag = pCtx->sMb.pIntraNxNAvailFlag[0];
 2476|  2.59M|    pCurDq->pChromaPredMode = pCtx->sMb.pChromaPredMode[0];
 2477|  2.59M|    pCurDq->pCbp            = pCtx->sMb.pCbp[0];
 2478|  2.59M|    pCurDq->pSubMbType      = pCtx->sMb.pSubMbType[0];
 2479|  2.59M|    pCurDq->pInterPredictionDoneFlag = pCtx->sMb.pInterPredictionDoneFlag[0];
 2480|  2.59M|    pCurDq->pResidualPredFlag = pCtx->sMb.pResidualPredFlag[0];
 2481|  2.59M|    pCurDq->pMbCorrectlyDecodedFlag = pCtx->sMb.pMbCorrectlyDecodedFlag[0];
 2482|  2.59M|    pCurDq->pMbRefConcealedFlag = pCtx->sMb.pMbRefConcealedFlag[0];
 2483|  2.59M|  }
 2484|  2.59M|}
_ZN7WelsDec23DecodeCurrentAccessUnitEPNS_21TagWelsDecoderContextEPPhP13TagBufferInfo:
 2490|  2.59M|int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstInfo) {
 2491|  2.59M|  PNalUnit pNalCur = pCtx->pNalCur = NULL;
 2492|  2.59M|  PAccessUnit pCurAu = pCtx->pAccessUnitList;
 2493|       |
 2494|  2.59M|  int32_t iIdx = pCurAu->uiStartPos;
 2495|  2.59M|  int32_t iEndIdx = pCurAu->uiEndPos;
 2496|       |
 2497|       |  //get current thread ctx
 2498|  2.59M|  PWelsDecoderThreadCTX pThreadCtx = NULL;
 2499|  2.59M|  if (pCtx->pThreadCtx != NULL) {
  ------------------
  |  Branch (2499:7): [True: 0, False: 2.59M]
  ------------------
 2500|      0|    pThreadCtx = (PWelsDecoderThreadCTX)pCtx->pThreadCtx;
 2501|      0|  }
 2502|       |  //get last thread ctx
 2503|  2.59M|  PWelsDecoderThreadCTX pLastThreadCtx = NULL;
 2504|  2.59M|  if (pCtx->pLastThreadCtx != NULL) {
  ------------------
  |  Branch (2504:7): [True: 0, False: 2.59M]
  ------------------
 2505|      0|    pLastThreadCtx = (PWelsDecoderThreadCTX) (pCtx->pLastThreadCtx);
 2506|      0|    if (pLastThreadCtx->pDec == NULL) {
  ------------------
  |  Branch (2506:9): [True: 0, False: 0]
  ------------------
 2507|      0|      pLastThreadCtx->pDec = PrefetchLastPicForThread (pCtx->pPicBuff,
 2508|      0|                             pLastThreadCtx->iPicBuffIdx);
 2509|      0|    }
 2510|      0|  }
 2511|  2.59M|  int32_t iThreadCount = GetThreadCount (pCtx);
 2512|  2.59M|  int32_t iPpsId = 0;
 2513|  2.59M|  int32_t iRet = ERR_NONE;
 2514|       |
 2515|  2.59M|  bool bAllRefComplete = true; // Assume default all ref picutres are complete
 2516|       |
 2517|  2.59M|  const uint8_t kuiTargetLayerDqId = GetTargetDqId (pCtx->uiTargetDqId, pCtx->pParam);
 2518|  2.59M|  const uint8_t kuiDependencyIdMax = (kuiTargetLayerDqId & 0x7F) >> 4;
 2519|  2.59M|  int16_t iLastIdD = -1, iLastIdQ = -1;
 2520|  2.59M|  int16_t iCurrIdD = 0, iCurrIdQ = 0;
 2521|  2.59M|  pCtx->uiNalRefIdc = 0;
 2522|  2.59M|  bool bFreshSliceAvailable =
 2523|  2.59M|    true; // Another fresh slice comingup for given dq layer, for multiple slices in case of header parts of slices sometimes loss over error-prone channels, 8/14/2008
 2524|       |
 2525|       |  //update pCurDqLayer at the starting of AU decoding
 2526|  2.59M|  if (pCtx->bInitialDqLayersMem || pCtx->pCurDqLayer == NULL) {
  ------------------
  |  Branch (2526:7): [True: 2.59M, False: 0]
  |  Branch (2526:36): [True: 0, False: 0]
  ------------------
 2527|  2.59M|    pCtx->pCurDqLayer = pCtx->pDqLayersList[0];
 2528|  2.59M|  }
 2529|       |
 2530|  2.59M|  InitCurDqLayerData (pCtx, pCtx->pCurDqLayer);
 2531|       |
 2532|  2.59M|  pNalCur = pCurAu->pNalUnitsList[iIdx];
 2533|  2.71M|  while (iIdx <= iEndIdx) {
  ------------------
  |  Branch (2533:10): [True: 2.59M, False: 119k]
  ------------------
 2534|  2.59M|    PDqLayer dq_cur = pCtx->pCurDqLayer;
 2535|  2.59M|    SLayerInfo pLayerInfo;
 2536|  2.59M|    PSliceHeaderExt pShExt = NULL;
 2537|  2.59M|    PSliceHeader pSh = NULL;
 2538|  2.59M|    bool isNewFrame = true;
 2539|  2.59M|    if (iThreadCount > 1) {
  ------------------
  |  Branch (2539:9): [True: 0, False: 2.59M]
  ------------------
 2540|      0|      isNewFrame = pCtx->pDec == NULL;
 2541|      0|    }
 2542|  2.59M|    if (pCtx->pDec == NULL) {
  ------------------
  |  Branch (2542:9): [True: 610k, False: 1.98M]
  ------------------
 2543|       |      //make call PrefetchPic first before updating reference lists in threaded mode
 2544|       |      //this prevents from possible thread-decoding hanging
 2545|   610k|      pCtx->pDec = PrefetchPic (pCtx->pPicBuff);
 2546|   610k|      if (pLastThreadCtx != NULL) {
  ------------------
  |  Branch (2546:11): [True: 0, False: 610k]
  ------------------
 2547|      0|        pLastThreadCtx->pDec->bUsedAsRef = pLastThreadCtx->pCtx->uiNalRefIdc > 0;
 2548|      0|        if (pLastThreadCtx->pDec->bUsedAsRef) {
  ------------------
  |  Branch (2548:13): [True: 0, False: 0]
  ------------------
 2549|      0|          for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (2549:42): [True: 0, False: 0]
  ------------------
 2550|      0|            uint32_t i = 0;
 2551|      0|            while (i < MAX_REF_PIC_COUNT && pLastThreadCtx->pCtx->sRefPic.pRefList[listIdx][i]) {
  ------------------
  |  |   45|      0|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
  |  Branch (2551:20): [True: 0, False: 0]
  |  Branch (2551:45): [True: 0, False: 0]
  ------------------
 2552|      0|              pLastThreadCtx->pDec->pRefPic[listIdx][i] = pLastThreadCtx->pCtx->sRefPic.pRefList[listIdx][i];
 2553|      0|              ++i;
 2554|      0|            }
 2555|      0|          }
 2556|      0|          pLastThreadCtx->pCtx->sTmpRefPic = pLastThreadCtx->pCtx->sRefPic;
 2557|      0|          WelsMarkAsRef (pLastThreadCtx->pCtx, pLastThreadCtx->pDec);
 2558|      0|          pCtx->sRefPic = pLastThreadCtx->pCtx->sTmpRefPic;
 2559|      0|        } else {
 2560|      0|          pCtx->sRefPic = pLastThreadCtx->pCtx->sRefPic;
 2561|      0|        }
 2562|      0|      }
 2563|       |      //WelsResetRefPic needs to be called when a new sequence is encountered
 2564|       |      //Otherwise artifacts is observed in decoded yuv in couple of unit tests with multiple-slice frame
 2565|   610k|      if (GetThreadCount (pCtx) > 1 && pCtx->bNewSeqBegin) {
  ------------------
  |  Branch (2565:11): [True: 0, False: 610k]
  |  Branch (2565:40): [True: 0, False: 0]
  ------------------
 2566|      0|        WelsResetRefPic (pCtx);
 2567|      0|      }
 2568|   610k|      if (pCtx->iTotalNumMbRec != 0)
  ------------------
  |  Branch (2568:11): [True: 0, False: 610k]
  ------------------
 2569|      0|        pCtx->iTotalNumMbRec = 0;
 2570|       |
 2571|   610k|      if (NULL == pCtx->pDec) {
  ------------------
  |  Branch (2571:11): [True: 4.44k, False: 606k]
  ------------------
 2572|  4.44k|        WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR,
 2573|  4.44k|                 "DecodeCurrentAccessUnit()::::::PrefetchPic ERROR, pSps->iNumRefFrames:%d.",
 2574|  4.44k|                 pCtx->pSps->iNumRefFrames);
 2575|       |        // The error code here need to be separated from the dsOutOfMemory
 2576|  4.44k|        pCtx->iErrorCode |= dsOutOfMemory;
 2577|  4.44k|        return ERR_INFO_REF_COUNT_OVERFLOW;
 2578|  4.44k|      }
 2579|   606k|      if (pThreadCtx != NULL) {
  ------------------
  |  Branch (2579:11): [True: 0, False: 606k]
  ------------------
 2580|      0|        pThreadCtx->pDec = pCtx->pDec;
 2581|      0|        if (iThreadCount > 1) ++pCtx->pDec->iRefCount;
  ------------------
  |  Branch (2581:13): [True: 0, False: 0]
  ------------------
 2582|      0|        uint32_t uiMbHeight = (pCtx->pDec->iHeightInPixel + 15) >> 4;
 2583|      0|        for (uint32_t i = 0; i < uiMbHeight; ++i) {
  ------------------
  |  Branch (2583:30): [True: 0, False: 0]
  ------------------
 2584|      0|          RESET_EVENT (&pCtx->pDec->pReadyEvent[i]);
  ------------------
  |  |  152|      0|  EventReset(ph)
  ------------------
 2585|      0|        }
 2586|      0|      }
 2587|   606k|      pCtx->pDec->bNewSeqBegin = pCtx->bNewSeqBegin; //set flag for start decoding
 2588|  1.98M|    } else if (pCtx->iTotalNumMbRec == 0) { //pDec != NULL, already start
  ------------------
  |  Branch (2588:16): [True: 1.74M, False: 241k]
  ------------------
 2589|  1.74M|      pCtx->pDec->bNewSeqBegin = pCtx->bNewSeqBegin; //set flag for start decoding
 2590|  1.74M|    }
 2591|  2.58M|    pCtx->pDec->uiTimeStamp = pNalCur->uiTimeStamp;
 2592|  2.58M|    pCtx->pDec->uiDecodingTimeStamp = pCtx->uiDecodingTimeStamp;
 2593|  2.58M|    if (pThreadCtx != NULL) {
  ------------------
  |  Branch (2593:9): [True: 0, False: 2.58M]
  ------------------
 2594|      0|      pThreadCtx->iPicBuffIdx = pCtx->pDec->iPicBuffIdx;
 2595|      0|      pCtx->pCurDqLayer->pMbCorrectlyDecodedFlag = pCtx->pDec->pMbCorrectlyDecodedFlag;
 2596|      0|    }
 2597|       |
 2598|  2.58M|    if (pCtx->iTotalNumMbRec == 0) { //Picture start to decode
  ------------------
  |  Branch (2598:9): [True: 2.34M, False: 241k]
  ------------------
 2599|  4.69M|      for (int32_t i = 0; i < LAYER_NUM_EXCHANGEABLE; ++ i)
  ------------------
  |  |   57|  4.69M|#define LAYER_NUM_EXCHANGEABLE          1
  ------------------
  |  Branch (2599:27): [True: 2.34M, False: 2.34M]
  ------------------
 2600|  2.34M|        memset (pCtx->sMb.pSliceIdc[i], 0xff, (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int32_t)));
 2601|  2.34M|      memset (pCtx->pCurDqLayer->pMbCorrectlyDecodedFlag, 0, pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight * sizeof (bool));
 2602|  2.34M|      memset (pCtx->pCurDqLayer->pMbRefConcealedFlag, 0, pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight * sizeof (bool));
 2603|  2.34M|      memset (pCtx->pDec->pRefPic[LIST_0], 0, sizeof (PPicture) * MAX_DPB_COUNT);
  ------------------
  |  |   49|  2.34M|#define MAX_DPB_COUNT                   (MAX_REF_PIC_COUNT + 1) // 1 additional position for re-order and other process
  |  |  ------------------
  |  |  |  |   45|  2.34M|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  |  |  ------------------
  ------------------
 2604|  2.34M|      memset (pCtx->pDec->pRefPic[LIST_1], 0, sizeof (PPicture) * MAX_DPB_COUNT);
  ------------------
  |  |   49|  2.34M|#define MAX_DPB_COUNT                   (MAX_REF_PIC_COUNT + 1) // 1 additional position for re-order and other process
  |  |  ------------------
  |  |  |  |   45|  2.34M|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  |  |  ------------------
  ------------------
 2605|  2.34M|      pCtx->pDec->iMbNum = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight;
 2606|  2.34M|      pCtx->pDec->iMbEcedNum = 0;
 2607|  2.34M|      pCtx->pDec->iMbEcedPropNum = 0;
 2608|  2.34M|    }
 2609|  2.58M|    pCtx->bRPLRError = false;
 2610|  2.58M|    GetI4LumaIChromaAddrTable (pCtx->iDecBlockOffsetArray, pCtx->pDec->iLinesize[0], pCtx->pDec->iLinesize[1]);
 2611|       |
 2612|  2.58M|    if (pNalCur->sNalHeaderExt.uiLayerDqId > kuiTargetLayerDqId) { // confirmed pNalCur will never be NULL
  ------------------
  |  Branch (2612:9): [True: 4.19k, False: 2.58M]
  ------------------
 2613|  4.19k|      break; // Per formance it need not to decode the remaining bits any more due to given uiLayerDqId required, 9/2/2009
 2614|  4.19k|    }
 2615|       |
 2616|  2.58M|    memset (&pLayerInfo, 0, sizeof (SLayerInfo));
 2617|       |
 2618|       |    /*
 2619|       |     *  Loop decoding for slices (even FMO and/ multiple slices) within a dq layer
 2620|       |     */
 2621|  2.58M|    while (iIdx <= iEndIdx) {
  ------------------
  |  Branch (2621:12): [True: 2.58M, False: 0]
  ------------------
 2622|  2.58M|      bool         bReconstructSlice;
 2623|  2.58M|      iCurrIdQ  = pNalCur->sNalHeaderExt.uiQualityId;
 2624|  2.58M|      iCurrIdD  = pNalCur->sNalHeaderExt.uiDependencyId;
 2625|  2.58M|      pSh       = &pNalCur->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader;
 2626|  2.58M|      pShExt    = &pNalCur->sNalData.sVclNal.sSliceHeaderExt;
 2627|  2.58M|      pCtx->bRPLRError = false;
 2628|  2.58M|      bReconstructSlice = CheckSliceNeedReconstruct (pNalCur->sNalHeaderExt.uiLayerDqId, kuiTargetLayerDqId);
 2629|       |
 2630|  2.58M|      memcpy (&pLayerInfo.sNalHeaderExt, &pNalCur->sNalHeaderExt, sizeof (SNalUnitHeaderExt)); //confirmed_safe_unsafe_usage
 2631|       |
 2632|  2.58M|      pCtx->pDec->iFrameNum = pSh->iFrameNum;
 2633|  2.58M|      pCtx->pDec->iFramePoc = pSh->iPicOrderCntLsb; // still can not obtain correct, because current do not support POCtype 2
 2634|  2.58M|      pCtx->pDec->bIdrFlag = pNalCur->sNalHeaderExt.bIdrFlag;
 2635|  2.58M|      pCtx->pDec->eSliceType = pSh->eSliceType;
 2636|       |
 2637|  2.58M|      memcpy (&pLayerInfo.sSliceInLayer.sSliceHeaderExt, pShExt, sizeof (SSliceHeaderExt)); //confirmed_safe_unsafe_usage
 2638|  2.58M|      pLayerInfo.sSliceInLayer.bSliceHeaderExtFlag      = pNalCur->sNalData.sVclNal.bSliceHeaderExtFlag;
 2639|  2.58M|      pLayerInfo.sSliceInLayer.eSliceType               = pSh->eSliceType;
 2640|  2.58M|      pLayerInfo.sSliceInLayer.iLastMbQp                = pSh->iSliceQp;
 2641|  2.58M|      dq_cur->pBitStringAux = &pNalCur->sNalData.sVclNal.sSliceBitsRead;
 2642|       |
 2643|  2.58M|      pCtx->uiNalRefIdc = pNalCur->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc;
 2644|       |
 2645|  2.58M|      iPpsId = pSh->iPpsId;
 2646|       |
 2647|  2.58M|      pLayerInfo.pPps = pSh->pPps;
 2648|  2.58M|      pLayerInfo.pSps = pSh->pSps;
 2649|  2.58M|      pLayerInfo.pSubsetSps = pShExt->pSubsetSps;
 2650|       |
 2651|  2.58M|      pCtx->pFmo = &pCtx->sFmoList[iPpsId];
 2652|  2.58M|      iRet = FmoParamUpdate (pCtx->pFmo, pLayerInfo.pSps, pLayerInfo.pPps, &pCtx->iActiveFmoNum, pCtx->pMemAlign);
 2653|  2.58M|      if (ERR_NONE != iRet) {
  ------------------
  |  Branch (2653:11): [True: 325, False: 2.58M]
  ------------------
 2654|    325|        if (iRet == ERR_INFO_OUT_OF_MEMORY) {
  ------------------
  |  Branch (2654:13): [True: 0, False: 325]
  ------------------
 2655|      0|          pCtx->iErrorCode |= dsOutOfMemory;
 2656|      0|          WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "DecodeCurrentAccessUnit(), Fmo param alloc failed");
 2657|    325|        } else {
 2658|    325|          pCtx->iErrorCode |= dsBitstreamError;
 2659|    325|          WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "DecodeCurrentAccessUnit(), FmoParamUpdate failed, eSliceType: %d.",
 2660|    325|                   pSh->eSliceType);
 2661|    325|        }
 2662|    325|        return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_FMO_INIT_FAIL);
  ------------------
  |  |   59|    325|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2663|    325|      }
 2664|       |
 2665|  2.58M|      bFreshSliceAvailable = (iCurrIdD != iLastIdD
  ------------------
  |  Branch (2665:31): [True: 2.58M, False: 0]
  ------------------
 2666|      0|                              || iCurrIdQ != iLastIdQ);        // do not need condition of (first_mb == 0) due multiple slices might be disorder
  ------------------
  |  Branch (2666:34): [True: 0, False: 0]
  ------------------
 2667|       |
 2668|       |
 2669|  2.58M|      WelsDqLayerDecodeStart (pCtx, pNalCur, pLayerInfo.pSps, pLayerInfo.pPps);
 2670|       |
 2671|       |
 2672|  2.58M|      if ((iLastIdD < 0) ||  //case 1: first layer
  ------------------
  |  Branch (2672:11): [True: 2.58M, False: 0]
  ------------------
 2673|  2.58M|          (iLastIdD == iCurrIdD)) { //case 2: same uiDId
  ------------------
  |  Branch (2673:11): [True: 0, False: 0]
  ------------------
 2674|  2.58M|        InitDqLayerInfo (dq_cur, &pLayerInfo, pNalCur, pCtx->pDec);
 2675|       |
 2676|  2.58M|        if (!dq_cur->sLayerInfo.pSps->bGapsInFrameNumValueAllowedFlag) {
  ------------------
  |  Branch (2676:13): [True: 2.23M, False: 349k]
  ------------------
 2677|  2.23M|          const bool kbIdrFlag = dq_cur->sLayerInfo.sNalHeaderExt.bIdrFlag
  ------------------
  |  Branch (2677:34): [True: 172k, False: 2.06M]
  ------------------
 2678|  2.06M|                                 || (dq_cur->sLayerInfo.sNalHeaderExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_CODED_SLICE_IDR);
  ------------------
  |  Branch (2678:37): [True: 0, False: 2.06M]
  ------------------
 2679|       |          // Subclause 8.2.5.2 Decoding process for gaps in frame_num
 2680|  2.23M|          int32_t iPrevFrameNum = pCtx->pLastDecPicInfo->iPrevFrameNum;
 2681|  2.23M|          if (pLastThreadCtx != NULL) {
  ------------------
  |  Branch (2681:15): [True: 0, False: 2.23M]
  ------------------
 2682|       |            //call GetPrevFrameNum() to get correct iPrevFrameNum to prevent frame gap warning
 2683|      0|            iPrevFrameNum = pCtx->bNewSeqBegin ? 0 : GetPrevFrameNum (pCtx);
  ------------------
  |  Branch (2683:29): [True: 0, False: 0]
  ------------------
 2684|      0|          }
 2685|  2.23M|          if (!kbIdrFlag  &&
  ------------------
  |  Branch (2685:15): [True: 2.06M, False: 172k]
  ------------------
 2686|  2.06M|              pSh->iFrameNum != iPrevFrameNum &&
  ------------------
  |  Branch (2686:15): [True: 1.76M, False: 292k]
  ------------------
 2687|  1.76M|              pSh->iFrameNum != ((iPrevFrameNum + 1) & ((1 << dq_cur->sLayerInfo.pSps->uiLog2MaxFrameNum) -
  ------------------
  |  Branch (2687:15): [True: 1.76M, False: 8.18k]
  ------------------
 2688|  1.76M|                                 1))) {
 2689|  1.76M|            WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
 2690|  1.76M|                     "referencing pictures lost due frame gaps exist, prev_frame_num: %d, curr_frame_num: %d",
 2691|  1.76M|                     iPrevFrameNum,
 2692|  1.76M|                     pSh->iFrameNum);
 2693|       |
 2694|  1.76M|            bAllRefComplete = false;
 2695|  1.76M|            pCtx->iErrorCode |= dsRefLost;
 2696|  1.76M|            if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) {
  ------------------
  |  Branch (2696:17): [True: 0, False: 1.76M]
  ------------------
 2697|      0|#ifdef LONG_TERM_REF
 2698|      0|              pCtx->bParamSetsLostFlag = true;
 2699|       |#else
 2700|       |              pCtx->bReferenceLostAtT0Flag = true;
 2701|       |#endif
 2702|      0|              return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_REFERENCE_PIC_LOST);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 2703|      0|            }
 2704|  1.76M|          }
 2705|  2.23M|        }
 2706|       |
 2707|  2.58M|        if (iCurrIdD == kuiDependencyIdMax && iCurrIdQ == BASE_QUALITY_ID && isNewFrame) {
  ------------------
  |  |   60|  5.16M|#define BASE_QUALITY_ID         0
  ------------------
  |  Branch (2707:13): [True: 2.58M, False: 0]
  |  Branch (2707:47): [True: 2.58M, False: 0]
  |  Branch (2707:78): [True: 2.58M, False: 0]
  ------------------
 2708|  2.58M|          iRet = InitRefPicList (pCtx, pCtx->uiNalRefIdc, pSh->iPicOrderCntLsb);
 2709|  2.58M|          if (iRet) {
  ------------------
  |  Branch (2709:15): [True: 6.72k, False: 2.57M]
  ------------------
 2710|  6.72k|            pCtx->bRPLRError = true;
 2711|  6.72k|            bAllRefComplete = false; // RPLR error, set ref pictures complete flag false
 2712|  6.72k|            HandleReferenceLost (pCtx, pNalCur);
 2713|  6.72k|            WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,
 2714|  6.72k|                     "reference picture introduced by this frame is lost during transmission! uiTId: %d",
 2715|  6.72k|                     pNalCur->sNalHeaderExt.uiTemporalId);
 2716|  6.72k|            if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) {
  ------------------
  |  Branch (2716:17): [True: 0, False: 6.72k]
  ------------------
 2717|      0|              if (pCtx->iTotalNumMbRec == 0)
  ------------------
  |  Branch (2717:19): [True: 0, False: 0]
  ------------------
 2718|      0|                pCtx->pDec = NULL;
 2719|      0|              return iRet;
 2720|      0|            }
 2721|  6.72k|          }
 2722|  2.58M|        }
 2723|       |        //calculate Colocated mv scaling factor for temporal direct prediction
 2724|  2.58M|        if (pSh->eSliceType == B_SLICE && !pSh->iDirectSpatialMvPredFlag)
  ------------------
  |  Branch (2724:13): [True: 122k, False: 2.46M]
  |  Branch (2724:43): [True: 65.7k, False: 56.5k]
  ------------------
 2725|  65.7k|          ComputeColocatedTemporalScaling (pCtx);
 2726|       |
 2727|  2.58M|        if (iThreadCount > 1) {
  ------------------
  |  Branch (2727:13): [True: 0, False: 2.58M]
  ------------------
 2728|      0|          if (iIdx == 0) {
  ------------------
  |  Branch (2728:15): [True: 0, False: 0]
  ------------------
 2729|      0|            memset (&pCtx->lastReadyHeightOffset[0][0], -1, LIST_A * MAX_REF_PIC_COUNT * sizeof (int16_t));
  ------------------
  |  |   45|      0|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
 2730|      0|            SET_EVENT (&pThreadCtx->sSliceDecodeStart);
  ------------------
  |  |  149|      0|  EventPost(ph)
  ------------------
 2731|      0|          }
 2732|      0|          iRet = WelsDecodeAndConstructSlice (pCtx);
 2733|  2.58M|        } else {
 2734|  2.58M|          iRet = WelsDecodeSlice (pCtx, bFreshSliceAvailable, pNalCur);
 2735|  2.58M|        }
 2736|       |
 2737|       |        //Output good store_base reconstruction when enhancement quality layer occurred error for MGS key picture case
 2738|  2.58M|        if (iRet != ERR_NONE) {
  ------------------
  |  Branch (2738:13): [True: 2.38M, False: 199k]
  ------------------
 2739|  2.38M|          WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
 2740|  2.38M|                   "DecodeCurrentAccessUnit() failed (%d) in frame: %d uiDId: %d uiQId: %d",
 2741|  2.38M|                   iRet, pSh->iFrameNum, iCurrIdD, iCurrIdQ);
 2742|  2.38M|          bAllRefComplete = false;
 2743|  2.38M|          HandleReferenceLostL0 (pCtx, pNalCur);
 2744|  2.38M|          if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) {
  ------------------
  |  Branch (2744:15): [True: 0, False: 2.38M]
  ------------------
 2745|      0|            if (pCtx->iTotalNumMbRec == 0)
  ------------------
  |  Branch (2745:17): [True: 0, False: 0]
  ------------------
 2746|      0|              pCtx->pDec = NULL;
 2747|      0|            return iRet;
 2748|      0|          }
 2749|  2.38M|        }
 2750|       |
 2751|  2.58M|        if (iThreadCount <= 1 && bReconstructSlice) {
  ------------------
  |  Branch (2751:13): [True: 2.58M, False: 0]
  |  Branch (2751:34): [True: 2.58M, False: 0]
  ------------------
 2752|  2.58M|          if ((iRet = WelsDecodeConstructSlice (pCtx, pNalCur)) != ERR_NONE) {
  ------------------
  |  Branch (2752:15): [True: 1.52M, False: 1.06M]
  ------------------
 2753|  1.52M|            pCtx->pDec->bIsComplete = false; // reconstruction error, directly set the flag false
 2754|  1.52M|            return iRet;
 2755|  1.52M|          }
 2756|  2.58M|        }
 2757|  1.06M|        if (bAllRefComplete && pCtx->eSliceType != I_SLICE) {
  ------------------
  |  Branch (2757:13): [True: 151k, False: 912k]
  |  Branch (2757:32): [True: 148k, False: 2.73k]
  ------------------
 2758|   148k|          if (iThreadCount <= 1) {
  ------------------
  |  Branch (2758:15): [True: 148k, False: 0]
  ------------------
 2759|   148k|            if (pCtx->sRefPic.uiRefCount[LIST_0] > 0) {
  ------------------
  |  Branch (2759:17): [True: 148k, False: 408]
  ------------------
 2760|   148k|              bAllRefComplete &= CheckRefPicturesComplete (pCtx);
 2761|   148k|            } else {
 2762|    408|              bAllRefComplete = false;
 2763|    408|            }
 2764|   148k|          }
 2765|   148k|        }
 2766|  1.06M|      }
 2767|       |#if defined (_DEBUG) &&  !defined (CODEC_FOR_TESTBED)
 2768|       |      WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "cur_frame : %d\tiCurrIdD : %d\n ",
 2769|       |               dq_cur->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iFrameNum, iCurrIdD);
 2770|       |#endif//#if !CODEC_FOR_TESTBED
 2771|  1.06M|      iLastIdD = iCurrIdD;
 2772|  1.06M|      iLastIdQ = iCurrIdQ;
 2773|       |
 2774|       |      //pNalUnitsList overflow.
 2775|  1.06M|      ++ iIdx;
 2776|  1.06M|      if (iIdx <= iEndIdx) {
  ------------------
  |  Branch (2776:11): [True: 0, False: 1.06M]
  ------------------
 2777|      0|        pNalCur = pCurAu->pNalUnitsList[iIdx];
 2778|  1.06M|      } else {
 2779|  1.06M|        pNalCur = NULL;
 2780|  1.06M|      }
 2781|       |
 2782|  1.06M|      if (pNalCur == NULL ||
  ------------------
  |  Branch (2782:11): [True: 1.06M, False: 0]
  ------------------
 2783|      0|          iLastIdD != pNalCur->sNalHeaderExt.uiDependencyId ||
  ------------------
  |  Branch (2783:11): [True: 0, False: 0]
  ------------------
 2784|      0|          iLastIdQ != pNalCur->sNalHeaderExt.uiQualityId)
  ------------------
  |  Branch (2784:11): [True: 0, False: 0]
  ------------------
 2785|  1.06M|        break;
 2786|  1.06M|    }
 2787|       |
 2788|       |    // Set the current dec picture complete flag. The flag will be reset when current picture need do ErrorCon.
 2789|  1.06M|    pCtx->pDec->bIsComplete = bAllRefComplete;
 2790|  1.06M|    if (!pCtx->pDec->bIsComplete) {  // Ref pictures ECed, result in ECed
  ------------------
  |  Branch (2790:9): [True: 1.04M, False: 15.8k]
  ------------------
 2791|  1.04M|      pCtx->iErrorCode |= dsDataErrorConcealed;
 2792|  1.04M|    }
 2793|       |
 2794|       |    // A dq layer decoded here
 2795|       |#if defined (_DEBUG) &&  !defined (CODEC_FOR_TESTBED)
 2796|       |#undef fprintf
 2797|       |    WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "POC: #%d, FRAME: #%d, D: %d, Q: %d, T: %d, P: %d, %d\n",
 2798|       |             pSh->iPicOrderCntLsb, pSh->iFrameNum, iCurrIdD, iCurrIdQ, dq_cur->sLayerInfo.sNalHeaderExt.uiTemporalId,
 2799|       |             dq_cur->sLayerInfo.sNalHeaderExt.uiPriorityId, dq_cur->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iSliceQp);
 2800|       |#endif//#if !CODEC_FOR_TESTBED
 2801|       |
 2802|  1.06M|    if (dq_cur->uiLayerDqId == kuiTargetLayerDqId) {
  ------------------
  |  Branch (2802:9): [True: 1.06M, False: 0]
  ------------------
 2803|  1.06M|      if (!pCtx->bInstantDecFlag) {
  ------------------
  |  Branch (2803:11): [True: 0, False: 1.06M]
  ------------------
 2804|      0|        if (!pCtx->pParam->bParseOnly) {
  ------------------
  |  Branch (2804:13): [True: 0, False: 0]
  ------------------
 2805|       |          //Do error concealment here
 2806|      0|          if ((NeedErrorCon (pCtx)) && (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE)) {
  ------------------
  |  Branch (2806:15): [True: 0, False: 0]
  |  Branch (2806:40): [True: 0, False: 0]
  ------------------
 2807|      0|            ImplementErrorCon (pCtx);
 2808|      0|            pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight;
 2809|      0|            pCtx->pDec->iSpsId = pCtx->pSps->iSpsId;
 2810|      0|            pCtx->pDec->iPpsId = pCtx->pPps->iPpsId;
 2811|      0|          }
 2812|      0|        }
 2813|      0|      }
 2814|       |
 2815|  1.06M|      if (iThreadCount >= 1) {
  ------------------
  |  Branch (2815:11): [True: 0, False: 1.06M]
  ------------------
 2816|      0|        int32_t  id = pThreadCtx->sThreadInfo.uiThrNum;
 2817|      0|        for (int32_t i = 0; i < iThreadCount; ++i) {
  ------------------
  |  Branch (2817:29): [True: 0, False: 0]
  ------------------
 2818|      0|          if (i == id || pThreadCtx[i - id].pCtx->uiDecodingTimeStamp == 0) continue;
  ------------------
  |  Branch (2818:15): [True: 0, False: 0]
  |  Branch (2818:26): [True: 0, False: 0]
  ------------------
 2819|      0|          if (pThreadCtx[i - id].pCtx->uiDecodingTimeStamp < pCtx->uiDecodingTimeStamp) {
  ------------------
  |  Branch (2819:15): [True: 0, False: 0]
  ------------------
 2820|      0|            WAIT_EVENT (&pThreadCtx[i - id].sSliceDecodeFinish, WELS_DEC_THREAD_WAIT_INFINITE);
  ------------------
  |  |  158|      0|  EventWait(ph, (int32_t)timeout)
  ------------------
 2821|      0|          }
 2822|      0|        }
 2823|      0|        pCtx->pLastDecPicInfo->uiDecodingTimeStamp = pCtx->uiDecodingTimeStamp;
 2824|      0|      }
 2825|  1.06M|      iRet = DecodeFrameConstruction (pCtx, ppDst, pDstInfo);
 2826|  1.06M|      if (iRet) {
  ------------------
  |  Branch (2826:11): [True: 944k, False: 119k]
  ------------------
 2827|   944k|        if (iThreadCount > 1) {
  ------------------
  |  Branch (2827:13): [True: 0, False: 944k]
  ------------------
 2828|      0|          SET_EVENT (&pThreadCtx->sSliceDecodeFinish);
  ------------------
  |  |  149|      0|  EventPost(ph)
  ------------------
 2829|      0|        }
 2830|   944k|        return iRet;
 2831|   944k|      }
 2832|       |
 2833|   119k|      pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb = pCtx->pDec; //store latest decoded picture for EC
 2834|   119k|      pCtx->bUsedAsRef = pCtx->uiNalRefIdc > 0;
 2835|   119k|      if (iThreadCount <= 1) {
  ------------------
  |  Branch (2835:11): [True: 119k, False: 0]
  ------------------
 2836|   119k|        if (pCtx->bUsedAsRef) {
  ------------------
  |  Branch (2836:13): [True: 32.8k, False: 86.2k]
  ------------------
 2837|  98.6k|          for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (2837:42): [True: 65.7k, False: 32.8k]
  ------------------
 2838|  65.7k|            uint32_t i = 0;
 2839|   149k|            while (i < MAX_DPB_COUNT && pCtx->sRefPic.pRefList[listIdx][i]) {
  ------------------
  |  |   49|   298k|#define MAX_DPB_COUNT                   (MAX_REF_PIC_COUNT + 1) // 1 additional position for re-order and other process
  |  |  ------------------
  |  |  |  |   45|   149k|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  |  |  ------------------
  ------------------
  |  Branch (2839:20): [True: 148k, False: 531]
  |  Branch (2839:41): [True: 83.3k, False: 65.2k]
  ------------------
 2840|  83.3k|              pCtx->pDec->pRefPic[listIdx][i] = pCtx->sRefPic.pRefList[listIdx][i];
 2841|  83.3k|              ++i;
 2842|  83.3k|            }
 2843|  65.7k|          }
 2844|  32.8k|          iRet = WelsMarkAsRef (pCtx);
 2845|  32.8k|          if (iRet != ERR_NONE) {
  ------------------
  |  Branch (2845:15): [True: 6.10k, False: 26.7k]
  ------------------
 2846|  6.10k|            if (iRet == ERR_INFO_DUPLICATE_FRAME_NUM)
  ------------------
  |  Branch (2846:17): [True: 2.75k, False: 3.34k]
  ------------------
 2847|  2.75k|              pCtx->iErrorCode |= dsBitstreamError;
 2848|  6.10k|            if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) {
  ------------------
  |  Branch (2848:17): [True: 0, False: 6.10k]
  ------------------
 2849|      0|              pCtx->pDec = NULL;
 2850|      0|              return iRet;
 2851|      0|            }
 2852|  6.10k|          }
 2853|  32.8k|          if (!pCtx->pParam->bParseOnly)
  ------------------
  |  Branch (2853:15): [True: 32.8k, False: 0]
  ------------------
 2854|  32.8k|            ExpandReferencingPicture (pCtx->pDec->pData, pCtx->pDec->iWidthInPixel, pCtx->pDec->iHeightInPixel,
 2855|  32.8k|                                      pCtx->pDec->iLinesize,
 2856|  32.8k|                                      pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture);
 2857|  32.8k|        }
 2858|   119k|      } else if (iThreadCount > 1) {
  ------------------
  |  Branch (2858:18): [True: 0, False: 0]
  ------------------
 2859|      0|        SET_EVENT (&pThreadCtx->sImageReady);
  ------------------
  |  |  149|      0|  EventPost(ph)
  ------------------
 2860|      0|      }
 2861|   119k|      pCtx->pDec = NULL; //after frame decoding, always set to NULL
 2862|   119k|    }
 2863|       |
 2864|       |    // need update frame_num due current frame is well decoded
 2865|   119k|    if (pCurAu->pNalUnitsList[pCurAu->uiStartPos]->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc > 0)
  ------------------
  |  Branch (2865:9): [True: 32.8k, False: 86.2k]
  ------------------
 2866|  32.8k|      pCtx->pLastDecPicInfo->iPrevFrameNum = pSh->iFrameNum;
 2867|   119k|    if (pCtx->pLastDecPicInfo->bLastHasMmco5)
  ------------------
  |  Branch (2867:9): [True: 1.38k, False: 117k]
  ------------------
 2868|  1.38k|      pCtx->pLastDecPicInfo->iPrevFrameNum = 0;
 2869|   119k|    if (iThreadCount > 1) {
  ------------------
  |  Branch (2869:9): [True: 0, False: 119k]
  ------------------
 2870|      0|      int32_t  id = pThreadCtx->sThreadInfo.uiThrNum;
 2871|      0|      for (int32_t i = 0; i < iThreadCount; ++i) {
  ------------------
  |  Branch (2871:27): [True: 0, False: 0]
  ------------------
 2872|      0|        if (pThreadCtx[i - id].pCtx != NULL) {
  ------------------
  |  Branch (2872:13): [True: 0, False: 0]
  ------------------
 2873|      0|          unsigned long long uiTimeStamp = pThreadCtx[i - id].pCtx->uiTimeStamp;
 2874|      0|          if (uiTimeStamp > 0 && pThreadCtx[i - id].pCtx->sSpsPpsCtx.iSeqId > pCtx->sSpsPpsCtx.iSeqId) {
  ------------------
  |  Branch (2874:15): [True: 0, False: 0]
  |  Branch (2874:34): [True: 0, False: 0]
  ------------------
 2875|      0|            CopySpsPps (pThreadCtx[i - id].pCtx, pCtx);
 2876|      0|            if (pCtx->pPicBuff != pThreadCtx[i - id].pCtx->pPicBuff) {
  ------------------
  |  Branch (2876:17): [True: 0, False: 0]
  ------------------
 2877|      0|              pCtx->pPicBuff = pThreadCtx[i - id].pCtx->pPicBuff;
 2878|      0|            }
 2879|      0|            InitialDqLayersContext (pCtx, pCtx->pSps->iMbWidth << 4, pCtx->pSps->iMbHeight << 4);
 2880|      0|            break;
 2881|      0|          }
 2882|      0|        }
 2883|      0|      }
 2884|      0|    }
 2885|   119k|    if (iThreadCount > 1) {
  ------------------
  |  Branch (2885:9): [True: 0, False: 119k]
  ------------------
 2886|      0|      SET_EVENT (&pThreadCtx->sSliceDecodeFinish);
  ------------------
  |  |  149|      0|  EventPost(ph)
  ------------------
 2887|      0|    }
 2888|   119k|  }
 2889|   123k|  return ERR_NONE;
 2890|  2.59M|}
_ZN7WelsDec21CheckAndFinishLastPicEPNS_21TagWelsDecoderContextEPPhP13TagBufferInfo:
 2892|  2.88M|bool CheckAndFinishLastPic (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstInfo) {
 2893|  2.88M|  PAccessUnit pAu = pCtx->pAccessUnitList;
 2894|  2.88M|  bool bAuBoundaryFlag = false;
 2895|  2.88M|  if (IS_VCL_NAL (pCtx->sCurNalHead.eNalUnitType, 1)) { //VCL data, AU list should have data
  ------------------
  |  |  144|  2.88M|#define IS_VCL_NAL(t, ext_idx)                  (g_keTypeMap[t][ext_idx] == VCL)
  |  |  ------------------
  |  |  |  Branch (144:49): [True: 2.59M, False: 295k]
  |  |  ------------------
  ------------------
 2896|  2.59M|    PNalUnit pCurNal = pAu->pNalUnitsList[pAu->uiEndPos];
 2897|  2.59M|    bAuBoundaryFlag = (pCtx->iTotalNumMbRec != 0)
  ------------------
  |  Branch (2897:23): [True: 686k, False: 1.90M]
  ------------------
 2898|   686k|                      && (CheckAccessUnitBoundaryExt (&pCtx->pLastDecPicInfo->sLastNalHdrExt, &pCurNal->sNalHeaderExt,
  ------------------
  |  Branch (2898:26): [True: 445k, False: 241k]
  ------------------
 2899|   686k|                          &pCtx->pLastDecPicInfo->sLastSliceHeader,
 2900|   686k|                          &pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader));
 2901|  2.59M|  } else { //non VCL
 2902|   295k|    if (pCtx->sCurNalHead.eNalUnitType == NAL_UNIT_AU_DELIMITER) {
  ------------------
  |  Branch (2902:9): [True: 3.49k, False: 291k]
  ------------------
 2903|  3.49k|      bAuBoundaryFlag = true;
 2904|   291k|    } else if (pCtx->sCurNalHead.eNalUnitType == NAL_UNIT_SEI) {
  ------------------
  |  Branch (2904:16): [True: 685, False: 290k]
  ------------------
 2905|    685|      bAuBoundaryFlag = true;
 2906|   290k|    } else if (pCtx->sCurNalHead.eNalUnitType == NAL_UNIT_SPS) {
  ------------------
  |  Branch (2906:16): [True: 106k, False: 184k]
  ------------------
 2907|   106k|      bAuBoundaryFlag = !! (pCtx->sSpsPpsCtx.iOverwriteFlags & OVERWRITE_SPS);
 2908|   184k|    } else if (pCtx->sCurNalHead.eNalUnitType == NAL_UNIT_SUBSET_SPS) {
  ------------------
  |  Branch (2908:16): [True: 15.6k, False: 168k]
  ------------------
 2909|  15.6k|      bAuBoundaryFlag = !! (pCtx->sSpsPpsCtx.iOverwriteFlags & OVERWRITE_SUBSETSPS);
 2910|   168k|    } else if (pCtx->sCurNalHead.eNalUnitType == NAL_UNIT_PPS) {
  ------------------
  |  Branch (2910:16): [True: 116k, False: 52.3k]
  ------------------
 2911|   116k|      bAuBoundaryFlag = !! (pCtx->sSpsPpsCtx.iOverwriteFlags & OVERWRITE_PPS);
 2912|   116k|    }
 2913|   295k|    if (bAuBoundaryFlag && pCtx->pAccessUnitList->uiAvailUnitsNum != 0) { //Construct remaining data first
  ------------------
  |  Branch (2913:9): [True: 45.1k, False: 249k]
  |  Branch (2913:28): [True: 0, False: 45.1k]
  ------------------
 2914|      0|      ConstructAccessUnit (pCtx, ppDst, pDstInfo);
 2915|      0|    }
 2916|   295k|  }
 2917|       |
 2918|       |  //Do Error Concealment here
 2919|  2.88M|  if (bAuBoundaryFlag && (pCtx->iTotalNumMbRec != 0) && NeedErrorCon (pCtx)) { //AU ready but frame not completely reconed
  ------------------
  |  Branch (2919:7): [True: 490k, False: 2.39M]
  |  Branch (2919:26): [True: 461k, False: 28.3k]
  |  Branch (2919:57): [True: 461k, False: 0]
  ------------------
 2920|   461k|    if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (2920:9): [True: 461k, False: 0]
  ------------------
 2921|   461k|      ImplementErrorCon (pCtx);
 2922|   461k|      pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight;
 2923|   461k|      pCtx->pDec->iSpsId = pCtx->pSps->iSpsId;
 2924|   461k|      pCtx->pDec->iPpsId = pCtx->pPps->iPpsId;
 2925|       |
 2926|   461k|      DecodeFrameConstruction (pCtx, ppDst, pDstInfo);
 2927|   461k|      pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use
 2928|   461k|      if (pCtx->pLastDecPicInfo->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) {
  ------------------
  |  Branch (2928:11): [True: 406k, False: 55.2k]
  ------------------
 2929|   406k|        if (MarkECFrameAsRef (pCtx) == ERR_INFO_INVALID_PTR) {
  ------------------
  |  Branch (2929:13): [True: 0, False: 406k]
  ------------------
 2930|      0|          pCtx->iErrorCode |= dsRefListNullPtrs;
 2931|      0|          return false;
 2932|      0|        }
 2933|   406k|      }
 2934|   461k|    } else if (pCtx->pParam->bParseOnly) { //clear parse only internal data status
  ------------------
  |  Branch (2934:16): [True: 0, False: 0]
  ------------------
 2935|      0|      pCtx->pParserBsInfo->iNalNum = 0;
 2936|      0|      pCtx->bFrameFinish = true; //clear frame pending status here!
 2937|      0|    } else {
 2938|      0|      if (DecodeFrameConstruction (pCtx, ppDst, pDstInfo)) {
  ------------------
  |  Branch (2938:11): [True: 0, False: 0]
  ------------------
 2939|      0|        if ((pCtx->pLastDecPicInfo->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0)
  ------------------
  |  Branch (2939:13): [True: 0, False: 0]
  ------------------
 2940|      0|            && (pCtx->pLastDecPicInfo->sLastNalHdrExt.uiTemporalId == 0))
  ------------------
  |  Branch (2940:16): [True: 0, False: 0]
  ------------------
 2941|      0|          pCtx->iErrorCode |= dsNoParamSets;
 2942|      0|        else
 2943|      0|          pCtx->iErrorCode |= dsBitstreamError;
 2944|      0|        pCtx->pDec = NULL;
 2945|      0|        return false;
 2946|      0|      }
 2947|      0|    }
 2948|   461k|    pCtx->pDec = NULL;
 2949|   461k|    if (pAu->pNalUnitsList[pAu->uiStartPos]->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc > 0)
  ------------------
  |  Branch (2949:9): [True: 407k, False: 54.4k]
  ------------------
 2950|   407k|      pCtx->pLastDecPicInfo->iPrevFrameNum = pCtx->pLastDecPicInfo->sLastSliceHeader.iFrameNum; //save frame_num
 2951|   461k|    if (pCtx->pLastDecPicInfo->bLastHasMmco5)
  ------------------
  |  Branch (2951:9): [True: 945, False: 460k]
  ------------------
 2952|    945|      pCtx->pLastDecPicInfo->iPrevFrameNum = 0;
 2953|   461k|  }
 2954|  2.88M|  return ERR_NONE;
 2955|  2.88M|}
_ZN7WelsDec24CheckRefPicturesCompleteEPNS_21TagWelsDecoderContextE:
 2957|   148k|bool CheckRefPicturesComplete (PWelsDecoderContext pCtx) {
 2958|       |  // Multi Reference, RefIdx may differ
 2959|   148k|  bool bAllRefComplete = true;
 2960|   148k|  int32_t iRealMbIdx = pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iFirstMbInSlice;
 2961|   366k|  for (int32_t iMbIdx = 0; bAllRefComplete
  ------------------
  |  Branch (2961:28): [True: 233k, False: 133k]
  ------------------
 2962|   233k|       && iMbIdx < pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.iTotalMbInCurSlice; iMbIdx++) {
  ------------------
  |  Branch (2962:11): [True: 220k, False: 13.0k]
  ------------------
 2963|   220k|    switch (pCtx->pCurDqLayer->pDec->pMbType[iRealMbIdx]) {
 2964|   138k|    case MB_TYPE_SKIP:
  ------------------
  |  |  283|   138k|#define MB_TYPE_SKIP        0x00000100
  ------------------
  |  Branch (2964:5): [True: 138k, False: 81.8k]
  ------------------
 2965|   140k|    case MB_TYPE_16x16:
  ------------------
  |  |  278|   140k|#define MB_TYPE_16x16       0x00000008
  ------------------
  |  Branch (2965:5): [True: 1.87k, False: 218k]
  ------------------
 2966|   140k|      bAllRefComplete &=
 2967|   140k|        pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][0] ]->bIsComplete;
 2968|   140k|      break;
 2969|       |
 2970|  2.22k|    case MB_TYPE_16x8:
  ------------------
  |  |  279|  2.22k|#define MB_TYPE_16x8        0x00000010
  ------------------
  |  Branch (2970:5): [True: 2.22k, False: 218k]
  ------------------
 2971|  2.22k|      bAllRefComplete &=
 2972|  2.22k|        pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][0] ]->bIsComplete;
 2973|  2.22k|      bAllRefComplete &=
 2974|  2.22k|        pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][8] ]->bIsComplete;
 2975|  2.22k|      break;
 2976|       |
 2977|    491|    case MB_TYPE_8x16:
  ------------------
  |  |  280|    491|#define MB_TYPE_8x16        0x00000020
  ------------------
  |  Branch (2977:5): [True: 491, False: 220k]
  ------------------
 2978|    491|      bAllRefComplete &=
 2979|    491|        pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][0] ]->bIsComplete;
 2980|    491|      bAllRefComplete &=
 2981|    491|        pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][2] ]->bIsComplete;
 2982|    491|      break;
 2983|       |
 2984|    354|    case MB_TYPE_8x8:
  ------------------
  |  |  281|    354|#define MB_TYPE_8x8         0x00000040
  ------------------
  |  Branch (2984:5): [True: 354, False: 220k]
  ------------------
 2985|    629|    case MB_TYPE_8x8_REF0:
  ------------------
  |  |  282|    629|#define MB_TYPE_8x8_REF0    0x00000080
  ------------------
  |  Branch (2985:5): [True: 275, False: 220k]
  ------------------
 2986|    629|      bAllRefComplete &=
 2987|    629|        pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][0] ]->bIsComplete;
 2988|    629|      bAllRefComplete &=
 2989|    629|        pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][2] ]->bIsComplete;
 2990|    629|      bAllRefComplete &=
 2991|    629|        pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][8] ]->bIsComplete;
 2992|    629|      bAllRefComplete &=
 2993|    629|        pCtx->sRefPic.pRefList[ LIST_0 ][ pCtx->pCurDqLayer->pDec->pRefIndex[0][iRealMbIdx][10] ]->bIsComplete;
 2994|    629|      break;
 2995|       |
 2996|  76.6k|    default:
  ------------------
  |  Branch (2996:5): [True: 76.6k, False: 143k]
  ------------------
 2997|  76.6k|      break;
 2998|   220k|    }
 2999|   220k|    iRealMbIdx = (pCtx->pPps->uiNumSliceGroups > 1) ? FmoNextMb (pCtx->pFmo, iRealMbIdx) :
  ------------------
  |  Branch (2999:18): [True: 59.2k, False: 161k]
  ------------------
 3000|   220k|                 (pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iFirstMbInSlice + iMbIdx);
 3001|   220k|    if (iRealMbIdx == -1) //caused by abnormal return of FmoNextMb()
  ------------------
  |  Branch (3001:9): [True: 1.90k, False: 218k]
  ------------------
 3002|  1.90k|      return false;
 3003|   220k|  }
 3004|       |
 3005|   146k|  return bAllRefComplete;
 3006|   148k|}
decoder_core.cpp:_ZN7WelsDecL25WriteBackActiveParametersEPNS_21TagWelsDecoderContextE:
 2216|  8.04M|static void WriteBackActiveParameters (PWelsDecoderContext pCtx) {
 2217|  8.04M|  if (pCtx->sSpsPpsCtx.iOverwriteFlags & OVERWRITE_PPS) {
  ------------------
  |  Branch (2217:7): [True: 32.6k, False: 8.01M]
  ------------------
 2218|  32.6k|    memcpy (&pCtx->sSpsPpsCtx.sPpsBuffer[pCtx->sSpsPpsCtx.sPpsBuffer[MAX_PPS_COUNT].iPpsId],
  ------------------
  |  |   43|  32.6k|#define MAX_PPS_COUNT                   256     // Count number of PPS
  ------------------
 2219|  32.6k|            &pCtx->sSpsPpsCtx.sPpsBuffer[MAX_PPS_COUNT], sizeof (SPps));
  ------------------
  |  |   43|  32.6k|#define MAX_PPS_COUNT                   256     // Count number of PPS
  ------------------
 2220|  32.6k|  }
 2221|  8.04M|  if (pCtx->sSpsPpsCtx.iOverwriteFlags & OVERWRITE_SPS) {
  ------------------
  |  Branch (2221:7): [True: 8.05k, False: 8.03M]
  ------------------
 2222|  8.05k|    memcpy (&pCtx->sSpsPpsCtx.sSpsBuffer[pCtx->sSpsPpsCtx.sSpsBuffer[MAX_SPS_COUNT].iSpsId],
  ------------------
  |  |   59|  8.05k|#define MAX_SPS_COUNT           32      // Count number of SPS
  ------------------
 2223|  8.05k|            &pCtx->sSpsPpsCtx.sSpsBuffer[MAX_SPS_COUNT], sizeof (SSps));
  ------------------
  |  |   59|  8.05k|#define MAX_SPS_COUNT           32      // Count number of SPS
  ------------------
 2224|  8.05k|    pCtx->bNewSeqBegin = true;
 2225|  8.05k|  }
 2226|  8.04M|  if (pCtx->sSpsPpsCtx.iOverwriteFlags & OVERWRITE_SUBSETSPS) {
  ------------------
  |  Branch (2226:7): [True: 269, False: 8.04M]
  ------------------
 2227|    269|    memcpy (&pCtx->sSpsPpsCtx.sSubsetSpsBuffer[pCtx->sSpsPpsCtx.sSubsetSpsBuffer[MAX_SPS_COUNT].sSps.iSpsId],
  ------------------
  |  |   59|    269|#define MAX_SPS_COUNT           32      // Count number of SPS
  ------------------
 2228|    269|            &pCtx->sSpsPpsCtx.sSubsetSpsBuffer[MAX_SPS_COUNT], sizeof (SSubsetSps));
  ------------------
  |  |   59|    269|#define MAX_SPS_COUNT           32      // Count number of SPS
  ------------------
 2229|    269|    pCtx->bNewSeqBegin = true;
 2230|    269|  }
 2231|  8.04M|  pCtx->sSpsPpsCtx.iOverwriteFlags = OVERWRITE_NONE;
 2232|  8.04M|}
decoder_core.cpp:_ZN7WelsDecL39CheckNewSeqBeginAndUpdateActiveLayerSpsEPNS_21TagWelsDecoderContextE:
 2170|  2.59M|static bool CheckNewSeqBeginAndUpdateActiveLayerSps (PWelsDecoderContext pCtx) {
 2171|  2.59M|  bool bNewSeq = false;
 2172|  2.59M|  PAccessUnit pCurAu = pCtx->pAccessUnitList;
 2173|  2.59M|  PSps pTmpLayerSps[MAX_LAYER_NUM];
 2174|  23.3M|  for (int i = 0; i < MAX_LAYER_NUM; i++) {
  ------------------
  |  |   55|  23.3M|#define MAX_LAYER_NUM                   8
  ------------------
  |  Branch (2174:19): [True: 20.7M, False: 2.59M]
  ------------------
 2175|  20.7M|    pTmpLayerSps[i] = NULL;
 2176|  20.7M|  }
 2177|       |  // track the layer sps for the current au
 2178|  5.18M|  for (unsigned int i = pCurAu->uiStartPos; i <= pCurAu->uiEndPos; i++) {
  ------------------
  |  Branch (2178:45): [True: 2.59M, False: 2.59M]
  ------------------
 2179|  2.59M|    uint32_t uiDid = pCurAu->pNalUnitsList[i]->sNalHeaderExt.uiDependencyId;
 2180|  2.59M|    pTmpLayerSps[uiDid] = pCurAu->pNalUnitsList[i]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pSps;
 2181|  2.59M|    if ((pCurAu->pNalUnitsList[i]->sNalHeaderExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_CODED_SLICE_IDR)
  ------------------
  |  Branch (2181:9): [True: 168k, False: 2.42M]
  ------------------
 2182|  2.42M|        || (pCurAu->pNalUnitsList[i]->sNalHeaderExt.bIdrFlag))
  ------------------
  |  Branch (2182:12): [True: 10.6k, False: 2.41M]
  ------------------
 2183|   178k|      bNewSeq = true;
 2184|  2.59M|  }
 2185|  2.59M|  int iMaxActiveLayer = 0, iMaxCurrentLayer = 0;
 2186|  20.9M|  for (int i = MAX_LAYER_NUM - 1; i >= 0; i--) {
  ------------------
  |  |   55|  2.59M|#define MAX_LAYER_NUM                   8
  ------------------
  |  Branch (2186:35): [True: 20.7M, False: 171k]
  ------------------
 2187|  20.7M|    if (pCtx->sSpsPpsCtx.pActiveLayerSps[i] != NULL) {
  ------------------
  |  Branch (2187:9): [True: 2.42M, False: 18.3M]
  ------------------
 2188|  2.42M|      iMaxActiveLayer = i;
 2189|  2.42M|      break;
 2190|  2.42M|    }
 2191|  20.7M|  }
 2192|  20.7M|  for (int i = MAX_LAYER_NUM - 1; i >= 0; i--) {
  ------------------
  |  |   55|  2.59M|#define MAX_LAYER_NUM                   8
  ------------------
  |  Branch (2192:35): [True: 20.7M, False: 0]
  ------------------
 2193|  20.7M|    if (pTmpLayerSps[i] != NULL) {
  ------------------
  |  Branch (2193:9): [True: 2.59M, False: 18.1M]
  ------------------
 2194|  2.59M|      iMaxCurrentLayer = i;
 2195|  2.59M|      break;
 2196|  2.59M|    }
 2197|  20.7M|  }
 2198|  2.59M|  if ((iMaxCurrentLayer != iMaxActiveLayer)
  ------------------
  |  Branch (2198:7): [True: 1.20k, False: 2.59M]
  ------------------
 2199|  2.59M|      || (pTmpLayerSps[iMaxCurrentLayer]  != pCtx->sSpsPpsCtx.pActiveLayerSps[iMaxActiveLayer])) {
  ------------------
  |  Branch (2199:10): [True: 178k, False: 2.41M]
  ------------------
 2200|   179k|    bNewSeq = true;
 2201|   179k|  }
 2202|       |  // fill active sps if the current sps is not null while active layer is null
 2203|  2.59M|  if (!bNewSeq) {
  ------------------
  |  Branch (2203:7): [True: 2.37M, False: 220k]
  ------------------
 2204|  21.3M|    for (int i = 0; i < MAX_LAYER_NUM; i++) {
  ------------------
  |  |   55|  21.3M|#define MAX_LAYER_NUM                   8
  ------------------
  |  Branch (2204:21): [True: 18.9M, False: 2.37M]
  ------------------
 2205|  18.9M|      if (pCtx->sSpsPpsCtx.pActiveLayerSps[i] == NULL && pTmpLayerSps[i] != NULL) {
  ------------------
  |  Branch (2205:11): [True: 16.6M, False: 2.37M]
  |  Branch (2205:58): [True: 0, False: 16.6M]
  ------------------
 2206|      0|        pCtx->sSpsPpsCtx.pActiveLayerSps[i] = pTmpLayerSps[i];
 2207|      0|      }
 2208|  18.9M|    }
 2209|  2.37M|  } else {
 2210|       |    // UpdateActiveLayerSps if new sequence start
 2211|   220k|    memcpy (&pCtx->sSpsPpsCtx.pActiveLayerSps[0], &pTmpLayerSps[0], MAX_LAYER_NUM * sizeof (PSps));
  ------------------
  |  |   55|   220k|#define MAX_LAYER_NUM                   8
  ------------------
 2212|   220k|  }
 2213|  2.59M|  return bNewSeq;
 2214|  2.59M|}
_ZN7WelsDec13GetTargetDqIdEhP19TagSVCDecodingParam:
  289|  2.59M|inline uint8_t GetTargetDqId (uint8_t uiTargetDqId,  SDecodingParam* psParam) {
  290|  2.59M|  uint8_t  uiRequiredDqId = psParam ? psParam->uiTargetDqLayer : (uint8_t)255;
  ------------------
  |  Branch (290:29): [True: 2.59M, False: 0]
  ------------------
  291|       |
  292|  2.59M|  return WELS_MIN (uiTargetDqId, uiRequiredDqId);
  ------------------
  |  |   95|  2.59M|#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (95:25): [True: 0, False: 2.59M]
  |  |  ------------------
  ------------------
  293|  2.59M|}
_ZN7WelsDec25CheckSliceNeedReconstructEhh:
  285|  2.58M|inline bool    CheckSliceNeedReconstruct (uint8_t uiLayerDqId, uint8_t uiTargetDqId) {
  286|  2.58M|  return (uiLayerDqId == uiTargetDqId); // target layer
  287|  2.58M|}
decoder_core.cpp:_ZN7WelsDecL15InitDqLayerInfoEPNS_10TagDqLayerEPNS_12TagLayerInfoEPNS_10TagNalUnitEPNS_8SPictureE:
 2378|  2.58M|static inline void InitDqLayerInfo (PDqLayer pDqLayer, PLayerInfo pLayerInfo, PNalUnit pNalUnit, PPicture pPicDec) {
 2379|  2.58M|  PNalUnitHeaderExt pNalHdrExt    = &pNalUnit->sNalHeaderExt;
 2380|  2.58M|  PSliceHeaderExt pShExt          = &pNalUnit->sNalData.sVclNal.sSliceHeaderExt;
 2381|  2.58M|  PSliceHeader pSh                = &pShExt->sSliceHeader;
 2382|  2.58M|  const uint8_t kuiQualityId      = pNalHdrExt->uiQualityId;
 2383|       |
 2384|  2.58M|  memcpy (&pDqLayer->sLayerInfo, pLayerInfo, sizeof (SLayerInfo)); //confirmed_safe_unsafe_usage
 2385|       |
 2386|  2.58M|  pDqLayer->pDec        = pPicDec;
 2387|  2.58M|  pDqLayer->iMbWidth    = pSh->iMbWidth;        // MB width of this picture
 2388|  2.58M|  pDqLayer->iMbHeight   = pSh->iMbHeight;// MB height of this picture
 2389|       |
 2390|  2.58M|  pDqLayer->iSliceIdcBackup = (pSh->iFirstMbInSlice << 7) | (pNalHdrExt->uiDependencyId << 4) | (pNalHdrExt->uiQualityId);
 2391|       |
 2392|       |  /* Common syntax elements across all slices of a DQLayer */
 2393|  2.58M|  pDqLayer->uiPpsId                                     = pLayerInfo->pPps->iPpsId;
 2394|  2.58M|  pDqLayer->uiDisableInterLayerDeblockingFilterIdc      = pShExt->uiDisableInterLayerDeblockingFilterIdc;
 2395|  2.58M|  pDqLayer->iInterLayerSliceAlphaC0Offset               = pShExt->iInterLayerSliceAlphaC0Offset;
 2396|  2.58M|  pDqLayer->iInterLayerSliceBetaOffset                  = pShExt->iInterLayerSliceBetaOffset;
 2397|  2.58M|  pDqLayer->iSliceGroupChangeCycle                      = pSh->iSliceGroupChangeCycle;
 2398|  2.58M|  pDqLayer->bStoreRefBasePicFlag                        = pShExt->bStoreRefBasePicFlag;
 2399|  2.58M|  pDqLayer->bTCoeffLevelPredFlag                        = pShExt->bTCoeffLevelPredFlag;
 2400|  2.58M|  pDqLayer->bConstrainedIntraResamplingFlag             = pShExt->bConstrainedIntraResamplingFlag;
 2401|  2.58M|  pDqLayer->uiRefLayerDqId                              = pShExt->uiRefLayerDqId;
 2402|  2.58M|  pDqLayer->uiRefLayerChromaPhaseXPlus1Flag             = pShExt->uiRefLayerChromaPhaseXPlus1Flag;
 2403|  2.58M|  pDqLayer->uiRefLayerChromaPhaseYPlus1                 = pShExt->uiRefLayerChromaPhaseYPlus1;
 2404|  2.58M|  pDqLayer->bUseWeightPredictionFlag                    = false;
 2405|  2.58M|  pDqLayer->bUseWeightedBiPredIdc = false;
 2406|       |  //memcpy(&pDqLayer->sScaledRefLayer, &pShExt->sScaledRefLayer, sizeof(SPosOffset));//confirmed_safe_unsafe_usage
 2407|       |
 2408|  2.58M|  if (kuiQualityId == BASE_QUALITY_ID) {
  ------------------
  |  |   60|  2.58M|#define BASE_QUALITY_ID         0
  ------------------
  |  Branch (2408:7): [True: 2.58M, False: 0]
  ------------------
 2409|  2.58M|    pDqLayer->pRefPicListReordering = &pSh->pRefPicListReordering;
 2410|  2.58M|    pDqLayer->pRefPicMarking = &pSh->sRefMarking;
 2411|       |
 2412|  2.58M|    pDqLayer->bUseWeightPredictionFlag = pSh->pPps->bWeightedPredFlag;
 2413|  2.58M|    pDqLayer->bUseWeightedBiPredIdc = pSh->pPps->uiWeightedBipredIdc != 0;
 2414|  2.58M|    if (pSh->pPps->bWeightedPredFlag || pSh->pPps->uiWeightedBipredIdc) {
  ------------------
  |  Branch (2414:9): [True: 201k, False: 2.38M]
  |  Branch (2414:41): [True: 2.14M, False: 241k]
  ------------------
 2415|  2.34M|      pDqLayer->pPredWeightTable = &pSh->sPredWeightTable;
 2416|  2.34M|    }
 2417|  2.58M|    pDqLayer->pRefPicBaseMarking        = &pShExt->sRefBasePicMarking;
 2418|  2.58M|  }
 2419|       |
 2420|  2.58M|  pDqLayer->uiLayerDqId                 = pNalHdrExt->uiLayerDqId;      // dq_id of current layer
 2421|  2.58M|  pDqLayer->bUseRefBasePicFlag          = pNalHdrExt->bUseRefBasePicFlag;
 2422|  2.58M|}
_ZN7WelsDec19HandleReferenceLostEPNS_21TagWelsDecoderContextEPNS_10TagNalUnitE:
  303|  6.72k|inline void    HandleReferenceLost (PWelsDecoderContext pCtx, PNalUnit pCurNal) {
  304|  6.72k|  if ((0 == pCurNal->sNalHeaderExt.uiTemporalId) || (1 == pCurNal->sNalHeaderExt.uiTemporalId)) {
  ------------------
  |  Branch (304:7): [True: 6.20k, False: 513]
  |  Branch (304:53): [True: 206, False: 307]
  ------------------
  305|  6.41k|    pCtx->bReferenceLostAtT0Flag = true;
  306|  6.41k|  }
  307|  6.72k|  pCtx->iErrorCode |= dsRefLost;
  308|  6.72k|}
_ZN7WelsDec21HandleReferenceLostL0EPNS_21TagWelsDecoderContextEPNS_10TagNalUnitE:
  296|  3.90M|inline void    HandleReferenceLostL0 (PWelsDecoderContext pCtx, PNalUnit pCurNal) {
  297|  3.90M|  if (0 == pCurNal->sNalHeaderExt.uiTemporalId) {
  ------------------
  |  Branch (297:7): [True: 3.89M, False: 10.2k]
  ------------------
  298|  3.89M|    pCtx->bReferenceLostAtT0Flag = true;
  299|  3.89M|  }
  300|  3.90M|  pCtx->iErrorCode |= dsBitstreamError;
  301|  3.90M|}
_ZN7WelsDec24WelsDecodeConstructSliceEPNS_21TagWelsDecoderContextEPNS_10TagNalUnitE:
  310|  2.58M|inline int32_t  WelsDecodeConstructSlice (PWelsDecoderContext pCtx, PNalUnit pCurNal) {
  311|  2.58M|  int32_t  iRet = WelsTargetSliceConstruction (pCtx);
  312|       |
  313|  2.58M|  if (iRet) {
  ------------------
  |  Branch (313:7): [True: 1.52M, False: 1.06M]
  ------------------
  314|  1.52M|    HandleReferenceLostL0 (pCtx, pCurNal);
  315|  1.52M|  }
  316|       |
  317|  2.58M|  return iRet;
  318|  2.58M|}
decoder_core.cpp:_ZN7WelsDecL23DecodeFrameConstructionEPNS_21TagWelsDecoderContextEPPhP13TagBufferInfo:
   47|  1.52M|static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstInfo) {
   48|  1.52M|  PDqLayer pCurDq = pCtx->pCurDqLayer;
   49|  1.52M|  PPicture pPic = pCtx->pDec;
   50|       |
   51|  1.52M|  const int32_t kiWidth = pCurDq->iMbWidth << 4;
   52|  1.52M|  const int32_t kiHeight = pCurDq->iMbHeight << 4;
   53|       |
   54|  1.52M|  const int32_t kiTotalNumMbInCurLayer = pCurDq->iMbWidth * pCurDq->iMbHeight;
   55|  1.52M|  bool bFrameCompleteFlag = true;
   56|       |
   57|  1.52M|  if (pPic->bNewSeqBegin) {
  ------------------
  |  Branch (57:7): [True: 292k, False: 1.23M]
  ------------------
   58|   292k|    memcpy (& (pCtx->sFrameCrop), & (pCurDq->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.pSps->sFrameCrop),
   59|   292k|            sizeof (SPosOffset)); //confirmed_safe_unsafe_usage
   60|   292k|#ifdef LONG_TERM_REF
   61|   292k|    pCtx->bParamSetsLostFlag      = false;
   62|       |#else
   63|       |    pCtx->bReferenceLostAtT0Flag = false; // need initialize it due new seq, 6/4/2010
   64|       |#endif //LONG_TERM_REF
   65|   292k|    if (pCtx->iTotalNumMbRec == kiTotalNumMbInCurLayer) {
  ------------------
  |  Branch (65:9): [True: 30.2k, False: 261k]
  ------------------
   66|  30.2k|      pCtx->bPrintFrameErrorTraceFlag = true;
   67|  30.2k|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO,
   68|  30.2k|               "DecodeFrameConstruction(): will output first frame of new sequence, %d x %d, crop_left:%d, crop_right:%d, crop_top:%d, crop_bottom:%d, ignored error packet:%d.",
   69|  30.2k|               kiWidth, kiHeight, pCtx->sFrameCrop.iLeftOffset, pCtx->sFrameCrop.iRightOffset, pCtx->sFrameCrop.iTopOffset,
   70|  30.2k|               pCtx->sFrameCrop.iBottomOffset, pCtx->iIgnoredErrorInfoPacketCount);
   71|  30.2k|      pCtx->iIgnoredErrorInfoPacketCount = 0;
   72|  30.2k|    }
   73|   292k|  }
   74|       |
   75|  1.52M|  const int32_t kiActualWidth = kiWidth - (pCtx->sFrameCrop.iLeftOffset + pCtx->sFrameCrop.iRightOffset) * 2;
   76|  1.52M|  const int32_t kiActualHeight = kiHeight - (pCtx->sFrameCrop.iTopOffset + pCtx->sFrameCrop.iBottomOffset) * 2;
   77|       |
   78|       |
   79|  1.52M|  if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) {
  ------------------
  |  Branch (79:7): [True: 0, False: 1.52M]
  ------------------
   80|      0|    if ((pCtx->pDecoderStatistics->uiWidth != (unsigned int) kiActualWidth)
  ------------------
  |  Branch (80:9): [True: 0, False: 0]
  ------------------
   81|      0|        || (pCtx->pDecoderStatistics->uiHeight != (unsigned int) kiActualHeight)) {
  ------------------
  |  Branch (81:12): [True: 0, False: 0]
  ------------------
   82|      0|      pCtx->pDecoderStatistics->uiResolutionChangeTimes++;
   83|      0|      pCtx->pDecoderStatistics->uiWidth = kiActualWidth;
   84|      0|      pCtx->pDecoderStatistics->uiHeight = kiActualHeight;
   85|      0|    }
   86|      0|    UpdateDecStatNoFreezingInfo (pCtx);
   87|      0|  }
   88|       |
   89|  1.52M|  if (pCtx->pParam->bParseOnly) { //should exit for parse only to prevent access NULL pDstInfo
  ------------------
  |  Branch (89:7): [True: 0, False: 1.52M]
  ------------------
   90|      0|    PAccessUnit pCurAu = pCtx->pAccessUnitList;
   91|      0|    if (dsErrorFree == pCtx->iErrorCode) { //correct decoding, add to data buffer
  ------------------
  |  Branch (91:9): [True: 0, False: 0]
  ------------------
   92|      0|      SParserBsInfo* pParser = pCtx->pParserBsInfo;
   93|      0|      SNalUnit* pCurNal = NULL;
   94|      0|      int32_t iTotalNalLen = 0;
   95|      0|      int32_t iNalLen = 0;
   96|      0|      int32_t iNum = 0;
   97|      0|      while (iNum < pParser->iNalNum) {
  ------------------
  |  Branch (97:14): [True: 0, False: 0]
  ------------------
   98|      0|        iTotalNalLen += pParser->pNalLenInByte[iNum++];
   99|      0|      }
  100|      0|      uint8_t* pDstBuf = pParser->pDstBuff + iTotalNalLen;
  101|      0|      int32_t iIdx = pCurAu->uiStartPos;
  102|      0|      int32_t iEndIdx = pCurAu->uiEndPos;
  103|      0|      uint8_t* pNalBs = NULL;
  104|      0|      pParser->uiOutBsTimeStamp = (pCurAu->pNalUnitsList [iIdx]) ? pCurAu->pNalUnitsList [iIdx]->uiTimeStamp : 0;
  ------------------
  |  Branch (104:35): [True: 0, False: 0]
  ------------------
  105|       |      //pParser->iNalNum = 0;
  106|      0|      pParser->iSpsWidthInPixel = (pCtx->pSps->iMbWidth << 4) - ((pCtx->pSps->sFrameCrop.iLeftOffset +
  107|      0|                                  pCtx->pSps->sFrameCrop.iRightOffset) << 1);
  108|      0|      pParser->iSpsHeightInPixel = (pCtx->pSps->iMbHeight << 4) - ((pCtx->pSps->sFrameCrop.iTopOffset +
  109|      0|                                   pCtx->pSps->sFrameCrop.iBottomOffset) << 1);
  110|       |
  111|      0|      if (pCurAu->pNalUnitsList [iIdx]->sNalHeaderExt.bIdrFlag) { //IDR
  ------------------
  |  Branch (111:11): [True: 0, False: 0]
  ------------------
  112|      0|        if (pCtx->bFrameFinish) { //add required sps/pps
  ------------------
  |  Branch (112:13): [True: 0, False: 0]
  ------------------
  113|      0|          if (pParser->iNalNum > pCtx->iMaxNalNum - 2) { //2 reserved for sps+pps
  ------------------
  |  Branch (113:15): [True: 0, False: 0]
  ------------------
  114|      0|            WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO,
  115|      0|                     "DecodeFrameConstruction(): current NAL num (%d) plus sps & pps exceeds permitted num (%d). Will expand",
  116|      0|                     pParser->iNalNum, pCtx->iMaxNalNum);
  117|      0|            WELS_VERIFY_RETURN_IF (ERR_INFO_OUT_OF_MEMORY, ExpandBsLenBuffer (pCtx, pParser->iNalNum + 2))
  ------------------
  |  |  239|      0|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
  118|      0|          }
  119|      0|          bool bSubSps = (NAL_UNIT_CODED_SLICE_EXT == pCurAu->pNalUnitsList [iIdx]->sNalHeaderExt.sNalUnitHeader.eNalUnitType);
  120|      0|          SSpsBsInfo* pSpsBs = NULL;
  121|      0|          SPpsBsInfo* pPpsBs = NULL;
  122|      0|          int32_t iSpsId = pCtx->pSps->iSpsId;
  123|      0|          int32_t iPpsId = pCtx->pPps->iPpsId;
  124|      0|          pCtx->bParamSetsLostFlag = false;
  125|       |          //find required sps, pps and write into dst buff
  126|      0|          pSpsBs = bSubSps ? &pCtx->sSubsetSpsBsInfo [iSpsId] : &pCtx->sSpsBsInfo [iSpsId];
  ------------------
  |  Branch (126:20): [True: 0, False: 0]
  ------------------
  127|      0|          pPpsBs = &pCtx->sPpsBsInfo [iPpsId];
  128|      0|          if (pDstBuf - pParser->pDstBuff + pSpsBs->uiSpsBsLen + pPpsBs->uiPpsBsLen >= MAX_ACCESS_UNIT_CAPACITY) {
  ------------------
  |  |   62|      0|#define MAX_ACCESS_UNIT_CAPACITY 7077888 //Maximum AU size in bytes for level 5.2 for single frame
  ------------------
  |  Branch (128:15): [True: 0, False: 0]
  ------------------
  129|      0|            WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR,
  130|      0|                     "DecodeFrameConstruction(): sps pps size: (%d %d) too large. Failed to parse. \n", pSpsBs->uiSpsBsLen,
  131|      0|                     pPpsBs->uiPpsBsLen);
  132|      0|            pCtx->iErrorCode |= dsOutOfMemory;
  133|      0|            pCtx->pParserBsInfo->iNalNum = 0;
  134|      0|            return ERR_INFO_OUT_OF_MEMORY;
  135|      0|          }
  136|      0|          memcpy (pDstBuf, pSpsBs->pSpsBsBuf, pSpsBs->uiSpsBsLen);
  137|      0|          pParser->pNalLenInByte [pParser->iNalNum ++] = pSpsBs->uiSpsBsLen;
  138|      0|          pDstBuf += pSpsBs->uiSpsBsLen;
  139|      0|          memcpy (pDstBuf, pPpsBs->pPpsBsBuf, pPpsBs->uiPpsBsLen);
  140|      0|          pParser->pNalLenInByte [pParser->iNalNum ++] = pPpsBs->uiPpsBsLen;
  141|      0|          pDstBuf += pPpsBs->uiPpsBsLen;
  142|      0|          pCtx->bFrameFinish = false;
  143|      0|        }
  144|      0|      }
  145|       |      //then VCL data re-write
  146|      0|      if (pParser->iNalNum + iEndIdx - iIdx + 1 > pCtx->iMaxNalNum) { //calculate total NAL num
  ------------------
  |  Branch (146:11): [True: 0, False: 0]
  ------------------
  147|      0|        WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO,
  148|      0|                 "DecodeFrameConstruction(): current NAL num (%d) exceeds permitted num (%d). Will expand",
  149|      0|                 pParser->iNalNum + iEndIdx - iIdx + 1, pCtx->iMaxNalNum);
  150|      0|        WELS_VERIFY_RETURN_IF (ERR_INFO_OUT_OF_MEMORY, ExpandBsLenBuffer (pCtx, pParser->iNalNum + iEndIdx - iIdx + 1))
  ------------------
  |  |  239|      0|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 0]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
  151|      0|      }
  152|      0|      while (iIdx <= iEndIdx) {
  ------------------
  |  Branch (152:14): [True: 0, False: 0]
  ------------------
  153|      0|        pCurNal = pCurAu->pNalUnitsList [iIdx ++];
  154|      0|        iNalLen = pCurNal->sNalData.sVclNal.iNalLength;
  155|      0|        pNalBs = pCurNal->sNalData.sVclNal.pNalPos;
  156|      0|        pParser->pNalLenInByte [pParser->iNalNum ++] = iNalLen;
  157|      0|        if (pDstBuf - pParser->pDstBuff + iNalLen >= MAX_ACCESS_UNIT_CAPACITY) {
  ------------------
  |  |   62|      0|#define MAX_ACCESS_UNIT_CAPACITY 7077888 //Maximum AU size in bytes for level 5.2 for single frame
  ------------------
  |  Branch (157:13): [True: 0, False: 0]
  ------------------
  158|      0|          WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR,
  159|      0|                   "DecodeFrameConstruction(): composed output size (%ld) exceeds (%d). Failed to parse. current data pos %d out of %d:, previously accumulated num: %d, total num: %d, previously accumulated len: %d, current len: %d, current buf pos: %p, header buf pos: %p \n",
  160|      0|                   (long) (pDstBuf - pParser->pDstBuff + iNalLen), MAX_ACCESS_UNIT_CAPACITY, iIdx, iEndIdx, iNum, pParser->iNalNum,
  ------------------
  |  |   62|      0|#define MAX_ACCESS_UNIT_CAPACITY 7077888 //Maximum AU size in bytes for level 5.2 for single frame
  ------------------
  161|      0|                   iTotalNalLen, iNalLen, pDstBuf, pParser->pDstBuff);
  162|      0|          pCtx->iErrorCode |= dsOutOfMemory;
  163|      0|          pCtx->pParserBsInfo->iNalNum = 0;
  164|      0|          return ERR_INFO_OUT_OF_MEMORY;
  165|      0|        }
  166|       |
  167|      0|        memcpy (pDstBuf, pNalBs, iNalLen);
  168|      0|        pDstBuf += iNalLen;
  169|      0|      }
  170|      0|      if (pCtx->iTotalNumMbRec == kiTotalNumMbInCurLayer) { //frame complete
  ------------------
  |  Branch (170:11): [True: 0, False: 0]
  ------------------
  171|      0|        pCtx->iTotalNumMbRec = 0;
  172|      0|        pCtx->bFramePending = false;
  173|      0|        pCtx->bFrameFinish = true; //finish current frame and mark it
  174|      0|      } else if (pCtx->iTotalNumMbRec != 0) { //frame incomplete
  ------------------
  |  Branch (174:18): [True: 0, False: 0]
  ------------------
  175|      0|        pCtx->bFramePending = true;
  176|      0|        pCtx->pDec->bIsComplete = false;
  177|      0|        pCtx->bFrameFinish = false; //current frame not finished
  178|      0|        pCtx->iErrorCode |= dsFramePending;
  179|      0|        return ERR_INFO_PARSEONLY_PENDING;
  180|       |        //pCtx->pParserBsInfo->iNalNum = 0;
  181|      0|      }
  182|      0|    } else { //error
  183|      0|      pCtx->pParserBsInfo->uiOutBsTimeStamp = 0;
  184|      0|      pCtx->pParserBsInfo->iNalNum = 0;
  185|      0|      pCtx->pParserBsInfo->iSpsWidthInPixel = 0;
  186|      0|      pCtx->pParserBsInfo->iSpsHeightInPixel = 0;
  187|      0|      return ERR_INFO_PARSEONLY_ERROR;
  188|      0|    }
  189|      0|    return ERR_NONE;
  190|      0|  }
  191|       |
  192|  1.52M|  if (pCtx->iTotalNumMbRec != kiTotalNumMbInCurLayer) {
  ------------------
  |  Branch (192:7): [True: 944k, False: 580k]
  ------------------
  193|   944k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,
  194|   944k|             "DecodeFrameConstruction(): iTotalNumMbRec:%d, total_num_mb_sps:%d, cur_layer_mb_width:%d, cur_layer_mb_height:%d ",
  195|   944k|             pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight);
  196|   944k|    bFrameCompleteFlag = false; //return later after output buffer is done
  197|   944k|    if (pCtx->bInstantDecFlag) { //no-delay decoding, wait for new slice
  ------------------
  |  Branch (197:9): [True: 944k, False: 0]
  ------------------
  198|   944k|      return ERR_INFO_MB_NUM_INADEQUATE;
  199|   944k|    }
  200|   944k|  } else if (pCurDq->sLayerInfo.sNalHeaderExt.bIdrFlag
  ------------------
  |  Branch (200:14): [True: 7.04k, False: 573k]
  ------------------
  201|  7.04k|             && (pCtx->iErrorCode == dsErrorFree)) { //complete non-ECed IDR frame done
  ------------------
  |  Branch (201:17): [True: 841, False: 6.20k]
  ------------------
  202|    841|    pCtx->pDec->bIsComplete = true;
  203|    841|    pCtx->bFreezeOutput = false;
  204|    841|  }
  205|       |
  206|   580k|  pCtx->iTotalNumMbRec = 0;
  207|       |
  208|       |  //////output:::normal path
  209|   580k|  pDstInfo->uiOutYuvTimeStamp = pPic->uiTimeStamp;
  210|   580k|  ppDst[0]      = pPic->pData[0];
  211|   580k|  ppDst[1]      = pPic->pData[1];
  212|   580k|  ppDst[2]      = pPic->pData[2];
  213|       |
  214|   580k|  pDstInfo->UsrData.sSystemBuffer.iFormat = videoFormatI420;
  215|       |
  216|   580k|  pDstInfo->UsrData.sSystemBuffer.iWidth = kiActualWidth;
  217|   580k|  pDstInfo->UsrData.sSystemBuffer.iHeight = kiActualHeight;
  218|   580k|  pDstInfo->UsrData.sSystemBuffer.iStride[0] = pPic->iLinesize[0];
  219|   580k|  pDstInfo->UsrData.sSystemBuffer.iStride[1] = pPic->iLinesize[1];
  220|   580k|  ppDst[0] = ppDst[0] + pCtx->sFrameCrop.iTopOffset * 2 * pPic->iLinesize[0] + pCtx->sFrameCrop.iLeftOffset * 2;
  221|   580k|  ppDst[1] = ppDst[1] + pCtx->sFrameCrop.iTopOffset  * pPic->iLinesize[1] + pCtx->sFrameCrop.iLeftOffset;
  222|   580k|  ppDst[2] = ppDst[2] + pCtx->sFrameCrop.iTopOffset  * pPic->iLinesize[1] + pCtx->sFrameCrop.iLeftOffset;
  223|  2.32M|  for (int i = 0; i < 3; ++i) {
  ------------------
  |  Branch (223:19): [True: 1.74M, False: 580k]
  ------------------
  224|  1.74M|    pDstInfo->pDst[i] = ppDst[i];
  225|  1.74M|  }
  226|   580k|  pDstInfo->iBufferStatus = 1;
  227|   580k|  if (GetThreadCount (pCtx) > 1 && pPic->bIsComplete == false) {
  ------------------
  |  Branch (227:7): [True: 0, False: 580k]
  |  Branch (227:36): [True: 0, False: 0]
  ------------------
  228|      0|    pPic->bIsComplete = true;
  229|      0|  }
  230|   580k|  if (GetThreadCount (pCtx) > 1) {
  ------------------
  |  Branch (230:7): [True: 0, False: 580k]
  ------------------
  231|      0|    uint32_t uiMbHeight = (pCtx->pDec->iHeightInPixel + 15) >> 4;
  232|      0|    for (uint32_t i = 0; i < uiMbHeight; ++i) {
  ------------------
  |  Branch (232:26): [True: 0, False: 0]
  ------------------
  233|      0|      SET_EVENT (&pCtx->pDec->pReadyEvent[i]);
  ------------------
  |  |  149|      0|  EventPost(ph)
  ------------------
  234|      0|    }
  235|      0|  }
  236|   580k|  bool bOutResChange = false;
  237|   580k|  if (GetThreadCount (pCtx) <= 1 || pCtx->pLastThreadCtx == NULL) {
  ------------------
  |  Branch (237:7): [True: 580k, False: 0]
  |  Branch (237:37): [True: 0, False: 0]
  ------------------
  238|   580k|    bOutResChange = (pCtx->iLastImgWidthInPixel != pDstInfo->UsrData.sSystemBuffer.iWidth)
  ------------------
  |  Branch (238:21): [True: 18.4k, False: 562k]
  ------------------
  239|   562k|                    || (pCtx->iLastImgHeightInPixel != pDstInfo->UsrData.sSystemBuffer.iHeight);
  ------------------
  |  Branch (239:24): [True: 1.20k, False: 561k]
  ------------------
  240|   580k|  } else {
  241|      0|    if (pCtx->pLastThreadCtx != NULL) {
  ------------------
  |  Branch (241:9): [True: 0, False: 0]
  ------------------
  242|      0|      PWelsDecoderThreadCTX pLastThreadCtx = (PWelsDecoderThreadCTX) (pCtx->pLastThreadCtx);
  243|      0|      bOutResChange = (pLastThreadCtx->pCtx->iLastImgWidthInPixel != pDstInfo->UsrData.sSystemBuffer.iWidth)
  ------------------
  |  Branch (243:23): [True: 0, False: 0]
  ------------------
  244|      0|                      || (pLastThreadCtx->pCtx->iLastImgHeightInPixel != pDstInfo->UsrData.sSystemBuffer.iHeight);
  ------------------
  |  Branch (244:26): [True: 0, False: 0]
  ------------------
  245|      0|    }
  246|      0|  }
  247|   580k|  pCtx->iLastImgWidthInPixel = pDstInfo->UsrData.sSystemBuffer.iWidth;
  248|   580k|  pCtx->iLastImgHeightInPixel = pDstInfo->UsrData.sSystemBuffer.iHeight;
  249|   580k|  if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) //no buffer output if EC is disabled and frame incomplete
  ------------------
  |  Branch (249:7): [True: 0, False: 580k]
  ------------------
  250|      0|    pDstInfo->iBufferStatus = (int32_t) (bFrameCompleteFlag
  ------------------
  |  Branch (250:42): [True: 0, False: 0]
  ------------------
  251|      0|                                         && pPic->bIsComplete); // When EC disable, ECed picture not output
  ------------------
  |  Branch (251:45): [True: 0, False: 0]
  ------------------
  252|   580k|  else if ((pCtx->pParam->eEcActiveIdc == ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE
  ------------------
  |  Branch (252:13): [True: 0, False: 580k]
  ------------------
  253|   580k|            || pCtx->pParam->eEcActiveIdc == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE)
  ------------------
  |  Branch (253:16): [True: 0, False: 580k]
  ------------------
  254|      0|           && pCtx->iErrorCode && bOutResChange)
  ------------------
  |  Branch (254:15): [True: 0, False: 0]
  |  Branch (254:35): [True: 0, False: 0]
  ------------------
  255|      0|    pCtx->bFreezeOutput = true;
  256|       |
  257|   580k|  if (pDstInfo->iBufferStatus == 0) {
  ------------------
  |  Branch (257:7): [True: 0, False: 580k]
  ------------------
  258|      0|    if (!bFrameCompleteFlag)
  ------------------
  |  Branch (258:9): [True: 0, False: 0]
  ------------------
  259|      0|      pCtx->iErrorCode |= dsBitstreamError;
  260|      0|    return ERR_INFO_MB_NUM_INADEQUATE;
  261|      0|  }
  262|   580k|  if (pCtx->bFreezeOutput) {
  ------------------
  |  Branch (262:7): [True: 0, False: 580k]
  ------------------
  263|      0|    pDstInfo->iBufferStatus = 0;
  264|      0|    if (pPic->bNewSeqBegin) {
  ------------------
  |  Branch (264:9): [True: 0, False: 0]
  ------------------
  265|      0|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO,
  266|      0|               "DecodeFrameConstruction():New sequence detected, but freezed, correct MBs (%d) out of whole MBs (%d).",
  267|      0|               kiTotalNumMbInCurLayer - pCtx->iMbEcedNum, kiTotalNumMbInCurLayer);
  268|      0|    }
  269|      0|  }
  270|   580k|  pCtx->iMbEcedNum = pPic->iMbEcedNum;
  271|   580k|  pCtx->iMbNum = pPic->iMbNum;
  272|   580k|  pCtx->iMbEcedPropNum = pPic->iMbEcedPropNum;
  273|   580k|  if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (273:7): [True: 580k, False: 0]
  ------------------
  274|   580k|    if (pDstInfo->iBufferStatus && ((pCtx->pDecoderStatistics->uiWidth != (unsigned int) kiActualWidth)
  ------------------
  |  Branch (274:9): [True: 580k, False: 0]
  |  Branch (274:37): [True: 14.2k, False: 566k]
  ------------------
  275|   566k|                                    || (pCtx->pDecoderStatistics->uiHeight != (unsigned int) kiActualHeight))) {
  ------------------
  |  Branch (275:40): [True: 1.20k, False: 565k]
  ------------------
  276|  15.4k|      pCtx->pDecoderStatistics->uiResolutionChangeTimes++;
  277|  15.4k|      pCtx->pDecoderStatistics->uiWidth = kiActualWidth;
  278|  15.4k|      pCtx->pDecoderStatistics->uiHeight = kiActualHeight;
  279|  15.4k|    }
  280|   580k|    UpdateDecStat (pCtx, pDstInfo->iBufferStatus != 0);
  281|   580k|  }
  282|   580k|  return ERR_NONE;
  283|   580k|}

_ZN7WelsDec12InitErrorConEPNS_21TagWelsDecoderContextE:
   43|  26.4k|void InitErrorCon (PWelsDecoderContext pCtx) {
   44|  26.4k|  if ((pCtx->pParam->eEcActiveIdc == ERROR_CON_SLICE_COPY)
  ------------------
  |  Branch (44:7): [True: 26.4k, False: 0]
  ------------------
   45|      0|      || (pCtx->pParam->eEcActiveIdc == ERROR_CON_SLICE_COPY_CROSS_IDR)
  ------------------
  |  Branch (45:10): [True: 0, False: 0]
  ------------------
   46|      0|      || (pCtx->pParam->eEcActiveIdc == ERROR_CON_SLICE_MV_COPY_CROSS_IDR)
  ------------------
  |  Branch (46:10): [True: 0, False: 0]
  ------------------
   47|      0|      || (pCtx->pParam->eEcActiveIdc == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE)
  ------------------
  |  Branch (47:10): [True: 0, False: 0]
  ------------------
   48|  26.4k|      || (pCtx->pParam->eEcActiveIdc == ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE)) {
  ------------------
  |  Branch (48:10): [True: 0, False: 0]
  ------------------
   49|  26.4k|    if ((pCtx->pParam->eEcActiveIdc != ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE)
  ------------------
  |  Branch (49:9): [True: 26.4k, False: 0]
  ------------------
   50|  26.4k|        && (pCtx->pParam->eEcActiveIdc != ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE)) {
  ------------------
  |  Branch (50:12): [True: 26.4k, False: 0]
  ------------------
   51|  26.4k|      pCtx->bFreezeOutput = false;
   52|  26.4k|    }
   53|  26.4k|    pCtx->sCopyFunc.pCopyLumaFunc = WelsCopy16x16_c;
   54|  26.4k|    pCtx->sCopyFunc.pCopyChromaFunc = WelsCopy8x8_c;
   55|       |
   56|  26.4k|#if defined(X86_ASM)
   57|  26.4k|    if (pCtx->uiCpuFlag & WELS_CPU_MMXEXT) {
  ------------------
  |  |   47|  26.4k|#define WELS_CPU_MMXEXT     0x00000002    /* mmx-ext*/
  ------------------
  |  Branch (57:9): [True: 26.4k, False: 0]
  ------------------
   58|  26.4k|      pCtx->sCopyFunc.pCopyChromaFunc = WelsCopy8x8_mmx; //aligned
   59|  26.4k|    }
   60|       |
   61|  26.4k|    if (pCtx->uiCpuFlag & WELS_CPU_SSE2) {
  ------------------
  |  |   49|  26.4k|#define WELS_CPU_SSE2       0x00000008    /* sse 2 */
  ------------------
  |  Branch (61:9): [True: 26.4k, False: 0]
  ------------------
   62|  26.4k|      pCtx->sCopyFunc.pCopyLumaFunc = WelsCopy16x16_sse2; //this is aligned copy;
   63|  26.4k|    }
   64|  26.4k|#endif //X86_ASM
   65|       |
   66|       |#if defined(HAVE_NEON)
   67|       |    if (pCtx->uiCpuFlag & WELS_CPU_NEON) {
   68|       |      pCtx->sCopyFunc.pCopyLumaFunc     = WelsCopy16x16_neon; //aligned
   69|       |      pCtx->sCopyFunc.pCopyChromaFunc   = WelsCopy8x8_neon; //aligned
   70|       |    }
   71|       |#endif //HAVE_NEON
   72|       |
   73|       |#if defined(HAVE_NEON_AARCH64) && defined(__aarch64__)
   74|       |    if (pCtx->uiCpuFlag & WELS_CPU_NEON) {
   75|       |      pCtx->sCopyFunc.pCopyLumaFunc     = WelsCopy16x16_AArch64_neon; //aligned
   76|       |      pCtx->sCopyFunc.pCopyChromaFunc   = WelsCopy8x8_AArch64_neon; //aligned
   77|       |    }
   78|       |#endif //HAVE_NEON_AARCH64
   79|       |
   80|       |#if defined(HAVE_LSX)
   81|       |     if (pCtx->uiCpuFlag & WELS_CPU_LSX) {
   82|       |       pCtx->sCopyFunc.pCopyChromaFunc   = WelsCopy8x8_lsx;   //aligned
   83|       |       pCtx->sCopyFunc.pCopyLumaFunc     = WelsCopy16x16_lsx; //aligned
   84|       |     }
   85|       |#endif// HAVE_LSX
   86|  26.4k|  } //TODO add more methods here
   87|  26.4k|  return;
   88|  26.4k|}
_ZN7WelsDec19DoErrorConSliceCopyEPNS_21TagWelsDecoderContextE:
  115|   461k|void DoErrorConSliceCopy (PWelsDecoderContext pCtx) {
  116|   461k|  int32_t iMbWidth = (int32_t) pCtx->pSps->iMbWidth;
  117|   461k|  int32_t iMbHeight = (int32_t) pCtx->pSps->iMbHeight;
  118|   461k|  PPicture pDstPic = pCtx->pDec;
  119|   461k|  PPicture pSrcPic = pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb;
  120|   461k|  if ((pCtx->pParam->eEcActiveIdc == ERROR_CON_SLICE_COPY) && (pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.bIdrFlag))
  ------------------
  |  Branch (120:7): [True: 461k, False: 0]
  |  Branch (120:63): [True: 5.88k, False: 456k]
  ------------------
  121|  5.88k|    pSrcPic = NULL; //no cross IDR method, should fill in data instead of copy
  122|       |
  123|       |  //uint8_t *pDstData[3], *pSrcData[3];
  124|   461k|  bool* pMbCorrectlyDecodedFlag = pCtx->pCurDqLayer->pMbCorrectlyDecodedFlag;
  125|       |  //Do slice copy late
  126|   461k|  int32_t iMbXyIndex;
  127|   461k|  uint8_t* pSrcData, *pDstData;
  128|   461k|  uint32_t iSrcStride; // = pSrcPic->iLinesize[0];
  129|   461k|  uint32_t iDstStride = pDstPic->iLinesize[0];
  130|   461k|  if (pSrcPic == pDstPic) {
  ------------------
  |  Branch (130:7): [True: 2.25k, False: 459k]
  ------------------
  131|  2.25k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "DoErrorConSliceCopy()::EC memcpy overlap.");
  132|  2.25k|    return;
  133|  2.25k|  }
  134|  8.51M|  for (int32_t iMbY = 0; iMbY < iMbHeight; ++iMbY) {
  ------------------
  |  Branch (134:26): [True: 8.05M, False: 459k]
  ------------------
  135|   412M|    for (int32_t iMbX = 0; iMbX < iMbWidth; ++iMbX) {
  ------------------
  |  Branch (135:28): [True: 404M, False: 8.05M]
  ------------------
  136|   404M|      iMbXyIndex = iMbY * iMbWidth + iMbX;
  137|   404M|      if (!pMbCorrectlyDecodedFlag[iMbXyIndex]) {
  ------------------
  |  Branch (137:11): [True: 402M, False: 1.64M]
  ------------------
  138|   402M|        pCtx->pDec->iMbEcedNum++;
  139|   402M|        if (pSrcPic != NULL) {
  ------------------
  |  Branch (139:13): [True: 396M, False: 5.91M]
  ------------------
  140|   396M|          iSrcStride = pSrcPic->iLinesize[0];
  141|       |          //Y component
  142|   396M|          pDstData = pDstPic->pData[0] + iMbY * 16 * iDstStride + iMbX * 16;
  143|   396M|          pSrcData = pSrcPic->pData[0] + iMbY * 16 * iSrcStride + iMbX * 16;
  144|   396M|          pCtx->sCopyFunc.pCopyLumaFunc (pDstData, iDstStride, pSrcData, iSrcStride);
  145|       |          //U component
  146|   396M|          pDstData = pDstPic->pData[1] + iMbY * 8 * iDstStride / 2 + iMbX * 8;
  147|   396M|          pSrcData = pSrcPic->pData[1] + iMbY * 8 * iSrcStride / 2 + iMbX * 8;
  148|   396M|          pCtx->sCopyFunc.pCopyChromaFunc (pDstData, iDstStride / 2, pSrcData, iSrcStride / 2);
  149|       |          //V component
  150|   396M|          pDstData = pDstPic->pData[2] + iMbY * 8 * iDstStride / 2 + iMbX * 8;
  151|   396M|          pSrcData = pSrcPic->pData[2] + iMbY * 8 * iSrcStride / 2 + iMbX * 8;
  152|   396M|          pCtx->sCopyFunc.pCopyChromaFunc (pDstData, iDstStride / 2, pSrcData, iSrcStride / 2);
  153|   396M|        } else { //pSrcPic == NULL
  154|       |          //Y component
  155|  5.91M|          pDstData = pDstPic->pData[0] + iMbY * 16 * iDstStride + iMbX * 16;
  156|   100M|          for (int32_t i = 0; i < 16; ++i) {
  ------------------
  |  Branch (156:31): [True: 94.5M, False: 5.91M]
  ------------------
  157|  94.5M|            memset (pDstData, 128, 16);
  158|  94.5M|            pDstData += iDstStride;
  159|  94.5M|          }
  160|       |          //U component
  161|  5.91M|          pDstData = pDstPic->pData[1] + iMbY * 8 * iDstStride / 2 + iMbX * 8;
  162|  53.2M|          for (int32_t i = 0; i < 8; ++i) {
  ------------------
  |  Branch (162:31): [True: 47.2M, False: 5.91M]
  ------------------
  163|  47.2M|            memset (pDstData, 128, 8);
  164|  47.2M|            pDstData += iDstStride / 2;
  165|  47.2M|          }
  166|       |          //V component
  167|  5.91M|          pDstData = pDstPic->pData[2] + iMbY * 8 * iDstStride / 2 + iMbX * 8;
  168|  53.2M|          for (int32_t i = 0; i < 8; ++i) {
  ------------------
  |  Branch (168:31): [True: 47.2M, False: 5.91M]
  ------------------
  169|  47.2M|            memset (pDstData, 128, 8);
  170|  47.2M|            pDstData += iDstStride / 2;
  171|  47.2M|          }
  172|  5.91M|        } //
  173|   402M|      } //!pMbCorrectlyDecodedFlag[iMbXyIndex]
  174|   404M|    } //iMbX
  175|  8.05M|  } //iMbY
  176|   459k|}
_ZN7WelsDec16MarkECFrameAsRefEPNS_21TagWelsDecoderContextE:
  440|   406k|int32_t MarkECFrameAsRef (PWelsDecoderContext pCtx) {
  441|   406k|  int32_t iRet = WelsMarkAsRef (pCtx);
  442|       |  // Under EC mode, the ERR_INFO_DUPLICATE_FRAME_NUM does not need to be process
  443|   406k|  if (iRet != ERR_NONE) {
  ------------------
  |  Branch (443:7): [True: 7.74k, False: 398k]
  ------------------
  444|  7.74k|    return iRet;
  445|  7.74k|  }
  446|   398k|  ExpandReferencingPicture (pCtx->pDec->pData, pCtx->pDec->iWidthInPixel, pCtx->pDec->iHeightInPixel,
  447|   398k|                            pCtx->pDec->iLinesize,
  448|   398k|                            pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture);
  449|       |
  450|   398k|  return ERR_NONE;
  451|   406k|}
_ZN7WelsDec12NeedErrorConEPNS_21TagWelsDecoderContextE:
  453|   461k|bool NeedErrorCon (PWelsDecoderContext pCtx) {
  454|   461k|  bool bNeedEC = false;
  455|   461k|  int32_t iMbNum = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight;
  456|  1.63M|  for (int32_t i = 0; i < iMbNum; ++i) {
  ------------------
  |  Branch (456:23): [True: 1.63M, False: 0]
  ------------------
  457|  1.63M|    if (!pCtx->pCurDqLayer->pMbCorrectlyDecodedFlag[i]) {
  ------------------
  |  Branch (457:9): [True: 461k, False: 1.17M]
  ------------------
  458|   461k|      bNeedEC = true;
  459|   461k|      break;
  460|   461k|    }
  461|  1.63M|  }
  462|   461k|  return bNeedEC;
  463|   461k|}
_ZN7WelsDec17ImplementErrorConEPNS_21TagWelsDecoderContextE:
  467|   461k|void ImplementErrorCon (PWelsDecoderContext pCtx) {
  468|   461k|  if (ERROR_CON_DISABLE == pCtx->pParam->eEcActiveIdc) {
  ------------------
  |  Branch (468:7): [True: 0, False: 461k]
  ------------------
  469|      0|    pCtx->iErrorCode |= dsBitstreamError;
  470|      0|    return;
  471|   461k|  } else if ((ERROR_CON_FRAME_COPY == pCtx->pParam->eEcActiveIdc)
  ------------------
  |  Branch (471:14): [True: 0, False: 461k]
  ------------------
  472|   461k|             || (ERROR_CON_FRAME_COPY_CROSS_IDR == pCtx->pParam->eEcActiveIdc)) {
  ------------------
  |  Branch (472:17): [True: 0, False: 461k]
  ------------------
  473|      0|    DoErrorConFrameCopy (pCtx);
  474|   461k|  } else if ((ERROR_CON_SLICE_COPY == pCtx->pParam->eEcActiveIdc)
  ------------------
  |  Branch (474:14): [True: 461k, False: 0]
  ------------------
  475|      0|             || (ERROR_CON_SLICE_COPY_CROSS_IDR == pCtx->pParam->eEcActiveIdc)
  ------------------
  |  Branch (475:17): [True: 0, False: 0]
  ------------------
  476|   461k|             || (ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE == pCtx->pParam->eEcActiveIdc)) {
  ------------------
  |  Branch (476:17): [True: 0, False: 0]
  ------------------
  477|   461k|    DoErrorConSliceCopy (pCtx);
  478|   461k|  } else if ((ERROR_CON_SLICE_MV_COPY_CROSS_IDR == pCtx->pParam->eEcActiveIdc)
  ------------------
  |  Branch (478:14): [True: 0, False: 0]
  ------------------
  479|      0|             || (ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE == pCtx->pParam->eEcActiveIdc)) {
  ------------------
  |  Branch (479:17): [True: 0, False: 0]
  ------------------
  480|      0|    GetAvilInfoFromCorrectMb (pCtx);
  481|      0|    DoErrorConSliceMVCopy (pCtx);
  482|      0|  } //TODO add other EC methods here in the future
  483|   461k|  pCtx->iErrorCode |= dsDataErrorConcealed;
  484|   461k|  pCtx->pDec->bIsComplete = false; // Set complete flag to false after do EC.
  485|   461k|}

_ZN7WelsDec7InitFmoEPNS_6TagFmoEPNS_6TagPpsEiiPN10WelsCommon12CMemoryAlignE:
  200|  80.5k|int32_t InitFmo (PFmo pFmo, PPps pPps, const int32_t kiMbWidth, const int32_t kiMbHeight, CMemoryAlign* pMa) {
  201|  80.5k|  return FmoGenerateSliceGroup (pFmo, pPps, kiMbWidth, kiMbHeight, pMa);
  202|  80.5k|}
_ZN7WelsDec13UninitFmoListEPNS_6TagFmoEiiPN10WelsCommon12CMemoryAlignE:
  214|  26.4k|void UninitFmoList (PFmo pFmo, const int32_t kiCnt, const int32_t kiAvail, CMemoryAlign* pMa) {
  215|  26.4k|  PFmo pIter = pFmo;
  216|  26.4k|  int32_t i = 0;
  217|  26.4k|  int32_t iFreeNodes = 0;
  218|       |
  219|  26.4k|  if (NULL == pIter || kiAvail <= 0 || kiCnt < kiAvail)
  ------------------
  |  Branch (219:7): [True: 0, False: 26.4k]
  |  Branch (219:24): [True: 4.70k, False: 21.7k]
  |  Branch (219:40): [True: 0, False: 21.7k]
  ------------------
  220|  4.70k|    return;
  221|       |
  222|  36.8k|  while (i < kiCnt) {
  ------------------
  |  Branch (222:10): [True: 36.8k, False: 0]
  ------------------
  223|  36.8k|    if (pIter != NULL && pIter->bActiveFlag) {
  ------------------
  |  Branch (223:9): [True: 36.8k, False: 0]
  |  Branch (223:26): [True: 22.1k, False: 14.7k]
  ------------------
  224|  22.1k|      if (NULL != pIter->pMbAllocMap) {
  ------------------
  |  Branch (224:11): [True: 22.1k, False: 4]
  ------------------
  225|  22.1k|        pMa->WelsFree (pIter->pMbAllocMap, "pIter->pMbAllocMap");
  226|       |
  227|  22.1k|        pIter->pMbAllocMap = NULL;
  228|  22.1k|      }
  229|  22.1k|      pIter->iSliceGroupCount   = 0;
  230|  22.1k|      pIter->iSliceGroupType    = -1;
  231|  22.1k|      pIter->iCountMbNum        = 0;
  232|  22.1k|      pIter->bActiveFlag        = false;
  233|  22.1k|      ++ iFreeNodes;
  234|  22.1k|      if (iFreeNodes >= kiAvail)
  ------------------
  |  Branch (234:11): [True: 21.7k, False: 400]
  ------------------
  235|  21.7k|        break;
  236|  22.1k|    }
  237|  15.1k|    ++ pIter;
  238|  15.1k|    ++ i;
  239|  15.1k|  }
  240|  21.7k|}
_ZN7WelsDec19FmoParamSetsChangedEPNS_6TagFmoEiii:
  253|  2.58M|                          const int32_t kiSliceGroupCount) {
  254|  2.58M|  WELS_VERIFY_RETURN_IF (false, (NULL == pFmo))
  ------------------
  |  |  239|  2.58M|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 2.58M]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
  255|       |
  256|  2.58M|  return ((!pFmo->bActiveFlag)
  ------------------
  |  Branch (256:11): [True: 22.4k, False: 2.56M]
  ------------------
  257|  2.56M|          || (kiCountNumMb != pFmo->iCountMbNum)
  ------------------
  |  Branch (257:14): [True: 10.3k, False: 2.55M]
  ------------------
  258|  2.55M|          || (kiSliceGroupType != pFmo->iSliceGroupType)
  ------------------
  |  Branch (258:14): [True: 47.5k, False: 2.50M]
  ------------------
  259|  2.50M|          || (kiSliceGroupCount != pFmo->iSliceGroupCount));
  ------------------
  |  Branch (259:14): [True: 204, False: 2.50M]
  ------------------
  260|  2.58M|}
_ZN7WelsDec14FmoParamUpdateEPNS_6TagFmoEPNS_6TagSpsEPNS_6TagPpsEPiPN10WelsCommon12CMemoryAlignE:
  272|  2.58M|int32_t FmoParamUpdate (PFmo pFmo, PSps pSps, PPps pPps, int32_t* pActiveFmoNum, CMemoryAlign* pMa) {
  273|  2.58M|  const uint32_t kuiMbWidth = pSps->iMbWidth;
  274|  2.58M|  const uint32_t kuiMbHeight = pSps->iMbHeight;
  275|  2.58M|  int32_t iRet = ERR_NONE;
  276|  2.58M|  if (FmoParamSetsChanged (pFmo, kuiMbWidth * kuiMbHeight, pPps->uiSliceGroupMapType, pPps->uiNumSliceGroups)) {
  ------------------
  |  Branch (276:7): [True: 80.5k, False: 2.50M]
  ------------------
  277|  80.5k|    iRet = InitFmo (pFmo, pPps, kuiMbWidth, kuiMbHeight, pMa);
  278|  80.5k|    WELS_VERIFY_RETURN_IF (iRet, iRet);
  ------------------
  |  |  239|  80.5k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 325, False: 80.2k]
  |  |  ------------------
  |  |  240|    325|    return iResult;                             \
  |  |  241|    325|  }
  ------------------
  279|       |
  280|  80.2k|    if (!pFmo->bActiveFlag && *pActiveFmoNum < MAX_PPS_COUNT) {
  ------------------
  |  |   43|  22.1k|#define MAX_PPS_COUNT                   256     // Count number of PPS
  ------------------
  |  Branch (280:9): [True: 22.1k, False: 58.0k]
  |  Branch (280:31): [True: 22.1k, False: 0]
  ------------------
  281|  22.1k|      ++ (*pActiveFmoNum);
  282|  22.1k|      pFmo->bActiveFlag = true;
  283|  22.1k|    }
  284|  80.2k|  }
  285|  2.58M|  return iRet;
  286|  2.58M|}
_ZN7WelsDec17FmoMbToSliceGroupEPNS_6TagFmoEi:
  296|  1.43M|int32_t FmoMbToSliceGroup (PFmo pFmo, const MB_XY_T kiMbXy) {
  297|  1.43M|  const int32_t kiMbNum  = pFmo->iCountMbNum;
  298|  1.43M|  const uint8_t* kpMbMap = pFmo->pMbAllocMap;
  299|       |
  300|  1.43M|  if (kiMbXy < 0 || kiMbXy >= kiMbNum || kpMbMap == NULL)
  ------------------
  |  Branch (300:7): [True: 0, False: 1.43M]
  |  Branch (300:21): [True: 0, False: 1.43M]
  |  Branch (300:42): [True: 0, False: 1.43M]
  ------------------
  301|      0|    return -1;
  302|       |
  303|  1.43M|  return kpMbMap[ kiMbXy ];
  304|  1.43M|}
_ZN7WelsDec9FmoNextMbEPNS_6TagFmoEi:
  314|  1.43M|MB_XY_T FmoNextMb (PFmo pFmo, const MB_XY_T kiMbXy) {
  315|  1.43M|  const int32_t kiTotalMb               = pFmo->iCountMbNum;
  316|  1.43M|  const uint8_t* kpMbMap                = pFmo->pMbAllocMap;
  317|  1.43M|  MB_XY_T iNextMb                       = kiMbXy;
  ------------------
  |  |   51|  1.43M|#define MB_XY_T int32_t
  ------------------
  318|  1.43M|  const uint8_t kuiSliceGroupIdc        = (uint8_t)FmoMbToSliceGroup (pFmo, kiMbXy);
  319|       |
  320|  1.43M|  if (kuiSliceGroupIdc == (uint8_t) (-1))
  ------------------
  |  Branch (320:7): [True: 0, False: 1.43M]
  ------------------
  321|      0|    return -1;
  322|       |
  323|  3.82M|  do {
  324|  3.82M|    ++ iNextMb;
  325|  3.82M|    if (iNextMb >= kiTotalMb) {
  ------------------
  |  Branch (325:9): [True: 116k, False: 3.70M]
  ------------------
  326|   116k|      iNextMb = -1;
  327|   116k|      break;
  328|   116k|    }
  329|  3.70M|    if (kpMbMap[iNextMb] == kuiSliceGroupIdc) {
  ------------------
  |  Branch (329:9): [True: 1.31M, False: 2.38M]
  ------------------
  330|  1.31M|      break;
  331|  1.31M|    }
  332|  3.70M|  } while (1);
  ------------------
  |  Branch (332:12): [True: 2.38M, Folded]
  ------------------
  333|       |
  334|       |  // -1: No further MB in this slice (could be end of picture)
  335|  1.43M|  return iNextMb;
  336|  1.43M|}
fmo.cpp:_ZN7WelsDecL21FmoGenerateSliceGroupEPNS_6TagFmoEPNS_6TagPpsEiiPN10WelsCommon12CMemoryAlignE:
  126|  80.5k|    const int32_t kiMbHeight, CMemoryAlign* pMa) {
  127|  80.5k|  int32_t iNumMb = 0;
  128|  80.5k|  int32_t iErr   = 0;
  129|  80.5k|  bool bResolutionChanged = false;
  130|       |
  131|       |  // the cases we would not like
  132|  80.5k|  WELS_VERIFY_RETURN_IF (ERR_INFO_INVALID_PARAM, (NULL == pFmo || NULL == kpPps))
  ------------------
  |  |  239|   241k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 80.5k]
  |  |  |  Branch (239:7): [True: 0, False: 80.5k]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
  133|       |
  134|  80.5k|  iNumMb = kiMbWidth * kiMbHeight;
  135|       |
  136|  80.5k|  if (0 == iNumMb)
  ------------------
  |  Branch (136:7): [True: 0, False: 80.5k]
  ------------------
  137|      0|    return ERR_INFO_INVALID_PARAM;
  138|       |
  139|  80.5k|  pMa->WelsFree (pFmo->pMbAllocMap, "_fmo->pMbAllocMap");
  140|  80.5k|  pFmo->pMbAllocMap = (uint8_t*)pMa->WelsMallocz (iNumMb * sizeof (uint8_t), "_fmo->pMbAllocMap");
  141|  80.5k|  WELS_VERIFY_RETURN_IF (ERR_INFO_OUT_OF_MEMORY, (NULL == pFmo->pMbAllocMap)) // out of memory
  ------------------
  |  |  239|  80.5k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 80.5k]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
  142|  80.5k|
  143|  80.5k|  pFmo->iCountMbNum = iNumMb;
  144|       |
  145|  80.5k|  if (kpPps->uiNumSliceGroups < 2 && iNumMb > 0) { // only one slice group, exactly it is single slice based
  ------------------
  |  Branch (145:7): [True: 77.8k, False: 2.64k]
  |  Branch (145:38): [True: 77.8k, False: 0]
  ------------------
  146|  77.8k|    memset (pFmo->pMbAllocMap, 0,  iNumMb * sizeof (int8_t));   // for safe
  147|       |
  148|  77.8k|    pFmo->iSliceGroupCount = 1;
  149|       |
  150|  77.8k|    return ERR_NONE;
  151|  77.8k|  }
  152|       |
  153|  2.64k|  if (bResolutionChanged || ((int32_t)kpPps->uiSliceGroupMapType != pFmo->iSliceGroupType)
  ------------------
  |  Branch (153:7): [True: 0, False: 2.64k]
  |  Branch (153:29): [True: 927, False: 1.71k]
  ------------------
  154|  1.72k|      || ((int32_t)kpPps->uiNumSliceGroups != pFmo->iSliceGroupCount)) {
  ------------------
  |  Branch (154:10): [True: 793, False: 924]
  ------------------
  155|  1.72k|    switch (kpPps->uiSliceGroupMapType) {
  156|  1.10k|    case 0:
  ------------------
  |  Branch (156:5): [True: 1.10k, False: 612]
  ------------------
  157|  1.10k|      iErr = FmoGenerateMbAllocMapType0 (pFmo, kpPps);
  158|  1.10k|      break;
  159|    612|    case 1:
  ------------------
  |  Branch (159:5): [True: 612, False: 1.10k]
  ------------------
  160|    612|      iErr = FmoGenerateMbAllocMapType1 (pFmo, kpPps, kiMbWidth);
  161|    612|      break;
  162|      0|    case 2:
  ------------------
  |  Branch (162:5): [True: 0, False: 1.72k]
  ------------------
  163|      0|    case 3:
  ------------------
  |  Branch (163:5): [True: 0, False: 1.72k]
  ------------------
  164|      0|    case 4:
  ------------------
  |  Branch (164:5): [True: 0, False: 1.72k]
  ------------------
  165|      0|    case 5:
  ------------------
  |  Branch (165:5): [True: 0, False: 1.72k]
  ------------------
  166|      0|    case 6:
  ------------------
  |  Branch (166:5): [True: 0, False: 1.72k]
  ------------------
  167|       |      // Reserve for others slice group type
  168|      0|      iErr = 1;
  169|      0|      break;
  170|      0|    default:
  ------------------
  |  Branch (170:5): [True: 0, False: 1.72k]
  ------------------
  171|      0|      return ERR_INFO_UNSUPPORTED_FMOTYPE;
  172|  1.72k|    }
  173|  1.72k|  }
  174|       |
  175|  2.64k|  if (0 == iErr) {      // well now
  ------------------
  |  Branch (175:7): [True: 2.31k, False: 325]
  ------------------
  176|  2.31k|    pFmo->iSliceGroupCount = kpPps->uiNumSliceGroups;
  177|  2.31k|    pFmo->iSliceGroupType  = kpPps->uiSliceGroupMapType;
  178|  2.31k|  } else {
  179|       |    // Map generation failed (e.g. a rejected/oversized run length). The map was
  180|       |    // allocated above but this FMO is not marked active, so UninitFmoList would
  181|       |    // never free it. Release it here to avoid a leak on the rejection path.
  182|    325|    pMa->WelsFree (pFmo->pMbAllocMap, "_fmo->pMbAllocMap");
  183|    325|    pFmo->pMbAllocMap = NULL;
  184|    325|    pFmo->iCountMbNum = 0;
  185|    325|  }
  186|       |
  187|  2.64k|  return iErr;
  188|  2.64k|}
fmo.cpp:_ZN7WelsDecL26FmoGenerateMbAllocMapType0EPNS_6TagFmoEPNS_6TagPpsE:
   55|  1.10k|static inline int32_t FmoGenerateMbAllocMapType0 (PFmo pFmo, PPps pPps) {
   56|  1.10k|  uint32_t uiNumSliceGroups = 0;
   57|  1.10k|  int32_t iMbNum = 0;
   58|  1.10k|  int32_t i = 0;
   59|       |
   60|  1.10k|  WELS_VERIFY_RETURN_IF (ERR_INFO_INVALID_PARAM, (NULL == pFmo || NULL == pPps))
  ------------------
  |  |  239|  3.32k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 1.10k]
  |  |  |  Branch (239:7): [True: 0, False: 1.10k]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
   61|  1.10k|  uiNumSliceGroups = pPps->uiNumSliceGroups;
   62|  1.10k|  iMbNum = pFmo->iCountMbNum;
   63|  1.10k|  WELS_VERIFY_RETURN_IF (ERR_INFO_INVALID_PARAM, (NULL == pFmo->pMbAllocMap || iMbNum <= 0
  ------------------
  |  |  239|  5.54k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 1.10k]
  |  |  |  Branch (239:7): [True: 0, False: 1.10k]
  |  |  |  Branch (239:7): [True: 0, False: 1.10k]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
   64|  1.10k|                         || uiNumSliceGroups > MAX_SLICEGROUP_IDS))
   65|       |
   66|   131k|  do {
   67|   131k|    uint8_t uiGroup = 0;
   68|   365k|    do {
   69|   365k|      const uint32_t kuiRunIdx = pPps->uiRunLength[uiGroup];
   70|       |      // Reject zero or oversized run lengths before advancing i. A single run
   71|       |      // cannot legitimately exceed the total MB count; this also prevents any
   72|       |      // integer wrap of the map index with attacker-influenced values.
   73|   365k|      WELS_VERIFY_RETURN_IF (ERR_INFO_INVALID_PARAM,
  ------------------
  |  |  239|  1.09M|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 365k]
  |  |  |  Branch (239:7): [True: 325, False: 364k]
  |  |  ------------------
  |  |  240|    325|    return iResult;                             \
  |  |  241|    325|  }
  ------------------
   74|   365k|                 (0 == kuiRunIdx || kuiRunIdx > static_cast<uint32_t> (iMbNum)))
   75|   364k|      int32_t j = 0;
   76|  1.09M|      do {
   77|  1.09M|        pFmo->pMbAllocMap[i + j] = uiGroup;
   78|  1.09M|        ++ j;
   79|  1.09M|      } while (j < static_cast<int32_t> (kuiRunIdx) && i + j < iMbNum);
  ------------------
  |  Branch (79:16): [True: 726k, False: 364k]
  |  Branch (79:56): [True: 726k, False: 77]
  ------------------
   80|   364k|      i += static_cast<int32_t> (kuiRunIdx);
   81|   364k|      ++ uiGroup;
   82|   364k|    } while (uiGroup < uiNumSliceGroups && i < iMbNum);
  ------------------
  |  Branch (82:14): [True: 233k, False: 130k]
  |  Branch (82:44): [True: 233k, False: 585]
  ------------------
   83|   131k|  } while (i < iMbNum);
  ------------------
  |  Branch (83:12): [True: 130k, False: 783]
  ------------------
   84|       |
   85|    783|  return ERR_NONE; // well here
   86|  1.10k|}
fmo.cpp:_ZN7WelsDecL26FmoGenerateMbAllocMapType1EPNS_6TagFmoEPNS_6TagPpsEi:
   97|    612|static inline int32_t FmoGenerateMbAllocMapType1 (PFmo pFmo, PPps pPps, const int32_t kiMbWidth) {
   98|    612|  uint32_t uiNumSliceGroups = 0;
   99|    612|  int32_t iMbNum = 0;
  100|    612|  int32_t i = 0;
  101|    612|  WELS_VERIFY_RETURN_IF (ERR_INFO_INVALID_PARAM, (NULL == pFmo || NULL == pPps))
  ------------------
  |  |  239|  1.83k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 612]
  |  |  |  Branch (239:7): [True: 0, False: 612]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
  102|    612|  uiNumSliceGroups = pPps->uiNumSliceGroups;
  103|    612|  iMbNum = pFmo->iCountMbNum;
  104|    612|  WELS_VERIFY_RETURN_IF (ERR_INFO_INVALID_PARAM, (NULL == pFmo->pMbAllocMap || iMbNum <= 0 || kiMbWidth == 0
  ------------------
  |  |  239|  4.28k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 612]
  |  |  |  Branch (239:7): [True: 0, False: 612]
  |  |  |  Branch (239:7): [True: 0, False: 612]
  |  |  |  Branch (239:7): [True: 0, False: 612]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
  105|    612|                         || uiNumSliceGroups > MAX_SLICEGROUP_IDS))
  106|       |
  107|  1.36M|  do {
  108|  1.36M|    pFmo->pMbAllocMap[i] = (uint8_t) (((i % kiMbWidth) + (((i / kiMbWidth) * uiNumSliceGroups) >> 1)) % uiNumSliceGroups);
  109|  1.36M|    ++ i;
  110|  1.36M|  } while (i < iMbNum);
  ------------------
  |  Branch (110:12): [True: 1.36M, False: 612]
  ------------------
  111|       |
  112|    612|  return ERR_NONE; // well here
  113|    612|}

_ZN7WelsDec19WelsI4x4LumaPredV_cEPhi:
   54|  12.5k|void WelsI4x4LumaPredV_c (uint8_t* pPred, const int32_t kiStride) {
   55|  12.5k|  const uint32_t kuiVal = LD32A4 (pPred - kiStride);
  ------------------
  |  |   74|  12.5k|#define LD32A4(a) LDA(a, 32, 4)
  |  |  ------------------
  |  |  |  |   70|  12.5k|#define LDA(a, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l)
  |  |  ------------------
  ------------------
   56|       |
   57|  12.5k|  ST32A4 (pPred, kuiVal);
  ------------------
  |  |   80|  12.5k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  12.5k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
   58|  12.5k|  ST32A4 (pPred + kiStride, kuiVal);
  ------------------
  |  |   80|  12.5k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  12.5k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
   59|  12.5k|  ST32A4 (pPred + (kiStride << 1), kuiVal);
  ------------------
  |  |   80|  12.5k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  12.5k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
   60|  12.5k|  ST32A4 (pPred + (kiStride << 1) + kiStride, kuiVal);
  ------------------
  |  |   80|  12.5k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  12.5k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
   61|  12.5k|}
_ZN7WelsDec20WelsI4x4LumaPredDc_cEPhi:
   77|   207k|void WelsI4x4LumaPredDc_c (uint8_t* pPred, const int32_t kiStride) {
   78|   207k|  const int32_t kiStride2  = kiStride << 1;
   79|   207k|  const int32_t kiStride3  = kiStride2 + kiStride;
   80|   207k|  const uint8_t kuiMean    = (pPred[-1] + pPred[-1 + kiStride] + pPred[-1 + kiStride2] + pPred[-1 + kiStride3] +
   81|   207k|                              pPred[-kiStride] + pPred[-kiStride + 1] + pPred[-kiStride + 2] + pPred[-kiStride + 3] + 4) >> 3;
   82|   207k|  const uint32_t kuiMean32 = 0x01010101U * kuiMean;
   83|       |
   84|   207k|  ST32A4 (pPred, kuiMean32);
  ------------------
  |  |   80|   207k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|   207k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
   85|   207k|  ST32A4 (pPred + kiStride, kuiMean32);
  ------------------
  |  |   80|   207k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|   207k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
   86|   207k|  ST32A4 (pPred + kiStride2, kuiMean32);
  ------------------
  |  |   80|   207k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|   207k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
   87|   207k|  ST32A4 (pPred + kiStride3, kuiMean32);
  ------------------
  |  |   80|   207k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|   207k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
   88|   207k|}
_ZN7WelsDec24WelsI4x4LumaPredDcLeft_cEPhi:
   90|  12.8k|void WelsI4x4LumaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride) {
   91|  12.8k|  const int32_t kiStride2  = kiStride << 1;
   92|  12.8k|  const int32_t kiStride3  = kiStride2 + kiStride;
   93|  12.8k|  const uint8_t kuiMean    = (pPred[-1] + pPred[-1 + kiStride] + pPred[-1 + kiStride2] + pPred[-1 + kiStride3] + 2) >> 2;
   94|  12.8k|  const uint32_t kuiMean32 = 0x01010101U * kuiMean;
   95|       |
   96|  12.8k|  ST32A4 (pPred, kuiMean32);
  ------------------
  |  |   80|  12.8k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  12.8k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
   97|  12.8k|  ST32A4 (pPred + kiStride, kuiMean32);
  ------------------
  |  |   80|  12.8k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  12.8k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
   98|  12.8k|  ST32A4 (pPred + kiStride2, kuiMean32);
  ------------------
  |  |   80|  12.8k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  12.8k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
   99|  12.8k|  ST32A4 (pPred + kiStride3, kuiMean32);
  ------------------
  |  |   80|  12.8k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  12.8k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  100|  12.8k|}
_ZN7WelsDec23WelsI4x4LumaPredDcTop_cEPhi:
  102|  9.64k|void WelsI4x4LumaPredDcTop_c (uint8_t* pPred, const int32_t kiStride) {
  103|  9.64k|  const int32_t kiStride2  = kiStride << 1;
  104|  9.64k|  const int32_t kiStride3  = kiStride2 + kiStride;
  105|  9.64k|  const uint8_t kuiMean    = (pPred[-kiStride] + pPred[-kiStride + 1] + pPred[-kiStride + 2] + pPred[-kiStride + 3] + 2)
  106|  9.64k|                             >> 2;
  107|  9.64k|  const uint32_t kuiMean32 = 0x01010101U * kuiMean;
  108|       |
  109|  9.64k|  ST32A4 (pPred, kuiMean32);
  ------------------
  |  |   80|  9.64k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  9.64k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  110|  9.64k|  ST32A4 (pPred + kiStride, kuiMean32);
  ------------------
  |  |   80|  9.64k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  9.64k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  111|  9.64k|  ST32A4 (pPred + kiStride2, kuiMean32);
  ------------------
  |  |   80|  9.64k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  9.64k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  112|  9.64k|  ST32A4 (pPred + kiStride3, kuiMean32);
  ------------------
  |  |   80|  9.64k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  9.64k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  113|  9.64k|}
_ZN7WelsDec22WelsI4x4LumaPredDcNA_cEPhi:
  115|    686|void WelsI4x4LumaPredDcNA_c (uint8_t* pPred, const int32_t kiStride) {
  116|    686|  const uint32_t kuiDC32 = 0x80808080U;
  117|       |
  118|    686|  ST32A4 (pPred, kuiDC32);
  ------------------
  |  |   80|    686|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    686|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  119|    686|  ST32A4 (pPred + kiStride, kuiDC32);
  ------------------
  |  |   80|    686|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    686|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  120|    686|  ST32A4 (pPred + (kiStride << 1), kuiDC32);
  ------------------
  |  |   80|    686|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    686|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  121|    686|  ST32A4 (pPred + (kiStride << 1) + kiStride, kuiDC32);
  ------------------
  |  |   80|    686|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|    686|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  122|    686|}
_ZN7WelsDec24WelsI4x4LumaPredDDLTop_cEPhi:
  154|  1.28k|void WelsI4x4LumaPredDDLTop_c (uint8_t* pPred, const int32_t kiStride) {
  155|  1.28k|  const int32_t kiStride2 = kiStride << 1;
  156|  1.28k|  const int32_t kiStride3 = kiStride + kiStride2;
  157|       |  /*get pTop*/
  158|  1.28k|  uint8_t* ptop         = &pPred[-kiStride];
  159|  1.28k|  const uint8_t kuiT0   = *ptop;
  160|  1.28k|  const uint8_t kuiT1   = * (ptop + 1);
  161|  1.28k|  const uint8_t kuiT2   = * (ptop + 2);
  162|  1.28k|  const uint8_t kuiT3   = * (ptop + 3);
  163|  1.28k|  const uint16_t kuiT01 = 1 + kuiT0 + kuiT1;
  164|  1.28k|  const uint16_t kuiT12 = 1 + kuiT1 + kuiT2;
  165|  1.28k|  const uint16_t kuiT23 = 1 + kuiT2 + kuiT3;
  166|  1.28k|  const uint16_t kuiT33 = 1 + (kuiT3 << 1);
  167|  1.28k|  const uint8_t kuiDLT0 = (kuiT01 + kuiT12) >> 2;       // kDLT0
  168|  1.28k|  const uint8_t kuiDLT1 = (kuiT12 + kuiT23) >> 2;       // kDLT1
  169|  1.28k|  const uint8_t kuiDLT2 = (kuiT23 + kuiT33) >> 2;       // kDLT2
  170|  1.28k|  const uint8_t kuiDLT3 = kuiT33 >> 1;                  // kDLT3
  171|  1.28k|  const uint8_t kuiList[8] = { kuiDLT0, kuiDLT1, kuiDLT2, kuiDLT3, kuiDLT3, kuiDLT3, kuiDLT3, kuiDLT3 };
  172|       |
  173|  1.28k|  ST32A4 (pPred,             LD32 (kuiList));
  ------------------
  |  |   80|  1.28k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  1.28k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  174|  1.28k|  ST32A4 (pPred + kiStride,  LD32 (kuiList + 1));
  ------------------
  |  |   80|  1.28k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  1.28k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  175|  1.28k|  ST32A4 (pPred + kiStride2, LD32 (kuiList + 2));
  ------------------
  |  |   80|  1.28k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  1.28k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  176|  1.28k|  ST32A4 (pPred + kiStride3, LD32 (kuiList + 3));
  ------------------
  |  |   80|  1.28k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  1.28k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  177|  1.28k|}
_ZN7WelsDec23WelsI4x4LumaPredVLTop_cEPhi:
  258|  1.30k|void WelsI4x4LumaPredVLTop_c (uint8_t* pPred, const int32_t kiStride) {
  259|  1.30k|  const int32_t kiStride2       = kiStride << 1;
  260|  1.30k|  const int32_t kiStride3       = kiStride + kiStride2;
  261|  1.30k|  uint8_t* ptopleft             = &pPred[- (kiStride + 1)];
  262|       |  /*get pTop*/
  263|  1.30k|  const uint8_t kuiT0           = * (ptopleft + 1);
  264|  1.30k|  const uint8_t kuiT1           = * (ptopleft + 2);
  265|  1.30k|  const uint8_t kuiT2           = * (ptopleft + 3);
  266|  1.30k|  const uint8_t kuiT3           = * (ptopleft + 4);
  267|  1.30k|  const uint16_t kuiT01         = 1 + kuiT0 + kuiT1;
  268|  1.30k|  const uint16_t kuiT12         = 1 + kuiT1 + kuiT2;
  269|  1.30k|  const uint16_t kuiT23         = 1 + kuiT2 + kuiT3;
  270|  1.30k|  const uint16_t kuiT33         = 1 + (kuiT3 << 1);
  271|  1.30k|  const uint8_t kuiVL0          = kuiT01 >> 1;
  272|  1.30k|  const uint8_t kuiVL1          = kuiT12 >> 1;
  273|  1.30k|  const uint8_t kuiVL2          = kuiT23 >> 1;
  274|  1.30k|  const uint8_t kuiVL3          = kuiT33 >> 1;
  275|  1.30k|  const uint8_t kuiVL4          = (kuiT01 + kuiT12) >> 2;
  276|  1.30k|  const uint8_t kuiVL5          = (kuiT12 + kuiT23) >> 2;
  277|  1.30k|  const uint8_t kuiVL6          = (kuiT23 + kuiT33) >> 2;
  278|  1.30k|  const uint8_t kuiVL7          = kuiVL3;
  279|  1.30k|  const uint8_t kuiList[10]     = { kuiVL0, kuiVL1, kuiVL2, kuiVL3, kuiVL3, kuiVL4, kuiVL5, kuiVL6, kuiVL7, kuiVL7 };
  280|       |
  281|  1.30k|  ST32A4 (pPred, LD32 (kuiList));
  ------------------
  |  |   80|  1.30k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  1.30k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  282|  1.30k|  ST32A4 (pPred + kiStride, LD32 (kuiList + 5));
  ------------------
  |  |   80|  1.30k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  1.30k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  283|  1.30k|  ST32A4 (pPred + kiStride2, LD32 (kuiList + 1));
  ------------------
  |  |   80|  1.30k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  1.30k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  284|  1.30k|  ST32A4 (pPred + kiStride3, LD32 (kuiList + 6));
  ------------------
  |  |   80|  1.30k|#define ST32A4(a, b) STA(a, b, 32, 4)
  |  |  ------------------
  |  |  |  |   71|  1.30k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  285|  1.30k|}
_ZN7WelsDec19WelsI8x8LumaPredV_cEPhibb:
  383|  6.16k|void WelsI8x8LumaPredV_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
  384|  6.16k|  uint64_t uiTop = 0;
  385|  6.16k|  int32_t iStride[8];
  386|  6.16k|  uint8_t uiPixelFilterT[8];
  387|  6.16k|  int32_t i;
  388|       |
  389|  49.2k|  for (iStride[0] = 0, i = 1; i < 8; i++) {
  ------------------
  |  Branch (389:31): [True: 43.1k, False: 6.16k]
  ------------------
  390|  43.1k|    iStride[i] = iStride[i - 1] + kiStride;
  391|  43.1k|  }
  392|       |
  393|  6.16k|  uiPixelFilterT[0] = bTLAvail ? ((pPred[-1 - kiStride] + (pPred[-kiStride] << 1) + pPred[1 - kiStride] + 2) >> 2) : ((
  ------------------
  |  Branch (393:23): [True: 5.22k, False: 940]
  ------------------
  394|    940|                        pPred[-kiStride] * 3 + pPred[1 - kiStride] + 2) >> 2);
  395|  43.1k|  for (i = 1; i < 7; i++) {
  ------------------
  |  Branch (395:15): [True: 36.9k, False: 6.16k]
  ------------------
  396|  36.9k|    uiPixelFilterT[i] = ((pPred[i - 1 - kiStride] + (pPred[i - kiStride] << 1) + pPred[i + 1 - kiStride] + 2) >> 2);
  397|  36.9k|  }
  398|  6.16k|  uiPixelFilterT[7] = bTRAvail ? ((pPred[6 - kiStride] + (pPred[7 - kiStride] << 1) + pPred[8 - kiStride] + 2) >> 2) : ((
  ------------------
  |  Branch (398:23): [True: 4.47k, False: 1.68k]
  ------------------
  399|  1.68k|                        pPred[6 - kiStride] + pPred[7 - kiStride] * 3 + 2) >> 2);
  400|       |
  401|       |  // 8-89
  402|  55.4k|  for (i = 7; i >= 0; i--) {
  ------------------
  |  Branch (402:15): [True: 49.2k, False: 6.16k]
  ------------------
  403|  49.2k|    uiTop = ((uiTop << 8) | uiPixelFilterT[i]);
  404|  49.2k|  }
  405|       |
  406|  55.4k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (406:15): [True: 49.2k, False: 6.16k]
  ------------------
  407|  49.2k|    ST64A8 (pPred + kiStride * i, uiTop);
  ------------------
  |  |   83|  49.2k|#define ST64A8(a, b) STA(a, b, 64, 8)
  |  |  ------------------
  |  |  |  |   71|  49.2k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  408|  49.2k|  }
  409|  6.16k|}
_ZN7WelsDec19WelsI8x8LumaPredH_cEPhibb:
  411|  34.0k|void WelsI8x8LumaPredH_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
  412|  34.0k|  uint64_t uiLeft;
  413|  34.0k|  int32_t iStride[8];
  414|  34.0k|  uint8_t uiPixelFilterL[8];
  415|  34.0k|  int32_t i;
  416|       |
  417|   272k|  for (iStride[0] = 0, i = 1; i < 8; i++) {
  ------------------
  |  Branch (417:31): [True: 238k, False: 34.0k]
  ------------------
  418|   238k|    iStride[i] = iStride[i - 1] + kiStride;
  419|   238k|  }
  420|       |
  421|  34.0k|  uiPixelFilterL[0] = bTLAvail ? ((pPred[-1 - kiStride] + (pPred[-1] << 1) + pPred[-1 + iStride[1]] + 2) >> 2) : ((
  ------------------
  |  Branch (421:23): [True: 33.6k, False: 361]
  ------------------
  422|    361|                        pPred[-1] * 3 + pPred[-1 + iStride[1]] + 2) >> 2);
  423|   238k|  for (i = 1; i < 7; i++) {
  ------------------
  |  Branch (423:15): [True: 204k, False: 34.0k]
  ------------------
  424|   204k|    uiPixelFilterL[i] = ((pPred[-1 + iStride[i - 1]] + (pPred[-1 + iStride[i]] << 1) + pPred[-1 + iStride[i + 1]] + 2) >>
  425|   204k|                         2);
  426|   204k|  }
  427|  34.0k|  uiPixelFilterL[7] = ((pPred[-1 + iStride[6]] + pPred[-1 + iStride[7]] * 3 + 2) >> 2);
  428|       |
  429|       |  // 8-90
  430|   306k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (430:15): [True: 272k, False: 34.0k]
  ------------------
  431|   272k|    uiLeft = 0x0101010101010101ULL * uiPixelFilterL[i];
  432|   272k|    ST64A8 (pPred + iStride[i], uiLeft);
  ------------------
  |  |   83|   272k|#define ST64A8(a, b) STA(a, b, 64, 8)
  |  |  ------------------
  |  |  |  |   71|   272k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  433|   272k|  }
  434|  34.0k|}
_ZN7WelsDec20WelsI8x8LumaPredDc_cEPhibb:
  436|   103k|void WelsI8x8LumaPredDc_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
  437|   103k|  int32_t iStride[8];
  438|   103k|  uint8_t uiPixelFilterL[8];
  439|   103k|  uint8_t uiPixelFilterT[8];
  440|   103k|  uint16_t uiTotal = 0;
  441|   103k|  int32_t i;
  442|       |
  443|   825k|  for (iStride[0] = 0, i = 1; i < 8; i++) {
  ------------------
  |  Branch (443:31): [True: 722k, False: 103k]
  ------------------
  444|   722k|    iStride[i] = iStride[i - 1] + kiStride;
  445|   722k|  }
  446|       |
  447|   103k|  uiPixelFilterL[0] = bTLAvail ? ((pPred[-1 - kiStride] + (pPred[-1] << 1) + pPred[-1 + iStride[1]] + 2) >> 2) : ((
  ------------------
  |  Branch (447:23): [True: 102k, False: 765]
  ------------------
  448|    765|                        pPred[-1] * 3 + pPred[-1 + iStride[1]] + 2) >> 2);
  449|   103k|  uiPixelFilterT[0] = bTLAvail ? ((pPred[-1 - kiStride] + (pPred[-kiStride] << 1) + pPred[1 - kiStride] + 2) >> 2) : ((
  ------------------
  |  Branch (449:23): [True: 102k, False: 765]
  ------------------
  450|    765|                        pPred[-kiStride] * 3 + pPred[1 - kiStride] + 2) >> 2);
  451|   722k|  for (i = 1; i < 7; i++) {
  ------------------
  |  Branch (451:15): [True: 618k, False: 103k]
  ------------------
  452|   618k|    uiPixelFilterL[i] = ((pPred[-1 + iStride[i - 1]] + (pPred[-1 + iStride[i]] << 1) + pPred[-1 + iStride[i + 1]] + 2) >>
  453|   618k|                         2);
  454|   618k|    uiPixelFilterT[i] = ((pPred[i - 1 - kiStride] + (pPred[i - kiStride] << 1) + pPred[i + 1 - kiStride] + 2) >> 2);
  455|   618k|  }
  456|   103k|  uiPixelFilterL[7] = ((pPred[-1 + iStride[6]] + pPred[-1 + iStride[7]] * 3 + 2) >> 2);
  457|   103k|  uiPixelFilterT[7] = bTRAvail ? ((pPred[6 - kiStride] + (pPred[7 - kiStride] << 1) + pPred[8 - kiStride] + 2) >> 2) : ((
  ------------------
  |  Branch (457:23): [True: 55.1k, False: 48.0k]
  ------------------
  458|  48.0k|                        pPred[6 - kiStride] + pPred[7 - kiStride] * 3 + 2) >> 2);
  459|       |
  460|       |  // 8-91
  461|   928k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (461:15): [True: 825k, False: 103k]
  ------------------
  462|   825k|    uiTotal += uiPixelFilterL[i];
  463|   825k|    uiTotal += uiPixelFilterT[i];
  464|   825k|  }
  465|       |
  466|   103k|  const uint8_t kuiMean = ((uiTotal + 8) >> 4);
  467|   103k|  const uint64_t kuiMean64 = 0x0101010101010101ULL * kuiMean;
  468|       |
  469|   928k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (469:15): [True: 825k, False: 103k]
  ------------------
  470|   825k|    ST64A8 (pPred + iStride[i], kuiMean64);
  ------------------
  |  |   83|   825k|#define ST64A8(a, b) STA(a, b, 64, 8)
  |  |  ------------------
  |  |  |  |   71|   825k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  471|   825k|  }
  472|   103k|}
_ZN7WelsDec24WelsI8x8LumaPredDcLeft_cEPhibb:
  474|  93.5k|void WelsI8x8LumaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
  475|  93.5k|  int32_t iStride[8];
  476|  93.5k|  uint8_t uiPixelFilterL[8];
  477|  93.5k|  uint16_t uiTotal = 0;
  478|  93.5k|  int32_t i;
  479|       |
  480|   748k|  for (iStride[0] = 0, i = 1; i < 8; i++) {
  ------------------
  |  Branch (480:31): [True: 654k, False: 93.5k]
  ------------------
  481|   654k|    iStride[i] = iStride[i - 1] + kiStride;
  482|   654k|  }
  483|       |
  484|  93.5k|  uiPixelFilterL[0] = bTLAvail ? ((pPred[-1 - kiStride] + (pPred[-1] << 1) + pPred[-1 + iStride[1]] + 2) >> 2) : ((
  ------------------
  |  Branch (484:23): [True: 1.06k, False: 92.4k]
  ------------------
  485|  92.4k|                        pPred[-1] * 3 + pPred[-1 + iStride[1]] + 2) >> 2);
  486|   654k|  for (i = 1; i < 7; i++) {
  ------------------
  |  Branch (486:15): [True: 561k, False: 93.5k]
  ------------------
  487|   561k|    uiPixelFilterL[i] = ((pPred[-1 + iStride[i - 1]] + (pPred[-1 + iStride[i]] << 1) + pPred[-1 + iStride[i + 1]] + 2) >>
  488|   561k|                         2);
  489|   561k|  }
  490|  93.5k|  uiPixelFilterL[7] = ((pPred[-1 + iStride[6]] + pPred[-1 + iStride[7]] * 3 + 2) >> 2);
  491|       |
  492|       |  // 8-92
  493|   841k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (493:15): [True: 748k, False: 93.5k]
  ------------------
  494|   748k|    uiTotal += uiPixelFilterL[i];
  495|   748k|  }
  496|       |
  497|  93.5k|  const uint8_t kuiMean = ((uiTotal + 4) >> 3);
  498|  93.5k|  const uint64_t kuiMean64 = 0x0101010101010101ULL * kuiMean;
  499|       |
  500|   841k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (500:15): [True: 748k, False: 93.5k]
  ------------------
  501|   748k|    ST64A8 (pPred + iStride[i], kuiMean64);
  ------------------
  |  |   83|   748k|#define ST64A8(a, b) STA(a, b, 64, 8)
  |  |  ------------------
  |  |  |  |   71|   748k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  502|   748k|  }
  503|  93.5k|}
_ZN7WelsDec23WelsI8x8LumaPredDcTop_cEPhibb:
  505|  43.8k|void WelsI8x8LumaPredDcTop_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
  506|  43.8k|  int32_t iStride[8];
  507|  43.8k|  uint8_t uiPixelFilterT[8];
  508|  43.8k|  uint16_t uiTotal = 0;
  509|  43.8k|  int32_t i;
  510|       |
  511|   350k|  for (iStride[0] = 0, i = 1; i < 8; i++) {
  ------------------
  |  Branch (511:31): [True: 306k, False: 43.8k]
  ------------------
  512|   306k|    iStride[i] = iStride[i - 1] + kiStride;
  513|   306k|  }
  514|       |
  515|  43.8k|  uiPixelFilterT[0] = bTLAvail ? ((pPred[-1 - kiStride] + (pPred[-kiStride] << 1) + pPred[1 - kiStride] + 2) >> 2) : ((
  ------------------
  |  Branch (515:23): [True: 1.02k, False: 42.8k]
  ------------------
  516|  42.8k|                        pPred[-kiStride] * 3 + pPred[1 - kiStride] + 2) >> 2);
  517|   306k|  for (i = 1; i < 7; i++) {
  ------------------
  |  Branch (517:15): [True: 263k, False: 43.8k]
  ------------------
  518|   263k|    uiPixelFilterT[i] = ((pPred[i - 1 - kiStride] + (pPred[i - kiStride] << 1) + pPred[i + 1 - kiStride] + 2) >> 2);
  519|   263k|  }
  520|  43.8k|  uiPixelFilterT[7] = bTRAvail ? ((pPred[6 - kiStride] + (pPred[7 - kiStride] << 1) + pPred[8 - kiStride] + 2) >> 2) : ((
  ------------------
  |  Branch (520:23): [True: 43.8k, False: 0]
  ------------------
  521|      0|                        pPred[6 - kiStride] + pPred[7 - kiStride] * 3 + 2) >> 2);
  522|       |
  523|       |  // 8-93
  524|   394k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (524:15): [True: 350k, False: 43.8k]
  ------------------
  525|   350k|    uiTotal += uiPixelFilterT[i];
  526|   350k|  }
  527|       |
  528|  43.8k|  const uint8_t kuiMean = ((uiTotal + 4) >> 3);
  529|  43.8k|  const uint64_t kuiMean64 = 0x0101010101010101ULL * kuiMean;
  530|       |
  531|   394k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (531:15): [True: 350k, False: 43.8k]
  ------------------
  532|   350k|    ST64A8 (pPred + iStride[i], kuiMean64);
  ------------------
  |  |   83|   350k|#define ST64A8(a, b) STA(a, b, 64, 8)
  |  |  ------------------
  |  |  |  |   71|   350k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  533|   350k|  }
  534|  43.8k|}
_ZN7WelsDec22WelsI8x8LumaPredDcNA_cEPhibb:
  536|  36.5k|void WelsI8x8LumaPredDcNA_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
  537|       |  // for normal 8 bit depth, 8-94
  538|  36.5k|  const uint64_t kuiDC64 = 0x8080808080808080ULL;
  539|       |
  540|  36.5k|  int32_t iStride[8];
  541|  36.5k|  int32_t i;
  542|  36.5k|  ST64A8 (pPred, kuiDC64);
  ------------------
  |  |   83|  36.5k|#define ST64A8(a, b) STA(a, b, 64, 8)
  |  |  ------------------
  |  |  |  |   71|  36.5k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  543|   292k|  for (iStride[0] = 0, i = 1; i < 8; i++) {
  ------------------
  |  Branch (543:31): [True: 255k, False: 36.5k]
  ------------------
  544|   255k|    iStride[i] = iStride[i - 1] + kiStride;
  545|   255k|    ST64A8 (pPred + iStride[i], kuiDC64);
  ------------------
  |  |   83|   255k|#define ST64A8(a, b) STA(a, b, 64, 8)
  |  |  ------------------
  |  |  |  |   71|   255k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
  546|   255k|  }
  547|  36.5k|}
_ZN7WelsDec21WelsI8x8LumaPredDDL_cEPhibb:
  550|  6.83k|void WelsI8x8LumaPredDDL_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
  551|       |  // Top and Top-right available
  552|  6.83k|  int32_t iStride[8];
  553|  6.83k|  uint8_t uiPixelFilterT[16];
  554|  6.83k|  int32_t i, j;
  555|       |
  556|  54.6k|  for (iStride[0] = 0, i = 1; i < 8; i++) {
  ------------------
  |  Branch (556:31): [True: 47.8k, False: 6.83k]
  ------------------
  557|  47.8k|    iStride[i] = iStride[i - 1] + kiStride;
  558|  47.8k|  }
  559|       |
  560|  6.83k|  uiPixelFilterT[0] = bTLAvail ? ((pPred[-1 - kiStride] + (pPred[-kiStride] << 1) + pPred[1 - kiStride] + 2) >> 2) : ((
  ------------------
  |  Branch (560:23): [True: 5.05k, False: 1.77k]
  ------------------
  561|  1.77k|                        pPred[-kiStride] * 3 + pPred[1 - kiStride] + 2) >> 2);
  562|   102k|  for (i = 1; i < 15; i++) {
  ------------------
  |  Branch (562:15): [True: 95.6k, False: 6.83k]
  ------------------
  563|  95.6k|    uiPixelFilterT[i] = ((pPred[i - 1 - kiStride] + (pPred[i - kiStride] << 1) + pPred[i + 1 - kiStride] + 2) >> 2);
  564|  95.6k|  }
  565|  6.83k|  uiPixelFilterT[15] = ((pPred[14 - kiStride] + pPred[15 - kiStride] * 3 + 2) >> 2);
  566|       |
  567|  61.5k|  for (i = 0; i < 8; i++) { // y
  ------------------
  |  Branch (567:15): [True: 54.6k, False: 6.83k]
  ------------------
  568|   492k|    for (j = 0; j < 8; j++) { // x
  ------------------
  |  Branch (568:17): [True: 437k, False: 54.6k]
  ------------------
  569|   437k|      if (i == 7 && j == 7) { // 8-95
  ------------------
  |  Branch (569:11): [True: 54.6k, False: 382k]
  |  Branch (569:21): [True: 6.83k, False: 47.8k]
  ------------------
  570|  6.83k|        pPred[j + iStride[i]] = (uiPixelFilterT[14] + 3 * uiPixelFilterT[15] + 2) >> 2;
  571|   430k|      } else { // 8-96
  572|   430k|        pPred[j + iStride[i]] = (uiPixelFilterT[i + j] + (uiPixelFilterT[i + j + 1] << 1) + uiPixelFilterT[i + j + 2] + 2) >> 2;
  573|   430k|      }
  574|   437k|    }
  575|  54.6k|  }
  576|  6.83k|}
_ZN7WelsDec24WelsI8x8LumaPredDDLTop_cEPhibb:
  579|  4.09k|void WelsI8x8LumaPredDDLTop_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
  580|       |  // Top available and Top-right unavailable
  581|  4.09k|  int32_t iStride[8];
  582|  4.09k|  uint8_t uiPixelFilterT[16];
  583|  4.09k|  int32_t i, j;
  584|       |
  585|  32.7k|  for (iStride[0] = 0, i = 1; i < 8; i++) {
  ------------------
  |  Branch (585:31): [True: 28.6k, False: 4.09k]
  ------------------
  586|  28.6k|    iStride[i] = iStride[i - 1] + kiStride;
  587|  28.6k|  }
  588|       |
  589|  4.09k|  uiPixelFilterT[0] = bTLAvail ? ((pPred[-1 - kiStride] + (pPred[-kiStride] << 1) + pPred[1 - kiStride] + 2) >> 2) : ((
  ------------------
  |  Branch (589:23): [True: 4.09k, False: 0]
  ------------------
  590|      0|                        pPred[-kiStride] * 3 + pPred[1 - kiStride] + 2) >> 2);
  591|  28.6k|  for (i = 1; i < 7; i++) {
  ------------------
  |  Branch (591:15): [True: 24.5k, False: 4.09k]
  ------------------
  592|  24.5k|    uiPixelFilterT[i] = ((pPred[i - 1 - kiStride] + (pPred[i - kiStride] << 1) + pPred[i + 1 - kiStride] + 2) >> 2);
  593|  24.5k|  }
  594|       |  // p[x, -1] x=8...15 are replaced with p[7, -1]
  595|  4.09k|  uiPixelFilterT[7] = ((pPred[6 - kiStride] + pPred[7 - kiStride] * 3 + 2) >> 2);
  596|  36.8k|  for (i = 8; i < 16; i++) {
  ------------------
  |  Branch (596:15): [True: 32.7k, False: 4.09k]
  ------------------
  597|  32.7k|    uiPixelFilterT[i] = pPred[7 - kiStride];
  598|  32.7k|  }
  599|       |
  600|  36.8k|  for (i = 0; i < 8; i++) { // y
  ------------------
  |  Branch (600:15): [True: 32.7k, False: 4.09k]
  ------------------
  601|   295k|    for (j = 0; j < 8; j++) { // x
  ------------------
  |  Branch (601:17): [True: 262k, False: 32.7k]
  ------------------
  602|   262k|      if (i == 7 && j == 7) { // 8-95
  ------------------
  |  Branch (602:11): [True: 32.7k, False: 229k]
  |  Branch (602:21): [True: 4.09k, False: 28.6k]
  ------------------
  603|  4.09k|        pPred[j + iStride[i]] = (uiPixelFilterT[14] + 3 * uiPixelFilterT[15] + 2) >> 2;
  604|   258k|      } else { // 8-96
  605|   258k|        pPred[j + iStride[i]] = (uiPixelFilterT[i + j] + (uiPixelFilterT[i + j + 1] << 1) + uiPixelFilterT[i + j + 2] + 2) >> 2;
  606|   258k|      }
  607|   262k|    }
  608|  32.7k|  }
  609|  4.09k|}
_ZN7WelsDec21WelsI8x8LumaPredDDR_cEPhibb:
  612|  5.90k|void WelsI8x8LumaPredDDR_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
  613|       |  // The TopLeft, Top, Left are all available under this mode
  614|  5.90k|  int32_t iStride[8];
  615|  5.90k|  uint8_t uiPixelFilterTL;
  616|  5.90k|  uint8_t uiPixelFilterL[8];
  617|  5.90k|  uint8_t uiPixelFilterT[8];
  618|  5.90k|  int32_t i, j;
  619|       |
  620|  47.2k|  for (iStride[0] = 0, i = 1; i < 8; i++) {
  ------------------
  |  Branch (620:31): [True: 41.3k, False: 5.90k]
  ------------------
  621|  41.3k|    iStride[i] = iStride[i - 1] + kiStride;
  622|  41.3k|  }
  623|       |
  624|  5.90k|  uiPixelFilterTL = (pPred[-1] + (pPred[-1 - kiStride] << 1) + pPred[-kiStride] + 2) >> 2;
  625|       |
  626|  5.90k|  uiPixelFilterL[0] = ((pPred[-1 - kiStride] + (pPred[-1] << 1) + pPred[-1 + iStride[1]] + 2) >> 2);
  627|  5.90k|  uiPixelFilterT[0] = ((pPred[-1 - kiStride] + (pPred[-kiStride] << 1) + pPred[1 - kiStride] + 2) >> 2);
  628|  41.3k|  for (i = 1; i < 7; i++) {
  ------------------
  |  Branch (628:15): [True: 35.4k, False: 5.90k]
  ------------------
  629|  35.4k|    uiPixelFilterL[i] = ((pPred[-1 + iStride[i - 1]] + (pPred[-1 + iStride[i]] << 1) + pPred[-1 + iStride[i + 1]] + 2) >>
  630|  35.4k|                         2);
  631|  35.4k|    uiPixelFilterT[i] = ((pPred[i - 1 - kiStride] + (pPred[i - kiStride] << 1) + pPred[i + 1 - kiStride] + 2) >> 2);
  632|  35.4k|  }
  633|  5.90k|  uiPixelFilterL[7] = ((pPred[-1 + iStride[6]] + pPred[-1 + iStride[7]] * 3 + 2) >> 2);
  634|  5.90k|  uiPixelFilterT[7] = bTRAvail ? ((pPred[6 - kiStride] + (pPred[7 - kiStride] << 1) + pPred[8 - kiStride] + 2) >> 2) : ((
  ------------------
  |  Branch (634:23): [True: 1.87k, False: 4.03k]
  ------------------
  635|  4.03k|                        pPred[6 - kiStride] + pPred[7 - kiStride] * 3 + 2) >> 2);
  636|       |
  637|  53.1k|  for (i = 0; i < 8; i++) { // y
  ------------------
  |  Branch (637:15): [True: 47.2k, False: 5.90k]
  ------------------
  638|       |    // 8-98, x < y-1
  639|   171k|    for (j = 0; j < (i - 1); j++) {
  ------------------
  |  Branch (639:17): [True: 123k, False: 47.2k]
  ------------------
  640|   123k|      pPred[j + iStride[i]] = (uiPixelFilterL[i - j - 2] + (uiPixelFilterL[i - j - 1] << 1) + uiPixelFilterL[i - j] + 2) >> 2;
  641|   123k|    }
  642|       |    // 8-98, special case, x == y-1
  643|  47.2k|    if (i >= 1) {
  ------------------
  |  Branch (643:9): [True: 41.3k, False: 5.90k]
  ------------------
  644|  41.3k|      j = i - 1;
  645|  41.3k|      pPred[j + iStride[i]] = (uiPixelFilterTL + (uiPixelFilterL[0] << 1) + uiPixelFilterL[1] + 2) >> 2;
  646|  41.3k|    }
  647|       |    // 8-99, x==y
  648|  47.2k|    j = i;
  649|  47.2k|    pPred[j + iStride[i]] = (uiPixelFilterT[0] + (uiPixelFilterTL << 1) + uiPixelFilterL[0] + 2) >> 2;
  650|       |    // 8-97, special case, x == y+1
  651|  47.2k|    if (i < 7) {
  ------------------
  |  Branch (651:9): [True: 41.3k, False: 5.90k]
  ------------------
  652|  41.3k|      j = i + 1;
  653|  41.3k|      pPred[j + iStride[i]] = (uiPixelFilterTL + (uiPixelFilterT[0] << 1) + uiPixelFilterT[1] + 2) >> 2;
  654|  41.3k|    }
  655|   171k|    for (j = i + 2; j < 8; j++) { // 8-97, x > y+1
  ------------------
  |  Branch (655:21): [True: 123k, False: 47.2k]
  ------------------
  656|   123k|      pPred[j + iStride[i]] = (uiPixelFilterT[j - i - 2] + (uiPixelFilterT[j - i - 1] << 1) + uiPixelFilterT[j - i] + 2) >> 2;
  657|   123k|    }
  658|  47.2k|  }
  659|  5.90k|}
_ZN7WelsDec20WelsI8x8LumaPredVL_cEPhibb:
  662|  12.8k|void WelsI8x8LumaPredVL_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
  663|       |  // Top and Top-right available
  664|  12.8k|  int32_t iStride[8];
  665|  12.8k|  uint8_t uiPixelFilterT[16];
  666|  12.8k|  int32_t i, j;
  667|       |
  668|   102k|  for (iStride[0] = 0, i = 1; i < 8; i++) {
  ------------------
  |  Branch (668:31): [True: 89.6k, False: 12.8k]
  ------------------
  669|  89.6k|    iStride[i] = iStride[i - 1] + kiStride;
  670|  89.6k|  }
  671|       |
  672|  12.8k|  uiPixelFilterT[0] = bTLAvail ? ((pPred[-1 - kiStride] + (pPred[-kiStride] << 1) + pPred[1 - kiStride] + 2) >> 2) : ((
  ------------------
  |  Branch (672:23): [True: 11.1k, False: 1.61k]
  ------------------
  673|  1.61k|                        pPred[-kiStride] * 3 + pPred[1 - kiStride] + 2) >> 2);
  674|   192k|  for (i = 1; i < 15; i++) {
  ------------------
  |  Branch (674:15): [True: 179k, False: 12.8k]
  ------------------
  675|   179k|    uiPixelFilterT[i] = ((pPred[i - 1 - kiStride] + (pPred[i - kiStride] << 1) + pPred[i + 1 - kiStride] + 2) >> 2);
  676|   179k|  }
  677|  12.8k|  uiPixelFilterT[15] = ((pPred[14 - kiStride] + pPred[15 - kiStride] * 3 + 2) >> 2);
  678|       |
  679|   115k|  for (i = 0; i < 8; i++) { // y
  ------------------
  |  Branch (679:15): [True: 102k, False: 12.8k]
  ------------------
  680|   102k|    if ((i & 0x01) == 0) { // 8-108
  ------------------
  |  Branch (680:9): [True: 51.2k, False: 51.2k]
  ------------------
  681|   460k|      for (j = 0; j < 8; j++) { // x
  ------------------
  |  Branch (681:19): [True: 409k, False: 51.2k]
  ------------------
  682|   409k|        pPred[j + iStride[i]] = (uiPixelFilterT[j + (i >> 1)] + uiPixelFilterT[j + (i >> 1) + 1] + 1) >> 1;
  683|   409k|      }
  684|  51.2k|    } else {  // 8-109
  685|   460k|      for (j = 0; j < 8; j++) { // x
  ------------------
  |  Branch (685:19): [True: 409k, False: 51.2k]
  ------------------
  686|   409k|        pPred[j + iStride[i]] = (uiPixelFilterT[j + (i >> 1)] + (uiPixelFilterT[j + (i >> 1) + 1] << 1) + uiPixelFilterT[j +
  687|   409k|                                 (i >> 1) + 2] + 2) >> 2;
  688|   409k|      }
  689|  51.2k|    }
  690|   102k|  }
  691|  12.8k|}
_ZN7WelsDec23WelsI8x8LumaPredVLTop_cEPhibb:
  694|  5.56k|void WelsI8x8LumaPredVLTop_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
  695|       |  // Top available and Top-right unavailable
  696|  5.56k|  int32_t iStride[8];
  697|  5.56k|  uint8_t uiPixelFilterT[16];
  698|  5.56k|  int32_t i, j;
  699|       |
  700|  44.5k|  for (iStride[0] = 0, i = 1; i < 8; i++) {
  ------------------
  |  Branch (700:31): [True: 38.9k, False: 5.56k]
  ------------------
  701|  38.9k|    iStride[i] = iStride[i - 1] + kiStride;
  702|  38.9k|  }
  703|       |
  704|  5.56k|  uiPixelFilterT[0] = bTLAvail ? ((pPred[-1 - kiStride] + (pPred[-kiStride] << 1) + pPred[1 - kiStride] + 2) >> 2) : ((
  ------------------
  |  Branch (704:23): [True: 5.56k, False: 0]
  ------------------
  705|      0|                        pPred[-kiStride] * 3 + pPred[1 - kiStride] + 2) >> 2);
  706|  38.9k|  for (i = 1; i < 7; i++) {
  ------------------
  |  Branch (706:15): [True: 33.3k, False: 5.56k]
  ------------------
  707|  33.3k|    uiPixelFilterT[i] = ((pPred[i - 1 - kiStride] + (pPred[i - kiStride] << 1) + pPred[i + 1 - kiStride] + 2) >> 2);
  708|  33.3k|  }
  709|       |  // p[x, -1] x=8...15 are replaced with p[7, -1]
  710|  5.56k|  uiPixelFilterT[7] = ((pPred[6 - kiStride] + pPred[7 - kiStride] * 3 + 2) >> 2);
  711|  50.0k|  for (i = 8; i < 16; i++) {
  ------------------
  |  Branch (711:15): [True: 44.5k, False: 5.56k]
  ------------------
  712|  44.5k|    uiPixelFilterT[i] = pPred[7 - kiStride];
  713|  44.5k|  }
  714|       |
  715|  50.0k|  for (i = 0; i < 8; i++) { // y
  ------------------
  |  Branch (715:15): [True: 44.5k, False: 5.56k]
  ------------------
  716|  44.5k|    if ((i & 0x01) == 0) { // 8-108
  ------------------
  |  Branch (716:9): [True: 22.2k, False: 22.2k]
  ------------------
  717|   200k|      for (j = 0; j < 8; j++) { // x
  ------------------
  |  Branch (717:19): [True: 178k, False: 22.2k]
  ------------------
  718|   178k|        pPred[j + iStride[i]] = (uiPixelFilterT[j + (i >> 1)] + uiPixelFilterT[j + (i >> 1) + 1] + 1) >> 1;
  719|   178k|      }
  720|  22.2k|    } else {  // 8-109
  721|   200k|      for (j = 0; j < 8; j++) { // x
  ------------------
  |  Branch (721:19): [True: 178k, False: 22.2k]
  ------------------
  722|   178k|        pPred[j + iStride[i]] = (uiPixelFilterT[j + (i >> 1)] + (uiPixelFilterT[j + (i >> 1) + 1] << 1) + uiPixelFilterT[j +
  723|   178k|                                 (i >> 1) + 2] + 2) >> 2;
  724|   178k|      }
  725|  22.2k|    }
  726|  44.5k|  }
  727|  5.56k|}
_ZN7WelsDec20WelsI8x8LumaPredVR_cEPhibb:
  730|  3.74k|void WelsI8x8LumaPredVR_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
  731|       |  // The TopLeft, Top, Left are always available under this mode
  732|  3.74k|  int32_t iStride[8];
  733|  3.74k|  uint8_t uiPixelFilterTL;
  734|  3.74k|  uint8_t uiPixelFilterL[8];
  735|  3.74k|  uint8_t uiPixelFilterT[8];
  736|  3.74k|  int32_t i, j;
  737|  3.74k|  int32_t izVR, izVRDiv;
  738|       |
  739|  29.9k|  for (iStride[0] = 0, i = 1; i < 8; i++) {
  ------------------
  |  Branch (739:31): [True: 26.2k, False: 3.74k]
  ------------------
  740|  26.2k|    iStride[i] = iStride[i - 1] + kiStride;
  741|  26.2k|  }
  742|       |
  743|  3.74k|  uiPixelFilterTL = (pPred[-1] + (pPred[-1 - kiStride] << 1) + pPred[-kiStride] + 2) >> 2;
  744|       |
  745|  3.74k|  uiPixelFilterL[0] = ((pPred[-1 - kiStride] + (pPred[-1] << 1) + pPred[-1 + iStride[1]] + 2) >> 2);
  746|  3.74k|  uiPixelFilterT[0] = ((pPred[-1 - kiStride] + (pPred[-kiStride] << 1) + pPred[1 - kiStride] + 2) >> 2);
  747|  26.2k|  for (i = 1; i < 7; i++) {
  ------------------
  |  Branch (747:15): [True: 22.4k, False: 3.74k]
  ------------------
  748|  22.4k|    uiPixelFilterL[i] = ((pPred[-1 + iStride[i - 1]] + (pPred[-1 + iStride[i]] << 1) + pPred[-1 + iStride[i + 1]] + 2) >>
  749|  22.4k|                         2);
  750|  22.4k|    uiPixelFilterT[i] = ((pPred[i - 1 - kiStride] + (pPred[i - kiStride] << 1) + pPred[i + 1 - kiStride] + 2) >> 2);
  751|  22.4k|  }
  752|  3.74k|  uiPixelFilterL[7] = ((pPred[-1 + iStride[6]] + pPred[-1 + iStride[7]] * 3 + 2) >> 2);
  753|  3.74k|  uiPixelFilterT[7] = bTRAvail ? ((pPred[6 - kiStride] + (pPred[7 - kiStride] << 1) + pPred[8 - kiStride] + 2) >> 2) : ((
  ------------------
  |  Branch (753:23): [True: 2.22k, False: 1.52k]
  ------------------
  754|  1.52k|                        pPred[6 - kiStride] + pPred[7 - kiStride] * 3 + 2) >> 2);
  755|       |
  756|  33.7k|  for (i = 0; i < 8; i++) { // y
  ------------------
  |  Branch (756:15): [True: 29.9k, False: 3.74k]
  ------------------
  757|   269k|    for (j = 0; j < 8; j++) { // x
  ------------------
  |  Branch (757:17): [True: 239k, False: 29.9k]
  ------------------
  758|   239k|      izVR = (j << 1) - i; // 2 * x - y
  759|   239k|      izVRDiv = j - (i >> 1);
  760|   239k|      if (izVR >= 0) {
  ------------------
  |  Branch (760:11): [True: 179k, False: 59.9k]
  ------------------
  761|   179k|        if ((izVR & 0x01) == 0) {  // 8-100
  ------------------
  |  Branch (761:13): [True: 97.4k, False: 82.4k]
  ------------------
  762|  97.4k|          if (izVRDiv > 0) {
  ------------------
  |  Branch (762:15): [True: 82.4k, False: 14.9k]
  ------------------
  763|  82.4k|            pPred[j + iStride[i]] = (uiPixelFilterT[izVRDiv - 1] + uiPixelFilterT[izVRDiv] + 1) >> 1;
  764|  82.4k|          } else {
  765|  14.9k|            pPred[j + iStride[i]] = (uiPixelFilterTL + uiPixelFilterT[0] + 1) >> 1;
  766|  14.9k|          }
  767|  97.4k|        } else { // 8-101
  768|  82.4k|          if (izVRDiv > 1) {
  ------------------
  |  Branch (768:15): [True: 67.4k, False: 14.9k]
  ------------------
  769|  67.4k|            pPred[j + iStride[i]] = (uiPixelFilterT[izVRDiv - 2] + (uiPixelFilterT[izVRDiv - 1] << 1) + uiPixelFilterT[izVRDiv] + 2)
  770|  67.4k|                                    >> 2;
  771|  67.4k|          } else {
  772|  14.9k|            pPred[j + iStride[i]] = (uiPixelFilterTL + (uiPixelFilterT[0] << 1) + uiPixelFilterT[1] + 2) >> 2;
  773|  14.9k|          }
  774|  82.4k|        }
  775|   179k|      } else if (izVR == -1) { // 8-102
  ------------------
  |  Branch (775:18): [True: 14.9k, False: 44.9k]
  ------------------
  776|  14.9k|        pPred[j + iStride[i]] = (uiPixelFilterL[0] + (uiPixelFilterTL << 1) + uiPixelFilterT[0] + 2) >> 2;
  777|  44.9k|      } else if (izVR < -2) { // 8-103
  ------------------
  |  Branch (777:18): [True: 33.7k, False: 11.2k]
  ------------------
  778|  33.7k|        pPred[j + iStride[i]] = (uiPixelFilterL[-izVR - 1] + (uiPixelFilterL[-izVR - 2] << 1) + uiPixelFilterL[-izVR - 3] + 2)
  779|  33.7k|                                >> 2;
  780|  33.7k|      } else { // izVR==-2, 8-103, special case
  781|  11.2k|        pPred[j + iStride[i]] = (uiPixelFilterL[1] + (uiPixelFilterL[0] << 1) + uiPixelFilterTL + 2) >> 2;
  782|  11.2k|      }
  783|   239k|    }
  784|  29.9k|  }
  785|  3.74k|}
_ZN7WelsDec20WelsI8x8LumaPredHU_cEPhibb:
  788|  38.4k|void WelsI8x8LumaPredHU_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
  789|  38.4k|  int32_t iStride[8];
  790|  38.4k|  uint8_t uiPixelFilterL[8];
  791|  38.4k|  int32_t i, j;
  792|  38.4k|  int32_t izHU;
  793|       |
  794|   307k|  for (iStride[0] = 0, i = 1; i < 8; i++) {
  ------------------
  |  Branch (794:31): [True: 269k, False: 38.4k]
  ------------------
  795|   269k|    iStride[i] = iStride[i - 1] + kiStride;
  796|   269k|  }
  797|       |
  798|  38.4k|  uiPixelFilterL[0] = bTLAvail ? ((pPred[-1 - kiStride] + (pPred[-1] << 1) + pPred[-1 + iStride[1]] + 2) >> 2) : ((
  ------------------
  |  Branch (798:23): [True: 36.5k, False: 1.98k]
  ------------------
  799|  1.98k|                        pPred[-1] * 3 + pPred[-1 + iStride[1]] + 2) >> 2);
  800|   269k|  for (i = 1; i < 7; i++) {
  ------------------
  |  Branch (800:15): [True: 230k, False: 38.4k]
  ------------------
  801|   230k|    uiPixelFilterL[i] = ((pPred[-1 + iStride[i - 1]] + (pPred[-1 + iStride[i]] << 1) + pPred[-1 + iStride[i + 1]] + 2) >>
  802|   230k|                         2);
  803|   230k|  }
  804|  38.4k|  uiPixelFilterL[7] = ((pPred[-1 + iStride[6]] + pPred[-1 + iStride[7]] * 3 + 2) >> 2);
  805|       |
  806|   346k|  for (i = 0; i < 8; i++) { // y
  ------------------
  |  Branch (806:15): [True: 307k, False: 38.4k]
  ------------------
  807|  2.77M|    for (j = 0; j < 8; j++) { // x
  ------------------
  |  Branch (807:17): [True: 2.46M, False: 307k]
  ------------------
  808|  2.46M|      izHU = j + (i << 1); // x + 2 * y
  809|  2.46M|      if (izHU < 13) {
  ------------------
  |  Branch (809:11): [True: 1.53M, False: 923k]
  ------------------
  810|  1.53M|        if ((izHU & 0x01) == 0) {  // 8-110
  ------------------
  |  Branch (810:13): [True: 846k, False: 692k]
  ------------------
  811|   846k|          pPred[j + iStride[i]] = (uiPixelFilterL[izHU >> 1] + uiPixelFilterL[1 + (izHU >> 1)] + 1) >> 1;
  812|   846k|        } else { // 8-111
  813|   692k|          pPred[j + iStride[i]] = (uiPixelFilterL[izHU >> 1] + (uiPixelFilterL[1 + (izHU >> 1)] << 1) + uiPixelFilterL[2 +
  814|   692k|                                   (izHU >> 1)] + 2) >> 2;
  815|   692k|        }
  816|  1.53M|      } else if (izHU == 13) { // 8-112
  ------------------
  |  Branch (816:18): [True: 153k, False: 769k]
  ------------------
  817|   153k|        pPred[j + iStride[i]] = (uiPixelFilterL[6] + 3 * uiPixelFilterL[7] + 2) >> 2;
  818|   769k|      } else { // 8-113
  819|   769k|        pPred[j + iStride[i]] = uiPixelFilterL[7];
  820|   769k|      }
  821|  2.46M|    }
  822|   307k|  }
  823|  38.4k|}
_ZN7WelsDec20WelsI8x8LumaPredHD_cEPhibb:
  826|  5.46k|void WelsI8x8LumaPredHD_c (uint8_t* pPred, const int32_t kiStride, bool bTLAvail, bool bTRAvail) {
  827|       |  // The TopLeft, Top, Left are all available under this mode
  828|  5.46k|  int32_t iStride[8];
  829|  5.46k|  uint8_t uiPixelFilterTL;
  830|  5.46k|  uint8_t uiPixelFilterL[8];
  831|  5.46k|  uint8_t uiPixelFilterT[8];
  832|  5.46k|  int32_t i, j;
  833|  5.46k|  int32_t izHD, izHDDiv;
  834|       |
  835|  43.6k|  for (iStride[0] = 0, i = 1; i < 8; i++) {
  ------------------
  |  Branch (835:31): [True: 38.2k, False: 5.46k]
  ------------------
  836|  38.2k|    iStride[i] = iStride[i - 1] + kiStride;
  837|  38.2k|  }
  838|       |
  839|  5.46k|  uiPixelFilterTL = (pPred[-1] + (pPred[-1 - kiStride] << 1) + pPred[-kiStride] + 2) >> 2;
  840|       |
  841|  5.46k|  uiPixelFilterL[0] = ((pPred[-1 - kiStride] + (pPred[-1] << 1) + pPred[-1 + iStride[1]] + 2) >> 2);
  842|  5.46k|  uiPixelFilterT[0] = ((pPred[-1 - kiStride] + (pPred[-kiStride] << 1) + pPred[1 - kiStride] + 2) >> 2);
  843|  38.2k|  for (i = 1; i < 7; i++) {
  ------------------
  |  Branch (843:15): [True: 32.7k, False: 5.46k]
  ------------------
  844|  32.7k|    uiPixelFilterL[i] = ((pPred[-1 + iStride[i - 1]] + (pPred[-1 + iStride[i]] << 1) + pPred[-1 + iStride[i + 1]] + 2) >>
  845|  32.7k|                         2);
  846|  32.7k|    uiPixelFilterT[i] = ((pPred[i - 1 - kiStride] + (pPred[i - kiStride] << 1) + pPred[i + 1 - kiStride] + 2) >> 2);
  847|  32.7k|  }
  848|  5.46k|  uiPixelFilterL[7] = ((pPred[-1 + iStride[6]] + pPred[-1 + iStride[7]] * 3 + 2) >> 2);
  849|  5.46k|  uiPixelFilterT[7] = bTRAvail ? ((pPred[6 - kiStride] + (pPred[7 - kiStride] << 1) + pPred[8 - kiStride] + 2) >> 2) : ((
  ------------------
  |  Branch (849:23): [True: 3.14k, False: 2.31k]
  ------------------
  850|  2.31k|                        pPred[6 - kiStride] + pPred[7 - kiStride] * 3 + 2) >> 2);
  851|       |
  852|  49.1k|  for (i = 0; i < 8; i++) { // y
  ------------------
  |  Branch (852:15): [True: 43.6k, False: 5.46k]
  ------------------
  853|   393k|    for (j = 0; j < 8; j++) { // x
  ------------------
  |  Branch (853:17): [True: 349k, False: 43.6k]
  ------------------
  854|   349k|      izHD = (i << 1) - j; // 2*y - x
  855|   349k|      izHDDiv = i - (j >> 1);
  856|   349k|      if (izHD >= 0) {
  ------------------
  |  Branch (856:11): [True: 262k, False: 87.3k]
  ------------------
  857|   262k|        if ((izHD & 0x01) == 0) {  // 8-104
  ------------------
  |  Branch (857:13): [True: 141k, False: 120k]
  ------------------
  858|   141k|          if (izHDDiv == 0) {
  ------------------
  |  Branch (858:15): [True: 21.8k, False: 120k]
  ------------------
  859|  21.8k|            pPred[j + iStride[i]] = (uiPixelFilterTL + uiPixelFilterL[0] + 1) >> 1;
  860|   120k|          } else {
  861|   120k|            pPred[j + iStride[i]] = (uiPixelFilterL[izHDDiv - 1] + uiPixelFilterL[izHDDiv] + 1) >> 1;
  862|   120k|          }
  863|   141k|        } else {  // 8-105
  864|   120k|          if (izHDDiv == 1) {
  ------------------
  |  Branch (864:15): [True: 21.8k, False: 98.2k]
  ------------------
  865|  21.8k|            pPred[j + iStride[i]] = (uiPixelFilterTL + (uiPixelFilterL[0] << 1) + uiPixelFilterL[1] + 2) >> 2;
  866|  98.2k|          } else {
  867|  98.2k|            pPred[j + iStride[i]] = (uiPixelFilterL[izHDDiv - 2] + (uiPixelFilterL[izHDDiv - 1] << 1) + uiPixelFilterL[izHDDiv] + 2)
  868|  98.2k|                                    >> 2;
  869|  98.2k|          }
  870|   120k|        }
  871|   262k|      } else if (izHD == -1) { // 8-106
  ------------------
  |  Branch (871:18): [True: 21.8k, False: 65.5k]
  ------------------
  872|  21.8k|        pPred[j + iStride[i]] = (uiPixelFilterL[0] + (uiPixelFilterTL << 1) + uiPixelFilterT[0] + 2) >> 2;
  873|  65.5k|      } else if (izHD < -2) { // 8-107
  ------------------
  |  Branch (873:18): [True: 49.1k, False: 16.3k]
  ------------------
  874|  49.1k|        pPred[j + iStride[i]] = (uiPixelFilterT[-izHD - 1] + (uiPixelFilterT[-izHD - 2] << 1) + uiPixelFilterT[-izHD - 3] + 2)
  875|  49.1k|                                >> 2;
  876|  49.1k|      } else { // 8-107 special case, izHD==-2
  877|  16.3k|        pPred[j + iStride[i]] = (uiPixelFilterT[1] + (uiPixelFilterT[0] << 1) + uiPixelFilterTL + 2) >> 2;
  878|  16.3k|      }
  879|   349k|    }
  880|  43.6k|  }
  881|  5.46k|}
_ZN7WelsDec26WelsI16x16LumaPredDcLeft_cEPhi:
 1119|  7.36k|void WelsI16x16LumaPredDcLeft_c (uint8_t* pPred, const int32_t kiStride) {
 1120|  7.36k|  int32_t iTmp = (kiStride << 4) - kiStride;
 1121|  7.36k|  int32_t iSum = 0;
 1122|  7.36k|  uint64_t uiMean64 = 0;
 1123|  7.36k|  uint8_t uiMean = 0;
 1124|  7.36k|  uint8_t i = 15;
 1125|       |
 1126|       |  /*caculate the kMean value*/
 1127|   117k|  do {
 1128|   117k|    iSum += pPred[-1 + iTmp];
 1129|   117k|    iTmp -= kiStride;
 1130|   117k|  } while (i-- > 0);
  ------------------
  |  Branch (1130:12): [True: 110k, False: 7.36k]
  ------------------
 1131|  7.36k|  uiMean   = (8 + iSum) >> 4;
 1132|  7.36k|  uiMean64 = 0x0101010101010101ULL * uiMean;
 1133|       |
 1134|  7.36k|  iTmp = (kiStride << 4) - kiStride;
 1135|  7.36k|  i = 15;
 1136|   117k|  do {
 1137|   117k|    ST64A8 (pPred + iTmp, uiMean64);
  ------------------
  |  |   83|   117k|#define ST64A8(a, b) STA(a, b, 64, 8)
  |  |  ------------------
  |  |  |  |   71|   117k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 1138|   117k|    ST64A8 (pPred + iTmp + 8, uiMean64);
  ------------------
  |  |   83|   117k|#define ST64A8(a, b) STA(a, b, 64, 8)
  |  |  ------------------
  |  |  |  |   71|   117k|#define STA(a, b, size, align) (((struct tagUnaligned_##size##_##align *) (a))->l) = (b)
  |  |  ------------------
  ------------------
 1139|       |
 1140|   117k|    iTmp -= kiStride;
 1141|   117k|  } while (i-- > 0);
  ------------------
  |  Branch (1141:12): [True: 110k, False: 7.36k]
  ------------------
 1142|  7.36k|}

_ZN7WelsDec15WelsResetRefPicEPNS_21TagWelsDecoderContextE:
  106|   319k|void WelsResetRefPic (PWelsDecoderContext pCtx) {
  107|   319k|  int32_t i = 0;
  108|   319k|  PRefPic pRefPic = &pCtx->sRefPic;
  109|   319k|  pCtx->sRefPic.uiLongRefCount[LIST_0] = pCtx->sRefPic.uiShortRefCount[LIST_0] = 0;
  110|       |
  111|   319k|  pRefPic->uiRefCount[LIST_0] = 0;
  112|   319k|  pRefPic->uiRefCount[LIST_1] = 0;
  113|       |
  114|  5.75M|  for (i = 0; i < MAX_DPB_COUNT; i++) {
  ------------------
  |  |   49|  5.75M|#define MAX_DPB_COUNT                   (MAX_REF_PIC_COUNT + 1) // 1 additional position for re-order and other process
  |  |  ------------------
  |  |  |  |   45|  5.75M|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  |  |  ------------------
  ------------------
  |  Branch (114:15): [True: 5.43M, False: 319k]
  ------------------
  115|  5.43M|    if (pRefPic->pShortRefList[LIST_0][i] != NULL) {
  ------------------
  |  Branch (115:9): [True: 61.1k, False: 5.37M]
  ------------------
  116|  61.1k|      SetUnRef (pRefPic->pShortRefList[LIST_0][i]);
  117|  61.1k|      pRefPic->pShortRefList[LIST_0][i] = NULL;
  118|  61.1k|    }
  119|  5.43M|  }
  120|   319k|  pRefPic->uiShortRefCount[LIST_0] = 0;
  121|       |
  122|  5.75M|  for (i = 0; i < MAX_DPB_COUNT; i++) {
  ------------------
  |  |   49|  5.75M|#define MAX_DPB_COUNT                   (MAX_REF_PIC_COUNT + 1) // 1 additional position for re-order and other process
  |  |  ------------------
  |  |  |  |   45|  5.75M|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  |  |  ------------------
  ------------------
  |  Branch (122:15): [True: 5.43M, False: 319k]
  ------------------
  123|  5.43M|    if (pRefPic->pLongRefList[LIST_0][i] != NULL) {
  ------------------
  |  Branch (123:9): [True: 8.44k, False: 5.42M]
  ------------------
  124|  8.44k|      SetUnRef (pRefPic->pLongRefList[LIST_0][i]);
  125|       |      pRefPic->pLongRefList[LIST_0][i] = NULL;
  126|  8.44k|    }
  127|  5.43M|  }
  128|   319k|  pRefPic->uiLongRefCount[LIST_0] = 0;
  129|   319k|}
_ZN7WelsDec21WelsInitBSliceRefListEPNS_21TagWelsDecoderContextEi:
  232|   122k|int32_t WelsInitBSliceRefList (PWelsDecoderContext pCtx, int32_t iPoc) {
  233|       |
  234|   122k|  int32_t err = WelsCheckAndRecoverForFutureDecoding (pCtx);
  235|   122k|  if (err != ERR_NONE) return err;
  ------------------
  |  Branch (235:7): [True: 0, False: 122k]
  ------------------
  236|       |
  237|   122k|  WrapShortRefPicNum (pCtx);
  238|       |
  239|   122k|  PPicture* ppShoreRefList = pCtx->sRefPic.pShortRefList[LIST_0];
  240|   122k|  PPicture* ppLongRefList = pCtx->sRefPic.pLongRefList[LIST_0];
  241|   122k|  memset (pCtx->sRefPic.pRefList[LIST_0], 0, MAX_DPB_COUNT * sizeof (PPicture));
  ------------------
  |  |   49|   122k|#define MAX_DPB_COUNT                   (MAX_REF_PIC_COUNT + 1) // 1 additional position for re-order and other process
  |  |  ------------------
  |  |  |  |   45|   122k|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  |  |  ------------------
  ------------------
  242|   122k|  memset (pCtx->sRefPic.pRefList[LIST_1], 0, MAX_DPB_COUNT * sizeof (PPicture));
  ------------------
  |  |   49|   122k|#define MAX_DPB_COUNT                   (MAX_REF_PIC_COUNT + 1) // 1 additional position for re-order and other process
  |  |  ------------------
  |  |  |  |   45|   122k|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  |  |  ------------------
  ------------------
  243|   122k|  int32_t iLSCurrPocCount = 0;
  244|   122k|  int32_t iLTCurrPocCount = 0;
  245|   122k|  PPicture pLSCurrPocList0[MAX_DPB_COUNT];
  246|   122k|  PPicture pLTCurrPocList0[MAX_DPB_COUNT];
  247|   269k|  for (int32_t i = 0; i < pCtx->sRefPic.uiShortRefCount[LIST_0]; ++i) {
  ------------------
  |  Branch (247:23): [True: 146k, False: 122k]
  ------------------
  248|   146k|    if (ppShoreRefList[i]->iFramePoc < iPoc) {
  ------------------
  |  Branch (248:9): [True: 77.7k, False: 69.2k]
  ------------------
  249|  77.7k|      pLSCurrPocList0[iLSCurrPocCount++] = ppShoreRefList[i];
  250|  77.7k|    }
  251|   146k|  }
  252|   269k|  for (int32_t i = pCtx->sRefPic.uiShortRefCount[LIST_0] - 1; i >= 0; --i) {
  ------------------
  |  Branch (252:63): [True: 146k, False: 122k]
  ------------------
  253|   146k|    if (ppShoreRefList[i]->iFramePoc > iPoc) {
  ------------------
  |  Branch (253:9): [True: 31.9k, False: 115k]
  ------------------
  254|  31.9k|      pLTCurrPocList0[iLTCurrPocCount++] = ppShoreRefList[i];
  255|  31.9k|    }
  256|   146k|  }
  257|   122k|  if (pCtx->sRefPic.uiLongRefCount[LIST_0] > 1) {
  ------------------
  |  Branch (257:7): [True: 2.84k, False: 119k]
  ------------------
  258|       |    //long sorts in increasing order
  259|  2.84k|    PPicture pTemp;
  260|  20.3k|    for (int32_t i = 0; i < pCtx->sRefPic.uiLongRefCount[LIST_0]; ++i) {
  ------------------
  |  Branch (260:25): [True: 17.4k, False: 2.84k]
  ------------------
  261|  90.5k|      for (int32_t j = i + 1; j < pCtx->sRefPic.uiLongRefCount[LIST_0]; ++j) {
  ------------------
  |  Branch (261:31): [True: 73.0k, False: 17.4k]
  ------------------
  262|  73.0k|        if (ppLongRefList[j]->iFramePoc < ppLongRefList[i]->iFramePoc) {
  ------------------
  |  Branch (262:13): [True: 3.46k, False: 69.5k]
  ------------------
  263|  3.46k|          pTemp = ppLongRefList[i];
  264|  3.46k|          ppLongRefList[i] = ppLongRefList[j];
  265|  3.46k|          ppLongRefList[j] = pTemp;
  266|  3.46k|        }
  267|  73.0k|      }
  268|  17.4k|    }
  269|  2.84k|  }
  270|   122k|  int32_t iCurrPocCount = iLSCurrPocCount + iLTCurrPocCount;
  271|   122k|  int32_t iCount = 0;
  272|       |  //LIST_0
  273|       |  //short
  274|       |  //It may need to sort LIST_0 and LIST_1 so that they will have the right default orders.
  275|   199k|  for (int32_t i = 0; i < iLSCurrPocCount; ++i) {
  ------------------
  |  Branch (275:23): [True: 77.7k, False: 122k]
  ------------------
  276|  77.7k|    pCtx->sRefPic.pRefList[LIST_0][iCount++] = pLSCurrPocList0[i];
  277|  77.7k|  }
  278|   122k|  if (iLSCurrPocCount > 1) {
  ------------------
  |  Branch (278:7): [True: 6.85k, False: 115k]
  ------------------
  279|       |    //LIST_0 short sorts in decreasing order
  280|  6.85k|    PPicture pTemp;
  281|  22.2k|    for (int32_t i = 0; i < iLSCurrPocCount; ++i) {
  ------------------
  |  Branch (281:25): [True: 15.4k, False: 6.85k]
  ------------------
  282|  29.0k|      for (int32_t j = i + 1; j < iLSCurrPocCount; ++j) {
  ------------------
  |  Branch (282:31): [True: 13.6k, False: 15.4k]
  ------------------
  283|  13.6k|        if (pCtx->sRefPic.pRefList[LIST_0][j]->iFramePoc > pCtx->sRefPic.pRefList[LIST_0][i]->iFramePoc) {
  ------------------
  |  Branch (283:13): [True: 2.37k, False: 11.2k]
  ------------------
  284|  2.37k|          pTemp = pCtx->sRefPic.pRefList[LIST_0][i];
  285|  2.37k|          pCtx->sRefPic.pRefList[LIST_0][i] = pCtx->sRefPic.pRefList[LIST_0][j];
  286|  2.37k|          pCtx->sRefPic.pRefList[LIST_0][j] = pTemp;
  287|  2.37k|        }
  288|  13.6k|      }
  289|  15.4k|    }
  290|  6.85k|  }
  291|   154k|  for (int32_t i = 0; i < iLTCurrPocCount; ++i) {
  ------------------
  |  Branch (291:23): [True: 31.9k, False: 122k]
  ------------------
  292|  31.9k|    pCtx->sRefPic.pRefList[LIST_0][iCount++] = pLTCurrPocList0[i];
  293|  31.9k|  }
  294|   122k|  if (iLTCurrPocCount > 1) {
  ------------------
  |  Branch (294:7): [True: 3.98k, False: 118k]
  ------------------
  295|       |    //LIST_0 short sorts in increasing order
  296|  3.98k|    PPicture pTemp;
  297|  13.7k|    for (int32_t i = iLSCurrPocCount; i < iCurrPocCount; ++i) {
  ------------------
  |  Branch (297:39): [True: 9.74k, False: 3.98k]
  ------------------
  298|  19.7k|      for (int32_t j = i + 1; j < iCurrPocCount; ++j) {
  ------------------
  |  Branch (298:31): [True: 9.99k, False: 9.74k]
  ------------------
  299|  9.99k|        if (pCtx->sRefPic.pRefList[LIST_0][j]->iFramePoc < pCtx->sRefPic.pRefList[LIST_0][i]->iFramePoc) {
  ------------------
  |  Branch (299:13): [True: 4.19k, False: 5.79k]
  ------------------
  300|  4.19k|          pTemp = pCtx->sRefPic.pRefList[LIST_0][i];
  301|  4.19k|          pCtx->sRefPic.pRefList[LIST_0][i] = pCtx->sRefPic.pRefList[LIST_0][j];
  302|  4.19k|          pCtx->sRefPic.pRefList[LIST_0][j] = pTemp;
  303|  4.19k|        }
  304|  9.99k|      }
  305|  9.74k|    }
  306|  3.98k|  }
  307|       |  //long
  308|   145k|  for (int32_t i = 0; i < pCtx->sRefPic.uiLongRefCount[LIST_0]; ++i) {
  ------------------
  |  Branch (308:23): [True: 23.3k, False: 122k]
  ------------------
  309|  23.3k|    pCtx->sRefPic.pRefList[LIST_0][iCount++] = ppLongRefList[i];
  310|  23.3k|  }
  311|   122k|  pCtx->sRefPic.uiRefCount[LIST_0] = iCount;
  312|       |
  313|   122k|  iCount = 0;
  314|       |  //LIST_1
  315|       |  //short
  316|   154k|  for (int32_t i = 0; i < iLTCurrPocCount; ++i) {
  ------------------
  |  Branch (316:23): [True: 31.9k, False: 122k]
  ------------------
  317|  31.9k|    pCtx->sRefPic.pRefList[LIST_1][iCount++] = pLTCurrPocList0[i];
  318|  31.9k|  }
  319|   122k|  if (iLTCurrPocCount > 1) {
  ------------------
  |  Branch (319:7): [True: 3.98k, False: 118k]
  ------------------
  320|       |    //LIST_1 short sorts in increasing order
  321|  3.98k|    PPicture pTemp;
  322|  13.7k|    for (int32_t i = 0; i < iLTCurrPocCount; ++i) {
  ------------------
  |  Branch (322:25): [True: 9.74k, False: 3.98k]
  ------------------
  323|  19.7k|      for (int32_t j = i + 1; j < iLTCurrPocCount; ++j) {
  ------------------
  |  Branch (323:31): [True: 9.99k, False: 9.74k]
  ------------------
  324|  9.99k|        if (pCtx->sRefPic.pRefList[LIST_1][j]->iFramePoc < pCtx->sRefPic.pRefList[LIST_1][i]->iFramePoc) {
  ------------------
  |  Branch (324:13): [True: 4.19k, False: 5.79k]
  ------------------
  325|  4.19k|          pTemp = pCtx->sRefPic.pRefList[LIST_1][i];
  326|  4.19k|          pCtx->sRefPic.pRefList[LIST_1][i] = pCtx->sRefPic.pRefList[LIST_1][j];
  327|  4.19k|          pCtx->sRefPic.pRefList[LIST_1][j] = pTemp;
  328|  4.19k|        }
  329|  9.99k|      }
  330|  9.74k|    }
  331|  3.98k|  }
  332|   199k|  for (int32_t i = 0; i < iLSCurrPocCount; ++i) {
  ------------------
  |  Branch (332:23): [True: 77.7k, False: 122k]
  ------------------
  333|  77.7k|    pCtx->sRefPic.pRefList[LIST_1][iCount++] = pLSCurrPocList0[i];
  334|  77.7k|  }
  335|   122k|  if (iLSCurrPocCount > 1) {
  ------------------
  |  Branch (335:7): [True: 6.85k, False: 115k]
  ------------------
  336|       |    //LIST_1 short sorts in decreasing order
  337|  6.85k|    PPicture pTemp;
  338|  22.2k|    for (int32_t i = iLTCurrPocCount; i < iCurrPocCount; ++i) {
  ------------------
  |  Branch (338:39): [True: 15.4k, False: 6.85k]
  ------------------
  339|  29.0k|      for (int32_t j = i + 1; j < iCurrPocCount; ++j) {
  ------------------
  |  Branch (339:31): [True: 13.6k, False: 15.4k]
  ------------------
  340|  13.6k|        if (pCtx->sRefPic.pRefList[LIST_1][j]->iFramePoc > pCtx->sRefPic.pRefList[LIST_1][i]->iFramePoc) {
  ------------------
  |  Branch (340:13): [True: 2.37k, False: 11.2k]
  ------------------
  341|  2.37k|          pTemp = pCtx->sRefPic.pRefList[LIST_1][i];
  342|  2.37k|          pCtx->sRefPic.pRefList[LIST_1][i] = pCtx->sRefPic.pRefList[LIST_1][j];
  343|  2.37k|          pCtx->sRefPic.pRefList[LIST_1][j] = pTemp;
  344|  2.37k|        }
  345|  13.6k|      }
  346|  15.4k|    }
  347|  6.85k|  }
  348|       |  //long
  349|   145k|  for (int32_t i = 0; i < pCtx->sRefPic.uiLongRefCount[LIST_0]; ++i) {
  ------------------
  |  Branch (349:23): [True: 23.3k, False: 122k]
  ------------------
  350|  23.3k|    pCtx->sRefPic.pRefList[LIST_1][iCount++] = ppLongRefList[i];
  351|  23.3k|  }
  352|   122k|  pCtx->sRefPic.uiRefCount[LIST_1] = iCount;
  353|   122k|  return ERR_NONE;
  354|   122k|}
_ZN7WelsDec15WelsInitRefListEPNS_21TagWelsDecoderContextEi:
  359|  2.46M|int32_t WelsInitRefList (PWelsDecoderContext pCtx, int32_t iPoc) {
  360|       |
  361|  2.46M|  int32_t err = WelsCheckAndRecoverForFutureDecoding (pCtx);
  362|  2.46M|  if (err != ERR_NONE) return err;
  ------------------
  |  Branch (362:7): [True: 0, False: 2.46M]
  ------------------
  363|       |
  364|  2.46M|  WrapShortRefPicNum (pCtx);
  365|       |
  366|  2.46M|  PPicture* ppShoreRefList = pCtx->sRefPic.pShortRefList[LIST_0];
  367|  2.46M|  PPicture* ppLongRefList  = pCtx->sRefPic.pLongRefList[LIST_0];
  368|  2.46M|  memset (pCtx->sRefPic.pRefList[LIST_0], 0, MAX_DPB_COUNT * sizeof (PPicture));
  ------------------
  |  |   49|  2.46M|#define MAX_DPB_COUNT                   (MAX_REF_PIC_COUNT + 1) // 1 additional position for re-order and other process
  |  |  ------------------
  |  |  |  |   45|  2.46M|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  |  |  ------------------
  ------------------
  369|       |
  370|  2.46M|  int32_t i, iCount = 0;
  371|       |  //short
  372|  4.75M|  for (i = 0; i < pCtx->sRefPic.uiShortRefCount[LIST_0] && iCount < MAX_REF_PIC_COUNT; ++i) {
  ------------------
  |  |   45|  2.29M|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
  |  Branch (372:15): [True: 2.29M, False: 2.46M]
  |  Branch (372:60): [True: 2.29M, False: 0]
  ------------------
  373|  2.29M|    pCtx->sRefPic.pRefList[LIST_0][iCount++ ] = ppShoreRefList[i];
  374|  2.29M|  }
  375|       |
  376|       |  //long
  377|  2.61M|  for (i = 0; i < pCtx->sRefPic.uiLongRefCount[LIST_0] && iCount < MAX_REF_PIC_COUNT; ++i) {
  ------------------
  |  |   45|   158k|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
  |  Branch (377:15): [True: 158k, False: 2.46M]
  |  Branch (377:59): [True: 157k, False: 639]
  ------------------
  378|   157k|    pCtx->sRefPic.pRefList[LIST_0][iCount++  ] = ppLongRefList[i];
  379|   157k|  }
  380|  2.46M|  pCtx->sRefPic.uiRefCount[LIST_0] = iCount;
  381|       |
  382|  2.46M|  return ERR_NONE;
  383|  2.46M|}
_ZN7WelsDec18WelsReorderRefListEPNS_21TagWelsDecoderContextE:
  385|  2.27M|int32_t WelsReorderRefList (PWelsDecoderContext pCtx) {
  386|       |
  387|  2.27M|  if (pCtx->eSliceType == I_SLICE || pCtx->eSliceType == SI_SLICE) {
  ------------------
  |  Branch (387:7): [True: 0, False: 2.27M]
  |  Branch (387:38): [True: 0, False: 2.27M]
  ------------------
  388|      0|    return ERR_NONE;
  389|      0|  }
  390|       |
  391|  2.27M|  PRefPicListReorderSyn pRefPicListReorderSyn = pCtx->pCurDqLayer->pRefPicListReordering;
  392|  2.27M|  PNalUnitHeaderExt pNalHeaderExt = &pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt;
  393|  2.27M|  PSliceHeader pSliceHeader = &pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader;
  394|  2.27M|  int32_t ListCount = 1;
  395|  2.27M|  if (pCtx->eSliceType == B_SLICE) ListCount = 2;
  ------------------
  |  Branch (395:7): [True: 90.2k, False: 2.18M]
  ------------------
  396|  4.62M|  for (int32_t listIdx = 0; listIdx < ListCount; ++listIdx) {
  ------------------
  |  Branch (396:29): [True: 2.36M, False: 2.26M]
  ------------------
  397|  2.36M|    PPicture pPic = NULL;
  398|  2.36M|    PPicture* ppRefList = pCtx->sRefPic.pRefList[listIdx];
  399|  2.36M|    int32_t  iMaxRefIdx = pCtx->iPicQueueNumber;
  400|  2.36M|    if (iMaxRefIdx > MAX_REF_PIC_COUNT) {
  ------------------
  |  |   45|  2.36M|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
  |  Branch (400:9): [True: 30.2k, False: 2.33M]
  ------------------
  401|  30.2k|      iMaxRefIdx = MAX_REF_PIC_COUNT;
  ------------------
  |  |   45|  30.2k|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
  402|  30.2k|    }
  403|  2.36M|    int32_t iRefCount = pSliceHeader->uiRefCount[listIdx];
  404|  2.36M|    int32_t iPredFrameNum = pSliceHeader->iFrameNum;
  405|  2.36M|    int32_t iMaxPicNum = 1 << pSliceHeader->pSps->uiLog2MaxFrameNum;
  406|  2.36M|    int32_t iAbsDiffPicNum = -1;
  407|  2.36M|    int32_t iReorderingIndex = 0;
  408|  2.36M|    int32_t i = 0;
  409|       |
  410|  2.36M|    if (iRefCount <= 0) {
  ------------------
  |  Branch (410:9): [True: 0, False: 2.36M]
  ------------------
  411|      0|      pCtx->iErrorCode = dsNoParamSets; //No any reference for decoding, SHOULD request IDR
  412|      0|      return ERR_INFO_REFERENCE_PIC_LOST;
  413|      0|    }
  414|       |
  415|  2.36M|    if (pRefPicListReorderSyn->bRefPicListReorderingFlag[listIdx]) {
  ------------------
  |  Branch (415:9): [True: 11.7k, False: 2.34M]
  ------------------
  416|  17.7k|      while ((iReorderingIndex <= iMaxRefIdx)
  ------------------
  |  Branch (416:14): [True: 17.3k, False: 370]
  ------------------
  417|  17.3k|             && (pRefPicListReorderSyn->sReorderingSyn[listIdx][iReorderingIndex].uiReorderingOfPicNumsIdc != 3)) {
  ------------------
  |  Branch (417:17): [True: 12.7k, False: 4.61k]
  ------------------
  418|  12.7k|        uint16_t uiReorderingOfPicNumsIdc =
  419|  12.7k|          pRefPicListReorderSyn->sReorderingSyn[listIdx][iReorderingIndex].uiReorderingOfPicNumsIdc;
  420|  12.7k|        if (uiReorderingOfPicNumsIdc < 2) {
  ------------------
  |  Branch (420:13): [True: 6.42k, False: 6.31k]
  ------------------
  421|  6.42k|          iAbsDiffPicNum = pRefPicListReorderSyn->sReorderingSyn[listIdx][iReorderingIndex].uiAbsDiffPicNumMinus1 + 1;
  422|       |
  423|  6.42k|          if (uiReorderingOfPicNumsIdc == 0) {
  ------------------
  |  Branch (423:15): [True: 5.97k, False: 447]
  ------------------
  424|  5.97k|            iPredFrameNum -= iAbsDiffPicNum;
  425|  5.97k|          } else {
  426|    447|            iPredFrameNum += iAbsDiffPicNum;
  427|    447|          }
  428|  6.42k|          iPredFrameNum &= iMaxPicNum - 1;
  429|       |
  430|  49.8k|          for (i = iMaxRefIdx - 1; i >= 0; i--) {
  ------------------
  |  Branch (430:36): [True: 44.7k, False: 5.10k]
  ------------------
  431|  44.7k|            if (ppRefList[i] != NULL && ppRefList[i]->iFrameNum == iPredFrameNum && !ppRefList[i]->bIsLongRef) {
  ------------------
  |  Branch (431:17): [True: 23.4k, False: 21.3k]
  |  Branch (431:41): [True: 1.75k, False: 21.6k]
  |  Branch (431:85): [True: 1.32k, False: 427]
  ------------------
  432|  1.32k|              if ((pNalHeaderExt->uiQualityId == ppRefList[i]->uiQualityId)
  ------------------
  |  Branch (432:19): [True: 1.00k, False: 314]
  ------------------
  433|  1.00k|                  && (pSliceHeader->iSpsId != ppRefList[i]->iSpsId)) {   //check;
  ------------------
  |  Branch (433:22): [True: 0, False: 1.00k]
  ------------------
  434|      0|                WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "WelsReorderRefList()::::BASE LAYER::::iSpsId:%d, ref_sps_id:%d",
  435|      0|                         pSliceHeader->iSpsId, ppRefList[i]->iSpsId);
  436|      0|                pCtx->iErrorCode = dsNoParamSets; //cross-IDR reference frame selection, SHOULD request IDR.--
  437|      0|                return ERR_INFO_REFERENCE_PIC_LOST;
  438|  1.32k|              } else {
  439|  1.32k|                break;
  440|  1.32k|              }
  441|  1.32k|            }
  442|  44.7k|          }
  443|       |
  444|  6.42k|        } else if (uiReorderingOfPicNumsIdc == 2) {
  ------------------
  |  Branch (444:20): [True: 6.31k, False: 0]
  ------------------
  445|  28.4k|          for (i = iMaxRefIdx - 1; i >= 0; i--) {
  ------------------
  |  Branch (445:36): [True: 26.8k, False: 1.61k]
  ------------------
  446|  26.8k|            if (ppRefList[i] != NULL && ppRefList[i]->bIsLongRef
  ------------------
  |  Branch (446:17): [True: 10.2k, False: 16.6k]
  |  Branch (446:41): [True: 5.19k, False: 5.01k]
  ------------------
  447|  5.19k|                && ppRefList[i]->iLongTermFrameIdx ==
  ------------------
  |  Branch (447:20): [True: 4.69k, False: 494]
  ------------------
  448|  5.19k|                pRefPicListReorderSyn->sReorderingSyn[listIdx][iReorderingIndex].uiLongTermPicNum) {
  449|  4.69k|              if ((pNalHeaderExt->uiQualityId == ppRefList[i]->uiQualityId)
  ------------------
  |  Branch (449:19): [True: 2.43k, False: 2.26k]
  ------------------
  450|  2.43k|                  && (pSliceHeader->iSpsId != ppRefList[i]->iSpsId)) {    //check;
  ------------------
  |  Branch (450:22): [True: 0, False: 2.43k]
  ------------------
  451|      0|                WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "WelsReorderRefList()::::BASE LAYER::::iSpsId:%d, ref_sps_id:%d",
  452|      0|                         pSliceHeader->iSpsId, ppRefList[i]->iSpsId);
  453|      0|                pCtx->iErrorCode = dsNoParamSets; //cross-IDR reference frame selection, SHOULD request IDR.--
  454|      0|                return ERR_INFO_REFERENCE_PIC_LOST;
  455|  4.69k|              } else {
  456|  4.69k|                break;
  457|  4.69k|              }
  458|  4.69k|            }
  459|  26.8k|          }
  460|  6.31k|        }
  461|  12.7k|        if (i < 0) {
  ------------------
  |  Branch (461:13): [True: 6.72k, False: 6.01k]
  ------------------
  462|  6.72k|          return ERR_INFO_REFERENCE_PIC_LOST;
  463|  6.72k|        }
  464|  6.01k|        pPic = ppRefList[i];
  465|  6.01k|        if (i > iReorderingIndex) {
  ------------------
  |  Branch (465:13): [True: 2.59k, False: 3.42k]
  ------------------
  466|  2.59k|          memmove (&ppRefList[1 + iReorderingIndex], &ppRefList[iReorderingIndex],
  467|  2.59k|                   (i - iReorderingIndex) * sizeof (PPicture)); //confirmed_safe_unsafe_usage
  468|  3.42k|        } else if (i < iReorderingIndex) {
  ------------------
  |  Branch (468:20): [True: 2.44k, False: 977]
  ------------------
  469|  2.44k|          memmove (&ppRefList[1 + iReorderingIndex], &ppRefList[iReorderingIndex],
  470|  2.44k|                   (iMaxRefIdx - iReorderingIndex) * sizeof (PPicture));
  471|  2.44k|        }
  472|  6.01k|        ppRefList[iReorderingIndex] = pPic;
  473|  6.01k|        iReorderingIndex++;
  474|  6.01k|      }
  475|  11.7k|    }
  476|  2.36M|  }
  477|  2.26M|  return ERR_NONE;
  478|  2.27M|}
_ZN7WelsDec19WelsReorderRefList2EPNS_21TagWelsDecoderContextE:
  481|  78.0k|int32_t WelsReorderRefList2 (PWelsDecoderContext pCtx) {
  482|       |
  483|  78.0k|  if (pCtx->eSliceType == I_SLICE || pCtx->eSliceType == SI_SLICE) {
  ------------------
  |  Branch (483:7): [True: 0, False: 78.0k]
  |  Branch (483:38): [True: 0, False: 78.0k]
  ------------------
  484|      0|    return ERR_NONE;
  485|      0|  }
  486|       |
  487|  78.0k|  PRefPicListReorderSyn pRefPicListReorderSyn = pCtx->pCurDqLayer->pRefPicListReordering;
  488|  78.0k|  PSliceHeader pSliceHeader = &pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader;
  489|       |
  490|  78.0k|  PPicture* ppShoreRefList = pCtx->sRefPic.pShortRefList[LIST_0];
  491|  78.0k|  int32_t iShortRefCount = pCtx->sRefPic.uiShortRefCount[LIST_0];
  492|  78.0k|  PPicture* ppLongRefList = pCtx->sRefPic.pLongRefList[LIST_0];
  493|  78.0k|  int32_t iLongRefCount = pCtx->sRefPic.uiLongRefCount[LIST_0];
  494|  78.0k|  int32_t i = 0;
  495|  78.0k|  int32_t j = 0;
  496|  78.0k|  int32_t k = 0;
  497|  78.0k|  int32_t iMaxRefIdx = pCtx->iPicQueueNumber;
  498|  78.0k|  if (iMaxRefIdx > MAX_REF_PIC_COUNT) {
  ------------------
  |  |   45|  78.0k|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
  |  Branch (498:7): [True: 1.26k, False: 76.7k]
  ------------------
  499|  1.26k|    iMaxRefIdx = MAX_REF_PIC_COUNT;
  ------------------
  |  |   45|  1.26k|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
  500|  1.26k|  }
  501|  78.0k|  const int32_t iCurFrameNum = pSliceHeader->iFrameNum;
  502|  78.0k|  const int32_t iMaxPicNum = 1 << pSliceHeader->pSps->uiLog2MaxFrameNum;
  503|  78.0k|  int32_t iListCount = 1;
  504|  78.0k|  if (pCtx->eSliceType == B_SLICE) iListCount = 2;
  ------------------
  |  Branch (504:7): [True: 32.0k, False: 45.9k]
  ------------------
  505|   188k|  for (int32_t listIdx = 0; listIdx < iListCount; ++listIdx) {
  ------------------
  |  Branch (505:29): [True: 110k, False: 78.0k]
  ------------------
  506|   110k|    PPicture* ppRefList = pCtx->sRefPic.pRefList[listIdx];
  507|   110k|    int32_t iCount = 0;
  508|   110k|    int32_t iRefCount = pSliceHeader->uiRefCount[listIdx];
  509|   110k|    int32_t iAbsDiffPicNum = -1;
  510|       |
  511|   110k|    if (pRefPicListReorderSyn->bRefPicListReorderingFlag[listIdx]) {
  ------------------
  |  Branch (511:9): [True: 19.6k, False: 90.4k]
  ------------------
  512|  19.6k|      int32_t iPredFrameNum = iCurFrameNum;
  513|  30.9k|      for (i = 0; pRefPicListReorderSyn->sReorderingSyn[listIdx][i].uiReorderingOfPicNumsIdc != 3; i++) {
  ------------------
  |  Branch (513:19): [True: 11.3k, False: 19.6k]
  ------------------
  514|  11.3k|        if (iCount >= iMaxRefIdx)
  ------------------
  |  Branch (514:13): [True: 2, False: 11.3k]
  ------------------
  515|      2|          break;
  516|       |
  517|   109k|        for (j = iRefCount; j > iCount; j--)
  ------------------
  |  Branch (517:29): [True: 98.2k, False: 11.3k]
  ------------------
  518|  98.2k|          ppRefList[j] = ppRefList[j - 1];
  519|       |
  520|  11.3k|        uint16_t uiReorderingOfPicNumsIdc =
  521|  11.3k|          pRefPicListReorderSyn->sReorderingSyn[listIdx][i].uiReorderingOfPicNumsIdc;
  522|       |
  523|  11.3k|        if (uiReorderingOfPicNumsIdc < 2) { // reorder short references
  ------------------
  |  Branch (523:13): [True: 8.36k, False: 2.97k]
  ------------------
  524|  8.36k|          iAbsDiffPicNum = (int32_t) (pRefPicListReorderSyn->sReorderingSyn[listIdx][i].uiAbsDiffPicNumMinus1 + 1);
  525|  8.36k|          if (uiReorderingOfPicNumsIdc == 0) {
  ------------------
  |  Branch (525:15): [True: 5.60k, False: 2.76k]
  ------------------
  526|  5.60k|            if (iPredFrameNum - iAbsDiffPicNum < 0)
  ------------------
  |  Branch (526:17): [True: 2.31k, False: 3.28k]
  ------------------
  527|  2.31k|              iPredFrameNum -= (iAbsDiffPicNum - iMaxPicNum);
  528|  3.28k|            else
  529|  3.28k|              iPredFrameNum -= iAbsDiffPicNum;
  530|  5.60k|          } else {
  531|  2.76k|            if (iPredFrameNum + iAbsDiffPicNum >= iMaxPicNum)
  ------------------
  |  Branch (531:17): [True: 406, False: 2.36k]
  ------------------
  532|    406|              iPredFrameNum += (iAbsDiffPicNum - iMaxPicNum);
  533|  2.36k|            else
  534|  2.36k|              iPredFrameNum += iAbsDiffPicNum;
  535|  2.76k|          }
  536|       |
  537|  8.36k|          if (iPredFrameNum > iCurFrameNum) {
  ------------------
  |  Branch (537:15): [True: 2.81k, False: 5.55k]
  ------------------
  538|  2.81k|            iPredFrameNum -= iMaxPicNum;
  539|  2.81k|          }
  540|       |
  541|  15.2k|          for (j = 0; j < iShortRefCount; j++) {
  ------------------
  |  Branch (541:23): [True: 8.72k, False: 6.54k]
  ------------------
  542|  8.72k|            if (ppShoreRefList[j]) {
  ------------------
  |  Branch (542:17): [True: 8.72k, False: 0]
  ------------------
  543|  8.72k|              if (ppShoreRefList[j]->iFrameWrapNum == iPredFrameNum) {
  ------------------
  |  Branch (543:19): [True: 1.82k, False: 6.90k]
  ------------------
  544|  1.82k|                ppRefList[iCount++] = ppShoreRefList[j];
  545|  1.82k|                break;
  546|  1.82k|              }
  547|  8.72k|            }
  548|  8.72k|          }
  549|  8.36k|          k = iCount;
  550|  90.2k|          for (j = k; j <= iRefCount; j++) {
  ------------------
  |  Branch (550:23): [True: 81.8k, False: 8.36k]
  ------------------
  551|  81.8k|            if (ppRefList[j] != NULL) {
  ------------------
  |  Branch (551:17): [True: 36.3k, False: 45.4k]
  ------------------
  552|  36.3k|              if (ppRefList[j]->bIsLongRef || ppRefList[j]->iFrameWrapNum != iPredFrameNum)
  ------------------
  |  Branch (552:19): [True: 5.50k, False: 30.8k]
  |  Branch (552:47): [True: 26.3k, False: 4.48k]
  ------------------
  553|  31.8k|                ppRefList[k++] = ppRefList[j];
  554|  36.3k|            }
  555|  81.8k|          }
  556|  8.36k|        } else { // reorder long term references uiReorderingOfPicNumsIdc == 2
  557|  2.97k|          iPredFrameNum = pRefPicListReorderSyn->sReorderingSyn[listIdx][i].uiLongTermPicNum;
  558|  4.29k|          for (j = 0; j < iLongRefCount; j++) {
  ------------------
  |  Branch (558:23): [True: 2.48k, False: 1.80k]
  ------------------
  559|  2.48k|            if (ppLongRefList[j] != NULL) {
  ------------------
  |  Branch (559:17): [True: 2.48k, False: 0]
  ------------------
  560|  2.48k|              if (ppLongRefList[j]->uiLongTermPicNum == (uint32_t)iPredFrameNum) {
  ------------------
  |  Branch (560:19): [True: 1.16k, False: 1.31k]
  ------------------
  561|  1.16k|                ppRefList[iCount++] = ppLongRefList[j];
  562|  1.16k|                break;
  563|  1.16k|              }
  564|  2.48k|            }
  565|  2.48k|          }
  566|  2.97k|          k = iCount;
  567|  27.7k|          for (j = k; j <= iRefCount; j++) {
  ------------------
  |  Branch (567:23): [True: 24.7k, False: 2.97k]
  ------------------
  568|  24.7k|            if (ppRefList[j] != NULL) {
  ------------------
  |  Branch (568:17): [True: 16.3k, False: 8.38k]
  ------------------
  569|  16.3k|              if (!ppRefList[j]->bIsLongRef || ppRefList[j]->uiLongTermPicNum != (uint32_t)iPredFrameNum)
  ------------------
  |  Branch (569:19): [True: 12.1k, False: 4.21k]
  |  Branch (569:48): [True: 2.01k, False: 2.19k]
  ------------------
  570|  14.1k|                ppRefList[k++] = ppRefList[j];
  571|  16.3k|            }
  572|  24.7k|          }
  573|  2.97k|        }
  574|  11.3k|      }
  575|  19.6k|    }
  576|       |
  577|   245k|    for (i = WELS_MAX (1, WELS_MAX (iCount, pCtx->sRefPic.uiRefCount[listIdx])); i < iRefCount; i++)
  ------------------
  |  |   91|   220k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 31.9k, False: 78.0k]
  |  |  |  Branch (91:32): [True: 1.32k, False: 108k]
  |  |  |  Branch (91:44): [True: 1.32k, False: 76.7k]
  |  |  ------------------
  ------------------
  |  Branch (577:82): [True: 135k, False: 110k]
  ------------------
  578|   135k|      ppRefList[i] = ppRefList[i - 1];
  579|   110k|    pCtx->sRefPic.uiRefCount[listIdx] = (uint8_t)WELS_MIN (WELS_MAX (iCount, pCtx->sRefPic.uiRefCount[listIdx]),
  ------------------
  |  |   95|   220k|#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (95:25): [True: 75.1k, False: 34.8k]
  |  |  |  Branch (95:26): [True: 1.32k, False: 108k]
  |  |  |  Branch (95:38): [True: 1.32k, False: 73.8k]
  |  |  ------------------
  ------------------
  580|   110k|                                        iRefCount);
  581|   110k|  }
  582|  78.0k|  return ERR_NONE;
  583|  78.0k|}
_ZN7WelsDec13WelsMarkAsRefEPNS_21TagWelsDecoderContextEPNS_8SPictureE:
  585|   439k|int32_t WelsMarkAsRef (PWelsDecoderContext pCtx, PPicture pLastDec) {
  586|   439k|  PPicture pDec = pLastDec;
  587|   439k|  bool isThreadCtx = true;
  588|   439k|  if (pDec == NULL) {
  ------------------
  |  Branch (588:7): [True: 439k, False: 0]
  ------------------
  589|   439k|    pDec = pCtx->pDec;
  590|   439k|    isThreadCtx = false;
  591|   439k|  }
  592|   439k|  PRefPic pRefPic = isThreadCtx ? &pCtx->sTmpRefPic : &pCtx->sRefPic;
  ------------------
  |  Branch (592:21): [True: 0, False: 439k]
  ------------------
  593|   439k|  PRefPicMarking pRefPicMarking = pCtx->pCurDqLayer->pRefPicMarking;
  594|   439k|  PAccessUnit pCurAU = pCtx->pAccessUnitList;
  595|   439k|  bool bIsIDRAU = false;
  596|   439k|  uint32_t j;
  597|       |
  598|   439k|  int32_t iRet = ERR_NONE;
  599|       |
  600|   439k|  pDec->uiQualityId = pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.uiQualityId;
  601|   439k|  pDec->uiTemporalId = pCtx->pCurDqLayer->sLayerInfo.sNalHeaderExt.uiTemporalId;
  602|   439k|  pDec->iSpsId = pCtx->pSps->iSpsId;
  603|   439k|  pDec->iPpsId = pCtx->pPps->iPpsId;
  604|       |
  605|   866k|  for (j = pCurAU->uiStartPos; j <= pCurAU->uiEndPos; j++) {
  ------------------
  |  Branch (605:32): [True: 439k, False: 426k]
  ------------------
  606|   439k|    if (pCurAU->pNalUnitsList[j]->sNalHeaderExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_CODED_SLICE_IDR
  ------------------
  |  Branch (606:9): [True: 4.61k, False: 434k]
  ------------------
  607|   434k|        || pCurAU->pNalUnitsList[j]->sNalHeaderExt.bIdrFlag) {
  ------------------
  |  Branch (607:12): [True: 8.25k, False: 426k]
  ------------------
  608|  12.8k|      bIsIDRAU = true;
  609|  12.8k|      break;
  610|  12.8k|    }
  611|   439k|  }
  612|   439k|  if (bIsIDRAU) {
  ------------------
  |  Branch (612:7): [True: 12.8k, False: 426k]
  ------------------
  613|  12.8k|    if (pRefPicMarking->bLongTermRefFlag) {
  ------------------
  |  Branch (613:9): [True: 9.30k, False: 3.56k]
  ------------------
  614|  9.30k|      pRefPic->iMaxLongTermFrameIdx = 0;
  615|  9.30k|      AddLongTermToList (pRefPic, pDec, 0, 0);
  616|  9.30k|    } else {
  617|  3.56k|      pRefPic->iMaxLongTermFrameIdx = -1;
  618|  3.56k|    }
  619|   426k|  } else {
  620|   426k|    if (pRefPicMarking->bAdaptiveRefPicMarkingModeFlag) {
  ------------------
  |  Branch (620:9): [True: 21.6k, False: 405k]
  ------------------
  621|  21.6k|      iRet = MMCO (pCtx, pRefPic, pRefPicMarking);
  622|  21.6k|      if (iRet != ERR_NONE) {
  ------------------
  |  Branch (622:11): [True: 5.08k, False: 16.5k]
  ------------------
  623|  5.08k|        if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (623:13): [True: 5.08k, False: 0]
  ------------------
  624|  5.08k|          iRet = RemainOneBufferInDpbForEC (pCtx, pRefPic);
  625|  5.08k|          WELS_VERIFY_RETURN_IF (iRet, iRet);
  ------------------
  |  |  239|  5.08k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 1.00k, False: 4.08k]
  |  |  ------------------
  |  |  240|  1.00k|    return iResult;                             \
  |  |  241|  1.00k|  }
  ------------------
  626|  4.08k|        } else {
  627|      0|          return iRet;
  628|      0|        }
  629|  5.08k|      }
  630|       |
  631|  20.6k|      if (pCtx->pLastDecPicInfo->bLastHasMmco5) {
  ------------------
  |  Branch (631:11): [True: 1.55k, False: 19.0k]
  ------------------
  632|  1.55k|        pDec->iFrameNum = 0;
  633|  1.55k|        pDec->iFramePoc = 0;
  634|  1.55k|      }
  635|       |
  636|   405k|    } else {
  637|   405k|      iRet = SlidingWindow (pCtx, pRefPic);
  638|   405k|      if (iRet != ERR_NONE) {
  ------------------
  |  Branch (638:11): [True: 2.47k, False: 402k]
  ------------------
  639|  2.47k|        if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (639:13): [True: 2.47k, False: 0]
  ------------------
  640|  2.47k|          iRet = RemainOneBufferInDpbForEC (pCtx, pRefPic);
  641|  2.47k|          WELS_VERIFY_RETURN_IF (iRet, iRet);
  ------------------
  |  |  239|  2.47k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 1.75k, False: 724]
  |  |  ------------------
  |  |  240|  1.75k|    return iResult;                             \
  |  |  241|  1.75k|  }
  ------------------
  642|    724|        } else {
  643|      0|          return iRet;
  644|      0|        }
  645|  2.47k|      }
  646|   405k|    }
  647|   426k|  }
  648|       |
  649|   436k|  if (!pDec->bIsLongRef) {
  ------------------
  |  Branch (649:7): [True: 420k, False: 15.8k]
  ------------------
  650|   420k|    if (pRefPic->uiLongRefCount[LIST_0] + pRefPic->uiShortRefCount[LIST_0] >= WELS_MAX (1, pCtx->pSps->iNumRefFrames)) {
  ------------------
  |  |   91|   420k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 440, False: 420k]
  |  |  ------------------
  ------------------
  |  Branch (650:9): [True: 6.30k, False: 414k]
  ------------------
  651|  6.30k|      if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (651:11): [True: 6.30k, False: 0]
  ------------------
  652|  6.30k|        iRet = RemainOneBufferInDpbForEC (pCtx, pRefPic);
  653|  6.30k|        WELS_VERIFY_RETURN_IF (iRet, iRet);
  ------------------
  |  |  239|  6.30k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 1.28k, False: 5.01k]
  |  |  ------------------
  |  |  240|  1.28k|    return iResult;                             \
  |  |  241|  1.28k|  }
  ------------------
  654|  5.01k|      } else {
  655|      0|        return ERR_INFO_INVALID_MMCO_REF_NUM_OVERFLOW;
  656|      0|      }
  657|  6.30k|    }
  658|   419k|    iRet = AddShortTermToList (pRefPic, pDec);
  659|   419k|  }
  660|       |
  661|   435k|  return iRet;
  662|   436k|}
_ZN7WelsDec16GetLTRFrameIndexEPNS_9TagRefPicEi:
  919|  5.72k|int32_t GetLTRFrameIndex (PRefPic pRefPic, int32_t iAncLTRFrameNum) {
  920|  5.72k|  int32_t iLTRFrameIndex = -1;
  921|  5.72k|  PPicture pPic;
  922|  25.5k|  for (int i = 0; i < pRefPic->uiLongRefCount[0]; ++i) {
  ------------------
  |  Branch (922:19): [True: 23.2k, False: 2.30k]
  ------------------
  923|  23.2k|    pPic = pRefPic->pLongRefList[LIST_0][i];
  924|  23.2k|    if (pPic->iFrameNum == iAncLTRFrameNum) {
  ------------------
  |  Branch (924:9): [True: 3.42k, False: 19.8k]
  ------------------
  925|  3.42k|      return (pPic->iLongTermFrameIdx);
  926|  3.42k|    }
  927|  23.2k|  }
  928|  2.30k|  return iLTRFrameIndex;
  929|  5.72k|}
manage_dec_ref.cpp:_ZN7WelsDecL8SetUnRefEPNS_8SPictureE:
   69|   822k|static void SetUnRef (PPicture pRef) {
   70|   822k|  if (pRef == NULL) return;
  ------------------
  |  Branch (70:7): [True: 0, False: 822k]
  ------------------
   71|       |
   72|   822k|  if (pRef->iRefCount <= 0) {
  ------------------
  |  Branch (72:7): [True: 466k, False: 356k]
  ------------------
   73|   466k|    pRef->bUsedAsRef = false;
   74|   466k|    pRef->bIsLongRef = false;
   75|   466k|    pRef->iFrameNum = -1;
   76|   466k|    pRef->iFrameWrapNum = -1;
   77|       |    //pRef->iFramePoc = 0;
   78|   466k|    pRef->iLongTermFrameIdx = -1;
   79|   466k|    pRef->uiLongTermPicNum = 0;
   80|   466k|    pRef->uiQualityId = -1;
   81|   466k|    pRef->uiTemporalId = -1;
   82|   466k|    pRef->uiSpatialId = -1;
   83|   466k|    pRef->iSpsId = -1;
   84|   466k|    pRef->bIsComplete = false;
   85|   466k|    pRef->iRefCount = 0;
   86|   466k|    pRef->pSetUnRef = NULL;
   87|       |
   88|   466k|    if (pRef->eSliceType == I_SLICE) {
  ------------------
  |  Branch (88:9): [True: 4.89k, False: 461k]
  ------------------
   89|  4.89k|      return;
   90|  4.89k|    }
   91|   461k|    int32_t lists = pRef->eSliceType == P_SLICE ? 1 : 2;
  ------------------
  |  Branch (91:21): [True: 426k, False: 34.9k]
  ------------------
   92|  8.30M|    for (int32_t i = 0; i < MAX_DPB_COUNT; ++i) {
  ------------------
  |  |   49|  8.30M|#define MAX_DPB_COUNT                   (MAX_REF_PIC_COUNT + 1) // 1 additional position for re-order and other process
  |  |  ------------------
  |  |  |  |   45|  8.30M|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  |  |  ------------------
  ------------------
  |  Branch (92:25): [True: 7.84M, False: 461k]
  ------------------
   93|  16.2M|      for (int32_t list = 0; list < lists; ++list) {
  ------------------
  |  Branch (93:30): [True: 8.43M, False: 7.84M]
  ------------------
   94|  8.43M|        pRef->pRefPic[list][i] = NULL;
   95|  8.43M|      }
   96|  7.84M|    }
   97|   461k|  } else {
   98|   356k|    pRef->pSetUnRef = SetUnRef;
   99|   356k|  }
  100|   822k|}
manage_dec_ref.cpp:_ZN7WelsDecL36WelsCheckAndRecoverForFutureDecodingEPNS_21TagWelsDecoderContextE:
  150|  2.58M|static int32_t WelsCheckAndRecoverForFutureDecoding (PWelsDecoderContext pCtx) {
  151|  2.58M|  if ((pCtx->sRefPic.uiShortRefCount[LIST_0] + pCtx->sRefPic.uiLongRefCount[LIST_0] <= 0)
  ------------------
  |  Branch (151:7): [True: 269k, False: 2.31M]
  ------------------
  152|   269k|      && (pCtx->eSliceType != I_SLICE
  ------------------
  |  Branch (152:11): [True: 47.1k, False: 222k]
  ------------------
  153|  47.1k|          && pCtx->eSliceType != SI_SLICE)) {
  ------------------
  |  Branch (153:14): [True: 47.1k, False: 0]
  ------------------
  154|  47.1k|    if (pCtx->pParam->eEcActiveIdc !=
  ------------------
  |  Branch (154:9): [True: 47.1k, False: 0]
  ------------------
  155|  47.1k|        ERROR_CON_DISABLE) { //IDR lost!, recover it for future decoding with data all set to 0
  156|  47.1k|      PPicture pRef = PrefetchPic (pCtx->pPicBuff);
  157|  47.1k|      if (pRef != NULL) {
  ------------------
  |  Branch (157:11): [True: 47.1k, False: 0]
  ------------------
  158|       |        // IDR lost, set new
  159|  47.1k|        pRef->bIsComplete = false; // Set complete flag to false for lost IDR ref picture
  160|  47.1k|        pRef->iSpsId = pCtx->pSps->iSpsId;
  161|  47.1k|        pRef->iPpsId = pCtx->pPps->iPpsId;
  162|  47.1k|        if (pCtx->eSliceType == B_SLICE) {
  ------------------
  |  Branch (162:13): [True: 22.0k, False: 25.1k]
  ------------------
  163|       |          //reset reference's references when IDR is lost
  164|  66.0k|          for (int32_t list = LIST_0; list < LIST_A; ++list) {
  ------------------
  |  Branch (164:39): [True: 44.0k, False: 22.0k]
  ------------------
  165|   792k|            for (int32_t i = 0; i < MAX_DPB_COUNT; ++i) {
  ------------------
  |  |   49|   792k|#define MAX_DPB_COUNT                   (MAX_REF_PIC_COUNT + 1) // 1 additional position for re-order and other process
  |  |  ------------------
  |  |  |  |   45|   792k|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  |  |  ------------------
  ------------------
  |  Branch (165:33): [True: 748k, False: 44.0k]
  ------------------
  166|   748k|              pRef->pRefPic[list][i] = NULL;
  167|   748k|            }
  168|  44.0k|          }
  169|  22.0k|        }
  170|  47.1k|        pCtx->iErrorCode |= dsDataErrorConcealed;
  171|  47.1k|        bool bCopyPrevious = ((ERROR_CON_FRAME_COPY_CROSS_IDR == pCtx->pParam->eEcActiveIdc)
  ------------------
  |  Branch (171:31): [True: 0, False: 47.1k]
  ------------------
  172|  47.1k|                              || (ERROR_CON_SLICE_COPY_CROSS_IDR == pCtx->pParam->eEcActiveIdc)
  ------------------
  |  Branch (172:34): [True: 0, False: 47.1k]
  ------------------
  173|  47.1k|                              || (ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE == pCtx->pParam->eEcActiveIdc)
  ------------------
  |  Branch (173:34): [True: 0, False: 47.1k]
  ------------------
  174|  47.1k|                              || (ERROR_CON_SLICE_MV_COPY_CROSS_IDR == pCtx->pParam->eEcActiveIdc)
  ------------------
  |  Branch (174:34): [True: 0, False: 47.1k]
  ------------------
  175|  47.1k|                              || (ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE == pCtx->pParam->eEcActiveIdc))
  ------------------
  |  Branch (175:34): [True: 0, False: 47.1k]
  ------------------
  176|      0|                             && (NULL != pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb);
  ------------------
  |  Branch (176:33): [True: 0, False: 0]
  ------------------
  177|  47.1k|        bCopyPrevious = bCopyPrevious
  ------------------
  |  Branch (177:25): [True: 0, False: 47.1k]
  ------------------
  178|      0|                        && (pRef->iWidthInPixel == pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb->iWidthInPixel)
  ------------------
  |  Branch (178:28): [True: 0, False: 0]
  ------------------
  179|      0|                        && (pRef->iHeightInPixel == pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb->iHeightInPixel);
  ------------------
  |  Branch (179:28): [True: 0, False: 0]
  ------------------
  180|       |
  181|  47.1k|        if (!bCopyPrevious) {
  ------------------
  |  Branch (181:13): [True: 47.1k, False: 0]
  ------------------
  182|  47.1k|          memset (pRef->pData[0], 128, pRef->iLinesize[0] * pRef->iHeightInPixel);
  183|  47.1k|          memset (pRef->pData[1], 128, pRef->iLinesize[1] * pRef->iHeightInPixel / 2);
  184|  47.1k|          memset (pRef->pData[2], 128, pRef->iLinesize[2] * pRef->iHeightInPixel / 2);
  185|  47.1k|        } else if (pRef == pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb) {
  ------------------
  |  Branch (185:20): [True: 0, False: 0]
  ------------------
  186|      0|          WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "WelsInitRefList()::EC memcpy overlap.");
  187|      0|        } else {
  188|      0|          memcpy (pRef->pData[0], pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb->pData[0],
  189|      0|                  pRef->iLinesize[0] * pRef->iHeightInPixel);
  190|      0|          memcpy (pRef->pData[1], pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb->pData[1],
  191|      0|                  pRef->iLinesize[1] * pRef->iHeightInPixel / 2);
  192|      0|          memcpy (pRef->pData[2], pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb->pData[2],
  193|      0|                  pRef->iLinesize[2] * pRef->iHeightInPixel / 2);
  194|      0|        }
  195|  47.1k|        pRef->iFrameNum = 0;
  196|  47.1k|        pRef->iFramePoc = 0;
  197|  47.1k|        pRef->uiTemporalId = pRef->uiQualityId = 0;
  198|  47.1k|        pRef->eSliceType = pCtx->eSliceType;
  199|  47.1k|        ExpandReferencingPicture (pRef->pData, pRef->iWidthInPixel, pRef->iHeightInPixel, pRef->iLinesize,
  200|  47.1k|                                  pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture);
  201|  47.1k|        AddShortTermToList (&pCtx->sRefPic, pRef);
  202|  47.1k|      } else {
  203|      0|        WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "WelsInitRefList()::PrefetchPic for EC errors.");
  204|      0|        pCtx->iErrorCode |= dsOutOfMemory;
  205|      0|        return ERR_INFO_REF_COUNT_OVERFLOW;
  206|      0|      }
  207|  47.1k|    }
  208|  47.1k|  }
  209|  2.58M|  return ERR_NONE;
  210|  2.58M|}
manage_dec_ref.cpp:_ZN7WelsDecL18WrapShortRefPicNumEPNS_21TagWelsDecoderContextE:
  212|  2.58M|static void WrapShortRefPicNum (PWelsDecoderContext pCtx) {
  213|  2.58M|  int32_t i;
  214|  2.58M|  PSliceHeader pSliceHeader = &pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader;
  215|  2.58M|  int32_t iMaxPicNum = 1 << pSliceHeader->pSps->uiLog2MaxFrameNum;
  216|  2.58M|  PPicture* ppShoreRefList = pCtx->sRefPic.pShortRefList[LIST_0];
  217|  2.58M|  int32_t iShortRefCount = pCtx->sRefPic.uiShortRefCount[LIST_0];
  218|       |  //wrap pic num
  219|  5.02M|  for (i = 0; i < iShortRefCount; i++) {
  ------------------
  |  Branch (219:15): [True: 2.44M, False: 2.58M]
  ------------------
  220|  2.44M|    if (ppShoreRefList[i]) {
  ------------------
  |  Branch (220:9): [True: 2.44M, False: 0]
  ------------------
  221|  2.44M|      if (ppShoreRefList[i]->iFrameNum > pSliceHeader->iFrameNum)
  ------------------
  |  Branch (221:11): [True: 151k, False: 2.29M]
  ------------------
  222|   151k|        ppShoreRefList[i]->iFrameWrapNum = ppShoreRefList[i]->iFrameNum - iMaxPicNum;
  223|  2.29M|      else
  224|  2.29M|        ppShoreRefList[i]->iFrameWrapNum = ppShoreRefList[i]->iFrameNum;
  225|  2.44M|    }
  226|  2.44M|  }
  227|  2.58M|}
manage_dec_ref.cpp:_ZN7WelsDecL4MMCOEPNS_21TagWelsDecoderContextEPNS_9TagRefPicEPNS_16TagRefPicMarkingE:
  664|  21.6k|static int32_t MMCO (PWelsDecoderContext pCtx, PRefPic pRefPic, PRefPicMarking pRefPicMarking) {
  665|  21.6k|  PSps pSps = pCtx->pCurDqLayer->sLayerInfo.pSps;
  666|  21.6k|  int32_t i = 0;
  667|  21.6k|  int32_t iRet = ERR_NONE;
  668|  69.3k|  for (i = 0; i < MAX_MMCO_COUNT && pRefPicMarking->sMmcoRef[i].uiMmcoType != MMCO_END; i++) {
  ------------------
  |  |   51|   138k|#define MAX_MMCO_COUNT                  66
  ------------------
  |  Branch (668:15): [True: 69.1k, False: 243]
  |  Branch (668:37): [True: 52.5k, False: 16.5k]
  ------------------
  669|  52.5k|    uint32_t uiMmcoType = pRefPicMarking->sMmcoRef[i].uiMmcoType;
  670|  52.5k|    int32_t iShortFrameNum = (pCtx->iFrameNum - pRefPicMarking->sMmcoRef[i].iDiffOfPicNum) & ((
  671|  52.5k|                               1 << pSps->uiLog2MaxFrameNum) - 1);
  672|  52.5k|    uint32_t uiLongTermPicNum = pRefPicMarking->sMmcoRef[i].uiLongTermPicNum;
  673|  52.5k|    int32_t iLongTermFrameIdx = pRefPicMarking->sMmcoRef[i].iLongTermFrameIdx;
  674|  52.5k|    int32_t iMaxLongTermFrameIdx = pRefPicMarking->sMmcoRef[i].iMaxLongTermFrameIdx;
  675|  52.5k|    if (uiMmcoType > MMCO_LONG) {
  ------------------
  |  Branch (675:9): [True: 2.32k, False: 50.2k]
  ------------------
  676|  2.32k|      return ERR_INFO_INVALID_MMCO_OPCODE_BASE;
  677|  2.32k|    }
  678|  50.2k|    iRet = MMCOProcess (pCtx, pRefPic, uiMmcoType, iShortFrameNum, uiLongTermPicNum, iLongTermFrameIdx,
  679|  50.2k|                        iMaxLongTermFrameIdx);
  680|  50.2k|    if (iRet != ERR_NONE) {
  ------------------
  |  Branch (680:9): [True: 2.51k, False: 47.7k]
  ------------------
  681|  2.51k|      return iRet;
  682|  2.51k|    }
  683|  50.2k|  }
  684|  16.7k|  if (i == MAX_MMCO_COUNT) { //although Rec does not handle this condition, we here prohibit too many MMCO op
  ------------------
  |  |   51|  16.7k|#define MAX_MMCO_COUNT                  66
  ------------------
  |  Branch (684:7): [True: 243, False: 16.5k]
  ------------------
  685|    243|    return ERR_INFO_INVALID_MMCO_NUM;
  686|    243|  }
  687|       |
  688|  16.5k|  return ERR_NONE;
  689|  16.7k|}
manage_dec_ref.cpp:_ZN7WelsDecL11MMCOProcessEPNS_21TagWelsDecoderContextEPNS_9TagRefPicEjijii:
  691|  50.2k|                            int32_t iShortFrameNum, uint32_t uiLongTermPicNum, int32_t iLongTermFrameIdx, int32_t iMaxLongTermFrameIdx) {
  692|  50.2k|  PPicture pPic = NULL;
  693|  50.2k|  int32_t i = 0;
  694|  50.2k|  int32_t iRet = ERR_NONE;
  695|       |
  696|  50.2k|  switch (uiMmcoType) {
  697|  21.8k|  case MMCO_SHORT2UNUSED:
  ------------------
  |  Branch (697:3): [True: 21.8k, False: 28.3k]
  ------------------
  698|  21.8k|    pPic = WelsDelShortFromListSetUnref (pRefPic, iShortFrameNum);
  699|  21.8k|    if (pPic == NULL) {
  ------------------
  |  Branch (699:9): [True: 20.1k, False: 1.75k]
  ------------------
  700|  20.1k|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "MMCO_SHORT2UNUSED: delete an empty entry from short term list");
  701|  20.1k|    }
  702|  21.8k|    break;
  703|  4.50k|  case MMCO_LONG2UNUSED:
  ------------------
  |  Branch (703:3): [True: 4.50k, False: 45.7k]
  ------------------
  704|  4.50k|    pPic = WelsDelLongFromListSetUnref (pRefPic, uiLongTermPicNum);
  705|  4.50k|    if (pPic == NULL) {
  ------------------
  |  Branch (705:9): [True: 2.81k, False: 1.68k]
  ------------------
  706|  2.81k|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "MMCO_LONG2UNUSED: delete an empty entry from long term list");
  707|  2.81k|    }
  708|  4.50k|    break;
  709|  7.49k|  case MMCO_SHORT2LONG:
  ------------------
  |  Branch (709:3): [True: 7.49k, False: 42.7k]
  ------------------
  710|  7.49k|    if (iLongTermFrameIdx > pRefPic->iMaxLongTermFrameIdx) {
  ------------------
  |  Branch (710:9): [True: 1.10k, False: 6.39k]
  ------------------
  711|  1.10k|      return ERR_INFO_INVALID_MMCO_LONG_TERM_IDX_EXCEED_MAX;
  712|  1.10k|    }
  713|  6.39k|    pPic = WelsDelShortFromList (pRefPic, iShortFrameNum);
  714|  6.39k|    if (pPic == NULL) {
  ------------------
  |  Branch (714:9): [True: 4.00k, False: 2.39k]
  ------------------
  715|  4.00k|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "MMCO_LONG2LONG: delete an empty entry from short term list");
  716|  4.00k|      break;
  717|  4.00k|    }
  718|  2.39k|    WelsDelLongFromListSetUnref (pRefPic, iLongTermFrameIdx);
  719|  2.39k|#ifdef LONG_TERM_REF
  720|  2.39k|    pCtx->bCurAuContainLtrMarkSeFlag = true;
  721|  2.39k|    pCtx->iFrameNumOfAuMarkedLtr      = iShortFrameNum;
  722|  2.39k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO, "ex_mark_avc():::MMCO_SHORT2LONG:::LTR marking....iFrameNum: %d",
  723|  2.39k|             pCtx->iFrameNumOfAuMarkedLtr);
  724|  2.39k|#endif
  725|       |
  726|  2.39k|    MarkAsLongTerm (pRefPic, iShortFrameNum, iLongTermFrameIdx, uiLongTermPicNum);
  727|  2.39k|    break;
  728|  3.34k|  case MMCO_SET_MAX_LONG:
  ------------------
  |  Branch (728:3): [True: 3.34k, False: 46.9k]
  ------------------
  729|  3.34k|    pRefPic->iMaxLongTermFrameIdx = iMaxLongTermFrameIdx;
  730|  27.8k|    for (i = 0 ; i < pRefPic->uiLongRefCount[LIST_0]; i++) {
  ------------------
  |  Branch (730:18): [True: 24.4k, False: 3.34k]
  ------------------
  731|  24.4k|      if (pRefPic->pLongRefList[LIST_0][i]->iLongTermFrameIdx > pRefPic->iMaxLongTermFrameIdx) {
  ------------------
  |  Branch (731:11): [True: 322, False: 24.1k]
  ------------------
  732|    322|        WelsDelLongFromListSetUnref (pRefPic, pRefPic->pLongRefList[LIST_0][i]->iLongTermFrameIdx);
  733|    322|      }
  734|  24.4k|    }
  735|  3.34k|    break;
  736|  2.32k|  case MMCO_RESET:
  ------------------
  |  Branch (736:3): [True: 2.32k, False: 47.9k]
  ------------------
  737|  2.32k|    WelsResetRefPic (pCtx);
  738|  2.32k|    pCtx->pLastDecPicInfo->bLastHasMmco5 = true;
  739|  2.32k|    break;
  740|  10.7k|  case MMCO_LONG:
  ------------------
  |  Branch (740:3): [True: 10.7k, False: 39.5k]
  ------------------
  741|  10.7k|    if (iLongTermFrameIdx > pRefPic->iMaxLongTermFrameIdx) {
  ------------------
  |  Branch (741:9): [True: 916, False: 9.81k]
  ------------------
  742|    916|      return ERR_INFO_INVALID_MMCO_LONG_TERM_IDX_EXCEED_MAX;
  743|    916|    }
  744|  9.81k|    WelsDelLongFromListSetUnref (pRefPic, iLongTermFrameIdx);
  745|  9.81k|    if (pRefPic->uiLongRefCount[LIST_0] + pRefPic->uiShortRefCount[LIST_0] >= WELS_MAX (1, pCtx->pSps->iNumRefFrames)) {
  ------------------
  |  |   91|  9.81k|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (91:25): [True: 201, False: 9.61k]
  |  |  ------------------
  ------------------
  |  Branch (745:9): [True: 500, False: 9.31k]
  ------------------
  746|    500|      return ERR_INFO_INVALID_MMCO_REF_NUM_OVERFLOW;
  747|    500|    }
  748|  9.31k|#ifdef LONG_TERM_REF
  749|  9.31k|    pCtx->bCurAuContainLtrMarkSeFlag = true;
  750|  9.31k|    pCtx->iFrameNumOfAuMarkedLtr      = pCtx->iFrameNum;
  751|  9.31k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO, "ex_mark_avc():::MMCO_LONG:::LTR marking....iFrameNum: %d",
  752|  9.31k|             pCtx->iFrameNum);
  753|  9.31k|#endif
  754|  9.31k|    iRet = AddLongTermToList (pRefPic, pCtx->pDec, iLongTermFrameIdx, uiLongTermPicNum);
  755|  9.31k|    break;
  756|      0|  default :
  ------------------
  |  Branch (756:3): [True: 0, False: 50.2k]
  ------------------
  757|      0|    break;
  758|  50.2k|  }
  759|       |
  760|  47.7k|  return iRet;
  761|  50.2k|}
manage_dec_ref.cpp:_ZN7WelsDecL28WelsDelShortFromListSetUnrefEPNS_9TagRefPicEi:
  808|  21.8k|static PPicture WelsDelShortFromListSetUnref (PRefPic pRefPic, int32_t iFrameNum) {
  809|  21.8k|  PPicture pPic = WelsDelShortFromList (pRefPic, iFrameNum);
  810|  21.8k|  if (pPic) {
  ------------------
  |  Branch (810:7): [True: 1.75k, False: 20.1k]
  ------------------
  811|  1.75k|    SetUnRef (pPic);
  812|  1.75k|  }
  813|  21.8k|  return pPic;
  814|  21.8k|}
manage_dec_ref.cpp:_ZN7WelsDecL27WelsDelLongFromListSetUnrefEPNS_9TagRefPicEj:
  837|  23.2k|static PPicture WelsDelLongFromListSetUnref (PRefPic pRefPic, uint32_t uiLongTermFrameIdx) {
  838|  23.2k|  PPicture pPic = WelsDelLongFromList (pRefPic, uiLongTermFrameIdx);
  839|  23.2k|  if (pPic) {
  ------------------
  |  Branch (839:7): [True: 11.5k, False: 11.6k]
  ------------------
  840|  11.5k|    SetUnRef (pPic);
  841|  11.5k|  }
  842|  23.2k|  return pPic;
  843|  23.2k|}
manage_dec_ref.cpp:_ZN7WelsDecL19WelsDelLongFromListEPNS_9TagRefPicEj:
  816|  23.2k|static PPicture WelsDelLongFromList (PRefPic pRefPic, uint32_t uiLongTermFrameIdx) {
  817|  23.2k|  PPicture pPic = NULL;
  818|  23.2k|  int32_t i = 0;
  819|  55.8k|  for (i = 0; i < pRefPic->uiLongRefCount[LIST_0]; i++) {
  ------------------
  |  Branch (819:15): [True: 44.1k, False: 11.6k]
  ------------------
  820|  44.1k|    pPic = pRefPic->pLongRefList[LIST_0][i];
  821|  44.1k|    if (pPic->iLongTermFrameIdx == (int32_t)uiLongTermFrameIdx) {
  ------------------
  |  Branch (821:9): [True: 11.5k, False: 32.5k]
  ------------------
  822|  11.5k|      int32_t iMoveSize = pRefPic->uiLongRefCount[LIST_0] - i - 1;
  823|  11.5k|      pPic->bUsedAsRef = false;
  824|  11.5k|      pPic->bIsLongRef = false;
  825|  11.5k|      if (iMoveSize > 0) {
  ------------------
  |  Branch (825:11): [True: 6.65k, False: 4.94k]
  ------------------
  826|  6.65k|        memmove (&pRefPic->pLongRefList[LIST_0][i], &pRefPic->pLongRefList[LIST_0][i + 1],
  827|  6.65k|                 iMoveSize * sizeof (PPicture)); //confirmed_safe_unsafe_usage
  828|  6.65k|      }
  829|  11.5k|      pRefPic->uiLongRefCount[LIST_0]--;
  830|  11.5k|      pRefPic->pLongRefList[LIST_0][pRefPic->uiLongRefCount[LIST_0]] = NULL;
  831|  11.5k|      return pPic;
  832|  11.5k|    }
  833|  44.1k|  }
  834|  11.6k|  return NULL;
  835|  23.2k|}
manage_dec_ref.cpp:_ZN7WelsDecL20WelsDelShortFromListEPNS_9TagRefPicEi:
  785|   420k|static PPicture WelsDelShortFromList (PRefPic pRefPic, int32_t iFrameNum) {
  786|   420k|  int32_t i = 0;
  787|   420k|  int32_t iMoveSize = 0;
  788|   420k|  PPicture pPic = NULL;
  789|       |
  790|   451k|  for (i = 0; i < pRefPic->uiShortRefCount[LIST_0]; i++) {
  ------------------
  |  Branch (790:15): [True: 427k, False: 24.1k]
  ------------------
  791|   427k|    if (pRefPic->pShortRefList[LIST_0][i]->iFrameNum == iFrameNum) {
  ------------------
  |  Branch (791:9): [True: 395k, False: 31.2k]
  ------------------
  792|   395k|      iMoveSize = pRefPic->uiShortRefCount[LIST_0] - i - 1;
  793|   395k|      pPic = pRefPic->pShortRefList[LIST_0][i];
  794|   395k|      pPic->bUsedAsRef = false;
  795|   395k|      pRefPic->pShortRefList[LIST_0][i] = NULL;
  796|   395k|      if (iMoveSize > 0) {
  ------------------
  |  Branch (796:11): [True: 1.80k, False: 394k]
  ------------------
  797|  1.80k|        memmove (&pRefPic->pShortRefList[LIST_0][i], &pRefPic->pShortRefList[LIST_0][i + 1],
  798|  1.80k|                 iMoveSize * sizeof (PPicture)); //confirmed_safe_unsafe_usage
  799|  1.80k|      }
  800|   395k|      pRefPic->uiShortRefCount[LIST_0]--;
  801|       |      pRefPic->pShortRefList[LIST_0][pRefPic->uiShortRefCount[LIST_0]] = NULL;
  802|   395k|      break;
  803|   395k|    }
  804|   427k|  }
  805|   420k|  return pPic;
  806|   420k|}
manage_dec_ref.cpp:_ZN7WelsDecL14MarkAsLongTermEPNS_9TagRefPicEiij:
  901|  2.39k|                               uint32_t uiLongTermPicNum) {
  902|  2.39k|  PPicture pPic = NULL;
  903|  2.39k|  int32_t i = 0;
  904|  2.39k|  int32_t iRet = ERR_NONE;
  905|  2.39k|  WelsDelLongFromListSetUnref (pRefPic, iLongTermFrameIdx);
  906|       |
  907|  4.18k|  for (i = 0; i < pRefPic->uiRefCount[LIST_0]; i++) {
  ------------------
  |  Branch (907:15): [True: 3.62k, False: 564]
  ------------------
  908|  3.62k|    pPic = pRefPic->pRefList[LIST_0][i];
  909|  3.62k|    if (pPic->iFrameNum == iFrameNum && !pPic->bIsLongRef) {
  ------------------
  |  Branch (909:9): [True: 2.19k, False: 1.42k]
  |  Branch (909:41): [True: 1.82k, False: 372]
  ------------------
  910|  1.82k|      iRet = AddLongTermToList (pRefPic, pPic, iLongTermFrameIdx, uiLongTermPicNum);
  911|  1.82k|      break;
  912|  1.82k|    }
  913|  3.62k|  }
  914|       |
  915|  2.39k|  return iRet;
  916|  2.39k|}
manage_dec_ref.cpp:_ZN7WelsDecL13SlidingWindowEPNS_21TagWelsDecoderContextEPNS_9TagRefPicE:
  763|   411k|static int32_t SlidingWindow (PWelsDecoderContext pCtx, PRefPic pRefPic) {
  764|   411k|  PPicture pPic = NULL;
  765|   411k|  int32_t i = 0;
  766|       |
  767|   411k|  if (pRefPic->uiShortRefCount[LIST_0] + pRefPic->uiLongRefCount[LIST_0] >= pCtx->pSps->iNumRefFrames) {
  ------------------
  |  Branch (767:7): [True: 394k, False: 16.8k]
  ------------------
  768|   394k|    if (pRefPic->uiShortRefCount[LIST_0] == 0) {
  ------------------
  |  Branch (768:9): [True: 2.47k, False: 391k]
  ------------------
  769|  2.47k|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "No reference picture in short term list when sliding window");
  770|  2.47k|      return ERR_INFO_INVALID_MMCO_REF_NUM_NOT_ENOUGH;
  771|  2.47k|    }
  772|   391k|    for (i = pRefPic->uiShortRefCount[LIST_0] - 1; i >= 0; i--) {
  ------------------
  |  Branch (772:52): [True: 391k, False: 0]
  ------------------
  773|   391k|      pPic = WelsDelShortFromList (pRefPic, pRefPic->pShortRefList[LIST_0][i]->iFrameNum);
  774|   391k|      if (pPic) {
  ------------------
  |  Branch (774:11): [True: 391k, False: 0]
  ------------------
  775|   391k|        SetUnRef (pPic);
  776|   391k|        break;
  777|   391k|      } else {
  778|      0|        return ERR_INFO_INVALID_MMCO_REF_NUM_OVERFLOW;
  779|      0|      }
  780|   391k|    }
  781|   391k|  }
  782|   408k|  return ERR_NONE;
  783|   411k|}
manage_dec_ref.cpp:_ZN7WelsDecL18AddShortTermToListEPNS_9TagRefPicEPNS_8SPictureE:
  845|   466k|static int32_t AddShortTermToList (PRefPic pRefPic, PPicture pPic) {
  846|   466k|  pPic->bUsedAsRef = true;
  847|   466k|  pPic->bIsLongRef = false;
  848|   466k|  pPic->iLongTermFrameIdx = -1;
  849|   466k|  if (pRefPic->uiShortRefCount[LIST_0] > 0) {
  ------------------
  |  Branch (849:7): [True: 28.2k, False: 438k]
  ------------------
  850|       |    // Check the duplicate frame_num in short ref list
  851|  53.2k|    for (int32_t iPos = 0; iPos < pRefPic->uiShortRefCount[LIST_0]; iPos++) {
  ------------------
  |  Branch (851:28): [True: 34.8k, False: 18.3k]
  ------------------
  852|  34.8k|      if (!pRefPic->pShortRefList[LIST_0][iPos]) {
  ------------------
  |  Branch (852:11): [True: 0, False: 34.8k]
  ------------------
  853|      0|        return ERR_INFO_INVALID_PTR;
  854|      0|      }
  855|  34.8k|      if (pPic->iFrameNum == pRefPic->pShortRefList[LIST_0][iPos]->iFrameNum) {
  ------------------
  |  Branch (855:11): [True: 9.81k, False: 25.0k]
  ------------------
  856|       |        // Replace the previous ref pic with the new one with the same frame_num
  857|  9.81k|        pRefPic->pShortRefList[LIST_0][iPos] = pPic;
  858|  9.81k|        return ERR_INFO_DUPLICATE_FRAME_NUM;
  859|  9.81k|      }
  860|  34.8k|    }
  861|       |
  862|  18.3k|    memmove (&pRefPic->pShortRefList[LIST_0][1], &pRefPic->pShortRefList[LIST_0][0],
  863|  18.3k|             pRefPic->uiShortRefCount[LIST_0]*sizeof (PPicture));//confirmed_safe_unsafe_usage
  864|  18.3k|  }
  865|   457k|  pRefPic->pShortRefList[LIST_0][0] = pPic;
  866|   457k|  pRefPic->uiShortRefCount[LIST_0]++;
  867|   457k|  return ERR_NONE;
  868|   466k|}
manage_dec_ref.cpp:_ZN7WelsDecL17AddLongTermToListEPNS_9TagRefPicEPNS_8SPictureEij:
  871|  20.4k|                                  uint32_t uiLongTermPicNum) {
  872|  20.4k|  int32_t i = 0;
  873|       |
  874|  20.4k|  pPic->bUsedAsRef = true;
  875|  20.4k|  pPic->bIsLongRef = true;
  876|  20.4k|  pPic->iLongTermFrameIdx = iLongTermFrameIdx;
  877|  20.4k|  pPic->uiLongTermPicNum = uiLongTermPicNum;
  878|  20.4k|  if (pRefPic->uiLongRefCount[LIST_0] == 0) {
  ------------------
  |  Branch (878:7): [True: 9.65k, False: 10.7k]
  ------------------
  879|  9.65k|    pRefPic->pLongRefList[LIST_0][pRefPic->uiLongRefCount[LIST_0]] = pPic;
  880|  10.7k|  } else {
  881|  85.0k|    for (i = 0; i < WELS_MIN(pRefPic->uiLongRefCount[LIST_0], MAX_REF_PIC_COUNT); i++) {
  ------------------
  |  |   95|  85.0k|#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (95:25): [True: 76.9k, False: 8.01k]
  |  |  ------------------
  ------------------
  |  Branch (881:17): [True: 76.5k, False: 8.48k]
  ------------------
  882|  76.5k|      if (!pRefPic->pLongRefList[LIST_0][i]) {
  ------------------
  |  Branch (882:11): [True: 0, False: 76.5k]
  ------------------
  883|      0|        return ERR_INFO_INVALID_PTR;
  884|      0|      }
  885|  76.5k|      if (pRefPic->pLongRefList[LIST_0][i]->iLongTermFrameIdx > pPic->iLongTermFrameIdx) {
  ------------------
  |  Branch (885:11): [True: 2.29k, False: 74.2k]
  ------------------
  886|  2.29k|        break;
  887|  2.29k|      }
  888|  76.5k|    }
  889|  10.7k|    memmove (&pRefPic->pLongRefList[LIST_0][i + 1], &pRefPic->pLongRefList[LIST_0][i],
  890|  10.7k|             (pRefPic->uiLongRefCount[LIST_0] - i)*sizeof (PPicture)); //confirmed_safe_unsafe_usage
  891|  10.7k|    pRefPic->pLongRefList[LIST_0][i] = pPic;
  892|  10.7k|  }
  893|       |
  894|  20.4k|  if (pRefPic->uiLongRefCount[LIST_0] < MAX_REF_PIC_COUNT) {
  ------------------
  |  |   45|  20.4k|#define MAX_REF_PIC_COUNT               16              // MAX Short + Long reference pictures
  ------------------
  |  Branch (894:7): [True: 19.9k, False: 474]
  ------------------
  895|  19.9k|    pRefPic->uiLongRefCount[LIST_0]++;
  896|  19.9k|  }
  897|  20.4k|  return ERR_NONE;
  898|  20.4k|}
manage_dec_ref.cpp:_ZN7WelsDecL25RemainOneBufferInDpbForECEPNS_21TagWelsDecoderContextEPNS_9TagRefPicE:
  932|  13.8k|static int32_t RemainOneBufferInDpbForEC (PWelsDecoderContext pCtx, PRefPic pRefPic) {
  933|  13.8k|  int32_t iRet = ERR_NONE;
  934|  13.8k|  if (pRefPic->uiShortRefCount[0] + pRefPic->uiLongRefCount[0] < pCtx->pSps->iNumRefFrames)
  ------------------
  |  Branch (934:7): [True: 2.19k, False: 11.6k]
  ------------------
  935|  2.19k|    return iRet;
  936|       |
  937|  11.6k|  if (pRefPic->uiShortRefCount[0] > 0) {
  ------------------
  |  Branch (937:7): [True: 5.94k, False: 5.72k]
  ------------------
  938|  5.94k|    iRet = SlidingWindow (pCtx, pRefPic);
  939|  5.94k|  } else { //all LTR, remove the smallest long_term_frame_idx
  940|  5.72k|    int32_t iLongTermFrameIdx = 0;
  941|  5.72k|    int32_t iMaxLongTermFrameIdx = pRefPic->iMaxLongTermFrameIdx;
  942|  5.72k|#ifdef LONG_TERM_REF
  943|  5.72k|    int32_t iCurrLTRFrameIdx = GetLTRFrameIndex (pRefPic, pCtx->iFrameNumOfAuMarkedLtr);
  944|  5.72k|#endif
  945|  12.9k|    while ((pRefPic->uiLongRefCount[0] >= pCtx->pSps->iNumRefFrames) && (iLongTermFrameIdx <= iMaxLongTermFrameIdx)) {
  ------------------
  |  Branch (945:12): [True: 10.9k, False: 1.94k]
  |  Branch (945:73): [True: 7.17k, False: 3.78k]
  ------------------
  946|  7.17k|#ifdef LONG_TERM_REF
  947|  7.17k|      if (iLongTermFrameIdx == iCurrLTRFrameIdx) {
  ------------------
  |  Branch (947:11): [True: 3.30k, False: 3.87k]
  ------------------
  948|  3.30k|        iLongTermFrameIdx++;
  949|  3.30k|        continue;
  950|  3.30k|      }
  951|  3.87k|#endif
  952|  3.87k|      WelsDelLongFromListSetUnref (pRefPic, iLongTermFrameIdx);
  953|  3.87k|      iLongTermFrameIdx++;
  954|  3.87k|    }
  955|  5.72k|  }
  956|  11.6k|  if (pRefPic->uiShortRefCount[0] + pRefPic->uiLongRefCount[0] >=
  ------------------
  |  Branch (956:7): [True: 4.03k, False: 7.63k]
  ------------------
  957|  11.6k|      pCtx->pSps->iNumRefFrames) { //fail to remain one empty buffer in DPB
  958|  4.03k|    WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "RemainOneBufferInDpbForEC(): empty one DPB failed for EC!");
  959|  4.03k|    iRet = ERR_INFO_REF_COUNT_OVERFLOW;
  960|  4.03k|  }
  961|       |
  962|  11.6k|  return iRet;
  963|  13.8k|}

_ZN7WelsDec14MemInitNalListEPPNS_14TagAccessUnitsEjPN10WelsCommon12CMemoryAlignE:
   47|  26.4k|int32_t MemInitNalList (PAccessUnit* ppAu, const uint32_t kuiSize, CMemoryAlign* pMa) {
   48|  26.4k|  uint32_t uiIdx = 0;
   49|  26.4k|  uint8_t* pBase = NULL, *pPtr = NULL;
   50|  26.4k|  const uint32_t kuiSizeAu = sizeof (SAccessUnit);
   51|  26.4k|  const uint32_t kuiSizeNalUnitPtr = kuiSize * sizeof (PNalUnit);
   52|  26.4k|  const uint32_t kuiSizeNalUnit = sizeof (SNalUnit);
   53|  26.4k|  const uint32_t kuiCountSize = (kuiSizeAu + kuiSizeNalUnitPtr + kuiSize * kuiSizeNalUnit) * sizeof (uint8_t);
   54|       |
   55|  26.4k|  if (kuiSize == 0)
  ------------------
  |  Branch (55:7): [True: 0, False: 26.4k]
  ------------------
   56|      0|    return ERR_INFO_INVALID_PARAM;
   57|       |
   58|  26.4k|  if (*ppAu != NULL) {
  ------------------
  |  Branch (58:7): [True: 0, False: 26.4k]
  ------------------
   59|      0|    MemFreeNalList (ppAu, pMa);
   60|      0|  }
   61|       |
   62|  26.4k|  pBase = (uint8_t*)pMa->WelsMallocz (kuiCountSize, "Access Unit");
   63|  26.4k|  if (pBase == NULL)
  ------------------
  |  Branch (63:7): [True: 0, False: 26.4k]
  ------------------
   64|      0|    return ERR_INFO_OUT_OF_MEMORY;
   65|  26.4k|  pPtr = pBase;
   66|  26.4k|  *ppAu = (PAccessUnit)pPtr;
   67|  26.4k|  pPtr += kuiSizeAu;
   68|  26.4k|  (*ppAu)->pNalUnitsList = (PNalUnit*)pPtr;
   69|  26.4k|  pPtr += kuiSizeNalUnitPtr;
   70|   846k|  do {
   71|   846k|    (*ppAu)->pNalUnitsList[uiIdx] = (PNalUnit)pPtr;
   72|   846k|    pPtr += kuiSizeNalUnit;
   73|   846k|    ++ uiIdx;
   74|   846k|  } while (uiIdx < kuiSize);
  ------------------
  |  Branch (74:12): [True: 819k, False: 26.4k]
  ------------------
   75|       |
   76|  26.4k|  (*ppAu)->uiCountUnitsNum      = kuiSize;
   77|  26.4k|  (*ppAu)->uiAvailUnitsNum      = 0;
   78|  26.4k|  (*ppAu)->uiActualUnitsNum     = 0;
   79|  26.4k|  (*ppAu)->uiStartPos           = 0;
   80|  26.4k|  (*ppAu)->uiEndPos             = 0;
   81|  26.4k|  (*ppAu)->bCompletedAuFlag     = false;
   82|       |
   83|  26.4k|  return ERR_NONE;
   84|  26.4k|}
_ZN7WelsDec14MemFreeNalListEPPNS_14TagAccessUnitsEPN10WelsCommon12CMemoryAlignE:
   86|  26.4k|int32_t MemFreeNalList (PAccessUnit* ppAu, CMemoryAlign* pMa) {
   87|  26.4k|  if (ppAu != NULL) {
  ------------------
  |  Branch (87:7): [True: 26.4k, False: 0]
  ------------------
   88|  26.4k|    PAccessUnit pAu = *ppAu;
   89|  26.4k|    if (pAu != NULL) {
  ------------------
  |  Branch (89:9): [True: 26.4k, False: 0]
  ------------------
   90|  26.4k|      pMa->WelsFree (pAu, "Access Unit");
   91|       |      *ppAu = NULL;
   92|  26.4k|    }
   93|  26.4k|  }
   94|  26.4k|  return ERR_NONE;
   95|  26.4k|}
_ZN7WelsDec13MemGetNextNalEPPNS_14TagAccessUnitsEPN10WelsCommon12CMemoryAlignE:
  130|  4.90M|PNalUnit MemGetNextNal (PAccessUnit* ppAu, CMemoryAlign* pMa) {
  131|  4.90M|  PAccessUnit pAu = *ppAu;
  132|  4.90M|  PNalUnit pNu = NULL;
  133|       |
  134|  4.90M|  if (pAu->uiAvailUnitsNum >= pAu->uiCountUnitsNum) { // need expand list
  ------------------
  |  Branch (134:7): [True: 0, False: 4.90M]
  ------------------
  135|      0|    const uint32_t kuiExpandingSize = pAu->uiCountUnitsNum + (MAX_NAL_UNIT_NUM_IN_AU >> 1);
  ------------------
  |  |   59|      0|#define MAX_NAL_UNIT_NUM_IN_AU          32      // predefined maximal number of NAL Units in an access unit
  ------------------
  136|      0|    if (ExpandNalUnitList (ppAu, pAu->uiCountUnitsNum, kuiExpandingSize, pMa))
  ------------------
  |  Branch (136:9): [True: 0, False: 0]
  ------------------
  137|      0|      return NULL; // out of memory
  138|      0|    pAu = *ppAu;
  139|      0|  }
  140|       |
  141|  4.90M|  pNu = pAu->pNalUnitsList[pAu->uiAvailUnitsNum++]; // ready for next nal position
  142|       |
  143|  4.90M|  memset (pNu, 0, sizeof (SNalUnit)); // Please do not remove this for cache intend!!
  144|       |
  145|  4.90M|  return pNu;
  146|  4.90M|}

_ZN7WelsDec18CopyRectBlock4ColsEPvS0_iiii:
  132|  18.4M|                         const int32_t size) {
  133|  18.4M|  uint8_t* dst = (uint8_t*)vdst;
  134|  18.4M|  uint8_t* src = (uint8_t*)vsrc;
  135|  18.4M|  w *= size;
  136|  18.4M|  if (w == 1) {
  ------------------
  |  Branch (136:7): [True: 0, False: 18.4M]
  ------------------
  137|      0|    dst[stride_dst * 0] = src[stride_src * 0];
  138|      0|    dst[stride_dst * 1] = src[stride_src * 1];
  139|      0|    dst[stride_dst * 2] = src[stride_src * 2];
  140|      0|    dst[stride_dst * 3] = src[stride_src * 3];
  141|  18.4M|  } else if (w == 2) {
  ------------------
  |  Branch (141:14): [True: 0, False: 18.4M]
  ------------------
  142|      0|    * (uint16_t*) (&dst[stride_dst * 0]) = * (uint16_t*) (&src[stride_src * 0]);
  143|      0|    * (uint16_t*) (&dst[stride_dst * 1]) = * (uint16_t*) (&src[stride_src * 1]);
  144|      0|    * (uint16_t*) (&dst[stride_dst * 2]) = * (uint16_t*) (&src[stride_src * 2]);
  145|      0|    * (uint16_t*) (&dst[stride_dst * 3]) = * (uint16_t*) (&src[stride_src * 3]);
  146|  18.4M|  } else if (w == 4) {
  ------------------
  |  Branch (146:14): [True: 9.24M, False: 9.24M]
  ------------------
  147|  9.24M|    * (uint32_t*) (&dst[stride_dst * 0]) = * (uint32_t*) (&src[stride_src * 0]);
  148|  9.24M|    * (uint32_t*) (&dst[stride_dst * 1]) = * (uint32_t*) (&src[stride_src * 1]);
  149|  9.24M|    * (uint32_t*) (&dst[stride_dst * 2]) = * (uint32_t*) (&src[stride_src * 2]);
  150|  9.24M|    * (uint32_t*) (&dst[stride_dst * 3]) = * (uint32_t*) (&src[stride_src * 3]);
  151|  9.24M|  } else if (w == 16) {
  ------------------
  |  Branch (151:14): [True: 9.24M, False: 0]
  ------------------
  152|  9.24M|    memcpy (&dst[stride_dst * 0], &src[stride_src * 0], 16);
  153|  9.24M|    memcpy (&dst[stride_dst * 1], &src[stride_src * 1], 16);
  154|  9.24M|    memcpy (&dst[stride_dst * 2], &src[stride_src * 2], 16);
  155|  9.24M|    memcpy (&dst[stride_dst * 3], &src[stride_src * 3], 16);
  156|  9.24M|  }
  157|  18.4M|}
_ZN7WelsDec23PredPSkipMvFromNeighborEPNS_10TagDqLayerEPs:
  158|  4.97M|void PredPSkipMvFromNeighbor (PDqLayer pCurDqLayer, int16_t iMvp[2]) {
  159|  4.97M|  bool bTopAvail, bLeftTopAvail, bRightTopAvail, bLeftAvail;
  160|       |
  161|  4.97M|  int32_t iCurSliceIdc, iTopSliceIdc, iLeftTopSliceIdc, iRightTopSliceIdc, iLeftSliceIdc;
  162|  4.97M|  int32_t iLeftTopType, iRightTopType, iTopType, iLeftType;
  163|  4.97M|  int32_t iCurX, iCurY, iCurXy, iLeftXy, iTopXy = 0, iLeftTopXy = 0, iRightTopXy = 0;
  164|       |
  165|  4.97M|  int8_t iLeftRef;
  166|  4.97M|  int8_t iTopRef;
  167|  4.97M|  int8_t iRightTopRef;
  168|  4.97M|  int8_t iLeftTopRef;
  169|  4.97M|  int8_t iDiagonalRef;
  170|  4.97M|  int8_t iMatchRef;
  171|  4.97M|  int16_t iMvA[2], iMvB[2], iMvC[2], iMvD[2];
  172|       |
  173|  4.97M|  iCurXy = pCurDqLayer->iMbXyIndex;
  174|  4.97M|  iCurX  = pCurDqLayer->iMbX;
  175|  4.97M|  iCurY  = pCurDqLayer->iMbY;
  176|  4.97M|  iCurSliceIdc = pCurDqLayer->pSliceIdc[iCurXy];
  177|       |
  178|  4.97M|  if (iCurX != 0) {
  ------------------
  |  Branch (178:7): [True: 2.35M, False: 2.62M]
  ------------------
  179|  2.35M|    iLeftXy = iCurXy - 1;
  180|  2.35M|    iLeftSliceIdc = pCurDqLayer->pSliceIdc[iLeftXy];
  181|  2.35M|    bLeftAvail = (iLeftSliceIdc == iCurSliceIdc);
  182|  2.62M|  } else {
  183|  2.62M|    bLeftAvail = 0;
  184|  2.62M|    bLeftTopAvail = 0;
  185|  2.62M|  }
  186|       |
  187|  4.97M|  if (iCurY != 0) {
  ------------------
  |  Branch (187:7): [True: 2.53M, False: 2.44M]
  ------------------
  188|  2.53M|    iTopXy = iCurXy - pCurDqLayer->iMbWidth;
  189|  2.53M|    iTopSliceIdc = pCurDqLayer->pSliceIdc[iTopXy];
  190|  2.53M|    bTopAvail = (iTopSliceIdc == iCurSliceIdc);
  191|  2.53M|    if (iCurX != 0) {
  ------------------
  |  Branch (191:9): [True: 2.05M, False: 476k]
  ------------------
  192|  2.05M|      iLeftTopXy = iTopXy - 1;
  193|  2.05M|      iLeftTopSliceIdc = pCurDqLayer->pSliceIdc[iLeftTopXy];
  194|  2.05M|      bLeftTopAvail = (iLeftTopSliceIdc  == iCurSliceIdc);
  195|  2.05M|    } else {
  196|   476k|      bLeftTopAvail = 0;
  197|   476k|    }
  198|  2.53M|    if (iCurX != (pCurDqLayer->iMbWidth - 1)) {
  ------------------
  |  Branch (198:9): [True: 2.08M, False: 449k]
  ------------------
  199|  2.08M|      iRightTopXy = iTopXy + 1;
  200|  2.08M|      iRightTopSliceIdc = pCurDqLayer->pSliceIdc[iRightTopXy];
  201|  2.08M|      bRightTopAvail = (iRightTopSliceIdc == iCurSliceIdc);
  202|  2.08M|    } else {
  203|   449k|      bRightTopAvail = 0;
  204|   449k|    }
  205|  2.53M|  } else {
  206|  2.44M|    bTopAvail = 0;
  207|  2.44M|    bLeftTopAvail = 0;
  208|  2.44M|    bRightTopAvail = 0;
  209|  2.44M|  }
  210|       |
  211|  4.97M|  iLeftType = ((iCurX != 0 && bLeftAvail) ? GetMbType (pCurDqLayer)[iLeftXy] : 0);
  ------------------
  |  Branch (211:17): [True: 2.35M, False: 2.62M]
  |  Branch (211:31): [True: 2.26M, False: 89.8k]
  ------------------
  212|  4.97M|  iTopType = ((iCurY != 0 && bTopAvail) ? GetMbType (pCurDqLayer)[iTopXy] : 0);
  ------------------
  |  Branch (212:16): [True: 2.53M, False: 2.44M]
  |  Branch (212:30): [True: 2.35M, False: 180k]
  ------------------
  213|  4.97M|  iLeftTopType = ((iCurX != 0 && iCurY != 0 && bLeftTopAvail)
  ------------------
  |  Branch (213:20): [True: 2.35M, False: 2.62M]
  |  Branch (213:34): [True: 2.05M, False: 297k]
  |  Branch (213:48): [True: 1.89M, False: 165k]
  ------------------
  214|  4.97M|                  ? GetMbType (pCurDqLayer)[iLeftTopXy] : 0);
  215|  4.97M|  iRightTopType = ((iCurX != pCurDqLayer->iMbWidth - 1 && iCurY != 0 && bRightTopAvail)
  ------------------
  |  Branch (215:21): [True: 4.20M, False: 772k]
  |  Branch (215:59): [True: 2.08M, False: 2.11M]
  |  Branch (215:73): [True: 2.01M, False: 68.2k]
  ------------------
  216|  4.97M|                   ? GetMbType (pCurDqLayer)[iRightTopXy] : 0);
  217|       |
  218|       |  /*get neb mv&iRefIdxArray*/
  219|       |  /*left*/
  220|  4.97M|  if (bLeftAvail && IS_INTER (iLeftType)) {
  ------------------
  |  |  306|  2.26M|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|  2.26M|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|  2.26M|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|  2.26M|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|  2.26M|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|  2.26M|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|  2.26M|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|  2.26M|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|  2.26M|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 2.26M, False: 3.87k]
  |  |  ------------------
  ------------------
  |  Branch (220:7): [True: 2.26M, False: 2.70M]
  ------------------
  221|  2.26M|    ST32 (iMvA, LD32 (pCurDqLayer->pDec ? pCurDqLayer->pDec->pMv[0][iLeftXy][3] : pCurDqLayer->pMv[0][iLeftXy][3]));
  ------------------
  |  |   67|  4.52M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  |  |  ------------------
  |  |  |  Branch (67:61): [True: 2.26M, False: 0]
  |  |  ------------------
  ------------------
  222|  2.26M|    iLeftRef = pCurDqLayer->pDec ? pCurDqLayer->pDec->pRefIndex[0][iLeftXy][3] : pCurDqLayer->pRefIndex[0][iLeftXy][3];
  ------------------
  |  Branch (222:16): [True: 2.26M, False: 0]
  ------------------
  223|  2.71M|  } else {
  224|  2.71M|    ST32 (iMvA, 0);
  ------------------
  |  |   67|  2.71M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  225|  2.71M|    if (0 == bLeftAvail) { //not available
  ------------------
  |  Branch (225:9): [True: 2.70M, False: 3.87k]
  ------------------
  226|  2.70M|      iLeftRef = REF_NOT_AVAIL;
  ------------------
  |  |   41|  2.70M|#define REF_NOT_AVAIL    -2
  ------------------
  227|  2.70M|    } else { //available but is intra mb type
  228|  3.87k|      iLeftRef = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  3.87k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  229|  3.87k|    }
  230|  2.71M|  }
  231|  4.97M|  if (REF_NOT_AVAIL == iLeftRef ||
  ------------------
  |  |   41|  4.97M|#define REF_NOT_AVAIL    -2
  ------------------
  |  Branch (231:7): [True: 2.70M, False: 2.26M]
  ------------------
  232|  4.93M|      (0 == iLeftRef && 0 == * (int32_t*)iMvA)) {
  ------------------
  |  Branch (232:8): [True: 2.25M, False: 11.7k]
  |  Branch (232:25): [True: 2.22M, False: 27.0k]
  ------------------
  233|  4.93M|    ST32 (iMvp, 0);
  ------------------
  |  |   67|  4.93M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  234|  4.93M|    return;
  235|  4.93M|  }
  236|       |
  237|       |  /*top*/
  238|  38.8k|  if (bTopAvail && IS_INTER (iTopType)) {
  ------------------
  |  |  306|  28.7k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|  28.7k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|  28.7k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|  28.7k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|  28.7k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|  28.7k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|  28.7k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|  28.7k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|  28.7k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 24.5k, False: 4.21k]
  |  |  ------------------
  ------------------
  |  Branch (238:7): [True: 28.7k, False: 10.0k]
  ------------------
  239|  24.5k|    ST32 (iMvB, LD32 (pCurDqLayer->pDec ? pCurDqLayer->pDec->pMv[0][iTopXy][12] : pCurDqLayer->pMv[0][iTopXy][12]));
  ------------------
  |  |   67|  49.1k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  |  |  ------------------
  |  |  |  Branch (67:61): [True: 24.5k, False: 0]
  |  |  ------------------
  ------------------
  240|  24.5k|    iTopRef = pCurDqLayer->pDec ? pCurDqLayer->pDec->pRefIndex[0][iTopXy][12] : pCurDqLayer->pRefIndex[0][iTopXy][12];
  ------------------
  |  Branch (240:15): [True: 24.5k, False: 0]
  ------------------
  241|  24.5k|  } else {
  242|  14.2k|    ST32 (iMvB, 0);
  ------------------
  |  |   67|  14.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  243|  14.2k|    if (0 == bTopAvail) { //not available
  ------------------
  |  Branch (243:9): [True: 10.0k, False: 4.21k]
  ------------------
  244|  10.0k|      iTopRef = REF_NOT_AVAIL;
  ------------------
  |  |   41|  10.0k|#define REF_NOT_AVAIL    -2
  ------------------
  245|  10.0k|    } else { //available but is intra mb type
  246|  4.21k|      iTopRef = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  4.21k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  247|  4.21k|    }
  248|  14.2k|  }
  249|  38.8k|  if (REF_NOT_AVAIL == iTopRef ||
  ------------------
  |  |   41|  38.8k|#define REF_NOT_AVAIL    -2
  ------------------
  |  Branch (249:7): [True: 10.0k, False: 28.7k]
  ------------------
  250|  28.7k|      (0 == iTopRef  && 0 == * (int32_t*)iMvB)) {
  ------------------
  |  Branch (250:8): [True: 23.3k, False: 5.40k]
  |  Branch (250:25): [True: 13.5k, False: 9.85k]
  ------------------
  251|  23.5k|    ST32 (iMvp, 0);
  ------------------
  |  |   67|  23.5k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  252|  23.5k|    return;
  253|  23.5k|  }
  254|       |
  255|       |  /*right_top*/
  256|  15.2k|  if (bRightTopAvail && IS_INTER (iRightTopType)) {
  ------------------
  |  |  306|  12.6k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|  12.6k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|  12.6k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|  12.6k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|  12.6k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|  12.6k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|  12.6k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|  12.6k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|  12.6k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 10.1k, False: 2.52k]
  |  |  ------------------
  ------------------
  |  Branch (256:7): [True: 12.6k, False: 2.59k]
  ------------------
  257|  10.1k|    ST32 (iMvC, LD32 (pCurDqLayer->pDec ? pCurDqLayer->pDec->pMv[0][iRightTopXy][12] :
  ------------------
  |  |   67|  20.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  |  |  ------------------
  |  |  |  Branch (67:61): [True: 10.1k, False: 0]
  |  |  ------------------
  ------------------
  258|  10.1k|                      pCurDqLayer->pMv[0][iRightTopXy][12]));
  259|  10.1k|    iRightTopRef = pCurDqLayer->pDec ? pCurDqLayer->pDec->pRefIndex[0][iRightTopXy][12] :
  ------------------
  |  Branch (259:20): [True: 10.1k, False: 0]
  ------------------
  260|  10.1k|                   pCurDqLayer->pRefIndex[0][iRightTopXy][12];
  261|  10.1k|  } else {
  262|  5.12k|    ST32 (iMvC, 0);
  ------------------
  |  |   67|  5.12k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  263|  5.12k|    if (0 == bRightTopAvail) { //not available
  ------------------
  |  Branch (263:9): [True: 2.59k, False: 2.52k]
  ------------------
  264|  2.59k|      iRightTopRef = REF_NOT_AVAIL;
  ------------------
  |  |   41|  2.59k|#define REF_NOT_AVAIL    -2
  ------------------
  265|  2.59k|    } else { //available but is intra mb type
  266|  2.52k|      iRightTopRef = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  2.52k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  267|  2.52k|    }
  268|  5.12k|  }
  269|       |
  270|       |  /*left_top*/
  271|  15.2k|  if (bLeftTopAvail && IS_INTER (iLeftTopType)) {
  ------------------
  |  |  306|  14.9k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|  14.9k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|  14.9k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|  14.9k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|  14.9k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|  14.9k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|  14.9k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|  14.9k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|  14.9k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 12.0k, False: 2.92k]
  |  |  ------------------
  ------------------
  |  Branch (271:7): [True: 14.9k, False: 261]
  ------------------
  272|  12.0k|    ST32 (iMvD, LD32 (pCurDqLayer->pDec ? pCurDqLayer->pDec->pMv[0][iLeftTopXy][15] : pCurDqLayer->pMv[0][iLeftTopXy][15]));
  ------------------
  |  |   67|  24.1k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  |  |  ------------------
  |  |  |  Branch (67:61): [True: 12.0k, False: 0]
  |  |  ------------------
  ------------------
  273|  12.0k|    iLeftTopRef = pCurDqLayer->pDec ? pCurDqLayer->pDec->pRefIndex[0][iLeftTopXy][15] :
  ------------------
  |  Branch (273:19): [True: 12.0k, False: 0]
  ------------------
  274|  12.0k|                  pCurDqLayer->pRefIndex[0][iLeftTopXy][15];
  275|  12.0k|  } else {
  276|  3.18k|    ST32 (iMvD, 0);
  ------------------
  |  |   67|  3.18k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  277|  3.18k|    if (0 == bLeftTopAvail) { //not available
  ------------------
  |  Branch (277:9): [True: 261, False: 2.92k]
  ------------------
  278|    261|      iLeftTopRef = REF_NOT_AVAIL;
  ------------------
  |  |   41|    261|#define REF_NOT_AVAIL    -2
  ------------------
  279|  2.92k|    } else { //available but is intra mb type
  280|  2.92k|      iLeftTopRef = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  2.92k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  281|  2.92k|    }
  282|  3.18k|  }
  283|       |
  284|  15.2k|  iDiagonalRef = iRightTopRef;
  285|  15.2k|  if (REF_NOT_AVAIL == iDiagonalRef) {
  ------------------
  |  |   41|  15.2k|#define REF_NOT_AVAIL    -2
  ------------------
  |  Branch (285:7): [True: 2.59k, False: 12.6k]
  ------------------
  286|  2.59k|    iDiagonalRef = iLeftTopRef;
  287|  2.59k|    * (int32_t*)iMvC = * (int32_t*)iMvD;
  288|  2.59k|  }
  289|       |
  290|  15.2k|  if (REF_NOT_AVAIL == iTopRef && REF_NOT_AVAIL == iDiagonalRef && iLeftRef >= REF_NOT_IN_LIST) {
  ------------------
  |  |   41|  15.2k|#define REF_NOT_AVAIL    -2
  ------------------
                if (REF_NOT_AVAIL == iTopRef && REF_NOT_AVAIL == iDiagonalRef && iLeftRef >= REF_NOT_IN_LIST) {
  ------------------
  |  |   41|      0|#define REF_NOT_AVAIL    -2
  ------------------
                if (REF_NOT_AVAIL == iTopRef && REF_NOT_AVAIL == iDiagonalRef && iLeftRef >= REF_NOT_IN_LIST) {
  ------------------
  |  |   42|      0|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (290:7): [True: 0, False: 15.2k]
  |  Branch (290:35): [True: 0, False: 0]
  |  Branch (290:68): [True: 0, False: 0]
  ------------------
  291|      0|    ST32 (iMvp, LD32 (iMvA));
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  292|      0|    return;
  293|      0|  }
  294|       |
  295|  15.2k|  iMatchRef = (0 == iLeftRef) + (0 == iTopRef) + (0 == iDiagonalRef);
  296|  15.2k|  if (1 == iMatchRef) {
  ------------------
  |  Branch (296:7): [True: 2.94k, False: 12.3k]
  ------------------
  297|  2.94k|    if (0 == iLeftRef) {
  ------------------
  |  Branch (297:9): [True: 1.16k, False: 1.77k]
  ------------------
  298|  1.16k|      ST32 (iMvp, LD32 (iMvA));
  ------------------
  |  |   67|  1.16k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  299|  1.77k|    } else if (0 == iTopRef) {
  ------------------
  |  Branch (299:16): [True: 305, False: 1.47k]
  ------------------
  300|    305|      ST32 (iMvp, LD32 (iMvB));
  ------------------
  |  |   67|    305|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  301|  1.47k|    } else {
  302|  1.47k|      ST32 (iMvp, LD32 (iMvC));
  ------------------
  |  |   67|  1.47k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  303|  1.47k|    }
  304|  12.3k|  } else {
  305|  12.3k|    iMvp[0] = WelsMedian (iMvA[0], iMvB[0], iMvC[0]);
  306|  12.3k|    iMvp[1] = WelsMedian (iMvA[1], iMvB[1], iMvC[1]);
  307|  12.3k|  }
  308|  15.2k|}
_ZN7WelsDec14GetColocatedMbEPNS_21TagWelsDecoderContextERjS2_:
  310|  9.55M|int32_t GetColocatedMb (PWelsDecoderContext pCtx, MbType& mbType, SubMbType& subMbType) {
  311|  9.55M|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
  312|  9.55M|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  313|       |
  314|  9.55M|  uint32_t is8x8 = IS_Inter_8x8 (GetMbType (pCurDqLayer)[iMbXy]);
  ------------------
  |  |  320|  9.55M|#define IS_Inter_8x8(type) ( ((type)&MB_TYPE_8x8) != 0)
  |  |  ------------------
  |  |  |  |  281|  9.55M|#define MB_TYPE_8x8         0x00000040
  |  |  ------------------
  ------------------
  315|  9.55M|  mbType = GetMbType (pCurDqLayer)[iMbXy];
  316|       |
  317|  9.55M|  PPicture colocPic = pCtx->sRefPic.pRefList[LIST_1][0];
  318|  9.55M|  if (GetThreadCount (pCtx) > 1) {
  ------------------
  |  Branch (318:7): [True: 0, False: 9.55M]
  ------------------
  319|      0|    if (16 * pCurDqLayer->iMbY > pCtx->lastReadyHeightOffset[1][0]) {
  ------------------
  |  Branch (319:9): [True: 0, False: 0]
  ------------------
  320|      0|      if (colocPic->pReadyEvent[pCurDqLayer->iMbY].isSignaled != 1) {
  ------------------
  |  Branch (320:11): [True: 0, False: 0]
  ------------------
  321|      0|        WAIT_EVENT (&colocPic->pReadyEvent[pCurDqLayer->iMbY], WELS_DEC_THREAD_WAIT_INFINITE);
  ------------------
  |  |  158|      0|  EventWait(ph, (int32_t)timeout)
  ------------------
  322|      0|      }
  323|      0|      pCtx->lastReadyHeightOffset[1][0] = 16 * pCurDqLayer->iMbY;
  324|      0|    }
  325|      0|  }
  326|       |
  327|  9.55M|  if (colocPic == NULL) {
  ------------------
  |  Branch (327:7): [True: 2.91k, False: 9.55M]
  ------------------
  328|  2.91k|    SLogContext* pLogCtx = & (pCtx->sLogCtx);
  329|  2.91k|    WelsLog (pLogCtx, WELS_LOG_ERROR, "Colocated Ref Picture for B-Slice is lost, B-Slice decoding cannot be continued!");
  330|  2.91k|    return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_DATA, ERR_INFO_REFERENCE_PIC_LOST);
  ------------------
  |  |   59|  2.91k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  331|  2.91k|  }
  332|       |
  333|  9.55M|  MbType coloc_mbType = colocPic->pMbType[iMbXy];
  334|  9.55M|  if (coloc_mbType == MB_TYPE_SKIP) {
  ------------------
  |  |  283|  9.55M|#define MB_TYPE_SKIP        0x00000100
  ------------------
  |  Branch (334:7): [True: 27.6k, False: 9.52M]
  ------------------
  335|       |    //This indicates the colocated MB is P SKIP MB
  336|  27.6k|    coloc_mbType |= MB_TYPE_16x16 | MB_TYPE_P0L0 | MB_TYPE_P1L0;
  ------------------
  |  |  278|  27.6k|#define MB_TYPE_16x16       0x00000008
  ------------------
                  coloc_mbType |= MB_TYPE_16x16 | MB_TYPE_P0L0 | MB_TYPE_P1L0;
  ------------------
  |  |  287|  27.6k|#define MB_TYPE_P0L0        0x00001000
  ------------------
                  coloc_mbType |= MB_TYPE_16x16 | MB_TYPE_P0L0 | MB_TYPE_P1L0;
  ------------------
  |  |  288|  27.6k|#define MB_TYPE_P1L0        0x00002000
  ------------------
  337|  27.6k|  }
  338|  9.55M|  if (IS_Inter_8x8 (coloc_mbType) && !pCtx->pSps->bDirect8x8InferenceFlag) {
  ------------------
  |  |  320|  19.1M|#define IS_Inter_8x8(type) ( ((type)&MB_TYPE_8x8) != 0)
  |  |  ------------------
  |  |  |  |  281|  9.55M|#define MB_TYPE_8x8         0x00000040
  |  |  ------------------
  |  |  |  Branch (320:28): [True: 103k, False: 9.44M]
  |  |  ------------------
  ------------------
  |  Branch (338:38): [True: 68.2k, False: 35.2k]
  ------------------
  339|  68.2k|    subMbType = SUB_MB_TYPE_4x4 | MB_TYPE_P0L0 | MB_TYPE_P0L1 | MB_TYPE_DIRECT;
  ------------------
  |  |  297|  68.2k|#define SUB_MB_TYPE_4x4     0x00000008
  ------------------
                  subMbType = SUB_MB_TYPE_4x4 | MB_TYPE_P0L0 | MB_TYPE_P0L1 | MB_TYPE_DIRECT;
  ------------------
  |  |  287|  68.2k|#define MB_TYPE_P0L0        0x00001000
  ------------------
                  subMbType = SUB_MB_TYPE_4x4 | MB_TYPE_P0L0 | MB_TYPE_P0L1 | MB_TYPE_DIRECT;
  ------------------
  |  |  289|  68.2k|#define MB_TYPE_P0L1        0x00004000
  ------------------
                  subMbType = SUB_MB_TYPE_4x4 | MB_TYPE_P0L0 | MB_TYPE_P0L1 | MB_TYPE_DIRECT;
  ------------------
  |  |  286|  68.2k|#define MB_TYPE_DIRECT      0x00000800
  ------------------
  340|  68.2k|    mbType |= MB_TYPE_8x8 | MB_TYPE_L0 | MB_TYPE_L1;
  ------------------
  |  |  281|  68.2k|#define MB_TYPE_8x8         0x00000040
  ------------------
                  mbType |= MB_TYPE_8x8 | MB_TYPE_L0 | MB_TYPE_L1;
  ------------------
  |  |  291|  68.2k|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  ------------------
  |  |  |  |  287|  68.2k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  ------------------
  |  |  |  |  288|  68.2k|#define MB_TYPE_P1L0        0x00002000
  |  |  ------------------
  ------------------
                  mbType |= MB_TYPE_8x8 | MB_TYPE_L0 | MB_TYPE_L1;
  ------------------
  |  |  292|  68.2k|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  ------------------
  |  |  |  |  289|  68.2k|#define MB_TYPE_P0L1        0x00004000
  |  |  ------------------
  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  ------------------
  |  |  |  |  290|  68.2k|#define MB_TYPE_P1L1        0x00008000
  |  |  ------------------
  ------------------
  341|  9.48M|  } else if (!is8x8 && (IS_INTER_16x16 (coloc_mbType) || IS_INTRA (coloc_mbType)/* || IS_SKIP(coloc_mbType)*/)) {
  ------------------
  |  |  307|  18.9M|#define IS_INTER_16x16(type) ( (type)&MB_TYPE_16x16 )
  |  |  ------------------
  |  |  |  |  278|  9.46M|#define MB_TYPE_16x16       0x00000008
  |  |  ------------------
  |  |  |  Branch (307:30): [True: 43.4k, False: 9.42M]
  |  |  ------------------
  ------------------
                } else if (!is8x8 && (IS_INTER_16x16 (coloc_mbType) || IS_INTRA (coloc_mbType)/* || IS_SKIP(coloc_mbType)*/)) {
  ------------------
  |  |  305|  9.42M|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  9.42M|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  9.42M|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  9.42M|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  9.42M|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  9.42M|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 4.27k, False: 9.42M]
  |  |  ------------------
  ------------------
  |  Branch (341:14): [True: 9.46M, False: 16.4k]
  ------------------
  342|  47.7k|    subMbType = SUB_MB_TYPE_8x8 | MB_TYPE_P0L0 | MB_TYPE_P0L1 | MB_TYPE_DIRECT;
  ------------------
  |  |  294|  47.7k|#define SUB_MB_TYPE_8x8     0x00000001
  ------------------
                  subMbType = SUB_MB_TYPE_8x8 | MB_TYPE_P0L0 | MB_TYPE_P0L1 | MB_TYPE_DIRECT;
  ------------------
  |  |  287|  47.7k|#define MB_TYPE_P0L0        0x00001000
  ------------------
                  subMbType = SUB_MB_TYPE_8x8 | MB_TYPE_P0L0 | MB_TYPE_P0L1 | MB_TYPE_DIRECT;
  ------------------
  |  |  289|  47.7k|#define MB_TYPE_P0L1        0x00004000
  ------------------
                  subMbType = SUB_MB_TYPE_8x8 | MB_TYPE_P0L0 | MB_TYPE_P0L1 | MB_TYPE_DIRECT;
  ------------------
  |  |  286|  47.7k|#define MB_TYPE_DIRECT      0x00000800
  ------------------
  343|  47.7k|    mbType |= MB_TYPE_16x16 | MB_TYPE_L0 | MB_TYPE_L1;
  ------------------
  |  |  278|  47.7k|#define MB_TYPE_16x16       0x00000008
  ------------------
                  mbType |= MB_TYPE_16x16 | MB_TYPE_L0 | MB_TYPE_L1;
  ------------------
  |  |  291|  47.7k|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  ------------------
  |  |  |  |  287|  47.7k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  ------------------
  |  |  |  |  288|  47.7k|#define MB_TYPE_P1L0        0x00002000
  |  |  ------------------
  ------------------
                  mbType |= MB_TYPE_16x16 | MB_TYPE_L0 | MB_TYPE_L1;
  ------------------
  |  |  292|  47.7k|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  ------------------
  |  |  |  |  289|  47.7k|#define MB_TYPE_P0L1        0x00004000
  |  |  ------------------
  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  ------------------
  |  |  |  |  290|  47.7k|#define MB_TYPE_P1L1        0x00008000
  |  |  ------------------
  ------------------
  344|  9.43M|  } else {
  345|  9.43M|    subMbType = SUB_MB_TYPE_8x8 | MB_TYPE_P0L0 | MB_TYPE_P0L1 | MB_TYPE_DIRECT;
  ------------------
  |  |  294|  9.43M|#define SUB_MB_TYPE_8x8     0x00000001
  ------------------
                  subMbType = SUB_MB_TYPE_8x8 | MB_TYPE_P0L0 | MB_TYPE_P0L1 | MB_TYPE_DIRECT;
  ------------------
  |  |  287|  9.43M|#define MB_TYPE_P0L0        0x00001000
  ------------------
                  subMbType = SUB_MB_TYPE_8x8 | MB_TYPE_P0L0 | MB_TYPE_P0L1 | MB_TYPE_DIRECT;
  ------------------
  |  |  289|  9.43M|#define MB_TYPE_P0L1        0x00004000
  ------------------
                  subMbType = SUB_MB_TYPE_8x8 | MB_TYPE_P0L0 | MB_TYPE_P0L1 | MB_TYPE_DIRECT;
  ------------------
  |  |  286|  9.43M|#define MB_TYPE_DIRECT      0x00000800
  ------------------
  346|  9.43M|    mbType |= MB_TYPE_8x8 | MB_TYPE_L0 | MB_TYPE_L1;
  ------------------
  |  |  281|  9.43M|#define MB_TYPE_8x8         0x00000040
  ------------------
                  mbType |= MB_TYPE_8x8 | MB_TYPE_L0 | MB_TYPE_L1;
  ------------------
  |  |  291|  9.43M|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  ------------------
  |  |  |  |  287|  9.43M|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  ------------------
  |  |  |  |  288|  9.43M|#define MB_TYPE_P1L0        0x00002000
  |  |  ------------------
  ------------------
                  mbType |= MB_TYPE_8x8 | MB_TYPE_L0 | MB_TYPE_L1;
  ------------------
  |  |  292|  9.43M|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  ------------------
  |  |  |  |  289|  9.43M|#define MB_TYPE_P0L1        0x00004000
  |  |  ------------------
  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  ------------------
  |  |  |  |  290|  9.43M|#define MB_TYPE_P1L1        0x00008000
  |  |  ------------------
  ------------------
  347|  9.43M|  }
  348|       |
  349|  9.55M|  if (IS_INTRA (coloc_mbType)) {
  ------------------
  |  |  305|  9.55M|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|  9.55M|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|  9.55M|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|  9.55M|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  9.55M|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  9.55M|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (305:24): [True: 4.52k, False: 9.54M]
  |  |  ------------------
  ------------------
  350|  4.52k|    SetRectBlock (pCurDqLayer->iColocIntra, 4, 4, 4 * sizeof (int8_t), 1, sizeof (int8_t));
  351|  4.52k|    return ERR_NONE;
  352|  4.52k|  }
  353|  9.54M|  SetRectBlock (pCurDqLayer->iColocIntra, 4, 4, 4 * sizeof (int8_t), 0, sizeof (int8_t));
  354|       |
  355|  9.54M|  if (IS_INTER_16x16 (mbType)) {
  ------------------
  |  |  307|  9.54M|#define IS_INTER_16x16(type) ( (type)&MB_TYPE_16x16 )
  |  |  ------------------
  |  |  |  |  278|  9.54M|#define MB_TYPE_16x16       0x00000008
  |  |  ------------------
  |  |  |  Branch (307:30): [True: 43.4k, False: 9.50M]
  |  |  ------------------
  ------------------
  356|  43.4k|    int16_t iMVZero[2] = { 0 };
  357|  43.4k|    int16_t* pMv = IS_TYPE_L1 (coloc_mbType) ? colocPic->pMv[LIST_1][iMbXy][0] : iMVZero;
  ------------------
  |  |  311|  43.4k|#define IS_TYPE_L1(type) ( (type)&MB_TYPE_L1 )
  |  |  ------------------
  |  |  |  |  292|  43.4k|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  289|  43.4k|#define MB_TYPE_P0L1        0x00004000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  290|  43.4k|#define MB_TYPE_P1L1        0x00008000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 9.06k, False: 34.4k]
  |  |  ------------------
  ------------------
  358|  43.4k|    ST32 (pCurDqLayer->iColocMv[LIST_0][0], LD32 (colocPic->pMv[LIST_0][iMbXy][0]));
  ------------------
  |  |   67|  43.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  359|  43.4k|    ST32 (pCurDqLayer->iColocMv[LIST_1][0], LD32 (pMv));
  ------------------
  |  |   67|  43.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  360|  43.4k|    pCurDqLayer->iColocRefIndex[LIST_0][0] = colocPic->pRefIndex[LIST_0][iMbXy][0];
  361|  43.4k|    pCurDqLayer->iColocRefIndex[LIST_1][0] = IS_TYPE_L1 (coloc_mbType) ? colocPic->pRefIndex[LIST_1][iMbXy][0] :
  ------------------
  |  |  311|  43.4k|#define IS_TYPE_L1(type) ( (type)&MB_TYPE_L1 )
  |  |  ------------------
  |  |  |  |  292|  43.4k|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  289|  43.4k|#define MB_TYPE_P0L1        0x00004000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  290|  43.4k|#define MB_TYPE_P1L1        0x00008000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 9.06k, False: 34.4k]
  |  |  ------------------
  ------------------
  362|  43.4k|        REF_NOT_IN_LIST;
  ------------------
  |  |   42|  77.8k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  363|  9.50M|  } else {
  364|  9.50M|    if (!pCtx->pSps->bDirect8x8InferenceFlag) {
  ------------------
  |  Branch (364:9): [True: 9.19M, False: 308k]
  ------------------
  365|  9.19M|      CopyRectBlock4Cols (pCurDqLayer->iColocMv[LIST_0], colocPic->pMv[LIST_0][iMbXy], 16, 16, 4, 4);
  366|  9.19M|      CopyRectBlock4Cols (pCurDqLayer->iColocRefIndex[LIST_0], colocPic->pRefIndex[LIST_0][iMbXy], 4, 4, 4, 1);
  367|  9.19M|      if (IS_TYPE_L1 (coloc_mbType)) {
  ------------------
  |  |  311|  9.19M|#define IS_TYPE_L1(type) ( (type)&MB_TYPE_L1 )
  |  |  ------------------
  |  |  |  |  292|  9.19M|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  289|  9.19M|#define MB_TYPE_P0L1        0x00004000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  290|  9.19M|#define MB_TYPE_P1L1        0x00008000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 50.9k, False: 9.14M]
  |  |  ------------------
  ------------------
  368|  50.9k|        CopyRectBlock4Cols (pCurDqLayer->iColocMv[LIST_1], colocPic->pMv[LIST_1][iMbXy], 16, 16, 4, 4);
  369|  50.9k|        CopyRectBlock4Cols (pCurDqLayer->iColocRefIndex[LIST_1], colocPic->pRefIndex[LIST_1][iMbXy], 4, 4, 4, 1);
  370|  9.14M|      } else { // only forward prediction
  371|  9.14M|        SetRectBlock (pCurDqLayer->iColocRefIndex[LIST_1], 4, 4, 4, (uint8_t)REF_NOT_IN_LIST, 1);
  ------------------
  |  |   42|  9.14M|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  372|  9.14M|      }
  373|  9.19M|    } else {
  374|   651k|      for (int32_t listIdx = 0; listIdx < 1 + !! (coloc_mbType & MB_TYPE_L1); listIdx++) {
  ------------------
  |  |  292|   651k|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  ------------------
  |  |  |  |  289|   651k|#define MB_TYPE_P0L1        0x00004000
  |  |  ------------------
  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  ------------------
  |  |  |  |  290|   651k|#define MB_TYPE_P1L1        0x00008000
  |  |  ------------------
  ------------------
  |  Branch (374:33): [True: 343k, False: 308k]
  ------------------
  375|   343k|        SetRectBlock (pCurDqLayer->iColocMv[listIdx][0], 2, 2, 16, LD32 (colocPic->pMv[listIdx][iMbXy][0]), 4);
  ------------------
  |  |   52|   343k|#define LD32(a) (((struct tagUnaligned_32 *) (a))->l)
  ------------------
  376|   343k|        SetRectBlock (pCurDqLayer->iColocMv[listIdx][2], 2, 2, 16, LD32 (colocPic->pMv[listIdx][iMbXy][3]), 4);
  ------------------
  |  |   52|   343k|#define LD32(a) (((struct tagUnaligned_32 *) (a))->l)
  ------------------
  377|   343k|        SetRectBlock (pCurDqLayer->iColocMv[listIdx][8], 2, 2, 16, LD32 (colocPic->pMv[listIdx][iMbXy][12]), 4);
  ------------------
  |  |   52|   343k|#define LD32(a) (((struct tagUnaligned_32 *) (a))->l)
  ------------------
  378|   343k|        SetRectBlock (pCurDqLayer->iColocMv[listIdx][10], 2, 2, 16, LD32 (colocPic->pMv[listIdx][iMbXy][15]), 4);
  ------------------
  |  |   52|   343k|#define LD32(a) (((struct tagUnaligned_32 *) (a))->l)
  ------------------
  379|       |
  380|   343k|        SetRectBlock (&pCurDqLayer->iColocRefIndex[listIdx][0], 2, 2, 4, colocPic->pRefIndex[listIdx][iMbXy][0], 1);
  381|   343k|        SetRectBlock (&pCurDqLayer->iColocRefIndex[listIdx][2], 2, 2, 4, colocPic->pRefIndex[listIdx][iMbXy][3], 1);
  382|   343k|        SetRectBlock (&pCurDqLayer->iColocRefIndex[listIdx][8], 2, 2, 4, colocPic->pRefIndex[listIdx][iMbXy][12], 1);
  383|   343k|        SetRectBlock (&pCurDqLayer->iColocRefIndex[listIdx][10], 2, 2, 4, colocPic->pRefIndex[listIdx][iMbXy][15], 1);
  384|   343k|      }
  385|   308k|      if (! (coloc_mbType & MB_TYPE_L1)) // only forward prediction
  ------------------
  |  |  292|   308k|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  ------------------
  |  |  |  |  289|   308k|#define MB_TYPE_P0L1        0x00004000
  |  |  ------------------
  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  ------------------
  |  |  |  |  290|   308k|#define MB_TYPE_P1L1        0x00008000
  |  |  ------------------
  ------------------
  |  Branch (385:11): [True: 274k, False: 34.6k]
  ------------------
  386|   274k|        SetRectBlock (&pCurDqLayer->iColocRefIndex[1][0], 4, 4, 4, (uint8_t)REF_NOT_IN_LIST, 1);
  ------------------
  |  |   42|   274k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  387|   308k|    }
  388|  9.50M|  }
  389|  9.54M|  return ERR_NONE;
  390|  9.55M|}
_ZN7WelsDec20PredMvBDirectSpatialEPNS_21TagWelsDecoderContextEPA2_sPaRj:
  393|   343k|                              SubMbType& subMbType) {
  394|       |
  395|   343k|  int32_t ret = ERR_NONE;
  396|   343k|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
  397|   343k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  398|   343k|  bool bSkipOrDirect = (IS_SKIP (GetMbType (pCurDqLayer)[iMbXy]) || IS_DIRECT (GetMbType (pCurDqLayer)[iMbXy]));
  ------------------
  |  |  315|   686k|#define IS_SKIP(type) ( ((type)&MB_TYPE_SKIP) != 0 )
  |  |  ------------------
  |  |  |  |  283|   343k|#define MB_TYPE_SKIP        0x00000100
  |  |  ------------------
  |  |  |  Branch (315:23): [True: 279k, False: 63.9k]
  |  |  ------------------
  ------------------
                bool bSkipOrDirect = (IS_SKIP (GetMbType (pCurDqLayer)[iMbXy]) || IS_DIRECT (GetMbType (pCurDqLayer)[iMbXy]));
  ------------------
  |  |  316|  63.9k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|  63.9k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  |  |  |  Branch (316:25): [True: 54.5k, False: 9.39k]
  |  |  ------------------
  ------------------
  399|       |
  400|   343k|  MbType mbType;
  401|   343k|  ret = GetColocatedMb (pCtx, mbType, subMbType);
  402|   343k|  if (ret != ERR_NONE) {
  ------------------
  |  Branch (402:7): [True: 1.33k, False: 341k]
  ------------------
  403|  1.33k|    return ret;
  404|  1.33k|  }
  405|       |
  406|   341k|  bool bTopAvail, bLeftTopAvail, bRightTopAvail, bLeftAvail;
  407|   341k|  int32_t iLeftTopType, iRightTopType, iTopType, iLeftType;
  408|   341k|  int32_t iCurSliceIdc, iTopSliceIdc, iLeftTopSliceIdc, iRightTopSliceIdc, iLeftSliceIdc;
  409|   341k|  int32_t iCurX, iCurY, iCurXy, iLeftXy = 0, iTopXy = 0, iLeftTopXy = 0, iRightTopXy = 0;
  410|       |
  411|   341k|  int8_t iLeftRef[LIST_A];
  412|   341k|  int8_t iTopRef[LIST_A];
  413|   341k|  int8_t iRightTopRef[LIST_A];
  414|   341k|  int8_t iLeftTopRef[LIST_A];
  415|   341k|  int8_t iDiagonalRef[LIST_A];
  416|   341k|  int16_t iMvA[LIST_A][2], iMvB[LIST_A][2], iMvC[LIST_A][2], iMvD[LIST_A][2];
  417|       |
  418|   341k|  iCurXy = pCurDqLayer->iMbXyIndex;
  419|       |
  420|   341k|  iCurX = pCurDqLayer->iMbX;
  421|   341k|  iCurY = pCurDqLayer->iMbY;
  422|   341k|  iCurSliceIdc = pCurDqLayer->pSliceIdc[iCurXy];
  423|       |
  424|   341k|  if (iCurX != 0) {
  ------------------
  |  Branch (424:7): [True: 284k, False: 56.7k]
  ------------------
  425|   284k|    iLeftXy = iCurXy - 1;
  426|   284k|    iLeftSliceIdc = pCurDqLayer->pSliceIdc[iLeftXy];
  427|   284k|    bLeftAvail = (iLeftSliceIdc == iCurSliceIdc);
  428|   284k|  } else {
  429|  56.7k|    bLeftAvail = 0;
  430|  56.7k|    bLeftTopAvail = 0;
  431|  56.7k|  }
  432|       |
  433|   341k|  if (iCurY != 0) {
  ------------------
  |  Branch (433:7): [True: 244k, False: 97.4k]
  ------------------
  434|   244k|    iTopXy = iCurXy - pCurDqLayer->iMbWidth;
  435|   244k|    iTopSliceIdc = pCurDqLayer->pSliceIdc[iTopXy];
  436|   244k|    bTopAvail = (iTopSliceIdc == iCurSliceIdc);
  437|   244k|    if (iCurX != 0) {
  ------------------
  |  Branch (437:9): [True: 205k, False: 38.8k]
  ------------------
  438|   205k|      iLeftTopXy = iTopXy - 1;
  439|   205k|      iLeftTopSliceIdc = pCurDqLayer->pSliceIdc[iLeftTopXy];
  440|   205k|      bLeftTopAvail = (iLeftTopSliceIdc == iCurSliceIdc);
  441|   205k|    } else {
  442|  38.8k|      bLeftTopAvail = 0;
  443|  38.8k|    }
  444|   244k|    if (iCurX != (pCurDqLayer->iMbWidth - 1)) {
  ------------------
  |  Branch (444:9): [True: 208k, False: 35.7k]
  ------------------
  445|   208k|      iRightTopXy = iTopXy + 1;
  446|   208k|      iRightTopSliceIdc = pCurDqLayer->pSliceIdc[iRightTopXy];
  447|   208k|      bRightTopAvail = (iRightTopSliceIdc == iCurSliceIdc);
  448|   208k|    } else {
  449|  35.7k|      bRightTopAvail = 0;
  450|  35.7k|    }
  451|   244k|  } else {
  452|  97.4k|    bTopAvail = 0;
  453|  97.4k|    bLeftTopAvail = 0;
  454|  97.4k|    bRightTopAvail = 0;
  455|  97.4k|  }
  456|       |
  457|   341k|  iLeftType = ((iCurX != 0 && bLeftAvail) ? GetMbType (pCurDqLayer)[iLeftXy] : 0);
  ------------------
  |  Branch (457:17): [True: 284k, False: 56.7k]
  |  Branch (457:31): [True: 202k, False: 82.5k]
  ------------------
  458|   341k|  iTopType = ((iCurY != 0 && bTopAvail) ? GetMbType (pCurDqLayer)[iTopXy] : 0);
  ------------------
  |  Branch (458:16): [True: 244k, False: 97.4k]
  |  Branch (458:30): [True: 158k, False: 86.0k]
  ------------------
  459|   341k|  iLeftTopType = ((iCurX != 0 && iCurY != 0 && bLeftTopAvail)
  ------------------
  |  Branch (459:20): [True: 284k, False: 56.7k]
  |  Branch (459:34): [True: 205k, False: 79.5k]
  |  Branch (459:48): [True: 124k, False: 80.5k]
  ------------------
  460|   341k|                  ? GetMbType (pCurDqLayer)[iLeftTopXy] : 0);
  461|   341k|  iRightTopType = ((iCurX != pCurDqLayer->iMbWidth - 1 && iCurY != 0 && bRightTopAvail)
  ------------------
  |  Branch (461:21): [True: 292k, False: 49.3k]
  |  Branch (461:59): [True: 208k, False: 83.8k]
  |  Branch (461:73): [True: 128k, False: 80.4k]
  ------------------
  462|   341k|                   ? GetMbType (pCurDqLayer)[iRightTopXy] : 0);
  463|       |
  464|       |  /*get neb mv&iRefIdxArray*/
  465|  1.02M|  for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (465:34): [True: 683k, False: 341k]
  ------------------
  466|       |
  467|       |    /*left*/
  468|   683k|    if (bLeftAvail && IS_INTER (iLeftType)) {
  ------------------
  |  |  306|   404k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|   404k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|   404k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|   404k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|   404k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|   404k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|   404k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|   404k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|   404k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 401k, False: 3.30k]
  |  |  ------------------
  ------------------
  |  Branch (468:9): [True: 404k, False: 278k]
  ------------------
  469|   401k|      ST32 (iMvA[listIdx], LD32 (pCurDqLayer->pDec ? pCurDqLayer->pDec->pMv[listIdx][iLeftXy][3] :
  ------------------
  |  |   67|   803k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  |  |  ------------------
  |  |  |  Branch (67:61): [True: 401k, False: 0]
  |  |  ------------------
  ------------------
  470|   401k|                                 pCurDqLayer->pMv[listIdx][iLeftXy][3]));
  471|   401k|      iLeftRef[listIdx] = pCurDqLayer->pDec ? pCurDqLayer->pDec->pRefIndex[listIdx][iLeftXy][3] :
  ------------------
  |  Branch (471:27): [True: 401k, False: 0]
  ------------------
  472|   401k|                          pCurDqLayer->pRefIndex[listIdx][iLeftXy][3];
  473|   401k|    } else {
  474|   281k|      ST32 (iMvA[listIdx], 0);
  ------------------
  |  |   67|   281k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  475|   281k|      if (0 == bLeftAvail) { //not available
  ------------------
  |  Branch (475:11): [True: 278k, False: 3.30k]
  ------------------
  476|   278k|        iLeftRef[listIdx] = REF_NOT_AVAIL;
  ------------------
  |  |   41|   278k|#define REF_NOT_AVAIL    -2
  ------------------
  477|   278k|      } else { //available but is intra mb type
  478|  3.30k|        iLeftRef[listIdx] = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  3.30k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  479|  3.30k|      }
  480|   281k|    }
  481|       |
  482|       |    /*top*/
  483|   683k|    if (bTopAvail && IS_INTER (iTopType)) {
  ------------------
  |  |  306|   316k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|   316k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|   316k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|   316k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|   316k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|   316k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|   316k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|   316k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|   316k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 314k, False: 2.22k]
  |  |  ------------------
  ------------------
  |  Branch (483:9): [True: 316k, False: 367k]
  ------------------
  484|   314k|      ST32 (iMvB[listIdx], LD32 (pCurDqLayer->pDec ? pCurDqLayer->pDec->pMv[listIdx][iTopXy][12] :
  ------------------
  |  |   67|   628k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  |  |  ------------------
  |  |  |  Branch (67:61): [True: 314k, False: 0]
  |  |  ------------------
  ------------------
  485|   314k|                                 pCurDqLayer->pMv[listIdx][iTopXy][12]));
  486|   314k|      iTopRef[listIdx] = pCurDqLayer->pDec ? pCurDqLayer->pDec->pRefIndex[listIdx][iTopXy][12] :
  ------------------
  |  Branch (486:26): [True: 314k, False: 0]
  ------------------
  487|   314k|                         pCurDqLayer->pRefIndex[listIdx][iTopXy][12];
  488|   369k|    } else {
  489|   369k|      ST32 (iMvB[listIdx], 0);
  ------------------
  |  |   67|   369k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  490|   369k|      if (0 == bTopAvail) { //not available
  ------------------
  |  Branch (490:11): [True: 367k, False: 2.22k]
  ------------------
  491|   367k|        iTopRef[listIdx] = REF_NOT_AVAIL;
  ------------------
  |  |   41|   367k|#define REF_NOT_AVAIL    -2
  ------------------
  492|   367k|      } else { //available but is intra mb type
  493|  2.22k|        iTopRef[listIdx] = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  2.22k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  494|  2.22k|      }
  495|   369k|    }
  496|       |
  497|       |    /*right_top*/
  498|   683k|    if (bRightTopAvail && IS_INTER (iRightTopType)) {
  ------------------
  |  |  306|   256k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|   256k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|   256k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|   256k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|   256k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|   256k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|   256k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|   256k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|   256k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 253k, False: 2.41k]
  |  |  ------------------
  ------------------
  |  Branch (498:9): [True: 256k, False: 427k]
  ------------------
  499|   253k|      ST32 (iMvC[listIdx], LD32 (pCurDqLayer->pDec ? pCurDqLayer->pDec->pMv[listIdx][iRightTopXy][12] :
  ------------------
  |  |   67|   507k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  |  |  ------------------
  |  |  |  Branch (67:61): [True: 253k, False: 0]
  |  |  ------------------
  ------------------
  500|   253k|                                 pCurDqLayer->pMv[listIdx][iRightTopXy][12]));
  501|   253k|      iRightTopRef[listIdx] = pCurDqLayer->pDec ? pCurDqLayer->pDec->pRefIndex[listIdx][iRightTopXy][12] :
  ------------------
  |  Branch (501:31): [True: 253k, False: 0]
  ------------------
  502|   253k|                              pCurDqLayer->pRefIndex[listIdx][iRightTopXy][12];
  503|   429k|    } else {
  504|   429k|      ST32 (iMvC[listIdx], 0);
  ------------------
  |  |   67|   429k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  505|   429k|      if (0 == bRightTopAvail) { //not available
  ------------------
  |  Branch (505:11): [True: 427k, False: 2.41k]
  ------------------
  506|   427k|        iRightTopRef[listIdx] = REF_NOT_AVAIL;
  ------------------
  |  |   41|   427k|#define REF_NOT_AVAIL    -2
  ------------------
  507|   427k|      } else { //available but is intra mb type
  508|  2.41k|        iRightTopRef[listIdx] = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  2.41k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  509|  2.41k|      }
  510|   429k|    }
  511|       |    /*left_top*/
  512|   683k|    if (bLeftTopAvail && IS_INTER (iLeftTopType)) {
  ------------------
  |  |  306|   249k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|   249k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|   249k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|   249k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|   249k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|   249k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|   249k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|   249k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|   249k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 247k, False: 2.55k]
  |  |  ------------------
  ------------------
  |  Branch (512:9): [True: 249k, False: 433k]
  ------------------
  513|   247k|      ST32 (iMvD[listIdx], LD32 (pCurDqLayer->pDec ? pCurDqLayer->pDec->pMv[listIdx][iLeftTopXy][15] :
  ------------------
  |  |   67|   494k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  |  |  ------------------
  |  |  |  Branch (67:61): [True: 247k, False: 0]
  |  |  ------------------
  ------------------
  514|   247k|                                 pCurDqLayer->pMv[listIdx][iLeftTopXy][15]));
  515|   247k|      iLeftTopRef[listIdx] = pCurDqLayer->pDec ? pCurDqLayer->pDec->pRefIndex[listIdx][iLeftTopXy][15] :
  ------------------
  |  Branch (515:30): [True: 247k, False: 0]
  ------------------
  516|   247k|                             pCurDqLayer->pRefIndex[listIdx][iLeftTopXy][15];
  517|   436k|    } else {
  518|   436k|      ST32 (iMvD[listIdx], 0);
  ------------------
  |  |   67|   436k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  519|   436k|      if (0 == bLeftTopAvail) { //not available
  ------------------
  |  Branch (519:11): [True: 433k, False: 2.55k]
  ------------------
  520|   433k|        iLeftTopRef[listIdx] = REF_NOT_AVAIL;
  ------------------
  |  |   41|   433k|#define REF_NOT_AVAIL    -2
  ------------------
  521|   433k|      } else { //available but is intra mb type
  522|  2.55k|        iLeftTopRef[listIdx] = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  2.55k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  523|  2.55k|      }
  524|   436k|    }
  525|       |
  526|   683k|    iDiagonalRef[listIdx] = iRightTopRef[listIdx];
  527|   683k|    if (REF_NOT_AVAIL == iDiagonalRef[listIdx]) {
  ------------------
  |  |   41|   683k|#define REF_NOT_AVAIL    -2
  ------------------
  |  Branch (527:9): [True: 427k, False: 256k]
  ------------------
  528|   427k|      iDiagonalRef[listIdx] = iLeftTopRef[listIdx];
  529|   427k|      ST32 (iMvC[listIdx], LD32 (iMvD[listIdx]));
  ------------------
  |  |   67|   427k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  530|   427k|    }
  531|       |
  532|   683k|    int8_t ref_temp = WELS_MIN_POSITIVE (iTopRef[listIdx], iDiagonalRef[listIdx]);
  ------------------
  |  |   98|   683k|#define WELS_MIN_POSITIVE(x, y) (x >= 0 && y >= 0) ? WELS_MIN(x, y) : WELS_MAX(x, y);
  |  |  ------------------
  |  |  |  |   95|   246k|#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:25): [True: 269, False: 245k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define WELS_MIN_POSITIVE(x, y) (x >= 0 && y >= 0) ? WELS_MIN(x, y) : WELS_MAX(x, y);
  |  |  ------------------
  |  |  |  |   91|  1.12M|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (91:25): [True: 39.5k, False: 397k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (98:34): [True: 282k, False: 400k]
  |  |  |  Branch (98:44): [True: 246k, False: 36.6k]
  |  |  ------------------
  ------------------
  533|   683k|    ref[listIdx] = WELS_MIN_POSITIVE (iLeftRef[listIdx], ref_temp);
  ------------------
  |  |   98|   683k|#define WELS_MIN_POSITIVE(x, y) (x >= 0 && y >= 0) ? WELS_MIN(x, y) : WELS_MAX(x, y);
  |  |  ------------------
  |  |  |  |   95|   218k|#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:25): [True: 1.05k, False: 216k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define WELS_MIN_POSITIVE(x, y) (x >= 0 && y >= 0) ? WELS_MIN(x, y) : WELS_MAX(x, y);
  |  |  ------------------
  |  |  |  |   91|  1.14M|#define WELS_MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (91:25): [True: 166k, False: 299k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (98:34): [True: 331k, False: 352k]
  |  |  |  Branch (98:44): [True: 218k, False: 113k]
  |  |  ------------------
  ------------------
  534|   683k|    if (ref[listIdx] >= 0) {
  ------------------
  |  Branch (534:9): [True: 406k, False: 276k]
  ------------------
  535|       |
  536|   406k|      uint32_t match_count = (iLeftRef[listIdx] == ref[listIdx]) + (iTopRef[listIdx] == ref[listIdx]) +
  537|   406k|                             (iDiagonalRef[listIdx] == ref[listIdx]);
  538|   406k|      if (match_count == 1) {
  ------------------
  |  Branch (538:11): [True: 152k, False: 254k]
  ------------------
  539|   152k|        if (iLeftRef[listIdx] == ref[listIdx]) {
  ------------------
  |  Branch (539:13): [True: 114k, False: 38.3k]
  ------------------
  540|   114k|          ST32 (iMvp[listIdx], LD32 (iMvA[listIdx]));
  ------------------
  |  |   67|   114k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  541|   114k|        } else if (iTopRef[listIdx] == ref[listIdx]) {
  ------------------
  |  Branch (541:20): [True: 31.5k, False: 6.81k]
  ------------------
  542|  31.5k|          ST32 (iMvp[listIdx], LD32 (iMvB[listIdx]));
  ------------------
  |  |   67|  31.5k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  543|  31.5k|        } else {
  544|  6.81k|          ST32 (iMvp[listIdx], LD32 (iMvC[listIdx]));
  ------------------
  |  |   67|  6.81k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  545|  6.81k|        }
  546|   254k|      } else {
  547|   254k|        iMvp[listIdx][0] = WelsMedian (iMvA[listIdx][0], iMvB[listIdx][0], iMvC[listIdx][0]);
  548|   254k|        iMvp[listIdx][1] = WelsMedian (iMvA[listIdx][1], iMvB[listIdx][1], iMvC[listIdx][1]);
  549|   254k|      }
  550|   406k|    } else {
  551|   276k|      iMvp[listIdx][0] = 0;
  552|   276k|      iMvp[listIdx][1] = 0;
  553|   276k|      ref[listIdx] = REF_NOT_IN_LIST;
  ------------------
  |  |   42|   276k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  554|   276k|    }
  555|   683k|  }
  556|   341k|  if (ref[LIST_0] <= REF_NOT_IN_LIST && ref[LIST_1] <= REF_NOT_IN_LIST) {
  ------------------
  |  |   42|   683k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
                if (ref[LIST_0] <= REF_NOT_IN_LIST && ref[LIST_1] <= REF_NOT_IN_LIST) {
  ------------------
  |  |   42|   142k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (556:7): [True: 142k, False: 199k]
  |  Branch (556:41): [True: 103k, False: 39.4k]
  ------------------
  557|   103k|    ref[LIST_0] = ref[LIST_1] = 0;
  558|   238k|  } else if (ref[LIST_1] < 0) {
  ------------------
  |  Branch (558:14): [True: 31.0k, False: 207k]
  ------------------
  559|  31.0k|    mbType &= ~MB_TYPE_L1;
  ------------------
  |  |  292|  31.0k|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  ------------------
  |  |  |  |  289|  31.0k|#define MB_TYPE_P0L1        0x00004000
  |  |  ------------------
  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  ------------------
  |  |  |  |  290|  31.0k|#define MB_TYPE_P1L1        0x00008000
  |  |  ------------------
  ------------------
  560|  31.0k|    subMbType &= ~MB_TYPE_L1;
  ------------------
  |  |  292|  31.0k|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  ------------------
  |  |  |  |  289|  31.0k|#define MB_TYPE_P0L1        0x00004000
  |  |  ------------------
  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  ------------------
  |  |  |  |  290|  31.0k|#define MB_TYPE_P1L1        0x00008000
  |  |  ------------------
  ------------------
  561|   207k|  } else if (ref[LIST_0] < 0) {
  ------------------
  |  Branch (561:14): [True: 39.4k, False: 168k]
  ------------------
  562|  39.4k|    mbType &= ~MB_TYPE_L0;
  ------------------
  |  |  291|  39.4k|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  ------------------
  |  |  |  |  287|  39.4k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  ------------------
  |  |  |  |  288|  39.4k|#define MB_TYPE_P1L0        0x00002000
  |  |  ------------------
  ------------------
  563|  39.4k|    subMbType &= ~MB_TYPE_L0;
  ------------------
  |  |  291|  39.4k|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  ------------------
  |  |  |  |  287|  39.4k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  ------------------
  |  |  |  |  288|  39.4k|#define MB_TYPE_P1L0        0x00002000
  |  |  ------------------
  ------------------
  564|  39.4k|  }
  565|   341k|  GetMbType (pCurDqLayer)[iMbXy] = mbType;
  566|       |
  567|   341k|  int16_t pMvd[4] = { 0 };
  568|       |
  569|   341k|  bool bIsLongRef = pCtx->sRefPic.pRefList[LIST_1][0]->bIsLongRef;
  570|       |
  571|   341k|  if (IS_INTER_16x16 (mbType)) {
  ------------------
  |  |  307|   341k|#define IS_INTER_16x16(type) ( (type)&MB_TYPE_16x16 )
  |  |  ------------------
  |  |  |  |  278|   341k|#define MB_TYPE_16x16       0x00000008
  |  |  ------------------
  |  |  |  Branch (307:30): [True: 19.4k, False: 322k]
  |  |  ------------------
  ------------------
  572|  19.4k|    if ((* (int32_t*)iMvp[LIST_0] | * (int32_t*)iMvp[LIST_1])) {
  ------------------
  |  Branch (572:9): [True: 8.85k, False: 10.6k]
  ------------------
  573|  8.85k|      if (0 == pCurDqLayer->iColocIntra[0] && !bIsLongRef
  ------------------
  |  Branch (573:11): [True: 8.44k, False: 403]
  |  Branch (573:47): [True: 6.26k, False: 2.18k]
  ------------------
  574|  6.26k|          && ((pCurDqLayer->iColocRefIndex[LIST_0][0] == 0 && (unsigned) (pCurDqLayer->iColocMv[LIST_0][0][0] + 1) <= 2
  ------------------
  |  Branch (574:16): [True: 4.08k, False: 2.18k]
  |  Branch (574:63): [True: 3.52k, False: 555]
  ------------------
  575|  3.52k|               && (unsigned) (pCurDqLayer->iColocMv[LIST_0][0][1] + 1) <= 2)
  ------------------
  |  Branch (575:19): [True: 2.96k, False: 568]
  ------------------
  576|  3.30k|              || (pCurDqLayer->iColocRefIndex[LIST_0][0] < 0 && pCurDqLayer->iColocRefIndex[LIST_1][0] == 0
  ------------------
  |  Branch (576:19): [True: 2.18k, False: 1.12k]
  |  Branch (576:65): [True: 1.17k, False: 1.01k]
  ------------------
  577|  1.17k|                  && (unsigned) (pCurDqLayer->iColocMv[LIST_1][0][0] + 1) <= 2
  ------------------
  |  Branch (577:22): [True: 681, False: 489]
  ------------------
  578|  3.35k|                  && (unsigned) (pCurDqLayer->iColocMv[LIST_1][0][1] + 1) <= 2))) {
  ------------------
  |  Branch (578:22): [True: 395, False: 286]
  ------------------
  579|  3.35k|        if (0 >= ref[0])  * (uint32_t*)iMvp[LIST_0] = 0;
  ------------------
  |  Branch (579:13): [True: 2.78k, False: 573]
  ------------------
  580|  3.35k|        if (0 >= ref[1])  * (uint32_t*)iMvp[LIST_1] = 0;
  ------------------
  |  Branch (580:13): [True: 700, False: 2.65k]
  ------------------
  581|  3.35k|      }
  582|  8.85k|    }
  583|  19.4k|    UpdateP16x16DirectCabac (pCurDqLayer);
  584|  58.4k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (584:36): [True: 38.9k, False: 19.4k]
  ------------------
  585|  38.9k|      UpdateP16x16MotionInfo (pCurDqLayer, listIdx, ref[listIdx], iMvp[listIdx]);
  586|  38.9k|      UpdateP16x16MvdCabac (pCurDqLayer, pMvd, listIdx);
  587|  38.9k|    }
  588|   322k|  } else {
  589|   322k|    if (bSkipOrDirect) {
  ------------------
  |  Branch (589:9): [True: 312k, False: 9.39k]
  ------------------
  590|   312k|      int8_t pSubPartCount[4], pPartW[4];
  591|  1.56M|      for (int32_t i = 0; i < 4; i++) { //Direct 8x8 Ref and mv
  ------------------
  |  Branch (591:27): [True: 1.25M, False: 312k]
  ------------------
  592|  1.25M|        int16_t iIdx8 = i << 2;
  593|  1.25M|        pCurDqLayer->pSubMbType[iMbXy][i] = subMbType;
  594|  1.25M|        int8_t pRefIndex[LIST_A][30];
  595|  1.25M|        UpdateP8x8RefIdxCabac (pCurDqLayer, pRefIndex, iIdx8, ref[LIST_0], LIST_0);
  596|  1.25M|        UpdateP8x8RefIdxCabac (pCurDqLayer, pRefIndex, iIdx8, ref[LIST_1], LIST_1);
  597|  1.25M|        UpdateP8x8DirectCabac (pCurDqLayer, iIdx8);
  598|       |
  599|  1.25M|        pSubPartCount[i] = g_ksInterBSubMbTypeInfo[0].iPartCount;
  600|  1.25M|        pPartW[i] = g_ksInterBSubMbTypeInfo[0].iPartWidth;
  601|       |
  602|  1.25M|        if (IS_SUB_4x4 (subMbType)) {
  ------------------
  |  |  324|  1.25M|#define IS_SUB_4x4(sub_type) (((sub_type)&SUB_MB_TYPE_4x4) != 0)
  |  |  ------------------
  |  |  |  |  297|  1.25M|#define SUB_MB_TYPE_4x4     0x00000008
  |  |  ------------------
  |  |  |  Branch (324:30): [True: 57.6k, False: 1.19M]
  |  |  ------------------
  ------------------
  603|  57.6k|          pSubPartCount[i] = 4;
  604|  57.6k|          pPartW[i] = 1;
  605|  57.6k|        }
  606|  1.25M|        FillSpatialDirect8x8Mv (pCurDqLayer, iIdx8, pSubPartCount[i], pPartW[i], subMbType, bIsLongRef, iMvp, ref, NULL, NULL);
  607|  1.25M|      }
  608|   312k|    }
  609|   322k|  }
  610|   341k|  return ret;
  611|   343k|}
_ZN7WelsDec19PredBDirectTemporalEPNS_21TagWelsDecoderContextEPA2_sPaRj:
  614|  9.21M|                             SubMbType& subMbType) {
  615|  9.21M|  int32_t ret = ERR_NONE;
  616|  9.21M|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
  617|  9.21M|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  618|  9.21M|  bool bSkipOrDirect = (IS_SKIP (GetMbType (pCurDqLayer)[iMbXy]) || IS_DIRECT (GetMbType (pCurDqLayer)[iMbXy]));
  ------------------
  |  |  315|  18.4M|#define IS_SKIP(type) ( ((type)&MB_TYPE_SKIP) != 0 )
  |  |  ------------------
  |  |  |  |  283|  9.21M|#define MB_TYPE_SKIP        0x00000100
  |  |  ------------------
  |  |  |  Branch (315:23): [True: 9.10M, False: 112k]
  |  |  ------------------
  ------------------
                bool bSkipOrDirect = (IS_SKIP (GetMbType (pCurDqLayer)[iMbXy]) || IS_DIRECT (GetMbType (pCurDqLayer)[iMbXy]));
  ------------------
  |  |  316|   112k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|   112k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  |  |  |  Branch (316:25): [True: 103k, False: 9.29k]
  |  |  ------------------
  ------------------
  619|       |
  620|  9.21M|  MbType mbType;
  621|  9.21M|  ret = GetColocatedMb (pCtx, mbType, subMbType);
  622|  9.21M|  if (ret != ERR_NONE) {
  ------------------
  |  Branch (622:7): [True: 1.57k, False: 9.21M]
  ------------------
  623|  1.57k|    return ret;
  624|  1.57k|  }
  625|       |
  626|  9.21M|  GetMbType (pCurDqLayer)[iMbXy] = mbType;
  627|       |
  628|  9.21M|  PSlice pSlice = &pCurDqLayer->sLayerInfo.sSliceInLayer;
  629|  9.21M|  PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
  630|  9.21M|  int16_t pMvd[4] = { 0 };
  631|  9.21M|  const int32_t ref0Count = WELS_MIN (pSliceHeader->uiRefCount[LIST_0], pCtx->sRefPic.uiRefCount[LIST_0]);
  ------------------
  |  |   95|  9.21M|#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (95:25): [True: 49.9k, False: 9.16M]
  |  |  ------------------
  ------------------
  632|  9.21M|  if (IS_INTER_16x16 (mbType)) {
  ------------------
  |  |  307|  9.21M|#define IS_INTER_16x16(type) ( (type)&MB_TYPE_16x16 )
  |  |  ------------------
  |  |  |  |  278|  9.21M|#define MB_TYPE_16x16       0x00000008
  |  |  ------------------
  |  |  |  Branch (307:30): [True: 28.2k, False: 9.18M]
  |  |  ------------------
  ------------------
  633|  28.2k|    ref[LIST_0] = 0;
  634|  28.2k|    ref[LIST_1] = 0;
  635|  28.2k|    UpdateP16x16DirectCabac (pCurDqLayer);
  636|  28.2k|    UpdateP16x16RefIdx (pCurDqLayer, LIST_1, ref[LIST_1]);
  637|  28.2k|    ST64 (iMvp,  0);
  ------------------
  |  |   68|  28.2k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  638|  28.2k|    if (pCurDqLayer->iColocIntra[0]) {
  ------------------
  |  Branch (638:9): [True: 3.15k, False: 25.0k]
  ------------------
  639|  3.15k|      UpdateP16x16MotionOnly (pCurDqLayer, LIST_0, iMvp[LIST_0]);
  640|  3.15k|      UpdateP16x16MotionOnly (pCurDqLayer, LIST_1, iMvp[LIST_1]);
  641|  3.15k|      UpdateP16x16RefIdx (pCurDqLayer, LIST_0, ref[LIST_0]);
  642|  25.0k|    } else {
  643|  25.0k|      ref[LIST_0] = 0;
  644|  25.0k|      int16_t* mv = pCurDqLayer->iColocMv[LIST_0][0];
  645|  25.0k|      int8_t colocRefIndexL0 = pCurDqLayer->iColocRefIndex[LIST_0][0];
  646|  25.0k|      if (colocRefIndexL0 >= 0) {
  ------------------
  |  Branch (646:11): [True: 24.0k, False: 1.03k]
  ------------------
  647|  24.0k|        ref[LIST_0] = MapColToList0 (pCtx, colocRefIndexL0, ref0Count);
  648|  24.0k|      } else {
  649|  1.03k|        mv = pCurDqLayer->iColocMv[LIST_1][0];
  650|  1.03k|      }
  651|  25.0k|      UpdateP16x16RefIdx (pCurDqLayer, LIST_0, ref[LIST_0]);
  652|       |
  653|  25.0k|      iMvp[LIST_0][0] = (pSlice->iMvScale[LIST_0][ref[LIST_0]] * mv[0] + 128) >> 8;
  654|  25.0k|      iMvp[LIST_0][1] = (pSlice->iMvScale[LIST_0][ref[LIST_0]] * mv[1] + 128) >> 8;
  655|  25.0k|      UpdateP16x16MotionOnly (pCurDqLayer, LIST_0, iMvp[LIST_0]);
  656|  25.0k|      iMvp[LIST_1][0] = iMvp[LIST_0][0] - mv[0];
  657|  25.0k|      iMvp[LIST_1][1] = iMvp[LIST_0][1] - mv[1];
  658|  25.0k|      UpdateP16x16MotionOnly (pCurDqLayer, LIST_1, iMvp[LIST_1]);
  659|  25.0k|    }
  660|  28.2k|    UpdateP16x16MvdCabac (pCurDqLayer, pMvd, LIST_0);
  661|  28.2k|    UpdateP16x16MvdCabac (pCurDqLayer, pMvd, LIST_1);
  662|  9.18M|  } else {
  663|  9.18M|    if (bSkipOrDirect) {
  ------------------
  |  Branch (663:9): [True: 9.17M, False: 9.29k]
  ------------------
  664|  9.17M|      int8_t pSubPartCount[4], pPartW[4];
  665|  9.17M|      int8_t pRefIndex[LIST_A][30];
  666|  45.8M|      for (int32_t i = 0; i < 4; i++) {
  ------------------
  |  Branch (666:27): [True: 36.6M, False: 9.17M]
  ------------------
  667|  36.6M|        int16_t iIdx8 = i << 2;
  668|  36.6M|        const uint8_t iScan4Idx = g_kuiScan4[iIdx8];
  669|  36.6M|        pCurDqLayer->pSubMbType[iMbXy][i] = subMbType;
  670|       |
  671|  36.6M|        int16_t (*mvColoc)[2] = pCurDqLayer->iColocMv[LIST_0];
  672|       |
  673|  36.6M|        ref[LIST_1] = 0;
  674|  36.6M|        UpdateP8x8RefIdxCabac (pCurDqLayer, pRefIndex, iIdx8, ref[LIST_1], LIST_1);
  675|  36.6M|        if (pCurDqLayer->iColocIntra[iScan4Idx]) {
  ------------------
  |  Branch (675:13): [True: 0, False: 36.6M]
  ------------------
  676|      0|          ref[LIST_0] = 0;
  677|      0|          UpdateP8x8RefIdxCabac (pCurDqLayer, pRefIndex, iIdx8, ref[LIST_0], LIST_0);
  678|      0|          ST64 (iMvp, 0);
  ------------------
  |  |   68|      0|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  679|  36.6M|        } else {
  680|  36.6M|          ref[LIST_0] = 0;
  681|  36.6M|          int8_t colocRefIndexL0 = pCurDqLayer->iColocRefIndex[LIST_0][iScan4Idx];
  682|  36.6M|          if (colocRefIndexL0 >= 0) {
  ------------------
  |  Branch (682:15): [True: 36.6M, False: 4.15k]
  ------------------
  683|  36.6M|            ref[LIST_0] = MapColToList0 (pCtx, colocRefIndexL0, ref0Count);
  684|  36.6M|          } else {
  685|  4.15k|            mvColoc = pCurDqLayer->iColocMv[LIST_1];
  686|  4.15k|          }
  687|  36.6M|          UpdateP8x8RefIdxCabac (pCurDqLayer, pRefIndex, iIdx8, ref[LIST_0], LIST_0);
  688|  36.6M|        }
  689|  36.6M|        UpdateP8x8DirectCabac (pCurDqLayer, iIdx8);
  690|       |
  691|  36.6M|        pSubPartCount[i] = g_ksInterBSubMbTypeInfo[0].iPartCount;
  692|  36.6M|        pPartW[i] = g_ksInterBSubMbTypeInfo[0].iPartWidth;
  693|       |
  694|  36.6M|        if (IS_SUB_4x4 (subMbType)) {
  ------------------
  |  |  324|  36.6M|#define IS_SUB_4x4(sub_type) (((sub_type)&SUB_MB_TYPE_4x4) != 0)
  |  |  ------------------
  |  |  |  |  297|  36.6M|#define SUB_MB_TYPE_4x4     0x00000008
  |  |  ------------------
  |  |  |  Branch (324:30): [True: 206k, False: 36.4M]
  |  |  ------------------
  ------------------
  695|   206k|          pSubPartCount[i] = 4;
  696|   206k|          pPartW[i] = 1;
  697|   206k|        }
  698|  36.6M|        FillTemporalDirect8x8Mv (pCurDqLayer, iIdx8, pSubPartCount[i], pPartW[i], subMbType, ref, mvColoc, NULL, NULL);
  699|  36.6M|      }
  700|  9.17M|    }
  701|  9.18M|  }
  702|  9.21M|  return ret;
  703|  9.21M|}
_ZN7WelsDec6PredMvEPA30_A2_sPA30_aiiiaPs:
  707|  2.92M|             int32_t listIdx, int32_t iPartIdx, int32_t iPartWidth, int8_t iRef, int16_t iMVP[2]) {
  708|  2.92M|  const uint8_t kuiLeftIdx      = g_kuiCache30ScanIdx[iPartIdx] - 1;
  709|  2.92M|  const uint8_t kuiTopIdx       = g_kuiCache30ScanIdx[iPartIdx] - 6;
  710|  2.92M|  const uint8_t kuiRightTopIdx  = kuiTopIdx + iPartWidth;
  711|  2.92M|  const uint8_t kuiLeftTopIdx   = kuiTopIdx - 1;
  712|       |
  713|  2.92M|  const int8_t kiLeftRef      = iRefIndex[listIdx][kuiLeftIdx];
  714|  2.92M|  const int8_t kiTopRef       = iRefIndex[listIdx][ kuiTopIdx];
  715|  2.92M|  const int8_t kiRightTopRef  = iRefIndex[listIdx][kuiRightTopIdx];
  716|  2.92M|  const int8_t kiLeftTopRef   = iRefIndex[listIdx][ kuiLeftTopIdx];
  717|  2.92M|  int8_t iDiagonalRef  = kiRightTopRef;
  718|       |
  719|  2.92M|  int8_t iMatchRef = 0;
  720|       |
  721|       |
  722|  2.92M|  int16_t iAMV[2], iBMV[2], iCMV[2];
  723|       |
  724|  2.92M|  ST32 (iAMV, LD32 (iMotionVector[listIdx][     kuiLeftIdx]));
  ------------------
  |  |   67|  2.92M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  725|  2.92M|  ST32 (iBMV, LD32 (iMotionVector[listIdx][      kuiTopIdx]));
  ------------------
  |  |   67|  2.92M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  726|  2.92M|  ST32 (iCMV, LD32 (iMotionVector[listIdx][kuiRightTopIdx]));
  ------------------
  |  |   67|  2.92M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  727|       |
  728|  2.92M|  if (REF_NOT_AVAIL == iDiagonalRef) {
  ------------------
  |  |   41|  2.92M|#define REF_NOT_AVAIL    -2
  ------------------
  |  Branch (728:7): [True: 2.47M, False: 445k]
  ------------------
  729|  2.47M|    iDiagonalRef = kiLeftTopRef;
  730|  2.47M|    ST32 (iCMV, LD32 (iMotionVector[listIdx][kuiLeftTopIdx]));
  ------------------
  |  |   67|  2.47M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  731|  2.47M|  }
  732|       |
  733|  2.92M|  iMatchRef = (iRef == kiLeftRef) + (iRef == kiTopRef) + (iRef == iDiagonalRef);
  734|       |
  735|  2.92M|  if (REF_NOT_AVAIL == kiTopRef && REF_NOT_AVAIL == iDiagonalRef && kiLeftRef >= REF_NOT_IN_LIST) {
  ------------------
  |  |   41|  2.92M|#define REF_NOT_AVAIL    -2
  ------------------
                if (REF_NOT_AVAIL == kiTopRef && REF_NOT_AVAIL == iDiagonalRef && kiLeftRef >= REF_NOT_IN_LIST) {
  ------------------
  |  |   41|  2.14M|#define REF_NOT_AVAIL    -2
  ------------------
                if (REF_NOT_AVAIL == kiTopRef && REF_NOT_AVAIL == iDiagonalRef && kiLeftRef >= REF_NOT_IN_LIST) {
  ------------------
  |  |   42|  2.13M|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  |  Branch (735:7): [True: 2.14M, False: 775k]
  |  Branch (735:36): [True: 2.13M, False: 10.0k]
  |  Branch (735:69): [True: 2.05M, False: 78.9k]
  ------------------
  736|  2.05M|    ST32 (iMVP, LD32 (iAMV));
  ------------------
  |  |   67|  2.05M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  737|  2.05M|    return;
  738|  2.05M|  }
  739|       |
  740|   864k|  if (1 == iMatchRef) {
  ------------------
  |  Branch (740:7): [True: 172k, False: 692k]
  ------------------
  741|   172k|    if (iRef == kiLeftRef) {
  ------------------
  |  Branch (741:9): [True: 40.7k, False: 131k]
  ------------------
  742|  40.7k|      ST32 (iMVP, LD32 (iAMV));
  ------------------
  |  |   67|  40.7k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  743|   131k|    } else if (iRef == kiTopRef) {
  ------------------
  |  Branch (743:16): [True: 114k, False: 16.5k]
  ------------------
  744|   114k|      ST32 (iMVP, LD32 (iBMV));
  ------------------
  |  |   67|   114k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  745|   114k|    } else {
  746|  16.5k|      ST32 (iMVP, LD32 (iCMV));
  ------------------
  |  |   67|  16.5k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  747|  16.5k|    }
  748|   692k|  } else {
  749|   692k|    iMVP[0] = WelsMedian (iAMV[0], iBMV[0], iCMV[0]);
  750|   692k|    iMVP[1] = WelsMedian (iAMV[1], iBMV[1], iCMV[1]);
  751|   692k|  }
  752|   864k|}
_ZN7WelsDec15PredInter8x16MvEPA30_A2_sPA30_aiiaPs:
  754|   132k|                      int32_t listIdx, int32_t iPartIdx, int8_t iRef, int16_t iMVP[2]) {
  755|   132k|  if (0 == iPartIdx) {
  ------------------
  |  Branch (755:7): [True: 69.0k, False: 63.9k]
  ------------------
  756|  69.0k|    const int8_t kiLeftRef = iRefIndex[listIdx][6];
  757|  69.0k|    if (iRef == kiLeftRef) {
  ------------------
  |  Branch (757:9): [True: 28.1k, False: 40.8k]
  ------------------
  758|  28.1k|      ST32 (iMVP, LD32 (&iMotionVector[listIdx][6][0]));
  ------------------
  |  |   67|  28.1k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  759|  28.1k|      return;
  760|  28.1k|    }
  761|  69.0k|  } else { // 1 == iPartIdx
  762|  63.9k|    int8_t iDiagonalRef = iRefIndex[listIdx][5]; //top-right
  763|  63.9k|    int8_t index = 5;
  764|  63.9k|    if (REF_NOT_AVAIL == iDiagonalRef) {
  ------------------
  |  |   41|  63.9k|#define REF_NOT_AVAIL    -2
  ------------------
  |  Branch (764:9): [True: 37.6k, False: 26.3k]
  ------------------
  765|  37.6k|      iDiagonalRef = iRefIndex[listIdx][2]; //top-left for 8*8 block(index 1)
  766|  37.6k|      index = 2;
  767|  37.6k|    }
  768|  63.9k|    if (iRef == iDiagonalRef) {
  ------------------
  |  Branch (768:9): [True: 37.3k, False: 26.5k]
  ------------------
  769|  37.3k|      ST32 (iMVP, LD32 (&iMotionVector[listIdx][index][0]));
  ------------------
  |  |   67|  37.3k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  770|  37.3k|      return;
  771|  37.3k|    }
  772|  63.9k|  }
  773|       |
  774|  67.4k|  PredMv (iMotionVector, iRefIndex, listIdx, iPartIdx, 2, iRef, iMVP);
  775|  67.4k|}
_ZN7WelsDec15PredInter16x8MvEPA30_A2_sPA30_aiiaPs:
  777|   182k|                      int32_t listIdx, int32_t iPartIdx, int8_t iRef, int16_t iMVP[2]) {
  778|   182k|  if (0 == iPartIdx) {
  ------------------
  |  Branch (778:7): [True: 101k, False: 80.7k]
  ------------------
  779|   101k|    const int8_t kiTopRef = iRefIndex[listIdx][1];
  780|   101k|    if (iRef == kiTopRef) {
  ------------------
  |  Branch (780:9): [True: 37.0k, False: 64.8k]
  ------------------
  781|  37.0k|      ST32 (iMVP, LD32 (&iMotionVector[listIdx][1][0]));
  ------------------
  |  |   67|  37.0k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  782|  37.0k|      return;
  783|  37.0k|    }
  784|   101k|  } else { // 8 == iPartIdx
  785|  80.7k|    const int8_t kiLeftRef = iRefIndex[listIdx][18];
  786|  80.7k|    if (iRef == kiLeftRef) {
  ------------------
  |  Branch (786:9): [True: 40.9k, False: 39.8k]
  ------------------
  787|  40.9k|      ST32 (iMVP, LD32 (&iMotionVector[listIdx][18][0]));
  ------------------
  |  |   67|  40.9k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  788|  40.9k|      return;
  789|  40.9k|    }
  790|  80.7k|  }
  791|       |
  792|   104k|  PredMv (iMotionVector, iRefIndex, listIdx, iPartIdx, 4, iRef, iMVP);
  793|   104k|}
_ZN7WelsDec22UpdateP16x16MotionInfoEPNS_10TagDqLayerEiaPs:
  797|   936k|void UpdateP16x16MotionInfo (PDqLayer pCurDqLayer, int32_t listIdx, int8_t iRef, int16_t iMVs[2]) {
  798|   936k|  const int16_t kiRef2 = ((uint8_t)iRef << 8) | (uint8_t)iRef;
  799|   936k|  const int32_t kiMV32 = LD32 (iMVs);
  ------------------
  |  |   52|   936k|#define LD32(a) (((struct tagUnaligned_32 *) (a))->l)
  ------------------
  800|   936k|  int32_t i;
  801|   936k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  802|       |
  803|  4.68M|  for (i = 0; i < 16; i += 4) {
  ------------------
  |  Branch (803:15): [True: 3.74M, False: 936k]
  ------------------
  804|       |    //mb
  805|  3.74M|    const uint8_t kuiScan4Idx = g_kuiScan4[i];
  806|  3.74M|    const uint8_t kuiScan4IdxPlus4 = 4 + kuiScan4Idx;
  807|  3.74M|    if (pCurDqLayer->pDec != NULL) {
  ------------------
  |  Branch (807:9): [True: 3.74M, False: 0]
  ------------------
  808|  3.74M|      ST16 (&pCurDqLayer->pDec->pRefIndex[listIdx][iMbXy][kuiScan4Idx], kiRef2);
  ------------------
  |  |   66|  3.74M|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  809|  3.74M|      ST16 (&pCurDqLayer->pDec->pRefIndex[listIdx][iMbXy][kuiScan4IdxPlus4], kiRef2);
  ------------------
  |  |   66|  3.74M|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  810|       |
  811|  3.74M|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|  3.74M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  812|  3.74M|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][1 + kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|  3.74M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  813|  3.74M|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|  3.74M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  814|  3.74M|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][1 + kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|  3.74M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  815|  3.74M|    } else {
  816|      0|      ST16 (&pCurDqLayer->pRefIndex[listIdx][iMbXy][kuiScan4Idx], kiRef2);
  ------------------
  |  |   66|      0|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  817|      0|      ST16 (&pCurDqLayer->pRefIndex[listIdx][iMbXy][kuiScan4IdxPlus4], kiRef2);
  ------------------
  |  |   66|      0|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  818|       |
  819|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  820|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][1 + kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  821|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  822|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][1 + kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  823|      0|    }
  824|  3.74M|  }
  825|   936k|}
_ZN7WelsDec18UpdateP16x16RefIdxEPNS_10TagDqLayerEia:
  829|  56.4k|void UpdateP16x16RefIdx (PDqLayer pCurDqLayer, int32_t listIdx, int8_t iRef) {
  830|  56.4k|  const int16_t kiRef2 = ((uint8_t)iRef << 8) | (uint8_t)iRef;
  831|  56.4k|  int32_t i;
  832|  56.4k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  833|       |
  834|   282k|  for (i = 0; i < 16; i += 4) {
  ------------------
  |  Branch (834:15): [True: 225k, False: 56.4k]
  ------------------
  835|       |    //mb
  836|   225k|    const uint8_t kuiScan4Idx = g_kuiScan4[i];
  837|   225k|    const uint8_t kuiScan4IdxPlus4 = 4 + kuiScan4Idx;
  838|       |
  839|   225k|    ST16 (&pCurDqLayer->pDec->pRefIndex[listIdx][iMbXy][kuiScan4Idx], kiRef2);
  ------------------
  |  |   66|   225k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  840|   225k|    ST16 (&pCurDqLayer->pDec->pRefIndex[listIdx][iMbXy][kuiScan4IdxPlus4], kiRef2);
  ------------------
  |  |   66|   225k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  841|   225k|  }
  842|  56.4k|}
_ZN7WelsDec22UpdateP16x16MotionOnlyEPNS_10TagDqLayerEiPs:
  846|  56.4k|void UpdateP16x16MotionOnly (PDqLayer pCurDqLayer, int32_t listIdx, int16_t iMVs[2]) {
  847|  56.4k|  const int32_t kiMV32 = LD32 (iMVs);
  ------------------
  |  |   52|  56.4k|#define LD32(a) (((struct tagUnaligned_32 *) (a))->l)
  ------------------
  848|  56.4k|  int32_t i;
  849|  56.4k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  850|       |
  851|   282k|  for (i = 0; i < 16; i += 4) {
  ------------------
  |  Branch (851:15): [True: 225k, False: 56.4k]
  ------------------
  852|       |    //mb
  853|   225k|    const uint8_t kuiScan4Idx = g_kuiScan4[i];
  854|   225k|    const uint8_t kuiScan4IdxPlus4 = 4 + kuiScan4Idx;
  855|   225k|    if (pCurDqLayer->pDec != NULL) {
  ------------------
  |  Branch (855:9): [True: 225k, False: 0]
  ------------------
  856|   225k|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|   225k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  857|   225k|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][1 + kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|   225k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  858|   225k|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|   225k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  859|   225k|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][1 + kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|   225k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  860|   225k|    } else {
  861|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  862|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][1 + kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  863|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  864|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][1 + kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  865|      0|    }
  866|   225k|  }
  867|  56.4k|}
_ZN7WelsDec21UpdateP16x8MotionInfoEPNS_10TagDqLayerEPA30_A2_sPA30_aiiaPs:
  873|   198k|                            int32_t listIdx, int32_t iPartIdx, int8_t iRef, int16_t iMVs[2]) {
  874|   198k|  const int16_t kiRef2 = ((uint8_t)iRef << 8) | (uint8_t)iRef;
  875|   198k|  const int32_t kiMV32 = LD32 (iMVs);
  ------------------
  |  |   52|   198k|#define LD32(a) (((struct tagUnaligned_32 *) (a))->l)
  ------------------
  876|   198k|  int32_t i;
  877|   198k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  878|   595k|  for (i = 0; i < 2; i++, iPartIdx += 4) {
  ------------------
  |  Branch (878:15): [True: 397k, False: 198k]
  ------------------
  879|   397k|    const uint8_t kuiScan4Idx      = g_kuiScan4[iPartIdx];
  880|   397k|    const uint8_t kuiScan4IdxPlus4 = 4 + kuiScan4Idx;
  881|   397k|    const uint8_t kuiCacheIdx      = g_kuiCache30ScanIdx[iPartIdx];
  882|   397k|    const uint8_t kuiCacheIdxPlus6 = 6 + kuiCacheIdx;
  883|       |
  884|       |    //mb
  885|   397k|    if (pCurDqLayer->pDec != NULL) {
  ------------------
  |  Branch (885:9): [True: 397k, False: 0]
  ------------------
  886|   397k|      ST16 (&pCurDqLayer->pDec->pRefIndex[listIdx][iMbXy][kuiScan4Idx], kiRef2);
  ------------------
  |  |   66|   397k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  887|   397k|      ST16 (&pCurDqLayer->pDec->pRefIndex[listIdx][iMbXy][kuiScan4IdxPlus4], kiRef2);
  ------------------
  |  |   66|   397k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  888|   397k|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|   397k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  889|   397k|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][1 + kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|   397k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  890|   397k|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|   397k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  891|   397k|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][1 + kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|   397k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  892|   397k|    } else {
  893|      0|      ST16 (&pCurDqLayer->pRefIndex[listIdx][iMbXy][kuiScan4Idx], kiRef2);
  ------------------
  |  |   66|      0|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  894|      0|      ST16 (&pCurDqLayer->pRefIndex[listIdx][iMbXy][kuiScan4IdxPlus4], kiRef2);
  ------------------
  |  |   66|      0|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  895|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  896|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][1 + kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  897|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  898|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][1 + kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  899|      0|    }
  900|       |    //cache
  901|   397k|    ST16 (&iRefIndex[listIdx][kuiCacheIdx ], kiRef2);
  ------------------
  |  |   66|   397k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  902|   397k|    ST16 (&iRefIndex[listIdx][kuiCacheIdxPlus6], kiRef2);
  ------------------
  |  |   66|   397k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  903|   397k|    ST32 (iMotionVector[listIdx][  kuiCacheIdx ], kiMV32);
  ------------------
  |  |   67|   397k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  904|   397k|    ST32 (iMotionVector[listIdx][1 + kuiCacheIdx ], kiMV32);
  ------------------
  |  |   67|   397k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  905|   397k|    ST32 (iMotionVector[listIdx][  kuiCacheIdxPlus6], kiMV32);
  ------------------
  |  |   67|   397k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  906|   397k|    ST32 (iMotionVector[listIdx][1 + kuiCacheIdxPlus6], kiMV32);
  ------------------
  |  |   67|   397k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  907|   397k|  }
  908|   198k|}
_ZN7WelsDec21UpdateP8x16MotionInfoEPNS_10TagDqLayerEPA30_A2_sPA30_aiiaPs:
  912|   151k|                            int32_t listIdx, int32_t iPartIdx, int8_t iRef, int16_t iMVs[2]) {
  913|   151k|  const int16_t kiRef2 = ((uint8_t)iRef << 8) | (uint8_t)iRef;
  914|   151k|  const int32_t kiMV32 = LD32 (iMVs);
  ------------------
  |  |   52|   151k|#define LD32(a) (((struct tagUnaligned_32 *) (a))->l)
  ------------------
  915|   151k|  int32_t i;
  916|   151k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  917|       |
  918|   455k|  for (i = 0; i < 2; i++, iPartIdx += 8) {
  ------------------
  |  Branch (918:15): [True: 303k, False: 151k]
  ------------------
  919|   303k|    const uint8_t kuiScan4Idx = g_kuiScan4[iPartIdx];
  920|   303k|    const uint8_t kuiCacheIdx = g_kuiCache30ScanIdx[iPartIdx];
  921|   303k|    const uint8_t kuiScan4IdxPlus4 = 4 + kuiScan4Idx;
  922|   303k|    const uint8_t kuiCacheIdxPlus6 = 6 + kuiCacheIdx;
  923|       |
  924|       |    //mb
  925|   303k|    if (pCurDqLayer->pDec != NULL) {
  ------------------
  |  Branch (925:9): [True: 303k, False: 0]
  ------------------
  926|   303k|      ST16 (&pCurDqLayer->pDec->pRefIndex[listIdx][iMbXy][kuiScan4Idx], kiRef2);
  ------------------
  |  |   66|   303k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  927|   303k|      ST16 (&pCurDqLayer->pDec->pRefIndex[listIdx][iMbXy][kuiScan4IdxPlus4], kiRef2);
  ------------------
  |  |   66|   303k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  928|   303k|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|   303k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  929|   303k|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][1 + kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|   303k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  930|   303k|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|   303k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  931|   303k|      ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][1 + kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|   303k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  932|   303k|    } else {
  933|      0|      ST16 (&pCurDqLayer->pRefIndex[listIdx][iMbXy][kuiScan4Idx], kiRef2);
  ------------------
  |  |   66|      0|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  934|      0|      ST16 (&pCurDqLayer->pRefIndex[listIdx][iMbXy][kuiScan4IdxPlus4], kiRef2);
  ------------------
  |  |   66|      0|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  935|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  936|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][1 + kuiScan4Idx], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  937|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  938|      0|      ST32 (pCurDqLayer->pMv[listIdx][iMbXy][1 + kuiScan4IdxPlus4], kiMV32);
  ------------------
  |  |   67|      0|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  939|      0|    }
  940|       |    //cache
  941|   303k|    ST16 (&iRefIndex[listIdx][kuiCacheIdx ], kiRef2);
  ------------------
  |  |   66|   303k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  942|   303k|    ST16 (&iRefIndex[listIdx][kuiCacheIdxPlus6], kiRef2);
  ------------------
  |  |   66|   303k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  943|   303k|    ST32 (iMotionVector[listIdx][  kuiCacheIdx ], kiMV32);
  ------------------
  |  |   67|   303k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  944|   303k|    ST32 (iMotionVector[listIdx][1 + kuiCacheIdx ], kiMV32);
  ------------------
  |  |   67|   303k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  945|   303k|    ST32 (iMotionVector[listIdx][  kuiCacheIdxPlus6], kiMV32);
  ------------------
  |  |   67|   303k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  946|   303k|    ST32 (iMotionVector[listIdx][1 + kuiCacheIdxPlus6], kiMV32);
  ------------------
  |  |   67|   303k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  947|   303k|  }
  948|   151k|}
_ZN7WelsDec22FillSpatialDirect8x8MvEPNS_10TagDqLayerERKsRKaS5_RKjRKbPA2_sPaPA30_SA_SE_:
  952|  1.27M|                             int16_t pMotionVector[LIST_A][30][MV_A], int16_t pMvdCache[LIST_A][30][MV_A]) {
  953|  1.27M|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  954|  2.72M|  for (int32_t j = 0; j < iPartCount; j++) {
  ------------------
  |  Branch (954:23): [True: 1.45M, False: 1.27M]
  ------------------
  955|  1.45M|    int8_t iPartIdx = iIdx8 + j * iPartW;
  956|  1.45M|    uint8_t iScan4Idx = g_kuiScan4[iPartIdx];
  957|  1.45M|    uint8_t iColocIdx = g_kuiScan4[iPartIdx];
  958|  1.45M|    uint8_t iCacheIdx = g_kuiCache30ScanIdx[iPartIdx];
  959|       |
  960|  1.45M|    int16_t pMV[4] = { 0 };
  961|  1.45M|    if (IS_SUB_8x8 (subMbType)) {
  ------------------
  |  |  321|  1.45M|#define IS_SUB_8x8(sub_type) (((sub_type)&SUB_MB_TYPE_8x8) != 0)
  |  |  ------------------
  |  |  |  |  294|  1.45M|#define SUB_MB_TYPE_8x8     0x00000001
  |  |  ------------------
  |  |  |  Branch (321:30): [True: 1.21M, False: 235k]
  |  |  ------------------
  ------------------
  962|  1.21M|      * (uint32_t*)pMV = * (uint32_t*)pMvDirect[LIST_0];
  963|  1.21M|      ST32 ((pMV + 2), LD32 (pMV));
  ------------------
  |  |   67|  1.21M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  964|  1.21M|      ST64 (pCurDqLayer->pDec->pMv[LIST_0][iMbXy][iScan4Idx], LD64 (pMV));
  ------------------
  |  |   68|  1.21M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  965|  1.21M|      ST64 (pCurDqLayer->pDec->pMv[LIST_0][iMbXy][iScan4Idx + 4], LD64 (pMV));
  ------------------
  |  |   68|  1.21M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  966|  1.21M|      ST64 (pCurDqLayer->pMvd[LIST_0][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   68|  1.21M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  967|  1.21M|      ST64 (pCurDqLayer->pMvd[LIST_0][iMbXy][iScan4Idx + 4], 0);
  ------------------
  |  |   68|  1.21M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  968|  1.21M|      if (pMotionVector != NULL) {
  ------------------
  |  Branch (968:11): [True: 24.4k, False: 1.19M]
  ------------------
  969|  24.4k|        ST64 (pMotionVector[LIST_0][iCacheIdx], LD64 (pMV));
  ------------------
  |  |   68|  24.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  970|  24.4k|        ST64 (pMotionVector[LIST_0][iCacheIdx + 6], LD64 (pMV));
  ------------------
  |  |   68|  24.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  971|  24.4k|      }
  972|  1.21M|      if (pMvdCache != NULL) {
  ------------------
  |  Branch (972:11): [True: 15.4k, False: 1.20M]
  ------------------
  973|  15.4k|        ST64 (pMvdCache[LIST_0][iCacheIdx], 0);
  ------------------
  |  |   68|  15.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  974|  15.4k|        ST64 (pMvdCache[LIST_0][iCacheIdx + 6], 0);
  ------------------
  |  |   68|  15.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  975|  15.4k|      }
  976|  1.21M|      * (uint32_t*)pMV = * (uint32_t*)pMvDirect[LIST_1];
  977|  1.21M|      ST32 ((pMV + 2), LD32 (pMV));
  ------------------
  |  |   67|  1.21M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  978|  1.21M|      ST64 (pCurDqLayer->pDec->pMv[LIST_1][iMbXy][iScan4Idx], LD64 (pMV));
  ------------------
  |  |   68|  1.21M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  979|  1.21M|      ST64 (pCurDqLayer->pDec->pMv[LIST_1][iMbXy][iScan4Idx + 4], LD64 (pMV));
  ------------------
  |  |   68|  1.21M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  980|  1.21M|      ST64 (pCurDqLayer->pMvd[LIST_1][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   68|  1.21M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  981|  1.21M|      ST64 (pCurDqLayer->pMvd[LIST_1][iMbXy][iScan4Idx + 4], 0);
  ------------------
  |  |   68|  1.21M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  982|  1.21M|      if (pMotionVector != NULL) {
  ------------------
  |  Branch (982:11): [True: 24.4k, False: 1.19M]
  ------------------
  983|  24.4k|        ST64 (pMotionVector[LIST_1][iCacheIdx], LD64 (pMV));
  ------------------
  |  |   68|  24.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  984|  24.4k|        ST64 (pMotionVector[LIST_1][iCacheIdx + 6], LD64 (pMV));
  ------------------
  |  |   68|  24.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  985|  24.4k|      }
  986|  1.21M|      if (pMvdCache != NULL) {
  ------------------
  |  Branch (986:11): [True: 15.4k, False: 1.20M]
  ------------------
  987|  15.4k|        ST64 (pMvdCache[LIST_1][iCacheIdx], 0);
  ------------------
  |  |   68|  15.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  988|  15.4k|        ST64 (pMvdCache[LIST_1][iCacheIdx + 6], 0);
  ------------------
  |  |   68|  15.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  989|  15.4k|      }
  990|  1.21M|    } else { //SUB_4x4
  991|   235k|      * (uint32_t*)pMV = * (uint32_t*)pMvDirect[LIST_0];
  992|   235k|      ST32 (pCurDqLayer->pDec->pMv[LIST_0][iMbXy][iScan4Idx], LD32 (pMV));
  ------------------
  |  |   67|   235k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  993|   235k|      ST32 (pCurDqLayer->pMvd[LIST_0][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   67|   235k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  994|   235k|      if (pMotionVector != NULL) {
  ------------------
  |  Branch (994:11): [True: 4.37k, False: 230k]
  ------------------
  995|  4.37k|        ST32 (pMotionVector[LIST_0][iCacheIdx], LD32 (pMV));
  ------------------
  |  |   67|  4.37k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  996|  4.37k|      }
  997|   235k|      if (pMvdCache != NULL) {
  ------------------
  |  Branch (997:11): [True: 2.48k, False: 232k]
  ------------------
  998|  2.48k|        ST32 (pMvdCache[LIST_0][iCacheIdx], 0);
  ------------------
  |  |   67|  2.48k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  999|  2.48k|      }
 1000|   235k|      * (uint32_t*)pMV = * (uint32_t*)pMvDirect[LIST_1];
 1001|   235k|      ST32 (pCurDqLayer->pDec->pMv[LIST_1][iMbXy][iScan4Idx], LD32 (pMV));
  ------------------
  |  |   67|   235k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1002|   235k|      ST32 (pCurDqLayer->pMvd[LIST_1][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   67|   235k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1003|   235k|      if (pMotionVector != NULL) {
  ------------------
  |  Branch (1003:11): [True: 4.37k, False: 230k]
  ------------------
 1004|  4.37k|        ST32 (pMotionVector[LIST_1][iCacheIdx], LD32 (pMV));
  ------------------
  |  |   67|  4.37k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1005|  4.37k|      }
 1006|   235k|      if (pMvdCache != NULL) {
  ------------------
  |  Branch (1006:11): [True: 2.48k, False: 232k]
  ------------------
 1007|  2.48k|        ST32 (pMvdCache[LIST_1][iCacheIdx], 0);
  ------------------
  |  |   67|  2.48k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1008|  2.48k|      }
 1009|   235k|    }
 1010|  1.45M|    if ((* (int32_t*)pMvDirect[LIST_0] | * (int32_t*)pMvDirect[LIST_1])) {
  ------------------
  |  Branch (1010:9): [True: 411k, False: 1.04M]
  ------------------
 1011|   411k|      uint32_t uiColZeroFlag = (0 == pCurDqLayer->iColocIntra[iColocIdx]) && !bIsLongRef &&
  ------------------
  |  Branch (1011:32): [True: 411k, False: 397]
  |  Branch (1011:78): [True: 112k, False: 298k]
  ------------------
 1012|   112k|                               (pCurDqLayer->iColocRefIndex[LIST_0][iColocIdx] == 0 || (pCurDqLayer->iColocRefIndex[LIST_0][iColocIdx] < 0
  ------------------
  |  Branch (1012:33): [True: 87.7k, False: 24.9k]
  |  Branch (1012:89): [True: 24.4k, False: 509]
  ------------------
 1013|  24.4k|                                   && pCurDqLayer->iColocRefIndex[LIST_1][iColocIdx] == 0));
  ------------------
  |  Branch (1013:39): [True: 19.7k, False: 4.70k]
  ------------------
 1014|   411k|      const int16_t (*mvColoc)[2] = 0 == pCurDqLayer->iColocRefIndex[LIST_0][iColocIdx] ? pCurDqLayer->iColocMv[LIST_0] :
  ------------------
  |  Branch (1014:37): [True: 291k, False: 120k]
  ------------------
 1015|   411k|                                    pCurDqLayer->iColocMv[LIST_1];
 1016|   411k|      const int16_t* mv = mvColoc[iColocIdx];
 1017|   411k|      if (IS_SUB_8x8 (subMbType)) {
  ------------------
  |  |  321|   411k|#define IS_SUB_8x8(sub_type) (((sub_type)&SUB_MB_TYPE_8x8) != 0)
  |  |  ------------------
  |  |  |  |  294|   411k|#define SUB_MB_TYPE_8x8     0x00000001
  |  |  ------------------
  |  |  |  Branch (321:30): [True: 267k, False: 144k]
  |  |  ------------------
  ------------------
 1018|   267k|        if (uiColZeroFlag && ((unsigned) (mv[0] + 1) <= 2 && (unsigned) (mv[1] + 1) <= 2)) {
  ------------------
  |  Branch (1018:13): [True: 71.5k, False: 195k]
  |  Branch (1018:31): [True: 65.2k, False: 6.32k]
  |  Branch (1018:62): [True: 63.7k, False: 1.52k]
  ------------------
 1019|  63.7k|          if (iRef[LIST_0] == 0) {
  ------------------
  |  Branch (1019:15): [True: 20.0k, False: 43.6k]
  ------------------
 1020|  20.0k|            ST64 (pCurDqLayer->pDec->pMv[LIST_0][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   68|  20.0k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1021|  20.0k|            ST64 (pCurDqLayer->pDec->pMv[LIST_0][iMbXy][iScan4Idx + 4], 0);
  ------------------
  |  |   68|  20.0k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1022|  20.0k|            ST64 (pCurDqLayer->pMvd[LIST_0][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   68|  20.0k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1023|  20.0k|            ST64 (pCurDqLayer->pMvd[LIST_0][iMbXy][iScan4Idx + 4], 0);
  ------------------
  |  |   68|  20.0k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1024|  20.0k|            if (pMotionVector != NULL) {
  ------------------
  |  Branch (1024:17): [True: 1.04k, False: 19.0k]
  ------------------
 1025|  1.04k|              ST64 (pMotionVector[LIST_0][iCacheIdx], 0);
  ------------------
  |  |   68|  1.04k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1026|  1.04k|              ST64 (pMotionVector[LIST_0][iCacheIdx + 6], 0);
  ------------------
  |  |   68|  1.04k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1027|  1.04k|            }
 1028|  20.0k|            if (pMvdCache != NULL) {
  ------------------
  |  Branch (1028:17): [True: 616, False: 19.4k]
  ------------------
 1029|    616|              ST64 (pMvdCache[LIST_0][iCacheIdx], 0);
  ------------------
  |  |   68|    616|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1030|    616|              ST64 (pMvdCache[LIST_0][iCacheIdx + 6], 0);
  ------------------
  |  |   68|    616|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1031|    616|            }
 1032|  20.0k|          }
 1033|       |
 1034|  63.7k|          if (iRef[LIST_1] == 0) {
  ------------------
  |  Branch (1034:15): [True: 16.7k, False: 47.0k]
  ------------------
 1035|  16.7k|            ST64 (pCurDqLayer->pDec->pMv[LIST_1][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   68|  16.7k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1036|  16.7k|            ST64 (pCurDqLayer->pDec->pMv[LIST_1][iMbXy][iScan4Idx + 4], 0);
  ------------------
  |  |   68|  16.7k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1037|  16.7k|            ST64 (pCurDqLayer->pMvd[LIST_1][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   68|  16.7k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1038|  16.7k|            ST64 (pCurDqLayer->pMvd[LIST_1][iMbXy][iScan4Idx + 4], 0);
  ------------------
  |  |   68|  16.7k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1039|  16.7k|            if (pMotionVector != NULL) {
  ------------------
  |  Branch (1039:17): [True: 1.36k, False: 15.3k]
  ------------------
 1040|  1.36k|              ST64 (pMotionVector[LIST_1][iCacheIdx], 0);
  ------------------
  |  |   68|  1.36k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1041|  1.36k|              ST64 (pMotionVector[LIST_1][iCacheIdx + 6], 0);
  ------------------
  |  |   68|  1.36k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1042|  1.36k|            }
 1043|  16.7k|            if (pMvdCache != NULL) {
  ------------------
  |  Branch (1043:17): [True: 1.21k, False: 15.5k]
  ------------------
 1044|  1.21k|              ST64 (pMvdCache[LIST_1][iCacheIdx], 0);
  ------------------
  |  |   68|  1.21k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1045|  1.21k|              ST64 (pMvdCache[LIST_1][iCacheIdx + 6], 0);
  ------------------
  |  |   68|  1.21k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1046|  1.21k|            }
 1047|  16.7k|          }
 1048|  63.7k|        }
 1049|   267k|      } else {
 1050|   144k|        if (uiColZeroFlag && ((unsigned) (mv[0] + 1) <= 2 && (unsigned) (mv[1] + 1) <= 2)) {
  ------------------
  |  Branch (1050:13): [True: 35.8k, False: 108k]
  |  Branch (1050:31): [True: 21.0k, False: 14.7k]
  |  Branch (1050:62): [True: 19.0k, False: 2.07k]
  ------------------
 1051|  19.0k|          if (iRef[LIST_0] == 0) {
  ------------------
  |  Branch (1051:15): [True: 3.59k, False: 15.4k]
  ------------------
 1052|  3.59k|            ST32 (pCurDqLayer->pDec->pMv[LIST_0][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   67|  3.59k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1053|  3.59k|            ST32 (pCurDqLayer->pMvd[LIST_0][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   67|  3.59k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1054|  3.59k|            if (pMotionVector != NULL) {
  ------------------
  |  Branch (1054:17): [True: 642, False: 2.95k]
  ------------------
 1055|    642|              ST32 (pMotionVector[LIST_0][iCacheIdx], 0);
  ------------------
  |  |   67|    642|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1056|    642|            }
 1057|  3.59k|            if (pMvdCache != NULL) {
  ------------------
  |  Branch (1057:17): [True: 526, False: 3.06k]
  ------------------
 1058|    526|              ST32 (pMvdCache[LIST_0][iCacheIdx], 0);
  ------------------
  |  |   67|    526|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1059|    526|            }
 1060|  3.59k|          }
 1061|  19.0k|          if (iRef[LIST_1] == 0) {
  ------------------
  |  Branch (1061:15): [True: 6.04k, False: 12.9k]
  ------------------
 1062|  6.04k|            ST32 (pCurDqLayer->pDec->pMv[LIST_1][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   67|  6.04k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1063|  6.04k|            ST32 (pCurDqLayer->pMvd[LIST_1][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   67|  6.04k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1064|  6.04k|            if (pMotionVector != NULL) {
  ------------------
  |  Branch (1064:17): [True: 715, False: 5.32k]
  ------------------
 1065|    715|              ST32 (pMotionVector[LIST_1][iCacheIdx], 0);
  ------------------
  |  |   67|    715|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1066|    715|            }
 1067|  6.04k|            if (pMvdCache != NULL) {
  ------------------
  |  Branch (1067:17): [True: 715, False: 5.32k]
  ------------------
 1068|    715|              ST32 (pMvdCache[LIST_1][iCacheIdx], 0);
  ------------------
  |  |   67|    715|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1069|    715|            }
 1070|  6.04k|          }
 1071|  19.0k|        }
 1072|   144k|      }
 1073|   411k|    }
 1074|  1.45M|  }
 1075|  1.27M|}
_ZN7WelsDec23FillTemporalDirect8x8MvEPNS_10TagDqLayerERKsRKaS5_RKjPaPA2_sPA30_S9_SC_:
 1080|  36.7M|                              int16_t pMvdCache[LIST_A][30][MV_A]) {
 1081|  36.7M|  PSlice pSlice = &pCurDqLayer->sLayerInfo.sSliceInLayer;
 1082|  36.7M|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
 1083|  36.7M|  int16_t pMvDirect[LIST_A][2] = { { 0, 0 }, { 0, 0 } };
 1084|  74.0M|  for (int32_t j = 0; j < iPartCount; j++) {
  ------------------
  |  Branch (1084:23): [True: 37.3M, False: 36.7M]
  ------------------
 1085|  37.3M|    int8_t iPartIdx = iIdx8 + j * iPartW;
 1086|  37.3M|    uint8_t iScan4Idx = g_kuiScan4[iPartIdx];
 1087|  37.3M|    uint8_t iColocIdx = g_kuiScan4[iPartIdx];
 1088|  37.3M|    uint8_t iCacheIdx = g_kuiCache30ScanIdx[iPartIdx];
 1089|       |
 1090|  37.3M|    int16_t* mv = mvColoc[iColocIdx];
 1091|       |
 1092|  37.3M|    int16_t pMV[4] = { 0 };
 1093|  37.3M|    if (IS_SUB_8x8 (subMbType)) {
  ------------------
  |  |  321|  37.3M|#define IS_SUB_8x8(sub_type) (((sub_type)&SUB_MB_TYPE_8x8) != 0)
  |  |  ------------------
  |  |  |  |  294|  37.3M|#define SUB_MB_TYPE_8x8     0x00000001
  |  |  ------------------
  |  |  |  Branch (321:30): [True: 36.5M, False: 837k]
  |  |  ------------------
  ------------------
 1094|  36.5M|      if (!pCurDqLayer->iColocIntra[iColocIdx]) {
  ------------------
  |  Branch (1094:11): [True: 36.5M, False: 486]
  ------------------
 1095|  36.5M|        pMvDirect[LIST_0][0] = (pSlice->iMvScale[LIST_0][iRef[LIST_0]] * mv[0] + 128) >> 8;
 1096|  36.5M|        pMvDirect[LIST_0][1] = (pSlice->iMvScale[LIST_0][iRef[LIST_0]] * mv[1] + 128) >> 8;
 1097|  36.5M|      }
 1098|  36.5M|      ST32 (pMV, LD32 (pMvDirect[LIST_0]));
  ------------------
  |  |   67|  36.5M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1099|  36.5M|      ST32 ((pMV + 2), LD32 (pMvDirect[LIST_0]));
  ------------------
  |  |   67|  36.5M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1100|  36.5M|      ST64 (pCurDqLayer->pDec->pMv[LIST_0][iMbXy][iScan4Idx], LD64 (pMV));
  ------------------
  |  |   68|  36.5M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1101|  36.5M|      ST64 (pCurDqLayer->pDec->pMv[LIST_0][iMbXy][iScan4Idx + 4], LD64 (pMV));
  ------------------
  |  |   68|  36.5M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1102|  36.5M|      ST64 (pCurDqLayer->pMvd[LIST_0][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   68|  36.5M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1103|  36.5M|      ST64 (pCurDqLayer->pMvd[LIST_0][iMbXy][iScan4Idx + 4], 0);
  ------------------
  |  |   68|  36.5M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1104|  36.5M|      if (pMotionVector != NULL) {
  ------------------
  |  Branch (1104:11): [True: 14.1k, False: 36.4M]
  ------------------
 1105|  14.1k|        ST64 (pMotionVector[LIST_0][iCacheIdx], LD64 (pMV));
  ------------------
  |  |   68|  14.1k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1106|  14.1k|        ST64 (pMotionVector[LIST_0][iCacheIdx + 6], LD64 (pMV));
  ------------------
  |  |   68|  14.1k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1107|  14.1k|      }
 1108|  36.5M|      if (pMvdCache != NULL) {
  ------------------
  |  Branch (1108:11): [True: 5.24k, False: 36.4M]
  ------------------
 1109|  5.24k|        ST64 (pMvdCache[LIST_0][iCacheIdx], 0);
  ------------------
  |  |   68|  5.24k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1110|  5.24k|        ST64 (pMvdCache[LIST_0][iCacheIdx + 6], 0);
  ------------------
  |  |   68|  5.24k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1111|  5.24k|      }
 1112|  36.5M|      if (!pCurDqLayer->iColocIntra[g_kuiScan4[iIdx8]]) {
  ------------------
  |  Branch (1112:11): [True: 36.5M, False: 486]
  ------------------
 1113|  36.5M|        pMvDirect[LIST_1][0] = pMvDirect[LIST_0][0] - mv[0];
 1114|  36.5M|        pMvDirect[LIST_1][1] = pMvDirect[LIST_0][1] - mv[1];
 1115|  36.5M|      }
 1116|  36.5M|      ST32 (pMV, LD32 (pMvDirect[LIST_1]));
  ------------------
  |  |   67|  36.5M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1117|  36.5M|      ST32 ((pMV + 2), LD32 (pMvDirect[LIST_1]));
  ------------------
  |  |   67|  36.5M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1118|  36.5M|      ST64 (pCurDqLayer->pDec->pMv[LIST_1][iMbXy][iScan4Idx], LD64 (pMV));
  ------------------
  |  |   68|  36.5M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1119|  36.5M|      ST64 (pCurDqLayer->pDec->pMv[LIST_1][iMbXy][iScan4Idx + 4], LD64 (pMV));
  ------------------
  |  |   68|  36.5M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1120|  36.5M|      ST64 (pCurDqLayer->pMvd[LIST_1][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   68|  36.5M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1121|  36.5M|      ST64 (pCurDqLayer->pMvd[LIST_1][iMbXy][iScan4Idx + 4], 0);
  ------------------
  |  |   68|  36.5M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1122|  36.5M|      if (pMotionVector != NULL) {
  ------------------
  |  Branch (1122:11): [True: 14.1k, False: 36.4M]
  ------------------
 1123|  14.1k|        ST64 (pMotionVector[LIST_1][iCacheIdx], LD64 (pMV));
  ------------------
  |  |   68|  14.1k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1124|  14.1k|        ST64 (pMotionVector[LIST_1][iCacheIdx + 6], LD64 (pMV));
  ------------------
  |  |   68|  14.1k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1125|  14.1k|      }
 1126|  36.5M|      if (pMvdCache != NULL) {
  ------------------
  |  Branch (1126:11): [True: 5.24k, False: 36.4M]
  ------------------
 1127|  5.24k|        ST64 (pMvdCache[LIST_1][iCacheIdx], 0);
  ------------------
  |  |   68|  5.24k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1128|  5.24k|        ST64 (pMvdCache[LIST_1][iCacheIdx + 6], 0);
  ------------------
  |  |   68|  5.24k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1129|  5.24k|      }
 1130|  36.5M|    } else { //SUB_4x4
 1131|   837k|      if (!pCurDqLayer->iColocIntra[iColocIdx]) {
  ------------------
  |  Branch (1131:11): [True: 837k, False: 0]
  ------------------
 1132|   837k|        pMvDirect[LIST_0][0] = (pSlice->iMvScale[LIST_0][iRef[LIST_0]] * mv[0] + 128) >> 8;
 1133|   837k|        pMvDirect[LIST_0][1] = (pSlice->iMvScale[LIST_0][iRef[LIST_0]] * mv[1] + 128) >> 8;
 1134|   837k|      }
 1135|   837k|      ST32 (pCurDqLayer->pDec->pMv[LIST_0][iMbXy][iScan4Idx], LD32 (pMvDirect[LIST_0]));
  ------------------
  |  |   67|   837k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1136|   837k|      ST32 (pCurDqLayer->pMvd[LIST_0][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   67|   837k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1137|   837k|      if (pMotionVector != NULL) {
  ------------------
  |  Branch (1137:11): [True: 12.5k, False: 825k]
  ------------------
 1138|  12.5k|        ST32 (pMotionVector[LIST_0][iCacheIdx], LD32 (pMvDirect[LIST_0]));
  ------------------
  |  |   67|  12.5k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1139|  12.5k|      }
 1140|   837k|      if (pMvdCache != NULL) {
  ------------------
  |  Branch (1140:11): [True: 9.34k, False: 828k]
  ------------------
 1141|  9.34k|        ST32 (pMvdCache[LIST_0][iCacheIdx], 0);
  ------------------
  |  |   67|  9.34k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1142|  9.34k|      }
 1143|   837k|      if (!pCurDqLayer->iColocIntra[iColocIdx]) {
  ------------------
  |  Branch (1143:11): [True: 837k, False: 0]
  ------------------
 1144|   837k|        pMvDirect[LIST_1][0] = pMvDirect[LIST_0][0] - mv[0];
 1145|   837k|        pMvDirect[LIST_1][1] = pMvDirect[LIST_0][1] - mv[1];
 1146|   837k|      }
 1147|   837k|      ST32 (pCurDqLayer->pDec->pMv[LIST_1][iMbXy][iScan4Idx], LD32 (pMvDirect[LIST_1]));
  ------------------
  |  |   67|   837k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1148|   837k|      ST32 (pCurDqLayer->pMvd[LIST_1][iMbXy][iScan4Idx], 0);
  ------------------
  |  |   67|   837k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1149|   837k|      if (pMotionVector != NULL) {
  ------------------
  |  Branch (1149:11): [True: 12.5k, False: 825k]
  ------------------
 1150|  12.5k|        ST32 (pMotionVector[LIST_1][iCacheIdx], LD32 (pMvDirect[LIST_1]));
  ------------------
  |  |   67|  12.5k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1151|  12.5k|      }
 1152|   837k|      if (pMvdCache != NULL) {
  ------------------
  |  Branch (1152:11): [True: 9.34k, False: 828k]
  ------------------
 1153|  9.34k|        ST32 (pMvdCache[LIST_1][iCacheIdx], 0);
  ------------------
  |  |   67|  9.34k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1154|  9.34k|      }
 1155|   837k|    }
 1156|  37.3M|  }
 1157|  36.7M|}
_ZN7WelsDec13MapColToList0ERPNS_21TagWelsDecoderContextERKaRKi:
 1159|  36.7M|                      const int32_t& ref0Count) { //ISO/IEC 14496-10:2009(E) (8-193)
 1160|       |  //When reference is lost, this function must be skipped.
 1161|  36.7M|  if ((pCtx->iErrorCode & dsRefLost) == dsRefLost) {
  ------------------
  |  Branch (1161:7): [True: 36.5M, False: 214k]
  ------------------
 1162|  36.5M|    return 0;
 1163|  36.5M|  }
 1164|   214k|  PPicture pic1 = pCtx->sRefPic.pRefList[LIST_1][0];
 1165|   214k|  if (pic1 && pic1->pRefPic[LIST_0][colocRefIndexL0]) {
  ------------------
  |  Branch (1165:7): [True: 214k, False: 0]
  |  Branch (1165:15): [True: 105k, False: 109k]
  ------------------
 1166|   105k|    const int32_t iFramePoc = pic1->pRefPic[LIST_0][colocRefIndexL0]->iFramePoc;
 1167|   203k|    for (int32_t i = 0; i < ref0Count; i++) {
  ------------------
  |  Branch (1167:25): [True: 194k, False: 8.87k]
  ------------------
 1168|   194k|      if (pCtx->sRefPic.pRefList[LIST_0][i]->iFramePoc == iFramePoc) {
  ------------------
  |  Branch (1168:11): [True: 96.1k, False: 98.4k]
  ------------------
 1169|  96.1k|        return i;
 1170|  96.1k|      }
 1171|   194k|    }
 1172|   105k|  }
 1173|   118k|  return 0;
 1174|   214k|}
_ZN7WelsDec15Update8x8RefIdxERPNS_10TagDqLayerERKsRKiRKa:
 1175|   464k|void Update8x8RefIdx (PDqLayer& pCurDqLayer, const int16_t& iPartIdx, const int32_t& listIdx, const int8_t& iRef) {
 1176|   464k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
 1177|   464k|  const uint8_t iScan4Idx = g_kuiScan4[iPartIdx];
 1178|   464k|  pCurDqLayer->pDec->pRefIndex[listIdx][iMbXy][iScan4Idx] = pCurDqLayer->pDec->pRefIndex[listIdx][iMbXy][iScan4Idx + 1] =
 1179|   464k|        pCurDqLayer->pDec->pRefIndex[listIdx][iMbXy][iScan4Idx + 4] = pCurDqLayer->pDec->pRefIndex[listIdx][iMbXy][iScan4Idx +
 1180|   464k|            5] = iRef;
 1181|       |
 1182|   464k|}
mv_pred.cpp:_ZN7WelsDecL12SetRectBlockEPviiiji:
   49|  21.7M|                                  const int32_t size) {
   50|  21.7M|  uint8_t* p = (uint8_t*)vp;
   51|  21.7M|  w *= size;
   52|  21.7M|  if (w == 1 && h == 4) {
  ------------------
  |  Branch (52:7): [True: 0, False: 21.7M]
  |  Branch (52:17): [True: 0, False: 0]
  ------------------
   53|      0|    * (uint8_t*) (p + 0 * stride) =
   54|      0|      * (uint8_t*) (p + 1 * stride) =
   55|      0|        * (uint8_t*) (p + 2 * stride) =
   56|      0|          * (uint8_t*) (p + 3 * stride) = (uint8_t)val;
   57|  21.7M|  } else if (w == 2 && h == 2) {
  ------------------
  |  Branch (57:14): [True: 1.37M, False: 20.3M]
  |  Branch (57:24): [True: 1.37M, False: 0]
  ------------------
   58|  1.37M|    * (uint16_t*) (p + 0 * stride) =
   59|  1.37M|      * (uint16_t*) (p + 1 * stride) = size == 4 ? (uint16_t)val : (uint16_t) (val * 0x0101U);
  ------------------
  |  Branch (59:40): [True: 0, False: 1.37M]
  ------------------
   60|  20.3M|  } else if (w == 2 && h == 4) {
  ------------------
  |  Branch (60:14): [True: 0, False: 20.3M]
  |  Branch (60:24): [True: 0, False: 0]
  ------------------
   61|      0|    * (uint16_t*) (p + 0 * stride) =
   62|      0|      * (uint16_t*) (p + 1 * stride) =
   63|      0|        * (uint16_t*) (p + 2 * stride) =
   64|      0|          * (uint16_t*) (p + 3 * stride) = size == 4 ? (uint16_t)val : (uint16_t) (val * 0x0101U);
  ------------------
  |  Branch (64:44): [True: 0, False: 0]
  ------------------
   65|  20.3M|  } else if (w == 4 && h == 2) {
  ------------------
  |  Branch (65:14): [True: 18.9M, False: 1.37M]
  |  Branch (65:24): [True: 0, False: 18.9M]
  ------------------
   66|      0|    * (uint32_t*) (p + 0 * stride) =
   67|      0|      * (uint32_t*) (p + 1 * stride) = size == 4 ? val : (uint32_t) (val * 0x01010101UL);
  ------------------
  |  Branch (67:40): [True: 0, False: 0]
  ------------------
   68|  20.3M|  } else if (w == 4 && h == 4) {
  ------------------
  |  Branch (68:14): [True: 18.9M, False: 1.37M]
  |  Branch (68:24): [True: 18.9M, False: 0]
  ------------------
   69|  18.9M|    * (uint32_t*) (p + 0 * stride) =
   70|  18.9M|      * (uint32_t*) (p + 1 * stride) =
   71|  18.9M|        * (uint32_t*) (p + 2 * stride) =
   72|  18.9M|          * (uint32_t*) (p + 3 * stride) = size == 4 ? val : (uint32_t) (val * 0x01010101UL);
  ------------------
  |  Branch (72:44): [True: 0, False: 18.9M]
  ------------------
   73|  18.9M|  } else if (w == 8 && h == 1) {
  ------------------
  |  Branch (73:14): [True: 1.37M, False: 0]
  |  Branch (73:24): [True: 0, False: 1.37M]
  ------------------
   74|      0|    * (uint32_t*) (p + 0 * stride) =
   75|      0|      * (uint32_t*) (p + 0 * stride + 4) = size == 4 ? val : (uint32_t) (val * 0x01010101UL);
  ------------------
  |  Branch (75:44): [True: 0, False: 0]
  ------------------
   76|  1.37M|  } else if (w == 8 && h == 2) {
  ------------------
  |  Branch (76:14): [True: 1.37M, False: 0]
  |  Branch (76:24): [True: 1.37M, False: 0]
  ------------------
   77|  1.37M|    * (uint32_t*) (p + 0 * stride) =
   78|  1.37M|      * (uint32_t*) (p + 0 * stride + 4) =
   79|  1.37M|        * (uint32_t*) (p + 1 * stride) =
   80|  1.37M|          * (uint32_t*) (p + 1 * stride + 4) = size == 4 ? val : (uint32_t) (val * 0x01010101UL);
  ------------------
  |  Branch (80:48): [True: 1.37M, False: 0]
  ------------------
   81|  1.37M|  } else if (w == 8 && h == 4) {
  ------------------
  |  Branch (81:14): [True: 0, False: 0]
  |  Branch (81:24): [True: 0, False: 0]
  ------------------
   82|      0|    * (uint32_t*) (p + 0 * stride) =
   83|      0|      * (uint32_t*) (p + 0 * stride + 4) =
   84|      0|        * (uint32_t*) (p + 1 * stride) =
   85|      0|          * (uint32_t*) (p + 1 * stride + 4) =
   86|      0|            * (uint32_t*) (p + 2 * stride) =
   87|      0|              * (uint32_t*) (p + 2 * stride + 4) =
   88|      0|                * (uint32_t*) (p + 3 * stride) =
   89|      0|                  * (uint32_t*) (p + 3 * stride + 4) = size == 4 ? val : (uint32_t) (val * 0x01010101UL);
  ------------------
  |  Branch (89:56): [True: 0, False: 0]
  ------------------
   90|      0|  } else if (w == 16 && h == 2) {
  ------------------
  |  Branch (90:14): [True: 0, False: 0]
  |  Branch (90:25): [True: 0, False: 0]
  ------------------
   91|      0|    * (uint32_t*) (p + 0 * stride + 0) =
   92|      0|      * (uint32_t*) (p + 0 * stride + 4) =
   93|      0|        * (uint32_t*) (p + 0 * stride + 8) =
   94|      0|          * (uint32_t*) (p + 0 * stride + 12) =
   95|      0|            * (uint32_t*) (p + 1 * stride + 0) =
   96|      0|              * (uint32_t*) (p + 1 * stride + 4) =
   97|      0|                * (uint32_t*) (p + 1 * stride + 8) =
   98|      0|                  * (uint32_t*) (p + 1 * stride + 12) = size == 4 ? val : (uint32_t) (val * 0x01010101UL);
  ------------------
  |  Branch (98:57): [True: 0, False: 0]
  ------------------
   99|      0|  } else if (w == 16 && h == 3) {
  ------------------
  |  Branch (99:14): [True: 0, False: 0]
  |  Branch (99:25): [True: 0, False: 0]
  ------------------
  100|      0|    * (uint32_t*) (p + 0 * stride + 0) =
  101|      0|      * (uint32_t*) (p + 0 * stride + 4) =
  102|      0|        * (uint32_t*) (p + 0 * stride + 8) =
  103|      0|          * (uint32_t*) (p + 0 * stride + 12) =
  104|      0|            * (uint32_t*) (p + 1 * stride + 0) =
  105|      0|              * (uint32_t*) (p + 1 * stride + 4) =
  106|      0|                * (uint32_t*) (p + 1 * stride + 8) =
  107|      0|                  * (uint32_t*) (p + 1 * stride + 12) =
  108|      0|                    * (uint32_t*) (p + 2 * stride + 0) =
  109|      0|                      * (uint32_t*) (p + 2 * stride + 4) =
  110|      0|                        * (uint32_t*) (p + 2 * stride + 8) =
  111|      0|                          * (uint32_t*) (p + 2 * stride + 12) = size == 4 ? val : (uint32_t) (val * 0x01010101UL);
  ------------------
  |  Branch (111:65): [True: 0, False: 0]
  ------------------
  112|      0|  } else if (w == 16 && h == 4) {
  ------------------
  |  Branch (112:14): [True: 0, False: 0]
  |  Branch (112:25): [True: 0, False: 0]
  ------------------
  113|      0|    * (uint32_t*) (p + 0 * stride + 0) =
  114|      0|      * (uint32_t*) (p + 0 * stride + 4) =
  115|      0|        * (uint32_t*) (p + 0 * stride + 8) =
  116|      0|          * (uint32_t*) (p + 0 * stride + 12) =
  117|      0|            * (uint32_t*) (p + 1 * stride + 0) =
  118|      0|              * (uint32_t*) (p + 1 * stride + 4) =
  119|      0|                * (uint32_t*) (p + 1 * stride + 8) =
  120|      0|                  * (uint32_t*) (p + 1 * stride + 12) =
  121|      0|                    * (uint32_t*) (p + 2 * stride + 0) =
  122|      0|                      * (uint32_t*) (p + 2 * stride + 4) =
  123|      0|                        * (uint32_t*) (p + 2 * stride + 8) =
  124|      0|                          * (uint32_t*) (p + 2 * stride + 12) =
  125|      0|                            * (uint32_t*) (p + 3 * stride + 0) =
  126|      0|                              * (uint32_t*) (p + 3 * stride + 4) =
  127|      0|                                * (uint32_t*) (p + 3 * stride + 8) =
  128|      0|                                  * (uint32_t*) (p + 3 * stride + 12) = size == 4 ? val : (uint32_t) (val * 0x01010101UL);
  ------------------
  |  Branch (128:73): [True: 0, False: 0]
  ------------------
  129|      0|  }
  130|  21.7M|}

_ZN7WelsDec22UpdateP16x8RefIdxCabacEPNS_10TagDqLayerEPA30_aiaa:
  105|   104k|                             const int8_t iListIdx) {
  106|   104k|  uint32_t iRef32Bit = (uint32_t) iRef;
  107|   104k|  const int32_t iRef4Bytes = (iRef32Bit << 24) | (iRef32Bit << 16) | (iRef32Bit << 8) | iRef32Bit;
  108|   104k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  109|   104k|  const uint8_t iScan4Idx = g_kuiScan4[iPartIdx];
  110|   104k|  const uint8_t iScan4Idx4 = 4 + iScan4Idx;
  111|   104k|  const uint8_t iCacheIdx = g_kuiCache30ScanIdx[iPartIdx];
  112|   104k|  const uint8_t iCacheIdx6 = 6 + iCacheIdx;
  113|       |  //mb
  114|   104k|  ST32 (&pCurDqLayer->pDec->pRefIndex[iListIdx][iMbXy][iScan4Idx ], iRef4Bytes);
  ------------------
  |  |   67|   104k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  115|   104k|  ST32 (&pCurDqLayer->pDec->pRefIndex[iListIdx][iMbXy][iScan4Idx4], iRef4Bytes);
  ------------------
  |  |   67|   104k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  116|       |  //cache
  117|   104k|  ST32 (&pRefIndex[iListIdx][iCacheIdx ], iRef4Bytes);
  ------------------
  |  |   67|   104k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  118|   104k|  ST32 (&pRefIndex[iListIdx][iCacheIdx6], iRef4Bytes);
  ------------------
  |  |   67|   104k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  119|   104k|}
_ZN7WelsDec22UpdateP8x16RefIdxCabacEPNS_10TagDqLayerEPA30_aiaa:
  122|  64.8k|                             const int8_t iListIdx) {
  123|  64.8k|  uint16_t iRef16Bit = (uint16_t) iRef;
  124|  64.8k|  const int16_t iRef2Bytes = (iRef16Bit << 8) | iRef16Bit;
  125|  64.8k|  int32_t i;
  126|  64.8k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  127|   194k|  for (i = 0; i < 2; i++, iPartIdx += 8) {
  ------------------
  |  Branch (127:15): [True: 129k, False: 64.8k]
  ------------------
  128|   129k|    const uint8_t iScan4Idx = g_kuiScan4[iPartIdx];
  129|   129k|    const uint8_t iCacheIdx = g_kuiCache30ScanIdx[iPartIdx];
  130|   129k|    const uint8_t iScan4Idx4 = 4 + iScan4Idx;
  131|   129k|    const uint8_t iCacheIdx6 = 6 + iCacheIdx;
  132|       |    //mb
  133|   129k|    ST16 (&pCurDqLayer->pDec->pRefIndex[iListIdx][iMbXy][iScan4Idx ], iRef2Bytes);
  ------------------
  |  |   66|   129k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  134|   129k|    ST16 (&pCurDqLayer->pDec->pRefIndex[iListIdx][iMbXy][iScan4Idx4], iRef2Bytes);
  ------------------
  |  |   66|   129k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  135|       |    //cache
  136|   129k|    ST16 (&pRefIndex[iListIdx][iCacheIdx ], iRef2Bytes);
  ------------------
  |  |   66|   129k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  137|   129k|    ST16 (&pRefIndex[iListIdx][iCacheIdx6], iRef2Bytes);
  ------------------
  |  |   66|   129k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  138|   129k|  }
  139|  64.8k|}
_ZN7WelsDec21UpdateP8x8RefIdxCabacEPNS_10TagDqLayerEPA30_aiaa:
  142|  76.0M|                            const int8_t iListIdx) {
  143|  76.0M|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  144|  76.0M|  const uint8_t iScan4Idx = g_kuiScan4[iPartIdx];
  145|  76.0M|  pCurDqLayer->pDec->pRefIndex[iListIdx][iMbXy][iScan4Idx] = pCurDqLayer->pDec->pRefIndex[iListIdx][iMbXy][iScan4Idx + 1]
  146|  76.0M|      =
  147|  76.0M|        pCurDqLayer->pDec->pRefIndex[iListIdx][iMbXy][iScan4Idx + 4] = pCurDqLayer->pDec->pRefIndex[iListIdx][iMbXy][iScan4Idx +
  148|  76.0M|            5] = iRef;
  149|  76.0M|}
_ZN7WelsDec21UpdateP8x8DirectCabacEPNS_10TagDqLayerEi:
  151|  37.9M|void UpdateP8x8DirectCabac (PDqLayer pCurDqLayer, int32_t iPartIdx) {
  152|  37.9M|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  153|  37.9M|  const uint8_t iScan4Idx = g_kuiScan4[iPartIdx];
  154|  37.9M|  pCurDqLayer->pDirect[iMbXy][iScan4Idx] = pCurDqLayer->pDirect[iMbXy][iScan4Idx + 1] =
  155|  37.9M|        pCurDqLayer->pDirect[iMbXy][iScan4Idx + 4] = pCurDqLayer->pDirect[iMbXy][iScan4Idx + 5] = 1;
  156|  37.9M|}
_ZN7WelsDec23UpdateP16x16DirectCabacEPNS_10TagDqLayerE:
  158|  47.7k|void UpdateP16x16DirectCabac (PDqLayer pCurDqLayer) {
  159|  47.7k|  int32_t i;
  160|  47.7k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  161|  47.7k|  const int16_t direct = (1 << 8) | 1;
  162|   238k|  for (i = 0; i < 16; i += 4) {
  ------------------
  |  Branch (162:15): [True: 190k, False: 47.7k]
  ------------------
  163|   190k|    const uint8_t kuiScan4Idx = g_kuiScan4[i];
  164|   190k|    const uint8_t kuiScan4IdxPlus4 = 4 + kuiScan4Idx;
  165|   190k|    ST16 (&pCurDqLayer->pDirect[iMbXy][kuiScan4Idx], direct);
  ------------------
  |  |   66|   190k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  166|   190k|    ST16 (&pCurDqLayer->pDirect[iMbXy][kuiScan4IdxPlus4], direct);
  ------------------
  |  |   66|   190k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  167|   190k|  }
  168|  47.7k|}
_ZN7WelsDec20UpdateP16x16MvdCabacEPNS_10TagDqLayerEPsa:
  170|   286k|void UpdateP16x16MvdCabac (SDqLayer* pCurDqLayer, int16_t pMvd[2], const int8_t iListIdx) {
  171|   286k|  int32_t pMvd32[2];
  172|   286k|  ST32 (&pMvd32[0], LD32 (pMvd));
  ------------------
  |  |   67|   286k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  173|   286k|  ST32 (&pMvd32[1], LD32 (pMvd));
  ------------------
  |  |   67|   286k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  174|   286k|  int32_t i;
  175|   286k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  176|  2.57M|  for (i = 0; i < 16; i += 2) {
  ------------------
  |  Branch (176:15): [True: 2.29M, False: 286k]
  ------------------
  177|  2.29M|    ST64 (pCurDqLayer->pMvd[iListIdx][iMbXy][i], LD64 (pMvd32));
  ------------------
  |  |   68|  2.29M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  178|  2.29M|  }
  179|   286k|}
_ZN7WelsDec19UpdateP16x8MvdCabacEPNS_10TagDqLayerEPA30_A2_siPsa:
  182|  98.7k|                          const int8_t iListIdx) {
  183|  98.7k|  int32_t pMvd32[2];
  184|  98.7k|  ST32 (&pMvd32[0], LD32 (pMvd));
  ------------------
  |  |   67|  98.7k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  185|  98.7k|  ST32 (&pMvd32[1], LD32 (pMvd));
  ------------------
  |  |   67|  98.7k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  186|  98.7k|  int32_t i;
  187|  98.7k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  188|   296k|  for (i = 0; i < 2; i++, iPartIdx += 4) {
  ------------------
  |  Branch (188:15): [True: 197k, False: 98.7k]
  ------------------
  189|   197k|    const uint8_t iScan4Idx = g_kuiScan4[iPartIdx];
  190|   197k|    const uint8_t iScan4Idx4 = 4 + iScan4Idx;
  191|   197k|    const uint8_t iCacheIdx = g_kuiCache30ScanIdx[iPartIdx];
  192|   197k|    const uint8_t iCacheIdx6 = 6 + iCacheIdx;
  193|       |    //mb
  194|   197k|    ST64 (pCurDqLayer->pMvd[iListIdx][iMbXy][  iScan4Idx ], LD64 (pMvd32));
  ------------------
  |  |   68|   197k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  195|   197k|    ST64 (pCurDqLayer->pMvd[iListIdx][iMbXy][  iScan4Idx4], LD64 (pMvd32));
  ------------------
  |  |   68|   197k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  196|       |    //cache
  197|   197k|    ST64 (pMvdCache[iListIdx][  iCacheIdx ], LD64 (pMvd32));
  ------------------
  |  |   68|   197k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  198|   197k|    ST64 (pMvdCache[iListIdx][  iCacheIdx6], LD64 (pMvd32));
  ------------------
  |  |   68|   197k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  199|   197k|  }
  200|  98.7k|}
_ZN7WelsDec19UpdateP8x16MvdCabacEPNS_10TagDqLayerEPA30_A2_siPsa:
  203|  57.8k|                          const int8_t iListIdx) {
  204|  57.8k|  int32_t pMvd32[2];
  205|  57.8k|  ST32 (&pMvd32[0], LD32 (pMvd));
  ------------------
  |  |   67|  57.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  206|  57.8k|  ST32 (&pMvd32[1], LD32 (pMvd));
  ------------------
  |  |   67|  57.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  207|  57.8k|  int32_t i;
  208|  57.8k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  209|       |
  210|   173k|  for (i = 0; i < 2; i++, iPartIdx += 8) {
  ------------------
  |  Branch (210:15): [True: 115k, False: 57.8k]
  ------------------
  211|   115k|    const uint8_t iScan4Idx = g_kuiScan4[iPartIdx];
  212|   115k|    const uint8_t iCacheIdx = g_kuiCache30ScanIdx[iPartIdx];
  213|   115k|    const uint8_t iScan4Idx4 = 4 + iScan4Idx;
  214|   115k|    const uint8_t iCacheIdx6 = 6 + iCacheIdx;
  215|       |    //mb
  216|   115k|    ST64 (pCurDqLayer->pMvd[iListIdx][iMbXy][  iScan4Idx ], LD64 (pMvd32));
  ------------------
  |  |   68|   115k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  217|   115k|    ST64 (pCurDqLayer->pMvd[iListIdx][iMbXy][  iScan4Idx4], LD64 (pMvd32));
  ------------------
  |  |   68|   115k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  218|       |    //cache
  219|   115k|    ST64 (pMvdCache[iListIdx][  iCacheIdx ], LD64 (pMvd32));
  ------------------
  |  |   68|   115k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  220|   115k|    ST64 (pMvdCache[iListIdx][  iCacheIdx6], LD64 (pMvd32));
  ------------------
  |  |   68|   115k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  221|   115k|  }
  222|  57.8k|}
_ZN7WelsDec20ParseEndOfSliceCabacEPNS_21TagWelsDecoderContextERj:
  224|  1.91M|int32_t ParseEndOfSliceCabac (PWelsDecoderContext pCtx, uint32_t& uiBinVal) {
  225|  1.91M|  uiBinVal = 0;
  226|  1.91M|  WELS_READ_VERIFY (DecodeTerminateCabac (pCtx->pCabacDecEngine, uiBinVal));
  ------------------
  |  |   52|  1.91M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.91M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.91M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.41k, False: 1.91M]
  |  |  ------------------
  |  |   55|  1.91M|    return uiRetTmp; \
  |  |   56|  1.91M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.91M]
  |  |  ------------------
  ------------------
  227|  1.91M|  return ERR_NONE;
  228|  1.91M|}
_ZN7WelsDec18ParseSkipFlagCabacEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailERj:
  230|  1.91M|int32_t ParseSkipFlagCabac (PWelsDecoderContext pCtx, PWelsNeighAvail pNeighAvail, uint32_t& uiSkip) {
  231|  1.91M|  uiSkip = 0;
  232|  1.91M|  int32_t iCtxInc = NEW_CTX_OFFSET_SKIP;
  ------------------
  |  |   84|  1.91M|#define NEW_CTX_OFFSET_SKIP 11
  ------------------
  233|  1.91M|  iCtxInc += (pNeighAvail->iLeftAvail && !IS_SKIP (pNeighAvail->iLeftType)) + (pNeighAvail->iTopAvail
  ------------------
  |  |  315|  1.49M|#define IS_SKIP(type) ( ((type)&MB_TYPE_SKIP) != 0 )
  |  |  ------------------
  |  |  |  |  283|  1.49M|#define MB_TYPE_SKIP        0x00000100
  |  |  ------------------
  ------------------
  |  Branch (233:15): [True: 1.49M, False: 421k]
  |  Branch (233:42): [True: 238k, False: 1.25M]
  |  Branch (233:80): [True: 1.56M, False: 350k]
  ------------------
  234|  1.56M|             && !IS_SKIP (pNeighAvail->iTopType));
  ------------------
  |  |  315|  1.56M|#define IS_SKIP(type) ( ((type)&MB_TYPE_SKIP) != 0 )
  |  |  ------------------
  |  |  |  |  283|  1.56M|#define MB_TYPE_SKIP        0x00000100
  |  |  ------------------
  ------------------
  |  Branch (234:17): [True: 148k, False: 1.41M]
  ------------------
  235|  1.91M|  if (B_SLICE == pCtx->eSliceType)
  ------------------
  |  Branch (235:7): [True: 179k, False: 1.73M]
  ------------------
  236|   179k|    iCtxInc += 13;
  237|  1.91M|  PWelsCabacCtx pBinCtx = (pCtx->pCabacCtx + iCtxInc);
  238|  1.91M|  WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pBinCtx, uiSkip));
  ------------------
  |  |   52|  1.91M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.91M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.91M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 763, False: 1.91M]
  |  |  ------------------
  |  |   55|  1.91M|    return uiRetTmp; \
  |  |   56|  1.91M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.91M]
  |  |  ------------------
  ------------------
  239|  1.91M|  return ERR_NONE;
  240|  1.91M|}
_ZN7WelsDec22ParseMBTypeISliceCabacEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailERj:
  243|   100k|int32_t ParseMBTypeISliceCabac (PWelsDecoderContext pCtx, PWelsNeighAvail pNeighAvail, uint32_t& uiBinVal) {
  244|   100k|  uint32_t uiCode;
  245|   100k|  int32_t iIdxA = 0, iIdxB = 0;
  246|   100k|  int32_t iCtxInc;
  247|   100k|  uiBinVal = 0;
  248|   100k|  PWelsCabacDecEngine pCabacDecEngine = pCtx->pCabacDecEngine;
  249|   100k|  PWelsCabacCtx pBinCtx = pCtx->pCabacCtx + NEW_CTX_OFFSET_MB_TYPE_I; //I mode in I slice
  ------------------
  |  |   83|   100k|#define NEW_CTX_OFFSET_MB_TYPE_I 3
  ------------------
  250|   100k|  iIdxA = (pNeighAvail->iLeftAvail) && (pNeighAvail->iLeftType != MB_TYPE_INTRA4x4
  ------------------
  |  |  275|   143k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
  |  Branch (250:11): [True: 71.6k, False: 28.8k]
  |  Branch (250:41): [True: 67.5k, False: 4.09k]
  ------------------
  251|  67.5k|                                        && pNeighAvail->iLeftType != MB_TYPE_INTRA8x8);
  ------------------
  |  |  277|  67.5k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
  |  Branch (251:44): [True: 14.0k, False: 53.5k]
  ------------------
  252|   100k|  iIdxB = (pNeighAvail->iTopAvail) && (pNeighAvail->iTopType != MB_TYPE_INTRA4x4
  ------------------
  |  |  275|  73.2k|#define MB_TYPE_INTRA4x4    0x00000001
  ------------------
  |  Branch (252:11): [True: 36.6k, False: 63.8k]
  |  Branch (252:40): [True: 34.1k, False: 2.42k]
  ------------------
  253|  34.1k|                                       && pNeighAvail->iTopType != MB_TYPE_INTRA8x8);
  ------------------
  |  |  277|  34.1k|#define MB_TYPE_INTRA8x8    0x00000004
  ------------------
  |  Branch (253:43): [True: 6.74k, False: 27.4k]
  ------------------
  254|   100k|  iCtxInc = iIdxA + iIdxB;
  255|   100k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + iCtxInc, uiCode));
  ------------------
  |  |   52|   100k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   100k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   100k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 228, False: 100k]
  |  |  ------------------
  |  |   55|   100k|    return uiRetTmp; \
  |  |   56|   100k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 100k]
  |  |  ------------------
  ------------------
  256|   100k|  uiBinVal = uiCode;
  257|   100k|  if (uiBinVal != 0) {  //I16x16
  ------------------
  |  Branch (257:7): [True: 25.0k, False: 75.2k]
  ------------------
  258|  25.0k|    WELS_READ_VERIFY (DecodeTerminateCabac (pCabacDecEngine, uiCode));
  ------------------
  |  |   52|  25.0k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  25.0k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  25.0k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 241, False: 24.7k]
  |  |  ------------------
  |  |   55|  25.0k|    return uiRetTmp; \
  |  |   56|  25.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 24.7k]
  |  |  ------------------
  ------------------
  259|  24.7k|    if (uiCode == 1)
  ------------------
  |  Branch (259:9): [True: 2.07k, False: 22.7k]
  ------------------
  260|  2.07k|      uiBinVal = 25; //I_PCM
  261|  22.7k|    else {
  262|  22.7k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 3, uiCode));
  ------------------
  |  |   52|  22.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  22.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  22.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 207, False: 22.4k]
  |  |  ------------------
  |  |   55|  22.7k|    return uiRetTmp; \
  |  |   56|  22.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  263|  22.4k|      uiBinVal = 1 + uiCode * 12;
  264|       |      //decoding of uiCbp:0,1,2
  265|  22.4k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 4, uiCode));
  ------------------
  |  |   52|  22.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  22.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  22.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 202, False: 22.2k]
  |  |  ------------------
  |  |   55|  22.4k|    return uiRetTmp; \
  |  |   56|  22.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 22.2k]
  |  |  ------------------
  ------------------
  266|  22.2k|      if (uiCode != 0) {
  ------------------
  |  Branch (266:11): [True: 8.35k, False: 13.9k]
  ------------------
  267|  8.35k|        WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 5, uiCode));
  ------------------
  |  |   52|  8.35k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  8.35k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  8.35k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 200, False: 8.15k]
  |  |  ------------------
  |  |   55|  8.35k|    return uiRetTmp; \
  |  |   56|  8.35k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 8.15k]
  |  |  ------------------
  ------------------
  268|  8.15k|        uiBinVal += 4;
  269|  8.15k|        if (uiCode != 0)
  ------------------
  |  Branch (269:13): [True: 5.52k, False: 2.63k]
  ------------------
  270|  5.52k|          uiBinVal += 4;
  271|  8.15k|      }
  272|       |      //decoding of I pred-mode: 0,1,2,3
  273|  22.0k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 6, uiCode));
  ------------------
  |  |   52|  22.0k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  22.0k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  22.0k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 203, False: 21.8k]
  |  |  ------------------
  |  |   55|  22.0k|    return uiRetTmp; \
  |  |   56|  22.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 21.8k]
  |  |  ------------------
  ------------------
  274|  21.8k|      uiBinVal += (uiCode << 1);
  275|  21.8k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 7, uiCode));
  ------------------
  |  |   52|  21.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  21.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  21.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 210, False: 21.6k]
  |  |  ------------------
  |  |   55|  21.8k|    return uiRetTmp; \
  |  |   56|  21.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 21.6k]
  |  |  ------------------
  ------------------
  276|  21.6k|      uiBinVal += uiCode;
  277|  21.6k|    }
  278|  24.7k|  }
  279|       |  //I4x4
  280|  98.9k|  return ERR_NONE;
  281|   100k|}
_ZN7WelsDec22ParseMBTypePSliceCabacEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailERj:
  283|   226k|int32_t ParseMBTypePSliceCabac (PWelsDecoderContext pCtx, PWelsNeighAvail pNeighAvail, uint32_t& uiMbType) {
  284|   226k|  uint32_t uiCode;
  285|   226k|  uiMbType = 0;
  286|   226k|  PWelsCabacDecEngine pCabacDecEngine = pCtx->pCabacDecEngine;
  287|       |
  288|   226k|  PWelsCabacCtx pBinCtx = pCtx->pCabacCtx + NEW_CTX_OFFSET_SKIP;
  ------------------
  |  |   84|   226k|#define NEW_CTX_OFFSET_SKIP 11
  ------------------
  289|   226k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 3, uiCode));
  ------------------
  |  |   52|   226k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   226k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   226k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 291, False: 226k]
  |  |  ------------------
  |  |   55|   226k|    return uiRetTmp; \
  |  |   56|   226k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 226k]
  |  |  ------------------
  ------------------
  290|   226k|  if (uiCode) {
  ------------------
  |  Branch (290:7): [True: 34.8k, False: 191k]
  ------------------
  291|       |    // Intra MB
  292|  34.8k|    WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 6, uiCode));
  ------------------
  |  |   52|  34.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  34.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  34.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 231, False: 34.5k]
  |  |  ------------------
  |  |   55|  34.8k|    return uiRetTmp; \
  |  |   56|  34.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 34.5k]
  |  |  ------------------
  ------------------
  293|  34.5k|    if (uiCode) { // Intra 16x16
  ------------------
  |  Branch (293:9): [True: 20.2k, False: 14.3k]
  ------------------
  294|  20.2k|      WELS_READ_VERIFY (DecodeTerminateCabac (pCabacDecEngine, uiCode));
  ------------------
  |  |   52|  20.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  20.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  20.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 226, False: 20.0k]
  |  |  ------------------
  |  |   55|  20.2k|    return uiRetTmp; \
  |  |   56|  20.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 20.0k]
  |  |  ------------------
  ------------------
  295|  20.0k|      if (uiCode) {
  ------------------
  |  Branch (295:11): [True: 2.38k, False: 17.6k]
  ------------------
  296|  2.38k|        uiMbType = 30;
  297|  2.38k|        return ERR_NONE;//MB_TYPE_INTRA_PCM;
  298|  2.38k|      }
  299|       |
  300|  17.6k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 7, uiCode));
  ------------------
  |  |   52|  17.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  17.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  17.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 212, False: 17.4k]
  |  |  ------------------
  |  |   55|  17.6k|    return uiRetTmp; \
  |  |   56|  17.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 17.4k]
  |  |  ------------------
  ------------------
  301|  17.4k|      uiMbType = 6 + uiCode * 12;
  302|       |
  303|       |      //uiCbp: 0,1,2
  304|  17.4k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 8, uiCode));
  ------------------
  |  |   52|  17.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  17.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  17.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 215, False: 17.2k]
  |  |  ------------------
  |  |   55|  17.4k|    return uiRetTmp; \
  |  |   56|  17.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 17.2k]
  |  |  ------------------
  ------------------
  305|  17.2k|      if (uiCode) {
  ------------------
  |  Branch (305:11): [True: 2.05k, False: 15.1k]
  ------------------
  306|  2.05k|        uiMbType += 4;
  307|  2.05k|        WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 8, uiCode));
  ------------------
  |  |   52|  2.05k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.05k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.05k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 362, False: 1.69k]
  |  |  ------------------
  |  |   55|  2.05k|    return uiRetTmp; \
  |  |   56|  2.05k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.69k]
  |  |  ------------------
  ------------------
  308|  1.69k|        if (uiCode)
  ------------------
  |  Branch (308:13): [True: 998, False: 695]
  ------------------
  309|    998|          uiMbType += 4;
  310|  1.69k|      }
  311|       |
  312|       |      //IPredMode: 0,1,2,3
  313|  16.8k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 9, uiCode));
  ------------------
  |  |   52|  16.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  16.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  16.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 684, False: 16.1k]
  |  |  ------------------
  |  |   55|  16.8k|    return uiRetTmp; \
  |  |   56|  16.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 16.1k]
  |  |  ------------------
  ------------------
  314|  16.1k|      uiMbType += (uiCode << 1);
  315|  16.1k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 9, uiCode));
  ------------------
  |  |   52|  16.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  16.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  16.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 198, False: 15.9k]
  |  |  ------------------
  |  |   55|  16.1k|    return uiRetTmp; \
  |  |   56|  16.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 15.9k]
  |  |  ------------------
  ------------------
  316|  15.9k|      uiMbType += uiCode;
  317|  15.9k|    } else
  318|       |      // Intra 4x4
  319|  14.3k|      uiMbType = 5;
  320|   191k|  } else { // P MB
  321|   191k|    WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 4, uiCode));
  ------------------
  |  |   52|   191k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   191k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   191k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 274, False: 191k]
  |  |  ------------------
  |  |   55|   191k|    return uiRetTmp; \
  |  |   56|   191k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 191k]
  |  |  ------------------
  ------------------
  322|   191k|    if (uiCode) { //second bit
  ------------------
  |  Branch (322:9): [True: 27.8k, False: 163k]
  ------------------
  323|  27.8k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 6, uiCode));
  ------------------
  |  |   52|  27.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  27.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  27.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 350, False: 27.5k]
  |  |  ------------------
  |  |   55|  27.8k|    return uiRetTmp; \
  |  |   56|  27.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 27.5k]
  |  |  ------------------
  ------------------
  324|  27.5k|      if (uiCode)
  ------------------
  |  Branch (324:11): [True: 15.7k, False: 11.8k]
  ------------------
  325|  15.7k|        uiMbType = 1;
  326|  11.8k|      else
  327|  11.8k|        uiMbType = 2;
  328|   163k|    } else {
  329|   163k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 5, uiCode));
  ------------------
  |  |   52|   163k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   163k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   163k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 356, False: 163k]
  |  |  ------------------
  |  |   55|   163k|    return uiRetTmp; \
  |  |   56|   163k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 163k]
  |  |  ------------------
  ------------------
  330|   163k|      if (uiCode)
  ------------------
  |  Branch (330:11): [True: 30.2k, False: 132k]
  ------------------
  331|  30.2k|        uiMbType = 3;
  332|   132k|      else
  333|   132k|        uiMbType = 0;
  334|   163k|    }
  335|   191k|  }
  336|   221k|  return ERR_NONE;
  337|   226k|}
_ZN7WelsDec22ParseMBTypeBSliceCabacEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailERj:
  339|   146k|int32_t ParseMBTypeBSliceCabac (PWelsDecoderContext pCtx, PWelsNeighAvail pNeighAvail, uint32_t& uiMbType) {
  340|   146k|  uint32_t uiCode;
  341|   146k|  uiMbType = 0;
  342|   146k|  int32_t iIdxA = 0, iIdxB = 0;
  343|   146k|  int32_t iCtxInc;
  344|       |
  345|   146k|  PWelsCabacDecEngine pCabacDecEngine = pCtx->pCabacDecEngine;
  346|   146k|  PWelsCabacCtx pBinCtx = pCtx->pCabacCtx + 27; //B slice
  347|       |
  348|   146k|  iIdxA = (pNeighAvail->iLeftAvail) && !IS_DIRECT (pNeighAvail->iLeftType);
  ------------------
  |  |  316|   238k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|  91.5k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  ------------------
  |  Branch (348:11): [True: 91.5k, False: 54.9k]
  |  Branch (348:40): [True: 85.2k, False: 6.27k]
  ------------------
  349|   146k|  iIdxB = (pNeighAvail->iTopAvail) && !IS_DIRECT (pNeighAvail->iTopType);
  ------------------
  |  |  316|   173k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|  27.4k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  ------------------
  |  Branch (349:11): [True: 27.4k, False: 119k]
  |  Branch (349:39): [True: 23.1k, False: 4.32k]
  ------------------
  350|       |
  351|   146k|  iCtxInc = iIdxA + iIdxB;
  352|   146k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + iCtxInc, uiCode));
  ------------------
  |  |   52|   146k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   146k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   146k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 225, False: 146k]
  |  |  ------------------
  |  |   55|   146k|    return uiRetTmp; \
  |  |   56|   146k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 146k]
  |  |  ------------------
  ------------------
  353|   146k|  if (!uiCode)
  ------------------
  |  Branch (353:7): [True: 5.34k, False: 140k]
  ------------------
  354|  5.34k|    uiMbType = 0; // Bi_Direct
  355|   140k|  else {
  356|   140k|    WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 3, uiCode));
  ------------------
  |  |   52|   140k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   140k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   140k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 226, False: 140k]
  |  |  ------------------
  |  |   55|   140k|    return uiRetTmp; \
  |  |   56|   140k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 140k]
  |  |  ------------------
  ------------------
  357|   140k|    if (!uiCode) {
  ------------------
  |  Branch (357:9): [True: 30.9k, False: 109k]
  ------------------
  358|  30.9k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 5, uiCode));
  ------------------
  |  |   52|  30.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  30.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  30.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 236, False: 30.7k]
  |  |  ------------------
  |  |   55|  30.9k|    return uiRetTmp; \
  |  |   56|  30.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 30.7k]
  |  |  ------------------
  ------------------
  359|  30.7k|      uiMbType = 1 + uiCode; // 16x16 L0L1
  360|   109k|    } else {
  361|   109k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 4, uiCode));
  ------------------
  |  |   52|   109k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   109k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   109k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 279, False: 109k]
  |  |  ------------------
  |  |   55|   109k|    return uiRetTmp; \
  |  |   56|   109k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 109k]
  |  |  ------------------
  ------------------
  362|   109k|      uiMbType = uiCode << 3;
  363|   109k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 5, uiCode));
  ------------------
  |  |   52|   109k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   109k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   109k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 256, False: 109k]
  |  |  ------------------
  |  |   55|   109k|    return uiRetTmp; \
  |  |   56|   109k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 109k]
  |  |  ------------------
  ------------------
  364|   109k|      uiMbType |= uiCode << 2;
  365|   109k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 5, uiCode));
  ------------------
  |  |   52|   109k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   109k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   109k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 271, False: 108k]
  |  |  ------------------
  |  |   55|   109k|    return uiRetTmp; \
  |  |   56|   109k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 108k]
  |  |  ------------------
  ------------------
  366|   108k|      uiMbType |= uiCode << 1;
  367|   108k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 5, uiCode));
  ------------------
  |  |   52|   108k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   108k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   108k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 3.17k, False: 105k]
  |  |  ------------------
  |  |   55|   108k|    return uiRetTmp; \
  |  |   56|   108k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 105k]
  |  |  ------------------
  ------------------
  368|   105k|      uiMbType |= uiCode;
  369|   105k|      if (uiMbType < 8) {
  ------------------
  |  Branch (369:11): [True: 16.9k, False: 88.8k]
  ------------------
  370|  16.9k|        uiMbType += 3;
  371|  16.9k|        return ERR_NONE;
  372|  88.8k|      } else if (uiMbType == 13) {
  ------------------
  |  Branch (372:18): [True: 12.2k, False: 76.5k]
  ------------------
  373|  12.2k|        uiMbType = DecodeCabacIntraMbType (pCtx, pNeighAvail, 32) + 23;
  374|  12.2k|        return ERR_NONE;
  375|  76.5k|      } else if (uiMbType == 14) {
  ------------------
  |  Branch (375:18): [True: 2.55k, False: 74.0k]
  ------------------
  376|  2.55k|        uiMbType = 11; // Bi8x16
  377|  2.55k|        return ERR_NONE;
  378|  74.0k|      } else if (uiMbType == 15) {
  ------------------
  |  Branch (378:18): [True: 52.2k, False: 21.7k]
  ------------------
  379|  52.2k|        uiMbType = 22; // 8x8
  380|  52.2k|        return ERR_NONE;
  381|  52.2k|      }
  382|  21.7k|      uiMbType <<= 1;
  383|  21.7k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 5, uiCode));
  ------------------
  |  |   52|  21.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  21.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  21.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 275, False: 21.4k]
  |  |  ------------------
  |  |   55|  21.7k|    return uiRetTmp; \
  |  |   56|  21.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  384|  21.4k|      uiMbType |= uiCode;
  385|  21.4k|      uiMbType -= 4;
  386|  21.4k|    }
  387|   140k|  }
  388|  57.5k|  return ERR_NONE;
  389|   146k|}
_ZN7WelsDec30ParseTransformSize8x8FlagCabacEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailERb:
  392|   125k|                                        bool& bTransformSize8x8Flag) {
  393|   125k|  uint32_t uiCode;
  394|   125k|  int32_t iIdxA, iIdxB;
  395|   125k|  int32_t iCtxInc;
  396|   125k|  PWelsCabacDecEngine pCabacDecEngine = pCtx->pCabacDecEngine;
  397|   125k|  PWelsCabacCtx pBinCtx = pCtx->pCabacCtx + NEW_CTX_OFFSET_TS_8x8_FLAG;
  ------------------
  |  |   98|   125k|#define NEW_CTX_OFFSET_TS_8x8_FLAG 399
  ------------------
  398|   125k|  iIdxA = (pNeighAvail->iLeftAvail) && (pCtx->pCurDqLayer->pTransformSize8x8Flag[pCtx->pCurDqLayer->iMbXyIndex - 1]);
  ------------------
  |  Branch (398:11): [True: 93.3k, False: 32.1k]
  |  Branch (398:40): [True: 77.2k, False: 16.1k]
  ------------------
  399|   125k|  iIdxB = (pNeighAvail->iTopAvail)
  ------------------
  |  Branch (399:11): [True: 55.0k, False: 70.5k]
  ------------------
  400|  55.0k|          && (pCtx->pCurDqLayer->pTransformSize8x8Flag[pCtx->pCurDqLayer->iMbXyIndex - pCtx->pCurDqLayer->iMbWidth]);
  ------------------
  |  Branch (400:14): [True: 36.2k, False: 18.7k]
  ------------------
  401|   125k|  iCtxInc = iIdxA + iIdxB;
  402|   125k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + iCtxInc, uiCode));
  ------------------
  |  |   52|   125k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   125k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   125k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.11k, False: 124k]
  |  |  ------------------
  |  |   55|   125k|    return uiRetTmp; \
  |  |   56|   125k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 124k]
  |  |  ------------------
  ------------------
  403|   124k|  bTransformSize8x8Flag = !!uiCode;
  404|       |
  405|   124k|  return ERR_NONE;
  406|   125k|}
_ZN7WelsDec19ParseSubMBTypeCabacEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailERj:
  408|   119k|int32_t ParseSubMBTypeCabac (PWelsDecoderContext pCtx, PWelsNeighAvail pNeighAvail, uint32_t& uiSubMbType) {
  409|   119k|  uint32_t uiCode;
  410|   119k|  PWelsCabacDecEngine pCabacDecEngine = pCtx->pCabacDecEngine;
  411|   119k|  PWelsCabacCtx pBinCtx = pCtx->pCabacCtx + NEW_CTX_OFFSET_SUBMB_TYPE;
  ------------------
  |  |   85|   119k|#define NEW_CTX_OFFSET_SUBMB_TYPE 21
  ------------------
  412|   119k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx, uiCode));
  ------------------
  |  |   52|   119k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   119k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   119k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 261, False: 119k]
  |  |  ------------------
  |  |   55|   119k|    return uiRetTmp; \
  |  |   56|   119k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 119k]
  |  |  ------------------
  ------------------
  413|   119k|  if (uiCode)
  ------------------
  |  Branch (413:7): [True: 69.6k, False: 49.8k]
  ------------------
  414|  69.6k|    uiSubMbType = 0;
  415|  49.8k|  else {
  416|  49.8k|    WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 1, uiCode));
  ------------------
  |  |   52|  49.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  49.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  49.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 229, False: 49.6k]
  |  |  ------------------
  |  |   55|  49.8k|    return uiRetTmp; \
  |  |   56|  49.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 49.6k]
  |  |  ------------------
  ------------------
  417|  49.6k|    if (uiCode) {
  ------------------
  |  Branch (417:9): [True: 29.5k, False: 20.1k]
  ------------------
  418|  29.5k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 2, uiCode));
  ------------------
  |  |   52|  29.5k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  29.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  29.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 237, False: 29.2k]
  |  |  ------------------
  |  |   55|  29.5k|    return uiRetTmp; \
  |  |   56|  29.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 29.2k]
  |  |  ------------------
  ------------------
  419|  29.2k|      uiSubMbType = 3 - uiCode;
  420|  29.2k|    } else {
  421|  20.1k|      uiSubMbType = 1;
  422|  20.1k|    }
  423|  49.6k|  }
  424|   119k|  return ERR_NONE;
  425|   119k|}
_ZN7WelsDec20ParseBSubMBTypeCabacEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailERj:
  427|   204k|int32_t ParseBSubMBTypeCabac (PWelsDecoderContext pCtx, PWelsNeighAvail pNeighAvail, uint32_t& uiSubMbType) {
  428|   204k|  uint32_t uiCode;
  429|   204k|  PWelsCabacDecEngine pCabacDecEngine = pCtx->pCabacDecEngine;
  430|   204k|  PWelsCabacCtx pBinCtx = pCtx->pCabacCtx + NEW_CTX_OFFSET_B_SUBMB_TYPE;
  ------------------
  |  |   86|   204k|#define NEW_CTX_OFFSET_B_SUBMB_TYPE 36
  ------------------
  431|   204k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx, uiCode));
  ------------------
  |  |   52|   204k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   204k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   204k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 261, False: 204k]
  |  |  ------------------
  |  |   55|   204k|    return uiRetTmp; \
  |  |   56|   204k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 204k]
  |  |  ------------------
  ------------------
  432|   204k|  if (!uiCode) {
  ------------------
  |  Branch (432:7): [True: 24.3k, False: 179k]
  ------------------
  433|  24.3k|    uiSubMbType = 0; /* B_Direct_8x8 */
  434|  24.3k|    return ERR_NONE;
  435|  24.3k|  }
  436|   179k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 1, uiCode));
  ------------------
  |  |   52|   179k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   179k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   179k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 375, False: 179k]
  |  |  ------------------
  |  |   55|   179k|    return uiRetTmp; \
  |  |   56|   179k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 179k]
  |  |  ------------------
  ------------------
  437|   179k|  if (!uiCode) {
  ------------------
  |  Branch (437:7): [True: 34.3k, False: 145k]
  ------------------
  438|  34.3k|    WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 3, uiCode));
  ------------------
  |  |   52|  34.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  34.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  34.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 233, False: 34.0k]
  |  |  ------------------
  |  |   55|  34.3k|    return uiRetTmp; \
  |  |   56|  34.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 34.0k]
  |  |  ------------------
  ------------------
  439|  34.0k|    uiSubMbType = 1 + uiCode; /* B_L0_8x8, B_L1_8x8 */
  440|  34.0k|    return ERR_NONE;
  441|  34.3k|  }
  442|   145k|  uiSubMbType = 3;
  443|   145k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 2, uiCode));
  ------------------
  |  |   52|   145k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   145k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   145k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 493, False: 144k]
  |  |  ------------------
  |  |   55|   145k|    return uiRetTmp; \
  |  |   56|   145k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 144k]
  |  |  ------------------
  ------------------
  444|   144k|  if (uiCode) {
  ------------------
  |  Branch (444:7): [True: 25.9k, False: 118k]
  ------------------
  445|  25.9k|    WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 3, uiCode));
  ------------------
  |  |   52|  25.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  25.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  25.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 215, False: 25.7k]
  |  |  ------------------
  |  |   55|  25.9k|    return uiRetTmp; \
  |  |   56|  25.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 25.7k]
  |  |  ------------------
  ------------------
  446|  25.7k|    if (uiCode) {
  ------------------
  |  Branch (446:9): [True: 20.2k, False: 5.49k]
  ------------------
  447|  20.2k|      WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 3, uiCode));
  ------------------
  |  |   52|  20.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  20.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  20.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 348, False: 19.8k]
  |  |  ------------------
  |  |   55|  20.2k|    return uiRetTmp; \
  |  |   56|  20.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 19.8k]
  |  |  ------------------
  ------------------
  448|  19.8k|      uiSubMbType = 11 + uiCode; /* B_L1_4x4, B_Bi_4x4 */
  449|  19.8k|      return ERR_NONE;
  450|  20.2k|    }
  451|  5.49k|    uiSubMbType += 4;
  452|  5.49k|  }
  453|   124k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 3, uiCode));
  ------------------
  |  |   52|   124k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   124k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   124k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 352, False: 123k]
  |  |  ------------------
  |  |   55|   124k|    return uiRetTmp; \
  |  |   56|   124k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 123k]
  |  |  ------------------
  ------------------
  454|   123k|  uiSubMbType += 2 * uiCode;
  455|   123k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 3, uiCode));
  ------------------
  |  |   52|   123k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   123k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   123k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 282, False: 123k]
  |  |  ------------------
  |  |   55|   123k|    return uiRetTmp; \
  |  |   56|   123k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 123k]
  |  |  ------------------
  ------------------
  456|   123k|  uiSubMbType += uiCode;
  457|       |
  458|   123k|  return ERR_NONE;
  459|   123k|}
_ZN7WelsDec27ParseIntraPredModeLumaCabacEPNS_21TagWelsDecoderContextERi:
  461|   598k|int32_t ParseIntraPredModeLumaCabac (PWelsDecoderContext pCtx, int32_t& iBinVal) {
  462|   598k|  uint32_t uiCode;
  463|   598k|  iBinVal = 0;
  464|   598k|  WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pCtx->pCabacCtx + NEW_CTX_OFFSET_IPR, uiCode));
  ------------------
  |  |   52|   598k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   598k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   598k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 620, False: 598k]
  |  |  ------------------
  |  |   55|   598k|    return uiRetTmp; \
  |  |   56|   598k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 598k]
  |  |  ------------------
  ------------------
  465|   598k|  if (uiCode == 1)
  ------------------
  |  Branch (465:7): [True: 512k, False: 85.5k]
  ------------------
  466|   512k|    iBinVal = -1;
  467|  85.5k|  else {
  468|  85.5k|    WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pCtx->pCabacCtx + NEW_CTX_OFFSET_IPR + 1, uiCode));
  ------------------
  |  |   52|  85.5k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  85.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  85.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 649, False: 84.8k]
  |  |  ------------------
  |  |   55|  85.5k|    return uiRetTmp; \
  |  |   56|  85.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 84.8k]
  |  |  ------------------
  ------------------
  469|  84.8k|    iBinVal |= uiCode;
  470|  84.8k|    WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pCtx->pCabacCtx + NEW_CTX_OFFSET_IPR + 1, uiCode));
  ------------------
  |  |   52|  84.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  84.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  84.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 366, False: 84.5k]
  |  |  ------------------
  |  |   55|  84.8k|    return uiRetTmp; \
  |  |   56|  84.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 84.5k]
  |  |  ------------------
  ------------------
  471|  84.5k|    iBinVal |= (uiCode << 1);
  472|  84.5k|    WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pCtx->pCabacCtx + NEW_CTX_OFFSET_IPR + 1, uiCode));
  ------------------
  |  |   52|  84.5k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  84.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  84.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 419, False: 84.0k]
  |  |  ------------------
  |  |   55|  84.5k|    return uiRetTmp; \
  |  |   56|  84.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 84.0k]
  |  |  ------------------
  ------------------
  473|  84.0k|    iBinVal |= (uiCode << 2);
  474|  84.0k|  }
  475|   596k|  return ERR_NONE;
  476|   598k|}
_ZN7WelsDec29ParseIntraPredModeChromaCabacEPNS_21TagWelsDecoderContextEhRi:
  478|   105k|int32_t ParseIntraPredModeChromaCabac (PWelsDecoderContext pCtx, uint8_t uiNeighAvail, int32_t& iBinVal) {
  479|   105k|  uint32_t uiCode;
  480|   105k|  int32_t iIdxA, iIdxB, iCtxInc;
  481|   105k|  int8_t* pChromaPredMode = pCtx->pCurDqLayer->pChromaPredMode;
  482|   105k|  uint32_t* pMbType = pCtx->pCurDqLayer->pDec->pMbType;
  483|   105k|  int32_t iLeftAvail     = uiNeighAvail & 0x04;
  484|   105k|  int32_t iTopAvail      = uiNeighAvail & 0x01;
  485|       |
  486|   105k|  int32_t iMbXy = pCtx->pCurDqLayer->iMbXyIndex;
  487|   105k|  int32_t iMbXyTop = iMbXy - pCtx->pCurDqLayer->iMbWidth;
  488|   105k|  int32_t iMbXyLeft = iMbXy - 1;
  489|       |
  490|   105k|  iBinVal = 0;
  491|       |
  492|   105k|  iIdxB = iTopAvail  && (pChromaPredMode[iMbXyTop] > 0 && pChromaPredMode[iMbXyTop] <= 3)
  ------------------
  |  Branch (492:11): [True: 49.7k, False: 55.6k]
  |  Branch (492:26): [True: 32.1k, False: 17.6k]
  |  Branch (492:59): [True: 10.9k, False: 21.1k]
  ------------------
  493|  10.9k|          && pMbType[iMbXyTop]  != MB_TYPE_INTRA_PCM;
  ------------------
  |  |  284|   116k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (493:14): [True: 10.5k, False: 361]
  ------------------
  494|   105k|  iIdxA = iLeftAvail && (pChromaPredMode[iMbXyLeft] > 0 && pChromaPredMode[iMbXyLeft] <= 3)
  ------------------
  |  Branch (494:11): [True: 83.0k, False: 22.3k]
  |  Branch (494:26): [True: 52.6k, False: 30.4k]
  |  Branch (494:60): [True: 17.5k, False: 35.0k]
  ------------------
  495|  17.5k|          && pMbType[iMbXyLeft] != MB_TYPE_INTRA_PCM;
  ------------------
  |  |  284|   122k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (495:14): [True: 17.4k, False: 153]
  ------------------
  496|   105k|  iCtxInc = iIdxA + iIdxB;
  497|   105k|  WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pCtx->pCabacCtx + NEW_CTX_OFFSET_CIPR + iCtxInc, uiCode));
  ------------------
  |  |   52|   105k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   105k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   105k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 266, False: 105k]
  |  |  ------------------
  |  |   55|   105k|    return uiRetTmp; \
  |  |   56|   105k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 105k]
  |  |  ------------------
  ------------------
  498|   105k|  iBinVal = uiCode;
  499|   105k|  if (iBinVal != 0) {
  ------------------
  |  Branch (499:7): [True: 27.4k, False: 77.6k]
  ------------------
  500|  27.4k|    uint32_t iSym;
  501|  27.4k|    WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pCtx->pCabacCtx + NEW_CTX_OFFSET_CIPR + 3, iSym));
  ------------------
  |  |   52|  27.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  27.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  27.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 461, False: 27.0k]
  |  |  ------------------
  |  |   55|  27.4k|    return uiRetTmp; \
  |  |   56|  27.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 27.0k]
  |  |  ------------------
  ------------------
  502|  27.0k|    if (iSym == 0) {
  ------------------
  |  Branch (502:9): [True: 15.8k, False: 11.2k]
  ------------------
  503|  15.8k|      iBinVal = (iSym + 1);
  504|  15.8k|      return ERR_NONE;
  505|  15.8k|    }
  506|  11.2k|    iSym = 0;
  507|  11.2k|    do {
  508|  11.2k|      WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pCtx->pCabacCtx + NEW_CTX_OFFSET_CIPR + 3, uiCode));
  ------------------
  |  |   52|  11.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  11.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  11.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 228, False: 10.9k]
  |  |  ------------------
  |  |   55|  11.2k|    return uiRetTmp; \
  |  |   56|  11.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 10.9k]
  |  |  ------------------
  ------------------
  509|  10.9k|      ++iSym;
  510|  10.9k|    } while ((uiCode != 0) && (iSym < 1));
  ------------------
  |  Branch (510:14): [True: 8.63k, False: 2.35k]
  |  Branch (510:31): [True: 0, False: 8.63k]
  ------------------
  511|       |
  512|  10.9k|    if ((uiCode != 0) && (iSym == 1))
  ------------------
  |  Branch (512:9): [True: 8.63k, False: 2.35k]
  |  Branch (512:26): [True: 8.63k, False: 0]
  ------------------
  513|  8.63k|      ++ iSym;
  514|  10.9k|    iBinVal = (iSym + 1);
  515|  10.9k|    return ERR_NONE;
  516|  11.2k|  }
  517|  77.6k|  return ERR_NONE;
  518|   105k|}
_ZN7WelsDec26ParseInterPMotionInfoCabacEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailEPhPA30_A2_sS7_PA30_a:
  521|   190k|                                    int16_t pMotionVector[LIST_A][30][MV_A], int16_t pMvdCache[LIST_A][30][MV_A], int8_t pRefIndex[LIST_A][30]) {
  522|   190k|  PSlice pSlice                 = &pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer;
  523|   190k|  PSliceHeader pSliceHeader     = &pSlice->sSliceHeaderExt.sSliceHeader;
  524|   190k|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
  525|   190k|  PPicture* ppRefPic = pCtx->sRefPic.pRefList[LIST_0];
  526|   190k|  int32_t pRefCount[2];
  527|   190k|  int32_t i, j;
  528|   190k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  529|   190k|  int16_t pMv[4] = {0};
  530|   190k|  int16_t pMvd[4] = {0};
  531|   190k|  int8_t iRef[2] = {0};
  532|   190k|  int32_t iPartIdx;
  533|   190k|  int16_t iMinVmv = pSliceHeader->pSps->pSLevelLimits->iMinVmv;
  534|   190k|  int16_t iMaxVmv = pSliceHeader->pSps->pSLevelLimits->iMaxVmv;
  535|   190k|  pRefCount[0] = pSliceHeader->uiRefCount[0];
  536|   190k|  pRefCount[1] = pSliceHeader->uiRefCount[1];
  537|       |
  538|   190k|  bool bIsPending = GetThreadCount (pCtx) > 1;
  539|       |
  540|   190k|  switch (pCurDqLayer->pDec->pMbType[iMbXy]) {
  541|   132k|  case MB_TYPE_16x16: {
  ------------------
  |  |  278|   132k|#define MB_TYPE_16x16       0x00000008
  ------------------
  |  Branch (541:3): [True: 132k, False: 57.8k]
  ------------------
  542|   132k|    iPartIdx = 0;
  543|   132k|    WELS_READ_VERIFY (ParseRefIdxCabac (pCtx, pNeighAvail, pNonZeroCount, pRefIndex, 0, LIST_0, iPartIdx, pRefCount[0], 0,
  ------------------
  |  |   52|   132k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   132k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   132k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 312, False: 132k]
  |  |  ------------------
  |  |   55|   132k|    return uiRetTmp; \
  |  |   56|   132k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 132k]
  |  |  ------------------
  ------------------
  544|   132k|                                        iRef[0]));
  545|   132k|    if ((iRef[0] < 0) || (iRef[0] >= pRefCount[0]) || (ppRefPic[iRef[0]] == NULL)) { //error ref_idx
  ------------------
  |  Branch (545:9): [True: 197, False: 132k]
  |  Branch (545:26): [True: 1.06k, False: 131k]
  |  Branch (545:55): [True: 2.23k, False: 129k]
  ------------------
  546|  3.49k|      pCtx->bMbRefConcealed = true;
  547|  3.49k|      if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (547:11): [True: 3.49k, False: 0]
  ------------------
  548|  3.49k|        iRef[0] = 0;
  549|  3.49k|        pCtx->iErrorCode |= dsBitstreamError;
  550|  3.49k|      } else {
  551|      0|        return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  552|      0|      }
  553|  3.49k|    }
  554|   132k|    pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPic[iRef[0]]
  ------------------
  |  Branch (554:29): [True: 1.85k, False: 130k]
  |  Branch (554:49): [True: 3.39k, False: 127k]
  |  Branch (554:77): [True: 127k, False: 0]
  ------------------
  555|   127k|                            && (ppRefPic[iRef[0]]->bIsComplete || bIsPending));
  ------------------
  |  Branch (555:33): [True: 718, False: 126k]
  |  Branch (555:67): [True: 0, False: 126k]
  ------------------
  556|   132k|    PredMv (pMotionVector, pRefIndex, LIST_0, 0, 4, iRef[0], pMv);
  557|   132k|    WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, LIST_0, 0, pMvd[0]));
  ------------------
  |  |   52|   132k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   132k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   132k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.59k, False: 131k]
  |  |  ------------------
  |  |   55|   132k|    return uiRetTmp; \
  |  |   56|   132k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 131k]
  |  |  ------------------
  ------------------
  558|   131k|    WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, LIST_0, 1, pMvd[1]));
  ------------------
  |  |   52|   131k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   131k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   131k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.18k, False: 129k]
  |  |  ------------------
  |  |   55|   131k|    return uiRetTmp; \
  |  |   56|   131k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 129k]
  |  |  ------------------
  ------------------
  559|   129k|    pMv[0] += pMvd[0];
  560|   129k|    pMv[1] += pMvd[1];
  561|   129k|    WELS_CHECK_SE_BOTH_WARNING (pMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|   129k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|   129k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 388, False: 129k]
  |  |  |  Branch (289:28): [True: 2.04k, False: 127k]
  |  |  ------------------
  |  |  290|  2.42k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  2.42k|}\
  |  |  292|   129k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 129k]
  |  |  ------------------
  ------------------
  562|   129k|    UpdateP16x16MotionInfo (pCurDqLayer, LIST_0, iRef[0], pMv);
  563|   129k|    UpdateP16x16MvdCabac (pCurDqLayer, pMvd, LIST_0);
  564|   129k|  }
  565|      0|  break;
  566|  15.7k|  case MB_TYPE_16x8:
  ------------------
  |  |  279|  15.7k|#define MB_TYPE_16x8        0x00000010
  ------------------
  |  Branch (566:3): [True: 15.7k, False: 175k]
  ------------------
  567|  46.9k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (567:17): [True: 31.4k, False: 15.5k]
  ------------------
  568|  31.4k|      iPartIdx = i << 3;
  569|  31.4k|      WELS_READ_VERIFY (ParseRefIdxCabac (pCtx, pNeighAvail, pNonZeroCount, pRefIndex, 0, LIST_0, iPartIdx, pRefCount[0], 0,
  ------------------
  |  |   52|  31.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  31.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  31.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 216, False: 31.1k]
  |  |  ------------------
  |  |   55|  31.4k|    return uiRetTmp; \
  |  |   56|  31.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 31.1k]
  |  |  ------------------
  ------------------
  570|  31.4k|                                          iRef[i]));
  571|  31.1k|      if ((iRef[i] < 0) || (iRef[i] >= pRefCount[0]) || (ppRefPic[iRef[i]] == NULL)) { //error ref_idx
  ------------------
  |  Branch (571:11): [True: 211, False: 30.9k]
  |  Branch (571:28): [True: 1.73k, False: 29.2k]
  |  Branch (571:57): [True: 1.34k, False: 27.9k]
  ------------------
  572|  3.28k|        pCtx->bMbRefConcealed = true;
  573|  3.28k|        if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (573:13): [True: 3.28k, False: 0]
  ------------------
  574|  3.28k|          iRef[i] = 0;
  575|  3.28k|          pCtx->iErrorCode |= dsBitstreamError;
  576|  3.28k|        } else {
  577|      0|          return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  578|      0|        }
  579|  3.28k|      }
  580|  31.1k|      pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPic[iRef[i]]
  ------------------
  |  Branch (580:31): [True: 578, False: 30.6k]
  |  Branch (580:51): [True: 16.2k, False: 14.3k]
  |  Branch (580:79): [True: 14.3k, False: 0]
  ------------------
  581|  14.3k|                              && (ppRefPic[iRef[i]]->bIsComplete || bIsPending));
  ------------------
  |  Branch (581:35): [True: 752, False: 13.6k]
  |  Branch (581:69): [True: 0, False: 13.6k]
  ------------------
  582|  31.1k|      UpdateP16x8RefIdxCabac (pCurDqLayer, pRefIndex, iPartIdx, iRef[i], LIST_0);
  583|  31.1k|    }
  584|  45.5k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (584:17): [True: 30.7k, False: 14.8k]
  ------------------
  585|  30.7k|      iPartIdx = i << 3;
  586|  30.7k|      PredInter16x8Mv (pMotionVector, pRefIndex, LIST_0, iPartIdx, iRef[i], pMv);
  587|  30.7k|      WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, LIST_0, 0, pMvd[0]));
  ------------------
  |  |   52|  30.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  30.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  30.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 337, False: 30.3k]
  |  |  ------------------
  |  |   55|  30.7k|    return uiRetTmp; \
  |  |   56|  30.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 30.3k]
  |  |  ------------------
  ------------------
  588|  30.3k|      WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, LIST_0, 1, pMvd[1]));
  ------------------
  |  |   52|  30.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  30.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  30.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 313, False: 30.0k]
  |  |  ------------------
  |  |   55|  30.3k|    return uiRetTmp; \
  |  |   56|  30.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 30.0k]
  |  |  ------------------
  ------------------
  589|  30.0k|      pMv[0] += pMvd[0];
  590|  30.0k|      pMv[1] += pMvd[1];
  591|  30.0k|      WELS_CHECK_SE_BOTH_WARNING (pMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|  30.0k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  30.0k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 417, False: 29.6k]
  |  |  |  Branch (289:28): [True: 2.89k, False: 26.7k]
  |  |  ------------------
  |  |  290|  3.31k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  3.31k|}\
  |  |  292|  30.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 30.0k]
  |  |  ------------------
  ------------------
  592|  30.0k|      UpdateP16x8MotionInfo (pCurDqLayer, pMotionVector, pRefIndex, LIST_0, iPartIdx, iRef[i], pMv);
  593|  30.0k|      UpdateP16x8MvdCabac (pCurDqLayer, pMvdCache, iPartIdx, pMvd, LIST_0);
  594|  30.0k|    }
  595|  14.8k|    break;
  596|  14.8k|  case MB_TYPE_8x16:
  ------------------
  |  |  280|  11.8k|#define MB_TYPE_8x16        0x00000020
  ------------------
  |  Branch (596:3): [True: 11.8k, False: 178k]
  ------------------
  597|  35.1k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (597:17): [True: 23.6k, False: 11.5k]
  ------------------
  598|  23.6k|      iPartIdx = i << 2;
  599|  23.6k|      WELS_READ_VERIFY (ParseRefIdxCabac (pCtx, pNeighAvail, pNonZeroCount, pRefIndex, 0, LIST_0, iPartIdx, pRefCount[0], 0,
  ------------------
  |  |   52|  23.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  23.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  23.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 217, False: 23.3k]
  |  |  ------------------
  |  |   55|  23.6k|    return uiRetTmp; \
  |  |   56|  23.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 23.3k]
  |  |  ------------------
  ------------------
  600|  23.6k|                                          iRef[i]));
  601|  23.3k|      if ((iRef[i] < 0) || (iRef[i] >= pRefCount[0]) || (ppRefPic[iRef[i]] == NULL)) { //error ref_idx
  ------------------
  |  Branch (601:11): [True: 202, False: 23.1k]
  |  Branch (601:28): [True: 1.78k, False: 21.4k]
  |  Branch (601:57): [True: 1.00k, False: 20.4k]
  ------------------
  602|  2.99k|        pCtx->bMbRefConcealed = true;
  603|  2.99k|        if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (603:13): [True: 2.99k, False: 0]
  ------------------
  604|  2.99k|          iRef[i] = 0;
  605|  2.99k|          pCtx->iErrorCode |= dsBitstreamError;
  606|  2.99k|        } else {
  607|      0|          return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  608|      0|        }
  609|  2.99k|      }
  610|  23.3k|      pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPic[iRef[i]]
  ------------------
  |  Branch (610:31): [True: 485, False: 22.9k]
  |  Branch (610:51): [True: 12.7k, False: 10.2k]
  |  Branch (610:79): [True: 10.2k, False: 0]
  ------------------
  611|  10.2k|                              && (ppRefPic[iRef[i]]->bIsComplete || bIsPending));
  ------------------
  |  Branch (611:35): [True: 666, False: 9.53k]
  |  Branch (611:69): [True: 0, False: 9.53k]
  ------------------
  612|  23.3k|      UpdateP8x16RefIdxCabac (pCurDqLayer, pRefIndex, iPartIdx, iRef[i], LIST_0);
  613|  23.3k|    }
  614|  33.3k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (614:17): [True: 22.6k, False: 10.7k]
  ------------------
  615|  22.6k|      iPartIdx = i << 2;
  616|  22.6k|      PredInter8x16Mv (pMotionVector, pRefIndex, LIST_0, i << 2, iRef[i], pMv/*&mv[0], &mv[1]*/);
  617|       |
  618|  22.6k|      WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, LIST_0, 0, pMvd[0]));
  ------------------
  |  |   52|  22.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  22.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  22.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 498, False: 22.1k]
  |  |  ------------------
  |  |   55|  22.6k|    return uiRetTmp; \
  |  |   56|  22.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 22.1k]
  |  |  ------------------
  ------------------
  619|  22.1k|      WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, LIST_0, 1, pMvd[1]));
  ------------------
  |  |   52|  22.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  22.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  22.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 359, False: 21.7k]
  |  |  ------------------
  |  |   55|  22.1k|    return uiRetTmp; \
  |  |   56|  22.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 21.7k]
  |  |  ------------------
  ------------------
  620|  21.7k|      pMv[0] += pMvd[0];
  621|  21.7k|      pMv[1] += pMvd[1];
  622|  21.7k|      WELS_CHECK_SE_BOTH_WARNING (pMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|  21.7k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  21.7k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 1.37k, False: 20.4k]
  |  |  |  Branch (289:28): [True: 379, False: 20.0k]
  |  |  ------------------
  |  |  290|  1.75k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  1.75k|}\
  |  |  292|  21.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 21.7k]
  |  |  ------------------
  ------------------
  623|  21.7k|      UpdateP8x16MotionInfo (pCurDqLayer, pMotionVector, pRefIndex, LIST_0, iPartIdx, iRef[i], pMv);
  624|  21.7k|      UpdateP8x16MvdCabac (pCurDqLayer, pMvdCache, iPartIdx, pMvd, LIST_0);
  625|  21.7k|    }
  626|  10.7k|    break;
  627|  30.2k|  case MB_TYPE_8x8:
  ------------------
  |  |  281|  30.2k|#define MB_TYPE_8x8         0x00000040
  ------------------
  |  Branch (627:3): [True: 30.2k, False: 160k]
  ------------------
  628|  30.2k|  case MB_TYPE_8x8_REF0: {
  ------------------
  |  |  282|  30.2k|#define MB_TYPE_8x8_REF0    0x00000080
  ------------------
  |  Branch (628:3): [True: 0, False: 190k]
  ------------------
  629|  30.2k|    int8_t pRefIdx[4] = {0}, pSubPartCount[4], pPartW[4];
  630|  30.2k|    uint32_t uiSubMbType;
  631|       |    //sub_mb_type, partition
  632|   149k|    for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (632:17): [True: 119k, False: 29.5k]
  ------------------
  633|   119k|      WELS_READ_VERIFY (ParseSubMBTypeCabac (pCtx, pNeighAvail, uiSubMbType));
  ------------------
  |  |   52|   119k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   119k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   119k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 727, False: 119k]
  |  |  ------------------
  |  |   55|   119k|    return uiRetTmp; \
  |  |   56|   119k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 119k]
  |  |  ------------------
  ------------------
  634|   119k|      if (uiSubMbType >= 4) { //invalid sub_mb_type
  ------------------
  |  Branch (634:11): [True: 0, False: 119k]
  ------------------
  635|      0|        return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_SUB_MB_TYPE);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  636|      0|      }
  637|   119k|      pCurDqLayer->pSubMbType[iMbXy][i] = g_ksInterPSubMbTypeInfo[uiSubMbType].iType;
  638|   119k|      pSubPartCount[i] = g_ksInterPSubMbTypeInfo[uiSubMbType].iPartCount;
  639|   119k|      pPartW[i] = g_ksInterPSubMbTypeInfo[uiSubMbType].iPartWidth;
  640|       |
  641|       |      // Need modification when B picture add in, reference to 7.3.5
  642|   119k|      pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] &= (uiSubMbType == 0);
  643|   119k|    }
  644|       |
  645|   147k|    for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (645:17): [True: 117k, False: 29.2k]
  ------------------
  646|   117k|      int16_t iIdx8 = i << 2;
  647|   117k|      WELS_READ_VERIFY (ParseRefIdxCabac (pCtx, pNeighAvail, pNonZeroCount, pRefIndex, 0, LIST_0, iIdx8, pRefCount[0], 1,
  ------------------
  |  |   52|   117k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   117k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   117k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 299, False: 117k]
  |  |  ------------------
  |  |   55|   117k|    return uiRetTmp; \
  |  |   56|   117k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 117k]
  |  |  ------------------
  ------------------
  648|   117k|                                          pRefIdx[i]));
  649|   117k|      if ((pRefIdx[i] < 0) || (pRefIdx[i] >= pRefCount[0]) || (ppRefPic[pRefIdx[i]] == NULL)) { //error ref_idx
  ------------------
  |  Branch (649:11): [True: 241, False: 117k]
  |  Branch (649:31): [True: 4.93k, False: 112k]
  |  Branch (649:63): [True: 1.67k, False: 110k]
  ------------------
  650|  6.85k|        pCtx->bMbRefConcealed = true;
  651|  6.85k|        if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (651:13): [True: 6.85k, False: 0]
  ------------------
  652|  6.85k|          pRefIdx[i] = 0;
  653|  6.85k|          pCtx->iErrorCode |= dsBitstreamError;
  654|  6.85k|        } else {
  655|      0|          return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  656|      0|        }
  657|  6.85k|      }
  658|   117k|      pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPic[pRefIdx[i]]
  ------------------
  |  Branch (658:31): [True: 8.39k, False: 109k]
  |  Branch (658:51): [True: 82.1k, False: 26.9k]
  |  Branch (658:79): [True: 26.9k, False: 0]
  ------------------
  659|  26.9k|                              && (ppRefPic[pRefIdx[i]]->bIsComplete || bIsPending));
  ------------------
  |  Branch (659:35): [True: 1.29k, False: 25.6k]
  |  Branch (659:72): [True: 0, False: 25.6k]
  ------------------
  660|   117k|      UpdateP8x8RefIdxCabac (pCurDqLayer, pRefIndex, iIdx8, pRefIdx[i], LIST_0);
  661|   117k|    }
  662|       |    //mv
  663|   139k|    for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (663:17): [True: 112k, False: 26.6k]
  ------------------
  664|   112k|      int8_t iPartCount = pSubPartCount[i];
  665|   112k|      uiSubMbType = pCurDqLayer->pSubMbType[iMbXy][i];
  666|   112k|      int16_t iPartIdx, iBlockW = pPartW[i];
  667|   112k|      uint8_t iScan4Idx, iCacheIdx;
  668|   112k|      iCacheIdx = g_kuiCache30ScanIdx[i << 2];
  669|   112k|      pRefIndex[0][iCacheIdx ] = pRefIndex[0][iCacheIdx + 1]
  670|   112k|                                 = pRefIndex[0][iCacheIdx + 6] = pRefIndex[0][iCacheIdx + 7] = pRefIdx[i];
  671|       |
  672|   275k|      for (j = 0; j < iPartCount; j++) {
  ------------------
  |  Branch (672:19): [True: 165k, False: 110k]
  ------------------
  673|   165k|        iPartIdx = (i << 2) + j * iBlockW;
  674|   165k|        iScan4Idx = g_kuiScan4[iPartIdx];
  675|   165k|        iCacheIdx = g_kuiCache30ScanIdx[iPartIdx];
  676|   165k|        PredMv (pMotionVector, pRefIndex, LIST_0, iPartIdx, iBlockW, pRefIdx[i], pMv);
  677|   165k|        WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, LIST_0, 0, pMvd[0]));
  ------------------
  |  |   52|   165k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   165k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   165k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.10k, False: 164k]
  |  |  ------------------
  |  |   55|   165k|    return uiRetTmp; \
  |  |   56|   165k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 164k]
  |  |  ------------------
  ------------------
  678|   164k|        WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, LIST_0, 1, pMvd[1]));
  ------------------
  |  |   52|   164k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   164k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   164k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.49k, False: 162k]
  |  |  ------------------
  |  |   55|   164k|    return uiRetTmp; \
  |  |   56|   164k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 162k]
  |  |  ------------------
  ------------------
  679|   162k|        pMv[0] += pMvd[0];
  680|   162k|        pMv[1] += pMvd[1];
  681|   162k|        WELS_CHECK_SE_BOTH_WARNING (pMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|   162k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|   162k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 1.37k, False: 161k]
  |  |  |  Branch (289:28): [True: 626, False: 160k]
  |  |  ------------------
  |  |  290|  2.00k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  2.00k|}\
  |  |  292|   162k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 162k]
  |  |  ------------------
  ------------------
  682|   162k|        if (SUB_MB_TYPE_8x8 == uiSubMbType) {
  ------------------
  |  |  294|   162k|#define SUB_MB_TYPE_8x8     0x00000001
  ------------------
  |  Branch (682:13): [True: 65.4k, False: 97.0k]
  ------------------
  683|  65.4k|          ST32 ((pMv + 2), LD32 (pMv));
  ------------------
  |  |   67|  65.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  684|  65.4k|          ST32 ((pMvd + 2), LD32 (pMvd));
  ------------------
  |  |   67|  65.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  685|  65.4k|          ST64 (pCurDqLayer->pDec->pMv[0][iMbXy][iScan4Idx], LD64 (pMv));
  ------------------
  |  |   68|  65.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  686|  65.4k|          ST64 (pCurDqLayer->pDec->pMv[0][iMbXy][iScan4Idx + 4], LD64 (pMv));
  ------------------
  |  |   68|  65.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  687|  65.4k|          ST64 (pCurDqLayer->pMvd[0][iMbXy][iScan4Idx], LD64 (pMvd));
  ------------------
  |  |   68|  65.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  688|  65.4k|          ST64 (pCurDqLayer->pMvd[0][iMbXy][iScan4Idx + 4], LD64 (pMvd));
  ------------------
  |  |   68|  65.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  689|  65.4k|          ST64 (pMotionVector[0][iCacheIdx  ], LD64 (pMv));
  ------------------
  |  |   68|  65.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  690|  65.4k|          ST64 (pMotionVector[0][iCacheIdx + 6], LD64 (pMv));
  ------------------
  |  |   68|  65.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  691|  65.4k|          ST64 (pMvdCache[0][iCacheIdx  ], LD64 (pMvd));
  ------------------
  |  |   68|  65.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  692|  65.4k|          ST64 (pMvdCache[0][iCacheIdx + 6], LD64 (pMvd));
  ------------------
  |  |   68|  65.4k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  693|  97.0k|        } else if (SUB_MB_TYPE_8x4 == uiSubMbType) {
  ------------------
  |  |  295|  97.0k|#define SUB_MB_TYPE_8x4     0x00000002
  ------------------
  |  Branch (693:20): [True: 37.6k, False: 59.4k]
  ------------------
  694|  37.6k|          ST32 ((pMv + 2), LD32 (pMv));
  ------------------
  |  |   67|  37.6k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  695|  37.6k|          ST32 ((pMvd + 2), LD32 (pMvd));
  ------------------
  |  |   67|  37.6k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  696|  37.6k|          ST64 (pCurDqLayer->pDec->pMv[0][iMbXy][iScan4Idx  ], LD64 (pMv));
  ------------------
  |  |   68|  37.6k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  697|  37.6k|          ST64 (pCurDqLayer->pMvd[0][iMbXy][iScan4Idx  ], LD64 (pMvd));
  ------------------
  |  |   68|  37.6k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  698|  37.6k|          ST64 (pMotionVector[0][iCacheIdx  ], LD64 (pMv));
  ------------------
  |  |   68|  37.6k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  699|  37.6k|          ST64 (pMvdCache[0][iCacheIdx  ], LD64 (pMvd));
  ------------------
  |  |   68|  37.6k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  700|  59.4k|        } else if (SUB_MB_TYPE_4x8 == uiSubMbType) {
  ------------------
  |  |  296|  59.4k|#define SUB_MB_TYPE_4x8     0x00000004
  ------------------
  |  Branch (700:20): [True: 45.9k, False: 13.4k]
  ------------------
  701|  45.9k|          ST32 (pCurDqLayer->pDec->pMv[0][iMbXy][iScan4Idx  ], LD32 (pMv));
  ------------------
  |  |   67|  45.9k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  702|  45.9k|          ST32 (pCurDqLayer->pDec->pMv[0][iMbXy][iScan4Idx + 4], LD32 (pMv));
  ------------------
  |  |   67|  45.9k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  703|  45.9k|          ST32 (pCurDqLayer->pMvd[0][iMbXy][iScan4Idx  ], LD32 (pMvd));
  ------------------
  |  |   67|  45.9k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  704|  45.9k|          ST32 (pCurDqLayer->pMvd[0][iMbXy][iScan4Idx + 4], LD32 (pMvd));
  ------------------
  |  |   67|  45.9k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  705|  45.9k|          ST32 (pMotionVector[0][iCacheIdx  ], LD32 (pMv));
  ------------------
  |  |   67|  45.9k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  706|  45.9k|          ST32 (pMotionVector[0][iCacheIdx + 6], LD32 (pMv));
  ------------------
  |  |   67|  45.9k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  707|  45.9k|          ST32 (pMvdCache[0][iCacheIdx  ], LD32 (pMvd));
  ------------------
  |  |   67|  45.9k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  708|  45.9k|          ST32 (pMvdCache[0][iCacheIdx + 6], LD32 (pMvd));
  ------------------
  |  |   67|  45.9k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  709|  45.9k|        } else {  //SUB_MB_TYPE_4x4
  710|  13.4k|          ST32 (pCurDqLayer->pDec->pMv[0][iMbXy][iScan4Idx  ], LD32 (pMv));
  ------------------
  |  |   67|  13.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  711|  13.4k|          ST32 (pCurDqLayer->pMvd[0][iMbXy][iScan4Idx  ], LD32 (pMvd));
  ------------------
  |  |   67|  13.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  712|  13.4k|          ST32 (pMotionVector[0][iCacheIdx  ], LD32 (pMv));
  ------------------
  |  |   67|  13.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  713|  13.4k|          ST32 (pMvdCache[0][iCacheIdx  ], LD32 (pMvd));
  ------------------
  |  |   67|  13.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  714|  13.4k|        }
  715|   162k|      }
  716|   112k|    }
  717|  29.2k|  }
  718|  26.6k|  break;
  719|  26.6k|  default:
  ------------------
  |  Branch (719:3): [True: 0, False: 190k]
  ------------------
  720|      0|    break;
  721|   190k|  }
  722|   182k|  return ERR_NONE;
  723|   190k|}
_ZN7WelsDec26ParseInterBMotionInfoCabacEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailEPhPA30_A2_sS7_PA30_aPa:
  727|   129k|                                    int8_t pDirect[30]) {
  728|   129k|  PSlice pSlice = &pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer;
  729|   129k|  PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
  730|   129k|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
  731|   129k|  int32_t pRefCount[LIST_A];
  732|   129k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
  733|   129k|  int16_t pMv[4] = { 0 };
  734|   129k|  int16_t pMvd[4] = { 0 };
  735|   129k|  int8_t iRef[LIST_A] = { 0 };
  736|   129k|  int32_t iPartIdx;
  737|   129k|  int16_t iMinVmv = pSliceHeader->pSps->pSLevelLimits->iMinVmv;
  738|   129k|  int16_t iMaxVmv = pSliceHeader->pSps->pSLevelLimits->iMaxVmv;
  739|   129k|  pRefCount[0] = pSliceHeader->uiRefCount[0];
  740|   129k|  pRefCount[1] = pSliceHeader->uiRefCount[1];
  741|       |
  742|   129k|  MbType mbType = pCurDqLayer->pDec->pMbType[iMbXy];
  743|       |
  744|   129k|  bool bIsPending = GetThreadCount (pCtx) > 1;
  745|       |
  746|   129k|  if (IS_DIRECT (mbType)) {
  ------------------
  |  |  316|   129k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|   129k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  |  |  |  Branch (316:25): [True: 5.34k, False: 123k]
  |  |  ------------------
  ------------------
  747|       |
  748|  5.34k|    int16_t pMvDirect[LIST_A][2] = { { 0, 0 }, { 0, 0 } };
  749|  5.34k|    SubMbType subMbType;
  750|  5.34k|    if (pSliceHeader->iDirectSpatialMvPredFlag) {
  ------------------
  |  Branch (750:9): [True: 3.72k, False: 1.61k]
  ------------------
  751|       |      //predict direct spatial mv
  752|  3.72k|      int32_t ret = PredMvBDirectSpatial (pCtx, pMvDirect, iRef, subMbType);
  753|  3.72k|      if (ret != ERR_NONE) {
  ------------------
  |  Branch (753:11): [True: 264, False: 3.46k]
  ------------------
  754|    264|        return ret;
  755|    264|      }
  756|  3.72k|    } else {
  757|       |      //temporal direct 16x16 mode
  758|  1.61k|      int32_t ret = PredBDirectTemporal (pCtx, pMvDirect, iRef, subMbType);
  759|  1.61k|      if (ret != ERR_NONE) {
  ------------------
  |  Branch (759:11): [True: 231, False: 1.38k]
  ------------------
  760|    231|        return ret;
  761|    231|      }
  762|  1.61k|    }
  763|   123k|  } else if (IS_INTER_16x16 (mbType)) {
  ------------------
  |  |  307|   123k|#define IS_INTER_16x16(type) ( (type)&MB_TYPE_16x16 )
  |  |  ------------------
  |  |  |  |  278|   123k|#define MB_TYPE_16x16       0x00000008
  |  |  ------------------
  |  |  |  Branch (307:30): [True: 32.0k, False: 91.9k]
  |  |  ------------------
  ------------------
  764|  32.0k|    iPartIdx = 0;
  765|  95.1k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (765:36): [True: 63.7k, False: 31.3k]
  ------------------
  766|  63.7k|      iRef[listIdx] = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  63.7k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  767|  63.7k|      if (IS_DIR (mbType, 0, listIdx)) {
  ------------------
  |  |  312|  63.7k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  63.7k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 33.3k, False: 30.4k]
  |  |  ------------------
  ------------------
  768|  33.3k|        WELS_READ_VERIFY (ParseRefIdxCabac (pCtx, pNeighAvail, pNonZeroCount, pRefIndex, pDirect, listIdx, iPartIdx,
  ------------------
  |  |   52|  33.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  33.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  33.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 222, False: 33.0k]
  |  |  ------------------
  |  |   55|  33.3k|    return uiRetTmp; \
  |  |   56|  33.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 33.0k]
  |  |  ------------------
  ------------------
  769|  33.3k|                                            pRefCount[listIdx], 0,
  770|  33.3k|                                            iRef[listIdx]));
  771|  33.0k|        if ((iRef[listIdx] < 0) || (iRef[listIdx] >= pRefCount[listIdx])
  ------------------
  |  Branch (771:13): [True: 1.22k, False: 31.8k]
  |  Branch (771:36): [True: 1.17k, False: 30.6k]
  ------------------
  772|  30.6k|            || (pCtx->sRefPic.pRefList[listIdx][iRef[listIdx]] == NULL)) { //error ref_idx
  ------------------
  |  Branch (772:16): [True: 1.77k, False: 28.9k]
  ------------------
  773|  4.16k|          pCtx->bMbRefConcealed = true;
  774|  4.16k|          if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (774:15): [True: 4.16k, False: 0]
  ------------------
  775|  4.16k|            iRef[listIdx] = 0;
  776|  4.16k|            pCtx->iErrorCode |= dsBitstreamError;
  777|  4.16k|            RETURN_ERR_IF_NULL(pCtx->sRefPic.pRefList[listIdx][iRef[listIdx]]);
  ------------------
  |  |   47|  4.16k|#define RETURN_ERR_IF_NULL(pRefPic0) \
  |  |   48|  4.16k|if ( pRefPic0 == NULL) \
  |  |  ------------------
  |  |  |  Branch (48:6): [True: 401, False: 3.76k]
  |  |  ------------------
  |  |   49|  4.16k|  return GENERATE_ERROR_NO(ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX)
  |  |  ------------------
  |  |  |  |   59|    401|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  |  |  ------------------
  ------------------
  778|  4.16k|          } else {
  779|      0|            return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  780|      0|          }
  781|  4.16k|        }
  782|  32.6k|        pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (pCtx->sRefPic.pRefList[listIdx][iRef[listIdx]]
  ------------------
  |  Branch (782:33): [True: 3.29k, False: 29.3k]
  |  Branch (782:53): [True: 2.64k, False: 26.7k]
  |  Branch (782:81): [True: 26.7k, False: 0]
  ------------------
  783|  26.7k|                                && (pCtx->sRefPic.pRefList[listIdx][iRef[listIdx]]->bIsComplete || bIsPending));
  ------------------
  |  Branch (783:37): [True: 1.51k, False: 25.2k]
  |  Branch (783:100): [True: 0, False: 25.2k]
  ------------------
  784|  32.6k|      }
  785|  63.7k|    }
  786|  92.6k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (786:36): [True: 62.0k, False: 30.5k]
  ------------------
  787|  62.0k|      if (IS_DIR (mbType, 0, listIdx)) {
  ------------------
  |  |  312|  62.0k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  62.0k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 32.6k, False: 29.3k]
  |  |  ------------------
  ------------------
  788|  32.6k|        PredMv (pMotionVector, pRefIndex, listIdx, 0, 4, iRef[listIdx], pMv);
  789|  32.6k|        WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, listIdx, 0, pMvd[0]));
  ------------------
  |  |   52|  32.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  32.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  32.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 416, False: 32.2k]
  |  |  ------------------
  |  |   55|  32.6k|    return uiRetTmp; \
  |  |   56|  32.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 32.2k]
  |  |  ------------------
  ------------------
  790|  32.2k|        WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, listIdx, 1, pMvd[1]));
  ------------------
  |  |   52|  32.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  32.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  32.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 420, False: 31.8k]
  |  |  ------------------
  |  |   55|  32.2k|    return uiRetTmp; \
  |  |   56|  32.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 31.8k]
  |  |  ------------------
  ------------------
  791|  31.8k|        pMv[0] += pMvd[0];
  792|  31.8k|        pMv[1] += pMvd[1];
  793|  31.8k|        WELS_CHECK_SE_BOTH_WARNING (pMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|  31.8k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  31.8k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 465, False: 31.3k]
  |  |  |  Branch (289:28): [True: 581, False: 30.8k]
  |  |  ------------------
  |  |  290|  1.04k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  1.04k|}\
  |  |  292|  31.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 31.8k]
  |  |  ------------------
  ------------------
  794|  31.8k|      } else {
  795|  29.3k|        * (uint32_t*)pMv = * (uint32_t*)pMvd = 0;
  796|  29.3k|      }
  797|  61.2k|      UpdateP16x16MotionInfo (pCurDqLayer, listIdx, iRef[listIdx], pMv);
  798|  61.2k|      UpdateP16x16MvdCabac (pCurDqLayer, pMvd, listIdx);
  799|  61.2k|    }
  800|  91.9k|  } else if (IS_INTER_16x8 (mbType)) {
  ------------------
  |  |  308|  91.9k|#define IS_INTER_16x8(type) ( (type)&MB_TYPE_16x8 )
  |  |  ------------------
  |  |  |  |  279|  91.9k|#define MB_TYPE_16x8        0x00000010
  |  |  ------------------
  |  |  |  Branch (308:29): [True: 28.8k, False: 63.1k]
  |  |  ------------------
  ------------------
  801|  28.8k|    int8_t ref_idx_list[LIST_A][2] = { {REF_NOT_IN_LIST, REF_NOT_IN_LIST}, { REF_NOT_IN_LIST, REF_NOT_IN_LIST } };
  ------------------
  |  |   42|  28.8k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
                  int8_t ref_idx_list[LIST_A][2] = { {REF_NOT_IN_LIST, REF_NOT_IN_LIST}, { REF_NOT_IN_LIST, REF_NOT_IN_LIST } };
  ------------------
  |  |   42|  28.8k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
                  int8_t ref_idx_list[LIST_A][2] = { {REF_NOT_IN_LIST, REF_NOT_IN_LIST}, { REF_NOT_IN_LIST, REF_NOT_IN_LIST } };
  ------------------
  |  |   42|  28.8k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
                  int8_t ref_idx_list[LIST_A][2] = { {REF_NOT_IN_LIST, REF_NOT_IN_LIST}, { REF_NOT_IN_LIST, REF_NOT_IN_LIST } };
  ------------------
  |  |   42|  28.8k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  802|  65.4k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (802:36): [True: 47.8k, False: 17.6k]
  ------------------
  803|   121k|      for (int32_t i = 0; i < 2; ++i) {
  ------------------
  |  Branch (803:27): [True: 84.8k, False: 36.6k]
  ------------------
  804|  84.8k|        iPartIdx = i << 3;
  805|  84.8k|        int8_t ref_idx = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  84.8k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  806|  84.8k|        if (IS_DIR (mbType, i, listIdx)) {
  ------------------
  |  |  312|  84.8k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  84.8k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 54.1k, False: 30.7k]
  |  |  ------------------
  ------------------
  807|  54.1k|          WELS_READ_VERIFY (ParseRefIdxCabac (pCtx, pNeighAvail, pNonZeroCount, pRefIndex, pDirect, listIdx, iPartIdx,
  ------------------
  |  |   52|  54.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  54.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  54.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 411, False: 53.7k]
  |  |  ------------------
  |  |   55|  54.1k|    return uiRetTmp; \
  |  |   56|  54.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 53.7k]
  |  |  ------------------
  ------------------
  808|  54.1k|                                              pRefCount[listIdx], 0, ref_idx));
  809|  53.7k|          if ((ref_idx < 0) || (ref_idx >= pRefCount[listIdx])
  ------------------
  |  Branch (809:15): [True: 359, False: 53.3k]
  |  Branch (809:32): [True: 2.18k, False: 51.1k]
  ------------------
  810|  51.1k|              || (pCtx->sRefPic.pRefList[listIdx][ref_idx] == NULL)) { //error ref_idx
  ------------------
  |  Branch (810:18): [True: 11.3k, False: 39.8k]
  ------------------
  811|  13.8k|            pCtx->bMbRefConcealed = true;
  812|  13.8k|            if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (812:17): [True: 13.8k, False: 0]
  ------------------
  813|  13.8k|              ref_idx = 0;
  814|  13.8k|              pCtx->iErrorCode |= dsBitstreamError;
  815|  13.8k|              RETURN_ERR_IF_NULL(pCtx->sRefPic.pRefList[listIdx][ref_idx]);
  ------------------
  |  |   47|  13.8k|#define RETURN_ERR_IF_NULL(pRefPic0) \
  |  |   48|  13.8k|if ( pRefPic0 == NULL) \
  |  |  ------------------
  |  |  |  Branch (48:6): [True: 10.7k, False: 3.11k]
  |  |  ------------------
  |  |   49|  13.8k|  return GENERATE_ERROR_NO(ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX)
  |  |  ------------------
  |  |  |  |   59|  10.7k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  |  |  ------------------
  ------------------
  816|  13.8k|            } else {
  817|      0|              return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  818|      0|            }
  819|  13.8k|          }
  820|  42.9k|          pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (pCtx->sRefPic.pRefList[listIdx][ref_idx]
  ------------------
  |  Branch (820:35): [True: 579, False: 42.4k]
  |  Branch (820:55): [True: 25.4k, False: 16.9k]
  |  Branch (820:83): [True: 16.9k, False: 0]
  ------------------
  821|  16.9k|                                  && (pCtx->sRefPic.pRefList[listIdx][ref_idx]->bIsComplete || bIsPending));
  ------------------
  |  Branch (821:39): [True: 439, False: 16.4k]
  |  Branch (821:96): [True: 0, False: 16.4k]
  ------------------
  822|  42.9k|        }
  823|  73.7k|        UpdateP16x8RefIdxCabac (pCurDqLayer, pRefIndex, iPartIdx, ref_idx, listIdx);
  824|  73.7k|        ref_idx_list[listIdx][i] = ref_idx;
  825|  73.7k|      }
  826|  47.8k|    }
  827|  51.8k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (827:36): [True: 34.9k, False: 16.8k]
  ------------------
  828|   103k|      for (int32_t i = 0; i < 2; ++i) {
  ------------------
  |  Branch (828:27): [True: 69.4k, False: 34.1k]
  ------------------
  829|  69.4k|        iPartIdx = i << 3;
  830|  69.4k|        int8_t ref_idx = ref_idx_list[listIdx][i];
  831|  69.4k|        if (IS_DIR (mbType, i, listIdx)) {
  ------------------
  |  |  312|  69.4k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  69.4k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 42.1k, False: 27.2k]
  |  |  ------------------
  ------------------
  832|  42.1k|          PredInter16x8Mv (pMotionVector, pRefIndex, listIdx, iPartIdx, ref_idx, pMv);
  833|  42.1k|          WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, listIdx, 0, pMvd[0]));
  ------------------
  |  |   52|  42.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  42.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  42.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 447, False: 41.7k]
  |  |  ------------------
  |  |   55|  42.1k|    return uiRetTmp; \
  |  |   56|  42.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 41.7k]
  |  |  ------------------
  ------------------
  834|  41.7k|          WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, listIdx, 1, pMvd[1]));
  ------------------
  |  |   52|  41.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  41.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  41.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 340, False: 41.4k]
  |  |  ------------------
  |  |   55|  41.7k|    return uiRetTmp; \
  |  |   56|  41.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 41.4k]
  |  |  ------------------
  ------------------
  835|  41.4k|          pMv[0] += pMvd[0];
  836|  41.4k|          pMv[1] += pMvd[1];
  837|  41.4k|          WELS_CHECK_SE_BOTH_WARNING (pMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|  41.4k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  41.4k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 288, False: 41.1k]
  |  |  |  Branch (289:28): [True: 478, False: 40.6k]
  |  |  ------------------
  |  |  290|    766|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|    766|}\
  |  |  292|  41.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 41.4k]
  |  |  ------------------
  ------------------
  838|  41.4k|        } else {
  839|  27.2k|          * (uint32_t*)pMv = * (uint32_t*)pMvd = 0;
  840|  27.2k|        }
  841|  68.6k|        UpdateP16x8MotionInfo (pCurDqLayer, pMotionVector, pRefIndex, listIdx, iPartIdx, ref_idx, pMv);
  842|  68.6k|        UpdateP16x8MvdCabac (pCurDqLayer, pMvdCache, iPartIdx, pMvd, listIdx);
  843|  68.6k|      }
  844|  34.9k|    }
  845|  63.1k|  } else if (IS_INTER_8x16 (mbType)) {
  ------------------
  |  |  309|  63.1k|#define IS_INTER_8x16(type) ( (type)&MB_TYPE_8x16 )
  |  |  ------------------
  |  |  |  |  280|  63.1k|#define MB_TYPE_8x16        0x00000020
  |  |  ------------------
  |  |  |  Branch (309:29): [True: 10.8k, False: 52.2k]
  |  |  ------------------
  ------------------
  846|  10.8k|    int8_t ref_idx_list[LIST_A][2] = { { REF_NOT_IN_LIST, REF_NOT_IN_LIST }, { REF_NOT_IN_LIST, REF_NOT_IN_LIST } };
  ------------------
  |  |   42|  10.8k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
                  int8_t ref_idx_list[LIST_A][2] = { { REF_NOT_IN_LIST, REF_NOT_IN_LIST }, { REF_NOT_IN_LIST, REF_NOT_IN_LIST } };
  ------------------
  |  |   42|  10.8k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
                  int8_t ref_idx_list[LIST_A][2] = { { REF_NOT_IN_LIST, REF_NOT_IN_LIST }, { REF_NOT_IN_LIST, REF_NOT_IN_LIST } };
  ------------------
  |  |   42|  10.8k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
                  int8_t ref_idx_list[LIST_A][2] = { { REF_NOT_IN_LIST, REF_NOT_IN_LIST }, { REF_NOT_IN_LIST, REF_NOT_IN_LIST } };
  ------------------
  |  |   42|  10.8k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  847|  31.5k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (847:36): [True: 21.2k, False: 10.3k]
  ------------------
  848|  62.6k|      for (int32_t i = 0; i < 2; ++i) {
  ------------------
  |  Branch (848:27): [True: 41.9k, False: 20.7k]
  ------------------
  849|  41.9k|        iPartIdx = i << 2;
  850|  41.9k|        int8_t ref_idx = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  41.9k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  851|  41.9k|        if (IS_DIR (mbType, i, listIdx)) {
  ------------------
  |  |  312|  41.9k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  41.9k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 26.8k, False: 15.1k]
  |  |  ------------------
  ------------------
  852|  26.8k|          WELS_READ_VERIFY (ParseRefIdxCabac (pCtx, pNeighAvail, pNonZeroCount, pRefIndex, pDirect, listIdx, iPartIdx,
  ------------------
  |  |   52|  26.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  26.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  26.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 212, False: 26.6k]
  |  |  ------------------
  |  |   55|  26.8k|    return uiRetTmp; \
  |  |   56|  26.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 26.6k]
  |  |  ------------------
  ------------------
  853|  26.8k|                                              pRefCount[listIdx], 0, ref_idx));
  854|  26.6k|          if ((ref_idx < 0) || (ref_idx >= pRefCount[listIdx])
  ------------------
  |  Branch (854:15): [True: 207, False: 26.4k]
  |  Branch (854:32): [True: 1.53k, False: 24.8k]
  ------------------
  855|  24.8k|              || (pCtx->sRefPic.pRefList[listIdx][ref_idx] == NULL)) { //error ref_idx
  ------------------
  |  Branch (855:18): [True: 1.07k, False: 23.8k]
  ------------------
  856|  2.82k|            pCtx->bMbRefConcealed = true;
  857|  2.82k|            if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (857:17): [True: 2.82k, False: 0]
  ------------------
  858|  2.82k|              ref_idx = 0;
  859|  2.82k|              pCtx->iErrorCode |= dsBitstreamError;
  860|  2.82k|              RETURN_ERR_IF_NULL(pCtx->sRefPic.pRefList[listIdx][ref_idx]);
  ------------------
  |  |   47|  2.82k|#define RETURN_ERR_IF_NULL(pRefPic0) \
  |  |   48|  2.82k|if ( pRefPic0 == NULL) \
  |  |  ------------------
  |  |  |  Branch (48:6): [True: 301, False: 2.51k]
  |  |  ------------------
  |  |   49|  2.82k|  return GENERATE_ERROR_NO(ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX)
  |  |  ------------------
  |  |  |  |   59|    301|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  |  |  ------------------
  ------------------
  861|  2.82k|            } else {
  862|      0|              return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  863|      0|            }
  864|  2.82k|          }
  865|  26.3k|          pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (pCtx->sRefPic.pRefList[listIdx][ref_idx]
  ------------------
  |  Branch (865:35): [True: 477, False: 25.8k]
  |  Branch (865:55): [True: 15.6k, False: 10.2k]
  |  Branch (865:83): [True: 10.2k, False: 0]
  ------------------
  866|  10.2k|                                  && (pCtx->sRefPic.pRefList[listIdx][ref_idx]->bIsComplete || bIsPending));
  ------------------
  |  Branch (866:39): [True: 1.21k, False: 8.98k]
  |  Branch (866:96): [True: 0, False: 8.98k]
  ------------------
  867|  26.3k|        }
  868|  41.4k|        UpdateP8x16RefIdxCabac (pCurDqLayer, pRefIndex, iPartIdx, ref_idx, listIdx);
  869|  41.4k|        ref_idx_list[listIdx][i] = ref_idx;
  870|  41.4k|      }
  871|  21.2k|    }
  872|  27.9k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (872:36): [True: 19.3k, False: 8.60k]
  ------------------
  873|  55.3k|      for (int32_t i = 0; i < 2; ++i) {
  ------------------
  |  Branch (873:27): [True: 37.7k, False: 17.6k]
  ------------------
  874|  37.7k|        iPartIdx = i << 2;
  875|  37.7k|        int8_t ref_idx = ref_idx_list[listIdx][i];
  876|  37.7k|        if (IS_DIR (mbType, i, listIdx)) {
  ------------------
  |  |  312|  37.7k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  37.7k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 23.9k, False: 13.8k]
  |  |  ------------------
  ------------------
  877|  23.9k|          PredInter8x16Mv (pMotionVector, pRefIndex, listIdx, iPartIdx, ref_idx, pMv);
  878|  23.9k|          WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, listIdx, 0, pMvd[0]));
  ------------------
  |  |   52|  23.9k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  23.9k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  23.9k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.16k, False: 22.7k]
  |  |  ------------------
  |  |   55|  23.9k|    return uiRetTmp; \
  |  |   56|  23.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 22.7k]
  |  |  ------------------
  ------------------
  879|  22.7k|          WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, listIdx, 1, pMvd[1]));
  ------------------
  |  |   52|  22.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  22.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  22.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 579, False: 22.1k]
  |  |  ------------------
  |  |   55|  22.7k|    return uiRetTmp; \
  |  |   56|  22.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 22.1k]
  |  |  ------------------
  ------------------
  880|  22.1k|          pMv[0] += pMvd[0];
  881|  22.1k|          pMv[1] += pMvd[1];
  882|  22.1k|          WELS_CHECK_SE_BOTH_WARNING (pMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|  22.1k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  22.1k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 739, False: 21.4k]
  |  |  |  Branch (289:28): [True: 1.33k, False: 20.0k]
  |  |  ------------------
  |  |  290|  2.07k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  2.07k|}\
  |  |  292|  22.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 22.1k]
  |  |  ------------------
  ------------------
  883|  22.1k|        } else {
  884|  13.8k|          * (uint32_t*)pMv = * (uint32_t*)pMvd = 0;
  885|  13.8k|        }
  886|  36.0k|        UpdateP8x16MotionInfo (pCurDqLayer, pMotionVector, pRefIndex, listIdx, iPartIdx, ref_idx, pMv);
  887|  36.0k|        UpdateP8x16MvdCabac (pCurDqLayer, pMvdCache, iPartIdx, pMvd, listIdx);
  888|  36.0k|      }
  889|  19.3k|    }
  890|  52.2k|  } else if (IS_Inter_8x8 (mbType)) {
  ------------------
  |  |  320|  52.2k|#define IS_Inter_8x8(type) ( ((type)&MB_TYPE_8x8) != 0)
  |  |  ------------------
  |  |  |  |  281|  52.2k|#define MB_TYPE_8x8         0x00000040
  |  |  ------------------
  |  |  |  Branch (320:28): [True: 52.2k, False: 0]
  |  |  ------------------
  ------------------
  891|  52.2k|    int8_t pSubPartCount[4], pPartW[4];
  892|  52.2k|    uint32_t uiSubMbType;
  893|       |    //sub_mb_type, partition
  894|  52.2k|    int16_t pMvDirect[LIST_A][2] = { {0, 0}, {0, 0} };
  895|  52.2k|    if (pCtx->sRefPic.pRefList[LIST_1][0] == NULL) {
  ------------------
  |  Branch (895:9): [True: 416, False: 51.8k]
  ------------------
  896|    416|      SLogContext* pLogCtx = & (pCtx->sLogCtx);
  897|    416|      WelsLog (pLogCtx, WELS_LOG_ERROR, "Colocated Ref Picture for B-Slice is lost, B-Slice decoding cannot be continued!");
  898|    416|      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_DATA, ERR_INFO_REFERENCE_PIC_LOST);
  ------------------
  |  |   59|    416|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  899|    416|    }
  900|  51.8k|    bool bIsLongRef = pCtx->sRefPic.pRefList[LIST_1][0]->bIsLongRef;
  901|  51.8k|    const int32_t ref0Count = WELS_MIN (pSliceHeader->uiRefCount[LIST_0], pCtx->sRefPic.uiRefCount[LIST_0]);
  ------------------
  |  |   95|  51.8k|#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (95:25): [True: 307, False: 51.5k]
  |  |  ------------------
  ------------------
  902|  51.8k|    bool has_direct_called = false;
  903|  51.8k|    SubMbType directSubMbType = 0;
  904|   253k|    for (int32_t i = 0; i < 4; i++) {
  ------------------
  |  Branch (904:25): [True: 204k, False: 49.3k]
  ------------------
  905|   204k|      WELS_READ_VERIFY (ParseBSubMBTypeCabac (pCtx, pNeighAvail, uiSubMbType));
  ------------------
  |  |   52|   204k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   204k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   204k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.55k, False: 201k]
  |  |  ------------------
  |  |   55|   204k|    return uiRetTmp; \
  |  |   56|   204k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 201k]
  |  |  ------------------
  ------------------
  906|   201k|      if (uiSubMbType >= 13) { //invalid sub_mb_type
  ------------------
  |  Branch (906:11): [True: 0, False: 201k]
  ------------------
  907|      0|        return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_SUB_MB_TYPE);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  908|      0|      }
  909|       |//      pCurDqLayer->pSubMbType[iMbXy][i] = g_ksInterBSubMbTypeInfo[uiSubMbType].iType;
  910|   201k|      pSubPartCount[i] = g_ksInterBSubMbTypeInfo[uiSubMbType].iPartCount;
  911|   201k|      pPartW[i] = g_ksInterBSubMbTypeInfo[uiSubMbType].iPartWidth;
  912|       |
  913|       |      // Need modification when B picture add in, reference to 7.3.5
  914|   201k|      if (pSubPartCount[i] > 1)
  ------------------
  |  Branch (914:11): [True: 63.3k, False: 138k]
  ------------------
  915|  63.3k|        pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] = false;
  916|       |
  917|   201k|      if (IS_DIRECT (g_ksInterBSubMbTypeInfo[uiSubMbType].iType)) {
  ------------------
  |  |  316|   201k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|   201k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  |  |  |  Branch (316:25): [True: 24.3k, False: 177k]
  |  |  ------------------
  ------------------
  918|  24.3k|        if (!has_direct_called) {
  ------------------
  |  Branch (918:13): [True: 9.39k, False: 14.9k]
  ------------------
  919|  9.39k|          if (pSliceHeader->iDirectSpatialMvPredFlag) {
  ------------------
  |  Branch (919:15): [True: 5.39k, False: 3.99k]
  ------------------
  920|  5.39k|            int32_t ret = PredMvBDirectSpatial (pCtx, pMvDirect, iRef, directSubMbType);
  921|  5.39k|            if (ret != ERR_NONE) {
  ------------------
  |  Branch (921:17): [True: 0, False: 5.39k]
  ------------------
  922|      0|              return ret;
  923|      0|            }
  924|       |
  925|  5.39k|          } else {
  926|       |            //temporal direct mode
  927|  3.99k|            int32_t ret = PredBDirectTemporal (pCtx, pMvDirect, iRef, directSubMbType);
  928|  3.99k|            if (ret != ERR_NONE) {
  ------------------
  |  Branch (928:17): [True: 0, False: 3.99k]
  ------------------
  929|      0|              return ret;
  930|      0|            }
  931|  3.99k|          }
  932|  9.39k|          has_direct_called = true;
  933|  9.39k|        }
  934|  24.3k|        pCurDqLayer->pSubMbType[iMbXy][i] = directSubMbType;
  935|  24.3k|        if (IS_SUB_4x4 (pCurDqLayer->pSubMbType[iMbXy][i])) {
  ------------------
  |  |  324|  24.3k|#define IS_SUB_4x4(sub_type) (((sub_type)&SUB_MB_TYPE_4x4) != 0)
  |  |  ------------------
  |  |  |  |  297|  24.3k|#define SUB_MB_TYPE_4x4     0x00000008
  |  |  ------------------
  |  |  |  Branch (324:30): [True: 3.14k, False: 21.2k]
  |  |  ------------------
  ------------------
  936|  3.14k|          pSubPartCount[i] = 4;
  937|  3.14k|          pPartW[i] = 1;
  938|  3.14k|        }
  939|   177k|      } else {
  940|   177k|        pCurDqLayer->pSubMbType[iMbXy][i] = g_ksInterBSubMbTypeInfo[uiSubMbType].iType;
  941|   177k|      }
  942|   201k|    }
  943|   246k|    for (int32_t i = 0; i < 4; i++) { //Direct 8x8 Ref and mv
  ------------------
  |  Branch (943:25): [True: 197k, False: 49.3k]
  ------------------
  944|   197k|      int16_t iIdx8 = i << 2;
  945|   197k|      if (IS_DIRECT (pCurDqLayer->pSubMbType[iMbXy][i])) {
  ------------------
  |  |  316|   197k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|   197k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  |  |  |  Branch (316:25): [True: 23.6k, False: 173k]
  |  |  ------------------
  ------------------
  946|  23.6k|        if (pSliceHeader->iDirectSpatialMvPredFlag) {
  ------------------
  |  Branch (946:13): [True: 16.0k, False: 7.58k]
  ------------------
  947|  16.0k|          FillSpatialDirect8x8Mv (pCurDqLayer, iIdx8, pSubPartCount[i], pPartW[i], directSubMbType, bIsLongRef, pMvDirect, iRef,
  948|  16.0k|                                  pMotionVector, pMvdCache);
  949|  16.0k|        } else {
  950|  7.58k|          int16_t (*mvColoc)[2] = pCurDqLayer->iColocMv[LIST_0];
  951|  7.58k|          iRef[LIST_1] = 0;
  952|  7.58k|          iRef[LIST_0] = 0;
  953|  7.58k|          const uint8_t uiColoc4Idx = g_kuiScan4[iIdx8];
  954|  7.58k|          if (!pCurDqLayer->iColocIntra[uiColoc4Idx]) {
  ------------------
  |  Branch (954:15): [True: 7.33k, False: 244]
  ------------------
  955|  7.33k|            iRef[LIST_0] = 0;
  956|  7.33k|            int8_t colocRefIndexL0 = pCurDqLayer->iColocRefIndex[LIST_0][uiColoc4Idx];
  957|  7.33k|            if (colocRefIndexL0 >= 0) {
  ------------------
  |  Branch (957:17): [True: 7.02k, False: 315]
  ------------------
  958|  7.02k|              iRef[LIST_0] = MapColToList0 (pCtx, colocRefIndexL0, ref0Count);
  959|  7.02k|            } else {
  960|    315|              mvColoc = pCurDqLayer->iColocMv[LIST_1];
  961|    315|            }
  962|  7.33k|          }
  963|  7.58k|          Update8x8RefIdx (pCurDqLayer, iIdx8, LIST_0, iRef[LIST_0]);
  964|  7.58k|          Update8x8RefIdx (pCurDqLayer, iIdx8, LIST_1, iRef[LIST_1]);
  965|  7.58k|          UpdateP8x8RefCacheIdxCabac (pRefIndex, iIdx8, LIST_0, iRef[LIST_0]);
  966|  7.58k|          UpdateP8x8RefCacheIdxCabac (pRefIndex, iIdx8, LIST_1, iRef[LIST_1]);
  967|  7.58k|          FillTemporalDirect8x8Mv (pCurDqLayer, iIdx8, pSubPartCount[i], pPartW[i], directSubMbType, iRef, mvColoc, pMotionVector,
  968|  7.58k|                                   pMvdCache);
  969|  7.58k|        }
  970|  23.6k|      }
  971|   197k|    }
  972|       |    //ref no-direct
  973|  49.3k|    int8_t ref_idx_list[LIST_A][4] = { {REF_NOT_IN_LIST, REF_NOT_IN_LIST}, { REF_NOT_IN_LIST, REF_NOT_IN_LIST } };
  ------------------
  |  |   42|  49.3k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
                  int8_t ref_idx_list[LIST_A][4] = { {REF_NOT_IN_LIST, REF_NOT_IN_LIST}, { REF_NOT_IN_LIST, REF_NOT_IN_LIST } };
  ------------------
  |  |   42|  49.3k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
                  int8_t ref_idx_list[LIST_A][4] = { {REF_NOT_IN_LIST, REF_NOT_IN_LIST}, { REF_NOT_IN_LIST, REF_NOT_IN_LIST } };
  ------------------
  |  |   42|  49.3k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
                  int8_t ref_idx_list[LIST_A][4] = { {REF_NOT_IN_LIST, REF_NOT_IN_LIST}, { REF_NOT_IN_LIST, REF_NOT_IN_LIST } };
  ------------------
  |  |   42|  49.3k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  974|   146k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (974:36): [True: 97.8k, False: 48.4k]
  ------------------
  975|   486k|      for (int32_t i = 0; i < 4; i++) {
  ------------------
  |  Branch (975:27): [True: 389k, False: 97.0k]
  ------------------
  976|   389k|        int16_t iIdx8 = i << 2;
  977|   389k|        int32_t subMbType = pCurDqLayer->pSubMbType[iMbXy][i];
  978|   389k|        int8_t iref = REF_NOT_IN_LIST;
  ------------------
  |  |   42|   389k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  979|   389k|        if (IS_DIRECT (subMbType)) {
  ------------------
  |  |  316|   389k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|   389k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  |  |  |  Branch (316:25): [True: 45.8k, False: 343k]
  |  |  ------------------
  ------------------
  980|  45.8k|          if (pSliceHeader->iDirectSpatialMvPredFlag) {
  ------------------
  |  Branch (980:15): [True: 31.9k, False: 13.8k]
  ------------------
  981|  31.9k|            Update8x8RefIdx (pCurDqLayer, iIdx8, listIdx, iRef[listIdx]);
  982|  31.9k|            ref_idx_list[listIdx][i] = iRef[listIdx];
  983|  31.9k|          }
  984|  45.8k|          UpdateP8x8DirectCabac (pCurDqLayer, iIdx8);
  985|   343k|        } else {
  986|   343k|          if (IS_DIR (subMbType, 0, listIdx)) {
  ------------------
  |  |  312|   343k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|   343k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 271k, False: 72.7k]
  |  |  ------------------
  ------------------
  987|   271k|            WELS_READ_VERIFY (ParseRefIdxCabac (pCtx, pNeighAvail, pNonZeroCount, pRefIndex, pDirect, listIdx, iIdx8,
  ------------------
  |  |   52|   271k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   271k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   271k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 287, False: 270k]
  |  |  ------------------
  |  |   55|   271k|    return uiRetTmp; \
  |  |   56|   271k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 270k]
  |  |  ------------------
  ------------------
  988|   271k|                                                pRefCount[listIdx], 1,
  989|   271k|                                                iref));
  990|   270k|            if ((iref < 0) || (iref >= pRefCount[listIdx]) || (pCtx->sRefPic.pRefList[listIdx][iref] == NULL)) { //error ref_idx
  ------------------
  |  Branch (990:17): [True: 215, False: 270k]
  |  Branch (990:31): [True: 7.35k, False: 263k]
  |  Branch (990:63): [True: 5.02k, False: 258k]
  ------------------
  991|  12.5k|              pCtx->bMbRefConcealed = true;
  992|  12.5k|              if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (992:19): [True: 12.5k, False: 0]
  ------------------
  993|  12.5k|                iref = 0;
  994|  12.5k|                pCtx->iErrorCode |= dsBitstreamError;
  995|  12.5k|                RETURN_ERR_IF_NULL(pCtx->sRefPic.pRefList[listIdx][iref]);
  ------------------
  |  |   47|  12.5k|#define RETURN_ERR_IF_NULL(pRefPic0) \
  |  |   48|  12.5k|if ( pRefPic0 == NULL) \
  |  |  ------------------
  |  |  |  Branch (48:6): [True: 524, False: 12.0k]
  |  |  ------------------
  |  |   49|  12.5k|  return GENERATE_ERROR_NO(ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX)
  |  |  ------------------
  |  |  |  |   59|    524|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  |  |  ------------------
  ------------------
  996|  12.5k|              } else {
  997|      0|                return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  998|      0|              }
  999|  12.5k|            }
 1000|   270k|            pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (pCtx->sRefPic.pRefList[listIdx][iref]
  ------------------
  |  Branch (1000:37): [True: 1.82k, False: 268k]
  |  Branch (1000:57): [True: 224k, False: 44.1k]
  |  Branch (1000:85): [True: 44.1k, False: 0]
  ------------------
 1001|  44.1k|                                    && (pCtx->sRefPic.pRefList[listIdx][iref]->bIsComplete || bIsPending));
  ------------------
  |  Branch (1001:41): [True: 3.43k, False: 40.6k]
  |  Branch (1001:95): [True: 0, False: 40.6k]
  ------------------
 1002|   270k|          }
 1003|   342k|          Update8x8RefIdx (pCurDqLayer, iIdx8, listIdx, iref);
 1004|   342k|          ref_idx_list[listIdx][i] = iref;
 1005|   342k|        }
 1006|   389k|      }
 1007|  97.8k|    }
 1008|       |    //mv
 1009|   143k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (1009:36): [True: 95.9k, False: 47.1k]
  ------------------
 1010|   476k|      for (int32_t i = 0; i < 4; i++) {
  ------------------
  |  Branch (1010:27): [True: 381k, False: 94.5k]
  ------------------
 1011|   381k|        int16_t iIdx8 = i << 2;
 1012|       |
 1013|   381k|        uint32_t subMbType = pCurDqLayer->pSubMbType[iMbXy][i];
 1014|   381k|        if (IS_DIRECT (subMbType) && !pSliceHeader->iDirectSpatialMvPredFlag)
  ------------------
  |  |  316|   763k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|   381k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  |  |  |  Branch (316:25): [True: 43.5k, False: 338k]
  |  |  ------------------
  ------------------
  |  Branch (1014:38): [True: 11.8k, False: 31.6k]
  ------------------
 1015|  11.8k|          continue;
 1016|       |
 1017|   369k|        int8_t iref = ref_idx_list[listIdx][i];
 1018|   369k|        UpdateP8x8RefCacheIdxCabac (pRefIndex, iIdx8, listIdx, iref);
 1019|       |
 1020|   369k|        if (IS_DIRECT (subMbType))
  ------------------
  |  |  316|   369k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|   369k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  |  |  |  Branch (316:25): [True: 31.6k, False: 338k]
  |  |  ------------------
  ------------------
 1021|  31.6k|          continue;
 1022|       |
 1023|   338k|        bool is_dir = IS_DIR (subMbType, 0, listIdx) > 0;
  ------------------
  |  |  312|   338k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|   338k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  ------------------
 1024|   338k|        int8_t iPartCount = pSubPartCount[i];
 1025|   338k|        int16_t iBlockW = pPartW[i];
 1026|   338k|        uint8_t iScan4Idx, iCacheIdx;
 1027|   868k|        for (int32_t j = 0; j < iPartCount; j++) {
  ------------------
  |  Branch (1027:29): [True: 532k, False: 336k]
  ------------------
 1028|   532k|          iPartIdx = (i << 2) + j * iBlockW;
 1029|   532k|          iScan4Idx = g_kuiScan4[iPartIdx];
 1030|   532k|          iCacheIdx = g_kuiCache30ScanIdx[iPartIdx];
 1031|   532k|          if (is_dir) {
  ------------------
  |  Branch (1031:15): [True: 420k, False: 111k]
  ------------------
 1032|   420k|            PredMv (pMotionVector, pRefIndex, listIdx, iPartIdx, iBlockW, iref, pMv);
 1033|   420k|            WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, listIdx, 0, pMvd[0]));
  ------------------
  |  |   52|   420k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   420k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   420k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 589, False: 419k]
  |  |  ------------------
  |  |   55|   420k|    return uiRetTmp; \
  |  |   56|   420k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 419k]
  |  |  ------------------
  ------------------
 1034|   419k|            WELS_READ_VERIFY (ParseMvdInfoCabac (pCtx, pNeighAvail, pRefIndex, pMvdCache, iPartIdx, listIdx, 1, pMvd[1]));
  ------------------
  |  |   52|   419k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   419k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   419k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 794, False: 418k]
  |  |  ------------------
  |  |   55|   419k|    return uiRetTmp; \
  |  |   56|   419k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 418k]
  |  |  ------------------
  ------------------
 1035|   418k|            pMv[0] += pMvd[0];
 1036|   418k|            pMv[1] += pMvd[1];
 1037|   418k|            WELS_CHECK_SE_BOTH_WARNING (pMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|   418k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|   418k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 600, False: 418k]
  |  |  |  Branch (289:28): [True: 4.75k, False: 413k]
  |  |  ------------------
  |  |  290|  5.35k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  5.35k|}\
  |  |  292|   418k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 418k]
  |  |  ------------------
  ------------------
 1038|   418k|          } else {
 1039|   111k|            * (uint32_t*)pMv = * (uint32_t*)pMvd = 0;
 1040|   111k|          }
 1041|   530k|          if (IS_SUB_8x8 (subMbType)) { //MB_TYPE_8x8
  ------------------
  |  |  321|   530k|#define IS_SUB_8x8(sub_type) (((sub_type)&SUB_MB_TYPE_8x8) != 0)
  |  |  ------------------
  |  |  |  |  294|   530k|#define SUB_MB_TYPE_8x8     0x00000001
  |  |  ------------------
  |  |  |  Branch (321:30): [True: 219k, False: 310k]
  |  |  ------------------
  ------------------
 1042|   219k|            ST32 ((pMv + 2), LD32 (pMv));
  ------------------
  |  |   67|   219k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1043|   219k|            ST32 ((pMvd + 2), LD32 (pMvd));
  ------------------
  |  |   67|   219k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1044|   219k|            ST64 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][iScan4Idx], LD64 (pMv));
  ------------------
  |  |   68|   219k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1045|   219k|            ST64 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][iScan4Idx + 4], LD64 (pMv));
  ------------------
  |  |   68|   219k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1046|   219k|            ST64 (pCurDqLayer->pMvd[listIdx][iMbXy][iScan4Idx], LD64 (pMvd));
  ------------------
  |  |   68|   219k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1047|   219k|            ST64 (pCurDqLayer->pMvd[listIdx][iMbXy][iScan4Idx + 4], LD64 (pMvd));
  ------------------
  |  |   68|   219k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1048|   219k|            ST64 (pMotionVector[listIdx][iCacheIdx], LD64 (pMv));
  ------------------
  |  |   68|   219k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1049|   219k|            ST64 (pMotionVector[listIdx][iCacheIdx + 6], LD64 (pMv));
  ------------------
  |  |   68|   219k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1050|   219k|            ST64 (pMvdCache[listIdx][iCacheIdx], LD64 (pMvd));
  ------------------
  |  |   68|   219k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1051|   219k|            ST64 (pMvdCache[listIdx][iCacheIdx + 6], LD64 (pMvd));
  ------------------
  |  |   68|   219k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1052|   310k|          } else if (IS_SUB_4x4 (subMbType)) { //MB_TYPE_4x4
  ------------------
  |  |  324|   310k|#define IS_SUB_4x4(sub_type) (((sub_type)&SUB_MB_TYPE_4x4) != 0)
  |  |  ------------------
  |  |  |  |  297|   310k|#define SUB_MB_TYPE_4x4     0x00000008
  |  |  ------------------
  |  |  |  Branch (324:30): [True: 152k, False: 158k]
  |  |  ------------------
  ------------------
 1053|   152k|            ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][iScan4Idx], LD32 (pMv));
  ------------------
  |  |   67|   152k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1054|   152k|            ST32 (pCurDqLayer->pMvd[listIdx][iMbXy][iScan4Idx], LD32 (pMvd));
  ------------------
  |  |   67|   152k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1055|   152k|            ST32 (pMotionVector[listIdx][iCacheIdx], LD32 (pMv));
  ------------------
  |  |   67|   152k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1056|   152k|            ST32 (pMvdCache[listIdx][iCacheIdx], LD32 (pMvd));
  ------------------
  |  |   67|   152k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1057|   158k|          } else if (IS_SUB_4x8 (subMbType)) { //MB_TYPE_4x8 5, 7, 9
  ------------------
  |  |  323|   158k|#define IS_SUB_4x8(sub_type) (((sub_type)&SUB_MB_TYPE_4x8) != 0)
  |  |  ------------------
  |  |  |  |  296|   158k|#define SUB_MB_TYPE_4x8     0x00000004
  |  |  ------------------
  |  |  |  Branch (323:30): [True: 22.2k, False: 136k]
  |  |  ------------------
  ------------------
 1058|  22.2k|            ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][iScan4Idx], LD32 (pMv));
  ------------------
  |  |   67|  22.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1059|  22.2k|            ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][iScan4Idx + 4], LD32 (pMv));
  ------------------
  |  |   67|  22.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1060|  22.2k|            ST32 (pCurDqLayer->pMvd[listIdx][iMbXy][iScan4Idx], LD32 (pMvd));
  ------------------
  |  |   67|  22.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1061|  22.2k|            ST32 (pCurDqLayer->pMvd[listIdx][iMbXy][iScan4Idx + 4], LD32 (pMvd));
  ------------------
  |  |   67|  22.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1062|  22.2k|            ST32 (pMotionVector[listIdx][iCacheIdx], LD32 (pMv));
  ------------------
  |  |   67|  22.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1063|  22.2k|            ST32 (pMotionVector[listIdx][iCacheIdx + 6], LD32 (pMv));
  ------------------
  |  |   67|  22.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1064|  22.2k|            ST32 (pMvdCache[listIdx][iCacheIdx], LD32 (pMvd));
  ------------------
  |  |   67|  22.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1065|  22.2k|            ST32 (pMvdCache[listIdx][iCacheIdx + 6], LD32 (pMvd));
  ------------------
  |  |   67|  22.2k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1066|   136k|          } else { //MB_TYPE_8x4 4, 6, 8
 1067|   136k|            ST32 ((pMv + 2), LD32 (pMv));
  ------------------
  |  |   67|   136k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1068|   136k|            ST32 ((pMvd + 2), LD32 (pMvd));
  ------------------
  |  |   67|   136k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1069|   136k|            ST64 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][iScan4Idx], LD64 (pMv));
  ------------------
  |  |   68|   136k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1070|   136k|            ST64 (pCurDqLayer->pMvd[listIdx][iMbXy][iScan4Idx], LD64 (pMvd));
  ------------------
  |  |   68|   136k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1071|   136k|            ST64 (pMotionVector[listIdx][iCacheIdx], LD64 (pMv));
  ------------------
  |  |   68|   136k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1072|   136k|            ST64 (pMvdCache[listIdx][iCacheIdx], LD64 (pMvd));
  ------------------
  |  |   68|   136k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
 1073|   136k|          }
 1074|   530k|        }
 1075|   338k|      }
 1076|  95.9k|    }
 1077|  48.4k|  }
 1078|   108k|  return ERR_NONE;
 1079|   129k|}
_ZN7WelsDec16ParseRefIdxCabacEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailEPhPA30_aPaiiiiRa:
 1083|   691k|                          int32_t iListIdx, int32_t iZOrderIdx, int32_t iActiveRefNum, int32_t b8mode, int8_t& iRefIdxVal) {
 1084|   691k|  if (iActiveRefNum == 1) {
  ------------------
  |  Branch (1084:7): [True: 289k, False: 401k]
  ------------------
 1085|   289k|    iRefIdxVal = 0;
 1086|   289k|    return ERR_NONE;
 1087|   289k|  }
 1088|   401k|  uint32_t uiCode;
 1089|   401k|  int32_t iIdxA = 0, iIdxB = 0;
 1090|   401k|  int32_t iCtxInc = 0;
 1091|   401k|  int8_t* pRefIdxInMB = pCtx->pCurDqLayer->pDec->pRefIndex[iListIdx][pCtx->pCurDqLayer->iMbXyIndex];
 1092|   401k|  int8_t* pDirect = pCtx->pCurDqLayer->pDirect[pCtx->pCurDqLayer->iMbXyIndex];
 1093|   401k|  if (iZOrderIdx == 0) {
  ------------------
  |  Branch (1093:7): [True: 205k, False: 196k]
  ------------------
 1094|   205k|    iIdxB = (pNeighAvail->iTopAvail && pNeighAvail->iTopType != MB_TYPE_INTRA_PCM
  ------------------
  |  |  284|   328k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1094:14): [True: 123k, False: 82.4k]
  |  Branch (1094:40): [True: 122k, False: 493]
  ------------------
 1095|   122k|             && ref_idx[iListIdx][g_kuiCache30ScanIdx[iZOrderIdx] - 6] > 0);
  ------------------
  |  Branch (1095:17): [True: 24.0k, False: 98.6k]
  ------------------
 1096|   205k|    iIdxA = (pNeighAvail->iLeftAvail && pNeighAvail->iLeftType != MB_TYPE_INTRA_PCM
  ------------------
  |  |  284|   377k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1096:14): [True: 171k, False: 33.7k]
  |  Branch (1096:41): [True: 171k, False: 657]
  ------------------
 1097|   171k|             && ref_idx[iListIdx][g_kuiCache30ScanIdx[iZOrderIdx] - 1] > 0);
  ------------------
  |  Branch (1097:17): [True: 40.1k, False: 131k]
  ------------------
 1098|   205k|    if (pCtx->eSliceType == B_SLICE) {
  ------------------
  |  Branch (1098:9): [True: 92.1k, False: 113k]
  ------------------
 1099|  92.1k|      if (iIdxB > 0 && direct[g_kuiCache30ScanIdx[iZOrderIdx] - 6] == 0) {
  ------------------
  |  Branch (1099:11): [True: 3.53k, False: 88.6k]
  |  Branch (1099:24): [True: 2.71k, False: 824]
  ------------------
 1100|  2.71k|        iCtxInc += 2;
 1101|  2.71k|      }
 1102|  92.1k|      if (iIdxA > 0 && direct[g_kuiCache30ScanIdx[iZOrderIdx] - 1] == 0) {
  ------------------
  |  Branch (1102:11): [True: 11.7k, False: 80.3k]
  |  Branch (1102:24): [True: 10.3k, False: 1.46k]
  ------------------
 1103|  10.3k|        iCtxInc++;
 1104|  10.3k|      }
 1105|  92.1k|    }
 1106|   205k|  } else if (iZOrderIdx == 4) {
  ------------------
  |  Branch (1106:14): [True: 65.9k, False: 130k]
  ------------------
 1107|  65.9k|    iIdxB = (pNeighAvail->iTopAvail && pNeighAvail->iTopType != MB_TYPE_INTRA_PCM
  ------------------
  |  |  284|  94.6k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1107:14): [True: 28.6k, False: 37.3k]
  |  Branch (1107:40): [True: 28.1k, False: 457]
  ------------------
 1108|  28.1k|             && ref_idx[iListIdx][g_kuiCache30ScanIdx[iZOrderIdx] - 6] > 0);
  ------------------
  |  Branch (1108:17): [True: 4.44k, False: 23.7k]
  ------------------
 1109|  65.9k|    iIdxA = pRefIdxInMB[g_kuiScan4[iZOrderIdx] - 1] > 0;
 1110|  65.9k|    if (pCtx->eSliceType == B_SLICE) {
  ------------------
  |  Branch (1110:9): [True: 43.7k, False: 22.2k]
  ------------------
 1111|  43.7k|      if (iIdxB > 0 && direct[g_kuiCache30ScanIdx[iZOrderIdx] - 6] == 0) {
  ------------------
  |  Branch (1111:11): [True: 1.45k, False: 42.3k]
  |  Branch (1111:24): [True: 738, False: 716]
  ------------------
 1112|    738|        iCtxInc += 2;
 1113|    738|      }
 1114|  43.7k|      if (iIdxA > 0 && pDirect[g_kuiScan4[iZOrderIdx] - 1] == 0) {
  ------------------
  |  Branch (1114:11): [True: 7.48k, False: 36.2k]
  |  Branch (1114:24): [True: 6.94k, False: 545]
  ------------------
 1115|  6.94k|        iCtxInc ++;
 1116|  6.94k|      }
 1117|  43.7k|    }
 1118|   130k|  } else if (iZOrderIdx == 8) {
  ------------------
  |  Branch (1118:14): [True: 77.5k, False: 52.4k]
  ------------------
 1119|       |
 1120|  77.5k|    iIdxB = pRefIdxInMB[g_kuiScan4[iZOrderIdx] - 4] > 0;
 1121|  77.5k|    iIdxA = (pNeighAvail->iLeftAvail && pNeighAvail->iLeftType != MB_TYPE_INTRA_PCM
  ------------------
  |  |  284|   147k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1121:14): [True: 69.5k, False: 8.03k]
  |  Branch (1121:41): [True: 69.3k, False: 214]
  ------------------
 1122|  69.3k|             && ref_idx[iListIdx][g_kuiCache30ScanIdx[iZOrderIdx] - 1] > 0);
  ------------------
  |  Branch (1122:17): [True: 24.8k, False: 44.5k]
  ------------------
 1123|  77.5k|    if (pCtx->eSliceType == B_SLICE) {
  ------------------
  |  Branch (1123:9): [True: 53.2k, False: 24.2k]
  ------------------
 1124|  53.2k|      if (iIdxB > 0 && pDirect[g_kuiScan4[iZOrderIdx] - 4] == 0) {
  ------------------
  |  Branch (1124:11): [True: 8.14k, False: 45.1k]
  |  Branch (1124:24): [True: 7.27k, False: 866]
  ------------------
 1125|  7.27k|        iCtxInc += 2;
 1126|  7.27k|      }
 1127|  53.2k|      if (iIdxA > 0 && direct[g_kuiCache30ScanIdx[iZOrderIdx] - 1] == 0) {
  ------------------
  |  Branch (1127:11): [True: 18.2k, False: 34.9k]
  |  Branch (1127:24): [True: 17.5k, False: 729]
  ------------------
 1128|  17.5k|        iCtxInc++;
 1129|  17.5k|      }
 1130|  53.2k|    }
 1131|  77.5k|  } else {
 1132|  52.4k|    iIdxB = pRefIdxInMB[g_kuiScan4[iZOrderIdx] - 4] > 0;
 1133|  52.4k|    iIdxA = pRefIdxInMB[g_kuiScan4[iZOrderIdx] - 1] > 0;
 1134|  52.4k|    if (pCtx->eSliceType == B_SLICE) {
  ------------------
  |  Branch (1134:9): [True: 37.9k, False: 14.5k]
  ------------------
 1135|  37.9k|      if (iIdxB > 0 && pDirect[g_kuiScan4[iZOrderIdx] - 4] == 0) {
  ------------------
  |  Branch (1135:11): [True: 5.98k, False: 31.9k]
  |  Branch (1135:24): [True: 5.48k, False: 493]
  ------------------
 1136|  5.48k|        iCtxInc += 2;
 1137|  5.48k|      }
 1138|  37.9k|      if (iIdxA > 0 && pDirect[g_kuiScan4[iZOrderIdx] - 1] == 0) {
  ------------------
  |  Branch (1138:11): [True: 14.5k, False: 23.4k]
  |  Branch (1138:24): [True: 14.1k, False: 377]
  ------------------
 1139|  14.1k|        iCtxInc++;
 1140|  14.1k|      }
 1141|  37.9k|    }
 1142|  52.4k|  }
 1143|   401k|  if (pCtx->eSliceType != B_SLICE) {
  ------------------
  |  Branch (1143:7): [True: 174k, False: 227k]
  ------------------
 1144|   174k|    iCtxInc = iIdxA + (iIdxB << 1);
 1145|   174k|  }
 1146|       |
 1147|   401k|  WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pCtx->pCabacCtx + NEW_CTX_OFFSET_REF_NO + iCtxInc, uiCode));
  ------------------
  |  |   52|   401k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   401k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   401k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 988, False: 400k]
  |  |  ------------------
  |  |   55|   401k|    return uiRetTmp; \
  |  |   56|   401k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 400k]
  |  |  ------------------
  ------------------
 1148|   400k|  if (uiCode) {
  ------------------
  |  Branch (1148:7): [True: 165k, False: 235k]
  ------------------
 1149|   165k|    WELS_READ_VERIFY (DecodeUnaryBinCabac (pCtx->pCabacDecEngine, pCtx->pCabacCtx + NEW_CTX_OFFSET_REF_NO + 4, 1, uiCode));
  ------------------
  |  |   52|   165k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   165k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   165k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.18k, False: 164k]
  |  |  ------------------
  |  |   55|   165k|    return uiRetTmp; \
  |  |   56|   165k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 164k]
  |  |  ------------------
  ------------------
 1150|   164k|    ++uiCode;
 1151|   164k|  }
 1152|   399k|  iRefIdxVal = (int8_t) uiCode;
 1153|   399k|  return ERR_NONE;
 1154|   400k|}
_ZN7WelsDec17ParseMvdInfoCabacEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailEPA30_aPA30_A2_siaaRs:
 1157|  1.73M|                           int16_t pMvdCache[LIST_A][30][2], int32_t index, int8_t iListIdx, int8_t iMvComp, int16_t& iMvdVal) {
 1158|  1.73M|  uint32_t uiCode;
 1159|  1.73M|  int32_t iIdxA = 0;
 1160|       |  //int32_t sym;
 1161|  1.73M|  PWelsCabacCtx pBinCtx = pCtx->pCabacCtx + NEW_CTX_OFFSET_MVD + iMvComp * CTX_NUM_MVD;
  ------------------
  |  |   87|  1.73M|#define NEW_CTX_OFFSET_MVD 40
  ------------------
                PWelsCabacCtx pBinCtx = pCtx->pCabacCtx + NEW_CTX_OFFSET_MVD + iMvComp * CTX_NUM_MVD;
  ------------------
  |  |   99|  1.73M|#define CTX_NUM_MVD 7
  ------------------
 1162|  1.73M|  iMvdVal = 0;
 1163|       |
 1164|  1.73M|  if (pRefIndex[iListIdx][g_kuiCache30ScanIdx[index] - 6] >= 0)
  ------------------
  |  Branch (1164:7): [True: 1.22M, False: 510k]
  ------------------
 1165|  1.22M|    iIdxA = WELS_ABS (pMvdCache[iListIdx][g_kuiCache30ScanIdx[index] - 6][iMvComp]);
  ------------------
  |  |  196|  1.22M|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  ------------------
  |  |  |  Branch (196:23): [True: 204k, False: 1.01M]
  |  |  ------------------
  ------------------
 1166|  1.73M|  if (pRefIndex[iListIdx][g_kuiCache30ScanIdx[index] - 1] >= 0)
  ------------------
  |  Branch (1166:7): [True: 1.50M, False: 226k]
  ------------------
 1167|  1.50M|    iIdxA += WELS_ABS (pMvdCache[iListIdx][g_kuiCache30ScanIdx[index] - 1][iMvComp]);
  ------------------
  |  |  196|  1.50M|#define WELS_ABS(iX) ((iX)>0 ? (iX) : -(iX))
  |  |  ------------------
  |  |  |  Branch (196:23): [True: 263k, False: 1.24M]
  |  |  ------------------
  ------------------
 1168|       |
 1169|  1.73M|  int32_t iCtxInc = 0;
 1170|  1.73M|  if (iIdxA >= 3)
  ------------------
  |  Branch (1170:7): [True: 299k, False: 1.43M]
  ------------------
 1171|   299k|    iCtxInc = 1 + (iIdxA > 32);
 1172|       |
 1173|  1.73M|  WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine,  pBinCtx + iCtxInc, uiCode));
  ------------------
  |  |   52|  1.73M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.73M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.73M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.97k, False: 1.73M]
  |  |  ------------------
  |  |   55|  1.73M|    return uiRetTmp; \
  |  |   56|  1.73M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.73M]
  |  |  ------------------
  ------------------
 1174|  1.73M|  if (uiCode) {
  ------------------
  |  Branch (1174:7): [True: 502k, False: 1.22M]
  ------------------
 1175|   502k|    WELS_READ_VERIFY (DecodeUEGMvCabac (pCtx->pCabacDecEngine, pBinCtx + 3, 3, uiCode));
  ------------------
  |  |   52|   502k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   502k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   502k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 7.23k, False: 495k]
  |  |  ------------------
  |  |   55|   502k|    return uiRetTmp; \
  |  |   56|   502k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 495k]
  |  |  ------------------
  ------------------
 1176|   495k|    iMvdVal = (int16_t) (uiCode + 1);
 1177|   495k|    WELS_READ_VERIFY (DecodeBypassCabac (pCtx->pCabacDecEngine, uiCode));
  ------------------
  |  |   52|   495k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   495k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   495k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.43k, False: 494k]
  |  |  ------------------
  |  |   55|   495k|    return uiRetTmp; \
  |  |   56|   495k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 494k]
  |  |  ------------------
  ------------------
 1178|   494k|    if (uiCode) {
  ------------------
  |  Branch (1178:9): [True: 129k, False: 364k]
  ------------------
 1179|   129k|      iMvdVal = -iMvdVal;
 1180|   129k|    }
 1181|  1.22M|  } else {
 1182|  1.22M|    iMvdVal = 0;
 1183|  1.22M|  }
 1184|  1.72M|  return ERR_NONE;
 1185|  1.73M|}
_ZN7WelsDec17ParseCbpInfoCabacEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailERj:
 1187|   371k|int32_t ParseCbpInfoCabac (PWelsDecoderContext pCtx, PWelsNeighAvail pNeighAvail, uint32_t& uiCbp) {
 1188|   371k|  int32_t iIdxA = 0, iIdxB = 0, pALeftMb[2], pBTopMb[2];
 1189|   371k|  uiCbp = 0;
 1190|   371k|  uint32_t pCbpBit[6];
 1191|   371k|  int32_t iCtxInc;
 1192|       |
 1193|       |  //Luma: bit by bit for 4 8x8 blocks in z-order
 1194|   371k|  pBTopMb[0]  = pNeighAvail->iTopAvail  && pNeighAvail->iTopType  != MB_TYPE_INTRA_PCM
  ------------------
  |  |  284|   591k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1194:17): [True: 220k, False: 151k]
  |  Branch (1194:44): [True: 219k, False: 738]
  ------------------
 1195|   219k|                && ((pNeighAvail->iTopCbp  & (1 << 2)) == 0);
  ------------------
  |  Branch (1195:20): [True: 202k, False: 16.4k]
  ------------------
 1196|   371k|  pBTopMb[1]  = pNeighAvail->iTopAvail  && pNeighAvail->iTopType  != MB_TYPE_INTRA_PCM
  ------------------
  |  |  284|   591k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1196:17): [True: 220k, False: 151k]
  |  Branch (1196:44): [True: 219k, False: 738]
  ------------------
 1197|   219k|                && ((pNeighAvail->iTopCbp  & (1 << 3)) == 0);
  ------------------
  |  Branch (1197:20): [True: 205k, False: 13.3k]
  ------------------
 1198|   371k|  pALeftMb[0] = pNeighAvail->iLeftAvail && pNeighAvail->iLeftType != MB_TYPE_INTRA_PCM
  ------------------
  |  |  284|   664k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1198:17): [True: 293k, False: 78.0k]
  |  Branch (1198:44): [True: 291k, False: 2.36k]
  ------------------
 1199|   291k|                && ((pNeighAvail->iLeftCbp & (1 << 1)) == 0);
  ------------------
  |  Branch (1199:20): [True: 269k, False: 21.7k]
  ------------------
 1200|   371k|  pALeftMb[1] = pNeighAvail->iLeftAvail && pNeighAvail->iLeftType != MB_TYPE_INTRA_PCM
  ------------------
  |  |  284|   664k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1200:17): [True: 293k, False: 78.0k]
  |  Branch (1200:44): [True: 291k, False: 2.36k]
  ------------------
 1201|   291k|                && ((pNeighAvail->iLeftCbp & (1 << 3)) == 0);
  ------------------
  |  Branch (1201:20): [True: 259k, False: 31.5k]
  ------------------
 1202|       |
 1203|       |  //left_top 8x8 block
 1204|   371k|  iCtxInc = pALeftMb[0] + (pBTopMb[0] << 1);
 1205|   371k|  WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pCtx->pCabacCtx + NEW_CTX_OFFSET_CBP + iCtxInc, pCbpBit[0]));
  ------------------
  |  |   52|   371k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   371k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   371k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 520, False: 370k]
  |  |  ------------------
  |  |   55|   371k|    return uiRetTmp; \
  |  |   56|   371k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 370k]
  |  |  ------------------
  ------------------
 1206|   370k|  if (pCbpBit[0])
  ------------------
  |  Branch (1206:7): [True: 51.3k, False: 319k]
  ------------------
 1207|  51.3k|    uiCbp += 0x01;
 1208|       |
 1209|       |  //right_top 8x8 block
 1210|   370k|  iIdxA = !pCbpBit[0];
 1211|   370k|  iCtxInc = iIdxA + (pBTopMb[1] << 1);
 1212|   370k|  WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pCtx->pCabacCtx + NEW_CTX_OFFSET_CBP + iCtxInc, pCbpBit[1]));
  ------------------
  |  |   52|   370k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   370k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   370k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 345, False: 370k]
  |  |  ------------------
  |  |   55|   370k|    return uiRetTmp; \
  |  |   56|   370k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 370k]
  |  |  ------------------
  ------------------
 1213|   370k|  if (pCbpBit[1])
  ------------------
  |  Branch (1213:7): [True: 41.3k, False: 329k]
  ------------------
 1214|  41.3k|    uiCbp += 0x02;
 1215|       |
 1216|       |  //left_bottom 8x8 block
 1217|   370k|  iIdxB = !pCbpBit[0];
 1218|   370k|  iCtxInc = pALeftMb[1] + (iIdxB << 1);
 1219|   370k|  WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pCtx->pCabacCtx + NEW_CTX_OFFSET_CBP + iCtxInc, pCbpBit[2]));
  ------------------
  |  |   52|   370k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   370k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   370k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 476, False: 370k]
  |  |  ------------------
  |  |   55|   370k|    return uiRetTmp; \
  |  |   56|   370k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 370k]
  |  |  ------------------
  ------------------
 1220|   370k|  if (pCbpBit[2])
  ------------------
  |  Branch (1220:7): [True: 62.1k, False: 307k]
  ------------------
 1221|  62.1k|    uiCbp += 0x04;
 1222|       |
 1223|       |  //right_bottom 8x8 block
 1224|   370k|  iIdxB = !pCbpBit[1];
 1225|   370k|  iIdxA = !pCbpBit[2];
 1226|   370k|  iCtxInc = iIdxA + (iIdxB << 1);
 1227|   370k|  WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pCtx->pCabacCtx + NEW_CTX_OFFSET_CBP + iCtxInc, pCbpBit[3]));
  ------------------
  |  |   52|   370k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   370k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   370k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 973, False: 369k]
  |  |  ------------------
  |  |   55|   370k|    return uiRetTmp; \
  |  |   56|   370k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 369k]
  |  |  ------------------
  ------------------
 1228|   369k|  if (pCbpBit[3])
  ------------------
  |  Branch (1228:7): [True: 54.7k, False: 314k]
  ------------------
 1229|  54.7k|    uiCbp += 0x08;
 1230|       |
 1231|   369k|  if (pCtx->pSps->uiChromaFormatIdc == 0)//monochroma
  ------------------
  |  Branch (1231:7): [True: 40.8k, False: 328k]
  ------------------
 1232|  40.8k|    return ERR_NONE;
 1233|       |
 1234|       |
 1235|       |  //Chroma: bit by bit
 1236|   328k|  iIdxB = pNeighAvail->iTopAvail  && (pNeighAvail->iTopType  == MB_TYPE_INTRA_PCM || (pNeighAvail->iTopCbp  >> 4));
  ------------------
  |  |  284|   383k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1236:11): [True: 191k, False: 136k]
  |  Branch (1236:39): [True: 738, False: 190k]
  |  Branch (1236:86): [True: 7.58k, False: 183k]
  ------------------
 1237|   328k|  iIdxA = pNeighAvail->iLeftAvail && (pNeighAvail->iLeftType == MB_TYPE_INTRA_PCM || (pNeighAvail->iLeftCbp >> 4));
  ------------------
  |  |  284|   569k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1237:11): [True: 284k, False: 43.6k]
  |  Branch (1237:39): [True: 2.36k, False: 282k]
  |  Branch (1237:86): [True: 13.9k, False: 268k]
  ------------------
 1238|       |
 1239|       |  //BitIdx = 0
 1240|   328k|  iCtxInc = iIdxA + (iIdxB << 1);
 1241|   328k|  WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pCtx->pCabacCtx + NEW_CTX_OFFSET_CBP + CTX_NUM_CBP + iCtxInc,
  ------------------
  |  |   52|   328k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   328k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   328k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 481, False: 327k]
  |  |  ------------------
  |  |   55|   328k|    return uiRetTmp; \
  |  |   56|   328k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 327k]
  |  |  ------------------
  ------------------
 1242|   328k|                                    pCbpBit[4]));
 1243|       |
 1244|       |  //BitIdx = 1
 1245|   327k|  if (pCbpBit[4]) {
  ------------------
  |  Branch (1245:7): [True: 28.5k, False: 299k]
  ------------------
 1246|  28.5k|    iIdxB = pNeighAvail->iTopAvail  && (pNeighAvail->iTopType  == MB_TYPE_INTRA_PCM || (pNeighAvail->iTopCbp  >> 4) == 2);
  ------------------
  |  |  284|  28.4k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1246:13): [True: 14.2k, False: 14.3k]
  |  Branch (1246:41): [True: 428, False: 13.8k]
  |  Branch (1246:88): [True: 1.70k, False: 12.1k]
  ------------------
 1247|  28.5k|    iIdxA = pNeighAvail->iLeftAvail && (pNeighAvail->iLeftType == MB_TYPE_INTRA_PCM || (pNeighAvail->iLeftCbp >> 4) == 2);
  ------------------
  |  |  284|  41.9k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1247:13): [True: 20.9k, False: 7.62k]
  |  Branch (1247:41): [True: 1.61k, False: 19.3k]
  |  Branch (1247:88): [True: 3.26k, False: 16.0k]
  ------------------
 1248|  28.5k|    iCtxInc = iIdxA + (iIdxB << 1);
 1249|  28.5k|    WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine,
  ------------------
  |  |   52|  28.5k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  28.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  28.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 245, False: 28.3k]
  |  |  ------------------
  |  |   55|  28.5k|    return uiRetTmp; \
  |  |   56|  28.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 28.3k]
  |  |  ------------------
  ------------------
 1250|  28.5k|                                      pCtx->pCabacCtx + NEW_CTX_OFFSET_CBP + 2 * CTX_NUM_CBP + iCtxInc,
 1251|  28.5k|                                      pCbpBit[5]));
 1252|  28.3k|    uiCbp += 1 << (4 + pCbpBit[5]);
 1253|       |
 1254|  28.3k|  }
 1255|       |
 1256|   327k|  return ERR_NONE;
 1257|   327k|}
_ZN7WelsDec17ParseDeltaQpCabacEPNS_21TagWelsDecoderContextERi:
 1259|   138k|int32_t ParseDeltaQpCabac (PWelsDecoderContext pCtx, int32_t& iQpDelta) {
 1260|   138k|  uint32_t uiCode;
 1261|   138k|  PSlice pCurrSlice = & (pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer);
 1262|   138k|  iQpDelta = 0;
 1263|   138k|  PWelsCabacCtx pBinCtx = pCtx->pCabacCtx + NEW_CTX_OFFSET_DELTA_QP;
  ------------------
  |  |   89|   138k|#define NEW_CTX_OFFSET_DELTA_QP 60
  ------------------
 1264|   138k|  int32_t iCtxInc = (pCurrSlice->iLastDeltaQp != 0);
 1265|   138k|  WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pBinCtx + iCtxInc, uiCode));
  ------------------
  |  |   52|   138k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   138k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   138k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 561, False: 137k]
  |  |  ------------------
  |  |   55|   138k|    return uiRetTmp; \
  |  |   56|   138k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 137k]
  |  |  ------------------
  ------------------
 1266|   137k|  if (uiCode != 0) {
  ------------------
  |  Branch (1266:7): [True: 20.7k, False: 116k]
  ------------------
 1267|  20.7k|    WELS_READ_VERIFY (DecodeUnaryBinCabac (pCtx->pCabacDecEngine, pBinCtx + 2, 1, uiCode));
  ------------------
  |  |   52|  20.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  20.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  20.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 722, False: 20.0k]
  |  |  ------------------
  |  |   55|  20.7k|    return uiRetTmp; \
  |  |   56|  20.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 20.0k]
  |  |  ------------------
  ------------------
 1268|  20.0k|    uiCode++;
 1269|  20.0k|    iQpDelta = (uiCode + 1) >> 1;
 1270|  20.0k|    if ((uiCode & 1) == 0)
  ------------------
  |  Branch (1270:9): [True: 10.2k, False: 9.78k]
  ------------------
 1271|  10.2k|      iQpDelta = - iQpDelta;
 1272|  20.0k|  }
 1273|   136k|  pCurrSlice->iLastDeltaQp = iQpDelta;
 1274|   136k|  return ERR_NONE;
 1275|   137k|}
_ZN7WelsDec17ParseCbfInfoCabacEPNS_16TagNeighborAvailEPhiiPNS_21TagWelsDecoderContextERj:
 1278|   417k|                           PWelsDecoderContext pCtx, uint32_t& uiCbfBit) {
 1279|   417k|  int8_t nA, nB/*, zigzag_idx = 0*/;
 1280|   417k|  int32_t iCurrBlkXy = pCtx->pCurDqLayer->iMbXyIndex;
 1281|   417k|  int32_t iTopBlkXy = iCurrBlkXy - pCtx->pCurDqLayer->iMbWidth; //default value: MB neighboring
 1282|   417k|  int32_t iLeftBlkXy = iCurrBlkXy - 1; //default value: MB neighboring
 1283|   417k|  uint16_t* pCbfDc = pCtx->pCurDqLayer->pCbfDc;
 1284|   417k|  uint32_t* pMbType = pCtx->pCurDqLayer->pDec->pMbType;
 1285|   417k|  int32_t iCtxInc;
 1286|   417k|  uiCbfBit = 0;
 1287|   417k|  nA = nB = (int8_t)!!IS_INTRA (pMbType[iCurrBlkXy]);
  ------------------
  |  |  305|   417k|#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
  |  |  ------------------
  |  |  |  |  299|   417k|#define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|   417k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  276|   417k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   417k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTRA     (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|   417k|#define MB_TYPE_INTRA_PCM   0x00000200
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1288|       |
 1289|   417k|  if (iResProperty == I16_LUMA_DC || iResProperty == CHROMA_DC_U || iResProperty == CHROMA_DC_V) { //DC
  ------------------
  |  |   70|   835k|#define I16_LUMA_DC  1
  ------------------
                if (iResProperty == I16_LUMA_DC || iResProperty == CHROMA_DC_U || iResProperty == CHROMA_DC_V) { //DC
  ------------------
  |  |   76|   806k|#define CHROMA_DC_U  7
  ------------------
                if (iResProperty == I16_LUMA_DC || iResProperty == CHROMA_DC_U || iResProperty == CHROMA_DC_V) { //DC
  ------------------
  |  |   77|   361k|#define CHROMA_DC_V  8
  ------------------
  |  Branch (1289:7): [True: 29.0k, False: 388k]
  |  Branch (1289:38): [True: 27.4k, False: 361k]
  |  Branch (1289:69): [True: 26.7k, False: 334k]
  ------------------
 1290|  83.2k|    if (pNeighAvail->iTopAvail)
  ------------------
  |  Branch (1290:9): [True: 40.5k, False: 42.7k]
  ------------------
 1291|  40.5k|      nB = (pMbType[iTopBlkXy] == MB_TYPE_INTRA_PCM) || ((pCbfDc[iTopBlkXy] >> iResProperty) & 1);
  ------------------
  |  |  284|  40.5k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1291:12): [True: 861, False: 39.6k]
  |  Branch (1291:57): [True: 4.94k, False: 34.7k]
  ------------------
 1292|  83.2k|    if (pNeighAvail->iLeftAvail)
  ------------------
  |  Branch (1292:9): [True: 59.9k, False: 23.3k]
  ------------------
 1293|  59.9k|      nA = (pMbType[iLeftBlkXy] == MB_TYPE_INTRA_PCM) || ((pCbfDc[iLeftBlkXy] >> iResProperty) & 1);
  ------------------
  |  |  284|  59.9k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1293:12): [True: 1.40k, False: 58.5k]
  |  Branch (1293:58): [True: 15.4k, False: 43.0k]
  ------------------
 1294|  83.2k|    iCtxInc = nA + (nB << 1);
 1295|  83.2k|    WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine,
  ------------------
  |  |   52|  83.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  83.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  83.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 657, False: 82.6k]
  |  |  ------------------
  |  |   55|  83.2k|    return uiRetTmp; \
  |  |   56|  83.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 82.6k]
  |  |  ------------------
  ------------------
 1296|  83.2k|                                      pCtx->pCabacCtx + NEW_CTX_OFFSET_CBF + g_kBlockCat2CtxOffsetCBF[iResProperty] + iCtxInc, uiCbfBit));
 1297|  82.6k|    if (uiCbfBit)
  ------------------
  |  Branch (1297:9): [True: 42.2k, False: 40.4k]
  ------------------
 1298|  42.2k|      pCbfDc[iCurrBlkXy] |= (1 << iResProperty);
 1299|   334k|  } else { //AC
 1300|       |    //for 4x4 blk, make sure blk-idx is correct
 1301|   334k|    if (pNzcCache[g_kCacheNzcScanIdx[iZIndex] - 8] != 0xff) { //top blk available
  ------------------
  |  Branch (1301:9): [True: 286k, False: 47.5k]
  ------------------
 1302|   286k|      if (g_kTopBlkInsideMb[iZIndex])
  ------------------
  |  Branch (1302:11): [True: 230k, False: 56.1k]
  ------------------
 1303|   230k|        iTopBlkXy = iCurrBlkXy;
 1304|   286k|      nB = pNzcCache[g_kCacheNzcScanIdx[iZIndex] - 8] || pMbType[iTopBlkXy]  == MB_TYPE_INTRA_PCM;
  ------------------
  |  |  284|   512k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1304:12): [True: 61.0k, False: 225k]
  |  Branch (1304:58): [True: 0, False: 225k]
  ------------------
 1305|   286k|    }
 1306|   334k|    if (pNzcCache[g_kCacheNzcScanIdx[iZIndex] - 1] != 0xff) { //left blk available
  ------------------
  |  Branch (1306:9): [True: 292k, False: 42.0k]
  ------------------
 1307|   292k|      if (g_kLeftBlkInsideMb[iZIndex])
  ------------------
  |  Branch (1307:11): [True: 225k, False: 67.2k]
  ------------------
 1308|   225k|        iLeftBlkXy = iCurrBlkXy;
 1309|   292k|      nA = pNzcCache[g_kCacheNzcScanIdx[iZIndex] - 1] || pMbType[iLeftBlkXy] == MB_TYPE_INTRA_PCM;
  ------------------
  |  |  284|   520k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (1309:12): [True: 63.8k, False: 228k]
  |  Branch (1309:58): [True: 0, False: 228k]
  ------------------
 1310|   292k|    }
 1311|       |
 1312|   334k|    iCtxInc = nA + (nB << 1);
 1313|   334k|    WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine,
  ------------------
  |  |   52|   334k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   334k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   334k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.28k, False: 332k]
  |  |  ------------------
  |  |   55|   334k|    return uiRetTmp; \
  |  |   56|   334k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 332k]
  |  |  ------------------
  ------------------
 1314|   334k|                                      pCtx->pCabacCtx + NEW_CTX_OFFSET_CBF + g_kBlockCat2CtxOffsetCBF[iResProperty] + iCtxInc, uiCbfBit));
 1315|   334k|  }
 1316|   415k|  return ERR_NONE;
 1317|   417k|}
_ZN7WelsDec24ParseSignificantMapCabacEPiiPNS_21TagWelsDecoderContextERj:
 1320|   268k|                                  uint32_t& uiCoeffNum) {
 1321|   268k|  uint32_t uiCode;
 1322|       |
 1323|   268k|  PWelsCabacCtx pMapCtx  = pCtx->pCabacCtx + (iResProperty == LUMA_DC_AC_8 ? NEW_CTX_OFFSET_MAP_8x8 : NEW_CTX_OFFSET_MAP)
  ------------------
  |  |   75|   268k|#define LUMA_DC_AC_8  6
  ------------------
                PWelsCabacCtx pMapCtx  = pCtx->pCabacCtx + (iResProperty == LUMA_DC_AC_8 ? NEW_CTX_OFFSET_MAP_8x8 : NEW_CTX_OFFSET_MAP)
  ------------------
  |  |  103|   125k|#define NEW_CTX_OFFSET_MAP_8x8  402
  ------------------
                PWelsCabacCtx pMapCtx  = pCtx->pCabacCtx + (iResProperty == LUMA_DC_AC_8 ? NEW_CTX_OFFSET_MAP_8x8 : NEW_CTX_OFFSET_MAP)
  ------------------
  |  |   94|   142k|#define NEW_CTX_OFFSET_MAP 105
  ------------------
  |  Branch (1323:47): [True: 125k, False: 142k]
  ------------------
 1324|   268k|                           + g_kBlockCat2CtxOffsetMap [iResProperty];
 1325|   268k|  PWelsCabacCtx pLastCtx = pCtx->pCabacCtx + (iResProperty == LUMA_DC_AC_8 ? NEW_CTX_OFFSET_LAST_8x8 :
  ------------------
  |  |   75|   268k|#define LUMA_DC_AC_8  6
  ------------------
                PWelsCabacCtx pLastCtx = pCtx->pCabacCtx + (iResProperty == LUMA_DC_AC_8 ? NEW_CTX_OFFSET_LAST_8x8 :
  ------------------
  |  |  104|   125k|#define NEW_CTX_OFFSET_LAST_8x8 417
  ------------------
  |  Branch (1325:47): [True: 125k, False: 142k]
  ------------------
 1326|   268k|                           NEW_CTX_OFFSET_LAST) + g_kBlockCat2CtxOffsetLast[iResProperty];
  ------------------
  |  |   95|   142k|#define NEW_CTX_OFFSET_LAST 166
  ------------------
 1327|       |
 1328|       |
 1329|   268k|  int32_t i;
 1330|   268k|  uiCoeffNum = 0;
 1331|   268k|  int32_t i0 = 0;
 1332|   268k|  int32_t i1 = g_kMaxPos[iResProperty];
 1333|       |
 1334|   268k|  int32_t iCtx;
 1335|       |
 1336|  4.36M|  for (i = i0; i < i1; ++i) {
  ------------------
  |  Branch (1336:16): [True: 4.31M, False: 44.5k]
  ------------------
 1337|  4.31M|    iCtx = (iResProperty == LUMA_DC_AC_8 ? g_kuiIdx2CtxSignificantCoeffFlag8x8[i] : i);
  ------------------
  |  |   75|  4.31M|#define LUMA_DC_AC_8  6
  ------------------
  |  Branch (1337:13): [True: 3.42M, False: 888k]
  ------------------
 1338|       |    //read significant
 1339|  4.31M|    WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pMapCtx + iCtx, uiCode));
  ------------------
  |  |   52|  4.31M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.31M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.31M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 5.71k, False: 4.31M]
  |  |  ------------------
  |  |   55|  4.31M|    return uiRetTmp; \
  |  |   56|  4.31M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 4.31M]
  |  |  ------------------
  ------------------
 1340|  4.31M|    if (uiCode) {
  ------------------
  |  Branch (1340:9): [True: 582k, False: 3.72M]
  ------------------
 1341|   582k|      * (pSignificantMap++) = 1;
 1342|   582k|      ++ uiCoeffNum;
 1343|       |      //read last significant
 1344|   582k|      iCtx = (iResProperty == LUMA_DC_AC_8 ? g_kuiIdx2CtxLastSignificantCoeffFlag8x8[i] : i);
  ------------------
  |  |   75|   582k|#define LUMA_DC_AC_8  6
  ------------------
  |  Branch (1344:15): [True: 252k, False: 329k]
  ------------------
 1345|   582k|      WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pLastCtx + iCtx, uiCode));
  ------------------
  |  |   52|   582k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   582k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   582k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.02k, False: 580k]
  |  |  ------------------
  |  |   55|   582k|    return uiRetTmp; \
  |  |   56|   582k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 580k]
  |  |  ------------------
  ------------------
 1346|   580k|      if (uiCode) {
  ------------------
  |  Branch (1346:11): [True: 216k, False: 364k]
  ------------------
 1347|   216k|        memset (pSignificantMap, 0, (i1 - i) * sizeof (int32_t));
 1348|   216k|        return ERR_NONE;
 1349|   216k|      }
 1350|   580k|    } else
 1351|  3.72M|      * (pSignificantMap++) = 0;
 1352|  4.31M|  }
 1353|       |
 1354|       |  //deal with last pSignificantMap if no data
 1355|       |  //if(i < i1+1)
 1356|  44.5k|  {
 1357|  44.5k|    *pSignificantMap = 1;
 1358|  44.5k|    ++uiCoeffNum;
 1359|  44.5k|  }
 1360|       |
 1361|  44.5k|  return ERR_NONE;
 1362|   268k|}
_ZN7WelsDec26ParseSignificantCoeffCabacEPiiPNS_21TagWelsDecoderContextE:
 1364|   260k|int32_t ParseSignificantCoeffCabac (int32_t* pSignificant, int32_t iResProperty, PWelsDecoderContext pCtx) {
 1365|   260k|  uint32_t uiCode;
 1366|   260k|  PWelsCabacCtx pOneCtx = pCtx->pCabacCtx + (iResProperty == LUMA_DC_AC_8 ? NEW_CTX_OFFSET_ONE_8x8 : NEW_CTX_OFFSET_ONE) +
  ------------------
  |  |   75|   260k|#define LUMA_DC_AC_8  6
  ------------------
                PWelsCabacCtx pOneCtx = pCtx->pCabacCtx + (iResProperty == LUMA_DC_AC_8 ? NEW_CTX_OFFSET_ONE_8x8 : NEW_CTX_OFFSET_ONE) +
  ------------------
  |  |  105|   122k|#define NEW_CTX_OFFSET_ONE_8x8  426
  ------------------
                PWelsCabacCtx pOneCtx = pCtx->pCabacCtx + (iResProperty == LUMA_DC_AC_8 ? NEW_CTX_OFFSET_ONE_8x8 : NEW_CTX_OFFSET_ONE) +
  ------------------
  |  |   96|   137k|#define NEW_CTX_OFFSET_ONE 227
  ------------------
  |  Branch (1366:46): [True: 122k, False: 137k]
  ------------------
 1367|   260k|                          g_kBlockCat2CtxOffsetOne[iResProperty];
 1368|   260k|  PWelsCabacCtx pAbsCtx = pCtx->pCabacCtx + (iResProperty == LUMA_DC_AC_8 ? NEW_CTX_OFFSET_ABS_8x8 : NEW_CTX_OFFSET_ABS) +
  ------------------
  |  |   75|   260k|#define LUMA_DC_AC_8  6
  ------------------
                PWelsCabacCtx pAbsCtx = pCtx->pCabacCtx + (iResProperty == LUMA_DC_AC_8 ? NEW_CTX_OFFSET_ABS_8x8 : NEW_CTX_OFFSET_ABS) +
  ------------------
  |  |  106|   122k|#define NEW_CTX_OFFSET_ABS_8x8  431 // Puzzle, where is the definition?
  ------------------
                PWelsCabacCtx pAbsCtx = pCtx->pCabacCtx + (iResProperty == LUMA_DC_AC_8 ? NEW_CTX_OFFSET_ABS_8x8 : NEW_CTX_OFFSET_ABS) +
  ------------------
  |  |   97|   137k|#define NEW_CTX_OFFSET_ABS 232
  ------------------
  |  Branch (1368:46): [True: 122k, False: 137k]
  ------------------
 1369|   260k|                          g_kBlockCat2CtxOffsetAbs[iResProperty];
 1370|       |
 1371|   260k|  const int16_t iMaxType = g_kMaxC2[iResProperty];
 1372|   260k|  int32_t i = g_kMaxPos[iResProperty];
 1373|   260k|  int32_t* pCoff = pSignificant + i;
 1374|   260k|  int32_t c1 = 1;
 1375|   260k|  int32_t c2 = 0;
 1376|  9.90M|  for (; i >= 0; --i) {
  ------------------
  |  Branch (1376:10): [True: 9.65M, False: 248k]
  ------------------
 1377|  9.65M|    if (*pCoff != 0) {
  ------------------
  |  Branch (1377:9): [True: 568k, False: 9.08M]
  ------------------
 1378|   568k|      WELS_READ_VERIFY (DecodeBinCabac (pCtx->pCabacDecEngine, pOneCtx + c1, uiCode));
  ------------------
  |  |   52|   568k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   568k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   568k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.79k, False: 566k]
  |  |  ------------------
  |  |   55|   568k|    return uiRetTmp; \
  |  |   56|   568k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 566k]
  |  |  ------------------
  ------------------
 1379|   566k|      *pCoff += uiCode;
 1380|   566k|      if (*pCoff == 2) {
  ------------------
  |  Branch (1380:11): [True: 61.4k, False: 504k]
  ------------------
 1381|  61.4k|        WELS_READ_VERIFY (DecodeUEGLevelCabac (pCtx->pCabacDecEngine, pAbsCtx + c2, uiCode));
  ------------------
  |  |   52|  61.4k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  61.4k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  61.4k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.42k, False: 58.9k]
  |  |  ------------------
  |  |   55|  61.4k|    return uiRetTmp; \
  |  |   56|  61.4k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 58.9k]
  |  |  ------------------
  ------------------
 1382|  58.9k|        *pCoff += uiCode;
 1383|  58.9k|        ++c2;
 1384|  58.9k|        c2 = WELS_MIN (c2, iMaxType);
  ------------------
  |  |   95|  58.9k|#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (95:25): [True: 51.3k, False: 7.58k]
  |  |  ------------------
  ------------------
 1385|  58.9k|        c1 = 0;
 1386|   504k|      } else if (c1) {
  ------------------
  |  Branch (1386:18): [True: 483k, False: 21.2k]
  ------------------
 1387|   483k|        ++c1;
 1388|   483k|        c1 = WELS_MIN (c1, 4);
  ------------------
  |  |   95|   483k|#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (95:25): [True: 391k, False: 92.0k]
  |  |  ------------------
  ------------------
 1389|   483k|      }
 1390|   563k|      WELS_READ_VERIFY (DecodeBypassCabac (pCtx->pCabacDecEngine, uiCode));
  ------------------
  |  |   52|   563k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   563k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   563k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 7.41k, False: 556k]
  |  |  ------------------
  |  |   55|   563k|    return uiRetTmp; \
  |  |   56|   563k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 556k]
  |  |  ------------------
  ------------------
 1391|   556k|      if (uiCode)
  ------------------
  |  Branch (1391:11): [True: 192k, False: 363k]
  ------------------
 1392|   192k|        *pCoff = - *pCoff;
 1393|   556k|    }
 1394|  9.64M|    pCoff--;
 1395|  9.64M|  }
 1396|   248k|  return ERR_NONE;
 1397|   260k|}
_ZN7WelsDec26ParseResidualBlockCabac8x8EPNS_16TagNeighborAvailEPhPN10WelsCommon15TagBitStringAuxEiiPKhiPshPNS_21TagWelsDecoderContextE:
 1401|   125k|                                    short* sTCoeff, /*int mb_mode*/ uint8_t uiQp, PWelsDecoderContext pCtx) {
 1402|   125k|  uint32_t uiTotalCoeffNum = 0;
 1403|   125k|  uint32_t uiCbpBit;
 1404|   125k|  int32_t pSignificantMap[64] = {0};
 1405|       |
 1406|   125k|  int32_t iMbResProperty = 0;
 1407|   125k|  GetMbResProperty (&iMbResProperty, &iResProperty, false);
 1408|   125k|  const uint16_t* pDeQuantMul = (pCtx->bUseScalingList) ? pCtx->pDequant_coeff8x8[iMbResProperty - 6][uiQp] :
  ------------------
  |  Branch (1408:33): [True: 1.95k, False: 123k]
  ------------------
 1409|   125k|                                g_kuiDequantCoeff8x8[uiQp];
 1410|       |
 1411|   125k|  uiCbpBit = 1; // for 8x8, MaxNumCoeff == 64 && uiCbpBit == 1
 1412|   125k|  if (uiCbpBit) { //has coeff
  ------------------
  |  Branch (1412:7): [True: 125k, False: 0]
  ------------------
 1413|   125k|    WELS_READ_VERIFY (ParseSignificantMapCabac (pSignificantMap, iResProperty, pCtx, uiTotalCoeffNum));
  ------------------
  |  |   52|   125k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   125k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   125k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.92k, False: 122k]
  |  |  ------------------
  |  |   55|   125k|    return uiRetTmp; \
  |  |   56|   125k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 122k]
  |  |  ------------------
  ------------------
 1414|   122k|    WELS_READ_VERIFY (ParseSignificantCoeffCabac (pSignificantMap, iResProperty, pCtx));
  ------------------
  |  |   52|   122k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   122k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   122k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.13k, False: 120k]
  |  |  ------------------
  |  |   55|   122k|    return uiRetTmp; \
  |  |   56|   122k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 120k]
  |  |  ------------------
  ------------------
 1415|   122k|  }
 1416|       |
 1417|   120k|  pNonZeroCountCache[g_kCacheNzcScanIdx[iIndex]] =
 1418|   120k|    pNonZeroCountCache[g_kCacheNzcScanIdx[iIndex + 1]] =
 1419|   120k|      pNonZeroCountCache[g_kCacheNzcScanIdx[iIndex + 2]] =
 1420|   120k|        pNonZeroCountCache[g_kCacheNzcScanIdx[iIndex + 3]] = (uint8_t)uiTotalCoeffNum;
 1421|   120k|  if (uiTotalCoeffNum == 0) {
  ------------------
  |  Branch (1421:7): [True: 0, False: 120k]
  ------------------
 1422|      0|    return ERR_NONE;
 1423|      0|  }
 1424|   120k|  int32_t j = 0, i;
 1425|   120k|  if (iResProperty == LUMA_DC_AC_8) {
  ------------------
  |  |   75|   120k|#define LUMA_DC_AC_8  6
  ------------------
  |  Branch (1425:7): [True: 120k, False: 0]
  ------------------
 1426|  7.72M|    do {
 1427|  7.72M|      if (pSignificantMap[j] != 0) {
  ------------------
  |  Branch (1427:11): [True: 278k, False: 7.44M]
  ------------------
 1428|   278k|        i = pScanTable[ j ];
 1429|   278k|        sTCoeff[i] = uiQp >= 36 ? ((pSignificantMap[j] * pDeQuantMul[i]) * (1 << (uiQp / 6 - 6))) : ((
  ------------------
  |  Branch (1429:22): [True: 49.2k, False: 228k]
  ------------------
 1430|   228k|                       pSignificantMap[j] * pDeQuantMul[i] + (1 << (5 - uiQp / 6))) >> (6 - uiQp / 6));
 1431|   278k|      }
 1432|  7.72M|      ++j;
 1433|  7.72M|    } while (j < 64);
  ------------------
  |  Branch (1433:14): [True: 7.60M, False: 120k]
  ------------------
 1434|   120k|  }
 1435|       |
 1436|   120k|  return ERR_NONE;
 1437|   120k|}
_ZN7WelsDec23ParseResidualBlockCabacEPNS_16TagNeighborAvailEPhPN10WelsCommon15TagBitStringAuxEiiPKhiPshPNS_21TagWelsDecoderContextE:
 1442|   417k|                                 PWelsDecoderContext pCtx) {
 1443|   417k|  int32_t iCurNzCacheIdx;
 1444|   417k|  uint32_t uiTotalCoeffNum = 0;
 1445|   417k|  uint32_t uiCbpBit;
 1446|   417k|  int32_t pSignificantMap[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 1447|       |
 1448|   417k|  int32_t iMbResProperty = 0;
 1449|   417k|  GetMbResProperty (&iMbResProperty, &iResProperty, false);
 1450|   417k|  const uint16_t* pDeQuantMul = (pCtx->bUseScalingList) ? pCtx->pDequant_coeff4x4[iMbResProperty][uiQp] :
  ------------------
  |  Branch (1450:33): [True: 22.2k, False: 395k]
  ------------------
 1451|   417k|                                g_kuiDequantCoeff[uiQp];
 1452|       |
 1453|   417k|  WELS_READ_VERIFY (ParseCbfInfoCabac (pNeighAvail, pNonZeroCountCache, iIndex, iResProperty, pCtx, uiCbpBit));
  ------------------
  |  |   52|   417k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   417k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   417k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.94k, False: 415k]
  |  |  ------------------
  |  |   55|   417k|    return uiRetTmp; \
  |  |   56|   417k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 415k]
  |  |  ------------------
  ------------------
 1454|   415k|  if (uiCbpBit) { //has coeff
  ------------------
  |  Branch (1454:7): [True: 142k, False: 273k]
  ------------------
 1455|   142k|    WELS_READ_VERIFY (ParseSignificantMapCabac (pSignificantMap, iResProperty, pCtx, uiTotalCoeffNum));
  ------------------
  |  |   52|   142k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   142k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   142k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 4.81k, False: 137k]
  |  |  ------------------
  |  |   55|   142k|    return uiRetTmp; \
  |  |   56|   142k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 137k]
  |  |  ------------------
  ------------------
 1456|   137k|    WELS_READ_VERIFY (ParseSignificantCoeffCabac (pSignificantMap, iResProperty, pCtx));
  ------------------
  |  |   52|   137k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   137k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   137k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 9.50k, False: 128k]
  |  |  ------------------
  |  |   55|   137k|    return uiRetTmp; \
  |  |   56|   137k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 128k]
  |  |  ------------------
  ------------------
 1457|   137k|  }
 1458|       |
 1459|   401k|  iCurNzCacheIdx = g_kCacheNzcScanIdx[iIndex];
 1460|   401k|  pNonZeroCountCache[iCurNzCacheIdx] = (uint8_t)uiTotalCoeffNum;
 1461|   401k|  if (uiTotalCoeffNum == 0) {
  ------------------
  |  Branch (1461:7): [True: 273k, False: 128k]
  ------------------
 1462|   273k|    return ERR_NONE;
 1463|   273k|  }
 1464|   128k|  int32_t j = 0;
 1465|   128k|  if (iResProperty == I16_LUMA_DC) {
  ------------------
  |  |   70|   128k|#define I16_LUMA_DC  1
  ------------------
  |  Branch (1465:7): [True: 11.3k, False: 116k]
  ------------------
 1466|   181k|    do {
 1467|   181k|      sTCoeff[pScanTable[j]] = pSignificantMap[j];
 1468|   181k|      ++j;
 1469|   181k|    } while (j < 16);
  ------------------
  |  Branch (1469:14): [True: 170k, False: 11.3k]
  ------------------
 1470|  11.3k|    WelsLumaDcDequantIdct (sTCoeff, uiQp, pCtx);
 1471|   116k|  } else if (iResProperty == CHROMA_DC_U || iResProperty == CHROMA_DC_V) {
  ------------------
  |  |   76|   233k|#define CHROMA_DC_U  7
  ------------------
                } else if (iResProperty == CHROMA_DC_U || iResProperty == CHROMA_DC_V) {
  ------------------
  |  |   77|   103k|#define CHROMA_DC_V  8
  ------------------
  |  Branch (1471:14): [True: 13.7k, False: 103k]
  |  Branch (1471:45): [True: 11.2k, False: 91.8k]
  ------------------
 1472|  99.8k|    do {
 1473|  99.8k|      sTCoeff[pScanTable[j]] = pSignificantMap[j];
 1474|  99.8k|      ++j;
 1475|  99.8k|    } while (j < 4);
  ------------------
  |  Branch (1475:14): [True: 74.9k, False: 24.9k]
  ------------------
 1476|       |    //iHadamard2x2
 1477|  24.9k|    WelsChromaDcIdct (sTCoeff);
 1478|       |    //scaling
 1479|  24.9k|    if (!pCtx->bUseScalingList) {
  ------------------
  |  Branch (1479:9): [True: 23.6k, False: 1.27k]
  ------------------
 1480|   118k|      for (j = 0; j < 4; ++j) {
  ------------------
  |  Branch (1480:19): [True: 94.7k, False: 23.6k]
  ------------------
 1481|  94.7k|        sTCoeff[pScanTable[j]] = (int16_t) ((int64_t)sTCoeff[pScanTable[j]] * (int64_t)pDeQuantMul[0] >> 1);
 1482|  94.7k|      }
 1483|  23.6k|    } else { //with scaling list
 1484|  6.37k|      for (j = 0; j < 4; ++j) {
  ------------------
  |  Branch (1484:19): [True: 5.10k, False: 1.27k]
  ------------------
 1485|  5.10k|        sTCoeff[pScanTable[j]] = (int16_t) ((int64_t)sTCoeff[pScanTable[j]] * (int64_t)pDeQuantMul[0] >> 5);
 1486|  5.10k|      }
 1487|  1.27k|    }
 1488|  91.8k|  } else { //luma ac, chroma ac
 1489|  1.47M|    do {
 1490|  1.47M|      if (pSignificantMap[j] != 0) {
  ------------------
  |  Branch (1490:11): [True: 205k, False: 1.26M]
  ------------------
 1491|   205k|        if (!pCtx->bUseScalingList) {
  ------------------
  |  Branch (1491:13): [True: 187k, False: 17.7k]
  ------------------
 1492|   187k|          sTCoeff[pScanTable[j]] = pSignificantMap[j] * pDeQuantMul[pScanTable[j] & 0x07];
 1493|   187k|        } else {
 1494|  17.7k|          sTCoeff[pScanTable[j]] = (int16_t) (((int64_t)pSignificantMap[j] * (int64_t)pDeQuantMul[pScanTable[j]] + 8) >> 4);
 1495|  17.7k|        }
 1496|   205k|      }
 1497|  1.47M|      ++j;
 1498|  1.47M|    } while (j < 16);
  ------------------
  |  Branch (1498:14): [True: 1.37M, False: 91.8k]
  ------------------
 1499|  91.8k|  }
 1500|   128k|  return ERR_NONE;
 1501|   401k|}
_ZN7WelsDec18ParseIPCMInfoCabacEPNS_21TagWelsDecoderContextE:
 1503|  5.72k|int32_t ParseIPCMInfoCabac (PWelsDecoderContext pCtx) {
 1504|  5.72k|  int32_t i;
 1505|  5.72k|  PWelsCabacDecEngine pCabacDecEngine = pCtx->pCabacDecEngine;
 1506|  5.72k|  SBitStringAux* pBsAux = pCtx->pCurDqLayer->pBitStringAux;
 1507|  5.72k|  SDqLayer* pCurDqLayer = pCtx->pCurDqLayer;
 1508|  5.72k|  int32_t iDstStrideLuma = pCurDqLayer->pDec->iLinesize[0];
 1509|  5.72k|  int32_t iDstStrideChroma = pCurDqLayer->pDec->iLinesize[1];
 1510|  5.72k|  int32_t iMbX = pCurDqLayer->iMbX;
 1511|  5.72k|  int32_t iMbY = pCurDqLayer->iMbY;
 1512|  5.72k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
 1513|       |
 1514|  5.72k|  int32_t iMbOffsetLuma = (iMbX + iMbY * iDstStrideLuma) << 4;
 1515|  5.72k|  int32_t iMbOffsetChroma = (iMbX + iMbY * iDstStrideChroma) << 3;
 1516|       |
 1517|  5.72k|  uint8_t* pMbDstY = pCtx->pDec->pData[0] + iMbOffsetLuma;
 1518|  5.72k|  uint8_t* pMbDstU = pCtx->pDec->pData[1] + iMbOffsetChroma;
 1519|  5.72k|  uint8_t* pMbDstV = pCtx->pDec->pData[2] + iMbOffsetChroma;
 1520|       |
 1521|  5.72k|  uint8_t* pPtrSrc;
 1522|       |
 1523|  5.72k|  pCurDqLayer->pDec->pMbType[iMbXy] = MB_TYPE_INTRA_PCM;
  ------------------
  |  |  284|  5.72k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
 1524|  5.72k|  RestoreCabacDecEngineToBS (pCabacDecEngine, pBsAux);
 1525|  5.72k|  intX_t iBytesLeft = pBsAux->pEndBuf - pBsAux->pCurBuf;
 1526|  5.72k|  if (iBytesLeft < I_PCM_MB_SIZE_IN_BYTE) {
  ------------------
  |  |   42|  5.72k|#define I_PCM_MB_SIZE_IN_BYTE (16 * 16 + 2 * (8 * 8))
  ------------------
  |  Branch (1526:7): [True: 1.68k, False: 4.03k]
  ------------------
 1527|  1.68k|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_CABAC_NO_BS_TO_READ);
  ------------------
  |  |   59|  1.68k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1528|  1.68k|  }
 1529|  4.03k|  pPtrSrc = pBsAux->pCurBuf;
 1530|  4.03k|  if (!pCtx->pParam->bParseOnly) {
  ------------------
  |  Branch (1530:7): [True: 4.03k, False: 0]
  ------------------
 1531|  68.6k|    for (i = 0; i < 16; i++) {   //luma
  ------------------
  |  Branch (1531:17): [True: 64.6k, False: 4.03k]
  ------------------
 1532|  64.6k|      memcpy (pMbDstY, pPtrSrc, 16);
 1533|  64.6k|      pMbDstY += iDstStrideLuma;
 1534|  64.6k|      pPtrSrc += 16;
 1535|  64.6k|    }
 1536|  36.3k|    for (i = 0; i < 8; i++) {   //cb
  ------------------
  |  Branch (1536:17): [True: 32.3k, False: 4.03k]
  ------------------
 1537|  32.3k|      memcpy (pMbDstU, pPtrSrc, 8);
 1538|  32.3k|      pMbDstU += iDstStrideChroma;
 1539|  32.3k|      pPtrSrc += 8;
 1540|  32.3k|    }
 1541|  36.3k|    for (i = 0; i < 8; i++) {   //cr
  ------------------
  |  Branch (1541:17): [True: 32.3k, False: 4.03k]
  ------------------
 1542|  32.3k|      memcpy (pMbDstV, pPtrSrc, 8);
 1543|  32.3k|      pMbDstV += iDstStrideChroma;
 1544|  32.3k|      pPtrSrc += 8;
 1545|  32.3k|    }
 1546|  4.03k|  }
 1547|       |
 1548|  4.03k|  pBsAux->pCurBuf += I_PCM_MB_SIZE_IN_BYTE;
  ------------------
  |  |   42|  4.03k|#define I_PCM_MB_SIZE_IN_BYTE (16 * 16 + 2 * (8 * 8))
  ------------------
 1549|       |
 1550|  4.03k|  pCurDqLayer->pLumaQp[iMbXy] = 0;
 1551|  4.03k|  pCurDqLayer->pChromaQp[iMbXy][0] = pCurDqLayer->pChromaQp[iMbXy][1] = 0;
 1552|  4.03k|  memset (pCurDqLayer->pNzc[iMbXy], 16, sizeof (pCurDqLayer->pNzc[iMbXy]));
 1553|       |
 1554|       |  //step 4: cabac engine init
 1555|  4.03k|  WELS_READ_VERIFY (InitReadBits (pBsAux, 1));
  ------------------
  |  |   52|  4.03k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  4.03k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  4.03k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 206, False: 3.83k]
  |  |  ------------------
  |  |   55|  4.03k|    return uiRetTmp; \
  |  |   56|  4.03k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.83k]
  |  |  ------------------
  ------------------
 1556|  3.83k|  WELS_READ_VERIFY (InitCabacDecEngineFromBS (pCabacDecEngine, pBsAux));
  ------------------
  |  |   52|  3.83k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.83k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.83k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 3.83k]
  |  |  ------------------
  |  |   55|  3.83k|    return uiRetTmp; \
  |  |   56|  3.83k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.83k]
  |  |  ------------------
  ------------------
 1557|  3.83k|  return ERR_NONE;
 1558|  3.83k|}
_ZN7WelsDec26UpdateP8x8RefCacheIdxCabacEPA30_aRKsRKiRKa:
 1560|   384k|                                    const int32_t& listIdx, const int8_t& iRef) {
 1561|   384k|  const uint8_t uiCacheIdx = g_kuiCache30ScanIdx[iPartIdx];
 1562|   384k|  pRefIndex[listIdx][uiCacheIdx] = pRefIndex[listIdx][uiCacheIdx + 1] = pRefIndex[listIdx][uiCacheIdx + 6] =
 1563|   384k|                                     pRefIndex[listIdx][uiCacheIdx + 7] = iRef;
 1564|   384k|}
parse_mb_syn_cabac.cpp:_ZN7WelsDecL22DecodeCabacIntraMbTypeEPNS_21TagWelsDecoderContextEPNS_16TagNeighborAvailEi:
   72|  12.2k|static uint32_t DecodeCabacIntraMbType (PWelsDecoderContext pCtx, PWelsNeighAvail pNeighAvail, int ctx_base) {
   73|  12.2k|  uint32_t uiCode;
   74|  12.2k|  uint32_t uiMbType = 0;
   75|       |
   76|  12.2k|  PWelsCabacDecEngine pCabacDecEngine = pCtx->pCabacDecEngine;
   77|  12.2k|  PWelsCabacCtx pBinCtx = pCtx->pCabacCtx + ctx_base;
   78|       |
   79|  12.2k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx, uiCode));
  ------------------
  |  |   52|  12.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  12.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  12.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 241, False: 12.0k]
  |  |  ------------------
  |  |   55|  12.2k|    return uiRetTmp; \
  |  |   56|  12.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 12.0k]
  |  |  ------------------
  ------------------
   80|  12.0k|  if (!uiCode) {
  ------------------
  |  Branch (80:7): [True: 3.06k, False: 8.96k]
  ------------------
   81|  3.06k|    return 0; /* I4x4 */
   82|  3.06k|  }
   83|       |
   84|  8.96k|  WELS_READ_VERIFY (DecodeTerminateCabac (pCabacDecEngine, uiCode));
  ------------------
  |  |   52|  8.96k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  8.96k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  8.96k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 219, False: 8.74k]
  |  |  ------------------
  |  |   55|  8.96k|    return uiRetTmp; \
  |  |   56|  8.96k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 8.74k]
  |  |  ------------------
  ------------------
   85|  8.74k|  if (uiCode) {
  ------------------
  |  Branch (85:7): [True: 1.26k, False: 7.48k]
  ------------------
   86|  1.26k|    return 25; /* PCM */
   87|  1.26k|  }
   88|  7.48k|  uiMbType = 1; /* I16x16 */
   89|  7.48k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 1, uiCode)); /* cbp_luma != 0 */
  ------------------
  |  |   52|  7.48k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  7.48k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  7.48k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 203, False: 7.27k]
  |  |  ------------------
  |  |   55|  7.48k|    return uiRetTmp; \
  |  |   56|  7.48k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 7.27k]
  |  |  ------------------
  ------------------
   90|  7.27k|  uiMbType += 12 * uiCode;
   91|       |
   92|  7.27k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 2, uiCode));
  ------------------
  |  |   52|  7.27k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  7.27k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  7.27k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 295, False: 6.98k]
  |  |  ------------------
  |  |   55|  7.27k|    return uiRetTmp; \
  |  |   56|  7.27k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 6.98k]
  |  |  ------------------
  ------------------
   93|  6.98k|  if (uiCode) {
  ------------------
  |  Branch (93:7): [True: 3.63k, False: 3.35k]
  ------------------
   94|  3.63k|    WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 2, uiCode));
  ------------------
  |  |   52|  3.63k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.63k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.63k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 291, False: 3.34k]
  |  |  ------------------
  |  |   55|  3.63k|    return uiRetTmp; \
  |  |   56|  3.63k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.34k]
  |  |  ------------------
  ------------------
   95|  3.34k|    uiMbType += 4 + 4 * uiCode;
   96|  3.34k|  }
   97|  6.69k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 3, uiCode));
  ------------------
  |  |   52|  6.69k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  6.69k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  6.69k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 349, False: 6.34k]
  |  |  ------------------
  |  |   55|  6.69k|    return uiRetTmp; \
  |  |   56|  6.69k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 6.34k]
  |  |  ------------------
  ------------------
   98|  6.34k|  uiMbType += 2 * uiCode;
   99|  6.34k|  WELS_READ_VERIFY (DecodeBinCabac (pCabacDecEngine, pBinCtx + 3, uiCode));
  ------------------
  |  |   52|  6.34k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  6.34k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  6.34k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 274, False: 6.06k]
  |  |  ------------------
  |  |   55|  6.34k|    return uiRetTmp; \
  |  |   56|  6.34k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 6.06k]
  |  |  ------------------
  ------------------
  100|  6.06k|  uiMbType += 1 * uiCode;
  101|  6.06k|  return uiMbType;
  102|  6.34k|}

_ZN7WelsDec22GetNeighborAvailMbTypeEPNS_16TagNeighborAvailEPNS_10TagDqLayerE:
   56|  4.59M|void GetNeighborAvailMbType (PWelsNeighAvail pNeighAvail, PDqLayer pCurDqLayer) {
   57|  4.59M|  int32_t iCurSliceIdc, iTopSliceIdc, iLeftTopSliceIdc, iRightTopSliceIdc, iLeftSliceIdc;
   58|  4.59M|  int32_t iCurXy, iTopXy = 0, iLeftXy = 0, iLeftTopXy = 0, iRightTopXy = 0;
   59|  4.59M|  int32_t iCurX, iCurY;
   60|       |
   61|  4.59M|  iCurXy = pCurDqLayer->iMbXyIndex;
   62|  4.59M|  iCurX  = pCurDqLayer->iMbX;
   63|  4.59M|  iCurY  = pCurDqLayer->iMbY;
   64|  4.59M|  iCurSliceIdc = pCurDqLayer->pSliceIdc[iCurXy];
   65|  4.59M|  if (iCurX != 0) {
  ------------------
  |  Branch (65:7): [True: 3.65M, False: 937k]
  ------------------
   66|  3.65M|    iLeftXy = iCurXy - 1;
   67|  3.65M|    iLeftSliceIdc = pCurDqLayer->pSliceIdc[iLeftXy];
   68|  3.65M|    pNeighAvail->iLeftAvail = (iLeftSliceIdc == iCurSliceIdc);
   69|  3.65M|    pNeighAvail->iLeftCbp   = pNeighAvail->iLeftAvail ? pCurDqLayer->pCbp[iLeftXy] : 0;
  ------------------
  |  Branch (69:31): [True: 3.62M, False: 38.7k]
  ------------------
   70|  3.65M|  } else {
   71|   937k|    pNeighAvail->iLeftAvail = 0;
   72|   937k|    pNeighAvail->iLeftTopAvail = 0;
   73|   937k|    pNeighAvail->iLeftCbp = 0;
   74|   937k|  }
   75|       |
   76|  4.59M|  if (iCurY != 0) {
  ------------------
  |  Branch (76:7): [True: 2.02M, False: 2.57M]
  ------------------
   77|  2.02M|    iTopXy = iCurXy - pCurDqLayer->iMbWidth;
   78|  2.02M|    iTopSliceIdc = pCurDqLayer->pSliceIdc[iTopXy];
   79|  2.02M|    pNeighAvail->iTopAvail = (iTopSliceIdc == iCurSliceIdc);
   80|  2.02M|    pNeighAvail->iTopCbp   = pNeighAvail->iTopAvail ? pCurDqLayer->pCbp[iTopXy] : 0;
  ------------------
  |  Branch (80:30): [True: 1.94M, False: 74.0k]
  ------------------
   81|  2.02M|    if (iCurX != 0) {
  ------------------
  |  Branch (81:9): [True: 1.47M, False: 552k]
  ------------------
   82|  1.47M|      iLeftTopXy = iTopXy - 1;
   83|  1.47M|      iLeftTopSliceIdc = pCurDqLayer->pSliceIdc[iLeftTopXy];
   84|  1.47M|      pNeighAvail->iLeftTopAvail = (iLeftTopSliceIdc == iCurSliceIdc);
   85|  1.47M|    } else {
   86|   552k|      pNeighAvail->iLeftTopAvail = 0;
   87|   552k|    }
   88|  2.02M|    if (iCurX != (pCurDqLayer->iMbWidth - 1)) {
  ------------------
  |  Branch (88:9): [True: 1.49M, False: 530k]
  ------------------
   89|  1.49M|      iRightTopXy = iTopXy + 1;
   90|  1.49M|      iRightTopSliceIdc = pCurDqLayer->pSliceIdc[iRightTopXy];
   91|  1.49M|      pNeighAvail->iRightTopAvail = (iRightTopSliceIdc == iCurSliceIdc);
   92|  1.49M|    } else {
   93|   530k|      pNeighAvail->iRightTopAvail = 0;
   94|   530k|    }
   95|  2.57M|  } else {
   96|  2.57M|    pNeighAvail->iTopAvail = 0;
   97|  2.57M|    pNeighAvail->iLeftTopAvail = 0;
   98|  2.57M|    pNeighAvail->iRightTopAvail = 0;
   99|  2.57M|    pNeighAvail->iTopCbp   = 0;
  100|  2.57M|  }
  101|       |
  102|  4.59M|  pNeighAvail->iLeftType     = (pNeighAvail->iLeftAvail     ? pCurDqLayer->pDec->pMbType[iLeftXy]     : 0);
  ------------------
  |  Branch (102:33): [True: 3.62M, False: 976k]
  ------------------
  103|  4.59M|  pNeighAvail->iTopType      = (pNeighAvail->iTopAvail      ? pCurDqLayer->pDec->pMbType[iTopXy]      : 0);
  ------------------
  |  Branch (103:33): [True: 1.94M, False: 2.64M]
  ------------------
  104|  4.59M|  pNeighAvail->iLeftTopType  = (pNeighAvail->iLeftTopAvail  ? pCurDqLayer->pDec->pMbType[iLeftTopXy]  : 0);
  ------------------
  |  Branch (104:33): [True: 1.45M, False: 3.14M]
  ------------------
  105|  4.59M|  pNeighAvail->iRightTopType = (pNeighAvail->iRightTopAvail ? pCurDqLayer->pDec->pMbType[iRightTopXy] : 0);
  ------------------
  |  Branch (105:33): [True: 1.47M, False: 3.11M]
  ------------------
  106|  4.59M|}
_ZN7WelsDec25WelsFillCacheNonZeroCountEPNS_16TagNeighborAvailEPhPNS_10TagDqLayerE:
  108|  2.93M|                                PDqLayer pCurDqLayer) { //no matter slice type, intra_pred_constrained_flag
  109|  2.93M|  int32_t iCurXy  = pCurDqLayer->iMbXyIndex;
  110|  2.93M|  int32_t iTopXy  = 0;
  111|  2.93M|  int32_t iLeftXy = 0;
  112|  2.93M|  if (pNeighAvail->iTopAvail) {
  ------------------
  |  Branch (112:7): [True: 524k, False: 2.41M]
  ------------------
  113|   524k|    iTopXy = iCurXy - pCurDqLayer->iMbWidth;
  114|   524k|  }
  115|  2.93M|  if (pNeighAvail->iLeftAvail) {
  ------------------
  |  Branch (115:7): [True: 2.36M, False: 578k]
  ------------------
  116|  2.36M|    iLeftXy = iCurXy - 1;
  117|  2.36M|  }
  118|       |
  119|       |  //stuff non_zero_coeff_count from pNeighAvail(left and top)
  120|  2.93M|  if (pNeighAvail->iTopAvail) {
  ------------------
  |  Branch (120:7): [True: 524k, False: 2.41M]
  ------------------
  121|   524k|    ST32 (&pNonZeroCount[1], LD32 (&pCurDqLayer->pNzc[iTopXy][12]));
  ------------------
  |  |   67|   524k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  122|   524k|    pNonZeroCount[0] = pNonZeroCount[5] = pNonZeroCount[29] = 0;
  123|   524k|    ST16 (&pNonZeroCount[6], LD16 (&pCurDqLayer->pNzc[iTopXy][20]));
  ------------------
  |  |   66|   524k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  124|   524k|    ST16 (&pNonZeroCount[30], LD16 (&pCurDqLayer->pNzc[iTopXy][22]));
  ------------------
  |  |   66|   524k|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  125|  2.41M|  } else {
  126|  2.41M|    ST32 (&pNonZeroCount[1], 0xFFFFFFFFU);
  ------------------
  |  |   67|  2.41M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  127|  2.41M|    pNonZeroCount[0] = pNonZeroCount[5] = pNonZeroCount[29] = 0xFF;
  128|  2.41M|    ST16 (&pNonZeroCount[6], 0xFFFF);
  ------------------
  |  |   66|  2.41M|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  129|  2.41M|    ST16 (&pNonZeroCount[30], 0xFFFF);
  ------------------
  |  |   66|  2.41M|#define ST16(a, b) (((struct tagUnaligned_16 *) (a))->l) = (b)
  ------------------
  130|  2.41M|  }
  131|       |
  132|  2.93M|  if (pNeighAvail->iLeftAvail) {
  ------------------
  |  Branch (132:7): [True: 2.36M, False: 578k]
  ------------------
  133|  2.36M|    pNonZeroCount[8 * 1] = pCurDqLayer->pNzc[iLeftXy][3];
  134|  2.36M|    pNonZeroCount[8 * 2] = pCurDqLayer->pNzc[iLeftXy][7];
  135|  2.36M|    pNonZeroCount[8 * 3] = pCurDqLayer->pNzc[iLeftXy][11];
  136|  2.36M|    pNonZeroCount[8 * 4] = pCurDqLayer->pNzc[iLeftXy][15];
  137|       |
  138|  2.36M|    pNonZeroCount[5 + 8 * 1] = pCurDqLayer->pNzc[iLeftXy][17];
  139|  2.36M|    pNonZeroCount[5 + 8 * 2] = pCurDqLayer->pNzc[iLeftXy][21];
  140|  2.36M|    pNonZeroCount[5 + 8 * 4] = pCurDqLayer->pNzc[iLeftXy][19];
  141|  2.36M|    pNonZeroCount[5 + 8 * 5] = pCurDqLayer->pNzc[iLeftXy][23];
  142|  2.36M|  } else {
  143|   578k|    pNonZeroCount[8 * 1] =
  144|   578k|      pNonZeroCount[8 * 2] =
  145|   578k|        pNonZeroCount[8 * 3] =
  146|   578k|          pNonZeroCount[8 * 4] = -1;//unavailable
  147|       |
  148|   578k|    pNonZeroCount[5 + 8 * 1] =
  149|   578k|      pNonZeroCount[5 + 8 * 2] = -1;//unavailable
  150|       |
  151|   578k|    pNonZeroCount[5 + 8 * 4] =
  152|   578k|      pNonZeroCount[5 + 8 * 5] = -1;//unavailable
  153|   578k|  }
  154|  2.93M|}
_ZN7WelsDec31WelsFillCacheConstrain1IntraNxNEPNS_16TagNeighborAvailEPhPaPNS_10TagDqLayerE:
  156|   237k|                                      PDqLayer pCurDqLayer) { //no matter slice type
  157|   237k|  int32_t iCurXy  = pCurDqLayer->iMbXyIndex;
  158|   237k|  int32_t iTopXy  = 0;
  159|   237k|  int32_t iLeftXy = 0;
  160|       |
  161|       |  //stuff non_zero_coeff_count from pNeighAvail(left and top)
  162|   237k|  WelsFillCacheNonZeroCount (pNeighAvail, pNonZeroCount, pCurDqLayer);
  163|       |
  164|   237k|  if (pNeighAvail->iTopAvail) {
  ------------------
  |  Branch (164:7): [True: 38.4k, False: 199k]
  ------------------
  165|  38.4k|    iTopXy = iCurXy - pCurDqLayer->iMbWidth;
  166|  38.4k|  }
  167|   237k|  if (pNeighAvail->iLeftAvail) {
  ------------------
  |  Branch (167:7): [True: 15.5k, False: 222k]
  ------------------
  168|  15.5k|    iLeftXy = iCurXy - 1;
  169|  15.5k|  }
  170|       |
  171|       |  //intraNxN_pred_mode
  172|   237k|  if (pNeighAvail->iTopAvail && IS_INTRANxN (pNeighAvail->iTopType)) { //top
  ------------------
  |  |  303|  38.4k|#define IS_INTRANxN(type) ( MB_TYPE_INTRA4x4 == (type) || MB_TYPE_INTRA8x8 == (type) )
  |  |  ------------------
  |  |  |  |  275|  38.4k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  ------------------
  |  |               #define IS_INTRANxN(type) ( MB_TYPE_INTRA4x4 == (type) || MB_TYPE_INTRA8x8 == (type) )
  |  |  ------------------
  |  |  |  |  277|  36.3k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  ------------------
  |  |  |  Branch (303:29): [True: 2.09k, False: 36.3k]
  |  |  |  Branch (303:59): [True: 34.3k, False: 1.99k]
  |  |  ------------------
  ------------------
  |  Branch (172:7): [True: 38.4k, False: 199k]
  ------------------
  173|  36.4k|    ST32 (pIntraPredMode + 1, LD32 (&pCurDqLayer->pIntraPredMode[iTopXy][0]));
  ------------------
  |  |   67|  36.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  174|   201k|  } else {
  175|   201k|    int32_t iPred;
  176|   201k|    if (IS_INTRA16x16 (pNeighAvail->iTopType) || (MB_TYPE_INTRA_PCM == pNeighAvail->iTopType))
  ------------------
  |  |  304|   402k|#define IS_INTRA16x16(type) ( MB_TYPE_INTRA16x16 == (type) )
  |  |  ------------------
  |  |  |  |  276|   201k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  ------------------
  |  |  |  Branch (304:29): [True: 721, False: 200k]
  |  |  ------------------
  ------------------
                  if (IS_INTRA16x16 (pNeighAvail->iTopType) || (MB_TYPE_INTRA_PCM == pNeighAvail->iTopType))
  ------------------
  |  |  284|   200k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (176:50): [True: 446, False: 200k]
  ------------------
  177|  1.16k|      iPred = 0x02020202;
  178|   200k|    else
  179|   200k|      iPred = 0xffffffff;
  180|   201k|    ST32 (pIntraPredMode + 1, iPred);
  ------------------
  |  |   67|   201k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  181|   201k|  }
  182|       |
  183|   237k|  if (pNeighAvail->iLeftAvail && IS_INTRANxN (pNeighAvail->iLeftType)) { //left
  ------------------
  |  |  303|  15.5k|#define IS_INTRANxN(type) ( MB_TYPE_INTRA4x4 == (type) || MB_TYPE_INTRA8x8 == (type) )
  |  |  ------------------
  |  |  |  |  275|  15.5k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  ------------------
  |  |               #define IS_INTRANxN(type) ( MB_TYPE_INTRA4x4 == (type) || MB_TYPE_INTRA8x8 == (type) )
  |  |  ------------------
  |  |  |  |  277|  12.5k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  ------------------
  |  |  |  Branch (303:29): [True: 2.93k, False: 12.5k]
  |  |  |  Branch (303:59): [True: 9.96k, False: 2.63k]
  |  |  ------------------
  ------------------
  |  Branch (183:7): [True: 15.5k, False: 222k]
  ------------------
  184|  12.8k|    pIntraPredMode[ 0 + 8    ] = pCurDqLayer->pIntraPredMode[iLeftXy][4];
  185|  12.8k|    pIntraPredMode[ 0 + 8 * 2] = pCurDqLayer->pIntraPredMode[iLeftXy][5];
  186|  12.8k|    pIntraPredMode[ 0 + 8 * 3] = pCurDqLayer->pIntraPredMode[iLeftXy][6];
  187|  12.8k|    pIntraPredMode[ 0 + 8 * 4] = pCurDqLayer->pIntraPredMode[iLeftXy][3];
  188|   224k|  } else {
  189|   224k|    int8_t iPred;
  190|   224k|    if (IS_INTRA16x16 (pNeighAvail->iLeftType) || (MB_TYPE_INTRA_PCM == pNeighAvail->iLeftType))
  ------------------
  |  |  304|   449k|#define IS_INTRA16x16(type) ( MB_TYPE_INTRA16x16 == (type) )
  |  |  ------------------
  |  |  |  |  276|   224k|#define MB_TYPE_INTRA16x16  0x00000002
  |  |  ------------------
  |  |  |  Branch (304:29): [True: 1.01k, False: 223k]
  |  |  ------------------
  ------------------
                  if (IS_INTRA16x16 (pNeighAvail->iLeftType) || (MB_TYPE_INTRA_PCM == pNeighAvail->iLeftType))
  ------------------
  |  |  284|   223k|#define MB_TYPE_INTRA_PCM   0x00000200
  ------------------
  |  Branch (190:51): [True: 689, False: 223k]
  ------------------
  191|  1.70k|      iPred = 2;
  192|   223k|    else
  193|   223k|      iPred = -1;
  194|   224k|    pIntraPredMode[ 0 + 8    ] =
  195|   224k|      pIntraPredMode[ 0 + 8 * 2] =
  196|   224k|        pIntraPredMode[ 0 + 8 * 3] =
  197|   224k|          pIntraPredMode[ 0 + 8 * 4] = iPred;
  198|   224k|  }
  199|   237k|}
_ZN7WelsDec31WelsFillCacheConstrain0IntraNxNEPNS_16TagNeighborAvailEPhPaPNS_10TagDqLayerE:
  202|  93.1k|                                      PDqLayer pCurDqLayer) { //no matter slice type
  203|  93.1k|  int32_t iCurXy  = pCurDqLayer->iMbXyIndex;
  204|  93.1k|  int32_t iTopXy  = 0;
  205|  93.1k|  int32_t iLeftXy = 0;
  206|       |
  207|       |  //stuff non_zero_coeff_count from pNeighAvail(left and top)
  208|  93.1k|  WelsFillCacheNonZeroCount (pNeighAvail, pNonZeroCount, pCurDqLayer);
  209|       |
  210|  93.1k|  if (pNeighAvail->iTopAvail) {
  ------------------
  |  Branch (210:7): [True: 42.8k, False: 50.3k]
  ------------------
  211|  42.8k|    iTopXy = iCurXy - pCurDqLayer->iMbWidth;
  212|  42.8k|  }
  213|  93.1k|  if (pNeighAvail->iLeftAvail) {
  ------------------
  |  Branch (213:7): [True: 64.3k, False: 28.7k]
  ------------------
  214|  64.3k|    iLeftXy = iCurXy - 1;
  215|  64.3k|  }
  216|       |
  217|       |  //intra4x4_pred_mode
  218|  93.1k|  if (pNeighAvail->iTopAvail && IS_INTRANxN (pNeighAvail->iTopType)) { //top
  ------------------
  |  |  303|  42.8k|#define IS_INTRANxN(type) ( MB_TYPE_INTRA4x4 == (type) || MB_TYPE_INTRA8x8 == (type) )
  |  |  ------------------
  |  |  |  |  275|  42.8k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  ------------------
  |  |               #define IS_INTRANxN(type) ( MB_TYPE_INTRA4x4 == (type) || MB_TYPE_INTRA8x8 == (type) )
  |  |  ------------------
  |  |  |  |  277|  34.8k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  ------------------
  |  |  |  Branch (303:29): [True: 7.95k, False: 34.8k]
  |  |  |  Branch (303:59): [True: 25.3k, False: 9.52k]
  |  |  ------------------
  ------------------
  |  Branch (218:7): [True: 42.8k, False: 50.3k]
  ------------------
  219|  33.3k|    ST32 (pIntraPredMode + 1, LD32 (&pCurDqLayer->pIntraPredMode[iTopXy][0]));
  ------------------
  |  |   67|  33.3k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  220|  59.8k|  } else {
  221|  59.8k|    int32_t iPred;
  222|  59.8k|    if (pNeighAvail->iTopAvail)
  ------------------
  |  Branch (222:9): [True: 9.52k, False: 50.3k]
  ------------------
  223|  9.52k|      iPred = 0x02020202;
  224|  50.3k|    else
  225|  50.3k|      iPred = 0xffffffff;
  226|  59.8k|    ST32 (pIntraPredMode + 1, iPred);
  ------------------
  |  |   67|  59.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  227|  59.8k|  }
  228|       |
  229|  93.1k|  if (pNeighAvail->iLeftAvail && IS_INTRANxN (pNeighAvail->iLeftType)) { //left
  ------------------
  |  |  303|  64.3k|#define IS_INTRANxN(type) ( MB_TYPE_INTRA4x4 == (type) || MB_TYPE_INTRA8x8 == (type) )
  |  |  ------------------
  |  |  |  |  275|  64.3k|#define MB_TYPE_INTRA4x4    0x00000001
  |  |  ------------------
  |  |               #define IS_INTRANxN(type) ( MB_TYPE_INTRA4x4 == (type) || MB_TYPE_INTRA8x8 == (type) )
  |  |  ------------------
  |  |  |  |  277|  56.9k|#define MB_TYPE_INTRA8x8    0x00000004
  |  |  ------------------
  |  |  |  Branch (303:29): [True: 7.47k, False: 56.9k]
  |  |  |  Branch (303:59): [True: 46.3k, False: 10.5k]
  |  |  ------------------
  ------------------
  |  Branch (229:7): [True: 64.3k, False: 28.7k]
  ------------------
  230|  53.8k|    pIntraPredMode[ 0 + 8 * 1] = pCurDqLayer->pIntraPredMode[iLeftXy][4];
  231|  53.8k|    pIntraPredMode[ 0 + 8 * 2] = pCurDqLayer->pIntraPredMode[iLeftXy][5];
  232|  53.8k|    pIntraPredMode[ 0 + 8 * 3] = pCurDqLayer->pIntraPredMode[iLeftXy][6];
  233|  53.8k|    pIntraPredMode[ 0 + 8 * 4] = pCurDqLayer->pIntraPredMode[iLeftXy][3];
  234|  53.8k|  } else {
  235|  39.2k|    int8_t iPred;
  236|  39.2k|    if (pNeighAvail->iLeftAvail)
  ------------------
  |  Branch (236:9): [True: 10.5k, False: 28.7k]
  ------------------
  237|  10.5k|      iPred = 2;
  238|  28.7k|    else
  239|  28.7k|      iPred = -1;
  240|  39.2k|    pIntraPredMode[ 0 + 8 * 1] =
  241|  39.2k|      pIntraPredMode[ 0 + 8 * 2] =
  242|  39.2k|        pIntraPredMode[ 0 + 8 * 3] =
  243|  39.2k|          pIntraPredMode[ 0 + 8 * 4] = iPred;
  244|  39.2k|  }
  245|  93.1k|}
_ZN7WelsDec23WelsFillCacheInterCabacEPNS_16TagNeighborAvailEPhPA30_A2_sS5_PA30_aPNS_10TagDqLayerE:
  248|   320k|                              int16_t iMvdCache[LIST_A][30][MV_A], int8_t iRefIdxArray[LIST_A][30], PDqLayer pCurDqLayer) {
  249|   320k|  int32_t iCurXy      = pCurDqLayer->iMbXyIndex;
  250|   320k|  int32_t iTopXy      = 0;
  251|   320k|  int32_t iLeftXy     = 0;
  252|   320k|  int32_t iLeftTopXy  = 0;
  253|   320k|  int32_t iRightTopXy = 0;
  254|       |
  255|   320k|  PSlice pSlice = &pCurDqLayer->sLayerInfo.sSliceInLayer;
  256|   320k|  PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
  257|   320k|  int32_t listCount = 1;
  258|   320k|  if (pSliceHeader->eSliceType == B_SLICE) {
  ------------------
  |  Branch (258:7): [True: 129k, False: 190k]
  ------------------
  259|   129k|    listCount = 2;
  260|   129k|  }
  261|       |  //stuff non_zero_coeff_count from pNeighAvail(left and top)
  262|   320k|  WelsFillCacheNonZeroCount (pNeighAvail, pNonZeroCount, pCurDqLayer);
  263|       |
  264|   320k|  if (pNeighAvail->iTopAvail) {
  ------------------
  |  Branch (264:7): [True: 185k, False: 134k]
  ------------------
  265|   185k|    iTopXy = iCurXy - pCurDqLayer->iMbWidth;
  266|   185k|  }
  267|   320k|  if (pNeighAvail->iLeftAvail) {
  ------------------
  |  Branch (267:7): [True: 235k, False: 84.7k]
  ------------------
  268|   235k|    iLeftXy = iCurXy - 1;
  269|   235k|  }
  270|   320k|  if (pNeighAvail->iLeftTopAvail) {
  ------------------
  |  Branch (270:7): [True: 145k, False: 174k]
  ------------------
  271|   145k|    iLeftTopXy = iCurXy - 1 - pCurDqLayer->iMbWidth;
  272|   145k|  }
  273|   320k|  if (pNeighAvail->iRightTopAvail) {
  ------------------
  |  Branch (273:7): [True: 136k, False: 183k]
  ------------------
  274|   136k|    iRightTopXy = iCurXy + 1 - pCurDqLayer->iMbWidth;
  275|   136k|  }
  276|       |
  277|   769k|  for (int32_t listIdx = 0; listIdx < listCount; ++listIdx) {
  ------------------
  |  Branch (277:29): [True: 449k, False: 320k]
  ------------------
  278|       |    //stuff mv_cache and iRefIdxArray from left and top (inter)
  279|   449k|    if (pNeighAvail->iLeftAvail && IS_INTER (pNeighAvail->iLeftType)) {
  ------------------
  |  |  306|   317k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|   317k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|   317k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|   317k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|   317k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|   317k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|   317k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|   317k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|   317k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 311k, False: 6.65k]
  |  |  ------------------
  ------------------
  |  Branch (279:9): [True: 317k, False: 131k]
  ------------------
  280|   311k|      ST32 (iMvArray[listIdx][6], LD32 (pCurDqLayer->pDec->pMv[listIdx][iLeftXy][3]));
  ------------------
  |  |   67|   311k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  281|   311k|      ST32 (iMvArray[listIdx][12], LD32 (pCurDqLayer->pDec->pMv[listIdx][iLeftXy][7]));
  ------------------
  |  |   67|   311k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  282|   311k|      ST32 (iMvArray[listIdx][18], LD32 (pCurDqLayer->pDec->pMv[listIdx][iLeftXy][11]));
  ------------------
  |  |   67|   311k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  283|   311k|      ST32 (iMvArray[listIdx][24], LD32 (pCurDqLayer->pDec->pMv[listIdx][iLeftXy][15]));
  ------------------
  |  |   67|   311k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  284|       |
  285|   311k|      ST32 (iMvdCache[listIdx][6], LD32 (pCurDqLayer->pMvd[listIdx][iLeftXy][3]));
  ------------------
  |  |   67|   311k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  286|   311k|      ST32 (iMvdCache[listIdx][12], LD32 (pCurDqLayer->pMvd[listIdx][iLeftXy][7]));
  ------------------
  |  |   67|   311k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  287|   311k|      ST32 (iMvdCache[listIdx][18], LD32 (pCurDqLayer->pMvd[listIdx][iLeftXy][11]));
  ------------------
  |  |   67|   311k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  288|   311k|      ST32 (iMvdCache[listIdx][24], LD32 (pCurDqLayer->pMvd[listIdx][iLeftXy][15]));
  ------------------
  |  |   67|   311k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  289|       |
  290|   311k|      iRefIdxArray[listIdx][6] = pCurDqLayer->pDec->pRefIndex[listIdx][iLeftXy][3];
  291|   311k|      iRefIdxArray[listIdx][12] = pCurDqLayer->pDec->pRefIndex[listIdx][iLeftXy][7];
  292|   311k|      iRefIdxArray[listIdx][18] = pCurDqLayer->pDec->pRefIndex[listIdx][iLeftXy][11];
  293|   311k|      iRefIdxArray[listIdx][24] = pCurDqLayer->pDec->pRefIndex[listIdx][iLeftXy][15];
  294|   311k|    } else {
  295|   138k|      ST32 (iMvArray[listIdx][6], 0);
  ------------------
  |  |   67|   138k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  296|   138k|      ST32 (iMvArray[listIdx][12], 0);
  ------------------
  |  |   67|   138k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  297|   138k|      ST32 (iMvArray[listIdx][18], 0);
  ------------------
  |  |   67|   138k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  298|   138k|      ST32 (iMvArray[listIdx][24], 0);
  ------------------
  |  |   67|   138k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  299|       |
  300|   138k|      ST32 (iMvdCache[listIdx][6], 0);
  ------------------
  |  |   67|   138k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  301|   138k|      ST32 (iMvdCache[listIdx][12], 0);
  ------------------
  |  |   67|   138k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  302|   138k|      ST32 (iMvdCache[listIdx][18], 0);
  ------------------
  |  |   67|   138k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  303|   138k|      ST32 (iMvdCache[listIdx][24], 0);
  ------------------
  |  |   67|   138k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  304|       |
  305|       |
  306|   138k|      if (0 == pNeighAvail->iLeftAvail) { //not available
  ------------------
  |  Branch (306:11): [True: 131k, False: 6.65k]
  ------------------
  307|   131k|        iRefIdxArray[listIdx][6] =
  308|   131k|          iRefIdxArray[listIdx][12] =
  309|   131k|            iRefIdxArray[listIdx][18] =
  310|   131k|              iRefIdxArray[listIdx][24] = REF_NOT_AVAIL;
  ------------------
  |  |   41|   131k|#define REF_NOT_AVAIL    -2
  ------------------
  311|   131k|      } else { //available but is intra mb type
  312|  6.65k|        iRefIdxArray[listIdx][6] =
  313|  6.65k|          iRefIdxArray[listIdx][12] =
  314|  6.65k|            iRefIdxArray[listIdx][18] =
  315|  6.65k|              iRefIdxArray[listIdx][24] = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  6.65k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  316|  6.65k|      }
  317|   138k|    }
  318|   449k|    if (pNeighAvail->iLeftTopAvail && IS_INTER (pNeighAvail->iLeftTopType)) {
  ------------------
  |  |  306|   161k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|   161k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|   161k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|   161k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|   161k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|   161k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|   161k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|   161k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|   161k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 159k, False: 1.95k]
  |  |  ------------------
  ------------------
  |  Branch (318:9): [True: 161k, False: 287k]
  ------------------
  319|   159k|      ST32 (iMvArray[listIdx][0], LD32 (pCurDqLayer->pDec->pMv[listIdx][iLeftTopXy][15]));
  ------------------
  |  |   67|   159k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  320|   159k|      ST32 (iMvdCache[listIdx][0], LD32 (pCurDqLayer->pMvd[listIdx][iLeftTopXy][15]));
  ------------------
  |  |   67|   159k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  321|   159k|      iRefIdxArray[listIdx][0] = pCurDqLayer->pDec->pRefIndex[listIdx][iLeftTopXy][15];
  322|   289k|    } else {
  323|   289k|      ST32 (iMvArray[listIdx][0], 0);
  ------------------
  |  |   67|   289k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  324|   289k|      ST32 (iMvdCache[listIdx][0], 0);
  ------------------
  |  |   67|   289k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  325|   289k|      if (0 == pNeighAvail->iLeftTopAvail) { //not available
  ------------------
  |  Branch (325:11): [True: 287k, False: 1.95k]
  ------------------
  326|   287k|        iRefIdxArray[listIdx][0] = REF_NOT_AVAIL;
  ------------------
  |  |   41|   287k|#define REF_NOT_AVAIL    -2
  ------------------
  327|   287k|      } else { //available but is intra mb type
  328|  1.95k|        iRefIdxArray[listIdx][0] = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  1.95k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  329|  1.95k|      }
  330|   289k|    }
  331|       |
  332|   449k|    if (pNeighAvail->iTopAvail && IS_INTER (pNeighAvail->iTopType)) {
  ------------------
  |  |  306|   209k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|   209k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|   209k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|   209k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|   209k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|   209k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|   209k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|   209k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|   209k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 206k, False: 3.48k]
  |  |  ------------------
  ------------------
  |  Branch (332:9): [True: 209k, False: 239k]
  ------------------
  333|   206k|      ST64 (iMvArray[listIdx][1], LD64 (pCurDqLayer->pDec->pMv[listIdx][iTopXy][12]));
  ------------------
  |  |   68|   206k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  334|   206k|      ST64 (iMvArray[listIdx][3], LD64 (pCurDqLayer->pDec->pMv[listIdx][iTopXy][14]));
  ------------------
  |  |   68|   206k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  335|   206k|      ST64 (iMvdCache[listIdx][1], LD64 (pCurDqLayer->pMvd[listIdx][iTopXy][12]));
  ------------------
  |  |   68|   206k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  336|   206k|      ST64 (iMvdCache[listIdx][3], LD64 (pCurDqLayer->pMvd[listIdx][iTopXy][14]));
  ------------------
  |  |   68|   206k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  337|   206k|      ST32 (&iRefIdxArray[listIdx][1], LD32 (&pCurDqLayer->pDec->pRefIndex[listIdx][iTopXy][12]));
  ------------------
  |  |   67|   206k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  338|   242k|    } else {
  339|   242k|      ST64 (iMvArray[listIdx][1], 0);
  ------------------
  |  |   68|   242k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  340|   242k|      ST64 (iMvArray[listIdx][3], 0);
  ------------------
  |  |   68|   242k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  341|   242k|      ST64 (iMvdCache[listIdx][1], 0);
  ------------------
  |  |   68|   242k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  342|   242k|      ST64 (iMvdCache[listIdx][3], 0);
  ------------------
  |  |   68|   242k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  343|   242k|      if (0 == pNeighAvail->iTopAvail) { //not available
  ------------------
  |  Branch (343:11): [True: 239k, False: 3.48k]
  ------------------
  344|   239k|        iRefIdxArray[listIdx][1] =
  345|   239k|          iRefIdxArray[listIdx][2] =
  346|   239k|            iRefIdxArray[listIdx][3] =
  347|   239k|              iRefIdxArray[listIdx][4] = REF_NOT_AVAIL;
  ------------------
  |  |   41|   239k|#define REF_NOT_AVAIL    -2
  ------------------
  348|   239k|      } else { //available but is intra mb type
  349|  3.48k|        iRefIdxArray[listIdx][1] =
  350|  3.48k|          iRefIdxArray[listIdx][2] =
  351|  3.48k|            iRefIdxArray[listIdx][3] =
  352|  3.48k|              iRefIdxArray[listIdx][4] = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  3.48k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  353|  3.48k|      }
  354|   242k|    }
  355|       |
  356|   449k|    if (pNeighAvail->iRightTopAvail && IS_INTER (pNeighAvail->iRightTopType)) {
  ------------------
  |  |  306|   150k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|   150k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|   150k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|   150k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|   150k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|   150k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|   150k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|   150k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|   150k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 148k, False: 2.69k]
  |  |  ------------------
  ------------------
  |  Branch (356:9): [True: 150k, False: 298k]
  ------------------
  357|   148k|      ST32 (iMvArray[listIdx][5], LD32 (pCurDqLayer->pDec->pMv[listIdx][iRightTopXy][12]));
  ------------------
  |  |   67|   148k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  358|   148k|      ST32 (iMvdCache[listIdx][5], LD32 (pCurDqLayer->pMvd[listIdx][iRightTopXy][12]));
  ------------------
  |  |   67|   148k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  359|   148k|      iRefIdxArray[listIdx][5] = pCurDqLayer->pDec->pRefIndex[listIdx][iRightTopXy][12];
  360|   301k|    } else {
  361|   301k|      ST32 (iMvArray[listIdx][5], 0);
  ------------------
  |  |   67|   301k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  362|   301k|      if (0 == pNeighAvail->iRightTopAvail) { //not available
  ------------------
  |  Branch (362:11): [True: 298k, False: 2.69k]
  ------------------
  363|   298k|        iRefIdxArray[listIdx][5] = REF_NOT_AVAIL;
  ------------------
  |  |   41|   298k|#define REF_NOT_AVAIL    -2
  ------------------
  364|   298k|      } else { //available but is intra mb type
  365|  2.69k|        iRefIdxArray[listIdx][5] = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  2.69k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  366|  2.69k|      }
  367|   301k|    }
  368|       |
  369|       |    //right-top 4*4 block unavailable
  370|   449k|    ST32 (iMvArray[listIdx][9], 0);
  ------------------
  |  |   67|   449k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  371|   449k|    ST32 (iMvArray[listIdx][21], 0);
  ------------------
  |  |   67|   449k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  372|   449k|    ST32 (iMvArray[listIdx][11], 0);
  ------------------
  |  |   67|   449k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  373|   449k|    ST32 (iMvArray[listIdx][17], 0);
  ------------------
  |  |   67|   449k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  374|   449k|    ST32 (iMvArray[listIdx][23], 0);
  ------------------
  |  |   67|   449k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  375|   449k|    ST32 (iMvdCache[listIdx][9], 0);
  ------------------
  |  |   67|   449k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  376|   449k|    ST32 (iMvdCache[listIdx][21], 0);
  ------------------
  |  |   67|   449k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  377|   449k|    ST32 (iMvdCache[listIdx][11], 0);
  ------------------
  |  |   67|   449k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  378|   449k|    ST32 (iMvdCache[listIdx][17], 0);
  ------------------
  |  |   67|   449k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  379|   449k|    ST32 (iMvdCache[listIdx][23], 0);
  ------------------
  |  |   67|   449k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  380|   449k|    iRefIdxArray[listIdx][9] =
  381|   449k|      iRefIdxArray[listIdx][21] =
  382|   449k|        iRefIdxArray[listIdx][11] =
  383|   449k|          iRefIdxArray[listIdx][17] =
  384|   449k|            iRefIdxArray[listIdx][23] = REF_NOT_AVAIL;
  ------------------
  |  |   41|   449k|#define REF_NOT_AVAIL    -2
  ------------------
  385|   449k|  }
  386|   320k|}
_ZN7WelsDec24WelsFillDirectCacheCabacEPNS_16TagNeighborAvailEPaPNS_10TagDqLayerE:
  388|   129k|void WelsFillDirectCacheCabac (PWelsNeighAvail pNeighAvail, int8_t iDirect[30], PDqLayer pCurDqLayer) {
  389|       |
  390|   129k|  int32_t iCurXy = pCurDqLayer->iMbXyIndex;
  391|   129k|  int32_t iTopXy = 0;
  392|   129k|  int32_t iLeftXy = 0;
  393|   129k|  int32_t iLeftTopXy = 0;
  394|   129k|  int32_t iRightTopXy = 0;
  395|       |
  396|   129k|  if (pNeighAvail->iTopAvail) {
  ------------------
  |  Branch (396:7): [True: 24.5k, False: 104k]
  ------------------
  397|  24.5k|    iTopXy = iCurXy - pCurDqLayer->iMbWidth;
  398|  24.5k|  }
  399|   129k|  if (pNeighAvail->iLeftAvail) {
  ------------------
  |  Branch (399:7): [True: 82.5k, False: 46.8k]
  ------------------
  400|  82.5k|    iLeftXy = iCurXy - 1;
  401|  82.5k|  }
  402|   129k|  if (pNeighAvail->iLeftTopAvail) {
  ------------------
  |  Branch (402:7): [True: 15.7k, False: 113k]
  ------------------
  403|  15.7k|    iLeftTopXy = iCurXy - 1 - pCurDqLayer->iMbWidth;
  404|  15.7k|  }
  405|   129k|  if (pNeighAvail->iRightTopAvail) {
  ------------------
  |  Branch (405:7): [True: 14.7k, False: 114k]
  ------------------
  406|  14.7k|    iRightTopXy = iCurXy + 1 - pCurDqLayer->iMbWidth;
  407|  14.7k|  }
  408|   129k|  memset (iDirect, 0, 30);
  409|   129k|  if (pNeighAvail->iLeftAvail && IS_INTER (pNeighAvail->iLeftType)) {
  ------------------
  |  |  306|  82.5k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|  82.5k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|  82.5k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|  82.5k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|  82.5k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|  82.5k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|  82.5k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|  82.5k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|  82.5k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 80.8k, False: 1.61k]
  |  |  ------------------
  ------------------
  |  Branch (409:7): [True: 82.5k, False: 46.8k]
  ------------------
  410|  80.8k|    iDirect[6] = pCurDqLayer->pDirect[iLeftXy][3];
  411|  80.8k|    iDirect[12] = pCurDqLayer->pDirect[iLeftXy][7];
  412|  80.8k|    iDirect[18] = pCurDqLayer->pDirect[iLeftXy][11];
  413|  80.8k|    iDirect[24] = pCurDqLayer->pDirect[iLeftXy][15];
  414|  80.8k|  }
  415|   129k|  if (pNeighAvail->iLeftTopAvail && IS_INTER (pNeighAvail->iLeftTopType)) {
  ------------------
  |  |  306|  15.7k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|  15.7k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|  15.7k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|  15.7k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|  15.7k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|  15.7k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|  15.7k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|  15.7k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|  15.7k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 15.0k, False: 673]
  |  |  ------------------
  ------------------
  |  Branch (415:7): [True: 15.7k, False: 113k]
  ------------------
  416|  15.0k|    iDirect[0] = pCurDqLayer->pDirect[iLeftTopXy][15];
  417|  15.0k|  }
  418|       |
  419|   129k|  if (pNeighAvail->iTopAvail && IS_INTER (pNeighAvail->iTopType)) {
  ------------------
  |  |  306|  24.5k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|  24.5k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|  24.5k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|  24.5k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|  24.5k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|  24.5k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|  24.5k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|  24.5k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|  24.5k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 23.1k, False: 1.37k]
  |  |  ------------------
  ------------------
  |  Branch (419:7): [True: 24.5k, False: 104k]
  ------------------
  420|  23.1k|    ST32 (&iDirect[1], LD32 (&pCurDqLayer->pDirect[iTopXy][12]));
  ------------------
  |  |   67|  23.1k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  421|  23.1k|  }
  422|       |
  423|   129k|  if (pNeighAvail->iRightTopAvail && IS_INTER (pNeighAvail->iRightTopType)) {
  ------------------
  |  |  306|  14.7k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|  14.7k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|  14.7k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|  14.7k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|  14.7k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|  14.7k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|  14.7k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|  14.7k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|  14.7k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 13.6k, False: 1.02k]
  |  |  ------------------
  ------------------
  |  Branch (423:7): [True: 14.7k, False: 114k]
  ------------------
  424|  13.6k|    iDirect[5] = pCurDqLayer->pDirect[iRightTopXy][12];
  425|  13.6k|  }
  426|       |  //right-top 4*4 block unavailable
  427|   129k|}
_ZN7WelsDec18WelsFillCacheInterEPNS_16TagNeighborAvailEPhPA30_A2_sPA30_aPNS_10TagDqLayerE:
  430|  2.22M|                         int16_t iMvArray[LIST_A][30][MV_A], int8_t iRefIdxArray[LIST_A][30], PDqLayer pCurDqLayer) {
  431|  2.22M|  int32_t iCurXy      = pCurDqLayer->iMbXyIndex;
  432|  2.22M|  int32_t iTopXy      = 0;
  433|  2.22M|  int32_t iLeftXy     = 0;
  434|  2.22M|  int32_t iLeftTopXy  = 0;
  435|  2.22M|  int32_t iRightTopXy = 0;
  436|       |
  437|  2.22M|  PSlice pSlice = &pCurDqLayer->sLayerInfo.sSliceInLayer;
  438|  2.22M|  PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
  439|  2.22M|  int32_t listCount = 1;
  440|  2.22M|  if (pSliceHeader->eSliceType == B_SLICE) {
  ------------------
  |  Branch (440:7): [True: 233k, False: 1.98M]
  ------------------
  441|   233k|    listCount = 2;
  442|   233k|  }
  443|       |
  444|       |  //stuff non_zero_coeff_count from pNeighAvail(left and top)
  445|  2.22M|  WelsFillCacheNonZeroCount (pNeighAvail, pNonZeroCount, pCurDqLayer);
  446|       |
  447|  2.22M|  if (pNeighAvail->iTopAvail) {
  ------------------
  |  Branch (447:7): [True: 225k, False: 1.99M]
  ------------------
  448|   225k|    iTopXy = iCurXy - pCurDqLayer->iMbWidth;
  449|   225k|  }
  450|  2.22M|  if (pNeighAvail->iLeftAvail) {
  ------------------
  |  Branch (450:7): [True: 2.01M, False: 201k]
  ------------------
  451|  2.01M|    iLeftXy = iCurXy - 1;
  452|  2.01M|  }
  453|  2.22M|  if (pNeighAvail->iLeftTopAvail) {
  ------------------
  |  Branch (453:7): [True: 130k, False: 2.08M]
  ------------------
  454|   130k|    iLeftTopXy = iCurXy - 1 - pCurDqLayer->iMbWidth;
  455|   130k|  }
  456|  2.22M|  if (pNeighAvail->iRightTopAvail) {
  ------------------
  |  Branch (456:7): [True: 140k, False: 2.08M]
  ------------------
  457|   140k|    iRightTopXy = iCurXy + 1 - pCurDqLayer->iMbWidth;
  458|   140k|  }
  459|       |
  460|  4.67M|  for (int32_t listIdx = 0; listIdx < listCount; ++listIdx) {
  ------------------
  |  Branch (460:29): [True: 2.45M, False: 2.22M]
  ------------------
  461|       |    //stuff mv_cache and iRefIdxArray from left and top (inter)
  462|  2.45M|    if (pNeighAvail->iLeftAvail && IS_INTER (pNeighAvail->iLeftType)) {
  ------------------
  |  |  306|  2.17M|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|  2.17M|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|  2.17M|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|  2.17M|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|  2.17M|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|  2.17M|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|  2.17M|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|  2.17M|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|  2.17M|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 2.17M, False: 4.94k]
  |  |  ------------------
  ------------------
  |  Branch (462:9): [True: 2.17M, False: 275k]
  ------------------
  463|  2.17M|      ST32 (iMvArray[listIdx][6], LD32 (pCurDqLayer->pDec->pMv[listIdx][iLeftXy][3]));
  ------------------
  |  |   67|  2.17M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  464|  2.17M|      ST32 (iMvArray[listIdx][12], LD32 (pCurDqLayer->pDec->pMv[listIdx][iLeftXy][7]));
  ------------------
  |  |   67|  2.17M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  465|  2.17M|      ST32 (iMvArray[listIdx][18], LD32 (pCurDqLayer->pDec->pMv[listIdx][iLeftXy][11]));
  ------------------
  |  |   67|  2.17M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  466|  2.17M|      ST32 (iMvArray[listIdx][24], LD32 (pCurDqLayer->pDec->pMv[listIdx][iLeftXy][15]));
  ------------------
  |  |   67|  2.17M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  467|  2.17M|      iRefIdxArray[listIdx][6] = pCurDqLayer->pDec->pRefIndex[listIdx][iLeftXy][3];
  468|  2.17M|      iRefIdxArray[listIdx][12] = pCurDqLayer->pDec->pRefIndex[listIdx][iLeftXy][7];
  469|  2.17M|      iRefIdxArray[listIdx][18] = pCurDqLayer->pDec->pRefIndex[listIdx][iLeftXy][11];
  470|  2.17M|      iRefIdxArray[listIdx][24] = pCurDqLayer->pDec->pRefIndex[listIdx][iLeftXy][15];
  471|  2.17M|    } else {
  472|   280k|      ST32 (iMvArray[listIdx][6], 0);
  ------------------
  |  |   67|   280k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  473|   280k|      ST32 (iMvArray[listIdx][12], 0);
  ------------------
  |  |   67|   280k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  474|   280k|      ST32 (iMvArray[listIdx][18], 0);
  ------------------
  |  |   67|   280k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  475|   280k|      ST32 (iMvArray[listIdx][24], 0);
  ------------------
  |  |   67|   280k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  476|       |
  477|   280k|      if (0 == pNeighAvail->iLeftAvail) { //not available
  ------------------
  |  Branch (477:11): [True: 275k, False: 4.94k]
  ------------------
  478|   275k|        iRefIdxArray[listIdx][6] =
  479|   275k|          iRefIdxArray[listIdx][12] =
  480|   275k|            iRefIdxArray[listIdx][18] =
  481|   275k|              iRefIdxArray[listIdx][24] = REF_NOT_AVAIL;
  ------------------
  |  |   41|   275k|#define REF_NOT_AVAIL    -2
  ------------------
  482|   275k|      } else { //available but is intra mb type
  483|  4.94k|        iRefIdxArray[listIdx][6] =
  484|  4.94k|          iRefIdxArray[listIdx][12] =
  485|  4.94k|            iRefIdxArray[listIdx][18] =
  486|  4.94k|              iRefIdxArray[listIdx][24] = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  4.94k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  487|  4.94k|      }
  488|   280k|    }
  489|  2.45M|    if (pNeighAvail->iLeftTopAvail && IS_INTER (pNeighAvail->iLeftTopType)) {
  ------------------
  |  |  306|   224k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|   224k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|   224k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|   224k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|   224k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|   224k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|   224k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|   224k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|   224k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 221k, False: 3.51k]
  |  |  ------------------
  ------------------
  |  Branch (489:9): [True: 224k, False: 2.22M]
  ------------------
  490|   221k|      ST32 (iMvArray[listIdx][0], LD32 (pCurDqLayer->pDec->pMv[listIdx][iLeftTopXy][15]));
  ------------------
  |  |   67|   221k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  491|   221k|      iRefIdxArray[listIdx][0] = pCurDqLayer->pDec->pRefIndex[listIdx][iLeftTopXy][15];
  492|  2.23M|    } else {
  493|  2.23M|      ST32 (iMvArray[listIdx][0], 0);
  ------------------
  |  |   67|  2.23M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  494|  2.23M|      if (0 == pNeighAvail->iLeftTopAvail) { //not available
  ------------------
  |  Branch (494:11): [True: 2.22M, False: 3.51k]
  ------------------
  495|  2.22M|        iRefIdxArray[listIdx][0] = REF_NOT_AVAIL;
  ------------------
  |  |   41|  2.22M|#define REF_NOT_AVAIL    -2
  ------------------
  496|  2.22M|      } else { //available but is intra mb type
  497|  3.51k|        iRefIdxArray[listIdx][0] = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  3.51k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  498|  3.51k|      }
  499|  2.23M|    }
  500|  2.45M|    if (pNeighAvail->iTopAvail && IS_INTER (pNeighAvail->iTopType)) {
  ------------------
  |  |  306|   345k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|   345k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|   345k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|   345k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|   345k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|   345k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|   345k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|   345k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|   345k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 342k, False: 3.62k]
  |  |  ------------------
  ------------------
  |  Branch (500:9): [True: 345k, False: 2.10M]
  ------------------
  501|   342k|      ST64 (iMvArray[listIdx][1], LD64 (pCurDqLayer->pDec->pMv[listIdx][iTopXy][12]));
  ------------------
  |  |   68|   342k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  502|   342k|      ST64 (iMvArray[listIdx][3], LD64 (pCurDqLayer->pDec->pMv[listIdx][iTopXy][14]));
  ------------------
  |  |   68|   342k|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  503|   342k|      ST32 (&iRefIdxArray[listIdx][1], LD32 (&pCurDqLayer->pDec->pRefIndex[listIdx][iTopXy][12]));
  ------------------
  |  |   67|   342k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  504|  2.11M|    } else {
  505|  2.11M|      ST64 (iMvArray[listIdx][1], 0);
  ------------------
  |  |   68|  2.11M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  506|  2.11M|      ST64 (iMvArray[listIdx][3], 0);
  ------------------
  |  |   68|  2.11M|#define ST64(a, b) (((struct tagUnaligned_64 *) (a))->l) = (b)
  ------------------
  507|  2.11M|      if (0 == pNeighAvail->iTopAvail) { //not available
  ------------------
  |  Branch (507:11): [True: 2.10M, False: 3.62k]
  ------------------
  508|  2.10M|        iRefIdxArray[listIdx][1] =
  509|  2.10M|          iRefIdxArray[listIdx][2] =
  510|  2.10M|            iRefIdxArray[listIdx][3] =
  511|  2.10M|              iRefIdxArray[listIdx][4] = REF_NOT_AVAIL;
  ------------------
  |  |   41|  2.10M|#define REF_NOT_AVAIL    -2
  ------------------
  512|  2.10M|      } else { //available but is intra mb type
  513|  3.62k|        iRefIdxArray[listIdx][1] =
  514|  3.62k|          iRefIdxArray[listIdx][2] =
  515|  3.62k|            iRefIdxArray[listIdx][3] =
  516|  3.62k|              iRefIdxArray[listIdx][4] = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  3.62k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  517|  3.62k|      }
  518|  2.11M|    }
  519|  2.45M|    if (pNeighAvail->iRightTopAvail && IS_INTER (pNeighAvail->iRightTopType)) {
  ------------------
  |  |  306|   237k|#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
  |  |  ------------------
  |  |  |  |  300|   237k|#define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|   237k|#define MB_TYPE_16x16       0x00000008
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  279|   237k|#define MB_TYPE_16x8        0x00000010
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  280|   237k|#define MB_TYPE_8x16        0x00000020
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  281|   237k|#define MB_TYPE_8x8         0x00000040
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|   237k|#define MB_TYPE_8x8_REF0    0x00000080
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|   237k|#define MB_TYPE_SKIP        0x00000100
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_INTER     (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP | MB_TYPE_DIRECT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  286|   237k|#define MB_TYPE_DIRECT      0x00000800
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (306:24): [True: 233k, False: 3.30k]
  |  |  ------------------
  ------------------
  |  Branch (519:9): [True: 237k, False: 2.21M]
  ------------------
  520|   233k|      ST32 (iMvArray[listIdx][5], LD32 (pCurDqLayer->pDec->pMv[listIdx][iRightTopXy][12]));
  ------------------
  |  |   67|   233k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  521|   233k|      iRefIdxArray[listIdx][5] = pCurDqLayer->pDec->pRefIndex[listIdx][iRightTopXy][12];
  522|  2.21M|    } else {
  523|  2.21M|      ST32 (iMvArray[listIdx][5], 0);
  ------------------
  |  |   67|  2.21M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  524|  2.21M|      if (0 == pNeighAvail->iRightTopAvail) { //not available
  ------------------
  |  Branch (524:11): [True: 2.21M, False: 3.30k]
  ------------------
  525|  2.21M|        iRefIdxArray[listIdx][5] = REF_NOT_AVAIL;
  ------------------
  |  |   41|  2.21M|#define REF_NOT_AVAIL    -2
  ------------------
  526|  2.21M|      } else { //available but is intra mb type
  527|  3.30k|        iRefIdxArray[listIdx][5] = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  3.30k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
  528|  3.30k|      }
  529|  2.21M|    }
  530|       |    //right-top 4*4 block unavailable
  531|  2.45M|    ST32 (iMvArray[listIdx][9], 0);
  ------------------
  |  |   67|  2.45M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  532|  2.45M|    ST32 (iMvArray[listIdx][21], 0);
  ------------------
  |  |   67|  2.45M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  533|  2.45M|    ST32 (iMvArray[listIdx][11], 0);
  ------------------
  |  |   67|  2.45M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  534|  2.45M|    ST32 (iMvArray[listIdx][17], 0);
  ------------------
  |  |   67|  2.45M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  535|  2.45M|    ST32 (iMvArray[listIdx][23], 0);
  ------------------
  |  |   67|  2.45M|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
  536|  2.45M|    iRefIdxArray[listIdx][9] =
  537|  2.45M|      iRefIdxArray[listIdx][21] =
  538|  2.45M|        iRefIdxArray[listIdx][11] =
  539|  2.45M|          iRefIdxArray[listIdx][17] =
  540|  2.45M|            iRefIdxArray[listIdx][23] = REF_NOT_AVAIL;
  ------------------
  |  |   41|  2.45M|#define REF_NOT_AVAIL    -2
  ------------------
  541|  2.45M|  }
  542|  2.22M|}
_ZN7WelsDec16PredIntra4x4ModeEPai:
  544|  2.21M|int32_t PredIntra4x4Mode (int8_t* pIntraPredMode, int32_t iIdx4) {
  545|  2.21M|  int8_t iTopMode  = pIntraPredMode[g_kuiScan8[iIdx4] - 8];
  546|  2.21M|  int8_t iLeftMode = pIntraPredMode[g_kuiScan8[iIdx4] - 1];
  547|  2.21M|  int8_t iBestMode;
  548|       |
  549|  2.21M|  if (-1 == iLeftMode || -1 == iTopMode) {
  ------------------
  |  Branch (549:7): [True: 525k, False: 1.68M]
  |  Branch (549:26): [True: 585k, False: 1.10M]
  ------------------
  550|  1.11M|    iBestMode = 2;
  551|  1.11M|  } else {
  552|  1.10M|    iBestMode = WELS_MIN (iLeftMode, iTopMode);
  ------------------
  |  |   95|  1.10M|#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (95:25): [True: 218k, False: 882k]
  |  |  ------------------
  ------------------
  553|  1.10M|  }
  554|  2.21M|  return iBestMode;
  555|  2.21M|}
_ZN7WelsDec23CheckIntra16x16PredModeEhPa:
  574|  67.8k|int32_t CheckIntra16x16PredMode (uint8_t uiSampleAvail, int8_t* pMode) {
  575|  67.8k|  int32_t iLeftAvail     = uiSampleAvail & 0x04;
  576|  67.8k|  int32_t bLeftTopAvail  = uiSampleAvail & 0x02;
  577|  67.8k|  int32_t iTopAvail      = uiSampleAvail & 0x01;
  578|       |
  579|  67.8k|  if ((*pMode < 0) || (*pMode > MAX_PRED_MODE_ID_I16x16)) {
  ------------------
  |  |   62|  67.8k|#define MAX_PRED_MODE_ID_I16x16  3
  ------------------
  |  Branch (579:7): [True: 0, False: 67.8k]
  |  Branch (579:23): [True: 0, False: 67.8k]
  ------------------
  580|      0|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I16x16_PRED_MODE);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  581|      0|  }
  582|       |
  583|  67.8k|  if (I16_PRED_DC == *pMode) {
  ------------------
  |  |  333|  67.8k|#define I16_PRED_DC      2
  ------------------
  |  Branch (583:7): [True: 37.7k, False: 30.0k]
  ------------------
  584|  37.7k|    if (iLeftAvail && iTopAvail) {
  ------------------
  |  Branch (584:9): [True: 15.0k, False: 22.7k]
  |  Branch (584:23): [True: 6.97k, False: 8.08k]
  ------------------
  585|  6.97k|      return ERR_NONE;
  586|  30.8k|    } else if (iLeftAvail) {
  ------------------
  |  Branch (586:16): [True: 8.08k, False: 22.7k]
  ------------------
  587|  8.08k|      *pMode = I16_PRED_DC_L;
  ------------------
  |  |  336|  8.08k|#define I16_PRED_DC_L    4
  ------------------
  588|  22.7k|    } else if (iTopAvail) {
  ------------------
  |  Branch (588:16): [True: 1.63k, False: 21.0k]
  ------------------
  589|  1.63k|      *pMode = I16_PRED_DC_T;
  ------------------
  |  |  337|  1.63k|#define I16_PRED_DC_T    5
  ------------------
  590|  21.0k|    } else {
  591|  21.0k|      *pMode = I16_PRED_DC_128;
  ------------------
  |  |  338|  21.0k|#define I16_PRED_DC_128  6
  ------------------
  592|  21.0k|    }
  593|  37.7k|  } else {
  594|  30.0k|    bool bModeAvail = CHECK_I16_MODE (*pMode, iLeftAvail, iTopAvail, bLeftTopAvail);
  ------------------
  |  |  558|  30.0k|                      ((a == g_ksI16PredInfo[a].iPredMode) &&  \
  |  |  ------------------
  |  |  |  Branch (558:24): [True: 30.0k, False: 0]
  |  |  ------------------
  |  |  559|  30.0k|                       (b >= g_ksI16PredInfo[a].iLeftAvail) && \
  |  |  ------------------
  |  |  |  Branch (559:24): [True: 16.0k, False: 13.9k]
  |  |  ------------------
  |  |  560|  30.0k|                       (c >= g_ksI16PredInfo[a].iTopAvail) &&  \
  |  |  ------------------
  |  |  |  Branch (560:24): [True: 12.0k, False: 4.05k]
  |  |  ------------------
  |  |  561|  30.0k|                       (d >= g_ksI16PredInfo[a].iLeftTopAvail));
  |  |  ------------------
  |  |  |  Branch (561:24): [True: 12.0k, False: 7]
  |  |  ------------------
  ------------------
  595|  30.0k|    if (0 == bModeAvail) {
  ------------------
  |  Branch (595:9): [True: 18.0k, False: 12.0k]
  ------------------
  596|  18.0k|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I16x16_PRED_MODE);
  ------------------
  |  |   59|  18.0k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  597|  18.0k|    }
  598|  30.0k|  }
  599|  42.8k|  return ERR_NONE;
  600|  67.8k|}
_ZN7WelsDec24CheckIntraChromaPredModeEhPa:
  603|   127k|int32_t CheckIntraChromaPredMode (uint8_t uiSampleAvail, int8_t* pMode) {
  604|   127k|  int32_t iLeftAvail     = uiSampleAvail & 0x04;
  605|   127k|  int32_t bLeftTopAvail  = uiSampleAvail & 0x02;
  606|   127k|  int32_t iTopAvail      = uiSampleAvail & 0x01;
  607|       |
  608|   127k|  if (C_PRED_DC == *pMode) {
  ------------------
  |  |  363|   127k|#define C_PRED_DC        0
  ------------------
  |  Branch (608:7): [True: 99.6k, False: 28.3k]
  ------------------
  609|  99.6k|    if (iLeftAvail && iTopAvail) {
  ------------------
  |  Branch (609:9): [True: 65.3k, False: 34.2k]
  |  Branch (609:23): [True: 28.8k, False: 36.4k]
  ------------------
  610|  28.8k|      return ERR_NONE;
  611|  70.7k|    } else if (iLeftAvail) {
  ------------------
  |  Branch (611:16): [True: 36.4k, False: 34.2k]
  ------------------
  612|  36.4k|      *pMode = C_PRED_DC_L;
  ------------------
  |  |  368|  36.4k|#define C_PRED_DC_L      4
  ------------------
  613|  36.4k|    } else if (iTopAvail) {
  ------------------
  |  Branch (613:16): [True: 5.96k, False: 28.2k]
  ------------------
  614|  5.96k|      *pMode = C_PRED_DC_T;
  ------------------
  |  |  369|  5.96k|#define C_PRED_DC_T      5
  ------------------
  615|  28.2k|    } else {
  616|  28.2k|      *pMode = C_PRED_DC_128;
  ------------------
  |  |  370|  28.2k|#define C_PRED_DC_128    6
  ------------------
  617|  28.2k|    }
  618|  99.6k|  } else {
  619|  28.3k|    bool bModeAvail = CHECK_CHROMA_MODE (*pMode, iLeftAvail, iTopAvail, bLeftTopAvail);
  ------------------
  |  |  563|  28.3k|                        ((a == g_ksChromaPredInfo[a].iPredMode) &&  \
  |  |  ------------------
  |  |  |  Branch (563:26): [True: 28.3k, False: 0]
  |  |  ------------------
  |  |  564|  28.3k|                         (b >= g_ksChromaPredInfo[a].iLeftAvail) && \
  |  |  ------------------
  |  |  |  Branch (564:26): [True: 26.4k, False: 1.92k]
  |  |  ------------------
  |  |  565|  28.3k|                         (c >= g_ksChromaPredInfo[a].iTopAvail) &&  \
  |  |  ------------------
  |  |  |  Branch (565:26): [True: 25.6k, False: 751]
  |  |  ------------------
  |  |  566|  28.3k|                         (d >= g_ksChromaPredInfo[a].iLeftTopAvail));
  |  |  ------------------
  |  |  |  Branch (566:26): [True: 25.6k, False: 72]
  |  |  ------------------
  ------------------
  620|  28.3k|    if (0 == bModeAvail) {
  ------------------
  |  Branch (620:9): [True: 2.74k, False: 25.6k]
  ------------------
  621|  2.74k|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_I_CHROMA_PRED_MODE);
  ------------------
  |  |   59|  2.74k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  622|  2.74k|    }
  623|  28.3k|  }
  624|  96.3k|  return ERR_NONE;
  625|   127k|}
_ZN7WelsDec21CheckIntraNxNPredModeEPiPaib:
  627|  2.21M|int32_t CheckIntraNxNPredMode (int32_t* pSampleAvail, int8_t* pMode, int32_t iIndex, bool b8x8) {
  628|  2.21M|  int8_t iIdx = g_kuiCache30ScanIdx[iIndex];
  629|       |
  630|  2.21M|  int32_t iLeftAvail     = pSampleAvail[iIdx - 1];
  631|  2.21M|  int32_t iTopAvail      = pSampleAvail[iIdx - 6];
  632|  2.21M|  int32_t bLeftTopAvail  = pSampleAvail[iIdx - 7];
  633|  2.21M|  int32_t bRightTopAvail = pSampleAvail[iIdx - (b8x8 ? 4 : 5)];  // Diff with 4x4 Pred
  ------------------
  |  Branch (633:49): [True: 565k, False: 1.64M]
  ------------------
  634|       |
  635|  2.21M|  int8_t iFinalMode;
  636|       |
  637|  2.21M|  if ((*pMode < 0) || (*pMode > MAX_PRED_MODE_ID_I4x4)) {
  ------------------
  |  |   64|  2.21M|#define MAX_PRED_MODE_ID_I4x4    8
  ------------------
  |  Branch (637:7): [True: 0, False: 2.21M]
  |  Branch (637:23): [True: 0, False: 2.21M]
  ------------------
  638|      0|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INVALID_INTRA4X4_MODE);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  639|      0|  }
  640|       |
  641|  2.21M|  if (I4_PRED_DC == *pMode) {
  ------------------
  |  |  345|  2.21M|#define I4_PRED_DC       2
  ------------------
  |  Branch (641:7): [True: 1.55M, False: 657k]
  ------------------
  642|  1.55M|    if (iLeftAvail && iTopAvail) {
  ------------------
  |  Branch (642:9): [True: 1.09M, False: 464k]
  |  Branch (642:23): [True: 515k, False: 574k]
  ------------------
  643|   515k|      return *pMode;
  644|  1.03M|    } else if (iLeftAvail) {
  ------------------
  |  Branch (644:16): [True: 574k, False: 464k]
  ------------------
  645|   574k|      iFinalMode = I4_PRED_DC_L;
  ------------------
  |  |  353|   574k|#define I4_PRED_DC_L     9
  ------------------
  646|   574k|    } else if (iTopAvail) {
  ------------------
  |  Branch (646:16): [True: 262k, False: 202k]
  ------------------
  647|   262k|      iFinalMode = I4_PRED_DC_T;
  ------------------
  |  |  354|   262k|#define I4_PRED_DC_T     10
  ------------------
  648|   262k|    } else {
  649|   202k|      iFinalMode = I4_PRED_DC_128;
  ------------------
  |  |  355|   202k|#define I4_PRED_DC_128   11
  ------------------
  650|   202k|    }
  651|  1.55M|  } else {
  652|   657k|    bool bModeAvail = CHECK_I4_MODE (*pMode, iLeftAvail, iTopAvail, bLeftTopAvail);
  ------------------
  |  |  568|   657k|                     ((a == g_ksI4PredInfo[a].iPredMode) &&      \
  |  |  ------------------
  |  |  |  Branch (568:23): [True: 657k, False: 0]
  |  |  ------------------
  |  |  569|   657k|                      (b >= g_ksI4PredInfo[a].iLeftAvail) &&     \
  |  |  ------------------
  |  |  |  Branch (569:23): [True: 644k, False: 13.0k]
  |  |  ------------------
  |  |  570|   657k|                      (c >= g_ksI4PredInfo[a].iTopAvail) &&      \
  |  |  ------------------
  |  |  |  Branch (570:23): [True: 635k, False: 9.08k]
  |  |  ------------------
  |  |  571|   657k|                      (d >= g_ksI4PredInfo[a].iLeftTopAvail));
  |  |  ------------------
  |  |  |  Branch (571:23): [True: 635k, False: 9]
  |  |  ------------------
  ------------------
  653|   657k|    if (0 == bModeAvail) {
  ------------------
  |  Branch (653:9): [True: 22.1k, False: 635k]
  ------------------
  654|  22.1k|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INVALID_INTRA4X4_MODE);
  ------------------
  |  |   59|  22.1k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  655|  22.1k|    }
  656|       |
  657|   635k|    iFinalMode = *pMode;
  658|       |
  659|       |    //if right-top unavailable, modify mode DDL and VL (padding rightmost pixel of top)
  660|   635k|    if (I4_PRED_DDL == iFinalMode && 0 == bRightTopAvail) {
  ------------------
  |  |  346|   635k|#define I4_PRED_DDL      3 //diagonal_down_left
  ------------------
  |  Branch (660:9): [True: 48.9k, False: 586k]
  |  Branch (660:38): [True: 7.00k, False: 41.9k]
  ------------------
  661|  7.00k|      iFinalMode = I4_PRED_DDL_TOP;
  ------------------
  |  |  357|  7.00k|#define I4_PRED_DDL_TOP  12 //right-top replacing by padding rightmost pixel of top
  ------------------
  662|   628k|    } else if (I4_PRED_VL == iFinalMode && 0 == bRightTopAvail) {
  ------------------
  |  |  350|   628k|#define I4_PRED_VL       7 //vertical_left
  ------------------
  |  Branch (662:16): [True: 27.9k, False: 600k]
  |  Branch (662:44): [True: 9.91k, False: 18.0k]
  ------------------
  663|  9.91k|      iFinalMode = I4_PRED_VL_TOP;
  ------------------
  |  |  358|  9.91k|#define I4_PRED_VL_TOP   13 //right-top replacing by padding rightmost pixel of top
  ------------------
  664|  9.91k|    }
  665|   635k|  }
  666|  1.67M|  return iFinalMode;
  667|  2.21M|}
_ZN7WelsDec12BsStartCavlcEPN10WelsCommon15TagBitStringAuxE:
  669|   140k|void BsStartCavlc (PBitStringAux pBs) {
  670|   140k|  pBs->iIndex = ((pBs->pCurBuf - pBs->pStartBuf) << 3) - (16 - pBs->iLeftBits);
  671|   140k|}
_ZN7WelsDec10BsEndCavlcEPN10WelsCommon15TagBitStringAuxE:
  672|   122k|void BsEndCavlc (PBitStringAux pBs) {
  673|   122k|  pBs->pCurBuf   = pBs->pStartBuf + (pBs->iIndex >> 3);
  674|   122k|  uint32_t uiCache32Bit = (uint32_t) ((((pBs->pCurBuf[0] << 8) | pBs->pCurBuf[1]) << 16) |
  675|   122k|                                      (pBs->pCurBuf[2] << 8) | pBs->pCurBuf[3]);
  676|   122k|  pBs->uiCurBits = uiCache32Bit << (pBs->iIndex & 0x07);
  677|   122k|  pBs->pCurBuf  += 4;
  678|   122k|  pBs->iLeftBits = -16 + (pBs->iIndex & 0x07);
  679|   122k|}
_ZN7WelsDec22WelsResidualBlockCavlcEPNS_11TagVlcTableEPhPN10WelsCommon15TagBitStringAuxEiiPKhiPshPNS_21TagWelsDecoderContextE:
  863|   527k|                                PWelsDecoderContext pCtx) {
  864|   527k|  int32_t iLevel[16], iZerosLeft, iCoeffNum;
  865|   527k|  int32_t  iRun[16];
  866|   527k|  int32_t iCurNonZeroCacheIdx, i;
  867|       |
  868|       |
  869|   527k|  int32_t iMbResProperty = 0;
  870|   527k|  GetMbResProperty (&iMbResProperty, &iResidualProperty, 1);
  871|   527k|  const uint16_t* kpDequantCoeff = pCtx->bUseScalingList ? pCtx->pDequant_coeff4x4[iMbResProperty][uiQp] :
  ------------------
  |  Branch (871:36): [True: 46.7k, False: 480k]
  ------------------
  872|   527k|                                   g_kuiDequantCoeff[uiQp];
  873|       |
  874|   527k|  int8_t nA, nB, nC;
  875|   527k|  uint8_t uiTotalCoeff, uiTrailingOnes;
  876|   527k|  int32_t iUsedBits = 0;
  877|   527k|  intX_t iCurIdx   = pBs->iIndex;
  878|   527k|  uint8_t* pBuf     = ((uint8_t*)pBs->pStartBuf) + (iCurIdx >> 3);
  879|   527k|  bool  bChromaDc = (CHROMA_DC == iResidualProperty);
  ------------------
  |  |   73|   527k|#define CHROMA_DC    4
  ------------------
  880|   527k|  uint8_t bChroma   = (bChromaDc || CHROMA_AC == iResidualProperty);
  ------------------
  |  |   74|   459k|#define CHROMA_AC    5
  ------------------
  |  Branch (880:24): [True: 67.9k, False: 459k]
  |  Branch (880:37): [True: 57.7k, False: 401k]
  ------------------
  881|   527k|  SReadBitsCache sReadBitsCache;
  882|       |
  883|   527k|  uint32_t uiCache32Bit = (uint32_t) ((((pBuf[0] << 8) | pBuf[1]) << 16) | (pBuf[2] << 8) | pBuf[3]);
  884|   527k|  sReadBitsCache.uiCache32Bit = uiCache32Bit << (iCurIdx & 0x07);
  885|   527k|  sReadBitsCache.uiRemainBits = 32 - (iCurIdx & 0x07);
  886|   527k|  sReadBitsCache.pBuf = pBuf;
  887|       |  //////////////////////////////////////////////////////////////////////////
  888|       |
  889|   527k|  if (bChroma) {
  ------------------
  |  Branch (889:7): [True: 125k, False: 401k]
  ------------------
  890|   125k|    iCurNonZeroCacheIdx = g_kuiCache48CountScan4Idx[iIndex];
  891|   125k|    nA = pNonZeroCountCache[iCurNonZeroCacheIdx - 1];
  892|   125k|    nB = pNonZeroCountCache[iCurNonZeroCacheIdx - 8];
  893|   401k|  } else { //luma
  894|   401k|    iCurNonZeroCacheIdx = g_kuiCache48CountScan4Idx[iIndex];
  895|   401k|    nA = pNonZeroCountCache[iCurNonZeroCacheIdx - 1];
  896|   401k|    nB = pNonZeroCountCache[iCurNonZeroCacheIdx - 8];
  897|   401k|  }
  898|       |
  899|   527k|  WELS_NON_ZERO_COUNT_AVERAGE (nC, nA, nB);
  ------------------
  |  |  135|   527k|#define WELS_NON_ZERO_COUNT_AVERAGE(nC,nA,nB) {         \
  |  |  136|   527k|  nC = nA + nB + 1;                                     \
  |  |  137|   527k|  nC >>= (uint8_t)( nA != -1 && nB != -1);              \
  |  |  ------------------
  |  |  |  Branch (137:21): [True: 417k, False: 110k]
  |  |  |  Branch (137:33): [True: 348k, False: 69.2k]
  |  |  ------------------
  |  |  138|   527k|  nC += (uint8_t)(nA == -1 && nB == -1);                \
  |  |  ------------------
  |  |  |  Branch (138:19): [True: 110k, False: 417k]
  |  |  |  Branch (138:31): [True: 39.0k, False: 71.0k]
  |  |  ------------------
  |  |  139|   527k|}
  ------------------
  900|       |
  901|   527k|  iUsedBits += CavlcGetTrailingOnesAndTotalCoeff (uiTotalCoeff, uiTrailingOnes, &sReadBitsCache, pVlcTable, bChromaDc,
  902|   527k|               nC);
  903|       |
  904|   527k|  if (iResidualProperty != CHROMA_DC && iResidualProperty != I16_LUMA_DC) {
  ------------------
  |  |   73|  1.05M|#define CHROMA_DC    4
  ------------------
                if (iResidualProperty != CHROMA_DC && iResidualProperty != I16_LUMA_DC) {
  ------------------
  |  |   70|   459k|#define I16_LUMA_DC  1
  ------------------
  |  Branch (904:7): [True: 459k, False: 67.9k]
  |  Branch (904:41): [True: 441k, False: 17.8k]
  ------------------
  905|   441k|    pNonZeroCountCache[iCurNonZeroCacheIdx] = uiTotalCoeff;
  906|       |    //////////////////////////////////////////////////////////////////////////
  907|   441k|  }
  908|   527k|  if (0 == uiTotalCoeff) {
  ------------------
  |  Branch (908:7): [True: 363k, False: 163k]
  ------------------
  909|   363k|    pBs->iIndex += iUsedBits;
  910|   363k|    return ERR_NONE;
  911|   363k|  }
  912|   163k|  if ((uiTrailingOnes > 3) || (uiTotalCoeff > 16)) { /////////////////check uiTrailingOnes and uiTotalCoeff
  ------------------
  |  Branch (912:7): [True: 0, False: 163k]
  |  Branch (912:31): [True: 0, False: 163k]
  ------------------
  913|      0|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_CAVLC_INVALID_TOTAL_COEFF_OR_TRAILING_ONES);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  914|      0|  }
  915|   163k|  if ((i = CavlcGetLevelVal (iLevel, &sReadBitsCache, uiTotalCoeff, uiTrailingOnes)) == -1) {
  ------------------
  |  Branch (915:7): [True: 8.62k, False: 155k]
  ------------------
  916|  8.62k|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_CAVLC_INVALID_LEVEL);
  ------------------
  |  |   59|  8.62k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  917|  8.62k|  }
  918|   155k|  iUsedBits += i;
  919|   155k|  if (uiTotalCoeff < iMaxNumCoeff) {
  ------------------
  |  Branch (919:7): [True: 153k, False: 1.92k]
  ------------------
  920|   153k|    iUsedBits += CavlcGetTotalZeros (iZerosLeft, &sReadBitsCache, uiTotalCoeff, pVlcTable, bChromaDc);
  921|   153k|  } else {
  922|  1.92k|    iZerosLeft = 0;
  923|  1.92k|  }
  924|       |
  925|   155k|  if ((iZerosLeft < 0) || ((iZerosLeft + uiTotalCoeff) > iMaxNumCoeff)) {
  ------------------
  |  Branch (925:7): [True: 0, False: 155k]
  |  Branch (925:27): [True: 814, False: 154k]
  ------------------
  926|    814|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_CAVLC_INVALID_ZERO_LEFT);
  ------------------
  |  |   59|    814|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  927|    814|  }
  928|   154k|  if ((i = CavlcGetRunBefore (iRun, &sReadBitsCache, uiTotalCoeff, pVlcTable, iZerosLeft)) == -1) {
  ------------------
  |  Branch (928:7): [True: 3.22k, False: 150k]
  ------------------
  929|  3.22k|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_CAVLC_INVALID_RUN_BEFORE);
  ------------------
  |  |   59|  3.22k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  930|  3.22k|  }
  931|   150k|  iUsedBits += i;
  932|   150k|  pBs->iIndex += iUsedBits;
  933|   150k|  iCoeffNum = -1;
  934|       |
  935|   150k|  if (iResidualProperty == CHROMA_DC) {
  ------------------
  |  |   73|   150k|#define CHROMA_DC    4
  ------------------
  |  Branch (935:7): [True: 49.1k, False: 101k]
  ------------------
  936|       |    //chroma dc scaling process, is kpDequantCoeff[0]? LevelScale(qPdc%6,0,0))<<(qPdc/6-6), the transform is done at construction.
  937|   112k|    for (i = uiTotalCoeff - 1; i >= 0; --i) {
  ------------------
  |  Branch (937:32): [True: 63.5k, False: 49.1k]
  ------------------
  938|       |      //FIXME merge into rundecode?
  939|  63.5k|      int32_t j;
  940|  63.5k|      iCoeffNum += iRun[i] + 1; //FIXME add 1 earlier ?
  941|  63.5k|      j          = kpZigzagTable[ iCoeffNum ];
  942|  63.5k|      pTCoeff[j] = iLevel[i];
  943|  63.5k|    }
  944|  49.1k|    WelsChromaDcIdct (pTCoeff);
  945|       |    //scaling
  946|  49.1k|    if (!pCtx->bUseScalingList) {
  ------------------
  |  Branch (946:9): [True: 48.2k, False: 955]
  ------------------
  947|   241k|      for (int j = 0; j < 4; ++j) {
  ------------------
  |  Branch (947:23): [True: 192k, False: 48.2k]
  ------------------
  948|   192k|        pTCoeff[kpZigzagTable[j]] = (pTCoeff[kpZigzagTable[j]] * kpDequantCoeff[0]) >> 1;
  949|   192k|      }
  950|  48.2k|    } else {
  951|  4.77k|      for (int j = 0; j < 4; ++j) {
  ------------------
  |  Branch (951:23): [True: 3.82k, False: 955]
  ------------------
  952|  3.82k|        pTCoeff[kpZigzagTable[j]] = ((int64_t) pTCoeff[kpZigzagTable[j]] * (int64_t) kpDequantCoeff[0]) >> 5;
  953|  3.82k|      }
  954|    955|    }
  955|   101k|  } else if (iResidualProperty == I16_LUMA_DC) { //DC coefficent, only call in Intra_16x16, base_mode_flag = 0
  ------------------
  |  |   70|   101k|#define I16_LUMA_DC  1
  ------------------
  |  Branch (955:14): [True: 3.57k, False: 98.2k]
  ------------------
  956|  8.74k|    for (i = uiTotalCoeff - 1; i >= 0; --i) { //FIXME merge into rundecode?
  ------------------
  |  Branch (956:32): [True: 5.16k, False: 3.57k]
  ------------------
  957|  5.16k|      int32_t j;
  958|  5.16k|      iCoeffNum += iRun[i] + 1; //FIXME add 1 earlier ?
  959|  5.16k|      j          = kpZigzagTable[ iCoeffNum ];
  960|  5.16k|      pTCoeff[j] = iLevel[i];
  961|  5.16k|    }
  962|  3.57k|    WelsLumaDcDequantIdct (pTCoeff, uiQp, pCtx);
  963|  98.2k|  } else {
  964|   265k|    for (i = uiTotalCoeff - 1; i >= 0; --i) { //FIXME merge into  rundecode?
  ------------------
  |  Branch (964:32): [True: 167k, False: 98.2k]
  ------------------
  965|   167k|      int32_t j;
  966|   167k|      iCoeffNum += iRun[i] + 1; //FIXME add 1 earlier ?
  967|   167k|      j          = kpZigzagTable[ iCoeffNum ];
  968|   167k|      if (!pCtx->bUseScalingList) {
  ------------------
  |  Branch (968:11): [True: 138k, False: 28.8k]
  ------------------
  969|   138k|        pTCoeff[j] = (iLevel[i] * kpDequantCoeff[j & 0x07]);
  970|   138k|      } else {
  971|  28.8k|        pTCoeff[j] = (iLevel[i] * kpDequantCoeff[j] + 8) >> 4;
  972|  28.8k|      }
  973|   167k|    }
  974|  98.2k|  }
  975|       |
  976|   150k|  return ERR_NONE;
  977|   154k|}
_ZN7WelsDec25WelsResidualBlockCavlc8x8EPNS_11TagVlcTableEPhPN10WelsCommon15TagBitStringAuxEiiPKhiPsihPNS_21TagWelsDecoderContextE:
  982|   251k|                                   PWelsDecoderContext pCtx) {
  983|   251k|  int32_t iLevel[16], iZerosLeft, iCoeffNum;
  984|   251k|  int32_t  iRun[16];
  985|   251k|  int32_t iCurNonZeroCacheIdx, i;
  986|       |
  987|   251k|  int32_t iMbResProperty = 0;
  988|   251k|  GetMbResProperty (&iMbResProperty, &iResidualProperty, 1);
  989|       |
  990|   251k|  const uint16_t* kpDequantCoeff = pCtx->bUseScalingList ? pCtx->pDequant_coeff8x8[iMbResProperty - 6][uiQp] :
  ------------------
  |  Branch (990:36): [True: 38.1k, False: 213k]
  ------------------
  991|   251k|                                   g_kuiDequantCoeff8x8[uiQp];
  992|       |
  993|   251k|  int8_t nA, nB, nC;
  994|   251k|  uint8_t uiTotalCoeff, uiTrailingOnes;
  995|   251k|  int32_t iUsedBits = 0;
  996|   251k|  intX_t iCurIdx   = pBs->iIndex;
  997|   251k|  uint8_t* pBuf     = ((uint8_t*)pBs->pStartBuf) + (iCurIdx >> 3);
  998|   251k|  bool  bChromaDc = (CHROMA_DC == iResidualProperty);
  ------------------
  |  |   73|   251k|#define CHROMA_DC    4
  ------------------
  999|   251k|  uint8_t bChroma   = (bChromaDc || CHROMA_AC == iResidualProperty);
  ------------------
  |  |   74|   251k|#define CHROMA_AC    5
  ------------------
  |  Branch (999:24): [True: 0, False: 251k]
  |  Branch (999:37): [True: 0, False: 251k]
  ------------------
 1000|   251k|  SReadBitsCache sReadBitsCache;
 1001|       |
 1002|   251k|  uint32_t uiCache32Bit = (uint32_t) ((((pBuf[0] << 8) | pBuf[1]) << 16) | (pBuf[2] << 8) | pBuf[3]);
 1003|   251k|  sReadBitsCache.uiCache32Bit = uiCache32Bit << (iCurIdx & 0x07);
 1004|   251k|  sReadBitsCache.uiRemainBits = 32 - (iCurIdx & 0x07);
 1005|   251k|  sReadBitsCache.pBuf = pBuf;
 1006|       |  //////////////////////////////////////////////////////////////////////////
 1007|       |
 1008|   251k|  if (bChroma) {
  ------------------
  |  Branch (1008:7): [True: 0, False: 251k]
  ------------------
 1009|      0|    iCurNonZeroCacheIdx = g_kuiCache48CountScan4Idx[iIndex];
 1010|      0|    nA = pNonZeroCountCache[iCurNonZeroCacheIdx - 1];
 1011|      0|    nB = pNonZeroCountCache[iCurNonZeroCacheIdx - 8];
 1012|   251k|  } else { //luma
 1013|   251k|    iCurNonZeroCacheIdx = g_kuiCache48CountScan4Idx[iIndex];
 1014|   251k|    nA = pNonZeroCountCache[iCurNonZeroCacheIdx - 1];
 1015|   251k|    nB = pNonZeroCountCache[iCurNonZeroCacheIdx - 8];
 1016|   251k|  }
 1017|       |
 1018|   251k|  WELS_NON_ZERO_COUNT_AVERAGE (nC, nA, nB);
  ------------------
  |  |  135|   251k|#define WELS_NON_ZERO_COUNT_AVERAGE(nC,nA,nB) {         \
  |  |  136|   251k|  nC = nA + nB + 1;                                     \
  |  |  137|   251k|  nC >>= (uint8_t)( nA != -1 && nB != -1);              \
  |  |  ------------------
  |  |  |  Branch (137:21): [True: 223k, False: 27.7k]
  |  |  |  Branch (137:33): [True: 187k, False: 36.1k]
  |  |  ------------------
  |  |  138|   251k|  nC += (uint8_t)(nA == -1 && nB == -1);                \
  |  |  ------------------
  |  |  |  Branch (138:19): [True: 27.7k, False: 223k]
  |  |  |  Branch (138:31): [True: 6.36k, False: 21.4k]
  |  |  ------------------
  |  |  139|   251k|}
  ------------------
 1019|       |
 1020|   251k|  iUsedBits += CavlcGetTrailingOnesAndTotalCoeff (uiTotalCoeff, uiTrailingOnes, &sReadBitsCache, pVlcTable, bChromaDc,
 1021|   251k|               nC);
 1022|       |
 1023|   251k|  if (iResidualProperty != CHROMA_DC && iResidualProperty != I16_LUMA_DC) {
  ------------------
  |  |   73|   503k|#define CHROMA_DC    4
  ------------------
                if (iResidualProperty != CHROMA_DC && iResidualProperty != I16_LUMA_DC) {
  ------------------
  |  |   70|   251k|#define I16_LUMA_DC  1
  ------------------
  |  Branch (1023:7): [True: 251k, False: 0]
  |  Branch (1023:41): [True: 251k, False: 0]
  ------------------
 1024|   251k|    pNonZeroCountCache[iCurNonZeroCacheIdx] = uiTotalCoeff;
 1025|       |    //////////////////////////////////////////////////////////////////////////
 1026|   251k|  }
 1027|   251k|  if (0 == uiTotalCoeff) {
  ------------------
  |  Branch (1027:7): [True: 185k, False: 66.2k]
  ------------------
 1028|   185k|    pBs->iIndex += iUsedBits;
 1029|   185k|    return ERR_NONE;
 1030|   185k|  }
 1031|  66.2k|  if ((uiTrailingOnes > 3) || (uiTotalCoeff > 16)) { /////////////////check uiTrailingOnes and uiTotalCoeff
  ------------------
  |  Branch (1031:7): [True: 0, False: 66.2k]
  |  Branch (1031:31): [True: 0, False: 66.2k]
  ------------------
 1032|      0|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_CAVLC_INVALID_TOTAL_COEFF_OR_TRAILING_ONES);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1033|      0|  }
 1034|  66.2k|  if ((i = CavlcGetLevelVal (iLevel, &sReadBitsCache, uiTotalCoeff, uiTrailingOnes)) == -1) {
  ------------------
  |  Branch (1034:7): [True: 2.32k, False: 63.9k]
  ------------------
 1035|  2.32k|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_CAVLC_INVALID_LEVEL);
  ------------------
  |  |   59|  2.32k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1036|  2.32k|  }
 1037|  63.9k|  iUsedBits += i;
 1038|  63.9k|  if (uiTotalCoeff < iMaxNumCoeff) {
  ------------------
  |  Branch (1038:7): [True: 63.3k, False: 603]
  ------------------
 1039|  63.3k|    iUsedBits += CavlcGetTotalZeros (iZerosLeft, &sReadBitsCache, uiTotalCoeff, pVlcTable, bChromaDc);
 1040|  63.3k|  } else {
 1041|    603|    iZerosLeft = 0;
 1042|    603|  }
 1043|       |
 1044|  63.9k|  if ((iZerosLeft < 0) || ((iZerosLeft + uiTotalCoeff) > iMaxNumCoeff)) {
  ------------------
  |  Branch (1044:7): [True: 0, False: 63.9k]
  |  Branch (1044:27): [True: 0, False: 63.9k]
  ------------------
 1045|      0|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_CAVLC_INVALID_ZERO_LEFT);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1046|      0|  }
 1047|  63.9k|  if ((i = CavlcGetRunBefore (iRun, &sReadBitsCache, uiTotalCoeff, pVlcTable, iZerosLeft)) == -1) {
  ------------------
  |  Branch (1047:7): [True: 3.05k, False: 60.8k]
  ------------------
 1048|  3.05k|    return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_CAVLC_INVALID_RUN_BEFORE);
  ------------------
  |  |   59|  3.05k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1049|  3.05k|  }
 1050|  60.8k|  iUsedBits += i;
 1051|  60.8k|  pBs->iIndex += iUsedBits;
 1052|  60.8k|  iCoeffNum = -1;
 1053|       |
 1054|   182k|  for (i = uiTotalCoeff - 1; i >= 0; --i) { //FIXME merge into  rundecode?
  ------------------
  |  Branch (1054:30): [True: 121k, False: 60.8k]
  ------------------
 1055|   121k|    int32_t j;
 1056|   121k|    iCoeffNum += iRun[i] + 1; //FIXME add 1 earlier ?
 1057|   121k|    j = (iCoeffNum << 2) + iIdx4x4;
 1058|   121k|    j          = kpZigzagTable[ j ];
 1059|   121k|    pTCoeff[j] = uiQp >= 36 ? ((iLevel[i] * kpDequantCoeff[j]) * (1 << (uiQp / 6 - 6)))
  ------------------
  |  Branch (1059:18): [True: 27.7k, False: 93.7k]
  ------------------
 1060|   121k|                 : ((iLevel[i] * kpDequantCoeff[j] + (1 << (5 - uiQp / 6))) >> (6 - uiQp / 6));
 1061|   121k|  }
 1062|       |
 1063|  60.8k|  return ERR_NONE;
 1064|  63.9k|}
_ZN7WelsDec14ParseInterInfoEPNS_21TagWelsDecoderContextEPA30_A2_sPA30_aPN10WelsCommon15TagBitStringAuxE:
 1067|  1.98M|                        PBitStringAux pBs) {
 1068|  1.98M|  PSlice pSlice                 = &pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer;
 1069|  1.98M|  PSliceHeader pSliceHeader     = &pSlice->sSliceHeaderExt.sSliceHeader;
 1070|  1.98M|  PPicture* ppRefPic = pCtx->sRefPic.pRefList[LIST_0];
 1071|  1.98M|  int32_t iRefCount[2];
 1072|  1.98M|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
 1073|  1.98M|  int32_t i, j;
 1074|  1.98M|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
 1075|  1.98M|  int32_t iMotionPredFlag[4];
 1076|  1.98M|  int16_t iMv[2];
 1077|  1.98M|  uint32_t uiCode;
 1078|  1.98M|  int32_t iCode;
 1079|  1.98M|  int16_t iMinVmv = pSliceHeader->pSps->pSLevelLimits->iMinVmv;
 1080|  1.98M|  int16_t iMaxVmv = pSliceHeader->pSps->pSLevelLimits->iMaxVmv;
 1081|  1.98M|  iMotionPredFlag[0] = iMotionPredFlag[1] = iMotionPredFlag[2] = iMotionPredFlag[3] =
 1082|  1.98M|                         pSlice->sSliceHeaderExt.bDefaultMotionPredFlag;
 1083|  1.98M|  iRefCount[0] = pSliceHeader->uiRefCount[0];
 1084|  1.98M|  iRefCount[1] = pSliceHeader->uiRefCount[1];
 1085|       |
 1086|  1.98M|  bool bIsPending = GetThreadCount (pCtx) > 1;
 1087|       |
 1088|  1.98M|  switch (pCurDqLayer->pDec->pMbType[iMbXy]) {
 1089|  1.87M|  case MB_TYPE_16x16: {
  ------------------
  |  |  278|  1.87M|#define MB_TYPE_16x16       0x00000008
  ------------------
  |  Branch (1089:3): [True: 1.87M, False: 108k]
  ------------------
 1090|  1.87M|    int32_t iRefIdx = 0;
 1091|  1.87M|    if (pSlice->sSliceHeaderExt.bAdaptiveMotionPredFlag) {
  ------------------
  |  Branch (1091:9): [True: 2.49k, False: 1.87M]
  ------------------
 1092|  2.49k|      WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //motion_prediction_flag_l0[ mbPartIdx ]
  ------------------
  |  |   52|  2.49k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.49k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.49k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 228, False: 2.27k]
  |  |  ------------------
  |  |   55|  2.49k|    return uiRetTmp; \
  |  |   56|  2.49k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.27k]
  |  |  ------------------
  ------------------
 1093|  2.27k|      iMotionPredFlag[0] = uiCode;
 1094|  2.27k|    }
 1095|  1.87M|    if (iMotionPredFlag[0] == 0) {
  ------------------
  |  Branch (1095:9): [True: 1.87M, False: 260]
  ------------------
 1096|  1.87M|      WELS_READ_VERIFY (BsGetTe0 (pBs, iRefCount[0], &uiCode)); //motion_prediction_flag_l1[ mbPartIdx ]
  ------------------
  |  |   52|  1.87M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.87M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.87M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 465, False: 1.87M]
  |  |  ------------------
  |  |   55|  1.87M|    return uiRetTmp; \
  |  |   56|  1.87M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.87M]
  |  |  ------------------
  ------------------
 1097|  1.87M|      iRefIdx = uiCode;
 1098|       |      // Security check: iRefIdx should be in range 0 to num_ref_idx_l0_active_minus1, includsive
 1099|       |      // ref to standard section 7.4.5.1. iRefCount[0] is 1 + num_ref_idx_l0_active_minus1.
 1100|  1.87M|      if ((iRefIdx < 0) || (iRefIdx >= iRefCount[0]) || (ppRefPic[iRefIdx] == NULL)) { //error ref_idx
  ------------------
  |  Branch (1100:11): [True: 0, False: 1.87M]
  |  Branch (1100:28): [True: 1.88k, False: 1.87M]
  |  Branch (1100:57): [True: 5.58k, False: 1.86M]
  ------------------
 1101|  7.46k|        pCtx->bMbRefConcealed = true;
 1102|  7.46k|        if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (1102:13): [True: 7.46k, False: 0]
  ------------------
 1103|  7.46k|          iRefIdx = 0;
 1104|  7.46k|          pCtx->iErrorCode |= dsBitstreamError;
 1105|  7.46k|        } else {
 1106|      0|          return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1107|      0|        }
 1108|  7.46k|      }
 1109|  1.87M|      pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPic[iRefIdx]
  ------------------
  |  Branch (1109:31): [True: 2.84k, False: 1.87M]
  |  Branch (1109:51): [True: 7.30k, False: 1.86M]
  |  Branch (1109:79): [True: 1.86M, False: 0]
  ------------------
 1110|  1.86M|                              && (ppRefPic[iRefIdx]->bIsComplete || bIsPending));
  ------------------
  |  Branch (1110:35): [True: 564, False: 1.86M]
  |  Branch (1110:69): [True: 0, False: 1.86M]
  ------------------
 1111|  1.87M|    } else {
 1112|    260|      WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "inter parse: iMotionPredFlag = 1 not supported. ");
 1113|    260|      return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_UNSUPPORTED_ILP);
  ------------------
  |  |   59|    260|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1114|    260|    }
 1115|  1.87M|    PredMv (iMvArray, iRefIdxArray, LIST_0, 0, 4, iRefIdx, iMv);
 1116|       |
 1117|  1.87M|    WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l0[ mbPartIdx ][ 0 ][ compIdx ]
  ------------------
  |  |   52|  1.87M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.87M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.87M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 50.3k, False: 1.82M]
  |  |  ------------------
  |  |   55|  1.87M|    return uiRetTmp; \
  |  |   56|  1.87M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.82M]
  |  |  ------------------
  ------------------
 1118|  1.82M|    iMv[0] += iCode;
 1119|  1.82M|    WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l1[ mbPartIdx ][ 0 ][ compIdx ]
  ------------------
  |  |   52|  1.82M|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.82M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.82M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.18M, False: 637k]
  |  |  ------------------
  |  |   55|  1.82M|    return uiRetTmp; \
  |  |   56|  1.82M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 637k]
  |  |  ------------------
  ------------------
 1120|   637k|    iMv[1] += iCode;
 1121|   637k|    WELS_CHECK_SE_BOTH_WARNING (iMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|   637k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|   637k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 2.13k, False: 635k]
  |  |  |  Branch (289:28): [True: 2.42k, False: 632k]
  |  |  ------------------
  |  |  290|  4.56k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  4.56k|}\
  |  |  292|   637k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 637k]
  |  |  ------------------
  ------------------
 1122|   637k|    UpdateP16x16MotionInfo (pCurDqLayer, LIST_0, iRefIdx, iMv);
 1123|   637k|  }
 1124|      0|  break;
 1125|  65.8k|  case MB_TYPE_16x8: {
  ------------------
  |  |  279|  65.8k|#define MB_TYPE_16x8        0x00000010
  ------------------
  |  Branch (1125:3): [True: 65.8k, False: 1.92M]
  ------------------
 1126|  65.8k|    int32_t iRefIdx[2];
 1127|   196k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1127:17): [True: 131k, False: 65.5k]
  ------------------
 1128|   131k|      if (pSlice->sSliceHeaderExt.bAdaptiveMotionPredFlag) {
  ------------------
  |  Branch (1128:11): [True: 1.56k, False: 129k]
  ------------------
 1129|  1.56k|        WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //motion_prediction_flag_l0[ mbPartIdx ]
  ------------------
  |  |   52|  1.56k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  1.56k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  1.56k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 278, False: 1.28k]
  |  |  ------------------
  |  |   55|  1.56k|    return uiRetTmp; \
  |  |   56|  1.56k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.28k]
  |  |  ------------------
  ------------------
 1130|  1.28k|        iMotionPredFlag[i] = uiCode;
 1131|  1.28k|      }
 1132|   131k|    }
 1133|       |
 1134|   170k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1134:17): [True: 118k, False: 51.6k]
  ------------------
 1135|   118k|      if (iMotionPredFlag[i]) {
  ------------------
  |  Branch (1135:11): [True: 255, False: 118k]
  ------------------
 1136|    255|        WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "inter parse: iMotionPredFlag = 1 not supported. ");
 1137|    255|        return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_UNSUPPORTED_ILP);
  ------------------
  |  |   59|    255|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1138|    255|      }
 1139|   118k|      WELS_READ_VERIFY (BsGetTe0 (pBs, iRefCount[0], &uiCode)); //ref_idx_l0[ mbPartIdx ]
  ------------------
  |  |   52|   118k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|   118k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   118k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 13.6k, False: 104k]
  |  |  ------------------
  |  |   55|   118k|    return uiRetTmp; \
  |  |   56|   118k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 104k]
  |  |  ------------------
  ------------------
 1140|   104k|      iRefIdx[i] = uiCode;
 1141|   104k|      if ((iRefIdx[i] < 0) || (iRefIdx[i] >= iRefCount[0]) || (ppRefPic[iRefIdx[i]] == NULL)) { //error ref_idx
  ------------------
  |  Branch (1141:11): [True: 0, False: 104k]
  |  Branch (1141:31): [True: 18.8k, False: 85.7k]
  |  Branch (1141:63): [True: 21.2k, False: 64.4k]
  ------------------
 1142|  40.1k|        pCtx->bMbRefConcealed = true;
 1143|  40.1k|        if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (1143:13): [True: 40.1k, False: 0]
  ------------------
 1144|  40.1k|          iRefIdx[i] = 0;
 1145|  40.1k|          pCtx->iErrorCode |= dsBitstreamError;
 1146|  40.1k|        } else {
 1147|      0|          return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1148|      0|        }
 1149|  40.1k|      }
 1150|   104k|      pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPic[iRefIdx[i]]
  ------------------
  |  Branch (1150:31): [True: 593, False: 104k]
  |  Branch (1150:51): [True: 72.2k, False: 31.8k]
  |  Branch (1150:79): [True: 31.8k, False: 0]
  ------------------
 1151|  31.8k|                              && (ppRefPic[iRefIdx[i]]->bIsComplete || bIsPending));
  ------------------
  |  Branch (1151:35): [True: 316, False: 31.4k]
  |  Branch (1151:72): [True: 0, False: 31.4k]
  ------------------
 1152|   104k|    }
 1153|   101k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1153:17): [True: 79.1k, False: 22.5k]
  ------------------
 1154|  79.1k|      PredInter16x8Mv (iMvArray, iRefIdxArray, LIST_0, i << 3, iRefIdx[i], iMv);
 1155|       |
 1156|  79.1k|      WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l0[ mbPartIdx ][ 0 ][ compIdx ]
  ------------------
  |  |   52|  79.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  79.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  79.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 25.5k, False: 53.5k]
  |  |  ------------------
  |  |   55|  79.1k|    return uiRetTmp; \
  |  |   56|  79.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 53.5k]
  |  |  ------------------
  ------------------
 1157|  53.5k|      iMv[0] += iCode;
 1158|  53.5k|      WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l1[ mbPartIdx ][ 0 ][ compIdx ]
  ------------------
  |  |   52|  53.5k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  53.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  53.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 3.56k, False: 49.9k]
  |  |  ------------------
  |  |   55|  53.5k|    return uiRetTmp; \
  |  |   56|  53.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 49.9k]
  |  |  ------------------
  ------------------
 1159|  49.9k|      iMv[1] += iCode;
 1160|  49.9k|      WELS_CHECK_SE_BOTH_WARNING (iMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|  49.9k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  49.9k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 582, False: 49.4k]
  |  |  |  Branch (289:28): [True: 1.11k, False: 48.2k]
  |  |  ------------------
  |  |  290|  1.70k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  1.70k|}\
  |  |  292|  49.9k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 49.9k]
  |  |  ------------------
  ------------------
 1161|  49.9k|      UpdateP16x8MotionInfo (pCurDqLayer, iMvArray, iRefIdxArray, LIST_0, i << 3, iRefIdx[i], iMv);
 1162|  49.9k|    }
 1163|  51.6k|  }
 1164|  22.5k|  break;
 1165|  31.3k|  case MB_TYPE_8x16: {
  ------------------
  |  |  280|  31.3k|#define MB_TYPE_8x16        0x00000020
  ------------------
  |  Branch (1165:3): [True: 31.3k, False: 1.95M]
  ------------------
 1166|  31.3k|    int32_t iRefIdx[2];
 1167|  93.6k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1167:17): [True: 62.4k, False: 31.1k]
  ------------------
 1168|  62.4k|      if (pSlice->sSliceHeaderExt.bAdaptiveMotionPredFlag) {
  ------------------
  |  Branch (1168:11): [True: 2.01k, False: 60.4k]
  ------------------
 1169|  2.01k|        WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //motion_prediction_flag_l0[ mbPartIdx ]
  ------------------
  |  |   52|  2.01k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.01k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.01k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 204, False: 1.81k]
  |  |  ------------------
  |  |   55|  2.01k|    return uiRetTmp; \
  |  |   56|  2.01k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.81k]
  |  |  ------------------
  ------------------
 1170|  1.81k|        iMotionPredFlag[i] = uiCode;
 1171|  1.81k|      }
 1172|  62.4k|    }
 1173|       |
 1174|  91.5k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1174:17): [True: 61.3k, False: 30.1k]
  ------------------
 1175|  61.3k|      if (iMotionPredFlag[i] == 0) {
  ------------------
  |  Branch (1175:11): [True: 61.1k, False: 217]
  ------------------
 1176|  61.1k|        WELS_READ_VERIFY (BsGetTe0 (pBs, iRefCount[0], &uiCode)); //ref_idx_l0[ mbPartIdx ]
  ------------------
  |  |   52|  61.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  61.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  61.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 723, False: 60.4k]
  |  |  ------------------
  |  |   55|  61.1k|    return uiRetTmp; \
  |  |   56|  61.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 60.4k]
  |  |  ------------------
  ------------------
 1177|  60.4k|        iRefIdx[i] = uiCode;
 1178|  60.4k|        if ((iRefIdx[i] < 0) || (iRefIdx[i] >= iRefCount[0]) || (ppRefPic[iRefIdx[i]] == NULL)) { //error ref_idx
  ------------------
  |  Branch (1178:13): [True: 0, False: 60.4k]
  |  Branch (1178:33): [True: 2.43k, False: 58.0k]
  |  Branch (1178:65): [True: 5.40k, False: 52.6k]
  ------------------
 1179|  7.84k|          pCtx->bMbRefConcealed = true;
 1180|  7.84k|          if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (1180:15): [True: 7.84k, False: 0]
  ------------------
 1181|  7.84k|            iRefIdx[i] = 0;
 1182|  7.84k|            pCtx->iErrorCode |= dsBitstreamError;
 1183|  7.84k|          } else {
 1184|      0|            return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1185|      0|          }
 1186|  7.84k|        }
 1187|  60.4k|        pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPic[iRefIdx[i]]
  ------------------
  |  Branch (1187:33): [True: 1.17k, False: 59.2k]
  |  Branch (1187:53): [True: 33.4k, False: 25.8k]
  |  Branch (1187:81): [True: 25.8k, False: 0]
  ------------------
 1188|  25.8k|                                && (ppRefPic[iRefIdx[i]]->bIsComplete || bIsPending));
  ------------------
  |  Branch (1188:37): [True: 358, False: 25.4k]
  |  Branch (1188:74): [True: 0, False: 25.4k]
  ------------------
 1189|  60.4k|      } else {
 1190|    217|        WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "inter parse: iMotionPredFlag = 1 not supported. ");
 1191|    217|        return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_UNSUPPORTED_ILP);
  ------------------
  |  |   59|    217|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1192|    217|      }
 1193|       |
 1194|  61.3k|    }
 1195|  73.3k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1195:17): [True: 54.1k, False: 19.1k]
  ------------------
 1196|  54.1k|      PredInter8x16Mv (iMvArray, iRefIdxArray, LIST_0, i << 2, iRefIdx[i], iMv);
 1197|       |
 1198|  54.1k|      WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l0[ mbPartIdx ][ 0 ][ compIdx ]
  ------------------
  |  |   52|  54.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  54.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  54.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 8.40k, False: 45.7k]
  |  |  ------------------
  |  |   55|  54.1k|    return uiRetTmp; \
  |  |   56|  54.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 45.7k]
  |  |  ------------------
  ------------------
 1199|  45.7k|      iMv[0] += iCode;
 1200|  45.7k|      WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l1[ mbPartIdx ][ 0 ][ compIdx ]
  ------------------
  |  |   52|  45.7k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  45.7k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  45.7k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.61k, False: 43.1k]
  |  |  ------------------
  |  |   55|  45.7k|    return uiRetTmp; \
  |  |   56|  45.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 43.1k]
  |  |  ------------------
  ------------------
 1201|  43.1k|      iMv[1] += iCode;
 1202|  43.1k|      WELS_CHECK_SE_BOTH_WARNING (iMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|  43.1k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  43.1k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 1.66k, False: 41.4k]
  |  |  |  Branch (289:28): [True: 1.41k, False: 40.0k]
  |  |  ------------------
  |  |  290|  3.07k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  3.07k|}\
  |  |  292|  43.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 43.1k]
  |  |  ------------------
  ------------------
 1203|  43.1k|      UpdateP8x16MotionInfo (pCurDqLayer, iMvArray, iRefIdxArray, LIST_0, i << 2, iRefIdx[i], iMv);
 1204|  43.1k|    }
 1205|  30.1k|  }
 1206|  19.1k|  break;
 1207|  19.1k|  case MB_TYPE_8x8:
  ------------------
  |  |  281|  6.69k|#define MB_TYPE_8x8         0x00000040
  ------------------
  |  Branch (1207:3): [True: 6.69k, False: 1.97M]
  ------------------
 1208|  11.1k|  case MB_TYPE_8x8_REF0: {
  ------------------
  |  |  282|  11.1k|#define MB_TYPE_8x8_REF0    0x00000080
  ------------------
  |  Branch (1208:3): [True: 4.45k, False: 1.98M]
  ------------------
 1209|  11.1k|    int32_t iRefIdx[4] = {0}, iSubPartCount[4], iPartWidth[4];
 1210|  11.1k|    uint32_t uiSubMbType;
 1211|       |
 1212|  11.1k|    if (MB_TYPE_8x8_REF0 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  282|  11.1k|#define MB_TYPE_8x8_REF0    0x00000080
  ------------------
  |  Branch (1212:9): [True: 4.45k, False: 6.69k]
  ------------------
 1213|  4.45k|      iRefCount[0] =
 1214|  4.45k|        iRefCount[1] = 1;
 1215|  4.45k|    }
 1216|       |
 1217|       |    //uiSubMbType, partition
 1218|  47.6k|    for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (1218:17): [True: 40.1k, False: 7.49k]
  ------------------
 1219|  40.1k|      WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //sub_mb_type[ mbPartIdx ]
  ------------------
  |  |   52|  40.1k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  40.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  40.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 828, False: 39.3k]
  |  |  ------------------
  |  |   55|  40.1k|    return uiRetTmp; \
  |  |   56|  40.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 39.3k]
  |  |  ------------------
  ------------------
 1220|  39.3k|      uiSubMbType = uiCode;
 1221|  39.3k|      if (uiSubMbType >= 4) { //invalid uiSubMbType
  ------------------
  |  Branch (1221:11): [True: 2.82k, False: 36.4k]
  ------------------
 1222|  2.82k|        return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_SUB_MB_TYPE);
  ------------------
  |  |   59|  2.82k|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1223|  2.82k|      }
 1224|  36.4k|      pCurDqLayer->pSubMbType[iMbXy][i] = g_ksInterPSubMbTypeInfo[uiSubMbType].iType;
 1225|  36.4k|      iSubPartCount[i] = g_ksInterPSubMbTypeInfo[uiSubMbType].iPartCount;
 1226|  36.4k|      iPartWidth[i] = g_ksInterPSubMbTypeInfo[uiSubMbType].iPartWidth;
 1227|       |
 1228|       |      // Need modification when B picture add in, reference to 7.3.5
 1229|  36.4k|      pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] &= (uiSubMbType == 0);
 1230|  36.4k|    }
 1231|       |
 1232|  7.49k|    if (pSlice->sSliceHeaderExt.bAdaptiveMotionPredFlag) {
  ------------------
  |  Branch (1232:9): [True: 1.37k, False: 6.11k]
  ------------------
 1233|  6.39k|      for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (1233:19): [True: 5.23k, False: 1.16k]
  ------------------
 1234|  5.23k|        WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //motion_prediction_flag_l0[ mbPartIdx ]
  ------------------
  |  |   52|  5.23k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  5.23k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  5.23k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 214, False: 5.02k]
  |  |  ------------------
  |  |   55|  5.23k|    return uiRetTmp; \
  |  |   56|  5.23k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 5.02k]
  |  |  ------------------
  ------------------
 1235|  5.02k|        iMotionPredFlag[i] = uiCode;
 1236|  5.02k|      }
 1237|  1.37k|    }
 1238|       |
 1239|       |    //iRefIdxArray
 1240|  7.27k|    if (MB_TYPE_8x8_REF0 == pCurDqLayer->pDec->pMbType[iMbXy]) {
  ------------------
  |  |  282|  7.27k|#define MB_TYPE_8x8_REF0    0x00000080
  ------------------
  |  Branch (1240:9): [True: 2.01k, False: 5.26k]
  ------------------
 1241|  2.01k|      memset (pCurDqLayer->pDec->pRefIndex[0][iMbXy], 0, 16);
 1242|  5.26k|    } else {
 1243|  23.1k|      for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (1243:19): [True: 19.0k, False: 4.08k]
  ------------------
 1244|  19.0k|        int16_t iIndex8 = i << 2;
 1245|  19.0k|        uint8_t uiScan4Idx = g_kuiScan4[iIndex8];
 1246|       |
 1247|  19.0k|        if (iMotionPredFlag[i] == 0) {
  ------------------
  |  Branch (1247:13): [True: 18.6k, False: 385]
  ------------------
 1248|  18.6k|          WELS_READ_VERIFY (BsGetTe0 (pBs, iRefCount[0], &uiCode)); //ref_idx_l0[ mbPartIdx ]
  ------------------
  |  |   52|  18.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  18.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  18.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 792, False: 17.8k]
  |  |  ------------------
  |  |   55|  18.6k|    return uiRetTmp; \
  |  |   56|  18.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 17.8k]
  |  |  ------------------
  ------------------
 1249|  17.8k|          iRefIdx[i] = uiCode;
 1250|  17.8k|          if ((iRefIdx[i] < 0) || (iRefIdx[i] >= iRefCount[0]) || (ppRefPic[iRefIdx[i]] == NULL)) { //error ref_idx
  ------------------
  |  Branch (1250:15): [True: 0, False: 17.8k]
  |  Branch (1250:35): [True: 1.19k, False: 16.6k]
  |  Branch (1250:67): [True: 3.93k, False: 12.7k]
  ------------------
 1251|  5.13k|            pCtx->bMbRefConcealed = true;
 1252|  5.13k|            if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (1252:17): [True: 5.13k, False: 0]
  ------------------
 1253|  5.13k|              iRefIdx[i] = 0;
 1254|  5.13k|              pCtx->iErrorCode |= dsBitstreamError;
 1255|  5.13k|            } else {
 1256|      0|              return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1257|      0|            }
 1258|  5.13k|          }
 1259|  17.8k|          pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPic[iRefIdx[i]]
  ------------------
  |  Branch (1259:35): [True: 964, False: 16.8k]
  |  Branch (1259:55): [True: 13.6k, False: 3.24k]
  |  Branch (1259:83): [True: 3.24k, False: 0]
  ------------------
 1260|  3.24k|                                  && (ppRefPic[iRefIdx[i]]->bIsComplete || bIsPending));
  ------------------
  |  Branch (1260:39): [True: 588, False: 2.65k]
  |  Branch (1260:76): [True: 0, False: 2.65k]
  ------------------
 1261|       |
 1262|  17.8k|          pCurDqLayer->pDec->pRefIndex[0][iMbXy][uiScan4Idx  ] = pCurDqLayer->pDec->pRefIndex[0][iMbXy][uiScan4Idx + 1] =
 1263|  17.8k|                pCurDqLayer->pDec->pRefIndex[0][iMbXy][uiScan4Idx + 4] = pCurDqLayer->pDec->pRefIndex[0][iMbXy][uiScan4Idx + 5] =
 1264|  17.8k|                      iRefIdx[i];
 1265|  17.8k|        } else {
 1266|    385|          WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "inter parse: iMotionPredFlag = 1 not supported. ");
 1267|    385|          return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_UNSUPPORTED_ILP);
  ------------------
  |  |   59|    385|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1268|    385|        }
 1269|  19.0k|      }
 1270|  5.26k|    }
 1271|       |
 1272|       |    //gain mv and update mv cache
 1273|  21.4k|    for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (1273:17): [True: 18.1k, False: 3.27k]
  ------------------
 1274|  18.1k|      int8_t iPartCount = iSubPartCount[i];
 1275|  18.1k|      uint32_t uiSubMbType = pCurDqLayer->pSubMbType[iMbXy][i];
 1276|  18.1k|      int16_t iMv[2], iPartIdx, iBlockWidth = iPartWidth[i], iIdx = i << 2;
 1277|  18.1k|      uint8_t uiScan4Idx, uiCacheIdx;
 1278|       |
 1279|  18.1k|      uint8_t uiIdx4Cache = g_kuiCache30ScanIdx[iIdx];
 1280|       |
 1281|  18.1k|      iRefIdxArray[0][uiIdx4Cache  ] = iRefIdxArray[0][uiIdx4Cache + 1] =
 1282|  18.1k|                                         iRefIdxArray[0][uiIdx4Cache + 6] = iRefIdxArray[0][uiIdx4Cache + 7] = iRefIdx[i];
 1283|       |
 1284|  43.6k|      for (j = 0; j < iPartCount; j++) {
  ------------------
  |  Branch (1284:19): [True: 28.3k, False: 15.3k]
  ------------------
 1285|  28.3k|        iPartIdx = iIdx + j * iBlockWidth;
 1286|  28.3k|        uiScan4Idx = g_kuiScan4[iPartIdx];
 1287|  28.3k|        uiCacheIdx = g_kuiCache30ScanIdx[iPartIdx];
 1288|  28.3k|        PredMv (iMvArray, iRefIdxArray, LIST_0, iPartIdx, iBlockWidth, iRefIdx[i], iMv);
 1289|       |
 1290|  28.3k|        WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l0[ mbPartIdx ][ subMbPartIdx ][ compIdx ]
  ------------------
  |  |   52|  28.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  28.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  28.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 2.03k, False: 26.3k]
  |  |  ------------------
  |  |   55|  28.3k|    return uiRetTmp; \
  |  |   56|  28.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 26.3k]
  |  |  ------------------
  ------------------
 1291|  26.3k|        iMv[0] += iCode;
 1292|  26.3k|        WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l1[ mbPartIdx ][ subMbPartIdx ][ compIdx ]
  ------------------
  |  |   52|  26.3k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  26.3k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  26.3k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 798, False: 25.5k]
  |  |  ------------------
  |  |   55|  26.3k|    return uiRetTmp; \
  |  |   56|  26.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 25.5k]
  |  |  ------------------
  ------------------
 1293|  25.5k|        iMv[1] += iCode;
 1294|  25.5k|        WELS_CHECK_SE_BOTH_WARNING (iMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|  25.5k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  25.5k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 760, False: 24.7k]
  |  |  |  Branch (289:28): [True: 1.35k, False: 23.4k]
  |  |  ------------------
  |  |  290|  2.11k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  2.11k|}\
  |  |  292|  25.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 25.5k]
  |  |  ------------------
  ------------------
 1295|  25.5k|        if (SUB_MB_TYPE_8x8 == uiSubMbType) {
  ------------------
  |  |  294|  25.5k|#define SUB_MB_TYPE_8x8     0x00000001
  ------------------
  |  Branch (1295:13): [True: 9.27k, False: 16.2k]
  ------------------
 1296|  9.27k|          ST32 (pCurDqLayer->pDec->pMv[0][iMbXy][uiScan4Idx], LD32 (iMv));
  ------------------
  |  |   67|  9.27k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1297|  9.27k|          ST32 (pCurDqLayer->pDec->pMv[0][iMbXy][uiScan4Idx + 1], LD32 (iMv));
  ------------------
  |  |   67|  9.27k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1298|  9.27k|          ST32 (pCurDqLayer->pDec->pMv[0][iMbXy][uiScan4Idx + 4], LD32 (iMv));
  ------------------
  |  |   67|  9.27k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1299|  9.27k|          ST32 (pCurDqLayer->pDec->pMv[0][iMbXy][uiScan4Idx + 5], LD32 (iMv));
  ------------------
  |  |   67|  9.27k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1300|  9.27k|          ST32 (iMvArray[0][uiCacheIdx  ], LD32 (iMv));
  ------------------
  |  |   67|  9.27k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1301|  9.27k|          ST32 (iMvArray[0][uiCacheIdx + 1], LD32 (iMv));
  ------------------
  |  |   67|  9.27k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1302|  9.27k|          ST32 (iMvArray[0][uiCacheIdx + 6], LD32 (iMv));
  ------------------
  |  |   67|  9.27k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1303|  9.27k|          ST32 (iMvArray[0][uiCacheIdx + 7], LD32 (iMv));
  ------------------
  |  |   67|  9.27k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1304|  16.2k|        } else if (SUB_MB_TYPE_8x4 == uiSubMbType) {
  ------------------
  |  |  295|  16.2k|#define SUB_MB_TYPE_8x4     0x00000002
  ------------------
  |  Branch (1304:20): [True: 4.07k, False: 12.1k]
  ------------------
 1305|  4.07k|          ST32 (pCurDqLayer->pDec->pMv[0][iMbXy][uiScan4Idx  ], LD32 (iMv));
  ------------------
  |  |   67|  4.07k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1306|  4.07k|          ST32 (pCurDqLayer->pDec->pMv[0][iMbXy][uiScan4Idx + 1], LD32 (iMv));
  ------------------
  |  |   67|  4.07k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1307|  4.07k|          ST32 (iMvArray[0][uiCacheIdx  ], LD32 (iMv));
  ------------------
  |  |   67|  4.07k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1308|  4.07k|          ST32 (iMvArray[0][uiCacheIdx + 1], LD32 (iMv));
  ------------------
  |  |   67|  4.07k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1309|  12.1k|        } else if (SUB_MB_TYPE_4x8 == uiSubMbType) {
  ------------------
  |  |  296|  12.1k|#define SUB_MB_TYPE_4x8     0x00000004
  ------------------
  |  Branch (1309:20): [True: 5.68k, False: 6.49k]
  ------------------
 1310|  5.68k|          ST32 (pCurDqLayer->pDec->pMv[0][iMbXy][uiScan4Idx  ], LD32 (iMv));
  ------------------
  |  |   67|  5.68k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1311|  5.68k|          ST32 (pCurDqLayer->pDec->pMv[0][iMbXy][uiScan4Idx + 4], LD32 (iMv));
  ------------------
  |  |   67|  5.68k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1312|  5.68k|          ST32 (iMvArray[0][uiCacheIdx  ], LD32 (iMv));
  ------------------
  |  |   67|  5.68k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1313|  5.68k|          ST32 (iMvArray[0][uiCacheIdx + 6], LD32 (iMv));
  ------------------
  |  |   67|  5.68k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1314|  6.49k|        } else { //SUB_MB_TYPE_4x4 == uiSubMbType
 1315|  6.49k|          ST32 (pCurDqLayer->pDec->pMv[0][iMbXy][uiScan4Idx  ], LD32 (iMv));
  ------------------
  |  |   67|  6.49k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1316|  6.49k|          ST32 (iMvArray[0][uiCacheIdx  ], LD32 (iMv));
  ------------------
  |  |   67|  6.49k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1317|  6.49k|        }
 1318|  25.5k|      }
 1319|  18.1k|    }
 1320|  6.10k|  }
 1321|  3.27k|  break;
 1322|  3.27k|  default:
  ------------------
  |  Branch (1322:3): [True: 0, False: 1.98M]
  ------------------
 1323|      0|    break;
 1324|  1.98M|  }
 1325|       |
 1326|   682k|  return ERR_NONE;
 1327|  1.98M|}
_ZN7WelsDec15ParseInterBInfoEPNS_21TagWelsDecoderContextEPA30_A2_sPA30_aPN10WelsCommon15TagBitStringAuxE:
 1329|   233k|                         int8_t iRefIdxArray[LIST_A][30], PBitStringAux pBs) {
 1330|   233k|  PSlice pSlice = &pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer;
 1331|   233k|  PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
 1332|   233k|  PPicture* ppRefPic[2];
 1333|   233k|  ppRefPic[LIST_0] = pCtx->sRefPic.pRefList[LIST_0];
 1334|   233k|  ppRefPic[LIST_1] = pCtx->sRefPic.pRefList[LIST_1];
 1335|   233k|  int8_t ref_idx_list[LIST_A][4];
 1336|   233k|  int8_t iRef[2] = { 0, 0 };
 1337|   233k|  int32_t iRefCount[2];
 1338|   233k|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
 1339|   233k|  int32_t iMbXy = pCurDqLayer->iMbXyIndex;
 1340|   233k|  uint8_t iMotionPredFlag[LIST_A][4];
 1341|   233k|  int16_t iMv[2];
 1342|   233k|  uint32_t uiCode;
 1343|   233k|  int32_t iCode;
 1344|   233k|  int16_t iMinVmv = pSliceHeader->pSps->pSLevelLimits->iMinVmv;
 1345|   233k|  int16_t iMaxVmv = pSliceHeader->pSps->pSLevelLimits->iMaxVmv;
 1346|   233k|  memset (ref_idx_list, -1, LIST_A * 4);
 1347|   233k|  memset (iMotionPredFlag, (pSlice->sSliceHeaderExt.bDefaultMotionPredFlag ? 1 : 0), LIST_A * 4);
  ------------------
  |  Branch (1347:29): [True: 4, False: 233k]
  ------------------
 1348|   233k|  iRefCount[0] = pSliceHeader->uiRefCount[0];
 1349|   233k|  iRefCount[1] = pSliceHeader->uiRefCount[1];
 1350|       |
 1351|   233k|  bool bIsPending = GetThreadCount (pCtx) > 1;
 1352|       |
 1353|   233k|  MbType mbType = pCurDqLayer->pDec->pMbType[iMbXy];
 1354|   233k|  if (IS_DIRECT (mbType)) {
  ------------------
  |  |  316|   233k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|   233k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  |  |  |  Branch (316:25): [True: 152k, False: 81.3k]
  |  |  ------------------
  ------------------
 1355|       |
 1356|   152k|    int16_t pMvDirect[LIST_A][2] = { { 0, 0 }, { 0, 0 } };
 1357|   152k|    SubMbType subMbType;
 1358|   152k|    if (pSliceHeader->iDirectSpatialMvPredFlag) {
  ------------------
  |  Branch (1358:9): [True: 50.8k, False: 101k]
  ------------------
 1359|       |      //predict direct spatial mv
 1360|  50.8k|      int32_t ret = PredMvBDirectSpatial (pCtx, pMvDirect, iRef, subMbType);
 1361|  50.8k|      if (ret != ERR_NONE) {
  ------------------
  |  Branch (1361:11): [True: 544, False: 50.2k]
  ------------------
 1362|    544|        return ret;
 1363|    544|      }
 1364|   101k|    } else {
 1365|       |      //temporal direct 16x16 mode
 1366|   101k|      int32_t ret = PredBDirectTemporal (pCtx, pMvDirect, iRef, subMbType);
 1367|   101k|      if (ret != ERR_NONE) {
  ------------------
  |  Branch (1367:11): [True: 1.02k, False: 100k]
  ------------------
 1368|  1.02k|        return ret;
 1369|  1.02k|      }
 1370|   101k|    }
 1371|   152k|  } else if (IS_INTER_16x16 (mbType)) {
  ------------------
  |  |  307|  81.3k|#define IS_INTER_16x16(type) ( (type)&MB_TYPE_16x16 )
  |  |  ------------------
  |  |  |  |  278|  81.3k|#define MB_TYPE_16x16       0x00000008
  |  |  ------------------
  |  |  |  Branch (307:30): [True: 39.7k, False: 41.5k]
  |  |  ------------------
  ------------------
 1372|  39.7k|    if (pSlice->sSliceHeaderExt.bAdaptiveMotionPredFlag) {
  ------------------
  |  Branch (1372:9): [True: 3.25k, False: 36.4k]
  ------------------
 1373|  7.58k|      for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (1373:38): [True: 5.43k, False: 2.15k]
  ------------------
 1374|  5.43k|        if (IS_DIR (mbType, 0, listIdx)) {
  ------------------
  |  |  312|  5.43k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  5.43k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 3.87k, False: 1.56k]
  |  |  ------------------
  ------------------
 1375|  3.87k|          WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //motion_prediction_flag_l0/l1[ mbPartIdx ]
  ------------------
  |  |   52|  3.87k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  3.87k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.87k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.10k, False: 2.76k]
  |  |  ------------------
  |  |   55|  3.87k|    return uiRetTmp; \
  |  |   56|  3.87k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.76k]
  |  |  ------------------
  ------------------
 1376|  2.76k|          iMotionPredFlag[listIdx][0] = uiCode;
 1377|  2.76k|        }
 1378|  5.43k|      }
 1379|  3.25k|    }
 1380|   112k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (1380:36): [True: 75.9k, False: 36.7k]
  ------------------
 1381|  75.9k|      if (IS_DIR (mbType, 0, listIdx)) {
  ------------------
  |  |  312|  75.9k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  75.9k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 44.4k, False: 31.5k]
  |  |  ------------------
  ------------------
 1382|  44.4k|        if (iMotionPredFlag[listIdx][0] == 0) {
  ------------------
  |  Branch (1382:13): [True: 44.2k, False: 221]
  ------------------
 1383|  44.2k|          WELS_READ_VERIFY (BsGetTe0 (pBs, iRefCount[listIdx], &uiCode)); //motion_prediction_flag_l1[ mbPartIdx ]
  ------------------
  |  |   52|  44.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  44.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  44.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 943, False: 43.2k]
  |  |  ------------------
  |  |   55|  44.2k|    return uiRetTmp; \
  |  |   56|  44.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 43.2k]
  |  |  ------------------
  ------------------
 1384|  43.2k|          ref_idx_list[listIdx][0] = uiCode;
 1385|       |          // Security check: iRefIdx should be in range 0 to num_ref_idx_l0_active_minus1, includsive
 1386|       |          // ref to standard section 7.4.5.1. iRefCount[0] is 1 + num_ref_idx_l0_active_minus1.
 1387|  43.2k|          if ((ref_idx_list[listIdx][0] < 0) || (ref_idx_list[listIdx][0] >= iRefCount[listIdx])
  ------------------
  |  Branch (1387:15): [True: 241, False: 43.0k]
  |  Branch (1387:49): [True: 2.08k, False: 40.9k]
  ------------------
 1388|  40.9k|              || (ppRefPic[listIdx][ref_idx_list[listIdx][0]] == NULL)) { //error ref_idx
  ------------------
  |  Branch (1388:18): [True: 4.36k, False: 36.5k]
  ------------------
 1389|  6.68k|            pCtx->bMbRefConcealed = true;
 1390|  6.68k|            if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (1390:17): [True: 6.68k, False: 0]
  ------------------
 1391|  6.68k|              ref_idx_list[listIdx][0] = 0;
 1392|  6.68k|              pCtx->iErrorCode |= dsBitstreamError;
 1393|  6.68k|              RETURN_ERR_IF_NULL(ppRefPic[listIdx][ref_idx_list[listIdx][0]]);
  ------------------
  |  |   47|  6.68k|#define RETURN_ERR_IF_NULL(pRefPic0) \
  |  |   48|  6.68k|if ( pRefPic0 == NULL) \
  |  |  ------------------
  |  |  |  Branch (48:6): [True: 724, False: 5.96k]
  |  |  ------------------
  |  |   49|  6.68k|  return GENERATE_ERROR_NO(ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX)
  |  |  ------------------
  |  |  |  |   59|    724|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  |  |  ------------------
  ------------------
 1394|  6.68k|            } else {
 1395|      0|              return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1396|      0|            }
 1397|  6.68k|          }
 1398|  42.5k|          pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPic[listIdx][ref_idx_list[listIdx][0]]
  ------------------
  |  Branch (1398:35): [True: 2.64k, False: 39.8k]
  |  Branch (1398:55): [True: 10.2k, False: 29.6k]
  |  Branch (1398:83): [True: 29.6k, False: 0]
  ------------------
 1399|  29.6k|                                  && (ppRefPic[listIdx][ref_idx_list[listIdx][0]]->bIsComplete || bIsPending));
  ------------------
  |  Branch (1399:39): [True: 367, False: 29.3k]
  |  Branch (1399:99): [True: 0, False: 29.3k]
  ------------------
 1400|  42.5k|        } else {
 1401|    221|          WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "inter parse: iMotionPredFlag = 1 not supported. ");
 1402|    221|          return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_UNSUPPORTED_ILP);
  ------------------
  |  |   59|    221|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1403|    221|        }
 1404|  44.4k|      }
 1405|  75.9k|    }
 1406|   106k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (1406:36): [True: 71.8k, False: 34.2k]
  ------------------
 1407|  71.8k|      if (IS_DIR (mbType, 0, listIdx)) {
  ------------------
  |  |  312|  71.8k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  71.8k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 42.2k, False: 29.5k]
  |  |  ------------------
  ------------------
 1408|  42.2k|        PredMv (iMvArray, iRefIdxArray, listIdx, 0, 4, ref_idx_list[listIdx][0], iMv);
 1409|  42.2k|        WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l0[ mbPartIdx ][ 0 ][ compIdx ]
  ------------------
  |  |   52|  42.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  42.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  42.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 1.73k, False: 40.5k]
  |  |  ------------------
  |  |   55|  42.2k|    return uiRetTmp; \
  |  |   56|  42.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 40.5k]
  |  |  ------------------
  ------------------
 1410|  40.5k|        iMv[0] += iCode;
 1411|  40.5k|        WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l1[ mbPartIdx ][ 0 ][ compIdx ]
  ------------------
  |  |   52|  40.5k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  40.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  40.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 770, False: 39.7k]
  |  |  ------------------
  |  |   55|  40.5k|    return uiRetTmp; \
  |  |   56|  40.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 39.7k]
  |  |  ------------------
  ------------------
 1412|  39.7k|        iMv[1] += iCode;
 1413|  39.7k|        WELS_CHECK_SE_BOTH_WARNING (iMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|  39.7k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  39.7k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 1.44k, False: 38.3k]
  |  |  |  Branch (289:28): [True: 1.28k, False: 37.0k]
  |  |  ------------------
  |  |  290|  2.73k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  2.73k|}\
  |  |  292|  39.7k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 39.7k]
  |  |  ------------------
  ------------------
 1414|  39.7k|      } else {
 1415|  29.5k|        * (uint32_t*)iMv = 0;
 1416|  29.5k|      }
 1417|  69.3k|      UpdateP16x16MotionInfo (pCurDqLayer, listIdx, ref_idx_list[listIdx][0], iMv);
 1418|  69.3k|    }
 1419|  41.5k|  } else if (IS_INTER_16x8 (mbType)) {
  ------------------
  |  |  308|  41.5k|#define IS_INTER_16x8(type) ( (type)&MB_TYPE_16x8 )
  |  |  ------------------
  |  |  |  |  279|  41.5k|#define MB_TYPE_16x8        0x00000010
  |  |  ------------------
  |  |  |  Branch (308:29): [True: 15.1k, False: 26.4k]
  |  |  ------------------
  ------------------
 1420|  15.1k|    if (pSlice->sSliceHeaderExt.bAdaptiveMotionPredFlag) {
  ------------------
  |  Branch (1420:9): [True: 1.15k, False: 13.9k]
  ------------------
 1421|  3.22k|      for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (1421:38): [True: 2.30k, False: 917]
  ------------------
 1422|  6.44k|        for (int32_t i = 0; i < 2; ++i) {
  ------------------
  |  Branch (1422:29): [True: 4.37k, False: 2.06k]
  ------------------
 1423|  4.37k|          if (IS_DIR (mbType, i, listIdx)) {
  ------------------
  |  |  312|  4.37k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  4.37k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 2.10k, False: 2.27k]
  |  |  ------------------
  ------------------
 1424|  2.10k|            WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //motion_prediction_flag_l0/l1[ mbPartIdx ]
  ------------------
  |  |   52|  2.10k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.10k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.10k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 238, False: 1.86k]
  |  |  ------------------
  |  |   55|  2.10k|    return uiRetTmp; \
  |  |   56|  2.10k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 1.86k]
  |  |  ------------------
  ------------------
 1425|  1.86k|            iMotionPredFlag[listIdx][i] = uiCode;
 1426|  1.86k|          }
 1427|  4.37k|        }
 1428|  2.30k|      }
 1429|  1.15k|    }
 1430|  42.8k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (1430:36): [True: 29.0k, False: 13.7k]
  ------------------
 1431|  85.2k|      for (int32_t i = 0; i < 2; ++i) {
  ------------------
  |  Branch (1431:27): [True: 57.2k, False: 27.9k]
  ------------------
 1432|  57.2k|        if (IS_DIR (mbType, i, listIdx)) {
  ------------------
  |  |  312|  57.2k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  57.2k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 33.5k, False: 23.7k]
  |  |  ------------------
  ------------------
 1433|  33.5k|          if (iMotionPredFlag[listIdx][i] == 0) {
  ------------------
  |  Branch (1433:15): [True: 33.2k, False: 288]
  ------------------
 1434|  33.2k|            WELS_READ_VERIFY (BsGetTe0 (pBs, iRefCount[listIdx], &uiCode)); //motion_prediction_flag_l1[ mbPartIdx ]
  ------------------
  |  |   52|  33.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  33.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  33.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 562, False: 32.7k]
  |  |  ------------------
  |  |   55|  33.2k|    return uiRetTmp; \
  |  |   56|  33.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 32.7k]
  |  |  ------------------
  ------------------
 1435|  32.7k|            int32_t iRefIdx = uiCode;
 1436|       |            // Security check: iRefIdx should be in range 0 to num_ref_idx_l0_active_minus1, includsive
 1437|       |            // ref to standard section 7.4.5.1. iRefCount[0] is 1 + num_ref_idx_l0_active_minus1.
 1438|  32.7k|            if ((iRefIdx < 0) || (iRefIdx >= iRefCount[listIdx]) || (ppRefPic[listIdx][iRefIdx] == NULL)) { //error ref_idx
  ------------------
  |  Branch (1438:17): [True: 0, False: 32.7k]
  |  Branch (1438:34): [True: 3.33k, False: 29.3k]
  |  Branch (1438:69): [True: 3.97k, False: 25.4k]
  ------------------
 1439|  7.30k|              pCtx->bMbRefConcealed = true;
 1440|  7.30k|              if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (1440:19): [True: 7.30k, False: 0]
  ------------------
 1441|  7.30k|                iRefIdx = 0;
 1442|  7.30k|                pCtx->iErrorCode |= dsBitstreamError;
 1443|  7.30k|                RETURN_ERR_IF_NULL(ppRefPic[listIdx][iRefIdx]);
  ------------------
  |  |   47|  7.30k|#define RETURN_ERR_IF_NULL(pRefPic0) \
  |  |   48|  7.30k|if ( pRefPic0 == NULL) \
  |  |  ------------------
  |  |  |  Branch (48:6): [True: 255, False: 7.05k]
  |  |  ------------------
  |  |   49|  7.30k|  return GENERATE_ERROR_NO(ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX)
  |  |  ------------------
  |  |  |  |   59|    255|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  |  |  ------------------
  ------------------
 1444|  7.30k|              } else {
 1445|      0|                return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1446|      0|              }
 1447|  7.30k|            }
 1448|  32.4k|            ref_idx_list[listIdx][i] = iRefIdx;
 1449|  32.4k|            pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPic[listIdx][iRefIdx]
  ------------------
  |  Branch (1449:37): [True: 3.68k, False: 28.7k]
  |  Branch (1449:57): [True: 17.8k, False: 10.9k]
  |  Branch (1449:85): [True: 10.9k, False: 0]
  ------------------
 1450|  10.9k|                                    && (ppRefPic[listIdx][iRefIdx]->bIsComplete || bIsPending));
  ------------------
  |  Branch (1450:41): [True: 681, False: 10.3k]
  |  Branch (1450:84): [True: 0, False: 10.3k]
  ------------------
 1451|  32.4k|          } else {
 1452|    288|            WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "inter parse: iMotionPredFlag = 1 not supported. ");
 1453|    288|            return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_UNSUPPORTED_ILP);
  ------------------
  |  |   59|    288|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1454|    288|          }
 1455|  33.5k|        }
 1456|  57.2k|      }
 1457|  29.0k|    }
 1458|       |    // Read mvd_L0 then mvd_L1
 1459|  38.4k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (1459:36): [True: 26.2k, False: 12.1k]
  ------------------
 1460|       |      // Partitions
 1461|  76.0k|      for (int32_t i = 0; i < 2; i++) {
  ------------------
  |  Branch (1461:27): [True: 51.3k, False: 24.6k]
  ------------------
 1462|  51.3k|        int iPartIdx = i << 3;
 1463|  51.3k|        int32_t iRefIdx = ref_idx_list[listIdx][i];
 1464|  51.3k|        if (IS_DIR (mbType, i, listIdx)) {
  ------------------
  |  |  312|  51.3k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  51.3k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 30.6k, False: 20.7k]
  |  |  ------------------
  ------------------
 1465|  30.6k|          PredInter16x8Mv (iMvArray, iRefIdxArray, listIdx, iPartIdx, iRefIdx, iMv);
 1466|       |
 1467|  30.6k|          WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l{0,1}[ mbPartIdx ][ listIdx ][x]
  ------------------
  |  |   52|  30.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  30.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  30.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 939, False: 29.6k]
  |  |  ------------------
  |  |   55|  30.6k|    return uiRetTmp; \
  |  |   56|  30.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 29.6k]
  |  |  ------------------
  ------------------
 1468|  29.6k|          iMv[0] += iCode;
 1469|  29.6k|          WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l{0,1}[ mbPartIdx ][ listIdx ][y]
  ------------------
  |  |   52|  29.6k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  29.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  29.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 624, False: 29.0k]
  |  |  ------------------
  |  |   55|  29.6k|    return uiRetTmp; \
  |  |   56|  29.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 29.0k]
  |  |  ------------------
  ------------------
 1470|  29.0k|          iMv[1] += iCode;
 1471|       |
 1472|  29.0k|          WELS_CHECK_SE_BOTH_WARNING (iMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|  29.0k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  29.0k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 2.52k, False: 26.5k]
  |  |  |  Branch (289:28): [True: 1.13k, False: 25.4k]
  |  |  ------------------
  |  |  290|  3.65k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  3.65k|}\
  |  |  292|  29.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 29.0k]
  |  |  ------------------
  ------------------
 1473|  29.0k|        } else {
 1474|  20.7k|          * (uint32_t*)iMv = 0;
 1475|  20.7k|        }
 1476|  49.8k|        UpdateP16x8MotionInfo (pCurDqLayer, iMvArray, iRefIdxArray, listIdx, iPartIdx, iRefIdx, iMv);
 1477|  49.8k|      }
 1478|  26.2k|    }
 1479|  26.4k|  } else if (IS_INTER_8x16 (mbType)) {
  ------------------
  |  |  309|  26.4k|#define IS_INTER_8x16(type) ( (type)&MB_TYPE_8x16 )
  |  |  ------------------
  |  |  |  |  280|  26.4k|#define MB_TYPE_8x16        0x00000020
  |  |  ------------------
  |  |  |  Branch (309:29): [True: 15.4k, False: 11.0k]
  |  |  ------------------
  ------------------
 1480|  15.4k|    if (pSlice->sSliceHeaderExt.bAdaptiveMotionPredFlag) {
  ------------------
  |  Branch (1480:9): [True: 1.46k, False: 13.9k]
  ------------------
 1481|  3.53k|      for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (1481:38): [True: 2.50k, False: 1.02k]
  ------------------
 1482|  7.08k|        for (int32_t i = 0; i < 2; ++i) {
  ------------------
  |  Branch (1482:29): [True: 5.01k, False: 2.07k]
  ------------------
 1483|  5.01k|          if (IS_DIR (mbType, i, listIdx)) {
  ------------------
  |  |  312|  5.01k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  5.01k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 2.88k, False: 2.13k]
  |  |  ------------------
  ------------------
 1484|  2.88k|            WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //motion_prediction_flag_l0/l1[ mbPartIdx ]
  ------------------
  |  |   52|  2.88k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  2.88k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  2.88k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 438, False: 2.44k]
  |  |  ------------------
  |  |   55|  2.88k|    return uiRetTmp; \
  |  |   56|  2.88k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 2.44k]
  |  |  ------------------
  ------------------
 1485|  2.44k|            iMotionPredFlag[listIdx][i] = uiCode;
 1486|  2.44k|          }
 1487|  5.01k|        }
 1488|  2.50k|      }
 1489|  1.46k|    }
 1490|  42.1k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (1490:36): [True: 28.6k, False: 13.5k]
  ------------------
 1491|  83.8k|      for (int32_t i = 0; i < 2; ++i) {
  ------------------
  |  Branch (1491:27): [True: 56.7k, False: 27.1k]
  ------------------
 1492|  56.7k|        if (IS_DIR (mbType, i, listIdx)) {
  ------------------
  |  |  312|  56.7k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  56.7k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 35.5k, False: 21.1k]
  |  |  ------------------
  ------------------
 1493|  35.5k|          if (iMotionPredFlag[listIdx][i] == 0) {
  ------------------
  |  Branch (1493:15): [True: 35.2k, False: 290]
  ------------------
 1494|  35.2k|            WELS_READ_VERIFY (BsGetTe0 (pBs, iRefCount[listIdx], &uiCode)); //motion_prediction_flag_l1[ mbPartIdx ]
  ------------------
  |  |   52|  35.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  35.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  35.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 710, False: 34.5k]
  |  |  ------------------
  |  |   55|  35.2k|    return uiRetTmp; \
  |  |   56|  35.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 34.5k]
  |  |  ------------------
  ------------------
 1495|  34.5k|            int32_t iRefIdx = uiCode;
 1496|       |            // Security check: iRefIdx should be in range 0 to num_ref_idx_l0_active_minus1, includsive
 1497|       |            // ref to standard section 7.4.5.1. iRefCount[0] is 1 + num_ref_idx_l0_active_minus1.
 1498|  34.5k|            if ((iRefIdx < 0) || (iRefIdx >= iRefCount[listIdx]) || (ppRefPic[listIdx][iRefIdx] == NULL)) { //error ref_idx
  ------------------
  |  Branch (1498:17): [True: 0, False: 34.5k]
  |  Branch (1498:34): [True: 1.26k, False: 33.2k]
  |  Branch (1498:69): [True: 4.64k, False: 28.6k]
  ------------------
 1499|  5.90k|              pCtx->bMbRefConcealed = true;
 1500|  5.90k|              if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (1500:19): [True: 5.90k, False: 0]
  ------------------
 1501|  5.90k|                iRefIdx = 0;
 1502|  5.90k|                pCtx->iErrorCode |= dsBitstreamError;
 1503|  5.90k|                RETURN_ERR_IF_NULL(ppRefPic[listIdx][iRefIdx]);
  ------------------
  |  |   47|  5.90k|#define RETURN_ERR_IF_NULL(pRefPic0) \
  |  |   48|  5.90k|if ( pRefPic0 == NULL) \
  |  |  ------------------
  |  |  |  Branch (48:6): [True: 448, False: 5.45k]
  |  |  ------------------
  |  |   49|  5.90k|  return GENERATE_ERROR_NO(ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX)
  |  |  ------------------
  |  |  |  |   59|    448|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  |  |  ------------------
  ------------------
 1504|  5.90k|              } else {
 1505|      0|                return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1506|      0|              }
 1507|  5.90k|            }
 1508|  34.0k|            ref_idx_list[listIdx][i] = iRefIdx;
 1509|  34.0k|            pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPic[listIdx][iRefIdx]
  ------------------
  |  Branch (1509:37): [True: 1.99k, False: 32.0k]
  |  Branch (1509:57): [True: 21.2k, False: 10.8k]
  |  Branch (1509:85): [True: 10.8k, False: 0]
  ------------------
 1510|  10.8k|                                    && (ppRefPic[listIdx][iRefIdx]->bIsComplete || bIsPending));
  ------------------
  |  Branch (1510:41): [True: 214, False: 10.6k]
  |  Branch (1510:84): [True: 0, False: 10.6k]
  ------------------
 1511|  34.0k|          } else {
 1512|    290|            WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "inter parse: iMotionPredFlag = 1 not supported. ");
 1513|    290|            return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_UNSUPPORTED_ILP);
  ------------------
  |  |   59|    290|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1514|    290|          }
 1515|  35.5k|        }
 1516|  56.7k|      }
 1517|  28.6k|    }
 1518|  38.9k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (1518:36): [True: 26.2k, False: 12.6k]
  ------------------
 1519|  77.2k|      for (int32_t i = 0; i < 2; i++) {
  ------------------
  |  Branch (1519:27): [True: 51.9k, False: 25.3k]
  ------------------
 1520|  51.9k|        int iPartIdx = i << 2;
 1521|  51.9k|        int32_t iRefIdx = ref_idx_list[listIdx][i];
 1522|  51.9k|        if (IS_DIR (mbType, i, listIdx)) {
  ------------------
  |  |  312|  51.9k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  51.9k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 32.2k, False: 19.6k]
  |  |  ------------------
  ------------------
 1523|  32.2k|          PredInter8x16Mv (iMvArray, iRefIdxArray, listIdx, iPartIdx, iRefIdx, iMv);
 1524|       |
 1525|  32.2k|          WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l0[ mbPartIdx ][ 0 ][ compIdx ]
  ------------------
  |  |   52|  32.2k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  32.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  32.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 419, False: 31.8k]
  |  |  ------------------
  |  |   55|  32.2k|    return uiRetTmp; \
  |  |   56|  32.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 31.8k]
  |  |  ------------------
  ------------------
 1526|  31.8k|          iMv[0] += iCode;
 1527|  31.8k|          WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l1[ mbPartIdx ][ 0 ][ compIdx ]
  ------------------
  |  |   52|  31.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  31.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  31.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 505, False: 31.3k]
  |  |  ------------------
  |  |   55|  31.8k|    return uiRetTmp; \
  |  |   56|  31.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 31.3k]
  |  |  ------------------
  ------------------
 1528|  31.3k|          iMv[1] += iCode;
 1529|  31.3k|          WELS_CHECK_SE_BOTH_WARNING (iMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|  31.3k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  31.3k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 1.57k, False: 29.7k]
  |  |  |  Branch (289:28): [True: 1.10k, False: 28.6k]
  |  |  ------------------
  |  |  290|  2.67k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  2.67k|}\
  |  |  292|  31.3k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 31.3k]
  |  |  ------------------
  ------------------
 1530|  31.3k|        } else {
 1531|  19.6k|          * (uint32_t*)iMv = 0;
 1532|  19.6k|        }
 1533|  51.0k|        UpdateP8x16MotionInfo (pCurDqLayer, iMvArray, iRefIdxArray, listIdx, iPartIdx, iRefIdx, iMv);
 1534|  51.0k|      }
 1535|  26.2k|    }
 1536|  13.5k|  } else if (IS_Inter_8x8 (mbType)) {
  ------------------
  |  |  320|  11.0k|#define IS_Inter_8x8(type) ( ((type)&MB_TYPE_8x8) != 0)
  |  |  ------------------
  |  |  |  |  281|  11.0k|#define MB_TYPE_8x8         0x00000040
  |  |  ------------------
  |  |  |  Branch (320:28): [True: 11.0k, False: 0]
  |  |  ------------------
  ------------------
 1537|  11.0k|    int8_t pSubPartCount[4], pPartW[4];
 1538|  11.0k|    uint32_t uiSubMbType;
 1539|       |    //sub_mb_type, partition
 1540|  11.0k|    int16_t pMvDirect[LIST_A][2] = { { 0, 0 }, { 0, 0 } };
 1541|  11.0k|    if (pCtx->sRefPic.pRefList[LIST_1][0] == NULL) {
  ------------------
  |  Branch (1541:9): [True: 226, False: 10.8k]
  ------------------
 1542|    226|      SLogContext* pLogCtx = & (pCtx->sLogCtx);
 1543|    226|      WelsLog (pLogCtx, WELS_LOG_ERROR, "Colocated Ref Picture for B-Slice is lost, B-Slice decoding cannot be continued!");
 1544|    226|      return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_DATA, ERR_INFO_REFERENCE_PIC_LOST);
  ------------------
  |  |   59|    226|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1545|    226|    }
 1546|  10.8k|    bool bIsLongRef = pCtx->sRefPic.pRefList[LIST_1][0]->bIsLongRef;
 1547|  10.8k|    const int32_t ref0Count = WELS_MIN (pSliceHeader->uiRefCount[LIST_0], pCtx->sRefPic.uiRefCount[LIST_0]);
  ------------------
  |  |   95|  10.8k|#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (95:25): [True: 452, False: 10.3k]
  |  |  ------------------
  ------------------
 1548|  10.8k|    bool has_direct_called = false;
 1549|  10.8k|    SubMbType directSubMbType = 0;
 1550|       |
 1551|       |    //uiSubMbType, partition
 1552|  51.8k|    for (int32_t i = 0; i < 4; i++) {
  ------------------
  |  Branch (1552:25): [True: 41.8k, False: 10.0k]
  ------------------
 1553|  41.8k|      WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); //sub_mb_type[ mbPartIdx ]
  ------------------
  |  |   52|  41.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  41.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  41.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 439, False: 41.3k]
  |  |  ------------------
  |  |   55|  41.8k|    return uiRetTmp; \
  |  |   56|  41.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 41.3k]
  |  |  ------------------
  ------------------
 1554|  41.3k|      uiSubMbType = uiCode;
 1555|  41.3k|      if (uiSubMbType >= 13) { //invalid uiSubMbType
  ------------------
  |  Branch (1555:11): [True: 318, False: 41.0k]
  ------------------
 1556|    318|        return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_SUB_MB_TYPE);
  ------------------
  |  |   59|    318|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1557|    318|      }
 1558|  41.0k|      pSubPartCount[i] = g_ksInterBSubMbTypeInfo[uiSubMbType].iPartCount;
 1559|  41.0k|      pPartW[i] = g_ksInterBSubMbTypeInfo[uiSubMbType].iPartWidth;
 1560|       |
 1561|       |      // Need modification when B picture add in, reference to 7.3.5
 1562|  41.0k|      if (pSubPartCount[i] > 1)
  ------------------
  |  Branch (1562:11): [True: 13.0k, False: 27.9k]
  ------------------
 1563|  13.0k|        pCurDqLayer->pNoSubMbPartSizeLessThan8x8Flag[iMbXy] = false;
 1564|       |
 1565|  41.0k|      if (IS_DIRECT (g_ksInterBSubMbTypeInfo[uiSubMbType].iType)) {
  ------------------
  |  |  316|  41.0k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|  41.0k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  |  |  |  Branch (316:25): [True: 20.4k, False: 20.6k]
  |  |  ------------------
  ------------------
 1566|  20.4k|        if (!has_direct_called) {
  ------------------
  |  Branch (1566:13): [True: 9.29k, False: 11.1k]
  ------------------
 1567|  9.29k|          if (pSliceHeader->iDirectSpatialMvPredFlag) {
  ------------------
  |  Branch (1567:15): [True: 4.00k, False: 5.29k]
  ------------------
 1568|  4.00k|            int32_t ret = PredMvBDirectSpatial (pCtx, pMvDirect, iRef, directSubMbType);
 1569|  4.00k|            if (ret != ERR_NONE) {
  ------------------
  |  Branch (1569:17): [True: 0, False: 4.00k]
  ------------------
 1570|      0|              return ret;
 1571|      0|            }
 1572|       |
 1573|  5.29k|          } else {
 1574|       |            //temporal direct mode
 1575|  5.29k|            int32_t ret = PredBDirectTemporal (pCtx, pMvDirect, iRef, directSubMbType);
 1576|  5.29k|            if (ret != ERR_NONE) {
  ------------------
  |  Branch (1576:17): [True: 0, False: 5.29k]
  ------------------
 1577|      0|              return ret;
 1578|      0|            }
 1579|  5.29k|          }
 1580|  9.29k|          has_direct_called = true;
 1581|  9.29k|        }
 1582|  20.4k|        pCurDqLayer->pSubMbType[iMbXy][i] = directSubMbType;
 1583|  20.4k|        if (IS_SUB_4x4 (pCurDqLayer->pSubMbType[iMbXy][i])) {
  ------------------
  |  |  324|  20.4k|#define IS_SUB_4x4(sub_type) (((sub_type)&SUB_MB_TYPE_4x4) != 0)
  |  |  ------------------
  |  |  |  |  297|  20.4k|#define SUB_MB_TYPE_4x4     0x00000008
  |  |  ------------------
  |  |  |  Branch (324:30): [True: 1.35k, False: 19.0k]
  |  |  ------------------
  ------------------
 1584|  1.35k|          pSubPartCount[i] = 4;
 1585|  1.35k|          pPartW[i] = 1;
 1586|  1.35k|        }
 1587|  20.6k|      } else {
 1588|  20.6k|        pCurDqLayer->pSubMbType[iMbXy][i] = g_ksInterBSubMbTypeInfo[uiSubMbType].iType;
 1589|  20.6k|      }
 1590|  41.0k|    }
 1591|  10.0k|    if (pSlice->sSliceHeaderExt.bAdaptiveMotionPredFlag) {
  ------------------
  |  Branch (1591:9): [True: 1.43k, False: 8.62k]
  ------------------
 1592|  3.47k|      for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (1592:38): [True: 2.59k, False: 874]
  ------------------
 1593|  11.8k|        for (int32_t i = 0; i < 4; i++) {
  ------------------
  |  Branch (1593:29): [True: 9.84k, False: 2.03k]
  ------------------
 1594|  9.84k|          bool is_dir = IS_DIR (pCurDqLayer->pSubMbType[iMbXy][i], 0, listIdx) > 0;
  ------------------
  |  |  312|  9.84k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  9.84k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  ------------------
 1595|  9.84k|          if (is_dir) {
  ------------------
  |  Branch (1595:15): [True: 8.65k, False: 1.18k]
  ------------------
 1596|  8.65k|            WELS_READ_VERIFY (BsGetOneBit (pBs, &uiCode)); //motion_prediction_flag_l0[ mbPartIdx ]
  ------------------
  |  |   52|  8.65k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  8.65k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  8.65k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 559, False: 8.09k]
  |  |  ------------------
  |  |   55|  8.65k|    return uiRetTmp; \
  |  |   56|  8.65k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 8.09k]
  |  |  ------------------
  ------------------
 1597|  8.09k|            iMotionPredFlag[listIdx][i] = uiCode;
 1598|  8.09k|          }
 1599|  9.84k|        }
 1600|  2.59k|      }
 1601|  1.43k|    }
 1602|  47.5k|    for (int32_t i = 0; i < 4; i++) { //Direct 8x8 Ref and mv
  ------------------
  |  Branch (1602:25): [True: 38.0k, False: 9.50k]
  ------------------
 1603|  38.0k|      int16_t iIdx8 = i << 2;
 1604|  38.0k|      if (IS_DIRECT (pCurDqLayer->pSubMbType[iMbXy][i])) {
  ------------------
  |  |  316|  38.0k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|  38.0k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  |  |  |  Branch (316:25): [True: 19.2k, False: 18.7k]
  |  |  ------------------
  ------------------
 1605|  19.2k|        if (pSliceHeader->iDirectSpatialMvPredFlag) {
  ------------------
  |  Branch (1605:13): [True: 9.54k, False: 9.75k]
  ------------------
 1606|  9.54k|          FillSpatialDirect8x8Mv (pCurDqLayer, iIdx8, pSubPartCount[i], pPartW[i], directSubMbType, bIsLongRef, pMvDirect, iRef,
 1607|  9.54k|                                  iMvArray, NULL);
 1608|  9.75k|        } else {
 1609|  9.75k|          int16_t (*mvColoc)[2] = pCurDqLayer->iColocMv[LIST_0];
 1610|  9.75k|          iRef[LIST_1] = 0;
 1611|  9.75k|          iRef[LIST_0] = 0;
 1612|  9.75k|          const uint8_t uiColoc4Idx = g_kuiScan4[iIdx8];
 1613|  9.75k|          if (!pCurDqLayer->iColocIntra[uiColoc4Idx]) {
  ------------------
  |  Branch (1613:15): [True: 9.51k, False: 242]
  ------------------
 1614|  9.51k|            iRef[LIST_0] = 0;
 1615|  9.51k|            int8_t colocRefIndexL0 = pCurDqLayer->iColocRefIndex[LIST_0][uiColoc4Idx];
 1616|  9.51k|            if (colocRefIndexL0 >= 0) {
  ------------------
  |  Branch (1616:17): [True: 9.27k, False: 231]
  ------------------
 1617|  9.27k|              iRef[LIST_0] = MapColToList0 (pCtx, colocRefIndexL0, ref0Count);
 1618|  9.27k|            } else {
 1619|    231|              mvColoc = pCurDqLayer->iColocMv[LIST_1];
 1620|    231|            }
 1621|  9.51k|          }
 1622|  9.75k|          Update8x8RefIdx (pCurDqLayer, iIdx8, LIST_0, iRef[LIST_0]);
 1623|  9.75k|          Update8x8RefIdx (pCurDqLayer, iIdx8, LIST_1, iRef[LIST_1]);
 1624|  9.75k|          FillTemporalDirect8x8Mv (pCurDqLayer, iIdx8, pSubPartCount[i], pPartW[i], directSubMbType, iRef, mvColoc, iMvArray,
 1625|  9.75k|                                   NULL);
 1626|  9.75k|        }
 1627|  19.2k|      }
 1628|  38.0k|    }
 1629|       |    //ref no-direct
 1630|  27.5k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (1630:36): [True: 18.7k, False: 8.74k]
  ------------------
 1631|  91.8k|      for (int32_t i = 0; i < 4; i++) {
  ------------------
  |  Branch (1631:27): [True: 73.8k, False: 18.0k]
  ------------------
 1632|  73.8k|        int16_t iIdx8 = i << 2;
 1633|  73.8k|        int32_t subMbType = pCurDqLayer->pSubMbType[iMbXy][i];
 1634|  73.8k|        int8_t iref = REF_NOT_IN_LIST;
  ------------------
  |  |   42|  73.8k|#define REF_NOT_IN_LIST  -1  //intra
  ------------------
 1635|  73.8k|        if (IS_DIRECT (subMbType)) {
  ------------------
  |  |  316|  73.8k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|  73.8k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  |  |  |  Branch (316:25): [True: 37.3k, False: 36.5k]
  |  |  ------------------
  ------------------
 1636|  37.3k|          if (pSliceHeader->iDirectSpatialMvPredFlag) {
  ------------------
  |  Branch (1636:15): [True: 18.9k, False: 18.3k]
  ------------------
 1637|  18.9k|            Update8x8RefIdx (pCurDqLayer, iIdx8, listIdx, iRef[listIdx]);
 1638|  18.9k|            ref_idx_list[listIdx][i] = iRef[listIdx];
 1639|  18.9k|          }
 1640|  37.3k|        } else {
 1641|  36.5k|          if (IS_DIR (subMbType, 0, listIdx)) {
  ------------------
  |  |  312|  36.5k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  36.5k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 26.0k, False: 10.4k]
  |  |  ------------------
  ------------------
 1642|  26.0k|            if (iMotionPredFlag[listIdx][i] == 0) {
  ------------------
  |  Branch (1642:17): [True: 25.8k, False: 245]
  ------------------
 1643|  25.8k|              WELS_READ_VERIFY (BsGetTe0 (pBs, iRefCount[listIdx], &uiCode)); //ref_idx_l0[ mbPartIdx ]
  ------------------
  |  |   52|  25.8k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  25.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  25.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 509, False: 25.3k]
  |  |  ------------------
  |  |   55|  25.8k|    return uiRetTmp; \
  |  |   56|  25.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 25.3k]
  |  |  ------------------
  ------------------
 1644|  25.3k|              iref = uiCode;
 1645|  25.3k|              if ((iref < 0) || (iref >= iRefCount[listIdx]) || (ppRefPic[listIdx][iref] == NULL)) { //error ref_idx
  ------------------
  |  Branch (1645:19): [True: 260, False: 25.0k]
  |  Branch (1645:33): [True: 1.14k, False: 23.9k]
  |  Branch (1645:65): [True: 3.96k, False: 19.9k]
  ------------------
 1646|  5.36k|                pCtx->bMbRefConcealed = true;
 1647|  5.36k|                if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) {
  ------------------
  |  Branch (1647:21): [True: 5.36k, False: 0]
  ------------------
 1648|  5.36k|                  iref = 0;
 1649|  5.36k|                  pCtx->iErrorCode |= dsBitstreamError;
 1650|  5.36k|                  RETURN_ERR_IF_NULL(ppRefPic[listIdx][iref]);
  ------------------
  |  |   47|  5.36k|#define RETURN_ERR_IF_NULL(pRefPic0) \
  |  |   48|  5.36k|if ( pRefPic0 == NULL) \
  |  |  ------------------
  |  |  |  Branch (48:6): [True: 0, False: 5.36k]
  |  |  ------------------
  |  |   49|  5.36k|  return GENERATE_ERROR_NO(ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX)
  |  |  ------------------
  |  |  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  |  |  ------------------
  ------------------
 1651|  5.36k|                } else {
 1652|      0|                  return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_INVALID_REF_INDEX);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1653|      0|                }
 1654|  5.36k|              }
 1655|  25.3k|              pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPic[listIdx][iref]
  ------------------
  |  Branch (1655:39): [True: 1.16k, False: 24.1k]
  |  Branch (1655:59): [True: 16.5k, False: 7.63k]
  |  Branch (1655:87): [True: 7.63k, False: 0]
  ------------------
 1656|  7.63k|                                      && (ppRefPic[listIdx][iref]->bIsComplete || bIsPending));
  ------------------
  |  Branch (1656:43): [True: 728, False: 6.90k]
  |  Branch (1656:83): [True: 0, False: 6.90k]
  ------------------
 1657|  25.3k|            } else {
 1658|    245|              WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "inter parse: iMotionPredFlag = 1 not supported. ");
 1659|    245|              return GENERATE_ERROR_NO (ERR_LEVEL_MB_DATA, ERR_INFO_UNSUPPORTED_ILP);
  ------------------
  |  |   59|    245|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
 1660|    245|            }
 1661|  26.0k|          }
 1662|  35.7k|          Update8x8RefIdx (pCurDqLayer, iIdx8, listIdx, iref);
 1663|  35.7k|          ref_idx_list[listIdx][i] = iref;
 1664|  35.7k|        }
 1665|  73.8k|      }
 1666|  18.7k|    }
 1667|       |    //mv
 1668|  24.6k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (1668:36): [True: 16.8k, False: 7.76k]
  ------------------
 1669|  82.3k|      for (int32_t i = 0; i < 4; i++) {
  ------------------
  |  Branch (1669:27): [True: 66.4k, False: 15.9k]
  ------------------
 1670|  66.4k|        int8_t iPartCount = pSubPartCount[i];
 1671|  66.4k|        int16_t iPartIdx, iBlockW = pPartW[i];
 1672|  66.4k|        uint8_t uiScan4Idx, uiCacheIdx;
 1673|       |
 1674|  66.4k|        uiCacheIdx = g_kuiCache30ScanIdx[i << 2];
 1675|       |
 1676|  66.4k|        int8_t iref = ref_idx_list[listIdx][i];
 1677|  66.4k|        iRefIdxArray[listIdx][uiCacheIdx] = iRefIdxArray[listIdx][uiCacheIdx + 1] =
 1678|  66.4k|                                              iRefIdxArray[listIdx][uiCacheIdx + 6] = iRefIdxArray[listIdx][uiCacheIdx + 7] = iref;
 1679|       |
 1680|  66.4k|        uint32_t subMbType = pCurDqLayer->pSubMbType[iMbXy][i];
 1681|  66.4k|        if (IS_DIRECT (subMbType)) {
  ------------------
  |  |  316|  66.4k|#define IS_DIRECT(type) ( ((type)&MB_TYPE_DIRECT) != 0 )
  |  |  ------------------
  |  |  |  |  286|  66.4k|#define MB_TYPE_DIRECT      0x00000800
  |  |  ------------------
  |  |  |  Branch (316:25): [True: 33.2k, False: 33.2k]
  |  |  ------------------
  ------------------
 1682|  33.2k|          continue;
 1683|  33.2k|        }
 1684|  33.2k|        bool is_dir = IS_DIR (subMbType, 0, listIdx) > 0;
  ------------------
  |  |  312|  33.2k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  33.2k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  ------------------
 1685|  97.9k|        for (int32_t j = 0; j < iPartCount; j++) {
  ------------------
  |  Branch (1685:29): [True: 65.7k, False: 32.2k]
  ------------------
 1686|  65.7k|          iPartIdx = (i << 2) + j * iBlockW;
 1687|  65.7k|          uiScan4Idx = g_kuiScan4[iPartIdx];
 1688|  65.7k|          uiCacheIdx = g_kuiCache30ScanIdx[iPartIdx];
 1689|  65.7k|          if (is_dir) {
  ------------------
  |  Branch (1689:15): [True: 50.0k, False: 15.7k]
  ------------------
 1690|  50.0k|            PredMv (iMvArray, iRefIdxArray, listIdx, iPartIdx, iBlockW, iref, iMv);
 1691|       |
 1692|  50.0k|            WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l0[ mbPartIdx ][ subMbPartIdx ][ compIdx ]
  ------------------
  |  |   52|  50.0k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  50.0k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  50.0k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 529, False: 49.5k]
  |  |  ------------------
  |  |   55|  50.0k|    return uiRetTmp; \
  |  |   56|  50.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 49.5k]
  |  |  ------------------
  ------------------
 1693|  49.5k|            iMv[0] += iCode;
 1694|  49.5k|            WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //mvd_l1[ mbPartIdx ][ subMbPartIdx ][ compIdx ]
  ------------------
  |  |   52|  49.5k|#define WELS_READ_VERIFY(uiRet) do{ \
  |  |   53|  49.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  49.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 454, False: 49.0k]
  |  |  ------------------
  |  |   55|  49.5k|    return uiRetTmp; \
  |  |   56|  49.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 49.0k]
  |  |  ------------------
  ------------------
 1695|  49.0k|            iMv[1] += iCode;
 1696|  49.0k|            WELS_CHECK_SE_BOTH_WARNING (iMv[1], iMinVmv, iMaxVmv, "vertical mv");
  ------------------
  |  |  288|  49.0k|#define WELS_CHECK_SE_BOTH_WARNING(val, lower_bound, upper_bound, syntax_name) do {\
  |  |  289|  49.0k|if ((val < lower_bound) || (val > upper_bound)) {\
  |  |  ------------------
  |  |  |  Branch (289:5): [True: 3.19k, False: 45.8k]
  |  |  |  Branch (289:28): [True: 2.28k, False: 43.5k]
  |  |  ------------------
  |  |  290|  5.48k|  WelsLog(&(pCtx->sLogCtx), WELS_LOG_WARNING, "invalid syntax " syntax_name " %d", val);\
  |  |  291|  5.48k|}\
  |  |  292|  49.0k|}while(0)
  |  |  ------------------
  |  |  |  Branch (292:8): [Folded, False: 49.0k]
  |  |  ------------------
  ------------------
 1697|  49.0k|          } else {
 1698|  15.7k|            * (uint32_t*)iMv = 0;
 1699|  15.7k|          }
 1700|  64.7k|          if (IS_SUB_8x8 (subMbType)) { //MB_TYPE_8x8
  ------------------
  |  |  321|  64.7k|#define IS_SUB_8x8(sub_type) (((sub_type)&SUB_MB_TYPE_8x8) != 0)
  |  |  ------------------
  |  |  |  |  294|  64.7k|#define SUB_MB_TYPE_8x8     0x00000001
  |  |  ------------------
  |  |  |  Branch (321:30): [True: 10.8k, False: 53.8k]
  |  |  ------------------
  ------------------
 1701|  10.8k|            ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][uiScan4Idx], LD32 (iMv));
  ------------------
  |  |   67|  10.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1702|  10.8k|            ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][uiScan4Idx + 1], LD32 (iMv));
  ------------------
  |  |   67|  10.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1703|  10.8k|            ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][uiScan4Idx + 4], LD32 (iMv));
  ------------------
  |  |   67|  10.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1704|  10.8k|            ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][uiScan4Idx + 5], LD32 (iMv));
  ------------------
  |  |   67|  10.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1705|  10.8k|            ST32 (iMvArray[listIdx][uiCacheIdx], LD32 (iMv));
  ------------------
  |  |   67|  10.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1706|  10.8k|            ST32 (iMvArray[listIdx][uiCacheIdx + 1], LD32 (iMv));
  ------------------
  |  |   67|  10.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1707|  10.8k|            ST32 (iMvArray[listIdx][uiCacheIdx + 6], LD32 (iMv));
  ------------------
  |  |   67|  10.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1708|  10.8k|            ST32 (iMvArray[listIdx][uiCacheIdx + 7], LD32 (iMv));
  ------------------
  |  |   67|  10.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1709|  53.8k|          } else if (IS_SUB_8x4 (subMbType)) {
  ------------------
  |  |  322|  53.8k|#define IS_SUB_8x4(sub_type) (((sub_type)&SUB_MB_TYPE_8x4) != 0)
  |  |  ------------------
  |  |  |  |  295|  53.8k|#define SUB_MB_TYPE_8x4     0x00000002
  |  |  ------------------
  |  |  |  Branch (322:30): [True: 21.6k, False: 32.2k]
  |  |  ------------------
  ------------------
 1710|  21.6k|            ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][uiScan4Idx], LD32 (iMv));
  ------------------
  |  |   67|  21.6k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1711|  21.6k|            ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][uiScan4Idx + 1], LD32 (iMv));
  ------------------
  |  |   67|  21.6k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1712|  21.6k|            ST32 (iMvArray[listIdx][uiCacheIdx], LD32 (iMv));
  ------------------
  |  |   67|  21.6k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1713|  21.6k|            ST32 (iMvArray[listIdx][uiCacheIdx + 1], LD32 (iMv));
  ------------------
  |  |   67|  21.6k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1714|  32.2k|          } else if (IS_SUB_4x8 (subMbType)) {
  ------------------
  |  |  323|  32.2k|#define IS_SUB_4x8(sub_type) (((sub_type)&SUB_MB_TYPE_4x8) != 0)
  |  |  ------------------
  |  |  |  |  296|  32.2k|#define SUB_MB_TYPE_4x8     0x00000004
  |  |  ------------------
  |  |  |  Branch (323:30): [True: 10.4k, False: 21.8k]
  |  |  ------------------
  ------------------
 1715|  10.4k|            ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][uiScan4Idx], LD32 (iMv));
  ------------------
  |  |   67|  10.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1716|  10.4k|            ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][uiScan4Idx + 4], LD32 (iMv));
  ------------------
  |  |   67|  10.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1717|  10.4k|            ST32 (iMvArray[listIdx][uiCacheIdx], LD32 (iMv));
  ------------------
  |  |   67|  10.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1718|  10.4k|            ST32 (iMvArray[listIdx][uiCacheIdx + 6], LD32 (iMv));
  ------------------
  |  |   67|  10.4k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1719|  21.8k|          } else { //SUB_MB_TYPE_4x4 == uiSubMbType
 1720|  21.8k|            ST32 (pCurDqLayer->pDec->pMv[listIdx][iMbXy][uiScan4Idx], LD32 (iMv));
  ------------------
  |  |   67|  21.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1721|  21.8k|            ST32 (iMvArray[listIdx][uiCacheIdx], LD32 (iMv));
  ------------------
  |  |   67|  21.8k|#define ST32(a, b) (((struct tagUnaligned_32 *) (a))->l) = (b)
  ------------------
 1722|  21.8k|          }
 1723|  64.7k|        }
 1724|  33.2k|      }
 1725|  16.8k|    }
 1726|  8.74k|  }
 1727|   217k|  return ERR_NONE;
 1728|   233k|}
parse_mb_syn_cavlc.cpp:_ZN7WelsDecL33CavlcGetTrailingOnesAndTotalCoeffERhS0_PNS_16TagReadBitsCacheEPNS_11TagVlcTableEba:
  684|   779k|    SReadBitsCache* pBitsCache, SVlcTable* pVlcTable, bool bChromaDc, int8_t nC) {
  685|   779k|  const uint8_t* kpVlcTableMoreBitsCountList[3] = {g_kuiVlcTableMoreBitsCount0, g_kuiVlcTableMoreBitsCount1, g_kuiVlcTableMoreBitsCount2};
  686|   779k|  int32_t iUsedBits = 0;
  687|   779k|  int32_t iIndexVlc, iIndexValue, iNcMapIdx;
  688|   779k|  uint32_t uiCount;
  689|   779k|  uint32_t uiValue;
  690|       |
  691|   779k|  if (bChromaDc) {
  ------------------
  |  Branch (691:7): [True: 67.9k, False: 711k]
  ------------------
  692|  67.9k|    uiValue        = pBitsCache->uiCache32Bit >> 24;
  693|  67.9k|    iIndexVlc      = pVlcTable->kpChromaCoeffTokenVlcTable[uiValue][0];
  694|  67.9k|    uiCount        = pVlcTable->kpChromaCoeffTokenVlcTable[uiValue][1];
  695|  67.9k|    POP_BUFFER (pBitsCache, uiCount);
  ------------------
  |  |   90|  67.9k|#define POP_BUFFER(pBitsCache, iCount)  { pBitsCache->uiCache32Bit <<= iCount;  pBitsCache->uiRemainBits -= iCount; }
  ------------------
  696|  67.9k|    iUsedBits     += uiCount;
  697|  67.9k|    uiTrailingOnes = g_kuiVlcTrailingOneTotalCoeffTable[iIndexVlc][0];
  698|  67.9k|    uiTotalCoeff   = g_kuiVlcTrailingOneTotalCoeffTable[iIndexVlc][1];
  699|   711k|  } else { //luma
  700|   711k|    iNcMapIdx = g_kuiNcMapTable[nC];
  701|   711k|    if (iNcMapIdx <= 2) {
  ------------------
  |  Branch (701:9): [True: 708k, False: 2.20k]
  ------------------
  702|   708k|      uiValue = pBitsCache->uiCache32Bit >> 24;
  703|   708k|      if (uiValue < g_kuiVlcTableNeedMoreBitsThread[iNcMapIdx]) {
  ------------------
  |  Branch (703:11): [True: 146k, False: 562k]
  ------------------
  704|   146k|        POP_BUFFER (pBitsCache, 8);
  ------------------
  |  |   90|   146k|#define POP_BUFFER(pBitsCache, iCount)  { pBitsCache->uiCache32Bit <<= iCount;  pBitsCache->uiRemainBits -= iCount; }
  ------------------
  705|   146k|        iUsedBits  += 8;
  706|   146k|        iIndexValue = pBitsCache->uiCache32Bit >> (32 - kpVlcTableMoreBitsCountList[iNcMapIdx][uiValue]);
  707|   146k|        iIndexVlc   = pVlcTable->kpCoeffTokenVlcTable[iNcMapIdx + 1][uiValue][iIndexValue][0];
  708|   146k|        uiCount     = pVlcTable->kpCoeffTokenVlcTable[iNcMapIdx + 1][uiValue][iIndexValue][1];
  709|   146k|        POP_BUFFER (pBitsCache, uiCount);
  ------------------
  |  |   90|   146k|#define POP_BUFFER(pBitsCache, iCount)  { pBitsCache->uiCache32Bit <<= iCount;  pBitsCache->uiRemainBits -= iCount; }
  ------------------
  710|   146k|        iUsedBits  += uiCount;
  711|   562k|      } else {
  712|   562k|        iIndexVlc  = pVlcTable->kpCoeffTokenVlcTable[0][iNcMapIdx][uiValue][0];
  713|   562k|        uiCount    = pVlcTable->kpCoeffTokenVlcTable[0][iNcMapIdx][uiValue][1];
  714|   562k|        uiValue    = pBitsCache->uiCache32Bit >> (32 - uiCount);
  715|   562k|        POP_BUFFER (pBitsCache, uiCount);
  ------------------
  |  |   90|   562k|#define POP_BUFFER(pBitsCache, iCount)  { pBitsCache->uiCache32Bit <<= iCount;  pBitsCache->uiRemainBits -= iCount; }
  ------------------
  716|   562k|        iUsedBits += uiCount;
  717|   562k|      }
  718|   708k|    } else {
  719|  2.20k|      uiValue    = pBitsCache->uiCache32Bit >> (32 - 6);
  720|  2.20k|      POP_BUFFER (pBitsCache, 6);
  ------------------
  |  |   90|  2.20k|#define POP_BUFFER(pBitsCache, iCount)  { pBitsCache->uiCache32Bit <<= iCount;  pBitsCache->uiRemainBits -= iCount; }
  ------------------
  721|  2.20k|      iUsedBits += 6;
  722|  2.20k|      iIndexVlc  = pVlcTable->kpCoeffTokenVlcTable[0][3][uiValue][0];  //differ
  723|  2.20k|    }
  724|   711k|    uiTrailingOnes = g_kuiVlcTrailingOneTotalCoeffTable[iIndexVlc][0];
  725|   711k|    uiTotalCoeff  = g_kuiVlcTrailingOneTotalCoeffTable[iIndexVlc][1];
  726|   711k|  }
  727|       |
  728|   779k|  return iUsedBits;
  729|   779k|}
parse_mb_syn_cavlc.cpp:_ZN7WelsDecL16CavlcGetLevelValEPiPNS_16TagReadBitsCacheEhh:
  732|   229k|                                 uint8_t uiTrailingOnes) {
  733|   229k|  int32_t i, iUsedBits = 0;
  734|   229k|  int32_t iSuffixLength, iSuffixLengthSize, iLevelPrefix, iPrefixBits, iLevelCode, iThreshold;
  735|   523k|  for (i = 0; i < uiTrailingOnes; i++) {
  ------------------
  |  Branch (735:15): [True: 293k, False: 229k]
  ------------------
  736|   293k|    iLevel[i] = 1 - ((pBitsCache->uiCache32Bit >> (30 - i)) & 0x02);
  737|   293k|  }
  738|   229k|  POP_BUFFER (pBitsCache, uiTrailingOnes);
  ------------------
  |  |   90|   229k|#define POP_BUFFER(pBitsCache, iCount)  { pBitsCache->uiCache32Bit <<= iCount;  pBitsCache->uiRemainBits -= iCount; }
  ------------------
  739|   229k|  iUsedBits += uiTrailingOnes;
  740|       |
  741|   229k|  iSuffixLength = (uiTotalCoeff > 10 && uiTrailingOnes < 3);
  ------------------
  |  Branch (741:20): [True: 3.27k, False: 226k]
  |  Branch (741:41): [True: 1.90k, False: 1.36k]
  ------------------
  742|       |
  743|   346k|  for (; i < uiTotalCoeff; i++) {
  ------------------
  |  Branch (743:10): [True: 127k, False: 218k]
  ------------------
  744|   127k|    if (pBitsCache->uiRemainBits <= 16) SHIFT_BUFFER (pBitsCache);
  ------------------
  |  |   89|  22.5k|#define SHIFT_BUFFER(pBitsCache)        { pBitsCache->pBuf+=2; pBitsCache->uiRemainBits += 16; pBitsCache->uiCache32Bit |= (((pBitsCache->pBuf[2] << 8) | pBitsCache->pBuf[3]) << (32 - pBitsCache->uiRemainBits)); }
  ------------------
  |  Branch (744:9): [True: 22.5k, False: 104k]
  ------------------
  745|   127k|    WELS_GET_PREFIX_BITS (pBitsCache->uiCache32Bit, iPrefixBits);
  ------------------
  |  |  116|   127k|#define WELS_GET_PREFIX_BITS(inval, outval) outval = GetPrefixBits(inval)
  ------------------
  746|   127k|    if (iPrefixBits > MAX_LEVEL_PREFIX + 1) //iPrefixBits includes leading "0"s and first "1", should +1
  ------------------
  |  |   48|   127k|#define MAX_LEVEL_PREFIX 15
  ------------------
  |  Branch (746:9): [True: 10.9k, False: 116k]
  ------------------
  747|  10.9k|      return -1;
  748|   116k|    POP_BUFFER (pBitsCache, iPrefixBits);
  ------------------
  |  |   90|   116k|#define POP_BUFFER(pBitsCache, iCount)  { pBitsCache->uiCache32Bit <<= iCount;  pBitsCache->uiRemainBits -= iCount; }
  ------------------
  749|   116k|    iUsedBits   += iPrefixBits;
  750|   116k|    iLevelPrefix = iPrefixBits - 1;
  751|       |
  752|   116k|    iLevelCode = iLevelPrefix << iSuffixLength; //differ
  753|   116k|    iSuffixLengthSize = iSuffixLength;
  754|       |
  755|   116k|    if (iLevelPrefix >= 14) {
  ------------------
  |  Branch (755:9): [True: 2.41k, False: 114k]
  ------------------
  756|  2.41k|      if (14 == iLevelPrefix && 0 == iSuffixLength)
  ------------------
  |  Branch (756:11): [True: 1.24k, False: 1.16k]
  |  Branch (756:33): [True: 896, False: 352]
  ------------------
  757|    896|        iSuffixLengthSize = 4;
  758|  1.51k|      else if (15 == iLevelPrefix) {
  ------------------
  |  Branch (758:16): [True: 1.16k, False: 352]
  ------------------
  759|  1.16k|        iSuffixLengthSize = 12;
  760|  1.16k|        if (iSuffixLength == 0)
  ------------------
  |  Branch (760:13): [True: 690, False: 473]
  ------------------
  761|    690|          iLevelCode += 15;
  762|  1.16k|      }
  763|  2.41k|    }
  764|       |
  765|   116k|    if (iSuffixLengthSize > 0) {
  ------------------
  |  Branch (765:9): [True: 73.6k, False: 42.9k]
  ------------------
  766|  73.6k|      if (pBitsCache->uiRemainBits <= iSuffixLengthSize) SHIFT_BUFFER (pBitsCache);
  ------------------
  |  |   89|    831|#define SHIFT_BUFFER(pBitsCache)        { pBitsCache->pBuf+=2; pBitsCache->uiRemainBits += 16; pBitsCache->uiCache32Bit |= (((pBitsCache->pBuf[2] << 8) | pBitsCache->pBuf[3]) << (32 - pBitsCache->uiRemainBits)); }
  ------------------
  |  Branch (766:11): [True: 831, False: 72.8k]
  ------------------
  767|  73.6k|      iLevelCode += (pBitsCache->uiCache32Bit >> (32 - iSuffixLengthSize));
  768|  73.6k|      POP_BUFFER (pBitsCache, iSuffixLengthSize);
  ------------------
  |  |   90|  73.6k|#define POP_BUFFER(pBitsCache, iCount)  { pBitsCache->uiCache32Bit <<= iCount;  pBitsCache->uiRemainBits -= iCount; }
  ------------------
  769|  73.6k|      iUsedBits  += iSuffixLengthSize;
  770|  73.6k|    }
  771|       |
  772|   116k|    iLevelCode += ((i == uiTrailingOnes) && (uiTrailingOnes < 3)) << 1;
  ------------------
  |  Branch (772:20): [True: 46.2k, False: 70.2k]
  |  Branch (772:45): [True: 37.6k, False: 8.66k]
  ------------------
  773|   116k|    iLevel[i]   = ((iLevelCode + 2) >> 1);
  774|   116k|    iLevel[i]  -= (iLevel[i] << 1) & (- (iLevelCode & 0x01));
  775|       |
  776|   116k|    iSuffixLength += !iSuffixLength;
  777|   116k|    iThreshold     = 3 << (iSuffixLength - 1);
  778|   116k|    iSuffixLength += ((iLevel[i] > iThreshold) || (iLevel[i] < -iThreshold)) && (iSuffixLength < 6);
  ------------------
  |  Branch (778:23): [True: 8.17k, False: 108k]
  |  Branch (778:51): [True: 8.30k, False: 100k]
  |  Branch (778:81): [True: 16.3k, False: 104]
  ------------------
  779|   116k|  }
  780|       |
  781|   218k|  return iUsedBits;
  782|   229k|}
parse_mb_syn_cavlc.cpp:_ZN7WelsDecL18CavlcGetTotalZerosERiPNS_16TagReadBitsCacheEhPNS_11TagVlcTableEb:
  785|   216k|                                   SVlcTable* pVlcTable, bool bChromaDc) {
  786|   216k|  int32_t iCount, iUsedBits = 0;
  787|   216k|  const uint8_t* kpBitNumMap;
  788|   216k|  uint32_t uiValue;
  789|       |
  790|   216k|  int32_t iTotalZeroVlcIdx;
  791|   216k|  uint8_t uiTableType;
  792|       |  //chroma_dc (0 < uiTotalCoeff < 4); others (chroma_ac or luma: 0 < uiTotalCoeff < 16)
  793|       |
  794|   216k|  if (bChromaDc) {
  ------------------
  |  Branch (794:7): [True: 48.1k, False: 168k]
  ------------------
  795|  48.1k|    iTotalZeroVlcIdx = uiTotalCoeff;
  796|  48.1k|    kpBitNumMap = g_kuiTotalZerosBitNumChromaMap;
  797|  48.1k|    uiTableType = bChromaDc;
  798|   168k|  } else {
  799|   168k|    iTotalZeroVlcIdx = uiTotalCoeff;
  800|   168k|    kpBitNumMap = g_kuiTotalZerosBitNumMap;
  801|   168k|    uiTableType = 0;
  802|   168k|  }
  803|       |
  804|   216k|  iCount = kpBitNumMap[iTotalZeroVlcIdx - 1];
  805|   216k|  if (pBitsCache->uiRemainBits < iCount) SHIFT_BUFFER (
  ------------------
  |  |   89|    954|#define SHIFT_BUFFER(pBitsCache)        { pBitsCache->pBuf+=2; pBitsCache->uiRemainBits += 16; pBitsCache->uiCache32Bit |= (((pBitsCache->pBuf[2] << 8) | pBitsCache->pBuf[3]) << (32 - pBitsCache->uiRemainBits)); }
  ------------------
  |  Branch (805:7): [True: 954, False: 215k]
  ------------------
  806|   216k|      pBitsCache); // if uiRemainBits+16 still smaller than iCount?? potential bug
  807|   216k|  uiValue    = pBitsCache->uiCache32Bit >> (32 - iCount);
  808|   216k|  iCount     = pVlcTable->kpTotalZerosTable[uiTableType][iTotalZeroVlcIdx - 1][uiValue][1];
  809|   216k|  POP_BUFFER (pBitsCache, iCount);
  ------------------
  |  |   90|   216k|#define POP_BUFFER(pBitsCache, iCount)  { pBitsCache->uiCache32Bit <<= iCount;  pBitsCache->uiRemainBits -= iCount; }
  ------------------
  810|   216k|  iUsedBits += iCount;
  811|   216k|  iZerosLeft = pVlcTable->kpTotalZerosTable[uiTableType][iTotalZeroVlcIdx - 1][uiValue][0];
  812|       |
  813|   216k|  return iUsedBits;
  814|   216k|}
parse_mb_syn_cavlc.cpp:_ZN7WelsDecL17CavlcGetRunBeforeEPiPNS_16TagReadBitsCacheEhPNS_11TagVlcTableEi:
  816|   218k|                                  SVlcTable* pVlcTable, int32_t iZerosLeft) {
  817|   218k|  int32_t i, iUsedBits = 0;
  818|   218k|  uint32_t uiCount, uiValue, iPrefixBits;
  819|       |
  820|   295k|  for (i = 0; i < uiTotalCoeff - 1; i++) {
  ------------------
  |  Branch (820:15): [True: 107k, False: 187k]
  ------------------
  821|   107k|    if (iZerosLeft > 0) {
  ------------------
  |  Branch (821:9): [True: 83.4k, False: 24.1k]
  ------------------
  822|  83.4k|      uiCount = g_kuiZeroLeftBitNumMap[iZerosLeft];
  823|  83.4k|      if (pBitsCache->uiRemainBits < uiCount) SHIFT_BUFFER (pBitsCache);
  ------------------
  |  |   89|    799|#define SHIFT_BUFFER(pBitsCache)        { pBitsCache->pBuf+=2; pBitsCache->uiRemainBits += 16; pBitsCache->uiCache32Bit |= (((pBitsCache->pBuf[2] << 8) | pBitsCache->pBuf[3]) << (32 - pBitsCache->uiRemainBits)); }
  ------------------
  |  Branch (823:11): [True: 799, False: 82.6k]
  ------------------
  824|  83.4k|      uiValue = pBitsCache->uiCache32Bit >> (32 - uiCount);
  825|  83.4k|      if (iZerosLeft < 7) {
  ------------------
  |  Branch (825:11): [True: 59.3k, False: 24.1k]
  ------------------
  826|  59.3k|        uiCount = pVlcTable->kpZeroTable[iZerosLeft - 1][uiValue][1];
  827|  59.3k|        POP_BUFFER (pBitsCache, uiCount);
  ------------------
  |  |   90|  59.3k|#define POP_BUFFER(pBitsCache, iCount)  { pBitsCache->uiCache32Bit <<= iCount;  pBitsCache->uiRemainBits -= iCount; }
  ------------------
  828|  59.3k|        iUsedBits += uiCount;
  829|  59.3k|        iRun[i] = pVlcTable->kpZeroTable[iZerosLeft - 1][uiValue][0];
  830|  59.3k|      } else {
  831|  24.1k|        POP_BUFFER (pBitsCache, uiCount);
  ------------------
  |  |   90|  24.1k|#define POP_BUFFER(pBitsCache, iCount)  { pBitsCache->uiCache32Bit <<= iCount;  pBitsCache->uiRemainBits -= iCount; }
  ------------------
  832|  24.1k|        iUsedBits += uiCount;
  833|  24.1k|        if (pVlcTable->kpZeroTable[6][uiValue][0] < 7) {
  ------------------
  |  Branch (833:13): [True: 15.3k, False: 8.81k]
  ------------------
  834|  15.3k|          iRun[i] = pVlcTable->kpZeroTable[6][uiValue][0];
  835|  15.3k|        } else {
  836|  8.81k|          if (pBitsCache->uiRemainBits < 16) SHIFT_BUFFER (pBitsCache);
  ------------------
  |  |   89|  7.73k|#define SHIFT_BUFFER(pBitsCache)        { pBitsCache->pBuf+=2; pBitsCache->uiRemainBits += 16; pBitsCache->uiCache32Bit |= (((pBitsCache->pBuf[2] << 8) | pBitsCache->pBuf[3]) << (32 - pBitsCache->uiRemainBits)); }
  ------------------
  |  Branch (836:15): [True: 7.73k, False: 1.08k]
  ------------------
  837|  8.81k|          WELS_GET_PREFIX_BITS (pBitsCache->uiCache32Bit, iPrefixBits);
  ------------------
  |  |  116|  8.81k|#define WELS_GET_PREFIX_BITS(inval, outval) outval = GetPrefixBits(inval)
  ------------------
  838|  8.81k|          iRun[i] = iPrefixBits + 6;
  839|  8.81k|          if (iRun[i] > iZerosLeft)
  ------------------
  |  Branch (839:15): [True: 6.28k, False: 2.52k]
  ------------------
  840|  6.28k|            return -1;
  841|  2.52k|          POP_BUFFER (pBitsCache, iPrefixBits);
  ------------------
  |  |   90|  2.52k|#define POP_BUFFER(pBitsCache, iCount)  { pBitsCache->uiCache32Bit <<= iCount;  pBitsCache->uiRemainBits -= iCount; }
  ------------------
  842|  2.52k|          iUsedBits += iPrefixBits;
  843|  2.52k|        }
  844|  24.1k|      }
  845|  83.4k|    } else {
  846|   117k|      for (int j = i; j < uiTotalCoeff; j++) {
  ------------------
  |  Branch (846:23): [True: 92.9k, False: 24.1k]
  ------------------
  847|  92.9k|        iRun[j] = 0;
  848|  92.9k|      }
  849|  24.1k|      return iUsedBits;
  850|  24.1k|    }
  851|       |
  852|  77.2k|    iZerosLeft -= iRun[i];
  853|  77.2k|  }
  854|       |
  855|   187k|  iRun[uiTotalCoeff - 1] = iZerosLeft;
  856|       |
  857|   187k|  return iUsedBits;
  858|   218k|}

_ZN7WelsDec12AllocPictureEPNS_21TagWelsDecoderContextEii:
   62|   270k|PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const int32_t kiPicHeight) {
   63|   270k|  PPicture pPic = NULL;
   64|   270k|  int32_t iPicWidth = 0;
   65|   270k|  int32_t iPicHeight = 0;
   66|       |
   67|   270k|  int32_t iPicChromaWidth   = 0;
   68|   270k|  int32_t iPicChromaHeight  = 0;
   69|   270k|  int32_t iLumaSize         = 0;
   70|   270k|  int32_t iChromaSize       = 0;
   71|   270k|  CMemoryAlign* pMa = pCtx->pMemAlign;
   72|       |
   73|   270k|  pPic = (PPicture) pMa->WelsMallocz (sizeof (SPicture), "PPicture");
   74|   270k|  WELS_VERIFY_RETURN_IF (NULL, NULL == pPic);
  ------------------
  |  |  239|   270k|  if (bCaseIf) {                                \
  |  |  ------------------
  |  |  |  Branch (239:7): [True: 0, False: 270k]
  |  |  ------------------
  |  |  240|      0|    return iResult;                             \
  |  |  241|      0|  }
  ------------------
   75|       |
   76|   270k|  memset (pPic, 0, sizeof (SPicture));
   77|       |
   78|   270k|  iPicWidth = WELS_ALIGN (kiPicWidth + (PADDING_LENGTH << 1), PICTURE_RESOLUTION_ALIGNMENT);
  ------------------
  |  |   85|   270k|#define WELS_ALIGN(x, n) (((x)+(n)-1)&~((n)-1))
  ------------------
   79|   270k|  iPicHeight = WELS_ALIGN (kiPicHeight + (PADDING_LENGTH << 1), PICTURE_RESOLUTION_ALIGNMENT);
  ------------------
  |  |   85|   270k|#define WELS_ALIGN(x, n) (((x)+(n)-1)&~((n)-1))
  ------------------
   80|   270k|  iPicChromaWidth   = iPicWidth >> 1;
   81|   270k|  iPicChromaHeight  = iPicHeight >> 1;
   82|       |
   83|   270k|  iLumaSize     = iPicWidth * iPicHeight;
   84|   270k|  iChromaSize   = iPicChromaWidth * iPicChromaHeight;
   85|       |
   86|   270k|  if (pCtx->pParam->bParseOnly) {
  ------------------
  |  Branch (86:7): [True: 0, False: 270k]
  ------------------
   87|      0|    pPic->pBuffer[0] = pPic->pBuffer[1] = pPic->pBuffer[2] = NULL;
   88|      0|    pPic->pData[0] = pPic->pData[1] = pPic->pData[2] = NULL;
   89|      0|    pPic->iLinesize[0] = iPicWidth;
   90|      0|    pPic->iLinesize[1] = pPic->iLinesize[2] = iPicChromaWidth;
   91|   270k|  } else {
   92|   270k|    pPic->pBuffer[0] = static_cast<uint8_t*> (pMa->WelsMallocz (iLumaSize /* luma */
   93|   270k|                       + (iChromaSize << 1) /* Cb,Cr */, "_pic->buffer[0]"));
   94|   270k|    WELS_VERIFY_RETURN_PROC_IF (NULL, NULL == pPic->pBuffer[0], FreePicture (pPic, pMa));
  ------------------
  |  |  253|   270k|  if (bCaseIf) {                                            \
  |  |  ------------------
  |  |  |  Branch (253:7): [True: 0, False: 270k]
  |  |  ------------------
  |  |  254|      0|    fProc;                                                  \
  |  |  255|      0|    return iResult;                                         \
  |  |  256|      0|  }
  ------------------
   95|       |
   96|   270k|    memset (pPic->pBuffer[0], 128, (iLumaSize + (iChromaSize << 1)));
   97|   270k|    pPic->iLinesize[0] = iPicWidth;
   98|   270k|    pPic->iLinesize[1] = pPic->iLinesize[2] = iPicChromaWidth;
   99|   270k|    pPic->pBuffer[1]   = pPic->pBuffer[0] + iLumaSize;
  100|   270k|    pPic->pBuffer[2]   = pPic->pBuffer[1] + iChromaSize;
  101|   270k|    pPic->pData[0]     = pPic->pBuffer[0] + (1 + pPic->iLinesize[0]) * PADDING_LENGTH;
  ------------------
  |  |   49|   270k|#define PADDING_LENGTH 32 // reference extension
  ------------------
  102|   270k|    pPic->pData[1]     = pPic->pBuffer[1] + /*WELS_ALIGN*/ (((1 + pPic->iLinesize[1]) * PADDING_LENGTH) >> 1);
  ------------------
  |  |   49|   270k|#define PADDING_LENGTH 32 // reference extension
  ------------------
  103|   270k|    pPic->pData[2]     = pPic->pBuffer[2] + /*WELS_ALIGN*/ (((1 + pPic->iLinesize[2]) * PADDING_LENGTH) >> 1);
  ------------------
  |  |   49|   270k|#define PADDING_LENGTH 32 // reference extension
  ------------------
  104|   270k|  }
  105|   270k|  pPic->iPlanes        = 3;    // yv12 in default
  106|   270k|  pPic->iWidthInPixel  = kiPicWidth;
  107|   270k|  pPic->iHeightInPixel = kiPicHeight;
  108|   270k|  pPic->iFrameNum      = -1;
  109|   270k|  pPic->iRefCount = 0;
  110|   270k|  pPic->pSetUnRef = NULL;
  111|       |
  112|   270k|  uint32_t uiMbWidth = (kiPicWidth + 15) >> 4;
  113|   270k|  uint32_t uiMbHeight = (kiPicHeight + 15) >> 4;
  114|   270k|  uint32_t uiMbCount = uiMbWidth * uiMbHeight;
  115|       |
  116|   270k|  pPic->pMbCorrectlyDecodedFlag = (bool*)pMa->WelsMallocz (uiMbCount * sizeof (bool), "pPic->pMbCorrectlyDecodedFlag");
  117|   270k|  pPic->pNzc = GetThreadCount (pCtx) > 1 ? (int8_t (*)[24])pMa->WelsMallocz (uiMbCount * 24, "pPic->pNzc") : NULL;
  ------------------
  |  Branch (117:16): [True: 0, False: 270k]
  ------------------
  118|   270k|  pPic->pMbType = (uint32_t*)pMa->WelsMallocz (uiMbCount * sizeof (uint32_t), "pPic->pMbType");
  119|   270k|  pPic->pMv[LIST_0] = (int16_t (*)[16][2])pMa->WelsMallocz (uiMbCount * sizeof (
  120|   270k|                        int16_t) * MV_A * MB_BLOCK4x4_NUM, "pPic->pMv[]");
  ------------------
  |  |   57|   270k|#define MB_BLOCK4x4_NUM         16
  ------------------
  121|   270k|  pPic->pMv[LIST_1] = (int16_t (*)[16][2])pMa->WelsMallocz (uiMbCount * sizeof (
  122|   270k|                        int16_t) * MV_A * MB_BLOCK4x4_NUM, "pPic->pMv[]");
  ------------------
  |  |   57|   270k|#define MB_BLOCK4x4_NUM         16
  ------------------
  123|   270k|  pPic->pRefIndex[LIST_0] = (int8_t (*)[16])pMa->WelsMallocz (uiMbCount * sizeof (
  124|   270k|                              int8_t) * MB_BLOCK4x4_NUM, "pCtx->sMb.pRefIndex[]");
  ------------------
  |  |   57|   270k|#define MB_BLOCK4x4_NUM         16
  ------------------
  125|   270k|  pPic->pRefIndex[LIST_1] = (int8_t (*)[16])pMa->WelsMallocz (uiMbCount * sizeof (
  126|   270k|                              int8_t) * MB_BLOCK4x4_NUM, "pCtx->sMb.pRefIndex[]");
  ------------------
  |  |   57|   270k|#define MB_BLOCK4x4_NUM         16
  ------------------
  127|   270k|  if (pCtx->pThreadCtx != NULL) {
  ------------------
  |  Branch (127:7): [True: 0, False: 270k]
  ------------------
  128|      0|    pPic->pReadyEvent = (SWelsDecEvent*)pMa->WelsMallocz (uiMbHeight * sizeof (SWelsDecEvent), "pPic->pReadyEvent");
  129|      0|    for (uint32_t i = 0; i < uiMbHeight; ++i) {
  ------------------
  |  Branch (129:26): [True: 0, False: 0]
  ------------------
  130|      0|      CREATE_EVENT (&pPic->pReadyEvent[i], 1, 0, NULL);
  ------------------
  |  |  137|      0|  EventCreate(ph,(int)(manualreset),(int)(initial_state))
  ------------------
  131|      0|    }
  132|   270k|  } else {
  133|   270k|    pPic->pReadyEvent = NULL;
  134|   270k|  }
  135|       |
  136|   270k|  return pPic;
  137|   270k|}
_ZN7WelsDec11FreePictureEPNS_8SPictureEPN10WelsCommon12CMemoryAlignE:
  139|   270k|void FreePicture (PPicture pPic, CMemoryAlign* pMa) {
  140|   270k|  if (NULL != pPic) {
  ------------------
  |  Branch (140:7): [True: 270k, False: 0]
  ------------------
  141|   270k|    if (pPic->pBuffer[0]) {
  ------------------
  |  Branch (141:9): [True: 270k, False: 0]
  ------------------
  142|   270k|      pMa->WelsFree (pPic->pBuffer[0], "pPic->pBuffer[0]");
  143|   270k|      pPic->pBuffer[0] = NULL;
  144|   270k|    }
  145|       |
  146|   270k|    if (pPic->pMbCorrectlyDecodedFlag) {
  ------------------
  |  Branch (146:9): [True: 270k, False: 0]
  ------------------
  147|   270k|      pMa->WelsFree (pPic->pMbCorrectlyDecodedFlag, "pPic->pMbCorrectlyDecodedFlag");
  148|   270k|      pPic->pMbCorrectlyDecodedFlag = NULL;
  149|   270k|    }
  150|       |
  151|   270k|    if (pPic->pNzc) {
  ------------------
  |  Branch (151:9): [True: 0, False: 270k]
  ------------------
  152|      0|      pMa->WelsFree (pPic->pNzc, "pPic->pNzc");
  153|      0|      pPic->pNzc = NULL;
  154|      0|    }
  155|       |
  156|   270k|    if (pPic->pMbType) {
  ------------------
  |  Branch (156:9): [True: 270k, False: 0]
  ------------------
  157|   270k|      pMa->WelsFree (pPic->pMbType, "pPic->pMbType");
  158|   270k|      pPic->pMbType = NULL;
  159|   270k|    }
  160|       |
  161|   810k|    for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (161:36): [True: 540k, False: 270k]
  ------------------
  162|   540k|      if (pPic->pMv[listIdx]) {
  ------------------
  |  Branch (162:11): [True: 540k, False: 0]
  ------------------
  163|   540k|        pMa->WelsFree (pPic->pMv[listIdx], "pPic->pMv[]");
  164|   540k|        pPic->pMv[listIdx] = NULL;
  165|   540k|      }
  166|       |
  167|   540k|      if (pPic->pRefIndex[listIdx]) {
  ------------------
  |  Branch (167:11): [True: 540k, False: 0]
  ------------------
  168|   540k|        pMa->WelsFree (pPic->pRefIndex[listIdx], "pPic->pRefIndex[]");
  169|   540k|        pPic->pRefIndex[listIdx] = NULL;
  170|   540k|      }
  171|   540k|    }
  172|   270k|    if (pPic->pReadyEvent != NULL) {
  ------------------
  |  Branch (172:9): [True: 0, False: 270k]
  ------------------
  173|      0|      uint32_t uiMbHeight = (pPic->iHeightInPixel + 15) >> 4;
  174|      0|      for (uint32_t i = 0; i < uiMbHeight; ++i) {
  ------------------
  |  Branch (174:28): [True: 0, False: 0]
  ------------------
  175|      0|        CLOSE_EVENT (&pPic->pReadyEvent[i]);
  ------------------
  |  |  143|      0|  EventDestroy(ph)
  ------------------
  176|      0|      }
  177|      0|      pMa->WelsFree (pPic->pReadyEvent, "pPic->pReadyEvent");
  178|      0|      pPic->pReadyEvent = NULL;
  179|      0|    }
  180|   270k|    pMa->WelsFree (pPic, "pPic");
  181|       |    pPic = NULL;
  182|   270k|  }
  183|   270k|}
_ZN7WelsDec11PrefetchPicEPNS_10TagPicBuffE:
  184|   657k|PPicture PrefetchPic (PPicBuff pPicBuf) {
  185|   657k|  int32_t iPicIdx = 0;
  186|   657k|  PPicture pPic  = NULL;
  187|       |
  188|   657k|  if (pPicBuf->iCapacity == 0) {
  ------------------
  |  Branch (188:7): [True: 0, False: 657k]
  ------------------
  189|      0|    return NULL;
  190|      0|  }
  191|       |
  192|   752k|  for (iPicIdx = pPicBuf->iCurrentIdx + 1; iPicIdx < pPicBuf->iCapacity ; ++iPicIdx) {
  ------------------
  |  Branch (192:44): [True: 548k, False: 203k]
  ------------------
  193|   548k|    if (pPicBuf->ppPic[iPicIdx] != NULL && !pPicBuf->ppPic[iPicIdx]->bUsedAsRef
  ------------------
  |  Branch (193:9): [True: 548k, False: 0]
  |  Branch (193:44): [True: 471k, False: 77.8k]
  ------------------
  194|   471k|        && pPicBuf->ppPic[iPicIdx]->iRefCount <= 0) {
  ------------------
  |  Branch (194:12): [True: 454k, False: 16.7k]
  ------------------
  195|   454k|      pPic = pPicBuf->ppPic[iPicIdx];
  196|   454k|      break;
  197|   454k|    }
  198|   548k|  }
  199|   657k|  if (pPic != NULL) {
  ------------------
  |  Branch (199:7): [True: 454k, False: 203k]
  ------------------
  200|   454k|    pPicBuf->iCurrentIdx = iPicIdx;
  201|   454k|    pPic->iPicBuffIdx = iPicIdx;
  202|   454k|    return pPic;
  203|   454k|  }
  204|   233k|  for (iPicIdx = 0 ; iPicIdx <= pPicBuf->iCurrentIdx ; ++iPicIdx) {
  ------------------
  |  Branch (204:22): [True: 228k, False: 4.44k]
  ------------------
  205|   228k|    if (pPicBuf->ppPic[iPicIdx] != NULL && !pPicBuf->ppPic[iPicIdx]->bUsedAsRef
  ------------------
  |  Branch (205:9): [True: 228k, False: 0]
  |  Branch (205:44): [True: 221k, False: 7.62k]
  ------------------
  206|   221k|        && pPicBuf->ppPic[iPicIdx]->iRefCount <= 0) {
  ------------------
  |  Branch (206:12): [True: 199k, False: 21.9k]
  ------------------
  207|   199k|      pPic = pPicBuf->ppPic[iPicIdx];
  208|   199k|      break;
  209|   199k|    }
  210|   228k|  }
  211|       |
  212|   203k|  pPicBuf->iCurrentIdx = iPicIdx;
  213|   203k|  if (pPic != NULL) {
  ------------------
  |  Branch (213:7): [True: 199k, False: 4.44k]
  ------------------
  214|   199k|    pPic->iPicBuffIdx = iPicIdx;
  215|   199k|  }
  216|   203k|  return pPic;
  217|   657k|}

_ZN7WelsDec23WelsFillRecNeededMbInfoEPNS_21TagWelsDecoderContextEbPNS_10TagDqLayerE:
   47|   152k|void WelsFillRecNeededMbInfo (PWelsDecoderContext pCtx, bool bOutput, PDqLayer pCurDqLayer) {
   48|   152k|  PPicture pCurPic = pCtx->pDec;
   49|   152k|  int32_t iLumaStride   = pCurPic->iLinesize[0];
   50|   152k|  int32_t iChromaStride = pCurPic->iLinesize[1];
   51|   152k|  int32_t iMbX = pCurDqLayer->iMbX;
   52|   152k|  int32_t iMbY = pCurDqLayer->iMbY;
   53|       |
   54|   152k|  pCurDqLayer->iLumaStride = iLumaStride;
   55|   152k|  pCurDqLayer->iChromaStride = iChromaStride;
   56|       |
   57|   152k|  if (bOutput) {
  ------------------
  |  Branch (57:7): [True: 152k, False: 0]
  ------------------
   58|   152k|    pCurDqLayer->pPred[0] = pCurPic->pData[0] + ((iMbY * iLumaStride + iMbX) << 4);
   59|   152k|    pCurDqLayer->pPred[1] = pCurPic->pData[1] + ((iMbY * iChromaStride + iMbX) << 3);
   60|   152k|    pCurDqLayer->pPred[2] = pCurPic->pData[2] + ((iMbY * iChromaStride + iMbX) << 3);
   61|   152k|  }
   62|   152k|}
_ZN7WelsDec9RecI8x8MbEiPNS_21TagWelsDecoderContextEPsPNS_10TagDqLayerE:
   64|   100k|int32_t RecI8x8Mb (int32_t iMbXy, PWelsDecoderContext pCtx, int16_t* pScoeffLevel, PDqLayer pDqLayer) {
   65|   100k|  RecI8x8Luma (iMbXy, pCtx, pScoeffLevel, pDqLayer);
   66|   100k|  RecI4x4Chroma (iMbXy, pCtx, pScoeffLevel, pDqLayer);
   67|   100k|  return ERR_NONE;
   68|   100k|}
_ZN7WelsDec11RecI8x8LumaEiPNS_21TagWelsDecoderContextEPsPNS_10TagDqLayerE:
   70|   100k|int32_t RecI8x8Luma (int32_t iMbXy, PWelsDecoderContext pCtx, int16_t* pScoeffLevel, PDqLayer pDqLayer) {
   71|       |  /*****get local variable from outer variable********/
   72|       |  /*prediction info*/
   73|   100k|  uint8_t* pPred = pDqLayer->pPred[0];
   74|       |
   75|   100k|  int32_t iLumaStride = pDqLayer->iLumaStride;
   76|   100k|  int32_t* pBlockOffset = pCtx->iDecBlockOffsetArray;
   77|   100k|  PGetIntraPred8x8Func* pGetI8x8LumaPredFunc = pCtx->pGetI8x8LumaPredFunc;
   78|       |
   79|   100k|  int8_t* pIntra8x8PredMode = pDqLayer->pIntra4x4FinalMode[iMbXy]; // I_NxN
   80|   100k|  int16_t* pRS = pScoeffLevel;
   81|       |  /*itransform info*/
   82|   100k|  PIdctResAddPredFunc pIdctResAddPredFunc = pCtx->pIdctResAddPredFunc8x8;
   83|       |
   84|       |  /*************local variable********************/
   85|   100k|  uint8_t i = 0;
   86|   100k|  bool bTLAvail[4], bTRAvail[4];
   87|       |  // Top-Right : Left : Top-Left : Top
   88|   100k|  bTLAvail[0] = !! (pDqLayer->pIntraNxNAvailFlag[iMbXy] & 0x02);
   89|   100k|  bTLAvail[1] = !! (pDqLayer->pIntraNxNAvailFlag[iMbXy] & 0x01);
   90|   100k|  bTLAvail[2] = !! (pDqLayer->pIntraNxNAvailFlag[iMbXy] & 0x04);
   91|   100k|  bTLAvail[3] = true;
   92|       |
   93|   100k|  bTRAvail[0] = !! (pDqLayer->pIntraNxNAvailFlag[iMbXy] & 0x01);
   94|   100k|  bTRAvail[1] = !! (pDqLayer->pIntraNxNAvailFlag[iMbXy] & 0x08);
   95|   100k|  bTRAvail[2] = true;
   96|   100k|  bTRAvail[3] = false;
   97|       |
   98|       |  /*************real process*********************/
   99|   500k|  for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (99:15): [True: 400k, False: 100k]
  ------------------
  100|       |
  101|   400k|    uint8_t* pPredI8x8 = pPred + pBlockOffset[i << 2];
  102|   400k|    uint8_t uiMode = pIntra8x8PredMode[g_kuiScan4[i << 2]];
  103|       |
  104|   400k|    pGetI8x8LumaPredFunc[uiMode] (pPredI8x8, iLumaStride, bTLAvail[i], bTRAvail[i]);
  105|       |
  106|   400k|    int32_t iIndex = g_kuiMbCountScan4Idx[i << 2];
  107|   400k|    if (pDqLayer->pNzc[iMbXy][iIndex] || pDqLayer->pNzc[iMbXy][iIndex + 1] || pDqLayer->pNzc[iMbXy][iIndex + 4]
  ------------------
  |  Branch (107:9): [True: 35.6k, False: 364k]
  |  Branch (107:42): [True: 2.07k, False: 362k]
  |  Branch (107:79): [True: 2.73k, False: 359k]
  ------------------
  108|   359k|        || pDqLayer->pNzc[iMbXy][iIndex + 5]) {
  ------------------
  |  Branch (108:12): [True: 748, False: 358k]
  ------------------
  109|  41.2k|      int16_t* pRSI8x8 = &pRS[i << 6];
  110|  41.2k|      pIdctResAddPredFunc (pPredI8x8, iLumaStride, pRSI8x8);
  111|  41.2k|    }
  112|   400k|  }
  113|       |
  114|   100k|  return ERR_NONE;
  115|   100k|}
_ZN7WelsDec9RecI4x4MbEiPNS_21TagWelsDecoderContextEPsPNS_10TagDqLayerE:
  117|  17.7k|int32_t RecI4x4Mb (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t* pScoeffLevel, PDqLayer pDqLayer) {
  118|  17.7k|  RecI4x4Luma (iMBXY, pCtx, pScoeffLevel, pDqLayer);
  119|  17.7k|  RecI4x4Chroma (iMBXY, pCtx, pScoeffLevel, pDqLayer);
  120|  17.7k|  return ERR_NONE;
  121|  17.7k|}
_ZN7WelsDec11RecI4x4LumaEiPNS_21TagWelsDecoderContextEPsPNS_10TagDqLayerE:
  124|  17.7k|int32_t RecI4x4Luma (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t* pScoeffLevel, PDqLayer pDqLayer) {
  125|       |  /*****get local variable from outer variable********/
  126|       |  /*prediction info*/
  127|  17.7k|  uint8_t* pPred = pDqLayer->pPred[0];
  128|       |
  129|  17.7k|  int32_t iLumaStride = pDqLayer->iLumaStride;
  130|  17.7k|  int32_t* pBlockOffset = pCtx->iDecBlockOffsetArray;
  131|  17.7k|  PGetIntraPredFunc* pGetI4x4LumaPredFunc = pCtx->pGetI4x4LumaPredFunc;
  132|       |
  133|  17.7k|  int8_t* pIntra4x4PredMode = pDqLayer->pIntra4x4FinalMode[iMBXY];
  134|  17.7k|  int16_t* pRS = pScoeffLevel;
  135|       |  /*itransform info*/
  136|  17.7k|  PIdctResAddPredFunc pIdctResAddPredFunc = pCtx->pIdctResAddPredFunc;
  137|       |
  138|       |
  139|       |  /*************local variable********************/
  140|  17.7k|  uint8_t i = 0;
  141|       |
  142|       |  /*************real process*********************/
  143|   301k|  for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (143:15): [True: 283k, False: 17.7k]
  ------------------
  144|       |
  145|   283k|    uint8_t* pPredI4x4 = pPred + pBlockOffset[i];
  146|   283k|    uint8_t uiMode = pIntra4x4PredMode[g_kuiScan4[i]];
  147|       |
  148|   283k|    pGetI4x4LumaPredFunc[uiMode] (pPredI4x4, iLumaStride);
  149|       |
  150|   283k|    if (pDqLayer->pNzc[iMBXY][g_kuiMbCountScan4Idx[i]]) {
  ------------------
  |  Branch (150:9): [True: 8.36k, False: 275k]
  ------------------
  151|  8.36k|      int16_t* pRSI4x4 = &pRS[i << 4];
  152|  8.36k|      pIdctResAddPredFunc (pPredI4x4, iLumaStride, pRSI4x4);
  153|  8.36k|    }
  154|   283k|  }
  155|       |
  156|  17.7k|  return ERR_NONE;
  157|  17.7k|}
_ZN7WelsDec13RecI4x4ChromaEiPNS_21TagWelsDecoderContextEPsPNS_10TagDqLayerE:
  160|   117k|int32_t RecI4x4Chroma (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t* pScoeffLevel, PDqLayer pDqLayer) {
  161|   117k|  int32_t iChromaStride = pCtx->pCurDqLayer->pDec->iLinesize[1];
  162|       |
  163|   117k|  int8_t iChromaPredMode = pDqLayer->pChromaPredMode[iMBXY];
  164|       |
  165|   117k|  PGetIntraPredFunc* pGetIChromaPredFunc = pCtx->pGetIChromaPredFunc;
  166|       |
  167|   117k|  uint8_t* pPred = pDqLayer->pPred[1];
  168|       |
  169|   117k|  pGetIChromaPredFunc[iChromaPredMode] (pPred, iChromaStride);
  170|   117k|  pPred = pDqLayer->pPred[2];
  171|   117k|  pGetIChromaPredFunc[iChromaPredMode] (pPred, iChromaStride);
  172|       |
  173|   117k|  RecChroma (iMBXY, pCtx, pScoeffLevel, pDqLayer);
  174|       |
  175|   117k|  return ERR_NONE;
  176|   117k|}
_ZN7WelsDec11RecI16x16MbEiPNS_21TagWelsDecoderContextEPsPNS_10TagDqLayerE:
  179|  35.2k|int32_t RecI16x16Mb (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t* pScoeffLevel, PDqLayer pDqLayer) {
  180|       |  /*decoder use, encoder no use*/
  181|  35.2k|  int8_t iI16x16PredMode = pDqLayer->pIntraPredMode[iMBXY][7];
  182|  35.2k|  int8_t iChromaPredMode = pDqLayer->pChromaPredMode[iMBXY];
  183|  35.2k|  PGetIntraPredFunc* pGetIChromaPredFunc = pCtx->pGetIChromaPredFunc;
  184|  35.2k|  PGetIntraPredFunc* pGetI16x16LumaPredFunc = pCtx->pGetI16x16LumaPredFunc;
  185|  35.2k|  int32_t iUVStride = pCtx->pCurDqLayer->pDec->iLinesize[1];
  186|       |
  187|       |  /*common use by decoder&encoder*/
  188|  35.2k|  int32_t iYStride = pDqLayer->iLumaStride;
  189|  35.2k|  int16_t* pRS = pScoeffLevel;
  190|       |
  191|  35.2k|  uint8_t* pPred = pDqLayer->pPred[0];
  192|       |
  193|  35.2k|  PIdctFourResAddPredFunc pIdctFourResAddPredFunc = pCtx->pIdctFourResAddPredFunc;
  194|       |
  195|       |  /*decode i16x16 y*/
  196|  35.2k|  pGetI16x16LumaPredFunc[iI16x16PredMode] (pPred, iYStride);
  197|       |
  198|       |  /*1 mb is divided 16 4x4_block to idct*/
  199|  35.2k|  const int8_t* pNzc = pDqLayer->pNzc[iMBXY];
  200|  35.2k|  pIdctFourResAddPredFunc (pPred + 0 * iYStride + 0, iYStride, pRS + 0 * 64, pNzc +  0);
  201|  35.2k|  pIdctFourResAddPredFunc (pPred + 0 * iYStride + 8, iYStride, pRS + 1 * 64, pNzc +  2);
  202|  35.2k|  pIdctFourResAddPredFunc (pPred + 8 * iYStride + 0, iYStride, pRS + 2 * 64, pNzc +  8);
  203|  35.2k|  pIdctFourResAddPredFunc (pPred + 8 * iYStride + 8, iYStride, pRS + 3 * 64, pNzc + 10);
  204|       |
  205|       |  /*decode intra mb cb&cr*/
  206|  35.2k|  pPred = pDqLayer->pPred[1];
  207|  35.2k|  pGetIChromaPredFunc[iChromaPredMode] (pPred, iUVStride);
  208|  35.2k|  pPred = pDqLayer->pPred[2];
  209|  35.2k|  pGetIChromaPredFunc[iChromaPredMode] (pPred, iUVStride);
  210|  35.2k|  RecChroma (iMBXY, pCtx, pScoeffLevel, pDqLayer);
  211|       |
  212|  35.2k|  return ERR_NONE;
  213|  35.2k|}
_ZN7WelsDec6BaseMCEPNS_21TagWelsDecoderContextEPNS_14TagMCRefMemberERKiRKaiiP9TagMcFunciiPs:
  247|  81.6M|             int32_t iBlkWidth, int32_t iBlkHeight, int16_t iMVs[2]) {
  248|  81.6M|  int32_t iFullMVx = (iXOffset << 2) + iMVs[0]; //quarter pixel
  249|  81.6M|  int32_t iFullMVy = (iYOffset << 2) + iMVs[1];
  250|  81.6M|  iFullMVx = WELS_CLIP3 (iFullMVx, ((-PADDING_LENGTH + 2) * (1 << 2)),
  ------------------
  |  |  204|  81.6M|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 55.5k, False: 81.5M]
  |  |  |  Branch (204:55): [True: 30.1k, False: 81.5M]
  |  |  ------------------
  ------------------
  251|  81.6M|                         ((pMCRefMem->iPicWidth + PADDING_LENGTH - 19) * (1 << 2)));
  252|  81.6M|  iFullMVy = WELS_CLIP3 (iFullMVy, ((-PADDING_LENGTH + 2) * (1 << 2)),
  ------------------
  |  |  204|  81.6M|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 170k, False: 81.4M]
  |  |  |  Branch (204:55): [True: 121k, False: 81.3M]
  |  |  ------------------
  ------------------
  253|  81.6M|                         ((pMCRefMem->iPicHeight + PADDING_LENGTH - 19) * (1 << 2)));
  254|       |
  255|  81.6M|  if (GetThreadCount (pCtx) > 1 && iRefIdx >= 0) {
  ------------------
  |  Branch (255:7): [True: 0, False: 81.6M]
  |  Branch (255:36): [True: 0, False: 0]
  ------------------
  256|       |    // wait for the lines of reference macroblock (3 + 16).
  257|      0|    PPicture pRefPic = pCtx->sRefPic.pRefList[listIdx][iRefIdx];
  258|      0|    if (pCtx->bNewSeqBegin && (pCtx->iErrorCode & dsRefLost)) {
  ------------------
  |  Branch (258:9): [True: 0, False: 0]
  |  Branch (258:31): [True: 0, False: 0]
  ------------------
  259|       |      //set event if refpic is lost to prevent from infinite waiting.
  260|      0|      if (!pRefPic->pReadyEvent[0].isSignaled) {
  ------------------
  |  Branch (260:11): [True: 0, False: 0]
  ------------------
  261|      0|        for (uint32_t ln = 0; ln < pCtx->sMb.iMbHeight; ++ln) {
  ------------------
  |  Branch (261:31): [True: 0, False: 0]
  ------------------
  262|      0|          SET_EVENT (&pRefPic->pReadyEvent[ln]);
  ------------------
  |  |  149|      0|  EventPost(ph)
  ------------------
  263|      0|        }
  264|      0|      }
  265|      0|    }
  266|      0|    int32_t offset = (iFullMVy >> 2) + iBlkHeight + 3 + 16;
  267|      0|    if (offset > pCtx->lastReadyHeightOffset[listIdx][iRefIdx]) {
  ------------------
  |  Branch (267:9): [True: 0, False: 0]
  ------------------
  268|      0|      const int32_t down_line = WELS_MIN (offset >> 4, int32_t (pCtx->sMb.iMbHeight) - 1);
  ------------------
  |  |   95|      0|#define WELS_MIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (95:25): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  269|      0|      if (pRefPic->pReadyEvent[down_line].isSignaled != 1) {
  ------------------
  |  Branch (269:11): [True: 0, False: 0]
  ------------------
  270|      0|        WAIT_EVENT (&pRefPic->pReadyEvent[down_line], WELS_DEC_THREAD_WAIT_INFINITE);
  ------------------
  |  |  158|      0|  EventWait(ph, (int32_t)timeout)
  ------------------
  271|      0|      }
  272|      0|      pCtx->lastReadyHeightOffset[listIdx][iRefIdx] = offset;
  273|      0|    }
  274|      0|  }
  275|       |
  276|  81.6M|  int32_t iSrcPixOffsetLuma = (iFullMVx >> 2) + (iFullMVy >> 2) * pMCRefMem->iSrcLineLuma;
  277|  81.6M|  int32_t iSrcPixOffsetChroma = (iFullMVx >> 3) + (iFullMVy >> 3) * pMCRefMem->iSrcLineChroma;
  278|       |
  279|  81.6M|  int32_t iBlkWidthChroma = iBlkWidth >> 1;
  280|  81.6M|  int32_t iBlkHeightChroma = iBlkHeight >> 1;
  281|       |
  282|  81.6M|  uint8_t* pSrcY = pMCRefMem->pSrcY + iSrcPixOffsetLuma;
  283|  81.6M|  uint8_t* pSrcU = pMCRefMem->pSrcU + iSrcPixOffsetChroma;
  284|  81.6M|  uint8_t* pSrcV = pMCRefMem->pSrcV + iSrcPixOffsetChroma;
  285|  81.6M|  uint8_t* pDstY = pMCRefMem->pDstY;
  286|  81.6M|  uint8_t* pDstU = pMCRefMem->pDstU;
  287|  81.6M|  uint8_t* pDstV = pMCRefMem->pDstV;
  288|       |
  289|  81.6M|  pMCFunc->pMcLumaFunc (pSrcY, pMCRefMem->iSrcLineLuma, pDstY, pMCRefMem->iDstLineLuma, iFullMVx, iFullMVy, iBlkWidth,
  290|  81.6M|                        iBlkHeight);
  291|  81.6M|  pMCFunc->pMcChromaFunc (pSrcU, pMCRefMem->iSrcLineChroma, pDstU, pMCRefMem->iDstLineChroma, iFullMVx, iFullMVy,
  292|  81.6M|                          iBlkWidthChroma, iBlkHeightChroma);
  293|  81.6M|  pMCFunc->pMcChromaFunc (pSrcV, pMCRefMem->iSrcLineChroma, pDstV, pMCRefMem->iDstLineChroma, iFullMVx, iFullMVy,
  294|  81.6M|                          iBlkWidthChroma, iBlkHeightChroma);
  295|       |
  296|  81.6M|}
_ZN7WelsDec12GetInterPredEPhS0_S0_PNS_21TagWelsDecoderContextE:
  462|  3.69M|int32_t GetInterPred (uint8_t* pPredY, uint8_t* pPredCb, uint8_t* pPredCr, PWelsDecoderContext pCtx) {
  463|  3.69M|  sMCRefMember pMCRefMem;
  464|  3.69M|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
  465|  3.69M|  SMcFunc* pMCFunc = &pCtx->sMcFunc;
  466|       |
  467|  3.69M|  int32_t iMBXY = pCurDqLayer->iMbXyIndex;
  468|       |
  469|  3.69M|  int16_t iMVs[2] = {0};
  470|       |
  471|  3.69M|  uint32_t iMBType = pCurDqLayer->pDec->pMbType[iMBXY];
  472|       |
  473|  3.69M|  int32_t iMBOffsetX = pCurDqLayer->iMbX << 4;
  474|  3.69M|  int32_t iMBOffsetY = pCurDqLayer->iMbY << 4;
  475|       |
  476|  3.69M|  int32_t iDstLineLuma   = pCtx->pDec->iLinesize[0];
  477|  3.69M|  int32_t iDstLineChroma = pCtx->pDec->iLinesize[1];
  478|       |
  479|  3.69M|  int32_t iBlk8X, iBlk8Y, iBlk4X, iBlk4Y, i, j, iIIdx, iJIdx;
  480|       |
  481|  3.69M|  pMCRefMem.iPicWidth = (pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iMbWidth << 4);
  482|  3.69M|  pMCRefMem.iPicHeight = (pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iMbHeight << 4);
  483|       |
  484|  3.69M|  pMCRefMem.pDstY = pPredY;
  485|  3.69M|  pMCRefMem.pDstU = pPredCb;
  486|  3.69M|  pMCRefMem.pDstV = pPredCr;
  487|       |
  488|  3.69M|  pMCRefMem.iDstLineLuma   = iDstLineLuma;
  489|  3.69M|  pMCRefMem.iDstLineChroma = iDstLineChroma;
  490|       |
  491|  3.69M|  int8_t iRefIndex = 0;
  492|       |
  493|  3.69M|  switch (iMBType) {
  494|  3.45M|  case MB_TYPE_SKIP:
  ------------------
  |  |  283|  3.45M|#define MB_TYPE_SKIP        0x00000100
  ------------------
  |  Branch (494:3): [True: 3.45M, False: 245k]
  ------------------
  495|  3.61M|  case MB_TYPE_16x16:
  ------------------
  |  |  278|  3.61M|#define MB_TYPE_16x16       0x00000008
  ------------------
  |  Branch (495:3): [True: 165k, False: 3.53M]
  ------------------
  496|  3.61M|    iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][0][0];
  497|  3.61M|    iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][0][1];
  498|  3.61M|    iRefIndex = pCurDqLayer->pDec->pRefIndex[0][iMBXY][0];
  499|  3.61M|    WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, iRefIndex, LIST_0));
  ------------------
  |  |   52|  3.61M|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  3.61M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  3.61M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 3.61M]
  |  |  ------------------
  |  |   55|  3.61M|    return uiRetTmp; \
  |  |   56|  3.61M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 3.61M]
  |  |  ------------------
  ------------------
  500|  3.61M|    BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex, iMBOffsetX, iMBOffsetY, pMCFunc, 16, 16, iMVs);
  501|       |
  502|  3.61M|    if (pCurDqLayer->bUseWeightPredictionFlag) {
  ------------------
  |  Branch (502:9): [True: 268k, False: 3.35M]
  ------------------
  503|   268k|      iRefIndex = pCurDqLayer->pDec->pRefIndex[0][iMBXY][0];
  504|   268k|      WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 16, 16);
  505|   268k|    }
  506|  3.61M|    break;
  507|  29.6k|  case MB_TYPE_16x8:
  ------------------
  |  |  279|  29.6k|#define MB_TYPE_16x8        0x00000010
  ------------------
  |  Branch (507:3): [True: 29.6k, False: 3.66M]
  ------------------
  508|  29.6k|    iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][0][0];
  509|  29.6k|    iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][0][1];
  510|  29.6k|    iRefIndex = pCurDqLayer->pDec->pRefIndex[0][iMBXY][0];
  511|  29.6k|    WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, iRefIndex, LIST_0));
  ------------------
  |  |   52|  29.6k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  29.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  29.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 29.6k]
  |  |  ------------------
  |  |   55|  29.6k|    return uiRetTmp; \
  |  |   56|  29.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 29.6k]
  |  |  ------------------
  ------------------
  512|  29.6k|    BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex, iMBOffsetX, iMBOffsetY, pMCFunc, 16, 8, iMVs);
  513|       |
  514|  29.6k|    if (pCurDqLayer->bUseWeightPredictionFlag) {
  ------------------
  |  Branch (514:9): [True: 1.43k, False: 28.2k]
  ------------------
  515|  1.43k|      WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 16, 8);
  516|  1.43k|    }
  517|       |
  518|  29.6k|    iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][8][0];
  519|  29.6k|    iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][8][1];
  520|  29.6k|    iRefIndex = pCurDqLayer->pDec->pRefIndex[0][iMBXY][8];
  521|  29.6k|    WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, iRefIndex, LIST_0));
  ------------------
  |  |   52|  29.6k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  29.6k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  29.6k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 29.6k]
  |  |  ------------------
  |  |   55|  29.6k|    return uiRetTmp; \
  |  |   56|  29.6k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 29.6k]
  |  |  ------------------
  ------------------
  522|  29.6k|    pMCRefMem.pDstY = pPredY  + (iDstLineLuma << 3);
  523|  29.6k|    pMCRefMem.pDstU = pPredCb + (iDstLineChroma << 2);
  524|  29.6k|    pMCRefMem.pDstV = pPredCr + (iDstLineChroma << 2);
  525|  29.6k|    BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex, iMBOffsetX, iMBOffsetY + 8, pMCFunc, 16, 8, iMVs);
  526|       |
  527|  29.6k|    if (pCurDqLayer->bUseWeightPredictionFlag) {
  ------------------
  |  Branch (527:9): [True: 1.43k, False: 28.2k]
  ------------------
  528|  1.43k|      WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 16, 8);
  529|  1.43k|    }
  530|  29.6k|    break;
  531|  21.5k|  case MB_TYPE_8x16:
  ------------------
  |  |  280|  21.5k|#define MB_TYPE_8x16        0x00000020
  ------------------
  |  Branch (531:3): [True: 21.5k, False: 3.67M]
  ------------------
  532|  21.5k|    iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][0][0];
  533|  21.5k|    iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][0][1];
  534|  21.5k|    iRefIndex = pCurDqLayer->pDec->pRefIndex[0][iMBXY][0];
  535|  21.5k|    WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, iRefIndex, LIST_0));
  ------------------
  |  |   52|  21.5k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  21.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  21.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 21.5k]
  |  |  ------------------
  |  |   55|  21.5k|    return uiRetTmp; \
  |  |   56|  21.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 21.5k]
  |  |  ------------------
  ------------------
  536|  21.5k|    BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex, iMBOffsetX, iMBOffsetY, pMCFunc, 8, 16, iMVs);
  537|  21.5k|    if (pCurDqLayer->bUseWeightPredictionFlag) {
  ------------------
  |  Branch (537:9): [True: 2.10k, False: 19.4k]
  ------------------
  538|  2.10k|      WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 8, 16);
  539|  2.10k|    }
  540|       |
  541|  21.5k|    iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][2][0];
  542|  21.5k|    iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][2][1];
  543|  21.5k|    iRefIndex = pCurDqLayer->pDec->pRefIndex[0][iMBXY][2];
  544|  21.5k|    WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, iRefIndex, LIST_0));
  ------------------
  |  |   52|  21.5k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  21.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  21.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 21.5k]
  |  |  ------------------
  |  |   55|  21.5k|    return uiRetTmp; \
  |  |   56|  21.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 21.5k]
  |  |  ------------------
  ------------------
  545|  21.5k|    pMCRefMem.pDstY = pPredY + 8;
  546|  21.5k|    pMCRefMem.pDstU = pPredCb + 4;
  547|  21.5k|    pMCRefMem.pDstV = pPredCr + 4;
  548|  21.5k|    BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex, iMBOffsetX + 8, iMBOffsetY, pMCFunc, 8, 16, iMVs);
  549|       |
  550|  21.5k|    if (pCurDqLayer->bUseWeightPredictionFlag) {
  ------------------
  |  Branch (550:9): [True: 2.10k, False: 19.4k]
  ------------------
  551|  2.10k|      WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 8, 16);
  552|  2.10k|    }
  553|  21.5k|    break;
  554|  26.8k|  case MB_TYPE_8x8:
  ------------------
  |  |  281|  26.8k|#define MB_TYPE_8x8         0x00000040
  ------------------
  |  Branch (554:3): [True: 26.8k, False: 3.67M]
  ------------------
  555|  28.2k|  case MB_TYPE_8x8_REF0: {
  ------------------
  |  |  282|  28.2k|#define MB_TYPE_8x8_REF0    0x00000080
  ------------------
  |  Branch (555:3): [True: 1.41k, False: 3.69M]
  ------------------
  556|  28.2k|    uint32_t iSubMBType;
  557|  28.2k|    int32_t iXOffset, iYOffset;
  558|  28.2k|    uint8_t* pDstY, *pDstU, *pDstV;
  559|   141k|    for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (559:17): [True: 112k, False: 28.2k]
  ------------------
  560|   112k|      iSubMBType = pCurDqLayer->pSubMbType[iMBXY][i];
  561|   112k|      iBlk8X = (i & 1) << 3;
  562|   112k|      iBlk8Y = (i >> 1) << 3;
  563|   112k|      iXOffset = iMBOffsetX + iBlk8X;
  564|   112k|      iYOffset = iMBOffsetY + iBlk8Y;
  565|       |
  566|   112k|      iIIdx = ((i >> 1) << 3) + ((i & 1) << 1);
  567|   112k|      iRefIndex = pCurDqLayer->pDec->pRefIndex[0][iMBXY][iIIdx];
  568|   112k|      WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, iRefIndex, LIST_0));
  ------------------
  |  |   52|   112k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|   112k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   112k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 112k]
  |  |  ------------------
  |  |   55|   112k|    return uiRetTmp; \
  |  |   56|   112k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 112k]
  |  |  ------------------
  ------------------
  569|   112k|      pDstY = pPredY + iBlk8X + iBlk8Y * iDstLineLuma;
  570|   112k|      pDstU = pPredCb + (iBlk8X >> 1) + (iBlk8Y >> 1) * iDstLineChroma;
  571|   112k|      pDstV = pPredCr + (iBlk8X >> 1) + (iBlk8Y >> 1) * iDstLineChroma;
  572|   112k|      pMCRefMem.pDstY = pDstY;
  573|   112k|      pMCRefMem.pDstU = pDstU;
  574|   112k|      pMCRefMem.pDstV = pDstV;
  575|   112k|      switch (iSubMBType) {
  576|  68.7k|      case SUB_MB_TYPE_8x8:
  ------------------
  |  |  294|  68.7k|#define SUB_MB_TYPE_8x8     0x00000001
  ------------------
  |  Branch (576:7): [True: 68.7k, False: 44.1k]
  ------------------
  577|  68.7k|        iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx][0];
  578|  68.7k|        iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx][1];
  579|  68.7k|        BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex, iXOffset, iYOffset, pMCFunc, 8, 8, iMVs);
  580|  68.7k|        if (pCurDqLayer->bUseWeightPredictionFlag) {
  ------------------
  |  Branch (580:13): [True: 1.01k, False: 67.7k]
  ------------------
  581|       |
  582|  1.01k|          WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 8, 8);
  583|  1.01k|        }
  584|       |
  585|  68.7k|        break;
  586|  18.5k|      case SUB_MB_TYPE_8x4:
  ------------------
  |  |  295|  18.5k|#define SUB_MB_TYPE_8x4     0x00000002
  ------------------
  |  Branch (586:7): [True: 18.5k, False: 94.3k]
  ------------------
  587|  18.5k|        iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx][0];
  588|  18.5k|        iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx][1];
  589|  18.5k|        BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex, iXOffset, iYOffset, pMCFunc, 8, 4, iMVs);
  590|  18.5k|        if (pCurDqLayer->bUseWeightPredictionFlag) {
  ------------------
  |  Branch (590:13): [True: 1.74k, False: 16.7k]
  ------------------
  591|       |
  592|  1.74k|          WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 8, 4);
  593|  1.74k|        }
  594|       |
  595|       |
  596|  18.5k|        iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx + 4][0];
  597|  18.5k|        iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx + 4][1];
  598|  18.5k|        pMCRefMem.pDstY += (iDstLineLuma << 2);
  599|  18.5k|        pMCRefMem.pDstU += (iDstLineChroma << 1);
  600|  18.5k|        pMCRefMem.pDstV += (iDstLineChroma << 1);
  601|  18.5k|        BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex, iXOffset, iYOffset + 4, pMCFunc, 8, 4, iMVs);
  602|  18.5k|        if (pCurDqLayer->bUseWeightPredictionFlag) {
  ------------------
  |  Branch (602:13): [True: 1.74k, False: 16.7k]
  ------------------
  603|       |
  604|  1.74k|          WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 8, 4);
  605|  1.74k|        }
  606|       |
  607|  18.5k|        break;
  608|  22.5k|      case SUB_MB_TYPE_4x8:
  ------------------
  |  |  296|  22.5k|#define SUB_MB_TYPE_4x8     0x00000004
  ------------------
  |  Branch (608:7): [True: 22.5k, False: 90.3k]
  ------------------
  609|  22.5k|        iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx][0];
  610|  22.5k|        iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx][1];
  611|  22.5k|        BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex, iXOffset, iYOffset, pMCFunc, 4, 8, iMVs);
  612|  22.5k|        if (pCurDqLayer->bUseWeightPredictionFlag) {
  ------------------
  |  Branch (612:13): [True: 550, False: 21.9k]
  ------------------
  613|       |
  614|    550|          WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 4, 8);
  615|    550|        }
  616|       |
  617|       |
  618|  22.5k|        iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx + 1][0];
  619|  22.5k|        iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx + 1][1];
  620|  22.5k|        pMCRefMem.pDstY += 4;
  621|  22.5k|        pMCRefMem.pDstU += 2;
  622|  22.5k|        pMCRefMem.pDstV += 2;
  623|  22.5k|        BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex, iXOffset + 4, iYOffset, pMCFunc, 4, 8, iMVs);
  624|  22.5k|        if (pCurDqLayer->bUseWeightPredictionFlag) {
  ------------------
  |  Branch (624:13): [True: 550, False: 21.9k]
  ------------------
  625|       |
  626|    550|          WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 4, 8);
  627|    550|        }
  628|       |
  629|  22.5k|        break;
  630|  3.10k|      case SUB_MB_TYPE_4x4: {
  ------------------
  |  |  297|  3.10k|#define SUB_MB_TYPE_4x4     0x00000008
  ------------------
  |  Branch (630:7): [True: 3.10k, False: 109k]
  ------------------
  631|  15.5k|        for (j = 0; j < 4; j++) {
  ------------------
  |  Branch (631:21): [True: 12.4k, False: 3.10k]
  ------------------
  632|  12.4k|          int32_t iUVLineStride;
  633|  12.4k|          iJIdx = ((j >> 1) << 2) + (j & 1);
  634|       |
  635|  12.4k|          iBlk4X = (j & 1) << 2;
  636|  12.4k|          iBlk4Y = (j >> 1) << 2;
  637|       |
  638|  12.4k|          iUVLineStride = (iBlk4X >> 1) + (iBlk4Y >> 1) * iDstLineChroma;
  639|  12.4k|          pMCRefMem.pDstY = pDstY + iBlk4X + iBlk4Y * iDstLineLuma;
  640|  12.4k|          pMCRefMem.pDstU = pDstU + iUVLineStride;
  641|  12.4k|          pMCRefMem.pDstV = pDstV + iUVLineStride;
  642|       |
  643|  12.4k|          iMVs[0] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx + iJIdx][0];
  644|  12.4k|          iMVs[1] = pCurDqLayer->pDec->pMv[0][iMBXY][iIIdx + iJIdx][1];
  645|  12.4k|          BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex, iXOffset + iBlk4X, iYOffset + iBlk4Y, pMCFunc, 4, 4, iMVs);
  646|  12.4k|          if (pCurDqLayer->bUseWeightPredictionFlag) {
  ------------------
  |  Branch (646:15): [True: 2.84k, False: 9.56k]
  ------------------
  647|       |
  648|  2.84k|            WeightPrediction (pCurDqLayer, &pMCRefMem, LIST_0, iRefIndex, 4, 4);
  649|  2.84k|          }
  650|       |
  651|  12.4k|        }
  652|  3.10k|      }
  653|  3.10k|      break;
  654|      0|      default:
  ------------------
  |  Branch (654:7): [True: 0, False: 112k]
  ------------------
  655|      0|        break;
  656|   112k|      }
  657|   112k|    }
  658|  28.2k|  }
  659|  28.2k|  break;
  660|  28.2k|  default:
  ------------------
  |  Branch (660:3): [True: 0, False: 3.69M]
  ------------------
  661|      0|    break;
  662|  3.69M|  }
  663|  3.69M|  return ERR_NONE;
  664|  3.69M|}
_ZN7WelsDec13GetInterBPredEPPhS1_PNS_21TagWelsDecoderContextE:
  666|  9.67M|int32_t GetInterBPred (uint8_t* pPredYCbCr[3], uint8_t* pTempPredYCbCr[3], PWelsDecoderContext pCtx) {
  667|  9.67M|  sMCRefMember pMCRefMem;
  668|  9.67M|  sMCRefMember pTempMCRefMem;
  669|       |
  670|  9.67M|  PDqLayer pCurDqLayer = pCtx->pCurDqLayer;
  671|  9.67M|  SMcFunc* pMCFunc = &pCtx->sMcFunc;
  672|       |
  673|  9.67M|  int32_t iMBXY = pCurDqLayer->iMbXyIndex;
  674|       |
  675|  9.67M|  int16_t iMVs[2] = { 0 };
  676|       |
  677|  9.67M|  uint32_t iMBType = pCurDqLayer->pDec->pMbType[iMBXY];
  678|       |
  679|  9.67M|  int32_t iMBOffsetX = pCurDqLayer->iMbX << 4;
  680|  9.67M|  int32_t iMBOffsetY = pCurDqLayer->iMbY << 4;
  681|       |
  682|  9.67M|  int32_t iDstLineLuma = pCtx->pDec->iLinesize[0];
  683|  9.67M|  int32_t iDstLineChroma = pCtx->pDec->iLinesize[1];
  684|       |
  685|       |
  686|  9.67M|  pMCRefMem.iPicWidth = (pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iMbWidth << 4);
  687|  9.67M|  pMCRefMem.iPicHeight = (pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iMbHeight << 4);
  688|       |
  689|  9.67M|  pMCRefMem.pDstY = pPredYCbCr[0];
  690|  9.67M|  pMCRefMem.pDstU = pPredYCbCr[1];
  691|  9.67M|  pMCRefMem.pDstV = pPredYCbCr[2];
  692|       |
  693|  9.67M|  pMCRefMem.iDstLineLuma = iDstLineLuma;
  694|  9.67M|  pMCRefMem.iDstLineChroma = iDstLineChroma;
  695|       |
  696|  9.67M|  pTempMCRefMem = pMCRefMem;
  697|  9.67M|  pTempMCRefMem.pDstY = pTempPredYCbCr[0];
  698|  9.67M|  pTempMCRefMem.pDstU = pTempPredYCbCr[1];
  699|  9.67M|  pTempMCRefMem.pDstV = pTempPredYCbCr[2];
  700|       |
  701|       |
  702|  9.67M|  int8_t iRefIndex0 = 0;
  703|  9.67M|  int8_t iRefIndex1 = 0;
  704|  9.67M|  int8_t iRefIndex = 0;
  705|       |
  706|  9.67M|  bool bWeightedBipredIdcIs1 = pCurDqLayer->sLayerInfo.pPps->uiWeightedBipredIdc == 1;
  707|       |
  708|  9.67M|  if (IS_INTER_16x16 (iMBType)) {
  ------------------
  |  |  307|  9.67M|#define IS_INTER_16x16(type) ( (type)&MB_TYPE_16x16 )
  |  |  ------------------
  |  |  |  |  278|  9.67M|#define MB_TYPE_16x16       0x00000008
  |  |  ------------------
  |  |  |  Branch (307:30): [True: 105k, False: 9.57M]
  |  |  ------------------
  ------------------
  709|   105k|    if (IS_TYPE_L0 (iMBType) && IS_TYPE_L1 (iMBType)) {
  ------------------
  |  |  310|   210k|#define IS_TYPE_L0(type) ( (type)&MB_TYPE_L0 )
  |  |  ------------------
  |  |  |  |  291|   105k|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  287|   105k|#define MB_TYPE_P0L0        0x00001000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  288|   105k|#define MB_TYPE_P1L0        0x00002000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (310:26): [True: 68.6k, False: 36.7k]
  |  |  ------------------
  ------------------
                  if (IS_TYPE_L0 (iMBType) && IS_TYPE_L1 (iMBType)) {
  ------------------
  |  |  311|  68.6k|#define IS_TYPE_L1(type) ( (type)&MB_TYPE_L1 )
  |  |  ------------------
  |  |  |  |  292|  68.6k|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  289|  68.6k|#define MB_TYPE_P0L1        0x00004000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  290|  68.6k|#define MB_TYPE_P1L1        0x00008000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 43.5k, False: 25.0k]
  |  |  ------------------
  ------------------
  710|  43.5k|      iMVs[0] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][0][0];
  711|  43.5k|      iMVs[1] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][0][1];
  712|  43.5k|      iRefIndex0 = pCurDqLayer->pDec->pRefIndex[LIST_0][iMBXY][0];
  713|  43.5k|      WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, iRefIndex0, LIST_0));
  ------------------
  |  |   52|  43.5k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  43.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  43.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 386, False: 43.1k]
  |  |  ------------------
  |  |   55|  43.5k|    return uiRetTmp; \
  |  |   56|  43.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 43.1k]
  |  |  ------------------
  ------------------
  714|  43.1k|      BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex0, iMBOffsetX, iMBOffsetY, pMCFunc, 16, 16, iMVs);
  715|       |
  716|  43.1k|      iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][0][0];
  717|  43.1k|      iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][0][1];
  718|  43.1k|      iRefIndex1 = pCurDqLayer->pDec->pRefIndex[LIST_1][iMBXY][0];
  719|  43.1k|      WELS_B_MB_REC_VERIFY (GetRefPic (&pTempMCRefMem, pCtx, iRefIndex1, LIST_1));
  ------------------
  |  |   52|  43.1k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  43.1k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  43.1k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 43.1k]
  |  |  ------------------
  |  |   55|  43.1k|    return uiRetTmp; \
  |  |   56|  43.1k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 43.1k]
  |  |  ------------------
  ------------------
  720|  43.1k|      BaseMC (pCtx, &pTempMCRefMem, LIST_1, iRefIndex1, iMBOffsetX, iMBOffsetY, pMCFunc, 16, 16, iMVs);
  721|  43.1k|      if (pCurDqLayer->bUseWeightedBiPredIdc) {
  ------------------
  |  Branch (721:11): [True: 23.2k, False: 19.9k]
  ------------------
  722|  23.2k|        BiWeightPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, iRefIndex0, iRefIndex1, bWeightedBipredIdcIs1, 16, 16);
  723|  23.2k|      } else {
  724|  19.9k|        BiPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem,  16, 16);
  725|  19.9k|      }
  726|  61.8k|    } else {
  727|  61.8k|      int32_t listIdx = (iMBType & MB_TYPE_P0L0) ? LIST_0 : LIST_1;
  ------------------
  |  |  287|  61.8k|#define MB_TYPE_P0L0        0x00001000
  ------------------
  |  Branch (727:25): [True: 25.0k, False: 36.7k]
  ------------------
  728|  61.8k|      iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][0][0];
  729|  61.8k|      iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][0][1];
  730|  61.8k|      iRefIndex = pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY][0];
  731|  61.8k|      WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, iRefIndex, listIdx));
  ------------------
  |  |   52|  61.8k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  61.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  61.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 61.8k]
  |  |  ------------------
  |  |   55|  61.8k|    return uiRetTmp; \
  |  |   56|  61.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 61.8k]
  |  |  ------------------
  ------------------
  732|  61.8k|      BaseMC (pCtx, &pMCRefMem, listIdx, iRefIndex, iMBOffsetX, iMBOffsetY, pMCFunc, 16, 16, iMVs);
  733|  61.8k|      if (bWeightedBipredIdcIs1) {
  ------------------
  |  Branch (733:11): [True: 4.07k, False: 57.7k]
  ------------------
  734|  4.07k|        WeightPrediction (pCurDqLayer, &pMCRefMem, listIdx, iRefIndex, 16, 16);
  735|  4.07k|      }
  736|  61.8k|    }
  737|  9.57M|  } else if (IS_INTER_16x8 (iMBType)) {
  ------------------
  |  |  308|  9.57M|#define IS_INTER_16x8(type) ( (type)&MB_TYPE_16x8 )
  |  |  ------------------
  |  |  |  |  279|  9.57M|#define MB_TYPE_16x8        0x00000010
  |  |  ------------------
  |  |  |  Branch (308:29): [True: 27.8k, False: 9.54M]
  |  |  ------------------
  ------------------
  738|  83.5k|    for (int32_t i = 0; i < 2; ++i) {
  ------------------
  |  Branch (738:25): [True: 55.7k, False: 27.8k]
  ------------------
  739|  55.7k|      int32_t iPartIdx = i << 3;
  740|  55.7k|      uint32_t listCount = 0;
  741|  55.7k|      int32_t lastListIdx = LIST_0;
  742|   167k|      for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (742:38): [True: 111k, False: 55.7k]
  ------------------
  743|   111k|        if (IS_DIR (iMBType, i, listIdx)) {
  ------------------
  |  |  312|   111k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|   111k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 66.5k, False: 44.8k]
  |  |  ------------------
  ------------------
  744|  66.5k|          lastListIdx = listIdx;
  745|  66.5k|          iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iPartIdx][0];
  746|  66.5k|          iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iPartIdx][1];
  747|  66.5k|          iRefIndex = pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY][iPartIdx];
  748|  66.5k|          WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, iRefIndex, listIdx));
  ------------------
  |  |   52|  66.5k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  66.5k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  66.5k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 66.5k]
  |  |  ------------------
  |  |   55|  66.5k|    return uiRetTmp; \
  |  |   56|  66.5k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 66.5k]
  |  |  ------------------
  ------------------
  749|  66.5k|          if (i) {
  ------------------
  |  Branch (749:15): [True: 35.6k, False: 30.8k]
  ------------------
  750|  35.6k|            pMCRefMem.pDstY += (iDstLineLuma << 3);
  751|  35.6k|            pMCRefMem.pDstU += (iDstLineChroma << 2);
  752|  35.6k|            pMCRefMem.pDstV += (iDstLineChroma << 2);
  753|  35.6k|          }
  754|  66.5k|          BaseMC (pCtx, &pMCRefMem, listIdx, iRefIndex, iMBOffsetX, iMBOffsetY + iPartIdx, pMCFunc, 16, 8, iMVs);
  755|  66.5k|          if (++listCount == 2) {
  ------------------
  |  Branch (755:15): [True: 10.8k, False: 55.7k]
  ------------------
  756|  10.8k|            iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iPartIdx][0];
  757|  10.8k|            iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iPartIdx][1];
  758|  10.8k|            iRefIndex1 = pCurDqLayer->pDec->pRefIndex[LIST_1][iMBXY][iPartIdx];
  759|  10.8k|            WELS_B_MB_REC_VERIFY (GetRefPic (&pTempMCRefMem, pCtx, iRefIndex1, LIST_1));
  ------------------
  |  |   52|  10.8k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  10.8k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  10.8k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 10.8k]
  |  |  ------------------
  |  |   55|  10.8k|    return uiRetTmp; \
  |  |   56|  10.8k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
  760|  10.8k|            if (i) {
  ------------------
  |  Branch (760:17): [True: 7.82k, False: 2.98k]
  ------------------
  761|  7.82k|              pTempMCRefMem.pDstY += (iDstLineLuma << 3);
  762|  7.82k|              pTempMCRefMem.pDstU += (iDstLineChroma << 2);
  763|  7.82k|              pTempMCRefMem.pDstV += (iDstLineChroma << 2);
  764|  7.82k|            }
  765|  10.8k|            BaseMC (pCtx, &pTempMCRefMem, LIST_1, iRefIndex1, iMBOffsetX, iMBOffsetY + iPartIdx, pMCFunc, 16, 8, iMVs);
  766|  10.8k|            if (pCurDqLayer->bUseWeightedBiPredIdc) {
  ------------------
  |  Branch (766:17): [True: 7.46k, False: 3.34k]
  ------------------
  767|  7.46k|              iRefIndex0 = pCurDqLayer->pDec->pRefIndex[LIST_0][iMBXY][iPartIdx];
  768|  7.46k|              iRefIndex1 = pCurDqLayer->pDec->pRefIndex[LIST_1][iMBXY][iPartIdx];
  769|  7.46k|              BiWeightPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, iRefIndex0, iRefIndex1, bWeightedBipredIdcIs1, 16, 8);
  770|  7.46k|            } else {
  771|  3.34k|              BiPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, 16, 8);
  772|  3.34k|            }
  773|  10.8k|          }
  774|  66.5k|        }
  775|   111k|      }
  776|  55.7k|      if (listCount == 1) {
  ------------------
  |  Branch (776:11): [True: 44.8k, False: 10.8k]
  ------------------
  777|  44.8k|        if (bWeightedBipredIdcIs1) {
  ------------------
  |  Branch (777:13): [True: 3.64k, False: 41.2k]
  ------------------
  778|  3.64k|          iRefIndex = pCurDqLayer->pDec->pRefIndex[lastListIdx][iMBXY][iPartIdx];
  779|  3.64k|          WeightPrediction (pCurDqLayer, &pMCRefMem, lastListIdx, iRefIndex, 16, 8);
  780|  3.64k|        }
  781|  44.8k|      }
  782|  55.7k|    }
  783|  9.54M|  } else if (IS_INTER_8x16 (iMBType)) {
  ------------------
  |  |  309|  9.54M|#define IS_INTER_8x16(type) ( (type)&MB_TYPE_8x16 )
  |  |  ------------------
  |  |  |  |  280|  9.54M|#define MB_TYPE_8x16        0x00000020
  |  |  ------------------
  |  |  |  Branch (309:29): [True: 19.6k, False: 9.52M]
  |  |  ------------------
  ------------------
  784|  58.8k|    for (int32_t i = 0; i < 2; ++i) {
  ------------------
  |  Branch (784:25): [True: 39.2k, False: 19.6k]
  ------------------
  785|  39.2k|      uint32_t listCount = 0;
  786|  39.2k|      int32_t lastListIdx = LIST_0;
  787|   117k|      for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
  ------------------
  |  Branch (787:38): [True: 78.4k, False: 39.2k]
  ------------------
  788|  78.4k|        if (IS_DIR (iMBType, i, listIdx)) {
  ------------------
  |  |  312|  78.4k|#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
  |  |  ------------------
  |  |  |  |  287|  78.4k|#define MB_TYPE_P0L0        0x00001000
  |  |  ------------------
  |  |  |  Branch (312:31): [True: 48.2k, False: 30.1k]
  |  |  ------------------
  ------------------
  789|  48.2k|          lastListIdx = listIdx;
  790|  48.2k|          iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][i << 1][0];
  791|  48.2k|          iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][i << 1][1];
  792|  48.2k|          iRefIndex = pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY][i << 1];
  793|  48.2k|          WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, iRefIndex, listIdx));
  ------------------
  |  |   52|  48.2k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  48.2k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  48.2k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 48.2k]
  |  |  ------------------
  |  |   55|  48.2k|    return uiRetTmp; \
  |  |   56|  48.2k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 48.2k]
  |  |  ------------------
  ------------------
  794|  48.2k|          if (i) {
  ------------------
  |  Branch (794:15): [True: 25.6k, False: 22.5k]
  ------------------
  795|  25.6k|            pMCRefMem.pDstY += 8;
  796|  25.6k|            pMCRefMem.pDstU += 4;
  797|  25.6k|            pMCRefMem.pDstV += 4;
  798|  25.6k|          }
  799|  48.2k|          BaseMC (pCtx, &pMCRefMem, listIdx, iRefIndex, iMBOffsetX + (i ? 8 : 0), iMBOffsetY, pMCFunc, 8, 16, iMVs);
  ------------------
  |  Branch (799:71): [True: 25.6k, False: 22.5k]
  ------------------
  800|  48.2k|          if (++listCount == 2) {
  ------------------
  |  Branch (800:15): [True: 9.02k, False: 39.2k]
  ------------------
  801|  9.02k|            iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][i << 1][0];
  802|  9.02k|            iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][i << 1][1];
  803|  9.02k|            iRefIndex1 = pCurDqLayer->pDec->pRefIndex[LIST_1][iMBXY][i << 1];
  804|  9.02k|            WELS_B_MB_REC_VERIFY (GetRefPic (&pTempMCRefMem, pCtx, iRefIndex1, LIST_1));
  ------------------
  |  |   52|  9.02k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  9.02k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  9.02k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 9.02k]
  |  |  ------------------
  |  |   55|  9.02k|    return uiRetTmp; \
  |  |   56|  9.02k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 9.02k]
  |  |  ------------------
  ------------------
  805|  9.02k|            if (i) {
  ------------------
  |  Branch (805:17): [True: 6.05k, False: 2.97k]
  ------------------
  806|  6.05k|              pTempMCRefMem.pDstY += 8;
  807|  6.05k|              pTempMCRefMem.pDstU += 4;
  808|  6.05k|              pTempMCRefMem.pDstV += 4;
  809|  6.05k|            }
  810|  9.02k|            BaseMC (pCtx, &pTempMCRefMem, LIST_1, iRefIndex1, iMBOffsetX + (i ? 8 : 0), iMBOffsetY, pMCFunc, 8, 16, iMVs);
  ------------------
  |  Branch (810:77): [True: 6.05k, False: 2.97k]
  ------------------
  811|  9.02k|            if (pCurDqLayer->bUseWeightedBiPredIdc) {
  ------------------
  |  Branch (811:17): [True: 5.21k, False: 3.81k]
  ------------------
  812|  5.21k|              iRefIndex0 = pCurDqLayer->pDec->pRefIndex[LIST_0][iMBXY][i << 1];
  813|  5.21k|              iRefIndex1 = pCurDqLayer->pDec->pRefIndex[LIST_1][iMBXY][i << 1];
  814|  5.21k|              BiWeightPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, iRefIndex0, iRefIndex1, bWeightedBipredIdcIs1, 8, 16);
  815|  5.21k|            } else {
  816|  3.81k|              BiPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, 8, 16);
  817|  3.81k|            }
  818|  9.02k|          }
  819|  48.2k|        }
  820|  78.4k|      }
  821|  39.2k|      if (listCount == 1) {
  ------------------
  |  Branch (821:11): [True: 30.1k, False: 9.02k]
  ------------------
  822|  30.1k|        if (bWeightedBipredIdcIs1) {
  ------------------
  |  Branch (822:13): [True: 3.09k, False: 27.0k]
  ------------------
  823|  3.09k|          iRefIndex = pCurDqLayer->pDec->pRefIndex[lastListIdx][iMBXY][i << 1];
  824|  3.09k|          WeightPrediction (pCurDqLayer, &pMCRefMem, lastListIdx, iRefIndex, 8, 16);
  825|  3.09k|        }
  826|  30.1k|      }
  827|  39.2k|    }
  828|  9.52M|  } else if (IS_Inter_8x8 (iMBType)) {
  ------------------
  |  |  320|  9.52M|#define IS_Inter_8x8(type) ( ((type)&MB_TYPE_8x8) != 0)
  |  |  ------------------
  |  |  |  |  281|  9.52M|#define MB_TYPE_8x8         0x00000040
  |  |  ------------------
  |  |  |  Branch (320:28): [True: 9.52M, False: 0]
  |  |  ------------------
  ------------------
  829|  9.52M|    int32_t iBlk8X, iBlk8Y, iBlk4X, iBlk4Y, iIIdx, iJIdx;
  830|  9.52M|    uint32_t iSubMBType;
  831|  9.52M|    int32_t iXOffset, iYOffset;
  832|  9.52M|    uint8_t* pDstY, *pDstU, *pDstV;
  833|  9.52M|    uint8_t* pDstY2, *pDstU2, *pDstV2;
  834|  47.6M|    for (int32_t i = 0; i < 4; i++) {
  ------------------
  |  Branch (834:25): [True: 38.1M, False: 9.52M]
  ------------------
  835|  38.1M|      iSubMBType = pCurDqLayer->pSubMbType[iMBXY][i];
  836|  38.1M|      iBlk8X = (i & 1) << 3;
  837|  38.1M|      iBlk8Y = (i >> 1) << 3;
  838|  38.1M|      iXOffset = iMBOffsetX + iBlk8X;
  839|  38.1M|      iYOffset = iMBOffsetY + iBlk8Y;
  840|       |
  841|  38.1M|      iIIdx = ((i >> 1) << 3) + ((i & 1) << 1);
  842|       |
  843|  38.1M|      pDstY = pPredYCbCr[0] + iBlk8X + iBlk8Y * iDstLineLuma;
  844|  38.1M|      pDstU = pPredYCbCr[1] + (iBlk8X >> 1) + (iBlk8Y >> 1) * iDstLineChroma;
  845|  38.1M|      pDstV = pPredYCbCr[2] + (iBlk8X >> 1) + (iBlk8Y >> 1) * iDstLineChroma;
  846|  38.1M|      pMCRefMem.pDstY = pDstY;
  847|  38.1M|      pMCRefMem.pDstU = pDstU;
  848|  38.1M|      pMCRefMem.pDstV = pDstV;
  849|       |
  850|  38.1M|      pTempMCRefMem = pMCRefMem;
  851|  38.1M|      pDstY2 = pTempPredYCbCr[0] + iBlk8X + iBlk8Y * iDstLineLuma;
  852|  38.1M|      pDstU2 = pTempPredYCbCr[1] + (iBlk8X >> 1) + (iBlk8Y >> 1) * iDstLineChroma;
  853|  38.1M|      pDstV2 = pTempPredYCbCr[2] + (iBlk8X >> 1) + (iBlk8Y >> 1) * iDstLineChroma;
  854|       |
  855|  38.1M|      pTempMCRefMem.pDstY = pDstY2;
  856|  38.1M|      pTempMCRefMem.pDstU = pDstU2;
  857|  38.1M|      pTempMCRefMem.pDstV = pDstV2;
  858|       |
  859|  38.1M|      if ((IS_TYPE_L0 (iSubMBType) && IS_TYPE_L1 (iSubMBType))) {
  ------------------
  |  |  310|  76.2M|#define IS_TYPE_L0(type) ( (type)&MB_TYPE_L0 )
  |  |  ------------------
  |  |  |  |  291|  38.1M|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  287|  38.1M|#define MB_TYPE_P0L0        0x00001000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  288|  38.1M|#define MB_TYPE_P1L0        0x00002000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (310:26): [True: 37.9M, False: 179k]
  |  |  ------------------
  ------------------
                    if ((IS_TYPE_L0 (iSubMBType) && IS_TYPE_L1 (iSubMBType))) {
  ------------------
  |  |  311|  37.9M|#define IS_TYPE_L1(type) ( (type)&MB_TYPE_L1 )
  |  |  ------------------
  |  |  |  |  292|  37.9M|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  289|  37.9M|#define MB_TYPE_P0L1        0x00004000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  290|  37.9M|#define MB_TYPE_P1L1        0x00008000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 37.7M, False: 139k]
  |  |  ------------------
  ------------------
  860|  37.7M|        iRefIndex0 = pCurDqLayer->pDec->pRefIndex[LIST_0][iMBXY][iIIdx];
  861|  37.7M|        WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, iRefIndex0, LIST_0));
  ------------------
  |  |   52|  37.7M|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  37.7M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  37.7M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 526, False: 37.7M]
  |  |  ------------------
  |  |   55|  37.7M|    return uiRetTmp; \
  |  |   56|  37.7M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 37.7M]
  |  |  ------------------
  ------------------
  862|       |
  863|  37.7M|        iRefIndex1 = pCurDqLayer->pDec->pRefIndex[LIST_1][iMBXY][iIIdx];
  864|  37.7M|        WELS_B_MB_REC_VERIFY (GetRefPic (&pTempMCRefMem, pCtx, iRefIndex1, LIST_1));
  ------------------
  |  |   52|  37.7M|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|  37.7M|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|  37.7M|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 37.7M]
  |  |  ------------------
  |  |   55|  37.7M|    return uiRetTmp; \
  |  |   56|  37.7M|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 37.7M]
  |  |  ------------------
  ------------------
  865|  37.7M|      } else {
  866|   318k|        int32_t listIdx = IS_TYPE_L0 (iSubMBType) ? LIST_0 : LIST_1;
  ------------------
  |  |  310|   318k|#define IS_TYPE_L0(type) ( (type)&MB_TYPE_L0 )
  |  |  ------------------
  |  |  |  |  291|   318k|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  287|   318k|#define MB_TYPE_P0L0        0x00001000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  288|   318k|#define MB_TYPE_P1L0        0x00002000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (310:26): [True: 139k, False: 179k]
  |  |  ------------------
  ------------------
  867|   318k|        iRefIndex = pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY][iIIdx];
  868|   318k|        WELS_B_MB_REC_VERIFY (GetRefPic (&pMCRefMem, pCtx, iRefIndex, listIdx));
  ------------------
  |  |   52|   318k|#define WELS_B_MB_REC_VERIFY(uiRet) do{ \
  |  |   53|   318k|  uint32_t uiRetTmp = (uint32_t)uiRet; \
  |  |   54|   318k|  if( uiRetTmp != ERR_NONE ) \
  |  |  ------------------
  |  |  |  Branch (54:7): [True: 0, False: 318k]
  |  |  ------------------
  |  |   55|   318k|    return uiRetTmp; \
  |  |   56|   318k|}while(0)
  |  |  ------------------
  |  |  |  Branch (56:8): [Folded, False: 318k]
  |  |  ------------------
  ------------------
  869|   318k|      }
  870|       |
  871|  38.1M|      if (IS_SUB_8x8 (iSubMBType)) {
  ------------------
  |  |  321|  38.1M|#define IS_SUB_8x8(sub_type) (((sub_type)&SUB_MB_TYPE_8x8) != 0)
  |  |  ------------------
  |  |  |  |  294|  38.1M|#define SUB_MB_TYPE_8x8     0x00000001
  |  |  ------------------
  |  |  |  Branch (321:30): [True: 37.7M, False: 322k]
  |  |  ------------------
  ------------------
  872|  37.7M|        if (IS_TYPE_L0 (iSubMBType) && IS_TYPE_L1 (iSubMBType)) {
  ------------------
  |  |  310|  75.5M|#define IS_TYPE_L0(type) ( (type)&MB_TYPE_L0 )
  |  |  ------------------
  |  |  |  |  291|  37.7M|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  287|  37.7M|#define MB_TYPE_P0L0        0x00001000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  288|  37.7M|#define MB_TYPE_P1L0        0x00002000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (310:26): [True: 37.6M, False: 103k]
  |  |  ------------------
  ------------------
                      if (IS_TYPE_L0 (iSubMBType) && IS_TYPE_L1 (iSubMBType)) {
  ------------------
  |  |  311|  37.6M|#define IS_TYPE_L1(type) ( (type)&MB_TYPE_L1 )
  |  |  ------------------
  |  |  |  |  292|  37.6M|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  289|  37.6M|#define MB_TYPE_P0L1        0x00004000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  290|  37.6M|#define MB_TYPE_P1L1        0x00008000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 37.5M, False: 130k]
  |  |  ------------------
  ------------------
  873|  37.5M|          iMVs[0] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx][0];
  874|  37.5M|          iMVs[1] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx][1];
  875|  37.5M|          BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex0, iXOffset, iYOffset, pMCFunc, 8, 8, iMVs);
  876|       |
  877|  37.5M|          iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx][0];
  878|  37.5M|          iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx][1];
  879|  37.5M|          BaseMC (pCtx, &pTempMCRefMem, LIST_1, iRefIndex1, iXOffset, iYOffset, pMCFunc, 8, 8, iMVs);
  880|       |
  881|  37.5M|          if (pCurDqLayer->bUseWeightedBiPredIdc) {
  ------------------
  |  Branch (881:15): [True: 37.0M, False: 504k]
  ------------------
  882|  37.0M|            BiWeightPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, iRefIndex0, iRefIndex1, bWeightedBipredIdcIs1, 8, 8);
  883|  37.0M|          } else {
  884|   504k|            BiPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem,  8, 8);
  885|   504k|          }
  886|  37.5M|        } else {
  887|   234k|          int32_t listIdx = IS_TYPE_L0 (iSubMBType) ? LIST_0 : LIST_1;
  ------------------
  |  |  310|   234k|#define IS_TYPE_L0(type) ( (type)&MB_TYPE_L0 )
  |  |  ------------------
  |  |  |  |  291|   234k|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  287|   234k|#define MB_TYPE_P0L0        0x00001000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  288|   234k|#define MB_TYPE_P1L0        0x00002000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (310:26): [True: 130k, False: 103k]
  |  |  ------------------
  ------------------
  888|   234k|          iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx][0];
  889|   234k|          iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx][1];
  890|   234k|          iRefIndex = pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY][iIIdx];
  891|   234k|          BaseMC (pCtx, &pMCRefMem, listIdx, iRefIndex, iXOffset, iYOffset, pMCFunc, 8, 8, iMVs);
  892|   234k|          if (bWeightedBipredIdcIs1) {
  ------------------
  |  Branch (892:15): [True: 22.6k, False: 211k]
  ------------------
  893|  22.6k|            WeightPrediction (pCurDqLayer, &pMCRefMem, listIdx, iRefIndex, 8, 8);
  894|  22.6k|          }
  895|   234k|        }
  896|  37.7M|      } else if (IS_SUB_8x4 (iSubMBType)) {
  ------------------
  |  |  322|   322k|#define IS_SUB_8x4(sub_type) (((sub_type)&SUB_MB_TYPE_8x4) != 0)
  |  |  ------------------
  |  |  |  |  295|   322k|#define SUB_MB_TYPE_8x4     0x00000002
  |  |  ------------------
  |  |  |  Branch (322:30): [True: 38.7k, False: 284k]
  |  |  ------------------
  ------------------
  897|  38.7k|        if (IS_TYPE_L0 (iSubMBType) && IS_TYPE_L1 (iSubMBType)) { //B_Bi_8x4
  ------------------
  |  |  310|  77.5k|#define IS_TYPE_L0(type) ( (type)&MB_TYPE_L0 )
  |  |  ------------------
  |  |  |  |  291|  38.7k|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  287|  38.7k|#define MB_TYPE_P0L0        0x00001000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  288|  38.7k|#define MB_TYPE_P1L0        0x00002000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (310:26): [True: 5.95k, False: 32.8k]
  |  |  ------------------
  ------------------
                      if (IS_TYPE_L0 (iSubMBType) && IS_TYPE_L1 (iSubMBType)) { //B_Bi_8x4
  ------------------
  |  |  311|  5.95k|#define IS_TYPE_L1(type) ( (type)&MB_TYPE_L1 )
  |  |  ------------------
  |  |  |  |  292|  5.95k|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  289|  5.95k|#define MB_TYPE_P0L1        0x00004000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  290|  5.95k|#define MB_TYPE_P1L1        0x00008000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 2.79k, False: 3.16k]
  |  |  ------------------
  ------------------
  898|  2.79k|          iMVs[0] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx][0];
  899|  2.79k|          iMVs[1] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx][1];
  900|  2.79k|          BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex0, iXOffset, iYOffset, pMCFunc, 8, 4, iMVs);
  901|  2.79k|          iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx][0];
  902|  2.79k|          iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx][1];
  903|  2.79k|          BaseMC (pCtx, &pTempMCRefMem, LIST_1, iRefIndex1, iXOffset, iYOffset, pMCFunc, 8, 4, iMVs);
  904|       |
  905|  2.79k|          if (pCurDqLayer->bUseWeightedBiPredIdc) {
  ------------------
  |  Branch (905:15): [True: 786, False: 2.01k]
  ------------------
  906|    786|            BiWeightPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, iRefIndex0, iRefIndex1, bWeightedBipredIdcIs1, 8, 4);
  907|  2.01k|          } else {
  908|  2.01k|            BiPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem,  8, 4);
  909|  2.01k|          }
  910|       |
  911|  2.79k|          pMCRefMem.pDstY += (iDstLineLuma << 2);
  912|  2.79k|          pMCRefMem.pDstU += (iDstLineChroma << 1);
  913|  2.79k|          pMCRefMem.pDstV += (iDstLineChroma << 1);
  914|  2.79k|          iMVs[0] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx + 4][0];
  915|  2.79k|          iMVs[1] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx + 4][1];
  916|  2.79k|          BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex0, iXOffset, iYOffset + 4, pMCFunc, 8, 4, iMVs);
  917|       |
  918|  2.79k|          pTempMCRefMem.pDstY += (iDstLineLuma << 2);
  919|  2.79k|          pTempMCRefMem.pDstU += (iDstLineChroma << 1);
  920|  2.79k|          pTempMCRefMem.pDstV += (iDstLineChroma << 1);
  921|  2.79k|          iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx + 4][0];
  922|  2.79k|          iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx + 4][1];
  923|  2.79k|          BaseMC (pCtx, &pTempMCRefMem, LIST_1, iRefIndex1, iXOffset, iYOffset + 4, pMCFunc, 8, 4, iMVs);
  924|       |
  925|  2.79k|          if (pCurDqLayer->bUseWeightedBiPredIdc) {
  ------------------
  |  Branch (925:15): [True: 786, False: 2.01k]
  ------------------
  926|    786|            BiWeightPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, iRefIndex0, iRefIndex1, bWeightedBipredIdcIs1, 8, 4);
  927|  2.01k|          } else {
  928|  2.01k|            BiPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem,  8, 4);
  929|  2.01k|          }
  930|  35.9k|        } else { //B_L0_8x4 B_L1_8x4
  931|  35.9k|          int32_t listIdx = IS_TYPE_L0 (iSubMBType) ? LIST_0 : LIST_1;
  ------------------
  |  |  310|  35.9k|#define IS_TYPE_L0(type) ( (type)&MB_TYPE_L0 )
  |  |  ------------------
  |  |  |  |  291|  35.9k|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  287|  35.9k|#define MB_TYPE_P0L0        0x00001000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  288|  35.9k|#define MB_TYPE_P1L0        0x00002000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (310:26): [True: 3.16k, False: 32.8k]
  |  |  ------------------
  ------------------
  932|  35.9k|          iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx][0];
  933|  35.9k|          iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx][1];
  934|  35.9k|          iRefIndex = pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY][iIIdx];
  935|  35.9k|          BaseMC (pCtx, &pMCRefMem, listIdx, iRefIndex, iXOffset, iYOffset, pMCFunc, 8, 4, iMVs);
  936|  35.9k|          pMCRefMem.pDstY += (iDstLineLuma << 2);
  937|  35.9k|          pMCRefMem.pDstU += (iDstLineChroma << 1);
  938|  35.9k|          pMCRefMem.pDstV += (iDstLineChroma << 1);
  939|  35.9k|          iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx + 4][0];
  940|  35.9k|          iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx + 4][1];
  941|  35.9k|          BaseMC (pCtx, &pMCRefMem, listIdx, iRefIndex, iXOffset, iYOffset + 4, pMCFunc, 8, 4, iMVs);
  942|  35.9k|          if (bWeightedBipredIdcIs1) {
  ------------------
  |  Branch (942:15): [True: 359, False: 35.6k]
  ------------------
  943|    359|            WeightPrediction (pCurDqLayer, &pMCRefMem, listIdx, iRefIndex, 8, 4);
  944|    359|          }
  945|  35.9k|        }
  946|   284k|      } else if (IS_SUB_4x8 (iSubMBType)) {
  ------------------
  |  |  323|   284k|#define IS_SUB_4x8(sub_type) (((sub_type)&SUB_MB_TYPE_4x8) != 0)
  |  |  ------------------
  |  |  |  |  296|   284k|#define SUB_MB_TYPE_4x8     0x00000004
  |  |  ------------------
  |  |  |  Branch (323:30): [True: 7.81k, False: 276k]
  |  |  ------------------
  ------------------
  947|  7.81k|        if (IS_TYPE_L0 (iSubMBType) && IS_TYPE_L1 (iSubMBType)) { //B_Bi_4x8
  ------------------
  |  |  310|  15.6k|#define IS_TYPE_L0(type) ( (type)&MB_TYPE_L0 )
  |  |  ------------------
  |  |  |  |  291|  7.81k|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  287|  7.81k|#define MB_TYPE_P0L0        0x00001000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  288|  7.81k|#define MB_TYPE_P1L0        0x00002000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (310:26): [True: 3.41k, False: 4.40k]
  |  |  ------------------
  ------------------
                      if (IS_TYPE_L0 (iSubMBType) && IS_TYPE_L1 (iSubMBType)) { //B_Bi_4x8
  ------------------
  |  |  311|  3.41k|#define IS_TYPE_L1(type) ( (type)&MB_TYPE_L1 )
  |  |  ------------------
  |  |  |  |  292|  3.41k|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  289|  3.41k|#define MB_TYPE_P0L1        0x00004000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  290|  3.41k|#define MB_TYPE_P1L1        0x00008000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 1.75k, False: 1.66k]
  |  |  ------------------
  ------------------
  948|  1.75k|          iMVs[0] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx][0];
  949|  1.75k|          iMVs[1] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx][1];
  950|  1.75k|          BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex0, iXOffset, iYOffset, pMCFunc, 4, 8, iMVs);
  951|  1.75k|          iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx][0];
  952|  1.75k|          iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx][1];
  953|  1.75k|          BaseMC (pCtx, &pTempMCRefMem, LIST_1, iRefIndex1, iXOffset, iYOffset, pMCFunc, 4, 8, iMVs);
  954|       |
  955|  1.75k|          if (pCurDqLayer->bUseWeightedBiPredIdc) {
  ------------------
  |  Branch (955:15): [True: 1.14k, False: 606]
  ------------------
  956|  1.14k|            BiWeightPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, iRefIndex0, iRefIndex1, bWeightedBipredIdcIs1, 4, 8);
  957|  1.14k|          } else {
  958|    606|            BiPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem,  4, 8);
  959|    606|          }
  960|       |
  961|  1.75k|          pMCRefMem.pDstY += 4;
  962|  1.75k|          pMCRefMem.pDstU += 2;
  963|  1.75k|          pMCRefMem.pDstV += 2;
  964|  1.75k|          iMVs[0] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx + 1][0];
  965|  1.75k|          iMVs[1] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx + 1][1];
  966|  1.75k|          BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex0, iXOffset + 4, iYOffset, pMCFunc, 4, 8, iMVs);
  967|       |
  968|  1.75k|          pTempMCRefMem.pDstY += 4;
  969|  1.75k|          pTempMCRefMem.pDstU += 2;
  970|  1.75k|          pTempMCRefMem.pDstV += 2;
  971|  1.75k|          iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx + 1][0];
  972|  1.75k|          iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx + 1][1];
  973|  1.75k|          BaseMC (pCtx, &pTempMCRefMem, LIST_1, iRefIndex1, iXOffset + 4, iYOffset, pMCFunc, 4, 8, iMVs);
  974|       |
  975|  1.75k|          if (pCurDqLayer->bUseWeightedBiPredIdc) {
  ------------------
  |  Branch (975:15): [True: 1.14k, False: 606]
  ------------------
  976|  1.14k|            BiWeightPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, iRefIndex0, iRefIndex1, bWeightedBipredIdcIs1, 4, 8);
  977|  1.14k|          } else {
  978|    606|            BiPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, 4, 8);
  979|    606|          }
  980|  6.06k|        } else { //B_L0_4x8 B_L1_4x8
  981|  6.06k|          int32_t listIdx = IS_TYPE_L0 (iSubMBType) ? LIST_0 : LIST_1;
  ------------------
  |  |  310|  6.06k|#define IS_TYPE_L0(type) ( (type)&MB_TYPE_L0 )
  |  |  ------------------
  |  |  |  |  291|  6.06k|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  287|  6.06k|#define MB_TYPE_P0L0        0x00001000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  288|  6.06k|#define MB_TYPE_P1L0        0x00002000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (310:26): [True: 1.66k, False: 4.40k]
  |  |  ------------------
  ------------------
  982|  6.06k|          iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx][0];
  983|  6.06k|          iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx][1];
  984|  6.06k|          iRefIndex = pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY][iIIdx];
  985|  6.06k|          BaseMC (pCtx, &pMCRefMem, listIdx, iRefIndex, iXOffset, iYOffset, pMCFunc, 4, 8, iMVs);
  986|  6.06k|          pMCRefMem.pDstY += 4;
  987|  6.06k|          pMCRefMem.pDstU += 2;
  988|  6.06k|          pMCRefMem.pDstV += 2;
  989|  6.06k|          iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx + 1][0];
  990|  6.06k|          iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx + 1][1];
  991|  6.06k|          BaseMC (pCtx, &pMCRefMem, listIdx, iRefIndex, iXOffset + 4, iYOffset, pMCFunc, 4, 8, iMVs);
  992|  6.06k|          if (bWeightedBipredIdcIs1) {
  ------------------
  |  Branch (992:15): [True: 297, False: 5.76k]
  ------------------
  993|    297|            WeightPrediction (pCurDqLayer, &pMCRefMem, listIdx, iRefIndex, 4, 8);
  994|    297|          }
  995|  6.06k|        }
  996|   276k|      } else if (IS_SUB_4x4 (iSubMBType)) {
  ------------------
  |  |  324|   276k|#define IS_SUB_4x4(sub_type) (((sub_type)&SUB_MB_TYPE_4x4) != 0)
  |  |  ------------------
  |  |  |  |  297|   276k|#define SUB_MB_TYPE_4x4     0x00000008
  |  |  ------------------
  |  |  |  Branch (324:30): [True: 276k, False: 0]
  |  |  ------------------
  ------------------
  997|   276k|        if (IS_TYPE_L0 (iSubMBType) && IS_TYPE_L1 (iSubMBType)) {
  ------------------
  |  |  310|   552k|#define IS_TYPE_L0(type) ( (type)&MB_TYPE_L0 )
  |  |  ------------------
  |  |  |  |  291|   276k|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  287|   276k|#define MB_TYPE_P0L0        0x00001000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  288|   276k|#define MB_TYPE_P1L0        0x00002000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (310:26): [True: 237k, False: 38.3k]
  |  |  ------------------
  ------------------
                      if (IS_TYPE_L0 (iSubMBType) && IS_TYPE_L1 (iSubMBType)) {
  ------------------
  |  |  311|   237k|#define IS_TYPE_L1(type) ( (type)&MB_TYPE_L1 )
  |  |  ------------------
  |  |  |  |  292|   237k|#define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  289|   237k|#define MB_TYPE_P0L1        0x00004000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L1        (MB_TYPE_P0L1 | MB_TYPE_P1L1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  290|   237k|#define MB_TYPE_P1L1        0x00008000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 234k, False: 3.75k]
  |  |  ------------------
  ------------------
  998|  1.17M|          for (int32_t j = 0; j < 4; j++) {
  ------------------
  |  Branch (998:31): [True: 936k, False: 234k]
  ------------------
  999|   936k|            int32_t iUVLineStride;
 1000|   936k|            iJIdx = ((j >> 1) << 2) + (j & 1);
 1001|       |
 1002|   936k|            iBlk4X = (j & 1) << 2;
 1003|   936k|            iBlk4Y = (j >> 1) << 2;
 1004|       |
 1005|   936k|            iUVLineStride = (iBlk4X >> 1) + (iBlk4Y >> 1) * iDstLineChroma;
 1006|   936k|            pMCRefMem.pDstY = pDstY + iBlk4X + iBlk4Y * iDstLineLuma;
 1007|   936k|            pMCRefMem.pDstU = pDstU + iUVLineStride;
 1008|   936k|            pMCRefMem.pDstV = pDstV + iUVLineStride;
 1009|       |
 1010|   936k|            iMVs[0] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx + iJIdx][0];
 1011|   936k|            iMVs[1] = pCurDqLayer->pDec->pMv[LIST_0][iMBXY][iIIdx + iJIdx][1];
 1012|   936k|            BaseMC (pCtx, &pMCRefMem, LIST_0, iRefIndex0, iXOffset + iBlk4X, iYOffset + iBlk4Y, pMCFunc, 4, 4, iMVs);
 1013|       |
 1014|   936k|            pTempMCRefMem.pDstY = pDstY2 + iBlk8X + iBlk8Y * iDstLineLuma;
 1015|   936k|            pTempMCRefMem.pDstU = pDstU2 + iUVLineStride;
 1016|   936k|            pTempMCRefMem.pDstV = pDstV2 + iUVLineStride;;
 1017|       |
 1018|   936k|            iMVs[0] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx + iJIdx][0];
 1019|   936k|            iMVs[1] = pCurDqLayer->pDec->pMv[LIST_1][iMBXY][iIIdx + iJIdx][1];
 1020|   936k|            BaseMC (pCtx, &pTempMCRefMem, LIST_1, iRefIndex1, iXOffset + iBlk4X, iYOffset + iBlk4Y, pMCFunc, 4, 4, iMVs);
 1021|       |
 1022|   936k|            if (pCurDqLayer->bUseWeightedBiPredIdc) {
  ------------------
  |  Branch (1022:17): [True: 366k, False: 570k]
  ------------------
 1023|   366k|              BiWeightPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem, iRefIndex0, iRefIndex1, bWeightedBipredIdcIs1, 4, 4);
 1024|   570k|            } else {
 1025|   570k|              BiPrediction (pCurDqLayer, &pMCRefMem, &pTempMCRefMem,  4, 4);
 1026|   570k|            }
 1027|   936k|          }
 1028|   234k|        } else {
 1029|  42.1k|          int32_t listIdx = IS_TYPE_L0 (iSubMBType) ? LIST_0 : LIST_1;
  ------------------
  |  |  310|  42.1k|#define IS_TYPE_L0(type) ( (type)&MB_TYPE_L0 )
  |  |  ------------------
  |  |  |  |  291|  42.1k|#define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  287|  42.1k|#define MB_TYPE_P0L0        0x00001000
  |  |  |  |  ------------------
  |  |  |  |               #define MB_TYPE_L0        (MB_TYPE_P0L0 | MB_TYPE_P1L0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  288|  42.1k|#define MB_TYPE_P1L0        0x00002000
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (310:26): [True: 3.75k, False: 38.3k]
  |  |  ------------------
  ------------------
 1030|  42.1k|          iRefIndex = pCurDqLayer->pDec->pRefIndex[listIdx][iMBXY][iIIdx];
 1031|   210k|          for (int32_t j = 0; j < 4; j++) {
  ------------------
  |  Branch (1031:31): [True: 168k, False: 42.1k]
  ------------------
 1032|   168k|            int32_t iUVLineStride;
 1033|   168k|            iJIdx = ((j >> 1) << 2) + (j & 1);
 1034|       |
 1035|   168k|            iBlk4X = (j & 1) << 2;
 1036|   168k|            iBlk4Y = (j >> 1) << 2;
 1037|       |
 1038|   168k|            iUVLineStride = (iBlk4X >> 1) + (iBlk4Y >> 1) * iDstLineChroma;
 1039|   168k|            pMCRefMem.pDstY = pDstY + iBlk4X + iBlk4Y * iDstLineLuma;
 1040|   168k|            pMCRefMem.pDstU = pDstU + iUVLineStride;
 1041|   168k|            pMCRefMem.pDstV = pDstV + iUVLineStride;
 1042|       |
 1043|   168k|            iMVs[0] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx + iJIdx][0];
 1044|   168k|            iMVs[1] = pCurDqLayer->pDec->pMv[listIdx][iMBXY][iIIdx + iJIdx][1];
 1045|   168k|            BaseMC (pCtx, &pMCRefMem, listIdx, iRefIndex, iXOffset + iBlk4X, iYOffset + iBlk4Y, pMCFunc, 4, 4, iMVs);
 1046|   168k|            if (bWeightedBipredIdcIs1) {
  ------------------
  |  Branch (1046:17): [True: 1.52k, False: 166k]
  ------------------
 1047|  1.52k|              WeightPrediction (pCurDqLayer, &pMCRefMem, listIdx, iRefIndex, 4, 4);
 1048|  1.52k|            }
 1049|   168k|          }
 1050|  42.1k|        }
 1051|   276k|      }
 1052|  38.1M|    }
 1053|  9.52M|  }
 1054|  9.67M|  return ERR_NONE;
 1055|  9.67M|}
_ZN7WelsDec9RecChromaEiPNS_21TagWelsDecoderContextEPsPNS_10TagDqLayerE:
 1057|   152k|int32_t RecChroma (int32_t iMBXY, PWelsDecoderContext pCtx, int16_t* pScoeffLevel, PDqLayer pDqLayer) {
 1058|   152k|  int32_t iChromaStride = pCtx->pCurDqLayer->pDec->iLinesize[1];
 1059|   152k|  PIdctFourResAddPredFunc pIdctFourResAddPredFunc = pCtx->pIdctFourResAddPredFunc;
 1060|       |
 1061|   152k|  uint8_t i = 0;
 1062|   152k|  uint8_t uiCbpC = pDqLayer->pCbp[iMBXY] >> 4;
 1063|       |
 1064|   152k|  if (1 == uiCbpC || 2 == uiCbpC) {
  ------------------
  |  Branch (1064:7): [True: 10.8k, False: 142k]
  |  Branch (1064:22): [True: 4.85k, False: 137k]
  ------------------
 1065|  47.1k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (1065:17): [True: 31.4k, False: 15.7k]
  ------------------
 1066|  31.4k|      int16_t* pRS = pScoeffLevel + 256 + (i << 6);
 1067|  31.4k|      uint8_t* pPred = pDqLayer->pPred[i + 1];
 1068|  31.4k|      const int8_t* pNzc = pDqLayer->pNzc[iMBXY] + 16 + 2 * i;
 1069|       |
 1070|       |      /*1 chroma is divided 4 4x4_block to idct*/
 1071|  31.4k|      pIdctFourResAddPredFunc (pPred, iChromaStride, pRS, pNzc);
 1072|  31.4k|    }
 1073|  15.7k|  }
 1074|       |
 1075|   152k|  return ERR_NONE;
 1076|   152k|}
rec_mb.cpp:_ZN7WelsDecL9GetRefPicEPNS_14TagMCRefMemberEPNS_21TagWelsDecoderContextERKai:
  218|  80.0M|                                 int32_t listIdx) {
  219|  80.0M|  PPicture pRefPic;
  220|       |
  221|  80.0M|  if (iRefIdx >= 0) {
  ------------------
  |  Branch (221:7): [True: 80.0M, False: 0]
  ------------------
  222|  80.0M|    pRefPic = pCtx->sRefPic.pRefList[listIdx][iRefIdx];
  223|       |
  224|  80.0M|    if (pRefPic != NULL) {
  ------------------
  |  Branch (224:9): [True: 80.0M, False: 912]
  ------------------
  225|  80.0M|      pMCRefMem->iSrcLineLuma = pRefPic->iLinesize[0];
  226|  80.0M|      pMCRefMem->iSrcLineChroma = pRefPic->iLinesize[1];
  227|       |
  228|  80.0M|      pMCRefMem->pSrcY = pRefPic->pData[0];
  229|  80.0M|      pMCRefMem->pSrcU = pRefPic->pData[1];
  230|  80.0M|      pMCRefMem->pSrcV = pRefPic->pData[2];
  231|  80.0M|      if (!pMCRefMem->pSrcY || !pMCRefMem->pSrcU || !pMCRefMem->pSrcV) {
  ------------------
  |  Branch (231:11): [True: 0, False: 80.0M]
  |  Branch (231:32): [True: 0, False: 80.0M]
  |  Branch (231:53): [True: 0, False: 80.0M]
  ------------------
  232|      0|        return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_DATA, ERR_INFO_REFERENCE_PIC_LOST);
  ------------------
  |  |   59|      0|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  233|      0|      }
  234|  80.0M|      return ERR_NONE;
  235|  80.0M|    }
  236|  80.0M|  }
  237|    912|  return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_DATA, ERR_INFO_REFERENCE_PIC_LOST);
  ------------------
  |  |   59|    912|#define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF))
  ------------------
  238|  80.0M|}
rec_mb.cpp:_ZN7WelsDecL16WeightPredictionEPNS_10TagDqLayerEPNS_14TagMCRefMemberEiiii:
  300|   319k|                              int32_t iBlkHeight) {
  301|       |
  302|       |
  303|   319k|  int32_t iLog2denom, iWoc, iOoc;
  304|   319k|  int32_t iPredTemp, iLineStride;
  305|   319k|  int32_t iPixel = 0;
  306|   319k|  uint8_t* pDst;
  307|       |  //luma
  308|   319k|  iLog2denom = pCurDqLayer->pPredWeightTable->uiLumaLog2WeightDenom;
  309|   319k|  iWoc = pCurDqLayer->pPredWeightTable->sPredList[listIdx].iLumaWeight[iRefIdx];
  310|   319k|  iOoc = pCurDqLayer->pPredWeightTable->sPredList[listIdx].iLumaOffset[iRefIdx];
  311|   319k|  iLineStride = pMCRefMem->iDstLineLuma;
  312|       |
  313|  5.08M|  for (int i = 0; i < iBlkHeight; i++) {
  ------------------
  |  Branch (313:19): [True: 4.76M, False: 319k]
  ------------------
  314|  78.0M|    for (int j = 0; j < iBlkWidth; j++) {
  ------------------
  |  Branch (314:21): [True: 73.2M, False: 4.76M]
  ------------------
  315|  73.2M|      iPixel = j + i * (iLineStride);
  316|  73.2M|      if (iLog2denom >= 1) {
  ------------------
  |  Branch (316:11): [True: 3.57M, False: 69.6M]
  ------------------
  317|  3.57M|        iPredTemp = ((pMCRefMem->pDstY[iPixel] * iWoc + (1 << (iLog2denom - 1))) >> iLog2denom) + iOoc;
  318|       |
  319|  3.57M|        pMCRefMem->pDstY[iPixel] = WELS_CLIP3 (iPredTemp, 0, 255);
  ------------------
  |  |  204|  3.57M|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 257k, False: 3.32M]
  |  |  |  Branch (204:55): [True: 203k, False: 3.11M]
  |  |  ------------------
  ------------------
  320|  69.6M|      } else {
  321|  69.6M|        iPredTemp = pMCRefMem->pDstY[iPixel] * iWoc + iOoc;
  322|       |
  323|  69.6M|        pMCRefMem->pDstY[iPixel] = WELS_CLIP3 (iPredTemp, 0, 255);
  ------------------
  |  |  204|  69.6M|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 3.04M, False: 66.6M]
  |  |  |  Branch (204:55): [True: 300k, False: 66.3M]
  |  |  ------------------
  ------------------
  324|       |
  325|  69.6M|      }
  326|  73.2M|    }
  327|  4.76M|  }
  328|       |
  329|       |
  330|       |  //UV
  331|   319k|  iBlkWidth = iBlkWidth >> 1;
  332|   319k|  iBlkHeight = iBlkHeight >> 1;
  333|   319k|  iLog2denom = pCurDqLayer->pPredWeightTable->uiChromaLog2WeightDenom;
  334|   319k|  iLineStride = pMCRefMem->iDstLineChroma;
  335|       |
  336|   958k|  for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (336:19): [True: 639k, False: 319k]
  ------------------
  337|       |
  338|       |
  339|       |    //iLog2denom = pCurDqLayer->pPredWeightTable->uiChromaLog2WeightDenom;
  340|   639k|    iWoc =  pCurDqLayer->pPredWeightTable->sPredList[listIdx].iChromaWeight[iRefIdx][i];
  341|   639k|    iOoc = pCurDqLayer->pPredWeightTable->sPredList[listIdx].iChromaOffset[iRefIdx][i];
  342|   639k|    pDst = i ? pMCRefMem->pDstV : pMCRefMem->pDstU;
  ------------------
  |  Branch (342:12): [True: 319k, False: 319k]
  ------------------
  343|       |    //iLineStride = pMCRefMem->iDstLineChroma;
  344|       |
  345|  5.40M|    for (int i = 0; i < iBlkHeight ; i++) {
  ------------------
  |  Branch (345:21): [True: 4.76M, False: 639k]
  ------------------
  346|  41.3M|      for (int j = 0; j < iBlkWidth; j++) {
  ------------------
  |  Branch (346:23): [True: 36.6M, False: 4.76M]
  ------------------
  347|  36.6M|        iPixel = j + i * (iLineStride);
  348|  36.6M|        if (iLog2denom >= 1) {
  ------------------
  |  Branch (348:13): [True: 2.29M, False: 34.3M]
  ------------------
  349|  2.29M|          iPredTemp = ((pDst[iPixel] * iWoc + (1 << (iLog2denom - 1))) >> iLog2denom) + iOoc;
  350|       |
  351|  2.29M|          pDst[iPixel] = WELS_CLIP3 (iPredTemp, 0, 255);
  ------------------
  |  |  204|  2.29M|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 61.6k, False: 2.23M]
  |  |  |  Branch (204:55): [True: 3.23k, False: 2.22M]
  |  |  ------------------
  ------------------
  352|  34.3M|        } else {
  353|  34.3M|          iPredTemp = pDst[iPixel] * iWoc + iOoc;
  354|       |
  355|  34.3M|          pDst[iPixel] = WELS_CLIP3 (iPredTemp, 0, 255);
  ------------------
  |  |  204|  34.3M|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 14.8M, False: 19.4M]
  |  |  |  Branch (204:55): [True: 42.8k, False: 19.4M]
  |  |  ------------------
  ------------------
  356|       |
  357|  34.3M|        }
  358|  36.6M|      }
  359|       |
  360|  4.76M|    }
  361|       |
  362|       |
  363|   639k|  }
  364|   319k|}
rec_mb.cpp:_ZN7WelsDecL18BiWeightPredictionEPNS_10TagDqLayerEPNS_14TagMCRefMemberES3_iibii:
  368|  37.4M|                                int32_t iBlkHeight) {
  369|  37.4M|  int32_t iWoc1 = 0, iOoc1 = 0, iWoc2 = 0, iOoc2 = 0;
  370|  37.4M|  int32_t iPredTemp, iLineStride;
  371|  37.4M|  int32_t iPixel = 0;
  372|       |  //luma
  373|  37.4M|  int32_t iLog2denom = pCurDqLayer->pPredWeightTable->uiLumaLog2WeightDenom;
  374|  37.4M|  if (bWeightedBipredIdcIs1) {
  ------------------
  |  Branch (374:7): [True: 220k, False: 37.2M]
  ------------------
  375|   220k|    iWoc1 = pCurDqLayer->pPredWeightTable->sPredList[LIST_0].iLumaWeight[iRefIdx1];
  376|   220k|    iOoc1 = pCurDqLayer->pPredWeightTable->sPredList[LIST_0].iLumaOffset[iRefIdx1];
  377|   220k|    iWoc2 = pCurDqLayer->pPredWeightTable->sPredList[LIST_1].iLumaWeight[iRefIdx2];
  378|   220k|    iOoc2 = pCurDqLayer->pPredWeightTable->sPredList[LIST_1].iLumaOffset[iRefIdx2];
  379|  37.2M|  } else {
  380|  37.2M|    iWoc1 = pCurDqLayer->pPredWeightTable->iImplicitWeight[iRefIdx1][iRefIdx2];
  381|  37.2M|    iWoc2 = 64 - iWoc1;
  382|  37.2M|  }
  383|  37.4M|  iLineStride = pMCRefMem->iDstLineLuma;
  384|       |
  385|   335M|  for (int i = 0; i < iBlkHeight; i++) {
  ------------------
  |  Branch (385:19): [True: 298M, False: 37.4M]
  ------------------
  386|  2.68G|    for (int j = 0; j < iBlkWidth; j++) {
  ------------------
  |  Branch (386:21): [True: 2.38G, False: 298M]
  ------------------
  387|  2.38G|      iPixel = j + i * (iLineStride);
  388|  2.38G|      iPredTemp = ((pMCRefMem->pDstY[iPixel] * iWoc1 + pTempMCRefMem->pDstY[iPixel] * iWoc2 + (1 << iLog2denom)) >>
  389|  2.38G|                   (iLog2denom + 1)) + ((iOoc1 + iOoc2 + 1) >> 1);
  390|  2.38G|      pMCRefMem->pDstY[iPixel] = WELS_CLIP3 (iPredTemp, 0, 255);
  ------------------
  |  |  204|  2.38G|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 609k, False: 2.38G]
  |  |  |  Branch (204:55): [True: 2.33G, False: 44.7M]
  |  |  ------------------
  ------------------
  391|  2.38G|    }
  392|   298M|  }
  393|       |
  394|       |  //UV
  395|  37.4M|  iBlkWidth = iBlkWidth >> 1;
  396|  37.4M|  iBlkHeight = iBlkHeight >> 1;
  397|  37.4M|  iLog2denom = pCurDqLayer->pPredWeightTable->uiChromaLog2WeightDenom;
  398|  37.4M|  iLineStride = pMCRefMem->iDstLineChroma;
  399|       |
  400|  37.4M|  uint8_t* pDst;
  401|  37.4M|  uint8_t* pTempDst;
  402|   112M|  for (int k = 0; k < 2; k++) {
  ------------------
  |  Branch (402:19): [True: 74.8M, False: 37.4M]
  ------------------
  403|       |    //iLog2denom = pCurDqLayer->pPredWeightTable->uiChromaLog2WeightDenom;
  404|  74.8M|    if (bWeightedBipredIdcIs1) {
  ------------------
  |  Branch (404:9): [True: 441k, False: 74.4M]
  ------------------
  405|   441k|      iWoc1 = pCurDqLayer->pPredWeightTable->sPredList[LIST_0].iChromaWeight[iRefIdx1][k];
  406|   441k|      iOoc1 = pCurDqLayer->pPredWeightTable->sPredList[LIST_0].iChromaOffset[iRefIdx1][k];
  407|   441k|      iWoc2 = pCurDqLayer->pPredWeightTable->sPredList[LIST_1].iChromaWeight[iRefIdx2][k];
  408|   441k|      iOoc2 = pCurDqLayer->pPredWeightTable->sPredList[LIST_1].iChromaOffset[iRefIdx2][k];
  409|   441k|    }
  410|  74.8M|    pDst  = k ? pMCRefMem->pDstV : pMCRefMem->pDstU;
  ------------------
  |  Branch (410:13): [True: 37.4M, False: 37.4M]
  ------------------
  411|  74.8M|    pTempDst = k ? pTempMCRefMem->pDstV : pTempMCRefMem->pDstU;
  ------------------
  |  Branch (411:16): [True: 37.4M, False: 37.4M]
  ------------------
  412|       |    //iLineStride = pMCRefMem->iDstLineChroma;
  413|       |
  414|   373M|    for (int i = 0; i < iBlkHeight; i++) {
  ------------------
  |  Branch (414:21): [True: 298M, False: 74.8M]
  ------------------
  415|  1.49G|      for (int j = 0; j < iBlkWidth; j++) {
  ------------------
  |  Branch (415:23): [True: 1.19G, False: 298M]
  ------------------
  416|  1.19G|        iPixel = j + i * (iLineStride);
  417|  1.19G|        iPredTemp = ((pDst[iPixel] * iWoc1 + pTempDst[iPixel] * iWoc2 + (1 << iLog2denom)) >> (iLog2denom + 1)) + ((
  418|  1.19G|                      iOoc1 + iOoc2 + 1) >> 1);
  419|  1.19G|        pDst[iPixel] = WELS_CLIP3 (iPredTemp, 0, 255);
  ------------------
  |  |  204|  1.19G|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 1.07M, False: 1.19G]
  |  |  |  Branch (204:55): [True: 1.16G, False: 22.2M]
  |  |  ------------------
  ------------------
  420|  1.19G|      }
  421|   298M|    }
  422|  74.8M|  }
  423|  37.4M|}
rec_mb.cpp:_ZN7WelsDecL12BiPredictionEPNS_10TagDqLayerEPNS_14TagMCRefMemberES3_ii:
  426|  1.10M|                          int32_t iBlkHeight) {
  427|  1.10M|  int32_t iPredTemp, iLineStride;
  428|  1.10M|  int32_t iPixel = 0;
  429|       |  //luma
  430|  1.10M|  iLineStride = pMCRefMem->iDstLineLuma;
  431|       |
  432|  7.85M|  for (int i = 0; i < iBlkHeight; i++) {
  ------------------
  |  Branch (432:19): [True: 6.75M, False: 1.10M]
  ------------------
  433|  54.3M|    for (int j = 0; j < iBlkWidth; j++) {
  ------------------
  |  Branch (433:21): [True: 47.6M, False: 6.75M]
  ------------------
  434|  47.6M|      iPixel = j + i * (iLineStride);
  435|  47.6M|      iPredTemp = (pMCRefMem->pDstY[iPixel] + pTempMCRefMem->pDstY[iPixel] + 1) >> 1;
  436|  47.6M|      pMCRefMem->pDstY[iPixel] = WELS_CLIP3 (iPredTemp, 0, 255);
  ------------------
  |  |  204|  47.6M|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 0, False: 47.6M]
  |  |  |  Branch (204:55): [True: 0, False: 47.6M]
  |  |  ------------------
  ------------------
  437|  47.6M|    }
  438|  6.75M|  }
  439|       |
  440|       |  //UV
  441|  1.10M|  iBlkWidth = iBlkWidth >> 1;
  442|  1.10M|  iBlkHeight = iBlkHeight >> 1;
  443|  1.10M|  iLineStride = pMCRefMem->iDstLineChroma;
  444|       |
  445|  1.10M|  uint8_t* pDst;
  446|  1.10M|  uint8_t* pTempDst;
  447|  3.32M|  for (int k = 0; k < 2; k++) {
  ------------------
  |  Branch (447:19): [True: 2.21M, False: 1.10M]
  ------------------
  448|  2.21M|    pDst = k ? pMCRefMem->pDstV : pMCRefMem->pDstU;
  ------------------
  |  Branch (448:12): [True: 1.10M, False: 1.10M]
  ------------------
  449|  2.21M|    pTempDst = k ? pTempMCRefMem->pDstV : pTempMCRefMem->pDstU;
  ------------------
  |  Branch (449:16): [True: 1.10M, False: 1.10M]
  ------------------
  450|       |    //iLineStride = pMCRefMem->iDstLineChroma;
  451|       |
  452|  8.96M|    for (int i = 0; i < iBlkHeight; i++) {
  ------------------
  |  Branch (452:21): [True: 6.75M, False: 2.21M]
  ------------------
  453|  30.5M|      for (int j = 0; j < iBlkWidth; j++) {
  ------------------
  |  Branch (453:23): [True: 23.8M, False: 6.75M]
  ------------------
  454|  23.8M|        iPixel = j + i * (iLineStride);
  455|  23.8M|        iPredTemp = (pDst[iPixel] + pTempDst[iPixel] + 1) >> 1;
  456|  23.8M|        pDst[iPixel] = WELS_CLIP3 (iPredTemp, 0, 255);
  ------------------
  |  |  204|  23.8M|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 0, False: 23.8M]
  |  |  |  Branch (204:55): [True: 0, False: 23.8M]
  |  |  ------------------
  ------------------
  457|  23.8M|      }
  458|  6.75M|    }
  459|  2.21M|  }
  460|  1.10M|}

GetCPUCount:
   46|  22.0k|int32_t GetCPUCount() {
   47|  22.0k|  WelsLogicalProcessInfo pInfo;
   48|  22.0k|  pInfo.ProcessorCount = 1;
   49|  22.0k|  WelsQueryLogicalProcessInfo (&pInfo);
   50|  22.0k|  return pInfo.ProcessorCount;
   51|  22.0k|}

_ZN7WelsDec12CWelsDecoderC2Ev:
  134|  22.0k|  : m_pWelsTrace (NULL),
  135|  22.0k|    m_uiDecodeTimeStamp (0),
  136|  22.0k|    m_bIsBaseline (false),
  137|  22.0k|    m_iCpuCount (1),
  138|  22.0k|    m_iThreadCount (0),
  139|  22.0k|    m_iCtxCount (1),
  140|  22.0k|    m_pPicBuff (NULL),
  141|  22.0k|    m_bParamSetsLostFlag (false),
  142|  22.0k|    m_bFreezeOutput (false),
  143|  22.0k|    m_DecCtxActiveCount (0),
  144|  22.0k|    m_pDecThrCtx (NULL),
  145|  22.0k|    m_pLastDecThrCtx (NULL),
  146|  22.0k|    m_iLastBufferedIdx (0),
  147|  22.0k|    m_iStreamSeqNum (0) {
  148|       |#ifdef OUTPUT_BIT_STREAM
  149|       |  char chFileName[1024] = { 0 };  //for .264
  150|       |  int iBufUsed = 0;
  151|       |  int iBufLeft = 1023;
  152|       |  int iCurUsed;
  153|       |
  154|       |  char chFileNameSize[1024] = { 0 }; //for .len
  155|       |  int iBufUsedSize = 0;
  156|       |  int iBufLeftSize = 1023;
  157|       |  int iCurUsedSize;
  158|       |#endif//OUTPUT_BIT_STREAM
  159|       |
  160|       |
  161|  22.0k|  m_pWelsTrace = new welsCodecTrace();
  162|  22.0k|  if (m_pWelsTrace != NULL) {
  ------------------
  |  Branch (162:7): [True: 22.0k, False: 0]
  ------------------
  163|  22.0k|    m_pWelsTrace->SetCodecInstance (this);
  164|  22.0k|    m_pWelsTrace->SetTraceLevel (WELS_LOG_ERROR);
  165|       |
  166|  22.0k|    WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "CWelsDecoder::CWelsDecoder() entry");
  167|  22.0k|  }
  168|       |
  169|  22.0k|  ResetReorderingPictureBuffers (&m_sReoderingStatus, m_sPictInfoList, true);
  170|       |
  171|  22.0k|  m_iCpuCount = GetCPUCount();
  172|  22.0k|  if (m_iCpuCount > WELS_DEC_MAX_NUM_CPU) {
  ------------------
  |  |   50|  22.0k|#define WELS_DEC_MAX_NUM_CPU 16
  ------------------
  |  Branch (172:7): [True: 22.0k, False: 0]
  ------------------
  173|  22.0k|    m_iCpuCount = WELS_DEC_MAX_NUM_CPU;
  ------------------
  |  |   50|  22.0k|#define WELS_DEC_MAX_NUM_CPU 16
  ------------------
  174|  22.0k|  }
  175|       |
  176|  22.0k|  m_pDecThrCtx = new SWelsDecoderThreadCTX[m_iCtxCount];
  177|  22.0k|  memset (m_pDecThrCtx, 0, sizeof (SWelsDecoderThreadCTX)*m_iCtxCount);
  178|   374k|  for (int32_t i = 0; i < WELS_DEC_MAX_NUM_CPU; ++i) {
  ------------------
  |  |   50|   374k|#define WELS_DEC_MAX_NUM_CPU 16
  ------------------
  |  Branch (178:23): [True: 352k, False: 22.0k]
  ------------------
  179|   352k|    m_pDecThrCtxActive[i] = NULL;
  180|   352k|  }
  181|       |#ifdef OUTPUT_BIT_STREAM
  182|       |  SWelsTime sCurTime;
  183|       |
  184|       |  WelsGetTimeOfDay (&sCurTime);
  185|       |
  186|       |  iCurUsed = WelsSnprintf (chFileName, iBufLeft, "bs_0x%p_", (void*)this);
  187|       |  iCurUsedSize = WelsSnprintf (chFileNameSize, iBufLeftSize, "size_0x%p_", (void*)this);
  188|       |
  189|       |  iBufUsed += iCurUsed;
  190|       |  iBufLeft -= iCurUsed;
  191|       |  if (iBufLeft > 0) {
  192|       |    iCurUsed = WelsStrftime (&chFileName[iBufUsed], iBufLeft, "%y%m%d%H%M%S", &sCurTime);
  193|       |    iBufUsed += iCurUsed;
  194|       |    iBufLeft -= iCurUsed;
  195|       |  }
  196|       |
  197|       |  iBufUsedSize += iCurUsedSize;
  198|       |  iBufLeftSize -= iCurUsedSize;
  199|       |  if (iBufLeftSize > 0) {
  200|       |    iCurUsedSize = WelsStrftime (&chFileNameSize[iBufUsedSize], iBufLeftSize, "%y%m%d%H%M%S", &sCurTime);
  201|       |    iBufUsedSize += iCurUsedSize;
  202|       |    iBufLeftSize -= iCurUsedSize;
  203|       |  }
  204|       |
  205|       |  if (iBufLeft > 0) {
  206|       |    iCurUsed = WelsSnprintf (&chFileName[iBufUsed], iBufLeft, ".%03.3u.264", WelsGetMillisecond (&sCurTime));
  207|       |    iBufUsed += iCurUsed;
  208|       |    iBufLeft -= iCurUsed;
  209|       |  }
  210|       |
  211|       |  if (iBufLeftSize > 0) {
  212|       |    iCurUsedSize = WelsSnprintf (&chFileNameSize[iBufUsedSize], iBufLeftSize, ".%03.3u.len",
  213|       |                                 WelsGetMillisecond (&sCurTime));
  214|       |    iBufUsedSize += iCurUsedSize;
  215|       |    iBufLeftSize -= iCurUsedSize;
  216|       |  }
  217|       |
  218|       |
  219|       |  m_pFBS = WelsFopen (chFileName, "wb");
  220|       |  m_pFBSSize = WelsFopen (chFileNameSize, "wb");
  221|       |#endif//OUTPUT_BIT_STREAM
  222|  22.0k|}
_ZN7WelsDec12CWelsDecoderD2Ev:
  232|  22.0k|CWelsDecoder::~CWelsDecoder() {
  233|  22.0k|  if (m_pWelsTrace != NULL) {
  ------------------
  |  Branch (233:7): [True: 22.0k, False: 0]
  ------------------
  234|  22.0k|    WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "CWelsDecoder::~CWelsDecoder()");
  235|  22.0k|  }
  236|  22.0k|  CloseDecoderThreads();
  237|  22.0k|  UninitDecoder();
  238|       |
  239|       |#ifdef OUTPUT_BIT_STREAM
  240|       |  if (m_pFBS) {
  241|       |    WelsFclose (m_pFBS);
  242|       |    m_pFBS = NULL;
  243|       |  }
  244|       |  if (m_pFBSSize) {
  245|       |    WelsFclose (m_pFBSSize);
  246|       |    m_pFBSSize = NULL;
  247|       |  }
  248|       |#endif//OUTPUT_BIT_STREAM
  249|       |
  250|  22.0k|  if (m_pWelsTrace != NULL) {
  ------------------
  |  Branch (250:7): [True: 22.0k, False: 0]
  ------------------
  251|  22.0k|    delete m_pWelsTrace;
  252|  22.0k|    m_pWelsTrace = NULL;
  253|  22.0k|  }
  254|  22.0k|  if (m_pDecThrCtx != NULL) {
  ------------------
  |  Branch (254:7): [True: 22.0k, False: 0]
  ------------------
  255|  22.0k|    delete[] m_pDecThrCtx;
  256|       |    m_pDecThrCtx = NULL;
  257|  22.0k|  }
  258|  22.0k|}
_ZN7WelsDec12CWelsDecoder10InitializeEPK19TagSVCDecodingParam:
  260|  22.0k|long CWelsDecoder::Initialize (const SDecodingParam* pParam) {
  261|  22.0k|  int iRet = ERR_NONE;
  262|  22.0k|  if (m_pWelsTrace == NULL) {
  ------------------
  |  Branch (262:7): [True: 0, False: 22.0k]
  ------------------
  263|      0|    return cmMallocMemeError;
  264|      0|  }
  265|       |
  266|  22.0k|  if (pParam == NULL) {
  ------------------
  |  Branch (266:7): [True: 0, False: 22.0k]
  ------------------
  267|      0|    WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "CWelsDecoder::Initialize(), invalid input argument.");
  268|      0|    return cmInitParaError;
  269|      0|  }
  270|       |
  271|       |  // H.264 decoder initialization,including memory allocation,then open it ready to decode
  272|  22.0k|  iRet = InitDecoder (pParam);
  273|  22.0k|  if (iRet)
  ------------------
  |  Branch (273:7): [True: 0, False: 22.0k]
  ------------------
  274|      0|    return iRet;
  275|       |
  276|  22.0k|  return cmResultSuccess;
  277|  22.0k|}
_ZN7WelsDec12CWelsDecoder12UninitializeEv:
  279|  22.0k|long CWelsDecoder::Uninitialize() {
  280|  22.0k|  UninitDecoder();
  281|       |
  282|  22.0k|  return ERR_NONE;
  283|  22.0k|}
_ZN7WelsDec12CWelsDecoder13UninitDecoderEv:
  285|  66.0k|void CWelsDecoder::UninitDecoder (void) {
  286|   132k|  for (int32_t i = 0; i < m_iCtxCount; ++i) {
  ------------------
  |  Branch (286:23): [True: 66.0k, False: 66.0k]
  ------------------
  287|  66.0k|    if (m_pDecThrCtx[i].pCtx != NULL) {
  ------------------
  |  Branch (287:9): [True: 22.0k, False: 44.0k]
  ------------------
  288|  22.0k|      if (i > 0) {
  ------------------
  |  Branch (288:11): [True: 0, False: 22.0k]
  ------------------
  289|      0|        WelsResetRefPicWithoutUnRef (m_pDecThrCtx[i].pCtx);
  290|      0|      }
  291|  22.0k|      UninitDecoderCtx (m_pDecThrCtx[i].pCtx);
  292|  22.0k|    }
  293|  66.0k|  }
  294|  66.0k|}
_ZN7WelsDec12CWelsDecoder18OpenDecoderThreadsEv:
  296|  22.0k|void CWelsDecoder::OpenDecoderThreads() {
  297|  22.0k|  if (m_iThreadCount >= 1) {
  ------------------
  |  Branch (297:7): [True: 0, False: 22.0k]
  ------------------
  298|      0|    m_uiDecodeTimeStamp = 0;
  299|      0|    CREATE_SEMAPHORE (&m_sIsBusy, m_iThreadCount, m_iThreadCount, NULL);
  ------------------
  |  |  140|      0|  SemCreate(ph, (long)initial_count,(long)(max_count))
  ------------------
  300|      0|    WelsMutexInit (&m_csDecoder);
  301|      0|    CREATE_EVENT (&m_sBufferingEvent, 1, 0, NULL);
  ------------------
  |  |  137|      0|  EventCreate(ph,(int)(manualreset),(int)(initial_state))
  ------------------
  302|      0|    SET_EVENT (&m_sBufferingEvent);
  ------------------
  |  |  149|      0|  EventPost(ph)
  ------------------
  303|      0|    CREATE_EVENT (&m_sReleaseBufferEvent, 1, 0, NULL);
  ------------------
  |  |  137|      0|  EventCreate(ph,(int)(manualreset),(int)(initial_state))
  ------------------
  304|      0|    SET_EVENT (&m_sReleaseBufferEvent);
  ------------------
  |  |  149|      0|  EventPost(ph)
  ------------------
  305|      0|    for (int32_t i = 0; i < m_iThreadCount; ++i) {
  ------------------
  |  Branch (305:25): [True: 0, False: 0]
  ------------------
  306|      0|      m_pDecThrCtx[i].sThreadInfo.uiThrMaxNum = m_iThreadCount;
  307|      0|      m_pDecThrCtx[i].sThreadInfo.uiThrNum = i;
  308|      0|      m_pDecThrCtx[i].sThreadInfo.uiThrStackSize = WELS_DEC_MAX_THREAD_STACK_SIZE;
  ------------------
  |  |   51|      0|#define WELS_DEC_MAX_THREAD_STACK_SIZE   4096
  ------------------
  309|      0|      m_pDecThrCtx[i].sThreadInfo.pThrProcMain = pThrProcFrame;
  310|      0|      m_pDecThrCtx[i].sThreadInfo.sIsBusy = &m_sIsBusy;
  311|      0|      m_pDecThrCtx[i].sThreadInfo.uiCommand = WELS_DEC_THREAD_COMMAND_RUN;
  ------------------
  |  |   52|      0|#define WELS_DEC_THREAD_COMMAND_RUN 0
  ------------------
  312|      0|      m_pDecThrCtx[i].threadCtxOwner = this;
  313|      0|      m_pDecThrCtx[i].kpSrc = NULL;
  314|      0|      m_pDecThrCtx[i].kiSrcLen = 0;
  315|      0|      m_pDecThrCtx[i].ppDst = NULL;
  316|      0|      m_pDecThrCtx[i].pDec = NULL;
  317|      0|      CREATE_EVENT (&m_pDecThrCtx[i].sImageReady, 1, 0, NULL);
  ------------------
  |  |  137|      0|  EventCreate(ph,(int)(manualreset),(int)(initial_state))
  ------------------
  318|      0|      CREATE_EVENT (&m_pDecThrCtx[i].sSliceDecodeStart, 1, 0, NULL);
  ------------------
  |  |  137|      0|  EventCreate(ph,(int)(manualreset),(int)(initial_state))
  ------------------
  319|      0|      CREATE_EVENT (&m_pDecThrCtx[i].sSliceDecodeFinish, 1, 0, NULL);
  ------------------
  |  |  137|      0|  EventCreate(ph,(int)(manualreset),(int)(initial_state))
  ------------------
  320|      0|      CREATE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsIdle, 0, 1, NULL);
  ------------------
  |  |  140|      0|  SemCreate(ph, (long)initial_count,(long)(max_count))
  ------------------
  321|      0|      CREATE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsActivated, 0, 1, NULL);
  ------------------
  |  |  140|      0|  SemCreate(ph, (long)initial_count,(long)(max_count))
  ------------------
  322|      0|      CREATE_THREAD (&m_pDecThrCtx[i].sThreadInfo.sThrHandle, pThrProcInit, (void*) (& (m_pDecThrCtx[i])));
  ------------------
  |  |  134|      0|  ThreadCreate(ph, threadproc, (void*)argument)
  ------------------
  323|      0|    }
  324|      0|  }
  325|  22.0k|}
_ZN7WelsDec12CWelsDecoder19CloseDecoderThreadsEv:
  326|  22.0k|void CWelsDecoder::CloseDecoderThreads() {
  327|  22.0k|  if (m_iThreadCount >= 1) {
  ------------------
  |  Branch (327:7): [True: 0, False: 22.0k]
  ------------------
  328|      0|    SET_EVENT (&m_sReleaseBufferEvent);
  ------------------
  |  |  149|      0|  EventPost(ph)
  ------------------
  329|      0|    for (int32_t i = 0; i < m_iThreadCount; i++) { //waiting the completion begun slices
  ------------------
  |  Branch (329:25): [True: 0, False: 0]
  ------------------
  330|      0|      WAIT_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsIdle, WELS_DEC_THREAD_WAIT_INFINITE);
  ------------------
  |  |  164|      0|  SemWait(ph,(int32_t)timeout)
  ------------------
  331|      0|      m_pDecThrCtx[i].sThreadInfo.uiCommand = WELS_DEC_THREAD_COMMAND_ABORT;
  ------------------
  |  |   53|      0|#define WELS_DEC_THREAD_COMMAND_ABORT 1
  ------------------
  332|      0|      RELEASE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsActivated);
  ------------------
  |  |  155|      0|  SemRelease(ph,NULL)
  ------------------
  333|      0|      WAIT_THREAD (&m_pDecThrCtx[i].sThreadInfo.sThrHandle);
  ------------------
  |  |  161|      0|  ThreadWait(ph)
  ------------------
  334|      0|      CLOSE_EVENT (&m_pDecThrCtx[i].sImageReady);
  ------------------
  |  |  143|      0|  EventDestroy(ph)
  ------------------
  335|      0|      CLOSE_EVENT (&m_pDecThrCtx[i].sSliceDecodeStart);
  ------------------
  |  |  143|      0|  EventDestroy(ph)
  ------------------
  336|      0|      CLOSE_EVENT (&m_pDecThrCtx[i].sSliceDecodeFinish);
  ------------------
  |  |  143|      0|  EventDestroy(ph)
  ------------------
  337|      0|      CLOSE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsIdle);
  ------------------
  |  |  146|      0|  SemDestroy(ph)
  ------------------
  338|      0|      CLOSE_SEMAPHORE (&m_pDecThrCtx[i].sThreadInfo.sIsActivated);
  ------------------
  |  |  146|      0|  SemDestroy(ph)
  ------------------
  339|      0|    }
  340|      0|    WelsMutexDestroy (&m_csDecoder);
  341|      0|    CLOSE_EVENT (&m_sBufferingEvent);
  ------------------
  |  |  143|      0|  EventDestroy(ph)
  ------------------
  342|      0|    CLOSE_EVENT (&m_sReleaseBufferEvent);
  ------------------
  |  |  143|      0|  EventDestroy(ph)
  ------------------
  343|      0|    CLOSE_SEMAPHORE (&m_sIsBusy);
  ------------------
  |  |  146|      0|  SemDestroy(ph)
  ------------------
  344|      0|  }
  345|  22.0k|}
_ZN7WelsDec12CWelsDecoder16UninitDecoderCtxERPNS_21TagWelsDecoderContextE:
  347|  48.4k|void CWelsDecoder::UninitDecoderCtx (PWelsDecoderContext& pCtx) {
  348|  48.4k|  if (pCtx != NULL) {
  ------------------
  |  Branch (348:7): [True: 26.4k, False: 22.0k]
  ------------------
  349|       |
  350|  26.4k|    WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "CWelsDecoder::UninitDecoderCtx(), openh264 codec version = %s.",
  351|  26.4k|             VERSION_NUMBER);
  ------------------
  |  |    4|  26.4k|#define VERSION_NUMBER ""
  ------------------
  352|       |
  353|  26.4k|    WelsEndDecoder (pCtx);
  354|       |
  355|  26.4k|    if (pCtx->pMemAlign != NULL) {
  ------------------
  |  Branch (355:9): [True: 26.4k, False: 0]
  ------------------
  356|  26.4k|      WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
  357|  26.4k|               "CWelsDecoder::UninitDecoder(), verify memory usage (%d bytes) after free..",
  358|  26.4k|               pCtx->pMemAlign->WelsGetMemoryUsage());
  359|  26.4k|      delete pCtx->pMemAlign;
  360|  26.4k|      pCtx->pMemAlign = NULL;
  361|  26.4k|    }
  362|       |
  363|  26.4k|    if (NULL != pCtx) {
  ------------------
  |  Branch (363:9): [True: 26.4k, False: 0]
  ------------------
  364|  26.4k|      WelsFree (pCtx, "m_pDecContext");
  365|       |
  366|  26.4k|      pCtx = NULL;
  367|  26.4k|    }
  368|  26.4k|    if (m_iCtxCount <= 1) m_pDecThrCtx[0].pCtx = NULL;
  ------------------
  |  Branch (368:9): [True: 26.4k, False: 0]
  ------------------
  369|  26.4k|  }
  370|  48.4k|}
_ZN7WelsDec12CWelsDecoder11InitDecoderEPK19TagSVCDecodingParam:
  373|  22.0k|int32_t CWelsDecoder::InitDecoder (const SDecodingParam* pParam) {
  374|       |
  375|  22.0k|  WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
  376|  22.0k|           "CWelsDecoder::init_decoder(), openh264 codec version = %s, ParseOnly = %d",
  377|  22.0k|           VERSION_NUMBER, (int32_t)pParam->bParseOnly);
  ------------------
  |  |    4|  22.0k|#define VERSION_NUMBER ""
  ------------------
  378|  22.0k|  if (m_iThreadCount >= 1 && pParam->bParseOnly) {
  ------------------
  |  Branch (378:7): [True: 0, False: 22.0k]
  |  Branch (378:30): [True: 0, False: 0]
  ------------------
  379|      0|    m_iThreadCount = 0;
  380|      0|  }
  381|  22.0k|  OpenDecoderThreads();
  382|       |  //reset decoder context
  383|  22.0k|  memset (&m_sDecoderStatistics, 0, sizeof (SDecoderStatistics));
  384|  22.0k|  memset (&m_sLastDecPicInfo, 0, sizeof (SWelsLastDecPicInfo));
  385|  22.0k|  memset (&m_sVlcTable, 0, sizeof (SVlcTable));
  386|  22.0k|  UninitDecoder();
  387|  22.0k|  WelsDecoderLastDecPicInfoDefaults (m_sLastDecPicInfo);
  388|  44.0k|  for (int32_t i = 0; i < m_iCtxCount; ++i) {
  ------------------
  |  Branch (388:23): [True: 22.0k, False: 22.0k]
  ------------------
  389|  22.0k|    InitDecoderCtx (m_pDecThrCtx[i].pCtx, pParam);
  390|  22.0k|    if (m_iThreadCount >= 1) {
  ------------------
  |  Branch (390:9): [True: 0, False: 22.0k]
  ------------------
  391|      0|      m_pDecThrCtx[i].pCtx->pThreadCtx = &m_pDecThrCtx[i];
  392|      0|    }
  393|  22.0k|  }
  394|  22.0k|  m_bParamSetsLostFlag = false;
  395|  22.0k|  m_bFreezeOutput = false;
  396|  22.0k|  return cmResultSuccess;
  397|  22.0k|}
_ZN7WelsDec12CWelsDecoder14InitDecoderCtxERPNS_21TagWelsDecoderContextEPK19TagSVCDecodingParam:
  400|  26.4k|int32_t CWelsDecoder::InitDecoderCtx (PWelsDecoderContext& pCtx, const SDecodingParam* pParam) {
  401|       |
  402|  26.4k|  WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
  403|  26.4k|           "CWelsDecoder::init_decoder(), openh264 codec version = %s, ParseOnly = %d",
  404|  26.4k|           VERSION_NUMBER, (int32_t)pParam->bParseOnly);
  ------------------
  |  |    4|  26.4k|#define VERSION_NUMBER ""
  ------------------
  405|       |
  406|       |  //reset decoder context
  407|  26.4k|  UninitDecoderCtx (pCtx);
  408|  26.4k|  pCtx = (PWelsDecoderContext)WelsMallocz (sizeof (SWelsDecoderContext), "m_pDecContext");
  409|  26.4k|  if (NULL == pCtx)
  ------------------
  |  Branch (409:7): [True: 0, False: 26.4k]
  ------------------
  410|      0|    return cmMallocMemeError;
  411|  26.4k|  int32_t iCacheLineSize = 16;   // on chip cache line size in byte
  412|  26.4k|  pCtx->pMemAlign = new CMemoryAlign (iCacheLineSize);
  413|  26.4k|  WELS_VERIFY_RETURN_PROC_IF (cmMallocMemeError, (NULL == pCtx->pMemAlign), UninitDecoderCtx (pCtx))
  ------------------
  |  |  253|  26.4k|  if (bCaseIf) {                                            \
  |  |  ------------------
  |  |  |  Branch (253:7): [True: 0, False: 26.4k]
  |  |  ------------------
  |  |  254|      0|    fProc;                                                  \
  |  |  255|      0|    return iResult;                                         \
  |  |  256|      0|  }
  ------------------
  414|  26.4k|  if (m_iCtxCount <= 1) m_pDecThrCtx[0].pCtx = pCtx;
  ------------------
  |  Branch (414:7): [True: 26.4k, False: 0]
  ------------------
  415|       |  //fill in default value into context
  416|  26.4k|  pCtx->pLastDecPicInfo = &m_sLastDecPicInfo;
  417|  26.4k|  pCtx->pDecoderStatistics = &m_sDecoderStatistics;
  418|  26.4k|  pCtx->pVlcTable = &m_sVlcTable;
  419|  26.4k|  pCtx->pPictInfoList = m_sPictInfoList;
  420|  26.4k|  pCtx->pPictReoderingStatus = &m_sReoderingStatus;
  421|  26.4k|  pCtx->pCsDecoder = &m_csDecoder;
  422|  26.4k|  pCtx->pStreamSeqNum = &m_iStreamSeqNum;
  423|  26.4k|  WelsDecoderDefaults (pCtx, &m_pWelsTrace->m_sLogCtx);
  424|  26.4k|  WelsDecoderSpsPpsDefaults (pCtx->sSpsPpsCtx);
  425|       |  //check param and update decoder context
  426|  26.4k|  pCtx->pParam = (SDecodingParam*)pCtx->pMemAlign->WelsMallocz (sizeof (SDecodingParam),
  427|  26.4k|                 "SDecodingParam");
  428|  26.4k|  WELS_VERIFY_RETURN_PROC_IF (cmMallocMemeError, (NULL == pCtx->pParam), UninitDecoderCtx (pCtx));
  ------------------
  |  |  253|  26.4k|  if (bCaseIf) {                                            \
  |  |  ------------------
  |  |  |  Branch (253:7): [True: 0, False: 26.4k]
  |  |  ------------------
  |  |  254|      0|    fProc;                                                  \
  |  |  255|      0|    return iResult;                                         \
  |  |  256|      0|  }
  ------------------
  429|  26.4k|  int32_t iRet = DecoderConfigParam (pCtx, pParam);
  430|  26.4k|  WELS_VERIFY_RETURN_IFNEQ (iRet, cmResultSuccess);
  ------------------
  |  |  227|  26.4k|  if (iResult != iExpected) {                        \
  |  |  ------------------
  |  |  |  Branch (227:7): [True: 0, False: 26.4k]
  |  |  ------------------
  |  |  228|      0|    return iResult;                                  \
  |  |  229|      0|  }
  ------------------
  431|       |
  432|       |  //init decoder
  433|  26.4k|  WELS_VERIFY_RETURN_PROC_IF (cmMallocMemeError, WelsInitDecoder (pCtx, &m_pWelsTrace->m_sLogCtx),
  ------------------
  |  |  253|  26.4k|  if (bCaseIf) {                                            \
  |  |  ------------------
  |  |  |  Branch (253:7): [True: 0, False: 26.4k]
  |  |  ------------------
  |  |  254|      0|    fProc;                                                  \
  |  |  255|      0|    return iResult;                                         \
  |  |  256|      0|  }
  ------------------
  434|  26.4k|                              UninitDecoderCtx (pCtx))
  435|  26.4k|  pCtx->pPicBuff = NULL;
  436|  26.4k|  return cmResultSuccess;
  437|  26.4k|}
_ZN7WelsDec12CWelsDecoder12ResetDecoderERPNS_21TagWelsDecoderContextE:
  439|  4.44k|int32_t CWelsDecoder::ResetDecoder (PWelsDecoderContext& pCtx) {
  440|       |  // TBC: need to be modified when context and trace point are null
  441|  4.44k|  if (m_iThreadCount >= 1) {
  ------------------
  |  Branch (441:7): [True: 0, False: 4.44k]
  ------------------
  442|      0|    ThreadResetDecoder (pCtx);
  443|  4.44k|  } else {
  444|  4.44k|    if (pCtx != NULL && m_pWelsTrace != NULL) {
  ------------------
  |  Branch (444:9): [True: 4.44k, False: 0]
  |  Branch (444:25): [True: 4.44k, False: 0]
  ------------------
  445|  4.44k|      WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "ResetDecoder(), context error code is %d",
  446|  4.44k|               pCtx->iErrorCode);
  447|  4.44k|      SDecodingParam sPrevParam;
  448|  4.44k|      memcpy (&sPrevParam, pCtx->pParam, sizeof (SDecodingParam));
  449|       |
  450|  4.44k|      WELS_VERIFY_RETURN_PROC_IF (cmInitParaError, InitDecoderCtx (pCtx, &sPrevParam),
  ------------------
  |  |  253|  4.44k|  if (bCaseIf) {                                            \
  |  |  ------------------
  |  |  |  Branch (253:7): [True: 0, False: 4.44k]
  |  |  ------------------
  |  |  254|      0|    fProc;                                                  \
  |  |  255|      0|    return iResult;                                         \
  |  |  256|      0|  }
  ------------------
  451|  4.44k|                                  UninitDecoderCtx (pCtx));
  452|  4.44k|    } else if (m_pWelsTrace != NULL) {
  ------------------
  |  Branch (452:16): [True: 0, False: 0]
  ------------------
  453|      0|      WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "ResetDecoder() failed as decoder context null");
  454|      0|    }
  455|  4.44k|    ResetReorderingPictureBuffers (&m_sReoderingStatus, m_sPictInfoList, false);
  456|  4.44k|  }
  457|  4.44k|  return ERR_INFO_UNINIT;
  458|  4.44k|}
_ZN7WelsDec12CWelsDecoder9SetOptionE14DECODER_OPTIONPv:
  479|  44.0k|long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) {
  480|  44.0k|  int iVal = 0;
  481|  44.0k|  if (eOptID == DECODER_OPTION_NUM_OF_THREADS) {
  ------------------
  |  Branch (481:7): [True: 0, False: 44.0k]
  ------------------
  482|      0|    if (pOption != NULL) {
  ------------------
  |  Branch (482:9): [True: 0, False: 0]
  ------------------
  483|      0|      int32_t threadCount = * ((int32_t*)pOption);
  484|      0|      if (threadCount < 0) threadCount = 0;
  ------------------
  |  Branch (484:11): [True: 0, False: 0]
  ------------------
  485|      0|      if (threadCount > m_iCpuCount) {
  ------------------
  |  Branch (485:11): [True: 0, False: 0]
  ------------------
  486|      0|        threadCount = m_iCpuCount;
  487|      0|      }
  488|      0|      if (threadCount > 3) {
  ------------------
  |  Branch (488:11): [True: 0, False: 0]
  ------------------
  489|      0|        threadCount = 3;
  490|      0|      }
  491|      0|      if (threadCount != m_iThreadCount) {
  ------------------
  |  Branch (491:11): [True: 0, False: 0]
  ------------------
  492|      0|        m_iThreadCount = threadCount;
  493|      0|        if (m_pDecThrCtx != NULL) {
  ------------------
  |  Branch (493:13): [True: 0, False: 0]
  ------------------
  494|      0|          delete [] m_pDecThrCtx;
  495|      0|          m_iCtxCount = m_iThreadCount == 0 ? 1 : m_iThreadCount;
  ------------------
  |  Branch (495:25): [True: 0, False: 0]
  ------------------
  496|      0|          m_pDecThrCtx = new SWelsDecoderThreadCTX[m_iCtxCount];
  497|      0|          memset (m_pDecThrCtx, 0, sizeof (SWelsDecoderThreadCTX)*m_iCtxCount);
  498|      0|        }
  499|      0|      }
  500|      0|    }
  501|      0|    return cmResultSuccess;
  502|      0|  }
  503|  44.0k|  for (int32_t i = 0; i < m_iCtxCount; ++i) {
  ------------------
  |  Branch (503:23): [True: 44.0k, False: 0]
  ------------------
  504|  44.0k|    PWelsDecoderContext pDecContext = m_pDecThrCtx[i].pCtx;
  505|  44.0k|    if (pDecContext == NULL && eOptID != DECODER_OPTION_TRACE_LEVEL &&
  ------------------
  |  Branch (505:9): [True: 0, False: 44.0k]
  |  Branch (505:32): [True: 0, False: 0]
  ------------------
  506|      0|        eOptID != DECODER_OPTION_TRACE_CALLBACK && eOptID != DECODER_OPTION_TRACE_CALLBACK_CONTEXT)
  ------------------
  |  Branch (506:9): [True: 0, False: 0]
  |  Branch (506:52): [True: 0, False: 0]
  ------------------
  507|      0|      return dsInitialOptExpected;
  508|  44.0k|    if (eOptID == DECODER_OPTION_END_OF_STREAM) { // Indicate bit-stream of the final frame to be decoded
  ------------------
  |  Branch (508:9): [True: 22.0k, False: 22.0k]
  ------------------
  509|  22.0k|      if (pOption == NULL)
  ------------------
  |  Branch (509:11): [True: 0, False: 22.0k]
  ------------------
  510|      0|        return cmInitParaError;
  511|       |
  512|  22.0k|      iVal = * ((int*)pOption); // boolean value for whether enabled End Of Stream flag
  513|       |
  514|  22.0k|      if (pDecContext == NULL) return dsInitialOptExpected;
  ------------------
  |  Branch (514:11): [True: 0, False: 22.0k]
  ------------------
  515|       |
  516|  22.0k|      pDecContext->bEndOfStreamFlag = iVal ? true : false;
  ------------------
  |  Branch (516:39): [True: 22.0k, False: 0]
  ------------------
  517|  22.0k|      if (iVal && m_iThreadCount >= 1)
  ------------------
  |  Branch (517:11): [True: 22.0k, False: 0]
  |  Branch (517:19): [True: 0, False: 22.0k]
  ------------------
  518|      0|        SET_EVENT (&m_sReleaseBufferEvent);
  ------------------
  |  |  149|      0|  EventPost(ph)
  ------------------
  519|       |
  520|  22.0k|      return cmResultSuccess;
  521|  22.0k|    } else if (eOptID == DECODER_OPTION_ERROR_CON_IDC) { // Indicate error concealment status
  ------------------
  |  Branch (521:16): [True: 0, False: 22.0k]
  ------------------
  522|      0|      if (pOption == NULL)
  ------------------
  |  Branch (522:11): [True: 0, False: 0]
  ------------------
  523|      0|        return cmInitParaError;
  524|       |
  525|      0|      if (pDecContext == NULL) return dsInitialOptExpected;
  ------------------
  |  Branch (525:11): [True: 0, False: 0]
  ------------------
  526|       |
  527|      0|      iVal = * ((int*)pOption); // int value for error concealment idc
  528|      0|      iVal = WELS_CLIP3 (iVal, (int32_t)ERROR_CON_DISABLE, (int32_t)ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE);
  ------------------
  |  |  204|      0|#define WELS_CLIP3(iX, iY, iZ) ((iX) < (iY) ? (iY) : ((iX) > (iZ) ? (iZ) : (iX)))
  |  |  ------------------
  |  |  |  Branch (204:33): [True: 0, False: 0]
  |  |  |  Branch (204:55): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  529|      0|      if ((pDecContext->pParam->bParseOnly) && (iVal != (int32_t)ERROR_CON_DISABLE)) {
  ------------------
  |  Branch (529:11): [True: 0, False: 0]
  |  Branch (529:48): [True: 0, False: 0]
  ------------------
  530|      0|        WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
  531|      0|                 "CWelsDecoder::SetOption for ERROR_CON_IDC = %d not allowd for parse only!.", iVal);
  532|      0|        return cmInitParaError;
  533|      0|      }
  534|       |
  535|      0|      pDecContext->pParam->eEcActiveIdc = (ERROR_CON_IDC)iVal;
  536|      0|      InitErrorCon (pDecContext);
  537|      0|      WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
  538|      0|               "CWelsDecoder::SetOption for ERROR_CON_IDC = %d.", iVal);
  539|       |
  540|      0|      return cmResultSuccess;
  541|  22.0k|    } else if (eOptID == DECODER_OPTION_TRACE_LEVEL) {
  ------------------
  |  Branch (541:16): [True: 22.0k, False: 0]
  ------------------
  542|  22.0k|      if (m_pWelsTrace) {
  ------------------
  |  Branch (542:11): [True: 22.0k, False: 0]
  ------------------
  543|  22.0k|        uint32_t level = * ((uint32_t*)pOption);
  544|  22.0k|        m_pWelsTrace->SetTraceLevel (level);
  545|  22.0k|      }
  546|  22.0k|      return cmResultSuccess;
  547|  22.0k|    } else if (eOptID == DECODER_OPTION_TRACE_CALLBACK) {
  ------------------
  |  Branch (547:16): [True: 0, False: 0]
  ------------------
  548|      0|      if (m_pWelsTrace) {
  ------------------
  |  Branch (548:11): [True: 0, False: 0]
  ------------------
  549|      0|        WelsTraceCallback callback = * ((WelsTraceCallback*)pOption);
  550|      0|        m_pWelsTrace->SetTraceCallback (callback);
  551|      0|        WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
  552|      0|                 "CWelsDecoder::SetOption():DECODER_OPTION_TRACE_CALLBACK callback = %p.",
  553|      0|                 callback);
  554|      0|      }
  555|      0|      return cmResultSuccess;
  556|      0|    } else if (eOptID == DECODER_OPTION_TRACE_CALLBACK_CONTEXT) {
  ------------------
  |  Branch (556:16): [True: 0, False: 0]
  ------------------
  557|      0|      if (m_pWelsTrace) {
  ------------------
  |  Branch (557:11): [True: 0, False: 0]
  ------------------
  558|      0|        void* ctx = * ((void**)pOption);
  559|      0|        m_pWelsTrace->SetTraceCallbackContext (ctx);
  560|      0|      }
  561|      0|      return cmResultSuccess;
  562|      0|    } else if (eOptID == DECODER_OPTION_GET_STATISTICS) {
  ------------------
  |  Branch (562:16): [True: 0, False: 0]
  ------------------
  563|      0|      WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING,
  564|      0|               "CWelsDecoder::SetOption():DECODER_OPTION_GET_STATISTICS: this option is get-only!");
  565|      0|      return cmInitParaError;
  566|      0|    } else if (eOptID == DECODER_OPTION_STATISTICS_LOG_INTERVAL) {
  ------------------
  |  Branch (566:16): [True: 0, False: 0]
  ------------------
  567|      0|      if (pOption) {
  ------------------
  |  Branch (567:11): [True: 0, False: 0]
  ------------------
  568|      0|        if (pDecContext == NULL) return dsInitialOptExpected;
  ------------------
  |  Branch (568:13): [True: 0, False: 0]
  ------------------
  569|      0|        pDecContext->pDecoderStatistics->iStatisticsLogInterval = (* ((unsigned int*)pOption));
  570|      0|        return cmResultSuccess;
  571|      0|      }
  572|      0|    } else if (eOptID == DECODER_OPTION_GET_SAR_INFO) {
  ------------------
  |  Branch (572:16): [True: 0, False: 0]
  ------------------
  573|      0|      WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING,
  574|      0|               "CWelsDecoder::SetOption():DECODER_OPTION_GET_SAR_INFO: this option is get-only!");
  575|      0|      return cmInitParaError;
  576|      0|    }
  577|  44.0k|  }
  578|      0|  return cmInitParaError;
  579|  44.0k|}
_ZN7WelsDec12CWelsDecoder18DecodeFrameNoDelayEPKhiPPhP13TagBufferInfo:
  698|  5.45M|    SBufferInfo* pDstInfo) {
  699|  5.45M|  int iRet = dsErrorFree;
  700|  5.45M|  if (m_iThreadCount >= 1) {
  ------------------
  |  Branch (700:7): [True: 0, False: 5.45M]
  ------------------
  701|      0|    SET_EVENT (&m_sReleaseBufferEvent);
  ------------------
  |  |  149|      0|  EventPost(ph)
  ------------------
  702|      0|    iRet = ThreadDecodeFrameInternal (kpSrc, kiSrcLen, ppDst, pDstInfo);
  703|      0|    if (m_sReoderingStatus.iNumOfPicts) {
  ------------------
  |  Branch (703:9): [True: 0, False: 0]
  ------------------
  704|      0|      WAIT_EVENT (&m_sBufferingEvent, WELS_DEC_THREAD_WAIT_INFINITE);
  ------------------
  |  |  158|      0|  EventWait(ph, (int32_t)timeout)
  ------------------
  705|      0|      RESET_EVENT (&m_sBufferingEvent);
  ------------------
  |  |  152|      0|  EventReset(ph)
  ------------------
  706|      0|      RESET_EVENT (&m_sReleaseBufferEvent);
  ------------------
  |  |  152|      0|  EventReset(ph)
  ------------------
  707|      0|      if (!m_sReoderingStatus.bHasBSlice) {
  ------------------
  |  Branch (707:11): [True: 0, False: 0]
  ------------------
  708|      0|        if (m_sReoderingStatus.iNumOfPicts > 1) {
  ------------------
  |  Branch (708:13): [True: 0, False: 0]
  ------------------
  709|      0|          ReleaseBufferedReadyPictureNoReorder (NULL, ppDst, pDstInfo);
  710|      0|        }
  711|      0|      }
  712|      0|      else {
  713|      0|        ReleaseBufferedReadyPictureReorder (NULL, ppDst, pDstInfo);
  714|      0|      }
  715|      0|    }
  716|      0|    return (DECODING_STATE)iRet;
  717|      0|  }
  718|       |  //SBufferInfo sTmpBufferInfo;
  719|       |  //unsigned char* ppTmpDst[3] = {NULL, NULL, NULL};
  720|  5.45M|  iRet = (int)DecodeFrame2 (kpSrc, kiSrcLen, ppDst, pDstInfo);
  721|       |  //memcpy (&sTmpBufferInfo, pDstInfo, sizeof (SBufferInfo));
  722|       |  //ppTmpDst[0] = ppDst[0];
  723|       |  //ppTmpDst[1] = ppDst[1];
  724|       |  //ppTmpDst[2] = ppDst[2];
  725|  5.45M|  iRet |= DecodeFrame2 (NULL, 0, ppDst, pDstInfo);
  726|       |  //if ((pDstInfo->iBufferStatus == 0) && (sTmpBufferInfo.iBufferStatus == 1)) {
  727|       |  //memcpy (pDstInfo, &sTmpBufferInfo, sizeof (SBufferInfo));
  728|       |  //ppDst[0] = ppTmpDst[0];
  729|       |  //ppDst[1] = ppTmpDst[1];
  730|       |  //ppDst[2] = ppTmpDst[2];
  731|       |  //}
  732|  5.45M|  return (DECODING_STATE)iRet;
  733|  5.45M|}
_ZN7WelsDec12CWelsDecoder19DecodeFrame2WithCtxEPNS_21TagWelsDecoderContextEPKhiPPhP13TagBufferInfo:
  738|  10.9M|    SBufferInfo* pDstInfo) {
  739|  10.9M|  if (pDecContext == NULL || pDecContext->pParam == NULL) {
  ------------------
  |  Branch (739:7): [True: 0, False: 10.9M]
  |  Branch (739:30): [True: 0, False: 10.9M]
  ------------------
  740|      0|    if (m_pWelsTrace != NULL) {
  ------------------
  |  Branch (740:9): [True: 0, False: 0]
  ------------------
  741|      0|      WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "Call DecodeFrame2 without Initialize.\n");
  742|      0|    }
  743|      0|    return dsInitialOptExpected;
  744|      0|  }
  745|       |
  746|  10.9M|  if (pDecContext->pParam->bParseOnly) {
  ------------------
  |  Branch (746:7): [True: 0, False: 10.9M]
  ------------------
  747|      0|    WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "bParseOnly should be false for this API calling! \n");
  748|      0|    pDecContext->iErrorCode |= dsInvalidArgument;
  749|      0|    return dsInvalidArgument;
  750|      0|  }
  751|  10.9M|  if (CheckBsBuffer (pDecContext, kiSrcLen)) {
  ------------------
  |  Branch (751:7): [True: 0, False: 10.9M]
  ------------------
  752|      0|    if (ResetDecoder(pDecContext)) {
  ------------------
  |  Branch (752:9): [True: 0, False: 0]
  ------------------
  753|      0|      if (pDstInfo) pDstInfo->iBufferStatus = 0;
  ------------------
  |  Branch (753:11): [True: 0, False: 0]
  ------------------
  754|      0|      return dsOutOfMemory;
  755|      0|    }
  756|      0|    return dsErrorFree;
  757|      0|  }
  758|  10.9M|  if (kiSrcLen > 0 && kpSrc != NULL) {
  ------------------
  |  Branch (758:7): [True: 5.45M, False: 5.45M]
  |  Branch (758:23): [True: 5.45M, False: 0]
  ------------------
  759|       |#ifdef OUTPUT_BIT_STREAM
  760|       |    if (m_pFBS) {
  761|       |      WelsFwrite (kpSrc, sizeof (unsigned char), kiSrcLen, m_pFBS);
  762|       |      WelsFflush (m_pFBS);
  763|       |    }
  764|       |    if (m_pFBSSize) {
  765|       |      WelsFwrite (&kiSrcLen, sizeof (int), 1, m_pFBSSize);
  766|       |      WelsFflush (m_pFBSSize);
  767|       |    }
  768|       |#endif//OUTPUT_BIT_STREAM
  769|  5.45M|    pDecContext->bEndOfStreamFlag = false;
  770|  5.45M|    if (GetThreadCount (pDecContext) <= 0) {
  ------------------
  |  Branch (770:9): [True: 5.45M, False: 0]
  ------------------
  771|  5.45M|      pDecContext->uiDecodingTimeStamp = ++m_uiDecodeTimeStamp;
  772|  5.45M|    }
  773|  5.45M|  } else {
  774|       |    //For application MODE, the error detection should be added for safe.
  775|       |    //But for CONSOLE MODE, when decoding LAST AU, kiSrcLen==0 && kpSrc==NULL.
  776|  5.45M|    pDecContext->bEndOfStreamFlag = true;
  777|  5.45M|    pDecContext->bInstantDecFlag = true;
  778|  5.45M|  }
  779|       |
  780|  10.9M|  int64_t iStart, iEnd;
  781|  10.9M|  iStart = WelsTime();
  782|       |
  783|  10.9M|  if (GetThreadCount (pDecContext) <= 1) {
  ------------------
  |  Branch (783:7): [True: 10.9M, False: 0]
  ------------------
  784|  10.9M|    ppDst[0] = ppDst[1] = ppDst[2] = NULL;
  785|  10.9M|  }
  786|  10.9M|  pDecContext->iErrorCode = dsErrorFree; //initialize at the starting of AU decoding.
  787|  10.9M|  pDecContext->iFeedbackVclNalInAu = FEEDBACK_UNKNOWN_NAL; //initialize
  788|  10.9M|  unsigned long long uiInBsTimeStamp = pDstInfo->uiInBsTimeStamp;
  789|  10.9M|  if (GetThreadCount (pDecContext) <= 1) {
  ------------------
  |  Branch (789:7): [True: 10.9M, False: 0]
  ------------------
  790|  10.9M|    memset (pDstInfo, 0, sizeof (SBufferInfo));
  791|  10.9M|  }
  792|  10.9M|  pDstInfo->uiInBsTimeStamp = uiInBsTimeStamp;
  793|  10.9M|#ifdef LONG_TERM_REF
  794|  10.9M|  pDecContext->bReferenceLostAtT0Flag = false; //initialize for LTR
  795|  10.9M|  pDecContext->bCurAuContainLtrMarkSeFlag = false;
  796|  10.9M|  pDecContext->iFrameNumOfAuMarkedLtr = 0;
  797|  10.9M|  pDecContext->iFrameNum = -1; //initialize
  798|  10.9M|#endif
  799|       |
  800|  10.9M|  if (GetThreadCount (pDecContext) >= 1) {
  ------------------
  |  Branch (800:7): [True: 0, False: 10.9M]
  ------------------
  801|      0|    WAIT_EVENT (&m_sReleaseBufferEvent, WELS_DEC_THREAD_WAIT_INFINITE);
  ------------------
  |  |  158|      0|  EventWait(ph, (int32_t)timeout)
  ------------------
  802|      0|  }
  803|       |
  804|  10.9M|  pDecContext->iFeedbackTidInAu = -1; //initialize
  805|  10.9M|  pDecContext->iFeedbackNalRefIdc = -1; //initialize
  806|  10.9M|  if (pDstInfo) {
  ------------------
  |  Branch (806:7): [True: 10.9M, False: 0]
  ------------------
  807|  10.9M|    pDstInfo->uiOutYuvTimeStamp = 0;
  808|  10.9M|    pDecContext->uiTimeStamp = pDstInfo->uiInBsTimeStamp;
  809|  10.9M|  } else {
  810|      0|    pDecContext->uiTimeStamp = 0;
  811|      0|  }
  812|  10.9M|  WelsDecodeBs (pDecContext, kpSrc, kiSrcLen, ppDst,
  813|  10.9M|                pDstInfo, NULL); //iErrorCode has been modified in this function
  814|  10.9M|  pDecContext->bInstantDecFlag = false; //reset no-delay flag
  815|  10.9M|  if (pDecContext->iErrorCode) {
  ------------------
  |  Branch (815:7): [True: 5.68M, False: 5.22M]
  ------------------
  816|  5.68M|    EWelsNalUnitType eNalType =
  817|  5.68M|      NAL_UNIT_UNSPEC_0; //for NBR, IDR frames are expected to decode as followed if error decoding an IDR currently
  818|       |
  819|  5.68M|    eNalType = pDecContext->sCurNalHead.eNalUnitType;
  820|  5.68M|    if (pDecContext->iErrorCode & dsOutOfMemory) {
  ------------------
  |  Branch (820:9): [True: 4.44k, False: 5.67M]
  ------------------
  821|  4.44k|      if (ResetDecoder (pDecContext)) {
  ------------------
  |  Branch (821:11): [True: 4.44k, False: 0]
  ------------------
  822|  4.44k|        if (pDstInfo) pDstInfo->iBufferStatus = 0;
  ------------------
  |  Branch (822:13): [True: 4.44k, False: 0]
  ------------------
  823|  4.44k|        return dsOutOfMemory;
  824|  4.44k|      }
  825|      0|      return dsErrorFree;
  826|  4.44k|    }
  827|  5.67M|    if (pDecContext->iErrorCode & dsRefListNullPtrs) {
  ------------------
  |  Branch (827:9): [True: 0, False: 5.67M]
  ------------------
  828|      0|      if (ResetDecoder (pDecContext)) {
  ------------------
  |  Branch (828:11): [True: 0, False: 0]
  ------------------
  829|      0|        if (pDstInfo) pDstInfo->iBufferStatus = 0;
  ------------------
  |  Branch (829:13): [True: 0, False: 0]
  ------------------
  830|      0|        return dsRefListNullPtrs;
  831|      0|      }
  832|      0|      return dsErrorFree;
  833|      0|    }
  834|       |    //for AVC bitstream (excluding AVC with temporal scalability, including TP), as long as error occur, SHOULD notify upper layer key frame loss.
  835|  5.67M|    if ((IS_PARAM_SETS_NALS (eNalType) || NAL_UNIT_CODED_SLICE_IDR == eNalType) ||
  ------------------
  |  |  145|  11.3M|#define IS_PARAM_SETS_NALS(t)                   ( (t) == NAL_UNIT_SPS || (t) == NAL_UNIT_PPS || (t) == NAL_UNIT_SUBSET_SPS )
  |  |  ------------------
  |  |  |  Branch (145:51): [True: 42.7k, False: 5.63M]
  |  |  |  Branch (145:74): [True: 41.7k, False: 5.59M]
  |  |  |  Branch (145:97): [True: 9.89k, False: 5.58M]
  |  |  ------------------
  ------------------
  |  Branch (835:43): [True: 189k, False: 5.39M]
  ------------------
  836|  5.67M|        (VIDEO_BITSTREAM_AVC == pDecContext->eVideoType)) {
  ------------------
  |  Branch (836:9): [True: 5.39M, False: 0]
  ------------------
  837|  5.67M|      if (pDecContext->pParam->eEcActiveIdc == ERROR_CON_DISABLE) {
  ------------------
  |  Branch (837:11): [True: 0, False: 5.67M]
  ------------------
  838|      0|#ifdef LONG_TERM_REF
  839|      0|        pDecContext->bParamSetsLostFlag = true;
  840|       |#else
  841|       |        pDecContext->bReferenceLostAtT0Flag = true;
  842|       |#endif
  843|      0|      }
  844|  5.67M|    }
  845|       |
  846|  5.67M|    if (pDecContext->bPrintFrameErrorTraceFlag) {
  ------------------
  |  Branch (846:9): [True: 53.5k, False: 5.62M]
  ------------------
  847|  53.5k|      WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "decode failed, failure type:%d \n",
  848|  53.5k|               pDecContext->iErrorCode);
  849|  53.5k|      pDecContext->bPrintFrameErrorTraceFlag = false;
  850|  5.62M|    } else {
  851|  5.62M|      pDecContext->iIgnoredErrorInfoPacketCount++;
  852|  5.62M|      if (pDecContext->iIgnoredErrorInfoPacketCount == INT_MAX) {
  ------------------
  |  Branch (852:11): [True: 0, False: 5.62M]
  ------------------
  853|      0|        WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, "continuous error reached INT_MAX! Restart as 0.");
  854|      0|        pDecContext->iIgnoredErrorInfoPacketCount = 0;
  855|      0|      }
  856|  5.62M|    }
  857|  5.67M|    if ((pDecContext->pParam->eEcActiveIdc != ERROR_CON_DISABLE) && (pDstInfo->iBufferStatus == 1)) {
  ------------------
  |  Branch (857:9): [True: 5.67M, False: 0]
  |  Branch (857:69): [True: 571k, False: 5.10M]
  ------------------
  858|       |      //TODO after dec status updated
  859|   571k|      pDecContext->iErrorCode |= dsDataErrorConcealed;
  860|       |
  861|   571k|      pDecContext->pDecoderStatistics->uiDecodedFrameCount++;
  862|   571k|      if (pDecContext->pDecoderStatistics->uiDecodedFrameCount == 0) { //exceed max value of uint32_t
  ------------------
  |  Branch (862:11): [True: 0, False: 571k]
  ------------------
  863|      0|        ResetDecStatNums (pDecContext->pDecoderStatistics);
  864|      0|        pDecContext->pDecoderStatistics->uiDecodedFrameCount++;
  865|      0|      }
  866|   571k|      int32_t iMbConcealedNum = pDecContext->iMbEcedNum + pDecContext->iMbEcedPropNum;
  867|   571k|      pDecContext->pDecoderStatistics->uiAvgEcRatio = pDecContext->iMbNum == 0 ?
  ------------------
  |  Branch (867:55): [True: 0, False: 571k]
  ------------------
  868|   571k|          (pDecContext->pDecoderStatistics->uiAvgEcRatio * pDecContext->pDecoderStatistics->uiEcFrameNum) : ((
  869|   571k|                pDecContext->pDecoderStatistics->uiAvgEcRatio * pDecContext->pDecoderStatistics->uiEcFrameNum) + ((
  870|   571k|                      iMbConcealedNum * 100) / pDecContext->iMbNum));
  871|   571k|      pDecContext->pDecoderStatistics->uiAvgEcPropRatio = pDecContext->iMbNum == 0 ?
  ------------------
  |  Branch (871:59): [True: 0, False: 571k]
  ------------------
  872|   571k|          (pDecContext->pDecoderStatistics->uiAvgEcPropRatio * pDecContext->pDecoderStatistics->uiEcFrameNum) : ((
  873|   571k|                pDecContext->pDecoderStatistics->uiAvgEcPropRatio * pDecContext->pDecoderStatistics->uiEcFrameNum) + ((
  874|   571k|                      pDecContext->iMbEcedPropNum * 100) / pDecContext->iMbNum));
  875|   571k|      pDecContext->pDecoderStatistics->uiEcFrameNum += (iMbConcealedNum == 0 ? 0 : 1);
  ------------------
  |  Branch (875:57): [True: 2.24k, False: 568k]
  ------------------
  876|   571k|      pDecContext->pDecoderStatistics->uiAvgEcRatio = pDecContext->pDecoderStatistics->uiEcFrameNum == 0 ? 0 :
  ------------------
  |  Branch (876:55): [True: 1.15k, False: 570k]
  ------------------
  877|   571k|          pDecContext->pDecoderStatistics->uiAvgEcRatio / pDecContext->pDecoderStatistics->uiEcFrameNum;
  878|   571k|      pDecContext->pDecoderStatistics->uiAvgEcPropRatio = pDecContext->pDecoderStatistics->uiEcFrameNum == 0 ? 0 :
  ------------------
  |  Branch (878:59): [True: 1.15k, False: 570k]
  ------------------
  879|   571k|          pDecContext->pDecoderStatistics->uiAvgEcPropRatio / pDecContext->pDecoderStatistics->uiEcFrameNum;
  880|   571k|    }
  881|  5.67M|    iEnd = WelsTime();
  882|  5.67M|    pDecContext->dDecTime += (iEnd - iStart) / 1e3;
  883|       |
  884|  5.67M|    OutputStatisticsLog (*pDecContext->pDecoderStatistics);
  885|  5.67M|    if (GetThreadCount (pDecContext) >= 1) {
  ------------------
  |  Branch (885:9): [True: 0, False: 5.67M]
  ------------------
  886|      0|      BufferingReadyPicture (pDecContext, ppDst, pDstInfo);
  887|      0|      SET_EVENT (&m_sBufferingEvent);
  ------------------
  |  |  149|      0|  EventPost(ph)
  ------------------
  888|  5.67M|    } else {
  889|  5.67M|      ReorderPicturesInDisplay (pDecContext, ppDst, pDstInfo);
  890|  5.67M|    }
  891|       |
  892|  5.67M|    return (DECODING_STATE)pDecContext->iErrorCode;
  893|  5.67M|  }
  894|       |  // else Error free, the current codec works well
  895|       |
  896|  5.22M|  if (pDstInfo->iBufferStatus == 1) {
  ------------------
  |  Branch (896:7): [True: 9.80k, False: 5.21M]
  ------------------
  897|       |
  898|  9.80k|    pDecContext->pDecoderStatistics->uiDecodedFrameCount++;
  899|  9.80k|    if (pDecContext->pDecoderStatistics->uiDecodedFrameCount == 0) { //exceed max value of uint32_t
  ------------------
  |  Branch (899:9): [True: 0, False: 9.80k]
  ------------------
  900|      0|      ResetDecStatNums (pDecContext->pDecoderStatistics);
  901|      0|      pDecContext->pDecoderStatistics->uiDecodedFrameCount++;
  902|      0|    }
  903|       |
  904|  9.80k|    OutputStatisticsLog (*pDecContext->pDecoderStatistics);
  905|  9.80k|  }
  906|  5.22M|  iEnd = WelsTime();
  907|  5.22M|  pDecContext->dDecTime += (iEnd - iStart) / 1e3;
  908|       |
  909|  5.22M|  if (GetThreadCount (pDecContext) >= 1) {
  ------------------
  |  Branch (909:7): [True: 0, False: 5.22M]
  ------------------
  910|      0|    BufferingReadyPicture (pDecContext, ppDst, pDstInfo);
  911|      0|    SET_EVENT (&m_sBufferingEvent);
  ------------------
  |  |  149|      0|  EventPost(ph)
  ------------------
  912|  5.22M|  } else {
  913|  5.22M|    ReorderPicturesInDisplay (pDecContext, ppDst, pDstInfo);
  914|  5.22M|  }
  915|  5.22M|  return dsErrorFree;
  916|  10.9M|}
_ZN7WelsDec12CWelsDecoder12DecodeFrame2EPKhiPPhP13TagBufferInfo:
  921|  10.9M|    SBufferInfo* pDstInfo) {
  922|  10.9M|  PWelsDecoderContext pDecContext = m_pDecThrCtx[0].pCtx;
  923|  10.9M|  return DecodeFrame2WithCtx (pDecContext, kpSrc, kiSrcLen, ppDst, pDstInfo);
  924|  10.9M|}
_ZN7WelsDec12CWelsDecoder19OutputStatisticsLogER25TagVideoDecoderStatistics:
  947|  5.68M|void CWelsDecoder::OutputStatisticsLog (SDecoderStatistics& sDecoderStatistics) {
  948|  5.68M|  if ((sDecoderStatistics.uiDecodedFrameCount > 0) && (sDecoderStatistics.iStatisticsLogInterval > 0)
  ------------------
  |  Branch (948:7): [True: 5.40M, False: 284k]
  |  Branch (948:55): [True: 5.40M, False: 0]
  ------------------
  949|  5.40M|      && ((sDecoderStatistics.uiDecodedFrameCount % sDecoderStatistics.iStatisticsLogInterval) == 0)) {
  ------------------
  |  Branch (949:10): [True: 1.54k, False: 5.40M]
  ------------------
  950|  1.54k|    WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
  951|  1.54k|             "DecoderStatistics: uiWidth=%d, uiHeight=%d, fAverageFrameSpeedInMs=%.1f, fActualAverageFrameSpeedInMs=%.1f, \
  952|  1.54k|              uiDecodedFrameCount=%d, uiResolutionChangeTimes=%d, uiIDRCorrectNum=%d, \
  953|  1.54k|              uiAvgEcRatio=%d, uiAvgEcPropRatio=%d, uiEcIDRNum=%d, uiEcFrameNum=%d, \
  954|  1.54k|              uiIDRLostNum=%d, uiFreezingIDRNum=%d, uiFreezingNonIDRNum=%d, iAvgLumaQp=%d, \
  955|  1.54k|              iSpsReportErrorNum=%d, iSubSpsReportErrorNum=%d, iPpsReportErrorNum=%d, iSpsNoExistNalNum=%d, iSubSpsNoExistNalNum=%d, iPpsNoExistNalNum=%d, \
  956|  1.54k|              uiProfile=%d, uiLevel=%d, \
  957|  1.54k|              iCurrentActiveSpsId=%d, iCurrentActivePpsId=%d,",
  958|  1.54k|             sDecoderStatistics.uiWidth,
  959|  1.54k|             sDecoderStatistics.uiHeight,
  960|  1.54k|             sDecoderStatistics.fAverageFrameSpeedInMs,
  961|  1.54k|             sDecoderStatistics.fActualAverageFrameSpeedInMs,
  962|       |
  963|  1.54k|             sDecoderStatistics.uiDecodedFrameCount,
  964|  1.54k|             sDecoderStatistics.uiResolutionChangeTimes,
  965|  1.54k|             sDecoderStatistics.uiIDRCorrectNum,
  966|       |
  967|  1.54k|             sDecoderStatistics.uiAvgEcRatio,
  968|  1.54k|             sDecoderStatistics.uiAvgEcPropRatio,
  969|  1.54k|             sDecoderStatistics.uiEcIDRNum,
  970|  1.54k|             sDecoderStatistics.uiEcFrameNum,
  971|       |
  972|  1.54k|             sDecoderStatistics.uiIDRLostNum,
  973|  1.54k|             sDecoderStatistics.uiFreezingIDRNum,
  974|  1.54k|             sDecoderStatistics.uiFreezingNonIDRNum,
  975|  1.54k|             sDecoderStatistics.iAvgLumaQp,
  976|       |
  977|  1.54k|             sDecoderStatistics.iSpsReportErrorNum,
  978|  1.54k|             sDecoderStatistics.iSubSpsReportErrorNum,
  979|  1.54k|             sDecoderStatistics.iPpsReportErrorNum,
  980|  1.54k|             sDecoderStatistics.iSpsNoExistNalNum,
  981|  1.54k|             sDecoderStatistics.iSubSpsNoExistNalNum,
  982|  1.54k|             sDecoderStatistics.iPpsNoExistNalNum,
  983|       |
  984|  1.54k|             sDecoderStatistics.uiProfile,
  985|  1.54k|             sDecoderStatistics.uiLevel,
  986|       |
  987|  1.54k|             sDecoderStatistics.iCurrentActiveSpsId,
  988|  1.54k|             sDecoderStatistics.iCurrentActivePpsId);
  989|  1.54k|  }
  990|  5.68M|}
_ZN7WelsDec12CWelsDecoder21BufferingReadyPictureEPNS_21TagWelsDecoderContextEPPhP13TagBufferInfo:
  993|   505k|    SBufferInfo* pDstInfo) {
  994|   505k|  if (pDstInfo->iBufferStatus == 0) {
  ------------------
  |  Branch (994:7): [True: 0, False: 505k]
  ------------------
  995|      0|    return;
  996|      0|  }
  997|   505k|  m_bIsBaseline = pCtx->pSps->uiProfileIdc == 66 || pCtx->pSps->uiProfileIdc == 83;
  ------------------
  |  Branch (997:19): [True: 0, False: 505k]
  |  Branch (997:53): [True: 0, False: 505k]
  ------------------
  998|   505k|  if (!m_bIsBaseline) {
  ------------------
  |  Branch (998:7): [True: 505k, False: 0]
  ------------------
  999|   505k|    if (pCtx->pSliceHeader->eSliceType == B_SLICE) {
  ------------------
  |  Branch (999:9): [True: 15.3k, False: 490k]
  ------------------
 1000|  15.3k|      m_sReoderingStatus.bHasBSlice = true;
 1001|  15.3k|    }
 1002|   505k|  }
 1003|   761k|  for (int32_t i = 0; i < 16; ++i) {
  ------------------
  |  Branch (1003:23): [True: 761k, False: 624]
  ------------------
 1004|   761k|    if (m_sPictInfoList[i].iPOC == IMinInt32) {
  ------------------
  |  |   68|   761k|#define IMinInt32 -0x7FFFFFFF
  ------------------
  |  Branch (1004:9): [True: 504k, False: 256k]
  ------------------
 1005|   504k|      memcpy (&m_sPictInfoList[i].sBufferInfo, pDstInfo, sizeof (SBufferInfo));
 1006|   504k|      m_sPictInfoList[i].iPOC = pCtx->pSliceHeader->iPicOrderCntLsb;
 1007|   504k|      m_sPictInfoList[i].iSeqNum = pCtx->iSeqNum;
 1008|   504k|      m_sPictInfoList[i].uiDecodingTimeStamp = pCtx->uiDecodingTimeStamp;
 1009|   504k|      if (pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb != NULL) {
  ------------------
  |  Branch (1009:11): [True: 504k, False: 0]
  ------------------
 1010|   504k|        m_sPictInfoList[i].iPicBuffIdx = pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb->iPicBuffIdx;
 1011|   504k|        if (GetThreadCount (pCtx) <= 1) ++pCtx->pLastDecPicInfo->pPreviousDecodedPictureInDpb->iRefCount;
  ------------------
  |  Branch (1011:13): [True: 504k, False: 0]
  ------------------
 1012|   504k|      }
 1013|   504k|      m_iLastBufferedIdx = i;
 1014|   504k|      pDstInfo->iBufferStatus = 0;
 1015|   504k|      ++m_sReoderingStatus.iNumOfPicts;
 1016|   504k|      if (i > m_sReoderingStatus.iLargestBufferedPicIndex) {
  ------------------
  |  Branch (1016:11): [True: 10.2k, False: 494k]
  ------------------
 1017|  10.2k|        m_sReoderingStatus.iLargestBufferedPicIndex = i;
 1018|  10.2k|      }
 1019|   504k|      break;
 1020|   504k|    }
 1021|   761k|  }
 1022|   505k|}
_ZN7WelsDec12CWelsDecoder34ReleaseBufferedReadyPictureReorderEPNS_21TagWelsDecoderContextEPPhP13TagBufferInfob:
 1025|  43.1k|    SBufferInfo* pDstInfo, bool isFlush) {
 1026|  43.1k|  PPicBuff pPicBuff = pCtx ? pCtx->pPicBuff : m_pPicBuff;
  ------------------
  |  Branch (1026:23): [True: 43.1k, False: 0]
  ------------------
 1027|  43.1k|  if (pCtx == NULL && m_iThreadCount <= 1) {
  ------------------
  |  Branch (1027:7): [True: 0, False: 43.1k]
  |  Branch (1027:23): [True: 0, False: 0]
  ------------------
 1028|      0|    pCtx = m_pDecThrCtx[0].pCtx;
 1029|      0|  }
 1030|  43.1k|  if (m_sReoderingStatus.iNumOfPicts > 0) {
  ------------------
  |  Branch (1030:7): [True: 43.1k, False: 0]
  ------------------
 1031|  43.1k|    m_sReoderingStatus.iMinPOC = IMinInt32;
  ------------------
  |  |   68|  43.1k|#define IMinInt32 -0x7FFFFFFF
  ------------------
 1032|  43.1k|    int32_t firstValidIdx = -1;
 1033|  44.9k|    for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) {
  ------------------
  |  Branch (1033:25): [True: 44.9k, False: 1]
  ------------------
 1034|  44.9k|      if (m_sReoderingStatus.iMinPOC == IMinInt32 && m_sPictInfoList[i].iPOC > IMinInt32) {
  ------------------
  |  |   68|  89.9k|#define IMinInt32 -0x7FFFFFFF
  ------------------
                    if (m_sReoderingStatus.iMinPOC == IMinInt32 && m_sPictInfoList[i].iPOC > IMinInt32) {
  ------------------
  |  |   68|  44.9k|#define IMinInt32 -0x7FFFFFFF
  ------------------
  |  Branch (1034:11): [True: 44.9k, False: 0]
  |  Branch (1034:54): [True: 43.1k, False: 1.88k]
  ------------------
 1035|  43.1k|        m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC;
 1036|  43.1k|        m_sReoderingStatus.iMinSeqNum = m_sPictInfoList[i].iSeqNum;
 1037|  43.1k|        m_sReoderingStatus.iPictInfoIndex = i;
 1038|  43.1k|        firstValidIdx = i;
 1039|  43.1k|        break;
 1040|  43.1k|      }
 1041|  44.9k|    }
 1042|   138k|    for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) {
  ------------------
  |  Branch (1042:25): [True: 95.5k, False: 43.1k]
  ------------------
 1043|  95.5k|      if (i == firstValidIdx) continue;
  ------------------
  |  Branch (1043:11): [True: 43.1k, False: 52.4k]
  ------------------
 1044|  52.4k|      if (m_sPictInfoList[i].iPOC > IMinInt32
  ------------------
  |  |   68|   104k|#define IMinInt32 -0x7FFFFFFF
  ------------------
  |  Branch (1044:11): [True: 50.5k, False: 1.88k]
  ------------------
 1045|  50.5k|          && ((m_sPictInfoList[i].iSeqNum == m_sReoderingStatus.iMinSeqNum) ? (m_sPictInfoList[i].iPOC < m_sReoderingStatus.iMinPOC) : (m_sPictInfoList[i].iSeqNum - m_sReoderingStatus.iMinSeqNum < 0))) {
  ------------------
  |  Branch (1045:14): [True: 9.58k, False: 41.0k]
  |  Branch (1045:15): [True: 47.5k, False: 3.05k]
  ------------------
 1046|  9.58k|        m_sReoderingStatus.iMinPOC = m_sPictInfoList[i].iPOC;
 1047|  9.58k|        m_sReoderingStatus.iMinSeqNum = m_sPictInfoList[i].iSeqNum;
 1048|  9.58k|        m_sReoderingStatus.iPictInfoIndex = i;
 1049|  9.58k|      }
 1050|  52.4k|    }
 1051|  43.1k|  }
 1052|  43.1k|  if (m_sReoderingStatus.iMinPOC > IMinInt32) {
  ------------------
  |  |   68|  43.1k|#define IMinInt32 -0x7FFFFFFF
  ------------------
  |  Branch (1052:7): [True: 43.1k, False: 1]
  ------------------
 1053|  43.1k|    bool isReady = true;
 1054|  43.1k|    if (!isFlush) {
  ------------------
  |  Branch (1054:9): [True: 43.1k, False: 0]
  ------------------
 1055|  43.1k|      int32_t iLastPOC = pCtx != NULL ? pCtx->pSliceHeader->iPicOrderCntLsb : m_sPictInfoList[m_iLastBufferedIdx].iPOC;
  ------------------
  |  Branch (1055:26): [True: 43.1k, False: 0]
  ------------------
 1056|  43.1k|      int32_t iLastSeqNum = pCtx != NULL ? pCtx->iSeqNum : m_sPictInfoList[m_iLastBufferedIdx].iSeqNum;
  ------------------
  |  Branch (1056:29): [True: 43.1k, False: 0]
  ------------------
 1057|  43.1k|      isReady = (m_sReoderingStatus.iLastWrittenPOC > IMinInt32
  ------------------
  |  |   68|  86.2k|#define IMinInt32 -0x7FFFFFFF
  ------------------
  |  Branch (1057:18): [True: 23.0k, False: 20.0k]
  ------------------
 1058|  23.0k|        && m_sReoderingStatus.iMinPOC - m_sReoderingStatus.iLastWrittenPOC <= 1)
  ------------------
  |  Branch (1058:12): [True: 19.0k, False: 3.98k]
  ------------------
 1059|  24.0k|        || m_sReoderingStatus.iMinPOC < iLastPOC
  ------------------
  |  Branch (1059:12): [True: 4.69k, False: 19.3k]
  ------------------
 1060|  19.3k|        || m_sReoderingStatus.iMinSeqNum - iLastSeqNum < 0;
  ------------------
  |  Branch (1060:12): [True: 251, False: 19.0k]
  ------------------
 1061|  43.1k|    }
 1062|  43.1k|    if (isReady) {
  ------------------
  |  Branch (1062:9): [True: 24.0k, False: 19.0k]
  ------------------
 1063|  24.0k|      m_sReoderingStatus.iLastWrittenPOC = m_sReoderingStatus.iMinPOC;
 1064|  24.0k|      m_sReoderingStatus.iLastWrittenSeqNum = m_sReoderingStatus.iMinSeqNum;
 1065|       |#if defined (_DEBUG)
 1066|       |#ifdef _MOTION_VECTOR_DUMP_
 1067|       |      fprintf (stderr, "Output POC: #%d uiDecodingTimeStamp=%d\n", m_sReoderingStatus.iLastWrittenPOC,
 1068|       |               m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].uiDecodingTimeStamp);
 1069|       |#endif
 1070|       |#endif
 1071|  24.0k|      memcpy (pDstInfo, &m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].sBufferInfo, sizeof (SBufferInfo));
 1072|  24.0k|      ppDst[0] = pDstInfo->pDst[0];
 1073|  24.0k|      ppDst[1] = pDstInfo->pDst[1];
 1074|  24.0k|      ppDst[2] = pDstInfo->pDst[2];
 1075|  24.0k|      m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iPOC = IMinInt32;
  ------------------
  |  |   68|  24.0k|#define IMinInt32 -0x7FFFFFFF
  ------------------
 1076|  24.0k|      int32_t iPicBuffIdx = m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iPicBuffIdx;
 1077|  24.0k|      if (pPicBuff != NULL) {
  ------------------
  |  Branch (1077:11): [True: 24.0k, False: 0]
  ------------------
 1078|  24.0k|        if (iPicBuffIdx >= 0 && iPicBuffIdx < pPicBuff->iCapacity)
  ------------------
  |  Branch (1078:13): [True: 24.0k, False: 0]
  |  Branch (1078:33): [True: 24.0k, False: 0]
  ------------------
 1079|  24.0k|        {
 1080|  24.0k|            PPicture pPic = pPicBuff->ppPic[iPicBuffIdx];
 1081|  24.0k|            --pPic->iRefCount;
 1082|  24.0k|            if (pPic->iRefCount <= 0 && pPic->pSetUnRef)
  ------------------
  |  Branch (1082:17): [True: 24.0k, False: 0]
  |  Branch (1082:41): [True: 3.43k, False: 20.5k]
  ------------------
 1083|  3.43k|              pPic->pSetUnRef(pPic);
 1084|  24.0k|        }
 1085|  24.0k|      }
 1086|  24.0k|      m_sReoderingStatus.iMinPOC = IMinInt32;
  ------------------
  |  |   68|  24.0k|#define IMinInt32 -0x7FFFFFFF
  ------------------
 1087|  24.0k|      --m_sReoderingStatus.iNumOfPicts;
 1088|  24.0k|    }
 1089|  43.1k|  }
 1090|  43.1k|}
_ZN7WelsDec12CWelsDecoder36ReleaseBufferedReadyPictureNoReorderEPNS_21TagWelsDecoderContextEPPhP13TagBufferInfo:
 1095|   462k|{
 1096|   462k|  int32_t firstValidIdx = -1;
 1097|   462k|  uint32_t uiDecodingTimeStamp = 0;
 1098|   462k|  for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) {
  ------------------
  |  Branch (1098:23): [True: 462k, False: 1]
  ------------------
 1099|   462k|    if (m_sPictInfoList[i].iPOC != IMinInt32) {
  ------------------
  |  |   68|   462k|#define IMinInt32 -0x7FFFFFFF
  ------------------
  |  Branch (1099:9): [True: 462k, False: 5]
  ------------------
 1100|   462k|      uiDecodingTimeStamp = m_sPictInfoList[i].uiDecodingTimeStamp;
 1101|   462k|      m_sReoderingStatus.iPictInfoIndex = i;
 1102|   462k|      firstValidIdx = i;
 1103|   462k|      break;
 1104|   462k|    }
 1105|   462k|  }
 1106|  1.38M|  for (int32_t i = 0; i <= m_sReoderingStatus.iLargestBufferedPicIndex; ++i) {
  ------------------
  |  Branch (1106:23): [True: 924k, False: 462k]
  ------------------
 1107|   924k|    if (i == firstValidIdx) continue;
  ------------------
  |  Branch (1107:9): [True: 462k, False: 462k]
  ------------------
 1108|   462k|    if (m_sPictInfoList[i].iPOC != IMinInt32 && m_sPictInfoList[i].uiDecodingTimeStamp < uiDecodingTimeStamp) {
  ------------------
  |  |   68|   924k|#define IMinInt32 -0x7FFFFFFF
  ------------------
  |  Branch (1108:9): [True: 462k, False: 75]
  |  Branch (1108:49): [True: 223k, False: 238k]
  ------------------
 1109|   223k|      uiDecodingTimeStamp = m_sPictInfoList[i].uiDecodingTimeStamp;
 1110|   223k|      m_sReoderingStatus.iPictInfoIndex = i;
 1111|   223k|    }
 1112|   462k|  }
 1113|   462k|  if (uiDecodingTimeStamp > 0) {
  ------------------
  |  Branch (1113:7): [True: 462k, False: 1]
  ------------------
 1114|       |#if defined (_DEBUG)
 1115|       |#ifdef _MOTION_VECTOR_DUMP_
 1116|       |    fprintf(stderr, "Output POC: #%d uiDecodingTimeStamp=%d\n", m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iPOC,
 1117|       |      uiDecodingTimeStamp);
 1118|       |#endif
 1119|       |#endif
 1120|   462k|    m_sReoderingStatus.iLastWrittenPOC = m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iPOC;
 1121|   462k|    m_sReoderingStatus.iLastWrittenSeqNum = m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iSeqNum;
 1122|   462k|    memcpy(pDstInfo, &m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].sBufferInfo, sizeof(SBufferInfo));
 1123|   462k|    ppDst[0] = pDstInfo->pDst[0];
 1124|   462k|    ppDst[1] = pDstInfo->pDst[1];
 1125|   462k|    ppDst[2] = pDstInfo->pDst[2];
 1126|   462k|    m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iPOC = IMinInt32;
  ------------------
  |  |   68|   462k|#define IMinInt32 -0x7FFFFFFF
  ------------------
 1127|   462k|    if (pCtx || m_pPicBuff) {
  ------------------
  |  Branch (1127:9): [True: 462k, False: 0]
  |  Branch (1127:17): [True: 0, False: 0]
  ------------------
 1128|   462k|      PPicBuff pPicBuff = pCtx ? pCtx->pPicBuff : m_pPicBuff;
  ------------------
  |  Branch (1128:27): [True: 462k, False: 0]
  ------------------
 1129|   462k|      int32_t iPicBuffIdx = m_sPictInfoList[m_sReoderingStatus.iPictInfoIndex].iPicBuffIdx;
 1130|   462k|      if (pPicBuff != NULL && iPicBuffIdx >= 0 && iPicBuffIdx < pPicBuff->iCapacity) {
  ------------------
  |  Branch (1130:11): [True: 462k, False: 0]
  |  Branch (1130:31): [True: 462k, False: 0]
  |  Branch (1130:51): [True: 462k, False: 0]
  ------------------
 1131|   462k|        PPicture pPic = pPicBuff->ppPic[iPicBuffIdx];
 1132|   462k|        --pPic->iRefCount;
 1133|   462k|        if (pPic->iRefCount <= 0 && pPic->pSetUnRef)
  ------------------
  |  Branch (1133:13): [True: 462k, False: 0]
  |  Branch (1133:37): [True: 344k, False: 117k]
  ------------------
 1134|   344k|          pPic->pSetUnRef(pPic);
 1135|   462k|      }
 1136|   462k|    }
 1137|   462k|    --m_sReoderingStatus.iNumOfPicts;
 1138|   462k|  }
 1139|   462k|  return;
 1140|   462k|}
_ZN7WelsDec12CWelsDecoder24ReorderPicturesInDisplayEPNS_21TagWelsDecoderContextEPPhP13TagBufferInfo:
 1143|  10.9M|  SBufferInfo* pDstInfo) {
 1144|  10.9M|  DECODING_STATE iRet = dsErrorFree;
 1145|  10.9M|  if (pDecContext->pSps != NULL) {
  ------------------
  |  Branch (1145:7): [True: 10.1M, False: 711k]
  ------------------
 1146|  10.1M|    m_bIsBaseline = pDecContext->pSps->uiProfileIdc == 66 || pDecContext->pSps->uiProfileIdc == 83;
  ------------------
  |  Branch (1146:21): [True: 932k, False: 9.25M]
  |  Branch (1146:62): [True: 137k, False: 9.12M]
  ------------------
 1147|  10.1M|    if (!m_bIsBaseline) {
  ------------------
  |  Branch (1147:9): [True: 9.12M, False: 1.07M]
  ------------------
 1148|  9.12M|      if (pDstInfo->iBufferStatus == 1) {
  ------------------
  |  Branch (1148:11): [True: 508k, False: 8.61M]
  ------------------
 1149|   508k|        if (pDecContext->pSliceHeader->eSliceType == B_SLICE &&
  ------------------
  |  Branch (1149:13): [True: 18.6k, False: 490k]
  ------------------
 1150|  18.6k|            ((pDecContext->iSeqNum == m_sReoderingStatus.iLastWrittenSeqNum) ?
  ------------------
  |  Branch (1150:13): [True: 3.30k, False: 15.3k]
  |  Branch (1150:14): [True: 8.31k, False: 10.2k]
  ------------------
 1151|  8.31k|              (pDecContext->pSliceHeader->iPicOrderCntLsb <= m_sReoderingStatus.iLastWrittenPOC + 2) :
 1152|  18.6k|              (pDecContext->iSeqNum - m_sReoderingStatus.iLastWrittenSeqNum == 1 && pDecContext->pSliceHeader->iPicOrderCntLsb == 0))) {
  ------------------
  |  Branch (1152:16): [True: 1.30k, False: 8.98k]
  |  Branch (1152:85): [True: 225, False: 1.07k]
  ------------------
 1153|  3.30k|          m_sReoderingStatus.iLastWrittenPOC = pDecContext->pSliceHeader->iPicOrderCntLsb;
 1154|  3.30k|          m_sReoderingStatus.iLastWrittenSeqNum = pDecContext->iSeqNum;
 1155|       |          //issue #3478, use b-slice type to determine correct picture order as the first priority as POC order is not as reliable as based on b-slice
 1156|  3.30k|          ppDst[0] = pDstInfo->pDst[0];
 1157|  3.30k|          ppDst[1] = pDstInfo->pDst[1];
 1158|  3.30k|          ppDst[2] = pDstInfo->pDst[2];
 1159|       |#if defined (_DEBUG)
 1160|       |#ifdef _MOTION_VECTOR_DUMP_
 1161|       |          fprintf (stderr, "Output POC: #%d uiDecodingTimeStamp=%d\n", pDecContext->pSliceHeader->iPicOrderCntLsb,
 1162|       |             pDecContext->uiDecodingTimeStamp);
 1163|       |#endif
 1164|       |#endif
 1165|  3.30k|          return iRet;
 1166|  3.30k|        }
 1167|   505k|        BufferingReadyPicture(pDecContext, ppDst, pDstInfo);
 1168|   505k|        if (!m_sReoderingStatus.bHasBSlice && m_sReoderingStatus.iNumOfPicts > 1) {
  ------------------
  |  Branch (1168:13): [True: 469k, False: 35.6k]
  |  Branch (1168:47): [True: 462k, False: 7.49k]
  ------------------
 1169|   462k|          ReleaseBufferedReadyPictureNoReorder (pDecContext, ppDst, pDstInfo);
 1170|   462k|        }
 1171|  43.1k|        else {
 1172|  43.1k|          ReleaseBufferedReadyPictureReorder (pDecContext, ppDst, pDstInfo);
 1173|  43.1k|        }
 1174|   505k|      }
 1175|  9.12M|    }
 1176|  10.1M|  }
 1177|  10.9M|  return iRet;
 1178|  10.9M|}
WelsCreateDecoder:
 1427|  22.0k|long WelsCreateDecoder (ISVCDecoder** ppDecoder) {
 1428|       |
 1429|  22.0k|  if (NULL == ppDecoder) {
  ------------------
  |  Branch (1429:7): [True: 0, False: 22.0k]
  ------------------
 1430|      0|    return ERR_INVALID_PARAMETERS;
 1431|      0|  }
 1432|       |
 1433|  22.0k|  *ppDecoder = new CWelsDecoder();
 1434|       |
 1435|  22.0k|  if (NULL == *ppDecoder) {
  ------------------
  |  Branch (1435:7): [True: 0, False: 22.0k]
  ------------------
 1436|      0|    return ERR_MALLOC_FAILED;
 1437|      0|  }
 1438|       |
 1439|  22.0k|  return ERR_NONE;
 1440|  22.0k|}
WelsDestroyDecoder:
 1445|  22.0k|void WelsDestroyDecoder (ISVCDecoder* pDecoder) {
 1446|  22.0k|  if (NULL != pDecoder) {
  ------------------
  |  Branch (1446:7): [True: 22.0k, False: 0]
  ------------------
 1447|  22.0k|    delete (CWelsDecoder*)pDecoder;
 1448|  22.0k|  }
 1449|  22.0k|}

