Commit d8a15a66 authored by Jingning Han's avatar Jingning Han
Browse files

Reset current_video_frame in key frame

Reset the frame index tracking to 0 when key frame is inserted in
the frame sequence.

Change-Id: Ib80313004fc000e7127a9797af5afe9029c0cb45
parent 6656a552
......@@ -3039,6 +3039,7 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
}
#endif // CONFIG_REFERENCE_BUFFER
if (cm->frame_type == KEY_FRAME) {
cm->current_video_frame = 0;
#if !CONFIG_OBU
read_bitdepth_colorspace_sampling(cm, rb, pbi->allow_lowbitdepth);
#endif
......
......@@ -5283,6 +5283,9 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
!cpi->oxcf.disable_tempmv && !cm->cur_frame->intra_only;
#endif
// Reset the frame packet stamp index.
if (cm->frame_type == KEY_FRAME) cm->current_video_frame = 0;
// NOTE:
// (1) Move the setup of the ref_frame_flags upfront as it would be
// determined by the current frame properties;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment