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
fea90e94
Commit
fea90e94
authored
Dec 08, 2019
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libavcodec/vc1: Remove bits variable
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
32fb9198
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
14 deletions
+8
-14
mss2.c
libavcodec/mss2.c
+0
-2
vc1.h
libavcodec/vc1.h
+0
-2
vc1_block.c
libavcodec/vc1_block.c
+8
-8
vc1dec.c
libavcodec/vc1dec.c
+0
-2
No files found.
libavcodec/mss2.c
View file @
fea90e94
...
...
@@ -412,8 +412,6 @@ static int decode_wmv9(AVCodecContext *avctx, const uint8_t *buf, int buf_size,
ff_mpeg_er_frame_start
(
s
);
v
->
bits
=
buf_size
*
8
;
v
->
end_mb_x
=
(
w
+
15
)
>>
4
;
s
->
end_mb_y
=
(
h
+
15
)
>>
4
;
if
(
v
->
respic
&
1
)
...
...
libavcodec/vc1.h
View file @
fea90e94
...
...
@@ -176,8 +176,6 @@ typedef struct VC1Context{
H264ChromaContext
h264chroma
;
VC1DSPContext
vc1dsp
;
int
bits
;
/** Simple/Main Profile sequence header */
//@{
int
res_sprite
;
///< reserved, sprite mode
...
...
libavcodec/vc1_block.c
View file @
fea90e94
...
...
@@ -2632,10 +2632,10 @@ static void vc1_decode_i_blocks(VC1Context *v)
if
(
v
->
s
.
loop_filter
)
ff_vc1_i_loop_filter
(
v
);
if
(
get_bits_
count
(
&
s
->
gb
)
>
v
->
bits
)
{
if
(
get_bits_
left
(
&
s
->
gb
)
<
0
)
{
ff_er_add_slice
(
&
s
->
er
,
0
,
0
,
s
->
mb_x
,
s
->
mb_y
,
ER_MB_ERROR
);
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Bits overconsumption: %i > %i
\n
"
,
get_bits_count
(
&
s
->
gb
),
v
->
bits
);
get_bits_count
(
&
s
->
gb
),
s
->
gb
.
size_in_
bits
);
return
;
}
...
...
@@ -2778,11 +2778,11 @@ static int vc1_decode_i_blocks_adv(VC1Context *v)
if
(
v
->
s
.
loop_filter
)
ff_vc1_i_loop_filter
(
v
);
if
(
get_bits_
count
(
&
s
->
gb
)
>
v
->
bits
)
{
if
(
get_bits_
left
(
&
s
->
gb
)
<
0
)
{
// TODO: may need modification to handle slice coding
ff_er_add_slice
(
&
s
->
er
,
0
,
s
->
start_mb_y
,
s
->
mb_x
,
s
->
mb_y
,
ER_MB_ERROR
);
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Bits overconsumption: %i > %i
\n
"
,
get_bits_count
(
&
s
->
gb
),
v
->
bits
);
get_bits_count
(
&
s
->
gb
),
s
->
gb
.
size_in_
bits
);
return
0
;
}
inc_blk_idx
(
v
->
topleft_blk_idx
);
...
...
@@ -2862,11 +2862,11 @@ static void vc1_decode_p_blocks(VC1Context *v)
if
(
apply_loop_filter
)
ff_vc1_p_loop_filter
(
v
);
}
if
(
get_bits_
count
(
&
s
->
gb
)
>
v
->
bits
||
get_bits_count
(
&
s
->
gb
)
<
0
)
{
if
(
get_bits_
left
(
&
s
->
gb
)
<
0
||
get_bits_count
(
&
s
->
gb
)
<
0
)
{
// TODO: may need modification to handle slice coding
ff_er_add_slice
(
&
s
->
er
,
0
,
s
->
start_mb_y
,
s
->
mb_x
,
s
->
mb_y
,
ER_MB_ERROR
);
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Bits overconsumption: %i > %i at %ix%i
\n
"
,
get_bits_count
(
&
s
->
gb
),
v
->
bits
,
s
->
mb_x
,
s
->
mb_y
);
get_bits_count
(
&
s
->
gb
),
s
->
gb
.
size_in_
bits
,
s
->
mb_x
,
s
->
mb_y
);
return
;
}
inc_blk_idx
(
v
->
topleft_blk_idx
);
...
...
@@ -2951,11 +2951,11 @@ static void vc1_decode_b_blocks(VC1Context *v)
if
(
v
->
s
.
loop_filter
)
ff_vc1_i_loop_filter
(
v
);
}
if
(
get_bits_
count
(
&
s
->
gb
)
>
v
->
bits
||
get_bits_count
(
&
s
->
gb
)
<
0
)
{
if
(
get_bits_
left
(
&
s
->
gb
)
<
0
||
get_bits_count
(
&
s
->
gb
)
<
0
)
{
// TODO: may need modification to handle slice coding
ff_er_add_slice
(
&
s
->
er
,
0
,
s
->
start_mb_y
,
s
->
mb_x
,
s
->
mb_y
,
ER_MB_ERROR
);
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Bits overconsumption: %i > %i at %ix%i
\n
"
,
get_bits_count
(
&
s
->
gb
),
v
->
bits
,
s
->
mb_x
,
s
->
mb_y
);
get_bits_count
(
&
s
->
gb
),
s
->
gb
.
size_in_
bits
,
s
->
mb_x
,
s
->
mb_y
);
return
;
}
}
...
...
libavcodec/vc1dec.c
View file @
fea90e94
...
...
@@ -1038,7 +1038,6 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
ff_mpeg_er_frame_start
(
s
);
v
->
bits
=
FFMIN
(
buf_size
*
8
,
s
->
gb
.
size_in_bits
);
v
->
end_mb_x
=
s
->
mb_width
;
if
(
v
->
field_mode
)
{
s
->
current_picture
.
f
->
linesize
[
0
]
<<=
1
;
...
...
@@ -1114,7 +1113,6 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
ff_vc1_decode_blocks
(
v
);
if
(
i
!=
n_slices
)
{
s
->
gb
=
slices
[
i
].
gb
;
v
->
bits
=
FFMIN
(
buf_size
*
8
,
s
->
gb
.
size_in_bits
);
}
}
if
(
v
->
field_mode
)
{
...
...
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