diff --git a/mpp/codec/dec/h265/h265d_refs.c b/mpp/codec/dec/h265/h265d_refs.c index 465ccd36..c4f0b7f7 100644 --- a/mpp/codec/dec/h265/h265d_refs.c +++ b/mpp/codec/dec/h265/h265d_refs.c @@ -94,7 +94,7 @@ static HEVCFrame *alloc_frame(HEVCContext *s) mpp_frame_set_hor_stride(frame->frame, s->h265dctx->coded_width); mpp_frame_set_ver_stride(frame->frame, s->h265dctx->coded_height); - h265d_dbg(H265D_DBG_GLOBAL,"w_stride %d h_stride %d\n", s->h265dctx->coded_width, s->h265dctx->coded_height); + h265d_dbg(H265D_DBG_GLOBAL, "w_stride %d h_stride %d\n", s->h265dctx->coded_width, s->h265dctx->coded_height); // frame->frame->color_type = s->h265dctx->pix_fmt; // if (!frame->frame->sample_aspect_ratio.num) diff --git a/mpp/legacy/vpu_mem_legacy.c b/mpp/legacy/vpu_mem_legacy.c index d20615e4..405d7d41 100644 --- a/mpp/legacy/vpu_mem_legacy.c +++ b/mpp/legacy/vpu_mem_legacy.c @@ -95,8 +95,6 @@ static RK_S32 get_free_memory_num(vpu_display_mem_pool *p) static RK_S32 reset_vpu_mem_pool(vpu_display_mem_pool *p) { - - vpu_display_mem_pool_impl *p_mempool = (vpu_display_mem_pool_impl *)p; mpp_buffer_group_clear(p_mempool->group); return 0; @@ -263,7 +261,6 @@ RK_S32 VPUMemGetFD(VPUMemLinear_t *p) MppBuffer buffer = (MppBuffer)p->offset; fd = mpp_buffer_get_fd(buffer); return fd; - } RK_S32 vpu_mem_judge_used_heaps_type() diff --git a/mpp/mpp_buffer_impl.cpp b/mpp/mpp_buffer_impl.cpp index ed986695..5db54d08 100644 --- a/mpp/mpp_buffer_impl.cpp +++ b/mpp/mpp_buffer_impl.cpp @@ -92,7 +92,7 @@ MPP_RET deinit_buffer_no_lock(MppBufferImpl *buffer) func(group->allocator, &buffer->info); group->usage -= buffer->info.size; group->count--; - if(!buffer->discard) + if (!buffer->discard) group->count_unused--; } else { group = SEARCH_GROUP_ORPHAN(buffer->group_id); @@ -225,11 +225,11 @@ MPP_RET mpp_buffer_ref_dec(MppBufferImpl *buffer) if (group == service.mLegacyGroup) { deinit_buffer_no_lock(buffer); } else { - if(buffer->discard){ + if (buffer->discard) { deinit_buffer_no_lock(buffer); - }else{ - list_add_tail(&buffer->list_status, &group->list_unused); - group->count_unused++; + } else { + list_add_tail(&buffer->list_status, &group->list_unused); + group->count_unused++; } } group->count_used--; @@ -354,7 +354,7 @@ MPP_RET mpp_buffer_group_reset(MppBufferGroupImpl *p) if (!list_empty(&p->list_used)) { MppBufferImpl *pos, *n; list_for_each_entry_safe(pos, n, &p->list_used, MppBufferImpl, list_status) { - // mpp_buffer_ref_dec(pos); + // mpp_buffer_ref_dec(pos); pos->discard = 1; } } diff --git a/mpp/mpp_buffer_impl.h b/mpp/mpp_buffer_impl.h index d81ffd5c..a6a06b78 100644 --- a/mpp/mpp_buffer_impl.h +++ b/mpp/mpp_buffer_impl.h @@ -46,7 +46,7 @@ struct MppBufferImpl_t { /* used for buf on group reset mode set disard value to 1 when frame refcount no zero , we will delay relesase buffer after refcount to zero, - not put this buf to unused list + not put this buf to unused list */ RK_S32 discard; // used flag is for used/unused list detection diff --git a/osal/inc/mpp_thread.h b/osal/inc/mpp_thread.h index e55aecf0..65fd7d46 100644 --- a/osal/inc/mpp_thread.h +++ b/osal/inc/mpp_thread.h @@ -153,7 +153,8 @@ inline void Condition::signal() pthread_cond_signal(&mCond); } -class MppMutexCond { +class MppMutexCond +{ public: MppMutexCond() {}; ~MppMutexCond() {}; diff --git a/osal/mpp_allocator.cpp b/osal/mpp_allocator.cpp index be242758..c73514e7 100644 --- a/osal/mpp_allocator.cpp +++ b/osal/mpp_allocator.cpp @@ -85,7 +85,7 @@ MPP_RET mpp_allocator_release(MppAllocator allocator, MppBufferInfo *info) { if (NULL == allocator || NULL == info) { mpp_err_f("invalid input: allocator %p info %p\n", - allocator, info); + allocator, info); return MPP_ERR_UNKNOW; } @@ -113,7 +113,7 @@ MPP_RET mpp_alloctor_get(MppAllocator *allocator, MppAllocatorApi **api, MppBuff { if (NULL == allocator || NULL == api || type >= MPP_BUFFER_TYPE_BUTT) { mpp_err_f("invalid input: allocator %p api %p type %d\n", - allocator, api, type); + allocator, api, type); return MPP_ERR_UNKNOW; }