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
b37b681f
Commit
b37b681f
authored
Apr 10, 2016
by
Alexandra Hájková
Committed by
Anton Khirnov
Nov 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fraps: Convert to the new bitstream reader
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
692ba4fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
fraps.c
libavcodec/fraps.c
+5
-5
No files found.
libavcodec/fraps.c
View file @
b37b681f
...
...
@@ -32,7 +32,7 @@
*/
#include "avcodec.h"
#include "
get_bits
.h"
#include "
bitstream
.h"
#include "huffman.h"
#include "bytestream.h"
#include "bswapdsp.h"
...
...
@@ -94,7 +94,7 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
const
int
step
)
{
int
i
,
j
,
ret
;
GetBitContext
gb
;
BitstreamContext
bc
;
VLC
vlc
;
Node
nodes
[
512
];
...
...
@@ -111,10 +111,10 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
s
->
bdsp
.
bswap_buf
((
uint32_t
*
)
s
->
tmpbuf
,
(
const
uint32_t
*
)
src
,
size
>>
2
);
init_get_bits
(
&
gb
,
s
->
tmpbuf
,
size
*
8
);
bitstream_init
(
&
bc
,
s
->
tmpbuf
,
size
*
8
);
for
(
j
=
0
;
j
<
h
;
j
++
)
{
for
(
i
=
0
;
i
<
w
*
step
;
i
+=
step
)
{
dst
[
i
]
=
get_vlc2
(
&
gb
,
vlc
.
table
,
VLC_BITS
,
3
);
dst
[
i
]
=
bitstream_read_vlc
(
&
bc
,
vlc
.
table
,
VLC_BITS
,
3
);
/* lines are stored as deltas between previous lines
* and we need to add 0x80 to the first lines of chroma planes
*/
...
...
@@ -122,7 +122,7 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
dst
[
i
]
+=
dst
[
i
-
stride
];
else
if
(
Uoff
)
dst
[
i
]
+=
0x80
;
if
(
get_bits_left
(
&
gb
)
<
0
)
{
if
(
bitstream_bits_left
(
&
bc
)
<
0
)
{
ff_free_vlc
(
&
vlc
);
return
AVERROR_INVALIDDATA
;
}
...
...
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