MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / exec

Method exec

ps3fw/cellVdec.cpp:301–732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299 }
300
301 void exec(ppu_thread& ppu, u32 vid)
302 {
303 perf_meter<"VDEC"_u32> perf0;
304
305 ppu_tid.release(ppu.id);
306
307 for (auto slice = in_cmd.pop_all();
308 thread_ctrl::state() != thread_state::aborting; [&]
309 {
310 if (slice)
311 {
312 slice.pop_front();
313 }
314
315 if (slice || thread_ctrl::state() == thread_state::aborting)
316 {
317 return;
318 }
319
320 thread_ctrl::wait_on(in_cmd);
321 slice = in_cmd.pop_all(); // Pop new command list
322 }())
323 {
324 // pcmd can be nullptr
325 auto* cmd = slice.get();
326
327 if (!cmd)
328 {
329 continue;
330 }
331
332 switch (cmd->type)
333 {
334 case vdec_cmd_type::start_sequence:
335 {
336 std::lock_guard lock{mutex};
337
338 if (seq_state == sequence_state::resetting)
339 {
340 cellVdec.trace(
341 "Reset sequence... (handle=0x%x, seq_id=%d, cmd_id=%d)", handle,
342 cmd->seq_id, cmd->id);
343 }
344 else
345 {
346 cellVdec.trace(
347 "Start sequence... (handle=0x%x, seq_id=%d, cmd_id=%d)", handle,
348 cmd->seq_id, cmd->id);
349 }
350
351 avcodec_flush_buffers(ctx);
352
353 out_queue.clear(); // Flush image queue
354 log_time_base = {};
355
356 frc_set = 0; // TODO: ???
357 next_pts = 0;
358 next_dts = 0;

Callers 1

vdecEntryFunction · 0.45

Calls 15

stateEnum · 0.85
throw_exceptionClass · 0.85
av_error_to_stringFunction · 0.85
pop_allMethod · 0.80
errorMethod · 0.80
push_backMethod · 0.80
try_decMethod · 0.80
ensureFunction · 0.50
releaseMethod · 0.45
getMethod · 0.45
clearMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected