Compare commits
4 commits
613ffac2b9
...
91432e336a
Author | SHA1 | Date | |
---|---|---|---|
91432e336a | |||
1a5b3fb239 | |||
24e6c62109 | |||
326865cba2 |
9 changed files with 25 additions and 30 deletions
|
@ -165,12 +165,6 @@ Result InfoUpdater::UpdateEffectsVersion1(EffectContext& effect_context, const b
|
||||||
reinterpret_cast<EffectInfoBase::OutStatusVersion1*>(output), effect_count};
|
reinterpret_cast<EffectInfoBase::OutStatusVersion1*>(output), effect_count};
|
||||||
|
|
||||||
for (u32 i = 0; i < effect_count; i++) {
|
for (u32 i = 0; i < effect_count; i++) {
|
||||||
#ifdef _WIN32
|
|
||||||
// There's a bug in Windows where using this effect causes extreme noise. So let's skip it.
|
|
||||||
if (in_params[i].type == EffectInfoBase::Type::Reverb) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
auto effect_info{&effect_context.GetInfo(i)};
|
auto effect_info{&effect_context.GetInfo(i)};
|
||||||
if (effect_info->GetType() != in_params[i].type) {
|
if (effect_info->GetType() != in_params[i].type) {
|
||||||
effect_info->ForceUnmapBuffers(pool_mapper);
|
effect_info->ForceUnmapBuffers(pool_mapper);
|
||||||
|
@ -218,12 +212,6 @@ Result InfoUpdater::UpdateEffectsVersion2(EffectContext& effect_context, const b
|
||||||
reinterpret_cast<EffectInfoBase::OutStatusVersion2*>(output), effect_count};
|
reinterpret_cast<EffectInfoBase::OutStatusVersion2*>(output), effect_count};
|
||||||
|
|
||||||
for (u32 i = 0; i < effect_count; i++) {
|
for (u32 i = 0; i < effect_count; i++) {
|
||||||
#ifdef _WIN32
|
|
||||||
// There's a bug in Windows where using this effect causes extreme noise. So let's skip it.
|
|
||||||
if (in_params[i].type == EffectInfoBase::Type::Reverb) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
auto effect_info{&effect_context.GetInfo(i)};
|
auto effect_info{&effect_context.GetInfo(i)};
|
||||||
if (effect_info->GetType() != in_params[i].type) {
|
if (effect_info->GetType() != in_params[i].type) {
|
||||||
effect_info->ForceUnmapBuffers(pool_mapper);
|
effect_info->ForceUnmapBuffers(pool_mapper);
|
||||||
|
|
|
@ -191,8 +191,6 @@ static void InitializeReverbEffect(const ReverbInfo::ParameterVersion2& params,
|
||||||
const auto center_delay_time{(5 * delay).to_uint_floor()};
|
const auto center_delay_time{(5 * delay).to_uint_floor()};
|
||||||
state.center_delay_line.Initialize(center_delay_time, 1.0f);
|
state.center_delay_line.Initialize(center_delay_time, 1.0f);
|
||||||
|
|
||||||
UpdateReverbEffectParameter(params, state);
|
|
||||||
|
|
||||||
for (u32 i = 0; i < ReverbInfo::MaxDelayLines; i++) {
|
for (u32 i = 0; i < ReverbInfo::MaxDelayLines; i++) {
|
||||||
std::ranges::fill(state.fdn_delay_lines[i].buffer, 0);
|
std::ranges::fill(state.fdn_delay_lines[i].buffer, 0);
|
||||||
std::ranges::fill(state.decay_delay_lines[i].buffer, 0);
|
std::ranges::fill(state.decay_delay_lines[i].buffer, 0);
|
||||||
|
|
|
@ -135,8 +135,8 @@ NvResult nvhost_nvdec_common::GetSyncpoint(IoctlGetSyncpoint& params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
NvResult nvhost_nvdec_common::GetWaitbase(IoctlGetWaitbase& params) {
|
NvResult nvhost_nvdec_common::GetWaitbase(IoctlGetWaitbase& params) {
|
||||||
LOG_CRITICAL(Service_NVDRV, "called WAITBASE");
|
LOG_DEBUG(Service_NVDRV, "called WAITBASE");
|
||||||
params.value = 0; // Seems to be hard coded at 0
|
params.value = 0;
|
||||||
return NvResult::Success;
|
return NvResult::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,10 @@ void Decoder::Decode() {
|
||||||
// Receive output frames from decoder.
|
// Receive output frames from decoder.
|
||||||
auto frame = decode_api.ReceiveFrame();
|
auto frame = decode_api.ReceiveFrame();
|
||||||
|
|
||||||
|
if (!frame) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (IsInterlaced()) {
|
if (IsInterlaced()) {
|
||||||
auto [luma_top, luma_bottom, chroma_top, chroma_bottom] = GetInterlacedOffsets();
|
auto [luma_top, luma_bottom, chroma_top, chroma_bottom] = GetInterlacedOffsets();
|
||||||
auto frame_copy = frame;
|
auto frame_copy = frame;
|
||||||
|
|
|
@ -233,7 +233,7 @@ bool DecoderContext::OpenContext(const Decoder& decoder) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DecoderContext::SendPacket(const Packet& packet) {
|
bool DecoderContext::SendPacket(const Packet& packet) {
|
||||||
if (const int ret = avcodec_send_packet(m_codec_context, packet.GetPacket()); ret < 0 && ret != AVERROR_EOF) {
|
if (const int ret = avcodec_send_packet(m_codec_context, packet.GetPacket()); ret < 0 && ret != AVERROR_EOF && ret != AVERROR(EAGAIN)) {
|
||||||
LOG_ERROR(HW_GPU, "avcodec_send_packet error: {}", AVError(ret));
|
LOG_ERROR(HW_GPU, "avcodec_send_packet error: {}", AVError(ret));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -242,31 +242,31 @@ bool DecoderContext::SendPacket(const Packet& packet) {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Frame> DecoderContext::ReceiveFrame() {
|
std::shared_ptr<Frame> DecoderContext::ReceiveFrame() {
|
||||||
auto ReceiveImpl = [&](AVFrame* frame) -> bool {
|
auto ReceiveImpl = [&](AVFrame* frame) -> int {
|
||||||
if (const int ret = avcodec_receive_frame(m_codec_context, frame); ret < 0 && ret != AVERROR_EOF) {
|
const int ret = avcodec_receive_frame(m_codec_context, frame);
|
||||||
|
if (ret < 0 && ret != AVERROR_EOF && ret != AVERROR(EAGAIN)) {
|
||||||
LOG_ERROR(HW_GPU, "avcodec_receive_frame error: {}", AVError(ret));
|
LOG_ERROR(HW_GPU, "avcodec_receive_frame error: {}", AVError(ret));
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return true;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::shared_ptr<Frame> intermediate_frame = std::make_shared<Frame>();
|
std::shared_ptr<Frame> intermediate_frame = std::make_shared<Frame>();
|
||||||
if (!ReceiveImpl(intermediate_frame->GetFrame())) {
|
if (ReceiveImpl(intermediate_frame->GetFrame()) < 0) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
m_temp_frame = std::make_shared<Frame>();
|
m_final_frame = std::make_shared<Frame>();
|
||||||
if (m_codec_context->hw_device_ctx) {
|
if (m_codec_context->hw_device_ctx) {
|
||||||
m_temp_frame->SetFormat(PreferredGpuFormat);
|
m_final_frame->SetFormat(PreferredGpuFormat);
|
||||||
if (int ret = av_hwframe_transfer_data(m_temp_frame->GetFrame(), intermediate_frame->GetFrame(), 0); ret < 0) {
|
if (const int ret = av_hwframe_transfer_data(m_final_frame->GetFrame(), intermediate_frame->GetFrame(), 0); ret < 0) {
|
||||||
LOG_ERROR(HW_GPU, "av_hwframe_transfer_data error: {}", AVError(ret));
|
LOG_ERROR(HW_GPU, "av_hwframe_transfer_data error: {}", AVError(ret));
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
m_temp_frame = std::move(intermediate_frame);
|
m_final_frame = std::move(intermediate_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(m_temp_frame);
|
return std::move(m_final_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DecodeApi::Reset() {
|
void DecodeApi::Reset() {
|
||||||
|
|
|
@ -194,7 +194,7 @@ public:
|
||||||
private:
|
private:
|
||||||
const Decoder& m_decoder;
|
const Decoder& m_decoder;
|
||||||
AVCodecContext* m_codec_context{};
|
AVCodecContext* m_codec_context{};
|
||||||
std::shared_ptr<Frame> m_temp_frame{};
|
std::shared_ptr<Frame> m_final_frame{};
|
||||||
bool m_decode_order{};
|
bool m_decode_order{};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -146,6 +146,11 @@ void Vic::Execute() {
|
||||||
}
|
}
|
||||||
|
|
||||||
auto frame = frame_queue.GetFrame(nvdec_id, luma_offset);
|
auto frame = frame_queue.GetFrame(nvdec_id, luma_offset);
|
||||||
|
|
||||||
|
if (!frame) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!frame.get()) {
|
if (!frame.get()) {
|
||||||
LOG_ERROR(HW_GPU, "Vic {} failed to get frame with offset {:#X}", id, luma_offset);
|
LOG_ERROR(HW_GPU, "Vic {} failed to get frame with offset {:#X}", id, luma_offset);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -54,7 +54,7 @@ using VideoCommon::LoadPipelines;
|
||||||
using VideoCommon::SerializePipeline;
|
using VideoCommon::SerializePipeline;
|
||||||
using Context = ShaderContext::Context;
|
using Context = ShaderContext::Context;
|
||||||
|
|
||||||
constexpr u32 CACHE_VERSION = 10;
|
constexpr u32 CACHE_VERSION = 13;
|
||||||
|
|
||||||
template <typename Container>
|
template <typename Container>
|
||||||
auto MakeSpan(Container& container) {
|
auto MakeSpan(Container& container) {
|
||||||
|
|
|
@ -55,7 +55,7 @@ using VideoCommon::FileEnvironment;
|
||||||
using VideoCommon::GenericEnvironment;
|
using VideoCommon::GenericEnvironment;
|
||||||
using VideoCommon::GraphicsEnvironment;
|
using VideoCommon::GraphicsEnvironment;
|
||||||
|
|
||||||
constexpr u32 CACHE_VERSION = 12;
|
constexpr u32 CACHE_VERSION = 13;
|
||||||
constexpr std::array<char, 8> VULKAN_CACHE_MAGIC_NUMBER{'y', 'u', 'z', 'u', 'v', 'k', 'c', 'h'};
|
constexpr std::array<char, 8> VULKAN_CACHE_MAGIC_NUMBER{'y', 'u', 'z', 'u', 'v', 'k', 'c', 'h'};
|
||||||
|
|
||||||
template <typename Container>
|
template <typename Container>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue