Unified · Split
| @@ -4,7 +4,8 @@ · 3 unmodified lines | |||
| 4 | #include "third_party/googletest/src/include/gtest/gtest.h" | 4 | #include "third_party/googletest/src/include/gtest/gtest.h" |
| 5 | #include "vp9/simple_encode.h" | 5 | #include "vp9/simple_encode.h" |
| 6 | 6 | ||
| 7 | namespace { | 7 | namespace vp9 { |
| 8 | |||
| 8 | const int w = 352; | 9 | const int w = 352; |
| 9 | const int h = 288; | 10 | const int h = 288; |
| 10 | const int frame_rate_num = 30; | 11 | const int frame_rate_num = 30; |
| @@ -105,4 +106,4 @@ TEST(SimpleEncode, EncodeFrameWithQuantizeIndex) { · 94 unmodified lines | |||
| 105 | simple_encode.EndEncode(); | 106 | simple_encode.EndEncode(); |
| 106 | } | 107 | } |
| 107 | 108 | ||
| 108 | } // namespace | 109 | } // namespace vp9 |
| @@ -6,6 +6,8 @@ · 5 unmodified lines | |||
| 6 | #include "vp9/simple_encode.h" | 6 | #include "vp9/simple_encode.h" |
| 7 | #include "vp9/vp9_cx_iface.h" | 7 | #include "vp9/vp9_cx_iface.h" |
| 8 | 8 | ||
| 9 | namespace vp9 { | ||
| 10 | |||
| 9 | // TODO(angiebird): Merge this function with vpx_img_plane_width() | 11 | // TODO(angiebird): Merge this function with vpx_img_plane_width() |
| 10 | static int img_plane_width(const vpx_image_t *img, int plane) { | 12 | static int img_plane_width(const vpx_image_t *img, int plane) { |
| 11 | if (plane > 0 && img->x_chroma_shift > 0) | 13 | if (plane > 0 && img->x_chroma_shift > 0) |
| @@ -288,3 +290,5 @@ SimpleEncode::~SimpleEncode() { · 276 unmodified lines | |||
| 288 | fclose(this->file); | 290 | fclose(this->file); |
| 289 | } | 291 | } |
| 290 | } | 292 | } |
| 293 | |||
| 294 | } // namespace vp9 | ||
| @@ -13,6 +13,8 @@ · 12 unmodified lines | |||
| 13 | #include <memory> | 13 | #include <memory> |
| 14 | #include <vector> | 14 | #include <vector> |
| 15 | 15 | ||
| 16 | namespace vp9 { | ||
| 17 | |||
| 16 | enum FrameType { | 18 | enum FrameType { |
| 17 | kKeyFrame = 0, | 19 | kKeyFrame = 0, |
| 18 | kInterFrame, | 20 | kInterFrame, |
| @@ -41,7 +43,7 @@ class SimpleEncode { · 22 unmodified lines | |||
| 41 | SimpleEncode(SimpleEncode &&) = delete; | 43 | SimpleEncode(SimpleEncode &&) = delete; |
| 42 | SimpleEncode &operator=(SimpleEncode &&) = delete; | 44 | SimpleEncode &operator=(SimpleEncode &&) = delete; |
| 43 | 45 | ||
| 44 | // Make encoder compute the first pass stats and store it internally for | 46 | // Makes encoder compute the first pass stats and store it internally for |
| 45 | // future encode | 47 | // future encode |
| 46 | void ComputeFirstPassStats(); | 48 | void ComputeFirstPassStats(); |
| 47 | 49 | ||
| @@ -81,4 +83,6 @@ class SimpleEncode { · 33 unmodified lines | |||
| 81 | FILE *file; | 83 | FILE *file; |
| 82 | std::unique_ptr<impl> pimpl; | 84 | std::unique_ptr<impl> pimpl; |
| 83 | }; | 85 | }; |
| 86 | |||
| 87 | } // namespace vp9 | ||
| 84 | #endif // VPX_VP9_SIMPLE_ENCODE | 88 | #endif // VPX_VP9_SIMPLE_ENCODE |