2012-05-30 12:10:23 +00:00
|
|
|
/**
|
|
|
|
* HEVC Encoder
|
2013-04-16 08:23:03 +00:00
|
|
|
* - Marko Viitanen ( fador at iki.fi ), Tampere University of Technology, Department of Pervasive Computing.
|
2012-05-30 12:10:23 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*! \file global.h
|
|
|
|
\brief Contains global includes
|
|
|
|
\author Marko Viitanen
|
2013-03-11 10:06:08 +00:00
|
|
|
\date 2013-03
|
2012-05-30 12:10:23 +00:00
|
|
|
|
2013-03-11 10:06:08 +00:00
|
|
|
This file should be included in every C-file.
|
2012-05-30 12:10:23 +00:00
|
|
|
*/
|
|
|
|
#ifndef __GLOBAL_H
|
|
|
|
#define __GLOBAL_H
|
|
|
|
|
2012-06-11 12:39:18 +00:00
|
|
|
/* CONFIG VARIABLES */
|
|
|
|
#define LCU_WIDTH 64 /*!< Largest Coding Unit */
|
2013-04-17 14:08:52 +00:00
|
|
|
|
2013-05-07 07:36:04 +00:00
|
|
|
#define MAX_SEARCH_DEPTH 2
|
2013-04-17 14:08:52 +00:00
|
|
|
#define MIN_SEARCH_DEPTH 1
|
|
|
|
|
2013-03-11 10:06:08 +00:00
|
|
|
#define MAX_DEPTH 3 /*!< smallest CU is LCU_WIDTH>>MAX_DEPTH */
|
|
|
|
#define MIN_SIZE 3 /*!< log2_min_coding_block_size */
|
2012-06-11 12:39:18 +00:00
|
|
|
|
2013-03-20 15:27:47 +00:00
|
|
|
#define ENABLE_PCM 0 /*!< Setting to 1 will enable using PCM blocks (current intra-search does not consider PCM) */
|
|
|
|
#define ENABLE_SIGN_HIDING 0 /*!< NEED QUANT CHANGES! */
|
2012-06-11 12:39:18 +00:00
|
|
|
|
|
|
|
/* END OF CONFIG VARIABLES */
|
|
|
|
|
|
|
|
|
2012-05-30 12:10:23 +00:00
|
|
|
//Including stdint.h,
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#include "../include/stdint.h"
|
|
|
|
#else
|
|
|
|
#include <stdint.h>
|
|
|
|
#endif
|
|
|
|
|
2013-03-08 09:42:22 +00:00
|
|
|
/* Some tools */
|
2012-06-07 14:38:28 +00:00
|
|
|
#define MAX(a,b) (((a)>(b))?(a):(b))
|
|
|
|
#define MIN(a,b) (((a)<(b))?(a):(b))
|
2013-03-08 09:42:22 +00:00
|
|
|
#define CLIP(low,high,value) MAX((low),MIN((high),(value)))
|
|
|
|
#define SWAP(a,b,swaptype) { swaptype tempval; tempval = a; a = b; b = tempval; }
|
2012-06-04 10:47:12 +00:00
|
|
|
|
2013-03-11 10:06:08 +00:00
|
|
|
#define VERSION_STRING "0.2 "
|
|
|
|
#define VERSION 0.2
|
2012-05-30 12:10:23 +00:00
|
|
|
|
|
|
|
//#define VERBOSE 1
|
|
|
|
|
|
|
|
|
|
|
|
#define SIZE_2Nx2N 0
|
|
|
|
#define SIZE_2NxN 1
|
|
|
|
#define SIZE_Nx2N 2
|
|
|
|
#define SIZE_NxN 3
|
|
|
|
#define SIZE_NONE 15
|
|
|
|
|
2012-06-11 12:39:18 +00:00
|
|
|
/*
|
2012-05-30 12:10:23 +00:00
|
|
|
#define MODE_SKIP 0
|
|
|
|
#define MODE_INTER 1
|
|
|
|
#define MODE_INTRA 2
|
|
|
|
#define MODE_NONE 15
|
2012-06-11 12:39:18 +00:00
|
|
|
*/
|
2012-05-30 12:10:23 +00:00
|
|
|
|
2013-02-05 13:48:06 +00:00
|
|
|
|
|
|
|
/* Inlining functions */
|
|
|
|
#ifdef _MSC_VER /* Visual studio */
|
|
|
|
#define INLINE __forceinline
|
|
|
|
#pragma inline_recursion(on)
|
|
|
|
#else /* others */
|
|
|
|
#define INLINE inline
|
|
|
|
#endif
|
|
|
|
|
2013-04-09 12:59:12 +00:00
|
|
|
#define free_pointer(pointer) { free(pointer); pointer = NULL; }
|
2013-02-21 14:45:22 +00:00
|
|
|
|
2012-05-30 12:10:23 +00:00
|
|
|
#endif
|