MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / DecodeMacroblock1

Function DecodeMacroblock1

Source/Core/JpegTask.cpp:377–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377static void DecodeMacroblock1(s16 *macroblock, s32 *y_dc, s32 *u_dc, s32 *v_dc, const s16 *qtable)
378{
379
380 for (u32 sb = 0; sb < 6; ++sb)
381 {
382 s16 tmp_sb[SUBBLOCK_SIZE] {};
383
384 /* update DC */
385 s32 dc {(s32)macroblock[0]};
386 switch(sb)
387 {
388 case 0: case 1: case 2: case 3:
389 *y_dc += dc; macroblock[0] = *y_dc & 0xffff; break;
390 case 4: *u_dc += dc; macroblock[0] = *u_dc & 0xffff; break;
391 case 5: *v_dc += dc; macroblock[0] = *v_dc & 0xffff; break;
392 }
393
394 ZigZagSubBlock(tmp_sb, macroblock);
395 if (qtable != nullptr) { MultSubBlocks(tmp_sb, tmp_sb, qtable, 0); }
396 TransposeSubBlock(macroblock, tmp_sb);
397 InverseDCTSubBlock(macroblock, macroblock);
398
399 macroblock += SUBBLOCK_SIZE;
400 }
401}
402
403static void DecodeMacroblock2(s16 *macroblock, u32 subblock_count, const s16 qtables[3][SUBBLOCK_SIZE])
404{

Callers 1

jpeg_decode_OBFunction · 0.85

Calls 4

ZigZagSubBlockFunction · 0.85
MultSubBlocksFunction · 0.85
TransposeSubBlockFunction · 0.85
InverseDCTSubBlockFunction · 0.85

Tested by

no test coverage detected