[h264e_rkv]: pack cfg into SEI and write to stream

1. add SEI writting interface
2. write extra_info_cfg and rc_cfg to SEI
3. stream_get_pos use s->buf_plus8 rather than s->p_start

Change-Id: I71de4d6f5dc31f21c0a32dc5ded275ced260d861
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
This commit is contained in:
Lin Kesheng
2016-10-10 10:34:12 +08:00
committed by Herman Chen
parent 1586aaf1e7
commit fad35922fc
9 changed files with 259 additions and 82 deletions

View File

@@ -178,6 +178,7 @@ int mpi_enc_test(MpiEncTestCmd *cmd)
MppBuffer md_buf[MPI_ENC_IO_COUNT] = { NULL };
MppBuffer osd_idx_buf[MPI_ENC_IO_COUNT] = { NULL };
MppEncOSDPlt osd_plt;
MppEncSeiMode sei_mode = MPP_ENC_SEI_MODE_ONE_SEQ;
// paramter for resource malloc
RK_U32 width = cmd->width;
@@ -301,6 +302,12 @@ int mpi_enc_test(MpiEncTestCmd *cmd)
mpp_cfg.level = 41;
mpp_cfg.cabac_en = 1;
ret = mpi->control(ctx, MPP_ENC_SET_SEI_CFG, &sei_mode);
if (MPP_OK != ret) {
mpp_err("mpi control enc set sei cfg failed\n");
goto MPP_TEST_OUT;
}
ret = mpi->control(ctx, MPP_ENC_SET_CFG, &mpp_cfg);
if (MPP_OK != ret) {
mpp_err("mpi control enc set cfg failed\n");