Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: remoting/codec/video_encoder_vpx.h

Issue 1150163002: Update VideoFramePump to pass un-changed frames to encoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_CODEC_VIDEO_ENCODER_VPX_H_ 5 #ifndef REMOTING_CODEC_VIDEO_ENCODER_VPX_H_
6 #define REMOTING_CODEC_VIDEO_ENCODER_VPX_H_ 6 #define REMOTING_CODEC_VIDEO_ENCODER_VPX_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "remoting/codec/scoped_vpx_codec.h" 10 #include "remoting/codec/scoped_vpx_codec.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Adds areas changed in the most recent frame to |updated_region|. This 52 // Adds areas changed in the most recent frame to |updated_region|. This
53 // includes both content changes and areas enhanced by cyclic refresh. 53 // includes both content changes and areas enhanced by cyclic refresh.
54 void UpdateRegionFromActiveMap(webrtc::DesktopRegion* updated_region); 54 void UpdateRegionFromActiveMap(webrtc::DesktopRegion* updated_region);
55 55
56 // True if the encoder is for VP9, false for VP8. 56 // True if the encoder is for VP9, false for VP8.
57 const bool use_vp9_; 57 const bool use_vp9_;
58 58
59 // Options controlling VP9 encode quantization and color space. 59 // Options controlling VP9 encode quantization and color space.
60 // These are always off (false) for VP8. 60 // These are always off (false) for VP8.
61 bool lossless_encode_; 61 bool lossless_encode_ = false;
62 bool lossless_color_; 62 bool lossless_color_ = false;
63 63
64 // Holds the initialized & configured codec. 64 // Holds the initialized & configured codec.
65 ScopedVpxCodec codec_; 65 ScopedVpxCodec codec_;
66 66
67 // Used to generate zero-based frame timestamps. 67 // Used to generate zero-based frame timestamps.
68 base::TimeTicks timestamp_base_; 68 base::TimeTicks timestamp_base_;
69 69
70 // VPX image and buffer to hold the actual YUV planes. 70 // VPX image and buffer to hold the actual YUV planes.
71 scoped_ptr<vpx_image_t> image_; 71 scoped_ptr<vpx_image_t> image_;
72 scoped_ptr<uint8[]> image_buffer_; 72 scoped_ptr<uint8[]> image_buffer_;
73 73
74 // Active map used to optimize out processing of un-changed macroblocks. 74 // Active map used to optimize out processing of un-changed macroblocks.
75 scoped_ptr<uint8[]> active_map_; 75 scoped_ptr<uint8[]> active_map_;
76 int active_map_width_; 76 int active_map_width_ = 0;
77 int active_map_height_; 77 int active_map_height_ = 0;
78
79 // Number of "top-off" frames we've encoded since we were last passed a
80 // frame containing an actual change. Used only when encoding with top-off.
81 int topoff_frame_count_ = 0;
78 82
79 // Used to help initialize VideoPackets from DesktopFrames. 83 // Used to help initialize VideoPackets from DesktopFrames.
80 VideoEncoderHelper helper_; 84 VideoEncoderHelper helper_;
81 85
82 DISALLOW_COPY_AND_ASSIGN(VideoEncoderVpx); 86 DISALLOW_COPY_AND_ASSIGN(VideoEncoderVpx);
83 }; 87 };
84 88
85 } // namespace remoting 89 } // namespace remoting
86 90
87 #endif // REMOTING_CODEC_VIDEO_ENCODER_VP8_H_ 91 #endif // REMOTING_CODEC_VIDEO_ENCODER_VP8_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698