[MPlayer-cvslog] r36283 - in trunk: DOCS/man/en/mplayer.1 libvo/video_out.c

reimar subversion at mplayerhq.hu
Sat May 25 09:43:22 CEST 2013


Author: reimar
Date: Sat May 25 09:43:22 2013
New Revision: 36283

Log:
border_pos support for a few more vos.

Modified:
   trunk/libvo/video_out.c

Changes in other areas also in this revision:
Modified:
   trunk/DOCS/man/en/mplayer.1

Modified: trunk/libvo/video_out.c
==============================================================================
--- trunk/libvo/video_out.c	Sat May 25 08:54:41 2013	(r36282)
+++ trunk/libvo/video_out.c	Sat May 25 09:43:22 2013	(r36283)
@@ -406,6 +406,7 @@ int lookup_keymap_table(const struct mp_
  *        and destination rectangle like Direct3D and VDPAU
  */
 static void src_dst_split_scaling(int src_size, int dst_size, int scaled_src_size,
+                                  float bpos,
                                   int *src_start, int *src_end, int *dst_start, int *dst_end) {
   if (scaled_src_size > dst_size) {
     int border = src_size * (scaled_src_size - dst_size) / scaled_src_size;
@@ -418,7 +419,7 @@ static void src_dst_split_scaling(int sr
   } else {
     *src_start = 0;
     *src_end   = src_size;
-    *dst_start = (dst_size - scaled_src_size) / 2;
+    *dst_start = apply_border_pos(dst_size, scaled_src_size, bpos);
     *dst_end   = *dst_start + scaled_src_size;
   }
 }
@@ -455,12 +456,12 @@ void calc_src_dst_rects(int src_width, i
     scaled_width  += vo_panscan_x;
     scaled_height += vo_panscan_y;
     if (borders) {
-      borders->left = (vo_dwidth  - scaled_width ) / 2;
-      borders->top  = (vo_dheight - scaled_height) / 2;
+      borders->left = apply_border_pos(vo_dwidth,  scaled_width,  vo_border_pos_x);
+      borders->top  = apply_border_pos(vo_dheight, scaled_height, vo_border_pos_y);
     }
-    src_dst_split_scaling(src_width, vo_dwidth, scaled_width,
+    src_dst_split_scaling(src_width, vo_dwidth, scaled_width, vo_border_pos_x,
                           &src->left, &src->right, &dst->left, &dst->right);
-    src_dst_split_scaling(src_height, vo_dheight, scaled_height,
+    src_dst_split_scaling(src_height, vo_dheight, scaled_height, vo_border_pos_y,
                           &src->top, &src->bottom, &dst->top, &dst->bottom);
   }
   src->left += crop->left; src->right  += crop->left;


More information about the MPlayer-cvslog mailing list