aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2020-11-21 02:45:13 +0530
committerRay Essick <essick@google.com>2020-12-09 14:56:22 -0800
commit75eb07f0dbf1769bf8e4871018ae4556ad699f7a (patch)
tree285e64e74e80a1bde811cad45280c74ed616f028
parentf5ec0d4287f61b578a700ff70beb3700b96ab827 (diff)
downloadlibhevc-75eb07f0dbf1769bf8e4871018ae4556ad699f7a.tar.gz
Bug: 173312145 Test: poc in bug Test: atest android.media.cts.HeifWriterTest Test: atest android.mediav2.cts Change-Id: I469c6864ffce5f0019f6be49ff4f3f0a58f04ec1
-rw-r--r--encoder/ihevce_rc_interface.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/encoder/ihevce_rc_interface.c b/encoder/ihevce_rc_interface.c
index b0cee1b..71be434 100644
--- a/encoder/ihevce_rc_interface.c
+++ b/encoder/ihevce_rc_interface.c
@@ -4944,9 +4944,10 @@ void ihevce_rc_store_retrive_update_info(
}
else
{
- if(ps_rc_lap_out_curr->i4_rc_display_num &&
- (ps_rc_lap_out_curr->i4_rc_display_num %
- (ps_rc_ctxt->u4_intra_frame_interval - 1)) == 0)
+ if(ps_rc_ctxt->u4_intra_frame_interval <= 1 ||
+ (ps_rc_lap_out_curr->i4_rc_display_num &&
+ (ps_rc_lap_out_curr->i4_rc_display_num %
+ (ps_rc_ctxt->u4_intra_frame_interval - 1)) == 0))
{
ps_rc_ctxt->as_rc_lap_out[i4_enc_frm_id_rc].i4_next_pic_type = IV_I_FRAME;
}