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
a1136ca9
Commit
a1136ca9
authored
Jan 03, 2016
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/g729dec: use ff_parity()
parent
00e96613
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
g729dec.c
libavcodec/g729dec.c
+1
-9
No files found.
libavcodec/g729dec.c
View file @
a1136ca9
...
...
@@ -180,14 +180,6 @@ static inline uint16_t g729_prng(uint16_t value)
return
31821
*
value
+
13849
;
}
/**
* Get parity bit of bit 2..7
*/
static
inline
int
get_parity
(
uint8_t
value
)
{
return
(
0x6996966996696996ULL
>>
(
value
>>
2
))
&
1
;
}
/**
* Decodes LSF (Line Spectral Frequencies) from L0-L3 (3.2.4).
* @param[out] lsfq (2.13) quantized LSF coefficients
...
...
@@ -480,7 +472,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr,
ac_index
=
get_bits
(
&
gb
,
format
->
ac_index_bits
[
i
]);
if
(
!
i
&&
format
->
parity_bit
)
bad_pitch
=
get_parity
(
ac_index
)
==
get_bits1
(
&
gb
);
bad_pitch
=
ff_parity
(
ac_index
>>
2
)
==
get_bits1
(
&
gb
);
fc_indexes
=
get_bits
(
&
gb
,
format
->
fc_indexes_bits
);
pulses_signs
=
get_bits
(
&
gb
,
format
->
fc_signs_bits
);
gc_1st_index
=
get_bits
(
&
gb
,
format
->
gc_1st_index_bits
);
...
...
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