os/mm/mmhais/videohai/devvideo/inc/AVC.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// Constants and structs specific to AVC.  See the DevVideo specs for more details.
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#ifndef __DEVVIDEO_AVC_H__
sl@0
    19
#define __DEVVIDEO_AVC_H__
sl@0
    20
sl@0
    21
#include <e32base.h>
sl@0
    22
sl@0
    23
/**
sl@0
    24
Specifies the picture type.
sl@0
    25
@publishedAll
sl@0
    26
@released
sl@0
    27
*/
sl@0
    28
enum TAvcPictureType
sl@0
    29
    {
sl@0
    30
	/**
sl@0
    31
	INTRA picture, a picture consisted of at least one I slice and zero or more SI slices
sl@0
    32
	*/
sl@0
    33
	EAvcPictureTypeI   = 0x01,
sl@0
    34
sl@0
    35
	/**
sl@0
    36
	INTER picture, a picture consisted of at least one P slice and zero or more I, SI and SP slices
sl@0
    37
	*/
sl@0
    38
	EAvcPictureTypeP   = 0x02,
sl@0
    39
sl@0
    40
	/**
sl@0
    41
	Bi-predictive picture, a picture consisted of at least one B slice and zero or more I, P, SI, 
sl@0
    42
	and SP slices 
sl@0
    43
	*/
sl@0
    44
	EAvcPictureTypeB   = 0x04,
sl@0
    45
sl@0
    46
	/**
sl@0
    47
	SI picture or switching I picture, a picture consisted of SI slices
sl@0
    48
	*/
sl@0
    49
	EAvcPictureTypeSI  = 0x08,
sl@0
    50
sl@0
    51
	/**
sl@0
    52
	SP picture or switching P picture, a picture consisted of at least one SP slice and zero or more
sl@0
    53
	SI slices
sl@0
    54
	*/
sl@0
    55
	EAvcPictureTypeSP  = 0x10
sl@0
    56
    };
sl@0
    57
sl@0
    58
sl@0
    59
/**
sl@0
    60
These enumerations can be used in codec capability indication and/or bitstream property indication.
sl@0
    61
When used as part of an encoder capability indication, a signaled value indicates the capability 
sl@0
    62
of an encoder to produce such Supplemental Enhancement Information (SEI) to the bitstream and the 
sl@0
    63
additional meanings as specified below. When used as part of a decoder capability indication, a 
sl@0
    64
signalled value indicates the capability of a decoder to react to such information in a way as
sl@0
    65
specified below. If a decoder does not have such capability, it shall be able to parse and discard
sl@0
    66
the information. When used as part of a bitstream property indication, a non-signalled value 
sl@0
    67
indicates the absence of such information in the bitstream and a signalled value indicates the 
sl@0
    68
possibility of having such information in the bitstream.
sl@0
    69
@publishedAll
sl@0
    70
@released
sl@0
    71
*/
sl@0
    72
