History

Fix flaky assertions in SimpleEncode

Bug: webm:1731

Angie Chiang committed 5 years ago

Commit a1fdfbb1 parent 33801372 files · +2 −3Browse files

Unified · Split

2 files
  1. vp9/encoder/vp9_firstpass.c +1 −1
  2. vp9/simple_encode.cc +1 −2
vp9/encoder/vp9_firstpass.c+1−1
@@ -3836,7 +3836,7 @@ void vp9_get_next_group_of_picture(const VP9_COMP *cpi, int *first_is_key_frame, · 3835 unmodified lines
3836 if (gop_command->use) {3836 if (gop_command->use) {
3837 *coding_frame_count = gop_command_coding_frame_count(gop_command);3837 *coding_frame_count = gop_command_coding_frame_count(gop_command);
3838 *use_alt_ref = gop_command->use_alt_ref;3838 *use_alt_ref = gop_command->use_alt_ref;
3839 assert(*coding_frame_count < rc.frames_to_key);3839 assert(gop_command->show_frame_count <= rc.frames_to_key);
3840 } else {3840 } else {
3841 *coding_frame_count = vp9_get_gop_coding_frame_count(3841 *coding_frame_count = vp9_get_gop_coding_frame_count(
3842 &cpi->oxcf, &cpi->twopass, &cpi->frame_info, &rc, *first_show_idx,3842 &cpi->oxcf, &cpi->twopass, &cpi->frame_info, &rc, *first_show_idx,
vp9/simple_encode.cc+1−2
@@ -1009,8 +1009,7 @@ T *GetVectorData(const std::vector<T> &v) { · 1008 unmodified lines
1009static GOP_COMMAND GetGopCommand(const std::vector<int> &gop_map,1009static GOP_COMMAND GetGopCommand(const std::vector<int> &gop_map,
1010 int start_show_index) {1010 int start_show_index) {
1011 GOP_COMMAND gop_command;1011 GOP_COMMAND gop_command;
1012 if (gop_map.size() > 0) {1012 if (static_cast<size_t>(start_show_index) < gop_map.size()) {
1013 assert(static_cast<size_t>(start_show_index) < gop_map.size());
1014 assert((gop_map[start_show_index] & kGopMapFlagStart) != 0);1013 assert((gop_map[start_show_index] & kGopMapFlagStart) != 0);
1015 int end_show_index = start_show_index + 1;1014 int end_show_index = start_show_index + 1;
1016 // gop_map[end_show_index] & kGopMapFlagStart == 0 means this is1015 // gop_map[end_show_index] & kGopMapFlagStart == 0 means this is

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