Remove rule that discourages passing optional by const reference
include example to demonstrate: (subjectively) increased readability (objectively) decreased binary size Bug: None Change-Id: I970e668af98d98725b2d527f44169a8b7c9d2338 Reviewed-on: https://webrtc-review.googlesource.com/c/121420 Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Johannes Kron <kron@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26545}
This commit is contained in:
committed by
Commit Bot
parent
681de2036b
commit
b769894025
@ -1480,11 +1480,12 @@ int VP9DecoderImpl::Decode(const EncodedImage& input_image,
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
int VP9DecoderImpl::ReturnFrame(const vpx_image_t* img,
|
||||
uint32_t timestamp,
|
||||
int64_t ntp_time_ms,
|
||||
int qp,
|
||||
const ColorSpace* explicit_color_space) {
|
||||
int VP9DecoderImpl::ReturnFrame(
|
||||
const vpx_image_t* img,
|
||||
uint32_t timestamp,
|
||||
int64_t ntp_time_ms,
|
||||
int qp,
|
||||
const webrtc::ColorSpace* explicit_color_space) {
|
||||
if (img == nullptr) {
|
||||
// Decoder OK and nullptr image => No show frame.
|
||||
return WEBRTC_VIDEO_CODEC_NO_OUTPUT;
|
||||
@ -1533,7 +1534,7 @@ int VP9DecoderImpl::ReturnFrame(const vpx_image_t* img,
|
||||
.set_ntp_time_ms(ntp_time_ms)
|
||||
.set_rotation(webrtc::kVideoRotation_0);
|
||||
if (explicit_color_space) {
|
||||
builder.set_color_space(explicit_color_space);
|
||||
builder.set_color_space(*explicit_color_space);
|
||||
} else {
|
||||
builder.set_color_space(
|
||||
ExtractVP9ColorSpace(img->cs, img->range, img->bit_depth));
|
||||
|
||||
Reference in New Issue
Block a user