MCPcopy Create free account
hub / github.com/cisco/openh264 / StatOverallEncodingExt

Function StatOverallEncodingExt

codec/encoder/core/src/encoder_ext.cpp:2115–2188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2113 */
2114#if defined(STAT_OUTPUT)
2115void StatOverallEncodingExt (sWelsEncCtx* pCtx) {
2116 int8_t i = 0;
2117 int8_t j = 0;
2118 for (i = 0; i < pCtx->pSvcParam->iSpatialLayerNum; i++) {
2119 fprintf (stdout, "\nDependency layer : %d\n", i);
2120 fprintf (stdout, "Quality layer : %d\n", j);
2121 {
2122 const int32_t iCount = pCtx->sStatData[i][j].sSliceData.iSliceCount[I_SLICE] +
2123 pCtx->sStatData[i][j].sSliceData.iSliceCount[P_SLICE] +
2124 pCtx->sStatData[i][j].sSliceData.iSliceCount[B_SLICE];
2125#if defined(MB_TYPES_CHECK)
2126 if (iCount > 0) {
2127 int32_t iCountNumIMb = pCtx->sStatData[i][j].sSliceData.iMbCount[I_SLICE][Intra4x4] +
2128 pCtx->sStatData[i][j].sSliceData.iMbCount[I_SLICE][Intra16x16] + pCtx->sStatData[i][j].sSliceData.iMbCount[I_SLICE][7];
2129 int32_t iCountNumPMb = pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Intra4x4] +
2130 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Intra16x16] +
2131 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][7] +
2132 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Inter16x16] +
2133 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Inter16x8] +
2134 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Inter8x16] +
2135 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Inter8x8] +
2136 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][10] +
2137 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][PSkip];
2138 int32_t count_p_mbL0 = pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Inter16x16] +
2139 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Inter16x8] +
2140 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Inter8x16] +
2141 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Inter8x8] +
2142 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][10];
2143
2144 int32_t iMbCount = iCountNumIMb + iCountNumPMb;
2145 if (iMbCount > 0) {
2146 fprintf (stderr,
2147 "SVC: overall Slices MBs: %d Avg\nI4x4: %.3f%% I16x16: %.3f%% IBL: %.3f%%\nP16x16: %.3f%% P16x8: %.3f%% P8x16: %.3f%% P8x8: %.3f%% SUBP8x8: %.3f%% PSKIP: %.3f%%\nILP(All): %.3f%% ILP(PL0): %.3f%% BLSKIP(PL0): %.3f%% RP(PL0): %.3f%%\n",
2148 iMbCount,
2149 (100.0f * (pCtx->sStatData[i][j].sSliceData.iMbCount[I_SLICE][Intra4x4] +
2150 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Intra4x4]) / iMbCount),
2151 (100.0f * (pCtx->sStatData[i][j].sSliceData.iMbCount[I_SLICE][Intra16x16] +
2152 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Intra16x16]) / iMbCount),
2153 (100.0f * (pCtx->sStatData[i][j].sSliceData.iMbCount[I_SLICE][7] +
2154 pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][7]) / iMbCount),
2155 (100.0f * pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Inter16x16] / iMbCount),
2156 (100.0f * pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Inter16x8] / iMbCount),
2157 (100.0f * pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Inter8x16] / iMbCount),
2158 (100.0f * pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][Inter8x8] / iMbCount),
2159 (100.0f * pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][10] / iMbCount),
2160 (100.0f * pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][PSkip] / iMbCount),
2161 (100.0f * pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][11] / iMbCount),
2162 (100.0f * pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][11] / count_p_mbL0),
2163 (100.0f * pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][8] / count_p_mbL0),
2164 (100.0f * pCtx->sStatData[i][j].sSliceData.iMbCount[P_SLICE][9] / count_p_mbL0)
2165 );
2166 }
2167 }
2168#endif //#if defined(MB_TYPES_CHECK)
2169
2170 if (iCount > 0) {
2171 fprintf (stdout, "SVC: overall PSNR Y: %2.3f U: %2.3f V: %2.3f kb/s: %.1f fps: %.3f\n\n",
2172 (pCtx->sStatData[i][j].sQualityStat.rYPsnr[I_SLICE] + pCtx->sStatData[i][j].sQualityStat.rYPsnr[P_SLICE] +

Callers 1

WelsUninitEncoderExtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected