/*******************************************************************

 *******************************************************************/
#define SCAN_C
#include "scan.h"

const int scan_table[2][64] = {
	{
		(0*8+0),(1*8+0),(0*8+1),(0*8+2),(1*8+1),(2*8+0),(3*8+0),(2*8+1),
		(1*8+2),(0*8+3),(0*8+4),(1*8+3),(2*8+2),(3*8+1),(4*8+0),(5*8+0),
		(4*8+1),(3*8+2),(2*8+3),(1*8+4),(0*8+5),(0*8+6),(1*8+5),(2*8+4),
		(3*8+3),(4*8+2),(5*8+1),(6*8+0),(7*8+0),(6*8+1),(5*8+2),(4*8+3),
		(3*8+4),(2*8+5),(1*8+6),(0*8+7),(1*8+7),(2*8+6),(3*8+5),(4*8+4),
		(5*8+3),(6*8+2),(7*8+1),(7*8+2),(6*8+3),(5*8+4),(4*8+5),(3*8+6),
		(2*8+7),(3*8+7),(4*8+6),(5*8+5),(6*8+4),(7*8+3),(7*8+4),(6*8+5),
		(5*8+6),(4*8+7),(5*8+7),(6*8+6),(7*8+5),(7*8+6),(6*8+7),(7*8+7),
	},
	{
		(0*8+0),(0*8+1),(0*8+2),(0*8+3),(1*8+0),(1*8+1),(2*8+0),(2*8+1),
		(1*8+2),(1*8+3),(0*8+4),(0*8+5),(0*8+6),(0*8+7),(1*8+7),(1*8+6),
		(1*8+5),(1*8+4),(2*8+3),(2*8+2),(3*8+0),(3*8+1),(4*8+0),(4*8+1),
		(3*8+2),(3*8+3),(2*8+4),(2*8+5),(2*8+6),(2*8+7),(3*8+4),(3*8+5),
		(3*8+6),(3*8+7),(4*8+2),(4*8+3),(0*8+5),(1*8+5),(6*8+0),(6*8+1),
		(5*8+2),(5*8+3),(4*8+4),(4*8+5),(4*8+6),(4*8+7),(5*8+4),(5*8+5),
		(5*8+6),(5*8+7),(6*8+2),(6*8+3),(7*8+0),(7*8+1),(7*8+2),(7*8+3),
		(6*8+4),(6*8+5),(6*8+6),(6*8+7),(7*8+4),(7*8+5),(7*8+6),(7*8+7),
	}
};

const unsigned char default_intra_quantizer_matrix[64] = {
	 8, 16, 19, 22, 26, 27, 29, 34,
	16, 16, 22, 24, 27, 29, 34, 37,
	19, 22, 26, 27, 29, 34, 34, 38,
	22, 22, 26, 27, 29, 34, 37, 40,
	22, 26, 27, 29, 32, 35, 40, 48,
	26, 27, 29, 32, 35, 40, 48, 58,
	26, 27, 29, 34, 38, 46, 56, 69,
	27, 29, 35, 38, 46, 56, 69, 83,
};