[gop_ref]: Remove gop_ref

New reference frame config interface will be added.

Change-Id: I5766cefde12237561bbc20c905e47ed2d3e90011
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
Herman Chen
2020-05-26 11:22:57 +08:00
parent 1b345c8cda
commit 6a6521ed13
13 changed files with 28 additions and 741 deletions

View File

@@ -265,178 +265,6 @@ MPP_RET mpi_enc_test_cmd_put(MpiEncTestArgs* cmd)
return MPP_OK;
}
MPP_RET mpi_enc_gen_gop_ref(MppEncGopRef *ref, RK_S32 gop_mode)
{
ref->change = 0;
ref->gop_cfg_enable = 0;
/* error gop and tsvc config */
if (gop_mode < 0 || gop_mode > 3)
return MPP_NOK;
// no tsvc config
if (gop_mode == 0)
return MPP_OK;
ref->change = 1;
ref->gop_cfg_enable = 1;
// default no LTR
ref->lt_ref_interval = 0;
ref->max_lt_ref_cnt = 0;
// rockchip tsvc config
MppGopRefInfo *gop = &ref->gop_info[0];
if (gop_mode == 3) {
// tsvc4
// /-> P1 /-> P3 /-> P5 /-> P7
// / / / /
// //--------> P2 //--------> P6
// // //
// ///---------------------> P4
// ///
// P0 ------------------------------------------------> P8
ref->ref_gop_len = 8;
ref->layer_weight[0] = 800;
ref->layer_weight[1] = 400;
ref->layer_weight[2] = 400;
ref->layer_weight[3] = 400;
gop[0].temporal_id = 0;
gop[0].ref_idx = 0;
gop[0].is_non_ref = 0;
gop[0].is_lt_ref = 1;
gop[0].lt_idx = 0;
gop[1].temporal_id = 3;
gop[1].ref_idx = 0;
gop[1].is_non_ref = 1;
gop[1].is_lt_ref = 0;
gop[1].lt_idx = 0;
gop[2].temporal_id = 2;
gop[2].ref_idx = 0;
gop[2].is_non_ref = 0;
gop[2].is_lt_ref = 0;
gop[2].lt_idx = 0;
gop[3].temporal_id = 3;
gop[3].ref_idx = 2;
gop[3].is_non_ref = 1;
gop[3].is_lt_ref = 0;
gop[3].lt_idx = 0;
gop[4].temporal_id = 1;
gop[4].ref_idx = 0;
gop[4].is_non_ref = 0;
gop[4].is_lt_ref = 0;
gop[4].lt_idx = 0;
gop[5].temporal_id = 3;
gop[5].ref_idx = 4;
gop[5].is_non_ref = 1;
gop[5].is_lt_ref = 0;
gop[5].lt_idx = 0;
gop[6].temporal_id = 2;
gop[6].ref_idx = 4;
gop[6].is_non_ref = 0;
gop[6].is_lt_ref = 0;
gop[6].lt_idx = 0;
gop[7].temporal_id = 3;
gop[7].ref_idx = 6;
gop[7].is_non_ref = 1;
gop[7].is_lt_ref = 0;
gop[7].lt_idx = 0;
gop[8].temporal_id = 0;
gop[8].ref_idx = 0;
gop[8].is_non_ref = 0;
gop[8].is_lt_ref = 1;
gop[8].lt_idx = 0;
ref->max_lt_ref_cnt = 1;
} else if (gop_mode == 2) {
// tsvc3
// /-> P1 /-> P3
// / /
// //--------> P2
// //
// P0/---------------------> P4
ref->ref_gop_len = 4;
ref->layer_weight[0] = 1000;
ref->layer_weight[1] = 500;
ref->layer_weight[2] = 500;
ref->layer_weight[3] = 0;
gop[0].temporal_id = 0;
gop[0].ref_idx = 0;
gop[0].is_non_ref = 0;
gop[0].is_lt_ref = 0;
gop[0].lt_idx = 0;
gop[1].temporal_id = 2;
gop[1].ref_idx = 0;
gop[1].is_non_ref = 1;
gop[1].is_lt_ref = 0;
gop[1].lt_idx = 0;
gop[2].temporal_id = 1;
gop[2].ref_idx = 0;
gop[2].is_non_ref = 0;
gop[2].is_lt_ref = 0;
gop[2].lt_idx = 0;
gop[3].temporal_id = 2;
gop[3].ref_idx = 2;
gop[3].is_non_ref = 1;
gop[3].is_lt_ref = 0;
gop[3].lt_idx = 0;
gop[4].temporal_id = 0;
gop[4].ref_idx = 0;
gop[4].is_non_ref = 0;
gop[4].is_lt_ref = 0;
gop[4].lt_idx = 0;
// set to lt_ref interval with looping LTR idx
ref->lt_ref_interval = 10;
ref->max_lt_ref_cnt = 3;
} else if (gop_mode == 1) {
// tsvc2
// /-> P1
// /
// P0--------> P2
ref->ref_gop_len = 2;
ref->layer_weight[0] = 1400;
ref->layer_weight[1] = 600;
ref->layer_weight[2] = 0;
ref->layer_weight[3] = 0;
gop[0].temporal_id = 0;
gop[0].ref_idx = 0;
gop[0].is_non_ref = 0;
gop[0].is_lt_ref = 0;
gop[0].lt_idx = 0;
gop[1].temporal_id = 1;
gop[1].ref_idx = 0;
gop[1].is_non_ref = 1;
gop[1].is_lt_ref = 0;
gop[1].lt_idx = 0;
gop[2].temporal_id = 0;
gop[2].ref_idx = 0;
gop[2].is_non_ref = 0;
gop[2].is_lt_ref = 0;
gop[2].lt_idx = 0;
}
return MPP_OK;
}
MPP_RET mpi_enc_gen_osd_data(MppEncOSDData *osd_data, MppBuffer osd_buf, RK_U32 frame_cnt)
{
RK_U32 k = 0;