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

Unified Diff: remoting/codec/video_encoder_vpx.h

Issue 261753013: Implement VP9/I444 encode support in the Chromoting host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CreateVP9Codec bug and unit-test build. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/codec/video_decoder_vpx_unittest.cc ('k') | remoting/codec/video_encoder_vpx.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/codec/video_encoder_vpx.h
diff --git a/remoting/codec/video_encoder_vpx.h b/remoting/codec/video_encoder_vpx.h
index dd7fb2ee516c4eff1445972ed4e83b2f039a57b7..8a8d68be642b8999c66cf3c6fbf8a0febb609cb9 100644
--- a/remoting/codec/video_encoder_vpx.h
+++ b/remoting/codec/video_encoder_vpx.h
@@ -23,7 +23,8 @@ class VideoEncoderVpx : public VideoEncoder {
public:
// Create encoder for the specified protocol.
static scoped_ptr<VideoEncoderVpx> CreateForVP8();
- static scoped_ptr<VideoEncoderVpx> CreateForVP9();
+ static scoped_ptr<VideoEncoderVpx> CreateForVP9I420();
+ static scoped_ptr<VideoEncoderVpx> CreateForVP9I444();
virtual ~VideoEncoderVpx();
@@ -33,9 +34,14 @@ class VideoEncoderVpx : public VideoEncoder {
private:
typedef base::Callback<ScopedVpxCodec(const webrtc::DesktopSize&)>
- InitializeCodecCallback;
+ CreateCodecCallback;
+ typedef base::Callback<void(const webrtc::DesktopSize&,
+ scoped_ptr<vpx_image_t>* out_image,
+ scoped_ptr<uint8[]>* out_image_buffer)>
+ CreateImageCallback;
- VideoEncoderVpx(const InitializeCodecCallback& init_codec);
+ VideoEncoderVpx(const CreateCodecCallback& create_codec,
+ const CreateImageCallback& create_image);
// Initializes the codec for frames of |size|. Returns true if successful.
bool Initialize(const webrtc::DesktopSize& size);
@@ -49,17 +55,20 @@ class VideoEncoderVpx : public VideoEncoder {
// given to the encoder to speed up encoding.
void PrepareActiveMap(const webrtc::DesktopRegion& updated_region);
- InitializeCodecCallback init_codec_;
+ CreateCodecCallback create_codec_;
+ CreateImageCallback create_image_;
ScopedVpxCodec codec_;
+ base::TimeTicks timestamp_base_;
+
+ // VPX image and buffer to hold the actual YUV planes.
scoped_ptr<vpx_image_t> image_;
+ scoped_ptr<uint8[]> image_buffer_;
+
+ // Active map used to optimize out processing of un-changed macroblocks.
scoped_ptr<uint8[]> active_map_;
int active_map_width_;
int active_map_height_;
- base::TimeTicks timestamp_base_;
-
- // Buffer for storing the yuv image.
- scoped_ptr<uint8[]> yuv_image_;
DISALLOW_COPY_AND_ASSIGN(VideoEncoderVpx);
};
« no previous file with comments | « remoting/codec/video_decoder_vpx_unittest.cc ('k') | remoting/codec/video_encoder_vpx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698