⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 quantize.h

📁 easy discrete time transform implemented in C
💻 H
字号:
#ifndef QUANTIZE_H
#define QUANTIZE_H

static const int qtable_jpeg[DCTBLOCK] =
   { 16,  11,  10,  16,  24,  40,  51,  61,
     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 };

static const int qtable_jpeg_flattened[DCTBLOCK] =	/** 4*sqrt(jpeg) **/
   { 18,  23,  22,  28,  34,  44,  50,  55,
	 24,  24,  26,  31,  36,  53,  54,  52,
	 26,  25,  28,  34,  44,  53,  58,  52,
	 26,  29,  33,  38,  50,  65,  63,  55,
	 30,  33,  43,  52,  58,  73,  71,  61,
	 34,  41,  52,  56,  63,  71,  74,  67,
	 49,  56,  62,  65,  71,  77,  77,  70,
	 59,  67,  68,  69,  74,  70,  71,  70};

static const int qtable_jpeg_squashed[DCTBLOCK] = {	/** 4*sqrt(jpeg_flat) **/
	18, 19, 19, 21, 23, 27, 28, 30,
	20, 20, 21, 22, 24, 29, 30, 29,
	21, 20, 21, 23, 27, 29, 31, 29,
	21, 22, 23, 25, 28, 32, 32, 30,
	22, 23, 26, 29, 31, 34, 34, 31,
	23, 26, 29, 30, 32, 34, 35, 33,
	28, 30, 32, 32, 34, 35, 35, 34,
	31, 33, 33, 33, 35, 34, 34, 34 };

static const int qtable_semiuniform[DCTBLOCK] =
   { 16,  32,  64,  64,  64,  64,  64,  64,
     32,  64,  64,  64,  64,  64,  64,  64,
     64,  64,  64,  64,  64,  64,  64,  64,
     64,  64,  64,  64,  64,  64,  64,  64,
     64,  64,  64,  64,  64,  64,  64,  64,
     64,  64,  64,  64,  64,  64,  64,  64,
     64,  64,  64,  64,  64,  64,  64,  64,
     64,  64,  64,  64,  64,  64,  64,  64 };

static const int qtable_uniform[DCTBLOCK] = {
	30,  30,  30,  30,  30,  30,  30,  30,
    30,  30,  30,  30,  30,  30,  30,  30,
    30,  30,  30,  30,  30,  30,  30,  30,
    30,  30,  30,  30,  30,  30,  30,  30,
    30,  30,  30,  30,  30,  30,  30,  30,
    30,  30,  30,  30,  30,  30,  30,  30,
    30,  30,  30,  30,  30,  30,  30,  30,
    30,  30,  30,  30,  30,  30,  30,  30 };

static const int qtable_none[DCTBLOCK] =
   { 1,   1,   1,   1,   1,   1,   1,   1,
     1,   1,   1,   1,   1,   1,   1,   1,
     1,   1,   1,   1,   1,   1,   1,   1,
     1,   1,   1,   1,   1,   1,   1,   1,
     1,   1,   1,   1,   1,   1,   1,   1,
     1,   1,   1,   1,   1,   1,   1,   1,
     1,   1,   1,   1,   1,   1,   1,   1,
     1,   1,   1,   1,   1,   1,   1,   1 };

static const float qtable_frac_jpeg_sq[DCTBLOCK] = {
	1.0000, 1.0556, 1.0556, 1.1667, 1.2778, 1.5000, 1.5556, 1.6667,
	1.1111, 1.1111, 1.1667, 1.2222, 1.3333, 1.6111, 1.6667, 1.6111,
	1.1667, 1.1111, 1.1667, 1.2778, 1.5000, 1.6111, 1.7222, 1.6111,
	1.1667, 1.2222, 1.2778, 1.3889, 1.5556, 1.7778, 1.7778, 1.6667,
	1.2222, 1.2778, 1.4444, 1.6111, 1.7222, 1.8889, 1.8889, 1.7222,
	1.2778, 1.4444, 1.6111, 1.6667, 1.7778, 1.8889, 1.9444, 1.8333,
	1.5556, 1.6667, 1.7778, 1.7778, 1.8889, 1.9444, 1.9444, 1.8889,
	1.7222, 1.8333, 1.8333, 1.8333, 1.9444, 1.8889, 1.8889, 1.8889 };

#endif // QUANTIZE_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -