sl@0: // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Constants and structs specific to AVC. See the DevVideo specs for more details. sl@0: // sl@0: // sl@0: sl@0: #ifndef __DEVVIDEO_AVC_H__ sl@0: #define __DEVVIDEO_AVC_H__ sl@0: sl@0: #include sl@0: sl@0: /** sl@0: Specifies the picture type. sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: enum TAvcPictureType sl@0: { sl@0: /** sl@0: INTRA picture, a picture consisted of at least one I slice and zero or more SI slices sl@0: */ sl@0: EAvcPictureTypeI = 0x01, sl@0: sl@0: /** sl@0: INTER picture, a picture consisted of at least one P slice and zero or more I, SI and SP slices sl@0: */ sl@0: EAvcPictureTypeP = 0x02, sl@0: sl@0: /** sl@0: Bi-predictive picture, a picture consisted of at least one B slice and zero or more I, P, SI, sl@0: and SP slices sl@0: */ sl@0: EAvcPictureTypeB = 0x04, sl@0: sl@0: /** sl@0: SI picture or switching I picture, a picture consisted of SI slices sl@0: */ sl@0: EAvcPictureTypeSI = 0x08, sl@0: sl@0: /** sl@0: SP picture or switching P picture, a picture consisted of at least one SP slice and zero or more sl@0: SI slices sl@0: */ sl@0: EAvcPictureTypeSP = 0x10 sl@0: }; sl@0: sl@0: sl@0: /** sl@0: These enumerations can be used in codec capability indication and/or bitstream property indication. sl@0: When used as part of an encoder capability indication, a signaled value indicates the capability sl@0: of an encoder to produce such Supplemental Enhancement Information (SEI) to the bitstream and the sl@0: additional meanings as specified below. When used as part of a decoder capability indication, a sl@0: signalled value indicates the capability of a decoder to react to such information in a way as sl@0: specified below. If a decoder does not have such capability, it shall be able to parse and discard sl@0: the information. When used as part of a bitstream property indication, a non-signalled value sl@0: indicates the absence of such information in the bitstream and a signalled value indicates the sl@0: possibility of having such information in the bitstream. sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: enum TAvcSupplementalInformation sl@0: { sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: capability to initialize Hypothetical Reference Decoder (HRD) as specified sl@0: in AVC Annex C at any buffering period SEI message sl@0: bitstream property: existence of Network Abstraction Layer (NAL) units with nal_unit_type equal sl@0: to 6 and the SEI payload type (payloadType) equal to 0 sl@0: */ sl@0: EAvcSeiBufferingPeriod = 0x00000001, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: capability to operate HRD and decode/display video streams according to the sl@0: provided timing information sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal sl@0: to 1 sl@0: */ sl@0: EAvcSeiPictureTiming = 0x00000002, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: capability to crop after decoding and to display the specified rectangular sl@0: region sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal sl@0: to 2 sl@0: */ sl@0: EAvcSeiPanScanRectangle = 0x00000004, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: no meaning sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal sl@0: to 3 sl@0: */ sl@0: EAvcSeiFillerPayload = 0x00000008, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: no meaning sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal sl@0: to 4 sl@0: */ sl@0: EAvcSeiUserDataRegisteredByITUTRecT35 = 0x00000010, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: no meaning sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal sl@0: to 5 sl@0: */ sl@0: EAvcSeiUserDataUnRegistered = 0x00000020, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: capability to start decoding from any access unit with a recovery point SEI sl@0: message sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal sl@0: to 6 sl@0: */ sl@0: EAvcSeiRecoveryPoint = 0x00000040, sl@0: sl@0: /** sl@0: encoder capability: capability to repeat the decoded reference picture marking syntax structure sl@0: as specified in subclauses 7.3.3.3 and 7.4.3.3 of the AVC specification. sl@0: decoder capability: capability to recover the decoded reference picture marking process due to sl@0: losses of reference pictures with decoded reference picture marking syntax sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal sl@0: to 7 sl@0: */ sl@0: EAvcSeiDecodedReferencePictureMarkingRepetition = 0x00000080, sl@0: sl@0: /** sl@0: encoder capability: capability to analyze video pictures for creation of spare picture information sl@0: decoder capability: capability to utilize the spare picture information to enhance video decoding sl@0: in case there is loss of reference pictures sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal sl@0: to 8 sl@0: */ sl@0: EAvcSeiSparePicture = 0x00000100, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: capability to utilize the scene information to enhance error concealment sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal sl@0: to 9 sl@0: */ sl@0: EAvcSeiSceneInformation = 0x00000200, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: capability to utilize the sub-sequence information to achieve temporal sl@0: scalability sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType sl@0: equal to 10 sl@0: */ sl@0: EAvcSeiSubsequenceInformation = 0x00000400, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: capability to utilize the sub-sequence information and the sub-sequence sl@0: layer characteristics to achieve temporal scalability sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType sl@0: equal to 11 (if sub-sequence layer characteristics SEI message is present, sl@0: sub-sequence information SEI message must be present) sl@0: */ sl@0: EAvcSeiSubsequenceLayerCharacteristics = 0x00000800, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: capability to utilize the sub-sequence information and the sub-sequence sl@0: characteristics to achieve temporal scalability sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal sl@0: to 12 (if sub-sequence characteristics SEI message is present, sub-sequence sl@0: information SEI message must be present) sl@0: */ sl@0: EAvcSeiSubsequenceCharacteristics = 0x00001000, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: capability to freeze displayed picture according to AVC Annex D.2.14. sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal sl@0: to 13 sl@0: */ sl@0: EAvcSeiFullFrameFreeze = 0x00002000, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: capability to release frozen displayed picture according to AVC Annex D.2.15 sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType sl@0: equal to 14 sl@0: */ sl@0: EAvcSeiFullFrameFreezeRelease = 0x00004000, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: no meaning sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType sl@0: equal to 15 sl@0: */ sl@0: EAvcSeiFullFrameSnapshot = 0x00008000, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: no meaning sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType sl@0: equal to 16 sl@0: */ sl@0: EAvcSeiProgressiveRefinementSegmentStrat = 0x00010000, sl@0: sl@0: /** sl@0: encoder capability: no meaning sl@0: decoder capability: no meaning sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType sl@0: equal to 17 sl@0: */ sl@0: EAvcSeiProgressiveRefinementSegmentEnd = 0x00020000, sl@0: sl@0: /** sl@0: encoder capability: capability to constrain the inter prediction process according to sl@0: AVC Annex D.2.19 sl@0: decoder capability: capability to decode only part of the pictures covered by the motion- sl@0: constrained slice group set sl@0: bitstream property: existence of NAL units with nal_unit_type equal to 6 and payloadType equal sl@0: to 18 sl@0: */ sl@0: EAvcSeiMotionConstrainedSliceGroupSet = 0x00040000 sl@0: }; sl@0: sl@0: sl@0: /** sl@0: AVC Picture Header. sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: class TAvcPictureHeader sl@0: { sl@0: public: sl@0: /** sl@0: Equal to ETrue indicates that the bitstream obeys all constraints specified in subclause A.2.1 sl@0: of the AVC specification, equal to EFalse indicates that the bitstream may or may not obey the sl@0: constraints. The value is equal to ETrue (EFalse) if the syntax element constraint_set0_flag is sl@0: equal to 1 (0). sl@0: */ sl@0: TBool iBaselineProfileConstraintSet; sl@0: sl@0: /** sl@0: Equal to ETrue indicates that the bitstream obeys all constraints specified in subclause A.2.2 sl@0: of the AVC specification, equal to EFalse indicates that the bitstream may or may not obey the sl@0: constraints. The value is equal to ETrue (EFalse) if the syntax element constraint_set1_flag is sl@0: equal to 1 (0). sl@0: */ sl@0: TBool iMainProfileConstraintSet; sl@0: sl@0: /** sl@0: Equal to ETrue indicates that the bitstream obeys all constraints specified in subclause A.2.3 sl@0: of the AVC specification, equal to EFalse indicates that the bitstream may or may not obey the sl@0: constraints. The value is equal to ETrue (EFalse) if the syntax element constraint_set2_flag is sl@0: equal to 1 (0). sl@0: */ sl@0: TBool iExtendedProfileConstraintSet; sl@0: sl@0: /** sl@0: Indicates the picture type. iPictureType is set as one of the values defined in TAvcPictureType. sl@0: */ sl@0: TAvcPictureType iPictureType; sl@0: sl@0: /** sl@0: iLongTermPicture equal to ETrue indicates that the picture is a long-term picture, i.e., it has sl@0: been marked as "used for long-term reference" according to the decoded reference picture marking sl@0: process as specified in subclause 8.2.5 of the AVC specification. Otherwise the picture is not a sl@0: long-term picture. sl@0: */ sl@0: TBool iLongTermPicture; sl@0: sl@0: /** sl@0: Indicates whether the picture is a frame or a field. iFrame is equal to ETrue if the picture is sl@0: a frame (field_pic_flag is equal to 0), EFalse if the picture is a field (field_pic_flag is equal sl@0: to 1). sl@0: */ sl@0: TBool iFrame; sl@0: sl@0: /** sl@0: Valid only if iFrame is equal to EFalse. Indicates whether the field picture is a top field or a sl@0: bottom field. iTopField is equal to ETrue if the picture is a top field (bottom_field_flag is sl@0: equal to 0), EFalse if the picture is a bottom field (bottom_field_flag is equal to 0). sl@0: */ sl@0: TBool iTopField; sl@0: sl@0: /** sl@0: Indicates the picture order count of the top field of a frame, the top field of a complementary sl@0: field pair, or a top field. iTopFieldOrderCount is equal to the value of TopFieldOrderCnt as sl@0: specified in subclause 8.2.1 of the AVC specification. sl@0: */ sl@0: TUint iTopFieldOrderCount; sl@0: sl@0: /** sl@0: Indicates the picture order count of the bottom field of a frame, the bottom field of a sl@0: complementary field pair, or a bottom field. iBottomFieldOrderCount is equal to the value of sl@0: BottomFieldOrderCnt as specified in subclause 8.2.1 of the AVC specification. sl@0: */ sl@0: TUint iBottomFieldOrderCount; sl@0: sl@0: /** sl@0: Equal to ETrue indicates that the picture is an Instantaneous Decoding Refresh (IDR) picture; sl@0: otherwise the picture is not an IDR picture. The value of nal_unit_type of all the Video Coding sl@0: Layer (VCL) NAL units of the primary coded picture of an IDR picture shall be equal to 5. sl@0: */ sl@0: TBool iIdrPicture; sl@0: sl@0: /** sl@0: Indicates the initial value of the quantization parameter. If iPictureType is equal to sl@0: EAvcPictureTypeSI or EavcPictureTypeSP, iPQY is equal to pic_init_qs_minus26 + 26; otherwise sl@0: iPQY is equal to pic_init_qp_minus26 + 26. sl@0: */ sl@0: TUint iQPY; sl@0: sl@0: /** sl@0: Pixel aspect ratio numerator. The pixel aspect ratio is defined as sl@0: iAspectRatioNum/iAspectRatioDenom, where the values are positive integers and relatively prime. sl@0: 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: sample aspect ratio shall be considered unspecified, and iAspectRatioNum and iAspectRationDenom sl@0: are set to 0. When aspect_ratio_idc is equal to any of the value from 1 to 13, inclusive, sl@0: iAspectRatioNum and iAspectRatioDenom are set according to Table E-1 of the AVC specification. sl@0: When aspect_ratio_idc is equal to 255 (Extended_SAR), iAspectRatioNum is set to sar_width and sl@0: iAspectRatioDenom is set to sar_height. sl@0: */ sl@0: TUint iAspectRatioNum; sl@0: sl@0: /** sl@0: Pixel aspect ratio denominator. The pixel aspect ratio is defined as sl@0: iAspectRatioNum/iAspectRatioDenom, where the values are positive integers and relatively prime. sl@0: 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: sample aspect ratio shall be considered unspecified, and iAspectRatioNum and iAspectRationDenom sl@0: are set to 0. When aspect_ratio_idc is equal to any of the value from 1 to 13, inclusive, sl@0: iAspectRatioNum and iAspectRatioDenom are set according to Table E-1 of the AVC specification. sl@0: When aspect_ratio_idc is equal to 255 (Extended_SAR), iAspectRatioNum is set to sar_width and sl@0: iAspectRatioDenom is set to sar_height. sl@0: */ sl@0: TUint iAspectRatioDenom; sl@0: sl@0: /** sl@0: Indicates the frame cropping rectangle as specified in subclause 7.4.2.1 of the AVC specification. sl@0: */ sl@0: TRect iFrameCropRect; sl@0: sl@0: /** sl@0: Equal to 0 indicates that the cropped (according to the frame cropping rectangle) decoded sl@0: pictures output contain visually important information in the entire region out to the edges of sl@0: the cropping rectangle of the picture, such that the cropped decoded pictures output should not sl@0: be displayed using overscan. Instead, they should be displayed using either an exact match sl@0: between the display area and the cropping rectangle, or using underscan. Equal to 1 indicates sl@0: that the cropped decoded picture output is suitable for display using overscan. Otherwise, it is sl@0: unspecified whether the cropped decoded picture output is suitable for display using overscan or sl@0: not. sl@0: */ sl@0: TUint iOverscanInfo; sl@0: sl@0: /** sl@0: Indicates the representation of the pictures as specified in Table E-2 of the AVC specification, sl@0: before being coded. sl@0: */ sl@0: TUint iVideoFormat; sl@0: sl@0: /** sl@0: Indicates whether a picture should be displayed as a frame or one or more fields, according to sl@0: Table D-1. iPictureStructure is equal to the syntax element pic_struct. sl@0: */ sl@0: TUint iPictureStructure; sl@0: sl@0: /** sl@0: Each picture has up to NumClockTS sets of clock timestamp information. The value of NumClockTS sl@0: is as specified in Table D-1 of the AVC specification, with a maximum value equal to 3. Each sl@0: instance of iClockTimestamp[i] indicates a time of origin, capture, or alternative ideal display, sl@0: in units of microseconds. iClockTimestamp[i] is equal to sl@0: (clockTimestamp[i] / time_scale * 1000000), where clockTimestamp[i] is the i-th set of clock sl@0: timestamp information as specified in subclause D.2.2 of the AVC specification. sl@0: iClockTimestamp[i] where i is larger than NumClockTS-1 is invalid. When picture timing sl@0: information is not available, NumClockTS is set to zero. sl@0: */ sl@0: TTimeIntervalMicroSeconds iClockTimestamp[3]; sl@0: }; sl@0: sl@0: /** sl@0: This class is used to signal decoder or encoder capabilities or bitstream properties. sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: class TAvcVideoCapability sl@0: { sl@0: public: sl@0: /** sl@0: When used as part of a codec capability indication, iProfileLevel[ProfileIdc] indicates the sl@0: maximum processing level that a decoder or an encoder supports for a particular profile set sl@0: indicated by ProfileIdc (the indication is described below). A negative value indicates that sl@0: the profile set is not supported. When used as part of a stream property indication, sl@0: iProfileLevel[ProfileIdc] indicates the maximum processing level that is present in the stream sl@0: for a particular profile set indicated by ProfileIdc. A negative value indicates that the stream sl@0: does not contain data coded according to the indicated profile set. sl@0: sl@0: ProfileIdc equal to 0 indicates that all of constraint_set0_flag, constraint_set1_flag and sl@0: constraint_set2_flag are equal to 1, and profile_idc may indicate any of the profiles (baseline, sl@0: main or extended). ProfileIdc equal to 1 indicates that constraint_set0_flag and sl@0: constraint_set2_flag are equal to 1 while constraint_set1_flag is equal to 0, and sl@0: profile_idc may indicate either the baseline or extended profile. ProfileIdc equal to 2 sl@0: indicates that constraint_set1_flag and constraint_set2_flag are equal to 1 while sl@0: constraint_set0_flag is equal to 0, and profile_idc may indicate either the main or extended sl@0: profile. ProfileIdc equal to 3 indicates that constraint_set1_flag is equal to 1 while the other sl@0: two flags are equal to 0, and profile_idc indicates the main profile. ProfileIdc equal to 4 sl@0: indicates that constraint_set2_flag is equal to 1 while the other two flags are equal to 0, and sl@0: profile_idc indicates the extended profile. sl@0: */ sl@0: TInt iProfileLevel[5]; sl@0: sl@0: /** sl@0: iSupplementalInformationCap indicates the supported supplemental enhancement functions. The sl@0: value is a binary OR of values from TAvcSupplementalInformation. sl@0: */ sl@0: TUint32 iSupplementalInformationCap; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: This class is used to set the encoder operation mode. sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: class TAvcVideoMode sl@0: { sl@0: public: sl@0: /** sl@0: Specifies the picture types allowed in the bitstream. The value is a binary OR of values from sl@0: TAvcPictureType. Signaled picture types that are not included in the prevailing coding profile sl@0: are ignored. sl@0: */ sl@0: TUint32 iAllowedPictureTypes; sl@0: sl@0: /** sl@0: Specifies whether Flexible Macroblock Order (FMO) is allowed. Equal to ETrue indicates that sl@0: num_slice_groups_minus1 is in the range of 0 to 7, inclusive, i.e. FMO is allowed. Equal to sl@0: EFalse indicates that num_slice_groups_minus1 shall be equal to 0 only, i.e., FMO is not allowed. sl@0: */ sl@0: TBool iFlexibleMacroblockOrder; sl@0: sl@0: /** sl@0: Specifies whether redundant pictures may be encoded. Equal to ETrue indicates that sl@0: redundant_pic_cnt_present_flag can be equal to either 0 or 1 (i.e., redundant pictures may be sl@0: encoded), while Equal to EFalse indicates that redundant_pic_cnt_present_flag shall be equal to sl@0: 0 only (i.e., redundant pictures cannot be encoded). sl@0: */ sl@0: TBool iRedundantPictures; sl@0: sl@0: /** sl@0: Specifies whether data partitioning is in use. When equal to ETrue, data partitioning is in use, sl@0: i.e., NAL unit streams can contain nal_unit_type values in the range of 2 to 4, inclusive. When sl@0: equal to EFalse, data partitioning is not in use, i.e., NAL unit streams shall not contain sl@0: nal_unit_type values in the range of 2 to 4, inclusive. If data partitioning is in use, the sl@0: SetErrorProtectionLevelsL method, if used, should set the number of unequal error protection sl@0: levels to be larger than one. sl@0: */ sl@0: TBool iDataPartitioning; sl@0: sl@0: /** sl@0: iFrameMBsOnly equal to ETrue specifies that every coded picture of the coded video sequence is a sl@0: coded frame containing only frame macroblocks. Equal to EFalse specifies that coded pictures of sl@0: the coded video sequence may either be coded fields or coded frames. sl@0: */ sl@0: TBool iFrameMBsOnly; sl@0: sl@0: /** sl@0: iMBAFFCoding equal to EFalse specifies no switching between frame and field sl@0: macroblocks within a picture. Equal to ETrue specifies the possible use of switching between sl@0: frame and field macroblocks within frames. Valid only when iFrameMBsOnly is equal to EFalse. sl@0: */ sl@0: TBool iMBAFFCoding; sl@0: sl@0: /** sl@0: Specifies the entropy decoding method to be applied for the syntax elements for which two sl@0: descriptors appear in the syntax tables. Equal to EFalse indicates that Exp-Golomb codes or sl@0: CAVLC (Context-based Adaptive Variable Length Coding), as described in subclause 9.1 or 9.2 of sl@0: the AVC specification, is applied. Otherwise, CABAC (Context-based Adaptive Binary Arithmetic sl@0: Coding) as described in subclause 9.3 of the AVC specification is applied. sl@0: */ sl@0: TBool iEntropyCodingCABAC; sl@0: sl@0: /** sl@0: Equal to EFalse specifies that weighted prediction shall not be applied to P and SP slices. sl@0: Equal to ETrue specifies that weighted prediction may be applied to P and SP slices. sl@0: */ sl@0: TBool iWeightedPPrediction; sl@0: sl@0: /** sl@0: Equal to 0 specifies that the default weighted prediction is applied to B slices. Equal to 1 sl@0: specifies that explicit weighted prediction is applied to B slices. Equal to 2 specifies that sl@0: implicit weighted prediction is applied to B slices. sl@0: */ sl@0: TUint iWeightedBipredicitonMode; sl@0: sl@0: /** sl@0: Specifies the method used in the derivation process for luma motion vectors for B_Skip, sl@0: B_Direct_16x16 and B_Direct_8x8 as specified in subclause 8.4.1.2 of the AVC specification. When sl@0: iFrameMBsOnly is equal to EFalse, iDirect8x8Inference shall be equal to ETrue. sl@0: */ sl@0: TBool iDirect8x8Inference; sl@0: }; sl@0: sl@0: /** sl@0: TAvcHrdParams specifies a set of AVC-specific HRD parameters. All pointers included in the objects sl@0: have the same lifetime as the objects themselves, and the memory is allocated and deallocated by sl@0: the same instance that creates and owns the object. sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: class TAvcHrdParams sl@0: { sl@0: public: sl@0: class TCpbParams sl@0: { sl@0: public: sl@0: /** sl@0: Specifies the delay for a CPB between the time of arrival in the CPB of the first bit of the sl@0: coded data associated with the access unit associated with the buffering period SEI message sl@0: and the time of removal from the CPB of the coded data associated with the same access unit, sl@0: for the first buffering period after HRD initialisation. It is in units of a 90 kHz clock. sl@0: The value is equal to the corresponding initinal_cpb_removal_delay of the NAL HRD parameters sl@0: if the current parameter is for the NAL HRD or of the VCL HRD parameters if the current sl@0: parameter is for the VCL HRD. sl@0: */ sl@0: TUint iInitialCpbRemovalDelay; sl@0: sl@0: /** sl@0: This parameter is used for a CPB in combination with the cpb_removal_delay to specify the sl@0: initial delivery time of coded access units to the CPB. It is in units of a 90 kHz clock. sl@0: The value is equal to the corresponding initinal_cpb_removal_delay_offset of the NAL HRD sl@0: parameters if the current parameter is for the NAL HRD or of the VCL HRD parameters if the sl@0: current parameter is for the VCL HRD. sl@0: sl@0: Note: Over the entire coded video sequence, the sum of iInitialCpbRemovalDelay and the sl@0: corresponding iInitialCpbRemovalDelayOffset shall be constant for either the NAL HRD sl@0: parameters or the VCL HRD parameters. sl@0: */ sl@0: TUint iInitialCpbRemovalDelayOffset; sl@0: sl@0: /** sl@0: Equal to EFalse specifies that to decode this bitstream by the HRD using the CPB sl@0: specification, the hypothetical stream scheduler (HSS) operates in an intermittent bit sl@0: rate mode. Equal to 1 specifies that the HSS operates in a constant bit rate (CBR) mode. sl@0: */ sl@0: TBool iCbr; sl@0: sl@0: /** sl@0: Specifies the maximum input bit rate, in bits per second, of a CPB. The value is equal to sl@0: Bitrate as specified in subclause E.2.2 of the AVC specification. sl@0: */ sl@0: TUint iBitrate; sl@0: sl@0: /** sl@0: Specifies the size, in bytes, of a CPB. The value is equal to CpbSize/8, where CpbSize is as sl@0: specified in subclause E.2.2 of the AVC specification. sl@0: */ sl@0: TUint iCpbSize; sl@0: }; sl@0: sl@0: /** sl@0: Specifies the required size of the decoded picture buffer (DPB) in unit of bytes. The value is sl@0: equal to max_dec_frame_buffering* PicWidthInSamplesL*FrameHeightInMbs*2, where PicWidthInSamplesL sl@0: and FrameHeightInMbs are specified in subclause 7.4.2.1 of the AVC specification amd the syntax sl@0: element max_dec_frame_buffering as specified in subclause E.2.1 of the AVC specification. sl@0: */ sl@0: TUint iDpbSize; sl@0: sl@0: /** sl@0: Specifies the HRD operational mode as specified in Annex C of the AVC specification. The value sl@0: of LowDelayHrd is equal to ETrue if the syntax element low_delay_hrd_flag is equal to 1, and sl@0: EFalse otherwise. This parameter is valid only if at least one of iNalCpbCount and iVclCpbCount sl@0: is larger than 0. sl@0: */ sl@0: TBool iLowDelayHrd; sl@0: sl@0: /** sl@0: Specifies the number of alternative coded picture buffer (CPB) specifications for NAL HRD sl@0: parameters in the bitstream. The value of iNalCpbCount is equal to cpb_cnt_minus1 + 1 in the sl@0: NAL HRD parameters, if present. iNalCpbCount equal to 0 means that NAL HRD parameters are not sl@0: present. sl@0: */ sl@0: TUint iNalCpbCount; sl@0: sl@0: /** sl@0: Valid only if iNalCpbCount is larger than zero. iNalCpbParams is a pointer to an object of sl@0: TCpbParams, which contains the parameters of an alternative CPB. sl@0: */ sl@0: TCpbParams* iNalCpbParams; sl@0: sl@0: /** sl@0: Specifies the number of alternative coded picture buffer (CPB) specifications for VCL HRD sl@0: parameters in the bitstream. The value of iVclCpbCount is equal to cpb_cnt_minus1 + 1 in the sl@0: VCL HRD parameters, if present. iVclCpbCount equal to 0 means that VCL HRD parameters are not sl@0: present. sl@0: */ sl@0: TUint iVclCpbCount; sl@0: sl@0: /** sl@0: Valid only if iVclCpbCount is larger than zero. iVclCpbParams is a pointer to an object of sl@0: TCpbParams, which contains the parameters of an alternative CPB. sl@0: */ sl@0: TCpbParams* iVclCpbParams; sl@0: }; sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: #endif