summaryrefslogtreecommitdiff
path: root/src/include/codec
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2015-08-07 09:40:46 +0900
committerMinje Ahn <minje.ahn@samsung.com>2015-08-07 10:10:15 +0900
commit7adbb6954d7f05fd02b9cded3741ce6ed2c9226b (patch)
tree5315a9e75f2283f559b18a8375f093b6eca10a3e /src/include/codec
parent41f405edc8f31d877615c580ed6eb308d7eaebec (diff)
downloadlibmedia-thumbnail-accepted/tizen/mobile/20150807.073414.tar.gz
libmedia-thumbnail-accepted/tizen/mobile/20150807.073414.tar.bz2
libmedia-thumbnail-accepted/tizen/mobile/20150807.073414.zip
Separate CMakeFiles for apply fPIE option Remove unused code Remove thumb_type Modify jpeg thumbnail creation logic when exif thumbnail is smaller than request thumbnail size Add scale down logic when request huge size image Fix bugs, memory leaks Remove unused parameters in function Change thumb path creation API position Remove thumbnail folder creation API Rename some functions Change-Id: I0e13d393dd524b61bcf44722c33b6f270649b732 Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
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);