[h263d]: Enable mpp split for h263.

Fix h263 split logic.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: Ifa52b9c1e905ba418aef7d95e9572467a2c83c14
This commit is contained in:
xueman.ruan
2022-08-23 10:57:52 +08:00
parent b446025bf8
commit c00f55111f
2 changed files with 3 additions and 5 deletions

View File

@@ -41,7 +41,6 @@ typedef struct {
RK_U32 task_eos;
// runtime parameter
RK_U32 need_split;
RK_U32 frame_count;
// parser context
@@ -89,7 +88,6 @@ MPP_RET h263d_init(void *dec, ParserCfg *cfg)
p->frame_slots = cfg->frame_slots;
p->packet_slots = cfg->packet_slots;
p->cfg = cfg->cfg;
p->need_split = p->cfg->base.split_parse;
p->stream = stream;
p->stream_size = stream_size;
p->task_pkt = task_pkt;
@@ -197,7 +195,7 @@ MPP_RET h263d_prepare(void *dec, MppPacket pkt, HalDecTask *task)
return MPP_ERR_UNKNOW;
}
if (!p->need_split) {
if (!p->cfg->base.split_parse) {
/*
* Copy packet mode:
* Decoder's user will insure each packet is one frame for process

View File

@@ -340,7 +340,7 @@ MPP_RET mpp_h263_parser_split(H263dParser ctx, MppPacket dst, MppPacket src)
state = (state << 8) | src_buf[src_pos];
if ((state & H263_STARTCODE_MASK) == H263_STARTCODE &&
(state & H263_GOB_ZERO_MASK) == H263_GOB_ZERO) {
pos_frm_start = src_pos - 3;
pos_frm_start = src_pos - 2;
src_pos++;
break;
}
@@ -354,7 +354,7 @@ MPP_RET mpp_h263_parser_split(H263dParser ctx, MppPacket dst, MppPacket src)
if ((state & H263_STARTCODE_MASK) == H263_STARTCODE &&
(state & H263_GOB_ZERO_MASK) == H263_GOB_ZERO) {
pos_frm_end = src_pos - 3;
pos_frm_end = src_pos - 2;
break;
}
}