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
70efd101
Commit
70efd101
authored
Jun 12, 2009
by
Vladimir Voroshilov
Committed by
Michael Niedermayer
Sep 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add packet_type
parent
50cad256
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
g729dec.c
libavcodec/g729dec.c
+9
-0
No files found.
libavcodec/g729dec.c
View file @
70efd101
...
...
@@ -71,6 +71,12 @@
*/
#define SHARP_MAX 13017
typedef
enum
{
FORMAT_G729_8K
=
0
,
FORMAT_G729D_6K4
,
FORMAT_COUNT
,
}
G729Formats
;
typedef
struct
{
uint8_t
ac_index_bits
[
2
];
///< adaptive codebook index for second subframe (size in bits)
uint8_t
parity_bit
;
///< parity bit for pitch delay
...
...
@@ -233,6 +239,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
int
bad_pitch
=
0
;
///< parity check failed
int
i
;
int16_t
*
tmp
;
G729Formats
packet_type
;
G729Context
*
ctx
=
avctx
->
priv_data
;
int16_t
lp
[
2
][
11
];
// (3.12)
uint8_t
ma_predictor
;
///< switched MA predictor of LSP quantizer
...
...
@@ -249,9 +256,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
if
(
buf_size
==
10
)
{
packet_type
=
FORMAT_G729_8K
;
format
=
format_g729_8k
;
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Packet type: %s
\n
"
,
"G.729 @ 8kbit/s"
);
}
else
if
(
buf_size
==
8
)
{
packet_type
=
FORMAT_G729D_6K4
;
format
=
format_g729d_6k4
;
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Packet type: %s
\n
"
,
"G.729D @ 6.4kbit/s"
);
}
else
{
...
...
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