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
dee6dde6
Commit
dee6dde6
authored
Apr 25, 2005
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoid unneeded clear_blocks()
Originally committed as revision 4157 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
f9e0f2a2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
6 deletions
+21
-6
h261.c
libavcodec/h261.c
+4
-2
h263.c
libavcodec/h263.c
+12
-1
h263dec.c
libavcodec/h263dec.c
+1
-2
msmpeg4.c
libavcodec/msmpeg4.c
+2
-0
rv10.c
libavcodec/rv10.c
+0
-1
wmv2.c
libavcodec/wmv2.c
+2
-0
No files found.
libavcodec/h261.c
View file @
dee6dde6
...
...
@@ -531,7 +531,6 @@ static int h261_decode_mb_skipped(H261Context *h, int mba1, int mba2 )
xy
=
s
->
mb_x
+
s
->
mb_y
*
s
->
mb_stride
;
ff_init_block_index
(
s
);
ff_update_block_index
(
s
);
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
for
(
j
=
0
;
j
<
6
;
j
++
)
s
->
block_last_index
[
j
]
=
-
1
;
...
...
@@ -606,7 +605,6 @@ static int h261_decode_mb(H261Context *h){
xy
=
s
->
mb_x
+
s
->
mb_y
*
s
->
mb_stride
;
ff_init_block_index
(
s
);
ff_update_block_index
(
s
);
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
// Read mtype
h
->
mtype
=
get_vlc2
(
&
s
->
gb
,
h261_mtype_vlc
.
table
,
H261_MTYPE_VLC_BITS
,
2
);
...
...
@@ -661,12 +659,16 @@ static int h261_decode_mb(H261Context *h){
intra
:
/* decode each block */
if
(
s
->
mb_intra
||
HAS_CBP
(
h
->
mtype
)){
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
for
(
i
=
0
;
i
<
6
;
i
++
)
{
if
(
h261_decode_block
(
h
,
s
->
block
[
i
],
i
,
cbp
&
32
)
<
0
){
return
SLICE_ERROR
;
}
cbp
+=
cbp
;
}
}
else
{
for
(
i
=
0
;
i
<
6
;
i
++
)
s
->
block_last_index
[
i
]
=
-
1
;
}
MPV_decode_mb
(
s
,
s
->
block
);
...
...
libavcodec/h263.c
View file @
dee6dde6
...
...
@@ -3753,6 +3753,7 @@ static int mpeg4_decode_partitioned_mb(MpegEncContext *s, DCTELEM block[6][64])
if
(
!
IS_SKIP
(
mb_type
))
{
int
i
;
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
/* decode each block */
for
(
i
=
0
;
i
<
6
;
i
++
)
{
if
(
mpeg4_decode_block
(
s
,
block
[
i
],
i
,
cbp
&
32
,
s
->
mb_intra
,
s
->
rvlc
)
<
0
){
...
...
@@ -3921,6 +3922,8 @@ int ff_h263_decode_mb(MpegEncContext *s,
}
}
while
(
cbpc
==
20
);
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
dquant
=
cbpc
&
8
;
s
->
mb_intra
=
((
cbpc
&
4
)
!=
0
);
if
(
s
->
mb_intra
)
goto
intra
;
...
...
@@ -4024,6 +4027,7 @@ int ff_h263_decode_mb(MpegEncContext *s,
s
->
mb_intra
=
IS_INTRA
(
mb_type
);
if
(
HAS_CBP
(
mb_type
)){
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
cbpc
=
get_vlc2
(
&
s
->
gb
,
cbpc_b_vlc
.
table
,
CBPC_B_VLC_BITS
,
1
);
if
(
s
->
mb_intra
){
dquant
=
IS_QUANT
(
mb_type
);
...
...
@@ -4102,6 +4106,8 @@ int ff_h263_decode_mb(MpegEncContext *s,
}
}
while
(
cbpc
==
8
);
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
dquant
=
cbpc
&
4
;
s
->
mb_intra
=
1
;
intra
:
...
...
@@ -4193,6 +4199,7 @@ int ff_mpeg4_decode_mb(MpegEncContext *s,
}
}
while
(
cbpc
==
20
);
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
dquant
=
cbpc
&
8
;
s
->
mb_intra
=
((
cbpc
&
4
)
!=
0
);
if
(
s
->
mb_intra
)
goto
intra
;
...
...
@@ -4324,7 +4331,10 @@ int ff_mpeg4_decode_mb(MpegEncContext *s,
}
mb_type
=
mb_type_b_map
[
mb_type
];
if
(
modb2
)
cbp
=
0
;
else
cbp
=
get_bits
(
&
s
->
gb
,
6
);
else
{
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
cbp
=
get_bits
(
&
s
->
gb
,
6
);
}
if
((
!
IS_DIRECT
(
mb_type
))
&&
cbp
)
{
if
(
get_bits1
(
&
s
->
gb
)){
...
...
@@ -4442,6 +4452,7 @@ intra:
if
(
!
s
->
progressive_sequence
)
s
->
interlaced_dct
=
get_bits1
(
&
s
->
gb
);
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
/* decode each block */
for
(
i
=
0
;
i
<
6
;
i
++
)
{
if
(
mpeg4_decode_block
(
s
,
block
[
i
],
i
,
cbp
&
32
,
1
,
0
)
<
0
)
...
...
libavcodec/h263dec.c
View file @
dee6dde6
...
...
@@ -195,8 +195,7 @@ static int decode_slice(MpegEncContext *s){
}
/* DCT & quantize */
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
s
->
mv_dir
=
MV_DIR_FORWARD
;
s
->
mv_type
=
MV_TYPE_16X16
;
// s->mb_skipped = 0;
...
...
libavcodec/msmpeg4.c
View file @
dee6dde6
...
...
@@ -1552,6 +1552,7 @@ static int msmpeg4v12_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
}
}
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
for
(
i
=
0
;
i
<
6
;
i
++
)
{
if
(
msmpeg4_decode_block
(
s
,
block
[
i
],
i
,
(
cbp
>>
(
5
-
i
))
&
1
,
NULL
)
<
0
)
{
...
...
@@ -1644,6 +1645,7 @@ static int msmpeg4v34_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
}
}
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
for
(
i
=
0
;
i
<
6
;
i
++
)
{
if
(
msmpeg4_decode_block
(
s
,
block
[
i
],
i
,
(
cbp
>>
(
5
-
i
))
&
1
,
NULL
)
<
0
)
{
...
...
libavcodec/rv10.c
View file @
dee6dde6
...
...
@@ -669,7 +669,6 @@ static int rv10_decode_packet(AVCodecContext *avctx,
printf
(
"**mb x=%d y=%d
\n
"
,
s
->
mb_x
,
s
->
mb_y
);
#endif
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
s
->
mv_dir
=
MV_DIR_FORWARD
;
s
->
mv_type
=
MV_TYPE_16X16
;
ret
=
ff_h263_decode_mb
(
s
,
s
->
block
);
...
...
libavcodec/wmv2.c
View file @
dee6dde6
...
...
@@ -760,6 +760,7 @@ static int wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
wmv2_pred_motion
(
w
,
&
mx
,
&
my
);
if
(
cbp
){
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
if
(
s
->
per_mb_rl_table
){
s
->
rl_table_index
=
decode012
(
&
s
->
gb
);
s
->
rl_chroma_table_index
=
s
->
rl_table_index
;
...
...
@@ -802,6 +803,7 @@ static int wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
s
->
rl_chroma_table_index
=
s
->
rl_table_index
;
}
s
->
dsp
.
clear_blocks
(
s
->
block
[
0
]);
for
(
i
=
0
;
i
<
6
;
i
++
)
{
if
(
msmpeg4_decode_block
(
s
,
block
[
i
],
i
,
(
cbp
>>
(
5
-
i
))
&
1
,
NULL
)
<
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