enum TAvcSupplementalInformation
sl@0
    73
    {
sl@0
    74
	/**
sl@0
    75
	encoder capability:	no meaning
sl@0
    76
	decoder capability:	capability to initialize Hypothetical Reference Decoder (HRD) as specified 
sl@0
    77
						in AVC Annex C at any buffering period SEI message
sl@0
    78
	bitstream property:	existence of Network Abstraction Layer (NAL) units with nal_unit_type equal
sl@0
    79
						to 6 and the SEI payload type (payloadType) equal to 0 
sl@0
    80
	*/
sl@0
    81
	EAvcSeiBufferingPeriod			 				= 0x00000001,
sl@0
    82
sl@0
    83
	/**
sl@0
    84
	encoder capability:	no meaning
sl@0
    85
	decoder capability:	capability to operate HRD and decode/display video streams according to the
sl@0
    86
						provided timing information
sl@0
    87
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType equal 
sl@0
    88
						to 1
sl@0
    89
	*/
sl@0
    90
	EAvcSeiPictureTiming         					= 0x00000002,
sl@0
    91
sl@0
    92
	/**
sl@0
    93
	encoder capability:	no meaning
sl@0
    94
	decoder capability:	capability to crop after decoding and to display the specified rectangular 
sl@0
    95
						region 
sl@0
    96
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType equal 
sl@0
    97
						to 2
sl@0
    98
	*/
sl@0
    99
	EAvcSeiPanScanRectangle         				= 0x00000004,
sl@0
   100
sl@0
   101
	/**
sl@0
   102
	encoder capability:	no meaning
sl@0
   103
	decoder capability:	no meaning
sl@0
   104
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType equal
sl@0
   105
						to 3
sl@0
   106
	*/
sl@0
   107
	EAvcSeiFillerPayload 							= 0x00000008,
sl@0
   108
sl@0
   109
	/**
sl@0
   110
	encoder capability:	no meaning
sl@0
   111
	decoder capability:	no meaning
sl@0
   112
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType equal 
sl@0
   113
						to 4
sl@0
   114
	*/
sl@0
   115
	EAvcSeiUserDataRegisteredByITUTRecT35  			= 0x00000010,
sl@0
   116
sl@0
   117
	/**
sl@0
   118
	encoder capability:	no meaning
sl@0
   119
	decoder capability:	no meaning
sl@0
   120
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType equal
sl@0
   121
						to 5
sl@0
   122
	*/
sl@0
   123
	EAvcSeiUserDataUnRegistered       				= 0x00000020,
sl@0
   124
sl@0
   125
	/**
sl@0
   126
	encoder capability:	no meaning
sl@0
   127
	decoder capability:	capability to start decoding from any access unit with a recovery point SEI 
sl@0
   128
						message
sl@0
   129
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType equal
sl@0
   130
						to 6
sl@0
   131
	*/
sl@0
   132
	EAvcSeiRecoveryPoint    						= 0x00000040,
sl@0
   133
sl@0
   134
	/**
sl@0
   135
	encoder capability:	capability to repeat the decoded reference picture marking syntax structure
sl@0
   136
						as specified in subclauses 7.3.3.3 and 7.4.3.3 of the AVC specification.
sl@0
   137
	decoder capability:	capability to recover the decoded reference picture marking process due to
sl@0
   138
						losses of reference pictures with decoded reference picture marking syntax
sl@0
   139
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType equal 
sl@0
   140
						to 7
sl@0
   141
	*/
sl@0
   142
	EAvcSeiDecodedReferencePictureMarkingRepetition	= 0x00000080,
sl@0
   143
sl@0
   144
	/**
sl@0
   145
	encoder capability:	capability to analyze video pictures for creation of spare picture information
sl@0
   146
	decoder capability:	capability to utilize the spare picture information to enhance video decoding
sl@0
   147
						in case there is loss of reference pictures
sl@0
   148
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType equal
sl@0
   149
						to 8
sl@0
   150
	*/
sl@0
   151
	EAvcSeiSparePicture		       					= 0x00000100,
sl@0
   152
sl@0
   153
	/**
sl@0
   154
	encoder capability:	no meaning
sl@0
   155
	decoder capability:	capability to utilize the scene information to enhance error concealment
sl@0
   156
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType equal
sl@0
   157
						to 9
sl@0
   158
	*/
sl@0
   159
	EAvcSeiSceneInformation						   	= 0x00000200,
sl@0
   160
sl@0
   161
	/**
sl@0
   162
	encoder capability:	no meaning
sl@0
   163
	decoder capability:	capability to utilize the sub-sequence information to achieve temporal
sl@0
   164
						scalability
sl@0
   165
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType
sl@0
   166
						equal to 10
sl@0
   167
	*/
sl@0
   168
	EAvcSeiSubsequenceInformation		     		= 0x00000400,
sl@0
   169
sl@0
   170
	/**
sl@0
   171
	encoder capability:	no meaning
sl@0
   172
	decoder capability:	capability to utilize the sub-sequence information and the sub-sequence
sl@0
   173
						layer characteristics to achieve temporal scalability
sl@0
   174
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType 
sl@0
   175
						equal to 11 (if sub-sequence layer characteristics SEI message is present,
sl@0
   176
						sub-sequence information SEI message must be present)
sl@0
   177
	*/
sl@0
   178
	EAvcSeiSubsequenceLayerCharacteristics       	= 0x00000800,
sl@0
   179
sl@0
   180
	/**
sl@0
   181
	encoder capability:	no meaning
sl@0
   182
	decoder capability:	capability to utilize the sub-sequence information and the sub-sequence 
sl@0
   183
						characteristics to achieve temporal scalability
sl@0
   184
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType equal
sl@0
   185
						to 12 (if sub-sequence characteristics SEI message is present, sub-sequence
sl@0
   186
						information SEI message must be present)
sl@0
   187
	*/
sl@0
   188
	EAvcSeiSubsequenceCharacteristics       		= 0x00001000,
sl@0
   189
sl@0
   190
	/**
sl@0
   191
	encoder capability:	no meaning
sl@0
   192
	decoder capability:	capability to freeze displayed picture according to AVC Annex D.2.14.
sl@0
   193
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType equal
sl@0
   194
						to 13
sl@0
   195
	*/
sl@0
   196
	EAvcSeiFullFrameFreeze	               			= 0x00002000,
sl@0
   197
sl@0
   198
	/**
sl@0
   199
	encoder capability:	no meaning
sl@0
   200
	decoder capability:	capability to release frozen displayed picture according to AVC Annex D.2.15
sl@0
   201
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType 
sl@0
   202
						equal to 14
sl@0
   203
	*/
sl@0
   204
	EAvcSeiFullFrameFreezeRelease					= 0x00004000,
sl@0
   205
sl@0
   206
	/**
sl@0
   207
	encoder capability:	no meaning
sl@0
   208
	decoder capability:	no meaning
sl@0
   209
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType
sl@0
   210
						equal to 15
sl@0
   211
	*/
sl@0
   212
	EAvcSeiFullFrameSnapshot				    	= 0x00008000,
sl@0
   213
sl@0
   214
	/**
sl@0
   215
	encoder capability:	no meaning
sl@0
   216
	decoder capability:	no meaning
sl@0
   217
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType
sl@0
   218
						equal to 16
sl@0
   219
	*/
sl@0
   220
	EAvcSeiProgressiveRefinementSegmentStrat     	= 0x00010000,
sl@0
   221
sl@0
   222
	/**
sl@0
   223
	encoder capability:	no meaning
sl@0
   224
	decoder capability:	no meaning
sl@0
   225
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType 
sl@0
   226
						equal to 17
sl@0
   227
	*/
sl@0
   228
	EAvcSeiProgressiveRefinementSegmentEnd   		= 0x00020000,
sl@0
   229
sl@0
   230
	/**
sl@0
   231
	encoder capability:	capability to constrain the inter prediction process according to 
sl@0
   232
						AVC Annex D.2.19
sl@0
   233
	decoder capability:	capability to decode only part of the pictures covered by the motion-
sl@0
   234
						constrained slice group set
sl@0
   235
	bitstream property:	existence of NAL units with nal_unit_type equal to 6 and payloadType equal
sl@0
   236
						to 18
sl@0
   237
	*/
sl@0
   238
	EAvcSeiMotionConstrainedSliceGroupSet        	= 0x00040000
sl@0
   239
    };
