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
f9c59f26
Commit
f9c59f26
authored
Apr 15, 2016
by
Alexandra Hájková
Committed by
Diego Biurrun
Nov 24, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wnv1: Convert to the new bitstream reader
parent
0536e7d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
wnv1.c
libavcodec/wnv1.c
+5
-5
No files found.
libavcodec/wnv1.c
View file @
f9c59f26
...
...
@@ -25,7 +25,7 @@
*/
#include "avcodec.h"
#include "
get_bits
.h"
#include "
bitstream
.h"
#include "internal.h"
#include "mathops.h"
...
...
@@ -34,7 +34,7 @@ typedef struct WNV1Context {
AVCodecContext
*
avctx
;
int
shift
;
GetBitContext
gb
;
BitstreamContext
bc
;
}
WNV1Context
;
static
const
uint16_t
code_tab
[
16
][
2
]
=
{
...
...
@@ -49,10 +49,10 @@ static VLC code_vlc;
/* returns modified base_value */
static
inline
int
wnv1_get_code
(
WNV1Context
*
w
,
int
base_value
)
{
int
v
=
get_vlc2
(
&
w
->
gb
,
code_vlc
.
table
,
CODE_VLC_BITS
,
1
);
int
v
=
bitstream_read_vlc
(
&
w
->
bc
,
code_vlc
.
table
,
CODE_VLC_BITS
,
1
);
if
(
v
==
15
)
return
ff_reverse
[
get_bits
(
&
w
->
gb
,
8
-
w
->
shift
)];
return
ff_reverse
[
bitstream_read
(
&
w
->
bc
,
8
-
w
->
shift
)];
else
return
base_value
+
((
v
-
7
)
<<
w
->
shift
);
}
...
...
@@ -90,7 +90,7 @@ static int decode_frame(AVCodecContext *avctx,
for
(
i
=
8
;
i
<
buf_size
;
i
++
)
rbuf
[
i
]
=
ff_reverse
[
buf
[
i
]];
init_get_bits
(
&
l
->
gb
,
rbuf
+
8
,
(
buf_size
-
8
)
*
8
);
bitstream_init
(
&
l
->
bc
,
rbuf
+
8
,
(
buf_size
-
8
)
*
8
);
if
(
buf
[
2
]
>>
4
==
6
)
l
->
shift
=
2
;
...
...
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