Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
6eec2a06
Commit
6eec2a06
authored
Mar 18, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transform: add transposition and anti-transposition transforms
parent
39ddd4de
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
10 deletions
+27
-10
modules/video_filter/transform.c
modules/video_filter/transform.c
+27
-10
No files found.
modules/video_filter/transform.c
View file @
6eec2a06
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000-2006 the VideoLAN team
* Copyright (C) 2000-2006 the VideoLAN team
* Copyright (C) 2010 Laurent Aimar
* Copyright (C) 2010 Laurent Aimar
*
$Id$
*
Copyright (C) 2012 Rémi Denis-Courmont
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
* Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
* Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
...
@@ -45,10 +45,12 @@ static void Close(vlc_object_t *);
...
@@ -45,10 +45,12 @@ static void Close(vlc_object_t *);
#define CFG_PREFIX "transform-"
#define CFG_PREFIX "transform-"
#define TYPE_TEXT N_("Transform type")
#define TYPE_TEXT N_("Transform type")
static
const
char
*
const
type_list
[]
=
{
"90"
,
"180"
,
"270"
,
"hflip"
,
"vflip"
};
static
const
char
*
const
type_list
[]
=
{
"90"
,
"180"
,
"270"
,
"hflip"
,
"vflip"
,
"transpose"
,
"antitranspose"
};
static
const
char
*
const
type_list_text
[]
=
{
N_
(
"Rotate by 90 degrees"
),
static
const
char
*
const
type_list_text
[]
=
{
N_
(
"Rotate by 90 degrees"
),
N_
(
"Rotate by 180 degrees"
),
N_
(
"Rotate by 270 degrees"
),
N_
(
"Rotate by 180 degrees"
),
N_
(
"Rotate by 270 degrees"
),
N_
(
"Flip horizontally"
),
N_
(
"Flip vertically"
)
};
N_
(
"Flip horizontally"
),
N_
(
"Flip vertically"
),
N_
(
"Transpose"
),
N_
(
"Anti-transpose"
)
};
vlc_module_begin
()
vlc_module_begin
()
set_description
(
N_
(
"Video transformation filter"
))
set_description
(
N_
(
"Video transformation filter"
))
...
@@ -80,6 +82,17 @@ static void VFlip(int *sx, int *sy, int w, int h, int dx, int dy)
...
@@ -80,6 +82,17 @@ static void VFlip(int *sx, int *sy, int w, int h, int dx, int dy)
*
sx
=
dx
;
*
sx
=
dx
;
*
sy
=
h
-
1
-
dy
;
*
sy
=
h
-
1
-
dy
;
}
}
static
void
Transpose
(
int
*
sx
,
int
*
sy
,
int
w
,
int
h
,
int
dx
,
int
dy
)
{
VLC_UNUSED
(
h
);
VLC_UNUSED
(
w
);
*
sx
=
dy
;
*
sy
=
dx
;
}
static
void
AntiTranspose
(
int
*
sx
,
int
*
sy
,
int
w
,
int
h
,
int
dx
,
int
dy
)
{
*
sx
=
h
-
1
-
dy
;
*
sy
=
w
-
1
-
dx
;
}
static
void
R90
(
int
*
sx
,
int
*
sy
,
int
w
,
int
h
,
int
dx
,
int
dy
)
static
void
R90
(
int
*
sx
,
int
*
sy
,
int
w
,
int
h
,
int
dx
,
int
dy
)
{
{
VLC_UNUSED
(
h
);
VLC_UNUSED
(
h
);
...
@@ -150,12 +163,14 @@ static void Plane32_##f(plane_t *restrict dst, const plane_t *restrict src) \
...
@@ -150,12 +163,14 @@ static void Plane32_##f(plane_t *restrict dst, const plane_t *restrict src) \
PLANAR
(
HFlip
)
PLANAR
(
HFlip
)
PLANAR
(
VFlip
)
PLANAR
(
VFlip
)
PLANAR
(
Transpose
)
PLANAR
(
AntiTranspose
)
PLANAR
(
R90
)
PLANAR
(
R90
)
PLANAR
(
R180
)
PLANAR
(
R180
)
PLANAR
(
R270
)
PLANAR
(
R270
)
typedef
struct
{
typedef
struct
{
char
name
[
8
];
char
name
[
16
];
bool
is_rotated
;
bool
is_rotated
;
convert_t
convert
;
convert_t
convert
;
convert_t
iconvert
;
convert_t
iconvert
;
...
@@ -173,6 +188,8 @@ static const transform_description_t descriptions[] = {
...
@@ -173,6 +188,8 @@ static const transform_description_t descriptions[] = {
DESC
(
"270"
,
true
,
R270
,
R90
),
DESC
(
"270"
,
true
,
R270
,
R90
),
DESC
(
"hflip"
,
false
,
HFlip
,
HFlip
),
DESC
(
"hflip"
,
false
,
HFlip
,
HFlip
),
DESC
(
"vflip"
,
false
,
VFlip
,
VFlip
),
DESC
(
"vflip"
,
false
,
VFlip
,
VFlip
),
DESC
(
"transpose"
,
true
,
Transpose
,
Transpose
),
DESC
(
"antitranspose"
,
true
,
AntiTranspose
,
AntiTranspose
),
};
};
static
const
size_t
n_transforms
=
static
const
size_t
n_transforms
=
...
...
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