diff options
| author | 2021-08-08 00:51:25 -0400 | |
|---|---|---|
| committer | 2021-08-09 23:24:16 -0400 | |
| commit | a779cede7c9f8860ed005cbc16158c97c69765e7 (patch) | |
| tree | 7510da87251a170614133348598aca9fffc8e40c | |
| parent | Merge pull request #6827 from Morph1984/uuid-hash (diff) | |
| download | yuzu-a779cede7c9f8860ed005cbc16158c97c69765e7.tar.gz yuzu-a779cede7c9f8860ed005cbc16158c97c69765e7.tar.xz yuzu-a779cede7c9f8860ed005cbc16158c97c69765e7.zip | |
vic: Specify sws_scale height stride.
Silences a sws_scale runtime warning about unaligned strides.
| -rw-r--r-- | src/video_core/command_classes/vic.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/video_core/command_classes/vic.cpp b/src/video_core/command_classes/vic.cpp index d5e77941c..0ee07f398 100644 --- a/src/video_core/command_classes/vic.cpp +++ b/src/video_core/command_classes/vic.cpp | |||
| @@ -96,12 +96,11 @@ void Vic::Execute() { | |||
| 96 | if (!converted_frame_buffer) { | 96 | if (!converted_frame_buffer) { |
| 97 | converted_frame_buffer = AVMallocPtr{static_cast<u8*>(av_malloc(linear_size)), av_free}; | 97 | converted_frame_buffer = AVMallocPtr{static_cast<u8*>(av_malloc(linear_size)), av_free}; |
| 98 | } | 98 | } |
| 99 | 99 | const std::array<int, 4> converted_stride{frame->width * 4, frame->height * 4, 0, 0}; | |
| 100 | const int converted_stride{frame->width * 4}; | ||
| 101 | u8* const converted_frame_buf_addr{converted_frame_buffer.get()}; | 100 | u8* const converted_frame_buf_addr{converted_frame_buffer.get()}; |
| 102 | 101 | ||
| 103 | sws_scale(scaler_ctx, frame->data, frame->linesize, 0, frame->height, | 102 | sws_scale(scaler_ctx, frame->data, frame->linesize, 0, frame->height, |
| 104 | &converted_frame_buf_addr, &converted_stride); | 103 | &converted_frame_buf_addr, converted_stride.data()); |
| 105 | 104 | ||
| 106 | const u32 blk_kind = static_cast<u32>(config.block_linear_kind); | 105 | const u32 blk_kind = static_cast<u32>(config.block_linear_kind); |
| 107 | if (blk_kind != 0) { | 106 | if (blk_kind != 0) { |