* This function "normalizes" the formats orientation, by switching the a/r according to the orientation,
* producing a format whose orientation is ORIENT_NORMAL. It makes a shallow copy (pallette is not alloc'ed).
*/
-VLC_API void video_format_ApplyRotation(const video_format_t * restrict in, video_format_t * restrict out);
+VLC_API void video_format_ApplyRotation(video_format_t *restrict out, const video_format_t *restrict in);
/**
* This function applies the transform operation to fmt.
sys->desktop_height = SDL_GetVideoInfo()->current_h;
/* */
- video_format_t fmt = vd->fmt;
+ video_format_t fmt;
video_format_ApplyRotation(&fmt, &vd->fmt);
- fmt = vd->fmt;
/* */
vout_display_info_t info = vd->info;
if (fmt->depth <= sys->depth)
continue; /* no better than earlier format */
- video_format_ApplyRotation(&vd->fmt, &fmt_pic);
+ video_format_ApplyRotation(&fmt_pic, &vd->fmt);
/* Check that the pixmap format is supported by VLC. */
switch (fmt->depth)
vout_display_place_t place;
vout_display_PlacePicture (&place, &vd->source, vd->cfg, false);
- video_format_t source_rot;
- video_format_ApplyRotation(&vd->source, &source_rot);
+ video_format_t src;
+ video_format_ApplyRotation(&src, &vd->source);
- vd->fmt.i_width = source_rot.i_width * place.width / source_rot.i_visible_width;
- vd->fmt.i_height = source_rot.i_height * place.height / source_rot.i_visible_height;
+ vd->fmt.i_width = src.i_width * place.width / src.i_visible_width;
+ vd->fmt.i_height = src.i_height * place.height / src.i_visible_height;
vd->fmt.i_visible_width = place.width;
vd->fmt.i_visible_height = place.height;
- vd->fmt.i_x_offset = source_rot.i_x_offset * place.width / source_rot.i_visible_width;
- vd->fmt.i_y_offset = source_rot.i_y_offset * place.height / source_rot.i_visible_height;
+ vd->fmt.i_x_offset = src.i_x_offset * place.width / src.i_visible_width;
+ vd->fmt.i_y_offset = src.i_y_offset * place.height / src.i_visible_height;
return VLC_SUCCESS;
}
continue;
/* Look for an image format */
- video_format_ApplyRotation(&vd->fmt, &fmt);
+ video_format_ApplyRotation(&fmt, &vd->fmt);
free (p_sys->att);
p_sys->att = FindFormat (obj, conn, &fmt, a, &p_sys->id);
if (p_sys->att == NULL) /* No acceptable image formats */
fmt->orientation = dst_orient;
}
-void video_format_ApplyRotation( const video_format_t * restrict in, video_format_t * restrict out )
+void video_format_ApplyRotation( video_format_t *restrict out,
+ const video_format_t *restrict in )
{
*out = *in;
unsigned display_height;
video_format_t source_rot;
- video_format_ApplyRotation(source, &source_rot);
+ video_format_ApplyRotation(&source_rot, source);
source = &source_rot;
if (cfg->is_display_filled) {
}
video_format_t fmt_spu_rot;
- video_format_ApplyRotation(&fmt_spu, &fmt_spu_rot);
+ video_format_ApplyRotation(&fmt_spu_rot, &fmt_spu);
subpicture_t *subpic = spu_Render(vout->p->spu,
subpicture_chromas, &fmt_spu_rot,
&vd->source,