summaryrefslogtreecommitdiffstats
path: root/src/idct.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/idct.c')
-rw-r--r--src/idct.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/idct.c b/src/idct.c
index 2b20b8c..de1e009 100644
--- a/src/idct.c
+++ b/src/idct.c
@@ -76,18 +76,28 @@ idct_1d(int *Y)
}
/* Inverse 2-D Discrete Cosine Transform. */
-void
-IDCT(const int input[64], unsigned char *output)
+// dequanize_data_IDCT(blok8x8,quan_data,blok8x8_2);
+//void IDCT(int input[64], unsigned char *output)
+void dequanize_data_IDCT(int Y[64], unsigned char *qdata, unsigned char *output)
{
- int Y[64];
+// int Y[64];
int k,l;
/* Pass 1: process rows. */
for (k = 0; k < 8; k++) {
+ Y[8*k+0]=SCALE(Y[8*k+0]*qdata[8*k+0], S_BITS);
+ Y[8*k+1]=SCALE(Y[8*k+1]*qdata[8*k+1], S_BITS);
+ Y[8*k+2]=SCALE(Y[8*k+2]*qdata[8*k+2], S_BITS);
+ Y[8*k+3]=SCALE(Y[8*k+3]*qdata[8*k+3], S_BITS);
+ Y[8*k+4]=SCALE(Y[8*k+4]*qdata[8*k+4], S_BITS);
+ Y[8*k+5]=SCALE(Y[8*k+5]*qdata[8*k+5], S_BITS);
+ Y[8*k+6]=SCALE(Y[8*k+6]*qdata[8*k+6], S_BITS);
+ Y[8*k+7]=SCALE(Y[8*k+7]*qdata[8*k+7], S_BITS);
+
/* Prescale k-th row: */
- for (l = 0; l < 8; l++)
- Y[8*k+l] = SCALE(input[8*k+l], S_BITS);
+ //for (l = 0; l < 8; l++)
+ // Y[8*k+l] = SCALE(input[8*k+l], S_BITS);
/* 1-D IDCT on k-th row: */
idct_1d(&Y[8*k+0]);