History

Add namespace vp9

angiebird committed 7 years ago

Commit 38b63601 parent 9b79c513 files · +12 −3Browse files

Unified · Split

3 files
  1. test/simple_encode_test.cc +3 −2
  2. vp9/simple_encode.cc +4 −0
  3. vp9/simple_encode.h +5 −1
test/simple_encode_test.cc+3−2
@@ -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
7namespace {7namespace vp9 {
8
8const int w = 352;9const int w = 352;
9const int h = 288;10const int h = 288;
10const int frame_rate_num = 30;11const 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} // namespace109} // namespace vp9
vp9/simple_encode.cc+4−0
@@ -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
9namespace vp9 {
10
9// TODO(angiebird): Merge this function with vpx_img_plane_width()11// TODO(angiebird): Merge this function with vpx_img_plane_width()
10static int img_plane_width(const vpx_image_t *img, int plane) {12static 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
vp9/simple_encode.h+5−1
@@ -13,6 +13,8 @@ · 12 unmodified lines
13#include <memory>13#include <memory>
14#include <vector>14#include <vector>
15 15
16namespace vp9 {
17
16enum FrameType {18enum 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 for46 // Makes encoder compute the first pass stats and store it internally for
45 // future encode47 // 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_ENCODE88#endif // VPX_VP9_SIMPLE_ENCODE

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t