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
5081f3aa
Commit
5081f3aa
authored
Nov 26, 2006
by
Kostya Shishkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
B-frames support for adv. profile
Originally committed as revision 7170 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
b8ce8f15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
2 deletions
+58
-2
vc1.c
libavcodec/vc1.c
+58
-2
No files found.
libavcodec/vc1.c
View file @
5081f3aa
...
@@ -1591,8 +1591,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
...
@@ -1591,8 +1591,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
break
;
break
;
case
1
:
case
1
:
v
->
s
.
pict_type
=
B_TYPE
;
v
->
s
.
pict_type
=
B_TYPE
;
return
-
1
;
break
;
// break;
case
2
:
case
2
:
v
->
s
.
pict_type
=
I_TYPE
;
v
->
s
.
pict_type
=
I_TYPE
;
break
;
break
;
...
@@ -1621,6 +1620,13 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
...
@@ -1621,6 +1620,13 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
if
(
v
->
interlace
)
if
(
v
->
interlace
)
v
->
uvsamp
=
get_bits1
(
gb
);
v
->
uvsamp
=
get_bits1
(
gb
);
if
(
v
->
finterpflag
)
v
->
interpfrm
=
get_bits
(
gb
,
1
);
if
(
v
->
finterpflag
)
v
->
interpfrm
=
get_bits
(
gb
,
1
);
if
(
v
->
s
.
pict_type
==
B_TYPE
)
{
v
->
bfraction
=
get_vlc2
(
gb
,
vc1_bfraction_vlc
.
table
,
VC1_BFRACTION_VLC_BITS
,
1
);
v
->
bfraction
=
vc1_bfraction_lut
[
v
->
bfraction
];
if
(
v
->
bfraction
==
0
)
{
v
->
s
.
pict_type
=
BI_TYPE
;
/* XXX: should not happen here */
}
}
pqindex
=
get_bits
(
gb
,
5
);
pqindex
=
get_bits
(
gb
,
5
);
v
->
pqindex
=
pqindex
;
v
->
pqindex
=
pqindex
;
if
(
v
->
quantizer_mode
==
QUANT_FRAME_IMPLICIT
)
if
(
v
->
quantizer_mode
==
QUANT_FRAME_IMPLICIT
)
...
@@ -1747,6 +1753,56 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
...
@@ -1747,6 +1753,56 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
v
->
ttfrm
=
TT_8X8
;
v
->
ttfrm
=
TT_8X8
;
}
}
break
;
break
;
case
B_TYPE
:
if
(
v
->
postprocflag
)
v
->
postproc
=
get_bits1
(
gb
);
if
(
v
->
extended_mv
)
v
->
mvrange
=
get_prefix
(
gb
,
0
,
3
);
else
v
->
mvrange
=
0
;
v
->
k_x
=
v
->
mvrange
+
9
+
(
v
->
mvrange
>>
1
);
//k_x can be 9 10 12 13
v
->
k_y
=
v
->
mvrange
+
8
;
//k_y can be 8 9 10 11
v
->
range_x
=
1
<<
(
v
->
k_x
-
1
);
v
->
range_y
=
1
<<
(
v
->
k_y
-
1
);
if
(
v
->
pq
<
5
)
v
->
tt_index
=
0
;
else
if
(
v
->
pq
<
13
)
v
->
tt_index
=
1
;
else
v
->
tt_index
=
2
;
lowquant
=
(
v
->
pq
>
12
)
?
0
:
1
;
v
->
mv_mode
=
get_bits1
(
gb
)
?
MV_PMODE_1MV
:
MV_PMODE_1MV_HPEL_BILIN
;
v
->
s
.
quarter_sample
=
(
v
->
mv_mode
==
MV_PMODE_1MV
);
v
->
s
.
mspel
=
v
->
s
.
quarter_sample
;
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
);
v
->
s
.
mv_table_index
=
get_bits
(
gb
,
2
);
v
->
cbpcy_vlc
=
&
vc1_cbpcy_p_vlc
[
get_bits
(
gb
,
2
)];
if
(
v
->
dquant
)
{
av_log
(
v
->
s
.
avctx
,
AV_LOG_DEBUG
,
"VOP DQuant info
\n
"
);
vop_dquant_decoding
(
v
);
}
v
->
ttfrm
=
0
;
if
(
v
->
vstransform
)
{
v
->
ttmbf
=
get_bits
(
gb
,
1
);
if
(
v
->
ttmbf
)
{
v
->
ttfrm
=
ttfrm_to_tt
[
get_bits
(
gb
,
2
)];
}
}
else
{
v
->
ttmbf
=
1
;
v
->
ttfrm
=
TT_8X8
;
}
break
;
}
}
/* AC Syntax */
/* AC Syntax */
...
...
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