diff --git a/src/core/dumping/ffmpeg_backend.cpp b/src/core/dumping/ffmpeg_backend.cpp index 05cc25acf..2816190c0 100644 --- a/src/core/dumping/ffmpeg_backend.cpp +++ b/src/core/dumping/ffmpeg_backend.cpp @@ -124,8 +124,11 @@ bool FFmpegVideoStream::Init(FFmpegMuxer& muxer, const Layout::FramebufferLayout codec_context->bit_rate = Settings::values.video_bitrate; codec_context->width = layout.width; codec_context->height = layout.height; - codec_context->time_base.num = 1; - codec_context->time_base.den = 60; + // TODO(xperia64): Replace with the core timing derived refresh rate + // Verify that an FPS of 59.83... can actually be requested + // (this doesn't seem to be working currently) + codec_context->time_base.num = 1000000; + codec_context->time_base.den = 59833997; codec_context->gop_size = 12; codec_context->pix_fmt = codec->pix_fmts ? codec->pix_fmts[0] : AV_PIX_FMT_YUV420P; if (format_context->oformat->flags & AVFMT_GLOBALHEADER) diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h index 3252364e2..4e1c92289 100644 --- a/src/core/hw/gpu.h +++ b/src/core/hw/gpu.h @@ -19,7 +19,10 @@ class MemorySystem; namespace GPU { -constexpr float SCREEN_REFRESH_RATE = 60; +// TODO(xperia64): This should be defined by the number of +// ARM11 cycles per vblank interval once that value is measured +// and not the other way around +constexpr double SCREEN_REFRESH_RATE = 59.833997376556916; // Returns index corresponding to the Regs member labeled by field_name #define GPU_REG_INDEX(field_name) (offsetof(GPU::Regs, field_name) / sizeof(u32))