Definition

 

typedef struct {

    mfxExtBuffer Header;

 

    mfxU16      NumSliceI;

    mfxU16      NumSliceP;

    mfxU16      NumSliceB;

 

    mfxU16      WinBRCMaxAvgKbps;

    mfxU16      WinBRCSize;

 

    mfxU16      QVBRQuality;

    mfxU16      EnableMBQP;

    mfxU16      IntRefCycleDist;

    mfxU16      DirectBiasAdjustment;          /* tri-state option */

    mfxU16      GlobalMotionBiasAdjustment;    /* tri-state option */

    mfxU16      MVCostScalingFactor;

    mfxU16      MBDisableSkipMap;              /* tri-state option */

 

    mfxU16      WeightedPred;

    mfxU16      WeightedBiPred;

 

    mfxU16      AspectRatioInfoPresent;         /* tri-state option */

    mfxU16      OverscanInfoPresent;            /* tri-state option */

    mfxU16      OverscanAppropriate;            /* tri-state option */

    mfxU16      TimingInfoPresent;              /* tri-state option */

    mfxU16      BitstreamRestriction;           /* tri-state option */

    mfxU16      LowDelayHrd;                    /* tri-state option */

    mfxU16      MotionVectorsOverPicBoundaries; /* tri-state option */

    mfxU16      reserved1[2];

 

    mfxU16      ScenarioInfo;

    mfxU16      ContentInfo;

 

    mfxU16      PRefType;

    mfxU16      FadeDetection;            /* tri-state option */

    mfxU16      reserved2[2];

    mfxU16      GPB;                      /* tri-state option */

 

    mfxU32      MaxFrameSizeI;

    mfxU32      MaxFrameSizeP;

    mfxU32      reserved3[3];

 

    mfxU16      EnableQPOffset;           /* tri-state option */

    mfxI16      QPOffset[8];              /* FrameQP = QPX + QPOffset[pyramid_layer]; QPX = QPB for B-pyramid, QPP for P-pyramid */

 

    mfxU16      NumRefActiveP[8];

    mfxU16      NumRefActiveBL0[8];

    mfxU16      NumRefActiveBL1[8];

 

    mfxU16      reserved[179];

} mfxExtCodingOption3;

Description

 

The mfxExtCodingOption3 structure together with mfxExtCodingOption and mfxExtCodingOption2 structures specifies additional options for encoding.

The application can attach this extended buffer to the mfxVideoParam structure to configure initialization and to the mfxEncodeCtrl during runtime.

 

 

Members

 

Header.BufferId

Must be MFX_EXTBUFF_CODING_OPTION3.

 

NumSliceI

NumSliceP

NumSliceB

The number of slices for I, P and B frames separately.

Not all codecs and SDK implementations support these values. Use Query function to check if this feature is supported

 

WinBRCMaxAvgKbps

When rate control method is MFX_RATECONTROL_LA or MFX_RATECONTROL_LA_HRD  this parameter specifies the maximum bitrate averaged over a sliding window specified by WinBRCSize.

 

WinBRCSize

When rate control method is MFX_RATECONTROL_LA or MFX_RATECONTROL_LA_HRD this parameter specifies sliding window size in frames. Set this parameter to zero to disable sliding window.

 

QVBRQuality

When rate control method is MFX_RATECONTROL_QVBR this parameter specifies quality factor. It is a value in the 1…51 range, where 1 corresponds to the best quality.

 

EnableMBQP

Turn ON this flag to enable per-macroblock QP control, rate control method must be MFX_RATECONTROL_CQP. See the CodingOptionValue enumerator for values of this option. This parameter is valid only during initialization.

 

IntRefCycleDist

Distance between the beginnings of the intra-refresh cycles in frames. Zero means no distance between cycles.

 

DirectBiasAdjustment

Turn ON this flag to enable the ENC mode decision algorithm to bias to fewer B Direct/Skip types. Applies only to B frames, all other frames will ignore this setting. See the CodingOptionValue enumerator for values of this option.

 

GlobalMotionBiasAdjustment

Enables global motion bias. See the CodingOptionValue enumerator for values of this option.

 

MVCostScalingFactor

MV cost scaling ratio. It is used when GlobalMotionBiasAdjustment is ON.

Values are:

0: set MV cost to be 0

1: scale MV cost to be 1/2 of the default value

