aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-09-03 12:24:36 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-09-03 14:14:06 +0200
commitb4d7c1f84b0229b481ce16302ff1a5fe879ec940 (patch)
tree76c4979ac4e23de20bb40146fe6369b3fdcf45b8
parente57d99dd4e0d8fe2992da0d65b563580e35ce728 (diff)
downloadffmpeg-b4d7c1f84b0229b481ce16302ff1a5fe879ec940.tar.gz
swscale/swscale_unscaled: Try to fix bayer_to_yv12_wrapper() with slices
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libswscale/swscale_unscaled.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index b5f8a39922..716c386eab 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -1080,7 +1080,7 @@ static int rgbToPlanarRgbWrapper(SwsContext *c, const uint8_t *src[],
static int bayer_to_rgb24_wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
- uint8_t *dstPtr= dst[0];
+ uint8_t *dstPtr= dst[0] + srcSliceY * dstStride[0];
const uint8_t *srcPtr= src[0];
int i;
void (*copy) (const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int width);
@@ -1130,9 +1130,9 @@ static int bayer_to_yv12_wrapper(SwsContext *c, const uint8_t* src[], int srcStr
int srcSliceH, uint8_t* dst[], int dstStride[])
{
const uint8_t *srcPtr= src[0];
- uint8_t *dstY= dst[0];
- uint8_t *dstU= dst[1];
- uint8_t *dstV= dst[2];
+ uint8_t *dstY= dst[0] + srcSliceY * dstStride[0];
+ uint8_t *dstU= dst[1] + srcSliceY * dstStride[1] / 2;
+ uint8_t *dstV= dst[2] + srcSliceY * dstStride[2] / 2;
int i;
void (*copy) (const uint8_t *src, int src_stride, uint8_t *dstY, uint8_t *dstU, uint8_t *dstV, int luma_stride, int width, int32_t *rgb2yuv);
void (*interpolate)(const uint8_t *src, int src_stride, uint8_t *dstY, uint8_t *dstU, uint8_t *dstV, int luma_stride, int width, int32_t *rgb2yuv);