sl@0
   240
sl@0
   241
sl@0
   242
/**
sl@0
   243
AVC Picture Header.
sl@0
   244
@publishedAll
sl@0
   245
@released
sl@0
   246
*/
sl@0
   247
class TAvcPictureHeader
sl@0
   248
    {
sl@0
   249
public:
sl@0
   250
	/**
sl@0
   251
	Equal to ETrue indicates that the bitstream obeys all constraints specified in subclause A.2.1
sl@0
   252
	of the AVC specification, equal to EFalse indicates that the bitstream may or may not obey the 
sl@0
   253
	constraints. The value is equal to ETrue (EFalse) if the syntax element constraint_set0_flag is
sl@0
   254
	equal to 1 (0). 
sl@0
   255
	*/
sl@0
   256
	TBool iBaselineProfileConstraintSet;
sl@0
   257
sl@0
   258
	/**
sl@0
   259
	Equal to ETrue indicates that the bitstream obeys all constraints specified in subclause A.2.2
sl@0
   260
	of the AVC specification, equal to EFalse indicates that the bitstream may or may not obey the 
sl@0
   261
	constraints. The value is equal to ETrue (EFalse) if the syntax element constraint_set1_flag is
sl@0
   262
	equal to 1 (0). 
sl@0
   263
	*/
sl@0
   264
	TBool iMainProfileConstraintSet;
sl@0
   265
sl@0
   266
	/**
sl@0
   267
	Equal to ETrue indicates that the bitstream obeys all constraints specified in subclause A.2.3 
sl@0
   268
	of the AVC specification, equal to EFalse indicates that the bitstream may or may not obey the
sl@0
   269
	constraints. The value is equal to ETrue (EFalse) if the syntax element constraint_set2_flag is
sl@0
   270
	equal to 1 (0). 
sl@0
   271
	*/
sl@0
   272
	TBool iExtendedProfileConstraintSet;
sl@0
   273
sl@0
   274
	/**
sl@0
   275
	Indicates the picture type. iPictureType is set as one of the values defined in TAvcPictureType.
sl@0
   276
	*/
sl@0
   277
	TAvcPictureType iPictureType;
sl@0
   278
sl@0
   279
	/**
sl@0
   280
	iLongTermPicture equal to ETrue indicates that the picture is a long-term picture, i.e., it has 
sl@0
   281
	been marked as "used for long-term reference" according to the decoded reference picture marking 
sl@0
   282
	process as specified in subclause 8.2.5 of the AVC specification. Otherwise the picture is not a 
sl@0
   283
	long-term picture.
sl@0
   284
	*/
sl@0
   285
	TBool iLongTermPicture;
sl@0
   286
sl@0
   287
	/**
sl@0
   288
	Indicates whether the picture is a frame or a field. iFrame is equal to ETrue if the picture is 
sl@0
   289
	a frame (field_pic_flag is equal to 0), EFalse if the picture is a field (field_pic_flag is equal
sl@0
   290
	to 1).
sl@0
   291
	*/
sl@0
   292
	TBool iFrame;
sl@0
   293
sl@0
   294
	/**
sl@0
   295
	Valid only if iFrame is equal to EFalse. Indicates whether the field picture is a top field or a
sl@0
   296
	bottom field. iTopField is equal to ETrue if the picture is a top field (bottom_field_flag is 
sl@0
   297
	equal to 0), EFalse if the picture is a bottom field (bottom_field_flag is equal to 0).
sl@0
   298
	*/
sl@0
   299
	TBool iTopField;
sl@0
   300
sl@0
   301
	/**
sl@0
   302
	Indicates the picture order count of the top field of a frame, the top field of a complementary 
sl@0
   303
	field pair, or a top field. iTopFieldOrderCount is equal to the value of TopFieldOrderCnt as 
sl@0
   304
	specified in subclause 8.2.1 of the AVC specification.
sl@0
   305
	*/
sl@0
   306
	TUint iTopFieldOrderCount;
sl@0
   307
sl@0
   308
	/**
sl@0
   309
	Indicates the picture order count of the bottom field of a frame, the bottom field of a 
sl@0
   310
	complementary field pair, or a bottom field. iBottomFieldOrderCount is equal to the value of 
sl@0
   311
	BottomFieldOrderCnt as specified in subclause 8.2.1 of the AVC specification.
sl@0
   312
	*/
sl@0
   313
	TUint iBottomFieldOrderCount;
sl@0
   314
sl@0
   315
	/**
sl@0
   316
	Equal to ETrue indicates that the picture is an Instantaneous Decoding Refresh (IDR) picture;
sl@0
   317
	otherwise the picture is not an IDR picture. The value of nal_unit_type of all the Video Coding
sl@0
   318
	Layer (VCL) NAL units of the primary coded picture of an IDR picture shall be equal to 5.
sl@0
   319
	*/
sl@0
   320
	TBool iIdrPicture;
sl@0
   321
sl@0
   322
	/**
sl@0
   323
	Indicates the initial value of the quantization parameter. If iPictureType is equal to 
sl@0
   324
	EAvcPictureTypeSI or EavcPictureTypeSP, iPQY is equal to pic_init_qs_minus26 + 26; otherwise
sl@0
   325
	iPQY is equal to pic_init_qp_minus26 + 26.
sl@0
   326
	*/
sl@0
   327
	TUint iQPY;
sl@0
   328
sl@0
   329
	/**
sl@0
   330
	Pixel aspect ratio numerator. The pixel aspect ratio is defined as 
sl@0
   331
	iAspectRatioNum/iAspectRatioDenom, where the values are positive integers and relatively prime. 
sl@0
   332
	When aspect_ratio_idc is equal to 0 or sar_width is equal to 0 or sar_height is equal to 0, the 
sl@0
   333
	sample aspect ratio shall be considered unspecified, and iAspectRatioNum and iAspectRationDenom 
sl@0
   334
	are set to 0. When aspect_ratio_idc is equal to any of the value from 1 to 13, inclusive, 
sl@0
   335
	iAspectRatioNum and iAspectRatioDenom are set according to Table E-1 of the AVC specification.
sl@0
   336
	When aspect_ratio_idc is equal to 255 (Extended_SAR), iAspectRatioNum is set to sar_width and 
sl@0
   337
	iAspectRatioDenom is set to sar_height.
sl@0
   338
	*/
sl@0
   339
	TUint iAspectRatioNum;
sl@0
   340
sl@0
   341
	/**
sl@0
   342
	Pixel aspect ratio denominator. The pixel aspect ratio is defined as 
sl@0
   343
	iAspectRatioNum/iAspectRatioDenom, where the values are positive integers and relatively prime. 
sl@0
   344
	When aspect_ratio_idc is equal to 0 or sar_width is equal to 0 or sar_height is equal to 0, the 
sl@0
   345
	sample aspect ratio shall be considered unspecified, and iAspectRatioNum and iAspectRationDenom
sl@0
   346
	are set to 0. When aspect_ratio_idc is equal to any of the value from 1 to 13, inclusive, 
sl@0
   347
	iAspectRatioNum and iAspectRatioDenom are set according to Table E-1 of the AVC specification.
sl@0
   348
	When aspect_ratio_idc is equal to 255 (Extended_SAR), iAspectRatioNum is set to sar_width and 
sl@0
   349
	iAspectRatioDenom is set to sar_height.
sl@0
   350
	*/
sl@0
   351
	TUint iAspectRatioDenom;
sl@0
   352
sl@0
   353
	/**
sl@0
   354
	Indicates the frame cropping rectangle as specified in subclause 7.4.2.1 of the AVC specification.
sl@0
   355
	*/
sl@0
   356
	TRect iFrameCropRect;
sl@0
   357
sl@0
   358
	/**
sl@0
   359
	Equal to 0 indicates that the cropped (according to the frame cropping rectangle) decoded 
sl@0
   360
	pictures output contain visually important information in the entire region out to the edges of 
sl@0
   361
	the cropping rectangle of the picture, such that the cropped decoded pictures output should not 
sl@0
   362
	be displayed using overscan. Instead, they should be displayed using either an exact match 
sl@0
   363
	between the display area and the cropping rectangle, or using underscan. Equal to 1 indicates
sl@0
   364
	that the cropped decoded picture output is suitable for display using overscan. Otherwise, it is 
sl@0
   365
	unspecified whether the cropped decoded picture output is suitable for display using overscan or
sl@0
   366
	not. 
sl@0
   367
	*/
sl@0
   368
	TUint iOverscanInfo;
sl@0
   369
sl@0
   370
	/**
sl@0
   371
	Indicates the representation of the pictures as specified in Table E-2 of the AVC specification, 
sl@0
   372
	before being coded. 
sl@0
   373
	*/
sl@0
   374
	TUint iVideoFormat;
sl@0
   375
sl@0
   376
	/**
sl@0
   377
	Indicates whether a picture should be displayed as a frame or one or more fields, according to
sl@0
   378
	Table D-1. iPictureStructure is equal to the syntax element pic_struct.
sl@0
   379
	*/
sl@0
   380
	TUint iPictureStructure;
sl@0
   381
sl@0
   382
	/**
sl@0
   383
	Each picture has up to NumClockTS sets of clock timestamp information. The value of NumClockTS
sl@0
   384
	is as specified in Table D-1 of the AVC specification, with a maximum value equal to 3. Each 
sl@0
   385
	instance of iClockTimestamp[i] indicates a time of origin, capture, or alternative ideal display,
sl@0
   386
	in units of microseconds. iClockTimestamp[i] is equal to 
sl@0
   387
	(clockTimestamp[i] / time_scale * 1000000), where clockTimestamp[i] is the i-th set of clock
sl@0
   388
	timestamp information as specified in subclause D.2.2 of the AVC specification. 
sl@0
   389
	iClockTimestamp[i] where i is larger than NumClockTS-1 is invalid. When picture timing 
sl@0
   390
	information is not available, NumClockTS is set to zero.
sl@0
   391
	*/
sl@0
   392
	TTimeIntervalMicroSeconds iClockTimestamp[3];
sl@0
   393
    };
