changeset 10383:3e26c8528a6b libavcodec

100l in avpicture_layout: width of chroma planes depends on format depth, too. Fixes issue 1465
author reimar
date Sun, 11 Oct 2009 07:05:26 +0000
parents d4d925400ba2
children c44205b868dc
files imgconvert.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/imgconvert.c	Sun Oct 11 05:36:59 2009 +0000
+++ b/imgconvert.c	Sun Oct 11 07:05:26 2009 +0000
@@ -897,7 +897,7 @@
 
     for (i=0; i<data_planes; i++) {
          if (i == 1) {
-             w = width >> pf->x_chroma_shift;
+             w = ((width >> pf->x_chroma_shift) * pf->depth + 7) / 8;
              h = height >> pf->y_chroma_shift;
          } else if (i == 3) {
              w = ow;