Commit 9e369fcb authored by Steve Lhomme's avatar Steve Lhomme
Browse files

display: rotate the source format rather than temporary output format

The temporary and output format are the same at this stage.

It also shows potential that might need some attention when vd->source changes in push.
parent bedc4562
......@@ -248,7 +248,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
/* */
video_format_t fmt;
video_format_ApplyRotation(&fmt, fmtp);
video_format_ApplyRotation(&fmt, vd->source);
if (sys->chroma) {
fmt.i_chroma = sys->chroma;
......
......@@ -725,7 +725,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
return VLC_EGENERIC;
}
video_format_ApplyRotation(&fmt, fmtp);
video_format_ApplyRotation(&fmt, vd->source);
fmt.i_width = fmt.i_visible_width = sys->width;
fmt.i_height = fmt.i_visible_height = sys->height;
......
......@@ -169,7 +169,7 @@ static void PMThread( void *arg )
/* */
video_format_t fmt;
video_format_ApplyRotation(&fmt, fmtp);
video_format_ApplyRotation(&fmt, vd->source);
/* */
MorphToPM();
......
......@@ -133,7 +133,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
/* Define the video format */
video_format_t fmt;
video_format_ApplyRotation(&fmt, fmtp);
video_format_ApplyRotation(&fmt, vd->source);
if (setup != NULL) {
char chroma[5];
......
......@@ -219,6 +219,7 @@ static xcb_visualid_t DepthToFormat(const xcb_setup_t *setup,
static xcb_visualid_t ScreenToFormat(const xcb_setup_t *setup,
const xcb_screen_t *screen,
uint8_t *restrict bits,
const video_format_t *source,
video_format_t *restrict fmtp)
{
xcb_visualid_t visual = 0;
......@@ -236,7 +237,7 @@ static xcb_visualid_t ScreenToFormat(const xcb_setup_t *setup,
if (depth->depth <= *bits)
continue; /* no better than earlier depth */
video_format_ApplyRotation(&fmt, fmtp);
video_format_ApplyRotation(&fmt, source);
vid = DepthToFormat(setup, depth, &fmt);
if (vid != 0)
{
......@@ -273,7 +274,7 @@ static int Open (vout_display_t *vd, const vout_display_cfg_t *cfg,
const xcb_setup_t *setup = xcb_get_setup (conn);
/* Determine our pixel format */
xcb_visualid_t vid = ScreenToFormat(setup, scr, &sys->depth, fmtp);
xcb_visualid_t vid = ScreenToFormat(setup, scr, &sys->depth, vd->source, fmtp);
if (vid == 0) {
msg_Err(vd, "no supported visual & pixel format");
goto error;
......
......@@ -143,7 +143,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
/* */
video_format_t fmt;
video_format_ApplyRotation(&fmt, fmtp);
video_format_ApplyRotation(&fmt, vd->source);
fmt.i_chroma = chroma;
video_format_FixRgb(&fmt);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment