Merge pull request #370 from volvet/develop_b
refine welsEncoderEncodeExt
This commit is contained in:
commit
3943119a68
@ -88,15 +88,11 @@ void WelsUninitEncoderExt (sWelsEncCtx** ppCtx);
|
||||
* \brief core svc encoding process
|
||||
*
|
||||
* \param h sWelsEncCtx*, encoder context
|
||||
* \param dst FrameBSInfo*
|
||||
* \param pSrc SSourcePicture* for need_ds = true or SSourcePicture** for need_ds = false
|
||||
* \param kiConfiguredLayerNum =1 in case need_ds = true or >1 in case need_ds = false
|
||||
* \param need_ds Indicate whether need down sampling desired
|
||||
* [NO in picture list case, YES in console aplication based]
|
||||
* \param pFbi FrameBSInfo*
|
||||
* \param kpSrcPic Source picture
|
||||
* \return EFrameType (WELS_FRAME_TYPE_IDR/WELS_FRAME_TYPE_I/WELS_FRAME_TYPE_P)
|
||||
*/
|
||||
int32_t WelsEncoderEncodeExt (sWelsEncCtx*, void* pDst, const SSourcePicture** kppSrcList,
|
||||
const int32_t kiConfiguredLayerNum);
|
||||
int32_t WelsEncoderEncodeExt (sWelsEncCtx*, SFrameBSInfo * pFbi, const SSourcePicture* kpSrcPic);
|
||||
|
||||
int32_t WelsEncoderEncodeParameterSets (sWelsEncCtx* pCtx, void* pDst);
|
||||
|
||||
|
@ -3060,16 +3060,11 @@ int32_t WelsEncoderEncodeParameterSets (sWelsEncCtx* pCtx, void* pDst) {
|
||||
* \brief core svc encoding process
|
||||
*
|
||||
* \pParam pCtx sWelsEncCtx*, encoder context
|
||||
* \pParam pDst FrameBSInfo*
|
||||
* \pParam pSrc SSourcePicture* for need_ds = true or SSourcePicture** for need_ds = false
|
||||
* \pParam iConfiguredLayerNum =1 in case need_ds = true or >1 in case need_ds = false
|
||||
* \pParam need_ds Indicate whether need down sampling desired
|
||||
* [NO in picture list case, YES in console aplication based]
|
||||
* \pParam pFbi FrameBSInfo*
|
||||
* \pParam pSrcPic Source Picture
|
||||
* \return EFrameType (WELS_FRAME_TYPE_IDR/WELS_FRAME_TYPE_I/WELS_FRAME_TYPE_P)
|
||||
*/
|
||||
int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, void* pDst, const SSourcePicture** ppSrcList,
|
||||
const int32_t iConfiguredLayerNum) {
|
||||
SFrameBSInfo* pFbi = (SFrameBSInfo*)pDst;
|
||||
int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo * pFbi, const SSourcePicture* pSrcPic) {
|
||||
SLayerBSInfo* pLayerBsInfo = &pFbi->sLayerInfo[0];
|
||||
SWelsSvcCodingParam* pSvcParam = pCtx->pSvcParam;
|
||||
SSpatialPicIndex* pSpatialIndexMap = &pCtx->sSpatialIndexMap[0];
|
||||
@ -3108,7 +3103,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, void* pDst, const SSourcePictur
|
||||
pFbi->iLayerNum = 0; // for initialization
|
||||
|
||||
// perform csc/denoise/downsample/padding, generate spatial layers
|
||||
iSpatialNum = pCtx->pVpp->BuildSpatialPicList (pCtx, ppSrcList, iConfiguredLayerNum);
|
||||
iSpatialNum = pCtx->pVpp->BuildSpatialPicList (pCtx, &pSrcPic, 1);
|
||||
if (iSpatialNum < 1) { // skip due to temporal layer settings (different frame rate)
|
||||
++ pCtx->iCodingIndex;
|
||||
pFbi->eOutputFrameType = WELS_FRAME_TYPE_SKIP;
|
||||
|
@ -77,7 +77,7 @@ class CWelsH264SVCEncoder : public ISVCEncoder {
|
||||
* return: EVideoFrameType [IDR: videoFrameTypeIDR; P: videoFrameTypeP; ERROR: videoFrameTypeInvalid]
|
||||
*/
|
||||
virtual int EXTAPI EncodeFrame (const SSourcePicture* kpSrcPic, SFrameBSInfo* pBsInfo);
|
||||
virtual int EXTAPI EncodeFrameInternal (const SSourcePicture* kppSrcPicList, SFrameBSInfo* pBsInfo);
|
||||
virtual int EncodeFrameInternal (const SSourcePicture* kpSrcPic, SFrameBSInfo* pBsInfo);
|
||||
|
||||
/*
|
||||
* return: 0 - success; otherwise - failed;
|
||||
|
@ -530,7 +530,7 @@ int CWelsH264SVCEncoder::EncodeFrameInternal(const SSourcePicture* pSrcPic, SFr
|
||||
int32_t iFrameTypeReturned = 0;
|
||||
int32_t iFrameType = videoFrameTypeInvalid;
|
||||
XMMREG_PROTECT_STORE(CWelsH264SVCEncoder);
|
||||
const int32_t kiEncoderReturn = WelsEncoderEncodeExt (m_pEncContext, pBsInfo, &pSrcPic, 1);
|
||||
const int32_t kiEncoderReturn = WelsEncoderEncodeExt (m_pEncContext, pBsInfo, pSrcPic);
|
||||
XMMREG_PROTECT_LOAD(CWelsH264SVCEncoder);
|
||||
|
||||
switch (kiEncoderReturn) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user