mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-05 00:42:48 +00:00
AvPlayer: Fix green line / AlignUp-height
This commit is contained in:
parent
95a30b2b3e
commit
4ba04c9d3d
@ -123,7 +123,7 @@ bool AvPlayerSource::GetStreamInfo(u32 stream_index, SceAvPlayerStreamInfo& info
|
|||||||
auto height = u32(p_stream->codecpar->height);
|
auto height = u32(p_stream->codecpar->height);
|
||||||
if (!m_use_vdec2) {
|
if (!m_use_vdec2) {
|
||||||
width = Common::AlignUp(width, 16);
|
width = Common::AlignUp(width, 16);
|
||||||
height = Common::AlignUp(height, 16);
|
height = Common::AlignUp(height, 8);
|
||||||
}
|
}
|
||||||
info.details.video.width = width;
|
info.details.video.width = width;
|
||||||
info.details.video.height = height;
|
info.details.video.height = height;
|
||||||
@ -190,7 +190,7 @@ bool AvPlayerSource::EnableStream(u32 stream_index) {
|
|||||||
auto height = u32(m_video_codec_context->height);
|
auto height = u32(m_video_codec_context->height);
|
||||||
if (!m_use_vdec2) {
|
if (!m_use_vdec2) {
|
||||||
width = Common::AlignUp(width, 16);
|
width = Common::AlignUp(width, 16);
|
||||||
height = Common::AlignUp(height, 16);
|
height = Common::AlignUp(height, 8);
|
||||||
}
|
}
|
||||||
const auto size = (width * height * 3) / 2;
|
const auto size = (width * height * 3) / 2;
|
||||||
for (u64 index = 0; index < m_num_output_video_framebuffers; ++index) {
|
for (u64 index = 0; index < m_num_output_video_framebuffers; ++index) {
|
||||||
@ -529,7 +529,7 @@ static void CopyNV12Data(u8* dst, const AVFrame& src, bool use_vdec2) {
|
|||||||
auto height = u32(src.height);
|
auto height = u32(src.height);
|
||||||
if (!use_vdec2) {
|
if (!use_vdec2) {
|
||||||
width = Common::AlignUp(width, 16);
|
width = Common::AlignUp(width, 16);
|
||||||
height = Common::AlignUp(height, 16);
|
height = Common::AlignUp(height, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (src.width == width) {
|
if (src.width == width) {
|
||||||
@ -565,7 +565,7 @@ Frame AvPlayerSource::PrepareVideoFrame(FrameBuffer buffer, const AVFrame& frame
|
|||||||
auto height = u32(frame.height);
|
auto height = u32(frame.height);
|
||||||
if (!m_use_vdec2) {
|
if (!m_use_vdec2) {
|
||||||
width = Common::AlignUp(width, 16);
|
width = Common::AlignUp(width, 16);
|
||||||
height = Common::AlignUp(height, 16);
|
height = Common::AlignUp(height, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Frame{
|
return Frame{
|
||||||
|
Loading…
Reference in New Issue
Block a user