defines.h File Reference

Header file containing some useful global definitions. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TRACE   0
#define JM   "15 (FRExt)"
#define VERSION   "15.1"
#define EXT_VERSION   "(FRExt)"
#define GET_METIME   1
#define DUMP_DPB   0
#define IMGTYPE   1
#define ENABLE_FIELD_CTX   1
#define ENABLE_HIGH444_CTX   1
#define DEBUG_BITDEPTH   0
#define ALLOW_GRAYSCALE   0
#define ZEROSNR   1
#define MAX_RC_MODE   3
#define RC_MAX_TEMPORAL_LEVELS   5
#define BASELINE   66
#define MAIN   77
#define EXTENDED   88
#define FREXT_HP   100
#define FREXT_Hi10P   110
#define FREXT_Hi422   122
#define FREXT_Hi444   244
#define FREXT_CAVLC444   44
#define FILE_NAME_SIZE   255
#define INPUT_TEXT_SIZE   1024
#define CAVLC_LEVEL_LIMIT   2063
#define NUM_BLOCK_TYPES   22
#define _LEAKYBUCKET_
#define _LUMA_COEFF_COST_   4
#define _CHROMA_COEFF_COST_   4
#define _LUMA_MB_COEFF_COST_   5
#define _LUMA_8x8_COEFF_COST_   5
#define IMG_PAD_SIZE   20
#define IMG_PAD_SIZE_TIMES4   80
#define MAX_VALUE   999999
#define INVALIDINDEX   (-135792468)
#define DUMMY   14
#define LAMBDA_ACCURACY_BITS   16
#define LAMBDA_FACTOR(lambda)   ((int)((double)(1 << LAMBDA_ACCURACY_BITS) * lambda + 0.5))
#define WEIGHTED_COST(factor, bits)   (((factor) * (bits)) >> LAMBDA_ACCURACY_BITS)
#define MV_COST(f, s, cx, cy, px, py)   (WEIGHTED_COST(f,mvbits[((cx) << (s)) - px] + mvbits[((cy) << (s)) - py]))
#define MV_COST_SMP(f, cx, cy, px, py)   (WEIGHTED_COST(f,mvbits[cx - px] + mvbits[cy - py]))
#define REF_COST(f, ref, list_offset)   (WEIGHTED_COST(f,((listXsize[list_offset]<=1)? 0:refbits[(ref)])))
#define MAX_REFERENCE_PICTURES   32
#define BLOCK_SHIFT   2
#define BLOCK_SIZE   4
#define BLOCK_SIZE_8x8   8
#define SMB_BLOCK_SIZE   8
#define BLOCK_PIXELS   16
#define MB_BLOCK_SIZE   16
#define MB_PIXELS   256
#define MB_PIXELS_SHIFT   8
#define MB_BLOCK_SHIFT   4
#define BLOCK_MULTIPLE   4
#define MB_BLOCK_PARTITIONS   16
#define BLOCK_CONTEXT   64
#define BLOCK_SIZE_SP   16
#define BLOCK_SIZE_8x8_SP   32
#define NO_INTRA_PMODE   9
#define IS_INTRA(MB)   ((MB)->mb_type==I4MB || (MB)->mb_type==I16MB || (MB)->mb_type==I8MB || (MB)->mb_type==IPCM)
#define IS_INTER(MB)   ((MB)->mb_type!=I4MB && (MB)->mb_type!=I16MB && (MB)->mb_type!=I8MB)
#define IS_INTERMV(MB)   ((MB)->mb_type!=I4MB && (MB)->mb_type!=I16MB && (MB)->mb_type!=I8MB && (MB)->mb_type!=0)
#define IS_DIRECT(MB)   ((MB)->mb_type==0 && (img->type==B_SLICE))
#define LEVEL_NUM   6
#define TOTRUN_NUM   15
#define RUNBEFORE_NUM   7
#define RUNBEFORE_NUM_M1   6
#define MIN_QP   0
#define MAX_QP   51
#define SHIFT_QP   12
#define INIT_FRAME_RATE   30
#define MAX_SYMBOLS_PER_MB   1200
#define MAX_PART_NR   3
#define ZEROBYTES_SHORTSTARTCODE   2
#define Q_BITS   15
#define DQ_BITS   6
#define Q_BITS_8   16
#define DQ_BITS_8   6
#define CALM_MF_FACTOR_THRESHOLD   512.0
#define MAX_PLANE   3
#define IS_INDEPENDENT(IMG)   ((IMG)->separate_colour_plane_flag)
#define IS_FREXT_PROFILE(profile_idc)   ( profile_idc>=FREXT_HP || profile_idc == FREXT_CAVLC444 )

