mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-29 11:42:05 +08:00
[mpp_enc]: Optimize encoder flow
1. Create hal_task_group in mpp_enc_hal. 2. Reduce EncAsyncTaskInfo copy in async flow. Change-Id: If81ffc72122f87eb6d2f83bb5ecd7de5400bc140 Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -101,4 +101,53 @@ typedef struct HalEncTask_t {
|
||||
HalEncTaskFlag flags;
|
||||
} HalEncTask;
|
||||
|
||||
/* encoder internal work flow */
|
||||
typedef union EncAsyncStatus_u {
|
||||
RK_U32 val;
|
||||
struct {
|
||||
RK_U32 task_hnd_rdy : 1;
|
||||
RK_U32 task_in_rdy : 1;
|
||||
RK_U32 task_out_rdy : 1;
|
||||
|
||||
RK_U32 frm_pkt_rdy : 1;
|
||||
|
||||
RK_U32 hal_task_reset_rdy : 1; // reset hal task to start
|
||||
RK_U32 rc_check_frm_drop : 1; // rc stage
|
||||
RK_U32 pkt_buf_rdy : 1; // prepare pkt buf
|
||||
|
||||
RK_U32 enc_start : 1; // enc stage
|
||||
RK_U32 refs_force_update : 1; // enc stage
|
||||
RK_U32 low_delay_again : 1; // enc stage low delay output again
|
||||
|
||||
RK_U32 enc_backup : 1; // enc stage
|
||||
RK_U32 enc_restore : 1; // reenc flow start point
|
||||
RK_U32 enc_proc_dpb : 1; // enc stage
|
||||
RK_U32 rc_frm_start : 1; // rc stage
|
||||
RK_U32 check_type_reenc : 1; // flow checkpoint if reenc -> enc_restore
|
||||
RK_U32 enc_proc_hal : 1; // enc stage
|
||||
RK_U32 hal_get_task : 1; // hal stage
|
||||
RK_U32 rc_hal_start : 1; // rc stage
|
||||
RK_U32 hal_gen_reg : 1; // hal stage
|
||||
RK_U32 hal_start : 1; // hal stage
|
||||
RK_U32 hal_wait : 1; // hal stage NOTE: special in low delay mode
|
||||
RK_U32 rc_hal_end : 1; // rc stage
|
||||
RK_U32 hal_ret_task : 1; // hal stage
|
||||
RK_U32 enc_update_hal : 1; // enc stage
|
||||
RK_U32 rc_frm_end : 1; // rc stage
|
||||
RK_U32 check_rc_reenc : 1; // flow checkpoint if reenc -> enc_restore
|
||||
RK_U32 enc_done : 1; // done stage
|
||||
RK_U32 slice_out_done : 1;
|
||||
};
|
||||
} EncAsyncStatus;
|
||||
|
||||
typedef struct EncAsyncTaskInfo_t {
|
||||
RK_S32 seq_idx;
|
||||
EncAsyncStatus status;
|
||||
RK_S64 pts;
|
||||
|
||||
HalEncTask task;
|
||||
EncRcTask rc;
|
||||
MppEncRefFrmUsrCfg usr;
|
||||
} EncAsyncTaskInfo;
|
||||
|
||||
#endif /* __HAL_ENC_TASK__ */
|
||||
|
||||
Reference in New Issue
Block a user