This commit is contained in:
Nekotekina 2014-12-28 18:53:02 +03:00
parent 1636531d4a
commit f16ec62b4a
5 changed files with 21 additions and 26 deletions

View File

@ -198,19 +198,11 @@ void RSXThread::DoCmd(const u32 fcmd, const u32 cmd, const u32 args_addr, const
auto args = vm::ptr<u32>::make(args_addr);
#if CMD_DEBUG
<<<<<<< HEAD
std::string debug = GetMethodName(cmd);
debug += "(";
for(u32 i=0; i<count; ++i) debug += (i ? ", " : "") + fmt::Format("0x%x", ARGS(i));
debug += ")";
LOG_NOTICE(RSX, debug);
=======
std::string debug = GetMethodName(cmd);
debug += "(";
for (u32 i = 0; i < count; ++i) debug += (i ? ", " : "") + fmt::Format("0x%x", ARGS(i));
debug += ")";
LOG_NOTICE(RSX, debug);
>>>>>>> 4b8d61736460fe75f264c7180bd7d9d898b540f5
#endif
u32 index = 0;

View File

@ -214,12 +214,12 @@ next:
}
}
u32 adecOpen(AudioDecoder* data)
u32 adecOpen(AudioDecoder* adec_ptr)
{
std::shared_ptr<AudioDecoder> data_ptr(data);
AudioDecoder& adec = *data;
std::shared_ptr<AudioDecoder> sptr(adec_ptr);
AudioDecoder& adec = *adec_ptr;
u32 adec_id = cellAdec->GetNewId(data_ptr);
u32 adec_id = cellAdec->GetNewId(sptr);
adec.id = adec_id;
@ -232,8 +232,9 @@ u32 adecOpen(AudioDecoder* data)
adec.adecCb->InitRegs();
adec.adecCb->DoRun();
thread t("Audio Decoder[" + std::to_string(adec_id) + "] Thread", [&, data_ptr]()
thread t("Audio Decoder[" + std::to_string(adec_id) + "] Thread", [adec_ptr, sptr]()
{
AudioDecoder& adec = *adec_ptr;
cellAdec->Notice("Audio Decoder thread started");
AdecTask& task = adec.task;

View File

@ -288,20 +288,20 @@ void dmuxQueryEsAttr(u32 info_addr /* may be 0 */, vm::ptr<const CellCodecEsFilt
const u32 esSpecificInfo_addr, vm::ptr<CellDmuxEsAttr> attr)
{
if (esFilterId->filterIdMajor >= 0xe0)
attr->memSize = 0x400000; // 0x45fa49 from ps3
attr->memSize = 0x500000; // 0x45fa49 from ps3
else
attr->memSize = 0x6000; // 0x73d9 from ps3
attr->memSize = 0x7000; // 0x73d9 from ps3
cellDmux->Warning("*** filter(0x%x, 0x%x, 0x%x, 0x%x)", (u32)esFilterId->filterIdMajor, (u32)esFilterId->filterIdMinor,
(u32)esFilterId->supplementalInfo1, (u32)esFilterId->supplementalInfo2);
}
u32 dmuxOpen(Demuxer* data)
u32 dmuxOpen(Demuxer* dmux_ptr)
{
std::shared_ptr<Demuxer> data_ptr(data);
Demuxer& dmux = *data;
std::shared_ptr<Demuxer> sptr(dmux_ptr);
Demuxer& dmux = *dmux_ptr;
u32 dmux_id = cellDmux->GetNewId(data_ptr);
u32 dmux_id = cellDmux->GetNewId(sptr);
dmux.id = dmux_id;
@ -314,8 +314,9 @@ u32 dmuxOpen(Demuxer* data)
dmux.dmuxCb->InitRegs();
dmux.dmuxCb->DoRun();
thread t("Demuxer[" + std::to_string(dmux_id) + "] Thread", [&, data_ptr]()
thread t("Demuxer[" + std::to_string(dmux_id) + "] Thread", [dmux_ptr, sptr]()
{
Demuxer& dmux = *dmux_ptr;
cellDmux->Notice("Demuxer thread started (mem=0x%x, size=0x%x, cb=0x%x, arg=0x%x)", dmux.memAddr, dmux.memSize, dmux.cbFunc, dmux.cbArg);
DemuxerTask task;

View File

@ -204,12 +204,12 @@ u32 vdecQueryAttr(CellVdecCodecType type, u32 profile, u32 spec_addr /* may be 0
return CELL_OK;
}
u32 vdecOpen(VideoDecoder* data)
u32 vdecOpen(VideoDecoder* vdec_ptr)
{
std::shared_ptr<VideoDecoder> data_ptr(data);
VideoDecoder& vdec = *data;
std::shared_ptr<VideoDecoder> sptr(vdec_ptr);
VideoDecoder& vdec = *vdec_ptr;
u32 vdec_id = cellVdec->GetNewId(data_ptr);
u32 vdec_id = cellVdec->GetNewId(sptr);
vdec.id = vdec_id;
@ -222,8 +222,9 @@ u32 vdecOpen(VideoDecoder* data)
vdec.vdecCb->InitRegs();
vdec.vdecCb->DoRun();
thread t("Video Decoder[" + std::to_string(vdec_id) + "] Thread", [&, data_ptr]()
thread t("Video Decoder[" + std::to_string(vdec_id) + "] Thread", [vdec_ptr, sptr]()
{
VideoDecoder& vdec = *vdec_ptr;
cellVdec->Notice("Video Decoder thread started");
VdecTask& task = vdec.task;

View File

@ -83,7 +83,7 @@ s32 sys_mutex_destroy(PPUThread& CPU, u32 mutex_id)
const u32 tid = CPU.GetId();
if (mutex->owner.compare_and_swap_test(0, tid)) // check if locked
if (!mutex->owner.compare_and_swap_test(0, tid)) // check if locked
{
return CELL_EBUSY;
}