Typedefs

typedef unsigned char byte
typedef unsigned char uint8
typedef unsigned short uint16
typedef unsigned int uint32
typedef unsigned short imgpel
typedef int distpel

Enumerations

enum  {
  PSKIP = 0, BSKIP_DIRECT = 0, P16x16 = 1, P16x8 = 2,
  P8x16 = 3, SMB8x8 = 4, SMB8x4 = 5, SMB4x8 = 6,
  SMB4x4 = 7, P8x8 = 8, I4MB = 9, I16MB = 10,
  IBLOCK = 11, SI4MB = 12, I8MB = 13, IPCM = 14,
  MAXMODE = 15
}
enum  { DIR_TEMPORAL = 0, DIR_SPATIAL = 1 }
enum  {
  LUMA = 0, LUMA_INTRA16x16DC = 1, LUMA_INTRA16x16AC = 2, CB = 3,
  CB_INTRA16x16DC = 4, CB_INTRA16x16AC = 5, CR = 8, CR_INTRA16x16DC = 9,
  CR_INTRA16x16AC = 10
}
enum  {
  LUMA_16DC = 0, LUMA_16AC = 1, LUMA_8x8 = 2, LUMA_8x4 = 3,
  LUMA_4x8 = 4, LUMA_4x4 = 5, CHROMA_DC = 6, CHROMA_AC = 7,
  CHROMA_DC_2x4 = 8, CHROMA_DC_4x4 = 9, CB_16DC = 10, CB_16AC = 11,
  CB_8x8 = 12, CB_8x4 = 13, CB_4x8 = 14, CB_4x4 = 15,
  CR_16DC = 16, CR_16AC = 17, CR_8x8 = 18, CR_8x4 = 19,
  CR_4x8 = 20, CR_4x4 = 21
}
enum  {
  VERT_PRED = 0, HOR_PRED = 1, DC_PRED = 2, DIAG_DOWN_LEFT_PRED = 3,
  DIAG_DOWN_RIGHT_PRED = 4, VERT_RIGHT_PRED = 5, HOR_DOWN_PRED = 6, VERT_LEFT_PRED = 7,
  HOR_UP_PRED = 8
}
enum  { VERT_PRED_16 = 0, HOR_PRED_16 = 1, DC_PRED_16 = 2, PLANE_16 = 3 }
enum  { DC_PRED_8 = 0, HOR_PRED_8 = 1, VERT_PRED_8 = 2, PLANE_8 = 3 }
enum  { EOS = 1, SOP = 2, SOS = 3 }
enum  { MVPRED_MEDIAN = 0, MVPRED_L = 1, MVPRED_U = 2, MVPRED_UR = 3 }

Variables

enum { ... }  MBModeTypes
enum { ... }  DirectModes
enum { ... }  CAVLCBlockTypes
enum { ... }  CABACBlockTypes
enum { ... }  I4x4PredModes
enum { ... }  I16x16PredModes
enum { ... }  I8x8PredModes
enum { ... }  MVPredTypes


Detailed Description

Header file containing some useful global definitions.

Author:
Main contributors (see contributors.h for copyright, address and affiliation details)
Date:
21. March 2001

Definition in file defines.h.


Define Documentation

#define _CHROMA_COEFF_COST_   4

threshold for chroma coeffs, used to be 7

Definition at line 77 of file defines.h.

Referenced by dct_chroma(), and dct_chroma_sp().

#define _LUMA_8x8_COEFF_COST_   5

threshold for luma coeffs of 8x8 Inter Partition

Definition at line 79 of file defines.h.

Referenced by SetCoeffAndReconstruction8x8().

#define _LUMA_COEFF_COST_   4

threshold for luma coeffs

Definition at line 76 of file defines.h.

Referenced by LumaResidualCoding8x8().

#define _LUMA_MB_COEFF_COST_   5

threshold for luma coeffs of inter Macroblocks

