[MPlayer-dev-eng] [PATCH] video_out: fix and extend doxy for calc_src_dst_rects().

Nicolas George george at nsup.org
Wed Jan 14 10:15:33 CET 2015


---
 libvo/video_out.c | 20 ++++++++++++++++++--
 libvo/video_out.h |  4 ++++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/libvo/video_out.c b/libvo/video_out.c
index fbf9009..38f43fa 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -429,9 +429,25 @@ static void src_dst_split_scaling(int src_size, int dst_size, int scaled_src_siz
  * get a correctly scaled picture, including pan-scan.
  * Can be extended to take future cropping support into account.
  *
- * \param crop specifies the cropping border size in the left, right, top and bottom members, may be NULL
+ * \param src_width  width  of the source video
+ * \param src_height height of the source video
+ *
+ * \param src displayed rectangle in the source video,
+ *            can be less than the full image due to panscan and crop;
+ *            (left,top) and (right,bottom) are the coordinates of the extreme vertices;
+ *            width = right - left; height = bottom - top
+ *
+ * \param dst painted rectangle on the output device,
+ *            can beless than the full device due to letterbox borders;
+ *            see src above for the meaning of each field
+ *
  * \param borders the border values as e.g. EOSD (ASS) and properly placed DVD highlight support requires,
- *                may be NULL and only left and top are currently valid.
+ *                may be NULL; left, top, right and bottom are the number of pixels, in output resolution,
+ *                of each margin, like mp_eosd_settings fields ml, mt, mr and mb;
+ *                width and height are unset.
+ *
+ * \param crop specifies the cropping border size in the left, right, top and bottom members, may be NULL,
+ *             currently used by no caller
  */
 void calc_src_dst_rects(int src_width, int src_height, struct vo_rect *src, struct vo_rect *dst,
                         struct vo_rect *borders, const struct vo_rect *crop) {
diff --git a/libvo/video_out.h b/libvo/video_out.h
index 712703e..bc32884 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -285,6 +285,10 @@ int lookup_keymap_table(const struct mp_keymap *map, int key);
 struct vo_rect {
   int left, right, top, bottom, width, height;
 };
+/**
+ * Calculate the appropriate source and destination rectangle.
+ * See video_out.c for the full documentation.
+ */
 void calc_src_dst_rects(int src_width, int src_height, struct vo_rect *src, struct vo_rect *dst,
                         struct vo_rect *borders, const struct vo_rect *crop);
 void vo_mouse_movement(int posx, int posy);
-- 
2.1.4



More information about the MPlayer-dev-eng mailing list