Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 6 files). Show all
Unified · Split
| @@ -131,7 +131,8 @@ int32_t ParamValidation (SWelsSvcCodingParam* pCfg) { · 130 unmodified lines | ||
| 131 | 131 | return 0; |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | −int32_t ParamValidationExt (SWelsSvcCodingParam* pCodingParam) { | |
| 134 | + | |
| 135 | +int32_t ParamValidationExt (sWelsEncCtx*pCtx,SWelsSvcCodingParam* pCodingParam) { | |
| 135 | 136 | int8_t i = 0; |
| 136 | 137 | int32_t iIdx = 0; |
| 137 | 138 | |
| @@ -140,44 +141,33 @@ int32_t ParamValidationExt (SWelsSvcCodingParam* pCodingParam) { · 2 unmodified lines | ||
| 140 | 141 | return ENC_RETURN_INVALIDINPUT; |
| 141 | 142 | |
| 142 | 143 | if (pCodingParam->iSpatialLayerNum < 1 || pCodingParam->iSpatialLayerNum > MAX_DEPENDENCY_LAYER) { |
| 143 | −#if defined (_DEBUG) | |
| 144 | − fprintf (stderr, "ParamValidationExt(), monitor invalid pCodingParam->iSpatialLayerNum: %d!\n", | |
| 144 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), monitor invalid pCodingParam->iSpatialLayerNum: %d!\n", | |
| 145 | 145 | pCodingParam->iSpatialLayerNum); |
| 146 | −#endif//#if _DEBUG | |
| 147 | − | |
| 148 | 146 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 149 | 147 | } |
| 150 | 148 | |
| 151 | 149 | if (pCodingParam->iTemporalLayerNum < 1 || pCodingParam->iTemporalLayerNum > MAX_TEMPORAL_LEVEL) { |
| 152 | −#if defined (_DEBUG) | |
| 153 | − fprintf (stderr, "ParamValidationExt(), monitor invalid pCodingParam->iTemporalLayerNum: %d!\n", | |
| 150 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), monitor invalid pCodingParam->iTemporalLayerNum: %d!\n", | |
| 154 | 151 | pCodingParam->iTemporalLayerNum); |
| 155 | −#endif//#if _DEBUG | |
| 156 | 152 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 157 | 153 | } |
| 158 | 154 | |
| 159 | 155 | if (pCodingParam->uiGopSize < 1 || pCodingParam->uiGopSize > MAX_GOP_SIZE) { |
| 160 | −#if defined (_DEBUG) | |
| 161 | − fprintf (stderr, "ParamValidationExt(), monitor invalid pCodingParam->uiGopSize: %d!\n", pCodingParam->uiGopSize); | |
| 162 | −#endif//#if _DEBUG | |
| 156 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), monitor invalid pCodingParam->uiGopSize: %d!\n", pCodingParam->uiGopSize); | |
| 163 | 157 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 164 | 158 | } |
| 165 | 159 | |
| 166 | 160 | |
| 167 | 161 | if (pCodingParam->uiIntraPeriod && pCodingParam->uiIntraPeriod < pCodingParam->uiGopSize) { |
| 168 | −#if defined (_DEBUG) | |
| 169 | − fprintf (stderr, | |
| 162 | + WelsLog (pCtx, WELS_LOG_ERROR, | |
| 170 | 163 | "ParamValidationExt(), uiIntraPeriod(%d) should be not less than that of uiGopSize(%d) or -1 specified!\n", |
| 171 | 164 | pCodingParam->uiIntraPeriod, pCodingParam->uiGopSize); |
| 172 | −#endif//#if _DEBUG | |
| 173 | 165 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 174 | 166 | } |
| 175 | 167 | |
| 176 | 168 | if (pCodingParam->uiIntraPeriod && (pCodingParam->uiIntraPeriod & (pCodingParam->uiGopSize - 1)) != 0) { |
| 177 | −#if defined (_DEBUG) | |
| 178 | − fprintf (stderr, "ParamValidationExt(), uiIntraPeriod(%d) should be multiple of uiGopSize(%d) or -1 specified!\n", | |
| 169 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), uiIntraPeriod(%d) should be multiple of uiGopSize(%d) or -1 specified!\n", | |
| 179 | 170 | pCodingParam->uiIntraPeriod, pCodingParam->uiGopSize); |
| 180 | −#endif//#if _DEBUG | |
| 181 | 171 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 182 | 172 | } |
| 183 | 173 | |
| @@ -207,24 +197,18 @@ int32_t ParamValidationExt (SWelsSvcCodingParam* pCodingParam) { · 23 unmodified lines | ||
| 207 | 197 | int32_t iMbNumInFrame = 0; |
| 208 | 198 | int32_t iMaxSliceNum = MAX_SLICES_NUM; |
| 209 | 199 | if (kiPicWidth <= 0 || kiPicHeight <= 0) { |
| 210 | −#if defined (_DEBUG) | |
| 211 | − fprintf (stderr, "ParamValidationExt(), invalid %d x %d in dependency layer settings!\n", kiPicWidth, kiPicHeight); | |
| 212 | −#endif//#if _DEBUG | |
| 200 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid %d x %d in dependency layer settings!\n", kiPicWidth, kiPicHeight); | |
| 213 | 201 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 214 | 202 | } |
| 215 | 203 | if ((kiPicWidth & 0x0F) != 0 || (kiPicHeight & 0x0F) != 0) { |
| 216 | −#if defined (_DEBUG) | |
| 217 | − fprintf (stderr, | |
| 204 | + WelsLog (pCtx, WELS_LOG_ERROR, | |
| 218 | 205 | "ParamValidationExt(), in layer #%d iWidth x iHeight(%d x %d) both should be multiple of 16, can not support with arbitrary size currently!\n", |
| 219 | 206 | i, kiPicWidth, kiPicHeight); |
| 220 | −#endif//#if _DEBUG | |
| 221 | 207 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 222 | 208 | } |
| 223 | 209 | |
| 224 | 210 | if (fDlp->sSliceCfg.uiSliceMode >= SM_RESERVED) { |
| 225 | −#if defined (_DEBUG) | |
| 226 | − fprintf (stderr, "ParamValidationExt(), invalid uiSliceMode (%d) settings!\n", fDlp->sSliceCfg.uiSliceMode); | |
| 227 | −#endif//#if _DEBUG | |
| 211 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMode (%d) settings!\n", fDlp->sSliceCfg.uiSliceMode); | |
| 228 | 212 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 229 | 213 | } |
| 230 | 214 | |
| @@ -251,17 +235,13 @@ int32_t ParamValidationExt (SWelsSvcCodingParam* pCodingParam) { · 20 unmodified lines | ||
| 251 | 235 | iMaxSliceNum = MAX_SLICES_NUM; |
| 252 | 236 | if (fDlp->sSliceCfg.sSliceArgument.uiSliceNum <= 0 |
| 253 | 237 | || fDlp->sSliceCfg.sSliceArgument.uiSliceNum > iMaxSliceNum) { |
| 254 | −#if defined (_DEBUG) | |
| 255 | − fprintf (stderr, "ParamValidationExt(), invalid uiSliceNum (%d) settings!\n", fDlp->sSliceCfg.sSliceArgument.uiSliceNum); | |
| 256 | −#endif//#if _DEBUG | |
| 238 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) settings!\n", fDlp->sSliceCfg.sSliceArgument.uiSliceNum); | |
| 257 | 239 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 258 | 240 | } |
| 259 | 241 | if (fDlp->sSliceCfg.sSliceArgument.uiSliceNum == 1) { |
| 260 | −#if defined (_DEBUG) | |
| 261 | − fprintf (stderr, | |
| 242 | + WelsLog (pCtx, WELS_LOG_DEBUG, | |
| 262 | 243 | "ParamValidationExt(), uiSliceNum(%d) you set for SM_FIXEDSLCNUM_SLICE, now turn to SM_SINGLE_SLICE type!\n", |
| 263 | 244 | fDlp->sSliceCfg.sSliceArgument.uiSliceNum); |
| 264 | −#endif//#if _DEBUG | |
| 265 | 245 | fDlp->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE; |
| 266 | 246 | break; |
| 267 | 247 | } |
| @@ -274,10 +254,8 @@ int32_t ParamValidationExt (SWelsSvcCodingParam* pCodingParam) { · 6 unmodified lines | ||
| 274 | 254 | } else if (!CheckFixedSliceNumMultiSliceSetting (iMbNumInFrame, |
| 275 | 255 | &fDlp->sSliceCfg.sSliceArgument)) { // verify interleave mode settings |
| 276 | 256 | //check uiSliceMbNum with current uiSliceNum |
| 277 | −#if defined (_DEBUG) | |
| 278 | − fprintf (stderr, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n", | |
| 257 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n", | |
| 279 | 258 | fDlp->sSliceCfg.sSliceArgument.uiSliceMbNum[0]); |
| 280 | −#endif//#if _DEBUG | |
| 281 | 259 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 282 | 260 | } |
| 283 | 261 | // considering the coding efficient and performance, iCountMbNum constraint by MIN_NUM_MB_PER_SLICE condition of multi-pSlice mode settting |
| @@ -296,40 +274,30 @@ int32_t ParamValidationExt (SWelsSvcCodingParam* pCodingParam) { · 12 unmodified lines | ||
| 296 | 274 | iMbNumInFrame = iMbWidth * iMbHeight; |
| 297 | 275 | iMaxSliceNum = MAX_SLICES_NUM; |
| 298 | 276 | if (fDlp->sSliceCfg.sSliceArgument.uiSliceMbNum[0] <= 0) { |
| 299 | −#if defined (_DEBUG) | |
| 300 | − fprintf (stderr, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n", | |
| 277 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n", | |
| 301 | 278 | fDlp->sSliceCfg.sSliceArgument.uiSliceMbNum[0]); |
| 302 | −#endif//#if _DEBUG | |
| 303 | 279 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 304 | 280 | } |
| 305 | 281 | |
| 306 | 282 | if (!CheckRasterMultiSliceSetting (iMbNumInFrame, &fDlp->sSliceCfg.sSliceArgument)) { // verify interleave mode settings |
| 307 | −#if defined (_DEBUG) | |
| 308 | − fprintf (stderr, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n", | |
| 283 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n", | |
| 309 | 284 | fDlp->sSliceCfg.sSliceArgument.uiSliceMbNum[0]); |
| 310 | −#endif//#if _DEBUG | |
| 311 | 285 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 312 | 286 | } |
| 313 | 287 | if (fDlp->sSliceCfg.sSliceArgument.uiSliceNum <= 0 |
| 314 | 288 | || fDlp->sSliceCfg.sSliceArgument.uiSliceNum > iMaxSliceNum) { // verify interleave mode settings |
| 315 | −#if defined (_DEBUG) | |
| 316 | − fprintf (stderr, "ParamValidationExt(), invalid uiSliceNum (%d) in SM_RASTER_SLICE settings!\n", | |
| 289 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) in SM_RASTER_SLICE settings!\n", | |
| 317 | 290 | fDlp->sSliceCfg.sSliceArgument.uiSliceNum); |
| 318 | −#endif//#if _DEBUG | |
| 319 | 291 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 320 | 292 | } |
| 321 | 293 | if (fDlp->sSliceCfg.sSliceArgument.uiSliceNum == 1) { |
| 322 | −#if defined (_DEBUG) | |
| 323 | − fprintf (stderr, "ParamValidationExt(), pSlice setting for SM_RASTER_SLICE now turn to SM_SINGLE_SLICE!\n"); | |
| 324 | −#endif//#if _DEBUG | |
| 294 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), pSlice setting for SM_RASTER_SLICE now turn to SM_SINGLE_SLICE!\n"); | |
| 325 | 295 | fDlp->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE; |
| 326 | 296 | break; |
| 327 | 297 | } |
| 328 | 298 | #ifdef MT_ENABLED |
| 329 | 299 | if (pCodingParam->bEnableRc && fDlp->sSliceCfg.sSliceArgument.uiSliceNum > 1) { |
| 330 | −#if defined (_DEBUG) | |
| 331 | − fprintf (stderr, "ParamValidationExt(), WARNING: GOM based RC do not support SM_RASTER_SLICE!\n"); | |
| 332 | −#endif//#if _DEBUG | |
| 300 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), WARNING: GOM based RC do not support SM_RASTER_SLICE!\n"); | |
| 333 | 301 | } |
| 334 | 302 | #endif |
| 335 | 303 | // considering the coding efficient and performance, iCountMbNum constraint by MIN_NUM_MB_PER_SLICE condition of multi-pSlice mode settting |
| @@ -347,24 +315,18 @@ int32_t ParamValidationExt (SWelsSvcCodingParam* pCodingParam) { · 11 unmodified lines | ||
| 347 | 315 | iMbHeight = (kiPicHeight + 15) >> 4; |
| 348 | 316 | iMaxSliceNum = MAX_SLICES_NUM; |
| 349 | 317 | if (iMbHeight > iMaxSliceNum) { |
| 350 | −#if defined (_DEBUG) | |
| 351 | − fprintf (stderr, "ParamValidationExt(), invalid uiSliceNum (%d) settings more than MAX!\n", iMbHeight); | |
| 352 | −#endif//#if _DEBUG | |
| 318 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) settings more than MAX!\n", iMbHeight); | |
| 353 | 319 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 354 | 320 | } |
| 355 | 321 | fDlp->sSliceCfg.sSliceArgument.uiSliceNum = iMbHeight; |
| 356 | 322 | |
| 357 | 323 | if (fDlp->sSliceCfg.sSliceArgument.uiSliceNum <= 0) { |
| 358 | −#if defined (_DEBUG) | |
| 359 | − fprintf (stderr, "ParamValidationExt(), invalid uiSliceNum (%d) settings!\n", fDlp->sSliceCfg.sSliceArgument.uiSliceNum); | |
| 360 | −#endif//#if _DEBUG | |
| 324 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) settings!\n", fDlp->sSliceCfg.sSliceArgument.uiSliceNum); | |
| 361 | 325 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 362 | 326 | } |
| 363 | 327 | if (!CheckRowMbMultiSliceSetting (iMbWidth, &fDlp->sSliceCfg.sSliceArgument)) { // verify interleave mode settings |
| 364 | −#if defined (_DEBUG) | |
| 365 | − fprintf (stderr, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n", | |
| 328 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n", | |
| 366 | 329 | fDlp->sSliceCfg.sSliceArgument.uiSliceMbNum[0]); |
| 367 | −#endif//#if _DEBUG | |
| 368 | 330 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 369 | 331 | } |
| 370 | 332 | } |
| @@ -373,10 +335,8 @@ int32_t ParamValidationExt (SWelsSvcCodingParam* pCodingParam) { · 2 unmodified lines | ||
| 373 | 335 | iMbWidth = (kiPicWidth + 15) >> 4; |
| 374 | 336 | iMbHeight = (kiPicHeight + 15) >> 4; |
| 375 | 337 | if (fDlp->sSliceCfg.sSliceArgument.uiSliceSizeConstraint <= 0) { |
| 376 | −#if defined (_DEBUG) | |
| 377 | − fprintf (stderr, "ParamValidationExt(), invalid iSliceSize (%d) settings!\n", | |
| 338 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid iSliceSize (%d) settings!\n", | |
| 378 | 339 | fDlp->sSliceCfg.sSliceArgument.uiSliceSizeConstraint); |
| 379 | −#endif//#if _DEBUG | |
| 380 | 340 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 381 | 341 | } |
| 382 | 342 | // considering the coding efficient and performance, iCountMbNum constraint by MIN_NUM_MB_PER_SLICE condition of multi-pSlice mode settting |
| @@ -388,11 +348,8 @@ int32_t ParamValidationExt (SWelsSvcCodingParam* pCodingParam) { · 5 unmodified lines | ||
| 388 | 348 | } |
| 389 | 349 | break; |
| 390 | 350 | default: { |
| 391 | − | |
| 392 | −#if defined (_DEBUG) | |
| 393 | − fprintf (stderr, "ParamValidationExt(), invalid uiSliceMode (%d) settings!\n", | |
| 351 | + WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMode (%d) settings!\n", | |
| 394 | 352 | pCodingParam->sDependencyLayers[0].sSliceCfg.uiSliceMode); |
| 395 | −#endif//#if _DEBUG | |
| 396 | 353 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 397 | 354 | |
| 398 | 355 | } |
| @@ -1849,51 +1806,6 @@ void OutputCpuFeaturesLog (uint32_t uiCpuFeatureFlags, uint32_t uiCpuCores, int3 · 1450 unmodified lines | ||
| 1849 | 1806 | (uiCpuFeatureFlags & WELS_CPU_AES) ? 'Y' : 'N', |
| 1850 | 1807 | uiCpuCores, |
| 1851 | 1808 | iCacheLineSize); |
| 1852 | − | |
| 1853 | −#ifdef _DEBUG // output at console & _debug | |
| 1854 | − fprintf (stderr, "WELS CPU features/capacities (0x%x) detected: \n" \ | |
| 1855 | − "HTT: %c, " \ | |
| 1856 | − "MMX: %c, " \ | |
| 1857 | − "MMXEX: %c, " \ | |
| 1858 | − "SSE: %c, " \ | |
| 1859 | − "SSE2: %c, " \ | |
| 1860 | − "SSE3: %c, " \ | |
| 1861 | − "SSSE3: %c, " \ | |
| 1862 | − "SSE4.1: %c, " \ | |
| 1863 | − "SSE4.2: %c, " \ | |
| 1864 | − "AVX: %c, " \ | |
| 1865 | − "FMA: %c, " \ | |
| 1866 | − "X87-FPU: %c, " \ | |
| 1867 | − "3DNOW: %c, " \ | |
| 1868 | − "3DNOWEX: %c, " \ | |
| 1869 | − "ALTIVEC: %c, " \ | |
| 1870 | − "CMOV: %c, " \ | |
| 1871 | − "MOVBE: %c, " \ | |
| 1872 | − "AES: %c, " \ | |
| 1873 | − "NUMBER OF LOGIC PROCESSORS ON CHIP: %d, " \ | |
| 1874 | − "CPU CACHE LINE SIZE (BYTES): %d\n", | |
| 1875 | − uiCpuFeatureFlags, | |
| 1876 | − (uiCpuFeatureFlags & WELS_CPU_HTT) ? 'Y' : 'N', | |
| 1877 | − (uiCpuFeatureFlags & WELS_CPU_MMX) ? 'Y' : 'N', | |
| 1878 | − (uiCpuFeatureFlags & WELS_CPU_MMXEXT) ? 'Y' : 'N', | |
| 1879 | − (uiCpuFeatureFlags & WELS_CPU_SSE) ? 'Y' : 'N', | |
| 1880 | − (uiCpuFeatureFlags & WELS_CPU_SSE2) ? 'Y' : 'N', | |
| 1881 | − (uiCpuFeatureFlags & WELS_CPU_SSE3) ? 'Y' : 'N', | |
| 1882 | − (uiCpuFeatureFlags & WELS_CPU_SSSE3) ? 'Y' : 'N', | |
| 1883 | − (uiCpuFeatureFlags & WELS_CPU_SSE41) ? 'Y' : 'N', | |
| 1884 | − (uiCpuFeatureFlags & WELS_CPU_SSE42) ? 'Y' : 'N', | |
| 1885 | − (uiCpuFeatureFlags & WELS_CPU_AVX) ? 'Y' : 'N', | |
| 1886 | − (uiCpuFeatureFlags & WELS_CPU_FMA) ? 'Y' : 'N', | |
| 1887 | − (uiCpuFeatureFlags & WELS_CPU_FPU) ? 'Y' : 'N', | |
| 1888 | − (uiCpuFeatureFlags & WELS_CPU_3DNOW) ? 'Y' : 'N', | |
| 1889 | − (uiCpuFeatureFlags & WELS_CPU_3DNOWEXT) ? 'Y' : 'N', | |
| 1890 | − (uiCpuFeatureFlags & WELS_CPU_ALTIVEC) ? 'Y' : 'N', | |
| 1891 | − (uiCpuFeatureFlags & WELS_CPU_CMOV) ? 'Y' : 'N', | |
| 1892 | − (uiCpuFeatureFlags & WELS_CPU_MOVBE) ? 'Y' : 'N', | |
| 1893 | − (uiCpuFeatureFlags & WELS_CPU_AES) ? 'Y' : 'N', | |
| 1894 | − uiCpuCores, | |
| 1895 | − iCacheLineSize); | |
| 1896 | −#endif//_DEBUG | |
| 1897 | 1809 | } |
| 1898 | 1810 | |
| 1899 | 1811 | /*! |
| @@ -1917,7 +1829,7 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 17 unmodified lines | ||
| 1917 | 1829 | return 1; |
| 1918 | 1830 | } |
| 1919 | 1831 | |
| 1920 | − iRet = ParamValidationExt (pCodingParam); | |
| 1832 | + iRet = ParamValidationExt (*ppCtx,pCodingParam); | |
| 1921 | 1833 | if (iRet != 0) { |
| 1922 | 1834 | WelsLog (NULL, WELS_LOG_ERROR, "WelsInitEncoderExt(), ParamValidationExt failed return %d.\n", iRet); |
| 1923 | 1835 | return iRet; |
| @@ -3569,7 +3481,7 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 1645 unmodified lines | ||
| 3569 | 3481 | if (NULL == ppCtx || NULL == *ppCtx || NULL == pNewParam) return 1; |
| 3570 | 3482 | |
| 3571 | 3483 | /* Check validation in new parameters */ |
| 3572 | − iReturn = ParamValidationExt (pNewParam); | |
| 3484 | + iReturn = ParamValidationExt (*ppCtx,pNewParam); | |
| 3573 | 3485 | if (iReturn != ENC_RETURN_SUCCESS) return iReturn; |
| 3574 | 3486 | |
| 3575 | 3487 | pOldParam = (*ppCtx)->pSvcParam; |