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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/vp8_impl.h

Issue 2849723002: Extract TL config to VP8 libvpx flag conversion. (Closed)
Patch Set: rebase return type Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 * 9 *
10 * WEBRTC VP8 wrapper interface 10 * WEBRTC VP8 wrapper interface
11 */ 11 */
12 12
13 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ 13 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_
14 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ 14 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_
15 15
16 #include <memory> 16 #include <memory>
17 #include <vector> 17 #include <vector>
18 18
19 // NOTE: This include order must remain to avoid compile errors, even though 19 // NOTE: This include order must remain to avoid compile errors, even though
20 // it breaks the style guide. 20 // it breaks the style guide.
21 #include "vpx/vpx_encoder.h" 21 #include "vpx/vpx_encoder.h"
22 #include "vpx/vpx_decoder.h" 22 #include "vpx/vpx_decoder.h"
23 #include "vpx/vp8cx.h" 23 #include "vpx/vp8cx.h"
24 #include "vpx/vp8dx.h" 24 #include "vpx/vp8dx.h"
25 25
26 #include "webrtc/api/video/video_frame.h" 26 #include "webrtc/api/video/video_frame.h"
27 #include "webrtc/common_video/include/i420_buffer_pool.h" 27 #include "webrtc/common_video/include/i420_buffer_pool.h"
28 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
29 #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
28 #include "webrtc/modules/video_coding/include/video_codec_interface.h" 30 #include "webrtc/modules/video_coding/include/video_codec_interface.h"
29 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
30 #include "webrtc/modules/video_coding/utility/quality_scaler.h" 31 #include "webrtc/modules/video_coding/utility/quality_scaler.h"
31 #include "webrtc/video_frame.h" 32 #include "webrtc/video_frame.h"
32 33
33 namespace webrtc { 34 namespace webrtc {
34 35
35 class TemporalLayers; 36 class TemporalLayers;
36 37
37 class VP8EncoderImpl : public VP8Encoder { 38 class VP8EncoderImpl : public VP8Encoder {
38 public: 39 public:
39 VP8EncoderImpl(); 40 VP8EncoderImpl();
(...skipping 14 matching lines...) Expand all
54 55
55 int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; 56 int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override;
56 57
57 int SetRateAllocation(const BitrateAllocation& bitrate, 58 int SetRateAllocation(const BitrateAllocation& bitrate,
58 uint32_t new_framerate) override; 59 uint32_t new_framerate) override;
59 60
60 ScalingSettings GetScalingSettings() const override; 61 ScalingSettings GetScalingSettings() const override;
61 62
62 const char* ImplementationName() const override; 63 const char* ImplementationName() const override;
63 64
65 static vpx_enc_frame_flags_t EncodeFlags(TemporalReferences references);
66
64 private: 67 private:
65 void SetupTemporalLayers(int num_streams, 68 void SetupTemporalLayers(int num_streams,
66 int num_temporal_layers, 69 int num_temporal_layers,
67 const VideoCodec& codec); 70 const VideoCodec& codec);
68 71
69 // Set the cpu_speed setting for encoder based on resolution and/or platform. 72 // Set the cpu_speed setting for encoder based on resolution and/or platform.
70 int SetCpuSpeed(int width, int height); 73 int SetCpuSpeed(int width, int height);
71 74
72 // Determine number of encoder threads to use. 75 // Determine number of encoder threads to use.
73 int NumberOfThreads(int width, int height, int number_of_cores); 76 int NumberOfThreads(int width, int height, int number_of_cores);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 bool inited_; 145 bool inited_;
143 vpx_codec_ctx_t* decoder_; 146 vpx_codec_ctx_t* decoder_;
144 int propagation_cnt_; 147 int propagation_cnt_;
145 int last_frame_width_; 148 int last_frame_width_;
146 int last_frame_height_; 149 int last_frame_height_;
147 bool key_frame_required_; 150 bool key_frame_required_;
148 }; 151 };
149 } // namespace webrtc 152 } // namespace webrtc
150 153
151 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ 154 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/temporal_layers.h ('k') | webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698