Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
a52823aa
Commit
a52823aa
authored
Apr 15, 2013
by
Vianney BOYER
Committed by
Jean-Baptiste Kempf
Apr 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Puzzle: add dedicated bezier functions
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
e219a189
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
396 additions
and
0 deletions
+396
-0
modules/video_filter/puzzle_bezier.c
modules/video_filter/puzzle_bezier.c
+353
-0
modules/video_filter/puzzle_bezier.h
modules/video_filter/puzzle_bezier.h
+43
-0
No files found.
modules/video_filter/puzzle_bezier.c
0 → 100644
View file @
a52823aa
This diff is collapsed.
Click to expand it.
modules/video_filter/puzzle_bezier.h
0 → 100644
View file @
a52823aa
/*****************************************************************************
* puzzle_bezier.h : Bezier curves management
*****************************************************************************
* Copyright (C) 2013 Vianney Boyer
* $Id$
*
* Author: Vianney Boyer <vlcvboyer -at- gmail -dot- com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLC_LIB_BEZIER_H
#define VLC_LIB_BEZIER_H 1
typedef
struct
{
float
f_x
,
f_y
;
}
point_t
;
point_t
*
puzzle_scale_curve_H
(
int32_t
i_width
,
int32_t
i_lines
,
uint8_t
i_pts_nbr
,
point_t
*
ps_pt
,
int32_t
i_shape_size
);
point_t
*
puzzle_H_2_scale_curve_V
(
int32_t
i_width
,
int32_t
i_lines
,
uint8_t
i_pts_nbr
,
point_t
*
ps_pt
,
int32_t
i_shape_size
);
point_t
*
puzzle_curve_H_2_V
(
uint8_t
i_pts_nbr
,
point_t
*
ps_pt
);
point_t
*
puzzle_curve_H_2_negative
(
uint8_t
i_pts_nbr
,
point_t
*
ps_pt
);
point_t
*
puzzle_curve_V_2_negative
(
uint8_t
i_pts_nbr
,
point_t
*
ps_pt
);
point_t
*
puzzle_rand_bezier
(
uint8_t
i_pts_nbr
);
#define bezier_val(ps_pt,f_sub_t,i_main_t,axis) (( 1 - (f_sub_t)) * ( 1 - (f_sub_t) ) * ( 1 - (f_sub_t) ) * ps_pt[ 3 * (i_main_t) ].f_ ## axis \
+ 3 * (f_sub_t) * ( 1 - (f_sub_t) ) * ( 1 - (f_sub_t) ) * ps_pt[ 3 * (i_main_t) + 1 ].f_ ## axis \
+ 3 * (f_sub_t) * (f_sub_t) * ( 1 - (f_sub_t) ) * ps_pt[ 3 * (i_main_t) + 2 ].f_ ## axis \
+ (f_sub_t) * (f_sub_t) * (f_sub_t) * ps_pt[ 3 * (i_main_t) + 3 ].f_ ## axis )
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment