Commit 4fc8e349 authored by stefano's avatar stefano

Fix width computation for nv12/nv21 in ff_get_plane_bytewidth().

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23507 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e3a5230a
......@@ -948,7 +948,8 @@ int ff_get_plane_bytewidth(enum PixelFormat pix_fmt, int width, int plane)
return (width * bits + 7) >> 3;
break;
case FF_PIXEL_PLANAR:
if (plane == 1 || plane == 2)
if ((pix_fmt != PIX_FMT_NV12 && pix_fmt != PIX_FMT_NV21) &&
(plane == 1 || plane == 2))
width= -((-width)>>desc->log2_chroma_w);
return (width * pf->depth + 7) >> 3;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment