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

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.mm

Issue 2499003002: H264 encoder: Include QP information in encoded images (Closed)
Patch Set: Set QP for HW encoders as well. Created 4 years, 1 month 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
« no previous file with comments | « webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 is_keyframe ? webrtc::kVideoFrameKey : webrtc::kVideoFrameDelta; 639 is_keyframe ? webrtc::kVideoFrameKey : webrtc::kVideoFrameDelta;
640 frame.capture_time_ms_ = render_time_ms; 640 frame.capture_time_ms_ = render_time_ms;
641 frame._timeStamp = timestamp; 641 frame._timeStamp = timestamp;
642 frame.rotation_ = rotation; 642 frame.rotation_ = rotation;
643 643
644 h264_bitstream_parser_.ParseBitstream(buffer->data(), buffer->size()); 644 h264_bitstream_parser_.ParseBitstream(buffer->data(), buffer->size());
645 int qp; 645 int qp;
646 if (h264_bitstream_parser_.GetLastSliceQp(&qp)) { 646 if (h264_bitstream_parser_.GetLastSliceQp(&qp)) {
647 rtc::CritScope lock(&quality_scaler_crit_); 647 rtc::CritScope lock(&quality_scaler_crit_);
648 quality_scaler_.ReportQP(qp); 648 quality_scaler_.ReportQP(qp);
649 frame.qp_ = qp;
649 } 650 }
650 651
651 EncodedImageCallback::Result result = 652 EncodedImageCallback::Result result =
652 callback_->OnEncodedImage(frame, &codec_specific_info, header.get()); 653 callback_->OnEncodedImage(frame, &codec_specific_info, header.get());
653 if (result.error != EncodedImageCallback::Result::OK) { 654 if (result.error != EncodedImageCallback::Result::OK) {
654 LOG(LS_ERROR) << "Encode callback failed: " << result.error; 655 LOG(LS_ERROR) << "Encode callback failed: " << result.error;
655 return; 656 return;
656 } 657 }
657 bitrate_adjuster_.Update(frame._size); 658 bitrate_adjuster_.Update(frame._size);
658 } 659 }
659 660
660 } // namespace webrtc 661 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698