summaryrefslogtreecommitdiff
path: root/camlibs/clicksmart310
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2006-11-19 19:06:06 +0000
committerMarcus Meissner <marcus@jet.franken.de>2006-11-19 19:06:06 +0000
commit32f4ce95103cf536f3755bd14d7bb4ab56fb7528 (patch)
tree2624ebbaad65ee44380d2ff7b8a0fc5cf9a98c66 /camlibs/clicksmart310
parent783a5c35be730cb48110fa90f12268c01a3620d7 (diff)
downloadlibgphoto2-32f4ce95103cf536f3755bd14d7bb4ab56fb7528.tar.gz
made some functions and data structures statci
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9410 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'camlibs/clicksmart310')
-rw-r--r--camlibs/clicksmart310/clicksmart.c28
-rw-r--r--camlibs/clicksmart310/clicksmart.h5
-rw-r--r--camlibs/clicksmart310/spca50x-jpeg-header.h101
3 files changed, 18 insertions, 116 deletions
diff --git a/camlibs/clicksmart310/clicksmart.c b/camlibs/clicksmart310/clicksmart.c
index 32e937b49..7555c31df 100644
--- a/camlibs/clicksmart310/clicksmart.c
+++ b/camlibs/clicksmart310/clicksmart.c
@@ -43,6 +43,20 @@
#define CS_CH_CLEAR 0xd05
#define CS_READCLOSE 0x8303
+static int
+CLICKSMART_READ (GPPort *port, int index, char *data)
+{
+ gp_port_usb_msg_interface_read(port, 0, 0, index, data, 1);
+ return GP_OK;
+}
+
+static int
+CLICKSMART_READ_STATUS (GPPort *port, char *data)
+{
+ gp_port_usb_msg_interface_read(port, 0, 0, CS_CH_READY, data, 1);
+ return GP_OK;
+}
+
int clicksmart_init (GPPort *port, CameraPrivateLibrary *priv)
{
int i, cat_size;
@@ -255,17 +269,3 @@ int create_jpeg_from_data (unsigned char * dst, unsigned char * src,
return GP_OK;
}
-
-int
-CLICKSMART_READ (GPPort *port, int index, char *data)
-{
- gp_port_usb_msg_interface_read(port, 0, 0, index, data, 1);
- return GP_OK;
-}
-
-int
-CLICKSMART_READ_STATUS (GPPort *port, char *data)
-{
- gp_port_usb_msg_interface_read(port, 0, 0, CS_CH_READY, data, 1);
- return GP_OK;
-}
diff --git a/camlibs/clicksmart310/clicksmart.h b/camlibs/clicksmart310/clicksmart.h
index b4cae529e..8cf34ce9f 100644
--- a/camlibs/clicksmart310/clicksmart.h
+++ b/camlibs/clicksmart310/clicksmart.h
@@ -41,11 +41,6 @@ int clicksmart_delete_all_pics (GPPort *port);
int clicksmart_reset (GPPort *port);
-int clicksmart_decode (unsigned char * dst, unsigned char * src,
- int width, int height);
-int CLICKSMART_READ (GPPort *port, int index, char *data);
-int CLICKSMART_READ_STATUS (GPPort *port, char *data);
-
int create_jpeg_from_data (unsigned char * dst, unsigned char * src,
int qIndex, int w, int h,
unsigned char format,
diff --git a/camlibs/clicksmart310/spca50x-jpeg-header.h b/camlibs/clicksmart310/spca50x-jpeg-header.h
index 4ff8e5c24..f0e816746 100644
--- a/camlibs/clicksmart310/spca50x-jpeg-header.h
+++ b/camlibs/clicksmart310/spca50x-jpeg-header.h
@@ -35,7 +35,7 @@
#define SPCA50X_JPG_DEFAULT_HEADER_PART3_LENGTH 33
#define SPCA50X_JPG_DEFAULT_HEADER_LENGTH 589
-unsigned
+static unsigned
char SPCA50xJPGDefaultHeaderPart1[SPCA50X_JPG_DEFAULT_HEADER_PART1_LENGTH] = {
/* SOI(Start of Image) */
0xFF,0xD8,
@@ -53,7 +53,7 @@ char SPCA50xJPGDefaultHeaderPart1[SPCA50X_JPG_DEFAULT_HEADER_PART1_LENGTH] = {
0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22
};
-unsigned
+static unsigned
char SPCA50xJPGDefaultHeaderPart2[SPCA50X_JPG_DEFAULT_HEADER_PART2_LENGTH] = {
/* DHT(Define Huffman Table) */
0xFF,0xC4,
@@ -89,7 +89,7 @@ char SPCA50xJPGDefaultHeaderPart2[SPCA50X_JPG_DEFAULT_HEADER_PART2_LENGTH] = {
* 5 - 6 : Image Height(H Byte,L Byte)
* 7 - 8 : Image Width(H Byte,L Byte)
*/
-unsigned
+static unsigned
char SPCA50xJPGDefaultHeaderPart3[SPCA50X_JPG_DEFAULT_HEADER_PART3_LENGTH] = {
/* SOFn(Start of Frame) */
0xFF,0xC0,
@@ -101,7 +101,7 @@ char SPCA50xJPGDefaultHeaderPart3[SPCA50X_JPG_DEFAULT_HEADER_PART3_LENGTH] = {
0x03,0x01,0x00,0x02,0x11,0x03,0x11,0x00,0x3F,0x00
};
-unsigned char SPCA50xQTable[20][64]=
+static unsigned char SPCA50xQTable[20][64]=
{
/* index 0, Q50 */
{ 16, 11, 12, 14, 12, 10, 16, 14, 13, 14, 18, 17, 16, 19, 24, 40,
@@ -204,97 +204,4 @@ unsigned char SPCA50xQTable[20][64]=
124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124 }
};
-unsigned char SPCA50xOriginal_QTable_4NF_M[18][64]= /* not Z-Z */
-{
- /* index 0, Q50 */
- { 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 },
- { 17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99,
- 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99,
- 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
- 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99 },
-
- /* index 1, Q70 */
- { 10, 7, 6, 10, 14, 24, 31, 37, 7, 7, 8, 11, 16, 35, 36, 33,
- 8, 8, 10, 14, 24, 34, 41, 34, 8, 10, 13, 17, 31, 52, 48, 37,
- 11, 13, 22, 34, 41, 65, 62, 46, 14, 21, 33, 38, 49, 62, 68, 55,
- 29, 38, 47, 52, 62, 73, 72, 61, 43, 55, 57, 59, 67, 60, 62, 59 },
- { 10, 11, 14, 28, 59, 59, 59, 59, 11, 13, 16, 40, 59, 59, 59, 59,
- 14, 16, 34, 59, 59, 59, 59, 59, 28, 40, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
- 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59 },
-
- /* index 2, Q80 */
- { 6, 4, 4, 6, 10, 16, 20, 24, 5, 5, 6, 8, 10, 23, 24, 22,
- 6, 5, 6, 10, 16, 23, 28, 22, 6, 7, 9, 12, 20, 35, 32, 25,
- 7, 9, 15, 22, 27, 44, 41, 31, 10, 14, 22, 26, 32, 42, 45, 37,
- 20, 26, 31, 35, 41, 48, 48, 40, 29, 37, 38, 39, 45, 40, 41, 40 },
- { 7, 7, 10, 19, 40, 40, 40, 40, 7, 8, 10, 26, 40, 40, 40, 40,
- 10, 10, 22, 40, 40, 40, 40, 40, 19, 26, 40, 40, 40, 40, 40, 40,
- 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
- 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40 },
-
- /* index 3, Q85 */
- { 5, 3, 3, 5, 7, 12, 15, 18, 4, 4, 4, 6, 8, 17, 18, 17,
- 4, 4, 5, 7, 12, 17, 21, 17, 4, 5, 7, 9, 15, 26, 24, 19,
- 5, 7, 11, 17, 20, 33, 31, 23, 7, 11, 17, 19, 24, 31, 34, 28,
- 15, 19, 23, 26, 31, 36, 36, 30, 22, 28, 29, 29, 34, 30, 31, 30 },
- { 5, 5, 7, 14, 30, 30, 30, 30, 5, 6, 8, 20, 30, 30, 30, 30,
- 7, 8, 17, 30, 30, 30, 30, 30, 14, 20, 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 },
-
- /* index 4, Q90 */
- { 3, 2, 2, 3, 5, 8, 10, 12, 2, 2, 3, 4, 5, 12, 12, 11,
- 3, 3, 3, 5, 8, 11, 14, 11, 3, 3, 4, 6, 10, 17, 16, 12,
- 4, 4, 7, 11, 14, 22, 21, 15, 5, 7, 11, 13, 16, 21, 23, 18,
- 10, 13, 16, 17, 21, 24, 24, 20, 14, 18, 19, 20, 22, 20, 21, 20 },
- { 3, 4, 5, 9, 20, 20, 20, 20, 4, 4, 5, 13, 20, 20, 20, 20,
- 5, 5, 11, 20, 20, 20, 20, 20, 9, 13, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 },
-
- /* index 5, Q60 */
- { 13, 9, 8, 13, 19, 32, 41, 49, 10, 10, 11, 15, 21, 46, 48, 44,
- 11, 10, 13, 19, 32, 46, 55, 45, 11, 14, 18, 23, 41, 70, 64, 50,
- 14, 18, 30, 45, 54, 87, 82, 62, 19, 28, 44, 51, 65, 83, 90, 74,
- 39, 51, 62, 70, 82, 97, 96, 81, 58, 74, 76, 78, 90, 80, 82, 79 },
- { 14, 14, 19, 38, 79, 79, 79, 79, 14, 17, 21, 53, 79, 79, 79, 79,
- 19, 21, 45, 79, 79, 79, 79, 79, 38, 53, 79, 79, 79, 79, 79, 79,
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79 },
-
- /* index 6, Q25 */
- { 32, 22, 20, 32, 48, 80,102,122, 24, 24, 28, 38, 52,116,120,110,
- 28, 26, 32, 48, 80,114,138,112, 28, 34, 44, 58,102,174,160,124,
- 36, 44, 74,112,136,218,206,154, 48, 70,110,128,162,208,226,184,
- 98,128,156,174,206,242,240,202,144,184,190,196,224,200,206,198 },
- { 34, 36, 48, 94,198,198,198,198, 36, 42, 52,132,198,198,198,198,
- 48, 52,112,198,198,198,198,198, 94,132,198,198,198,198,198,198,
- 198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,
- 198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198 },
-
- /* index 7, Q95 */
- { 2, 1, 1, 2, 2, 4, 5, 6, 1, 1, 1, 2, 3, 6, 6, 6,
- 1, 1, 2, 2, 4, 6, 7, 6, 1, 2, 2, 3, 5, 9, 8, 6,
- 2, 2, 4, 6, 7, 11, 10, 8, 2, 4, 6, 6, 8, 10, 11, 9,
- 5, 6, 8, 9, 10, 12, 12, 10, 7, 9, 10, 10, 11, 10, 10, 10 },
- { 2, 2, 2, 5, 10, 10, 10, 10, 2, 2, 3, 7, 10, 10, 10, 10,
- 2, 3, 6, 10, 10, 10, 10, 10, 5, 7, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 },
-
- /* index 8, Q93 */
- { 2, 2, 1, 2, 3, 6, 7, 9, 2, 2, 2, 3, 4, 8, 8, 8,
- 2, 2, 2, 3, 6, 8, 10, 8, 2, 2, 3, 4, 7, 12, 11, 9,
- 3, 3, 5, 8, 10, 15, 14, 11, 3, 5, 8, 9, 11, 15, 16, 13,
- 7, 9, 11, 12, 14, 17, 17, 14, 10, 13, 13, 14, 16, 14, 14, 14 },
- { 2, 3, 3, 7, 14, 14, 14, 14, 3, 3, 4, 9, 14, 14, 14, 14,
- 3, 4, 8, 14, 14, 14, 14, 14, 7, 9, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14 }
-};
-
#endif /* __SPCA50X_JPEG_HEADER_H */