1 2 /* 3 * Copyright 2001-2008 Texas Instruments - http://www.ti.com/ 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 /** 18 * Global data used communicate state changes back to the applicaiton. This probably 19 * should really be via a pipe or some other protected mechanism for better 20 * reliability, but this is sufficient for a demo. 21 **/ 22 /*Not used anymore in 2430*/ 23 /*static volatile OMX_State gComponentState = OMX_STATE_INVALID;*/ 24 25 #ifndef OMX_TESTDEC_H 26 #define OMX_TESTDEC_H 27 28 29 #ifndef UNDER_CE 30 #include <unistd.h> 31 #include <signal.h> 32 #endif 33 34 #include <OMX_Core.h> 35 #include <OMX_Types.h> 36 #include <OMX_Image.h> 37 38 /* this implements the function for initializing the debug handle */ 39 40 #define NUM_OF_BUFFERS 4 41 42 43 #define M_SOF0 0xC0 /* nStart Of Frame N*/ 44 #define M_SOF1 0xC1 /* N indicates which compression process*/ 45 #define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use*/ 46 #define M_SOF3 0xC3 47 #define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers*/ 48 #define M_SOF6 0xC6 49 #define M_SOF7 0xC7 50 #define M_SOF9 0xC9 51 #define M_SOF10 0xCA 52 #define M_SOF11 0xCB 53 #define M_SOF13 0xCD 54 #define M_SOF14 0xCE 55 #define M_SOF15 0xCF 56 #define M_SOI 0xD8 /* nStart Of Image (beginning of datastream)*/ 57 #define M_EOI 0xD9 /* End Of Image (end of datastream)*/ 58 #define M_SOS 0xDA /* nStart Of Scan (begins compressed data)*/ 59 #define M_JFIF 0xE0 /* Jfif marker*/ 60 #define M_EXIF 0xE1 /* Exif marker*/ 61 #define M_COM 0xFE /* COMment */ 62 #define M_DQT 0xDB 63 #define M_DHT 0xC4 64 #define M_DRI 0xDD 65 66 #define DSP_MMU_FAULT_HANDLING 67 68 typedef struct IMAGE_INFO { 69 int nWidth; 70 int nHeight ; 71 int format; 72 int nProgressive; 73 74 } IMAGE_INFO; 75 76 #ifdef UNDER_CE 77 OMX_STRING StrJpegDecoder= "OMX.TI.IMAGE.JPEG.DEC"; 78 #else 79 OMX_STRING StrJpegDecoder= "OMX.TI.JPEG.decoder"; 80 #endif 81 82 83 typedef struct JPEGD_EVENTPRIVATE { 84 OMX_EVENTTYPE eEvent; 85 OMX_PTR pAppData; 86 OMX_PTR pEventInfo; 87 OMX_U32 nData1; 88 OMX_U32 nData2; 89 }JPEGD_EVENTPRIVATE; 90 91 typedef struct OMX_CUSTOM_IMAGE_DECODE_SECTION 92 { 93 OMX_U32 nSize; 94 OMX_VERSIONTYPE nVersion; 95 OMX_U32 nMCURow; 96 OMX_U32 nAU; 97 OMX_BOOL bSectionsInput; 98 OMX_BOOL bSectionsOutput; 99 }OMX_CUSTOM_IMAGE_DECODE_SECTION; 100 101 102 typedef struct OMX_CUSTOM_IMAGE_DECODE_SUBREGION 103 { 104 OMX_U32 nSize; 105 OMX_VERSIONTYPE nVersion; 106 OMX_U32 nXOrg; /*Sectional decoding: X origin*/ 107 OMX_U32 nYOrg; /*Sectional decoding: Y origin*/ 108 OMX_U32 nXLength; /*Sectional decoding: X lenght*/ 109 OMX_U32 nYLength; /*Sectional decoding: Y lenght*/ 110 }OMX_CUSTOM_IMAGE_DECODE_SUBREGION; 111 112 typedef struct OMX_CUSTOM_RESOLUTION 113 { 114 OMX_U32 nWidth; 115 OMX_U32 nHeight; 116 } OMX_CUSTOM_RESOLUTION; 117 118 #endif /*OMX_TESTDEC_H*/ 119