Definition at line 78 of file defines.h.

Referenced by LumaResidualCoding().

#define ALLOW_GRAYSCALE   0

Allow encoding in grayscale.

Definition at line 40 of file defines.h.

#define BASELINE   66

YUV 4:2:0/8 "Baseline".

Definition at line 49 of file defines.h.

#define DEBUG_BITDEPTH   0

Ensures that > 8 bit content have no values that would result in out of range results.

Definition at line 39 of file defines.h.

#define DUMP_DPB   0

Dump DPB info for debug purposes.

Definition at line 35 of file defines.h.

#define ENABLE_FIELD_CTX   1

Enables field context types for CABAC. If disabled, results in speedup for progressive content.

Definition at line 37 of file defines.h.

#define ENABLE_HIGH444_CTX   1

Enables High 444 context types for CABAC. If disabled, results in speedup of non High444 profile encodings.

Definition at line 38 of file defines.h.

#define EXTENDED   88

YUV 4:2:0/8 "Extended".

Definition at line 51 of file defines.h.

#define FREXT_CAVLC444   44

YUV 4:4:4/14 "CAVLC 4:4:4".

Definition at line 56 of file defines.h.

Referenced by GeneratePictureParameterSet(), GenerateSequenceParameterSet(), PatchInp(), and ProfileCheck().

#define FREXT_Hi10P   110

YUV 4:2:0/10 "High 10".

Definition at line 53 of file defines.h.

Referenced by GeneratePictureParameterSet(), GenerateSequenceParameterSet(), and ProfileCheck().

#define FREXT_Hi422   122

YUV 4:2:2/10 "High 4:2:2".

Definition at line 54 of file defines.h.

Referenced by GeneratePictureParameterSet(), GenerateSequenceParameterSet(), PatchInp(), and ProfileCheck().

#define FREXT_Hi444   244

YUV 4:4:4/14 "High 4:4:4".

Definition at line 55 of file defines.h.

Referenced by GeneratePictureParameterSet(), GenerateSequenceParameterSet(), PatchInp(), and ProfileCheck().

#define FREXT_HP   100

YUV 4:2:0/8 "High".

Definition at line 52 of file defines.h.

Referenced by GeneratePictureParameterSet(), GenerateSequenceParameterSet(), PatchInp(), and ProfileCheck().

#define GET_METIME   1

Enables or disables ME computation time.

Definition at line 34 of file defines.h.

#define IMG_PAD_SIZE   20

#define IMG_PAD_SIZE_TIMES4   80

#define IMGTYPE   1

Define imgpel size type. 0 implies byte (cannot handle >8 bit depths) and 1 implies unsigned short.

Definition at line 36 of file defines.h.

#define MAIN   77

YUV 4:2:0/8 "Main".

Definition at line 50 of file defines.h.

#define MAX_PART_NR   3

Maximum number of different data partitions. Some reasonable number which should reflect what is currently defined in the SE2Partition map (elements.h)

Definition at line 267 of file defines.h.

#define MAX_SYMBOLS_PER_MB   1200

Maximum number of different syntax elements for one MB.

Definition at line 263 of file defines.h.

#define MAX_VALUE   999999

#define TRACE   0

0:Trace off 1:Trace on 2:detailed CABAC context information

Definition at line 27 of file defines.h.

#define ZEROSNR   1

PSNR computation method.

Definition at line 41 of file defines.h.


Typedef Documentation

typedef unsigned char byte

byte type definition

Definition at line 120 of file defines.h.

typedef unsigned short uint16

type definition for unsigned short (16 bits)

Definition at line 122 of file defines.h.

typedef unsigned int uint32

type definition for unsigned int (32 bits)

Definition at line 123 of file defines.h.

typedef unsigned char uint8

type definition for unsigned char (same as byte)

Definition at line 121 of file defines.h.


Enumeration Type Documentation

anonymous enum

Enumerator:
DIR_TEMPORAL  Temporal Direct Mode.
DIR_SPATIAL  Spatial Direct Mode.

Definition at line 158 of file defines.h.

anonymous enum

Enumerator:
EOS  End Of Sequence.
SOP  Start Of Picture.
SOS  Start Of Slice.

Definition at line 249 of file defines.h.


Documentation generated with DoxyGen