| @@ -39,6 +39,7 @@ · 38 unmodified lines |
| 39 | */ | 39 | */ |
| 40 | #include <string.h> | 40 | #include <string.h> |
| 41 | #include "rc.h" | 41 | #include "rc.h" |
| | 42 | #include "svc_enc_frame.h" |
| 42 | | 43 | |
| 43 | namespace WelsEnc { | 44 | namespace WelsEnc { |
| 44 | /*! | 45 | /*! |
| @@ -343,7 +344,7 @@ int32_t GetInitialSliceNum (const int32_t kiMbWidth, const int32_t kiMbHeight, S · 298 unmodified lines |
| 343 | /*! | 344 | /*! |
| 344 | * \brief Initialize slice segment (Single/multiple slices) | 345 | * \brief Initialize slice segment (Single/multiple slices) |
| 345 | * | 346 | * |
| 346 | * \param pSliceSeg SSlice segment to be initialized | 347 | * \param pCurDq current layer which its SSlice segment will be initialized |
| 347 | * \param uiSliceMode SSlice mode | 348 | * \param uiSliceMode SSlice mode |
| 348 | * \param multi_slice_argv Multiple slices argument | 349 | * \param multi_slice_argv Multiple slices argument |
| 349 | * \param iMbWidth MB width | 350 | * \param iMbWidth MB width |
| @@ -351,13 +352,14 @@ int32_t GetInitialSliceNum (const int32_t kiMbWidth, const int32_t kiMbHeight, S · 1 unmodified line |
| 351 | * | 352 | * |
| 352 | * \return 0 - successful; none 0 - failed; | 353 | * \return 0 - successful; none 0 - failed; |
| 353 | */ | 354 | */ |
| 354 | int32_t InitSliceSegment (SSliceCtx* pSliceSeg, | 355 | int32_t InitSliceSegment (SDqLayer* pCurDq, |
| 355 | CMemoryAlign* pMa, | 356 | CMemoryAlign* pMa, |
| 356 | SSliceArgument* pSliceArgument, | 357 | SSliceArgument* pSliceArgument, |
| 357 | const int32_t kiMbWidth, | 358 | const int32_t kiMbWidth, |
| 358 | const int32_t kiMbHeight) { | 359 | const int32_t kiMbHeight) { |
| 359 | const int32_t kiCountMbNum = kiMbWidth * kiMbHeight; | 360 | SSliceCtx* pSliceSeg = &pCurDq->sSliceEncCtx; |
| 360 | SliceModeEnum uiSliceMode = SM_SINGLE_SLICE; | 361 | const int32_t kiCountMbNum = kiMbWidth * kiMbHeight; |
| | 362 | SliceModeEnum uiSliceMode = SM_SINGLE_SLICE; |
| 361 | | 363 | |
| 362 | if (NULL == pSliceSeg || NULL == pSliceArgument || kiMbWidth == 0 || kiMbHeight == 0) | 364 | if (NULL == pSliceSeg || NULL == pSliceArgument || kiMbWidth == 0 || kiMbHeight == 0) |
| 363 | return 1; | 365 | return 1; |
| @@ -475,11 +477,12 @@ int32_t InitSliceSegment (SSliceCtx* pSliceSeg, · 111 unmodified lines |
| 475 | /*! | 477 | /*! |
| 476 | * \brief Uninitialize slice segment (Single/multiple slices) | 478 | * \brief Uninitialize slice segment (Single/multiple slices) |
| 477 | * | 479 | * |
| 478 | * \param pSliceSeg SSlice segment to be uninitialized | 480 | * \param pCurDq current layer which its SSlice segment will be uninitialized |
| 479 | * | 481 | * |
| 480 | * \return none; | 482 | * \return none; |
| 481 | */ | 483 | */ |
| 482 | void UninitSliceSegment (SSliceCtx* pSliceSeg, CMemoryAlign* pMa) { | 484 | void UninitSliceSegment (SDqLayer* pCurDq, CMemoryAlign* pMa) { |
| | 485 | SSliceCtx* pSliceSeg = &pCurDq->sSliceEncCtx; |
| 483 | if (NULL != pSliceSeg) { | 486 | if (NULL != pSliceSeg) { |
| 484 | if (NULL != pSliceSeg->pOverallMbMap) { | 487 | if (NULL != pSliceSeg->pOverallMbMap) { |
| 485 | pMa->WelsFree (pSliceSeg->pOverallMbMap, "pSliceSeg->pOverallMbMap"); | 488 | pMa->WelsFree (pSliceSeg->pOverallMbMap, "pSliceSeg->pOverallMbMap"); |
| @@ -514,7 +517,7 @@ void UninitSliceSegment (SSliceCtx* pSliceSeg, CMemoryAlign* pMa) { · 28 unmodified lines |
| 514 | /*! | 517 | /*! |
| 515 | * \brief Initialize Wels SSlice context (Single/multiple slices and FMO) | 518 | * \brief Initialize Wels SSlice context (Single/multiple slices and FMO) |
| 516 | * | 519 | * |
| 517 | * \param pSliceCtx SSlice context to be initialized | 520 | * \param pCurDq current layer which its SSlice context will be initialized |
| 518 | * \param bFmoUseFlag flag of using fmo | 521 | * \param bFmoUseFlag flag of using fmo |
| 519 | * \param iMbWidth MB width | 522 | * \param iMbWidth MB width |
| 520 | * \param iMbHeight MB height | 523 | * \param iMbHeight MB height |
| @@ -524,17 +527,17 @@ void UninitSliceSegment (SSliceCtx* pSliceSeg, CMemoryAlign* pMa) { · 3 unmodified lines |
| 524 | * | 527 | * |
| 525 | * \return 0 - successful; none 0 - failed; | 528 | * \return 0 - successful; none 0 - failed; |
| 526 | */ | 529 | */ |
| 527 | int32_t InitSlicePEncCtx (SSliceCtx* pSliceCtx, | 530 | int32_t InitSlicePEncCtx (SDqLayer* pCurDq, |
| 528 | CMemoryAlign* pMa, | 531 | CMemoryAlign* pMa, |
| 529 | bool bFmoUseFlag, | 532 | bool bFmoUseFlag, |
| 530 | int32_t iMbWidth, | 533 | int32_t iMbWidth, |
| 531 | int32_t iMbHeight, | 534 | int32_t iMbHeight, |
| 532 | SSliceArgument* pSliceArgument, | 535 | SSliceArgument* pSliceArgument, |
| 533 | void* pPpsArg) { | 536 | void* pPpsArg) { |
| 534 | if (NULL == pSliceCtx) | 537 | if (NULL == pCurDq) |
| 535 | return 1; | 538 | return 1; |
| 536 | | 539 | |
| 537 | InitSliceSegment (pSliceCtx, | 540 | InitSliceSegment (pCurDq, |
| 538 | pMa, | 541 | pMa, |
| 539 | pSliceArgument, | 542 | pSliceArgument, |
| 540 | iMbWidth, | 543 | iMbWidth, |
| @@ -545,13 +548,13 @@ int32_t InitSlicePEncCtx (SSliceCtx* pSliceCtx, · 4 unmodified lines |
| 545 | /*! | 548 | /*! |
| 546 | * \brief Uninitialize Wels SSlice context (Single/multiple slices and FMO) | 549 | * \brief Uninitialize Wels SSlice context (Single/multiple slices and FMO) |
| 547 | * | 550 | * |
| 548 | * \param pSliceCtx SSlice context to be initialized | 551 | * \param pCurDq current layer which its SSlice context will be initialized |
| 549 | * | 552 | * |
| 550 | * \return NONE; | 553 | * \return NONE; |
| 551 | */ | 554 | */ |
| 552 | void UninitSlicePEncCtx (SSliceCtx* pSliceCtx, CMemoryAlign* pMa) { | 555 | void UninitSlicePEncCtx (SDqLayer* pCurDq, CMemoryAlign* pMa) { |
| 553 | if (NULL != pSliceCtx) { | 556 | if (NULL != pCurDq) { |
| 554 | UninitSliceSegment (pSliceCtx, pMa); | 557 | UninitSliceSegment (pCurDq, pMa); |
| 555 | } | 558 | } |
| 556 | } | 559 | } |
| 557 | | 560 | |