Showing the changes to test/encoder/EncUT_EncoderTaskManagement.cpp (1 of 19 files). Show all
Unified · Split
| @@ -0,0 +1,34 @@ | ||
| 1 | +#include <gtest/gtest.h> | |
| 2 | + | |
| 3 | +#include "utils/DataGenerator.h" | |
| 4 | +#include "encoder_context.h" | |
| 5 | +#include "wels_task_management.h" | |
| 6 | + | |
| 7 | +using namespace WelsEnc; | |
| 8 | + | |
| 9 | + | |
| 10 | +TEST (EncoderTaskManagement, CWelsTaskManageBase) { | |
| 11 | + sWelsEncCtx sCtx; | |
| 12 | + SWelsSvcCodingParam sWelsSvcCodingParam; | |
| 13 | + | |
| 14 | + sCtx.pSvcParam = &sWelsSvcCodingParam; | |
| 15 | + sWelsSvcCodingParam.iMultipleThreadIdc = 4; | |
| 16 | + sCtx.iMaxSliceCount = 35; | |
| 17 | + IWelsTaskManage* pTaskManage = IWelsTaskManage::CreateTaskManage (&sCtx, false); | |
| 18 | + ASSERT_TRUE (NULL != pTaskManage); | |
| 19 | + | |
| 20 | + delete pTaskManage; | |
| 21 | +} | |
| 22 | + | |
| 23 | +TEST (EncoderTaskManagement, CWelsTaskManageParallel) { | |
| 24 | + sWelsEncCtx sCtx; | |
| 25 | + SWelsSvcCodingParam sWelsSvcCodingParam; | |
| 26 | + | |
| 27 | + sCtx.pSvcParam = &sWelsSvcCodingParam; | |
| 28 | + sWelsSvcCodingParam.iMultipleThreadIdc = 4; | |
| 29 | + sCtx.iMaxSliceCount = 35; | |
| 30 | + IWelsTaskManage* pTaskManage = IWelsTaskManage::CreateTaskManage (&sCtx, true); | |
| 31 | + ASSERT_TRUE (NULL != pTaskManage); | |
| 32 | + | |
| 33 | + delete pTaskManage; | |
| 34 | +} | |