summaryrefslogtreecommitdiff
path: root/src/include/codec
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/codec')
-rwxr-xr-x[-rw-r--r--]src/include/codec/AGifFrameInfo.h4
-rwxr-xr-x[-rw-r--r--]src/include/codec/img-codec-common.h27
-rwxr-xr-x[-rw-r--r--]src/include/codec/img-codec-parser.h25
-rwxr-xr-x[-rw-r--r--]src/include/codec/img-codec.h2
4 files changed, 29 insertions, 29 deletions
diff --git a/src/include/codec/AGifFrameInfo.h b/src/include/codec/AGifFrameInfo.h
index 0f5aa81..e9c69b8 100644..100755
--- a/src/include/codec/AGifFrameInfo.h
+++ b/src/include/codec/AGifFrameInfo.h
@@ -55,8 +55,8 @@ typedef struct tagFrameInfo
unsigned short delay;
#ifdef INTERNAL_IMGCODEC
- unsigned int nRepeatCount;
- unsigned int nLoopCount;
+ int nRepeatCount;
+ int nLoopCount;
unsigned char bOneFrame;
#endif
diff --git a/src/include/codec/img-codec-common.h b/src/include/codec/img-codec-common.h
index 4cb8922..91887f5 100644..100755
--- a/src/include/codec/img-codec-common.h
+++ b/src/include/codec/img-codec-common.h
@@ -37,19 +37,20 @@ extern "C" {
#define IMG_MAX_IMAGE_FILE_SIZE (10 * 1024 * 1024)
//////////////////////////////////////////////////////////////
+#if 0
#define ImgDebug(type, fmt, arg...) \
do { \
fprintf(stderr, "[Media-SVC]"fmt, ##arg); \
}while(0)
-
-#if 1
+
+
#define SysRequireEx(expr, retValue) \
if (!(expr)) { \
fprintf(stderr, "[Media-SVC][%s] INVALID_PARAM (%d lines in %s)\n",__FUNCTION__, __LINE__, __FILE__); \
return (retValue); \
}
-#define SysDebug(X) ImgDebug X
-
+#define SysDebug(X) ImgDebug X
+
#define SysAssert(expr)
#else
#define SysRequireEx(expr, retValue)
@@ -73,24 +74,6 @@ typedef enum
IMG_INFO_MEM_ALLOC_FAIL = -6
}ImgFastCodecInfo;
-
-
-typedef enum
-{
- IMG_CODEC_UNKNOWN_TYPE = -2,
- IMG_CODEC_BIG_PROGRESSIVE_JPEG = -1,
- IMG_CODEC_NONE = 0,
- IMG_CODEC_GIF = ( 1 << 0),
- IMG_CODEC_PNG = ( 1 << 1),
- IMG_CODEC_WBMP = ( 1 << 2),
- IMG_CODEC_JPEG = ( 1 << 3),
- IMG_CODEC_BMP = ( 1 << 4),
- IMG_CODEC_TIF = ( 1 << 5),
- IMG_CODEC_AGIF = ( 1 << 6),
- IMG_CODEC_PROGRESSIVE_JPEG = ( 1 << 7),
- IMG_CODEC_DRM = ( 1 << 8),
-} ImgCodecType;
-
typedef enum inputFlag
{
IMG_RGB_888_OUTPUT = 0x0001,
diff --git a/src/include/codec/img-codec-parser.h b/src/include/codec/img-codec-parser.h
index 097f24d..b412416 100644..100755
--- a/src/include/codec/img-codec-parser.h
+++ b/src/include/codec/img-codec-parser.h
@@ -30,15 +30,32 @@ extern "C" {
#define PNG_HEADER_LENGTH 8
#define JPG_HEADER_LENGTH 2
-#define GIF_HEADER_LENGTH 3
+#define GIF_HEADER_LENGTH 3
#define TIFF_HEADER_LENGTH 2
#define BMP_HEADER_LENGTH 2
+#define WBMP_HEADER_LENGTH 2
#define TIFF_IMAGE_WIDTH 0x100
#define TIFF_IMAGE_HEIGHT 0x101
-ImgCodecType ImgGetInfo(unsigned char* pEncodedData, unsigned long fileSize, ImgImageInfo* imgInfo);
-ImgCodecType ImgGetInfoFile(const char*filePath, ImgImageInfo *imgInfo);
-ImgCodecType ImgGetInfoHFile(HFile hFile, unsigned long fileSize, ImgImageInfo* imgInfo);
+typedef enum
+{
+ IMG_CODEC_UNKNOWN_TYPE = -2,
+ IMG_CODEC_BIG_PROGRESSIVE_JPEG = -1,
+ IMG_CODEC_NONE = 0,
+ IMG_CODEC_GIF = ( 1 << 0),
+ IMG_CODEC_PNG = ( 1 << 1),
+ IMG_CODEC_WBMP = ( 1 << 2),
+ IMG_CODEC_JPEG = ( 1 << 3),
+ IMG_CODEC_BMP = ( 1 << 4),
+ IMG_CODEC_TIF = ( 1 << 5),
+ IMG_CODEC_AGIF = ( 1 << 6),
+ IMG_CODEC_PROGRESSIVE_JPEG = ( 1 << 7),
+ IMG_CODEC_DRM = ( 1 << 8),
+} ImgCodecType;
+
+//ImgCodecType ImgGetInfoFile(const char*filePath, ImgImageInfo *imgInfo);
+int ImgGetImageInfo(const char *filePath, ImgCodecType *type, unsigned int *width, unsigned int *height);
+int ImgGetImageInfoForThumb(const char *filePath, ImgCodecType *type, unsigned int *width, unsigned int *height);
#ifdef __cplusplus
}
diff --git a/src/include/codec/img-codec.h b/src/include/codec/img-codec.h
index 708c5ce..d365705 100644..100755
--- a/src/include/codec/img-codec.h
+++ b/src/include/codec/img-codec.h
@@ -30,7 +30,7 @@
extern "C" {
#endif /* __cplusplus */
-unsigned int* ImgGetFirstFrameAGIFAtSize(const char *szFileName, ImgImageInfo *image_info);
+unsigned int* ImgGetFirstFrameAGIFAtSize(const char *szFileName, unsigned int width, unsigned int height);
int ImgConvertRGB565ToRGB888(void *pBuf_rgb565, void **pBuf_rgb888, int width, int height);