/************************************************************************/ /** * * \file pic_if.h * * * \brief This file provides PICTURE Related API Definition . \n * * \note Copyright (c) 2008 Sunplus Technology Co., Ltd. \n * All rights reserved. * * * \author rebecca.hsieh@sunplus.com 08/05/2008 Creation **********************************************************************/ #ifndef _PIC_IF_H #define _PIC_IF_H #include "types.h" #ifdef PIC_IF_IMPLEMENTATION #define PIC_IF_EXTERN #else #define PIC_IF_EXTERN extern #endif //#define PIC_JR_API_I //#define PIC_JR_API_II #define PIC_SAFE_WORKING_MEMORY_GAP (512) #define PIC_INTERNAL_WORKING_MEMORY (512<<10) #define PIC_NEEDED_WORKING_MEMORY (PIC_INTERNAL_WORKING_MEMORY +(PIC_SAFE_WORKING_MEMORY_GAP<<1)) #define MESSAGE_QUEUE_TYPE_PIC (1<<18) #define PIC_ROM_CloseFile PIC_FILE_CloseFile /* * Define the return value of the Picture interface. */ #define PIC_IF_STOP_ACTION (5) #define PIC_IF_INVALID_W_H (4) #define PIC_IF_PRE_PARSING_ERROR (3) #define PIC_IF_UNSUPPORTED_FILE_FORMAT (2) #define PIC_IF_WARNING_PIC_INSTANCE_CANNOT_CLOSE (1) #define PIC_IF_SUCCESSFUL (0) #define PIC_IF_PIC_ALREADY_INITIALIZED (-1) #define PIC_IF_MALLOC_ERROR (-2) #define PIC_IF_PIC_INSNTANCE_OPEN (-3) #define PIC_IF_PIC_NOT_INITIALIZED (-4) #define PIC_IF_PIC_INSTANCE_MEMORY_LOST (-5) #define PIC_IF_PIC_HANDLE_NULL (-6) #define PIC_IF_MAXIMUN_INSTANCE_REACHED (-7) #define PIC_IF_INVALID_PIC_HANDLE (-8) #define PIC_IF_INVALID_WORKING_BUFFER_ADDR (-9) #define PIC_IF_INVALID_PIC_PARAMS (-10) #define PIC_IF_FILE_OPEN_ERROR (-11) #define PIC_IF_PIC_INSTANCE_NOT_OPEN_READY (-12) #define PIC_IF_INTERNAL_THREAD_NOT_DESTROYED (-13) #define PIC_IF_INVALID_FILE_HANDLE (-14) #define PIC_IF_INVALID_WORKING_PIC_INFO_ADDR (-15) #define PIC_IF_SETUP_FILE_INFO_ERROR (-16) #define PIC_IF_CREATE_DECODE_THREAD_FAIL (-17) #define PIC_IF_RESOURCE_ALLOCATION_ERROR (-18) #define PIC_IF_INVALID_MEMORY (-19) #define PIC_IF_CLOSE_FILE_FAIL (-20) #define PIC_IF_STATE_TRANSITION_ERROR (-21) #define PIC_IF_PIC_FILE_HANDLE_NULL (-22) #define PIC_IF_MAXIMUN_FILES_PER_INSTANCE_REACHED (-23) #define PIC_IF_INITIALIZE_INSTANCE_ERROR (-24) #define PIC_IF_STATIC_MEMORY_NOT_ENOUGH (-25) #define PIC_IF_FUNCTION_NOT_SUPPORT (-26) #define PIC_IF_INVALID_PIC_TYPE (-27) #define PIC_IF_FETCH_DATA_ERROR (-28) #define PIC_IF_FORMAT_NOT_MATCH_EXT_NAME (-29) #define PIC_IF_DECODING_THREAD_NOT_RUNNING (-30) #define PIC_IF_UNSUPPORTED_FORMAT (-31) #define PIC_IF_INVALID_SRC_FRAME_BUFFER_INDEX (-32) #define PIC_IF_INVALID_TAR_FRAME_BUFFER_INDEX (-33) #define PIC_IF_INVALID_COPY_OPERATION (-34) #define PIC_IF_INVALID_EFFECT_MODE (-35) #define PIC_IF_STOP_FILE_FAIL (-36) #define PIC_IF_STOP_EFFECT_FAIL (-37) #define PIC_IF_WAIT_IDLE_FAIL (-38) #define PIC_IF_RETRIVE_INFO_NOT_READY (-39) #define PIC_IF_STOP_ENCODE_FAIL (-40) // scott add 03/26 2010 #define PIC_IF_HW_NOT_AVAILABLE (-41) #define PIC_IF_GL_RECEIVE_FAIL (-42) #define PIC_IF_JR_STATE_TRANSITION_ERROR (-43) //zeno_JRII #define PIC_IF_STOP_JR_FAIL (-44) //zeno_JRII // scott modified 04/26 2010 // fix mantis no.78197 /* * Define the EXIF related string length. */ #define exif_string_length 20 #define exif_long_string_length 256 // end scott modified 04/26 2010 /** * \brief Handle to a PIC Instance */ typedef UINT32 PIC_Handle; /** * \brief Handle to a PIC file */ typedef UINT32 PIC_FILE_Handle; /** * \brief Thread Priority */ enum PIC_Priority_t { PIC_LOGO_THREAD = 1, /*!< making the thread as Highest priority */ PIC_NORMAL_THREAD, /*!< making the thread as normal priority */ PIC_DFB_THREAD, /*!< using dedicate DFB thread*/ }; //*********************************************************************** // for pic_DFB use in internal level //*********************************************************************** /** * \brief Define the function pointers for Direct FB read and seek rom. */ typedef struct _pic_dfb_IO_t { long (*pfRead)(int fid,void *Buffer, size_t dSize);/*!the function pointer of read from DirectFB. */ off_t (*pfSeek)(int fid,off_t dOffset, int dWhence);/*!the function pointer of seek from DirectFB. */ } pic_dfb_IO_t; /** * \brief Retrive Info definition */ enum PIC_InfoStag_t { PIC_PREPARSING_INFO = 0, /*!< get the preparsing info */ PIC_DISPLAY_ON_FRAME_INFO = 1, /*!< get the info on frame buffer */ PIC_DECODE_DONE_INFO = 2, /*!< get the decode done info */ }; /** * \brief PIC State definition */ enum PIC_state_t { PIC_STATE_NULL = 0, /*!< null state */ PIC_STATE_IDLE = 1, /*!< PIC Idle state */ PIC_STATE_INIT = 2, /*!< PIC initial state */ PIC_STATE_DECODE = 3, /*!< PIC decoding state */ PIC_STATE_PIC_INFO_ON_FRAME_READY = 4, /*!< PIC decoder calculate pos and W and H on Frame buffer */ PIC_STATE_DECODE_DONE = 5, /*!< PIC decode done state */ PIC_STATE_STOP = 6, /*!< PIC Stop state */ }; #if 0 //zeno_JRII /** * \brief PIC_JR State definition */ enum PIC_JR_state_t { PIC_JR_STATE_IDLE = 0, /*!< PIC_JR Idle state */ PIC_JR_STATE_INIT = 1, /*!< PIC_JR initial state */ PIC_JR_STATE_RENDERING = 2, /*!< PIC_JR rendering state */ PIC_JR_STATE_DONE = 3, /*!< PIC_JR done state */ PIC_JR_STATE_STOP = 4, /*!< PIC_JR stop state */ }; //zeno_JRII_END #endif /** * \brief the buffer PIC thread will decode to. */ enum PIC_Target_t { PIC_TARGET_FRAME_BUFFER_NO = 0, /*!< using frame buffer index */ PIC_TARGET_BUFFER_ADDRESS = 1, /*!< using the other buffer other than frame buffer */ }; /** * \brief the plane PIC thread will decode to. */ enum PIC_Scale_t { PIC_V_H_SCALE_INDEPENDENT = 0, /*!