mfxFrameInfo

Definition

 

 

typedef struct {

    mfxU32  reserved[4];

    mfxU16  reserved4;

    mfxU16  BitDepthLuma;

    mfxU16  BitDepthChroma;

    mfxU16  Shift;

 

    mfxFrameId FrameId;

 

    mfxU32  FourCC;

    union {

        struct { /* Frame parameters */

            mfxU16  Width;

            mfxU16  Height;

 

            mfxU16  CropX;

            mfxU16  CropY;

            mfxU16  CropW;

            mfxU16  CropH;

        };

        struct { /* Buffer parameters (for plain formats like P8) */

            mfxU64 BufferSize;

            mfxU32 reserved5;

        };

    };

 

    mfxU32  FrameRateExtN;

    mfxU32  FrameRateExtD;

    mfxU16  reserved3;

 

    mfxU16  AspectRatioW;

    mfxU16  AspectRatioH;

 

    mfxU16  PicStruct;

    mfxU16  ChromaFormat;

    mfxU16  reserved2;

} mfxFrameInfo;

 

Description

 

 

The mfxFrameInfo structure specifies properties of video frames. See also Appendix A: Configuration Parameter Constraints.

 

Members

 

 

BitDepthLuma

Number of bits used to represent luma samples.

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

 

 

BitDepthChroma

Number of bits used to represent chroma samples.

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

 

 

Shift

When not zero indicates that values of luma and chroma samples are shifted. Use BitDepthLuma and BitDepthChroma to calculate shift size. Use zero value to indicate absence of shift.

 

Bits

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

 

0

0

0

0

0

0

Valid Data

Data alignment for Shift = 0

 

Bits

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

 

Valid Data

0

0

0

0

0

0

Data alignment for Shift != 0

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

 

 

 

FourCC

FourCC code of the color format; see the ColorFourCC enumerator for details.

 

 

Width

Height

Width and height of the video frame in pixels; Width must be a multiple of 16. Height must be a multiple of 16 for progressive frame sequence and a multiple of 32 otherwise.

 

 

CropX, CropY, CropW, CropH

Display the region of interest of the frame; specify the display width and height in mfxVideoParam.

 

 

BufferSize

Size of frame buffer in bytes. Valid only for plain formats (when FourCC is P8); Width, Height and crops in this case are invalid.

 

 

AspectRatioW

AspectRatioH

These parameters specify the sample aspect ratio. If sample aspect ratio is explicitly defined by the standards (see Table 6-3 in the MPEG-2 specification or Table E-1 in the H.264 specification), AspectRatioW and AspectRatioH should be the defined values. Otherwise, the sample aspect ratio can be derived as follows:

AspectRatioW=display_aspect_ratio_width*display_height;

AspectRatioH=display_aspect_ratio_height*display_width;

For MPEG-2, the above display aspect ratio must be one of the defined values in Table 6-3. For H.264, there is no restriction on display aspect ratio values.

If both parameters are zero, the encoder uses default value of sample aspect ratio.

 

 

FrameRateExtN

FrameRateExtD

Specify the frame rate by the formula: FrameRateExtN/FrameRateExtD.

For encoding, frame rate must be specified. For decoding, frame rate may be unspecified (FrameRateExtN and FrameRateExtD are all zeros.) In this case, the frame rate is default to 30 frames per second.

 

 

PicStruct

Picture type as specified in the PicStruct enumerator

 

 

ChromaFormat

Color sampling method; the value of ChromaFormat is the same as that of ChromaFormatIdc. ChromaFormat is not defined if FourCC is zero.

 

Change History

 

This structure is available since SDK API 1.0.

SDK API 1.9 added BitDepthLuma, BitDepthChroma and Shift fields.

 

 

SDK API 1.15 adds BufferSize field.

 

Remarks

 

 

See Appendix A for constraints of specifying certain parameters during SDK class initialization and operation.

 

 

 

 

 

For more complete information about compiler optimizations, see our Optimization Notice.