How can I split this function into smaller functions without sacrificing its functionality?
问题 I got the code for MJPEG decoding from here and I am trying to split the code for IDCT into smaller functions. The IDCT function in the original code is as follows: void IDCT(int32_t *input, uint8_t *output) { int32_t Y[64]; int32_t k, l; for (k = 0; k < 8; k++) { for (l = 0; l < 8; l++) Y(k, l) = SCALE(input[(k << 3) + l], S_BITS); idct_1d(&Y(k, 0)); } for (l = 0; l < 8; l++) { int32_t Yc[8]; for (k = 0; k < 8; k++) Yc[k] = Y(k, l); idct_1d(Yc); for (k = 0; k < 8; k++) { int32_t r = 128 +