Try to fix problems with YUV422P10LE.
authorCarl Hetherington <cth@carlh.net>
Wed, 17 Oct 2012 14:06:49 +0000 (15:06 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 17 Oct 2012 14:06:49 +0000 (15:06 +0100)
src/lib/image.cc

index 06b98c4d3dc8f877c5c0042dd802d466eb34fb87..ab9159d5e42a21a83e90e7ee81a02807c63dfa2f 100644 (file)
@@ -310,11 +310,14 @@ SimpleImage::SimpleImage (PixelFormat p, Size s, function<int (int)> rounder)
                _line_size[0] = s.width * 4;
                break;
        case PIX_FMT_YUV420P:
-       case PIX_FMT_YUV422P10LE:
                _line_size[0] = s.width;
                _line_size[1] = s.width / 2;
                _line_size[2] = s.width / 2;
                break;
+       case PIX_FMT_YUV422P10LE:
+               _line_size[0] = s.width * 2;
+               _line_size[1] = s.width;
+               _line_size[2] = s.width;
        default:
                assert (false);
        }