diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-09-03 12:15:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-08-23 13:15:16 +0200 |
commit | f9786014336690302027b02d23d10e84015006aa (patch) | |
tree | ee2bd00db67fe54cbaf9c6e5f50d14bf6d1c1b33 | |
parent | 463c85969315fc7d42f547199d0ebff31e458550 (diff) | |
download | ffmpeg-f9786014336690302027b02d23d10e84015006aa.tar.gz |
swscale/swscale_unscaled: Try to fix Rgb16ToPlanarRgb16Wrapper() with slices
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e57d99dd4e0d8fe2992da0d65b563580e35ce728)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libswscale/swscale_unscaled.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 9831488ca3..41d6b2b2f3 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -558,6 +558,8 @@ static int Rgb16ToPlanarRgb16Wrapper(SwsContext *c, const uint8_t *src[], int bpc = dst_format->comp[0].depth_minus1 + 1; int alpha = src_format->flags & AV_PIX_FMT_FLAG_ALPHA; int swap = 0; + int i; + if ( HAVE_BIGENDIAN && !(src_format->flags & AV_PIX_FMT_FLAG_BE) || !HAVE_BIGENDIAN && src_format->flags & AV_PIX_FMT_FLAG_BE) swap++; @@ -571,6 +573,12 @@ static int Rgb16ToPlanarRgb16Wrapper(SwsContext *c, const uint8_t *src[], src_format->name, dst_format->name); return srcSliceH; } + + for(i=0; i<4; i++) { + dst2013[i] += stride2013[i] * srcSliceY / 2; + dst1023[i] += stride1023[i] * srcSliceY / 2; + } + switch (c->srcFormat) { case AV_PIX_FMT_RGB48LE: case AV_PIX_FMT_RGB48BE: |