r36293 - trunk/libvo/vo_vdpau.c
Author: reimar Date: Tue May 28 22:56:05 2013 New Revision: 36293 Log: Try to support -monitor-orientation with VDPAU. It doesn't work on my system with a radeon card, though maybe that feature just isn't implemented. Modified: trunk/libvo/vo_vdpau.c Modified: trunk/libvo/vo_vdpau.c ============================================================================== --- trunk/libvo/vo_vdpau.c Tue May 28 22:43:50 2013 (r36292) +++ trunk/libvo/vo_vdpau.c Tue May 28 22:56:05 2013 (r36293) @@ -266,6 +266,13 @@ static void video_to_output_surface(void } } +static const uint32_t rotate_flags[4] = { + VDP_OUTPUT_SURFACE_RENDER_ROTATE_0, + VDP_OUTPUT_SURFACE_RENDER_ROTATE_90, + VDP_OUTPUT_SURFACE_RENDER_ROTATE_180, + VDP_OUTPUT_SURFACE_RENDER_ROTATE_270 +}; + static void resize(void) { VdpStatus vdp_st; @@ -314,12 +321,12 @@ static void resize(void) vdp_st = vdp_output_surface_render_output_surface(output_surfaces[surface_num], NULL, VDP_INVALID_HANDLE, NULL, NULL, NULL, - VDP_OUTPUT_SURFACE_RENDER_ROTATE_0); + rotate_flags[vo_rotate & 3]); CHECK_ST_WARNING("Error when calling vdp_output_surface_render_output_surface") vdp_st = vdp_output_surface_render_output_surface(output_surfaces[1 - surface_num], NULL, VDP_INVALID_HANDLE, NULL, NULL, NULL, - VDP_OUTPUT_SURFACE_RENDER_ROTATE_0); + rotate_flags[vo_rotate & 3]); CHECK_ST_WARNING("Error when calling vdp_output_surface_render_output_surface") } else video_to_output_surface(); @@ -827,7 +834,7 @@ static void draw_osd_I8A8(int x0,int y0, &output_indexed_rect_vid, NULL, &blend_state, - VDP_OUTPUT_SURFACE_RENDER_ROTATE_0); + rotate_flags[vo_rotate & 3]); CHECK_ST_WARNING("Error when calling vdp_output_surface_render_output_surface") } @@ -851,7 +858,7 @@ static void draw_eosd(void) output_surface, &eosd_targets[i].dest, eosd_targets[i].surface, &eosd_targets[i].source, &eosd_targets[i].color, &blend_state, - VDP_OUTPUT_SURFACE_RENDER_ROTATE_0); + rotate_flags[vo_rotate & 3]); CHECK_ST_WARNING("EOSD: Error when rendering") } } @@ -1041,7 +1048,7 @@ static uint32_t draw_image(mp_image_t *m &out_rect_vid, output_surfaces[2], &src_rect_vid, NULL, NULL, - VDP_OUTPUT_SURFACE_RENDER_ROTATE_0); + rotate_flags[vo_rotate & 3]); CHECK_ST_ERROR("Error when calling vdp_output_surface_render_output_surface") } else if (!(mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)) { VdpStatus vdp_st;
reimar <subversion <at> mplayerhq.hu> writes:
Try to support -monitor-orientation with VDPAU.
It doesn't work on my system with a radeon card, though maybe that feature just isn't implemented.
It does not work here either on Nvidia, could you test "-vf format=bgra -vo vdpau:noforce-mixer"? That surprisingly works to some degree... Carl Eugen
On Wed, May 29, 2013 at 12:57:36PM +0000, Carl Eugen Hoyos wrote:
reimar <subversion <at> mplayerhq.hu> writes:
Try to support -monitor-orientation with VDPAU.
It doesn't work on my system with a radeon card, though maybe that feature just isn't implemented.
It does not work here either on Nvidia, could you test "-vf format=bgra -vo vdpau:noforce-mixer"? That surprisingly works to some degree...
Well, the video mixer does not have rotation support, so it seems that command line is the only way it can work. However VDPAU in Mesa doesn't implement rotate at all. How what does "works to some degree" look like? I expect the OSD will look really funny, but without something to test with it's a bit hard to know or fix (yes, I might at some point make another try and put the old NVidia card in).
On Thu, Jun 06, 2013 at 03:21:27PM +0200, Reimar Döffinger wrote:
On Wed, May 29, 2013 at 12:57:36PM +0000, Carl Eugen Hoyos wrote:
reimar <subversion <at> mplayerhq.hu> writes:
Try to support -monitor-orientation with VDPAU.
It doesn't work on my system with a radeon card, though maybe that feature just isn't implemented.
It does not work here either on Nvidia, could you test "-vf format=bgra -vo vdpau:noforce-mixer"? That surprisingly works to some degree...
Well, the video mixer does not have rotation support, so it seems that command line is the only way it can work. However VDPAU in Mesa doesn't implement rotate at all. How what does "works to some degree" look like? I expect the OSD will look really funny, but without something to test with it's a bit hard to know or fix (yes, I might at some point make another try and put the old NVidia card in).
Ping, could you describe the current state?
Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> writes:
Try to support -monitor-orientation with VDPAU.
It doesn't work on my system with a radeon card, though maybe that feature just isn't implemented.
It does not work here either on Nvidia, could you test "-vf format=bgra -vo vdpau:noforce-mixer"? That surprisingly works to some degree...
Well, the video mixer does not have rotation support, so it seems that command line is the only way it can work. However VDPAU in Mesa doesn't implement rotate at all. How what does "works to some degree" look like? I expect the OSD will look really funny, but without something to test with it's a bit hard to know or fix (yes, I might at some point make another try and put the old NVidia card in).
It works better now (no more flickering), OSD and subtitles are broken (unreadable), aspect ratio is slightly wrong afaict and in fullscreen the background is not black (that used to work at some point afaict). Sorry for the delay, Carl Eugen
On 15.06.2013, at 19:50, Carl Eugen Hoyos <cehoyos@ag.or.at> wrote:
Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> writes:
Try to support -monitor-orientation with VDPAU.
It doesn't work on my system with a radeon card, though maybe that feature just isn't implemented.
It does not work here either on Nvidia, could you test "-vf format=bgra -vo vdpau:noforce-mixer"? That surprisingly works to some degree...
Well, the video mixer does not have rotation support, so it seems that command line is the only way it can work. However VDPAU in Mesa doesn't implement rotate at all. How what does "works to some degree" look like? I expect the OSD will look really funny, but without something to test with it's a bit hard to know or fix (yes, I might at some point make another try and put the old NVidia card in).
It works better now (no more flickering), OSD and subtitles are broken (unreadable),
Is the OSD broken in general or only with rotation? It works on the Mesa implementation without rotation, and with rotation it's expected not to work for the moment I think.
aspect ratio is slightly wrong afaict and in fullscreen the background is not black (that used to work at some point afaict).
Is it fixed? I couldn't notice since Mesa doesn't implement the NULL size tricks to clear a surface.
Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> writes:
It works better now (no more flickering), OSD and subtitles are broken (unreadable),
Is the OSD broken in general or only with rotation?
1 and 3 are broken, 0 and 2 work fine, apart from the fact that 2 has "over" titles and osd on the "bottom" (on the top of the rotated video).
It works on the Mesa implementation without rotation, and with rotation it's expected not to work for the moment I think.
aspect ratio is slightly wrong
afaict and in fullscreen the background is not black (that used to work at some point afaict).
Is it fixed?
Yes, thank you! Carl Eugen
Carl Eugen Hoyos <cehoyos <at> ag.or.at> writes:
It works better now (no more flickering), OSD and subtitles are broken (unreadable),
Is the OSD broken in general or only with rotation?
1 and 3 are broken
It actually does "work" but the text is scaled incorrectly, making it unreadable. Carl Eugen
participants (3)
-
Carl Eugen Hoyos -
reimar -
Reimar Döffinger