videoCalculateDisplayRatio

fnbool videoCalculateDisplayRatio(out uint darN, out uint darD, uint videoWidth, uint videoHeight, uint videoParN, uint videoParD, uint displayParN, uint displayParD)

Given the Pixel Aspect Ratio and size of an input video frame, and the pixel aspect ratio of the intended display device, calculates the actual display ratio the video will be rendered with.

Parameters

darNNumerator of the calculated display_ratio
darDDenominator of the calculated display_ratio
videoWidthWidth of the video frame in pixels
videoHeightHeight of the video frame in pixels
videoParNNumerator of the pixel aspect ratio of the input video.
videoParDDenominator of the pixel aspect ratio of the input video.
displayParNNumerator of the pixel aspect ratio of the display device
displayParDDenominator of the pixel aspect ratio of the display device

Returns

A boolean indicating success and a calculated Display Ratio in the

dar_n and dar_d parameters. The return value is FALSE in the case of integer overflow or other error.