Hardware Device Error Handling

For implementations that accelerate decoding, encoding, and video processing through a hardware device, API functions may return errors or warnings if the hardware device encounters errors. See the Hardware Device Errors and Warnings table for detailed information about the errors and warnings.

Hardware Device Errors and Warnings

Status

Description

mfxStatus::MFX_ERR_DEVICE_FAILED

Hardware device returned unexpected errors. oneVPL was unable to restore operation.

mfxStatus::MFX_ERR_DEVICE_LOST

Hardware device was lost due to system lock or shutdown.

mfxStatus::MFX_WRN_PARTIAL_ACCELERATION

The hardware does not fully support the specified configuration. The encoding, decoding, or video processing operation may be partially accelerated.

mfxStatus::MFX_WRN_DEVICE_BUSY

Hardware device is currently busy.

oneVPL Query, QueryIOSurf, and Init functions return mfxStatus::MFX_WRN_PARTIAL_ACCELERATION to indicate that the encoding, decoding, or video processing operation can be partially hardware accelerated or not hardware accelerated at all. The application can ignore this warning and proceed with the operation. (Note that oneVPL functions may return errors or other warnings overwriting mfxStatus::MFX_WRN_PARTIAL_ACCELERATION, as it is a lower priority warning.)

oneVPL functions return mfxStatus::MFX_WRN_DEVICE_BUSY to indicate that the hardware device is busy and unable to receive commands at this time. The recommended approach is:

  • If the asynchronous operation returns synchronization point along with mfxStatus::MFX_WRN_DEVICE_BUSY - call the MFXVideoCORE_SyncOperation() with it.

  • If application has buffered synchronization point(s) obtained from previous asynchronous operations - call MFXVideoCORE_SyncOperation() with the oldest one.

  • If no synchronization point(s) available - wait for a few milliseconds.

  • Resume the operation by resubmitting the request.

1mfxStatus sts=MFX_ERR_NONE;
2for (;;) {
3   // do something
4   sts=MFXVideoDECODE_DecodeFrameAsync(session, bitstream,  surface_work, &surface_disp, &syncp);
5   if (sts == MFX_ERR_NONE) buffered_syncp = syncp;
6   else if (sts == MFX_WRN_DEVICE_BUSY) prg_handle_device_busy(session, syncp ? syncp : buffered_syncp);
7
8}

The same procedure applies to encoding and video processing.

oneVPL functions return mfxStatus::MFX_ERR_DEVICE_LOST or mfxStatus::MFX_ERR_DEVICE_FAILED to indicate that there is a complete failure in hardware acceleration. The application must close and reinitialize the oneVPL function class. If the application has provided a hardware acceleration device handle to oneVPL, the application must reset the device.