Reland "Set actual resolution for coded frame in VP9 enc wrapper."

This is a reland of 4e53a0f384f46816a56f7d1aa9811e87b9c367d9.

Original change's description:
> Set actual resolution for coded frame in VP9 enc wrapper.
>
> This fix the mismatch of resolution VP9 wrapper set for coded frame with
> its actual resolution.
>
> Bug: webm:1485, webrtc:5749
> Change-Id: Ie1225d8f3a3d00e66229a1a79858d0a89b3d5fae
> Reviewed-on: https://webrtc-review.googlesource.com/46040
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21819}

TBR=brandtr@webrtc.org,asapersson@webrtc.org

Bug: webm:1485, webrtc:5749
Change-Id: I63124b45af678dc66f693fda96e1f347fdbc0ef1
Reviewed-on: https://webrtc-review.googlesource.com/46621
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21838}
This commit is contained in:
Sergey Silkin
2018-02-01 10:43:49 +01:00
committed by Commit Bot
parent 3587b8302a
commit 956b3068ba
2 changed files with 5 additions and 2 deletions

View File

@ -716,8 +716,10 @@ int VP9EncoderImpl::GetEncodedLayerFrame(const vpx_codec_cx_pkt* pkt) {
encoded_image_.content_type_ = (codec_.mode == kScreensharing)
? VideoContentType::SCREENSHARE
: VideoContentType::UNSPECIFIED;
encoded_image_._encodedHeight = raw_->d_h;
encoded_image_._encodedWidth = raw_->d_w;
encoded_image_._encodedHeight =
pkt->data.frame.height[layer_id.spatial_layer_id];
encoded_image_._encodedWidth =
pkt->data.frame.width[layer_id.spatial_layer_id];
encoded_image_.timing_.flags = TimingFrameFlags::kInvalid;
int qp = -1;
vpx_codec_control(encoder_, VP8E_GET_LAST_QUANTIZER, &qp);