mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
[mpi_enc_test]: Add encoder frame skip config
When the bitrate overflow the encoder can drop or encode skip frame. drop_mode: MPP_ENC_RC_DROP_FRM_DISABLED - Do not drop frame when bitrate is too large. MPP_ENC_RC_DROP_FRM_NORMAL - Drop frame when bitrate is too large. MPP_ENC_RC_DROP_FRM_PSKIP - Encode force pskip frame to keep frame rate when bitrate overflow. drop_thd: The instantaneous bitrate overflow threshold to trigger drop frame. drop_gap: The minimum gap between two continuous drop frames. 0 - enable continnous drop frame. Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Change-Id: If17ee5f46ee03ae4ad958c8fad30a4a82f422118
This commit is contained in:
@@ -557,6 +557,11 @@ MPP_RET test_mpp_enc_cfg_setup(MpiEncTestData *p)
|
||||
mpp_enc_cfg_set_s32(cfg, "rc:fps_out_denorm", p->fps_out_den);
|
||||
mpp_enc_cfg_set_s32(cfg, "rc:gop", p->gop_len ? p->gop_len : p->fps_out_num * 2);
|
||||
|
||||
/* drop frame or not when bitrate overflow */
|
||||
mpp_enc_cfg_set_u32(cfg, "rc:drop_mode", MPP_ENC_RC_DROP_FRM_DISABLED);
|
||||
mpp_enc_cfg_set_u32(cfg, "rc:drop_thd", 20); /* 20% of max bps */
|
||||
mpp_enc_cfg_set_u32(cfg, "rc:drop_gap", 1); /* Do not continuous drop frame */
|
||||
|
||||
/* setup codec */
|
||||
mpp_enc_cfg_set_s32(cfg, "codec:type", p->type);
|
||||
switch (p->type) {
|
||||
|
Reference in New Issue
Block a user