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
3a5729ea
Commit
3a5729ea
authored
Aug 09, 2007
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use skip_bits where appropriate
Originally committed as revision 10005 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
7ae7300e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
26 deletions
+26
-26
cavsdec.c
libavcodec/cavsdec.c
+4
-4
svq3.c
libavcodec/svq3.c
+14
-14
vc1.c
libavcodec/vc1.c
+8
-8
No files found.
libavcodec/cavsdec.c
View file @
3a5729ea
...
...
@@ -432,7 +432,7 @@ static inline void check_for_slice(AVSContext *h) {
int
align
;
align
=
(
-
get_bits_count
(
gb
))
&
7
;
if
((
show_bits_long
(
gb
,
24
+
align
)
&
0xFFFFFF
)
==
0x000001
)
{
get
_bits_long
(
gb
,
24
+
align
);
skip
_bits_long
(
gb
,
24
+
align
);
h
->
stc
=
get_bits
(
gb
,
8
);
decode_slice_header
(
h
,
gb
);
}
...
...
@@ -455,7 +455,7 @@ static int decode_pic(AVSContext *h) {
return
-
1
;
ff_init_scantable
(
s
->
dsp
.
idct_permutation
,
&
h
->
scantable
,
ff_zigzag_direct
);
}
get
_bits
(
&
s
->
gb
,
16
);
//bbv_dwlay
skip
_bits
(
&
s
->
gb
,
16
);
//bbv_dwlay
if
(
h
->
stc
==
PIC_PB_START_CODE
)
{
h
->
pic_type
=
get_bits
(
&
s
->
gb
,
2
)
+
FF_I_TYPE
;
if
(
h
->
pic_type
>
FF_B_TYPE
)
{
...
...
@@ -469,7 +469,7 @@ static int decode_pic(AVSContext *h) {
}
else
{
h
->
pic_type
=
FF_I_TYPE
;
if
(
get_bits1
(
&
s
->
gb
))
get
_bits
(
&
s
->
gb
,
16
);
//time_code
skip
_bits
(
&
s
->
gb
,
16
);
//time_code
}
/* release last B frame */
if
(
h
->
picture
.
data
[
0
])
...
...
@@ -501,7 +501,7 @@ static int decode_pic(AVSContext *h) {
if
(
h
->
progressive
)
h
->
pic_structure
=
1
;
else
if
(
!
(
h
->
pic_structure
=
get_bits1
(
&
s
->
gb
)
&&
(
h
->
stc
==
PIC_PB_START_CODE
))
)
get
_bits1
(
&
s
->
gb
);
//advanced_pred_mode_disable
skip
_bits1
(
&
s
->
gb
);
//advanced_pred_mode_disable
skip_bits1
(
&
s
->
gb
);
//top_field_first
skip_bits1
(
&
s
->
gb
);
//repeat_first_field
h
->
qp_fixed
=
get_bits1
(
&
s
->
gb
);
...
...
libavcodec/svq3.c
View file @
3a5729ea
...
...
@@ -748,7 +748,7 @@ static int svq3_decode_slice_header (H264Context *h) {
i
=
(
s
->
mb_num
<
64
)
?
6
:
(
1
+
av_log2
(
s
->
mb_num
-
1
));
s
->
mb_skip_run
=
get_bits
(
&
s
->
gb
,
i
)
-
(
s
->
mb_x
+
(
s
->
mb_y
*
s
->
mb_width
));
}
else
{
get
_bits1
(
&
s
->
gb
);
skip
_bits1
(
&
s
->
gb
);
s
->
mb_skip_run
=
0
;
}
...
...
@@ -757,17 +757,17 @@ static int svq3_decode_slice_header (H264Context *h) {
s
->
adaptive_quant
=
get_bits1
(
&
s
->
gb
);
/* unknown fields */
get
_bits1
(
&
s
->
gb
);
skip
_bits1
(
&
s
->
gb
);
if
(
h
->
unknown_svq3_flag
)
{
get
_bits1
(
&
s
->
gb
);
skip
_bits1
(
&
s
->
gb
);
}
get
_bits1
(
&
s
->
gb
);
get
_bits
(
&
s
->
gb
,
2
);
skip
_bits1
(
&
s
->
gb
);
skip
_bits
(
&
s
->
gb
,
2
);
while
(
get_bits1
(
&
s
->
gb
))
{
get
_bits
(
&
s
->
gb
,
8
);
skip
_bits
(
&
s
->
gb
,
8
);
}
/* reset intra predictors and invalidate motion vector references */
...
...
@@ -834,26 +834,26 @@ static int svq3_decode_frame (AVCodecContext *avctx,
/* 'frame size code' and optional 'width, height' */
if
(
get_bits
(
&
gb
,
3
)
==
7
)
{
get
_bits
(
&
gb
,
12
);
get
_bits
(
&
gb
,
12
);
skip
_bits
(
&
gb
,
12
);
skip
_bits
(
&
gb
,
12
);
}
h
->
halfpel_flag
=
get_bits1
(
&
gb
);
h
->
thirdpel_flag
=
get_bits1
(
&
gb
);
/* unknown fields */
get
_bits1
(
&
gb
);
get
_bits1
(
&
gb
);
get
_bits1
(
&
gb
);
get
_bits1
(
&
gb
);
skip
_bits1
(
&
gb
);
skip
_bits1
(
&
gb
);
skip
_bits1
(
&
gb
);
skip
_bits1
(
&
gb
);
s
->
low_delay
=
get_bits1
(
&
gb
);
/* unknown field */
get
_bits1
(
&
gb
);
skip
_bits1
(
&
gb
);
while
(
get_bits1
(
&
gb
))
{
get
_bits
(
&
gb
,
8
);
skip
_bits
(
&
gb
,
8
);
}
h
->
unknown_svq3_flag
=
get_bits1
(
&
gb
);
...
...
libavcodec/vc1.c
View file @
3a5729ea
...
...
@@ -913,7 +913,7 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
v
->
interlace
=
get_bits1
(
gb
);
v
->
tfcntrflag
=
get_bits1
(
gb
);
v
->
finterpflag
=
get_bits1
(
gb
);
get
_bits1
(
gb
);
// reserved
skip
_bits1
(
gb
);
// reserved
v
->
s
.
h_edge_pos
=
v
->
s
.
avctx
->
coded_width
;
v
->
s
.
v_edge_pos
=
v
->
s
.
avctx
->
coded_height
;
...
...
@@ -975,11 +975,11 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
if
(
v
->
hrd_param_flag
)
{
int
i
;
v
->
hrd_num_leaky_buckets
=
get_bits
(
gb
,
5
);
get
_bits
(
gb
,
4
);
//bitrate exponent
get
_bits
(
gb
,
4
);
//buffer size exponent
skip
_bits
(
gb
,
4
);
//bitrate exponent
skip
_bits
(
gb
,
4
);
//buffer size exponent
for
(
i
=
0
;
i
<
v
->
hrd_num_leaky_buckets
;
i
++
)
{
get
_bits
(
gb
,
16
);
//hrd_rate[n]
get
_bits
(
gb
,
16
);
//hrd_buffer[n]
skip
_bits
(
gb
,
16
);
//hrd_rate[n]
skip
_bits
(
gb
,
16
);
//hrd_buffer[n]
}
}
return
0
;
...
...
@@ -1005,7 +1005,7 @@ static int decode_entry_point(AVCodecContext *avctx, GetBitContext *gb)
if
(
v
->
hrd_param_flag
){
for
(
i
=
0
;
i
<
v
->
hrd_num_leaky_buckets
;
i
++
)
{
get
_bits
(
gb
,
8
);
//hrd_full[n]
skip
_bits
(
gb
,
8
);
//hrd_full[n]
}
}
...
...
@@ -1059,7 +1059,7 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
}
}
if
(
v
->
s
.
pict_type
==
I_TYPE
||
v
->
s
.
pict_type
==
BI_TYPE
)
get
_bits
(
gb
,
7
);
// skip buffer fullness
skip
_bits
(
gb
,
7
);
// skip buffer fullness
/* calculate RND */
if
(
v
->
s
.
pict_type
==
I_TYPE
||
v
->
s
.
pict_type
==
BI_TYPE
)
...
...
@@ -1278,7 +1278,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
return
0
;
}
if
(
v
->
tfcntrflag
)
get
_bits
(
gb
,
8
);
skip
_bits
(
gb
,
8
);
if
(
v
->
broadcast
)
{
if
(
!
v
->
interlace
||
v
->
psf
)
{
v
->
rptfrm
=
get_bits
(
gb
,
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