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
2f446d38
Commit
2f446d38
authored
Aug 01, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get rid of mb_type_len
Originally committed as revision 9865 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
653f7387
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
mpeg12enc.c
libavcodec/mpeg12enc.c
+6
-8
No files found.
libavcodec/mpeg12enc.c
View file @
2f446d38
...
@@ -562,21 +562,19 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
...
@@ -562,21 +562,19 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
}
}
s
->
f_count
++
;
s
->
f_count
++
;
}
else
{
}
else
{
static
const
int
mb_type_len
[
4
]
=
{
0
,
4
,
3
,
2
};
//bak,for,bi
if
(
s
->
mv_type
==
MV_TYPE_16X16
){
if
(
s
->
mv_type
==
MV_TYPE_16X16
){
if
(
cbp
){
// With coded bloc pattern
if
(
cbp
){
// With coded bloc pattern
if
(
s
->
dquant
)
{
if
(
s
->
dquant
)
{
if
(
s
->
mv_dir
==
MV_DIR_FORWARD
)
if
(
s
->
mv_dir
==
MV_DIR_FORWARD
)
put_mb_modes
(
s
,
6
,
3
,
1
,
0
);
put_mb_modes
(
s
,
6
,
3
,
1
,
0
);
else
else
put_mb_modes
(
s
,
mb_type_len
[
s
->
mv_dir
]
+
3
,
2
,
1
,
0
);
put_mb_modes
(
s
,
8
-
s
->
mv_dir
,
2
,
1
,
0
);
put_qscale
(
s
);
put_qscale
(
s
);
}
else
{
}
else
{
put_mb_modes
(
s
,
mb_type_len
[
s
->
mv_dir
]
,
3
,
1
,
0
);
put_mb_modes
(
s
,
5
-
s
->
mv_dir
,
3
,
1
,
0
);
}
}
}
else
{
// No coded bloc pattern
}
else
{
// No coded bloc pattern
put_bits
(
&
s
->
pb
,
mb_type_len
[
s
->
mv_dir
]
,
2
);
put_bits
(
&
s
->
pb
,
5
-
s
->
mv_dir
,
2
);
if
(
!
s
->
frame_pred_frame_dct
)
if
(
!
s
->
frame_pred_frame_dct
)
put_bits
(
&
s
->
pb
,
2
,
2
);
/* motion_type: frame */
put_bits
(
&
s
->
pb
,
2
,
2
);
/* motion_type: frame */
s
->
qscale
-=
s
->
dquant
;
s
->
qscale
-=
s
->
dquant
;
...
@@ -604,13 +602,13 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
...
@@ -604,13 +602,13 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
if
(
s
->
mv_dir
==
MV_DIR_FORWARD
)
if
(
s
->
mv_dir
==
MV_DIR_FORWARD
)
put_mb_modes
(
s
,
6
,
3
,
1
,
1
);
put_mb_modes
(
s
,
6
,
3
,
1
,
1
);
else
else
put_mb_modes
(
s
,
mb_type_len
[
s
->
mv_dir
]
+
3
,
2
,
1
,
1
);
put_mb_modes
(
s
,
8
-
s
->
mv_dir
,
2
,
1
,
1
);
put_qscale
(
s
);
put_qscale
(
s
);
}
else
{
}
else
{
put_mb_modes
(
s
,
mb_type_len
[
s
->
mv_dir
]
,
3
,
1
,
1
);
put_mb_modes
(
s
,
5
-
s
->
mv_dir
,
3
,
1
,
1
);
}
}
}
else
{
// No coded bloc pattern
}
else
{
// No coded bloc pattern
put_bits
(
&
s
->
pb
,
mb_type_len
[
s
->
mv_dir
]
,
2
);
put_bits
(
&
s
->
pb
,
5
-
s
->
mv_dir
,
2
);
put_bits
(
&
s
->
pb
,
2
,
1
);
/* motion_type: field */
put_bits
(
&
s
->
pb
,
2
,
1
);
/* motion_type: field */
s
->
qscale
-=
s
->
dquant
;
s
->
qscale
-=
s
->
dquant
;
}
}
...
...
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