diff options
author | Dong, Jerry <jerry.dong@intel.com> | 2019-03-28 14:40:53 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-03-28 22:28:43 +0300 |
commit | c47fada298e684a07fb6ba047f6843f1cdd48aa8 (patch) | |
tree | 9ec4634c2738e25bfc1664223628c0abc3980114 /libswscale | |
parent | 391f884675f319b95f5a72a410178516e11c557d (diff) |
swscale/swscale_unscaled: fixed the issue that when width/height is not 2-multiple, transition of nv12 to u/v planes is not completed.
Signed-off-by: Dong, Jerry <jerry.dong@intel.com>
Signed-off-by: Decai Lin <decai.lin@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale_unscaled.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 058f2b94db..d01e3733ef 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -150,10 +150,10 @@ static int planarToNv12Wrapper(SwsContext *c, const uint8_t *src[], dstParam[0], dstStride[0]); if (c->dstFormat == AV_PIX_FMT_NV12) - interleaveBytes(src[1], src[2], dst, c->srcW / 2, srcSliceH / 2, + interleaveBytes(src[1], src[2], dst, c->chrSrcW, c->chrSrcH, srcStride[1], srcStride[2], dstStride[1]); else - interleaveBytes(src[2], src[1], dst, c->srcW / 2, srcSliceH / 2, + interleaveBytes(src[2], src[1], dst, c->chrSrcW, c->chrSrcH, srcStride[2], srcStride[1], dstStride[1]); return srcSliceH; @@ -171,10 +171,10 @@ static int nv12ToPlanarWrapper(SwsContext *c, const uint8_t *src[], dstParam[0], dstStride[0]); if (c->srcFormat == AV_PIX_FMT_NV12) - deinterleaveBytes(src[1], dst1, dst2,c->srcW / 2, srcSliceH / 2, + deinterleaveBytes(src[1], dst1, dst2, c->chrSrcW, c->chrSrcH, srcStride[1], dstStride[1], dstStride[2]); else - deinterleaveBytes(src[1], dst2, dst1, c->srcW / 2, srcSliceH / 2, + deinterleaveBytes(src[1], dst2, dst1, c->chrSrcW, c->chrSrcH, srcStride[1], dstStride[2], dstStride[1]); return srcSliceH; |