[jpegd]: handle special stream and eos in parser_prepare and format source code with mpp_astyle.sh in Linux Server.

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1102 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
HuangTingjin
2016-07-27 02:57:06 +00:00
parent 16b22667c6
commit 448771db51
7 changed files with 4466 additions and 4418 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -100,7 +100,7 @@ enum {
JPEGDEC_THUMBNAIL = 1
};
enum{
enum {
SOF0 = 0xC0,
SOF1 = 0xC1,
SOF2 = 0xC2,
@@ -168,22 +168,22 @@ enum{
};
typedef struct JpegParserContext {
MppBufSlots packet_slots;
MppBufSlots packet_slots;
MppBufSlots frame_slots;
RK_S32 frame_slot_index; /* slot index for output */
RK_U8 *recv_buffer;
JpegSyntaxParam *pSyntax;
RK_U8 *recv_buffer;
JpegSyntaxParam *pSyntax;
JpegDecImageInfo imageInfo;
RK_U32 streamLength; /* input stream length or buffer size */
RK_U32 streamLength; /* input stream length or buffer size */
RK_U32 bufferSize; /* input stream buffer size */
RK_U32 decImageType; /* Full image or Thumbnail to be decoded */
RK_U32 sliceMbSet; /* slice mode: mcu rows to decode */
RK_U32 color_conv;
RK_U32 color_conv;
RK_U32 dri_en;
MppPacket input_packet;
MppFrame output_frame;
MppFrame output_frame;
RK_U32 is8190;
RK_U32 fuseBurned;
RK_U32 minSupportedWidth;
@@ -194,10 +194,10 @@ typedef struct JpegParserContext {
RK_U32 maxSupportedSliceSize;
RK_U32 extensionsSupported;
RK_S64 pts;
RK_U32 parser_debug_enable;
RK_U32 input_jpeg_count;
}JpegParserContext;
RK_S64 pts;
RK_U32 eos;
RK_U32 parser_debug_enable;
RK_U32 input_jpeg_count;
} JpegParserContext;
#endif /* __JPEGD_PARSER_H__ */

View File

@@ -39,53 +39,53 @@ extern RK_U32 jpegd_log;
#define JPEGD_ASSERT(val)\
do {\
if (JPEGD_DBG_ASSERT)\
{ mpp_assert(val); }\
} while (0)
do {\
if (JPEGD_DBG_ASSERT)\
{ mpp_assert(val); }\
} while (0)
//check function return
#define CHECK_FUN(val) \
do{ \
if((val) < 0) { \
ret = (val); \
mpp_log("func return error(Line %d), ret:%d\n", __LINE__, ret); \
goto __FAILED; \
} \
} while (0)
do{ \
if((val) < 0) { \
ret = (val); \
mpp_log("func return error(Line %d), ret:%d\n", __LINE__, ret); \
goto __FAILED; \
} \
} while (0)
//memory malloc check
#define CHECK_MEM(val, ...)\
do{ if(!(val)) {\
ret = MPP_ERR_MALLOC;\
mpp_log("malloc buffer error(Line %d), pointer:%p\n", __LINE__, val);\
goto __FAILED;\
} } while (0)
do{ if(!(val)) {\
ret = MPP_ERR_MALLOC;\
mpp_log("malloc buffer error(Line %d), pointer:%p\n", __LINE__, val);\
goto __FAILED;\
} } while (0)
#define JPEGD_VERBOSE_LOG(fmt, ...) \
do {\
if (JPEGD_VBE_LOG & jpegd_log)\
{ mpp_log("[Verbose] func(%s), line(%d), "fmt"", __FUNCTION__, __LINE__, ##__VA_ARGS__); }\
} while (0)
do {\
if (JPEGD_VBE_LOG & jpegd_log)\
{ mpp_log("[Verbose] func(%s), line(%d), "fmt"", __FUNCTION__, __LINE__, ##__VA_ARGS__); }\
} while (0)
#define JPEGD_DEBUG_LOG(fmt, ...) \
do {\
if (JPEGD_DBG_LOG & jpegd_log)\
{ mpp_log("[Debug] func(%s), line(%d), "fmt"", __FUNCTION__, __LINE__, ##__VA_ARGS__); }\
} while (0)
do {\
if (JPEGD_DBG_LOG & jpegd_log)\
{ mpp_log("[Debug] func(%s), line(%d), "fmt"", __FUNCTION__, __LINE__, ##__VA_ARGS__); }\
} while (0)
#define JPEGD_INFO_LOG(fmt, ...) \
do {\
if (JPEGD_INF_LOG & jpegd_log)\
{ mpp_log("[Info] func(%s), line(%d), "fmt"", __FUNCTION__, __LINE__, ##__VA_ARGS__); }\
} while (0)
do {\
if (JPEGD_INF_LOG & jpegd_log)\
{ mpp_log("[Info] func(%s), line(%d), "fmt"", __FUNCTION__, __LINE__, ##__VA_ARGS__); }\
} while (0)
#define JPEGD_ERROR_LOG(fmt, ...) \
do {\
if (JPEGD_ERR_LOG & jpegd_log)\
{ mpp_log("[Error] func(%s), line(%d), "fmt"", __FUNCTION__, __LINE__, ##__VA_ARGS__); }\
} while (0)
do {\
if (JPEGD_ERR_LOG & jpegd_log)\
{ mpp_log("[Error] func(%s), line(%d), "fmt"", __FUNCTION__, __LINE__, ##__VA_ARGS__); }\
} while (0)
MPP_RET jpegd_prepare(void *ctx, MppPacket pkt, HalDecTask *task);