mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-16 07:20:59 +00:00
cellvdec: stub unsupported video timebases
This commit is contained in:
parent
9187911a29
commit
12b8908a00
@ -321,10 +321,7 @@ struct vdec_thread : ppu_thread
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const u64 amend = u64{90000} * ctx->time_base.num * ctx->ticks_per_frame / ctx->time_base.den;
|
u64 amend = u64{90000} * ctx->time_base.num * ctx->ticks_per_frame / ctx->time_base.den;
|
||||||
next_pts += amend;
|
|
||||||
next_dts += amend;
|
|
||||||
|
|
||||||
const auto freq = 1. * ctx->time_base.den / ctx->time_base.num / ctx->ticks_per_frame;
|
const auto freq = 1. * ctx->time_base.den / ctx->time_base.num / ctx->ticks_per_frame;
|
||||||
|
|
||||||
if (std::abs(freq - 23.976) < 0.002)
|
if (std::abs(freq - 23.976) < 0.002)
|
||||||
@ -344,7 +341,15 @@ struct vdec_thread : ppu_thread
|
|||||||
else if (std::abs(freq - 60.000) < 0.001)
|
else if (std::abs(freq - 60.000) < 0.001)
|
||||||
frame.frc = CELL_VDEC_FRC_60;
|
frame.frc = CELL_VDEC_FRC_60;
|
||||||
else
|
else
|
||||||
fmt::throw_exception("Unsupported time_base.num (%d/%d, tpf=%d)" HERE, ctx->time_base.den, ctx->time_base.num, ctx->ticks_per_frame);
|
{
|
||||||
|
// Hack
|
||||||
|
cellVdec.error("Unsupported time_base.num (%d/%d, tpf=%d)", ctx->time_base.den, ctx->time_base.num, ctx->ticks_per_frame);
|
||||||
|
amend = u64{90000} / 30;
|
||||||
|
frame.frc = CELL_VDEC_FRC_30;
|
||||||
|
}
|
||||||
|
|
||||||
|
next_pts += amend;
|
||||||
|
next_dts += amend;
|
||||||
}
|
}
|
||||||
|
|
||||||
cellVdec.trace("Got picture (pts=0x%llx[0x%llx], dts=0x%llx[0x%llx])", frame.pts, frame->pkt_pts, frame.dts, frame->pkt_dts);
|
cellVdec.trace("Got picture (pts=0x%llx[0x%llx], dts=0x%llx[0x%llx])", frame.pts, frame->pkt_pts, frame.dts, frame->pkt_dts);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user