mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 09:06:50 +08:00
[mpp_log]: Update mpp_log macro
Change-Id: I0e46e93a9a8fa0a7cb7a0e86cec1748503bddcfb Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -861,16 +861,14 @@ MPP_RET mpp_buf_slot_set_prop(MppBufSlots slots, RK_S32 index, SlotPropType type
|
||||
impl->info_changed = 1;
|
||||
|
||||
if (old->width || old->height) {
|
||||
mpp_dbg(MPP_DBG_INFO, "info change found\n");
|
||||
mpp_dbg(MPP_DBG_INFO,
|
||||
"old width %4d height %4d stride hor %4d ver %4d fmt %4d\n",
|
||||
old->width, old->height, old->hor_stride,
|
||||
old->ver_stride, old->fmt);
|
||||
mpp_dbg_info("info change found\n");
|
||||
mpp_dbg_info("old width %4d height %4d stride hor %4d ver %4d fmt %4d\n",
|
||||
old->width, old->height, old->hor_stride,
|
||||
old->ver_stride, old->fmt);
|
||||
}
|
||||
mpp_dbg(MPP_DBG_INFO,
|
||||
"new width %4d height %4d stride hor %4d ver %4d fmt %4d\n",
|
||||
dst->width, dst->height, dst->hor_stride, dst->ver_stride,
|
||||
dst->fmt);
|
||||
mpp_dbg_info("new width %4d height %4d stride hor %4d ver %4d fmt %4d\n",
|
||||
dst->width, dst->height, dst->hor_stride, dst->ver_stride,
|
||||
dst->fmt);
|
||||
// info change found here
|
||||
}
|
||||
} break;
|
||||
|
@@ -511,8 +511,7 @@ static void mpp_dec_put_frame(Mpp *mpp, RK_S32 index, HalDecTaskFlag flags)
|
||||
mpp_frame_init(&out);
|
||||
mpp_frame_copy(out, frame);
|
||||
|
||||
if (mpp_debug & MPP_DBG_PTS)
|
||||
mpp_log("output frame pts %lld\n", mpp_frame_get_pts(out));
|
||||
mpp_dbg_pts("output frame pts %lld\n", mpp_frame_get_pts(out));
|
||||
|
||||
list->lock();
|
||||
list->add_at_tail(&out, sizeof(out));
|
||||
@@ -681,9 +680,7 @@ static MPP_RET try_proc_dec_task(Mpp *mpp, DecTask *task)
|
||||
*
|
||||
*/
|
||||
if (!task->status.curr_task_rdy) {
|
||||
if (mpp_debug & MPP_DBG_PTS)
|
||||
mpp_log("input packet pts %lld\n",
|
||||
mpp_packet_get_pts(dec->mpp_pkt_in));
|
||||
mpp_dbg_pts("input packet pts %lld\n", mpp_packet_get_pts(dec->mpp_pkt_in));
|
||||
|
||||
mpp_clock_start(dec->clocks[DEC_PRS_PREPARE]);
|
||||
mpp_parser_prepare(dec->parser, dec->mpp_pkt_in, task_dec);
|
||||
@@ -1019,14 +1016,14 @@ void *mpp_dec_parser_thread(void *data)
|
||||
|
||||
mpp_clock_pause(dec->clocks[DEC_PRS_TOTAL]);
|
||||
|
||||
mpp_dbg(MPP_DBG_INFO, "mpp_dec_parser_thread is going to exit\n");
|
||||
mpp_dbg_info("mpp_dec_parser_thread is going to exit\n");
|
||||
if (task.hnd && task_dec->valid) {
|
||||
mpp_buf_slot_set_flag(packet_slots, task_dec->input, SLOT_CODEC_READY);
|
||||
mpp_buf_slot_set_flag(packet_slots, task_dec->input, SLOT_HAL_INPUT);
|
||||
mpp_buf_slot_clr_flag(packet_slots, task_dec->input, SLOT_HAL_INPUT);
|
||||
}
|
||||
mpp_buffer_group_clear(mpp->mPacketGroup);
|
||||
mpp_dbg(MPP_DBG_INFO, "mpp_dec_parser_thread exited\n");
|
||||
mpp_dbg_info("mpp_dec_parser_thread exited\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1164,7 +1161,7 @@ void *mpp_dec_hal_thread(void *data)
|
||||
mpp_clock_pause(dec->clocks[DEC_HAL_TOTAL]);
|
||||
|
||||
mpp_assert(mpp->mTaskPutCount == mpp->mTaskGetCount);
|
||||
mpp_dbg(MPP_DBG_INFO, "mpp_dec_hal_thread exited\n");
|
||||
mpp_dbg_info("mpp_dec_hal_thread exited\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@@ -482,8 +482,7 @@ MPP_RET Mpp::get_packet(MppPacket *packet)
|
||||
|
||||
mpp_assert(*packet);
|
||||
|
||||
if (mpp_debug & MPP_DBG_PTS)
|
||||
mpp_log_f("pts %lld\n", mpp_packet_get_pts(*packet));
|
||||
mpp_dbg_pts("pts %lld\n", mpp_packet_get_pts(*packet));
|
||||
|
||||
// dump output
|
||||
mpp_ops_enc_get_pkt(mDump, *packet);
|
||||
@@ -775,8 +774,7 @@ MPP_RET Mpp::control_dec(MpiCmd cmd, MppParam param)
|
||||
if (param) {
|
||||
mExternalFrameGroup = 1;
|
||||
|
||||
if (mpp_debug & MPP_DBG_INFO)
|
||||
mpp_log("using external buffer group %p\n", mFrameGroup);
|
||||
mpp_dbg_info("using external buffer group %p\n", mFrameGroup);
|
||||
|
||||
if (mInitDone) {
|
||||
ret = mpp_buffer_group_set_callback((MppBufferGroupImpl *)param,
|
||||
@@ -801,8 +799,7 @@ MPP_RET Mpp::control_dec(MpiCmd cmd, MppParam param)
|
||||
}
|
||||
} break;
|
||||
case MPP_DEC_SET_INFO_CHANGE_READY: {
|
||||
if (mpp_debug & MPP_DBG_INFO)
|
||||
mpp_log("set info change ready\n");
|
||||
mpp_dbg_info("set info change ready\n");
|
||||
|
||||
ret = mpp_dec_control(mDec, cmd, param);
|
||||
notify(MPP_DEC_NOTIFY_INFO_CHG_DONE | MPP_DEC_NOTIFY_BUFFER_MATCH);
|
||||
|
@@ -89,8 +89,7 @@ static void dec_vproc_put_frame(Mpp *mpp, MppFrame frame, MppBuffer buf, RK_S64
|
||||
list->lock();
|
||||
list->add_at_tail(&out, sizeof(out));
|
||||
|
||||
if (mpp_debug & MPP_DBG_PTS)
|
||||
mpp_log("output frame pts %lld\n", mpp_frame_get_pts(out));
|
||||
mpp_dbg_pts("output frame pts %lld\n", mpp_frame_get_pts(out));
|
||||
|
||||
mpp->mFramePutCount++;
|
||||
list->signal();
|
||||
@@ -417,7 +416,7 @@ static void *dec_vproc_thread(void *data)
|
||||
HalTaskInfo task_info;
|
||||
HalDecVprocTask *task_vproc = &task_info.dec_vproc;
|
||||
|
||||
mpp_dbg(MPP_DBG_INFO, "mpp_dec_post_proc_thread started\n");
|
||||
mpp_dbg_info("mpp_dec_post_proc_thread started\n");
|
||||
|
||||
while (1) {
|
||||
MPP_RET ret = MPP_OK;
|
||||
@@ -521,7 +520,7 @@ static void *dec_vproc_thread(void *data)
|
||||
hal_task_hnd_set_status(task, TASK_IDLE);
|
||||
}
|
||||
}
|
||||
mpp_dbg(MPP_DBG_INFO, "mpp_dec_post_proc_thread exited\n");
|
||||
mpp_dbg_info("mpp_dec_post_proc_thread exited\n");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -64,6 +64,10 @@
|
||||
#define MPP_DBG_DUMP_OUT (0x00000400)
|
||||
#define MPP_DBG_DUMP_CFG (0x00000800)
|
||||
|
||||
#define mpp_dbg_pts(fmt, ...) mpp_dbg(MPP_DBG_PTS, fmt, ## __VA_ARGS__)
|
||||
#define mpp_dbg_info(fmt, ...) mpp_dbg(MPP_DBG_INFO, fmt, ## __VA_ARGS__)
|
||||
#define mpp_dbg_platform(fmt, ...) mpp_dbg(MPP_DBG_PLATFORM, fmt, ## __VA_ARGS__)
|
||||
|
||||
#define MPP_ABORT (0x10000000)
|
||||
|
||||
/*
|
||||
|
@@ -632,7 +632,7 @@ static void read_soc_name(char *name, RK_S32 size)
|
||||
*ptr = ' ';
|
||||
}
|
||||
|
||||
mpp_dbg(MPP_DBG_PLATFORM, "chip name: %s\n", name);
|
||||
mpp_dbg_platform("chip name: %s\n", name);
|
||||
}
|
||||
|
||||
close(fd);
|
||||
@@ -648,7 +648,7 @@ static const MppSocInfo *check_soc_info(const char *soc_name)
|
||||
const char *compatible = mpp_soc_infos[i].compatible;
|
||||
|
||||
if (strstr(soc_name, compatible)) {
|
||||
mpp_dbg(MPP_DBG_PLATFORM, "match chip name: %s\n", compatible);
|
||||
mpp_dbg_platform("match chip name: %s\n", compatible);
|
||||
return &mpp_soc_infos[i];
|
||||
}
|
||||
}
|
||||
@@ -693,7 +693,7 @@ MppSocService::MppSocService()
|
||||
read_soc_name(soc_name, sizeof(soc_name));
|
||||
soc_info = check_soc_info(soc_name);
|
||||
if (NULL == soc_info) {
|
||||
mpp_dbg(MPP_DBG_PLATFORM, "use default chip info\n");
|
||||
mpp_dbg_platform("use default chip info\n");
|
||||
soc_info = &mpp_soc_default;
|
||||
}
|
||||
|
||||
@@ -715,9 +715,9 @@ MppSocService::MppSocService()
|
||||
}
|
||||
}
|
||||
|
||||
mpp_dbg(MPP_DBG_PLATFORM, "coding caps: dec %08x enc %08x\n",
|
||||
dec_coding_cap, enc_coding_cap);
|
||||
mpp_dbg(MPP_DBG_PLATFORM, "vcodec type: %08x\n", soc_info->vcodec_type);
|
||||
mpp_dbg_platform("coding caps: dec %08x enc %08x\n",
|
||||
dec_coding_cap, enc_coding_cap);
|
||||
mpp_dbg_platform("vcodec type: %08x\n", soc_info->vcodec_type);
|
||||
mpp_assert(soc_info->vcodec_type == vcodec_type);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user