]> git.sesse.net Git - vlc/commitdiff
Reverse parameters order of video_format_ApplyRotation()
authorRémi Denis-Courmont <remi@remlab.net>
Fri, 14 Mar 2014 16:14:27 +0000 (18:14 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 14 Mar 2014 16:14:45 +0000 (18:14 +0200)
include/vlc_es.h
modules/video_output/sdl.c
modules/video_output/xcb/x11.c
modules/video_output/xcb/xvideo.c
src/misc/es_format.c
src/video_output/display.c
src/video_output/video_output.c

index 7bdd1fc2c0dbc4abcea494c3df4e57ad438d2033..3da91e0fb6f0147aad7e8c8a68d212029d6e730a 100644 (file)
@@ -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.
index a93f20165933ac28848281cdae53efe732f204fa..211ab5cde101cf2110ea8075af5e4a83497b3037 100644 (file)
@@ -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;
index 7bdb944b3075204e53eb83dfd12623ec2264584b..c68288d924624c1a09fda5b484e72d803627b8fd 100644 (file)
@@ -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;
     }
 
index 3216ca1c5fa6caa987609ac77c06fc8645cdeab8..0850acdcb155bf698a323c0a34e264a731367c58 100644 (file)
@@ -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 */
index 82961b5c7ce2830834adb438733a1c0b61d76c4e..69442b93cbab8159d6b77fec921ad3bf3bbef713 100644 (file)
@@ -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;
 
index af1cf61285ed455612c8aeda6a5a1d01c7aa1aba..4ce6d47b281c0c37a18628f2ee0ab2354dd1b1cd 100644 (file)
@@ -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) {
index bd505f3ac7bb055a2d47c59432fc63b786af2156..18f22ce495e5f72519ce8ac33c6ea4c266558ceb 100644 (file)
@@ -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,