From 38b636094b304cd867ee3cd0ebf20bd9ef80c271 Mon Sep 17 00:00:00 2001 From: angiebird Date: Thu, 14 Nov 2019 12:35:13 -0800 Subject: [PATCH] Add namespace vp9 Change-Id: I29d05557becbfc5d55d1cd1bb709e519d27c928b --- test/simple_encode_test.cc | 5 +++-- vp9/simple_encode.cc | 4 ++++ vp9/simple_encode.h | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/test/simple_encode_test.cc b/test/simple_encode_test.cc index 765ea0428..58cfc4b29 100644 --- a/test/simple_encode_test.cc +++ b/test/simple_encode_test.cc @@ -4,7 +4,8 @@ #include "third_party/googletest/src/include/gtest/gtest.h" #include "vp9/simple_encode.h" -namespace { +namespace vp9 { + const int w = 352; const int h = 288; const int frame_rate_num = 30; @@ -105,4 +106,4 @@ TEST(SimpleEncode, EncodeFrameWithQuantizeIndex) { simple_encode.EndEncode(); } -} // namespace +} // namespace vp9 diff --git a/vp9/simple_encode.cc b/vp9/simple_encode.cc index 444fb2c73..20a4567df 100644 --- a/vp9/simple_encode.cc +++ b/vp9/simple_encode.cc @@ -6,6 +6,8 @@ #include "vp9/simple_encode.h" #include "vp9/vp9_cx_iface.h" +namespace vp9 { + // TODO(angiebird): Merge this function with vpx_img_plane_width() static int img_plane_width(const vpx_image_t *img, int plane) { if (plane > 0 && img->x_chroma_shift > 0) @@ -288,3 +290,5 @@ SimpleEncode::~SimpleEncode() { fclose(this->file); } } + +} // namespace vp9 diff --git a/vp9/simple_encode.h b/vp9/simple_encode.h index e4b107c0a..42048be62 100644 --- a/vp9/simple_encode.h +++ b/vp9/simple_encode.h @@ -13,6 +13,8 @@ #include #include +namespace vp9 { + enum FrameType { kKeyFrame = 0, kInterFrame, @@ -41,7 +43,7 @@ class SimpleEncode { SimpleEncode(SimpleEncode &&) = delete; SimpleEncode &operator=(SimpleEncode &&) = delete; - // Make encoder compute the first pass stats and store it internally for + // Makes encoder compute the first pass stats and store it internally for // future encode void ComputeFirstPassStats(); @@ -81,4 +83,6 @@ class SimpleEncode { FILE *file; std::unique_ptr pimpl; }; + +} // namespace vp9 #endif // VPX_VP9_SIMPLE_ENCODE -- 2.40.0