
BaseJpegDeocde exampe program
Dependencies: BaseJpegDecode Terminal BaseUsbHost mbed mbed-rtos
Fork of BaseJpegDecode by
Revision 4:7d88de31c55a, committed 2012-10-30
- Comitter:
- va009039
- Date:
- Tue Oct 30 15:35:36 2012 +0000
- Parent:
- 3:2709bbf8baae
- Child:
- 5:033432f9baf3
- Commit message:
- add simpleJpegDecode
Changed in this revision
--- a/BaseJpegDecode.lib Thu Oct 25 11:02:17 2012 +0000 +++ b/BaseJpegDecode.lib Tue Oct 30 15:35:36 2012 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/va009039/code/BaseJpegDecode/#bfbc18000cca +http://mbed.org/users/va009039/code/BaseJpegDecode/#5b1dd4e34857
--- a/Benchmark_data.h Thu Oct 25 11:02:17 2012 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,320 +0,0 @@ -#ifndef BENCHMARK_DATA_H -#define BENCHMARK_DATA_H - -// c270/cam0001.jpg 1830 -uint8_t c270_cam0001_jpg[] = { -0xff,0xd8,0xff,0xe0,0x00,0x21,0x41,0x56,0x49,0x31,0x00,0x01,0x01,0x01,0x00,0x78, -0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0xff,0xdb,0x00,0x43,0x00,0x24,0x18,0x1b,0x1f,0x1b,0x16, -0x24,0x1f,0x1d,0x1f,0x28,0x26,0x24,0x2a,0x36,0x5a,0x3a,0x36,0x31,0x31,0x36,0x6e, -0x4e,0x53,0x41,0x5a,0x82,0x72,0x89,0x87,0x80,0x72,0x7e,0x8d,0x90,0xa2,0xcf,0xaf, -0x90,0x99,0xc3,0x9b,0x7b,0x7e,0xb4,0xea,0xb6,0xc3,0xd5,0xdc,0xe7,0xea,0xe7,0x8b, -0xad,0xfe,0x10,0xfc,0xe1,0x0e,0xcf,0xe3,0xe7,0xde,0xff,0xdb,0x00,0x43,0x01,0x26, -0x28,0x28,0x36,0x2f,0x36,0x69,0x3a,0x3a,0x69,0xde,0x94,0x7e,0x94,0xde,0xde,0xde, -0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde, -0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde, -0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xff, -0xdd,0x00,0x04,0x00,0x0a,0xff,0xe0,0x00,0x04,0x00,0x00,0xff,0xc0,0x00,0x11,0x08, -0x00,0x78,0x00,0xa0,0x03,0x01,0x21,0x00,0x02,0x11,0x01,0x03,0x11,0x01,0xff,0xc4, -0x01,0xa2,0x00,0x00,0x01,0x05,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x01, -0x00,0x03,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00, -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x10,0x00,0x02,0x01, -0x03,0x03,0x02,0x04,0x03,0x05,0x05,0x04,0x04,0x00,0x00,0x01,0x7d,0x01,0x02,0x03, -0x00,0x04,0x11,0x05,0x12,0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,0x22,0x71,0x14, -0x32,0x81,0x91,0xa1,0x08,0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,0x24,0x33,0x62, -0x72,0x82,0x09,0x0a,0x16,0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,0x29,0x2a,0x34, -0x35,0x36,0x37,0x38,0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x53,0x54, -0x55,0x56,0x57,0x58,0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x73,0x74, -0x75,0x76,0x77,0x78,0x79,0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x92,0x93, -0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa, -0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8, -0xc9,0xca,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,0xe3,0xe4,0xe5, -0xe6,0xe7,0xe8,0xe9,0xea,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0x11, -0x00,0x02,0x01,0x02,0x04,0x04,0x03,0x04,0x07,0x05,0x04,0x04,0x00,0x01,0x02,0x77, -0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71, -0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0, -0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26, -0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48, -0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68, -0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87, -0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5, -0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3, -0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda, -0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8, -0xf9,0xfa,0xff,0xda,0x00,0x0c,0x03,0x01,0x00,0x02,0x11,0x03,0x11,0x00,0x3f,0x00, -0xc8,0xa5,0xa0,0x05,0x14,0xb4,0x00,0xa2,0x9c,0xb4,0x0c,0x52,0x69,0xc2,0x80,0x14, -0x1a,0x70,0x34,0xc0,0x50,0x69,0xd9,0xa4,0x01,0x9a,0x4c,0xd0,0x02,0x66,0x93,0x34, -0x00,0x99,0xa6,0x93,0x40,0xc6,0x93,0x4d,0x26,0x81,0x1f,0xff,0xd0,0xc9,0xa2,0x80, -0x16,0x96,0x80,0x16,0x9c,0xbd,0x28,0x18,0x1a,0x70,0xa0,0x05,0xa5,0x14,0x00,0xb9, -0xa5,0xcd,0x00,0x19,0xe2,0x8c,0xd0,0x03,0x73,0x49,0x9a,0x00,0x4c,0xd2,0x66,0x80, -0x1a,0x4d,0x34,0xd0,0x07,0xff,0xd1,0xc9,0xa2,0x80,0x16,0x96,0x80,0x0a,0x70,0xa4, -0xc6,0x80,0xf5,0xa7,0x53,0x00,0xcd,0x38,0x50,0x01,0x9a,0x5c,0xd0,0x00,0x68,0xa0, -0x06,0xe6,0x93,0x34,0x80,0x4c,0xd2,0x66,0x80,0x1b,0x49,0x40,0x1f,0xff,0xd2,0xca, -0xa2,0x80,0x01,0x4b,0x40,0x0b,0x4e,0x1d,0x29,0x31,0x88,0x7a,0xd3,0x8d,0x00,0x25, -0x38,0x53,0x00,0xef,0x4b,0x9a,0x40,0x04,0xd2,0x66,0x80,0x12,0x9b,0x40,0x09,0x49, -0x40,0x05,0x25,0x00,0x7f,0xff,0xd3,0xcb,0xc5,0x18,0xa0,0x03,0x14,0xb4,0x00,0x53, -0xc0,0xe2,0x93,0x1a,0x1a,0x7a,0xd3,0x8f,0x5a,0x00,0x4e,0xf4,0xa2,0x98,0x0a,0x68, -0xa4,0x02,0x1a,0x28,0x01,0xb4,0x50,0x03,0x68,0xa0,0x04,0xa2,0x81,0x1f,0xff,0xd4, -0xcf,0xdb,0x46,0xda,0x00,0x4c,0x51,0x8a,0x00,0x4c,0x53,0xc0,0xe2,0x93,0x1a,0x1a, -0x7e,0xf5,0x2d,0x00,0x27,0x7a,0x5a,0x60,0x06,0x8e,0xf4,0x80,0x0d,0x25,0x00,0x25, -0x25,0x00,0x25,0x14,0xc4,0x25,0x25,0x00,0x7f,0xff,0xd5,0xd6,0x36,0xb0,0x30,0x00, -0xc2,0x9f,0x95,0x44,0xfa,0x75,0xab,0x7f,0x01,0x5f,0xa1,0xa4,0x22,0x17,0xd1,0xe2, -0x3f,0x76,0x46,0x1f,0x51,0x9a,0x81,0xf4,0x77,0xfe,0x09,0x14,0xfd,0x78,0xa2,0xe1, -0x72,0x07,0xd2,0xee,0x57,0xa2,0x06,0xfa,0x1a,0x85,0xed,0xa5,0x8f,0xef,0x46,0xc3, -0xea,0x28,0x1a,0x64,0x25,0x4e,0xea,0x08,0xa0,0x63,0x47,0x5a,0x5a,0x00,0x43,0x45, -0x00,0x06,0x92,0x80,0x12,0x8a,0x04,0x25,0x14,0xc0,0x43,0x49,0x40,0x1f,0xff,0xd6, -0xdc,0xa2,0x91,0x24,0x25,0x6e,0x07,0xdd,0x91,0x1b,0xfd,0xe5,0xa4,0xdf,0x72,0xbd, -0x62,0x46,0xff,0x00,0x75,0xb1,0xfc,0xe8,0x00,0xfb,0x43,0x8f,0xbf,0x6f,0x20,0xfa, -0x60,0xd1,0xf6,0xb8,0x47,0xde,0x2c,0xbf,0xef,0x29,0x14,0x00,0x13,0x6b,0x37,0x53, -0x13,0x93,0xeb,0x8c,0xd3,0x1f,0x4f,0xb5,0x7f,0xf9,0x67,0x83,0xec,0x68,0x19,0x8b, -0x7d,0x6e,0x2d,0xae,0x9a,0x35,0xce,0xde,0xab,0x9f,0x4a,0x82,0x82,0x90,0x86,0x9a, -0x4f,0x34,0x00,0x1a,0x4c,0xd0,0x20,0xa2,0x80,0x0a,0x43,0x4c,0x06,0x93,0x49,0x48, -0x0f,0xff,0xd7,0xdb,0x1d,0x29,0x69,0x12,0x14,0x52,0x01,0x09,0xa4,0xef,0x83,0x4d, -0x12,0xc8,0x5d,0x10,0xc7,0xbb,0x6a,0x96,0x03,0x20,0xe3,0xbd,0x58,0xa6,0xc2,0x2c, -0xca,0xd6,0xe3,0x3f,0xbb,0x94,0x0e,0x39,0x52,0x7f,0x97,0xf5,0xac,0x93,0xd6,0xa4, -0xd1,0x08,0x69,0x86,0x98,0x05,0x14,0x00,0x0a,0x51,0x4c,0x04,0x34,0xd3,0x48,0x04, -0xa4,0xa0,0x0f,0xff,0xd0,0xdb,0x5f,0xba,0x29,0x69,0x12,0x21,0xc7,0x5a,0x42,0x45, -0x02,0x76,0x02,0x47,0x1c,0xe2,0x98,0xc7,0x9e,0xb8,0x3e,0xf5,0x49,0x10,0xdf,0x62, -0x13,0xe9,0x9a,0xb1,0x09,0xcc,0x28,0x7d,0xb1,0x44,0x87,0x02,0x1d,0x41,0x77,0x5a, -0x9f,0x66,0x07,0xf5,0xac,0x96,0x0b,0xcf,0x1c,0xd4,0x1a,0x15,0x26,0xe1,0xdb,0xe9, -0x50,0xe6,0x9a,0x18,0xb4,0x0a,0x60,0x02,0x96,0x90,0x08,0x69,0xa6,0x80,0x1b,0x45, -0x00,0x7f,0xff,0xd1,0xdb,0x4f,0xb8,0x29,0x69,0x12,0x14,0x9b,0x45,0x17,0x06,0xae, -0x21,0x8c,0x1e,0xe6,0x9a,0xd1,0x67,0xbd,0x3e,0x62,0x79,0x11,0x1b,0x5b,0x93,0xd1, -0xff,0x00,0x4a,0x96,0x24,0x29,0x1e,0xd2,0x41,0xe4,0xd0,0xdd,0xc6,0x95,0x86,0xdc, -0x61,0xa0,0x75,0xff,0x00,0x64,0xd6,0x14,0xd2,0x84,0x93,0x6f,0x3c,0x75,0xf7,0xa2, -0xc3,0x4c,0xad,0x23,0x6f,0x24,0xf4,0xcd,0x30,0x00,0x01,0xcf,0x5a,0x06,0x1b,0x78, -0xcd,0x14,0x0c,0x4c,0xd1,0x9a,0x40,0x25,0x21,0xa0,0x06,0xd1,0x40,0x1f,0xff,0xd2, -0xd8,0x59,0x50,0x28,0x05,0xc6,0x71,0xeb,0x4e,0x0e,0xad,0xd1,0x81,0xa4,0x48,0x02, -0x3b,0xe2,0x94,0x90,0x69,0x0e,0xc1,0xc7,0xf9,0x34,0x9c,0x63,0xad,0x31,0x07,0x18, -0xeb,0x4d,0x73,0xb5,0x73,0x9a,0x69,0x8a,0xc4,0x5b,0xb3,0xc5,0x64,0x4b,0x08,0x91, -0xf2,0x08,0x04,0x75,0xcd,0x36,0x08,0xaf,0x32,0x79,0x7c,0x71,0xf8,0x54,0x25,0xb8, -0xfa,0x54,0xdc,0xa1,0x09,0xa4,0xcd,0x03,0x13,0x34,0x50,0x01,0x41,0xa0,0x62,0x52, -0x50,0x23,0xff,0xd3,0x7d,0xa4,0x8e,0x22,0x6c,0x31,0xce,0xef,0xe8,0x2a,0x68,0xe7, -0x6d,0xc7,0xcc,0x6c,0x8c,0x54,0x83,0x24,0xf3,0xd7,0xfb,0xc2,0x97,0xcf,0x5f,0xef, -0x0f,0xce,0x9d,0xd0,0x83,0xce,0x5f,0xef,0x0f,0xce,0x9c,0x27,0x1f,0xde,0x14,0xb4, -0x0d,0x43,0xcf,0x1e,0xa2,0x99,0x2c,0xe0,0x0e,0x30,0x4d,0x21,0x89,0x1b,0x96,0xc1, -0x59,0x61,0x19,0x1f,0x75,0x8f,0x22,0xa2,0x16,0x52,0xf9,0x85,0x84,0x88,0x41,0xed, -0x54,0x22,0x1b,0xad,0x3e,0x77,0x20,0xae,0xdc,0x01,0xef,0xfe,0x15,0x4d,0xb4,0xeb, -0x91,0xfc,0x19,0xfc,0x68,0xb0,0x5c,0x61,0xb2,0xb9,0x1d,0x62,0x3f,0x98,0xa6,0xfd, -0x96,0x71,0xff,0x00,0x2c,0xda,0x8b,0x05,0xd0,0xdf,0xb3,0xcd,0x9f,0xf5,0x4f,0xff, -0x00,0x7c,0x9a,0x3c,0x89,0x47,0x58,0x9f,0xfe,0xf9,0x34,0x0c,0x43,0x1b,0x8e,0xa8, -0xdf,0x95,0x1e,0x54,0x9f,0xdc,0x6f,0xca,0x81,0x8d,0x64,0x61,0xd5,0x48,0xfa,0x8a, -0x6d,0x02,0x3f,0xff,0xd4,0x9b,0x4b,0x94,0x23,0x49,0xe6,0x15,0x03,0x03,0x15,0x73, -0xed,0x90,0x7b,0x7e,0x94,0xed,0x76,0x45,0xec,0x1f,0x6a,0x80,0xf4,0x5c,0xfe,0x14, -0xbe,0x7c,0x3f,0xf3,0xcc,0xff,0x00,0xdf,0x34,0x72,0x87,0x30,0x86,0x7b,0x7e,0xf1, -0xff,0x00,0xe3,0x94,0x9e,0x7d,0xa9,0xff,0x00,0x96,0x43,0xfe,0xf8,0xa3,0x94,0x2e, -0x1e,0x65,0xa1,0xff,0x00,0x96,0x43,0xfe,0xf8,0x14,0x9b,0xed,0x07,0xfc,0xb3,0x1f, -0x90,0xa3,0x90,0x5c,0xc5,0x6b,0xc1,0x13,0x95,0x78,0x14,0x86,0x07,0x04,0x01,0xda, -0xac,0x5a,0xf4,0x15,0x32,0x56,0x2e,0x2e,0xe5,0xb0,0x05,0x18,0xac,0xca,0x0c,0x7b, -0xd2,0x15,0xf7,0x34,0xb5,0x11,0x01,0x73,0xea,0x7f,0x3a,0x42,0xc7,0xd5,0xbf,0xef, -0xa3,0x53,0x76,0x5d,0x90,0xd2,0xc7,0xfb,0xcd,0xf9,0xd2,0x79,0x8f,0xfd,0xe3,0x45, -0xc0,0x69,0x95,0xff,0x00,0xbc,0x69,0x8c,0xc4,0xf5,0xc1,0xfa,0x8a,0x77,0x03,0xff, -0xd5,0x69,0xb4,0xb8,0x8c,0xfc,0xd1,0x31,0x1e,0xa3,0x9a,0xb9,0x60,0x57,0x0c,0x1d, -0x87,0xb0,0x22,0x86,0xf4,0xd0,0x9b,0x6a,0x5d,0x1e,0x5e,0x3a,0x0f,0xca,0x8f,0xdd, -0xff,0x00,0x74,0xff,0x00,0xdf,0x06,0xa2,0xcc,0x77,0x42,0xee,0x4e,0xca,0xdf,0xf7, -0xc1,0xa3,0x70,0xec,0x8d,0xf9,0x51,0x60,0xb8,0xb9,0xff,0x00,0xa6,0x67,0xf4,0xa4, -0x24,0x0f,0xf9,0x67,0xfc,0xa9,0xd8,0x0a,0x97,0xd2,0x7e,0xef,0x6a,0xa8,0xcb,0x1c, -0x70,0x41,0x34,0x96,0xe0,0xa6,0x32,0x0d,0x4b,0x29,0x17,0x15,0x87,0xad,0x3b,0x35, -0x20,0xd0,0xb4,0x50,0x22,0xab,0x75,0x34,0xd3,0x50,0x58,0xda,0x43,0x40,0xc6,0x93, -0x4c,0x26,0x98,0x8f,0xff,0xd9}; - -// vx700/cam0001.jpg 3104 -uint8_t vx700_cam0001_jpg[] = { -0xff,0xd8,0xff,0xc0,0x00,0x11,0x08,0x00,0x78,0x00,0xa0,0x03,0x01,0x21,0x00,0x02, -0x11,0x01,0x03,0x11,0x01,0xff,0xdb,0x00,0x84,0x00,0x0d,0x08,0x08,0x0d,0x08,0x08, -0x0d,0x0d,0x0d,0x0d,0x11,0x0d,0x0d,0x11,0x15,0x23,0x15,0x15,0x11,0x11,0x15,0x2b, -0x1e,0x1e,0x19,0x23,0x34,0x2b,0x34,0x34,0x2f,0x2b,0x2f,0x2f,0x39,0x3c,0x4e,0x45, -0x39,0x3c,0x4a,0x3c,0x2f,0x2f,0x45,0x60,0x45,0x4a,0x52,0x57,0x5b,0x5b,0x5b,0x34, -0x41,0x63,0x68,0x60,0x57,0x68,0x4e,0x57,0x5b,0x57,0x01,0x0d,0x11,0x11,0x15,0x11, -0x15,0x27,0x15,0x15,0x27,0x57,0x39,0x2f,0x39,0x57,0x57,0x57,0x57,0x57,0x57,0x57, -0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57, -0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57, -0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0x57,0xff,0xc4,0x01,0xa2,0x00, -0x00,0x01,0x05,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x01,0x00,0x03,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02, -0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x10,0x00,0x02,0x01,0x03,0x03,0x02, -0x04,0x03,0x05,0x05,0x04,0x04,0x00,0x00,0x01,0x7d,0x01,0x02,0x03,0x00,0x04,0x11, -0x05,0x12,0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,0x22,0x71,0x14,0x32,0x81,0x91, -0xa1,0x08,0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,0x24,0x33,0x62,0x72,0x82,0x09, -0x0a,0x16,0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,0x29,0x2a,0x34,0x35,0x36,0x37, -0x38,0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x53,0x54,0x55,0x56,0x57, -0x58,0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x73,0x74,0x75,0x76,0x77, -0x78,0x79,0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96, -0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4, -0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2, -0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8, -0xe9,0xea,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0x11,0x00,0x02,0x01, -0x02,0x04,0x04,0x03,0x04,0x07,0x05,0x04,0x04,0x00,0x01,0x02,0x77,0x00,0x01,0x02, -0x03,0x11,0x04,0x05,0x21,0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,0x13,0x22,0x32, -0x81,0x08,0x14,0x42,0x91,0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,0x15,0x62,0x72, -0xd1,0x0a,0x16,0x24,0x34,0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,0x27,0x28,0x29, -0x2a,0x35,0x36,0x37,0x38,0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x53, -0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x73, -0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a, -0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8, -0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,0xc6, -0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe2,0xe3,0xe4, -0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xff, -0xda,0x00,0x0c,0x03,0x01,0x00,0x02,0x11,0x03,0x11,0x00,0x00,0x00,0xe2,0x23,0xb8, -0x0a,0x1b,0x72,0xee,0x24,0x71,0x83,0x8c,0x56,0x93,0x6d,0xf1,0x1c,0xd6,0x56,0xf0, -0xaf,0x91,0x70,0x90,0x88,0x15,0x5b,0x94,0x6c,0x16,0x62,0xc4,0x8e,0x46,0x73,0xd3, -0x07,0xeb,0x4e,0x4b,0x5b,0x89,0x19,0x20,0x10,0xd8,0x23,0x07,0xd2,0xa4,0x1f,0x85, -0x03,0x1c,0x3a,0x7f,0x81,0xa6,0x3f,0xde,0xa0,0x00,0x52,0x8a,0x60,0x28,0xa5,0xa0, -0x02,0x96,0x80,0x16,0x8c,0xd0,0x01,0x9a,0x33,0x40,0x0a,0x1b,0x14,0xbe,0x65,0x02, -0x10,0x9c,0x9a,0x4c,0xd0,0x05,0x77,0x20,0x9e,0x39,0xc5,0x6a,0x78,0x51,0x4b,0x6b, -0xd6,0xa5,0x73,0xc3,0x13,0xc7,0xd0,0xd2,0x7f,0x0b,0x1a,0xdc,0xa9,0xa9,0xa0,0x8f, -0x55,0xbb,0x50,0x30,0x16,0x67,0x00,0x7f,0xc0,0x8d,0x44,0x3f,0x1a,0x10,0x96,0xc3, -0x87,0x27,0xff,0x00,0xad,0x51,0xb9,0xcb,0x1f,0xe9,0x40,0xc2,0x94,0x50,0x02,0x8a, -0x51,0x40,0x0b,0x46,0x69,0x80,0xb4,0x66,0x80,0x0c,0xd1,0x9a,0x00,0x33,0x46,0x68, -0x00,0xcd,0x19,0xa0,0x08,0x42,0x86,0x6c,0x03,0xc7,0xa9,0x15,0xd1,0xf8,0x2a,0xcd, -0x46,0xa8,0x24,0x2f,0x92,0x10,0xe0,0x0f,0xeb,0x51,0x36,0xed,0x64,0x34,0xb5,0x28, -0xf8,0xb2,0x1f,0x27,0xc4,0x57,0x23,0x18,0x56,0xda,0xc3,0xdf,0x2a,0x33,0xfa,0xe6, -0xb3,0x47,0x4f,0xfe,0xb5,0x35,0xb0,0x87,0x2e,0x3d,0xbf,0x3a,0x8d,0xfe,0xf5,0x30, -0x10,0x52,0xd0,0x02,0x8a,0x51,0x40,0x0b,0x46,0x68,0x01,0x68,0xa0,0x03,0x34,0x66, -0x98,0x05,0x19,0xa0,0x04,0xa3,0x34,0x01,0x2e,0x9f,0x6c,0x67,0x12,0xb7,0x65,0x1c, -0xfe,0x35,0xb5,0xe1,0x88,0xa5,0xb6,0xd5,0x21,0x66,0x4f,0x90,0x9d,0xa4,0xe4,0x77, -0x1c,0x7e,0xb5,0x8b,0x92,0x57,0x4c,0xbb,0x07,0x8f,0x61,0x2b,0xaa,0xc1,0x26,0x30, -0xad,0x08,0x19,0xf5,0x21,0x8e,0x7f,0x98,0xae,0x7c,0x73,0xdc,0x7e,0x75,0xa4,0x76, -0x20,0x78,0xce,0xd3,0xd7,0xf4,0xa8,0x5b,0xef,0x1a,0x60,0x14,0xb4,0x0c,0x5a,0x51, -0x40,0x85,0xa2,0x80,0x0a,0x28,0x00,0xcd,0x19,0xa0,0x02,0x90,0x9a,0x00,0x33,0x46, -0x69,0x81,0xb7,0xe1,0xbb,0x43,0x26,0x9d,0x78,0xf8,0xe1,0xbe,0x50,0x7e,0x9f,0xfe, -0xba,0xb5,0xa7,0xca,0x63,0x91,0x58,0x7f,0x09,0x06,0xb9,0x25,0xab,0x66,0xab,0x72, -0xcf,0x8f,0xa1,0x2d,0x0d,0x94,0xa3,0xa2,0x96,0x53,0xf8,0xe0,0x8f,0xe4,0x6b,0x93, -0x00,0xe7,0xbf,0xe9,0x5d,0x11,0xd8,0xc8,0x72,0xaf,0x24,0x63,0xff,0x00,0x1d,0xa8, -0x0f,0x53,0x54,0x00,0x29,0xc2,0x80,0x14,0x0a,0x50,0x29,0x00,0xb4,0x86,0x80,0x0a, -0x4c,0xd3,0x18,0x52,0x66,0x81,0x0b,0x9a,0x42,0x68,0x00,0xcd,0x26,0x69,0x81,0xda, -0xe8,0x50,0xaa,0x58,0x4e,0x80,0x0c,0xee,0xe4,0x0f,0x7f,0xf2,0x6b,0x3e,0x25,0xf2, -0xee,0x19,0x4f,0x63,0x5c,0x46,0xbd,0x4d,0xdd,0x5a,0x05,0xbe,0xd1,0x61,0x2e,0x03, -0xaa,0x95,0x63,0x9f,0xa6,0x3f,0xad,0x61,0xae,0x89,0x6c,0xe9,0xb4,0x46,0x54,0xff, -0x00,0x78,0x31,0x27,0xf5,0x35,0xd1,0x17,0xa1,0x9b,0xdc,0x56,0xf0,0xcc,0x7b,0x30, -0x8f,0x26,0xef,0x56,0x20,0xfe,0x98,0x15,0x85,0xaa,0xe9,0xff,0x00,0xd9,0xb7,0x42, -0x3d,0xfe,0x66,0x54,0x36,0x76,0xed,0xee,0x78,0xc6,0x4f,0xa5,0x52,0x64,0x95,0x05, -0x38,0x55,0x0c,0x51,0x4e,0xa4,0x01,0x4d,0x34,0x00,0x52,0x1a,0x06,0x14,0x53,0x10, -0x99,0xa3,0x34,0x0c,0x4c,0xd1,0x4c,0x47,0x63,0xa3,0x4d,0xb6,0xe1,0x93,0xb3,0xa9, -0xfc,0xc7,0x3f,0xe3,0x50,0x5e,0xaf,0x95,0x7c,0xde,0xfc,0xd7,0x1f,0x53,0x5e,0xa6, -0xd4,0x0c,0x2e,0x34,0x46,0x5f,0xee,0xe7,0xf4,0x39,0xac,0xc9,0x27,0x4b,0x70,0x1a, -0x49,0x15,0x17,0xa6,0x58,0xe2,0xb5,0x86,0xc6,0x72,0xdc,0xb4,0x92,0x49,0x14,0xa5, -0x1c,0x1d,0xc3,0xaa,0xb8,0xc1,0x18,0xed,0xed,0x54,0xf5,0xdd,0x11,0x75,0x2b,0x7f, -0x3a,0x10,0x45,0xc2,0x0c,0x01,0xfd,0xe1,0xfd,0xdf,0xf0,0x3f,0xe4,0x5e,0xc4,0x9c, -0x8e,0x29,0x40,0xab,0x18,0xf0,0x28,0xc5,0x20,0x03,0x48,0x45,0x00,0x18,0xa4,0x22, -0x81,0x89,0x48,0x69,0x80,0x52,0x66,0x80,0x13,0x34,0x66,0x80,0x3a,0x2b,0x4b,0x8f, -0xb3,0xdc,0x47,0x27,0xf7,0x4e,0x4f,0xd2,0xad,0xf8,0x82,0x32,0x8c,0x1c,0x75,0xae, -0x4e,0xa5,0xb2,0xdf,0x86,0xdb,0x75,0x94,0xd1,0xb1,0xca,0x9e,0x78,0x39,0xea,0x30, -0x7f,0x95,0x62,0x6a,0x13,0xbb,0x6a,0x20,0xa4,0x8d,0x13,0x42,0x41,0x46,0x43,0x82, -0x0f,0x5c,0xd6,0xa9,0xda,0xe3,0x82,0x52,0x9a,0x4c,0xd2,0xd1,0xa5,0x79,0xed,0x10, -0xbb,0x97,0x29,0xfb,0xb0,0x4f,0xf7,0x46,0x00,0x1f,0x90,0xc5,0x69,0xc6,0xd8,0xcf, -0xbd,0x55,0xef,0xa9,0x9c,0x95,0x9b,0x48,0xe4,0x35,0xfb,0x6f,0x23,0x55,0x94,0x81, -0x85,0x93,0xe7,0x1f,0x8f,0x5f,0xd7,0x35,0xa5,0xe1,0x0f,0x08,0xaf,0x8a,0x1a,0x75, -0x37,0x62,0xd9,0xa3,0x00,0xa8,0xf2,0xf7,0xee,0xf5,0xee,0x31,0x8c,0x8f,0xce,0xaf, -0xa0,0x91,0xab,0x27,0xc2,0x7d,0x4c,0x4a,0x42,0x5c,0x59,0xb4,0x7d,0x99,0x9d,0xc1, -0x3f,0x86,0xd3,0xfc,0xea,0xb5,0xef,0xc3,0x2d,0x66,0xd5,0x41,0x8e,0x38,0xae,0xc9, -0xed,0x0c,0xa0,0x11,0xff,0x00,0x7d,0x6d,0xa1,0x79,0x81,0x55,0xfe,0x1f,0xeb,0x89, -0x19,0x76,0xb0,0x6c,0x01,0x9c,0x09,0x10,0x9f,0xc8,0x35,0x67,0x0f,0x0d,0xea,0x8c, -0x48,0x1a,0x65,0xef,0x1e,0xb6,0xce,0x3f,0xa5,0x03,0x29,0x4f,0x0b,0x5b,0x4c,0x62, -0x95,0x4c,0x52,0x8e,0xa8,0xe3,0x0c,0x3f,0x0a,0x61,0x5a,0x6d,0x58,0x3c,0xc6,0xe2, -0x90,0x8a,0x40,0x26,0x28,0x22,0x98,0x0d,0x22,0x92,0x80,0x36,0x95,0xab,0x52,0xe5, -0xfe,0xd3,0xa5,0xa3,0x77,0x5c,0x29,0xfc,0x2b,0x94,0xb1,0x3c,0x3b,0x29,0x8e,0x77, -0x42,0x4f,0xcc,0xa7,0x83,0x54,0xb5,0x9d,0x35,0xe7,0xbd,0x91,0xa3,0x46,0x25,0x89, -0x20,0xa8,0xfd,0x0f,0x35,0xa2,0x64,0xb3,0x57,0x4f,0xb6,0x16,0x76,0xeb,0x10,0x39, -0xda,0x39,0x3e,0xa6,0xad,0x03,0xc5,0x51,0x27,0x35,0xe2,0x4e,0x6f,0xd3,0xfe,0xb9, -0x8f,0xe6,0x6b,0xa6,0xf8,0x52,0xea,0x9a,0x8c,0xa0,0xf5,0x68,0xd8,0x0f,0xcd,0x4f, -0xf4,0xab,0xe8,0x08,0xf4,0xaa,0x8a,0xe2,0x41,0x6f,0x14,0x93,0x3b,0xb0,0x8d,0x10, -0xb1,0x0a,0xb9,0xc0,0x1c,0x92,0x00,0x19,0x34,0x80,0xc8,0x5f,0x1c,0xe8,0xd2,0x49, -0xe5,0xad,0xf0,0x56,0x3c,0x02,0xf1,0x38,0x5f,0xc4,0x90,0x07,0xeb,0x56,0xd3,0xc4, -0x5a,0x6e,0x32,0xda,0x9d,0x91,0x18,0x1d,0x26,0x51,0xfd,0x69,0x8c,0x9a,0xdb,0x52, -0x8a,0xff,0x00,0x2d,0x69,0x35,0xb5,0xcc,0x60,0xe3,0x74,0x73,0x06,0xfa,0xf4,0x06, -0xa0,0xd5,0xb4,0xcb,0x39,0xdd,0x65,0x9b,0x48,0x8f,0x51,0x97,0xa6,0x7c,0xa8,0x99, -0x87,0xe2,0xe4,0x50,0x92,0xe6,0xb3,0x63,0x69,0xa7,0xa9,0x9f,0xab,0x78,0x53,0x41, -0x92,0x25,0x96,0xe3,0x4b,0x2b,0x8f,0xe1,0xb5,0x8d,0xc1,0xfc,0x44,0x55,0x8f,0xa8, -0x78,0x23,0xc3,0xf7,0x16,0xe2,0x55,0x33,0xe9,0x68,0x3f,0x8a,0x57,0x31,0x67,0xfe, -0xfe,0x03,0x4d,0x37,0x2d,0x09,0x7a,0x68,0x8c,0x8b,0x8f,0x01,0xd8,0x5d,0x44,0x5b, -0x4f,0xbf,0x69,0x02,0x9c,0x17,0xdc,0xb2,0x8c,0xff,0x00,0xc0,0x71,0x5c,0xd6,0xb9, -0xa2,0x49,0xa2,0x5c,0xac,0x6c,0xde,0x62,0x30,0xca,0xbe,0x31,0x9f,0x51,0x8f,0xf3, -0xda,0x9b,0x56,0xd0,0x4a,0xf7,0xb3,0x33,0x69,0x0d,0x22,0x8d,0x58,0xe5,0x56,0xe8, -0x6b,0x4e,0xc1,0xbc,0xcb,0x79,0xa2,0x27,0xb6,0xe1,0xfd,0x7f,0xa5,0x73,0xb4,0xd1, -0x57,0xb8,0xba,0x74,0x9b,0x27,0x5e,0xdc,0xe2,0xad,0xc8,0x81,0xe4,0x27,0x2d,0xcf, -0xa3,0x11,0x54,0x89,0x91,0x24,0x4b,0x82,0x7f,0xad,0x48,0x78,0x06,0xa8,0x93,0x9a, -0xd7,0xce,0xeb,0xf1,0xec,0x80,0x7e,0xa6,0xb6,0xbe,0x1c,0xca,0xb1,0x6b,0xd0,0xee, -0x38,0x1b,0xb0,0x33,0xea,0x55,0x80,0xaa,0x29,0x1e,0xb1,0x41,0x19,0x14,0x08,0xe2, -0x35,0x4b,0x0b,0x79,0x25,0x96,0x49,0x21,0x8c,0xc8,0x01,0xe1,0x90,0x30,0xc8,0xfa, -0x83,0x59,0xf7,0x3a,0x5d,0xad,0xf8,0xe2,0x28,0xe1,0x1b,0x41,0xc2,0x20,0x5e,0xa3, -0xdb,0x15,0xaa,0x7d,0x4e,0x5e,0xa5,0x13,0xa4,0x58,0xfd,0x9c,0xe6,0x0c,0x48,0x33, -0x92,0x1d,0x8f,0x23,0xea,0x6a,0x84,0xba,0x4c,0x31,0x32,0xb0,0x79,0x40,0x24,0x63, -0x6b,0x01,0x8f,0xd2,0xa7,0x43,0x45,0x26,0x29,0xd4,0xb5,0x38,0xc0,0x11,0xea,0x57, -0x88,0x83,0x8c,0x19,0xd8,0xe3,0xf0,0xc8,0xa9,0xad,0xbc,0x51,0xaa,0xd9,0x48,0xa5, -0xaf,0xe4,0xb9,0x8d,0x58,0x16,0x8e,0x61,0xb8,0x30,0xee,0x32,0x72,0x47,0x1e,0x94, -0x9e,0xc6,0x9c,0xda,0x59,0x9d,0x7b,0x5e,0xa4,0x32,0x2c,0xa1,0xc3,0x41,0x26,0x03, -0x39,0x38,0x1b,0x4f,0x46,0xfc,0x09,0x07,0xe8,0x5b,0xd6,0xb1,0xbc,0x49,0x0c,0x1a, -0xa5,0xb4,0xd6,0xfb,0x94,0x4d,0x1e,0x4a,0xee,0x38,0x21,0x87,0x6e,0x7f,0x2a,0x6c, -0x47,0x9f,0x9a,0x69,0xa9,0x34,0x2e,0xa5,0xa9,0x53,0xc3,0x56,0x9e,0x9c,0xc6,0x29, -0x94,0x13,0x90,0x46,0xd3,0x59,0xc9,0xdd,0x58,0x11,0x3c,0x31,0x11,0x34,0xac,0x01, -0xe3,0xb8,0xab,0xa0,0xf3,0x49,0x09,0x92,0x46,0x73,0x9f,0xad,0x3d,0x8f,0x06,0xa8, -0x0e,0x5f,0x5a,0x6c,0xea,0x32,0x7b,0x00,0x3f,0x4a,0xbf,0xe0,0xf9,0x96,0x3d,0x5a, -0xdc,0xb9,0x01,0x44,0xd1,0xb1,0x27,0xb0,0x0d,0x54,0x34,0x7b,0x3d,0x14,0x08,0xe0, -0xf5,0xa5,0x55,0xd6,0x6f,0x56,0x62,0x37,0x6e,0xca,0x82,0x7a,0x67,0x9f,0xea,0x2a, -0x83,0xcc,0x24,0xda,0x32,0x54,0x6d,0xfe,0x13,0x8a,0xd3,0xa1,0x83,0xdc,0xaa,0xb3, -0x04,0xf3,0x17,0x24,0xfc,0xd9,0xf5,0xeb,0x54,0xe7,0x72,0x61,0x3c,0xf4,0xed,0x52, -0xc6,0x8a,0xcc,0xe4,0xee,0xda,0x78,0x3c,0xf2,0x2a,0x03,0x30,0x20,0x71,0x41,0x47, -0x47,0xa2,0x5e,0x0b,0xbd,0x23,0xc9,0x66,0xcb,0x47,0x98,0x88,0xcf,0x3b,0x7b,0x1f, -0xd7,0x1f,0x85,0x69,0x59,0x5c,0xc7,0x7f,0x09,0x49,0xed,0x6d,0x6e,0x64,0x53,0xb5, -0xcd,0xd7,0xf1,0x11,0x80,0x70,0x48,0x3d,0x78,0x3f,0x89,0xa6,0x33,0x92,0xf1,0x9e, -0x96,0xb6,0x57,0xa9,0x3c,0x56,0xf1,0xdb,0x43,0x30,0xe2,0x38,0x9c,0x32,0x86,0x18, -0xce,0x30,0x06,0x07,0x23,0x8f,0x5c,0xd7,0x3e,0x6a,0x57,0x62,0xd6,0xc6,0x84,0x33, -0x07,0xe8,0x6a,0xe5,0xbe,0x49,0xcd,0x43,0x03,0x52,0x01,0xf2,0x13,0xfd,0xee,0x69, -0x41,0xa4,0xb6,0x13,0x24,0x8b,0x80,0x4f,0xa9,0xa7,0x96,0xf9,0x4d,0x50,0x1c,0xbe, -0xae,0x73,0xa8,0xcd,0xf8,0x7f,0x21,0x4b,0xa5,0xb1,0x13,0x3e,0x0e,0x3e,0x43,0xfc, -0xc5,0x32,0x8f,0x71,0x17,0xb1,0x9e,0xf5,0x24,0x73,0x24,0xd9,0xda,0x73,0x8a,0x76, -0xd2,0xe2,0x38,0x8f,0x19,0x45,0xe5,0x6b,0x4e,0xcd,0x86,0xf3,0x11,0x59,0x78,0xe8, -0x31,0x8f,0xe6,0x0d,0x73,0xf2,0xcc,0x92,0x7c,0xa4,0x0c,0x50,0x8c,0x9a,0xd4,0xae, -0x25,0x54,0x62,0x17,0x8c,0xd4,0x12,0xc8,0x09,0x23,0x34,0xc0,0xae,0xec,0x3d,0x48, -0xc7,0xbd,0x44,0xdc,0x77,0xa4,0x32,0xf6,0x85,0x76,0x6d,0xee,0xda,0x32,0x7e,0x49, -0x57,0x18,0xcf,0x1b,0x87,0x20,0xff,0x00,0x31,0xf8,0xd5,0xeb,0x99,0x3c,0xb9,0x89, -0xc9,0xc3,0x8c,0xfe,0x23,0xff,0x00,0xad,0x4c,0x0c,0xcd,0x4d,0x44,0xf6,0x84,0x01, -0xca,0xfc,0xc3,0x15,0x84,0x7a,0xd0,0x5a,0x2c,0x40,0x3e,0x41,0x5b,0x16,0x29,0xfb, -0xb5,0xcd,0x43,0x19,0xa4,0xbf,0x2c,0x78,0x14,0x80,0xf3,0x48,0x91,0xf1,0x1c,0xa5, -0x38,0x9f,0x94,0xd3,0x19,0xcd,0x6a,0xff,0x00,0xf2,0x10,0x97,0xf0,0xfe,0x42,0x9b, -0xa7,0xbe,0xdb,0x80,0x3f,0xbc,0x08,0xa6,0x51,0xe8,0x70,0x6a,0xa5,0xa0,0x43,0x9e, -0xaa,0x0d,0x6b,0x78,0x6e,0xff,0x00,0xcf,0xbe,0x74,0x2d,0xc6,0xc2,0x70,0x4f,0x53, -0x91,0xff,0x00,0xd7,0xaa,0x23,0xa9,0x2f,0x88,0xbc,0x30,0x35,0xab,0x85,0x98,0x5c, -0x18,0x58,0x26,0xcc,0x79,0x7b,0x81,0xe4,0x91,0xdf,0xdc,0xd7,0x33,0x75,0xe0,0x7b, -0xb8,0xa4,0x06,0x3b,0xab,0x52,0x3d,0x64,0x66,0x53,0xf9,0x6d,0x34,0x90,0x35,0x72, -0xa9,0xf0,0x55,0xe2,0xe0,0xb5,0xd5,0x98,0xfa,0x3b,0x9f,0xfd,0x92,0xab,0xdc,0x78, -0x3e,0xe5,0x3e,0x65,0xb9,0xb5,0x93,0xd9,0x59,0xb3,0xfa,0xa8,0xaa,0x5a,0xbd,0x49, -0x7a,0x2d,0x0c,0xe9,0x74,0x1b,0xf0,0xf8,0xf2,0x32,0x3d,0x7c,0xc4,0x03,0xf5,0x34, -0xcf,0xf8,0x47,0xaf,0x98,0x7f,0xab,0x8c,0x7d,0x67,0x8f,0xff,0x00,0x8a,0xa6,0xd2, -0x4f,0x46,0x34,0x40,0xda,0x6d,0xdd,0xab,0x86,0xf2,0xc6,0xe5,0x3b,0x86,0xd7,0x0d, -0xc8,0xfa,0x1a,0xd3,0xba,0x1b,0xe3,0x3c,0x60,0x8f,0x98,0x0c,0xe7,0x15,0x36,0x03, -0x39,0x9f,0x06,0xb1,0xa7,0x4f,0x2e,0x66,0x5e,0xc0,0xf1,0x41,0x48,0x9e,0x11,0x85, -0x5a,0xdc,0xb3,0x8f,0xe4,0x51,0xed,0x50,0xc6,0xcd,0x05,0x85,0x99,0x78,0x14,0xc3, -0x64,0x01,0xdc,0x63,0x19,0xeb,0x9c,0x52,0xb9,0x04,0x8b,0x1e,0xd5,0x03,0xbf,0xa5, -0x35,0xf8,0x06,0xa9,0x14,0x73,0x5a,0xb1,0xcd,0xfc,0xbf,0x87,0xf2,0x15,0x1d,0x8f, -0x37,0x49,0xf8,0xff,0x00,0x2a,0x0a,0x3a,0x7b,0x7b,0x82,0x2d,0xe2,0x19,0xfe,0x11, -0xfc,0xa9,0xe6,0xe4,0x8e,0xf4,0xc8,0x11,0xaf,0x58,0x0f,0xbe,0x40,0xfa,0xd4,0x62, -0xfe,0x46,0xc6,0x19,0xbf,0x3a,0x96,0xc7,0x6b,0xea,0x1f,0xdb,0x17,0x76,0xe7,0xe4, -0xb8,0x9d,0x4f,0xa2,0xb9,0x1f,0xd6,0x92,0x5d,0x7a,0xf4,0xaf,0xcd,0x79,0x72,0x7d, -0x8c,0xad,0xfe,0x35,0x56,0xba,0xb8,0x6a,0x55,0x7d,0x4a,0x59,0x5b,0x2d,0x33,0xb1, -0xf5,0x66,0x26,0x9b,0xfd,0xa3,0x2a,0x1c,0x6f,0xfc,0xc6,0x69,0x05,0xd8,0x36,0xa9, -0x36,0x39,0x65,0xff,0x00,0xbe,0x17,0xfc,0x2a,0x26,0xbf,0x94,0x8c,0xee,0x1f,0xf7, -0xc8,0xff,0x00,0x0a,0x12,0x48,0x9b,0x15,0xe5,0x94,0xca,0xe5,0x8e,0x32,0x7d,0x00, -0x03,0xf2,0x15,0x42,0xfd,0x7e,0x65,0x6f,0xc2,0x98,0xd1,0x24,0x4b,0xd0,0x56,0x9d, -0xae,0xa0,0xf0,0xde,0x6c,0xc2,0xbc,0x64,0x81,0xc8,0xe9,0x52,0xca,0x35,0x3f,0xb4, -0x99,0x48,0xc9,0x54,0x1e,0xc2,0xb4,0xe0,0xd3,0xa6,0xbb,0x88,0x3f,0x9f,0x80,0x7f, -0xba,0xb9,0x1f,0xcc,0x56,0x62,0x2b,0xea,0xda,0x65,0xc5,0x95,0xb1,0x97,0xcd,0x57, -0x8c,0x75,0xca,0xe1,0xbf,0xcf,0xe3,0x59,0x16,0xd7,0x26,0x59,0x1d,0x49,0xc8,0x03, -0x81,0x57,0x10,0x31,0x75,0x26,0xdd,0x7b,0x29,0xf7,0xa8,0x61,0x62,0xb2,0xa1,0x1f, -0xde,0x15,0x45,0x23,0xa2,0x49,0x40,0x8d,0x39,0xec,0x29,0x0c,0xc3,0xd6,0xa1,0xb2, -0x6c,0x3e,0xde,0xed,0xad,0xee,0x62,0x96,0x37,0x08,0xe8,0x72,0x18,0x9e,0x9c,0x11, -0xdb,0xeb,0x5a,0x83,0xc4,0xf7,0x40,0xff,0x00,0xc7,0xcc,0x63,0xf1,0x6f,0xf0,0xa5, -0x71,0xab,0xa1,0x47,0x89,0xee,0x14,0x93,0xf6,0xa8,0xf9,0x39,0xfe,0x3f,0xfe,0x26, -0x9d,0xff,0x00,0x09,0x44,0xc7,0x04,0xde,0x45,0xc1,0xc8,0xce,0xff,0x00,0xfe,0x27, -0xdc,0xd2,0x72,0x7d,0x07,0xaf,0x60,0x7f,0x14,0xca,0x7a,0xde,0x44,0xdf,0xf7,0xf3, -0xff,0x00,0x89,0xaa,0xe7,0xc4,0x41,0x54,0x2e,0xe8,0x0a,0x8e,0x00,0xd8,0xdc,0x0f, -0xfb,0xe6,0x97,0x34,0xbb,0x13,0xaf,0x62,0x16,0xd7,0xe2,0x27,0x26,0x28,0x09,0xff, -0x00,0xae,0x7f,0xfd,0x6a,0xad,0x7f,0xab,0x43,0x79,0x6c,0xf1,0xf9,0x30,0xa1,0x3c, -0x86,0x54,0xc1,0x07,0xf2,0xab,0x4e,0xe2,0xf9,0x18,0xc7,0x3e,0x95,0x1d,0xcc,0x4c, -0xd0,0x31,0x2a,0x78,0xe7,0x38,0xab,0xb8,0xc0,0xff,0xd9,0x78,0xe7,0x38,0xab,0xb8, -}; - -#endif // BENCHMARK_DATA_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FatFileSystemCpp.lib Tue Oct 30 15:35:36 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/igorsk/code/FatFileSystemCpp/#88f22c32a456
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SimpleJpegDecode.cpp Tue Oct 30 15:35:36 2012 +0000 @@ -0,0 +1,92 @@ +#include "SimpleJpegDecode.h" + +#define DBG(...) do{fprintf(stderr,"[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);fprintf(stderr,__VA_ARGS__);} while(0); +#define ASSERT(A) while(!(A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);}; + +SimpleJpegDecode::SimpleJpegDecode() +{ + for(int i = 0; i < 6; i++) { + m_block_data[i] = new uint8_t[64]; + ASSERT(m_block_data[i]); + } + clearOnResult(); +} + +void SimpleJpegDecode::output(int mcu, int block, int scan, int value) +{ + int sc = (block < m_yblocks) ? 0 : 1; + inputBLOCK(mcu, block, scan, value * qt[sc][scan]); +} + +void SimpleJpegDecode::outputDC(int mcu, int block, int value) +{ + output(mcu, block, 0, value); + DC_count++; +} + +void SimpleJpegDecode::outputAC(int mcu, int block, int scan, int value) +{ + output(mcu, block, scan, value); + AC_count++; +} + +void SimpleJpegDecode::outputMARK(uint8_t c) +{ +} + +void SimpleJpegDecode::outputBLOCK(int mcu, int block, uint8_t* values) +{ + BLOCK_count++; + + memcpy(m_block_data[block], values, 64); + if (block < m_yblocks+1) { + return; + } + int mcu_x = mcu % (width/16); + int mcu_y = mcu / (width/16); + uint8_t yuv[3]; + if (m_yblocks == 2) { + for(int y = 0; y < 8; y++) { + for(int x = 0; x < 16; x++) { + yuv[0] = m_block_data[x/8][y*8+x%8]; + yuv[1] = m_block_data[2][y*8+x/2]; + yuv[2] = m_block_data[3][y*8+x/2]; + onResult(mcu_x * 16 + x, mcu_y * 8 + y, yuv); + } + } + } else if (m_yblocks == 4) { + for(int y = 0; y < 16; y++) { + for(int x = 0; x < 16; x++) { + int block = (y/8)*2+x/8; + yuv[0] = m_block_data[block][(y%8)*8+x%8]; + yuv[1] = m_block_data[4][(y/2)*8+x/2]; + yuv[2] = m_block_data[5][(y/2)*8+x/2]; + onResult(mcu_x * 16 + x, mcu_y * 16 + y, yuv); + } + } + } else { + ASSERT(m_yblocks == 2 || m_yblocks == 4); + } +} + +void SimpleJpegDecode::onResult(int x, int y, uint8_t* yuv) +{ + if(m_pCbItem && m_pCbMeth) + (m_pCbItem->*m_pCbMeth)(x, y, yuv); + else if(m_pCb) + m_pCb(x, y, yuv); +} + +void SimpleJpegDecode::setOnResult( void (*pMethod)(int, int, uint8_t*) ) +{ + m_pCb = pMethod; + m_pCbItem = NULL; + m_pCbMeth = NULL; +} + +void SimpleJpegDecode::clearOnResult() +{ + m_pCb = NULL; + m_pCbItem = NULL; + m_pCbMeth = NULL; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SimpleJpegDecode.h Tue Oct 30 15:35:36 2012 +0000 @@ -0,0 +1,48 @@ +#ifndef SIMPLE_JPEG_DECODE_H +#define SIMPLE_JPEG_DECODE_H + +#include "BaseJpegDecode.h" +#include "inverseDCT.h" + +class SimpleJpegDecode : public BaseJpegDecode, public inverseDCT { +public: + SimpleJpegDecode(); + void output(int mcu, int block, int scan, int value); + virtual void outputDC(int mcu, int block, int value); + virtual void outputAC(int mcu, int block, int scan, int value); + virtual void outputMARK(uint8_t c); + virtual void outputBLOCK(int muc, int block, uint8_t* values); // iDCT + + uint8_t* m_block_data[6]; + int DC_count; + int AC_count; + int BLOCK_count; + + ///Setups the result callback + /** + @param pMethod : callback function + */ + void setOnResult( void (*pMethod)(int, int, uint8_t*) ); + + ///Setups the result callback + /** + @param pItem : instance of class on which to execute the callback method + @param pMethod : callback method + */ + class CDummy; + template<class T> + void setOnResult( T* pItem, void (T::*pMethod)(int, int, uint8_t*) ) + { + m_pCb = NULL; + m_pCbItem = (CDummy*) pItem; + m_pCbMeth = (void (CDummy::*)(int, int, uint8_t*)) pMethod; + } + void clearOnResult(); +protected: + void onResult(int x, int y, uint8_t* yuv); + CDummy* m_pCbItem; + void (CDummy::*m_pCbMeth)(int, int, uint8_t*); + void (*m_pCb)(int, int, uint8_t*); +}; + +#endif // SIMPLE_JPEG_DECODE_H \ No newline at end of file
--- a/benchmark_BaseJpegDecode.cpp Thu Oct 25 11:02:17 2012 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -#if 0 -#include "mbed.h" -#include "BaseJpegDecode.h" -#include "Benchmark_data.h" - -#define DBG(...) do{fprintf(stderr,"[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);fprintf(stderr,__VA_ARGS__);} while(0); -#define ASSERT(A) while(!(A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);}; - -Serial pc(USBTX, USBRX); - -class JpegDecode : public BaseJpegDecode { -public: - JpegDecode(); - virtual void outputDC(int mcu, int block, int value); - virtual void outputAC(int mcu, int block, int scan, int value); - virtual void outputMARK(uint8_t c); - int DC_count; - int AC_count; -}; - -JpegDecode::JpegDecode() -{ - DC_count = 0; - AC_count = 0; -} - -void JpegDecode::outputDC(int mcu, int block, int value) -{ - DC_count++; -} - -void JpegDecode::outputAC(int mcu, int block, int scan, int value) -{ - AC_count++; -} - -void JpegDecode::outputMARK(uint8_t c) -{ -} - -JpegDecode* decode; - -void benchmark(uint8_t* image, int size) -{ - decode->DC_count = 0; - decode->AC_count = 0; -#ifdef JPEG_USE_REPORT_CODE - decode->report_scan_count = 0; - decode->report_scan_dc_count = 0; - decode->report_scan_ac_count = 0; -#endif - Timer t; - t.reset(); - t.start(); - decode->clear(); - for(int i = 0; i < size; i++) { - decode->input(image[i]); - } - t.stop(); - - printf("%p %d bytes\n", image, size); - for(int tq = 0; tq < 2; tq++) { - printf("DQT(%d):", tq); - for(int i = 0; i < 64; i++) { - printf(" %d", decode->qt[tq][i]); - } - printf("\n"); - } - printf("SOF0: width: %d height: %d yblocks: %d\n", decode->width, decode->height, decode->m_yblocks); - printf("Scan: DC: %d AC: %d\n", decode->DC_count, decode->AC_count); -#ifdef JPEG_USE_REPORT_CODE - printf("report: scan_count: %d\n", decode->report_scan_count); - printf("report: scan_dc_count: %d\n", decode->report_scan_dc_count); - printf("report: scan_ac_count: %d\n", decode->report_scan_ac_count); -#endif - printf("benchmark: %d ms\n", t.read_ms()); -} - -int main() { - pc.baud(921600); - printf("%s\n", __FILE__); - - decode = new JpegDecode; - ASSERT(decode); - - benchmark(c270_cam0001_jpg, sizeof(c270_cam0001_jpg)); - benchmark(vx700_cam0001_jpg, sizeof(vx700_cam0001_jpg)); - - printf("----\n"); - exit(1); -} - -#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bmp24.h Tue Oct 30 15:35:36 2012 +0000 @@ -0,0 +1,64 @@ +#ifndef BMP24_H +#define BMP24_H + +#define BMP24_WIDTH (16*4) +#define BMP24_HEIGHT (16*3) + +class bmp24 { +public: + bmp24() { + m_width = BMP24_WIDTH; + m_height = BMP24_HEIGHT; + } + + void clear() { + memset(m_bitmap, 0, sizeof(m_bitmap)); + } + + void point(int x, int y, uint8_t* rgb) { + if (x >= 0 && x < m_width && y >= 0 && y < m_height) { + int pos = y*m_width*3+x*3; + m_bitmap[pos++] = rgb[0]; + m_bitmap[pos++] = rgb[1]; + m_bitmap[pos] = rgb[2]; + } + } + + void LE32write(uint8_t* buf, int value) { + *buf++ = value & 0xff; + *buf++ = (value>>8) & 0xff; + *buf++ = (value>>16) & 0xff; + *buf = (value>>24) & 0xff; + } + + void writeFile(const char *path) { + FILE *fp = fopen(path, "wb"); + if (fp == NULL) { + return; + } + uint8_t header[] = { +0x42,0x4d,0x36,0xe1,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00, +0x00,0x00,0xa0,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x01,0x00,0x18,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00}; + int file_size = sizeof(header) + sizeof(m_bitmap); + LE32write(header+2, file_size); + LE32write(header+18, m_width); + LE32write(header+22, m_height); + + fwrite(header, 1, sizeof(header), fp); + for(int y = m_height-1; y >=0; y--) { + for(int x = 0; x < m_width; x++) { + fputc(m_bitmap[y*m_width*3+x*3+2], fp); + fputc(m_bitmap[y*m_width*3+x*3+1], fp); + fputc(m_bitmap[y*m_width*3+x*3+0], fp); + } + } + fclose(fp); + } + int m_width; + int m_height; + uint8_t m_bitmap[BMP24_WIDTH*BMP24_HEIGHT*3]; +}; + +#endif // BMP24_H
--- a/example1_c270.cpp Thu Oct 25 11:02:17 2012 +0000 +++ b/example1_c270.cpp Tue Oct 30 15:35:36 2012 +0000 @@ -9,7 +9,7 @@ // Logitech C270 #define WIDTH 320 -#define HEIGHT 240 +#define HEIGHT 176 #define THRESHOLD 100
--- a/example2_c270.cpp Thu Oct 25 11:02:17 2012 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -#if 0 -// -// dump YCrCb -// [Y0, Y1], -// (Cr, Cb), -// -#include "mbed.h" -#include "BaseJpegDecode.h" -#include "uvc.h" -#include "Terminal.h" - -// Logitech C270 -#define WIDTH 160 -#define HEIGHT 120 - -#define ASSERT(A) while(!(A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);}; - -DigitalOut led1(LED1), led2(LED2), led3(LED3), led4(LED4); -Terminal term(USBTX, USBRX); - -class Decode1 : public BaseJpegDecode { -public: - int16_t m_y0[WIDTH/16*HEIGHT/8]; - int16_t m_y1[WIDTH/16*HEIGHT/8]; - int16_t m_cb[WIDTH/16*HEIGHT/8]; - int16_t m_cr[WIDTH/16*HEIGHT/8]; - virtual void outputDC(int mcu, int block, int value) { - if (mcu >= (WIDTH/16*HEIGHT/8)) { - return; - } - switch(block) { // 0-1:Y 2:Cb 3:Cr - case 0: m_y0[mcu] = value * qt[0][0]; break; - case 1: m_y1[mcu] = value * qt[0][0]; break; - case 2: m_cb[mcu] = value * qt[1][0]; break; - case 3: m_cr[mcu] = value * qt[1][0]; break; - } - } - virtual void outputAC(int mcu, int block, int scan, int value){}; - virtual void outputMARK(uint8_t c){ - if (c == 0xd9) { // EOI - led2 = !led2; - } - }; -}; - -Decode1* decode = NULL; - -void callback_motion_jpeg(uint16_t frame, uint8_t* buf, int len) -{ - if (decode) { - decode->input(buf+12, len-12); - } - led1 = buf[1]&1; // FID -} - -int main() { - term.baud(921600); - printf("%s\n", __FILE__); - - decode = new Decode1; - ASSERT(decode); - uvc* cam = new uvc; - ASSERT(cam); - cam->SetImageSize(WIDTH, HEIGHT); - cam->SetFrameInterval(2000000); // 5.0fps - cam->setOnResult(callback_motion_jpeg); - ASSERT(cam->setup() >= 0); - term.cls(); - while(1) { - int column = 0; - for(int y = 0; y < HEIGHT/8; y++) { - term.locate(0, column++); - for(int x = 0; x < WIDTH/16; x++) { - int mcu = y*WIDTH/16+x; - term.printf("%+4d,%+4d,", decode->m_y0[mcu], decode->m_y1[mcu]); - cam->poll(); - } - term.locate(0, column++); - for(int x = 0; x < WIDTH/16; x++) { - int mcu = y*WIDTH/16+x; - term.printf("%+4d,%+4d,", decode->m_cb[mcu], decode->m_cr[mcu]); - cam->poll(); - } - } - cam->wait_ms(500); - led3 = !led3; - } -} -#endif
--- a/example3_c270.cpp Thu Oct 25 11:02:17 2012 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -#if 0 -// -// view webcam -// -#include "mbed.h" -#include "BaseJpegDecode.h" -#include "uvc.h" -#include "Terminal.h" - -// Logitech C270 -#define WIDTH 320 -#define HEIGHT 176 - -#define ASSERT(A) while(!(A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);}; - -DigitalOut led1(LED1), led2(LED2), led3(LED3), led4(LED4); -Terminal term(USBTX, USBRX); - -class JpegDecode : public BaseJpegDecode { -public: - int8_t m_buf[WIDTH/8*HEIGHT/8]; - virtual void outputDC(int mcu, int block, int value) { - if (mcu < (WIDTH/8*HEIGHT/8/2)) { - if (block <= 1) { // 0-1:Y 2:Cb 3:Cr - m_buf[mcu*2+block] = value; - } - } - } - virtual void outputAC(int mcu, int block, int scan, int value){}; - virtual void outputMARK(uint8_t c){}; -}; - -JpegDecode* decode = NULL; - -void callback_motion_jpeg(uint16_t frame, uint8_t* buf, int len) -{ - if (decode) { - decode->input(buf+12, len-12); - } - led1 = buf[1]&1; // FID -} - -int main() { - term.baud(921600); - term.printf("%s\n", __FILE__); - - decode = new JpegDecode; - ASSERT(decode); - uvc* cam = new uvc; - ASSERT(cam); - cam->SetImageSize(WIDTH, HEIGHT); - cam->SetFrameInterval(1000000); // 10.0fps - cam->setOnResult(callback_motion_jpeg); - ASSERT(cam->setup() >= 0); - term.cls(); - int n = 0; - while(1) { - int y; - for(y = 0; y < HEIGHT/8; y++) { - term.locate(0, y); - for(int x = 0; x < WIDTH/8; x++) { - if (decode->m_buf[y*WIDTH/8+x] > 0) { - term.printf("**"); - } else { - term.printf(".."); - } - cam->poll(); - } - } - term.locate(0, y); - term.printf("%d", n); - n++; - cam->wait_ms(5); - led2 = !led2; - } -} -#endif
--- a/example4_c270.cpp Thu Oct 25 11:02:17 2012 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -#if 1 -// -// dump YCrCb -// [Y0, Y1], -// (Cr, Cb), -// -#include "mbed.h" -#include "BaseJpegDecode.h" -#include "uvc.h" -#include "Terminal.h" - -// Logitech C270 -#define WIDTH 160 -#define HEIGHT 120 - -#define ASSERT(A) while(!(A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);}; - -DigitalOut led1(LED1), led2(LED2), led3(LED3), led4(LED4); -Terminal term(USBTX, USBRX); - -class Decode1 : public BaseJpegDecode { -public: - int16_t m_y0[WIDTH/16*HEIGHT/8]; - int16_t m_y1[WIDTH/16*HEIGHT/8]; - int16_t m_cb[WIDTH/16*HEIGHT/8]; - int16_t m_cr[WIDTH/16*HEIGHT/8]; - virtual void outputDC(int mcu, int block, int value) { - if (mcu >= (WIDTH/16*HEIGHT/8)) { - return; - } - switch(block) { // 0-1:Y 2:Cb 3:Cr - case 0: m_y0[mcu] = value * qt[0][0]; break; - case 1: m_y1[mcu] = value * qt[0][0]; break; - case 2: m_cb[mcu] = value * qt[1][0]; break; - case 3: m_cr[mcu] = value * qt[1][0]; break; - } - } - virtual void outputAC(int mcu, int block, int scan, int value){}; - virtual void outputMARK(uint8_t c){ - if (c == 0xd9) { // EOI - led2 = !led2; - } - }; -}; - -Decode1* decode = NULL; - -void callback_motion_jpeg(uint16_t frame, uint8_t* buf, int len) -{ - if (decode) { - decode->input(buf+12, len-12); - } - led1 = buf[1]&1; // FID -} - -int main() { - term.baud(921600); - printf("%s\n", __FILE__); - - decode = new Decode1; - ASSERT(decode); - uvc* cam = new uvc; - ASSERT(cam); - cam->SetImageSize(WIDTH, HEIGHT); - cam->SetFrameInterval(2000000); // 5.0fps - cam->setOnResult(callback_motion_jpeg); - ASSERT(cam->setup() >= 0); - term.cls(); - while(1) { - int column = 0; - term.locate(0, column++); - term.printf("Y: qt:"); - for(int i = 0; i < 16; i++) { - term.printf(" %d", decode->qt[0][i]); - } - term.printf("]"); - for(int y = 0; y < HEIGHT/8; y++) { - term.locate(0, column++); - for(int x = 0; x < WIDTH/16; x++) { - int mcu = y*WIDTH/16+x; - term.printf("%+5d,%+5d,", decode->m_y0[mcu], decode->m_y1[mcu]); - cam->poll(); - } - } - term.locate(0, column++); - term.printf("CbCr: [qt:"); - for(int i = 0; i < 16; i++) { - term.printf(" %d", decode->qt[1][i]); - } - term.printf("]"); - for(int y = 0; y < HEIGHT/8; y++) { - term.locate(0, column++); - for(int x = 0; x < WIDTH/16; x++) { - int mcu = y*WIDTH/16+x; - term.printf("%+5d,%+5d|", decode->m_cb[mcu], decode->m_cr[mcu]); - cam->poll(); - } - } - cam->wait_ms(500); - led3 = !led3; - } -} -#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/example_SimpleJpegDecode.cpp Tue Oct 30 15:35:36 2012 +0000 @@ -0,0 +1,92 @@ +#if 1 +// +// split jpeg to bmp files +// +#include "mbed.h" +#include "SimpleJpegDecode.h" +#include "bmp24.h" +#include "uvc.h" +#include "msc.h" + +#define ASSERT(A) while(!(A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);}; + +DigitalOut led1(LED1), led2(LED2), led3(LED3), led4(LED4); +Serial pc(USBTX, USBRX); + +SimpleJpegDecode* decode = NULL; +bmp24* bmp = NULL; + +int offset_x = 0; +int offset_y = 0; +void callback(int x, int y, uint8_t* yuv) +{ + led1 = !led1; + if (bmp) { + uint8_t rgb[3]; + int r = yuv[0] + (yuv[2]-128) * 1.4020; + if (r < 0) { + r = 0; + } else if (r > 255) { + r = 255; + } + rgb[0] = r; + int g = yuv[0] - (yuv[1]-128) * 0.3441 - (yuv[2]-128) * 0.7139; + if (g < 0) { + g = 0; + } else if (g > 255) { + g = 255; + } + rgb[1] = g; + int b = yuv[0] + (yuv[1]-128) * 1.7718 - (yuv[2]-128) * 0.0012; + if (b < 0) { + b = 0; + } else if (b > 255) { + b = 255; + } + rgb[2] = b; + bmp->point(x - offset_x, y - offset_y, rgb); + } +} + +int main() { + pc.baud(921600); + printf("%s\n", __FILE__); + + msc* usb = new msc("usb"); + int r = usb->setup(); + ASSERT(r == 0); + + bmp = new bmp24; + ASSERT(bmp); + + decode = new SimpleJpegDecode; + ASSERT(decode); + decode->setOnResult(callback); + + const char* input_file = "/usb/input.jpg"; + printf("input: %s\n", input_file); + int n = 0; + for(offset_y = 0; offset_y < 240; offset_y += 48) { + for(offset_x = 0; offset_x < 320; offset_x += 64) { + bmp->clear(); + decode->clear(); + FILE *fp = fopen(input_file, "rb"); + ASSERT(fp != NULL); + while(!feof(fp)) { + int c = fgetc(fp); + decode->input(c); + led2 = !led2; + } + fclose(fp); + char path[32]; + sprintf(path, "/usb/output%02d.bmp", n++); + printf("offset: (%3d,%3d) %s\n", offset_x, offset_y, path); + bmp->writeFile(path); + led3 = !led3; + } + led4 = !led4; + } + printf("width: %d, height: %d, yblock: %d\n", decode->width, decode->height, decode->m_yblocks); + exit(1); +} +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/msc/msc.cpp Tue Oct 30 15:35:36 2012 +0000 @@ -0,0 +1,390 @@ +#include "msc.h" +//#define __DEBUG +#include "mydbg.h" +#include "Utils.h" + +//#define WRITE_PROTECT + +msc::msc(const char* name, int drive): FATFileSystem(name) +{ + DBG("drive=%d\n", drive); + m_name = name; + m_drive = drive; + DBG_ASSERT(sizeof(CBW) == 31); + DBG_ASSERT(sizeof(CSW) == 13); + m_numBlocks = 0; + m_BlockSize = 0; + m_lun = 0; + m_interface = 0; + m_pDev = NULL; + m_pEpBulkIn = NULL; + m_pEpBulkOut = NULL; +} + +int msc::disk_initialize() +{ + DBG("m_BlockSize=%d\n", m_BlockSize); + if (m_BlockSize != 512) { + return 1; + } + return 0; +} + +int msc::disk_write(const char *buffer, int block_number) +{ + DBG("buffer=%p block_number=%d\n", buffer, block_number); + int ret = MS_BulkSend(block_number, 1, (uint8_t*)buffer); + if (ret >= 0) { + return 0; + } + return 1; +} + +int msc::disk_read(char *buffer, int block_number) +{ + DBG("buffer=%p block_number=%d\n", buffer, block_number); + int ret = MS_BulkRecv(block_number, 1, (uint8_t*)buffer); + if (ret >= 0) { + return 0; + } + return 1; +} + +int msc::disk_status() +{ + DBG("\n"); + return 0; +} + +int msc::disk_sync() +{ + DBG("\n"); + return 0; +} + +int msc::disk_sectors() +{ + DBG("m_numBlocks=%d\n", m_numBlocks); + return m_numBlocks; +} + +int msc::setup(int timeout) +{ + for(int i = 0; i < 2; i++) { + m_pDev = m_pHost->getDeviceByClass(0x08, m_drive); // USB Mass Storage Class + if (m_pDev || i > 0) { + break; + } + UsbErr rc = Usb_poll(); + if (rc == USBERR_PROCESSING) { + VERBOSE("%p USBERR_PROCESSING\n", this); + return -1; + } + } + DBG("m_pDev=%p\n", m_pDev); + if (m_pDev == NULL) { + VERBOSE("%p MSC DISK(%d) NOT FOUND\n", this, m_drive); + return -1; + } + DBG_ASSERT(m_pDev); + + ParseConfiguration(); + + GetMaxLUN(); + + int retry = 0; + Timer t; + t.start(); + t.reset(); + while(t.read_ms() < timeout) { + DBG("retry=%d t=%d\n", retry, t.read_ms()); + if (retry > 80) { + return -1; + } + int rc = TestUnitReady(); + DBG("TestUnitReady(): %d\n", rc); + if (rc == USBERR_OK) { + DBG("m_CSW.bCSWStatus: %02X\n", m_CSW.bCSWStatus); + if (m_CSW.bCSWStatus == 0x00) { + break; + } + } + GetSenseInfo(); + retry++; + wait_ms(50); + } + if (t.read_ms() >= timeout) { + return -1; + } + ReadCapacity(); + Inquire(); + return 0; +} +void msc::_test() +{ + ReadCapacity(); + + char buf[512]; + for(int block = 0; block < m_numBlocks; block++) { + DBG("block=%d\n", block); + disk_read(buf, block); + } + exit(1); +} + +int msc::ParseConfiguration() +{ + UsbErr rc; + uint8_t ConfigDesc[9]; + int index = 0; + DBG_ASSERT(m_pDev); + rc = m_pDev->GetDescriptor(USB_DESCRIPTOR_TYPE_CONFIGURATION, index, ConfigDesc, sizeof(ConfigDesc)); + DBG_ASSERT(rc == USBERR_OK); + DBG_BYTES("ConfigDescriptor 9bytes", ConfigDesc, sizeof(ConfigDesc)); + DBG_ASSERT(ConfigDesc[0] == 9); + DBG_ASSERT(ConfigDesc[1] == 0x02); + int wTotalLength = *((uint16_t*)&ConfigDesc[2]); + DBG("TotalLength: %d\n", wTotalLength); + int bConfigValue = ConfigDesc[5]; + DBG_ASSERT(bConfigValue == 1); + DBG("ConfigValue: %d\n", bConfigValue); + DBG("MaxPower: %d mA\n", ConfigDesc[8]*2); + + uint8_t* buf = new uint8_t[wTotalLength]; + DBG_ASSERT(buf); + rc = m_pDev->GetDescriptor(USB_DESCRIPTOR_TYPE_CONFIGURATION, index, buf, wTotalLength); + DBG_ASSERT(rc == USBERR_OK); + DBG_ASSERT(ConfigDesc[1] == 0x02); + for (int pos = 0; pos < wTotalLength; pos += buf[pos]) { + DBG_BYTES("CFG", buf+pos, buf[pos]); + int type = buf[pos+1]; + if (USB_DESCRIPTOR_TYPE_INTERFACE == type) { // 0x04 + DBG("InterfaceNumber: %d\n", buf[pos+2]); + DBG("AlternateSetting: %d\n", buf[pos+3]); + DBG("NumEndpoint: %d\n", buf[pos+4]); + DBG("InterfaceClass: %02X\n", buf[pos+5]); + DBG("InterfaceSubClass: %02X\n", buf[pos+6]); + DBG("InterfaceProtocol: %02X\n", buf[pos+7]); + DBG_ASSERT(buf[pos+6] == 0x06); // SCSI + DBG_ASSERT(buf[pos+7] == 0x50); // bulk only + } + if (USB_DESCRIPTOR_TYPE_ENDPOINT == type) { + DBG_ASSERT(buf[pos] == 7); + uint8_t att = buf[pos+3]; + if (att == 2) { // bulk + uint8_t ep = buf[pos+2]; + bool dir = ep & 0x80; // true=IN + uint16_t size = LE16(buf+pos+4); + DBG("EndpointAddress: %02X\n", ep); + DBG("Attribute: %02X\n", att); + DBG("MaxPacketSize: %d\n", size); + UsbEndpoint* pEp = new UsbEndpoint(m_pDev, ep, dir, USB_BULK, size); + DBG_ASSERT(pEp); + if (dir) { + m_pEpBulkIn = pEp; + } else { + m_pEpBulkOut = pEp; + } + } + } + } + delete[] buf; + DBG_ASSERT(m_pEpBulkIn); + DBG_ASSERT(m_pEpBulkOut); + return 0; +} + +int msc::BulkOnlyMassStorageReset() +{ + DBG_ASSERT(m_pDev); + UsbErr rc = m_pDev->controlReceive(0x21, 0xff, 0x0000, m_interface, NULL, 0); + DBG_ASSERT(rc == USBERR_OK); + return rc; +} + +int msc::GetMaxLUN() +{ + DBG_ASSERT(m_interface == 0); + uint8_t temp[1]; + DBG_ASSERT(m_pDev); + UsbErr rc = m_pDev->controlReceive(0xa1, 0xfe, 0x0000, m_interface, temp, sizeof(temp)); + DBG_ASSERT(rc == USBERR_OK); + DBG_BYTES("GetMaxLUN", temp, sizeof(temp)); + m_MaxLUN = temp[0]; + DBG_ASSERT(m_MaxLUN <= 15); + return rc; +} + + +int msc::TestUnitReady() +{ + const uint8_t cdb[6] = {SCSI_CMD_TEST_UNIT_READY, 0x00, 0x00, 0x00, 0x00, 0x00}; + m_CBW.dCBWDataTraansferLength = 0; + m_CBW.bmCBWFlags = 0x00; + CommandTransport(cdb, sizeof(cdb)); + StatusTransport(); + return 0; +} + +int msc::GetSenseInfo() +{ + const uint8_t cdb[6] = {SCSI_CMD_REQUEST_SENSE, 0x00, 0x00, 0x00, 18, 0x00}; + m_CBW.dCBWDataTraansferLength = 18; + m_CBW.bmCBWFlags = 0x80; // data In + CommandTransport(cdb, sizeof(cdb)); + + uint8_t buf[18]; + _bulkRecv(buf, sizeof(buf)); + DBG_HEX(buf, sizeof(buf)); + + StatusTransport(); + DBG_ASSERT(m_CSW.bCSWStatus == 0x00); + return 0; +} + +int msc::ReadCapacity() +{ + const uint8_t cdb[10] = {SCSI_CMD_READ_CAPACITY, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00}; + m_CBW.dCBWDataTraansferLength = 8; + m_CBW.bmCBWFlags = 0x80; // data In + CommandTransport(cdb, sizeof(cdb)); + + uint8_t buf[8]; + int rc = _bulkRecv(buf, sizeof(buf)); + DBG_ASSERT(rc >= 0); + DBG_HEX(buf, sizeof(buf)); + + StatusTransport(); + DBG_ASSERT(m_CSW.bCSWStatus == 0x00); + + m_numBlocks = BE32(buf); + m_BlockSize = BE32(buf+4); + DBG("m_numBlocks=%d m_BlockSize=%d\n", m_numBlocks, m_BlockSize); + DBG_ASSERT(m_BlockSize == 512); + DBG_ASSERT(m_numBlocks > 0); + return 0; +} + +int msc::Inquire() +{ + const uint8_t cdb[6] = {SCSI_CMD_INQUIRY, 0x00, 0x00, 0x00, 36, 0x00}; + m_CBW.dCBWDataTraansferLength = 36; + m_CBW.bmCBWFlags = 0x80; // data In + CommandTransport(cdb, sizeof(cdb)); + + uint8_t buf[36]; + _bulkRecv(buf, sizeof(buf)); + DBG_HEX(buf, sizeof(buf)); + + StatusTransport(); + return 0; +} + +int msc::MS_BulkRecv(uint32_t block_number, int num_blocks, uint8_t* user_buffer) +{ + DBG_ASSERT(m_BlockSize == 512); + DBG_ASSERT(num_blocks == 1); + DBG_ASSERT(user_buffer); + uint8_t cdb[10] = {SCSI_CMD_READ_10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00}; + BE32(block_number, cdb+2); + BE16(num_blocks, cdb+7); + uint32_t len = m_BlockSize * num_blocks; + DBG_ASSERT(len <= 512); + m_CBW.dCBWDataTraansferLength = len; + m_CBW.bmCBWFlags = 0x80; // data In + CommandTransport(cdb, sizeof(cdb)); + + int ret = _bulkRecv(user_buffer, len); + //DBG_HEX(user_buffer, len); + + StatusTransport(); + DBG_ASSERT(m_CSW.bCSWStatus == 0x00); + return ret; +} + +int msc::MS_BulkSend(uint32_t block_number, int num_blocks, uint8_t* user_buffer) +{ +#ifdef WRITE_PROTECT + return 0; +#else + DBG_ASSERT(num_blocks == 1); + DBG_ASSERT(user_buffer); + uint8_t cdb[10] = {SCSI_CMD_WRITE_10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00}; + BE32(block_number, cdb+2); + BE16(num_blocks, cdb+7); + uint32_t len = m_BlockSize * num_blocks; + DBG_ASSERT(len <= 512); + m_CBW.dCBWDataTraansferLength = len; + m_CBW.bmCBWFlags = 0x00; // data Out + CommandTransport(cdb, sizeof(cdb)); + + int ret = _bulkSend(user_buffer, len); + //DBG_HEX(user_buffer, len); + + StatusTransport(); + DBG_ASSERT(m_CSW.bCSWStatus == 0x00); + return ret; +#endif //WRITE_PROTECT +} + +int msc::CommandTransport(const uint8_t* cdb, int size) +{ + DBG_ASSERT(cdb); + DBG_ASSERT(size >= 6); + DBG_ASSERT(size <= 16); + m_CBW.bCBWLUN = m_lun; + m_CBW.bCBWCBLength = size; + memcpy(m_CBW.CBWCB, cdb, size); + + m_CBW.dCBWSignature = 0x43425355; + m_CBW.dCBWTag = m_tag++; + m_CBW.bCBWLUN = 0; + //DBG_HEX((uint8_t*)&m_CBW, sizeof(CBW)); + int rc = _bulkSend((uint8_t*)&m_CBW, sizeof(CBW)); + return rc; +} + +int msc::StatusTransport() +{ + DBG_ASSERT(sizeof(CSW) == 13); + int rc = _bulkRecv((uint8_t*)&m_CSW, sizeof(CSW)); + //DBG_HEX((uint8_t*)&m_CSW, sizeof(CSW)); + DBG_ASSERT(m_CSW.dCSWSignature == 0x53425355); + DBG_ASSERT(m_CSW.dCSWTag == m_CBW.dCBWTag); + DBG_ASSERT(m_CSW.dCSWDataResidue == 0); + return rc; +} + +int msc::_bulkRecv(uint8_t* buf, int size) +{ + UsbErr rc = m_pEpBulkIn->transfer(buf, size); + DBG_ASSERT(rc == USBERR_PROCESSING); + while(m_pEpBulkIn->status() == USBERR_PROCESSING){ + wait_us(1); + } + int ret = m_pEpBulkIn->status(); + if (ret >= 0) { + return ret; + } + DBG("buf=%p size=%d ret=%d\n", buf, size, ret); + return ret; +} + +int msc::_bulkSend(uint8_t* buf, int size) +{ + DBG_ASSERT(m_pEpBulkOut); + UsbErr rc = m_pEpBulkOut->transfer(buf, size); + DBG_ASSERT(rc == USBERR_PROCESSING); + while(m_pEpBulkOut->status() == USBERR_PROCESSING){ + wait_us(1); + } + int ret = m_pEpBulkOut->status(); + if (ret >= 0) { + return ret; + } + DBG("buf=%p size=%d ret=%d\n", buf, size, ret); + return ret; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/msc/msc.h Tue Oct 30 15:35:36 2012 +0000 @@ -0,0 +1,75 @@ +#ifndef MSC_H +#define MSC_H +#include "UsbHostMgr.h" +#include "UsbEndpoint.h" +#include "UsbBaseClass.h" +#include "FATFileSystem.h" + +#define SCSI_CMD_REQUEST_SENSE 0x03 +#define SCSI_CMD_TEST_UNIT_READY 0x00 +#define SCSI_CMD_INQUIRY 0x12 +#define SCSI_CMD_READ_10 0x28 +#define SCSI_CMD_READ_CAPACITY 0x25 +#define SCSI_CMD_WRITE_10 0x2A + +#pragma pack(push,1) +typedef struct stcbw { + uint32_t dCBWSignature; + uint32_t dCBWTag; + uint32_t dCBWDataTraansferLength; + uint8_t bmCBWFlags; + uint8_t bCBWLUN; + uint8_t bCBWCBLength; + uint8_t CBWCB[16]; +} CBW; + +typedef struct stcsw { + uint32_t dCSWSignature; + uint32_t dCSWTag; + uint32_t dCSWDataResidue; + uint8_t bCSWStatus; +} CSW; +#pragma pack(pop) + +class msc : public FATFileSystem, public UsbBaseClass { +public: + msc(const char* name = NULL, int drive = 0); + virtual int disk_initialize(); + virtual int disk_write(const char *buffer, int block_number); + virtual int disk_read(char *buffer, int block_number); + virtual int disk_status(); + virtual int disk_sync(); + virtual int disk_sectors(); + + int setup(int timeout = 9000); + void _test(); +private: + int ParseConfiguration(); + int BulkOnlyMassStorageReset(); + int GetMaxLUN(); + int ReadCapacity(); + int GetSenseInfo(); + int TestUnitReady(); + int Inquire(); + int MS_BulkRecv(uint32_t block_number, int num_blocks, uint8_t* user_buffer); + int MS_BulkSend(uint32_t block_number, int num_blocks, uint8_t* user_buffer); + int CommandTransport(const uint8_t* cdb, int size); + int StatusTransport(); + int _bulkRecv(uint8_t* buf, int size); + int _bulkSend(uint8_t* buf, int size); + const char* m_name; + int m_drive; + uint32_t m_numBlocks; + int m_BlockSize; + int m_lun; + int m_MaxLUN; + int m_interface; + uint32_t m_tag; + CBW m_CBW; + CSW m_CSW; + UsbDevice* m_pDev; + UsbEndpoint* m_pEpBulkIn; + UsbEndpoint* m_pEpBulkOut; +}; + +#endif // MSC_H