Home | History | Annotate | Download | only in common
      1 /******************************************************************************
      2 *
      3 * Copyright (C) 2012 Ittiam Systems Pvt Ltd, Bangalore
      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 /**
     19 *******************************************************************************
     20 * @file
     21 *  ihevc_debug.h
     22 *
     23 * @brief
     24 *  Definitions for codec debugging
     25 *
     26 * @author
     27 *  Ittiam
     28 *
     29 * @par List of Functions:
     30 *
     31 * @remarks
     32 *  None
     33 *
     34 *******************************************************************************
     35 */
     36 #ifndef _IHEVC_DEBUG_H_
     37 #define _IHEVC_DEBUG_H_
     38 
     39 #ifdef DEBUG_PRINT
     40 
     41 #define DEBUG(...)                                                 \
     42 {                                                                           \
     43     printf("\n[HEVC DBG] %s/%d:: ", __FUNCTION__, __LINE__);                \
     44     printf(__VA_ARGS__);                                                    \
     45 }
     46 
     47 #else //DEBUG_CODEC
     48 
     49 #define DEBUG(...) {}
     50 
     51 #endif //DEBUG_CODEC
     52 
     53 #ifndef ASSERT_EXIT
     54 
     55 #define ASSERT(x) assert((x))
     56 //#define ASSERT(x) ihevcd_debug_ASSERT((x))
     57 
     58 #else
     59 #define ASSERT(x)                        \
     60 {                                        \
     61     if (!(x))                            \
     62     {                                    \
     63         printf("ASSERT %s %d\n", __FILE__, __LINE__);              \
     64         exit(-1);                        \
     65     }                                    \
     66 }
     67 #endif
     68 
     69 #endif /* _IHEVC_DEBUG_H_ */
     70 
     71