缺点:高频段有阴影
/*
Auto folder version [1]
Name [imcp.cpp]
Branch [image_process]
File type [cpp]
Direction [灰度图像压缩,支持分辨率:120*160,240*320,480*640,960*1280]
*/
#include "stdafx.h"
#include<stdio.h>
#include<math.h>
const int dct_f88[8][8] = //JPEG亮度分量量化矩阵
{
16,11,10,16,24,40,51,61, //[0][0]:16
12,12,14,19,26,58,60,55,
14,13,16,24,40,57,69,56,
14,17,22,29,51,87,80,62,
18,22,37,56,68,109,103,77,
24,35,55,64,81,104,113,92,
49,64,78,87,103,121,120,101,
72,92,95,98,112,100,103,99
};
/*行程编码顺序
{
<0>0, <1>1, <2>5, <3>6, <4>14, <5>15, <6>27, <7>28,
<8>2, <9>4, <10>7, <11>13, <12>16, <13>26, <14>29, <15>42,
<16>3, <17>8, <18>12, <19>17, <20>25, <21>30, <22>41, <23>43,
<24>9, <25>11, <26>18, <27>24, <28>31, <29>40, <30>44, <31>53,
<32>10, <33>19, <34>23, <35>32, <36>39, <37>45, <38>52, <39>54,
<40>20, <41>22, <42>33, <43>38, <44>46, <45>51, <46>55, <47>60,
<48>21, <49>34, <50>37, <51>47, <52>50, <53>56, <54>59, <55>61,
<56>35, <57>36, <58>48, <59>49, <60>57, &l