History

trace fix

ruil2 committed 12 years ago

Commit fa138e81 parent 0f4499114 files · +202 −200Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 14 files). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+50−49
@@ -160,7 +160,7 @@ int32_t ParamValidation (SLogContext* pLogCtx, SWelsSvcCodingParam* pCfg) { · 159 unmodified lines
160}160}
161 161
162 162
163int32_t ParamValidationExt (SLogContext* pCtx, SWelsSvcCodingParam* pCodingParam) {163int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingParam) {
164 int8_t i = 0;164 int8_t i = 0;
165 int32_t iIdx = 0;165 int32_t iIdx = 0;
166 166
@@ -169,37 +169,37 @@ int32_t ParamValidationExt (SLogContext* pCtx, SWelsSvcCodingParam* pCodingParam · 2 unmodified lines
169 return ENC_RETURN_INVALIDINPUT;169 return ENC_RETURN_INVALIDINPUT;
170 170
171 if ((pCodingParam->iUsageType != CAMERA_VIDEO_REAL_TIME) && (pCodingParam->iUsageType != SCREEN_CONTENT_REAL_TIME)) {171 if ((pCodingParam->iUsageType != CAMERA_VIDEO_REAL_TIME) && (pCodingParam->iUsageType != SCREEN_CONTENT_REAL_TIME)) {
172 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(),Invalid usage type = %d", pCodingParam->iUsageType);172 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(),Invalid usage type = %d", pCodingParam->iUsageType);
173 return ENC_RETURN_UNSUPPORTED_PARA;173 return ENC_RETURN_UNSUPPORTED_PARA;
174 }174 }
175 if (pCodingParam->iSpatialLayerNum < 1 || pCodingParam->iSpatialLayerNum > MAX_DEPENDENCY_LAYER) {175 if (pCodingParam->iSpatialLayerNum < 1 || pCodingParam->iSpatialLayerNum > MAX_DEPENDENCY_LAYER) {
176 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), monitor invalid pCodingParam->iSpatialLayerNum: %d!\n",176 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), monitor invalid pCodingParam->iSpatialLayerNum: %d!\n",
177 pCodingParam->iSpatialLayerNum);177 pCodingParam->iSpatialLayerNum);
178 return ENC_RETURN_UNSUPPORTED_PARA;178 return ENC_RETURN_UNSUPPORTED_PARA;
179 }179 }
180 180
181 if (pCodingParam->iTemporalLayerNum < 1 || pCodingParam->iTemporalLayerNum > MAX_TEMPORAL_LEVEL) {181 if (pCodingParam->iTemporalLayerNum < 1 || pCodingParam->iTemporalLayerNum > MAX_TEMPORAL_LEVEL) {
182 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), monitor invalid pCodingParam->iTemporalLayerNum: %d!\n",182 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), monitor invalid pCodingParam->iTemporalLayerNum: %d!\n",
183 pCodingParam->iTemporalLayerNum);183 pCodingParam->iTemporalLayerNum);
184 return ENC_RETURN_UNSUPPORTED_PARA;184 return ENC_RETURN_UNSUPPORTED_PARA;
185 }185 }
186 186
187 if (pCodingParam->uiGopSize < 1 || pCodingParam->uiGopSize > MAX_GOP_SIZE) {187 if (pCodingParam->uiGopSize < 1 || pCodingParam->uiGopSize > MAX_GOP_SIZE) {
188 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), monitor invalid pCodingParam->uiGopSize: %d!\n",188 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), monitor invalid pCodingParam->uiGopSize: %d!\n",
189 pCodingParam->uiGopSize);189 pCodingParam->uiGopSize);
190 return ENC_RETURN_UNSUPPORTED_PARA;190 return ENC_RETURN_UNSUPPORTED_PARA;
191 }191 }
192 192
193 193
194 if (pCodingParam->uiIntraPeriod && pCodingParam->uiIntraPeriod < pCodingParam->uiGopSize) {194 if (pCodingParam->uiIntraPeriod && pCodingParam->uiIntraPeriod < pCodingParam->uiGopSize) {
195 WelsLog (pCtx, WELS_LOG_ERROR,195 WelsLog (pLogCtx, WELS_LOG_ERROR,
196 "ParamValidationExt(), uiIntraPeriod(%d) should be not less than that of uiGopSize(%d) or -1 specified!\n",196 "ParamValidationExt(), uiIntraPeriod(%d) should be not less than that of uiGopSize(%d) or -1 specified!\n",
197 pCodingParam->uiIntraPeriod, pCodingParam->uiGopSize);197 pCodingParam->uiIntraPeriod, pCodingParam->uiGopSize);
198 return ENC_RETURN_UNSUPPORTED_PARA;198 return ENC_RETURN_UNSUPPORTED_PARA;
199 }199 }
200 200
201 if (pCodingParam->uiIntraPeriod && (pCodingParam->uiIntraPeriod & (pCodingParam->uiGopSize - 1)) != 0) {201 if (pCodingParam->uiIntraPeriod && (pCodingParam->uiIntraPeriod & (pCodingParam->uiGopSize - 1)) != 0) {
202 WelsLog (pCtx, WELS_LOG_ERROR,202 WelsLog (pLogCtx, WELS_LOG_ERROR,
203 "ParamValidationExt(), uiIntraPeriod(%d) should be multiple of uiGopSize(%d) or -1 specified!\n",203 "ParamValidationExt(), uiIntraPeriod(%d) should be multiple of uiGopSize(%d) or -1 specified!\n",
204 pCodingParam->uiIntraPeriod, pCodingParam->uiGopSize);204 pCodingParam->uiIntraPeriod, pCodingParam->uiGopSize);
205 return ENC_RETURN_UNSUPPORTED_PARA;205 return ENC_RETURN_UNSUPPORTED_PARA;
@@ -227,24 +227,24 @@ int32_t ParamValidationExt (SLogContext* pCtx, SWelsSvcCodingParam* pCodingParam · 21 unmodified lines
227 int32_t iMbNumInFrame = 0;227 int32_t iMbNumInFrame = 0;
228 uint32_t iMaxSliceNum = MAX_SLICES_NUM;228 uint32_t iMaxSliceNum = MAX_SLICES_NUM;
229 if (kiPicWidth <= 0 || kiPicHeight <= 0) {229 if (kiPicWidth <= 0 || kiPicHeight <= 0) {
230 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid %d x %d in dependency layer settings!\n", kiPicWidth,230 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid %d x %d in dependency layer settings!\n", kiPicWidth,
231 kiPicHeight);231 kiPicHeight);
232 return ENC_RETURN_UNSUPPORTED_PARA;232 return ENC_RETURN_UNSUPPORTED_PARA;
233 }233 }
234 if ((kiPicWidth & 0x0F) != 0 || (kiPicHeight & 0x0F) != 0) {234 if ((kiPicWidth & 0x0F) != 0 || (kiPicHeight & 0x0F) != 0) {
235 WelsLog (pCtx, WELS_LOG_ERROR,235 WelsLog (pLogCtx, WELS_LOG_ERROR,
236 "ParamValidationExt(), in layer #%d iWidth x iHeight(%d x %d) both should be multiple of 16, can not support with arbitrary size currently!\n",236 "ParamValidationExt(), in layer #%d iWidth x iHeight(%d x %d) both should be multiple of 16, can not support with arbitrary size currently!\n",
237 i, kiPicWidth, kiPicHeight);237 i, kiPicWidth, kiPicHeight);
238 return ENC_RETURN_UNSUPPORTED_PARA;238 return ENC_RETURN_UNSUPPORTED_PARA;
239 }239 }
240 240
241 if (pSpatialLayer->sSliceCfg.uiSliceMode >= SM_RESERVED) {241 if (pSpatialLayer->sSliceCfg.uiSliceMode >= SM_RESERVED) {
242 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMode (%d) settings!\n",242 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMode (%d) settings!\n",
243 pSpatialLayer->sSliceCfg.uiSliceMode);243 pSpatialLayer->sSliceCfg.uiSliceMode);
244 return ENC_RETURN_UNSUPPORTED_PARA;244 return ENC_RETURN_UNSUPPORTED_PARA;
245 }245 }
246 if ((pCodingParam->uiMaxNalSize != 0) && (pSpatialLayer->sSliceCfg.uiSliceMode != SM_DYN_SLICE)) {246 if ((pCodingParam->uiMaxNalSize != 0) && (pSpatialLayer->sSliceCfg.uiSliceMode != SM_DYN_SLICE)) {
247 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMode (%d) settings!,MaxNalSize = %d\n",247 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMode (%d) settings!,MaxNalSize = %d\n",
248 pSpatialLayer->sSliceCfg.uiSliceMode, pCodingParam->uiMaxNalSize);248 pSpatialLayer->sSliceCfg.uiSliceMode, pCodingParam->uiMaxNalSize);
249 return ENC_RETURN_UNSUPPORTED_PARA;249 return ENC_RETURN_UNSUPPORTED_PARA;
250 }250 }
@@ -271,12 +271,12 @@ int32_t ParamValidationExt (SLogContext* pCtx, SWelsSvcCodingParam* pCodingParam · 20 unmodified lines
271 iMaxSliceNum = MAX_SLICES_NUM;271 iMaxSliceNum = MAX_SLICES_NUM;
272 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum <= 0272 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum <= 0
273 || pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum > iMaxSliceNum) {273 || pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum > iMaxSliceNum) {
274 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) settings!\n",274 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) settings!\n",
275 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum);275 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum);
276 return ENC_RETURN_UNSUPPORTED_PARA;276 return ENC_RETURN_UNSUPPORTED_PARA;
277 }277 }
278 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum == 1) {278 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum == 1) {
279 WelsLog (pCtx, WELS_LOG_DEBUG,279 WelsLog (pLogCtx, WELS_LOG_DEBUG,
280 "ParamValidationExt(), uiSliceNum(%d) you set for SM_FIXEDSLCNUM_SLICE, now turn to SM_SINGLE_SLICE type!\n",280 "ParamValidationExt(), uiSliceNum(%d) you set for SM_FIXEDSLCNUM_SLICE, now turn to SM_SINGLE_SLICE type!\n",
281 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum);281 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum);
282 pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;282 pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
@@ -291,7 +291,7 @@ int32_t ParamValidationExt (SLogContext* pCtx, SWelsSvcCodingParam* pCodingParam · 8 unmodified lines
291 } else if (!CheckFixedSliceNumMultiSliceSetting (iMbNumInFrame,291 } else if (!CheckFixedSliceNumMultiSliceSetting (iMbNumInFrame,
292 &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings292 &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings
293 //check uiSliceMbNum with current uiSliceNum293 //check uiSliceMbNum with current uiSliceNum
294 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n",294 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n",
295 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0]);295 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0]);
296 return ENC_RETURN_UNSUPPORTED_PARA;296 return ENC_RETURN_UNSUPPORTED_PARA;
297 }297 }
@@ -315,31 +315,31 @@ int32_t ParamValidationExt (SLogContext* pCtx, SWelsSvcCodingParam* pCodingParam · 17 unmodified lines
315 iMbNumInFrame = iMbWidth * iMbHeight;315 iMbNumInFrame = iMbWidth * iMbHeight;
316 iMaxSliceNum = MAX_SLICES_NUM;316 iMaxSliceNum = MAX_SLICES_NUM;
317 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0] <= 0) {317 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0] <= 0) {
318 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n",318 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n",
319 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0]);319 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0]);
320 return ENC_RETURN_UNSUPPORTED_PARA;320 return ENC_RETURN_UNSUPPORTED_PARA;
321 }321 }
322 322
323 if (!CheckRasterMultiSliceSetting (iMbNumInFrame,323 if (!CheckRasterMultiSliceSetting (iMbNumInFrame,
324 &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings324 &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings
325 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n",325 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n",
326 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0]);326 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0]);
327 return ENC_RETURN_UNSUPPORTED_PARA;327 return ENC_RETURN_UNSUPPORTED_PARA;
328 }328 }
329 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum <= 0329 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum <= 0
330 || pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum > iMaxSliceNum) { // verify interleave mode settings330 || pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum > iMaxSliceNum) { // verify interleave mode settings
331 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) in SM_RASTER_SLICE settings!\n",331 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) in SM_RASTER_SLICE settings!\n",
332 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum);332 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum);
333 return ENC_RETURN_UNSUPPORTED_PARA;333 return ENC_RETURN_UNSUPPORTED_PARA;
334 }334 }
335 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum == 1) {335 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum == 1) {
336 WelsLog (pCtx, WELS_LOG_ERROR,336 WelsLog (pLogCtx, WELS_LOG_ERROR,
337 "ParamValidationExt(), pSlice setting for SM_RASTER_SLICE now turn to SM_SINGLE_SLICE!\n");337 "ParamValidationExt(), pSlice setting for SM_RASTER_SLICE now turn to SM_SINGLE_SLICE!\n");
338 pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;338 pSpatialLayer->sSliceCfg.uiSliceMode = SM_SINGLE_SLICE;
339 break;339 break;
340 }340 }
341 if ((pCodingParam->iRCMode != RC_OFF_MODE) && pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum > 1) {341 if ((pCodingParam->iRCMode != RC_OFF_MODE) && pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum > 1) {
342 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), WARNING: GOM based RC do not support SM_RASTER_SLICE!\n");342 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), WARNING: GOM based RC do not support SM_RASTER_SLICE!\n");
343 }343 }
344 // considering the coding efficient and performance, iCountMbNum constraint by MIN_NUM_MB_PER_SLICE condition of multi-pSlice mode settting344 // considering the coding efficient and performance, iCountMbNum constraint by MIN_NUM_MB_PER_SLICE condition of multi-pSlice mode settting
345 if (iMbNumInFrame <= MIN_NUM_MB_PER_SLICE) {345 if (iMbNumInFrame <= MIN_NUM_MB_PER_SLICE) {
@@ -356,19 +356,19 @@ int32_t ParamValidationExt (SLogContext* pCtx, SWelsSvcCodingParam* pCodingParam · 10 unmodified lines
356 iMbHeight = (kiPicHeight + 15) >> 4;356 iMbHeight = (kiPicHeight + 15) >> 4;
357 iMaxSliceNum = MAX_SLICES_NUM;357 iMaxSliceNum = MAX_SLICES_NUM;
358 if (iMbHeight > iMaxSliceNum) {358 if (iMbHeight > iMaxSliceNum) {
359 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) settings more than MAX!\n", iMbHeight);359 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) settings more than MAX!\n", iMbHeight);
360 return ENC_RETURN_UNSUPPORTED_PARA;360 return ENC_RETURN_UNSUPPORTED_PARA;
361 }361 }
362 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum = iMbHeight;362 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum = iMbHeight;
363 363
364 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum <= 0) {364 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum <= 0) {
365 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) settings!\n",365 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) settings!\n",
366 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum);366 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum);
367 return ENC_RETURN_UNSUPPORTED_PARA;367 return ENC_RETURN_UNSUPPORTED_PARA;
368 }368 }
369 if (!CheckRowMbMultiSliceSetting (iMbWidth,369 if (!CheckRowMbMultiSliceSetting (iMbWidth,
370 &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings370 &pSpatialLayer->sSliceCfg.sSliceArgument)) { // verify interleave mode settings
371 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n",371 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMbNum (%d) settings!\n",
372 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0]);372 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceMbNum[0]);
373 return ENC_RETURN_UNSUPPORTED_PARA;373 return ENC_RETURN_UNSUPPORTED_PARA;
374 }374 }
@@ -378,20 +378,20 @@ int32_t ParamValidationExt (SLogContext* pCtx, SWelsSvcCodingParam* pCodingParam · 3 unmodified lines
378 iMbWidth = (kiPicWidth + 15) >> 4;378 iMbWidth = (kiPicWidth + 15) >> 4;
379 iMbHeight = (kiPicHeight + 15) >> 4;379 iMbHeight = (kiPicHeight + 15) >> 4;
380 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceSizeConstraint <= 0) {380 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceSizeConstraint <= 0) {
381 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid iSliceSize (%d) settings!\n",381 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid iSliceSize (%d) settings!\n",
382 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceSizeConstraint);382 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceSizeConstraint);
383 return ENC_RETURN_UNSUPPORTED_PARA;383 return ENC_RETURN_UNSUPPORTED_PARA;
384 }384 }
385 385
386 if (pCodingParam->uiMaxNalSize <= NAL_HEADER_ADD_0X30BYTES) {386 if (pCodingParam->uiMaxNalSize <= NAL_HEADER_ADD_0X30BYTES) {
387 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiMaxNalSize (%d) settings!\n",387 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiMaxNalSize (%d) settings!\n",
388 pCodingParam->uiMaxNalSize);388 pCodingParam->uiMaxNalSize);
389 return ENC_RETURN_UNSUPPORTED_PARA;389 return ENC_RETURN_UNSUPPORTED_PARA;
390 }390 }
391 391
392 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceSizeConstraint > (pCodingParam->uiMaxNalSize -392 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceSizeConstraint > (pCodingParam->uiMaxNalSize -
393 NAL_HEADER_ADD_0X30BYTES)) {393 NAL_HEADER_ADD_0X30BYTES)) {
394 WelsLog (pCtx, WELS_LOG_WARNING,394 WelsLog (pLogCtx, WELS_LOG_WARNING,
395 "ParamValidationExt(), slice mode = SM_DYN_SLICE, uiSliceSizeConstraint = %d ,uiMaxNalsize = %d!\n",395 "ParamValidationExt(), slice mode = SM_DYN_SLICE, uiSliceSizeConstraint = %d ,uiMaxNalsize = %d!\n",
396 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceSizeConstraint, pCodingParam->uiMaxNalSize);396 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceSizeConstraint, pCodingParam->uiMaxNalSize);
397 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceSizeConstraint = pCodingParam->uiMaxNalSize - NAL_HEADER_ADD_0X30BYTES;397 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceSizeConstraint = pCodingParam->uiMaxNalSize - NAL_HEADER_ADD_0X30BYTES;
@@ -406,7 +406,7 @@ int32_t ParamValidationExt (SLogContext* pCtx, SWelsSvcCodingParam* pCodingParam · 8 unmodified lines
406 }406 }
407 break;407 break;
408 default: {408 default: {
409 WelsLog (pCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMode (%d) settings!\n",409 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceMode (%d) settings!\n",
410 pCodingParam->sSpatialLayers[0].sSliceCfg.uiSliceMode);410 pCodingParam->sSpatialLayers[0].sSliceCfg.uiSliceMode);
411 return ENC_RETURN_UNSUPPORTED_PARA;411 return ENC_RETURN_UNSUPPORTED_PARA;
412 412
@@ -415,7 +415,7 @@ int32_t ParamValidationExt (SLogContext* pCtx, SWelsSvcCodingParam* pCodingParam · 2 unmodified lines
415 }415 }
416 }416 }
417 417
418 return ParamValidation (pCtx, pCodingParam);418 return ParamValidation (pLogCtx, pCodingParam);
419}419}
420 420
421 421
@@ -2025,7 +2025,7 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 1603 unmodified lines
2025 pCtx->iMaxSliceCount = iSliceNum;2025 pCtx->iMaxSliceCount = iSliceNum;
2026 iRet = RequestMemorySvc (&pCtx);2026 iRet = RequestMemorySvc (&pCtx);
2027 if (iRet != 0) {2027 if (iRet != 0) {
2028 WelsLog (pCtx, WELS_LOG_ERROR, "WelsInitEncoderExt(), RequestMemorySvc failed return %d.\n", iRet);2028 WelsLog (pLogCtx, WELS_LOG_ERROR, "WelsInitEncoderExt(), RequestMemorySvc failed return %d.\n", iRet);
2029 FreeMemorySvc (&pCtx);2029 FreeMemorySvc (&pCtx);
2030 return iRet;2030 return iRet;
2031 }2031 }
@@ -2038,18 +2038,18 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 6 unmodified lines
2038 pCtx->pVpp = new CWelsPreProcess (pCtx);2038 pCtx->pVpp = new CWelsPreProcess (pCtx);
2039 if (pCtx->pVpp == NULL) {2039 if (pCtx->pVpp == NULL) {
2040 iRet = 1;2040 iRet = 1;
2041 WelsLog (pCtx, WELS_LOG_ERROR, "WelsInitEncoderExt(), pOut of memory in case new CWelsPreProcess().\n");2041 WelsLog (pLogCtx, WELS_LOG_ERROR, "WelsInitEncoderExt(), pOut of memory in case new CWelsPreProcess().\n");
2042 FreeMemorySvc (&pCtx);2042 FreeMemorySvc (&pCtx);
2043 return iRet;2043 return iRet;
2044 }2044 }
2045 if ((iRet = pCtx->pVpp->AllocSpatialPictures (pCtx, pCtx->pSvcParam)) != 0) {2045 if ((iRet = pCtx->pVpp->AllocSpatialPictures (pCtx, pCtx->pSvcParam)) != 0) {
2046 WelsLog (pCtx, WELS_LOG_ERROR, "WelsInitEncoderExt(), pVPP alloc spatial pictures failed\n");2046 WelsLog (pLogCtx, WELS_LOG_ERROR, "WelsInitEncoderExt(), pVPP alloc spatial pictures failed\n");
2047 FreeMemorySvc (&pCtx);2047 FreeMemorySvc (&pCtx);
2048 return iRet;2048 return iRet;
2049 }2049 }
2050 2050
2051#if defined(MEMORY_MONITOR)2051#if defined(MEMORY_MONITOR)
2052 WelsLog (pCtx, WELS_LOG_INFO, "WelsInitEncoderExt() exit, overall memory usage: %llu bytes\n",2052 WelsLog (pLogCtx, WELS_LOG_INFO, "WelsInitEncoderExt() exit, overall memory usage: %llu bytes\n",
2053 static_cast<unsigned long long> (sizeof (sWelsEncCtx) /* requested size from malloc() or new operator */2053 static_cast<unsigned long long> (sizeof (sWelsEncCtx) /* requested size from malloc() or new operator */
2054 + pCtx->pMemAlign->WelsGetMemoryUsage()) /* requested size from CMemoryAlign::WelsMalloc() */2054 + pCtx->pMemAlign->WelsGetMemoryUsage()) /* requested size from CMemoryAlign::WelsMalloc() */
2055 );2055 );
@@ -2057,7 +2057,7 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 1 unmodified line
2057 2057
2058 *ppCtx = pCtx;2058 *ppCtx = pCtx;
2059 2059
2060 WelsLog (pCtx, WELS_LOG_DEBUG, "WelsInitEncoderExt(), pCtx= 0x%p.\n", (void*)pCtx);2060 WelsLog (pLogCtx, WELS_LOG_DEBUG, "WelsInitEncoderExt(), pCtx= 0x%p.\n", (void*)pCtx);
2061 2061
2062 return 0;2062 return 0;
2063}2063}
@@ -2150,7 +2150,7 @@ void WelsUninitEncoderExt (sWelsEncCtx** ppCtx) { · 86 unmodified lines
2150 if (NULL == ppCtx || NULL == *ppCtx)2150 if (NULL == ppCtx || NULL == *ppCtx)
2151 return;2151 return;
2152 2152
2153 WelsLog (*ppCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pCtx= %p, iThreadCount= %d, iMultipleThreadIdc= %d.\n",2153 WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pCtx= %p, iThreadCount= %d, iMultipleThreadIdc= %d.\n",
2154 (void*) (*ppCtx), (*ppCtx)->pSvcParam->iCountThreadsNum, (*ppCtx)->pSvcParam->iMultipleThreadIdc);2154 (void*) (*ppCtx), (*ppCtx)->pSvcParam->iCountThreadsNum, (*ppCtx)->pSvcParam->iMultipleThreadIdc);
2155 2155
2156#if defined(STAT_OUTPUT)2156#if defined(STAT_OUTPUT)
@@ -2168,7 +2168,7 @@ void WelsUninitEncoderExt (sWelsEncCtx** ppCtx) { · 11 unmodified lines
2168 WelsEventSignal (& (*ppCtx)->pSliceThreading->pExitEncodeEvent[iThreadIdx]);2168 WelsEventSignal (& (*ppCtx)->pSliceThreading->pExitEncodeEvent[iThreadIdx]);
2169 WelsEventSignal (& (*ppCtx)->pSliceThreading->pThreadMasterEvent[iThreadIdx]);2169 WelsEventSignal (& (*ppCtx)->pSliceThreading->pThreadMasterEvent[iThreadIdx]);
2170 res = WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit2170 res = WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit
2171 WelsLog (*ppCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pthread_join(pThreadHandles%d) return %d..\n", iThreadIdx,2171 WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pthread_join(pThreadHandles%d) return %d..\n", iThreadIdx,
2172 res);2172 res);
2173 (*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx] = 0;2173 (*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx] = 0;
2174 }2174 }
@@ -2333,7 +2333,7 @@ void WelsInitCurrentDlayerMltslc (sWelsEncCtx* pCtx, int32_t iPartitionNum) { · 158 unmodified lines
2333 / (pSliceCtx->iMaxSliceNumConstraint))2333 / (pSliceCtx->iMaxSliceNumConstraint))
2334 ) {2334 ) {
2335 2335
2336 WelsLog (pCtx,2336 WelsLog (&(pCtx->sLogCtx),
2337 WELS_LOG_WARNING,2337 WELS_LOG_WARNING,
2338 "Set-SliceConstraint(%d) too small for current resolution (MB# %d) under QP/BR!\n",2338 "Set-SliceConstraint(%d) too small for current resolution (MB# %d) under QP/BR!\n",
2339 pSliceCtx->uiSliceSizeConstraint,2339 pSliceCtx->uiSliceSizeConstraint,
@@ -2492,7 +2492,7 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 152 unmodified lines
2492 const bool kbHighestSpatialLayer =2492 const bool kbHighestSpatialLayer =
2493 (pCtx->pSvcParam->iSpatialLayerNum == (pCurLayer->sLayerInfo.sNalHeaderExt.uiDependencyId + 1));2493 (pCtx->pSvcParam->iSpatialLayerNum == (pCurLayer->sLayerInfo.sNalHeaderExt.uiDependencyId + 1));
2494 SWelsFuncPtrList* pFuncList = pCtx->pFuncList;2494 SWelsFuncPtrList* pFuncList = pCtx->pFuncList;
2495 2495 SLogContext* pLogCtx = &(pCtx->sLogCtx);
2496 /* function pointers conditional assignment under sWelsEncCtx, layer_mb_enc_rec (in stack) is exclusive */2496 /* function pointers conditional assignment under sWelsEncCtx, layer_mb_enc_rec (in stack) is exclusive */
2497 if (kbHighestSpatialLayer && pCtx->pSvcParam->iUsageType == CAMERA_VIDEO_REAL_TIME) {2497 if (kbHighestSpatialLayer && pCtx->pSvcParam->iUsageType == CAMERA_VIDEO_REAL_TIME) {
2498 SetFastCodingFunc (pFuncList);2498 SetFastCodingFunc (pFuncList);
@@ -2528,7 +2528,7 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 29 unmodified lines
2528 //ME related func pointers2528 //ME related func pointers
2529 //ME16x162529 //ME16x16
2530 if (!SetMeMethod (ME_DIA_CROSS, pFuncList->pfSearchMethod[BLOCK_16x16])) {2530 if (!SetMeMethod (ME_DIA_CROSS, pFuncList->pfSearchMethod[BLOCK_16x16])) {
2531 WelsLog (pCtx, WELS_LOG_WARNING, "SetMeMethod(BLOCK_16x16) ME_DIA_CROSS unsuccessful, switched to default search\n");2531 WelsLog (pLogCtx, WELS_LOG_WARNING, "SetMeMethod(BLOCK_16x16) ME_DIA_CROSS unsuccessful, switched to default search\n");
2532 }2532 }
2533 //ME8x82533 //ME8x8
2534 SFeatureSearchPreparation* pFeatureSearchPreparation = pCurLayer->pFeatureSearchPreparation;2534 SFeatureSearchPreparation* pFeatureSearchPreparation = pCurLayer->pFeatureSearchPreparation;
@@ -2556,7 +2556,7 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 21 unmodified lines
2556 if (pFeatureSearchPreparation->bFMESwitchFlag && pScreenBlockFeatureStorage->bRefBlockFeatureCalculated2556 if (pFeatureSearchPreparation->bFMESwitchFlag && pScreenBlockFeatureStorage->bRefBlockFeatureCalculated
2557 && (!pScreenBlockFeatureStorage->iIs16x16)) {2557 && (!pScreenBlockFeatureStorage->iIs16x16)) {
2558 if (!SetMeMethod (ME_DIA_CROSS_FME, pFuncList->pfSearchMethod[BLOCK_8x8])) {2558 if (!SetMeMethod (ME_DIA_CROSS_FME, pFuncList->pfSearchMethod[BLOCK_8x8])) {
2559 WelsLog (pCtx, WELS_LOG_WARNING, "SetMeMethod(BLOCK_8x8) ME_DIA_CROSS_FME unsuccessful, switched to default search\n");2559 WelsLog (pLogCtx, WELS_LOG_WARNING, "SetMeMethod(BLOCK_8x8) ME_DIA_CROSS_FME unsuccessful, switched to default search\n");
2560 }2560 }
2561 }2561 }
2562 2562
@@ -2833,7 +2833,7 @@ int32_t WritePadding (sWelsEncCtx* pCtx, int32_t iLen, int32_t& iSize) { · 270 unmodified lines
2833 2833
2834 if ((pBs->pBufEnd - pBs->pBufPtr) < iLen || iNal >= pCtx->pOut->iCountNals) {2834 if ((pBs->pBufEnd - pBs->pBufPtr) < iLen || iNal >= pCtx->pOut->iCountNals) {
2835#if GOM_TRACE_FLAG2835#if GOM_TRACE_FLAG
2836 WelsLog (pCtx, WELS_LOG_ERROR,2836 WelsLog (&(pCtx->sLogCtx), WELS_LOG_ERROR,
2837 "[RC] paddingcal pBuffer overflow, bufferlen=%lld, paddinglen=%d, iNalIdx= %d, iCountNals= %d\n",2837 "[RC] paddingcal pBuffer overflow, bufferlen=%lld, paddinglen=%d, iNalIdx= %d, iCountNals= %d\n",
2838 static_cast<long long int> (pBs->pBufEnd - pBs->pBufPtr), iLen, iNal, pCtx->pOut->iCountNals);2838 static_cast<long long int> (pBs->pBufEnd - pBs->pBufPtr), iLen, iNal, pCtx->pOut->iCountNals);
2839#endif2839#endif
@@ -2947,6 +2947,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 107 unmodified lines
2947 int8_t iCurDid = 0;2947 int8_t iCurDid = 0;
2948 int8_t iCurTid = 0;2948 int8_t iCurTid = 0;
2949 bool bAvcBased = false;2949 bool bAvcBased = false;
2950 SLogContext* pLogCtx = &(pCtx->sLogCtx);
2950#if defined(ENABLE_PSNR_CALC)2951#if defined(ENABLE_PSNR_CALC)
2951 float fSnrY = .0f, fSnrU = .0f, fSnrV = .0f;2952 float fSnrY = .0f, fSnrU = .0f, fSnrV = .0f;
2952#endif//ENABLE_PSNR_CALC2953#endif//ENABLE_PSNR_CALC
@@ -3066,7 +3067,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 113 unmodified lines
3066 /* coding each spatial layer, only one sQualityStat layer within spatial support */3067 /* coding each spatial layer, only one sQualityStat layer within spatial support */
3067 int32_t iSliceCount = 1;3068 int32_t iSliceCount = 1;
3068 if (iLayerNum >= MAX_LAYER_NUM_OF_FRAME) { // check available layer_bs_info writing as follows3069 if (iLayerNum >= MAX_LAYER_NUM_OF_FRAME) { // check available layer_bs_info writing as follows
3069 WelsLog (pCtx, WELS_LOG_ERROR, "WelsEncoderEncodeExt(), iLayerNum(%d) overflow(max:%d)!", iLayerNum,3070 WelsLog (pLogCtx, WELS_LOG_ERROR, "WelsEncoderEncodeExt(), iLayerNum(%d) overflow(max:%d)!", iLayerNum,
3070 MAX_LAYER_NUM_OF_FRAME);3071 MAX_LAYER_NUM_OF_FRAME);
3071 return ENC_RETURN_UNSUPPORTED_PARA;3072 return ENC_RETURN_UNSUPPORTED_PARA;
3072 }3073 }
@@ -3106,7 +3107,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 33 unmodified lines
3106 if (!pCtx->pFuncList->pBuildRefList (pCtx, pCtx->iPOC, 0)) {3107 if (!pCtx->pFuncList->pBuildRefList (pCtx, pCtx->iPOC, 0)) {
3107 // Force coding IDR as followed3108 // Force coding IDR as followed
3108 ForceCodingIDR (pCtx);3109 ForceCodingIDR (pCtx);
3109 WelsLog (pCtx, WELS_LOG_WARNING,3110 WelsLog (pLogCtx, WELS_LOG_WARNING,
3110 "WelsEncoderEncodeExt(), WelsBuildRefList failed for P frames, pCtx->iNumRef0= %d. ForceCodingIDR!\n",3111 "WelsEncoderEncodeExt(), WelsBuildRefList failed for P frames, pCtx->iNumRef0= %d. ForceCodingIDR!\n",
3111 pCtx->iNumRef0);3112 pCtx->iNumRef0);
3112 pFbi->eFrameType = videoFrameTypeIDR;3113 pFbi->eFrameType = videoFrameTypeIDR;
@@ -3179,13 +3180,13 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 66 unmodified lines
3179 if ((SM_DYN_SLICE != pParam->sSliceCfg.uiSliceMode) && (pSvcParam->iMultipleThreadIdc > 1)) {3180 if ((SM_DYN_SLICE != pParam->sSliceCfg.uiSliceMode) && (pSvcParam->iMultipleThreadIdc > 1)) {
3180 iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx);3181 iSliceCount = GetCurrentSliceNum (pCtx->pCurDqLayer->pSliceEncCtx);
3181 if (iLayerNum + 1 >= MAX_LAYER_NUM_OF_FRAME) { // check available layer_bs_info for further writing as followed3182 if (iLayerNum + 1 >= MAX_LAYER_NUM_OF_FRAME) { // check available layer_bs_info for further writing as followed
3182 WelsLog (pCtx, WELS_LOG_ERROR,3183 WelsLog (pLogCtx, WELS_LOG_ERROR,
3183 "WelsEncoderEncodeExt(), iLayerNum(%d) overflow(max:%d) at iDid= %d uiSliceMode= %d, iSliceCount= %d!",3184 "WelsEncoderEncodeExt(), iLayerNum(%d) overflow(max:%d) at iDid= %d uiSliceMode= %d, iSliceCount= %d!",
3184 iLayerNum, MAX_LAYER_NUM_OF_FRAME, iCurDid, pParam->sSliceCfg.uiSliceMode, iSliceCount);3185 iLayerNum, MAX_LAYER_NUM_OF_FRAME, iCurDid, pParam->sSliceCfg.uiSliceMode, iSliceCount);
3185 return ENC_RETURN_UNSUPPORTED_PARA;3186 return ENC_RETURN_UNSUPPORTED_PARA;
3186 }3187 }
3187 if (iSliceCount <= 1) {3188 if (iSliceCount <= 1) {
3188 WelsLog (pCtx, WELS_LOG_ERROR,3189 WelsLog (pLogCtx, WELS_LOG_ERROR,
3189 "WelsEncoderEncodeExt(), iSliceCount(%d) from GetCurrentSliceNum() is untrusted due stack/heap crupted!\n",3190 "WelsEncoderEncodeExt(), iSliceCount(%d) from GetCurrentSliceNum() is untrusted due stack/heap crupted!\n",
3190 iSliceCount);3191 iSliceCount);
3191 return ENC_RETURN_UNEXPECTED;3192 return ENC_RETURN_UNEXPECTED;
@@ -3203,7 +3204,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 11 unmodified lines
3203 &pCtx->pSliceThreading->pThreadMasterEvent[0],3204 &pCtx->pSliceThreading->pThreadMasterEvent[0],
3204 pLayerBsInfo, iSliceCount, pCtx->pCurDqLayer->pSliceEncCtx, false);3205 pLayerBsInfo, iSliceCount, pCtx->pCurDqLayer->pSliceEncCtx, false);
3205 if (iRet) {3206 if (iRet) {
3206 WelsLog (pCtx, WELS_LOG_ERROR,3207 WelsLog (pLogCtx, WELS_LOG_ERROR,
3207 "[MT] WelsEncoderEncodeExt(), FiredSliceThreads return(%d) failed and exit encoding frame, iCountThreadsNum= %d, iSliceCount= %d, uiSliceMode= %d, iMultipleThreadIdc= %d!!\n",3208 "[MT] WelsEncoderEncodeExt(), FiredSliceThreads return(%d) failed and exit encoding frame, iCountThreadsNum= %d, iSliceCount= %d, uiSliceMode= %d, iMultipleThreadIdc= %d!!\n",
3208 iRet, pSvcParam->iCountThreadsNum, iSliceCount, pParam->sSliceCfg.uiSliceMode, pSvcParam->iMultipleThreadIdc);3209 iRet, pSvcParam->iCountThreadsNum, iSliceCount, pParam->sSliceCfg.uiSliceMode, pSvcParam->iMultipleThreadIdc);
3209 return ENC_RETURN_UNEXPECTED;3210 return ENC_RETURN_UNEXPECTED;
@@ -3243,7 +3244,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 33 unmodified lines
3243 &pCtx->pSliceThreading->pThreadMasterEvent[0],3244 &pCtx->pSliceThreading->pThreadMasterEvent[0],
3244 pLayerBsInfo, iNumThreadsRunning, pCtx->pCurDqLayer->pSliceEncCtx, false);3245 pLayerBsInfo, iNumThreadsRunning, pCtx->pCurDqLayer->pSliceEncCtx, false);
3245 if (iRet) {3246 if (iRet) {
3246 WelsLog (pCtx, WELS_LOG_ERROR,3247 WelsLog (pLogCtx, WELS_LOG_ERROR,
3247 "[MT] WelsEncoderEncodeExt(), FiredSliceThreads return(%d) failed and exit encoding frame, iCountThreadsNum= %d, iSliceCount= %d, uiSliceMode= %d, iMultipleThreadIdc= %d!!\n",3248 "[MT] WelsEncoderEncodeExt(), FiredSliceThreads return(%d) failed and exit encoding frame, iCountThreadsNum= %d, iSliceCount= %d, uiSliceMode= %d, iMultipleThreadIdc= %d!!\n",
3248 iRet, pSvcParam->iCountThreadsNum, iSliceCount, pParam->sSliceCfg.uiSliceMode, pSvcParam->iMultipleThreadIdc);3249 iRet, pSvcParam->iCountThreadsNum, iSliceCount, pParam->sSliceCfg.uiSliceMode, pSvcParam->iMultipleThreadIdc);
3249 return ENC_RETURN_UNEXPECTED;3250 return ENC_RETURN_UNEXPECTED;
@@ -3290,7 +3291,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 40 unmodified lines
3290 &pCtx->pSliceThreading->pThreadMasterEvent[0],3291 &pCtx->pSliceThreading->pThreadMasterEvent[0],
3291 pLayerBsInfo, kiPartitionCnt, pCtx->pCurDqLayer->pSliceEncCtx, true);3292 pLayerBsInfo, kiPartitionCnt, pCtx->pCurDqLayer->pSliceEncCtx, true);
3292 if (iRet) {3293 if (iRet) {
3293 WelsLog (pCtx, WELS_LOG_ERROR,3294 WelsLog (pLogCtx, WELS_LOG_ERROR,
3294 "[MT] WelsEncoderEncodeExt(), FiredSliceThreads return(%d) failed and exit encoding frame, iCountThreadsNum= %d, iSliceCount= %d, uiSliceMode= %d, iMultipleThreadIdc= %d!!\n",3295 "[MT] WelsEncoderEncodeExt(), FiredSliceThreads return(%d) failed and exit encoding frame, iCountThreadsNum= %d, iSliceCount= %d, uiSliceMode= %d, iMultipleThreadIdc= %d!!\n",
3295 iRet, pSvcParam->iCountThreadsNum, iSliceCount, pParam->sSliceCfg.uiSliceMode, pSvcParam->iMultipleThreadIdc);3296 iRet, pSvcParam->iCountThreadsNum, iSliceCount, pParam->sSliceCfg.uiSliceMode, pSvcParam->iMultipleThreadIdc);
3296 return ENC_RETURN_UNEXPECTED;3297 return ENC_RETURN_UNEXPECTED;
@@ -3370,7 +3371,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 73 unmodified lines
3370 if (!pCtx->pFuncList->pUpdateRefList (pCtx)) {3371 if (!pCtx->pFuncList->pUpdateRefList (pCtx)) {
3371 // Force coding IDR as followed3372 // Force coding IDR as followed
3372 ForceCodingIDR (pCtx);3373 ForceCodingIDR (pCtx);
3373 WelsLog (pCtx, WELS_LOG_WARNING, "WelsEncoderEncodeExt(), WelsUpdateRefList failed. ForceCodingIDR!\n");3374 WelsLog (pLogCtx, WELS_LOG_WARNING, "WelsEncoderEncodeExt(), WelsUpdateRefList failed. ForceCodingIDR!\n");
3374 //the above is to set the next frame to be IDR3375 //the above is to set the next frame to be IDR
3375 pFbi->eFrameType = eFrameType;3376 pFbi->eFrameType = eFrameType;
3376 return ENC_RETURN_CORRECTED;3377 return ENC_RETURN_CORRECTED;
@@ -3476,7 +3477,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 99 unmodified lines
3476 WELS_VERIFY_RETURN_IFNEQ (pCtx->iEncoderError, ENC_RETURN_SUCCESS)3477 WELS_VERIFY_RETURN_IFNEQ (pCtx->iEncoderError, ENC_RETURN_SUCCESS)
3477 3478
3478#if GOM_TRACE_FLAG3479#if GOM_TRACE_FLAG
3479 WelsLog (pCtx, WELS_LOG_INFO, "[RC] encoding_qp%d Padding: %d\n", pCtx->uiDependencyId,3480 WelsLog (pLogCtx, WELS_LOG_INFO, "[RC] encoding_qp%d Padding: %d\n", pCtx->uiDependencyId,
3480 pCtx->pWelsSvcRc[pCtx->uiDependencyId].iPaddingSize);3481 pCtx->pWelsSvcRc[pCtx->uiDependencyId].iPaddingSize);
3481#endif3482#endif
3482 if (iPaddingNalSize <= 0)3483 if (iPaddingNalSize <= 0)
@@ -3521,7 +3522,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 38 unmodified lines
3521 3522
3522 if (pCtx->pVpp->UpdateSpatialPictures (pCtx, pSvcParam, iCurTid, iDidIdx) != 0) {3523 if (pCtx->pVpp->UpdateSpatialPictures (pCtx, pSvcParam, iCurTid, iDidIdx) != 0) {
3523 ForceCodingIDR (pCtx);3524 ForceCodingIDR (pCtx);
3524 WelsLog (pCtx, WELS_LOG_WARNING, "WelsEncoderEncodeExt(), Logic Error Found in temporal level. ForceCodingIDR!\n");3525 WelsLog (pLogCtx, WELS_LOG_WARNING, "WelsEncoderEncodeExt(), Logic Error Found in temporal level. ForceCodingIDR!\n");
3525 //the above is to set the next frame IDR3526 //the above is to set the next frame IDR
3526 pFbi->eFrameType = eFrameType;3527 pFbi->eFrameType = eFrameType;
3527 return ENC_RETURN_CORRECTED;3528 return ENC_RETURN_CORRECTED;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t