1、[h265d] skip decoder poc small then cra frame,fix seek picture mosaic

2、[h265d] skip hevcc case the steam is align with zero cause decoder fail
3、[mpp_dec] add fast dec path for mpp dec   

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@507 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenSiyong
2015-12-10 21:44:51 +00:00
parent 99112e287a
commit 0aabc8d9d9
16 changed files with 352 additions and 93 deletions

View File

@@ -33,7 +33,7 @@
#define MPP_TEST_FRAME_SIZE SZ_1M
#define MPP_TEST_PACKET_SIZE SZ_512K
Mpp::Mpp(MppCtxType type, MppCodingType coding)
Mpp::Mpp()
: mPackets(NULL),
mFrames(NULL),
mTasks(NULL),
@@ -50,26 +50,45 @@ Mpp::Mpp(MppCtxType type, MppCodingType coding)
mThreadHal(NULL),
mDec(NULL),
mEnc(NULL),
mType(type),
mCoding(coding),
mFastMode(0),
mInitDone(0),
mType(MPP_CTX_BUTT),
mCoding(MPP_VIDEO_CodingUnused),
mPacketBlock(0),
mOutputBlock(0),
mMultiFrame(0),
mStatus(0)
{
}
MPP_RET Mpp::init(MppCtxType type, MppCodingType coding)
{
mType = type;
mCoding = coding;
switch (mType) {
case MPP_CTX_DEC : {
mDec = mpp_calloc(MppDec, 1);
if (NULL == mDec) {
mpp_err_f("failed to malloc context\n");
return MPP_ERR_NULL_PTR;
}
mPackets = new mpp_list((node_destructor)mpp_packet_deinit);
mFrames = new mpp_list((node_destructor)mpp_frame_deinit);
mTasks = new mpp_list((node_destructor)NULL);
mpp_dec_init(&mDec, coding);
if (MPP_VIDEO_CodingHEVC == coding) {
mDec->fast_mode = mFastMode;
}
mpp_dec_init(mDec, coding);
mThreadCodec = new MppThread(mpp_dec_parser_thread, this);
mThreadHal = new MppThread(mpp_dec_hal_thread, this);
mpp_buffer_group_get_internal(&mInternalGroup, MPP_BUFFER_TYPE_ION);
mpp_buffer_group_get_internal(&mPacketGroup, MPP_BUFFER_TYPE_ION);
mpp_buffer_group_limit_config(mPacketGroup, 0, 2);
mpp_buffer_group_limit_config(mPacketGroup, 0, 3);
} break;
case MPP_CTX_ENC : {
@@ -101,7 +120,9 @@ Mpp::Mpp(MppCtxType type, MppCodingType coding)
clear();
}
mInitDone = 1;
mpp_env_get_u32("mpp_debug", &mpp_debug, 0);
return MPP_OK;
}
Mpp::~Mpp ()
@@ -250,8 +271,8 @@ MPP_RET Mpp::control(MpiCmd cmd, MppParam param)
mpp_log("mpi_control group %p\n", param);
mFrameGroup = (MppBufferGroup)param;
mpp_buffer_group_set_listener((MppBufferGroupImpl *)param, (void *)mThreadCodec);
mpp_log("signal codec thread\n");
mThreadCodec->signal();
mpp_log("signal codec thread\n");
mThreadCodec->signal();
break;
}
case MPP_SET_OUTPUT_BLOCK: {
@@ -270,6 +291,11 @@ MPP_RET Mpp::control(MpiCmd cmd, MppParam param)
mpp_dec_control(mDec, cmd, param);
break;
}
case MPP_DEC_USE_FAST_MODE: {
RK_U32 mode = *((RK_U32 *)param);
mFastMode = mode;
break;
}
default : {
} break;
}