mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
[astyle]: format coding style
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@539 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -553,8 +553,8 @@ MPP_RET h264d_reset(void *decoder)
|
|||||||
//!< reset dpb
|
//!< reset dpb
|
||||||
FUN_CHECK(ret = flush_dpb(p_Dec->p_Vid->p_Dpb_layer[0], 1));
|
FUN_CHECK(ret = flush_dpb(p_Dec->p_Vid->p_Dpb_layer[0], 1));
|
||||||
FUN_CHECK(ret = init_dpb(p_Dec->p_Vid, p_Dec->p_Vid->p_Dpb_layer[0], 1));
|
FUN_CHECK(ret = init_dpb(p_Dec->p_Vid, p_Dec->p_Vid->p_Dpb_layer[0], 1));
|
||||||
if (p_Dec->mvc_valid)
|
if (p_Dec->mvc_valid) {
|
||||||
{ // layer_id == 1
|
// layer_id == 1
|
||||||
FUN_CHECK(ret = flush_dpb(p_Dec->p_Vid->p_Dpb_layer[1], 1));
|
FUN_CHECK(ret = flush_dpb(p_Dec->p_Vid->p_Dpb_layer[1], 1));
|
||||||
FUN_CHECK(ret = init_dpb(p_Dec->p_Vid, p_Dec->p_Vid->p_Dpb_layer[1], 2));
|
FUN_CHECK(ret = init_dpb(p_Dec->p_Vid, p_Dec->p_Vid->p_Dpb_layer[1], 2));
|
||||||
}
|
}
|
||||||
@@ -590,8 +590,8 @@ MPP_RET h264d_flush(void *decoder)
|
|||||||
FUN_CHECK(ret = flush_dpb(p_Dec->p_Vid->p_Dpb_layer[0], 1));
|
FUN_CHECK(ret = flush_dpb(p_Dec->p_Vid->p_Dpb_layer[0], 1));
|
||||||
FUN_CHECK(ret = init_dpb(p_Dec->p_Vid, p_Dec->p_Vid->p_Dpb_layer[0], 1));
|
FUN_CHECK(ret = init_dpb(p_Dec->p_Vid, p_Dec->p_Vid->p_Dpb_layer[0], 1));
|
||||||
//free_dpb(p_Dec->p_Vid->p_Dpb_layer[0]);
|
//free_dpb(p_Dec->p_Vid->p_Dpb_layer[0]);
|
||||||
if (p_Dec->mvc_valid)
|
if (p_Dec->mvc_valid) {
|
||||||
{ // layer_id == 1
|
// layer_id == 1
|
||||||
|
|
||||||
FUN_CHECK(ret = flush_dpb(p_Dec->p_Vid->p_Dpb_layer[1], 2));
|
FUN_CHECK(ret = flush_dpb(p_Dec->p_Vid->p_Dpb_layer[1], 2));
|
||||||
FUN_CHECK(ret = init_dpb(p_Dec->p_Vid, p_Dec->p_Vid->p_Dpb_layer[1], 2));
|
FUN_CHECK(ret = init_dpb(p_Dec->p_Vid, p_Dec->p_Vid->p_Dpb_layer[1], 2));
|
||||||
|
@@ -896,8 +896,7 @@ static void muti_view_output(MppBufSlots frame_slots, H264_DpbMark_t *p_mark, H2
|
|||||||
p_out[1]->list[p_out[1]->begin] = NULL;
|
p_out[1]->list[p_out[1]->begin] = NULL;
|
||||||
p_out[0]->begin = (p_out[0]->begin + 1) % p_out[0]->max_size;
|
p_out[0]->begin = (p_out[0]->begin + 1) % p_out[0]->max_size;
|
||||||
p_out[1]->begin = (p_out[1]->begin + 1) % p_out[1]->max_size;
|
p_out[1]->begin = (p_out[1]->begin + 1) % p_out[1]->max_size;
|
||||||
}
|
} else if (mpp_frame_get_poc(frame0) > mpp_frame_get_poc(frame1)) {
|
||||||
else if (mpp_frame_get_poc(frame0) > mpp_frame_get_poc(frame1)) {
|
|
||||||
H264D_LOG("[Write_picture] p_mark0->poc > p_mark1->poc \n");
|
H264D_LOG("[Write_picture] p_mark0->poc > p_mark1->poc \n");
|
||||||
mpp_buf_slot_enqueue(frame_slots, p_mark1->slot_idx, QUEUE_DISPLAY);
|
mpp_buf_slot_enqueue(frame_slots, p_mark1->slot_idx, QUEUE_DISPLAY);
|
||||||
p_mark1->out_flag = 0;
|
p_mark1->out_flag = 0;
|
||||||
@@ -905,8 +904,7 @@ static void muti_view_output(MppBufSlots frame_slots, H264_DpbMark_t *p_mark, H2
|
|||||||
p_out[1]->list[p_out[1]->begin] = NULL;
|
p_out[1]->list[p_out[1]->begin] = NULL;
|
||||||
p_out[1]->begin = (p_out[1]->begin + 1) % p_out[1]->max_size;
|
p_out[1]->begin = (p_out[1]->begin + 1) % p_out[1]->max_size;
|
||||||
mpp_frame_set_discard(frame1, 1);
|
mpp_frame_set_discard(frame1, 1);
|
||||||
}
|
} else { //!< mpp_frame_get_poc(frame0) < mpp_frame_get_poc(frame1)
|
||||||
else { //!< mpp_frame_get_poc(frame0) < mpp_frame_get_poc(frame1)
|
|
||||||
H264D_LOG("[Write_picture] p_mark0->poc < p_mark1->poc \n");
|
H264D_LOG("[Write_picture] p_mark0->poc < p_mark1->poc \n");
|
||||||
mpp_buf_slot_enqueue(frame_slots, p_mark0->slot_idx, QUEUE_DISPLAY);
|
mpp_buf_slot_enqueue(frame_slots, p_mark0->slot_idx, QUEUE_DISPLAY);
|
||||||
p_mark0->out_flag = 0;
|
p_mark0->out_flag = 0;
|
||||||
@@ -969,8 +967,7 @@ static void write_picture(H264_StorePic_t *p, H264dVideoCtx_t *p_Vid)
|
|||||||
|
|
||||||
if (p_Vid->p_Dec->mvc_valid) {
|
if (p_Vid->p_Dec->mvc_valid) {
|
||||||
muti_view_output(p_Vid->p_Dec->frame_slots, p_mark, p_Vid);
|
muti_view_output(p_Vid->p_Dec->frame_slots, p_mark, p_Vid);
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
mpp_buf_slot_enqueue(p_Vid->p_Dec->frame_slots, p_mark->slot_idx, QUEUE_DISPLAY);
|
mpp_buf_slot_enqueue(p_Vid->p_Dec->frame_slots, p_mark->slot_idx, QUEUE_DISPLAY);
|
||||||
p_Vid->p_Dec->last_frame_slot_idx = p_mark->slot_idx;
|
p_Vid->p_Dec->last_frame_slot_idx = p_mark->slot_idx;
|
||||||
p_mark->out_flag = 0;
|
p_mark->out_flag = 0;
|
||||||
|
@@ -396,8 +396,7 @@ static void dpb_mark_malloc(H264dVideoCtx_t *p_Vid, RK_S32 structure, RK_U8 comb
|
|||||||
cur_mark = &p_mark[idx];
|
cur_mark = &p_mark[idx];
|
||||||
|
|
||||||
cur_mark->out_flag = 1;
|
cur_mark->out_flag = 1;
|
||||||
if(p_Vid->g_framecnt == 255)
|
if (p_Vid->g_framecnt == 255) {
|
||||||
{
|
|
||||||
idx = idx;
|
idx = idx;
|
||||||
}
|
}
|
||||||
//LogInfo(p_Vid->p_Dec->logctx.parr[RUN_PARSE], "[MALLOC] g_frame_no=%d, mark_idx=%d, slot_idx=%d \n", p_Vid->g_framecnt, cur_mark->mark_idx, cur_mark->slot_idx);
|
//LogInfo(p_Vid->p_Dec->logctx.parr[RUN_PARSE], "[MALLOC] g_frame_no=%d, mark_idx=%d, slot_idx=%d \n", p_Vid->g_framecnt, cur_mark->mark_idx, cur_mark->slot_idx);
|
||||||
|
@@ -172,8 +172,7 @@ static void fill_picture_parameters(const HEVCContext *h,
|
|||||||
}
|
}
|
||||||
// mpp_err("fill RefPicList from the DPB");
|
// mpp_err("fill RefPicList from the DPB");
|
||||||
// fill RefPicList from the DPB
|
// fill RefPicList from the DPB
|
||||||
for (i = 0, j = 0; i < MPP_ARRAY_ELEMS(pp->RefPicList); i++)
|
for (i = 0, j = 0; i < MPP_ARRAY_ELEMS(pp->RefPicList); i++) {
|
||||||
{
|
|
||||||
const HEVCFrame *frame = NULL;
|
const HEVCFrame *frame = NULL;
|
||||||
while (!frame && j < MPP_ARRAY_ELEMS(h->DPB)) {
|
while (!frame && j < MPP_ARRAY_ELEMS(h->DPB)) {
|
||||||
if (&h->DPB[j] != current_picture &&
|
if (&h->DPB[j] != current_picture &&
|
||||||
|
@@ -1230,7 +1230,7 @@ MPP_RET vdpu_set_asic_regs(void *hal, HalRegDrvCtx_t *p_drv)
|
|||||||
if (pp->RefFrameList[i].bPicEntry != 0xff) {
|
if (pp->RefFrameList[i].bPicEntry != 0xff) {
|
||||||
mpp_buf_slot_get_prop(p_hal->frame_slots, pp->RefFrameList[i].Index7Bits, SLOT_BUFFER, &frame_buf); //!< reference phy addr
|
mpp_buf_slot_get_prop(p_hal->frame_slots, pp->RefFrameList[i].Index7Bits, SLOT_BUFFER, &frame_buf); //!< reference phy addr
|
||||||
j = i;
|
j = i;
|
||||||
} else/* if(j == 0xff)*/ {
|
} else { /* if(j == 0xff)*/
|
||||||
mpp_buf_slot_get_prop(p_hal->frame_slots, pp->CurrPic.Index7Bits, SLOT_BUFFER, &frame_buf); //!< current out phy addr
|
mpp_buf_slot_get_prop(p_hal->frame_slots, pp->CurrPic.Index7Bits, SLOT_BUFFER, &frame_buf); //!< current out phy addr
|
||||||
}
|
}
|
||||||
//else {
|
//else {
|
||||||
|
@@ -333,8 +333,7 @@ static MPP_RET vdpu_adjust_input(H264dHalCtx_t *p_hal)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (p_hal->iDecodedNum == 3)
|
if (p_hal->iDecodedNum == 3) {
|
||||||
{
|
|
||||||
i = i;
|
i = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -217,7 +217,8 @@ public:
|
|||||||
mpp_log("dlopen vpu lib");
|
mpp_log("dlopen vpu lib");
|
||||||
}
|
}
|
||||||
|
|
||||||
~VpulibDlsym(){
|
~VpulibDlsym()
|
||||||
|
{
|
||||||
dlclose(rkapi_hdl);
|
dlclose(rkapi_hdl);
|
||||||
mpp_log("dlclose vpu lib");
|
mpp_log("dlclose vpu lib");
|
||||||
}
|
}
|
||||||
@@ -227,8 +228,7 @@ VpulibDlsym gVpulib;
|
|||||||
|
|
||||||
RK_S32 open_orign_vpu(VpuCodecContext **ctx)
|
RK_S32 open_orign_vpu(VpuCodecContext **ctx)
|
||||||
{
|
{
|
||||||
if(NULL != gVpulib.rkvpu_open_cxt)
|
if (NULL != gVpulib.rkvpu_open_cxt) {
|
||||||
{
|
|
||||||
(gVpulib.rkvpu_open_cxt)(ctx);
|
(gVpulib.rkvpu_open_cxt)(ctx);
|
||||||
}
|
}
|
||||||
return MPP_OK;
|
return MPP_OK;
|
||||||
@@ -236,8 +236,7 @@ RK_S32 open_orign_vpu(VpuCodecContext **ctx)
|
|||||||
|
|
||||||
RK_S32 close_orign_vpu(VpuCodecContext **ctx)
|
RK_S32 close_orign_vpu(VpuCodecContext **ctx)
|
||||||
{
|
{
|
||||||
if(NULL != gVpulib.rkvpu_close_cxt)
|
if (NULL != gVpulib.rkvpu_close_cxt) {
|
||||||
{
|
|
||||||
(gVpulib.rkvpu_close_cxt)(ctx);
|
(gVpulib.rkvpu_close_cxt)(ctx);
|
||||||
}
|
}
|
||||||
return MPP_OK;
|
return MPP_OK;
|
||||||
|
Reference in New Issue
Block a user