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

Function InverseDCTSubBlock

Source/Core/JpegTask.cpp:567–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565#undef K10
566
567static void InverseDCTSubBlock(s16 *dst, const s16 *src)
568{
569 float x[8] {};
570 float block[SUBBLOCK_SIZE] {};
571 u32 i {}, j {};
572
573 /* idct 1d on rows (+transposition) */
574 for (i = 0; i < 8; ++i)
575 {
576 for (j = 0; j < 8; ++j)
577 {
578 x[j] = (float)src[i*8+j];
579 }
580
581 InverseDCT1D(x, &block[i], 8);
582 }
583
584 /* idct 1d on columns (thanks to previous transposition) */
585 for (i = 0; i < 8; ++i)
586 {
587 InverseDCT1D(&block[i*8], x, 1);
588
589 /* C4 = 1 normalization implies a division by 8 */
590 for (j = 0; j < 8; ++j)
591 {
592 dst[i+j*8] = (s16)x[j] >> 3;
593 }
594 }
595}
596/*
597static void RescaleYSubBlock(s16 *dst, const s16 *src)
598{

Callers 2

DecodeMacroblock1Function · 0.85
DecodeMacroblock2Function · 0.85

Calls 1

InverseDCT1DFunction · 0.85

Tested by

no test coverage detected