Skip to content

Commit fbd14e0

Browse files
ChunjuanLiugfxVPLsdm
authored andcommitted
Add new decode members for alpha channel info
Add three new members in mfxInfoMFX (AlphaChannelExist, LosslessAlpha, PreMultipliedAlpha) that the decoder populates during MFXVideoDECODE_DecodeHeader. They allow applications to discover, prior to allocating output surfaces, whether the input bitstream carries an alpha channel, whether that alpha is encoded losslessly, and whether the alpha has been pre-multiplied with the video channels. The new bitfields are packed into reservedByte0 to preserve struct layout and ABI. Static ABI offset/width assertions and change-log entries are added accordingly.
1 parent 16c5b81 commit fbd14e0

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

api/vpl/mfxstructures.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,13 @@ typedef struct {
10421042
struct {
10431043
/*! Output ScalingRatio Cap list, it's bit-wise and will be updated by MFXVideoDECODE_DecodeHeader, see OutputScalingRatioCaps enumerator for the definition. */
10441044
mfxU16 OutputScalingRatioCaps : 8;
1045-
mfxU16 reservedByte0 : 8;
1045+
/*! Set by MFXVideoDECODE_DecodeHeader. Nonzero value indicates that the input bitstream carries an alpha channel. */
1046+
mfxU16 AlphaChannelExist : 1;
1047+
/*! Set by MFXVideoDECODE_DecodeHeader. Nonzero value indicates that the alpha channel is encoded losslessly. Valid only when AlphaChannelExist is nonzero. */
1048+
mfxU16 LosslessAlpha : 1;
1049+
/*! Set by MFXVideoDECODE_DecodeHeader. Nonzero value indicates that the video channels have been pre-multiplied with alpha prior to encoding. */
1050+
mfxU16 PreMultipliedAlpha : 1;
1051+
mfxU16 reservedByte0 : 5;
10461052
};
10471053
mfxU16 reserved2[1];
10481054
#else

0 commit comments

Comments
 (0)