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

Unified Diff: media/filters/vpx_video_decoder.cc

Issue 92073002: media: Handling YV12 odd height/width in vpx_video_decoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, addressing comments Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/pipeline_integration_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/vpx_video_decoder.cc
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc
index bd9a722e9a0423e92f59b94ca6ef763f8fcbd376..c8017264976ef40a491bf98883feffe4e5376e40 100644
--- a/media/filters/vpx_video_decoder.cc
+++ b/media/filters/vpx_video_decoder.cc
@@ -337,8 +337,6 @@ void VpxVideoDecoder::CopyVpxImageTo(const vpx_image* vpx_image,
const struct vpx_image* vpx_image_alpha,
scoped_refptr<VideoFrame>* video_frame) {
CHECK(vpx_image);
- CHECK_EQ(vpx_image->d_w % 2, 0U);
- CHECK_EQ(vpx_image->d_h % 2, 0U);
CHECK(vpx_image->fmt == VPX_IMG_FMT_I420 ||
vpx_image->fmt == VPX_IMG_FMT_YV12);
@@ -357,11 +355,11 @@ void VpxVideoDecoder::CopyVpxImageTo(const vpx_image* vpx_image,
video_frame->get());
CopyUPlane(vpx_image->planes[VPX_PLANE_U],
vpx_image->stride[VPX_PLANE_U],
- vpx_image->d_h / 2,
+ (vpx_image->d_h + 1) / 2,
video_frame->get());
CopyVPlane(vpx_image->planes[VPX_PLANE_V],
vpx_image->stride[VPX_PLANE_V],
- vpx_image->d_h / 2,
+ (vpx_image->d_h + 1) / 2,
video_frame->get());
if (!vpx_codec_alpha_)
return;
« no previous file with comments | « media/filters/pipeline_integration_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698