mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-18 22:23:35 +00:00
[nvdec, android] proper detection and support for GPU decoder (#4068)
Detects Android MediaCodec FFmpeg decoders for H.264/VP8/VP9 when NVDEC GPU decoding is selected. Required proper support of ffmpeg extradata, h264 frame dimensions and decoder frame handling. Reenabled (uncommented) NVDEC Emulation selector on Android interface. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4068
This commit is contained in:
@@ -50,6 +50,16 @@ bool H264::IsInterlaced() {
|
||||
current_context.h264_parameter_set.luma_bot_offset.Address() != 0;
|
||||
}
|
||||
|
||||
std::optional<FFmpeg::FrameDimensions> H264::GetFrameDimensions() {
|
||||
const auto& params = current_context.h264_parameter_set;
|
||||
const s32 width = static_cast<s32>(params.pic_width_in_mbs) * 16;
|
||||
const s32 height = static_cast<s32>(params.frame_height_in_mbs) * 16;
|
||||
if (width <= 0 || height <= 0) {
|
||||
return std::nullopt;
|
||||
}
|
||||
return FFmpeg::FrameDimensions{width, height};
|
||||
}
|
||||
|
||||
std::span<const u8> H264::ComposeFrame() {
|
||||
host1x.gmmu_manager.ReadBlock(regs.picture_info_offset.Address(), ¤t_context, sizeof(H264DecoderContext));
|
||||
const s64 frame_number = current_context.h264_parameter_set.frame_number.Value();
|
||||
|
||||
Reference in New Issue
Block a user