sl@0
   394
sl@0
   395
/**
sl@0
   396
This class is used to signal decoder or encoder capabilities or bitstream properties.
sl@0
   397
@publishedAll
sl@0
   398
@released
sl@0
   399
*/
sl@0
   400
class TAvcVideoCapability
sl@0
   401
    {
sl@0
   402
public:
sl@0
   403
	/**
sl@0
   404
	When used as part of a codec capability indication, iProfileLevel[ProfileIdc] indicates the 
sl@0
   405
	maximum processing level that a decoder or an encoder supports for a particular profile set 
sl@0
   406
	indicated by ProfileIdc (the indication is described below). A negative value indicates that
sl@0
   407
	the profile set is not supported. When used as part of a stream property indication,
sl@0
   408
	iProfileLevel[ProfileIdc] indicates the maximum processing level that is present in the stream
sl@0
   409
	for a particular profile set indicated by ProfileIdc. A negative value indicates that the stream 
sl@0
   410
	does not contain data coded according to the indicated profile set.
sl@0
   411
sl@0
   412
	ProfileIdc equal to 0 indicates that all of constraint_set0_flag, constraint_set1_flag and 
sl@0
   413
	constraint_set2_flag are equal to 1, and profile_idc may indicate any of the profiles (baseline,
sl@0
   414
	main or extended). ProfileIdc equal to 1 indicates that constraint_set0_flag and 
sl@0
   415
	constraint_set2_flag are equal to 1 while constraint_set1_flag is equal to 0, and 
sl@0
   416
	profile_idc may indicate either the baseline or extended profile. ProfileIdc equal to 2 
sl@0
   417
	indicates that constraint_set1_flag and constraint_set2_flag are equal to 1 while 
sl@0
   418
	constraint_set0_flag is equal to 0, and profile_idc may indicate either the main or extended 
sl@0
   419
	profile. ProfileIdc equal to 3 indicates that constraint_set1_flag is equal to 1 while the other
sl@0
   420
	two flags are equal to 0, and profile_idc indicates the main profile. ProfileIdc equal to 4 
sl@0
   421
	indicates that constraint_set2_flag is equal to 1 while the other two flags are equal to 0, and
sl@0
   422
	profile_idc indicates the extended profile.
sl@0
   423
	*/
sl@0
   424
	TInt iProfileLevel[5];
sl@0
   425
sl@0
   426
	/**
sl@0
   427
	iSupplementalInformationCap indicates the supported supplemental enhancement functions. The 
sl@0
   428
	value is a binary OR of values from TAvcSupplementalInformation.
sl@0
   429
	*/
sl@0
   430
	TUint32 iSupplementalInformationCap;
sl@0
   431
    };
