Fix to golden update in cyclic_refresh.
For one pass CBR: only check for updating refresh_golden if ext_refresh_frame_flags_pending is not set (i.e., == 0). And move the resetting of ext_refresh_frame_flags_pending = 0 down to after the encode_loop (and account for dropped frames). This is to prevent changing refresh_golden flga when the user supplies the reference/update flags. Change-Id: I4d87b3e705ba43f243667e367503b585c61e2a54
This commit is contained in:
parent
6201a256f4
commit
bc0a974310
@ -3270,6 +3270,7 @@ static void encode_without_recode_loop(VP9_COMP *cpi,
|
||||
if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ &&
|
||||
cm->frame_type != KEY_FRAME &&
|
||||
!cpi->use_svc &&
|
||||
cpi->ext_refresh_frame_flags_pending == 0 &&
|
||||
(cpi->oxcf.pass == 0 && cpi->oxcf.rc_mode == VPX_CBR))
|
||||
vp9_cyclic_refresh_check_golden_update(cpi);
|
||||
|
||||
@ -3578,7 +3579,6 @@ static void set_ext_overrides(VP9_COMP *cpi) {
|
||||
cpi->refresh_last_frame = cpi->ext_refresh_last_frame;
|
||||
cpi->refresh_golden_frame = cpi->ext_refresh_golden_frame;
|
||||
cpi->refresh_alt_ref_frame = cpi->ext_refresh_alt_ref_frame;
|
||||
cpi->ext_refresh_frame_flags_pending = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3747,6 +3747,7 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
|
||||
if (vp9_rc_drop_frame(cpi)) {
|
||||
vp9_rc_postencode_update_drop_frame(cpi);
|
||||
++cm->current_video_frame;
|
||||
cpi->ext_refresh_frame_flags_pending = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -3828,6 +3829,8 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
|
||||
}
|
||||
}
|
||||
|
||||
cpi->ext_refresh_frame_flags_pending = 0;
|
||||
|
||||
if (cpi->refresh_golden_frame == 1)
|
||||
cpi->frame_flags |= FRAMEFLAGS_GOLDEN;
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user