1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmhais/videohai/devvideo/inc/AVC.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,624 @@
1.4 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Constants and structs specific to AVC. See the DevVideo specs for more details.
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef __DEVVIDEO_AVC_H__
1.22 +#define __DEVVIDEO_AVC_H__
1.23 +
1.24 +#include <e32base.h>
1.25 +
1.26 +/**
1.27 +Specifies the picture type.
1.28 +@publishedAll
1.29 +@released
1.30 +*/
1.31 +enum TAvcPictureType
1.32 + {
1.33 + /**
1.34 + INTRA picture, a picture consisted of at least one I slice and zero or more SI slices
1.35 + */
1.36 + EAvcPictureTypeI = 0x01,
1.37 +
1.38 + /**
1.39 + INTER picture, a picture consisted of at least one P slice and zero or more I, SI and SP slices
1.40 + */
1.41 + EAvcPictureTypeP = 0x02,
1.42 +
1.43 + /**
1.44 + Bi-predictive picture, a picture consisted of at least one B slice and zero or more I, P, SI,
1.45 + and SP slices
1.46 + */
1.47 + EAvcPictureTypeB = 0x04,
1.48 +
1.49 + /**
1.50 + SI picture or switching I picture, a picture consisted of SI slices
1.51 + */
1.52 + EAvcPictureTypeSI = 0x08,
1.53 +
1.54 + /**
1.55 + SP picture or switching P picture, a picture consisted of at least one SP slice and zero or more
1.56 + SI slices
1.57 + */
1.58 + EAvcPictureTypeSP = 0x10
1.59 + };
1.60 +
1.61 +
1.62 +/**
1.63 +These enumerations can be used in codec capability indication and/or bitstream property indication.
1.64 +When used as part of an encoder capability indication, a signaled value indicates the capability
1.65 +of an encoder to produce such Supplemental Enhancement Information (SEI) to the bitstream and the
1.66 +additional meanings as specified below. When used as part of a decoder capability indication, a
1.67 +signalled value indicates the capability of a decoder to react to such information in a way as
1.68 +specified below. If a decoder does not have such capability, it shall be able to parse and discard
1.69 +the information. When used as part of a bitstream property indication, a non-signalled value
1.70 +indicates the absence of such information in the bitstream and a signalled value indicates the
1.71 +possibility of having such information in the bitstream.
1.72 +@publishedAll
1.73 +@released
1.74 +*/
1.75 +enum TAvcSupplementalInformation
1.76 + {
1.77 + /**
1.78 + encoder capability: no meaning
1.79 + decoder capability: capability to initialize Hypothetical Reference Decoder (HRD) as specified
1.80 + in AVC Annex C at any buffering period SEI message
1.81 + bitstream property: existence of Network Abstraction Layer (NAL) units with nal_unit_type equal
1.82 + to 6 and the SEI payload type (payloadType) equal to 0
1.83 + */
1.84 + EAvcSeiBufferingPeriod = 0x00000001,
1.85 +
1.86 + /**
1.87 + encoder capability: no meaning
1.88 + decoder capability: capability to operate HRD and decode/display video streams according to the
1.89 + provided timing information
1.90 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal
1.91 + to 1
1.92 + */
1.93 + EAvcSeiPictureTiming = 0x00000002,
1.94 +
1.95 + /**
1.96 + encoder capability: no meaning
1.97 + decoder capability: capability to crop after decoding and to display the specified rectangular
1.98 + region
1.99 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal
1.100 + to 2
1.101 + */
1.102 + EAvcSeiPanScanRectangle = 0x00000004,
1.103 +
1.104 + /**
1.105 + encoder capability: no meaning
1.106 + decoder capability: no meaning
1.107 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal
1.108 + to 3
1.109 + */
1.110 + EAvcSeiFillerPayload = 0x00000008,
1.111 +
1.112 + /**
1.113 + encoder capability: no meaning
1.114 + decoder capability: no meaning
1.115 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal
1.116 + to 4
1.117 + */
1.118 + EAvcSeiUserDataRegisteredByITUTRecT35 = 0x00000010,
1.119 +
1.120 + /**
1.121 + encoder capability: no meaning
1.122 + decoder capability: no meaning
1.123 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal
1.124 + to 5
1.125 + */
1.126 + EAvcSeiUserDataUnRegistered = 0x00000020,
1.127 +
1.128 + /**
1.129 + encoder capability: no meaning
1.130 + decoder capability: capability to start decoding from any access unit with a recovery point SEI
1.131 + message
1.132 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal
1.133 + to 6
1.134 + */
1.135 + EAvcSeiRecoveryPoint = 0x00000040,
1.136 +
1.137 + /**
1.138 + encoder capability: capability to repeat the decoded reference picture marking syntax structure
1.139 + as specified in subclauses 7.3.3.3 and 7.4.3.3 of the AVC specification.
1.140 + decoder capability: capability to recover the decoded reference picture marking process due to
1.141 + losses of reference pictures with decoded reference picture marking syntax
1.142 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal
1.143 + to 7
1.144 + */
1.145 + EAvcSeiDecodedReferencePictureMarkingRepetition = 0x00000080,
1.146 +
1.147 + /**
1.148 + encoder capability: capability to analyze video pictures for creation of spare picture information
1.149 + decoder capability: capability to utilize the spare picture information to enhance video decoding
1.150 + in case there is loss of reference pictures
1.151 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal
1.152 + to 8
1.153 + */
1.154 + EAvcSeiSparePicture = 0x00000100,
1.155 +
1.156 + /**
1.157 + encoder capability: no meaning
1.158 + decoder capability: capability to utilize the scene information to enhance error concealment
1.159 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal
1.160 + to 9
1.161 + */
1.162 + EAvcSeiSceneInformation = 0x00000200,
1.163 +
1.164 + /**
1.165 + encoder capability: no meaning
1.166 + decoder capability: capability to utilize the sub-sequence information to achieve temporal
1.167 + scalability
1.168 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType
1.169 + equal to 10
1.170 + */
1.171 + EAvcSeiSubsequenceInformation = 0x00000400,
1.172 +
1.173 + /**
1.174 + encoder capability: no meaning
1.175 + decoder capability: capability to utilize the sub-sequence information and the sub-sequence
1.176 + layer characteristics to achieve temporal scalability
1.177 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType
1.178 + equal to 11 (if sub-sequence layer characteristics SEI message is present,
1.179 + sub-sequence information SEI message must be present)
1.180 + */
1.181 + EAvcSeiSubsequenceLayerCharacteristics = 0x00000800,
1.182 +
1.183 + /**
1.184 + encoder capability: no meaning
1.185 + decoder capability: capability to utilize the sub-sequence information and the sub-sequence
1.186 + characteristics to achieve temporal scalability
1.187 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal
1.188 + to 12 (if sub-sequence characteristics SEI message is present, sub-sequence
1.189 + information SEI message must be present)
1.190 + */
1.191 + EAvcSeiSubsequenceCharacteristics = 0x00001000,
1.192 +
1.193 + /**
1.194 + encoder capability: no meaning
1.195 + decoder capability: capability to freeze displayed picture according to AVC Annex D.2.14.
1.196 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal
1.197 + to 13
1.198 + */
1.199 + EAvcSeiFullFrameFreeze = 0x00002000,
1.200 +
1.201 + /**
1.202 + encoder capability: no meaning
1.203 + decoder capability: capability to release frozen displayed picture according to AVC Annex D.2.15
1.204 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType
1.205 + equal to 14
1.206 + */
1.207 + EAvcSeiFullFrameFreezeRelease = 0x00004000,
1.208 +
1.209 + /**
1.210 + encoder capability: no meaning
1.211 + decoder capability: no meaning
1.212 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType
1.213 + equal to 15
1.214 + */
1.215 + EAvcSeiFullFrameSnapshot = 0x00008000,
1.216 +
1.217 + /**
1.218 + encoder capability: no meaning
1.219 + decoder capability: no meaning
1.220 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType
1.221 + equal to 16
1.222 + */
1.223 + EAvcSeiProgressiveRefinementSegmentStrat = 0x00010000,
1.224 +
1.225 + /**
1.226 + encoder capability: no meaning
1.227 + decoder capability: no meaning
1.228 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType
1.229 + equal to 17
1.230 + */
1.231 + EAvcSeiProgressiveRefinementSegmentEnd = 0x00020000,
1.232 +
1.233 + /**
1.234 + encoder capability: capability to constrain the inter prediction process according to
1.235 + AVC Annex D.2.19
1.236 + decoder capability: capability to decode only part of the pictures covered by the motion-
1.237 + constrained slice group set
1.238 + bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal
1.239 + to 18
1.240 + */
1.241 + EAvcSeiMotionConstrainedSliceGroupSet = 0x00040000
1.242 + };
1.243 +
1.244 +
1.245 +/**
1.246 +AVC Picture Header.
1.247 +@publishedAll
1.248 +@released
1.249 +*/
1.250 +class TAvcPictureHeader
1.251 + {
1.252 +public:
1.253 + /**
1.254 + Equal to ETrue indicates that the bitstream obeys all constraints specified in subclause A.2.1
1.255 + of the AVC specification, equal to EFalse indicates that the bitstream may or may not obey the
1.256 + constraints. The value is equal to ETrue (EFalse) if the syntax element constraint_set0_flag is
1.257 + equal to 1 (0).
1.258 + */
1.259 + TBool iBaselineProfileConstraintSet;
1.260 +
1.261 + /**
1.262 + Equal to ETrue indicates that the bitstream obeys all constraints specified in subclause A.2.2
1.263 + of the AVC specification, equal to EFalse indicates that the bitstream may or may not obey the
1.264 + constraints. The value is equal to ETrue (EFalse) if the syntax element constraint_set1_flag is
1.265 + equal to 1 (0).
1.266 + */
1.267 + TBool iMainProfileConstraintSet;
1.268 +
1.269 + /**
1.270 + Equal to ETrue indicates that the bitstream obeys all constraints specified in subclause A.2.3
1.271 + of the AVC specification, equal to EFalse indicates that the bitstream may or may not obey the
1.272 + constraints. The value is equal to ETrue (EFalse) if the syntax element constraint_set2_flag is
1.273 + equal to 1 (0).
1.274 + */
1.275 + TBool iExtendedProfileConstraintSet;
1.276 +
1.277 + /**
1.278 + Indicates the picture type. iPictureType is set as one of the values defined in TAvcPictureType.
1.279 + */
1.280 + TAvcPictureType iPictureType;
1.281 +
1.282 + /**
1.283 + iLongTermPicture equal to ETrue indicates that the picture is a long-term picture, i.e., it has
1.284 + been marked as "used for long-term reference" according to the decoded reference picture marking
1.285 + process as specified in subclause 8.2.5 of the AVC specification. Otherwise the picture is not a
1.286 + long-term picture.
1.287 + */
1.288 + TBool iLongTermPicture;
1.289 +
1.290 + /**
1.291 + Indicates whether the picture is a frame or a field. iFrame is equal to ETrue if the picture is
1.292 + a frame (field_pic_flag is equal to 0), EFalse if the picture is a field (field_pic_flag is equal
1.293 + to 1).
1.294 + */
1.295 + TBool iFrame;
1.296 +
1.297 + /**
1.298 + Valid only if iFrame is equal to EFalse. Indicates whether the field picture is a top field or a
1.299 + bottom field. iTopField is equal to ETrue if the picture is a top field (bottom_field_flag is
1.300 + equal to 0), EFalse if the picture is a bottom field (bottom_field_flag is equal to 0).
1.301 + */
1.302 + TBool iTopField;
1.303 +
1.304 + /**
1.305 + Indicates the picture order count of the top field of a frame, the top field of a complementary
1.306 + field pair, or a top field. iTopFieldOrderCount is equal to the value of TopFieldOrderCnt as
1.307 + specified in subclause 8.2.1 of the AVC specification.
1.308 + */
1.309 + TUint iTopFieldOrderCount;
1.310 +
1.311 + /**
1.312 + Indicates the picture order count of the bottom field of a frame, the bottom field of a
1.313 + complementary field pair, or a bottom field. iBottomFieldOrderCount is equal to the value of
1.314 + BottomFieldOrderCnt as specified in subclause 8.2.1 of the AVC specification.
1.315 + */
1.316 + TUint iBottomFieldOrderCount;
1.317 +
1.318 + /**
1.319 + Equal to ETrue indicates that the picture is an Instantaneous Decoding Refresh (IDR) picture;
1.320 + otherwise the picture is not an IDR picture. The value of nal_unit_type of all the Video Coding
1.321 + Layer (VCL) NAL units of the primary coded picture of an IDR picture shall be equal to 5.
1.322 + */
1.323 + TBool iIdrPicture;
1.324 +
1.325 + /**
1.326 + Indicates the initial value of the quantization parameter. If iPictureType is equal to
1.327 + EAvcPictureTypeSI or EavcPictureTypeSP, iPQY is equal to pic_init_qs_minus26 + 26; otherwise
1.328 + iPQY is equal to pic_init_qp_minus26 + 26.
1.329 + */
1.330 + TUint iQPY;
1.331 +
1.332 + /**
1.333 + Pixel aspect ratio numerator. The pixel aspect ratio is defined as
1.334 + iAspectRatioNum/iAspectRatioDenom, where the values are positive integers and relatively prime.
1.335 + When aspect_ratio_idc is equal to 0 or sar_width is equal to 0 or sar_height is equal to 0, the
1.336 + sample aspect ratio shall be considered unspecified, and iAspectRatioNum and iAspectRationDenom
1.337 + are set to 0. When aspect_ratio_idc is equal to any of the value from 1 to 13, inclusive,
1.338 + iAspectRatioNum and iAspectRatioDenom are set according to Table E-1 of the AVC specification.
1.339 + When aspect_ratio_idc is equal to 255 (Extended_SAR), iAspectRatioNum is set to sar_width and
1.340 + iAspectRatioDenom is set to sar_height.
1.341 + */
1.342 + TUint iAspectRatioNum;
1.343 +
1.344 + /**
1.345 + Pixel aspect ratio denominator. The pixel aspect ratio is defined as
1.346 + iAspectRatioNum/iAspectRatioDenom, where the values are positive integers and relatively prime.
1.347 + When aspect_ratio_idc is equal to 0 or sar_width is equal to 0 or sar_height is equal to 0, the
1.348 + sample aspect ratio shall be considered unspecified, and iAspectRatioNum and iAspectRationDenom
1.349 + are set to 0. When aspect_ratio_idc is equal to any of the value from 1 to 13, inclusive,
1.350 + iAspectRatioNum and iAspectRatioDenom are set according to Table E-1 of the AVC specification.
1.351 + When aspect_ratio_idc is equal to 255 (Extended_SAR), iAspectRatioNum is set to sar_width and
1.352 + iAspectRatioDenom is set to sar_height.
1.353 + */
1.354 + TUint iAspectRatioDenom;
1.355 +
1.356 + /**
1.357 + Indicates the frame cropping rectangle as specified in subclause 7.4.2.1 of the AVC specification.
1.358 + */
1.359 + TRect iFrameCropRect;
1.360 +
1.361 + /**
1.362 + Equal to 0 indicates that the cropped (according to the frame cropping rectangle) decoded
1.363 + pictures output contain visually important information in the entire region out to the edges of
1.364 + the cropping rectangle of the picture, such that the cropped decoded pictures output should not
1.365 + be displayed using overscan. Instead, they should be displayed using either an exact match
1.366 + between the display area and the cropping rectangle, or using underscan. Equal to 1 indicates
1.367 + that the cropped decoded picture output is suitable for display using overscan. Otherwise, it is
1.368 + unspecified whether the cropped decoded picture output is suitable for display using overscan or
1.369 + not.
1.370 + */
1.371 + TUint iOverscanInfo;
1.372 +
1.373 + /**
1.374 + Indicates the representation of the pictures as specified in Table E-2 of the AVC specification,
1.375 + before being coded.
1.376 + */
1.377 + TUint iVideoFormat;
1.378 +
1.379 + /**
1.380 + Indicates whether a picture should be displayed as a frame or one or more fields, according to
1.381 + Table D-1. iPictureStructure is equal to the syntax element pic_struct.
1.382 + */
1.383 + TUint iPictureStructure;
1.384 +
1.385 + /**
1.386 + Each picture has up to NumClockTS sets of clock timestamp information. The value of NumClockTS
1.387 + is as specified in Table D-1 of the AVC specification, with a maximum value equal to 3. Each
1.388 + instance of iClockTimestamp[i] indicates a time of origin, capture, or alternative ideal display,
1.389 + in units of microseconds. iClockTimestamp[i] is equal to
1.390 + (clockTimestamp[i] / time_scale * 1000000), where clockTimestamp[i] is the i-th set of clock
1.391 + timestamp information as specified in subclause D.2.2 of the AVC specification.
1.392 + iClockTimestamp[i] where i is larger than NumClockTS-1 is invalid. When picture timing
1.393 + information is not available, NumClockTS is set to zero.
1.394 + */
1.395 + TTimeIntervalMicroSeconds iClockTimestamp[3];
1.396 + };
1.397 +
1.398 +/**
1.399 +This class is used to signal decoder or encoder capabilities or bitstream properties.
1.400 +@publishedAll
1.401 +@released
1.402 +*/
1.403 +class TAvcVideoCapability
1.404 + {
1.405 +public:
1.406 + /**
1.407 + When used as part of a codec capability indication, iProfileLevel[ProfileIdc] indicates the
1.408 + maximum processing level that a decoder or an encoder supports for a particular profile set
1.409 + indicated by ProfileIdc (the indication is described below). A negative value indicates that
1.410 + the profile set is not supported. When used as part of a stream property indication,
1.411 + iProfileLevel[ProfileIdc] indicates the maximum processing level that is present in the stream
1.412 + for a particular profile set indicated by ProfileIdc. A negative value indicates that the stream
1.413 + does not contain data coded according to the indicated profile set.
1.414 +
1.415 + ProfileIdc equal to 0 indicates that all of constraint_set0_flag, constraint_set1_flag and
1.416 + constraint_set2_flag are equal to 1, and profile_idc may indicate any of the profiles (baseline,
1.417 + main or extended). ProfileIdc equal to 1 indicates that constraint_set0_flag and
1.418 + constraint_set2_flag are equal to 1 while constraint_set1_flag is equal to 0, and
1.419 + profile_idc may indicate either the baseline or extended profile. ProfileIdc equal to 2
1.420 + indicates that constraint_set1_flag and constraint_set2_flag are equal to 1 while
1.421 + constraint_set0_flag is equal to 0, and profile_idc may indicate either the main or extended
1.422 + profile. ProfileIdc equal to 3 indicates that constraint_set1_flag is equal to 1 while the other
1.423 + two flags are equal to 0, and profile_idc indicates the main profile. ProfileIdc equal to 4
1.424 + indicates that constraint_set2_flag is equal to 1 while the other two flags are equal to 0, and
1.425 + profile_idc indicates the extended profile.
1.426 + */
1.427 + TInt iProfileLevel[5];
1.428 +
1.429 + /**
1.430 + iSupplementalInformationCap indicates the supported supplemental enhancement functions. The
1.431 + value is a binary OR of values from TAvcSupplementalInformation.
1.432 + */
1.433 + TUint32 iSupplementalInformationCap;
1.434 + };
1.435 +
1.436 +
1.437 +/**
1.438 +This class is used to set the encoder operation mode.
1.439 +@publishedAll
1.440 +@released
1.441 +*/
1.442 +class TAvcVideoMode
1.443 + {
1.444 +public:
1.445 + /**
1.446 + Specifies the picture types allowed in the bitstream. The value is a binary OR of values from
1.447 + TAvcPictureType. Signaled picture types that are not included in the prevailing coding profile
1.448 + are ignored.
1.449 + */
1.450 + TUint32 iAllowedPictureTypes;
1.451 +
1.452 + /**
1.453 + Specifies whether Flexible Macroblock Order (FMO) is allowed. Equal to ETrue indicates that
1.454 + num_slice_groups_minus1 is in the range of 0 to 7, inclusive, i.e. FMO is allowed. Equal to
1.455 + EFalse indicates that num_slice_groups_minus1 shall be equal to 0 only, i.e., FMO is not allowed.
1.456 + */
1.457 + TBool iFlexibleMacroblockOrder;
1.458 +
1.459 + /**
1.460 + Specifies whether redundant pictures may be encoded. Equal to ETrue indicates that
1.461 + redundant_pic_cnt_present_flag can be equal to either 0 or 1 (i.e., redundant pictures may be
1.462 + encoded), while Equal to EFalse indicates that redundant_pic_cnt_present_flag shall be equal to
1.463 + 0 only (i.e., redundant pictures cannot be encoded).
1.464 + */
1.465 + TBool iRedundantPictures;
1.466 +
1.467 + /**
1.468 + Specifies whether data partitioning is in use. When equal to ETrue, data partitioning is in use,
1.469 + i.e., NAL unit streams can contain nal_unit_type values in the range of 2 to 4, inclusive. When
1.470 + equal to EFalse, data partitioning is not in use, i.e., NAL unit streams shall not contain
1.471 + nal_unit_type values in the range of 2 to 4, inclusive. If data partitioning is in use, the
1.472 + SetErrorProtectionLevelsL method, if used, should set the number of unequal error protection
1.473 + levels to be larger than one.
1.474 + */
1.475 + TBool iDataPartitioning;
1.476 +
1.477 + /**
1.478 + iFrameMBsOnly equal to ETrue specifies that every coded picture of the coded video sequence is a
1.479 + coded frame containing only frame macroblocks. Equal to EFalse specifies that coded pictures of
1.480 + the coded video sequence may either be coded fields or coded frames.
1.481 + */
1.482 + TBool iFrameMBsOnly;
1.483 +
1.484 + /**
1.485 + iMBAFFCoding equal to EFalse specifies no switching between frame and field
1.486 + macroblocks within a picture. Equal to ETrue specifies the possible use of switching between
1.487 + frame and field macroblocks within frames. Valid only when iFrameMBsOnly is equal to EFalse.
1.488 + */
1.489 + TBool iMBAFFCoding;
1.490 +
1.491 + /**
1.492 + Specifies the entropy decoding method to be applied for the syntax elements for which two
1.493 + descriptors appear in the syntax tables. Equal to EFalse indicates that Exp-Golomb codes or
1.494 + CAVLC (Context-based Adaptive Variable Length Coding), as described in subclause 9.1 or 9.2 of
1.495 + the AVC specification, is applied. Otherwise, CABAC (Context-based Adaptive Binary Arithmetic
1.496 + Coding) as described in subclause 9.3 of the AVC specification is applied.
1.497 + */
1.498 + TBool iEntropyCodingCABAC;
1.499 +
1.500 + /**
1.501 + Equal to EFalse specifies that weighted prediction shall not be applied to P and SP slices.
1.502 + Equal to ETrue specifies that weighted prediction may be applied to P and SP slices.
1.503 + */
1.504 + TBool iWeightedPPrediction;
1.505 +
1.506 + /**
1.507 + Equal to 0 specifies that the default weighted prediction is applied to B slices. Equal to 1
1.508 + specifies that explicit weighted prediction is applied to B slices. Equal to 2 specifies that
1.509 + implicit weighted prediction is applied to B slices.
1.510 + */
1.511 + TUint iWeightedBipredicitonMode;
1.512 +
1.513 + /**
1.514 + Specifies the method used in the derivation process for luma motion vectors for B_Skip,
1.515 + B_Direct_16x16 and B_Direct_8x8 as specified in subclause 8.4.1.2 of the AVC specification. When
1.516 + iFrameMBsOnly is equal to EFalse, iDirect8x8Inference shall be equal to ETrue.
1.517 + */
1.518 + TBool iDirect8x8Inference;
1.519 + };
1.520 +
1.521 +/**
1.522 +TAvcHrdParams specifies a set of AVC-specific HRD parameters. All pointers included in the objects
1.523 +have the same lifetime as the objects themselves, and the memory is allocated and deallocated by
1.524 +the same instance that creates and owns the object.
1.525 +@publishedAll
1.526 +@released
1.527 +*/
1.528 +class TAvcHrdParams
1.529 + {
1.530 +public:
1.531 + class TCpbParams
1.532 + {
1.533 + public:
1.534 + /**
1.535 + Specifies the delay for a CPB between the time of arrival in the CPB of the first bit of the
1.536 + coded data associated with the access unit associated with the buffering period SEI message
1.537 + and the time of removal from the CPB of the coded data associated with the same access unit,
1.538 + for the first buffering period after HRD initialisation. It is in units of a 90 kHz clock.
1.539 + The value is equal to the corresponding initinal_cpb_removal_delay of the NAL HRD parameters
1.540 + if the current parameter is for the NAL HRD or of the VCL HRD parameters if the current
1.541 + parameter is for the VCL HRD.
1.542 + */
1.543 + TUint iInitialCpbRemovalDelay;
1.544 +
1.545 + /**
1.546 + This parameter is used for a CPB in combination with the cpb_removal_delay to specify the
1.547 + initial delivery time of coded access units to the CPB. It is in units of a 90 kHz clock.
1.548 + The value is equal to the corresponding initinal_cpb_removal_delay_offset of the NAL HRD
1.549 + parameters if the current parameter is for the NAL HRD or of the VCL HRD parameters if the
1.550 + current parameter is for the VCL HRD.
1.551 +
1.552 + Note: Over the entire coded video sequence, the sum of iInitialCpbRemovalDelay and the
1.553 + corresponding iInitialCpbRemovalDelayOffset shall be constant for either the NAL HRD
1.554 + parameters or the VCL HRD parameters.
1.555 + */
1.556 + TUint iInitialCpbRemovalDelayOffset;
1.557 +
1.558 + /**
1.559 + Equal to EFalse specifies that to decode this bitstream by the HRD using the CPB
1.560 + specification, the hypothetical stream scheduler (HSS) operates in an intermittent bit
1.561 + rate mode. Equal to 1 specifies that the HSS operates in a constant bit rate (CBR) mode.
1.562 + */
1.563 + TBool iCbr;
1.564 +
1.565 + /**
1.566 + Specifies the maximum input bit rate, in bits per second, of a CPB. The value is equal to
1.567 + Bitrate as specified in subclause E.2.2 of the AVC specification.
1.568 + */
1.569 + TUint iBitrate;
1.570 +
1.571 + /**
1.572 + Specifies the size, in bytes, of a CPB. The value is equal to CpbSize/8, where CpbSize is as
1.573 + specified in subclause E.2.2 of the AVC specification.
1.574 + */
1.575 + TUint iCpbSize;
1.576 + };
1.577 +
1.578 + /**
1.579 + Specifies the required size of the decoded picture buffer (DPB) in unit of bytes. The value is
1.580 + equal to max_dec_frame_buffering* PicWidthInSamplesL*FrameHeightInMbs*2, where PicWidthInSamplesL
1.581 + and FrameHeightInMbs are specified in subclause 7.4.2.1 of the AVC specification amd the syntax
1.582 + element max_dec_frame_buffering as specified in subclause E.2.1 of the AVC specification.
1.583 + */
1.584 + TUint iDpbSize;
1.585 +
1.586 + /**
1.587 + Specifies the HRD operational mode as specified in Annex C of the AVC specification. The value
1.588 + of LowDelayHrd is equal to ETrue if the syntax element low_delay_hrd_flag is equal to 1, and
1.589 + EFalse otherwise. This parameter is valid only if at least one of iNalCpbCount and iVclCpbCount
1.590 + is larger than 0.
1.591 + */
1.592 + TBool iLowDelayHrd;
1.593 +
1.594 + /**
1.595 + Specifies the number of alternative coded picture buffer (CPB) specifications for NAL HRD
1.596 + parameters in the bitstream. The value of iNalCpbCount is equal to cpb_cnt_minus1 + 1 in the
1.597 + NAL HRD parameters, if present. iNalCpbCount equal to 0 means that NAL HRD parameters are not
1.598 + present.
1.599 + */
1.600 + TUint iNalCpbCount;
1.601 +
1.602 + /**
1.603 + Valid only if iNalCpbCount is larger than zero. iNalCpbParams is a pointer to an object of
1.604 + TCpbParams, which contains the parameters of an alternative CPB.
1.605 + */
1.606 + TCpbParams* iNalCpbParams;
1.607 +
1.608 + /**
1.609 + Specifies the number of alternative coded picture buffer (CPB) specifications for VCL HRD
1.610 + parameters in the bitstream. The value of iVclCpbCount is equal to cpb_cnt_minus1 + 1 in the
1.611 + VCL HRD parameters, if present. iVclCpbCount equal to 0 means that VCL HRD parameters are not
1.612 + present.
1.613 + */
1.614 + TUint iVclCpbCount;
1.615 +
1.616 + /**
1.617 + Valid only if iVclCpbCount is larger than zero. iVclCpbParams is a pointer to an object of
1.618 + TCpbParams, which contains the parameters of an alternative CPB.
1.619 + */
1.620 + TCpbParams* iVclCpbParams;
1.621 + };
1.622 +
1.623 +
1.624 +
1.625 +
1.626 +
1.627 +#endif