pic_if.h 64 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454
  1. /************************************************************************/
  2. /**
  3. *
  4. * \file pic_if.h
  5. *
  6. *
  7. * \brief This file provides PICTURE Related API Definition . \n
  8. *
  9. * \note Copyright (c) 2008 Sunplus Technology Co., Ltd. \n
  10. * All rights reserved.
  11. *
  12. *
  13. * \author rebecca.hsieh@sunplus.com 08/05/2008 Creation
  14. **********************************************************************/
  15. #ifndef _PIC_IF_H
  16. #define _PIC_IF_H
  17. #include "types.h"
  18. #ifdef PIC_IF_IMPLEMENTATION
  19. #define PIC_IF_EXTERN
  20. #else
  21. #define PIC_IF_EXTERN extern
  22. #endif
  23. //#define PIC_JR_API_I
  24. //#define PIC_JR_API_II
  25. #define PIC_SAFE_WORKING_MEMORY_GAP (512)
  26. #define PIC_INTERNAL_WORKING_MEMORY (512<<10)
  27. #define PIC_NEEDED_WORKING_MEMORY (PIC_INTERNAL_WORKING_MEMORY +(PIC_SAFE_WORKING_MEMORY_GAP<<1))
  28. #define MESSAGE_QUEUE_TYPE_PIC (1<<18)
  29. #define PIC_ROM_CloseFile PIC_FILE_CloseFile
  30. /*
  31. * Define the return value of the Picture interface.
  32. */
  33. #define PIC_IF_STOP_ACTION (5)
  34. #define PIC_IF_INVALID_W_H (4)
  35. #define PIC_IF_PRE_PARSING_ERROR (3)
  36. #define PIC_IF_UNSUPPORTED_FILE_FORMAT (2)
  37. #define PIC_IF_WARNING_PIC_INSTANCE_CANNOT_CLOSE (1)
  38. #define PIC_IF_SUCCESSFUL (0)
  39. #define PIC_IF_PIC_ALREADY_INITIALIZED (-1)
  40. #define PIC_IF_MALLOC_ERROR (-2)
  41. #define PIC_IF_PIC_INSNTANCE_OPEN (-3)
  42. #define PIC_IF_PIC_NOT_INITIALIZED (-4)
  43. #define PIC_IF_PIC_INSTANCE_MEMORY_LOST (-5)
  44. #define PIC_IF_PIC_HANDLE_NULL (-6)
  45. #define PIC_IF_MAXIMUN_INSTANCE_REACHED (-7)
  46. #define PIC_IF_INVALID_PIC_HANDLE (-8)
  47. #define PIC_IF_INVALID_WORKING_BUFFER_ADDR (-9)
  48. #define PIC_IF_INVALID_PIC_PARAMS (-10)
  49. #define PIC_IF_FILE_OPEN_ERROR (-11)
  50. #define PIC_IF_PIC_INSTANCE_NOT_OPEN_READY (-12)
  51. #define PIC_IF_INTERNAL_THREAD_NOT_DESTROYED (-13)
  52. #define PIC_IF_INVALID_FILE_HANDLE (-14)
  53. #define PIC_IF_INVALID_WORKING_PIC_INFO_ADDR (-15)
  54. #define PIC_IF_SETUP_FILE_INFO_ERROR (-16)
  55. #define PIC_IF_CREATE_DECODE_THREAD_FAIL (-17)
  56. #define PIC_IF_RESOURCE_ALLOCATION_ERROR (-18)
  57. #define PIC_IF_INVALID_MEMORY (-19)
  58. #define PIC_IF_CLOSE_FILE_FAIL (-20)
  59. #define PIC_IF_STATE_TRANSITION_ERROR (-21)
  60. #define PIC_IF_PIC_FILE_HANDLE_NULL (-22)
  61. #define PIC_IF_MAXIMUN_FILES_PER_INSTANCE_REACHED (-23)
  62. #define PIC_IF_INITIALIZE_INSTANCE_ERROR (-24)
  63. #define PIC_IF_STATIC_MEMORY_NOT_ENOUGH (-25)
  64. #define PIC_IF_FUNCTION_NOT_SUPPORT (-26)
  65. #define PIC_IF_INVALID_PIC_TYPE (-27)
  66. #define PIC_IF_FETCH_DATA_ERROR (-28)
  67. #define PIC_IF_FORMAT_NOT_MATCH_EXT_NAME (-29)
  68. #define PIC_IF_DECODING_THREAD_NOT_RUNNING (-30)
  69. #define PIC_IF_UNSUPPORTED_FORMAT (-31)
  70. #define PIC_IF_INVALID_SRC_FRAME_BUFFER_INDEX (-32)
  71. #define PIC_IF_INVALID_TAR_FRAME_BUFFER_INDEX (-33)
  72. #define PIC_IF_INVALID_COPY_OPERATION (-34)
  73. #define PIC_IF_INVALID_EFFECT_MODE (-35)
  74. #define PIC_IF_STOP_FILE_FAIL (-36)
  75. #define PIC_IF_STOP_EFFECT_FAIL (-37)
  76. #define PIC_IF_WAIT_IDLE_FAIL (-38)
  77. #define PIC_IF_RETRIVE_INFO_NOT_READY (-39)
  78. #define PIC_IF_STOP_ENCODE_FAIL (-40) // scott add 03/26 2010
  79. #define PIC_IF_HW_NOT_AVAILABLE (-41)
  80. #define PIC_IF_GL_RECEIVE_FAIL (-42)
  81. #define PIC_IF_JR_STATE_TRANSITION_ERROR (-43) //zeno_JRII
  82. #define PIC_IF_STOP_JR_FAIL (-44) //zeno_JRII
  83. // scott modified 04/26 2010
  84. // fix mantis no.78197
  85. /*
  86. * Define the EXIF related string length.
  87. */
  88. #define exif_string_length 20
  89. #define exif_long_string_length 256
  90. // end scott modified 04/26 2010
  91. /**
  92. * \brief Handle to a PIC Instance
  93. */
  94. typedef UINT32 PIC_Handle;
  95. /**
  96. * \brief Handle to a PIC file
  97. */
  98. typedef UINT32 PIC_FILE_Handle;
  99. /**
  100. * \brief Thread Priority
  101. */
  102. enum PIC_Priority_t
  103. {
  104. PIC_LOGO_THREAD = 1, /*!< making the thread as Highest priority */
  105. PIC_NORMAL_THREAD, /*!< making the thread as normal priority */
  106. PIC_DFB_THREAD, /*!< using dedicate DFB thread*/
  107. };
  108. //***********************************************************************
  109. // for pic_DFB use in internal level
  110. //***********************************************************************
  111. /**
  112. * \brief Define the function pointers for Direct FB read and seek rom.
  113. */
  114. typedef struct _pic_dfb_IO_t
  115. {
  116. long (*pfRead)(int fid,void *Buffer, size_t dSize);/*!the function pointer of read from DirectFB. */
  117. off_t (*pfSeek)(int fid,off_t dOffset, int dWhence);/*!the function pointer of seek from DirectFB. */
  118. } pic_dfb_IO_t;
  119. /**
  120. * \brief Retrive Info definition
  121. */
  122. enum PIC_InfoStag_t
  123. {
  124. PIC_PREPARSING_INFO = 0, /*!< get the preparsing info */
  125. PIC_DISPLAY_ON_FRAME_INFO = 1, /*!< get the info on frame buffer */
  126. PIC_DECODE_DONE_INFO = 2, /*!< get the decode done info */
  127. };
  128. /**
  129. * \brief PIC State definition
  130. */
  131. enum PIC_state_t
  132. {
  133. PIC_STATE_NULL = 0, /*!< null state */
  134. PIC_STATE_IDLE = 1, /*!< PIC Idle state */
  135. PIC_STATE_INIT = 2, /*!< PIC initial state */
  136. PIC_STATE_DECODE = 3, /*!< PIC decoding state */
  137. PIC_STATE_PIC_INFO_ON_FRAME_READY = 4, /*!< PIC decoder calculate pos and W and H on Frame buffer */
  138. PIC_STATE_DECODE_DONE = 5, /*!< PIC decode done state */
  139. PIC_STATE_STOP = 6, /*!< PIC Stop state */
  140. };
  141. #if 0
  142. //zeno_JRII
  143. /**
  144. * \brief PIC_JR State definition
  145. */
  146. enum PIC_JR_state_t
  147. {
  148. PIC_JR_STATE_IDLE = 0, /*!< PIC_JR Idle state */
  149. PIC_JR_STATE_INIT = 1, /*!< PIC_JR initial state */
  150. PIC_JR_STATE_RENDERING = 2, /*!< PIC_JR rendering state */
  151. PIC_JR_STATE_DONE = 3, /*!< PIC_JR done state */
  152. PIC_JR_STATE_STOP = 4, /*!< PIC_JR stop state */
  153. };
  154. //zeno_JRII_END
  155. #endif
  156. /**
  157. * \brief the buffer PIC thread will decode to.
  158. */
  159. enum PIC_Target_t
  160. {
  161. PIC_TARGET_FRAME_BUFFER_NO = 0, /*!< using frame buffer index */
  162. PIC_TARGET_BUFFER_ADDRESS = 1, /*!< using the other buffer other than frame buffer */
  163. };
  164. /**
  165. * \brief the plane PIC thread will decode to.
  166. */
  167. enum PIC_Scale_t
  168. {
  169. PIC_V_H_SCALE_INDEPENDENT = 0, /*!<not the same downsampling rate */
  170. PIC_V_H_SCALE_THE_SAME = 1, /*!< the same downsampling rate */
  171. };
  172. /**
  173. * \brief the plane PIC thread will decode to.
  174. */
  175. enum PIC_Plane_t
  176. {
  177. PIC_VPP_PLANE = 0, /*!< VPP plane */
  178. PIC_G2D_PLANE = 1, /*!< G2D plane */
  179. };
  180. //zeno_20100429
  181. /**
  182. * \brief GIF JR path
  183. */
  184. enum PIC_GIF_JR_Path_t
  185. {
  186. PIC_GIF_NON_JR = 0, /*!< making the thread as Highest priority */
  187. PIC_GIF_JR = 1, /*!< making the thread as normal priority */
  188. };
  189. /**
  190. * \brief PIC rotate by JR or SW which will pass to PIC thread
  191. */
  192. typedef enum _scale_type_t
  193. {
  194. PIC_JR_NORMAL_ROTATE = 0, /*!< using JR normal policy to ratate. */
  195. PIC_JR_BYPASS_ROTATE,/*!< using JR bypass policy to ratate. */
  196. PIC_SW_NORMAL_ROTATE,/*!< using sw normal policy to ratate. */
  197. PIC_ROTATE_MAX /*!< the max number of scale type */
  198. } scale_type_t;
  199. /**
  200. * \brief Define the degree of Picture sharpness of JR.
  201. */
  202. typedef enum
  203. {
  204. PIC_SHARPNESS_0 = 0, /*!the Picture Sharpness by JR filter degree 0 */
  205. PIC_SHARPNESS_1,/*!the Picture Sharpness by JR filter degree 1 , the default one*/
  206. PIC_SHARPNESS_2,/*!the Picture Sharpness by JR filter degree 2 */
  207. PIC_SHARPNESS_3,/*!the Picture Sharpness by JR filter degree 3 */
  208. PIC_SHARPNESS_4,/*!the Picture Sharpness by JR filter degree 4 */
  209. PIC_SHARPNESS_5,/*!the Picture Sharpness by JR filter degree 5 */
  210. } PICSharpness;
  211. /**
  212. * \brief the data structure of the parameter for PIC_RetrieveInfo
  213. */
  214. typedef struct
  215. {
  216. scale_type_t scale_type; /*!< the scaler policy for rotate info. */
  217. UINT32 scale_width; /*!< the width of this picture on frame buffer, get the value after decoding. */
  218. UINT32 scale_height; /*!< the height of this picture on frame buffer, get the value after decoding. */
  219. UINT32 scale_offset; /*!< the scaling offset of this picture on frame buffer, get the value after decoding. */
  220. UINT32 x_onFrame; /*!< the real start position of the decoded picture on the frame */
  221. UINT32 y_onFrame; /*!< the real start position of the decoded picture on the frame */
  222. } PIC_FrmInfo_t;
  223. /**
  224. * \brief Define the general color format for G2D.
  225. */
  226. typedef enum
  227. {
  228. PIC_RGBA = 0, /*!the Picture color format for G2D is RGBA arrangement. */
  229. PIC_CrYCbA,/*!the Picture color format for G2D is crYCbA arrangement.*/
  230. PIC_ARGB,/*!the Picture color format for G2D is ARGB arrangement. */
  231. PIC_COLOR_MAX,
  232. } PIC_G2D_Color_t;
  233. /**
  234. * \brief Define the endian arrangment for RGBA or ARGB.
  235. */
  236. typedef enum
  237. {
  238. PIC_BigEndian = 0, /*!the Picture color format is RGBA or ARGB arrangement. */
  239. PIC_LittleEndian,/*!the Picture color format is ABGR or BGRA arrangement.*/
  240. } PIC_Endian_t;
  241. /**
  242. * \brief Define if the small image will be Enlarged or not.
  243. */
  244. typedef enum
  245. {
  246. PIC_Enlarge_Image = 0, /*!It's necessary to Enlarge the picture which is smaller than window.*/
  247. PIC_Enlarge_None, /*!It's not necessary to Enlarge the picture which is smaller than window. */
  248. } PIC_Enlarge_t;
  249. /**
  250. * \brief Define if the image will be Orientated or not.
  251. */
  252. typedef enum
  253. {
  254. PIC_Orientate_Image = 0, /*!It's necessary to Orientate the picture which has orientate exif.*/
  255. PIC_Orientate_None, /*!It's not necessary to Orientate the picture which has orientate exif. */
  256. } PIC_Orientate_t;
  257. /**
  258. * \brief the data structure of the parameter for PIC_Decode
  259. */
  260. typedef struct
  261. {
  262. enum PIC_Plane_t dDisplayPlane; /*!<the decoding plane */
  263. UINT32 number; /*!< the frame buffer number */
  264. UINT8 *Luma; /*!< the address of Luma buffer */
  265. UINT8 *Chroma; /*!< the address of Chroma buffer */
  266. UINT32 width; /*!< the width of this picture */
  267. UINT32 height; /*!< the height of this picture */
  268. UINT32 pos_x; /*!< the x position of the start position decoding on frame buffer for this picture */
  269. UINT32 pos_y; /*!< the y position of the start position decoding on frame buffer for this picture */
  270. UINT32 thumbnail_decode; /*!< the flag indicate if decoding thumbnail image or not. */
  271. enum PIC_Scale_t dVH_scale; /*!< the flag indicate if decoding image V & H scaling factor is the same or not */
  272. void *MWQueueHandle; /*!<for upper layer Queue Handle */
  273. UINT32 gif_fCtrl; /*!< control gif decode frame number (for GIF) */
  274. UINT8 gif_tb_ctrl; /*!< control gif two-buffer decode (for GIF) */
  275. int (*CBFunc)(UINT32 dFrameID);/*!< the call back function of switching Frame Buffer. */
  276. UINT32 LineOffset; /*!<the Line pitch for current Plane.*/
  277. UINT32 G2DHdl; /*!<the G2D handle when G2D plane.*/
  278. PICSharpness dPICSharp; /*!< the sharpness for picture, this parameter can tune the JR coefficient. */
  279. PIC_G2D_Color_t dG2D_Arrange;/*!< Indicate the arrangement of the color of pixels in G2D. */
  280. PIC_Endian_t dRGBEndian; /*!< the endian arrangement. */
  281. PIC_Enlarge_t dEnlarge; /*!< Indicate the image will enlarge to fit the window or not.*/
  282. PIC_Orientate_t dOrientate; /*!< Indicate the image will Orientate or not.*/
  283. } target_addr_t;
  284. /**
  285. * \brief the data structure of the parameter for PIC_Encode
  286. */
  287. typedef struct
  288. {
  289. enum PIC_Plane_t dDisplayPlane; /*!<the Encoding plane */
  290. UINT8 dVideoFrame; /*!< the Memory type of VPP frames about source frame. Only usefule when VPP source.*/
  291. UINT32 dFrameID; /*!< the dedicate Frame ID which will be encoded. */
  292. UINT8 * pBitstreamBuffer; /*!< the address for saving bitstream. Need the size of 1 VPP frame size.*/
  293. UINT8 * pProcessBuffer; /*!< the address for Processing Encoding. Need the size of 2 VPP frames size.*/
  294. UINT8 * TransBuffer_Luma; /*!< Only use when Src image is on G2D. It's need to transfer to YUV color Domain. Need the memoy as the size of Luma buffer of VPP. And Needs on SDRAM1.*/
  295. UINT8 * TransBuffer_Chroma; /*!< Only use when Src image is on G2D. It's need to transfer to YUV color Domain. Need the memoy as the size of Chroma buffer of VPP. And Needs on SDRAM2.*/
  296. UINT8 * VideoBuffer_Luma; /*!< Only use when the resolution of src video frame is greater than 720P. It's need to downscaling to 720P. Need the memory as the size of 720P. And Needs on SDRAM1.*/
  297. UINT8 * VideoBuffer_Chroma; /*!< Only use when the resolution of src video frame is greater than 720P. It's need to downscaling to 720P. Need the memory as the size of 720P/2. And Needs on SDRAM2.*/
  298. UINT32 scale_width; /*!< the width of the image on Frame buffer. */
  299. UINT32 scale_height; /*!< the height of the image on Frame buffer. */
  300. UINT32 LinePitch; /*!< the linepitch of current Plane.(maybe g2d or Vpp) */
  301. UINT32 G2D_Hdl; /*!<the G2D handle when G2D plane.*/
  302. // scott add 03/26 2010
  303. // JPEG Encoder support
  304. UINT32 pos_x; /*!< the x position of the image on Frame buffer. */
  305. UINT32 pos_y; /*!< the y position of the image on Frame buffer. */
  306. // end scott add 03/26 2010
  307. void *MWQueueHandle; /*!<for upper layer Queue Handle */
  308. } Encode_params_t;
  309. //zeno_JR
  310. /**
  311. * \brief Define the source color format for JR.
  312. */
  313. typedef enum
  314. {
  315. PIC_JR_SRC_YUV420 = 0, /*!< the YUV420 source color format for JR. */
  316. PIC_JR_SRC_RGB565, /*!< the RGB565 source color format for JR. */
  317. PIC_JR_SRC_RGBA8888, /*!< the RGBA8888 source color format for JR. */
  318. PIC_JR_SRC_ARGB8888, /*!< the ARGB8888 source color format for JR. */
  319. PIC_JR_SRC_CrYCbA8888, /*!< the CrYCbA8888 source color format for JR. */
  320. PIC_JR_SRC_ACrYCb8888, /*!< the ACrYCb8888 source color format for JR. */
  321. PIC_JR_SRC_COLOR_MAX,
  322. } PIC_JR_Src_Color_t;
  323. /**
  324. * \brief Define the target color format for JR.
  325. */
  326. typedef enum
  327. {
  328. PIC_JR_TAR_YCbCr420 = 0, /*!< the YCbCr420 target color format for JR. */
  329. PIC_JR_TAR_YCbCrBW, /*!< the YCbCrBW target color format for JR. */
  330. PIC_JR_TAR_RGB565, /*!< the RGB565 target color format for JR. */
  331. PIC_JR_TAR_ARGB1555, /*!< the ARGB1555 target color format for JR. */
  332. PIC_JR_TAR_RGBA5551, /*!< the RGBA5551 target color format for JR. */
  333. PIC_JR_TAR_RGBA4444, /*!< the RGBA4444 target color format for JR. */
  334. PIC_JR_TAR_RGBA8888, /*!< the RGBA8888 target color format for JR. */
  335. PIC_JR_TAR_ARGB8888, /*!< the ARGB8888 target color format for JR. */
  336. PIC_JR_TAR_CrYCbA8888, /*!< the CrYCbA8888 target color format for JR. */
  337. PIC_JR_TAR_ACrYCb8888, /*!< the ACrYCb8888 target color format for JR. */
  338. PIC_JR_TAR_COLOR_MAX,
  339. } PIC_JR_Tar_Color_t;
  340. /**
  341. * \brief the data structure of the parameter for PIC_JR_Use
  342. */
  343. typedef enum
  344. {
  345. PIC_JR_BIG_ENDIAN = 0, /*!< the big endian color format for JR. */
  346. PIC_JR_LITTLE_ENDIAN, /*!< the little endian color format for JR. */
  347. } PIC_JR_Endian;
  348. /**
  349. * \brief the data structure of the parameter for PIC_JR_Use
  350. */
  351. typedef struct
  352. {
  353. UINT8 *pSrc_Luma_Buffer; /*!< the luma address of source bitstream. */
  354. UINT8 *pSrc_Chroma_Buffer; /*!< the chroma address of source bitstream. */
  355. UINT8 *pTar_Luma_Buffer; /*!< the luma address of target bitstream. */
  356. UINT8 *pTar_Chroma_Buffer; /*!< the chroma address of target bitstream. */
  357. UINT32 src_width; /*!< the width of source image. */
  358. UINT32 src_height; /*!< the height of source image. */
  359. UINT32 src_pos_x; /*!< the x position of source image. */
  360. UINT32 src_pos_y; /*!< the y position of source image. */
  361. UINT32 tar_width; /*!< the width of target image. */
  362. UINT32 tar_height; /*!< the height of target image. */
  363. UINT32 tar_pos_x; /*!< the x position of target image. */
  364. UINT32 tar_pos_y; /*!< the y position of source image. */
  365. UINT32 src_LinePitch; /*!< the linepitch of source Plane.(maybe G2D or VPP) */
  366. UINT32 tar_LinePitch; /*!< the linepitch of target Plane.(maybe G2D or VPP) */
  367. UINT8 orientation; /*!< the orientation of target image. */
  368. PIC_JR_Endian endian_format; /*!< the endian format */
  369. //UINT32 mcu_line_num; /*!< the fetch mcu line number */
  370. PIC_JR_Src_Color_t src_color_format; /*!< the source color format for JR. */
  371. PIC_JR_Tar_Color_t tar_color_format; /*!< the target color format for JR. */
  372. void *MWQueueHandle; /*!<for upper layer Queue Handle. */
  373. //UINT8 jr_state; /*!<jr state. */
  374. //UINT32 mcu_line_count; /*!<mcu_line counter. */
  375. } JR_params_t;
  376. //zeno_JR_END
  377. #if 1
  378. //zeno_JRII
  379. /**
  380. * \brief the data structure of the parameter for PIC_JR_Basis
  381. */
  382. typedef struct
  383. {
  384. UINT8 *pTar_Luma_Buffer; /*!< the luma address of target bitstream. */
  385. UINT8 *pTar_Chroma_Buffer; /*!< the chroma address of target bitstream. */
  386. UINT32 src_width; /*!< the width of source image. */
  387. UINT32 src_height; /*!< the height of source image. */
  388. UINT32 src_pos_x; /*!< the x position of source image. */
  389. UINT32 src_pos_y; /*!< the y position of source image. */
  390. UINT32 tar_width; /*!< the width of target image. */
  391. UINT32 tar_height; /*!< the height of target image. */
  392. UINT32 tar_pos_x; /*!< the x position of target image. */
  393. UINT32 tar_pos_y; /*!< the y position of source image. */
  394. UINT32 src_LinePitch; /*!< the linepitch of source Plane.(maybe G2D or VPP) */
  395. UINT32 tar_LinePitch; /*!< the linepitch of target Plane.(maybe G2D or VPP) */
  396. UINT8 orientation; /*!< the orientation of target image. */
  397. PIC_JR_Endian endian_format; /*!< the endian format */
  398. PIC_JR_Src_Color_t src_color_format; /*!< the source color format for JR. */
  399. PIC_JR_Tar_Color_t tar_color_format; /*!< the target color format for JR. */
  400. void *MWQueueHandle; /*!<for upper layer Queue Handle. */
  401. } JR_Basis_params_t;
  402. /**
  403. * \brief the data structure of the parameter for PIC_JR_Basis_Src
  404. */
  405. typedef struct
  406. {
  407. UINT8 *pSrc_Luma_Buffer; /*!< the luma address of source bitstream. */
  408. UINT8 *pSrc_Chroma_Buffer; /*!< the chroma address of source bitstream. */
  409. UINT32 mcu_line_num; /*!< the fetch mcu line number */
  410. PIC_JR_Src_Color_t src_color_format; /*!< the source color format for JR. */
  411. void *MWQueueHandle; /*!<for upper layer Queue Handle. */
  412. UINT32 mcu_line_count; /*!<mcu_line counter. */
  413. } JR_Basis_Src_params_t;
  414. //zeno_JRII_END
  415. #endif
  416. // scott modified 04/26 2010
  417. // fix mantis no.78197
  418. // scott add 12/28 2009
  419. // for EXIF completion (include IFD0 and Exif SubIFD)
  420. /**
  421. * \brief the data structure of the JPEG EXIF Info
  422. */
  423. typedef struct
  424. {
  425. // Boolean exif_parser_end; /*!< check if the EXIF info. parsing is finished */
  426. UINT8 *exif_bs_position; /*!< the pointer to the current bitstream position */
  427. UINT8 *exif_camera_position; /*!< the pointer to the current Exif SubIFD (camera info.) position */
  428. UINT8 *exif_gps_position; /*!< the pointer to the current GPS info. position */
  429. UINT8 *exif_makernote_position; /*!< the pointer to the current Makernote position */
  430. UINT8 *exif_thumbnail_position; /*!< the pointer to the current thumbnail image info. position */
  431. UINT32 app1_length; /*!< APP1 data size */
  432. UINT8 exif_byte_order[2]; /*!< the endian format of EXIF data */
  433. UINT8 InteropIndex[3]; /*!< the InteropIndex tag */
  434. UINT32 InteropVersion; /*!< the InteropVersion tag */
  435. UINT32 ProcessingSoftware[exif_string_length]; /*!< the ProcessingSoftware tag */
  436. UINT32 SubfileType; /*!< the SubfileType tag */
  437. UINT32 OldSubfileType; /*!< the OldSubfileType tag */
  438. UINT32 ImageWidth; /*!< the ImageWidth tag */
  439. UINT32 ImageHeight; /*!< the ImageHeight tag */
  440. UINT32 BitsPerSample; /*!< the BitsPerSample tag */
  441. UINT32 Compression; /*!< the Compression tag */
  442. UINT32 PhotometricInterpretation; /*!< the PhotometricInterpretation tag */
  443. UINT32 Thresholding; /*!< the Thresholding tag */
  444. UINT32 CellWidth; /*!< the CellWidth tag */
  445. UINT32 CellLength; /*!< the CellLength tag */
  446. UINT32 FillOrder; /*!< the FillOrder tag */
  447. UINT8 DocumentName[exif_long_string_length]; /*!< the DocumentName tag */
  448. UINT8 ImageDescription[exif_long_string_length]; /*!< the ImageDescription tag */
  449. UINT8 Make[exif_long_string_length]; /*!< the Make tag */
  450. UINT8 Model[exif_long_string_length]; /*!< the Model tag */
  451. UINT32 Stripoffsets; /*!< not use now */
  452. UINT32 Orientation; /*!< the Orientation tag */
  453. UINT32 Samplesperpixel; /*!< the Samplesperpixel tag */
  454. UINT32 Rowsperstrip; /*!< the Rowsperstrip tag */
  455. UINT32 Stripbytecounts; /*!< not use now */
  456. UINT32 Minsamplevalue; /*!< the Minsamplevalue tag */
  457. UINT32 Maxsamplevalue; /*!< the Maxsamplevalue tag */
  458. UINT32 Xresolution[2]; /*!< the Xresolution tag */
  459. UINT32 Yresolution[2]; /*!< the Yresolution tag */
  460. UINT32 Planarconfiguration; /*!< the Planarconfiguration tag */
  461. UINT8 Pagename[exif_string_length]; /*!< the Pagename tag */
  462. UINT32 Xposition[2]; /*!< the Xposition tag */
  463. UINT32 Yposition[2]; /*!< the Yposition tag */
  464. UINT32 Freeoffsets; /*!< not use now */
  465. UINT32 Freebytecounts; /*!< not use now */
  466. UINT32 Grayresponseunit; /*!< not use now */
  467. UINT32 Grayresponsecurve; /*!< not use now */
  468. UINT32 T4Options; /*!< the T4Options tag */
  469. UINT32 T6Options; /*!< the T6Options tag */
  470. UINT32 Resolutionunit; /*!< the Resolutionunit tag */
  471. UINT32 Pagenumber; /*!< the Pagenumber tag */
  472. // UINT32 Colorresponseunit; /*!< not use now */
  473. UINT32 Transferfunction; /*!< not use now */
  474. UINT8 Software[exif_long_string_length]; /*!< the Software tag */
  475. UINT8 Modifydate[exif_string_length]; /*!< the Modifydate tag */
  476. UINT8 Artist[exif_string_length]; /*!< the Artist tag */
  477. UINT8 Hostcomputer[exif_string_length]; /*!< the Hostcomputer tag */
  478. UINT32 Predictor; /*!< the Predictor tag */
  479. UINT32 Whitepoint[2]; /*!< the Whitepoint tag */
  480. UINT32 Primarychromaticities[6]; /*!< the Primarychromaticities tag */
  481. UINT32 Colormap; /*!< not use now */
  482. UINT32 Halftonehints; /*!< the Halftonehints tag */
  483. UINT32 Tilewidth; /*!< the Tilewidth tag */
  484. UINT32 Tilelength; /*!< the Tilelength tag */
  485. UINT32 Tileoffsets; /*!< not use now */
  486. UINT32 Tilebytecounts; /*!< not use now */
  487. UINT32 Badfaxlines; /*!< not use now */
  488. UINT32 Cleanfaxdata; /*!< not use now */
  489. UINT32 Consecutivebadfaxlines; /*!< not use now */
  490. UINT32 Subifd;/*!< not use now */
  491. UINT32 Inkset; /*!< the Inkset tag */
  492. UINT8 Inknames[exif_string_length]; /*!< the Inknames tag */
  493. UINT32 Numberofinks;/*!< not use now */
  494. UINT8 Dotrange[exif_string_length]; /*!< the Dotrange tag */
  495. UINT32 Targetprinter[exif_string_length];/*!< not use now */
  496. UINT32 Extrasamples; /*!< the Extrasamples tag */
  497. UINT32 Sampleformat; /*!< the Sampleformat tag */
  498. UINT32 Sminsamplevalue;/*!< not use now */
  499. UINT32 Smaxsamplevalue;/*!< not use now */
  500. UINT32 Transferrange;/*!< not use now */
  501. UINT32 Clippath;/*!< not use now */
  502. UINT32 Xclippathunits;/*!< not use now */
  503. UINT32 Yclippathunits;/*!< not use now */
  504. UINT32 Indexed;/*!< not use now */
  505. UINT32 Jpegtables;/*!< not use now */
  506. UINT32 Opiproxy;/*!< not use now */
  507. UINT32 Globalparametersifd;/*!< not use now */
  508. UINT32 Profiletype;/*!< not use now */
  509. UINT32 Faxprofile;/*!< not use now */
  510. UINT32 Codingmethods;/*!< not use now */
  511. UINT32 Versionyear;/*!< not use now */
  512. UINT32 Modenumber;/*!< not use now */
  513. UINT32 Decode;/*!< not use now */
  514. UINT32 Defaultimagecolor;/*!< not use now */
  515. UINT32 Jpegproc;/*!< not use now */
  516. UINT32 Thumbnailoffset; /*!< the Thumbnailoffset tag */
  517. UINT32 Thumbnaillength; /*!< the Thumbnaillength tag */
  518. UINT32 Jpegrestartinterval; /*!< the Jpegrestartinterval tag */
  519. UINT32 Jpeglosslesspredictors;/*!< not use now */
  520. UINT32 Jpegpointtransforms;/*!< not use now */
  521. UINT32 Jpegqtables;/*!< not use now */
  522. UINT32 Jpegdctables;/*!< not use now */
  523. UINT32 Jpegactables;/*!< not use now */
  524. UINT32 Ycbcrcoefficients[3]; /*!< the Ycbcrcoefficients tag */
  525. UINT8 Ycbcrsubsampling[2]; /*!< the Ycbcrsubsampling tag */
  526. UINT32 Ycbcrpositioning; /*!< the Ycbcrpositioning tag */
  527. UINT32 Referenceblackwhite[12]; /*!< the Referenceblackwhite tag */
  528. UINT32 Striprowcounts; /*!< not use now */
  529. UINT32 Applicationnotes; /*!< the Applicationnotes tag */
  530. UINT8 Relatedimagefileformat[exif_string_length]; /*!< the Relatedimagefileformat tag */
  531. UINT32 Relatedimagewidth; /*!< the Relatedimagewidth tag */
  532. UINT32 Relatedimageheight; /*!< the Relatedimageheight tag */
  533. UINT32 Rating; /*!< the Rating tag */
  534. UINT32 Ratingpercent; /*!< the Ratingpercent tag */
  535. UINT32 Imageid;/*!< not use now */
  536. UINT32 Wangannotation;/*!< not use now */
  537. UINT32 Matteing;/*!< not use now */
  538. UINT32 Datatype;/*!< not use now */
  539. UINT32 Imagedepth;/*!< not use now */
  540. UINT32 Tiledepth;/*!< not use now */
  541. UINT32 Model2;/*!< not use now */
  542. UINT32 Cfarepeatpatterndim;/*!< not use now */
  543. UINT32 Cfapattern2;/*!< not use now */
  544. UINT32 Batterylevel;/*!< not use now */
  545. UINT32 Kodakifd;/*!< not use now */
  546. UINT8 Copyright[exif_long_string_length]; /*!< the Copyright tag */
  547. UINT32 Exposuretime[2]; /*!< the Exposuretime tag */
  548. UINT32 Fnumber[2]; /*!< the Fnumber tag */
  549. UINT32 Mdfiletag;/*!< not use now */
  550. UINT32 Mdscalepixel;/*!< not use now */
  551. UINT32 Mdcolortable;/*!< not use now */
  552. UINT32 Mdlabname;/*!< not use now */
  553. UINT32 Mdsampleinfo;/*!< not use now */
  554. UINT32 Mdprepdate;/*!< not use now */
  555. UINT32 Mdpreptime;/*!< not use now */
  556. UINT32 Mdfileunits;/*!< not use now */
  557. UINT32 Pixelscale;/*!< not use now */
  558. UINT32 Iptc_Naa; /*!< the Iptc_Naa tag */
  559. UINT32 Intergraphpacketdata;/*!< not use now */
  560. UINT32 Intergraphflagregisters;/*!< not use now */
  561. UINT32 Intergraphmatrix;/*!< not use now */
  562. UINT32 Modeltiepoint;/*!< not use now */
  563. UINT32 Site;/*!< not use now */
  564. UINT32 Colorsequence;/*!< not use now */
  565. UINT32 It8Header;/*!< not use now */
  566. UINT32 Rasterpadding;/*!< not use now */
  567. UINT32 Bitsperrunlength;/*!< not use now */
  568. UINT32 Bitsperextendedrunlength;/*!< not use now */
  569. UINT32 Colortable;/*!< not use now */
  570. UINT32 Imagecolorindicator;/*!< not use now */
  571. UINT32 Backgroundcolorindicator;/*!< not use now */
  572. UINT32 Imagecolorvalue;/*!< not use now */
  573. UINT32 Backgroundcolorvalue;/*!< not use now */
  574. UINT32 Pixelintensityrange;/*!< not use now */
  575. UINT32 Transparencyindicator;/*!< not use now */
  576. UINT32 Colorcharacterization;/*!< not use now */
  577. UINT32 Hcusage;/*!< not use now */
  578. UINT32 Trapindicator;/*!< not use now */
  579. UINT32 Cmykequivalent;/*!< not use now */
  580. UINT8 Seminfo[exif_string_length]; /*!< the Seminfo tag */
  581. UINT32 Afcp_Iptc;/*!< not use now */
  582. UINT32 Modeltransform;/*!< not use now */
  583. UINT32 Wb_Grgblevels;/*!< not use now */
  584. UINT32 Leafdata;/*!< not use now */
  585. UINT32 Photoshopsettings;/*!< not use now */
  586. UINT32 Exifoffset;/*!< not use now */
  587. UINT32 Icc_Profile;/*!< not use now */
  588. UINT32 Imagelayer;/*!< not use now */
  589. UINT32 Geotiffdirectory;/*!< not use now */
  590. UINT32 Geotiffdoubleparams;/*!< not use now */
  591. UINT32 Geotiffasciiparams;/*!< not use now */
  592. UINT32 Exposureprogram; /*!< the Exposureprogram tag */
  593. UINT8 Spectralsensitivity[exif_string_length]; /*!< the Spectralsensitivity tag */
  594. UINT32 Gpsinfo; /*!< the Gpsinfo tag */
  595. UINT32 IsoSpeedrating; /*!< the IsoSpeedrating tag */
  596. UINT32 Opto_Electricconvfactor; /*!< the Opto_Electricconvfactor tag */
  597. UINT32 Interlace; /*!< the Interlace tag */
  598. UINT32 Timezoneoffset; /*!< the Timezoneoffset tag */
  599. UINT32 Selftimermode; /*!< the Selftimermode tag */
  600. UINT32 Faxrecvparams; /*!< the Faxrecvparams tag */
  601. UINT32 Faxsubaddress; /*!< the Faxsubaddress tag */
  602. UINT32 Faxrecvtime; /*!< the Faxrecvtime tag */
  603. UINT32 Leafsubifd; /*!< the Leafsubifd tag */
  604. UINT16 Exifversion[2]; /*!< the Exifversion tag */
  605. UINT8 Datetimeoriginal[exif_string_length]; /*!< the Datetimeoriginal tag */
  606. UINT8 Createdate[exif_string_length]; /*!< the Createdate tag */
  607. UINT32 Componentsconfiguration; /*!< the Componentsconfiguration tag */
  608. UINT32 Compressedbitsperpixel[2]; /*!< the Compressedbitsperpixel tag */
  609. INT32 Shutterspeedvalue[2]; /*!< the Shutterspeedvalue tag */
  610. UINT32 Aperturevalue[2]; /*!< the Aperturevalue tag */
  611. INT32 Brightnessvalue[2]; /*!< the Brightnessvalue tag */
  612. INT32 Exposurecompensation[2]; /*!< the Exposurecompensation tag */
  613. UINT32 Maxaperturevalue[2]; /*!< the Maxaperturevalue tag */
  614. UINT32 Subjectdistance[2]; /*!< the Subjectdistance tag */
  615. UINT32 Meteringmode; /*!< the Meteringmode tag */
  616. UINT32 Lightsource; /*!< the Lightsource tag */
  617. UINT32 Flash; /*!< the Flash tag */
  618. UINT32 Focallength[2]; /*!< the Focallength tag */
  619. UINT16 Subjectarea[4]; /*!< the Subjectarea tag */
  620. UINT32 Stonits;/*!< not use now */
  621. UINT32 Makernotefactory; /*!< the MakerNote tag */
  622. UINT8 Usercomment[exif_long_string_length]; /*!< the Usercomment tag */
  623. UINT32 Subsectime;/*!< the Subsectime tag */
  624. UINT32 Subsectimeoriginal;/*!< the Subsectimeoriginal tag */
  625. UINT32 Subsectimedigitized;/*!< the Subsectimedigitized tag */
  626. UINT32 Msdocumenttext; /*!< the Msdocumenttext tag */
  627. UINT32 Mspropertysetstorage; /*!< the Mspropertysetstorage tag */
  628. UINT32 Msdocumenttextposition; /*!< the Msdocumenttextposition tag */
  629. UINT32 Imagesourcedata;/*!< not use now */
  630. UINT32 Xptitle; /*!< the Xptitle tag */
  631. UINT32 Xpcomment; /*!< the Xpcomment tag */
  632. UINT32 Xpauthor; /*!< the Xpauthor tag */
  633. UINT32 Xpkeywords; /*!< the Xpkeywords tag */
  634. UINT32 Xpsubject; /*!< the Xpsubject tag */
  635. UINT32 Flashpixversion[2]; /*!< the Flashpixversion tag */
  636. UINT32 Colorspace; /*!< the Colorspace tag */
  637. UINT32 Exifimagewidth; /*!< the Exifimagewidth tag */
  638. UINT32 Exifimageheight; /*!< the Exifimageheight tag */
  639. UINT8 Relatedsoundfile[exif_string_length]; /*!< the Relatedsoundfile tag */
  640. UINT32 Interopoffset; /*!< the Interopoffset tag */
  641. UINT32 Flashenergy[2]; /*!< the Flashenergy tag */
  642. UINT32 Spatialfrequencyresponse;/*!< not use now */
  643. UINT32 Noise; /*!< the Noise tag */
  644. UINT32 Focalplanexresolution[2]; /*!< the Focalplanexresolution tag */
  645. UINT32 Focalplaneyresolution[2]; /*!< the Focalplaneyresolution tag */
  646. UINT32 Focalplaneresolutionunit; /*!< the Focalplaneresolutionunit tag */
  647. UINT32 Imagenumber; /*!< the Imagenumber tag */
  648. UINT32 Securityclassification; /*!< the Securityclassification tag */
  649. UINT32 Imagehistory; /*!< the Imagehistory tag */
  650. UINT8 Subjectlocation[2]; /*!< the Subjectlocation tag */
  651. UINT32 Exposureindex[2]; /*!< the Exposureindex tag */
  652. UINT32 Tiff_Epstandardid; /*!< the Tiff_Epstandardid tag */
  653. UINT32 Sensingmethod; /*!< the Sensingmethod tag */
  654. UINT32 Filesource; /*!< the Filesource tag */
  655. UINT32 Scenetype; /*!< the Scenetype tag */
  656. UINT32 Cfapattern[2]; /*!< the Cfapattern tag */
  657. UINT32 Customrendered; /*!< the Customrendered tag */
  658. UINT32 Exposuremode; /*!< the Exposuremode tag */
  659. UINT32 Whitebalance; /*!< the Whitebalance tag */
  660. UINT32 Digitalzoomratio[2]; /*!< the Digitalzoomratio tag */
  661. UINT32 Focallengthin35Mmformat; /*!< the Focallengthin35Mmformat tag */
  662. UINT32 Scenecapturetype; /*!< the Scenecapturetype tag */
  663. UINT32 Gaincontrol; /*!< the Gaincontrol tag */
  664. UINT32 Contrast; /*!< the Contrast tag */
  665. UINT32 Saturation; /*!< the Saturation tag */
  666. UINT32 Sharpness; /*!< the Sharpness tag */
  667. UINT32 Devicesettingdescription; /*!< the Devicesettingdescription tag */
  668. UINT32 Subjectdistancerange; /*!< the Subjectdistancerange tag */
  669. UINT8 Imageuniqueid[exif_string_length]; /*!< the Imageuniqueid tag */
  670. UINT32 Gdalmetadata; /*!< the Gdalmetadata tag */
  671. UINT32 Gamma[2]; /*!< the Gamma tag */
  672. UINT32 Expandsoftware;/*!< not use now */
  673. UINT32 Expandlens;/*!< not use now */
  674. UINT32 Expandfilm;/*!< not use now */
  675. UINT32 Expandfilterlens;/*!< not use now */
  676. UINT32 Expandscanner;/*!< not use now */
  677. UINT32 Expandflashlamp;/*!< not use now */
  678. UINT32 Pixelformat; /*!< the Pixelformat tag */
  679. UINT32 Transformation; /*!< the Transformation tag */
  680. UINT32 Uncompressed; /*!< the Uncompressed tag */
  681. UINT32 Imagetype; /*!< the Imagetype tag */
  682. UINT32 Widthresolution;/*!< not use now */
  683. UINT32 Heightresolution;/*!< not use now */
  684. UINT32 Imageoffset;/*!< not use now */
  685. UINT32 Imagebytecount;/*!< not use now */
  686. UINT32 Alphaoffset;/*!< not use now */
  687. UINT32 Alphabytecount;/*!< not use now */
  688. UINT32 Imagedatadiscard;/*!< not use now */
  689. UINT32 Alphadatadiscard;/*!< not use now */
  690. UINT32 Ocescanjobdesc;/*!< not use now */
  691. UINT32 Oceapplicationselector;/*!< not use now */
  692. UINT32 Oceidnumber;/*!< not use now */
  693. UINT32 Oceimagelogic;/*!< not use now */
  694. UINT32 Annotations;/*!< not use now */
  695. UINT8 Printim[exif_long_string_length];/*!< not use now */
  696. UINT8 Dngversion[4]; /*!< the Dngversion tag */
  697. UINT8 Dngbackwardversion[4]; /*!< the Dngbackwardversion tag */
  698. UINT8 Uniquecameramodel[exif_string_length]; /*!< the Uniquecameramodel tag */
  699. UINT8 Localizedcameramodel[exif_string_length]; /*!< the Localizedcameramodel tag */
  700. UINT32 Cfaplanecolor;/*!< not use now */
  701. UINT32 Cfalayout; /*!< the Cfalayout tag */
  702. UINT32 Linearizationtable;/*!< not use now */
  703. UINT32 Blacklevelrepeatdim;/*!< not use now */
  704. UINT32 Blacklevel; /*!< the Blacklevel tag */
  705. UINT32 BlackleveldeltaH;/*!< not use now */
  706. UINT32 BlackleveldeltaV;/*!< not use now */
  707. UINT32 Whitelevel; /*!< the Whitelevel tag */
  708. UINT32 Defaultscale[2]; /*!< the Defaultscale tag */
  709. UINT32 Defaultcroporigin; /*!< the Defaultcroporigin tag */
  710. UINT32 Defaultcropsize; /*!< the Defaultcropsize tag */
  711. UINT32 Colormatrix1;/*!< not use now */
  712. UINT32 Colormatrix2;/*!< not use now */
  713. UINT32 Cameracalibration1;/*!< not use now */
  714. UINT32 Cameracalibration2;/*!< not use now */
  715. UINT32 Reductionmatrix1;/*!< not use now */
  716. UINT32 Reductionmatrix2;/*!< not use now */
  717. UINT32 Analogbalance;/*!< not use now */
  718. UINT32 Asshotneutral; /*!< the Asshotneutral tag */
  719. UINT32 Asshotwhitexy; /*!< the Asshotwhitexy tag */
  720. INT32 Baselineexposure; /*!< the Baselineexposure tag */
  721. UINT32 Baselinenoise; /*!< the Baselinenoise tag */
  722. UINT32 Baselinesharpness; /*!< the Baselinesharpness tag */
  723. INT32 Bayergreensplit; /*!< the Bayergreensplit tag */
  724. UINT32 Linearresponselimit; /*!< the Linearresponselimit tag */
  725. UINT8 Cameraserialnumber[exif_string_length]; /*!< the Cameraserialnumber tag */
  726. UINT32 Dnglensinfo[4]; /*!< the Dnglensinfo tag */
  727. UINT32 Chromablurradius; /*!< the Chromablurradius tag */
  728. UINT32 Antialiasstrength; /*!< the Antialiasstrength tag */
  729. UINT32 Shadowscale; /*!< the Shadowscale tag */
  730. UINT32 Sr2Private; /*!< the Sr2Private tag */
  731. UINT32 Makernotesafety; /*!< the Makernotesafety tag */
  732. UINT32 Rawimagesegmentation; /*!< the Rawimagesegmentation tag */
  733. UINT32 Calibrationilluminant1; /*!< the Calibrationilluminant1 tag */
  734. UINT32 Calibrationilluminant2; /*!< the Calibrationilluminant2 tag */
  735. UINT32 Bestqualityscale; /*!< the Bestqualityscale tag */
  736. UINT8 Rawdatauniqueid[exif_string_length]; /*!< the Rawdatauniqueid tag */
  737. UINT32 Aliaslayermetadata; /*!< the Aliaslayermetadata tag */
  738. UINT8 Originalrawfilename[exif_string_length]; /*!< the Originalrawfilename tag */
  739. UINT8 Originalrawfiledata[exif_string_length]; /*!< the Originalrawfiledata tag */
  740. UINT32 Activearea[4]; /*!< the Activearea tag */
  741. UINT32 Maskedareas[4]; /*!< the Maskedareas tag */
  742. UINT32 Asshoticcprofile;/*!< not use now */
  743. INT32 Asshotpreprofilematrix; /*!< the Asshotpreprofilematrix tag */
  744. UINT32 Currenticcprofile; /*!< the Currenticcprofile tag */
  745. INT32 Currentpreprofilematrix; /*!< the Currentpreprofilematrix tag */
  746. UINT32 Colorimetricreference; /*!< the Colorimetricreference tag */
  747. UINT8 Panasonictitle[exif_string_length]; /*!< the Panasonictitle tag */
  748. UINT8 Panasonictitle2[exif_string_length]; /*!< the Panasonictitle2 tag */
  749. UINT8 Cameracalibrationsig[exif_string_length]; /*!< the Cameracalibrationsig tag */
  750. UINT8 Profilecalibrationsig[exif_string_length]; /*!< the Profilecalibrationsig tag */
  751. UINT32 Profileifd; /*!< the Profileifd tag */
  752. UINT8 Asshotprofilename[exif_string_length]; /*!< the Asshotprofilename tag */
  753. UINT32 Noisereductionapplied; /*!< the Noisereductionapplied tag */
  754. UINT8 Profilename[exif_string_length]; /*!< the Profilename tag */
  755. UINT32 Profilehuesatmapdims[3]; /*!< the Profilehuesatmapdims tag */
  756. UINT32 Profilehuesatmapdata1; /*!< the Profilehuesatmapdata1 tag */
  757. UINT32 Profilehuesatmapdata2; /*!< the Profilehuesatmapdata2 tag */
  758. UINT32 Profiletonecurve; /*!< the Profiletonecurve tag */
  759. UINT32 Profileembedpolicy; /*!< the Profileembedpolicy tag */
  760. UINT8 Profilecopyright[exif_string_length]; /*!< the Profilecopyright tag */
  761. INT32 Forwardmatrix1; /*!< the Forwardmatrix1 tag */
  762. INT32 Forwardmatrix2; /*!< the Forwardmatrix2 tag */
  763. UINT8 Previewapplicationname[exif_string_length]; /*!< the Previewapplicationname tag */
  764. UINT8 Previewapplicationversion[exif_string_length]; /*!< the Previewapplicationversion tag */
  765. UINT8 Previewsettingsname[exif_string_length]; /*!< the Previewsettingsname tag */
  766. UINT32 Previewsettingsdigest; /*!< the Previewsettingsdigest tag */
  767. UINT32 Previewcolorspace; /*!< the Previewcolorspace tag */
  768. UINT8 Previewdatetime[exif_string_length]; /*!< the Previewdatetime tag */
  769. UINT32 Rawimagedigest; /*!< the Rawimagedigest tag */
  770. UINT32 Originalrawfiledigest; /*!< the Originalrawfiledigest tag */
  771. UINT32 Subtileblocksize;/*!< not use now */
  772. UINT32 Rowinterleavefactor;/*!< not use now */
  773. UINT32 Profilelooktabledims[3]; /*!< the Profilelooktabledims tag */
  774. UINT32 Profilelooktabledata; /*!< the Profilelooktabledata tag */
  775. UINT32 Opcodelist1;/*!< not use now */
  776. UINT32 Opcodelist2;/*!< not use now */
  777. UINT32 Opcodelist3;/*!< not use now */
  778. UINT32 Noiseprofile;/*!< not use now */
  779. UINT32 Padding;/*!< not use now */
  780. INT32 Offsetschema; /*!< the Offsetschema tag */
  781. UINT8 Ownername[exif_string_length]; /*!< the Ownername tag */
  782. UINT8 Serialnumber[exif_string_length]; /*!< the Serialnumber tag */
  783. UINT8 Lens[exif_string_length]; /*!< the Lens tag */
  784. UINT32 exif_maker_length; /*!< the data size of maker */
  785. UINT32 exif_model_length; /*!< the data size of model number */
  786. UINT32 exif_date_length; /*!< the data size of date/time */
  787. UINT32 exif_total_length; /*!< the length of total exif */
  788. UINT32 e_numerator; /*!< the numerator of exposure time */
  789. UINT32 e_denominator; /*!< the denominator of exposure time */
  790. UINT32 f_numerator; /*!< the numerator of FNumber */
  791. UINT32 f_denominator; /*!< the denominator of FNumber */
  792. } Pic_EXIF_t;
  793. // end scott modified 04/26 2010
  794. #if 0 // johnson
  795. /**
  796. * \brief the Data structure for the info for retrieving PIC info.
  797. */
  798. typedef struct
  799. {
  800. UINT32 pic_width; /*!< the width of this picture */
  801. UINT32 pic_height; /*!< the height of this picture */
  802. UINT32 pic_tn_width; /*!< the width of the thumbnail of this picture */
  803. UINT32 pic_tn_height; /*!< the height of the thumbnail of this picture */
  804. UINT8 pic_support; /*!<record when preparser,if the pic support or not. */
  805. UINT8 pic_tn_support; /*!<recorde when preparser,if the thumbnail format in Jpeg support or not.
  806. 0:no thumbnail or non support */
  807. Pic_EXIF_t pic_exif_data; /*!< the EXIF info for the picture */
  808. // Pic_EXIF_Info_t pic_exif_info; /*!< the DateTime for the picture */ // scott modified 04/26 2010
  809. UINT32 png_interlace; /*!< the interlace info for PNG */
  810. UINT32 png_colortype; /*!< the colortype info for PNG */
  811. UINT8* png_palette_addr; /*!<the palette table address of PNG.*/
  812. UINT32 consume_size; /*!< the storage to consume size of decoder on working buffer*/
  813. UINT32 scaling_factor; /*!< the scaling factor for picture */
  814. UINT32 scaling_factor_2; /*!< the 2nd scaling factor for GIF */
  815. ifunc7 init_func; /*!< the init function for picture */
  816. ifunc7 decoding_func; /*!< the decoding function for picture */
  817. ifunc7 scaling_func; /*!< the scaling function for picture */
  818. ifunc7 load_local_var; /*!< the loading function for picture */
  819. UINT32 col_tab_size; /*!< the color table size */
  820. int pic_format; /*!< the file format */
  821. int gif_anime; //sunwhy add for anime support
  822. } PIC_Info_t;
  823. #endif
  824. /**
  825. * \brief PIC effect definitions
  826. */
  827. enum effect_mode_t
  828. {
  829. PIC_ROTATION_NONE = 0, /*!< 0: no effect */
  830. PIC_ROTATION_LEFT, /*!< 1: rotate left */
  831. PIC_ROTATION_180, /*!< 2: rotate 180 degree */
  832. PIC_ROTATION_RIGHT, /*!< 3: rotate right */
  833. PIC_ROTATION_L_R_REVERSE, /*!< 4: left and right reverse */
  834. PIC_ROTATION_UP_DOWN_REVERSE, /*!< 5: up and down reverse */
  835. PIC_EFFECT_MAX, /*!< 21: the max number of effect */
  836. };
  837. /**
  838. * \brief PIC effect info which will pass to PIC thread
  839. */
  840. typedef struct
  841. {
  842. UINT32 src_frame_index; /*!< the index of frame buffer wich there is source data. */
  843. UINT32 tar_frame_index; /*!< the index of frame buffer wich will be the target buffer which theeffect will apply to. */
  844. UINT32 scale_pos_x;
  845. UINT32 scale_pos_y;
  846. UINT32 scale_width; /*!< the width of the image on Frame buffer. */
  847. UINT32 scale_height; /*!< the height of the image on Frame buffer. */
  848. enum effect_mode_t effect_mode; /*!< the effect which will be use for this picture. */
  849. void *effect_work_info; /*!< the pointer of effect working info location */
  850. void *MWQueueHandle; /*!<for Middleware Queue Handle */
  851. UINT32 Window_Width; /*!<for display window width */
  852. UINT32 Window_Height; /*!<for display window height */
  853. scale_type_t scale_type; /*!<scaling by JR or SW*/
  854. } PIC_EFFECT_INFO_t;
  855. /**
  856. * \brief PIC respond message definition
  857. */
  858. typedef enum
  859. {
  860. PIC_RESPOND_DECODE_DONE = 1, /*!< 1: Picture Decode Done. */
  861. PIC_RESPOND_INFO_ON_FRAME_READY,/*!< Picture Info on Frame buffer is ready. */
  862. PIC_RESPOND_DECODE_STOP, /*!< Picture Decode Stop. */
  863. PIC_RESPOND_EFFECT_DONE, /*!< Picture Effect Done. */
  864. PIC_RESPOND_EFFECT_STOP, /*!< Picture Effect Stop. */
  865. PIC_RESPOND_DECODE_DONE_BY_READ_ERROR, /*!< Picture decode done by reading error. */
  866. PIC_RESPOND_DECODE_DONE_WITH_DECODE_ERROR, /*!<Picture decode done with decode error. */
  867. PIC_RESPOND_ENCODE_DONE, /*!< Picture encode done. */
  868. PIC_RESPOND_ENCODE_STOP, /*!< Picture Encode Stop. */ // scott add 03/26 2010
  869. PIC_RESPOND_JR_USE_DONE, /*!< Picture JR_Use done. */ //zeno_JR
  870. PIC_RESPOND_JR_BASIS_DONE, /*!< Picture JR_Basis done. */ //zeno_JRII
  871. PIC_RESPOND_JR_BASIS_SRC_DONE, /*!< Picture JR_Basis_Src done. */ //zeno_JRII
  872. PIC_RESPOND_JR_BASIS_SRC_ALLDONE, /*!< Picture JR_Basis_Src done. */ //zeno_JRII
  873. PIC_RESPOND_JR_STOP, /*!< Picture JR_Basis Stop. */ //zeno_JRII
  874. PIC_RESPOND_REGION_CHANGE,
  875. PIC_RESPOND_MAX, /*!< the max number of respond messages. */
  876. } PIC_RESPOND_Message_t;
  877. typedef enum
  878. {
  879. PIC_REGION_CHANGE_STATE_KEEP = 0,
  880. PIC_REGION_CHANGE_STATE_IDLE,
  881. PIC_REGION_CHANGE_STATE_START,
  882. PIC_REGION_CHANGE_STATE_ACTION,
  883. PIC_REGION_CHANGE_STATE_DONE
  884. } PIC_REGION_CHANGE_STATE_E;
  885. /**
  886. * \brief PIC respond message body, the same defination as PE.
  887. */
  888. typedef struct _PIC_Respond_MessageBody_t
  889. {
  890. UINT32 eventId; /*!<Event ID number specified in enum structure in this file. (respond message) */
  891. UINT32 dparam; /*!<Param Associated with the event. */
  892. } PIC_Respond_Message_t;
  893. #define PIC_RESPOND_MESSAGE_BODY_SIZE (sizeof(PIC_Respond_Message_t))
  894. /******************************************************************************************/
  895. /**
  896. * \fn int PIC_Initialize(void)
  897. *
  898. * \brief Initialize the PIC Module
  899. *
  900. *\return \e PIC_IF_SUCCESSFUL on success.
  901. * \e PIC_IF_PIC_ALREADY_INITIALIZED on mudule has been initialized.
  902. * \e PIC_IF_MALLOC_ERROR on no memory allocates for pic module object.
  903. *
  904. * \note PIC_Initialize must be called before using PIC_IF.
  905. ******************************************************************************************/
  906. PIC_IF_EXTERN int PIC_Initialize(void);
  907. /***********************************************************************************/
  908. /**
  909. * \fn int PIC_Finalize(void)
  910. *
  911. * \brief Finalize the PIC Module
  912. *
  913. * \return \e PIC_IF_SUCCESSFUL on success.
  914. * \e PIC_IF_PIC_NOT_INITIALIZED on no pic module exist.
  915. * \e PIC_IF_PIC_INSNTANCE_OPEN on there is still instace not closing, the pic module can't close.
  916. * \e PIC_IF_PIC_INSTANCE_MEMORY_LOST on the instance pointer is null, it's not reasonable.
  917. * \note CleanUp All PE Related Resources.
  918. *******************************************************************************/
  919. PIC_IF_EXTERN int PIC_Finalize(void);
  920. /******************************************************************************************/
  921. /**
  922. * \fn int PIC_Open(PIC_Handle* handle,UINT8* pWorkMemory,UINT8*pExtMemory,UINT32 extSize)
  923. *
  924. * \brief Initialize the resource for PIC Module
  925. * (ex: working buffer, PIC_Params space)
  926. *
  927. * \param handle : Pointer to handle that will carry the Handle to the current file.
  928. * If the API is succesfully executed.
  929. * \param pWorkMemory : The pointer of the memory which will use by Picture Module.
  930. * \param pExtMemory : The pointer of the Extension memory which will use as working buffer.
  931. * \param extSize : The size of the extension memory which will use as working buffer.
  932. *
  933. * \return \e PIC_IF_SUCCESSFUL on success.
  934. * \e PIC_IF_PIC_HANDLE_NULL on PIC_HANDLE is NULL.
  935. * \e PIC_IF_PIC_NOT_INITIALIZED on PIC Module is not existed.
  936. * \e PIC_IF_MAXIMUN_INSTANCE_REACHED on the number of instance objects is reached to Maximum.
  937. * \e PIC_IF_MALLOC_ERROR on no memory allocates for pic module object.
  938. *
  939. * \note the initial state after PIC_Open is PIC_STATE_IDLE
  940. ******************************************************************************************/
  941. PIC_IF_EXTERN int PIC_Open(PIC_Handle *, UINT8*, UINT8*, UINT32);
  942. /******************************************************************************************/
  943. /**
  944. * \fn int PIC_Close(PIC_Handle pPICHandle,UINT8** ppWorkMemory, UINT8** ppExtMemory)
  945. *
  946. * \brief release the resource for picture module(Close a PE Instance
  947. * in the future).
  948. *
  949. * \param pPICHandle : the handle of the current file.
  950. * \param ppWorkMemory : the area to save the Pointer to the working memory in picture module.
  951. * \param ppExtMemory : the area to save the Pointer to the extension memory in picture module.
  952. *
  953. * \return \e PIC_IF_SUCCESSFUL on success.
  954. * \e PIC_IF_INVALID_PIC_HANDLE on PIC handle provided is invalid.
  955. * \e PIC_IF_INVALID_WORKING_BUFFER_ADDR on working buffer address is null, it's not reasonable.
  956. * \e PIC_IF_INVALID_PIC_PARAMS on pic params address is null, it's not reasonable.
  957. * \e PIC_IF_CREATE_DECODE_THREAD_FAIL on Decode thread cannot create successfully.
  958. *
  959. * \note State must be at PIC_STATE_IDLE before closing.
  960. ******************************************************************************************/
  961. PIC_IF_EXTERN int PIC_Close(PIC_Handle, UINT8** ppWorkMemory, UINT8** ppExtMemory);
  962. /******************************************************************************************/
  963. /**
  964. * \fn int PIC_FILE_OpenFile(PIC_Handle handle, PIC_FILE_Handle *pic_file_handle,char *pstFileName)
  965. *
  966. * \brief Open a file playback object. Malloc the space for working_pic_info space.
  967. * classify a file and assign the specific decoder function pointer.
  968. *
  969. * \param handle : the instance handle for the PIC thread.
  970. * \param pic_file_handle : the Pointer of the lication to save the Handle of the current file.
  971. * \param pstFileName : Pointer to a string containing the file name of the object file.
  972. *
  973. * \return \e PIC_IF_SUCCESSFUL on success.
  974. * \e PIC_IF_INVALID_PIC_HANDLE on PIC handle provided is invalid.
  975. * \e PIC_IF_PIC_INSTANCE_NOT_OPEN_READY on PIC_OPEN not successful for this object, it cannot open a file
  976. * \e PIC_IF_MALLOC_ERROR on no memory allocates for working_pic_info space.
  977. * \e PIC_IF_FILE_OPEN_ERROR on it cannot succeed to open file.
  978. *
  979. *
  980. * \note A PIC module can only open one playback object.
  981. ******************************************************************************************/
  982. PIC_IF_EXTERN int PIC_FILE_OpenFile(PIC_Handle, PIC_FILE_Handle *, char *);
  983. /******************************************************************************************/
  984. /**
  985. * \fn int PIC_FILE_CloseFile(PIC_Handle handle,PIC_FILE_Handle pic_file_handle )
  986. *
  987. * \brief Close a file playback object and release the space for working_pic_info.
  988. *
  989. * \param handle : the instance handle for the PIC thread.
  990. * \param pic_file_handle : the Pointer of the lication to save the Handle of the current file.
  991. *
  992. * \return \e PIC_IF_SUCCESSFUL on success.
  993. * \e PIC_IF_INVALID_PIC_HANDLE on PIC handle provided is invalid.
  994. * \e PIC_IF_PIC_INSTANCE_CANNOT_CLOSE on state transaction error.
  995. * \e PIC_IF_INVALID_FILE_HANDLE on file handle provided is invalid.
  996. * \e PIC_IF_INVALID_WORKING_PIC_INFO_ADDR on it's the invalid address for working pic info address
  997. * \note State must be at PIC_STATE_IDLE before closing a File.
  998. * File Open Method should be opened by File Name.
  999. * After closing a file the state will be set to PIC_STATE_INIT.
  1000. ******************************************************************************************/
  1001. PIC_IF_EXTERN int PIC_FILE_CloseFile(PIC_Handle, PIC_FILE_Handle);
  1002. /******************************************************************************************/
  1003. /**
  1004. * \fn Int PIC_RetrieveInfo (PIC_Handle handle,PIC_FILE_Handle pic_file_handle,enum PIC_InfoStag_t dInfoType, void *pic_info);
  1005. *
  1006. * \brief to get the picture Info.
  1007. *
  1008. * \param handle : the instance handle for the PIC thread.
  1009. * \param pic_file_handle : the Handle of the current file.
  1010. * \param dInfoType : indicate that which kind of info will be retrieve.
  1011. * \param pic_info : return the pointer to get the picture information
  1012. *
  1013. * \return \e PIC_IF_SUCCESSFUL on success.
  1014. * \e PIC_IF_INVALID_HANDLE if Handle provided is invalid.
  1015. * \e PIC_IF_FILE_FORMAT_ERROR if Error Occured During Specific
  1016. * File parsing.
  1017. * \note none
  1018. ******************************************************************************************/
  1019. PIC_IF_EXTERN int PIC_RetrieveInfo(PIC_Handle, PIC_FILE_Handle, enum PIC_InfoStag_t, void *);
  1020. /******************************************************************************************/
  1021. /**
  1022. *\fn int PIC_Decode(PIC_Handle pPICHandle, PIC_FILE_Handle file_handle, enum PIC_Target_t mem_type, void *target)
  1023. *
  1024. * \brief Decoding the picture to the target buffer.
  1025. *
  1026. * \param pPICHandle : the instance handle for the PIC thread.
  1027. * \param file_handle : the Handle of the current file.
  1028. * \param mem_type : PIC_TARGET_FRAME_BUFFER_NO : the 3rd param will be Frame buffer number
  1029. * PIC_TARGET_BUFFER_ADDRESS : the 3rd param will be buffer address;
  1030. * \param target : depending on 2nd param , will be frame buffer number or address and size.
  1031. *
  1032. * \return \e PIC_IF_SUCCESSFUL on success.
  1033. * \e PIC_IF_INVALID_HANDLE if Handle provided is invalid.
  1034. * \e PIC_IF_FUNCTION_NOT_SUPPORT if the system does not
  1035. * support File object.
  1036. * \e PIC_IF_STATE_TRANSITION_ERROR if Current PIC State
  1037. * Prevents this operation to execute.
  1038. * \e PIC_IF_DECODING_ERROR if Error Occured During decoding
  1039. *
  1040. * \note State must be at PIC_STATE_INIT before the decoding.
  1041. * when entering decode function, the state will be set to
  1042. * PIC_STATE_DECODE.
  1043. ******************************************************************************************/
  1044. PIC_IF_EXTERN int PIC_Decode(PIC_Handle, PIC_FILE_Handle, enum PIC_Target_t, void *);
  1045. /******************************************************************************************/
  1046. /**
  1047. * \fn int PIC_GetState(PIC_Handle handle,PIC_FILE_Handle pic_file_handle, UINT8* pPICState,UINT8* pic_decode_error)
  1048. *
  1049. * \brief Get current state of a PIC Decoding.
  1050. *
  1051. * \param handle : the instance handle for the PIC thread.
  1052. * \param pic_file_handle : the Handle of the current file.
  1053. * \param pPICState : Pointer to a variable that will hold the returned state.
  1054. * \param pic_decode_error : if there is any error info produced by decoding.
  1055. *
  1056. * \return \e PIC_IF_SUCCESSFUL on success.
  1057. * \e PIC_IF_INVALID_HANDLE if Handle provided is invalid.
  1058. *
  1059. * \note None.
  1060. ******************************************************************************************/
  1061. PIC_IF_EXTERN int PIC_GetState(PIC_Handle, PIC_FILE_Handle, UINT8 *, UINT8 *);
  1062. /******************************************************************************************/
  1063. /**
  1064. * \fn int PIC_Stop(PIC_Handle handle, PIC_FILE_Handle file_handle)
  1065. *
  1066. * \brief Stop PIC Decoding.
  1067. *
  1068. * \param handle : the instance handle for the PIC thread.
  1069. * \param file_handle : the Handle of the current file.
  1070. *
  1071. * \return \e PIC_IF_SUCCESSFUL on success.
  1072. * \e PIC_IF_INVALID_HANDLE if Handle provided is invalid.
  1073. *
  1074. * \note None.
  1075. ******************************************************************************************/
  1076. PIC_IF_EXTERN int PIC_Stop(PIC_Handle, PIC_FILE_Handle);
  1077. /******************************************************************************************/
  1078. /**
  1079. * \fn int PIC_GetFileDescriptor(PIC_Handle handle, PIC_FILE_Handle file_handle,int*data)
  1080. *
  1081. * \brief retrieve the file descriptor
  1082. *
  1083. * \param handle : the instance handle for the PIC thread.
  1084. * \param file_handle : the Handle of the current file.
  1085. * \param data : is the pointer of the location to indicate the information of file descriptor.
  1086. * \return \e PIC_IF_SUCCESSFUL on success.
  1087. * \e PIC_IF_INVALID_HANDLE if Handle provided is invalid.
  1088. *
  1089. * \note None.
  1090. ******************************************************************************************/
  1091. PIC_IF_EXTERN int PIC_GetFileDescriptor(PIC_Handle, PIC_FILE_Handle, int *);
  1092. /******************************************************************************************/
  1093. /**
  1094. * \fn int PIC_Effect(PIC_Handle pPICEffectHandle, PIC_EFFECT_INFO_t * pic_effect_info)
  1095. *
  1096. * \brief picture effect, this function is for non-effect-thread .\n
  1097. *
  1098. * \param pPICEffectHandle : the instance handle for the PIC thread.
  1099. * \param pic_effect_info : using by PIC_Effect
  1100. *
  1101. * \return \e PIC_IF_SUCCESSFUL on success.
  1102. *
  1103. * \note None.
  1104. ******************************************************************************************/
  1105. PIC_IF_EXTERN int PIC_Effect(PIC_Handle, PIC_EFFECT_INFO_t *);
  1106. /******************************************************************************************/
  1107. /**
  1108. * \fn int PIC_Stop_Effect(PIC_Handle pic_effect_handle)
  1109. *
  1110. * \brief stop picture effect, this function is both for non-effect-thread and for an effect thread .
  1111. *
  1112. * \param pic_effect_handle : the PIC handle
  1113. * \return \e PIC_IF_SUCCESSFUL on success.
  1114. *
  1115. * \note None.
  1116. ******************************************************************************************/
  1117. PIC_IF_EXTERN int PIC_Stop_Effect(PIC_Handle);
  1118. /******************************************************************************************/
  1119. /**
  1120. * \fn int PIC_Effect_Send(PIC_Handle pPICEffectHandle, PIC_EFFECT_INFO_t * pic_effect_info)
  1121. *
  1122. * \brief Send PIC Effect. This API is for effect thread using.
  1123. *
  1124. * \param pPICEffectHandle : the Handle of the current file.
  1125. * \param pic_effect_info : using by PIC_Effect_Send
  1126. *
  1127. * \return \e PIC_IF_SUCCESSFUL on success.
  1128. * \e PIC_Effect_IF_INVALID_HANDLE if Handle provided is invalid.
  1129. *
  1130. * \note None.
  1131. ******************************************************************************************/
  1132. PIC_IF_EXTERN int PIC_Effect_Send(PIC_Handle pPICEffectHandle, PIC_EFFECT_INFO_t * pic_effect_info);
  1133. /******************************************************************************************/
  1134. /**
  1135. * \fn int PIC_PriorityOpen(enum PIC_Priority_t dPriority, PIC_Handle * pPICHandle,UINT8* pWorkMemory)
  1136. *
  1137. * \brief Initialize the resource for PIC Module and set as the specific priority.
  1138. * (ex: working buffer, PIC_Params space)
  1139. *
  1140. * \param dPriority : the specific value of the PIC thread Priority.
  1141. * \param pPICHandle : Pointer to handle that will carry the Handle to the current file.
  1142. * If the API is succesfully executed.
  1143. * \param pWorkMemory : the pointer of the memory which will used by picture module.
  1144. *
  1145. * \return \e PIC_IF_SUCCESSFUL on success.
  1146. * \e PIC_IF_PIC_HANDLE_NULL on PIC_HANDLE is NULL.
  1147. * \e PIC_IF_PIC_NOT_INITIALIZED on PIC Module is not existed.
  1148. * \e PIC_IF_MAXIMUN_INSTANCE_REACHED on the number of instance objects is reached to Maximum.
  1149. * \e PIC_IF_MALLOC_ERROR on no memory allocates for pic module object.
  1150. *
  1151. * \note the initial state after PIC_Open is PIC_STATE_IDLE
  1152. ******************************************************************************************/
  1153. PIC_IF_EXTERN int PIC_PriorityOpen(enum PIC_Priority_t dPriority, PIC_Handle *, UINT8*);
  1154. /******************************************************************************************/
  1155. /**
  1156. * \fn int PIC_ROM_OpenFile(PIC_Handle handle, PIC_FILE_Handle *pic_file_handle,const UINT8 * pRomImage, const UINT32 dSize)
  1157. *
  1158. * \brief Open a rom file playback object. Malloc the space for working_pic_info space.
  1159. * classify a file and assign the specific decoder function pointer.
  1160. *
  1161. * \param handle : the instance handle for the PIC thread.
  1162. * \param pic_file_handle : the Pointer of the lication to save the Handle of the current file.
  1163. * \param pRomImage : the Pointer of the rom bitstream.
  1164. * \param dSize : the size of the rom bitstreams.
  1165. *
  1166. * \return \e PIC_IF_SUCCESSFUL on success.
  1167. * \e PIC_IF_INVALID_PIC_HANDLE on PIC handle provided is invalid.
  1168. * \e PIC_IF_PIC_INSTANCE_NOT_OPEN_READY on PIC_OPEN not successful for this object, it cannot open a file
  1169. * \e PIC_IF_MALLOC_ERROR on no memory allocates for working_pic_info space.
  1170. * \e PIC_IF_FILE_OPEN_ERROR on it cannot succeed to open file.
  1171. *
  1172. *
  1173. * \note A PIC module can only open one playback object.
  1174. ******************************************************************************************/
  1175. PIC_IF_EXTERN int PIC_ROM_OpenFile(PIC_Handle pPICHandle, PIC_FILE_Handle * file_handle, const UINT8 * pRomImage, const UINT32 dSize);
  1176. /******************************************************************************************/
  1177. /**
  1178. * \fn void PIC_set_disp_center(UINT8 dUse)
  1179. *
  1180. * \brief set if the picture will show on the center of display.
  1181. * \param dUse : 0: not the center, 1: at the center.
  1182. *
  1183. *
  1184. * \note A PIC module can only open one playback object.
  1185. ******************************************************************************************/
  1186. PIC_IF_EXTERN void PIC_set_disp_center(UINT8 dUse);
  1187. /******************************************************************************************/
  1188. /**
  1189. * \fn int PIC_WaitIdle(PIC_Handle pPICHandle,INT32 sdTimeOutByms)
  1190. *
  1191. * \brief wait for the current instance to IDLE STATE
  1192. *
  1193. * \param pPICHandle : the instance handle for the PIC thread.
  1194. * \param sdTimeOutByms : the timeout limitation
  1195. *
  1196. * \return \e PIC_IF_SUCCESSFUL on success.
  1197. * \e PIC_IF_INVALID_PIC_HANDLE on PIC handle provided is invalid.
  1198. * \e PIC_IF_TRANSITION_ERROR on it cannot wait for IDLE .
  1199. *
  1200. *
  1201. * \note A PIC module can only open one playback object.
  1202. ******************************************************************************************/
  1203. PIC_IF_EXTERN int PIC_WaitIdle(PIC_Handle pPICHandle, INT32 sdTimeOutByms);
  1204. /******************************************************************************************/
  1205. /**
  1206. *\fn int PIC_Encode(PIC_Handle pPICHandle, Encode_params_t *pEncodeParams);
  1207. *
  1208. * \brief Encoding the picture to the target buffer.
  1209. *
  1210. * \param pPICHandle : the instance handle for the PIC thread.
  1211. * \param pEncodeParams : all the parameters for encode.
  1212. *
  1213. *
  1214. * \return \e PIC_IF_SUCCESSFUL on success.
  1215. * \e PIC_IF_INVALID_HANDLE if Handle provided is invalid.
  1216. *
  1217. ******************************************************************************************/
  1218. PIC_IF_EXTERN int PIC_Encode(PIC_Handle pPICHandle, Encode_params_t *pEncodeParams);
  1219. // scott add 03/26 2010
  1220. // JPEG Encoder support
  1221. /******************************************************************************************/
  1222. /**
  1223. * \fn int PIC_Stop_Encode(PIC_Handle pPICHandle)
  1224. *
  1225. * \brief stop picture encode
  1226. *
  1227. * \param pPICHandle : the PIC handle
  1228. * \return \e PIC_IF_SUCCESSFUL on success.
  1229. *
  1230. * \note None.
  1231. ******************************************************************************************/
  1232. PIC_IF_EXTERN int PIC_Stop_Encode(PIC_Handle pPICHandle);
  1233. // end scott add 03/26 2010
  1234. /******************************************************************************************/
  1235. /**
  1236. * \fn int PIC_PriorityClose(PIC_Handle pPICHandle,UINT8** ppWorkMemory, UINT8** ppExtMemory)
  1237. *
  1238. * \brief release the resource for picture module(pair with PIC_PriorityOpen
  1239. * ).
  1240. *
  1241. * \param pPICHandle : Pointer to the handle of the current file.
  1242. * \param ppWorkMemory : the area to save the Pointer to the working memory in picture module.
  1243. * \param ppExtMemory : the area to save the Pointer to the extension memory in picture module.
  1244. *
  1245. * \return \e PIC_IF_SUCCESSFUL on success.
  1246. * \e PIC_IF_INVALID_PIC_HANDLE on PIC handle provided is invalid.
  1247. * \e PIC_IF_INVALID_WORKING_BUFFER_ADDR on working buffer address is null, it's not reasonable.
  1248. * \e PIC_IF_INVALID_PIC_PARAMS on pic params address is null, it's not reasonable.
  1249. * \e PIC_IF_CREATE_DECODE_THREAD_FAIL on Decode thread cannot create successfully.
  1250. *
  1251. * \note State must be at PIC_STATE_IDLE before closing.
  1252. ******************************************************************************************/
  1253. PIC_IF_EXTERN int PIC_PriorityClose(PIC_Handle pPICHandle, UINT8** ppWorkMemory, UINT8** ppExtMemory);
  1254. //zeno_JR
  1255. /******************************************************************************************/
  1256. /**
  1257. *\fn int PIC_JR_Use(PIC_Handle pPICHandle, JR_params_t *pJRParams);
  1258. *
  1259. * \brief JR the source buffer to the target buffer.
  1260. *
  1261. * \param pPICHandle : the instance handle for the PIC thread.
  1262. * \param pJRParams : all the parameters for PIC_JR_Use.
  1263. *
  1264. *
  1265. * \return \e PIC_IF_SUCCESSFUL on success.
  1266. * \e PIC_IF_INVALID_HANDLE if Handle provided is invalid.
  1267. *
  1268. ******************************************************************************************/
  1269. PIC_IF_EXTERN int PIC_JR_Use(PIC_Handle pPICHandle, JR_params_t *pJRParams);
  1270. //zeno_JR_END
  1271. //zeno_JRII
  1272. /******************************************************************************************/
  1273. /**
  1274. *\fn int PIC_JR_Basis(PIC_Handle pPICHandle, JR_params_t *pJRParams);
  1275. *
  1276. * \brief JR the source buffer to the target buffer basic.
  1277. *
  1278. * \param pPICHandle : the instance handle for the PIC thread.
  1279. * \param pJRParams : all the parameters for PIC_JR_Basis.
  1280. *
  1281. *
  1282. * \return \e PIC_IF_SUCCESSFUL on success.
  1283. * \e PIC_IF_INVALID_HANDLE if Handle provided is invalid.
  1284. *
  1285. ******************************************************************************************/
  1286. PIC_IF_EXTERN int PIC_JR_Basis(PIC_Handle pPICHandle, JR_Basis_params_t *pJRParams);
  1287. /******************************************************************************************/
  1288. /**
  1289. *\fn int PIC_JR_Basis_Src(PIC_Handle pPICHandle, JR_params_t *pJRParams);
  1290. *
  1291. * \brief JR the source buffer to the target buffer source.
  1292. *
  1293. * \param pPICHandle : the instance handle for the PIC thread.
  1294. * \param pJRParams : all the parameters for PIC_JR_Basis_Src.
  1295. *
  1296. *
  1297. * \return \e PIC_IF_SUCCESSFUL on success.
  1298. * \e PIC_IF_INVALID_HANDLE if Handle provided is invalid.
  1299. *
  1300. ******************************************************************************************/
  1301. PIC_IF_EXTERN int PIC_JR_Basis_Src(PIC_Handle pPICHandle, JR_Basis_Src_params_t *pJRParams);
  1302. // JR support
  1303. /******************************************************************************************/
  1304. /**
  1305. * \fn int PIC_Stop_JR(PIC_Handle pPICHandle)
  1306. *
  1307. * \brief stop JR process
  1308. *
  1309. * \param pPICHandle : the PIC handle
  1310. * \return \e PIC_IF_SUCCESSFUL on success.
  1311. *
  1312. * \note None.
  1313. ******************************************************************************************/
  1314. PIC_IF_EXTERN int PIC_Stop_JR(PIC_Handle pPICHandle);
  1315. //zeno_JRII_END
  1316. // zeno_20100429
  1317. // GIF JR support only for single GIF
  1318. /******************************************************************************************/
  1319. /**
  1320. * \fn int PIC_Set_GIF_JR_path(PIC_Handle pPICHandle, enum PIC_GIF_JR_Path_t dGIF_JR)
  1321. *
  1322. * \brief open JR path only for single GIF
  1323. *
  1324. * \param pPICHandle : Pointer to the handle of the current file.
  1325. * \param dGIF_JR : enable/disable JR path only for single GIF.
  1326. * \return \e None.
  1327. *
  1328. * \note Could be remove when JR support GIF.
  1329. ******************************************************************************************/
  1330. PIC_IF_EXTERN int PIC_Set_GIF_JR_path(PIC_Handle pPICHandle, enum PIC_GIF_JR_Path_t dGIF_JR);
  1331. /******************************************************************************************/
  1332. /**
  1333. * \fn void PIC_GetVersion(UINT32 *pdVersion)
  1334. *
  1335. * \brief get the current version number of picture module.
  1336. * \param pdVersion : return the pointer to the version number.
  1337. *
  1338. *
  1339. * \note Not use now.
  1340. ******************************************************************************************/
  1341. PIC_IF_EXTERN void PIC_GetVersion(UINT32 *pdVersion);
  1342. PIC_IF_EXTERN void PIC_GetSerial(UINT32 *pdSerial);
  1343. #endif //_PIC_IF_H