From a3eaf9ccfce7a93ae297c3866f8772c8c288039a Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Thu, 27 Jan 2022 15:41:02 +0200 Subject: [PATCH] Fix setting IVE_CMD_CTL_SET_VUI_PARAMS with IVE_ENC_MODE_HEADER mode The ih264e_vui_ip_t struct doesn't contain any input timestamps, and the IVE_CMD_CTL_SET_VUI_PARAMS command didn't set these fields at all (leaving them at their default initialized state 0,0). At the start of ih264e_encode, pending configurations are applied if their timestamp matches the timestamp of the frame to be encoded, or applied unconditionally if the timestamps are equal to -1. Thus, the parameters set with IVE_CMD_CTL_SET_VUI_PARAMS previously only got applied if encoding a frame with the specific timestamp 0, but now they get applied unconditionally on the next encoded frame. Bug: 240466320 Change-Id: I12c50251d8485e3f171ac5c87132ddfbc80377d6 --- encoder/ih264e_api.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/encoder/ih264e_api.c b/encoder/ih264e_api.c index 1f69e3e..ee9d400 100644 --- a/encoder/ih264e_api.c +++ b/encoder/ih264e_api.c @@ -5871,6 +5871,9 @@ static WORD32 ih264e_set_vui_params(void *pv_api_ip, ps_vui->u1_num_reorder_frames = ps_ip->u1_num_reorder_frames; ps_vui->u1_max_dec_frame_buffering = ps_ip->u1_max_dec_frame_buffering; + ps_cfg->u4_timestamp_high = -1; + ps_cfg->u4_timestamp_low = -1; + return IV_SUCCESS; }