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
d9dcc940
Commit
d9dcc940
authored
Jan 23, 2012
by
Hendrik Leppkes
Committed by
Michael Niedermayer
Jul 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vc1: implement frame interlaced b-frame header parsing
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
50bfd547
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
3 deletions
+39
-3
vc1.c
libavcodec/vc1.c
+39
-3
No files found.
libavcodec/vc1.c
View file @
d9dcc940
...
...
@@ -1143,9 +1143,14 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
}
break
;
case
AV_PICTURE_TYPE_B
:
// TODO: implement interlaced frame B picture decoding
if
(
v
->
fcm
==
ILACE_FRAME
)
if
(
v
->
fcm
==
ILACE_FRAME
)
{
v
->
bfraction_lut_index
=
get_vlc2
(
gb
,
ff_vc1_bfraction_vlc
.
table
,
VC1_BFRACTION_VLC_BITS
,
1
);
v
->
bfraction
=
ff_vc1_bfraction_lut
[
v
->
bfraction_lut_index
];
if
(
v
->
bfraction
==
0
)
{
return
-
1
;
}
return
-
1
;
// This codepath is still incomplete thus it is disabled
}
if
(
v
->
extended_mv
)
v
->
mvrange
=
get_unary
(
gb
,
0
,
3
);
else
...
...
@@ -1193,6 +1198,37 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
v
->
fourmvbp_vlc
=
&
ff_vc1_4mv_block_pattern_vlc
[
fourmvbptab
];
}
v
->
numref
=
1
;
// interlaced field B pictures are always 2-ref
}
else
if
(
v
->
fcm
==
ILACE_FRAME
)
{
if
(
v
->
extended_dmv
)
v
->
dmvrange
=
get_unary
(
gb
,
0
,
3
);
get_bits1
(
gb
);
/* intcomp - present but shall always be 0 */
v
->
intcomp
=
0
;
v
->
mv_mode
=
MV_PMODE_1MV
;
v
->
fourmvswitch
=
0
;
v
->
qs_last
=
v
->
s
.
quarter_sample
;
v
->
s
.
quarter_sample
=
1
;
v
->
s
.
mspel
=
1
;
status
=
bitplane_decoding
(
v
->
direct_mb_plane
,
&
v
->
dmb_is_raw
,
v
);
if
(
status
<
0
)
return
-
1
;
av_log
(
v
->
s
.
avctx
,
AV_LOG_DEBUG
,
"MB Direct Type plane encoding: "
"Imode: %i, Invert: %i
\n
"
,
status
>>
1
,
status
&
1
);
status
=
bitplane_decoding
(
v
->
s
.
mbskip_table
,
&
v
->
skip_is_raw
,
v
);
if
(
status
<
0
)
return
-
1
;
av_log
(
v
->
s
.
avctx
,
AV_LOG_DEBUG
,
"MB Skip plane encoding: "
"Imode: %i, Invert: %i
\n
"
,
status
>>
1
,
status
&
1
);
mbmodetab
=
get_bits
(
gb
,
2
);
v
->
mbmode_vlc
=
&
ff_vc1_intfr_non4mv_mbmode_vlc
[
mbmodetab
];
imvtab
=
get_bits
(
gb
,
2
);
v
->
imv_vlc
=
&
ff_vc1_1ref_mvdata_vlc
[
imvtab
];
// interlaced p/b-picture cbpcy range is [1, 63]
icbptab
=
get_bits
(
gb
,
3
);
v
->
cbpcy_vlc
=
&
ff_vc1_icbpcy_vlc
[
icbptab
];
twomvbptab
=
get_bits
(
gb
,
2
);
v
->
twomvbp_vlc
=
&
ff_vc1_2mv_block_pattern_vlc
[
twomvbptab
];
fourmvbptab
=
get_bits
(
gb
,
2
);
v
->
fourmvbp_vlc
=
&
ff_vc1_4mv_block_pattern_vlc
[
fourmvbptab
];
}
else
{
v
->
mv_mode
=
get_bits1
(
gb
)
?
MV_PMODE_1MV
:
MV_PMODE_1MV_HPEL_BILIN
;
v
->
qs_last
=
v
->
s
.
quarter_sample
;
...
...
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