1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - ARMJPEG - include
3   File:     jpegdec.h
4 
5   Copyright 2007-2008 Nintendo. All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law. They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Date:: 2009-01-08#$
14   $Rev: 9800 $
15   $Author: kitase_hirotake $
16  *---------------------------------------------------------------------------*/
17 
18 #ifndef TWL_SSP_JPEG_TYPE_H_
19 #define TWL_SSP_JPEG_TYPE_H_
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 /*===========================================================================*/
26 
27 /*---------------------------------------------------------------------------*
28     Constant Definitions
29  *---------------------------------------------------------------------------*/
30 #define SSP_JPEG_THUMBNAIL   0x0001
31 //#define SSP_JPEG_BILINEAR  0x0002 // Not supported yet
32 #define SSP_JPEG_RGB555      0x0004
33 //#define SSP_JPEG_RGB888    0x0008 // Not supported yet
34 #define SSP_JPEG_EXIF        0x0010
35 
36 // These types are not compatible with DSP JPEG library
37 // SSP_JPEG_RGB422: (8bits x 4)/2pixels. { Y0,U0,Y1,V0 }, { Y2,U1,Y3,V1 }, ...
38 // SSP_JPEG_YUV888: (8 bits/pixel) x 3. Not interleaved. (internal format for encoder)
39 // {Y0,Y1,...,Yn, U0,U1,...,Un, V0,V1,...,Vn}
40 #define SSP_JPEG_YUV422      0x0100
41 //#define SSP_JPEG_YUV888    0x0200 // Partly supported
42 
43 #define SSP_JPEG_FORMAT_MASK (SSP_JPEG_RGB555 | SSP_JPEG_YUV422)
44 
45 
46 #define SSP_JPEG_THUMBNAIL_WIDTH  160
47 #define SSP_JPEG_THUMBNAIL_HEIGHT 120
48 #define SSP_JPEG_THUMBNAIL_BUFFER_WIDTH  160
49 #define SSP_JPEG_THUMBNAIL_BUFFER_HEIGHT 128
50 
51 
52 #define SSP_JPEG_OUTPUT_YUV444 1
53 #define SSP_JPEG_OUTPUT_YUV420 2
54 #define SSP_JPEG_OUTPUT_YUV422 3
55 
56 
57 typedef enum
58 {
59     SSP_MAKERNOTE_PHOTO = 0x1001,
60     SSP_MAKERNOTE_USER = 0x1002
61 }
62 SSPJpegMakernote;
63 
64 #ifdef __cplusplus
65 } /* extern "C" */
66 #endif
67 
68 #endif /* TWL_SSP_JPEG_TYPE_H_ */
69