}
static void IncreaseGroupOfPictureIndex(GroupOfPicture *group_of_picture) {
- ++group_of_picture->encode_frame_index;
+ ++group_of_picture->next_encode_frame_index;
}
static int IsGroupOfPictureFinished(const GroupOfPicture &group_of_picture) {
- return static_cast<size_t>(group_of_picture.encode_frame_index) ==
+ return static_cast<size_t>(group_of_picture.next_encode_frame_index) ==
group_of_picture.encode_frame_list.size();
}
GroupOfPicture *group_of_picture) {
// Clean up the state of previous group of picture.
group_of_picture->encode_frame_list.clear();
- group_of_picture->encode_frame_index = 0;
+ group_of_picture->next_encode_frame_index = 0;
group_of_picture->show_frame_count = coding_frame_count - use_alt_ref;
group_of_picture->start_show_index = first_show_idx;
{
EncodeFrameInfo SimpleEncode::GetNextEncodeFrameInfo() const {
return group_of_picture_
- .encode_frame_list[group_of_picture_.encode_frame_index];
+ .encode_frame_list[group_of_picture_.next_encode_frame_index];
}
void SimpleEncode::EncodeFrame(EncodeFrameResult *encode_frame_result) {
std::vector<EncodeFrameInfo> encode_frame_list;
// Indicates the index of the next coding frame in encode_frame_list.
// In other words, EncodeFrameInfo of the next coding frame can be
- // obtained with encode_frame_list[encode_frame_index].
- // Internally, encode_frame_index will be set to zero after the last frame of
- // the group of pictures is coded. Otherwise, encode_frame_index will be
- // increased after each EncodeFrame()/EncodeFrameWithQuantizeIndex() call.
- int encode_frame_index;
+ // obtained with encode_frame_list[next_encode_frame_index].
+ // Internally, next_encode_frame_index will be set to zero after the last
+ // frame of the group of pictures is coded. Otherwise, next_encode_frame_index
+ // will be increased after each EncodeFrame()/EncodeFrameWithQuantizeIndex()
+ // call.
+ int next_encode_frame_index;
// Number of show frames in this group of pictures.
int show_frame_count;
// The show index/timestamp of the earliest show frame in the group of