VpxVideoDecoder: Set coded width to vpx_image stored width
When we wrap a vpx_image into a media::VideoFrame we currently set the
coded_size to the vpx_image displayed resolution (d_w/d_h) instead of
the stored resolution (w/h). This CL updates the coded_size to use the
stored width instead. This makes the stride of the frame equal to the
coded width. This is advantageous because some functions require packed
memory, and if it's not packed already, we need to copy to an
intermediate packed frame.
The specific problem I'm trying to solve with this CL is the frame copy
we do in VideoResourceUpdater::CreateForSoftwarePlanes. It's calling
ResourceProvider::CopyToResource which in turns call
GLES2Interface::TexSubImage2D which requires a packed frame. So this CL
will in fact remove one frame copy per frame for e.g. YouTube. The frame
copy in question is a regression and was introduced two weeks ago in
this CL: https://codereview.chromium.org/
935383004/. We currently do two
frame copies within system memory before uploading to the GPU, and
previously we only did one.
Review URL: https://codereview.chromium.org/
984623002
Cr-Commit-Position: refs/heads/master@{#323107}