MPEG-2 Pan-Scan Example
When the PictureSourceRect16thPel member of the DXVA_BlendCombination structure is used to select an area specified by MPEG-2 video pan-scan parameters, the values for PictureSourceRect16thPel members can be computed using the following expressions. These values should not violate the restrictions described for the alpha-blend combination buffers when using PictureSourceRect16thPel. For more information, see the Remarks section for the DXVA_BlendCombination structure.
These constraints could be violated with some MPEG-2 pan-scan parameters and, in particular, with some MPEG-2 DVD content, requiring some adjustments to the PictureSourceRect16thPel.
left = 8 x (horizontal_size - display_horizontal_size) - frame_centre_horizontal_offset
top = 8 x (vertical_size - display_vertical_size) - frame_centre_vertical_offset
right = left + (16 x display_horizontal_size)
bottom = top + (16 x display_vertical_size)
The PictureDestinationRect member of the DXVA_BlendCombination structure would then typically use the following values:
left = 0 or 8 (as in DVD 704-Wide Non-Pan-Scan Picture Example)
top = 0
right = left + display_horizontal_size
bottom = top + display_vertical_size