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