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

Function getBits8

pcsx2/IPU/IPU_MultiISA.cpp:173–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173__ri static u8 getBits8(u8 *address, bool advance)
174{
175 if (!g_BP.FillBuffer(8)) return 0;
176
177 const u8* readpos = &g_BP.internal_qwc[0]._u8[g_BP.BP/8];
178
179 if (uint shift = (g_BP.BP & 7))
180 {
181 uint mask = (0xff >> shift);
182 *(u8*)address = (((~mask) & readpos[1]) >> (8 - shift)) | (((mask) & *readpos) << shift);
183 }
184 else
185 {
186 *(u8*)address = *(u8*)readpos;
187 }
188
189 if (advance) g_BP.Advance(8);
190
191 return 1;
192}
193
194
195#define W1 2841 /* 2048*sqrt (2)*cos (1*pi/16) */

Callers 2

mpeg2sliceIDECFunction · 0.85
mpeg2_sliceFunction · 0.85

Calls 2

FillBufferMethod · 0.80
AdvanceMethod · 0.45

Tested by

no test coverage detected