2: scale MV cost to be 1/4 of the default value

3: scale MV cost to be 1/8 of the default value

 

MBDisableSkipMap

Turn ON this flag to enable usage of mfxExtMBDisableSkipMap. See the CodingOptionValue enumerator for values of this option. This parameter is valid only during initialization.

 

WeightedPred

WeightedBiPred

Weighted prediction mode. See the WeightedPred enumerator for values of these options.

 

AspectRatioInfoPresent

Instructs encoder whether aspect ratio info should present in VUI parameters. See the CodingOptionValue enumerator for values of this option.

 

OverscanInfoPresent

Instructs encoder whether overscan info should present in VUI parameters. See the CodingOptionValue enumerator for values of this option.

 

OverscanAppropriate

ON indicates that the cropped decoded pictures output are suitable for display using overscan. OFF indicates that the cropped decoded pictures output contain visually important information in the entire region out to the edges of the cropping rectangle of the picture. See the CodingOptionValue enumerator for values of this option.

 

TimingInfoPresent

Instructs encoder whether frame rate info should present in VUI parameters. See the CodingOptionValue enumerator for values of this option.

 

BitstreamRestriction

Instructs encoder whether bitstream restriction info should present in VUI parameters. See the CodingOptionValue enumerator for values of this option.

 

ScenarioInfo

Provides a hint to encoder about the scenario for the encoding session. See the ScenarioInfo enumerator for values of this option.

 

ContentInfo

Provides a hint to encoder about the content for the encoding session. See the ContentInfo enumerator for values of this option.

 

PRefType

When GopRefDist=1, specifies the model of reference list construction and DPB management. See the PRefType enumerator for values of this option.

 

FadeDetection

Instructs encoder whether internal fade detection algorithm should be used for calculation of weigh/offset values for pred_weight_table unless application provided mfxExtPredWeightTable for this frame. See the CodingOptionValue enumerator for values of this option.

 

GPB

Turn this option OFF to make HEVC encoder use regular P-frames instead of GPB.

See the CodingOptionValue enumerator for values of this option

 

LowDelayHrd

Corresponds to AVC syntax element low_delay_hrd_flag (VUI).

See the CodingOptionValue enumerator for values of this option.

 

MotionVectorsOverPicBoundaries

When set to OFF, no sample outside the picture boundaries and no sample at a fractional sample position for which the sample value is derived using one or more samples outside the picture boundaries is used for inter prediction of any sample.

When set to ON, one or more samples outside picture boundaries may be used in inter prediction.

See the CodingOptionValue enumerator for values of this option.

 

MaxFrameSizeI

Same as mfxExtCodingOption2::MaxFrameSize but affects only I-frames.

 

MaxFrameSizeP

Same as mfxExtCodingOption2::MaxFrameSize but affects only P-frames.

 

EnableQPOffset

Enables QPOffset control.

See the CodingOptionValue enumerator for values of this option.

 

QPOffset

When EnableQPOffset set to ON and RateControlMethod is CQP specifies QP offset per pyramid layer.

For B-pyramid, B-frame QP = QPB + QPOffset[layer].

For P-pyramid, P-frame QP = QPP + QPOffset[layer].

 

NumRefActiveP

NumRefActiveBL0

NumRefActiveBL1

Max number of active references for P and B frames in reference picture lists 0 and 1 correspondingly. Array index is pyramid layer.

Change History

 

This structure is available since SDK API 1.11.

The SDK API 1.13 adds EnableMBQP, MBDisableSkipMap, DirectBiasAdjustment, GlobalMotionBiasAdjustment and MVCostScalingFactor fields.

The SDK API 1.16 adds IntRefCycleDist, WeightedPred, WeightedBiPred, AspectRatioInfoPresent, OverscanInfoPresent, OverscanAppropriate, TimingInfoPresent, BitstreamRestriction, ScenarioInfo, ContentInfo, PRefType fields.

The SDK API 1.17 adds FadeDetection field.

The SDK API 1.18 adds GPB field.

The SDK API 1.19 adds LowDelayHrd, MotionVectorsOverPicBoundaries, MaxFrameSizeI, MaxFrameSizeP, EnableQPOffset, QPOffset, NumRefActiveP, NumRefActiveBL0, NumRefActiveBL1 fields.

 

 

 

 

Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.