OpenCores
URL https://opencores.org/ocsvn/bluespec-h264/bluespec-h264/trunk

Subversion Repositories bluespec-h264

[/] [bluespec-h264/] [trunk/] [test/] [decoder/] [ldecod/] [inc/] [defines.h] - Blame information for rev 100

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 jamey.hick
 
2
/*!
3
 **************************************************************************
4
 * \file defines.h
5
 *
6
 * \brief
7
 *    Headerfile containing some useful global definitions
8
 *
9
 * \author
10
 *    Detlev Marpe
11
 *    Copyright (C) 2000 HEINRICH HERTZ INSTITUTE All Rights Reserved.
12
 *
13
 * \date
14
 *    21. March 2001
15
 **************************************************************************
16
 */
17
 
18
#ifndef _DEFINES_H_
19
#define _DEFINES_H_
20
 
21
#if defined _DEBUG
22
#define TRACE           0                   //!< 0:Trace off 1:Trace on 2:detailed CABAC context information
23
#else
24
#define TRACE           0                   //!< 0:Trace off 1:Trace on 2:detailed CABAC context information
25
#endif
26
 
27
// Dump dbp for debug purposes
28
#define DUMP_DPB        0
29
//#define PAIR_FIELDS_IN_OUTPUT
30
 
31
//#define MAX_NUM_SLICES 150
32
#define MAX_NUM_SLICES 50
33
 
34
//FREXT Profile IDC definitions
35
#define FREXT_HP        100      //!< YUV 4:2:0/8 "High"
36
#define FREXT_Hi10P     110      //!< YUV 4:2:0/10 "High 10"
37
#define FREXT_Hi422     122      //!< YUV 4:2:2/10 "High 4:2:2"
38
#define FREXT_Hi444     144      //!< YUV 4:4:4/12 "High 4:4:4"
39
 
40
#define YUV400 0
41
#define YUV420 1
42
#define YUV422 2
43
#define YUV444 3
44
 
45
 
46
#define ZEROSNR 0
47
 
48
// CAVLC
49
#define LUMA              0
50
#define LUMA_INTRA16x16DC 1
51
#define LUMA_INTRA16x16AC 2
52
 
53
#define TOTRUN_NUM    15
54
#define RUNBEFORE_NUM  7
55
 
56
 
57
//--- block types for CABAC ----
58
#define LUMA_16DC       0
59
#define LUMA_16AC       1
60
#define LUMA_8x8        2
61
#define LUMA_8x4        3
62
#define LUMA_4x8        4
63
#define LUMA_4x4        5
64
#define CHROMA_DC       6
65
#define CHROMA_AC       7
66
#define CHROMA_DC_2x4   8
67
#define CHROMA_DC_4x4   9
68
#define NUM_BLOCK_TYPES 10
69
 
70
 
71
#define MAX_CODED_FRAME_SIZE 8000000         //!< bytes for one frame
72
 
73
//#define _LEAKYBUCKET_
74
 
75
#define P8x8    8
76
#define I4MB    9
77
#define I16MB   10
78
#define IBLOCK  11
79
#define SI4MB   12
80
#define I8MB    13
81
#define IPCM    14
82
#define MAXMODE 15
83
 
84
#define IS_INTRA(MB)    ((MB)->mb_type==I4MB  || (MB)->mb_type==I16MB ||(MB)->mb_type==IPCM || (MB)->mb_type==I8MB || (MB)->mb_type==SI4MB)
85
#define IS_NEWINTRA(MB) ((MB)->mb_type==I16MB  || (MB)->mb_type==IPCM)
86
#define IS_OLDINTRA(MB) ((MB)->mb_type==I4MB)
87
 
88
#define IS_INTER(MB)    ((MB)->mb_type!=I4MB  && (MB)->mb_type!=I16MB && (MB)->mb_type!=I8MB  && (MB)->mb_type!=IPCM)
89
#define IS_INTERMV(MB)  ((MB)->mb_type!=I4MB  && (MB)->mb_type!=I16MB && (MB)->mb_type!=I8MB  && (MB)->mb_type!=0 && (MB)->mb_type!=IPCM)
90
#define IS_DIRECT(MB)   ((MB)->mb_type==0     && (img->type==B_SLICE ))
91
#define IS_COPY(MB)     ((MB)->mb_type==0     && (img->type==P_SLICE || img->type==SP_SLICE))
92
#define IS_P8x8(MB)     ((MB)->mb_type==P8x8)
93
 
94
 
95
// Quantization parameter range
96
 
97
#define MIN_QP          0
98
#define MAX_QP          51
99
 
100
#define BLOCK_SIZE      4
101
#define MB_BLOCK_SIZE   16
102
#define MB_BLOCK_PIXELS 256    // MB_BLOCK_SIZE * MB_BLOCK_SIZE
103
#define BLOCK_MULTIPLE  4      // (MB_BLOCK_SIZE/BLOCK_SIZE)
104
 
105
#define NO_INTRA_PMODE  9        //!< #intra prediction modes
106
/* 4x4 intra prediction modes */
107
#define VERT_PRED             0
108
#define HOR_PRED              1
109
#define DC_PRED               2
110
#define DIAG_DOWN_LEFT_PRED   3
111
#define DIAG_DOWN_RIGHT_PRED  4
112
#define VERT_RIGHT_PRED       5
113
#define HOR_DOWN_PRED         6
114
#define VERT_LEFT_PRED        7
115
#define HOR_UP_PRED           8
116
 
117
// 16x16 intra prediction modes
118
#define VERT_PRED_16    0
119
#define HOR_PRED_16     1
120
#define DC_PRED_16      2
121
#define PLANE_16        3
122
 
123
// 8x8 chroma intra prediction modes
124
#define DC_PRED_8       0
125
#define HOR_PRED_8      1
126
#define VERT_PRED_8     2
127
#define PLANE_8         3
128
 
129
#define EOS             1                       //!< End Of Sequence
130
#define SOP             2                       //!< Start Of Picture
131
#define SOS             3                       //!< Start Of Slice
132
 
133
#define DECODING_OK     0
134
#define SEARCH_SYNC     1
135
#define PICTURE_DECODED 2
136
 
137
#define MAX_REFERENCE_PICTURES 32               //!< H264 allows 32 fields
138
 
139
#define INVALIDINDEX  (-135792468)
140
 
141
#define MVPRED_MEDIAN   0
142
#define MVPRED_L        1
143
#define MVPRED_U        2
144
#define MVPRED_UR       3
145
 
146
#define DECODE_COPY_MB  0
147
#define DECODE_MB       1
148
//#define DECODE_MB_BFRAME 2
149
 
150
 
151
//Start code and Emulation Prevention need this to be defined in identical manner at encoder and decoder
152
#define ZEROBYTES_SHORTSTARTCODE 2 //indicates the number of zero bytes in the short start-code prefix
153
 
154
#endif
155
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.