[mpp_dec] remove warnning

[h264d]   remove warnning

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@500 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
DingWei
2015-12-03 02:34:52 +00:00
parent ba16ca1559
commit 2aa567d87b
10 changed files with 37 additions and 38 deletions

View File

@@ -625,12 +625,10 @@ __RETURN:
MPP_RET h264d_prepare(void *decoder, MppPacket pkt, HalDecTask *task)
{
MPP_RET ret = MPP_ERR_UNKNOW;
LogCtx_t *logctx = NULL;
H264_DecCtx_t *p_Dec = (H264_DecCtx_t *)decoder;
INP_CHECK(ret, !decoder && !pkt && !task);
FunctionIn(p_Dec->logctx.parr[RUN_PARSE]);
logctx = p_Dec->logctx.parr[RUN_PARSE];
//LogTrace(logctx, "Prepare In:len=%d, valid=%d ", mpp_packet_get_length(pkt), task->valid);
if (p_Dec->p_Inp->has_get_eos) {

View File

@@ -1606,7 +1606,6 @@ MPP_RET init_dpb(H264dVideoCtx_t *p_Vid, H264_DpbBuf_t *p_Dpb, RK_S32 type) //
RK_S32 PicSizeInMbs = 0;
MPP_RET ret = MPP_ERR_UNKNOW;
H264_SPS_t *active_sps = p_Vid->active_sps;
LogCtx_t *runlog = p_Dpb->p_Vid->p_Dec->logctx.parr[RUN_PARSE];
p_Dpb->p_Vid = p_Vid;
if (p_Dpb->init_done) {
@@ -1773,7 +1772,7 @@ static void reset_dpb_info(H264_DpbInfo_t *p)
}
#if 0
static MPP_RET adjust_input(H264_SLICE_t *currSlice)
{
RK_U32 i = 0, j = 0;
@@ -1857,7 +1856,7 @@ static MPP_RET adjust_input(H264_SLICE_t *currSlice)
return MPP_OK;
}
#endif
/*!
@@ -2081,7 +2080,7 @@ MPP_RET prepare_init_dpb_info(H264_SLICE_t *currSlice)
//adjust_input(currSlice);
for (i = 0; i < MAX_DPB_SIZE; i++) {
if (p_Dec->dpb_info[i].picbuf && (p_Dec->dpb_info[i].slot_index >= 0)) {
if ((NULL != p_Dec->dpb_info[i].picbuf) && (p_Dec->dpb_info[i].slot_index >= 0)) {
p_Dec->in_task->refer[i] = p_Dec->dpb_info[i].slot_index;
mpp_buf_slot_set_flag(p_Dec->frame_slots, p_Dec->dpb_info[i].slot_index, SLOT_HAL_INPUT);
mpp_buf_slot_set_flag(p_Dec->frame_slots, p_Dec->dpb_info[i].slot_index, SLOT_CODEC_USE);

View File

@@ -208,7 +208,7 @@ typedef struct h264_dpb_mark_t {
//!< decoder picture buffer information
typedef struct h264_dpb_info_t {
RK_U8 colmv_is_used;
RK_U8 slot_index;
RK_S32 slot_index;
RK_S32 TOP_POC;
RK_S32 BOT_POC;

View File

@@ -141,7 +141,7 @@ static void find_prefix_code(RK_U8 *p_data, H264dCurStream_t *p_strm)
}
}
}
#if 0
static MPP_RET read_one_nalu(H264dInputCtx_t *p_Inp, H264dCurStream_t *p_strm)
{
MPP_RET ret = MPP_ERR_UNKNOW;
@@ -184,7 +184,7 @@ __FAILED:
return ret;
}
#endif
static MPP_RET parser_nalu_header(H264_SLICE_t *currSlice)
{
@@ -349,7 +349,7 @@ __FAILED:
currSlice->p_Dec->nalu_ret = ReadNaluError;
return ret;
}
#if 0
static MPP_RET analyze_cur_nalu(H264dCurCtx_t *p_Cur)
{
MPP_RET ret = MPP_ERR_UNKNOW;
@@ -411,7 +411,7 @@ __BITREAD_ERR:
__FAILED:
return ret;
}
#endif
static MPP_RET add_empty_nalu(H264dCurStream_t *p_strm)
{
MPP_RET ret = MPP_ERR_UNKNOW;
@@ -486,7 +486,7 @@ __FAILED:
//mpp_log("store_cur_nalu function ERROR \n");
return ret;
}
#if 0
static void insert_timestamp(H264dCurCtx_t *p_Cur, H264dCurStream_t *p_strm)
{
RK_U8 i = 0;
@@ -509,7 +509,7 @@ static void insert_timestamp(H264dCurCtx_t *p_Cur, H264dCurStream_t *p_strm)
//p_Cur->dts = p_Cur->p_Inp->in_dts;
//p_Cur->pts = p_Cur->p_Inp->in_pts;
}
#endif
static MPP_RET judge_is_new_frame(H264dCurCtx_t *p_Cur, H264dCurStream_t *p_strm)
{
MPP_RET ret = MPP_ERR_UNKNOW;
@@ -734,12 +734,10 @@ __FAILED:
MPP_RET parse_prepare_extra_header(H264dInputCtx_t *p_Inp, H264dCurCtx_t *p_Cur)
{
RK_S32 i = 0;
RK_U32 add_size = 0;
MPP_RET ret = MPP_ERR_UNKNOW;
H264dLogCtx_t *logctx = &p_Inp->p_Dec->logctx;
H264_DecCtx_t *p_Dec = p_Inp->p_Dec;
H264dCurStream_t *p_strm = &p_Cur->strm;
H264dLogCtx_t *logctx = &p_Inp->p_Dec->logctx;
H264dCurStream_t *p_strm = &p_Cur->strm;
RK_U8 *pdata = p_Inp->in_buf;
RK_U64 extrasize = p_Inp->in_length;
@@ -807,15 +805,12 @@ __FAILED:
*/
MPP_RET parse_prepare_extra_data(H264dInputCtx_t *p_Inp, H264dCurCtx_t *p_Cur)
{
RK_U32 i = 0;
RK_U32 add_size = 0;
RK_S32 strm_offset = 0;
RK_U32 strm_offset = 0;
MPP_RET ret = MPP_ERR_UNKNOW;
H264dLogCtx_t *logctx = &p_Inp->p_Dec->logctx;
H264dCurStream_t *p_strm = &p_Cur->strm;
RK_U8 *pdata = p_Inp->in_buf;
RK_U64 extrasize = p_Inp->in_length;
FunctionIn(logctx->parr[RUN_PARSE]);
p_Inp->task_valid = 0;

View File

@@ -91,7 +91,7 @@ static void dec_task_init(DecTask *task)
hal_task_info_init(&task->info, MPP_CTX_DEC);
}
#if 0
static void dec_task_reset(MppDec *dec, DecTask *task)
{
task->hnd = NULL;
@@ -121,7 +121,7 @@ static void dec_task_reset(MppDec *dec, DecTask *task)
hal_task_info_init(&task->info, MPP_CTX_DEC);
}
#endif
/*
* return MPP_OK for not wait
* return MPP_NOK for wait
@@ -287,9 +287,9 @@ static MPP_RET try_proc_dec_task(Mpp *mpp, DecTask *task)
while (MPP_OK == mpp_buf_slot_dequeue(frame_slots, &index, QUEUE_DISPLAY)) {
MppFrame frame;
RK_U32 display;
//RK_U32 display;
mpp_buf_slot_get_prop(frame_slots, index, SLOT_FRAME, &frame);
display = mpp_frame_get_display(frame);
//display = mpp_frame_get_display(frame);
if (!dec->reset_flag) {
mpp_put_frame(mpp, frame);
} else {
@@ -368,9 +368,9 @@ static MPP_RET try_proc_dec_task(Mpp *mpp, DecTask *task)
RK_S32 index;
while (MPP_OK == mpp_buf_slot_dequeue(frame_slots, &index, QUEUE_DISPLAY)) {
MppFrame frame;
RK_U32 display;
//RK_U32 display;
mpp_buf_slot_get_prop(frame_slots, index, SLOT_FRAME, &frame);
display = mpp_frame_get_display(frame);
//display = mpp_frame_get_display(frame);
if (!dec->reset_flag) {
mpp_put_frame(mpp, frame);
} else {

View File

@@ -20,6 +20,7 @@
#include <stdio.h>
#include <string.h>
#include "vpu.h"
#include "mpp_mem.h"
#include "mpp_buffer.h"
#include "hal_task.h"
@@ -50,6 +51,12 @@ const enum {
H264ScalingList8x8Length = 64,
} ScalingListLength;
#ifndef ANDROID
static RK_S32 VPUClientGetIOMMUStatus()
{
return 0;
}
#endif
static void rkv_write_sps_to_fifo(H264dHalCtx_t *p_hal, FifoCtx_t *pkt)
{
@@ -130,7 +137,7 @@ static void rkv_write_pps_to_fifo(H264dHalCtx_t *p_hal, FifoCtx_t *pkt)
Scaleing_list_address = mpp_buffer_get_fd(p_hal->cabac_buf);
//mpp_log("fd=%08x, offset=%d", Scaleing_list_address, offset);
if (VPUClientGetIOMMUStatus()) {
if (VPUClientGetIOMMUStatus() > 0) {
Scaleing_list_address |= offset << 10;
} else {
Scaleing_list_address += offset;

View File

@@ -380,8 +380,6 @@ __RETURN:
//extern "C"
MPP_RET rkv_h264d_wait(void *hal, HalTaskInfo *task)
{
//RK_U32 i = 0;
RK_U32 *ptr = NULL;
MPP_RET ret = MPP_ERR_UNKNOW;
H264dRkvRegs_t *p_regs = NULL;
H264dHalCtx_t *p_hal = (H264dHalCtx_t *)hal;
@@ -407,6 +405,8 @@ MPP_RET rkv_h264d_wait(void *hal, HalTaskInfo *task)
(void)wait_ret;
#endif
//mpp_log("------- register output ------ \n");
//RK_U32 i = 0;
//RK_U32 *ptr = NULL;
//ptr = (RK_U32 *)p_hal->regs;
//for(i=0; i<78; i++)
//{

View File

@@ -955,7 +955,7 @@ const RK_U32 g_refBase[16] = {
#ifndef ANDROID
RK_S32 VPUClientGetIOMMUStatus()
static RK_S32 VPUClientGetIOMMUStatus()
{
return 0;
}

View File

@@ -282,7 +282,7 @@ static RK_U32 vdpu_hor_align(RK_U32 val)
{
return MPP_ALIGN(val, 16);
}
#if 0
static MPP_RET vdpu_adjust_input(H264dHalCtx_t *p_hal)
{
RK_U32 i = 0, j = 0;
@@ -436,7 +436,7 @@ static MPP_RET vdpu_adjust_input(H264dHalCtx_t *p_hal)
return MPP_OK;
}
#endif
/*!
***********************************************************************
* \brief

View File

@@ -75,7 +75,7 @@ static const char *type2str[MPP_BUFFER_TYPE_BUTT] = {
"ion",
"v4l2",
};
#if 0
static const char *ops2str[BUF_OPS_BUTT] = {
"commit",
"create",
@@ -83,10 +83,10 @@ static const char *ops2str[BUF_OPS_BUTT] = {
"ref dec",
"destroy",
};
#endif
RK_U32 mpp_buffer_debug = 0;
static MppBufferService service;
#if 0
static void add_buf_log(MppBufferGroupImpl *group, MppBufferImpl *buffer, MppBufOps ops, RK_U32 val_in, RK_U32 val_out)
{
if (group->log_runtime_en) {
@@ -103,7 +103,7 @@ static void add_buf_log(MppBufferGroupImpl *group, MppBufferImpl *buffer, MppBuf
}
}
}
#endif
static MppBufferGroupImpl *search_group_by_id_no_lock(struct list_head *list, RK_U32 group_id)
{
MppBufferGroupImpl *pos, *n;