Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
9e271e3f
Commit
9e271e3f
authored
Sep 29, 2017
by
Karthick J
Committed by
Carl Eugen Hoyos
Oct 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avdevice/decklink_dec: Used av_parity instead of duplicated function
parent
54ce880a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
decklink_dec.cpp
libavdevice/decklink_dec.cpp
+1
-9
No files found.
libavdevice/decklink_dec.cpp
View file @
9e271e3f
...
...
@@ -106,14 +106,6 @@ static int get_vanc_line_idx(BMDDisplayMode mode)
return
i
-
1
;
}
static
inline
uint16_t
parity
(
uint16_t
x
)
{
uint16_t
i
;
for
(
i
=
4
*
sizeof
(
x
);
i
>
0
;
i
/=
2
)
x
^=
x
>>
i
;
return
x
&
1
;
}
static
inline
void
clear_parity_bits
(
uint16_t
*
buf
,
int
len
)
{
int
i
;
for
(
i
=
0
;
i
<
len
;
i
++
)
...
...
@@ -126,7 +118,7 @@ static int check_vanc_parity_checksum(uint16_t *buf, int len, uint16_t checksum)
for
(
i
=
3
;
i
<
len
-
1
;
i
++
)
{
uint16_t
v
=
buf
[
i
];
int
np
=
v
>>
8
;
int
p
=
parity
(
v
&
0xff
);
int
p
=
av_
parity
(
v
&
0xff
);
if
((
!!
p
^
!!
(
v
&
0x100
))
||
(
np
!=
1
&&
np
!=
2
))
{
// Parity check failed
return
-
1
;
...
...
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