From: angiebird Date: Thu, 14 Nov 2019 20:35:13 +0000 (-0800) Subject: Add namespace vp9 X-Git-Tag: v1.8.2~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=38b636094b304cd867ee3cd0ebf20bd9ef80c271;p=libvpx Add namespace vp9 Change-Id: I29d05557becbfc5d55d1cd1bb709e519d27c928b --- 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