From 6df0089950b289fd3b30da410c792b5c818bc2e0 Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Tue, 7 Jul 2026 20:13:56 -0400 Subject: [PATCH] [vic] Quick change on VP9 offsets + ifdef encoding flags for Android --- src/video_core/host1x/codecs/decoder.cpp | 2 +- src/video_core/host1x/ffmpeg.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/video_core/host1x/codecs/decoder.cpp b/src/video_core/host1x/codecs/decoder.cpp index 86b859532d..1d6d3e8af6 100644 --- a/src/video_core/host1x/codecs/decoder.cpp +++ b/src/video_core/host1x/codecs/decoder.cpp @@ -59,7 +59,7 @@ void Decoder::Decode() { while (auto result = decode_api.ReceiveFrame()) { auto& [frame, frame_offsets] = *result; - if (frame_offsets.hidden || !frame) { + if (!frame) { continue; } if (frame_offsets.interlaced) { diff --git a/src/video_core/host1x/ffmpeg.cpp b/src/video_core/host1x/ffmpeg.cpp index b5635a2293..90b1ad7a9f 100644 --- a/src/video_core/host1x/ffmpeg.cpp +++ b/src/video_core/host1x/ffmpeg.cpp @@ -281,8 +281,10 @@ DecoderContext::DecoderContext(const Decoder& decoder) : m_decoder{decoder} { av_opt_set(m_codec_context->priv_data, "tune", "zerolatency", 0); m_codec_context->thread_count = 0; m_codec_context->thread_type &= ~FF_THREAD_FRAME; +#if defined(__ANDROID__) m_codec_context->flags |= AV_CODEC_FLAG_LOW_DELAY; m_codec_context->flags2 |= AV_CODEC_FLAG2_FAST; +#endif } DecoderContext::~DecoderContext() { @@ -435,7 +437,9 @@ bool DecodeApi::SendPacket(std::span packet_data, const FrameOffsets& } m_opened = true; } - m_pending_offsets.push(offsets); + if (!offsets.hidden) { + m_pending_offsets.push(offsets); + } FFmpeg::Packet packet(packet_data); packet.GetPacket()->pts = m_next_pts; packet.GetPacket()->dts = m_next_pts;