[FFmpeg-cvslog] swscale/swscale_unscaled: Try to fix bayer_to_yv12_wrapper() with slices
Michael Niedermayer
git at videolan.org
Sat Sep 3 15:19:45 EEST 2016
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Sep 3 12:24:36 2016 +0200| [b4d7c1f84b0229b481ce16302ff1a5fe879ec940] | committer: Michael Niedermayer
swscale/swscale_unscaled: Try to fix bayer_to_yv12_wrapper() with slices
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4d7c1f84b0229b481ce16302ff1a5fe879ec940
---
libswscale/swscale_unscaled.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index b5f8a39..716c386 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);
More information about the ffmpeg-cvslog
mailing list