Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
67168973
Commit
67168973
authored
Apr 14, 2011
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factorized a bit CalculateInterlaceScore (deinterlace.c).
parent
f94ced49
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
46 deletions
+25
-46
modules/video_filter/deinterlace.c
modules/video_filter/deinterlace.c
+25
-46
No files found.
modules/video_filter/deinterlace.c
View file @
67168973
...
...
@@ -3103,6 +3103,8 @@ static int CalculateInterlaceScore( const picture_t* p_pic_top,
uint8_t
*
p_p
=
&
ngh
->
p
[
i_plane
].
p_pixels
[(
y
-
1
)
*
wn
];
/* prev line */
uint8_t
*
p_n
=
&
ngh
->
p
[
i_plane
].
p_pixels
[(
y
+
1
)
*
wn
];
/* next line */
int
x
=
0
;
/* Threshold (value from Transcode 1.1.5) */
#define T 100
#ifdef CAN_COMPILE_MMXEXT
...
...
@@ -3118,7 +3120,7 @@ static int CalculateInterlaceScore( const picture_t* p_pic_top,
static
const
mmx_t
b128
=
{
.
uq
=
0x8080808080808080ULL
};
static
const
mmx_t
bT
=
{
.
ub
=
{
T
,
T
,
T
,
T
,
T
,
T
,
T
,
T
}
};
for
(
int
x
=
0
;
x
<
w8
;
x
+=
8
)
for
(
;
x
<
w8
;
x
+=
8
)
{
movq_m2r
(
*
((
int64_t
*
)
p_c
),
mm0
);
movq_m2r
(
*
((
int64_t
*
)
p_p
),
mm1
);
...
...
@@ -3153,29 +3155,9 @@ static int CalculateInterlaceScore( const picture_t* p_pic_top,
p_p
+=
8
;
p_n
+=
8
;
}
/* Handle the width remainder if any. */
if
(
wm8
)
{
for
(
int
x
=
0
;
x
<
wm8
;
++
x
)
{
int_fast32_t
C
=
*
p_c
;
int_fast32_t
P
=
*
p_p
;
int_fast32_t
N
=
*
p_n
;
int_fast32_t
comb
=
(
P
-
C
)
*
(
N
-
C
);
if
(
comb
>
T
)
++
i_score
;
++
p_c
;
++
p_p
;
++
p_n
;
}
}
}
else
{
#endif
for
(
int
x
=
0
;
x
<
w
;
++
x
)
for
(
;
x
<
w
;
++
x
)
{
/* Worst case: need 17 bits for "comb". */
int_fast32_t
C
=
*
p_c
;
...
...
@@ -3199,9 +3181,6 @@ static int CalculateInterlaceScore( const picture_t* p_pic_top,
++
p_p
;
++
p_n
;
}
#ifdef CAN_COMPILE_MMXEXT
}
#endif
/* Now the other field - swap current and neighbour pictures */
const
picture_t
*
tmp
=
cur
;
...
...
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