summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/simple_encode_test.cc4
-rw-r--r--vp9/simple_encode.cc7
-rw-r--r--vp9/simple_encode.h2
3 files changed, 8 insertions, 5 deletions
diff --git a/test/simple_encode_test.cc b/test/simple_encode_test.cc
index a85675133..69bed5a51 100644
--- a/test/simple_encode_test.cc
+++ b/test/simple_encode_test.cc
@@ -389,7 +389,7 @@ TEST_F(SimpleEncodeTest, EncodeConsistencySetExternalGroupOfPicturesMap) {
frame_rate_den_, target_bitrate_, num_frames_,
in_file_path_str_.c_str());
simple_encode.ComputeFirstPassStats();
- simple_encode.SetExternalGroupOfPicturesMap(gop_map);
+ simple_encode.SetExternalGroupOfPicturesMap(gop_map.data(), gop_map.size());
const int num_coding_frames = simple_encode.GetCodingFrameNum();
EXPECT_EQ(static_cast<size_t>(num_coding_frames),
quantize_index_list.size());
@@ -427,7 +427,7 @@ TEST_F(SimpleEncodeTest, SetExternalGroupOfPicturesMap) {
// Last gop group.
gop_map[14] |= kGopMapFlagStart | kGopMapFlagUseAltRef;
- simple_encode.SetExternalGroupOfPicturesMap(gop_map);
+ simple_encode.SetExternalGroupOfPicturesMap(gop_map.data(), gop_map.size());
std::vector<int> observed_gop_map =
simple_encode.ObserveExternalGroupOfPicturesMap();
diff --git a/vp9/simple_encode.cc b/vp9/simple_encode.cc
index bce52e28c..7bce91f7f 100644
--- a/vp9/simple_encode.cc
+++ b/vp9/simple_encode.cc
@@ -806,8 +806,11 @@ std::vector<std::vector<double>> SimpleEncode::ObserveFirstPassStats() {
return output_stats;
}
-void SimpleEncode::SetExternalGroupOfPicturesMap(std::vector<int> gop_map) {
- gop_map_ = gop_map;
+void SimpleEncode::SetExternalGroupOfPicturesMap(int *gop_map,
+ int gop_map_size) {
+ for (int i = 0; i < gop_map_size; ++i) {
+ gop_map_.push_back(gop_map[i]);
+ }
// The following will check and modify gop_map_ to make sure the
// gop_map_ satisfies the constraints.
// 1) Each key frame position should be at the start of a gop.
diff --git a/vp9/simple_encode.h b/vp9/simple_encode.h
index d7c9dfa14..b21732070 100644
--- a/vp9/simple_encode.h
+++ b/vp9/simple_encode.h
@@ -335,7 +335,7 @@ class SimpleEncode {
// constraints.
// 1) Each key frame position should be at the start of a gop.
// 2) The last gop should not use an alt ref.
- void SetExternalGroupOfPicturesMap(std::vector<int> gop_map);
+ void SetExternalGroupOfPicturesMap(int *gop_map, int gop_map_size);
// Observe the group of pictures map set through
// SetExternalGroupOfPicturesMap(). This function should be called after