1 /* GdkPixbuf library - Scaling and compositing functions
4 * Copyright (C) 2000 Red Hat, Inc
5 * Author: Owen Taylor <otaylor@redhat.com>
7 * Modification for MLT:
8 * Copyright (C) 2003-2004 Ushodaya Enterprises Limited
9 * Author: Dan Dennedy <dan@dennedy.org>
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the
23 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 * Boston, MA 02111-1307, USA.
32 /* Interpolation modes; must match GdkInterpType */
34 PIXOPS_INTERP_NEAREST
,
36 PIXOPS_INTERP_BILINEAR
,
40 /* Scale src_buf from src_width / src_height by factors scale_x, scale_y
41 * and composite the portion corresponding to
42 * render_x, render_y, render_width, render_height in the new
43 * coordinate system into dest_buf starting at 0, 0
45 void yuv422_scale (guchar
*dest_buf
,
53 const guchar
*src_buf
,
61 PixopsInterpType interp_type
);
63 #define yuv422_scale_simple( dest_buf, dest_width, dest_height, dest_rowstride, src_buf, src_width, src_height, src_rowstride, interp_type ) \
64 yuv422_scale( (dest_buf), 0, 0, \
65 (dest_width), (dest_height), \
66 (dest_rowstride), 2, 0, \
67 (src_buf), (src_width), (src_height), \
68 (src_rowstride), 2, 0, \
69 (double) (dest_width) / (src_width), (double) (dest_height) / (src_height), \
70 (PixopsInterpType) interp_type );