History

Use compute_arf_boost() in define_gf_group()

Remove reset_fpf_position() because compute_arf_boost does not count on twopass->stats_in

angiebird committed 7 years ago

Commit 10eefcc1 parent 3c055611 file · +10 −5Browse files

Unified · Split

vp9/encoder/vp9_firstpass.c+10−5
@@ -2694,8 +2694,16 @@ static void define_gf_group(VP9_COMP *cpi, int gf_start_show_idx) { · 2693 unmodified lines
26942694 b_frames, avg_inter_frame_qindex);
26952695 rc->source_alt_ref_pending = 1;
26962696 } else {
2697− reset_fpf_position(twopass, start_pos);
2698− rc->gfu_boost = VPXMIN(MAX_GF_BOOST, calc_arf_boost(cpi, (i - 1), 0));
2697+ const int f_frames = i - 1;
2698+ const int b_frames = 0;
2699+ const int avg_inter_frame_qindex = rc->avg_frame_qindex[INTER_FRAME];
2700+ // TODO(angiebird): figure out why arf's location is assigned this way
2701+ const int gld_show_idx =
2702+ VPXMIN(gf_start_show_idx + 1, fps_get_num_frames(first_pass_info));
2703+ const int arf_boost =
2704+ compute_arf_boost(frame_info, first_pass_info, gld_show_idx, f_frames,
2705+ b_frames, avg_inter_frame_qindex);
2706+ rc->gfu_boost = VPXMIN(MAX_GF_BOOST, arf_boost);
26992707 rc->source_alt_ref_pending = 0;
27002708 }
27012709
@@ -2740,9 +2748,6 @@ static void define_gf_group(VP9_COMP *cpi, int gf_start_show_idx) { · 38 unmodified lines
27402748
27412749 rc->baseline_gf_interval = i - rc->source_alt_ref_pending;
27422750
2743− // Reset the file position.
2744− reset_fpf_position(twopass, start_pos);
2745−
27462751 if (rc->source_alt_ref_pending)
27472752 is_alt_ref_flash = detect_flash(twopass, rc->baseline_gf_interval);
27482753

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t