shithub: libvpx

Download patch

ref: 38b636094b304cd867ee3cd0ebf20bd9ef80c271
parent: 9b79c51b02c05b592d7baa2d769acc213f62bf2e
author: angiebird <[email protected]>
date: Thu Nov 14 07:35:13 EST 2019

Add namespace vp9

Change-Id: I29d05557becbfc5d55d1cd1bb709e519d27c928b

--- 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 @@
   simple_encode.EndEncode();
 }
 
-}  // namespace
+}  // namespace vp9
--- 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 @@
     fclose(this->file);
   }
 }
+
+}  // namespace vp9
--- a/vp9/simple_encode.h
+++ b/vp9/simple_encode.h
@@ -13,6 +13,8 @@
 #include <memory>
 #include <vector>
 
+namespace vp9 {
+
 enum FrameType {
   kKeyFrame = 0,
   kInterFrame,
@@ -41,7 +43,7 @@
   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 @@
   FILE *file;
   std::unique_ptr<impl> pimpl;
 };
+
+}  // namespace vp9
 #endif  // VPX_VP9_SIMPLE_ENCODE