sl@0
   432
sl@0
   433
sl@0
   434
/**
sl@0
   435
This class is used to set the encoder operation mode.
sl@0
   436
@publishedAll
sl@0
   437
@released
sl@0
   438
*/
sl@0
   439
class TAvcVideoMode
sl@0
   440
    {
sl@0
   441
public:
sl@0
   442
	/**
sl@0
   443
	Specifies the picture types allowed in the bitstream. The value is a binary OR of values from 
sl@0
   444
	TAvcPictureType. Signaled picture types that are not included in the prevailing coding profile 
sl@0
   445
	are ignored.
sl@0
   446
	*/
sl@0
   447
	TUint32 iAllowedPictureTypes;
sl@0
   448
sl@0
   449
	/**
sl@0
   450
	Specifies whether Flexible Macroblock Order (FMO) is allowed. Equal to ETrue indicates that 
sl@0
   451
	num_slice_groups_minus1 is in the range of 0 to 7, inclusive, i.e. FMO is allowed. Equal to
sl@0
   452
	EFalse indicates that num_slice_groups_minus1 shall be equal to 0 only, i.e., FMO is not allowed.
sl@0
   453
	*/
sl@0
   454
	TBool iFlexibleMacroblockOrder;
sl@0
   455
sl@0
   456
	/**
sl@0
   457
	Specifies whether redundant pictures may be encoded. Equal to ETrue indicates that 
sl@0
   458
	redundant_pic_cnt_present_flag can be equal to either 0 or 1 (i.e., redundant pictures may be 
sl@0
   459
	encoded), while Equal to EFalse indicates that redundant_pic_cnt_present_flag shall be equal to
sl@0
   460
	0 only (i.e., redundant pictures cannot be encoded). 
sl@0
   461
	*/
sl@0
   462
	TBool iRedundantPictures;
sl@0
   463
sl@0
   464
	/**
sl@0
   465
	Specifies whether data partitioning is in use. When equal to ETrue, data partitioning is in use,
sl@0
   466
	i.e., NAL unit streams can contain nal_unit_type values in the range of 2 to 4, inclusive. When 
sl@0
   467
	equal to EFalse, data partitioning is not in use, i.e., NAL unit streams shall not contain 
sl@0
   468
	nal_unit_type values in the range of 2 to 4, inclusive. If data partitioning is in use, the 
sl@0
   469
	SetErrorProtectionLevelsL method, if used, should set the number of unequal error protection 
sl@0
   470
	levels to be larger than one. 
sl@0
   471
	*/
sl@0
   472
	TBool iDataPartitioning;
sl@0
   473
sl@0
   474
	/**
sl@0
   475
	iFrameMBsOnly equal to ETrue specifies that every coded picture of the coded video sequence is a
sl@0
   476
	coded frame containing only frame macroblocks. Equal to EFalse specifies that coded pictures of 
sl@0
   477
	the coded video sequence may either be coded fields or coded frames.
sl@0
   478
	*/
sl@0
   479
	TBool iFrameMBsOnly;
sl@0
   480
sl@0
   481
	/**
sl@0
   482
	iMBAFFCoding equal to EFalse specifies no switching between frame and field 
sl@0
   483
	macroblocks within a picture. Equal to ETrue specifies the possible use of switching between 
sl@0
   484
	frame and field macroblocks within frames. Valid only when iFrameMBsOnly is equal to EFalse.
sl@0
   485
	*/
sl@0
   486
	TBool iMBAFFCoding;
sl@0
   487
sl@0
   488
	/**
sl@0
   489
	Specifies the entropy decoding method to be applied for the syntax elements for which two 
sl@0
   490
	descriptors appear in the syntax tables. Equal to EFalse indicates that Exp-Golomb codes or 
sl@0
   491
	CAVLC (Context-based Adaptive Variable Length Coding), as described in subclause 9.1 or 9.2 of
sl@0
   492
	the AVC specification, is applied. Otherwise, CABAC (Context-based Adaptive Binary Arithmetic 
sl@0
   493
	Coding) as described in subclause 9.3 of the AVC specification is applied.
sl@0
   494
	*/
sl@0
   495
	TBool iEntropyCodingCABAC;
sl@0
   496
sl@0
   497
	/**
sl@0
   498
	Equal to EFalse specifies that weighted prediction shall not be applied to P and SP slices.
sl@0
   499
	Equal to ETrue specifies that weighted prediction may be applied to P and SP slices. 
sl@0
   500
	*/
sl@0
   501
	TBool iWeightedPPrediction;
sl@0
   502
sl@0
   503
	/**
sl@0
   504
	Equal to 0 specifies that the default weighted prediction is applied to B slices. Equal to 1 
sl@0
   505
	specifies that explicit weighted prediction is applied to B slices. Equal to 2 specifies that 
sl@0
   506
	implicit weighted prediction is applied to B slices.
sl@0
   507
	*/
sl@0
   508
	TUint iWeightedBipredicitonMode;
sl@0
   509
sl@0
   510
	/**
sl@0
   511
	Specifies the method used in the derivation process for luma motion vectors for B_Skip, 
sl@0
   512
	B_Direct_16x16 and B_Direct_8x8 as specified in subclause 8.4.1.2 of the AVC specification. When
sl@0
   513
	iFrameMBsOnly is equal to EFalse, iDirect8x8Inference shall be equal to ETrue. 
sl@0
   514
	*/
sl@0
   515
	TBool iDirect8x8Inference;
sl@0
   516
    };
