#include <zlib.h>
#endif
#if CONFIG_LZMA
+#define LZMA_API_STATIC
#include <lzma.h>
#endif
}
dst = s->yuv_line;
stride = 0;
- width = s->width * s->subsampling[1] + 2*(s->width / s->subsampling[0]);
+
+ width = (s->width - 1) / s->subsampling[0] + 1;
+ width = width * s->subsampling[0] * s->subsampling[1] + 2*width;
av_assert0(width <= bytes_per_row);
av_assert0(s->bpp == 24);
}