From 57e97dc4089cba13162d9a0a418136eae96b37d7 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Sun, 10 Nov 2024 10:56:45 +0200 Subject: [PATCH] align all h/w --- src/core/libraries/videodec/videodec_impl.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/libraries/videodec/videodec_impl.cpp b/src/core/libraries/videodec/videodec_impl.cpp index cffc0b0e2..c142af3f8 100644 --- a/src/core/libraries/videodec/videodec_impl.cpp +++ b/src/core/libraries/videodec/videodec_impl.cpp @@ -107,8 +107,8 @@ s32 VdecDecoder::Decode(const OrbisVideodecInputData& pInputDataIn, CopyNV12Data((u8*)pFrameBufferInOut.pFrameBuffer, *frame); pPictureInfoOut.codecType = 0; - pPictureInfoOut.frameWidth = frame->width; - pPictureInfoOut.frameHeight = frame->height; + pPictureInfoOut.frameWidth = Common::AlignUp((u32)frame->width, 16); + pPictureInfoOut.frameHeight = Common::AlignUp((u32)frame->height, 16); pPictureInfoOut.framePitch = frame->linesize[0]; pPictureInfoOut.isValid = true; @@ -152,8 +152,8 @@ s32 VdecDecoder::Flush(OrbisVideodecFrameBuffer& pFrameBufferInOut, CopyNV12Data((u8*)pFrameBufferInOut.pFrameBuffer, *frame); pPictureInfoOut.codecType = 0; - pPictureInfoOut.frameWidth = frame->width; - pPictureInfoOut.frameHeight = frame->height; + pPictureInfoOut.frameWidth = Common::AlignUp((u32)frame->width, 16); + pPictureInfoOut.frameHeight = Common::AlignUp((u32)frame->height, 16); pPictureInfoOut.framePitch = frame->linesize[0]; pPictureInfoOut.isValid = true; @@ -184,8 +184,8 @@ AVFrame* VdecDecoder::ConvertNV12Frame(AVFrame& frame) { nv12_frame->pts = frame.pts; nv12_frame->pkt_dts = frame.pkt_dts < 0 ? 0 : frame.pkt_dts; nv12_frame->format = AV_PIX_FMT_NV12; - nv12_frame->width = frame.width; - nv12_frame->height = frame.height; + nv12_frame->width = Common::AlignUp((u32)frame.width, 16); + nv12_frame->height = Common::AlignUp((u32)frame.height, 16); nv12_frame->sample_aspect_ratio = frame.sample_aspect_ratio; nv12_frame->crop_top = frame.crop_top; nv12_frame->crop_bottom = frame.crop_bottom;