Skip to content

Commit

Permalink
[coreVdpauMixer] Pass destination video rectangle to VdpVideoMixerRen…
Browse files Browse the repository at this point in the history
…der() to fix VDPAU video output with AMD Radeon
  • Loading branch information
eumagga0x2a authored and lherschi committed Oct 12, 2020
1 parent 4565301 commit aa5528d
Showing 1 changed file with 19 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ VdpStatus admVdpau::mixerRender(VdpVideoMixer mixer,
uint32_t targetHeight )
{
const VdpVideoSurface listOfInvalidSurface[1]={VDP_INVALID_HANDLE};

VdpRect targetRect;

targetRect.x0=targetRect.y0=0;
targetRect.x1=targetWidth;
targetRect.y1=targetHeight;

VdpStatus e=ADM_coreVdpau::funcs.mixerRender(mixer,
VDP_INVALID_HANDLE,NULL, // Background
VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME,
Expand All @@ -136,7 +143,7 @@ const VdpVideoSurface listOfInvalidSurface[1]={VDP_INVALID_HANDLE};
NULL, // source RECT
targetOutputSurface,
NULL, // dest Rec
NULL, // dest video Rec
&targetRect, // dest video Rec
0,NULL); // Layers

#if 0
Expand Down Expand Up @@ -184,10 +191,15 @@ VdpStatus admVdpau::mixerRenderWithCropping(VdpVideoMixer mixer,
{
const VdpVideoSurface listOfInvalidSurface[1]={VDP_INVALID_HANDLE};

VdpRect rect;
rect.x0=rect.y0=0;
rect.x1=sourceWidth;
rect.y1=sourceHeight;
VdpRect sourceRect,targetRect;

sourceRect.x0=sourceRect.y0=0;
sourceRect.x1=sourceWidth;
sourceRect.y1=sourceHeight;

targetRect.x0=targetRect.y0=0;
targetRect.x1=targetWidth;
targetRect.y1=targetHeight;
#if 0
VdpChromaType sourceChroma;
uint32_t sourceW,sourceH;
Expand All @@ -206,10 +218,10 @@ const VdpVideoSurface listOfInvalidSurface[1]={VDP_INVALID_HANDLE};
0, listOfInvalidSurface, // Past...
sourceSurface, // current
0, listOfInvalidSurface, // Future
&rect, // source RECT
&sourceRect, // source RECT
targetOutputSurface,
NULL, // dest Rec
NULL, // dest video Rec
&targetRect, // dest video Rec
0,NULL); // Layers


Expand Down

0 comments on commit aa5528d

Please sign in to comment.