XGValidateJpegFile

Validates a JPEG file for hardware decode.

Syntax

HRESULT XGValidateJpegFile(
         const void *pJpegFileBuffer,
         UINT32 JpegFileBufferSizeBytes,
         XG_VALIDATED_JPEG_DESC *pDesc
)  

Parameters

pJpegFileBuffer
Type: void *

[in] The JPEG file buffer, as a void pointer.

JpegFileBufferSizeBytes
Type: UINT32 

[in] The size of the JPEG file buffer, in bytes.

pDesc
Type: XG_VALIDATED_JPEG_DESC *

[out] The description of the validated JPEG, as a pointer to a XG_VALIDATED_JPEG_DESC structure.

Return value

Type: HRESULT 

S_OK if successful; otherwise, an error code.

Remarks

This function validates a JPEG file for hardware decode. The JPEG file is passed as a memory buffer, and the results are passed in the output desc. This function only examines the JFIF header data, and does not decode the image on the CPU or inspect any of the image data in any way. If this function returns an error code, the DMA engine JPEG decoder will not be able to successfully decode the JPEG file.

Requirements

Header: Declared in xg.h.

Library: Use xg_x.lib.