Home | History | Annotate | Download | only in test
      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 *             Texas Instruments OMAP(TM) Platform Software
     19 *  (c) Copyright Texas Instruments, Incorporated.  All Rights Reserved.
     20 *
     21 *  Use of this software is controlled by the terms and conditions found
     22 *  in the license agreement under which this software has been supplied.
     23 * ================================================================================= */
     24 /**
     25 * @file JPEGTest.h
     26 *
     27 * This file implements OMX Component for JPEG encoder that
     28 * is fully compliant with the OMX specification 1.5.
     29 *
     30 * @path  $(CSLPATH)\src
     31 *
     32 * @rev  0.1
     33 */
     34 /* -------------------------------------------------------------------------------- */
     35 /* ================================================================================
     36 *!
     37 *! Revision History
     38 *! ===================================
     39 *!
     40 *! 22-May-2006 mf: Revisions appear in reverse chronological order;
     41 *! that is, newest first.  The date format is dd-Mon-yyyy.
     42 * ================================================================================= */
     43 #ifndef OMX_JPEGTEST_H
     44 #define OMX_JPEGTEST_H
     45 
     46 
     47 typedef struct IMAGE_INFO {
     48     int nWidth;
     49     int nHeight ;
     50     int nFormat;
     51     int nComment;
     52     char* pCommentString;
     53     int nThumbnailWidth_app0;
     54     int nThumbnailHeight_app0;
     55     int nThumbnailWidth_app1;
     56     int nThumbnailHeight_app1;
     57     int nThumbnailWidth_app5;
     58     int nThumbnailHeight_app5;
     59     int nThumbnailWidth_app13;
     60     int nThumbnailHeight_app13;
     61     int nDRI;
     62     OMX_BOOL bAPP0;
     63     OMX_BOOL bAPP1;
     64     OMX_BOOL bAPP5;
     65     OMX_BOOL bAPP13;
     66 } IMAGE_INFO;
     67 
     68 typedef struct JPEGE_EVENTPRIVATE {
     69     OMX_EVENTTYPE eEvent;
     70     OMX_PTR pAppData;
     71     OMX_PTR pEventInfo;
     72     OMX_U32 nData1;
     73     OMX_U32 nData2;
     74 }JPEGE_EVENTPRIVATE;
     75 
     76 #define MALLOC(_pStruct_, _sName_)  \
     77     _pStruct_ = (_sName_*)malloc(sizeof(_sName_));  \
     78     if(_pStruct_ == NULL){  \
     79         error = OMX_ErrorInsufficientResources;  \
     80         goto EXIT;  \
     81     }\
     82     memset((void *)_pStruct_, 0, sizeof(_sName_))
     83 
     84 #define FREE(_ptr)   \
     85 {                     \
     86     if (_ptr != NULL) { \
     87         free(_ptr);   \
     88         _ptr = NULL; \
     89     }                \
     90 }
     91 
     92 #define OMX_CONF_CHECK_CMD(_ptr1, _ptr2, _ptr3) \
     93 {                       \
     94     if(!_ptr1 || !_ptr2 || !_ptr3){     \
     95         eError = OMX_ErrorBadParameter;     \
     96     goto OMX_CONF_CMD_BAIL;         \
     97     }                       \
     98 }
     99 #ifdef UNDER_CE
    100 #define sleep Sleep
    101 #endif
    102 
    103 
    104 /*#define OMX_DEB*/
    105 #ifdef OMX_DEB
    106     #define PRINT(...) fprintf(stdout,__VA_ARGS__)
    107 #else
    108     #define PRINT(...)
    109 #endif
    110 
    111 #define DSP_MMU_FAULT_HANDLING
    112 
    113 #endif /* OMX_JPEGTEST_H */
    114 
    115