Commit 6ce87411 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Reverse parameters order of video_format_ApplyRotation()

parent adb10cda
......@@ -282,7 +282,7 @@ VLC_API void video_format_ScaleCropAr( video_format_t *, const video_format_t *
* 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.
......
......@@ -164,9 +164,8 @@ static int Open(vlc_object_t *object)
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;
......
......@@ -139,7 +139,7 @@ static int Open (vlc_object_t *obj)
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)
......@@ -533,16 +533,16 @@ static int Control (vout_display_t *vd, int query, va_list ap)
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;
}
......
......@@ -441,7 +441,7 @@ static int Open (vlc_object_t *obj)
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 */
......
......@@ -410,7 +410,8 @@ void video_format_TransformBy( video_format_t *fmt, video_transform_t transform
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;
......
......@@ -222,7 +222,7 @@ void vout_display_PlacePicture(vout_display_place_t *place,
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) {
......
......@@ -971,7 +971,7 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
}
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,
......
Markdown is supported
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