diff options
| author | 2021-08-12 22:27:17 +0200 | |
|---|---|---|
| committer | 2021-08-12 22:27:17 +0200 | |
| commit | 78a82495931e8c6b2161f79d2ac00ea88baea4f2 (patch) | |
| tree | 94480efdcd09a71e676782434a44d124002f835a /src/video_core/command_classes | |
| parent | network: correct formatting in network.cpp and network_interface.cpp (diff) | |
| parent | Merge pull request #6838 from ameerj/sws-align (diff) | |
| download | yuzu-78a82495931e8c6b2161f79d2ac00ea88baea4f2.tar.gz yuzu-78a82495931e8c6b2161f79d2ac00ea88baea4f2.tar.xz yuzu-78a82495931e8c6b2161f79d2ac00ea88baea4f2.zip | |
Merge branch 'yuzu-emu:master' into fix-lan-play
Diffstat (limited to 'src/video_core/command_classes')
| -rw-r--r-- | src/video_core/command_classes/codecs/vp9.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/command_classes/codecs/vp9_types.h | 2 | ||||
| -rw-r--r-- | src/video_core/command_classes/nvdec.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/command_classes/vic.cpp | 5 |
4 files changed, 6 insertions, 7 deletions
diff --git a/src/video_core/command_classes/codecs/vp9.cpp b/src/video_core/command_classes/codecs/vp9.cpp index 7eecb3991..70030066a 100644 --- a/src/video_core/command_classes/codecs/vp9.cpp +++ b/src/video_core/command_classes/codecs/vp9.cpp | |||
| @@ -397,14 +397,14 @@ Vp9FrameContainer VP9::GetCurrentFrame(const NvdecCommon::NvdecRegisters& state) | |||
| 397 | next_frame = std::move(temp); | 397 | next_frame = std::move(temp); |
| 398 | } else { | 398 | } else { |
| 399 | next_frame.info = current_frame.info; | 399 | next_frame.info = current_frame.info; |
| 400 | next_frame.bit_stream = std::move(current_frame.bit_stream); | 400 | next_frame.bit_stream = current_frame.bit_stream; |
| 401 | } | 401 | } |
| 402 | return current_frame; | 402 | return current_frame; |
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | std::vector<u8> VP9::ComposeCompressedHeader() { | 405 | std::vector<u8> VP9::ComposeCompressedHeader() { |
| 406 | VpxRangeEncoder writer{}; | 406 | VpxRangeEncoder writer{}; |
| 407 | const bool update_probs = current_frame_info.show_frame && !current_frame_info.is_key_frame; | 407 | const bool update_probs = !current_frame_info.is_key_frame && current_frame_info.show_frame; |
| 408 | if (!current_frame_info.lossless) { | 408 | if (!current_frame_info.lossless) { |
| 409 | if (static_cast<u32>(current_frame_info.transform_mode) >= 3) { | 409 | if (static_cast<u32>(current_frame_info.transform_mode) >= 3) { |
| 410 | writer.Write(3, 2); | 410 | writer.Write(3, 2); |
diff --git a/src/video_core/command_classes/codecs/vp9_types.h b/src/video_core/command_classes/codecs/vp9_types.h index 6820afa26..87eafdb03 100644 --- a/src/video_core/command_classes/codecs/vp9_types.h +++ b/src/video_core/command_classes/codecs/vp9_types.h | |||
| @@ -176,7 +176,7 @@ struct PictureInfo { | |||
| 176 | .frame_size_changed = (vp9_flags & FrameFlags::FrameSizeChanged) != 0, | 176 | .frame_size_changed = (vp9_flags & FrameFlags::FrameSizeChanged) != 0, |
| 177 | .error_resilient_mode = (vp9_flags & FrameFlags::ErrorResilientMode) != 0, | 177 | .error_resilient_mode = (vp9_flags & FrameFlags::ErrorResilientMode) != 0, |
| 178 | .last_frame_shown = (vp9_flags & FrameFlags::LastShowFrame) != 0, | 178 | .last_frame_shown = (vp9_flags & FrameFlags::LastShowFrame) != 0, |
| 179 | .show_frame = false, | 179 | .show_frame = true, |
| 180 | .ref_frame_sign_bias = ref_frame_sign_bias, | 180 | .ref_frame_sign_bias = ref_frame_sign_bias, |
| 181 | .base_q_index = base_q_index, | 181 | .base_q_index = base_q_index, |
| 182 | .y_dc_delta_q = y_dc_delta_q, | 182 | .y_dc_delta_q = y_dc_delta_q, |
diff --git a/src/video_core/command_classes/nvdec.cpp b/src/video_core/command_classes/nvdec.cpp index b5e3b70fc..b5c55f14a 100644 --- a/src/video_core/command_classes/nvdec.cpp +++ b/src/video_core/command_classes/nvdec.cpp | |||
| @@ -39,7 +39,7 @@ void Nvdec::Execute() { | |||
| 39 | codec->Decode(); | 39 | codec->Decode(); |
| 40 | break; | 40 | break; |
| 41 | default: | 41 | default: |
| 42 | UNIMPLEMENTED_MSG("Unknown codec {}", static_cast<u32>(codec->GetCurrentCodec())); | 42 | UNIMPLEMENTED_MSG("Codec {}", codec->GetCurrentCodecName()); |
| 43 | break; | 43 | break; |
| 44 | } | 44 | } |
| 45 | } | 45 | } |
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) { |