sl@0
   517
sl@0
   518
/**
sl@0
   519
TAvcHrdParams specifies a set of AVC-specific HRD parameters. All pointers included in the objects
sl@0
   520
have the same lifetime as the objects themselves, and the memory is allocated and deallocated by
sl@0
   521
the same instance that creates and owns the object.
sl@0
   522
@publishedAll
sl@0
   523
@released
sl@0
   524
*/
sl@0
   525
class TAvcHrdParams
sl@0
   526
    {
sl@0
   527
public:
sl@0
   528
    class TCpbParams
sl@0
   529
        {
sl@0
   530
    public:
sl@0
   531
		/**
sl@0
   532
		Specifies the delay for a CPB between the time of arrival in the CPB of the first bit of the 
sl@0
   533
		coded data associated with the access unit associated with the buffering period SEI message 
sl@0
   534
		and the time of removal from the CPB of the coded data associated with the same access unit,
sl@0
   535
		for the first buffering period after HRD initialisation. It is in units of a 90 kHz clock.
sl@0
   536
		The value is equal to the corresponding initinal_cpb_removal_delay of the NAL HRD parameters
sl@0
   537
		if the current parameter is for the NAL HRD or of the VCL HRD parameters if the current
sl@0
   538
		parameter is for the VCL HRD. 
sl@0
   539
		*/
sl@0
   540
		TUint iInitialCpbRemovalDelay;
sl@0
   541
sl@0
   542
		/**
sl@0
   543
		This parameter is used for a CPB in combination with the cpb_removal_delay to specify the 
sl@0
   544
		initial delivery time of coded access units to the CPB.  It is in units of a 90 kHz clock.
sl@0
   545
		The value is equal to the corresponding initinal_cpb_removal_delay_offset of the NAL HRD 
sl@0
   546
		parameters if the current parameter is for the NAL HRD or of the VCL HRD parameters if the
sl@0
   547
		current parameter is for the VCL HRD.
sl@0
   548
sl@0
   549
		Note: Over the entire coded video sequence, the sum of iInitialCpbRemovalDelay and the 
sl@0
   550
		corresponding iInitialCpbRemovalDelayOffset shall be constant for either the NAL HRD
sl@0
   551
		parameters or the VCL HRD parameters.
sl@0
   552
		*/
sl@0
   553
		TUint iInitialCpbRemovalDelayOffset;
sl@0
   554
sl@0
   555
		/**
sl@0
   556
		Equal to EFalse specifies that to decode this bitstream by the HRD using the CPB 
sl@0
   557
		specification, the hypothetical stream scheduler (HSS) operates in an intermittent bit 
sl@0
   558
		rate mode.  Equal to 1 specifies that the HSS operates in a constant bit rate (CBR) mode. 
sl@0
   559
		*/
sl@0
   560
		TBool iCbr;
sl@0
   561
sl@0
   562
		/**
sl@0
   563
		Specifies the maximum input bit rate, in bits per second, of a CPB. The value is equal to 
sl@0
   564
		Bitrate as specified in subclause E.2.2 of the AVC specification.
sl@0
   565
		*/
sl@0
   566
		TUint iBitrate;
sl@0
   567
sl@0
   568
		/**
sl@0
   569
		Specifies the size, in bytes, of a CPB. The value is equal to CpbSize/8, where CpbSize is as
sl@0
   570
		specified in subclause E.2.2 of the AVC specification.
sl@0
   571
		*/
sl@0
   572
		TUint iCpbSize;
sl@0
   573
        };
sl@0
   574
    
sl@0
   575
	/**
sl@0
   576
	Specifies the required size of the decoded picture buffer (DPB) in unit of bytes. The value is
sl@0
   577
	equal to max_dec_frame_buffering* PicWidthInSamplesL*FrameHeightInMbs*2, where PicWidthInSamplesL
sl@0
   578
	and FrameHeightInMbs are specified in subclause 7.4.2.1 of the AVC specification amd the syntax
sl@0
   579
	element max_dec_frame_buffering as specified in subclause E.2.1 of the AVC specification.
sl@0
   580
	*/
sl@0
   581
	TUint iDpbSize;
sl@0
   582
    
sl@0
   583
	/**
sl@0
   584
	Specifies the HRD operational mode as specified in Annex C of the AVC specification. The value
sl@0
   585
	of LowDelayHrd is equal to ETrue if the syntax element low_delay_hrd_flag is equal to 1, and
sl@0
   586
	EFalse otherwise. This parameter is valid only if at least one of iNalCpbCount and iVclCpbCount
sl@0
   587
	is larger than 0.
sl@0
   588
	*/
sl@0
   589
	TBool iLowDelayHrd;
sl@0
   590
    
sl@0
   591
	/**
sl@0
   592
	Specifies the number of alternative coded picture buffer (CPB) specifications for NAL HRD 
sl@0
   593
	parameters in the bitstream. The value of iNalCpbCount is equal to cpb_cnt_minus1 + 1 in the 
sl@0
   594
	NAL HRD parameters, if present. iNalCpbCount equal to 0 means that NAL HRD parameters are not
sl@0
   595
	present.
sl@0
   596
	*/
sl@0
   597
	TUint iNalCpbCount;
sl@0
   598
    
sl@0
   599
	/**
sl@0
   600
	Valid only if iNalCpbCount is larger than zero. iNalCpbParams is a pointer to an object of 
sl@0
   601
	TCpbParams, which contains the parameters of an alternative CPB.
sl@0
   602
	*/
sl@0
   603
	TCpbParams* iNalCpbParams;
sl@0
   604
    
sl@0
   605
	/**
sl@0
   606
	Specifies the number of alternative coded picture buffer (CPB) specifications for VCL HRD 
sl@0
   607
	parameters in the bitstream. The value of iVclCpbCount is equal to cpb_cnt_minus1 + 1 in the
sl@0
   608
	VCL HRD parameters, if present. iVclCpbCount equal to 0 means that VCL HRD parameters are not
sl@0
   609
	present.
sl@0
   610
	*/
sl@0
   611
	TUint iVclCpbCount;
sl@0
   612
    
sl@0
   613
	/**
sl@0
   614
	Valid only if iVclCpbCount is larger than zero. iVclCpbParams is a pointer to an object of 
sl@0
   615
	TCpbParams, which contains the parameters of an alternative CPB.
sl@0
   616
	*/
sl@0
   617
	TCpbParams* iVclCpbParams;
sl@0
   618
    };
sl@0
   619
sl@0
   620
sl@0
   621
sl@0
   622
sl@0
   623
sl@0
   624
#endif