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
037df60e
Commit
037df60e
authored
Aug 02, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify s->mv_dir init
Originally committed as revision 9867 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
c16c584a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
mpeg12.c
libavcodec/mpeg12.c
+1
-6
No files found.
libavcodec/mpeg12.c
View file @
037df60e
...
@@ -374,7 +374,7 @@ static int mpeg_decode_mb(MpegEncContext *s,
...
@@ -374,7 +374,7 @@ static int mpeg_decode_mb(MpegEncContext *s,
s
->
qscale
=
get_qscale
(
s
);
s
->
qscale
=
get_qscale
(
s
);
/* motion vectors */
/* motion vectors */
s
->
mv_dir
=
0
;
s
->
mv_dir
=
(
mb_type
>>
13
)
&
3
;
dprintf
(
s
->
avctx
,
"motion_type=%d
\n
"
,
motion_type
);
dprintf
(
s
->
avctx
,
"motion_type=%d
\n
"
,
motion_type
);
switch
(
motion_type
)
{
switch
(
motion_type
)
{
case
MT_FRAME
:
/* or MT_16X8 */
case
MT_FRAME
:
/* or MT_16X8 */
...
@@ -383,7 +383,6 @@ static int mpeg_decode_mb(MpegEncContext *s,
...
@@ -383,7 +383,6 @@ static int mpeg_decode_mb(MpegEncContext *s,
s
->
mv_type
=
MV_TYPE_16X16
;
s
->
mv_type
=
MV_TYPE_16X16
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
if
(
USES_LIST
(
mb_type
,
i
))
{
if
(
USES_LIST
(
mb_type
,
i
))
{
s
->
mv_dir
|=
(
MV_DIR_FORWARD
<<
i
);
/* MT_FRAME */
/* MT_FRAME */
s
->
mv
[
i
][
0
][
0
]
=
s
->
last_mv
[
i
][
0
][
0
]
=
s
->
last_mv
[
i
][
1
][
0
]
=
s
->
mv
[
i
][
0
][
0
]
=
s
->
last_mv
[
i
][
0
][
0
]
=
s
->
last_mv
[
i
][
1
][
0
]
=
mpeg_decode_motion
(
s
,
s
->
mpeg_f_code
[
i
][
0
],
s
->
last_mv
[
i
][
0
][
0
]);
mpeg_decode_motion
(
s
,
s
->
mpeg_f_code
[
i
][
0
],
s
->
last_mv
[
i
][
0
][
0
]);
...
@@ -401,7 +400,6 @@ static int mpeg_decode_mb(MpegEncContext *s,
...
@@ -401,7 +400,6 @@ static int mpeg_decode_mb(MpegEncContext *s,
s
->
mv_type
=
MV_TYPE_16X8
;
s
->
mv_type
=
MV_TYPE_16X8
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
if
(
USES_LIST
(
mb_type
,
i
))
{
if
(
USES_LIST
(
mb_type
,
i
))
{
s
->
mv_dir
|=
(
MV_DIR_FORWARD
<<
i
);
/* MT_16X8 */
/* MT_16X8 */
for
(
j
=
0
;
j
<
2
;
j
++
)
{
for
(
j
=
0
;
j
<
2
;
j
++
)
{
s
->
field_select
[
i
][
j
]
=
get_bits1
(
&
s
->
gb
);
s
->
field_select
[
i
][
j
]
=
get_bits1
(
&
s
->
gb
);
...
@@ -422,7 +420,6 @@ static int mpeg_decode_mb(MpegEncContext *s,
...
@@ -422,7 +420,6 @@ static int mpeg_decode_mb(MpegEncContext *s,
mb_type
|=
MB_TYPE_16x8
|
MB_TYPE_INTERLACED
;
mb_type
|=
MB_TYPE_16x8
|
MB_TYPE_INTERLACED
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
if
(
USES_LIST
(
mb_type
,
i
))
{
if
(
USES_LIST
(
mb_type
,
i
))
{
s
->
mv_dir
|=
(
MV_DIR_FORWARD
<<
i
);
for
(
j
=
0
;
j
<
2
;
j
++
)
{
for
(
j
=
0
;
j
<
2
;
j
++
)
{
s
->
field_select
[
i
][
j
]
=
get_bits1
(
&
s
->
gb
);
s
->
field_select
[
i
][
j
]
=
get_bits1
(
&
s
->
gb
);
val
=
mpeg_decode_motion
(
s
,
s
->
mpeg_f_code
[
i
][
0
],
val
=
mpeg_decode_motion
(
s
,
s
->
mpeg_f_code
[
i
][
0
],
...
@@ -442,7 +439,6 @@ static int mpeg_decode_mb(MpegEncContext *s,
...
@@ -442,7 +439,6 @@ static int mpeg_decode_mb(MpegEncContext *s,
mb_type
|=
MB_TYPE_16x16
|
MB_TYPE_INTERLACED
;
mb_type
|=
MB_TYPE_16x16
|
MB_TYPE_INTERLACED
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
if
(
USES_LIST
(
mb_type
,
i
))
{
if
(
USES_LIST
(
mb_type
,
i
))
{
s
->
mv_dir
|=
(
MV_DIR_FORWARD
<<
i
);
s
->
field_select
[
i
][
0
]
=
get_bits1
(
&
s
->
gb
);
s
->
field_select
[
i
][
0
]
=
get_bits1
(
&
s
->
gb
);
for
(
k
=
0
;
k
<
2
;
k
++
)
{
for
(
k
=
0
;
k
<
2
;
k
++
)
{
val
=
mpeg_decode_motion
(
s
,
s
->
mpeg_f_code
[
i
][
k
],
val
=
mpeg_decode_motion
(
s
,
s
->
mpeg_f_code
[
i
][
k
],
...
@@ -460,7 +456,6 @@ static int mpeg_decode_mb(MpegEncContext *s,
...
@@ -460,7 +456,6 @@ static int mpeg_decode_mb(MpegEncContext *s,
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
if
(
USES_LIST
(
mb_type
,
i
))
{
if
(
USES_LIST
(
mb_type
,
i
))
{
int
dmx
,
dmy
,
mx
,
my
,
m
;
int
dmx
,
dmy
,
mx
,
my
,
m
;
s
->
mv_dir
|=
(
MV_DIR_FORWARD
<<
i
);
mx
=
mpeg_decode_motion
(
s
,
s
->
mpeg_f_code
[
i
][
0
],
mx
=
mpeg_decode_motion
(
s
,
s
->
mpeg_f_code
[
i
][
0
],
s
->
last_mv
[
i
][
0
][
0
]);
s
->
last_mv
[
i
][
0
][
0
]);
s
->
last_mv
[
i
][
0
][
0
]
=
mx
;
s
->
last_mv
[
i
][
0
][
0
]
=
mx
;
...
...
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