Merge "Encoder: Fix in returning recon buffers with smaller IDR interval" am: cf4481b31d

Original change: https://android-review.googlesource.com/c/platform/external/libavc/+/200241

Change-Id: I4fefa0d34b9a077a47d3b54222dfe82ad26cfdec
This commit is contained in:
Ray Essick 2020-11-15 23:05:37 +00:00 committed by Automerger Merge Worker
commit cc7a15ca99

View file

@ -545,16 +545,16 @@ WORD32 ih264e_encode(iv_obj_t *ps_codec_obj, void *pv_api_ip, void *pv_api_op)
* We need to return a recon when ever we consume an input buffer. This
* comsumption include a pre or post enc skip. Thus dump recon is set for
* all cases except when
* 1) We are waiting -> ps_codec->i4_frame_num > 1
* 2) When the input buffer is null [ ie we are not consuming any inp]
* 1) We are waiting -> ps_codec->i4_pic_cnt > ps_codec->s_cfg.u4_num_bframe
* An exception need to be made for the case when we have the last buffer
* since we need to flush out the on remainig recon.
****************************************************************************/
ps_video_encode_op->s_ive_op.dump_recon = 0;
if (ps_codec->s_cfg.u4_enable_recon && (ps_codec->i4_frame_num > 1 || s_inp_buf.u4_is_last)
&& (s_inp_buf.s_raw_buf.apv_bufs[0] || s_inp_buf.u4_is_last))
if (ps_codec->s_cfg.u4_enable_recon
&& (ps_codec->i4_pic_cnt > (WORD32)ps_codec->s_cfg.u4_num_bframes ||
s_inp_buf.u4_is_last))
{
/* error status */
IH264_ERROR_T ret = IH264_SUCCESS;