Delete dead code VP8EncoderImpl::UpdateCodecFrameSize.

BUG=webrtc:7349

Review-Url: https://codereview.webrtc.org/2855473006
Cr-Commit-Position: refs/heads/master@{#17969}
This commit is contained in:
brandtr
2017-05-02 02:21:17 -07:00
committed by Commit bot
parent bf2c049a12
commit fc31a43e36
2 changed files with 1 additions and 34 deletions

View File

@ -648,9 +648,7 @@ int VP8EncoderImpl::Encode(const VideoFrame& frame,
rtc::scoped_refptr<VideoFrameBuffer> input_image = frame.video_frame_buffer();
// Since we are extracting raw pointers from |input_image| to
// |raw_images_[0]|, the resolution of these frames must match. Note that
// |input_image| might be scaled from |frame|. In that case, the resolution of
// |raw_images_[0]| should have been updated in UpdateCodecFrameSize.
// |raw_images_[0]|, the resolution of these frames must match.
RTC_DCHECK_EQ(input_image->width(), raw_images_[0].d_w);
RTC_DCHECK_EQ(input_image->height(), raw_images_[0].d_h);
@ -769,34 +767,6 @@ int VP8EncoderImpl::Encode(const VideoFrame& frame,
return GetEncodedPartitions(frame);
}
// TODO(pbos): Make sure this works for properly for >1 encoders.
int VP8EncoderImpl::UpdateCodecFrameSize(int width, int height) {
codec_.width = width;
codec_.height = height;
if (codec_.numberOfSimulcastStreams <= 1) {
// For now scaling is only used for single-layer streams.
codec_.simulcastStream[0].width = width;
codec_.simulcastStream[0].height = height;
}
// Update the cpu_speed setting for resolution change.
vpx_codec_control(&(encoders_[0]), VP8E_SET_CPUUSED,
SetCpuSpeed(codec_.width, codec_.height));
raw_images_[0].w = codec_.width;
raw_images_[0].h = codec_.height;
raw_images_[0].d_w = codec_.width;
raw_images_[0].d_h = codec_.height;
vpx_img_set_rect(&raw_images_[0], 0, 0, codec_.width, codec_.height);
// Update encoder context for new frame size.
// Change of frame size will automatically trigger a key frame.
configurations_[0].g_w = codec_.width;
configurations_[0].g_h = codec_.height;
if (vpx_codec_enc_config_set(&encoders_[0], &configurations_[0])) {
return WEBRTC_VIDEO_CODEC_ERROR;
}
return WEBRTC_VIDEO_CODEC_OK;
}
void VP8EncoderImpl::PopulateCodecSpecific(
CodecSpecificInfo* codec_specific,
const vpx_codec_cx_pkt_t& pkt,

View File

@ -75,9 +75,6 @@ class VP8EncoderImpl : public VP8Encoder {
// Call encoder initialize function and set control settings.
int InitAndSetControlSettings();
// Update frame size for codec.
int UpdateCodecFrameSize(int width, int height);
void PopulateCodecSpecific(CodecSpecificInfo* codec_specific,
const vpx_codec_cx_pkt& pkt,
int stream_idx,