MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / ipuCSC

Function ipuCSC

pcsx2/IPU/IPU_MultiISA.cpp:1793–1831  ·  view source on GitHub ↗

IPU Transfers are split into 8Qwords so we need to send ALL the data

Source from the content-addressed store, hash-verified

1791
1792// IPU Transfers are split into 8Qwords so we need to send ALL the data
1793__ri static bool ipuCSC(tIPU_CMD_CSC csc)
1794{
1795 csc.log_from_YCbCr();
1796
1797 for (;ipu_cmd.index < (int)csc.MBC; ipu_cmd.index++)
1798 {
1799 for(;ipu_cmd.pos[0] < 48; ipu_cmd.pos[0]++)
1800 {
1801 if (!getBits64((u8*)&decoder.mb8 + 8 * ipu_cmd.pos[0], 1)) return false;
1802 }
1803
1804 ipu_csc(decoder.mb8, decoder.rgb32, 0);
1805 if (csc.OFM) ipu_dither(decoder.rgb32, decoder.rgb16, csc.DTE);
1806
1807 if (csc.OFM)
1808 {
1809 ipu_cmd.pos[1] += ipu_fifo.out.write(((u32*) & decoder.rgb16) + 4 * ipu_cmd.pos[1], 32 - ipu_cmd.pos[1]);
1810 if (ipu_cmd.pos[1] < 32)
1811 {
1812 IPUCoreStatus.WaitingOnIPUFrom = true;
1813 return false;
1814 }
1815 }
1816 else
1817 {
1818 ipu_cmd.pos[1] += ipu_fifo.out.write(((u32*) & decoder.rgb32) + 4 * ipu_cmd.pos[1], 64 - ipu_cmd.pos[1]);
1819 if (ipu_cmd.pos[1] < 64)
1820 {
1821 IPUCoreStatus.WaitingOnIPUFrom = true;
1822 return false;
1823 }
1824 }
1825
1826 ipu_cmd.pos[0] = 0;
1827 ipu_cmd.pos[1] = 0;
1828 }
1829
1830 return true;
1831}
1832
1833__ri static bool ipuPACK(tIPU_CMD_CSC csc)
1834{

Callers 1

IPUWorkerFunction · 0.85

Calls 5

getBits64Function · 0.85
ipu_cscFunction · 0.85
ipu_ditherFunction · 0.85
log_from_YCbCrMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected