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
dae9b0b9
Commit
dae9b0b9
authored
Apr 09, 2016
by
Alexandra Hájková
Committed by
Anton Khirnov
Nov 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avs: Convert to the new bitstream reader
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
edd4c19a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
avs.c
libavcodec/avs.c
+5
-5
No files found.
libavcodec/avs.c
View file @
dae9b0b9
...
...
@@ -20,7 +20,7 @@
*/
#include "avcodec.h"
#include "
get_bits
.h"
#include "
bitstream
.h"
#include "internal.h"
typedef
struct
AvsContext
{
...
...
@@ -57,7 +57,7 @@ avs_decode_frame(AVCodecContext * avctx,
int
i
,
j
,
x
,
y
,
stride
,
ret
,
vect_w
=
3
,
vect_h
=
3
;
AvsVideoSubType
sub_type
;
AvsBlockType
type
;
GetBit
Context
change_map
;
Bitstream
Context
change_map
;
if
((
ret
=
ff_reget_buffer
(
avctx
,
p
))
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"reget_buffer() failed
\n
"
);
...
...
@@ -125,13 +125,13 @@ avs_decode_frame(AVCodecContext * avctx,
int
map_size
=
((
318
/
vect_w
+
7
)
/
8
)
*
(
198
/
vect_h
);
if
(
buf_end
-
table
<
map_size
)
return
AVERROR_INVALIDDATA
;
init_get_bits
(
&
change_map
,
table
,
map_size
*
8
);
bitstream_init
(
&
change_map
,
table
,
map_size
*
8
);
table
+=
map_size
;
}
for
(
y
=
0
;
y
<
198
;
y
+=
vect_h
)
{
for
(
x
=
0
;
x
<
318
;
x
+=
vect_w
)
{
if
(
sub_type
==
AVS_I_FRAME
||
get_bits1
(
&
change_map
))
{
if
(
sub_type
==
AVS_I_FRAME
||
bitstream_read_bit
(
&
change_map
))
{
if
(
buf_end
-
table
<
1
)
return
AVERROR_INVALIDDATA
;
vect
=
&
buf
[
*
table
++
*
(
vect_w
*
vect_h
)];
...
...
@@ -145,7 +145,7 @@ avs_decode_frame(AVCodecContext * avctx,
}
}
if
(
sub_type
!=
AVS_I_FRAME
)
align_get_bits
(
&
change_map
);
bitstream_align
(
&
change_map
);
}
if
((
ret
=
av_frame_ref
(
picture
,
p
))
<
0
)
...
...
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