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
38363836 if (gop_command->use) {
38373837 *coding_frame_count = gop_command_coding_frame_count(gop_command);
38383838 *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);
38403840 } else {
38413841 *coding_frame_count = vp9_get_gop_coding_frame_count(
38423842 &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
10091009 static GOP_COMMAND GetGopCommand(const std::vector<int> &gop_map,
10101010 int start_show_index) {
10111011 GOP_COMMAND gop_command;
1012− if (gop_map.size() > 0) {
1013− assert(static_cast<size_t>(start_show_index) < gop_map.size());
1012+ if (static_cast<size_t>(start_show_index) < gop_map.size()) {
10141013 assert((gop_map[start_show_index] & kGopMapFlagStart) != 0);
10151014 int end_show_index = start_show_index + 1;
10161015 // 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