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

Function mpeg2_slice

pcsx2/IPU/IPU_MultiISA.cpp:1255–1599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1253}
1254
1255__fi static bool mpeg2_slice()
1256{
1257 int DCT_offset, DCT_stride;
1258 static bool ready_to_decode = true;
1259
1260 macroblock_8& mb8 = decoder.mb8;
1261 macroblock_16& mb16 = decoder.mb16;
1262
1263 switch (ipu_cmd.pos[0])
1264 {
1265 case 0:
1266 if (decoder.dcr)
1267 {
1268 decoder.dc_dct_pred[0] =
1269 decoder.dc_dct_pred[1] =
1270 decoder.dc_dct_pred[2] = 128 << decoder.intra_dc_precision;
1271 }
1272
1273 ipuRegs.ctrl.ECD = 0;
1274 ipuRegs.top = 0;
1275 std::memset(&mb8, 0, sizeof(mb8));
1276 std::memset(&mb16, 0, sizeof(mb16));
1277 [[fallthrough]];
1278
1279 case 1:
1280 if (!BitstreamInit())
1281 {
1282 ipu_cmd.pos[0] = 1;
1283 return false;
1284 }
1285 [[fallthrough]];
1286
1287 case 2:
1288 ipu_cmd.pos[0] = 2;
1289
1290 // IPU0 isn't ready for data, so let's wait for it to be
1291 if ((!ipu0ch.chcr.STR || ipuRegs.ctrl.OFC || ipu0ch.qwc == 0) && ipu_cmd.pos[0] <= 3)
1292 {
1293 IPUCoreStatus.WaitingOnIPUFrom = true;
1294 return false;
1295 }
1296
1297 if (decoder.macroblock_modes & DCT_TYPE_INTERLACED)
1298 {
1299 DCT_offset = decoder_stride;
1300 DCT_stride = decoder_stride * 2;
1301 }
1302 else
1303 {
1304 DCT_offset = decoder_stride * 8;
1305 DCT_stride = decoder_stride;
1306 }
1307
1308 if (decoder.macroblock_modes & MACROBLOCK_INTRA)
1309 {
1310 switch(ipu_cmd.pos[1])
1311 {
1312 case 0:

Callers 1

IPUWorkerFunction · 0.85

Calls 14

BitstreamInitFunction · 0.85
slice_intra_DCTFunction · 0.85
UBITSFunction · 0.85
DUMPBITSFunction · 0.85
slice_non_intra_DCTFunction · 0.85
getBits8Function · 0.85
SetOutputToMethod · 0.80
GetIpuDataPtrMethod · 0.80
AdvanceIpuDataByMethod · 0.80
FillBufferMethod · 0.80
getBits32Function · 0.70
WarningMethod · 0.45

Tested by

no test coverage detected