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

Side by Side Diff: webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.h

Issue 2398963003: Move usage of QualityScaler to ViEEncoder. (Closed)
Patch Set: rebase Created 4 years 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 */ 10 */
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 uint32_t framerate) override; 48 uint32_t framerate) override;
49 49
50 // The result of encoding - an EncodedImage and RTPFragmentationHeader - are 50 // The result of encoding - an EncodedImage and RTPFragmentationHeader - are
51 // passed to the encode complete callback. 51 // passed to the encode complete callback.
52 int32_t Encode(const VideoFrame& frame, 52 int32_t Encode(const VideoFrame& frame,
53 const CodecSpecificInfo* codec_specific_info, 53 const CodecSpecificInfo* codec_specific_info,
54 const std::vector<FrameType>* frame_types) override; 54 const std::vector<FrameType>* frame_types) override;
55 55
56 const char* ImplementationName() const override; 56 const char* ImplementationName() const override;
57 57
58 VideoEncoder::ScalingSettings GetScalingSettings() const override;
59
58 // Unsupported / Do nothing. 60 // Unsupported / Do nothing.
59 int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; 61 int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override;
60 int32_t SetPeriodicKeyFrames(bool enable) override; 62 int32_t SetPeriodicKeyFrames(bool enable) override;
61 void OnDroppedFrame() override;
62 63
63 private: 64 private:
64 bool IsInitialized() const; 65 bool IsInitialized() const;
65 SEncParamExt CreateEncoderParams() const; 66 SEncParamExt CreateEncoderParams() const;
66 67
67 webrtc::H264BitstreamParser h264_bitstream_parser_; 68 webrtc::H264BitstreamParser h264_bitstream_parser_;
68 QualityScaler quality_scaler_;
69 // Reports statistics with histograms. 69 // Reports statistics with histograms.
70 void ReportInit(); 70 void ReportInit();
71 void ReportError(); 71 void ReportError();
72 72
73 ISVCEncoder* openh264_encoder_; 73 ISVCEncoder* openh264_encoder_;
74 // Settings that are used by this encoder. 74 // Settings that are used by this encoder.
75 int width_; 75 int width_;
76 int height_; 76 int height_;
77 float max_frame_rate_; 77 float max_frame_rate_;
78 uint32_t target_bps_; 78 uint32_t target_bps_;
79 uint32_t max_bps_; 79 uint32_t max_bps_;
80 VideoCodecMode mode_; 80 VideoCodecMode mode_;
81 // H.264 specifc parameters 81 // H.264 specifc parameters
82 bool frame_dropping_on_; 82 bool frame_dropping_on_;
83 int key_frame_interval_; 83 int key_frame_interval_;
84 84
85 int32_t number_of_cores_; 85 int32_t number_of_cores_;
86 86
87 EncodedImage encoded_image_; 87 EncodedImage encoded_image_;
88 std::unique_ptr<uint8_t[]> encoded_image_buffer_; 88 std::unique_ptr<uint8_t[]> encoded_image_buffer_;
89 EncodedImageCallback* encoded_image_callback_; 89 EncodedImageCallback* encoded_image_callback_;
90 90
91 bool has_reported_init_; 91 bool has_reported_init_;
92 bool has_reported_error_; 92 bool has_reported_error_;
93 }; 93 };
94 94
95 } // namespace webrtc 95 } // namespace webrtc
96 96
97 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_ENCODER_IMPL_H_ 97 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_ENCODER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698