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
32a6dfeb
Commit
32a6dfeb
authored
Apr 25, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vc1dec: drop mv_f_last, simplify code
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
16cecf9c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
vc1.h
libavcodec/vc1.h
+0
-1
vc1dec.c
libavcodec/vc1dec.c
+2
-13
No files found.
libavcodec/vc1.h
View file @
32a6dfeb
...
...
@@ -354,7 +354,6 @@ typedef struct VC1Context{
uint8_t
zzi_8x8
[
64
];
uint8_t
*
blk_mv_type_base
,
*
blk_mv_type
;
///< 0: frame MV, 1: field MV (interlaced frame)
uint8_t
*
mv_f_base
,
*
mv_f
[
2
];
///< 0: MV obtained from same field, 1: opposite field
uint8_t
*
mv_f_last_base
,
*
mv_f_last
[
2
];
uint8_t
*
mv_f_next_base
,
*
mv_f_next
[
2
];
int
field_mode
;
///< 1 for interlaced field pictures
int
fptype
;
...
...
libavcodec/vc1dec.c
View file @
32a6dfeb
...
...
@@ -5490,9 +5490,6 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
v
->
mv_f_base
=
av_mallocz
(
2
*
(
s
->
b8_stride
*
(
s
->
mb_height
*
2
+
1
)
+
s
->
mb_stride
*
(
s
->
mb_height
+
1
)
*
2
));
v
->
mv_f
[
0
]
=
v
->
mv_f_base
+
s
->
b8_stride
+
1
;
v
->
mv_f
[
1
]
=
v
->
mv_f
[
0
]
+
(
s
->
b8_stride
*
(
s
->
mb_height
*
2
+
1
)
+
s
->
mb_stride
*
(
s
->
mb_height
+
1
)
*
2
);
v
->
mv_f_last_base
=
av_mallocz
(
2
*
(
s
->
b8_stride
*
(
s
->
mb_height
*
2
+
1
)
+
s
->
mb_stride
*
(
s
->
mb_height
+
1
)
*
2
));
v
->
mv_f_last
[
0
]
=
v
->
mv_f_last_base
+
s
->
b8_stride
+
1
;
v
->
mv_f_last
[
1
]
=
v
->
mv_f_last
[
0
]
+
(
s
->
b8_stride
*
(
s
->
mb_height
*
2
+
1
)
+
s
->
mb_stride
*
(
s
->
mb_height
+
1
)
*
2
);
v
->
mv_f_next_base
=
av_mallocz
(
2
*
(
s
->
b8_stride
*
(
s
->
mb_height
*
2
+
1
)
+
s
->
mb_stride
*
(
s
->
mb_height
+
1
)
*
2
));
v
->
mv_f_next
[
0
]
=
v
->
mv_f_next_base
+
s
->
b8_stride
+
1
;
v
->
mv_f_next
[
1
]
=
v
->
mv_f_next
[
0
]
+
(
s
->
b8_stride
*
(
s
->
mb_height
*
2
+
1
)
+
s
->
mb_stride
*
(
s
->
mb_height
+
1
)
*
2
);
...
...
@@ -5705,7 +5702,6 @@ av_cold int ff_vc1_decode_end(AVCodecContext *avctx)
av_freep
(
&
v
->
mb_type_base
);
av_freep
(
&
v
->
blk_mv_type_base
);
av_freep
(
&
v
->
mv_f_base
);
av_freep
(
&
v
->
mv_f_last_base
);
av_freep
(
&
v
->
mv_f_next_base
);
av_freep
(
&
v
->
block
);
av_freep
(
&
v
->
cbp_base
);
...
...
@@ -6102,15 +6098,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
s
->
linesize
>>=
1
;
s
->
uvlinesize
>>=
1
;
if
(
v
->
s
.
pict_type
!=
AV_PICTURE_TYPE_BI
&&
v
->
s
.
pict_type
!=
AV_PICTURE_TYPE_B
)
{
uint8_t
*
tmp
[
2
];
tmp
[
0
]
=
v
->
mv_f_last
[
0
];
tmp
[
1
]
=
v
->
mv_f_last
[
1
];
v
->
mv_f_last
[
0
]
=
v
->
mv_f_next
[
0
];
v
->
mv_f_last
[
1
]
=
v
->
mv_f_next
[
1
];
v
->
mv_f_next
[
0
]
=
v
->
mv_f
[
0
];
v
->
mv_f_next
[
1
]
=
v
->
mv_f
[
1
];
v
->
mv_f
[
0
]
=
tmp
[
0
];
v
->
mv_f
[
1
]
=
tmp
[
1
];
FFSWAP
(
uint8_t
*
,
v
->
mv_f_next
[
0
],
v
->
mv_f
[
0
]);
FFSWAP
(
uint8_t
*
,
v
->
mv_f_next
[
1
],
v
->
mv_f
[
1
]);
}
}
av_dlog
(
s
->
avctx
,
"Consumed %i/%i bits
\n
"
,
...
...
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