mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-06 09:36:49 +08:00
[mpp]: use __FUNCTION__ to replace __FILE__, add mpp_debug initial and move mpp_debug to osal
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@485 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -25,22 +25,22 @@
|
|||||||
|
|
||||||
#define MODULE_TAG "h265_test"
|
#define MODULE_TAG "h265_test"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "mpp_env.h"
|
||||||
|
#include "mpp_err.h"
|
||||||
|
#include "mpp_log.h"
|
||||||
|
#include "mpp_mem.h"
|
||||||
|
#include "mpp_common.h"
|
||||||
|
|
||||||
|
#include "mpp_dec.h"
|
||||||
|
#include "mpp_frame.h"
|
||||||
|
|
||||||
#include "h265d_api.h"
|
#include "h265d_api.h"
|
||||||
#include "hal_h265d_api.h"
|
#include "hal_h265d_api.h"
|
||||||
#include "mpp_env.h"
|
|
||||||
|
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "mpp_log.h"
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "mpp_err.h"
|
|
||||||
#include "mpp_mem.h"
|
|
||||||
#include "mpp_frame.h"
|
|
||||||
#include "openHevcWrapper.h"
|
#include "openHevcWrapper.h"
|
||||||
#include "mpp_buf_slot.h"
|
|
||||||
#include "rk_type.h"
|
|
||||||
#include "mpp_common.h"
|
|
||||||
#include "mpp_dec.h"
|
|
||||||
#include "h265d_api.h"
|
#include "h265d_api.h"
|
||||||
#include "hal_h265d_api.h"
|
#include "hal_h265d_api.h"
|
||||||
|
|
||||||
@@ -597,6 +597,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//mpp_env_set_u32("buf_slot_debug", 0x10000010, 0);
|
//mpp_env_set_u32("buf_slot_debug", 0x10000010, 0);
|
||||||
|
mpp_env_get_u32("mpp_debug", &mpp_debug, 0);
|
||||||
|
|
||||||
cmd = &demoCmdCtx;
|
cmd = &demoCmdCtx;
|
||||||
memset((void*)cmd, 0, sizeof(ParserDemoCmdContext_t));
|
memset((void*)cmd, 0, sizeof(ParserDemoCmdContext_t));
|
||||||
|
@@ -44,7 +44,7 @@ static RK_U32 buf_slot_debug = 0;
|
|||||||
if (!(cond)) { \
|
if (!(cond)) { \
|
||||||
dump_slots(impl); \
|
dump_slots(impl); \
|
||||||
mpp_err("Assertion %s failed at %s:%d\n", \
|
mpp_err("Assertion %s failed at %s:%d\n", \
|
||||||
MPP_STRINGS(cond), __FILE__, __LINE__); \
|
MPP_STRINGS(cond), __FUNCTION__, __LINE__); \
|
||||||
abort(); \
|
abort(); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
@@ -155,7 +155,7 @@ MPP_RET mpp_hal_hw_wait(MppHal ctx, HalTaskInfo *task)
|
|||||||
MPP_RET ret = p->api->wait(p->ctx, task);
|
MPP_RET ret = p->api->wait(p->ctx, task);
|
||||||
|
|
||||||
task->time_end = mpp_time();
|
task->time_end = mpp_time();
|
||||||
mpp_dbg(MPP_HAL_TIMING, "hal timing: %lld\n", task->time_end - task->time_start);
|
mpp_dbg(MPP_TIMING, "hal timing: %lld\n", task->time_end - task->time_start);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@@ -26,5 +26,6 @@ RK_U32 mpi_debug = 0;
|
|||||||
void get_mpi_debug()
|
void get_mpi_debug()
|
||||||
{
|
{
|
||||||
mpp_env_get_u32("mpi_debug", &mpi_debug, 0);
|
mpp_env_get_u32("mpi_debug", &mpi_debug, 0);
|
||||||
|
mpp_env_get_u32("mpp_debug", &mpp_debug, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -32,8 +32,6 @@
|
|||||||
#define MPP_TEST_FRAME_SIZE SZ_1M
|
#define MPP_TEST_FRAME_SIZE SZ_1M
|
||||||
#define MPP_TEST_PACKET_SIZE SZ_512K
|
#define MPP_TEST_PACKET_SIZE SZ_512K
|
||||||
|
|
||||||
RK_U32 mpp_debug = 0;
|
|
||||||
|
|
||||||
Mpp::Mpp(MppCtxType type, MppCodingType coding)
|
Mpp::Mpp(MppCtxType type, MppCodingType coding)
|
||||||
: mPackets(NULL),
|
: mPackets(NULL),
|
||||||
mFrames(NULL),
|
mFrames(NULL),
|
||||||
|
@@ -53,9 +53,7 @@
|
|||||||
#define mpp_dbg_f(flag, fmt, ...) _mpp_dbg_f(mpp_debug, flag, fmt, ## __VA_ARGS__)
|
#define mpp_dbg_f(flag, fmt, ...) _mpp_dbg_f(mpp_debug, flag, fmt, ## __VA_ARGS__)
|
||||||
|
|
||||||
|
|
||||||
#define MPP_HAL_TIMING (0x00000001)
|
#define MPP_TIMING (0x00000001)
|
||||||
|
|
||||||
extern RK_U32 mpp_debug;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* mpp_dbg usage:
|
* mpp_dbg usage:
|
||||||
@@ -101,7 +99,7 @@ extern RK_U32 mpp_debug;
|
|||||||
#define mpp_assert(cond) do { \
|
#define mpp_assert(cond) do { \
|
||||||
if (!(cond)) { \
|
if (!(cond)) { \
|
||||||
mpp_err("Assertion %s failed at %s:%d\n", \
|
mpp_err("Assertion %s failed at %s:%d\n", \
|
||||||
MPP_STRINGS(cond), __FILE__, __LINE__); \
|
MPP_STRINGS(cond), __FUNCTION__, __LINE__); \
|
||||||
mpp_abort(); \
|
mpp_abort(); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
@@ -111,6 +109,8 @@ extern RK_U32 mpp_debug;
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern RK_U32 mpp_debug;
|
||||||
|
|
||||||
void mpp_log_set_flag(RK_U32 flag);
|
void mpp_log_set_flag(RK_U32 flag);
|
||||||
RK_U32 mpp_log_get_flag();
|
RK_U32 mpp_log_get_flag();
|
||||||
|
|
||||||
|
@@ -35,6 +35,7 @@ typedef void (*mpp_log_callback)(const char*, const char*, va_list);
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
RK_U32 mpp_debug = 0;
|
||||||
static RK_U32 mpp_log_flag = 0;
|
static RK_U32 mpp_log_flag = 0;
|
||||||
|
|
||||||
// TODO: add log timing information and switch flag
|
// TODO: add log timing information and switch flag
|
||||||
|
Reference in New Issue
Block a user