From 694b71de69ffe8df666ab933da48bc8b1d902717 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Sun, 10 Nov 2024 10:34:12 +0200 Subject: [PATCH] align output --- src/core/libraries/videodec/videodec_impl.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/libraries/videodec/videodec_impl.cpp b/src/core/libraries/videodec/videodec_impl.cpp index 559cf3b0a..cffc0b0e2 100644 --- a/src/core/libraries/videodec/videodec_impl.cpp +++ b/src/core/libraries/videodec/videodec_impl.cpp @@ -22,8 +22,10 @@ av_always_inline std::string av_err2string(int errnum) { namespace Libraries::Videodec { static inline void CopyNV12Data(u8* dst, const AVFrame& src) { - std::memcpy(dst, src.data[0], src.width * src.height); - std::memcpy(dst + (src.width * src.height), src.data[1], (src.width * src.height) / 2); + u32 width = Common::AlignUp((u32)src.width, 16); + u32 height = Common::AlignUp((u32)src.height, 16); + std::memcpy(dst, src.data[0], width * height); + std::memcpy(dst + (width * height), src.data[1], (width * height) / 2); } VdecDecoder::VdecDecoder(const OrbisVideodecConfigInfo& pCfgInfoIn,