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
0dabd329
Commit
0dabd329
authored
Apr 12, 2016
by
Alexandra Hájková
Committed by
Anton Khirnov
Nov 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcelp: Convert to the new bitstream reader
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
770406d1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
qcelpdec.c
libavcodec/qcelpdec.c
+5
-4
No files found.
libavcodec/qcelpdec.c
View file @
0dabd329
...
@@ -31,9 +31,10 @@
...
@@ -31,9 +31,10 @@
#include "libavutil/channel_layout.h"
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
#include "libavutil/float_dsp.h"
#include "avcodec.h"
#include "avcodec.h"
#include "bitstream.h"
#include "internal.h"
#include "internal.h"
#include "get_bits.h"
#include "qcelpdata.h"
#include "qcelpdata.h"
#include "celp_filters.h"
#include "celp_filters.h"
#include "acelp_filters.h"
#include "acelp_filters.h"
...
@@ -53,7 +54,7 @@ typedef enum {
...
@@ -53,7 +54,7 @@ typedef enum {
}
qcelp_packet_rate
;
}
qcelp_packet_rate
;
typedef
struct
QCELPContext
{
typedef
struct
QCELPContext
{
GetBitContext
gb
;
BitstreamContext
bc
;
qcelp_packet_rate
bitrate
;
qcelp_packet_rate
bitrate
;
QCELPFrame
frame
;
/**< unpacked data frame */
QCELPFrame
frame
;
/**< unpacked data frame */
...
@@ -718,12 +719,12 @@ static int qcelp_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -718,12 +719,12 @@ static int qcelp_decode_frame(AVCodecContext *avctx, void *data,
qcelp_unpacking_bitmaps_lengths
[
q
->
bitrate
];
qcelp_unpacking_bitmaps_lengths
[
q
->
bitrate
];
uint8_t
*
unpacked_data
=
(
uint8_t
*
)
&
q
->
frame
;
uint8_t
*
unpacked_data
=
(
uint8_t
*
)
&
q
->
frame
;
init_get_bits
(
&
q
->
gb
,
buf
,
8
*
buf_size
);
bitstream_init
(
&
q
->
bc
,
buf
,
8
*
buf_size
);
memset
(
&
q
->
frame
,
0
,
sizeof
(
QCELPFrame
));
memset
(
&
q
->
frame
,
0
,
sizeof
(
QCELPFrame
));
for
(;
bitmaps
<
bitmaps_end
;
bitmaps
++
)
for
(;
bitmaps
<
bitmaps_end
;
bitmaps
++
)
unpacked_data
[
bitmaps
->
index
]
|=
get_bits
(
&
q
->
gb
,
bitmaps
->
bitlen
)
<<
bitmaps
->
bitpos
;
unpacked_data
[
bitmaps
->
index
]
|=
bitstream_read
(
&
q
->
bc
,
bitmaps
->
bitlen
)
<<
bitmaps
->
bitpos
;
// Check for erasures/blanks on rates 1, 1/4 and 1/8.
// Check for erasures/blanks on rates 1, 1/4 and 1/8.
if
(
q
->
frame
.
reserved
)
{
if
(
q
->
frame
.
reserved
)
{
...
...
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