[vlc-commits] Reverse parameters order of video_format_ApplyRotation()
Rémi Denis-Courmont
git at videolan.org
Fri Mar 14 17:25:01 CET 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Mar 14 18:14:27 2014 +0200| [6ce874111cc4168a03c3b41c078af591da90a362] | committer: Rémi Denis-Courmont
Reverse parameters order of video_format_ApplyRotation()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6ce874111cc4168a03c3b41c078af591da90a362
---
include/vlc_es.h | 2 +-
modules/video_output/sdl.c | 3 +--
modules/video_output/xcb/x11.c | 14 +++++++-------
modules/video_output/xcb/xvideo.c | 2 +-
src/misc/es_format.c | 3 ++-
src/video_output/display.c | 2 +-
src/video_output/video_output.c | 2 +-
7 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/include/vlc_es.h b/include/vlc_es.h
index 7bdd1fc..3da91e0 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -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.
diff --git a/modules/video_output/sdl.c b/modules/video_output/sdl.c
index a93f201..211ab5c 100644
--- a/modules/video_output/sdl.c
+++ b/modules/video_output/sdl.c
@@ -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;
diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index 7bdb944..c68288d 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -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;
}
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index 3216ca1..0850acd 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -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 */
diff --git a/src/misc/es_format.c b/src/misc/es_format.c
index 82961b5..69442b9 100644
--- a/src/misc/es_format.c
+++ b/src/misc/es_format.c
@@ -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;
diff --git a/src/video_output/display.c b/src/video_output/display.c
index af1cf61..4ce6d47 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -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) {
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index bd505f3..18f22ce 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -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,
More information about the vlc-commits
mailing list